Repository navigation
Description
Problem or Motivation
Owner decision (2026-11-11): split the big OpenSpec capabilities into nested capabilities to cut merge conflicts, with no rule change. The archive stays in the closing PR (AGENTS.md rule 1, ADR 0010).
Measured in the conflict census of 2026-11-04 to 2026-11-11 (all 460 topic PRs):
- 130 base updates of topic PRs had a real merge conflict. 97 of them (75%) include a file under
openspec/specs/, and 62 are only in such files. openspec/specs/roadmap-stage/spec.mdalone had 81 conflicts. In 74 of 91 spec-file conflicts, both sides only added requirements at the end of the same file. openspec 1.14.3 always appends ADDED requirements at the end of the capability file (dist/core/specs-apply.jsabout lines 464-467), so two PRs that archive into one capability always conflict.- Size today: roadmap-stage 335 requirements (4,290 lines), roadmap-implement-job 142, roadmap-implement-step 90, roadmap-refine 79.
- Each conflict costs a rebase push and a full CI run (about 45 runner-minutes). The 56 spec-only conflict pushes of the week cost about 2,240 runner-minutes.
Proposed Solution & Architectural Design
Use the nested layout that openspec 1.14.3 supports: openspec/specs/<area>/<id>/spec.md. Checked on the pinned install (~/.local/share/devops-cli/tools/openspec/1.14.3, dist/utils/spec-discovery.js:7): openspec list --specs --json lists a nested folder as the capability area-a/cap-one next to the flat ones.
- Split roadmap-stage, roadmap-implement-job, roadmap-implement-step and roadmap-refine into nested capabilities under an area of the same name (for example
roadmap-stage/paths-gate,roadmap-stage/trace-gate,roadmap-stage/selection). Group the requirements by the module or gate that they describe, so that concurrent PRs about different gates append to different files. Move each requirement word for word: change no requirement text and no scenario. - Move the deltas of every open change folder under
openspec/changes/that names a split capability to the new ids in the same PR, and say in the PR how an open PR or plan PR moves its delta after the merge (onegit mvof itsspecs/<old>/spec.md). - Make every reader of spec paths take the nested layout. Replace the flat folder walk of
read_base_specs(src/devops_cli/roadmap/stage/stage_specs.pyabout lines 62-74) withopenspec list --specs --json, which the stage tools already read (stage_tools.pyabout line 291). Check the other modules that nameopenspec/specs:stage_change.py,stage_references.py,stage_validate.py,refine/refine.py,commands/pr.py,openspec/archive.py,openspec/skills.py,github/defect_classifier.py,config/constants.pyandlang/en/messages.py. - Write the nested layout and the size limit of a capability into
openspec/config.yaml(the rules for a new capability), so that a capability that grows past the limit gets split.
Merge it at a quiet time and say so on the open PRs that change these specs, because the split conflicts once with each of them.
Target Subsystem
openspec/specs (the four capabilities), openspec/changes (open deltas), src/devops_cli/roadmap/stage, src/devops_cli/roadmap/refine, src/devops_cli/openspec, src/devops_cli/commands/pr.py, openspec/config.yaml.
Existing Tool Considered
The openspec CLI 1.14.3 itself: its nested capability layout and openspec list --specs --json. The change deletes the custom folder walk and adds no code. Rejected: a git union merge driver (GitHub ignores .gitattributes merge drivers in its own merge and conflict check, so it saves no push, and ADR 0010 showed that it hides a lost edit), archiving after the merge (needs a rule change; the owner chose this split), and a GitHub merge queue (not available to a repository that a user account owns).
Acceptance criteria
- No capability under
openspec/specs/holds more than 80 requirements. - A test compares the requirements before and after: the same set of requirement titles and texts and the same scenarios, with none lost, added or changed. The total stays equal (626 in the four capabilities today).
openspec validate --specs --strictpasses, andopenspec list --specs --jsonlists the new ids.- The stage job reads the base specs of a nested capability: a test with a nested fixture tree passes, and the flat walk is gone.
- Every open change folder on main validates against the new ids.
- One week after the merge, a comment on this issue gives the number of conflicting base updates that touch
openspec/specs/(the census method of 2026-11-11), against 97 in the week before.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
refactorprefix of the title gives the type.(openspec)scope of the title gives the scope.It saves CI time and reduces conflict friction, but the system works today and the merge needs quiet timing.It removes the top source of merge conflicts and saves roughly 2,240 runner-minutes per week.It moves hundreds of requirements, updates at least ten code readers, relocates open deltas, and coordinates with in-flight PRs.Both concern the OpenSpec layer; #1753 adopted OpenSpec, the candidate restructures its spec files to cut merge conflicts.dan-petty commentedon Nov 11, 2026
Scope from the iteration lane plan (2026-11-11)
This issue is child 1 of #4667. The plan keeps the scope as filed. The nested split is the main lever on late conflicts: the cluster gate of the plan removes no late conflict, because 45-46 of the 52 late conflicts in the census week came from a
mainchange after the last own push.devops-cli-service commentedon Nov 12, 2026
Released in v0.118.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.118.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 12:40 UTC