chore: regenerate SKILL.md docs + goldens (Windows-separator jq fix)

Pure generator output for the brain-sync block's jq ancestor match now
accepting backslash-formed Windows project keys — previously project-scoped
brains were invisible on Windows while the TS scope resolvers saw them.
Golden ship fixtures refreshed per the documented procedure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-17 14:13:51 -07:00
co-authored by Claude Fable 5
parent fd0dbdeea2
commit ef3bb1f6e2
53 changed files with 58 additions and 53 deletions
@@ -53,8 +53,13 @@ import { quoteSafePath } from '../types';
// Local config when both scopes define the server). The operand order below
// (nearest-ancestor project first, user-scope fallback) mirrors that; the
// pre-wave user-first order mis-resolved whenever the scopes disagreed.
// The ancestor match accepts BOTH separators: project keys and $PWD are
// backslash-formed on Windows, so a "/"-only startswith never matched there
// and project-scoped brains were invisible. `"\\\\"` in this TS source is a
// jq string containing ONE backslash (TS halves it, jq halves it again) —
// mirrors the path-boundary handling in the TS scope resolvers.
const GBRAIN_MCP_ENTRY_JQ =
'((.projects // {}) | to_entries | map(select((.key as $k | $cwd == $k or ($cwd | startswith($k + "/"))) and ((try .value.mcpServers.gbrain catch null) != null))) | sort_by(.key | length) | last | .value.mcpServers.gbrain) // .mcpServers.gbrain // empty';
'((.projects // {}) | to_entries | map(select((.key as $k | $cwd == $k or ($cwd | startswith($k + "/")) or ($cwd | startswith($k + "\\\\"))) and ((try .value.mcpServers.gbrain catch null) != null))) | sort_by(.key | length) | last | .value.mcpServers.gbrain) // .mcpServers.gbrain // empty';
export function generateBrainSyncBlock(ctx: TemplateContext): string {
const isBrainHost = ctx.host === 'gbrain' || ctx.host === 'hermes';