no-mistakes(review): Anchor onboard summary writes
This commit is contained in:
committed by
Codesmith
parent
b3555b103d
commit
6f2c2c2fd6
@@ -191,8 +191,12 @@ true, continue.
|
||||
|
||||
## 6. Write Onboarding Summary
|
||||
|
||||
Create `.planning/onboarding/SUMMARY.md` only after PROJECT.md exists. If it already
|
||||
exists, update it only after confirmation; do not overwrite silently.
|
||||
Resolve `ONBOARDING_ROOT={git_worktree_root || _GSD_RUNTIME_ROOT}` before this step.
|
||||
Use `ONBOARDING_ROOT` for every filesystem write and commit in this step so nested-cwd
|
||||
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.
|
||||
|
||||
If `onboarding_summary_exists` is true:
|
||||
|
||||
@@ -266,7 +270,7 @@ Detected planning docs: {doc_candidate_count}
|
||||
Commit the summary if `commit_docs` is true:
|
||||
|
||||
```bash
|
||||
gsd_run query commit "docs: create onboarding summary" --files .planning/onboarding/SUMMARY.md
|
||||
gsd_run --cwd "$ONBOARDING_ROOT" query commit "docs: create onboarding summary" --files .planning/onboarding/SUMMARY.md
|
||||
```
|
||||
|
||||
## 7. Final Status
|
||||
|
||||
@@ -263,6 +263,21 @@ describe('/gsd:onboard command contract', () => {
|
||||
);
|
||||
assert.ok(content.includes('new-project'), 'workflow must route to new-project');
|
||||
assert.ok(content.includes('.planning/onboarding/SUMMARY.md'), 'workflow must create onboarding summary');
|
||||
assert.match(
|
||||
content,
|
||||
/ONBOARDING_ROOT=\{git_worktree_root \|\| _GSD_RUNTIME_ROOT\}/,
|
||||
'workflow must resolve a single root for summary writes',
|
||||
);
|
||||
assert.match(
|
||||
content,
|
||||
/Create `\{ONBOARDING_ROOT\}\/\.planning\/onboarding\/SUMMARY\.md`/,
|
||||
'workflow must anchor summary writes at onboarding root',
|
||||
);
|
||||
assert.match(
|
||||
content,
|
||||
/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, /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');
|
||||
|
||||
Reference in New Issue
Block a user