Existing-project adoption keeps the host's approved capabilities#245
Merged
Conversation
The scan branch of runInit wrote spec/capabilities.yaml from the scan interpreter, whose total-fallback always fires for a host draft (the draft never emits the CONVENTIONS_MD sentinel) and re-derives capabilities from README headings — or `capabilities: []` when there are none — silently discarding the draft's schema-validated 3-8 approved capabilities. The greenfield branch already honors them; the scan branch now does too, preferring onboarding.capabilitiesYaml when the dispatch genuinely fired (source === 'llm'). conventions.md and architecture.yaml stay scanner-owned (code-grounded). Adds F-70ed1afd (adoption-honors-host-capabilities) with EARS ACs and a regression assertion in the sparse-codebase init-tools test. Regenerates the case-existing-adoption A/B report — the capabilities body byte-count shifted (fewer explainer comments, added summary/surface); the A/B verdict, capability count, and detector outcomes are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
qwerfunch
added a commit
that referenced
this pull request
Jul 21, 2026
Rebasing this branch onto develop — which now carries the 0.9.1 adoption-capabilities fix (#245) — left the harness-written files holding their pre-rebase versions. Re-derived them against the merged tree: rebuilt the dist bundle, re-synced the spec inventory, regenerated the case-existing-adoption A/B report (capabilities-body byte-count shift), and re-stamped the attestation. Strict pre-push gate GREEN across 2602 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 21, 2026
Merged
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.
2026-07-21 · fix/adoption-honors-host-capabilities → developAdopting an existing project through the natural-language flow silently dropped the capabilities the user had just approved, landing an empty capabilities file. This restores them.
Fixed
▸ Approved capabilities survive adoption. When an existing project is adopted with a working onboarding draft, the capabilities the host produced (and the user approved) are now written to disk — instead of being re-derived from README headings, or lost entirely (
capabilities: []) when the repo has no README headings. The greenfield path already did this; the observed-scan path now matches it. Conventions and architecture stay sourced from the scanner (code-grounded).Notes
▸ Scope is deliberate. The same path still lets the scanner own architecture. Honoring a draft's guessed import rules on an unfamiliar codebase would risk false architecture-drift errors, so architecture is intentionally left to the scanner — a separate concern, not this fix.
▸ Verified before/after. Full suite stays green (2561 tests) with the change; a live adoption of a README-less project goes from
capabilities: []to the three approved capabilities; strict pre-push gate green.🤖 Generated with Claude Code