Skip to content

feat: add framework-owned templates - #25

Open
apcjoaofilho wants to merge 1 commit into
mainfrom
feat/framework-templates
Open

feat: add framework-owned templates#25
apcjoaofilho wants to merge 1 commit into
mainfrom
feat/framework-templates

Conversation

@apcjoaofilho

Copy link
Copy Markdown
Owner

What

Adds the M1 framework-owned template foundation under templates/ plus a validator script and tests.

Why

Closes #1

Inline templates cannot be reused programmatically or validated. Dedicated files make the framework easier to version, copy into projects, and check in CI.

How

  • Added reusable templates for STATUS.md, STATE.json, project-root AGENTS.md, and ADR.md.
  • Added manual-engine fallback templates for spec-delta.md and project.md, both explicitly labelled as manual fallback only because OpenSpec owns native spec artifacts when spec_engine = openspec.
  • Added skeletal cron prompt templates for pipeline-manager and single-project runs; M5 will complete the end-to-end cron contract.
  • Added scripts/validate-templates.py with --format tty|json, expected-template checks, text placeholder-header checks, manual-fallback labelling checks, and STATE.json schema validation.
  • Added tests/templates/test_templates.py covering template presence, placeholder headers, STATE schema validation, manual fallback labels, validator success, and missing-template failure.
  • Updated templates/README.md, references/README.md, and CHANGELOG.md.

Scope check

  • PR addresses a single concern
  • No vendor lock-in introduced outside skill/
  • PLAN.md updated if scope changed (new phase/template/script/flavor)
  • Tests added/updated where required (see CONTRIBUTING.md)
  • CHANGELOG.md entry added under [Unreleased]
  • ruff check . passes
  • pytest passes (where applicable)

Notes for reviewers

  • This PR follows the implementation handoff split: gate YAML templates are left to M6 (M6: Gates as YAML, machine-verifiable #6), where the gate schema and machine-verifiable checks are defined together.
  • templates/handoff-schema.yaml is left to M12, where scripts/handoff.py can validate it alongside backend behavior.
  • templates/STATE.json cannot start with a comment because it must remain valid JSON and validate against references/state-schema.json; the validator treats it as the only header-comment exception.
  • Verification run locally: ruff check ., pytest -q, python scripts/validate-templates.py --format json, python scripts/validate-state.py templates/STATE.json --format json, and git diff --check.

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.

M1: Extract framework-owned templates to dedicated files

1 participant