Summary
Replace the gateway REST call in stackbilt run with a direct buildScaffold() call from @stackbilt/scaffold-core. This is the core change that makes the CLI truly inference-free and offline-capable.
Blocked on: Stackbilt-dev/charter#218 (package published).
Current behaviour
stackbilt run with an API key routes to POST mcp.stackbilt.dev/api/scaffold — a network call to the gateway. Without a key it falls back to POST api.stackbilt.dev/engine/build. Neither path works offline.
Target behaviour
stackbilt run "my intention" # fully offline, zero network
stackbilt run "my intention" --persist # offline scaffold + POST /api/flows for platform record
stackbilt run "my intention" --oracle # offline scaffold + opt-in LLM prose polish
Changes
- Add
@stackbilt/scaffold-core dependency to package.json
- Replace
EngineClient.scaffold() call in src/commands/run.ts with buildScaffold(intention, { projectType, complexity })
- Keep gateway path as
--gateway flag for explicit opt-in
- Update
src/http-client.ts: scaffoldLocal() wraps package, scaffoldRemote() retains gateway path
- Write result to disk (existing file-writing logic unchanged)
- Cache result to
.charter/last-run.json (fixes the architect/run cache disconnect — see companion issue)
Design doc
AEGIS wiki: scaffold-core-extraction
Summary
Replace the gateway REST call in
stackbilt runwith a directbuildScaffold()call from@stackbilt/scaffold-core. This is the core change that makes the CLI truly inference-free and offline-capable.Blocked on: Stackbilt-dev/charter#218 (package published).
Current behaviour
stackbilt runwith an API key routes toPOST mcp.stackbilt.dev/api/scaffold— a network call to the gateway. Without a key it falls back toPOST api.stackbilt.dev/engine/build. Neither path works offline.Target behaviour
Changes
@stackbilt/scaffold-coredependency topackage.jsonEngineClient.scaffold()call insrc/commands/run.tswithbuildScaffold(intention, { projectType, complexity })--gatewayflag for explicit opt-insrc/http-client.ts:scaffoldLocal()wraps package,scaffoldRemote()retains gateway path.charter/last-run.json(fixes the architect/run cache disconnect — see companion issue)Design doc
AEGIS wiki:
scaffold-core-extraction