Repository navigation
feat(product-development): add the retrofit guide for codebases without specs - #59
Conversation
…ut specs Add references/retrofit.md: the four steps (a maintainer braindump run like the Vision Grill, eight feature lenses each run by its own subagent, one feature inventory the maintainer approves, routing to modernization, shaping/ or ideas/), a short prompt template per lens with a shared preamble and report format, and the wayfinder rule for large codebases with a link to its public source and the steps that work without it. The inventory's approval scopes the retrofit only and ratifies nothing; the inventory stays outside docs/product/ and is deleted once its features are seeded. Code alone never admits a spec; specs in other formats are evidence for shaping. Retirements follow the modernization guide's approval rules, and market details go to research notes. A synthetic task-tracker example routes one feature to each destination. tests/fixtures/retrofit/ is the bundle it seeds, checked by the profile check (with the 0.1.0 folder pending) and the pinned validator. tests/retrofit.bats checks the mechanical acceptance criteria and is listed in docs/development.md. Refs #47, #35
SKILL.md gains a Retrofit workflow section (trigger, process, gate), a workflow-selection row for codebases whose features have no product docs or only specs in other formats, a feature-lens row in the sub-agent dispatch table, a reference-list entry, and "retrofit a codebase that has no specs" in its description. The one-behavior case still routes to Discovery and Design. The feature-tags reference now links the retrofit guide where it calls tags optional evidence, and the modernization and vision references replace their pending issue mentions with links to it. Refs #47, #35
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…in the retrofit fixture
The seeded shaping document now records a design-level open question
("every weekday" schedules) and the fixture carries the register,
docs/product/open-questions.md, with a regenerated index that lists it,
so the suite exercises the path where a retrofit records a question.
The provenance record's Evidence row links each source with synthetic
links: the OpenSpec spec, the recurrence test file and its group, and
the feat(recurrence) pull requests (#123-style placeholders on
github.com/example). A new test requires those links and refuses any
non-synthetic URL in the fixture.
The features/ assertion now lists the exact files expected there instead
of grepping for an unquoted feature-spec type, which quoted YAML would
bypass. The inventory test is relabelled as bundle exclusion and also
checks that no inventory sits beside the fixture.
Refs #47, #35
- Finishing: regenerate the open-questions index, with the same --pending flags, before open-questions.py check, so a retrofit that records a question no longer fails with "index is stale". A test runs the reference's command block as written on a copy of the fixture with a stale index. - Lenses: one subagent per lens in every case. Without wayfinder each lens reads package by package as needed and always reads the shared root files and the whole repository's history; the preamble's Scope and the worked example say the same, so the example's root-level openspec/ is in every lens's scope. - Mixed projects: when 0.1.0 left docs/product/AGENTS.md and README.md, reconcile them before seeding, linking modernization's setup rather than restating it. The worked example now has that scaffolding. - wayfinder: on a GitHub-backed tracker its map and child issues are GitHub writes, so the maintainer approves each one under SKILL.md's GitHub Writes rule; local Markdown tracker operations fall outside it. SKILL.md's Retrofit process says the same. - Already-live behavior: the guide stops at the promotion PR, and the ratified change records no Shipped entry until the skill settles what evidence and release check apply. Refs #47, #35
|
@coderabbitai full review |
Action not completed
|
… changes The retrofit guide said an already-live change had no settled path past ratification, which could lead an agent to skip the handoff when the promotion PR merges. The handoff still applies as for any ratified change: drafted at merge and sent once the implementation-level check passes. Only recording Shipped pauses until the maintainer rules on the ship signal for behavior that was already live. Refs #47, #35
|
Review note: the review gate was Codex gpt-6.2-sol at high effort, with a first review and a narrow check of the fixes. The check's one remaining finding (the handoff still applies to an already-live change) was fixed in d837563. CodeRabbit's full review of 9b1ba40 was requested but hadn't posted when this PR merged; any comments it leaves will be answered on the final PR to main (#60, the 0.2.0 release). All 16 suites (675 tests) passed at d837563. |
Refs #47 (product-development: retrofit guide for codebases without specs), part of #35 (product-development 0.2.0 release).
Delivery overview
Adds
references/retrofit.md, the path from "a codebase" to a set of features in the right stages, for projects that adopt the skill after their code exists. It has four steps: a maintainer braindump run like the Vision Grill; eight feature lenses, each run by its own subagent from a short prompt template that returns candidate features with evidence; one feature inventory the maintainer approves; and routing of each approved feature to modernization,shaping/orideas/. It also covers thewayfinderrule for large codebases, with a link to its public source, and works end to end without it. A synthetic task-tracker example routes one feature to each destination.tests/fixtures/retrofit/is the bundle that example seeds, andtests/retrofit.batschecks the acceptance criteria that can be checked mechanically. SKILL.md links the guide from its workflows, its workflow-selection table, its sub-agent dispatch table, its reference list and its description.Acceptance criteria (#47):
wayfinderrule with a link to its source, andSKILL.mdlinks it.wayfinderis not installed. The example declines it and runs all four steps.Governing decisions (do not weaken)
features/without a promotion PR. A change whose code already shipped still goes through promotion, as SKILL.md's Promotion workflow already requires.docs/product/and never merges to the default branch. It lists code, which the feature-tags reference (product-development: link code to features with@featuretags #38,@featuretags) bars from the product bundle, and it has no type on the OKF profile's closed list (Spike: evaluate an OKF compatibility profile for product documentation #25, OKF profile). It is deleted once its features are seeded. The retrofit PR body records each feature's destination and the maintainer's approval.docs/product/AGENTS.mdandREADME.md(whichinit.shkeeps) are rewritten from the current templates as the modernization guide's setup describes, through a link rather than a restatement.wayfinderis recommended, never invoked, and its GitHub writes are approved. It hasdisable-model-invocation: true, which I checked in its source. The agent explains which thresholds hold and the user invokes it. On a GitHub-backed tracker its map and child issues are GitHub writes, so the maintainer sees and approves each one under SKILL.md's GitHub Writes rule (from Improve product-development plugin with lifecycle review and handoff workflows #18, GitHub Writes approval), which covers helper workflows; local Markdown tracker operations fall outside that rule. The link points to https://github.com/mattpocock/skills/tree/main/skills/engineering/wayfinder; I checked through the GitHub API that it is public (MIT,mainat 255351f). Its map can scope the lenses but is not the inventory.wayfinder, each lens reads package by package as needed and always reads the shared root files and the whole repository's history, so root-level material such as the example'sopenspec/is never missed.tests/fixtures/retrofit/), like the OKF profile fixture, so the existing "every skill fixture conforms" validator test passes on it. The 0.1.0 folder routed to modernization stays--pending.Rejected alternatives
docs/product/. That would need a new OKF type and would break the rule that nothing in the bundle lists code.Changes outside the packet's core files
references/feature-tags.md: links the retrofit guide where it calls tags optional evidence. This was the pending wiring from product-development: link code to features with@featuretags #38 (feature tags).references/modernization.mdandreferences/product-vision.md: their "product-development: retrofit guide for codebases without specs #47 (the retrofit guide)" and "product-development: modernization guide for specs written with 0.1.0 #46 (modernization guide)" mentions now point to the guides as links, since both guides now exist.SKILL.md: the workflow-selection row "Code exists with no spec" now reads "One behavior exists in code with no spec" and still routes to Discovery and Design. A new row routes whole codebases to Retrofit. The Retrofit process notes thatwayfinder's GitHub writes wait for approval.Commit checklist
997ba2716193238a7e36b9b1ba40Review fixes (independent review at
1619323)open-questions.py index --pending …beforecheck; the fixture records a live question (shapingOQ-1) and carries the register with its index. A test runs the reference's command block as written against a stale-index copy (it failed with "index is stale" before the fix). —8a7e36b,9b1ba409b1ba40AGENTS.md/README.mdbefore seeding via a link to modernization's setup. —9b1ba40wayfinderapproval stated at the recommendation, resolved by the GitHub Writes rule; removed from Open decisions. —9b1ba40#123-style PR placeholders ongithub.com/example. —8a7e36bfeatures/asserted as an exact file list; inventory test relabelled as bundle exclusion and checks beside the bundle. —8a7e36bOpen decisions
Resolved: whether
wayfinder's tracker writes need approval. The GitHub Writes rule settles it (see Governing decisions).Deferred (tracked, not dropped)
Test evidence
All suites in
docs/development.mdpass withnix develop -c bats …at9b1ba40: marketplace 10, plugin-package 14, init 73, feature-evolution 95, open-questions 67, board-mapping 43, okf-profile 46, vision-anatomy 29, lifecycle-review-handoff 50, canonization 27, feature-tags 61, modernization 59, retrofit 32, delivery-engineering 8, okf-bundle 13, branch-guard 48.git diff --checkis clean; no tracked__pycache__or.pycfiles.🤖 Generated with Claude Code