Skip to content

feat: ship schemas for proposal, tasks, and design artifacts - #12

Open
N4M3Z wants to merge 1 commit into
mainfrom
change/artifact-schemas
Open

feat: ship schemas for proposal, tasks, and design artifacts#12
N4M3Z wants to merge 1 commit into
mainfrom
change/artifact-schemas

Conversation

@N4M3Z

@N4M3Z N4M3Z commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Every change artifact now validates against an embedded mdschema with the same repo-override path the spec schemas use. A proposal carries Why, What Changes, Capabilities, and Impact with status frontmatter. Tasks carry numbered sections of N.M checkboxes. A design carries its approach at warning severity, because existing designs predate the schema. Validation wires the schemas through validate_change, so tree and per-change runs check identically, and every repo with a docs spec tree inherits them. A wiring test pins the three diagnostic codes.

spec:none: the change adds validation schemas and no new lifecycle contract.

Note

Add Markdown schema validation for proposal, tasks, and design artifacts in changes

  • Introduces three new schemas: proposal.mdschema, tasks.mdschema, and design.mdschema, each defining required headings, structure, and content rules for the corresponding artifact
  • Embeds the schemas at compile time via new constants in templates.rs and bundles them into a ChangeSchemas struct in validate.rs\n- validate_change now reads proposal.md, tasks.md, and design.md from the change directory when present and emits diagnostics with codes proposal-schema-invalid, tasks-schema-invalid, and design-schema-invalid
  • Adds a test in tests.rs stubbing the schema checker to verify the three diagnostic codes are produced for a sample change
  • Behavioral Change: changes that include proposal.md, tasks.md, or design.md will now produce validation warnings or errors that did not exist before; existing canonical spec and delta validation behavior is unchanged

Macroscope summarized 87697fa.

Every change artifact now validates against an embedded mdschema
with the same repo-override path the spec schemas use: a proposal
carries Why, What Changes, Capabilities, and Impact with status
frontmatter, tasks carry numbered sections of N.M checkboxes, and
a design carries its approach. Validation wires them through
validate_change, so tree and per-change runs check identically. A
wiring test pins the three diagnostic codes.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@N4M3Z N4M3Z added size:med auto: changed-lines bucket spec:none Owner waiver: no specification change needed, reason in body skip:cursor Owner override: the cursor lane never runs review:runeseer Summons the adjudicating correctness lane labels Aug 27, 2026
@runewright runewright Bot added the review:macroscope Summons the macroscope lane label Aug 27, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 27, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds automatically active schema validation for proposal, task, and design artifacts, changing the diagnostics and possible outcomes of existing validation commands. The implementation is localized and fully author-owned, but the runtime behavior expansion merits human review.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@runewright runewright Bot added the stage:macroscope Stage settled clean; remove to re-run it label Aug 27, 2026
@N4M3Z N4M3Z added review:runeseer Summons the adjudicating correctness lane and removed review:runeseer Summons the adjudicating correctness lane labels Aug 27, 2026
Comment thread schemas/proposal.mdschema

heading_rules:
no_skip_levels: true
max_depth: 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [runeseer] reported by reviewdog 🐶
Highproposal.mdschema rejects every proposal already in this repository's spec tree, so rune spec validate, archive preflight, and doctor now emit proposal-schema-invalid on artifacts this change does not touch.

  • docs/openspec/changes/spec-compatibility/proposal.md:14 ### New Capabilities sits at depth 3, past max_depth: 2; decision-artifacts and development-lifecycle carry the same heading.
  • docs/openspec/changes/decision-artifacts/proposal.md:1 starts at ## Why with no frontmatter, so the required status field is absent.

@runeseer

runeseer Bot commented Aug 27, 2026

Copy link
Copy Markdown

Runeseer review — 1 open finding

Risk Finding Location
High Proposal schema rejects all existing proposals in the spec tree schemas/proposal.mdschema:15

Request changes. The new proposal schema errors on all three proposals already under docs/openspec/changes/, so validation fails on files this change never touches.

  • The tasks and delta schemas match the existing artifacts; only the proposal schema conflicts.
  • Fix by relaxing max_depth and the required status field, or by updating the three proposals in this change.
  • Scaffolded proposals from templates/spec/proposal.md do satisfy the schema, so the break is limited to artifacts written before it.

1 open · Reviewed 87697fa5 · review run · $1.21 · 2m40s · 34 turns

@runeseer

runeseer Bot commented Aug 27, 2026

Copy link
Copy Markdown

@N4M3Z, the following findings block this head:

  • schemas/proposal.mdschema:15: Proposal schema rejects all existing proposals in the spec tree

Choose one action:

  • Fix all findings. Then apply review:runeseer to review the new head.
  • Apply ignore:runeseer to accept the complete current verdict.

@github-actions github-actions Bot removed review:macroscope Summons the macroscope lane review:runeseer Summons the adjudicating correctness lane labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:schemas size:med auto: changed-lines bucket skip:cursor Owner override: the cursor lane never runs spec:none Owner waiver: no specification change needed, reason in body stage:macroscope Stage settled clean; remove to re-run it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant