fix(schemas): include spec content guidance from concepts docs in specs instructions#1326
fix(schemas): include spec content guidance from concepts docs in specs instructions#1326clay-good wants to merge 1 commit into
Conversation
…cs instructions Closes Fission-AI#1289 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe ChangesSpec Guidance Documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TabishB
left a comment
There was a problem hiding this comment.
Happy to try this out. Need a way to eval or A/B test these kinds of things.
I think defining an eval would be a good way for us to describe the desirable condition.
| instruction: | | ||
| Create specification files that define WHAT the system should do. | ||
|
|
||
| A spec is a behavior contract, not an implementation plan. |
There was a problem hiding this comment.
Hm thining about this more: should this be in the instructions or in a skill? <- unsure how we should be thinking about this.
I believe the instructions only get applied at skill/command invocation time?
if someone is editing this directly with their agents, will the agent keep these instructions in mind?
There was a problem hiding this comment.
No, if someone edits specs directly with their agent, the agent won't see these instructions. They only surface when something runs openspec instructions specs.
Moving the guidance into a skill wouldn't change that: skills are also only in context when invoked, so a direct edit bypasses both equally. The instruction block is just the cheapest single place that covers all the skill-driven flows (new-change, continue-change, ff-change, propose all route through it).
For direct edits, a realistic backstop would be a content-level check in openspec validate maybe?
Closes #1289
What was missing:
docs/concepts.mdexplains that a spec is a behavior contract — what belongs in one (observable behavior, inputs/outputs, constraints, testable scenarios) and what doesn't (class names, framework choices, implementation steps). But that guidance never reached agents: thespecsinstructions shipped with OpenSpec don't include it, so agents only follow it when a user pastes it in by hand (as reported in #1289).What this does: Adds that guidance, verbatim from
docs/concepts.md, to thespecsartifact instruction inschemas/spec-driven/schema.yaml. Every agent authoring specs now sees it viaopenspec instructions specs, in new and existing projects alike (the built-in schema resolves from the package, so no migration is needed).Proof it works:
openspec instructions specson a fresh project now emits the guidance inside the<instruction>block; resolver, instruction-loader, and skill-template parity tests pass.Notes: Deliberately narrow — one file, +17 lines, no skill template changes (the broader rewrite in #1284 was closed in favor of surgical fixes).
Note
For the reviewer: one path is intentionally not covered — the
sync-specsskill carries its own inline delta-format guidance and doesn't go throughopenspec instructions specs, so it won't show this guidance. Covering it means touching skill templates (and their golden hashes), so I left it as a possible follow-up.🤖 Generated with Claude Code