Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions cso/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,21 @@ Then write a `## GSTACK REVIEW REPORT` section to the end of the plan file:
file you are allowed to edit in plan mode. The plan file review report is part of the
plan's living status.

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

# /cso — Chief Security Officer Audit (v2)

Expand Down Expand Up @@ -1220,7 +1234,28 @@ staleness detection: if those files are later deleted, the learning can be flagg
**Only log genuine discoveries.** Don't log obvious things. Don't log things the user
already knows. A good test: would this insight save time in a future session? If yes, log it.

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the security audit as a brain page:
```bash
gbrain put_page --title "Security Audit: <date>" --tags "security-audit,<date>" <<'EOF'
<findings and remediation status in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

## Important Rules

Expand Down
35 changes: 35 additions & 0 deletions design-consultation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,21 @@ If `DESIGN_NOT_AVAILABLE`: Phase 5 falls back to the HTML preview page (still go

---

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

## Prior Learnings

Expand Down Expand Up @@ -1274,7 +1288,28 @@ staleness detection: if those files are later deleted, the learning can be flagg
**Only log genuine discoveries.** Don't log obvious things. Don't log things the user
already knows. A good test: would this insight save time in a future session? If yes, log it.

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the design system as a brain page:
```bash
gbrain put_page --title "Design System: <project name>" --tags "design-system,<project-slug>" <<'EOF'
<design decisions in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

## Important Rules

Expand Down
35 changes: 35 additions & 0 deletions design-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,21 @@ Then write a `## GSTACK REVIEW REPORT` section to the end of the plan file:
file you are allowed to edit in plan mode. The plan file review report is part of the
plan's living status.

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

# /design-review: Design Audit → Fix → Verify

Expand Down Expand Up @@ -1753,7 +1767,28 @@ staleness detection: if those files are later deleted, the learning can be flagg
**Only log genuine discoveries.** Don't log obvious things. Don't log things the user
already knows. A good test: would this insight save time in a future session? If yes, log it.

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the skill output as a brain page if the results are worth preserving:
```bash
gbrain put_page --title "<descriptive title>" --tags "<relevant,tags>" <<'EOF'
<content in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

## Additional Rules (design-review specific)

Expand Down
2 changes: 1 addition & 1 deletion hosts/claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const claude: HostConfig = {

pathRewrites: [], // Claude is the primary host — no rewrites needed
toolRewrites: {},
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
suppressedResolvers: [],

runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
Expand Down
2 changes: 0 additions & 2 deletions hosts/codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ const codex: HostConfig = {
'CODEX_SECOND_OPINION', // review.ts:257 — Codex can't invoke itself
'CODEX_PLAN_REVIEW', // review.ts:541 — Codex can't invoke itself
'REVIEW_ARMY', // review-army.ts:180 — Codex shouldn't orchestrate
'GBRAIN_CONTEXT_LOAD',
'GBRAIN_SAVE_RESULTS',
],

runtimeRoot: {
Expand Down
37 changes: 37 additions & 0 deletions investigate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,23 @@ Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address r

---

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

If the user's request is about tracking, extracting, or researching structured data (e.g., "track this data", "extract from emails", "build a tracker"), route to GBrain's data-research skill instead: `gbrain call data-research`. This skill has a 7-phase pipeline optimized for structured data extraction.

## Phase 1: Root Cause Investigation

Expand Down Expand Up @@ -792,7 +808,28 @@ staleness detection: if those files are later deleted, the learning can be flagg
**Only log genuine discoveries.** Don't log obvious things. Don't log things the user
already knows. A good test: would this insight save time in a future session? If yes, log it.

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the root cause analysis as a brain page:
```bash
gbrain put_page --title "Investigation: <issue summary>" --tags "investigation,<affected-files>" <<'EOF'
<investigation findings in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

---

Expand Down
35 changes: 35 additions & 0 deletions office-hours/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,21 @@ You are a **YC office hours partner**. Your job is to ensure the problem is unde

---

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

## Phase 1: Context Gathering

Expand Down Expand Up @@ -1536,7 +1550,28 @@ 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

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the design document as a brain page:
```bash
gbrain put_page --title "Office Hours: <project name>" --tags "design-doc,<project-slug>" <<'EOF'
<design doc content in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

---

Expand Down
35 changes: 35 additions & 0 deletions plan-ceo-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,21 @@ matches a past learning, display:
This makes the compounding visible. The user should see that gstack is getting
smarter on their codebase over time.

## Brain Context Load

Before starting this skill, search your brain for relevant context:

1. Extract 2-4 keywords from the user's request (nouns, error names, file paths, technical terms).
Search GBrain: `gbrain search "keyword1 keyword2"`
Example: for "the login page is broken after deploy", search `gbrain search "login broken deploy"`
Search returns lines like: `[slug] Title (score: 0.85) - first line of content...`
2. If few results, broaden to the single most specific keyword and search again.
3. For each result page, read it: `gbrain get_page "<page_slug>"`
Read the top 3 pages for context.
4. Use this brain context to inform your analysis.

If GBrain is not available or returns no results, proceed without brain context.
Any non-zero exit code from gbrain commands should be treated as a transient failure.

## Step 0: Nuclear Scope Challenge + Mode Selection

Expand Down Expand Up @@ -1831,7 +1845,28 @@ staleness detection: if those files are later deleted, the learning can be flagg
**Only log genuine discoveries.** Don't log obvious things. Don't log things the user
already knows. A good test: would this insight save time in a future session? If yes, log it.

## Save Results to Brain

After completing this skill, persist the results to your brain for future reference:

Save the CEO plan as a brain page:
```bash
gbrain put_page --title "CEO Plan: <feature name>" --tags "ceo-plan,<feature-slug>" <<'EOF'
<scope decisions and vision in markdown>
EOF
```

After saving the page, extract and enrich mentioned entities: for each actual person name or company/organization name found in the output, `gbrain search "<entity name>"` to check if a page exists. If not, create a stub page:
```bash
gbrain put_page --title "<Person or Company Name>" --tags "entity,person" --content "Stub page. Mentioned in <skill name> output."
```
Only extract actual person names and company/organization names. Skip product names, section headings, technical terms, and file paths.

Throttle errors appear as: exit code 1 with stderr containing "throttle", "rate limit", "capacity", or "busy". If GBrain returns a throttle or rate-limit error on any save operation, defer the save and move on. The brain is busy — the content is not lost, just not persisted this run. Any other non-zero exit code should also be treated as a transient failure.

Add backlinks to related brain pages if they exist. If GBrain is not available, skip this step.

After brain operations complete, note in your completion output: how many pages were found in the initial search, how many entities were enriched, and whether any operations were throttled. This helps the user see brain utilization over time.

## Mode Quick Reference
```
Expand Down
Loading