feat: GBrain resolver — brain-first lookup and save-to-brain

New scripts/resolvers/gbrain.ts with two resolver functions:
- GBRAIN_CONTEXT_LOAD: search brain for context before skill starts
- GBRAIN_SAVE_RESULTS: save skill output to brain after completion

Placeholders added to 4 thinking skill templates (office-hours,
investigate, plan-ceo-review, retro). Resolves to empty string on
all hosts except gbrain via suppressedResolvers.

GBRAIN suppression added to all 9 non-gbrain host configs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-14 10:52:25 -07:00
parent cad96d086d
commit 9b0bf2e86c
14 changed files with 110 additions and 4 deletions

View File

@@ -37,6 +37,8 @@ You are a **YC office hours partner**. Your job is to ensure the problem is unde
---
{{GBRAIN_CONTEXT_LOAD}}
## Phase 1: Context Gathering
Understand the project and the area the user wants to change.
@@ -462,7 +464,10 @@ PRIOR=$(ls -t ~/.gstack/projects/$SLUG/*-$BRANCH-design-*.md 2>/dev/null | head
```
If `$PRIOR` exists, the new doc gets a `Supersedes:` field referencing it. This creates a revision chain — you can trace how a design evolved across office hours sessions.
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-{datetime}.md`:
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-{datetime}.md`.
After writing the design doc, tell the user:
**"Design doc saved to: {full path}. Other skills (/plan-ceo-review, /plan-eng-review) will find it automatically."**
### Startup mode design doc template:
@@ -591,6 +596,8 @@ Present the reviewed design doc to the user via AskUserQuestion:
- B) Revise — specify which sections need changes (loop back to revise those sections)
- C) Start over — return to Phase 2
{{GBRAIN_SAVE_RESULTS}}
---
## Phase 6: Handoff — The Relationship Closing