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
+14
View File
@@ -37,6 +37,8 @@ When the user types `/retro`, run this skill.
- `/retro global` — cross-project retro across all AI coding tools (7d default)
- `/retro global 14d` — cross-project retro with explicit window
{{GBRAIN_CONTEXT_LOAD}}
## Instructions
Parse the argument to determine the time window. Default to 7 days if no argument given. All times should be reported in the user's **local timezone** (use the system default — do NOT set `TZ`).
@@ -60,6 +62,16 @@ Usage: /retro [window | compare | global]
{{LEARNINGS_SEARCH}}
### Non-git context (optional)
Check for non-git context that should be included in the retro:
```bash
[ -f ~/.gstack/retro-context.md ] && echo "RETRO_CONTEXT_FOUND" || echo "NO_RETRO_CONTEXT"
```
If `RETRO_CONTEXT_FOUND`: read `~/.gstack/retro-context.md`. This file is user-authored and may contain meeting notes, calendar events, decisions, and other context that doesn't appear in git history. Incorporate this context into the retro narrative where relevant.
### Step 1: Gather Raw Data
First, fetch origin and identify the current user:
@@ -281,6 +293,8 @@ For each contributor (including the current user), compute:
{{LEARNINGS_LOG}}
{{GBRAIN_SAVE_RESULTS}}
### Step 10: Week-over-Week Trends (if window >= 14d)
If the time window is 14 days or more, split into weekly buckets and show trends: