mirror of
https://github.com/garrytan/gstack.git
synced 2026-07-06 16:17:56 +02:00
feat(dev-skill): refresh the untracked brain-aware render on template change
After the default in-place regen (which keeps the worktree canonical and runs validation), also re-render the :user variant into .claude/gstack-rendered when it exists, so live template edits reflect at the workspace's runtime. Never creates the render dir during plain template dev. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,24 @@ function regenerateAndValidate() {
|
|||||||
console.log(` [check] \u2705 ${output} — ${totalValid} commands, all valid`);
|
console.log(` [check] \u2705 ${output} — ${totalValid} commands, all valid`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dev workspace render isolation: the default in-place regen above keeps the
|
||||||
|
// worktree canonical. If bin/dev-setup set up an untracked brain-aware render
|
||||||
|
// (.claude/gstack-rendered), refresh it too so live template edits reflect at
|
||||||
|
// this workspace's runtime. Only runs when the render dir already exists — we
|
||||||
|
// never create it during plain template dev.
|
||||||
|
const RENDER_DIR = path.join(ROOT, '.claude', 'gstack-rendered');
|
||||||
|
if (fs.existsSync(RENDER_DIR)) {
|
||||||
|
try {
|
||||||
|
execSync(
|
||||||
|
`bun run scripts/gen-skill-docs.ts --respect-detection --host claude --out-dir ${JSON.stringify(RENDER_DIR)}`,
|
||||||
|
{ cwd: ROOT, stdio: 'pipe' },
|
||||||
|
);
|
||||||
|
console.log(' [render] refreshed .claude/gstack-rendered (brain-aware workspace copy)');
|
||||||
|
} catch (err: any) {
|
||||||
|
console.log(` [render] ERROR: ${err.stderr?.toString().trim() || err.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial run
|
// Initial run
|
||||||
|
|||||||
Reference in New Issue
Block a user