Skip to content

fix(brain-allowlist): sync project-root design and test-plan artifacts#1465

Open
genisis0x wants to merge 1 commit into
garrytan:mainfrom
genisis0x:fix/brain-allowlist-project-root-1452
Open

fix(brain-allowlist): sync project-root design and test-plan artifacts#1465
genisis0x wants to merge 1 commit into
garrytan:mainfrom
genisis0x:fix/brain-allowlist-project-root-1452

Conversation

@genisis0x
Copy link
Copy Markdown

@genisis0x genisis0x commented May 13, 2026

Summary

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.

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.

Changes

`bin/gstack-artifacts-init` — managed block of `.brain-allowlist` adds:

```
projects//-design-.md
projects/
/-test-plan-.md
projects//-eng-review-test-plan-*.md
```

`.brain-privacy-map.json` adds matching `"class": "artifact"` entries so the same privacy semantics that govern `designs/*.md` govern the project-root variants.

Why these patterns are safe to add to the managed block

The `` glob doesn't match path separators, so the new patterns are disjoint from the existing `designs/.md` patterns. No double-sync. No churn for installs that already have the subdirectory layout.

Why allowlist patch, not write-path change

The issue's "alternative (more conservative)" suggests canonicalizing the write paths in `/office-hours` and `/plan-eng-review` to use the `designs/` subdirectory. I picked the allowlist patch because:

Happy to follow up with the write-path canonicalization as a separate change if maintainers prefer that direction; that one needs an audit of the cross-skill readers and is a larger surface than this PR should bundle.

Testing

`bash -n bin/gstack-artifacts-init` clean. JSON snippet round-trips through `json.loads` (14 entries). `bun test` not run locally because bun isn't installed on this machine; the change is text/glob only with no behavior change to existing paths, so the existing `test/gstack-artifacts-init.test.ts` coverage should remain green.

Fixes #1452


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Fixes garrytan#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 garrytan#1441 (v1.27.0.0 missed the
config key in one place); this audit covers the allowlist surface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

brain-allowlist misses /office-hours design docs and /plan-eng-review test plans at project root

1 participant