From e1a91410d20c314a3fae267a2b2a22b2c284de78 Mon Sep 17 00:00:00 2001 From: genisis0x Date: Wed, 13 May 2026 14:31:29 +0530 Subject: [PATCH] fix(brain-allowlist): sync project-root design and test-plan artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1452. `/office-hours` Builder, `/plan-eng-review`, and `/autoplan` write their output at the project root, not under `designs/`: projects/{slug}/{user}-{branch}-design-{datetime}.md projects/{slug}/{user}-{branch}-test-plan-{datetime}.md projects/{slug}/{user}-{branch}-eng-review-test-plan-{datetime}.md The `.brain-allowlist` generated by `gstack-artifacts-init` covers `projects/*/designs/*.md` and the `ceo-plans/` paths, so CEO plans sync correctly but the design / test-plan artifacts they reference do not. Pull on machine B and you get the CEO plan but not the underlying design, breaking the cross-machine plan-references-design chain. Add three root-anchored globs to the managed block of `.brain-allowlist`: projects/*/*-design-*.md projects/*/*-test-plan-*.md projects/*/*-eng-review-test-plan-*.md The `*` glob doesn't match path separators, so these patterns are disjoint from the existing `designs/*.md` patterns — no double-sync, no churn for installs that already had the subdirectory layout. Mirror the three patterns in `.brain-privacy-map.json` with `"class": "artifact"`, matching how the existing `designs/*.md` patterns are classified there, so the same privacy semantics apply. Same class of incomplete-rename bug as #1441 (v1.27.0.0 missed the config key in one place); this audit covers the allowlist surface. --- bin/gstack-artifacts-init | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/gstack-artifacts-init b/bin/gstack-artifacts-init index 3dcb339ca..b8bfe830c 100755 --- a/bin/gstack-artifacts-init +++ b/bin/gstack-artifacts-init @@ -227,8 +227,18 @@ projects/*/ceo-plans/*.md projects/*/ceo-plans/*/*.md projects/*/designs/*.md projects/*/designs/*/*.md +# Project-root design / test-plan artifacts written by /office-hours, +# /plan-eng-review, and /autoplan. The skills emit +# `{user}-{branch}-design-{datetime}.md`, +# `{user}-{branch}-test-plan-{datetime}.md`, and +# `{user}-{branch}-eng-review-test-plan-{datetime}.md` at the project +# root (not under designs/), so the existing `designs/*.md` patterns +# miss them. Without these the cross-machine pull on machine B gets +# the referencing CEO plan but not the underlying design / test plan +# (#1452). projects/*/*-design-*.md projects/*/*-test-plan-*.md +projects/*/*-eng-review-test-plan-*.md projects/*/timeline.jsonl retros/*.md developer-profile.json @@ -256,6 +266,7 @@ cat > "$GSTACK_HOME/.brain-privacy-map.json" <<'EOF' {"pattern": "projects/*/designs/*/*.md", "class": "artifact"}, {"pattern": "projects/*/*-design-*.md", "class": "artifact"}, {"pattern": "projects/*/*-test-plan-*.md", "class": "artifact"}, + {"pattern": "projects/*/*-eng-review-test-plan-*.md", "class": "artifact"}, {"pattern": "retros/*.md", "class": "artifact"}, {"pattern": "builder-journey.md", "class": "artifact"}, {"pattern": "projects/*/timeline.jsonl", "class": "behavioral"},