Skip to content

v1.53.0.0: setup calls missing gen:skill-docs:user npm script — brain-aware SKILL.md regen never runs on gbrain installs #1803

@joramire16-afk

Description

@joramire16-afk

Summary

On a gbrain-detected install, setup (~line 1271) runs:

bun run gen:skill-docs:user --host claude

but package.json in v1.53.0.0 defines only gen:skill-docs — there is no gen:skill-docs:user script. So every ./setup on a gbrain machine prints:

gbrain detected — regenerating Claude SKILL.md with brain-aware blocks (~250 token overhead per planning skill)...
error: Script not found "gen:skill-docs:user"
  warning: gen:skill-docs:user failed — run 'bun run gen:skill-docs:user' manually if you want brain-aware blocks

Effect: the brain-aware blocks are silently not injected into planning-skill SKILL.md files on user-local gbrain installs — i.e. the headline behavior the v1.53.0.0 CHANGELOG says shipped never runs from setup.

The CHANGELOG says the script was added (but it wasn't)

From the v1.53.0.0 CHANGELOG:

./setup runs this at the end of install and conditionally regenerates Claude-host SKILL.md with bun run gen:skill-docs:user (added package.json script) ...
Use bun run gen:skill-docs:user for user-local installs.

The alias is absent from package.json, so this reads as done but isn't.

Root cause + one-line fix

scripts/gen-skill-docs.ts already implements the user-local behavior behind a flag:

// Use `bun run gen:skill-docs:user` (which adds --respect-detection) for user-local installs.
const RESPECT_DETECTION = process.argv.includes('--respect-detection');

So the missing alias is just (add after the existing gen:skill-docs entry):

"gen:skill-docs:user": "bun run scripts/gen-skill-docs.ts --respect-detection",

Verified locally — running the underlying command directly regenerates all claude-host SKILL.md with brain-aware blocks and leaves 0 stale:

bun run scripts/gen-skill-docs.ts --respect-detection --host claude

Environment

  • gstack v1.53.0.0
  • gbrain v0.33.x (postgres), gbrain_local_status: "ok"
  • macOS, bun, Claude host

Secondary data point — ship/SKILL.md over the token ceiling (re: your TODOS.md rebaseline)

While verifying, the generator flags ship/SKILL.md over the 160000-byte (~40K token) ceiling. Measured both ways:

Mode Size ~Tokens
with brain blocks (--respect-detection) 171,575 B ~42,893
brain blocks suppressed (CI-canonical) 169,063 B ~42,266

So the brain block is only ~600 tokens of the overage — the bulk is the v1.53 redaction-engine content now in the ship template. Sharing in case it helps the rebaseline the CHANGELOG mentions tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions