Skip to content

refactor(openspec): split big capabilities into nested ones - #4981

Merged
dan-petty merged 2 commits into
mainfrom
refactor/4622-split-big-capabilities-into-nested-ones
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
refactor/4622-split-big-capabilities-into-nested-ones

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Split the four big OpenSpec capabilities into 44 nested capabilities, openspec/specs/<area>/<name>/spec.md, one per gate or module: roadmap-stage into 21, roadmap-implement-job and roadmap-implement-step into 7 each, and roadmap-refine into 9. Each requirement moves word for word. The stage job lists the base specs with openspec list --specs --json, and the plan reader, the validation and refine read nested capabilities. A test refuses a capability of more than 80 requirements.

Why: archive appends each ADDED requirement at the end of its capability file, so two pull requests that archive into one capability conflict. roadmap-stage/spec.md had 81 conflicts in a week.

Open deltas: the 13 open change folders on main move here. No open pull request changes these areas. A later delta at an old id moves with one git mv specs/<area>/spec.md specs/<area>/<name>/spec.md.

Closes #4622

Change: openspec/changes/archive/2026-11-12-4622-split-big-capabilities-into-nested-ones/

@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/openspec OpenSpec changes, specs and their checks labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence

Word-for-word split. For each area, openspec show <area> --type spec --json on origin/main (87ae9ee) was compared with the union of openspec show <area>/<name> --type spec --json of its nested capabilities. The name, the text and the scenarios of each requirement are equal, with none lost or added:

Area Requirements on main In the nested capabilities Result
roadmap-stage 342 342 equal
roadmap-implement-job 145 145 equal
roadmap-implement-step 91 91 equal
roadmap-refine 81 81 equal

The total is 659 (the issue counted 626 on 2026-11-11). The split ran again after the rebase over #4879 and #4958, which changed requirements of roadmap-implement-job and roadmap-stage; the comparison above is after that rebase. The archive of this change then adds one requirement each to roadmap-stage/spec-delta, roadmap-implement-job/selection and roadmap-refine/context.

Sizes after the archive (limit 80):

  • roadmap-stage: task-groups 36, paths-gate 25, round 25, run-limits 25, toolbox 24, plan-text 19, trace-gate 19, selection 18, self-rules 18, claims 17, tests-gate 17, verification 13, context 12, references 12, replies 12, returns 12, premise 9, ready 9, spec-delta 9, plan-cache 7, criteria 5.
  • roadmap-implement-job: record 26, stops 26, runner-job 25, pull-request 24, selection 22, deadline 13, repair 10.
  • roadmap-implement-step: exit-checks 19, trace 17, budgets 13, inputs 13, verification 11, model-calls 9, shell 9.
  • roadmap-refine: proposal 15, writes 15, waits 14, selection 11, deferred-parts 7, alternatives 6, context 5, investigation 5, review 4.

OpenSpec. openspec validate --specs --strict: 290 passed. uv run devops openspec archive validated every spec and change after the archive. uv run devops openspec check passed.

Fail-to-pass. uv run devops ci fail-to-pass --base origin/main: 16 failed on base and pass on the change (16 failed and 377 passed in the changed test modules on base): the base spec reader (5), the capability name of a delta (1), read_spec of a nested capability (2), the plan reader (2), the validation copy (1), the refine context (1), the size invariant (1), the record readers of the nested specs (3), and the scaffold of a nested delta (1).

Stage eval replay. uv run devops roadmap eval stage --replay gives the same report on base (c17f71f) and on the change: 58 cases, every gate refuses what it must refuse, and 5 of 5 good plans pass.

Tests. The affected modules (tests/roadmap/stage, tests/roadmap/refine, tests/openspec, the plan check, read, rewrite and recheck tests and commands, tests/roadmap/implement/test_roadmap_implement_job.py, the record readers, the change folder and living spec invariants, and the OpenSpec contract tests): 3,177 passed and 3 failed in one run on a loaded host. The 3 pass in a second run: one was the scaffold test, fixed here; the other two were a git timeout and an OTLP export under load. The live contract test test_the_fake_lists_the_capabilities_that_the_real_tool_lists ran with the real OpenSpec 1.14.3 and passed. mypy --strict on the changed files under src/ found no error.

Open pull requests and plans with a spec delta (listed before the push):

The four big capabilities become 44 nested capabilities, one for each
gate or module: roadmap-stage gives 21, roadmap-implement-job 7,
roadmap-implement-step 7 and roadmap-refine 9. Each requirement moves
word for word. The 13 open change folders that name a split capability
move their deltas to the new ids.

The stage job reads the base capabilities from
`openspec list --specs --json`, and the flat folder walk goes. The plan
reader, the validation and the refine context read a nested capability.
openspec/config.yaml states the limit of 80 requirements, and an
invariant test refuses a capability over it.
@dan-petty
dan-petty force-pushed the refactor/4622-split-big-capabilities-into-nested-ones branch from 3ae16ef to 580d383 Compare November 12, 2026 08:49
@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 09:01
@dan-petty

Copy link
Copy Markdown
Owner Author

Check results

Head commit: 580d383c1c8b3e238cd525ad3a5edb54a2ac6ba2

Check Conclusion Link
Tests & Coverage success run
devops-cli success run
zizmor success run
trivy-config success run
Plan Check skipped run
CodeQL success run
Fail-to-Pass Check skipped run
Dependency Freshness skipped run
Test Job Duration skipped run
Tests & Coverage (shard 3 of 4) success run
Tests & Coverage (shard 1 of 4) success run
DevContainer Image success run
Tests & Coverage (shard 2 of 4) success run
Service Image success run
Tests & Coverage (shard 4 of 4) success run
Runner Image success run
Design Tokens success run
MCP Server Image success run
Docs Site Build success run
Changed-Test Independence success run
Analyze (actions) success run
Static Analysis success run
Analyze (python) success run
Semantic PR title success run

Skipped check: Plan Check
Skipped check: Fail-to-Pass Check
Skipped check: Dependency Freshness
Skipped check: Test Job Duration

@dan-petty
dan-petty merged commit dfb09bd into main Nov 12, 2026
24 checks passed
@dan-petty
dan-petty deleted the refactor/4622-split-big-capabilities-into-nested-ones branch November 12, 2026 12:05
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.118.0](v0.117.2...v0.118.0)
(2026-11-12)


### Features

* **ci:** devops ci stops its rows when timeout ends it
([#5031](#5031))
([1fa4e9c](1fa4e9c))
* **roadmap:** keep the stage gate problems as a list with a code
([#5022](#5022))
([5819627](5819627))
* **roadmap:** log one result line for each roadmap job attempt
([#4966](#4966))
([2b6fe3f](2b6fe3f))
* **telemetry:** record each CLI usage error by name and kind
([#4973](#4973))
([a179fd9](a179fd9))


### Bug Fixes

* **ai:** chat loads each persona prompt and challenger gets tools
([#5037](#5037))
([c40b0ad](c40b0ad))
* **ai:** keep the HTTP status of a Claude reply after retries
([#4976](#4976))
([5bf9466](5bf9466))
* **deps:** keep Renovate uv bumps green and groups on Monday
([#4987](#4987))
([b19e153](b19e153))
* **k8s:** raise the limits that 7 d of use shows are too low
([#5030](#5030))
([028c62b](028c62b))
* **roadmap:** a job posts no comment that repeats a recent one
([#4978](#4978))
([fff903a](fff903a))
* **service:** alert when GitHub cannot deliver a webhook
([#5045](#5045))
([2bfbfcb](2bfbfcb))
* **service:** delete the stream route that sends canned verified text
([#5038](#5038))
([e9d51b5](e9d51b5))
* **telemetry:** keep one upstream status series per service
([#4986](#4986))
([3e4ca56](3e4ca56))
* **tests:** remove the runner variable in the test floor
([#4988](#4988))
([093aa61](093aa61))


### Performance Improvements

* **ai:** make the ast graph walk and call search faster
([#5039](#5039))
([3b25cc6](3b25cc6)),
closes [#4662](#4662)
* **ci:** build the devcontainer only on its own inputs
([#4977](#4977))
([c5b15ac](c5b15ac))
* **ci:** test each merge once, on the push to main
([#5043](#5043))
([c6992b1](c6992b1))
* **tests:** remove fixed waste in six slow tests
([#4995](#4995))
([1c7044e](1c7044e))


### Code Refactoring

* **ai:** delete devops ai pipeline and persona leftovers
([#5044](#5044))
([d5fefde](d5fefde)),
closes [#4827](#4827)
* **openspec:** split big capabilities into nested ones
([#4981](#4981))
([dfb09bd](dfb09bd))
* **pr:** devops pr update acts only on a failed check
([#4990](#4990))
([aa4fa1a](aa4fa1a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty added a commit that referenced this pull request Nov 12, 2026
…stage/spec-delta

#4981 split roadmap-stage into nested capabilities. The stale-command
check is a check of the spec delta, so its two ADDED requirements go to
roadmap-stage/spec-delta.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(openspec): split big capabilities into nested ones

1 participant