fix: openspec config template mixes sequence and mapping (invalid YAML)#1008
Open
juansacdev wants to merge 1 commit into
Open
fix: openspec config template mixes sequence and mapping (invalid YAML)#1008juansacdev wants to merge 1 commit into
juansacdev wants to merge 1 commit into
Conversation
rules.apply mixed a block sequence with sibling mapping keys under the same node, which is invalid YAML. Nest the guideline bullet under a guidelines key so tdd and test_command stay valid siblings, matching the shape already used for rules.verify.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModifies the sample YAML structure in openspec-convention.md, introducing a ChangesDocumentation YAML fix
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
🚥 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked Issue
Closes #1007
🏷️ PR Type
What kind of change does this PR introduce?
type:bug— Bug fix (non-breaking change that fixes an issue)type:feature— New feature (non-breaking change that adds functionality)type:docs— Documentation onlytype:refactor— Code refactoring (no functional changes)type:chore— Build, CI, or tooling changestype:breaking-change— Breaking change (fix or feature that changes existing behavior)📝 Summary
internal/assets/skills/_shared/openspec-convention.mddocuments theopenspec/config.yamlshape SDD phases read. Therules.applyexample mixed a block sequence with sibling mapping keys under the same YAML node, which is invalid YAML — a node can't be both a sequence and a mapping. Any strict parser rejects it:python3 -c "import yaml; yaml.safe_load(open('f.yaml'))"Since
sdd-initand this shared convention doc instruct agents to create realopenspec/config.yamlfiles from this exact template, any project bootstrapped from it inherits a config file that fails to parse.The fix nests the guideline bullet under a
guidelines:key sotddandtest_commandremain valid mapping siblings — the same shape the doc already uses forrules.verify:I checked
internal/Go source (rg -n "test_command|strict_tdd|rules" --type go) and confirmed no Go code parsesopenspec/config.yaml'srulessection — it's prompt/documentation-consumed only, so this is a pure documentation-shape fix with no parser coupling. I also surveyed the rest of the repo (rg -n "apply:" --type md --type go) for the same mixing pattern; the analogous blocks indocs/openspec-config.mdand the repo's ownopenspec/config.yamlalready keepapply:as a pure sequence, so they don't hit this bug and were left untouched.📂 Changes
internal/assets/skills/_shared/openspec-convention.mdrules.applyguideline bullet under a newguidelines:key so the block is valid YAML🧪 Test Plan
Unit Tests
go test ./...E2E Tests (Docker required)
go test ./...)cd e2e && ./docker-test.sh) — not run; change is a docs/template-only markdown edit with no runtime code pathyaml.safe_load🤖 Automated Checks
The following checks run automatically on this PR:
additions + deletions) or usesize:exceptionCloses/Fixes/Resolves #Nstatus:approvedtype:*Labeltype:*label must be appliedgo test ./...must passcd e2e && ./docker-test.shmust pass✅ Contributor Checklist
status:approvedsize:exceptionwith rationale documentedtype:*label to this PR — I don't have write access to apply labels;type:docsrequested abovego test ./...)cd e2e && ./docker-test.sh) — not applicable, no runtime code touchedCo-Authored-Bytrailers💬 Notes for Reviewers
This is a 2-line, 1-file diff. Issue #1007 is freshly filed alongside this PR (I don't have write access to the repo, so I can't self-apply
status:approved— flagging that the linked-issue CI check will stay pending until a maintainer approves it).Summary by CodeRabbit
guidelinessection underapply.