mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-28 20:50:05 +02:00
feat: preamble emits gbrain-availability block when capability ok
Extends generate-brain-sync-block.ts to emit Variant A (steady-state, 4 lines) when cwd page_count > 0 or Variant B (empty-corpus emergency, 3 lines) when 0; empty string otherwise. Reads cached page_count from .gbrain-sync-state.json (handles pretty + compact JSON). Refreshes ship golden fixtures and bumps the plan-review preamble byte budget to 35K to absorb the new block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -316,10 +316,12 @@ describe('gen-skill-docs', () => {
|
||||
// (Brain Sync, Context Recovery, Routing Injection are load-bearing
|
||||
// functionality, not optional). Budget is set to current size + small
|
||||
// headroom; ratchet down if a future slim trims real bytes.
|
||||
// Ratcheted from 33000 → 35000 when the gbrain context-load block was
|
||||
// added to generate-brain-sync-block.ts (per /sync-gbrain plan §4).
|
||||
for (const skill of reviewSkills) {
|
||||
const content = fs.readFileSync(skill.path, 'utf-8');
|
||||
const preamble = extractPreambleBeforeWorkflow(content, skill.markers);
|
||||
expect(Buffer.byteLength(preamble, 'utf-8')).toBeLessThan(33_000);
|
||||
expect(Buffer.byteLength(preamble, 'utf-8')).toBeLessThan(35_000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user