Skip to content

Conversation

@rororowyourboat
Copy link

Closes #654

Summary

This PR introduces script-based entry points for common MSML workflows, reducing reliance on notebooks for reproducible, automatable operations.

Changes

  • ✅ Created directory with CLI tools
  • ✅ - Validate MSML specifications (CI-friendly)
  • ✅ - Automated report generation
  • ✅ Comprehensive with:
    • Usage examples for each script
    • Scripts vs notebooks guidance
    • Recommended project structure
    • Template for new scripts

Benefits

  • CI/CD integration: Scripts can be used in automated pipelines
  • Reproducibility: Deterministic, versioned workflows
  • Batch processing: Process multiple specs automatically
  • Testability: Scripts are easier to test than notebooks
  • Flexibility: Notebooks remain for exploration, scripts for automation

Usage Examples

Design Philosophy

  • Notebooks for exploration: Interactive analysis and visualization
  • Scripts for automation: Reproducible, testable, CI-friendly workflows
  • Shared modules: Extract reusable logic for both notebooks and scripts

- Create scripts/ directory with CLI tools
- Add load_and_validate_spec.py for spec validation
- Add generate_reports.py for automated report generation
- Include comprehensive scripts/README.md with usage guide
- Document scripts vs notebooks usage patterns
- Provide project structure recommendations
- Addresses issue #654
Copilot AI review requested due to automatic review settings January 22, 2026 16:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces script-based entry points for validating MSML specs and generating documentation, plus a README to guide using scripts vs notebooks.

Changes:

  • Added scripts/load_and_validate_spec.py to load and validate MSML JSON specs via CLI, suitable for CI and batch validation.
  • Added scripts/generate_reports.py to (intended to) generate documentation reports from MSML specs, with CLI options for format and output directory.
  • Added scripts/README.md documenting available scripts, usage examples, and guidance on structuring and extending script-based workflows.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
scripts/load_and_validate_spec.py Implements a CLI tool to load specs with load_from_json, report basic counts in verbose mode, and exit non-zero on validation errors, enabling CI-style validation.
scripts/generate_reports.py Implements a CLI wrapper intended for report generation from specs, but currently only logs status messages and does not actually invoke the reporting functions, and its docstring overstates HTML/Obsidian support.
scripts/README.md Documents how to use the new scripts, their use cases, and how to structure/add scripts, though it currently overclaims batch reporting capabilities versus the actual generate_reports.py interface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with open(spec_path, 'r') as f:
spec_data = json.load(f)

ms = load_from_json(spec_data)
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_from_json is called without the optional spec_path argument, which causes it to print a "Add spec path to load_from_json..." message on every run and prevents spec-tree loading that downstream reporting tools may rely on.
For cleaner CLI output and to support spec-tree-aware reporting (e.g., Obsidian vault generation), consider passing the spec_path into load_from_json rather than using the default.

Suggested change
ms = load_from_json(spec_data)
ms = load_from_json(spec_data, spec_path)

Copilot uses AI. Check for mistakes.
rororowyourboat and others added 5 commits January 23, 2026 17:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Script-Based Workflows (Reduce Reliance on Notebooks)

2 participants