Problem
task migrate:vbrief on a canonical v0.19 consumer project (SPECIFICATION.md + PROJECT.md + ROADMAP.md, no pre-existing vbrief/specification.vbrief.json) produces a vbrief/PROJECT-DEFINITION.vbrief.json that is missing the overview narrative key, causing task vbrief:validate to fail with:
FAIL: vbrief/PROJECT-DEFINITION.vbrief.json: narratives missing expected key 'overview' (D3)
FAIL: 1 error(s) found
vbrief_validate.py::PROJECT_DEF_EXPECTED_NARRATIVES requires both "overview" and "tech stack" (after .lower()) to be present on PROJECT-DEFINITION.vbrief.json per D3. The migration already derives tech stack from **Tech Stack**: ... in PROJECT.md (via _extract_tech_stack), but has no corresponding derivation for Overview.
Result: brownfield users who run task migrate:vbrief get a validator-failing PROJECT-DEFINITION out of the box. task check fails on their first post-migration commit until they hand-write an Overview narrative.
Discovered during
Swarm-402 Phase 5 consumer upgrade simulation. Simulation transcript:
Step 3 -- migrate_vbrief.py exit=0
...
Step 5 -- vbrief:validate on consumer exit=1
FAIL: vbrief/PROJECT-DEFINITION.vbrief.json: narratives missing expected key 'overview' (D3)
13 of 14 simulation checks passed; this one FAIL blocks the "consumer runs task check after migration" guarantee.
Root cause
scripts/migrate_vbrief.py::_build_project_definition only populates narratives from (a) a pre-existing specification.vbrief.json plan.narratives and (b) PROJECT.md content (as ProjectConfig + extracted tech stack). Neither path produces an Overview key. Canonical v0.19 consumer projects start with no specification.vbrief.json, so (a) yields nothing; (b) yields ProjectConfig and tech stack but never Overview.
Fix proposal
Add Overview derivation to _build_project_definition:
- Prefer
spec_vbrief.plan.narratives['Overview'] if present.
- Else, derive from the first non-empty paragraph of
SPECIFICATION.md (before the <!-- deft:deprecated-redirect --> sentinel is written) or the top-level # <title> heading.
- Else, fall back to
"TODO: describe this project." so the key is at least present and task vbrief:validate passes; flag it in the migration report so the user knows to fill it in.
Add migration tests covering: spec-present path; SPECIFICATION.md-derived path; fallback path.
Workaround for consumers on current builds
Edit vbrief/PROJECT-DEFINITION.vbrief.json after migration and add an Overview key to plan.narratives.
Impact
Medium. Blocks clean task check post-migration but is trivially patchable by hand. The rest of the migration (lifecycle folders, scope vBRIEFs in pending/, deprecation sentinels, tech stack derivation) works as designed.
Part of #402 validation
Discovered during the Phase 5 consumer upgrade simulation. Not fixed in any of the swarm-402 PRs (#413/#414/#415/#416) because the scope fence forbids expanding PR scope beyond the explicit must-fix list. Filed here so it can be picked up post-v0.20.0 release.
Labels: bug, discovered-during-402
Problem
task migrate:vbriefon a canonical v0.19 consumer project (SPECIFICATION.md+PROJECT.md+ROADMAP.md, no pre-existingvbrief/specification.vbrief.json) produces avbrief/PROJECT-DEFINITION.vbrief.jsonthat is missing theoverviewnarrative key, causingtask vbrief:validateto fail with:vbrief_validate.py::PROJECT_DEF_EXPECTED_NARRATIVESrequires both"overview"and"tech stack"(after.lower()) to be present on PROJECT-DEFINITION.vbrief.json per D3. The migration already derivestech stackfrom**Tech Stack**: ...in PROJECT.md (via_extract_tech_stack), but has no corresponding derivation forOverview.Result: brownfield users who run
task migrate:vbriefget a validator-failing PROJECT-DEFINITION out of the box.task checkfails on their first post-migration commit until they hand-write anOverviewnarrative.Discovered during
Swarm-402 Phase 5 consumer upgrade simulation. Simulation transcript:
13 of 14 simulation checks passed; this one FAIL blocks the "consumer runs
task checkafter migration" guarantee.Root cause
scripts/migrate_vbrief.py::_build_project_definitiononly populates narratives from (a) a pre-existingspecification.vbrief.jsonplan.narratives and (b)PROJECT.mdcontent (asProjectConfig+ extractedtech stack). Neither path produces anOverviewkey. Canonical v0.19 consumer projects start with nospecification.vbrief.json, so (a) yields nothing; (b) yieldsProjectConfigandtech stackbut neverOverview.Fix proposal
Add
Overviewderivation to_build_project_definition:spec_vbrief.plan.narratives['Overview']if present.SPECIFICATION.md(before the<!-- deft:deprecated-redirect -->sentinel is written) or the top-level# <title>heading."TODO: describe this project."so the key is at least present andtask vbrief:validatepasses; flag it in the migration report so the user knows to fill it in.Add migration tests covering: spec-present path; SPECIFICATION.md-derived path; fallback path.
Workaround for consumers on current builds
Edit
vbrief/PROJECT-DEFINITION.vbrief.jsonafter migration and add anOverviewkey toplan.narratives.Impact
Medium. Blocks clean
task checkpost-migration but is trivially patchable by hand. The rest of the migration (lifecycle folders, scope vBRIEFs in pending/, deprecation sentinels, tech stack derivation) works as designed.Part of #402 validation
Discovered during the Phase 5 consumer upgrade simulation. Not fixed in any of the swarm-402 PRs (#413/#414/#415/#416) because the scope fence forbids expanding PR scope beyond the explicit must-fix list. Filed here so it can be picked up post-v0.20.0 release.
Labels:
bug,discovered-during-402