Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/architect-await-gate.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/architect-drop-vike-nudge.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/dashboard-run-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@gemstack/framework": minor
---

Add event-stream projections for the dashboard's run overview: `architectPlan`, `decisionLedger`, `loopStatus`, and `sessionInfo` derive the chosen stack + rationale, the decisions ledger, the production-grade loop status, and the live session from a `FrameworkEvent[]`. They plus `formatFrameworkEvent` are re-exported from a new browser-safe `@gemstack/framework/client` subpath (no Node imports), so the dashboard renders the rich run view — the stack/PROS-CONS card, decisions, loop status, and a human-readable event log instead of raw JSON across the live view, past-run replay, and the relay watch view.
Add event-stream projections for the dashboard's run overview: `loopStatus` and `sessionInfo` derive the production-grade loop status and the live session from a `FrameworkEvent[]`. They plus `formatFrameworkEvent` are re-exported from a new browser-safe `@gemstack/framework/client` subpath (no Node imports), so the dashboard renders the rich run view (loop status and a human-readable event log instead of raw JSON) across the live view, past-run replay, and the relay watch view.
7 changes: 0 additions & 7 deletions .changeset/gate-refire-after-realternative.md

This file was deleted.

4 changes: 2 additions & 2 deletions .changeset/interactive-choices-autopilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
'@gemstack/framework': minor
---

feat(framework): interactive plan-approval choice + autopilot in the dashboard (#304)
feat(framework): interactive choice gate + autopilot in the dashboard (#304)

The run now pauses at a plan-approval gate right after the architect decides the stack (the AWAIT point of the plan-then-AWAIT flow): the dashboard shows a "Your call" panel with "Proceed" plus each architect alternative as "Use X instead". Accept with the button or Ctrl+Enter, or leave the `[x] autopilot` countdown auto-accept the recommended plan after 10s (moving the mouse cancels it). Picking an alternative re-architects the run around it. New `requestChoice` option on `runFramework`, `choice` / `choice-resolved` events, and a `POST /choice` dashboard route; a headless run with no handler auto-accepts the recommended plan, so nothing else changes. Closes #304.
A run can now pause on a choice and wait for you: the dashboard shows a "Your call" panel with the options. Accept with the button or Ctrl+Enter, or leave the `[x] autopilot` countdown auto-accept the recommended option after 10s (moving the mouse cancels it). New `requestChoice` option on `runFramework`, `choice` / `choice-resolved` events, and a `POST /choice` dashboard route; a headless run with no handler auto-accepts the recommended option, so nothing else changes. Closes #304.
16 changes: 16 additions & 0 deletions .changeset/remove-architect-545.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@gemstack/framework': minor
'@gemstack/ai-autopilot': minor
---

Remove the architect. A build no longer runs a turn to pick the app's stack, and no longer tells the agent what to build on: the agent reads the workspace and decides for itself, the same way it would outside The Framework. `buildPrompt` / `extendPrompt` / `scaffoldPrompt` now take just the intent and say nothing about a stack.

Being opinionated about the stack is a hard thing to do well, and a system prompt that nudges one is worse than none at all (#545). The stack guidance we had was not designed, it accumulated. It goes rather than half-ships.

Gone with it, because the architect was their only source:

- the plan-approval gate ("Approve this plan?" / "Use X instead") and re-architect. The agent-authored await gates a build turn raises are unaffected: a build that stops to ask still pauses the run with Approve / Decline.
- the decisions ledger in a run, and the `DECISIONS.md` a run wrote from it. `@gemstack/ai-autopilot`'s `decisions/` module is untouched and still exported; nothing in a run feeds it now.
- the dashboard's "Stack & rationale" and "Decisions ledger" panels. Loop status, deploy, and session cards are unchanged.
- `@gemstack/ai-autopilot`: `agentArchitect`, `STACK_TRADEOFFS`, `BootstrapSteps.architect`, `BootstrapOptions.ledger`, the `architect` bootstrap event, `ArchitectPlan` / `ArchitectContext` / `ArchitectDecision` / `ArchitectAlternative`, and the `plan` field on the build / loop / deploy contexts and on `BootstrapResult`. The flow is now scope -> build -> loop -> deploy.
- `@gemstack/framework`: `driverArchitect`, `reArchitect`, `architectPrompt`, `parseArchitectPlan`, `architectPlan`, `decisionLedger`, `RunFrameworkResult.ledger`, and the `bench:architect` benchmark.
2 changes: 1 addition & 1 deletion .changeset/research-preset-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@gemstack/framework': minor
---

The [Research] preset (#331): `framework research [what]` and a [Research] button on the daemon dashboard run Rom's problem-variability review as a direct prompt via the new `runPrompt()` path, which honors await gates (showChoices/showMultiSelect) but skips the scope/architect/build scaffolding. The "what" defaults to `this PR`.
The [Research] preset (#331): `framework research [what]` and a [Research] button on the daemon dashboard run Rom's problem-variability review as a direct prompt via the new `runPrompt()` path, which honors await gates (showChoices/showMultiSelect) but skips the scope/build scaffolding. The "what" defaults to `this PR`.
2 changes: 1 addition & 1 deletion .changeset/single-select-gate-primitive.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

feat(framework): extract a shared single-select gate primitive (`requestChoices`) (#335)

The single-select choice gate (#304) is now a reusable `requestChoices({ id, title, options, recommended })` export, the twin of `requestMultiSelect` (#332): it emits the `choice` event, parks for the pick, and falls back to the recommended option if the run is headless or aborts. The plan-approval gate builds on it, and it is the primitive the system prompt's `showChoices()` and the research preset need. No behavior change for existing runs.
The single-select choice gate (#304) is now a reusable `requestChoices({ id, title, options, recommended })` export, the twin of `requestMultiSelect` (#332): it emits the `choice` event, parks for the pick, and falls back to the recommended option if the run is headless or aborts. It is the primitive the system prompt's `showChoices()` and the research preset need. No behavior change for existing runs.
2 changes: 1 addition & 1 deletion .changeset/turn-boundary-choice-gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

feat(framework): turn an agent's showChoices()+AWAIT into a live gate at the turn boundary (#337)

The system prompt tells the agent to `showChoices()` and `AWAIT` at unclear-scope / alternatives points, but until now only framework-emitted gates (the plan-approval gate, multi-select) could pause a run. Now when a build turn ends by asking the user, an `await-choices` block, the framework shows the choice on the dashboard, waits for the pick, and re-prompts the agent to continue from that decision. It is the agent-authored counterpart to the plan-approval gate: a no-op when headless and when the agent just finishes instead of asking, so existing runs are unchanged.
The system prompt tells the agent to `showChoices()` and `AWAIT` at unclear-scope / alternatives points, but until now only framework-emitted gates (multi-select) could pause a run. Now when a build turn ends by asking the user, an `await-choices` block, the framework shows the choice on the dashboard, waits for the pick, and re-prompts the agent to continue from that decision. It is a no-op when headless and when the agent just finishes instead of asking, so existing runs are unchanged.
3 changes: 1 addition & 2 deletions Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ What shipped, built up from that seed (the state layer + the loop are the moat,
- **Personas** — reusable, stack-aware roles materialized into worker agents; **presets** (Vike flagship, Next.js) select the framework-specific ones by detecting the project's framework, on top of a framework-neutral core.
- **Runner** — a pluggable sandbox seam (`FakeRunner` + a real `LocalRunner`; Docker/WebContainer/Flue are infra-gated adapters) where agents build and run an app.
- **Surfaces** — the same run in a terminal, an in-page UI, or a detached background handle, over one replayable event stream.
- **Decisions ledger** — durable memory of rejected ideas + settled choices (round-trips `DECISIONS.md`) so a run stops re-pitching what was turned down.
- **The loop** — an event-to-prompt-chain policy (a major change fires review + code-quality + security; a new UI flow fires QA + UX), gating on a `{ blockers }` verdict, with a data-driven **prompt library**.
- **Bootstrap** — the spine that sequences the above into scope -> architect -> build -> full-fledged loop -> deploy, taking an app from nothing to production-grade.
- **Bootstrap** — the spine that sequences the above into scope -> build -> full-fledged loop -> deploy, taking an app from nothing to production-grade.
- **Scale mode** — a self-maintaining `CODE-OVERVIEW.md`, refreshed only on material change.
- **Durability = in-process first.** Reuses `SubAgentRunStore` + resume primitives for pause/resume; a durable/queue-backed runner arrives as an optional adapter, not core.

Expand Down
2 changes: 1 addition & 1 deletion docs/packages/ai-autopilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The Supervisor (below) is the seed topology. Built up from it, the package is a
- **Surfaces** — the same run in a terminal, an in-page UI, or a detached background handle, over one replayable event stream (`launchAutopilot`).
- **Decisions ledger** — durable memory of rejected ideas + settled choices (round-trips `DECISIONS.md`) so a run stops re-pitching what was turned down.
- **The loop** — an event-to-prompt-chain policy (a major change fires review + code-quality + security; a new UI flow fires QA + UX), gating on a `{ blockers }` verdict, with a data-driven built-in **prompt library**.
- **Bootstrap** — the spine that sequences all of the above into scope → architect → build → full-fledged loop → deploy, taking an app from nothing to production-grade.
- **Bootstrap** — the spine that sequences all of the above into scope → build → full-fledged loop → deploy, taking an app from nothing to production-grade.
- **Scale mode** — a self-maintaining `CODE-OVERVIEW.md`, refreshed only on material change.

See [`examples/bootstrap-quickstart`](https://github.com/gemstack-land/gemstack/tree/main/examples/bootstrap-quickstart) for all of it wired together offline.
Expand Down
10 changes: 5 additions & 5 deletions examples/bootstrap-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project's dependencies to a scaffolded, production-grade, deploy-decided app.

```
detect framework (preset)
→ Bootstrap: scope → architect → build → full-fledged loop → deploy
→ Bootstrap: scope → build → full-fledged loop → deploy
→ scale mode: CODE-OVERVIEW.md
```

Expand All @@ -26,12 +26,12 @@ ends at a live-looking URL with no credentials.

- **Presets (#115)** — the framework is detected from the project deps (Vike here),
so the build's workers are that framework's personas plus the shared neutral ones.
- **Bootstrap (#116)** — one scoping question, then an **architect** picks the stack
and records its choices to the **decisions ledger**, a **build** scaffolds the app
- **Bootstrap (#116)** — one scoping question, then a **build** scaffolds the app
with the persona workers inside a **runner**, the **full-fledged loop** repeats the
production-grade checklist until its `{ blockers }` verdict is empty, and a
**deploy** is decided and shipped through the `DeployTarget` seam — here the real
`cloudflareTarget` (SSR → Workers), run over a simulated `wrangler` offline.
What stack to build on is the build agent's call, not the framework's.
- **Surfaces (#100/#120)** — every phase streams as narration over the generic
`launchAutopilot<BootstrapEvent, BootstrapResult>` handle.
- **Scale mode (#114)** — `CODE-OVERVIEW.md` is generated from the scaffold.
Expand All @@ -40,8 +40,8 @@ ends at a live-looking URL with no credentials.

The offline run above verifies the flow structurally. `src/live.ts` runs the same
flow for real — a real model via `@gemstack/ai-sdk` and a real `LocalRunner`
workspace on the host filesystem, so the architect, the build workers, and the
deploy decision are all model-driven and the workers write **real files to disk**:
workspace on the host filesystem, so the build workers and the deploy decision are
all model-driven and the workers write **real files to disk**:

```bash
ANTHROPIC_API_KEY=sk-... pnpm --filter @gemstack/example-bootstrap-quickstart start:live
Expand Down
2 changes: 1 addition & 1 deletion examples/bootstrap-quickstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@gemstack/example-bootstrap-quickstart",
"version": "0.0.8",
"private": true,
"description": "Runnable capstone for @gemstack/ai-autopilot: preset detection + Bootstrap (scope → architect → build → full-fledged loop → deploy) + scale mode, streamed over surfaces, offline via AiFake + FakeRunner.",
"description": "Runnable capstone for @gemstack/ai-autopilot: preset detection + Bootstrap (scope → build → full-fledged loop → deploy) + scale mode, streamed over surfaces, offline via AiFake + FakeRunner.",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
Expand Down
6 changes: 1 addition & 5 deletions examples/bootstrap-quickstart/src/bootstrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@ import assert from 'node:assert/strict'
import { runCapstone, INTENT } from './bootstrap.js'

describe('bootstrap capstone: the whole epic composes end-to-end (offline)', () => {
it('detects the preset, runs scope → architect → build → loop → deploy, and maps the code', async () => {
it('detects the preset, runs scope → build → loop → deploy, and maps the code', async () => {
const lines: string[] = []
const { detection, result, events, files, overview } = await runCapstone(line => lines.push(line))

// Preset: the Vike framework was detected from the project deps.
assert.equal(detection.preset?.name, 'vike')
assert.equal(detection.framework, 'Vike')

// Architect: chose the stack and recorded its choices to the ledger.
assert.match(result.plan.stack, /Vike \+ Prisma/)
assert.equal(result.plan.decisions.length, 2)

// Build: each preset persona wrote its file into the sandbox.
assert.ok('database/schema.ts' in files)
assert.ok('pages/orders/+Page.jsx' in files)
Expand Down
Loading
Loading