From b74db803cb548f7886dbfa74aed125f018b6cd09 Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 2 Oct 2026 23:55:42 +0000 Subject: [PATCH] plan-ceo-review, plan-eng-review: storage paths follow the state root (s04 F2, s04 F3) The CEO storage policy and the eng write policy named ~/.gstack/projects/ and ~/.gstack/analytics/, while the writers (tasks-section.ts, testing.ts, spec-review.ts) use $GSTACK_STATE_ROOT. When the state root is relocated the prose pointed at the wrong directory. W7a pin: test/plan-review-cases.test.ts:852 pinned the stale path; it now checks the discovery path is under $GSTACK_STATE_ROOT and that the hardcoded ~/.gstack/projects/{slug}/ is gone. expected red until the regeneration commit --- plan-ceo-review/SKILL.md.tmpl | 4 ++-- plan-eng-review/sections/review-sections.md.tmpl | 2 +- test/plan-review-cases.test.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plan-ceo-review/SKILL.md.tmpl b/plan-ceo-review/SKILL.md.tmpl index cd9aca910..6c61ded66 100644 --- a/plan-ceo-review/SKILL.md.tmpl +++ b/plan-ceo-review/SKILL.md.tmpl @@ -243,8 +243,8 @@ ExitPlanMode or next-skill handoff. | 0H spec-review metrics | Stop with the cause; reviewer availability does not waive this write. | | Review, decision and question history logs | Report cause and unsaved fields; continue. The plan's ledger is still required. | -Paths differ: 0H resolves `CEO_PLANS`; tasks use `~/.gstack/projects/`, metrics -use `~/.gstack/analytics/`, and log helpers choose their paths. Never substitute +Paths differ: 0H resolves `CEO_PLANS`; tasks use `$GSTACK_STATE_ROOT/projects/`, metrics +use `$GSTACK_STATE_ROOT/analytics/`, and log helpers choose their paths. Never substitute the CEO archive root for task, metric or log paths. Keep one decision ledger through Step 0, Spec Review Loop and Outside Voice: diff --git a/plan-eng-review/sections/review-sections.md.tmpl b/plan-eng-review/sections/review-sections.md.tmpl index 337f4be3e..7019a8b39 100644 --- a/plan-eng-review/sections/review-sections.md.tmpl +++ b/plan-eng-review/sections/review-sections.md.tmpl @@ -41,7 +41,7 @@ path authorizes no other; implementation edits require explicit authority. | Required Review Log | The helper's state location | Present its fields as **not persisted**; at Review Log, use **Blocked outcome** instead of publishing a saved review. The final gate cannot pass without this log. | | Best-effort metadata/learning logs | Helper-defined locations | Skip forbidden writes; otherwise keep their best-effort behavior. | -QA Test Plan/task JSONL keep discovery paths `~/.gstack/projects/{slug}/`: +QA Test Plan/task JSONL keep discovery paths `$GSTACK_STATE_ROOT/projects/{slug}/`: `{user}-{branch}-eng-review-test-plan-{datetime}.md` and `tasks-eng-review-{datetime}.jsonl`. Keep their formats; do not relocate. diff --git a/test/plan-review-cases.test.ts b/test/plan-review-cases.test.ts index e50303ded..f4abd77d8 100644 --- a/test/plan-review-cases.test.ts +++ b/test/plan-review-cases.test.ts @@ -849,7 +849,9 @@ describe('Eng approved-work decision gate', () => { expect(compactProse(policy)).toContain("adding a suffix on collision"); expect(compactProse(policy)).toContain("Never substitute an unrelated active plan"); expect(compactProse(policy)).toContain("ledger and final structured report"); - expect(compactProse(policy)).toContain('QA Test Plan/task JSONL keep discovery paths `~/.gstack/projects/{slug}/`'); + // Discovery paths follow the writers' state root (testing.ts, tasks-section.ts), never a hardcoded home. + expect(compactProse(policy)).toMatch(/discovery paths `\$GSTACK_STATE_ROOT\/projects\/\{slug\}\/`/); + expect(compactProse(policy)).not.toContain('~/.gstack/projects/{slug}/'); expect(compactProse(policy)).toContain("including active-plan-only"); expect(compactProse(policy)).toContain("**Check each artifact and parent directory's permission before writing.**"); expect(compactProse(policy)).toContain("Permission for one path authorizes no other");