feat: add structured spec discovery step to proposal instruction (Layer 1)#902
feat: add structured spec discovery step to proposal instruction (Layer 1)#902sh940701 wants to merge 1 commit intoFission-AI:mainfrom
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughUpdated proposal instructions to require running Changes
Sequence Diagram(s)sequenceDiagram
participant AI as AI Agent
participant CLI as CLI (`openspec`)
participant Catalog as Spec Catalog (JSON)
participant Proposal as Proposal/`proposal.md`
AI->>CLI: run `openspec list --specs --json --detail`
CLI-->>Catalog: return specs JSON (id, title, overview, requirementCount)
AI->>Catalog: review overviews, map relevant specs
AI->>Proposal: populate Capabilities section using catalog `id` for Modified entries and mark New entries
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Replace vague "Check openspec/specs/ for existing spec names" with a concrete CLI-based discovery step using `openspec list --specs --json --detail`. This gives the AI a repeatable workflow for identifying New vs Modified capabilities before writing the Capabilities section, with a graceful fallback for environments where --detail is not yet available. Closes Fission-AI#901
4023bd7 to
eca7a04
Compare
Summary
Replaces the vague "Check
openspec/specs/for existing spec names" instruction with a concrete, CLI-based spec discovery step in the proposal workflow.Before:
After:
Motivation
As projects accumulate specs, the current approach — "just check the directory" — breaks down:
This is why main specs feel underutilized (#878) and why growing spec collections become unwieldy (#872). The fix is simple: give the AI a specific CLI command that returns a lightweight catalog (id + overview), so it can determine relevance without loading full spec content.
Scope — Layer 1 only
This PR implements the core proposal from #901: structured CLI-based spec discovery embedded in the proposal instruction.
The extended proposal from #901 (Layer 2 — sub-agent optimization for tools that support delegating tasks to separate contexts) is intentionally deferred to a follow-up PR to keep this change minimal and reviewable.
Changes
schemas/spec-driven/schema.yamlopenspec list --specs --json --detailstep, plus fallback for environments without--detailsrc/core/templates/workflows/continue-change.tsNot changed (but covered):
propose.tsandff-change.tsread the proposal instruction fromschema.yamlviaopenspec instructions proposal --json, so they pick up the change automatically.Related issues
--detailflag creates the lightweight catalog this relies on)Test plan
schema.yamlis valid YAML with correct indentationcontinue-change.tscompiles (template literal escaping intact)propose.tsandff-change.tsdon't need changes (they delegate to schema instruction)--detailis not yet available