Skip to content

Existing-project adoption keeps the host's approved capabilities#245

Merged
qwerfunch merged 1 commit into
developfrom
fix/adoption-honors-host-capabilities
Jul 21, 2026
Merged

Existing-project adoption keeps the host's approved capabilities#245
qwerfunch merged 1 commit into
developfrom
fix/adoption-honors-host-capabilities

Conversation

@qwerfunch

Copy link
Copy Markdown
Owner

2026-07-21 · fix/adoption-honors-host-capabilities → develop

Adopting 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.

Heads-up: patch-level behavior change for existing-project adoption only. Greenfield init, --no-llm, and plain scans are byte-for-byte unchanged. One committed A/B evaluation report was regenerated — a size metric shifted; the comparison verdict, capability count, and detector outcomes are unchanged.

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

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
qwerfunch merged commit 734f6c3 into develop Jul 21, 2026
1 check passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant