mirror of https://github.com/garrytan/gstack.git
local: restore gbrain-context steps in office-hours/retro/review
Forward-ports the gbrain-context customizations that were carried as uncommitted working-tree changes and dropped by the v1.55→v1.58 upgrade: - office-hours: Step 0 gbrain search before Phase 1 - retro: Step 0 goals-context + Step Final signal-detector capture - review: Step 0 gbrain task context Edited .tmpl sources and regenerated .md across all hosts (additive only; verified no v1.58 upstream template content removed, incl. the office-hours SECTION_INDEX refactor). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
167e5605c3
commit
33a807e8db
|
|
@ -917,6 +917,20 @@ rm -f /tmp/.gstack-brain-context-$$.md 2>/dev/null || true
|
|||
`gstack/`, `concepts/` only). Personal/family/therapy content never leaks here.
|
||||
|
||||
|
||||
## Step 0: gbrain context (run before Phase 1)
|
||||
|
||||
**REQUIRED SUB-SKILL: Use `brain-ops` — search gbrain for existing research on this idea before asking Q1.**
|
||||
|
||||
```
|
||||
mcp__gbrain__search "<idea keyword>" ← any prior takes, briefs, signals
|
||||
mcp__gbrain__search "<company/domain name>" ← if idea targets a known market
|
||||
mcp__gbrain__list_pages type=signal sort=updated_desc limit=5 ← recent related signals
|
||||
```
|
||||
|
||||
Surface what's already in the graph to the user before starting the diagnostic. If a prior office-hours session exists for this idea (`type: ceo-plan`), load it and note what changed since then. Skip questions that the graph already answers.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Context Gathering
|
||||
|
||||
Understand the project and the area the user wants to change.
|
||||
|
|
|
|||
|
|
@ -73,6 +73,20 @@ You are a **YC office hours partner**. Your job is to ensure the problem is unde
|
|||
|
||||
{{BRAIN_PREFLIGHT}}
|
||||
|
||||
## Step 0: gbrain context (run before Phase 1)
|
||||
|
||||
**REQUIRED SUB-SKILL: Use `brain-ops` — search gbrain for existing research on this idea before asking Q1.**
|
||||
|
||||
```
|
||||
mcp__gbrain__search "<idea keyword>" ← any prior takes, briefs, signals
|
||||
mcp__gbrain__search "<company/domain name>" ← if idea targets a known market
|
||||
mcp__gbrain__list_pages type=signal sort=updated_desc limit=5 ← recent related signals
|
||||
```
|
||||
|
||||
Surface what's already in the graph to the user before starting the diagnostic. If a prior office-hours session exists for this idea (`type: ceo-plan`), load it and note what changed since then. Skip questions that the graph already answers.
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Context Gathering
|
||||
|
||||
Understand the project and the area the user wants to change.
|
||||
|
|
|
|||
|
|
@ -855,6 +855,20 @@ When the user types `/retro`, run this skill.
|
|||
|
||||
|
||||
|
||||
## Step 0: gbrain goals context (run before git analysis)
|
||||
|
||||
Pull the active goals pages from gbrain to measure shipped work against stated commitments — not just git log:
|
||||
|
||||
```
|
||||
mcp__gbrain__get_page goals/weekly/2026-w{N} ← current week's goals
|
||||
mcp__gbrain__get_page goals/monthly/YYYY-MM ← month's commitments
|
||||
mcp__gbrain__list_pages type=task status=in_progress sort=updated_desc limit=10
|
||||
```
|
||||
|
||||
Note which weekly goals had corresponding commits and which didn't. This becomes the "commitment vs shipped" section of the retro output.
|
||||
|
||||
---
|
||||
|
||||
## 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`).
|
||||
|
|
@ -1802,6 +1816,17 @@ When the user runs `/retro compare` (or `/retro compare 14d`):
|
|||
## Important Rules
|
||||
|
||||
- ALL narrative output goes directly to the user in the conversation. The ONLY file written is the `.context/retros/` JSON snapshot.
|
||||
|
||||
## Step Final: capture findings to gbrain
|
||||
|
||||
After the retro output is complete, invoke `signal-detector` in parallel — the "what we learned" and "3 habits for next week" sections qualify as original thinking and must be captured:
|
||||
|
||||
```
|
||||
Invoke signal-detector with the key insights from the retro.
|
||||
Write target: signals/YYYY-MM-DD/retro-w{N}
|
||||
```
|
||||
|
||||
Do NOT write the full retro to gbrain — only the distilled insights (patterns, surprises, decisions made).
|
||||
- Use `origin/<default>` for all git queries (not local main which may be stale)
|
||||
- Display all timestamps in the user's local timezone (do not override `TZ`)
|
||||
- If the window has zero commits, say so and suggest a different window
|
||||
|
|
|
|||
|
|
@ -62,6 +62,20 @@ When the user types `/retro`, run this skill.
|
|||
|
||||
{{GBRAIN_CONTEXT_LOAD}}
|
||||
|
||||
## Step 0: gbrain goals context (run before git analysis)
|
||||
|
||||
Pull the active goals pages from gbrain to measure shipped work against stated commitments — not just git log:
|
||||
|
||||
```
|
||||
mcp__gbrain__get_page goals/weekly/2026-w{N} ← current week's goals
|
||||
mcp__gbrain__get_page goals/monthly/YYYY-MM ← month's commitments
|
||||
mcp__gbrain__list_pages type=task status=in_progress sort=updated_desc limit=10
|
||||
```
|
||||
|
||||
Note which weekly goals had corresponding commits and which didn't. This becomes the "commitment vs shipped" section of the retro output.
|
||||
|
||||
---
|
||||
|
||||
## 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`).
|
||||
|
|
@ -950,6 +964,17 @@ When the user runs `/retro compare` (or `/retro compare 14d`):
|
|||
## Important Rules
|
||||
|
||||
- ALL narrative output goes directly to the user in the conversation. The ONLY file written is the `.context/retros/` JSON snapshot.
|
||||
|
||||
## Step Final: capture findings to gbrain
|
||||
|
||||
After the retro output is complete, invoke `signal-detector` in parallel — the "what we learned" and "3 habits for next week" sections qualify as original thinking and must be captured:
|
||||
|
||||
```
|
||||
Invoke signal-detector with the key insights from the retro.
|
||||
Write target: signals/YYYY-MM-DD/retro-w{N}
|
||||
```
|
||||
|
||||
Do NOT write the full retro to gbrain — only the distilled insights (patterns, surprises, decisions made).
|
||||
- Use `origin/<default>` for all git queries (not local main which may be stale)
|
||||
- Display all timestamps in the user's local timezone (do not override `TZ`)
|
||||
- If the window has zero commits, say so and suggest a different window
|
||||
|
|
|
|||
|
|
@ -845,6 +845,19 @@ You are running the `/review` workflow. Analyze the current branch's diff agains
|
|||
|
||||
---
|
||||
|
||||
## Step 0: gbrain task context
|
||||
|
||||
**REQUIRED SUB-SKILL: Use `brain-ops` — look up any task or brief pages linked to this PR's feature before reading the diff.**
|
||||
|
||||
```
|
||||
mcp__gbrain__list_pages type=task status=in_progress sort=updated_desc limit=5
|
||||
mcp__gbrain__search "<branch name or feature keyword>"
|
||||
```
|
||||
|
||||
If a task page exists: pull its acceptance criteria and use them as an additional review lens alongside the checklist. Note any mismatches between what the task says should ship and what the diff actually ships.
|
||||
|
||||
---
|
||||
|
||||
## Step 1: Check branch
|
||||
|
||||
1. Run `git branch --show-current` to get the current branch.
|
||||
|
|
@ -1843,6 +1856,43 @@ already knows. A good test: would this insight save time in a future session? If
|
|||
|
||||
If the review exits early before a real review completes (for example, no diff against the base branch), do **not** write this entry.
|
||||
|
||||
## Step Final: capture findings to gbrain
|
||||
|
||||
After review completes, run both writes in parallel:
|
||||
|
||||
**A — Signal capture (architectural insights)**
|
||||
If findings include non-trivial architectural observations, invoke `signal-detector`:
|
||||
```
|
||||
Write target: signals/YYYY-MM-DD/review-{branch-slug}
|
||||
```
|
||||
Skip for purely mechanical findings (formatting, null checks).
|
||||
|
||||
**B — Task stub for CRITICAL unresolved findings**
|
||||
For any finding that remains `status: unresolved` AND severity `CRITICAL` after the Fix-First pass:
|
||||
```
|
||||
mcp__gbrain__put_page
|
||||
slug: tasks/review-{branch-slug}-{fingerprint-short}
|
||||
type: task
|
||||
frontmatter:
|
||||
status: open
|
||||
priority: high
|
||||
source: review
|
||||
source_branch: <branch>
|
||||
parent_meeting: null
|
||||
parent_goal: null ← Milo week ritual will wire this
|
||||
due: <today + 3 days>
|
||||
author: "anoop@hashdirectors.com // ghosty"
|
||||
content: |
|
||||
## Finding
|
||||
{finding title + one-line description}
|
||||
## Why it matters
|
||||
{from the review's critical-pass rationale}
|
||||
## Suggested fix
|
||||
{from Fix-First classification}
|
||||
```
|
||||
|
||||
This makes critical findings visible to Milo's open ritual (Bucket B orphan tasks) and the week ritual's cascade-linking pass. Without this write, the finding dies in signals/.
|
||||
|
||||
## Important Rules
|
||||
|
||||
- **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,19 @@ You are running the `/review` workflow. Analyze the current branch's diff agains
|
|||
|
||||
---
|
||||
|
||||
## Step 0: gbrain task context
|
||||
|
||||
**REQUIRED SUB-SKILL: Use `brain-ops` — look up any task or brief pages linked to this PR's feature before reading the diff.**
|
||||
|
||||
```
|
||||
mcp__gbrain__list_pages type=task status=in_progress sort=updated_desc limit=5
|
||||
mcp__gbrain__search "<branch name or feature keyword>"
|
||||
```
|
||||
|
||||
If a task page exists: pull its acceptance criteria and use them as an additional review lens alongside the checklist. Note any mismatches between what the task says should ship and what the diff actually ships.
|
||||
|
||||
---
|
||||
|
||||
## Step 1: Check branch
|
||||
|
||||
1. Run `git branch --show-current` to get the current branch.
|
||||
|
|
@ -294,6 +307,43 @@ Substitute:
|
|||
|
||||
If the review exits early before a real review completes (for example, no diff against the base branch), do **not** write this entry.
|
||||
|
||||
## Step Final: capture findings to gbrain
|
||||
|
||||
After review completes, run both writes in parallel:
|
||||
|
||||
**A — Signal capture (architectural insights)**
|
||||
If findings include non-trivial architectural observations, invoke `signal-detector`:
|
||||
```
|
||||
Write target: signals/YYYY-MM-DD/review-{branch-slug}
|
||||
```
|
||||
Skip for purely mechanical findings (formatting, null checks).
|
||||
|
||||
**B — Task stub for CRITICAL unresolved findings**
|
||||
For any finding that remains `status: unresolved` AND severity `CRITICAL` after the Fix-First pass:
|
||||
```
|
||||
mcp__gbrain__put_page
|
||||
slug: tasks/review-{branch-slug}-{fingerprint-short}
|
||||
type: task
|
||||
frontmatter:
|
||||
status: open
|
||||
priority: high
|
||||
source: review
|
||||
source_branch: <branch>
|
||||
parent_meeting: null
|
||||
parent_goal: null ← Milo week ritual will wire this
|
||||
due: <today + 3 days>
|
||||
author: "anoop@hashdirectors.com // ghosty"
|
||||
content: |
|
||||
## Finding
|
||||
{finding title + one-line description}
|
||||
## Why it matters
|
||||
{from the review's critical-pass rationale}
|
||||
## Suggested fix
|
||||
{from Fix-First classification}
|
||||
```
|
||||
|
||||
This makes critical findings visible to Milo's open ritual (Bucket B orphan tasks) and the week ritual's cascade-linking pass. Without this write, the finding dies in signals/.
|
||||
|
||||
## Important Rules
|
||||
|
||||
- **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.
|
||||
|
|
|
|||
Loading…
Reference in New Issue