Skip to content

feat: wire @stackbilt/scaffold-core for inference-free local scaffold #4

@stackbilt-admin

Description

@stackbilt-admin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions