no-mistakes(review): Format onboard handoffs by runtime

This commit is contained in:
Jeremy McSpadden
2026-07-03 17:08:29 -05:00
committed by Codesmith
parent a845a7d231
commit 2f2d33aea7
3 changed files with 86 additions and 30 deletions

View File

@@ -24,6 +24,7 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
Parse JSON fields from `INIT`:
- `next_action.kind`, `next_action.command`, `next_action.reason`, `next_action.missing`, `next_action.summary_path`
- `handoff_commands.ingest_docs`, `handoff_commands.manager`, `handoff_commands.new_project`, `handoff_commands.onboard`
- `map_readiness`, `codebase_map_summary_status`, `codebase_map_final_status`
- `planning_exists`, `project_exists`, `requirements_exists`, `roadmap_exists`, `state_exists`
- `is_brownfield`, `fast_mode`, `has_codebase_map`, `has_fast_codebase_map`
@@ -69,12 +70,12 @@ Run from worktree root {ONBOARDING_ROOT}:
{next_action.command}
Then rerun /gsd:onboard from the same worktree root.
Then rerun {handoff_commands.onboard} from the same worktree root.
```
Exit. If the user skips mapping:
- If `planning_exists && (!project_exists || !requirements_exists || !roadmap_exists || !state_exists)`, route the skip to the partial planning guard instead:
- If `(project_exists || requirements_exists || roadmap_exists || state_exists) && (!project_exists || !requirements_exists || !roadmap_exists || !state_exists)`, route the skip to the partial planning guard instead:
```text
Skipping codebase mapping may give downstream steps weaker context, but project planning exists and is incomplete.
@@ -84,7 +85,7 @@ REQUIREMENTS.md: {requirements_exists ? "present" : "missing"}
ROADMAP.md: {roadmap_exists ? "present" : "missing"}
STATE.md: {state_exists ? "present" : "missing"}
Run the appropriate lower-level command to fill the missing planning artifact(s), then rerun /gsd:onboard.
Run the appropriate lower-level command to fill the missing planning artifact(s), then rerun {handoff_commands.onboard}.
```
Exit.
@@ -92,11 +93,11 @@ Exit.
- If `has_docs_candidates && !project_exists`, route the skip to docs ingest instead:
```text
Skipping codebase mapping may give downstream steps weaker context, but existing ADR/PRD/SPEC/RFC documents should still be ingested before /gsd:new-project.
Skipping codebase mapping may give downstream steps weaker context, but existing ADR/PRD/SPEC/RFC documents should still be ingested before {handoff_commands.new_project}.
Run from worktree root {ONBOARDING_ROOT}:
/gsd:ingest-docs
{handoff_commands.ingest_docs}
```
Exit.
@@ -104,11 +105,11 @@ Exit.
- Otherwise print:
```text
Skipping codebase mapping may give /gsd:new-project weaker context.
Skipping codebase mapping may give {handoff_commands.new_project} weaker context.
Run from worktree root {ONBOARDING_ROOT}:
/gsd:new-project
{handoff_commands.new_project}
```
Exit.
@@ -124,7 +125,7 @@ If `next_action.kind == "ingest-docs"`:
Detected {doc_candidate_count} possible ADR/PRD/SPEC/RFC document(s).
1. Ingest docs first — run {next_action.command} from worktree root {ONBOARDING_ROOT} (Recommended)
2. Skip docs ingest — continue to /gsd:new-project
2. Skip docs ingest — continue to {handoff_commands.new_project}
Enter number:
```
@@ -134,7 +135,7 @@ Enter number:
- question: "Detected {doc_candidate_count} possible ADR/PRD/SPEC/RFC document(s). Ingest them first?"
- options:
- "Ingest docs first" — Run `{next_action.command}` from worktree root `{ONBOARDING_ROOT}` (Recommended)
- "Skip docs ingest" — Continue to `/gsd:new-project`
- "Skip docs ingest" — Continue to `{handoff_commands.new_project}`
If the user chooses ingest, print:
@@ -143,17 +144,17 @@ Run from worktree root {ONBOARDING_ROOT}:
{next_action.command}
Then rerun /gsd:onboard from the same worktree root.
Then rerun {handoff_commands.onboard} from the same worktree root.
```
Exit. If the user skips docs ingest, print:
```text
Skipping docs ingest may omit existing ADR/PRD/SPEC/RFC context from /gsd:new-project.
Skipping docs ingest may omit existing ADR/PRD/SPEC/RFC context from {handoff_commands.new_project}.
Run from worktree root {ONBOARDING_ROOT}:
/gsd:new-project
{handoff_commands.new_project}
```
Exit.
@@ -169,7 +170,7 @@ Run from worktree root {ONBOARDING_ROOT}:
{next_action.command}
Then rerun /gsd:onboard from the same worktree root.
Then rerun {handoff_commands.onboard} from the same worktree root.
```
Exit.
@@ -200,7 +201,7 @@ REQUIREMENTS.md: {requirements_exists ? "present" : "missing"}
ROADMAP.md: {roadmap_exists ? "present" : "missing"}
STATE.md: {state_exists ? "present" : "missing"}
Run the appropriate lower-level command to fill the missing planning artifact(s), then rerun /gsd:onboard.
Run the appropriate lower-level command to fill the missing planning artifact(s), then rerun {handoff_commands.onboard}.
```
Exit.
@@ -262,7 +263,7 @@ Onboarding status:
- Codebase map: {codebase_map_final_status}
- Onboarding summary: present
Next recommended command: /gsd:manager
Next recommended command: {handoff_commands.manager}
```
Do not run implementation execution or shipping from onboarding.