From 3e0dbf6cf4880577450bbea9c1b1c63025b12832 Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden Date: Fri, 3 Jul 2026 11:31:29 -0500 Subject: [PATCH] no-mistakes(review): Label fast onboard partial maps --- gsd-core/workflows/onboard.md | 28 ++++++++++++++++++++++++---- tests/onboard-command.test.cjs | 10 ++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/gsd-core/workflows/onboard.md b/gsd-core/workflows/onboard.md index ec912c894..69e4d6c27 100644 --- a/gsd-core/workflows/onboard.md +++ b/gsd-core/workflows/onboard.md @@ -38,14 +38,15 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi Parse JSON fields: `planning_exists`, `project_exists`, `requirements_exists`, `roadmap_exists`, `state_exists`, `has_existing_code`, `has_package_file`, -`is_brownfield`, `has_codebase_map`, `has_fast_codebase_map`, +`is_brownfield`, `fast_mode`, `has_codebase_map`, `has_fast_codebase_map`, `codebase_map_files_present`, `missing_codebase_map_files`, `missing_fast_codebase_map_files`, `has_docs_candidates`, `doc_candidate_count`, `onboarding_summary_exists`, `text_mode`, `commit_docs`, `agents_installed`, `missing_agents`, `has_git`, `git_worktree_root`, `in_nested_subdir`. +Set `FAST_MODE=fast_mode` from INIT. Set `TEXT_MODE=true` if `--text` is present OR `text_mode` from INIT is true. -Set `CODEBASE_MAP_READY=has_fast_codebase_map` when `--fast` is present; otherwise set +Set `CODEBASE_MAP_READY=has_fast_codebase_map` when `FAST_MODE` is true; otherwise set `CODEBASE_MAP_READY=has_codebase_map`. **Text mode (`workflow.text_mode: true` in config or `--text` flag):** When `TEXT_MODE` is active, replace every `AskUserQuestion` call in this workflow with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available and would otherwise render as an inert code block. @@ -225,6 +226,18 @@ 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 @@ -239,7 +252,7 @@ Summary contents: - Requirements: .planning/REQUIREMENTS.md - Roadmap: .planning/ROADMAP.md - State: .planning/STATE.md -- Codebase map: {has_codebase_map ? ".planning/codebase/ (complete)" : ".planning/codebase/ (incomplete or skipped)"} +- Codebase map: {CODEBASE_MAP_SUMMARY_STATUS} ## Codebase Map @@ -252,6 +265,13 @@ Confirmed files: - TESTING.md - INTEGRATIONS.md - CONCERNS.md +{else if fast_mode && has_fast_codebase_map} +Accepted fast map files: +- STACK.md +- INTEGRATIONS.md +- ARCHITECTURE.md +- STRUCTURE.md +Context strength: fast/partial-but-accepted codebase map; not all seven map files are present. {else} Present files: {codebase_map_files_present} Missing files: {missing_codebase_map_files} @@ -283,7 +303,7 @@ Print: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Created / confirmed / status: -- .planning/codebase/ {has_codebase_map ? "(complete)" : "(incomplete or skipped; missing: {missing_codebase_map_files})"} +- .planning/codebase/ {CODEBASE_MAP_FINAL_STATUS} - .planning/PROJECT.md - .planning/REQUIREMENTS.md {requirements_exists ? "(present)" : "(missing; onboarding incomplete)"} - .planning/ROADMAP.md diff --git a/tests/onboard-command.test.cjs b/tests/onboard-command.test.cjs index 270a0ee67..d75df86ad 100644 --- a/tests/onboard-command.test.cjs +++ b/tests/onboard-command.test.cjs @@ -278,6 +278,16 @@ describe('/gsd:onboard command contract', () => { /gsd_run --cwd "\$ONBOARDING_ROOT" query commit "docs: create onboarding summary" --files \.planning\/onboarding\/SUMMARY\.md/, 'workflow must commit the root-relative summary path from onboarding root', ); + assert.match( + content, + /CODEBASE_MAP_SUMMARY_STATUS=\.planning\/codebase\/ \(fast\/partial-but-accepted codebase map\)/, + 'workflow summary must label fast accepted maps without implying a complete map', + ); + assert.match( + content, + /CODEBASE_MAP_FINAL_STATUS=\(fast\/partial-but-accepted; required fast files present\)/, + 'final status must distinguish complete maps from accepted fast maps', + ); 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');