no-mistakes(review): Derive onboard map status before summary prompt

This commit is contained in:
Jeremy McSpadden
2026-07-03 11:39:09 -05:00
committed by Codesmith
parent 3e0dbf6cf4
commit 41015129e1
2 changed files with 20 additions and 12 deletions

View File

@@ -199,6 +199,18 @@ invocations do not create `subdir/.planning` artifacts.
Create `{ONBOARDING_ROOT}/.planning/onboarding/SUMMARY.md` only after PROJECT.md exists.
If it already exists, update it only after confirmation; do not overwrite silently.
Before summary keep/update choices, derive map status values safely:
- If `has_codebase_map` is true:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (complete)`
- `CODEBASE_MAP_FINAL_STATUS=(complete)`
- Else if `fast_mode && has_fast_codebase_map` is true:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (fast/partial-but-accepted codebase map)`
- `CODEBASE_MAP_FINAL_STATUS=(fast/partial-but-accepted; required fast files present)`
- Else:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (incomplete or skipped)`
- `CODEBASE_MAP_FINAL_STATUS=(incomplete or skipped; missing: {missing_codebase_map_files})`
If `onboarding_summary_exists` is true:
- If `TEXT_MODE=true`, print:
@@ -226,18 +238,6 @@ If the user chooses to keep the existing summary, skip to Step 7 without writing
If `onboarding_summary_exists` is false or the user confirms an update, write the summary
using the template below.
Before rendering summary and final status, derive map status values:
- If `has_codebase_map` is true:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (complete)`
- `CODEBASE_MAP_FINAL_STATUS=(complete)`
- Else if `fast_mode && has_fast_codebase_map` is true:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (fast/partial-but-accepted codebase map)`
- `CODEBASE_MAP_FINAL_STATUS=(fast/partial-but-accepted; required fast files present)`
- Else:
- `CODEBASE_MAP_SUMMARY_STATUS=.planning/codebase/ (incomplete or skipped)`
- `CODEBASE_MAP_FINAL_STATUS=(incomplete or skipped; missing: {missing_codebase_map_files})`
Summary contents:
```markdown

View File

@@ -288,6 +288,14 @@ describe('/gsd:onboard command contract', () => {
/CODEBASE_MAP_FINAL_STATUS=\(fast\/partial-but-accepted; required fast files present\)/,
'final status must distinguish complete maps from accepted fast maps',
);
const deriveMapStatusIndex = content.indexOf('Before summary keep/update choices, derive map status values safely:');
const keepExistingSummaryIndex = content.indexOf('If `onboarding_summary_exists` is true:');
assert.ok(deriveMapStatusIndex >= 0, 'workflow must derive map status values');
assert.ok(keepExistingSummaryIndex >= 0, 'workflow must define the existing-summary branch');
assert.ok(
deriveMapStatusIndex < keepExistingSummaryIndex,
'workflow must derive final map status before a keep-existing-summary path can skip to final status',
);
assert.match(content, /overwrite|idempotent|do not overwrite/i, 'workflow must protect existing planning');
assert.ok(content.includes('requirements_exists'), 'workflow must parse requirements existence');
assert.match(content, /REQUIREMENTS\.md: \{requirements_exists \? "present" : "missing"\}/, 'workflow must report missing requirements in partial planning');