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
+1 -1
View File
@@ -24,7 +24,7 @@ const claude: HostConfig = {
pathRewrites: [], // Claude is the primary host — no rewrites needed
toolRewrites: {},
suppressedResolvers: [],
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
+2
View File
@@ -37,6 +37,8 @@ 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: {
+2
View File
@@ -28,6 +28,8 @@ const cursor: HostConfig = {
{ from: '.claude/skills', to: '.cursor/skills' },
],
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
+2
View File
@@ -43,6 +43,8 @@ const factory: HostConfig = {
'use the Glob tool': 'find files matching',
},
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
+2
View File
@@ -30,6 +30,8 @@ const kiro: HostConfig = {
{ from: '.codex/skills', to: '.kiro/skills' },
],
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
+2 -2
View File
@@ -53,6 +53,8 @@ const openclaw: HostConfig = {
'CODEX_SECOND_OPINION',
'CODEX_PLAN_REVIEW',
'REVIEW_ARMY',
'GBRAIN_CONTEXT_LOAD',
'GBRAIN_SAVE_RESULTS',
],
runtimeRoot: {
@@ -69,8 +71,6 @@ const openclaw: HostConfig = {
coAuthorTrailer: 'Co-Authored-By: OpenClaw Agent <agent@openclaw.ai>',
learningsMode: 'basic',
adapter: './scripts/host-adapters/openclaw-adapter',
};
export default openclaw;
+2
View File
@@ -28,6 +28,8 @@ const opencode: HostConfig = {
{ from: '.claude/skills', to: '.opencode/skills' },
],
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
+2
View File
@@ -28,6 +28,8 @@ const slate: HostConfig = {
{ from: '.claude/skills', to: '.slate/skills' },
],
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {