diff --git a/bun.lock b/bun.lock
index 949144f3b..9b8ad334a 100644
--- a/bun.lock
+++ b/bun.lock
@@ -125,9 +125,9 @@
},
},
"patchedDependencies": {
+ "electrobun@1.18.1": "patches/electrobun@1.18.1.patch",
"@mariozechner/pi-coding-agent@0.73.1": "patches/@mariozechner%2Fpi-coding-agent@0.73.1.patch",
"electrobun-e2e@1.0.2": "patches/electrobun-e2e@1.0.2.patch",
- "electrobun@1.18.1": "patches/electrobun@1.18.1.patch",
"electrobun-browser-tools@1.0.1": "patches/electrobun-browser-tools@1.0.1.patch",
},
"packages": {
diff --git a/docs/execution-model.md b/docs/execution-model.md
index f6d861eaa..9537f3e2f 100644
--- a/docs/execution-model.md
+++ b/docs/execution-model.md
@@ -100,7 +100,7 @@ Smithers owns workflow authoring concepts and workflow graph, run, node, iterati
resume semantics. `svvy` owns Shell command tracking, app approval/sandbox execution, pi-backed
workflow task-agent attempt surfaces, durable observed Smithers facts, and the narrow runtime-owned
`runTaskAgent` bridge. Agents use official Smithers CLI commands through Shell, such as
-`bunx smithers-orchestrator ...`, according to Smithers documentation and the active
+`bunx smthrs ...`, according to Smithers documentation and the active
sandbox/approval policy. `svvy` does not expose `workflow.*`, `svvyx smithers`, or loopback
Smithers runtime-control tools as product surfaces.
diff --git a/docs/features.ts b/docs/features.ts
index 56480a469..db63bee20 100644
--- a/docs/features.ts
+++ b/docs/features.ts
@@ -212,7 +212,7 @@ export const PRODUCT_FEATURES: ProductFeature[] = [
name: "Extension CLI Requirements",
status: "in-progress",
summary:
- "Lets extensions declare required CLIs or command providers with a binary name, optional package name, default target version, version-check command, and reusable exact-version install/update command template when that provider is installed rather than `bunx`-resolved; reports missing, unknown, available, detected version, current version, latest version, and update-available state through Extension Managing inspect/build and the Extensions UI; keeps user-clicked Extensions UI install/update admission outside the shipped public runtime facade surface; excludes dependency-action admission from the shipped public runtime facade surface unless a runtime-owned contract specifies app-global scope, immutable dependency planning, durable command and approval facts, sandboxed package-manager execution, readiness refresh, invalidation, cancellation, shutdown, and recovery; keeps `@svvy/extensions` responsible for immutable dependency command planning and normalized dependency identity interpretation while committed dependency approval facts are DB/product-state-backed `@svvy/state` facts read through `ExtensionStatePort`, with optional origin workspace identity as UI lineage only; agent-initiated installs remain ordinary Shell work; uses default versioned requirements for `cx-cli@0.7.1`, Smithers documentation generated from `smithers-orchestrator@0.22.0` while preserving official `bunx smithers-orchestrator ...` commands, and `@tiny-fish/cli@0.1.6`; and keeps Git and GitHub CLI requirements unversioned because their builtin instructions are not pinned to a specific CLI release.",
+ "Lets extensions declare required CLIs or command providers with a binary name, optional package name, default target version, version-check command, and reusable exact-version install/update command template when that provider is installed rather than `bunx`-resolved; reports missing, unknown, available, detected version, current version, latest version, and update-available state through Extension Managing inspect/build and the Extensions UI; keeps user-clicked Extensions UI install/update admission outside the shipped public runtime facade surface; excludes dependency-action admission from the shipped public runtime facade surface unless a runtime-owned contract specifies app-global scope, immutable dependency planning, durable command and approval facts, sandboxed package-manager execution, readiness refresh, invalidation, cancellation, shutdown, and recovery; keeps `@svvy/extensions` responsible for immutable dependency command planning and normalized dependency identity interpretation while committed dependency approval facts are DB/product-state-backed `@svvy/state` facts read through `ExtensionStatePort`, with optional origin workspace identity as UI lineage only; agent-initiated installs remain ordinary Shell work; uses default versioned requirements for `cx-cli@0.7.1`, Smithers documentation generated from `smthrs@0.22.0` while preserving official `bunx smthrs ...` commands, and `@tiny-fish/cli@0.1.6`; and keeps Git and GitHub CLI requirements unversioned because their builtin instructions are not pinned to a specific CLI release.",
sourceSpecs: [
"docs/specs/extensions-and-tools.spec.md",
"docs/specs/extension/git.extension.spec.md",
@@ -284,7 +284,7 @@ export const PRODUCT_FEATURES: ProductFeature[] = [
name: "Prompt-Only Smithers CLI Guidance",
status: "in-progress",
summary:
- "Defines Smithers as a builtin prompt-only extension for handler-thread workflow authoring, generated from the current Extension Managing-selected Smithers documentation version with a small svvy boundary appendix; agents use official `bunx smithers-orchestrator ...` commands through Shell against workspace `.smithers/` packages, TypeScript source imports from package `smithers-orchestrator`, reusable svvy assets are documented by the Workflows extension and imported only from generated `@svvyx/workflows`, and agents do not receive product workflow wrapper tools, Smithers runtime-control APIs or broad bridge tools, Smithers TypeScript facades, or workspace-local svvy workflow source guidance.",
+ "Defines Smithers as a builtin prompt-only extension for handler-thread workflow authoring, generated from the current Extension Managing-selected Smithers documentation version with a small svvy boundary appendix; agents use official `bunx smthrs ...` commands through Shell against workspace `.smithers/` packages, TypeScript source imports from package `smthrs`, reusable svvy assets are documented by the Workflows extension and imported only from generated `@svvyx/workflows`, and agents do not receive product workflow wrapper tools, Smithers runtime-control APIs or broad bridge tools, Smithers TypeScript facades, or workspace-local svvy workflow source guidance.",
sourceSpecs: [
"docs/prd.md",
"docs/specs/extension/smithers.extension.spec.md",
diff --git a/docs/prd.md b/docs/prd.md
index 9437eef0e..bdf2e98e3 100644
--- a/docs/prd.md
+++ b/docs/prd.md
@@ -478,7 +478,7 @@ Reusable values are accessed through those namespaces, for example `Agents.defau
Smithers task usage passes the generated parameter record into `Agents.defineTaskAgent`, which returns the Smithers-compatible `AgentLike` value intended for ``:
```tsx
-import { Task } from "smithers-orchestrator";
+import { Task } from "smthrs";
import { Agents } from "@svvyx/workflows";
const reviewer = Agents.defineTaskAgent(Agents.reviewerAgent);
@@ -493,7 +493,7 @@ export default (
Direct parameters are also valid when the workflow source owns the task-agent configuration:
```tsx
-import { Task } from "smithers-orchestrator";
+import { Task } from "smthrs";
import { Agents } from "@svvyx/workflows";
const explorer = Agents.defineTaskAgent({
diff --git a/docs/progress.md b/docs/progress.md
index f296b8b67..fef21b05b 100644
--- a/docs/progress.md
+++ b/docs/progress.md
@@ -1690,11 +1690,11 @@ This section is governed by `docs/specs/extension/smithers.extension.spec.md`.
for handler threads, with no native Smithers tools, generated TypeScript facades, or bundled app
Smithers runtime dependencies. Commit(s): `673837a`, `118fd39c9f`.
- [x] Generate the Smithers instruction fragment from the Extension Managing-selected
- `smithers-orchestrator` documentation version while excluding GUI, Gateway, MCP, HTTP server,
+ `smthrs` documentation version while excluding GUI, Gateway, MCP, HTTP server,
OpenTelemetry, DevTools, event-streaming, OpenAPI, Effect, and wrapper-oriented fragments that
are not current `svvy` product surfaces. Commit(s): `c91f88d377`, `dcc79bb073`.
- [x] Keep the svvy Smithers boundary instruction focused on workspace `.smithers/`, official
- `bunx smithers-orchestrator ...` CLI usage through Shell, official Smithers CLI operations, and
+ `bunx smthrs ...` CLI usage through Shell, official Smithers CLI operations, and
reusable svvy workflow assets as Workflows-extension material. Commit(s): `c91f88d377`,
`a02bd48`.
- [x] Keep orchestrators aware that workflow action normally delegates into handler threads, while
diff --git a/docs/redesign-implementation-checklist.md b/docs/redesign-implementation-checklist.md
index 79c091d30..aec32be57 100644
--- a/docs/redesign-implementation-checklist.md
+++ b/docs/redesign-implementation-checklist.md
@@ -277,7 +277,7 @@ only when the capability and its tests are present.
dependency-action command path with exact contracts, approval linkage, sandbox launch policy,
subprocess lifetime, command facts, readiness refresh, and tests; agent-initiated setup
remains ordinary Shell work. Sources: `docs/prd.md`, `docs/features.ts`.
-- [x] Declare default target CLI versions for `cx-cli@0.7.1`, `smithers-orchestrator@0.22.0` invoked through the official `bunx smithers-orchestrator ...` command path, and `@tiny-fish/cli@0.1.6`; keep Git and GitHub CLI requirements unversioned. Sources: `docs/features.ts`, `docs/specs/extension/cx.extension.spec.md`, `docs/specs/extension/web.extension.spec.md`, `docs/specs/extension/smithers.extension.spec.md`.
+- [x] Declare default target CLI versions for `cx-cli@0.7.1`, `smthrs@0.22.0` invoked through the official `bunx smthrs ...` command path, and `@tiny-fish/cli@0.1.6`; keep Git and GitHub CLI requirements unversioned. Sources: `docs/features.ts`, `docs/specs/extension/cx.extension.spec.md`, `docs/specs/extension/web.extension.spec.md`, `docs/specs/extension/smithers.extension.spec.md`.
## Direct Tools, Shell, Apply Patch, And Sandbox
@@ -476,7 +476,7 @@ only when the capability and its tests are present.
- [x] Keep Smithers as the workflow runtime and authoring model used directly through the official Smithers CLI. Sources: `docs/prd.md`, `docs/specs/extension/smithers.extension.spec.md`.
- [x] Make Smithers a builtin prompt-only extension for handler-thread workflow authoring. Sources: `docs/features.ts`, `docs/specs/extension/smithers.extension.spec.md`.
- [x] Add no native Smithers tools, no generated Smithers TypeScript facades, and no product workflow wrapper tools. Sources: `docs/prd.md`, `docs/specs/extension/smithers.extension.spec.md`.
-- [x] Preserve upstream Smithers `bunx smithers-orchestrator ...` examples as the official generated prompt guidance, including `init`, `workflow run`, `ps`, `inspect`, `logs`, approvals, and resume; do not rewrite them to a global `smithers` binary. Sources: `docs/specs/extension/smithers.extension.spec.md`, `docs/vendor/smithers/smithers-0.22.0.llms-full.txt`.
+- [x] Preserve upstream Smithers `bunx smthrs ...` examples as the official generated prompt guidance, including `init`, `workflow run`, `ps`, `inspect`, `logs`, approvals, and resume; do not rewrite them to a global `smithers` binary. Sources: `docs/specs/extension/smithers.extension.spec.md`, `docs/vendor/smithers/smithers-0.22.0.llms-full.txt`.
- [x] Generate Smithers instruction content from Extension Managing-selected official Smithers documentation plus the bounded svvy appendix. Sources: `docs/specs/extension/smithers.extension.spec.md`, `docs/vendor/smithers/smithers-0.22.0.llms-full.txt`.
- [x] Exclude GUI, Gateway, MCP, HTTP server, OpenTelemetry, DevTools, event-streaming, OpenAPI, Effect, and wrapper-oriented fragments not current svvy surfaces from generated Smithers prompt guidance. Sources: `docs/progress.md`, `docs/specs/extension/smithers.extension.spec.md`.
- [x] Keep official Smithers concepts in guidance where relevant: `.smithers/`, JSX authoring, official CLI approvals/resume, stable task ids, outputs, schemas, and render-loop behavior. Sources: `docs/specs/extension/smithers.extension.spec.md`, `docs/vendor/smithers/smithers-0.22.0.llms-full.txt`.
@@ -839,7 +839,7 @@ only when the capability and its tests are present.
- [x] Add focused `@svvyx/extensions` generation tests for file/build-eligible user `svvyx` extension reference exports with workflow task-agent opt-in, approved dependencies, and successful current source/build evidence, plus stale/deleted, instruction-only, dependency-blocked, build-failed, and no-current-build-evidence exclusion.
- [x] Add focused Workflows save source-boundary tests for workspace `.smithers/`, outside-source rejection, symlink escape rejection, generated-link rejection, nested workdir resolution, facade rejection, and multi-open-workspace package refresh.
- [x] Add focused generated-output writable-boundary tests for Apply Patch rejection, ordinary Shell rejection/cleanup, unrecognized shell writers, long-running Shell completion, workspace package-link writes, and allowed source-driven `svvyx workflows build`.
-- [x] Add Smithers prompt-generation tests from pinned `smithers-orchestrator@0.22.0` docs plus svvy boundary appendix and excluded fragment list. Sources: `docs/specs/extension/smithers.extension.spec.md`.
+- [x] Add Smithers prompt-generation tests from pinned `smthrs@0.22.0` docs plus svvy boundary appendix and excluded fragment list. Sources: `docs/specs/extension/smithers.extension.spec.md`.
- [x] Add Web extension tests proving TinyFish prompt-only behavior, exact CLI requirement, no Web native/generated surfaces, no Firecrawl/provider settings, and `networkAccess` gating. Sources: `docs/specs/extension/web.extension.spec.md`.
- [x] Add workspace-tab/default-workspace tests for startup restore, default workspace creation, Open Workspace retargeting, New Tab, Open Workspace in New Tab, duplicate same-cwd tab sharing, explicit `workspaceId` routing, and tab status badges. Sources: `docs/specs/default-workspace-and-open-workspace.spec.md`.
- [x] Add Dockview tests for layout slots A/B/C, persistence, duplicated surface panels, independent scroll, drag/drop placement policy, static panes, focus restore, panel-location indicators, and close detachment semantics. Sources: `docs/specs/pane-layout.spec.md`.
diff --git a/docs/references/smithers-gui/.smithers/agents.ts b/docs/references/smithers-gui/.smithers/agents.ts
index f17f82411..ed19423ba 100644
--- a/docs/references/smithers-gui/.smithers/agents.ts
+++ b/docs/references/smithers-gui/.smithers/agents.ts
@@ -1,5 +1,5 @@
// smithers-source: generated
-import { ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, AmpAgent, type AgentLike } from "smithers-orchestrator";
+import { ClaudeCodeAgent, CodexAgent, GeminiAgent, PiAgent, KimiAgent, AmpAgent, type AgentLike } from "smthrs";
export const providers = {
claude: new ClaudeCodeAgent({ model: "claude-opus-4-6" }),
diff --git a/docs/references/smithers-gui/.smithers/bun.lock b/docs/references/smithers-gui/.smithers/bun.lock
index 5fae6a03b..b2cf90c04 100644
--- a/docs/references/smithers-gui/.smithers/bun.lock
+++ b/docs/references/smithers-gui/.smithers/bun.lock
@@ -5,7 +5,7 @@
"": {
"name": "smithers-workflows",
"dependencies": {
- "smithers-orchestrator": "0.14.1",
+ "smthrs": "0.14.1",
"zod": "4.3.6",
},
"devDependencies": {
@@ -1145,7 +1145,7 @@
"smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
- "smithers-orchestrator": ["smithers-orchestrator@0.14.1", "", { "dependencies": { "@ai-sdk/anthropic": "^3.0.36", "@ai-sdk/openai": "^3.0.41", "@effect/opentelemetry": "^0.61.0", "@effect/platform": "^0.94.5", "@effect/platform-bun": "^0.87.1", "@effect/sql": "^0.49.0", "@mariozechner/pi-coding-agent": "0.63.1", "@mariozechner/pi-tui": "0.63.1", "@mdx-js/esbuild": "^3.1.1", "@modelcontextprotocol/sdk": "^1.27.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-metrics-otlp-http": "^0.213.0", "@opentelemetry/exporter-trace-otlp-http": "^0.213.0", "@opentelemetry/resources": "^2.6.0", "@opentelemetry/sdk-logs": "^0.213.0", "@opentelemetry/sdk-metrics": "^2.6.0", "@opentelemetry/sdk-trace-base": "^2.6.0", "@opentelemetry/sdk-trace-node": "^2.6.0", "@opentelemetry/semantic-conventions": "^1.40.0", "@opentui/core": "^0.1.92", "@opentui/react": "^0.1.92", "@sinclair/typebox": "0.34.49", "@toon-format/toon": "^2.1.0", "@types/react-dom": "^19.2.3", "@types/react-reconciler": "^0.28.9", "ai": "^6.0.69", "bippy": "^0.5.32", "cron-parser": "^5.5.0", "diff": "^5.2.0", "drizzle-orm": "^0.45.1", "drizzle-zod": "^0.8.3", "effect": "^3.19.19", "hono": "^4.12.8", "incur": "^0.3.3", "react": "^19.2.4", "react-dom": "^19.2.4", "react-reconciler": "^0.31.0", "ws": "^8.18.0", "zod": "^4.3.6" }, "peerDependencies": { "typescript": "^5" }, "bin": { "smithers": "src/cli/index.ts" } }, "sha512-2pgxyaHNMCShjpjRdJXtZeUFSHq8E4QZ1QhCHwP0z/d60mIZbFkk8DQVulTSO7EUdu1KXZ8fKQjczxnWr9A7Iw=="],
+ "smthrs": ["smthrs@0.14.1", "", { "dependencies": { "@ai-sdk/anthropic": "^3.0.36", "@ai-sdk/openai": "^3.0.41", "@effect/opentelemetry": "^0.61.0", "@effect/platform": "^0.94.5", "@effect/platform-bun": "^0.87.1", "@effect/sql": "^0.49.0", "@mariozechner/pi-coding-agent": "0.63.1", "@mariozechner/pi-tui": "0.63.1", "@mdx-js/esbuild": "^3.1.1", "@modelcontextprotocol/sdk": "^1.27.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-metrics-otlp-http": "^0.213.0", "@opentelemetry/exporter-trace-otlp-http": "^0.213.0", "@opentelemetry/resources": "^2.6.0", "@opentelemetry/sdk-logs": "^0.213.0", "@opentelemetry/sdk-metrics": "^2.6.0", "@opentelemetry/sdk-trace-base": "^2.6.0", "@opentelemetry/sdk-trace-node": "^2.6.0", "@opentelemetry/semantic-conventions": "^1.40.0", "@opentui/core": "^0.1.92", "@opentui/react": "^0.1.92", "@sinclair/typebox": "0.34.49", "@toon-format/toon": "^2.1.0", "@types/react-dom": "^19.2.3", "@types/react-reconciler": "^0.28.9", "ai": "^6.0.69", "bippy": "^0.5.32", "cron-parser": "^5.5.0", "diff": "^5.2.0", "drizzle-orm": "^0.45.1", "drizzle-zod": "^0.8.3", "effect": "^3.19.19", "hono": "^4.12.8", "incur": "^0.3.3", "react": "^19.2.4", "react-dom": "^19.2.4", "react-reconciler": "^0.31.0", "ws": "^8.18.0", "zod": "^4.3.6" }, "peerDependencies": { "typescript": "^5" }, "bin": { "smithers": "src/cli/index.ts" } }, "sha512-2pgxyaHNMCShjpjRdJXtZeUFSHq8E4QZ1QhCHwP0z/d60mIZbFkk8DQVulTSO7EUdu1KXZ8fKQjczxnWr9A7Iw=="],
"socks": ["socks@2.8.7", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="],
diff --git a/docs/references/smithers-gui/.smithers/components/CommandProbe.tsx b/docs/references/smithers-gui/.smithers/components/CommandProbe.tsx
index 15e19e95d..8ad680768 100644
--- a/docs/references/smithers-gui/.smithers/components/CommandProbe.tsx
+++ b/docs/references/smithers-gui/.smithers/components/CommandProbe.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Task } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Task } from "smthrs";
import { z } from "zod/v4";
export const commandProbeOutputSchema = z.object({
diff --git a/docs/references/smithers-gui/.smithers/components/FeatureEnum.tsx b/docs/references/smithers-gui/.smithers/components/FeatureEnum.tsx
index d6386bd2f..9d36adf54 100644
--- a/docs/references/smithers-gui/.smithers/components/FeatureEnum.tsx
+++ b/docs/references/smithers-gui/.smithers/components/FeatureEnum.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import FeatureEnumScanPrompt from "../prompts/feature-enum-scan.mdx";
import FeatureEnumRefinePrompt from "../prompts/feature-enum-refine.mdx";
diff --git a/docs/references/smithers-gui/.smithers/components/ForEachFeature.tsx b/docs/references/smithers-gui/.smithers/components/ForEachFeature.tsx
index af0262162..b4da0fe3a 100644
--- a/docs/references/smithers-gui/.smithers/components/ForEachFeature.tsx
+++ b/docs/references/smithers-gui/.smithers/components/ForEachFeature.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Parallel, Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Parallel, Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
export const forEachFeatureResultSchema = z.object({
diff --git a/docs/references/smithers-gui/.smithers/components/GrillMe.tsx b/docs/references/smithers-gui/.smithers/components/GrillMe.tsx
index 1d5704738..e8e95583a 100644
--- a/docs/references/smithers-gui/.smithers/components/GrillMe.tsx
+++ b/docs/references/smithers-gui/.smithers/components/GrillMe.tsx
@@ -1,5 +1,5 @@
-/** @jsxImportSource smithers-orchestrator */
-import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smthrs";
import { z } from "zod/v4";
import GrillMeSkill from "skills/grill-me/SKILL.md";
import AskUserInstructions from "../prompts/ask-user-instructions.mdx";
diff --git a/docs/references/smithers-gui/.smithers/components/Review.tsx b/docs/references/smithers-gui/.smithers/components/Review.tsx
index a104f5f51..0464f62df 100644
--- a/docs/references/smithers-gui/.smithers/components/Review.tsx
+++ b/docs/references/smithers-gui/.smithers/components/Review.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Parallel, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Parallel, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import ReviewPrompt from "../prompts/review.mdx";
diff --git a/docs/references/smithers-gui/.smithers/components/ValidationLoop.tsx b/docs/references/smithers-gui/.smithers/components/ValidationLoop.tsx
index 54fcd0238..9cb98a7fa 100644
--- a/docs/references/smithers-gui/.smithers/components/ValidationLoop.tsx
+++ b/docs/references/smithers-gui/.smithers/components/ValidationLoop.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Loop, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Loop, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import ImplementPrompt from "../prompts/implement.mdx";
import ValidatePrompt from "../prompts/validate.mdx";
diff --git a/docs/references/smithers-gui/.smithers/components/WriteAPrd.tsx b/docs/references/smithers-gui/.smithers/components/WriteAPrd.tsx
index 465a80aac..888126b25 100644
--- a/docs/references/smithers-gui/.smithers/components/WriteAPrd.tsx
+++ b/docs/references/smithers-gui/.smithers/components/WriteAPrd.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// Inspired by Matt Pocock's write-a-prd skill (https://github.com/mattpocock/skills)
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import WriteAPrdPrompt from "../prompts/write-a-prd.mdx";
diff --git a/docs/references/smithers-gui/.smithers/package.json b/docs/references/smithers-gui/.smithers/package.json
index 986183235..f2f346dc7 100644
--- a/docs/references/smithers-gui/.smithers/package.json
+++ b/docs/references/smithers-gui/.smithers/package.json
@@ -9,7 +9,7 @@
"workflow:implement": "smithers workflow implement"
},
"dependencies": {
- "smithers-orchestrator": "0.14.1",
+ "smthrs": "^0.33.0",
"zod": "4.3.6"
},
"devDependencies": {
diff --git a/docs/references/smithers-gui/.smithers/preload.ts b/docs/references/smithers-gui/.smithers/preload.ts
index 04b77ae64..04dc24cf0 100644
--- a/docs/references/smithers-gui/.smithers/preload.ts
+++ b/docs/references/smithers-gui/.smithers/preload.ts
@@ -1,3 +1,3 @@
-import { mdxPlugin } from "smithers-orchestrator";
+import { mdxPlugin } from "smthrs";
mdxPlugin();
diff --git a/docs/references/smithers-gui/.smithers/tsconfig.json b/docs/references/smithers-gui/.smithers/tsconfig.json
index 4a049d774..9b3db7aa2 100644
--- a/docs/references/smithers-gui/.smithers/tsconfig.json
+++ b/docs/references/smithers-gui/.smithers/tsconfig.json
@@ -9,7 +9,7 @@
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator",
+ "jsxImportSource": "smthrs",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
diff --git a/docs/references/smithers-gui/.smithers/workflows/ai-review.tsx b/docs/references/smithers-gui/.smithers/workflows/ai-review.tsx
index 020e29a17..5dc704fe5 100644
--- a/docs/references/smithers-gui/.smithers/workflows/ai-review.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/ai-review.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: AI Review
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers-gui/.smithers/workflows/audit.tsx b/docs/references/smithers-gui/.smithers/workflows/audit.tsx
index 3f6d853d5..d10ba5ebc 100644
--- a/docs/references/smithers-gui/.smithers/workflows/audit.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/audit.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Audit
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ForEachFeature, forEachFeatureMergeSchema, forEachFeatureResultSchema } from "../components/ForEachFeature";
diff --git a/docs/references/smithers-gui/.smithers/workflows/debug.tsx b/docs/references/smithers-gui/.smithers/workflows/debug.tsx
index e7bf1619d..bf7107260 100644
--- a/docs/references/smithers-gui/.smithers/workflows/debug.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/debug.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Debug
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers-gui/.smithers/workflows/feature-enum.tsx b/docs/references/smithers-gui/.smithers/workflows/feature-enum.tsx
index 119a93f35..4309689a1 100644
--- a/docs/references/smithers-gui/.smithers/workflows/feature-enum.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/feature-enum.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Feature Enum
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { FeatureEnum, featureEnumOutputSchema } from "../components/FeatureEnum";
diff --git a/docs/references/smithers-gui/.smithers/workflows/grill-me.tsx b/docs/references/smithers-gui/.smithers/workflows/grill-me.tsx
index 950140f77..2e8fd68bf 100644
--- a/docs/references/smithers-gui/.smithers/workflows/grill-me.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/grill-me.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Grill Me
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { GrillMe, grillOutputSchema } from "../components/GrillMe";
diff --git a/docs/references/smithers-gui/.smithers/workflows/implement.tsx b/docs/references/smithers-gui/.smithers/workflows/implement.tsx
index 237e39e02..e8e683c03 100644
--- a/docs/references/smithers-gui/.smithers/workflows/implement.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/implement.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Implement
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers-gui/.smithers/workflows/improve-test-coverage.tsx b/docs/references/smithers-gui/.smithers/workflows/improve-test-coverage.tsx
index a9c3e4799..f76b31f8a 100644
--- a/docs/references/smithers-gui/.smithers/workflows/improve-test-coverage.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/improve-test-coverage.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Improve Test Coverage
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers-gui/.smithers/workflows/lint-autofix.tsx b/docs/references/smithers-gui/.smithers/workflows/lint-autofix.tsx
index fb1073d79..fcd713239 100644
--- a/docs/references/smithers-gui/.smithers/workflows/lint-autofix.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/lint-autofix.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Lint Auto-Fix
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers-gui/.smithers/workflows/live-run-devtools-build.tsx b/docs/references/smithers-gui/.smithers/workflows/live-run-devtools-build.tsx
index 655fedf00..53bc589bd 100644
--- a/docs/references/smithers-gui/.smithers/workflows/live-run-devtools-build.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/live-run-devtools-build.tsx
@@ -1,12 +1,12 @@
// smithers-source: seeded
// smithers-display-name: Live Run DevTools Build
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import {
ClaudeCodeAgent,
CodexAgent,
Parallel,
createSmithers,
-} from "smithers-orchestrator";
+} from "smthrs";
import { reviewOutputSchema } from "../components/Review";
import { implementOutputSchema } from "../components/ValidationLoop";
import ImplementPrompt from "../prompts/implement.mdx";
diff --git a/docs/references/smithers-gui/.smithers/workflows/plan.tsx b/docs/references/smithers-gui/.smithers/workflows/plan.tsx
index 4d0c81c37..e1e282afa 100644
--- a/docs/references/smithers-gui/.smithers/workflows/plan.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/plan.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Plan
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import PlanPrompt from "../prompts/plan.mdx";
diff --git a/docs/references/smithers-gui/.smithers/workflows/pr-description.tsx b/docs/references/smithers-gui/.smithers/workflows/pr-description.tsx
index 196632c4f..7d1eb3f8a 100644
--- a/docs/references/smithers-gui/.smithers/workflows/pr-description.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/pr-description.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: PR Description
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers-gui/.smithers/workflows/ralph.tsx b/docs/references/smithers-gui/.smithers/workflows/ralph.tsx
index 8f6950b2c..fc42688d6 100644
--- a/docs/references/smithers-gui/.smithers/workflows/ralph.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/ralph.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Ralph
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers-gui/.smithers/workflows/research.tsx b/docs/references/smithers-gui/.smithers/workflows/research.tsx
index 79f63499d..6e3c3ad09 100644
--- a/docs/references/smithers-gui/.smithers/workflows/research.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/research.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Research
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ResearchPrompt from "../prompts/research.mdx";
diff --git a/docs/references/smithers-gui/.smithers/workflows/review.tsx b/docs/references/smithers-gui/.smithers/workflows/review.tsx
index 877bbbdfd..c0f92da7c 100644
--- a/docs/references/smithers-gui/.smithers/workflows/review.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/review.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Review
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { Review, reviewOutputSchema } from "../components/Review";
diff --git a/docs/references/smithers-gui/.smithers/workflows/test-first.tsx b/docs/references/smithers-gui/.smithers/workflows/test-first.tsx
index 77700937d..9cd8e757b 100644
--- a/docs/references/smithers-gui/.smithers/workflows/test-first.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/test-first.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Test First
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers-gui/.smithers/workflows/ticket-create.tsx b/docs/references/smithers-gui/.smithers/workflows/ticket-create.tsx
index 17545c4ad..002a5e2a1 100644
--- a/docs/references/smithers-gui/.smithers/workflows/ticket-create.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/ticket-create.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Ticket Create
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import TicketPrompt from "../prompts/ticket.mdx";
diff --git a/docs/references/smithers-gui/.smithers/workflows/ticket-implement.tsx b/docs/references/smithers-gui/.smithers/workflows/ticket-implement.tsx
index 4bb0eeffb..be5a3725d 100644
--- a/docs/references/smithers-gui/.smithers/workflows/ticket-implement.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/ticket-implement.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Ticket Implement
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers-gui/.smithers/workflows/ticket-kanban.tsx b/docs/references/smithers-gui/.smithers/workflows/ticket-kanban.tsx
index c7e70f00a..5984be5df 100644
--- a/docs/references/smithers-gui/.smithers/workflows/ticket-kanban.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/ticket-kanban.tsx
@@ -1,6 +1,6 @@
// smithers-display-name: Ticket Kanban
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence, Parallel, Worktree } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence, Parallel, Worktree } from "smthrs";
import { readdirSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { z } from "zod/v4";
diff --git a/docs/references/smithers-gui/.smithers/workflows/tickets-create.tsx b/docs/references/smithers-gui/.smithers/workflows/tickets-create.tsx
index 93b746e3a..4125eb9d9 100644
--- a/docs/references/smithers-gui/.smithers/workflows/tickets-create.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/tickets-create.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Tickets Create
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers-gui/.smithers/workflows/write-a-prd.tsx b/docs/references/smithers-gui/.smithers/workflows/write-a-prd.tsx
index f69926a3c..c051d559f 100644
--- a/docs/references/smithers-gui/.smithers/workflows/write-a-prd.tsx
+++ b/docs/references/smithers-gui/.smithers/workflows/write-a-prd.tsx
@@ -1,8 +1,8 @@
// smithers-source: seeded
// smithers-display-name: Write a PRD
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
// Inspired by Matt Pocock's write-a-prd skill (https://github.com/mattpocock/skills)
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { GrillMe, grillOutputSchema } from "../components/GrillMe";
diff --git a/docs/references/smithers-gui/AGENTS.md b/docs/references/smithers-gui/AGENTS.md
index 897b7f4e5..02699cd3f 100644
--- a/docs/references/smithers-gui/AGENTS.md
+++ b/docs/references/smithers-gui/AGENTS.md
@@ -4,7 +4,7 @@ You are working inside the Smithers GUI macOS app repository. This app provides
## Smithers CLI
-The `smithers` CLI (package: `smithers-orchestrator`) manages durable AI workflow execution.
+The `smithers` CLI (package: `smthrs`) manages durable AI workflow execution.
### Quick Reference
@@ -46,7 +46,7 @@ smithers down Cancel all active runs
Smithers is a Bun/TypeScript framework for building resumable AI workflows as JSX trees.
-- Package: `smithers-orchestrator` (requires Bun >= 1.3)
+- Package: `smthrs` (requires Bun >= 1.3)
- Primary API: `createSmithers(...)` with Zod schemas
- Persistence: SQLite
- Core components: ``, ``, ``, ``, ``, ``, ``, ``, ``
diff --git a/docs/references/smithers-gui/SidebarView.swift b/docs/references/smithers-gui/SidebarView.swift
index ad0e0f956..b9b4dad16 100644
--- a/docs/references/smithers-gui/SidebarView.swift
+++ b/docs/references/smithers-gui/SidebarView.swift
@@ -841,7 +841,7 @@ struct SmithersVersionWarningBanner: View {
Text("Smithers \(installed) is too old — update to ≥ \(required)")
.font(.system(size: 12, weight: .semibold))
.foregroundColor(.white)
- Text("Run lifecycle and heartbeat status will be inaccurate until you upgrade smithers-orchestrator.")
+ Text("Run lifecycle and heartbeat status will be inaccurate until you upgrade smthrs.")
.font(.system(size: 11))
.foregroundColor(.white.opacity(0.85))
}
diff --git a/docs/references/smithers-gui/SmithersClient.swift b/docs/references/smithers-gui/SmithersClient.swift
index f650a4f06..92524ebe2 100644
--- a/docs/references/smithers-gui/SmithersClient.swift
+++ b/docs/references/smithers-gui/SmithersClient.swift
@@ -221,7 +221,7 @@ class SmithersClient: ObservableObject {
@Published private(set) var connectionTransport: ConnectionTransport = .none
@Published private(set) var serverReachable: Bool = false
- /// Minimum supported `smithers-orchestrator` version. Older releases
+ /// Minimum supported `smthrs` version. Older releases
/// silently mislabel orphaned heartbeats as "continued"/"succeeded" and
/// lack the `state`/`unhealthy` fields the dashboard now expects.
static let minimumOrchestratorVersion = "0.16.0"
@@ -5177,8 +5177,8 @@ class SmithersClient: ObservableObject {
isConnected = false
}
- /// Returns the smithers-orchestrator version string (e.g. "1.2.3"). Runs
- /// `bunx smithers-orchestrator --version` out-of-band of the standard CLI
+ /// Returns the smthrs version string (e.g. "1.2.3"). Runs
+ /// `bunx smthrs --version` out-of-band of the standard CLI
/// transport so we can surface the underlying engine version even when
/// the `smithers` binary is a thin wrapper. Caches the result for the
/// lifetime of the client.
@@ -5232,8 +5232,8 @@ class SmithersClient: ObservableObject {
private func runOrchestratorVersionProbe() async -> String? {
let probes: [(executable: String, args: [String])] = [
- ("/usr/bin/env", ["bunx", "smithers-orchestrator", "--version"]),
- ("/usr/bin/env", ["smithers-orchestrator", "--version"]),
+ ("/usr/bin/env", ["bunx", "smthrs", "--version"]),
+ ("/usr/bin/env", ["smthrs", "--version"]),
]
for probe in probes {
diff --git a/docs/references/smithers/.github/workflows/faults-nightly.yml b/docs/references/smithers/.github/workflows/faults-nightly.yml
index 9031ea642..be3ea9bd1 100644
--- a/docs/references/smithers/.github/workflows/faults-nightly.yml
+++ b/docs/references/smithers/.github/workflows/faults-nightly.yml
@@ -33,4 +33,4 @@ jobs:
- run: pnpm -r build
- - run: pnpm --filter @smithers-orchestrator/e2e test:soak
+ - run: pnpm --filter @smthrs/e2e test:soak
diff --git a/docs/references/smithers/.github/workflows/faults.yml b/docs/references/smithers/.github/workflows/faults.yml
index 5fe401285..716bc21a4 100644
--- a/docs/references/smithers/.github/workflows/faults.yml
+++ b/docs/references/smithers/.github/workflows/faults.yml
@@ -32,4 +32,4 @@ jobs:
- run: pnpm -r build
- - run: pnpm --filter @smithers-orchestrator/e2e test:faults
+ - run: pnpm --filter @smthrs/e2e test:faults
diff --git a/docs/references/smithers/.smithers/agents.ts b/docs/references/smithers/.smithers/agents.ts
index d79e5af3c..93b02b9b1 100644
--- a/docs/references/smithers/.smithers/agents.ts
+++ b/docs/references/smithers/.smithers/agents.ts
@@ -2,7 +2,7 @@
// Account providers (camelCase labels) come from ~/.smithers/accounts.json — managed via `smithers agent add|list|remove`.
import { homedir } from "node:os";
import path from "node:path";
-import { type AgentLike, ClaudeCodeAgent as SmithersClaudeCodeAgent, CodexAgent as SmithersCodexAgent, OpenCodeAgent as SmithersOpenCodeAgent, PiAgent as SmithersPiAgent, KimiAgent as SmithersKimiAgent, AmpAgent as SmithersAmpAgent, GeminiAgent as SmithersGeminiAgent } from "smithers-orchestrator";
+import { type AgentLike, ClaudeCodeAgent as SmithersClaudeCodeAgent, CodexAgent as SmithersCodexAgent, OpenCodeAgent as SmithersOpenCodeAgent, PiAgent as SmithersPiAgent, KimiAgent as SmithersKimiAgent, AmpAgent as SmithersAmpAgent, GeminiAgent as SmithersGeminiAgent } from "smthrs";
export const providers = {
claude: new SmithersClaudeCodeAgent({ model: "claude-opus-4-7", cwd: process.cwd() }),
diff --git a/docs/references/smithers/.smithers/components/CommandProbe.tsx b/docs/references/smithers/.smithers/components/CommandProbe.tsx
index 302b32d42..1390852f8 100644
--- a/docs/references/smithers/.smithers/components/CommandProbe.tsx
+++ b/docs/references/smithers/.smithers/components/CommandProbe.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Task } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Task } from "smthrs";
import { z } from "zod/v4";
export const commandProbeOutputSchema = z.looseObject({
diff --git a/docs/references/smithers/.smithers/components/FeatureEnum.tsx b/docs/references/smithers/.smithers/components/FeatureEnum.tsx
index 11438737e..0ff6c0580 100644
--- a/docs/references/smithers/.smithers/components/FeatureEnum.tsx
+++ b/docs/references/smithers/.smithers/components/FeatureEnum.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import FeatureEnumScanPrompt from "../prompts/feature-enum-scan.mdx";
import FeatureEnumRefinePrompt from "../prompts/feature-enum-refine.mdx";
diff --git a/docs/references/smithers/.smithers/components/ForEachFeature.tsx b/docs/references/smithers/.smithers/components/ForEachFeature.tsx
index 2aa0fe45a..aea1c6dda 100644
--- a/docs/references/smithers/.smithers/components/ForEachFeature.tsx
+++ b/docs/references/smithers/.smithers/components/ForEachFeature.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Parallel, Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Parallel, Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import FeatureTaskPrompt from "~/prompts/feature-task.mdx";
diff --git a/docs/references/smithers/.smithers/components/GrillMe.tsx b/docs/references/smithers/.smithers/components/GrillMe.tsx
index 4a39c629d..1c2ecb08c 100644
--- a/docs/references/smithers/.smithers/components/GrillMe.tsx
+++ b/docs/references/smithers/.smithers/components/GrillMe.tsx
@@ -1,5 +1,5 @@
-/** @jsxImportSource smithers-orchestrator */
-import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smthrs";
import { z } from "zod/v4";
import GrillMeSkill from "../prompts/grill-me.mdx";
import AskUserInstructions from "../prompts/ask-user-instructions.mdx";
diff --git a/docs/references/smithers/.smithers/components/LoopUntilScored.tsx b/docs/references/smithers/.smithers/components/LoopUntilScored.tsx
index 7420d7908..645ddb232 100644
--- a/docs/references/smithers/.smithers/components/LoopUntilScored.tsx
+++ b/docs/references/smithers/.smithers/components/LoopUntilScored.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Loop } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Loop } from "smthrs";
export type LoopUntilScoredProps = {
idPrefix: string;
diff --git a/docs/references/smithers/.smithers/components/Review.tsx b/docs/references/smithers/.smithers/components/Review.tsx
index f1b6584bb..a0ca0c44f 100644
--- a/docs/references/smithers/.smithers/components/Review.tsx
+++ b/docs/references/smithers/.smithers/components/Review.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Parallel, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Parallel, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import ReviewPrompt from "../prompts/review.mdx";
diff --git a/docs/references/smithers/.smithers/components/ShipTickets.tsx b/docs/references/smithers/.smithers/components/ShipTickets.tsx
index 49d5f3e97..76f58e32a 100644
--- a/docs/references/smithers/.smithers/components/ShipTickets.tsx
+++ b/docs/references/smithers/.smithers/components/ShipTickets.tsx
@@ -1,6 +1,6 @@
// smithers-source: authored
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Task, Worktree, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Task, Worktree, type AgentLike } from "smthrs";
import { readdirSync, readFileSync } from "node:fs";
import { resolve, relative } from "node:path";
import { z } from "zod/v4";
diff --git a/docs/references/smithers/.smithers/components/ValidationLoop.tsx b/docs/references/smithers/.smithers/components/ValidationLoop.tsx
index 69a919190..ac4e30753 100644
--- a/docs/references/smithers/.smithers/components/ValidationLoop.tsx
+++ b/docs/references/smithers/.smithers/components/ValidationLoop.tsx
@@ -1,6 +1,6 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Loop, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Loop, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
import { Review } from "~/components/Review";
import ImplementPrompt from "~/prompts/implement.mdx";
diff --git a/docs/references/smithers/.smithers/components/VerifiableGoals.tsx b/docs/references/smithers/.smithers/components/VerifiableGoals.tsx
index 26f495cdb..ac8c51f66 100644
--- a/docs/references/smithers/.smithers/components/VerifiableGoals.tsx
+++ b/docs/references/smithers/.smithers/components/VerifiableGoals.tsx
@@ -1,6 +1,6 @@
// smithers-source: authored
-/** @jsxImportSource smithers-orchestrator */
-import { Sequence, Task, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { Sequence, Task, type AgentLike } from "smthrs";
import { z } from "zod/v4";
// One verifiable goal per ticket: small enough to research→plan→implement in a
diff --git a/docs/references/smithers/.smithers/components/extract-prompt/ExtractPrompt.tsx b/docs/references/smithers/.smithers/components/extract-prompt/ExtractPrompt.tsx
index 462695b73..1eda612d3 100644
--- a/docs/references/smithers/.smithers/components/extract-prompt/ExtractPrompt.tsx
+++ b/docs/references/smithers/.smithers/components/extract-prompt/ExtractPrompt.tsx
@@ -1,12 +1,12 @@
// smithers-source: seeded
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import {
Sequence,
Task,
type AgentLike,
type OutputTarget,
-} from "smithers-orchestrator";
-import type { ScorersMap } from "@smithers-orchestrator/scorers";
+} from "smthrs";
+import type { ScorersMap } from "@smthrs/scorers";
import { LoopUntilScored } from "../LoopUntilScored";
import ExtractPromptInstructions from "../../prompts/extract-prompt.mdx";
import type { CachedPrompt, Stakes } from "./PromptCache";
diff --git a/docs/references/smithers/.smithers/components/extract-prompt/rctfCompletenessScorer.ts b/docs/references/smithers/.smithers/components/extract-prompt/rctfCompletenessScorer.ts
index 188f17242..b9354e722 100644
--- a/docs/references/smithers/.smithers/components/extract-prompt/rctfCompletenessScorer.ts
+++ b/docs/references/smithers/.smithers/components/extract-prompt/rctfCompletenessScorer.ts
@@ -1,5 +1,5 @@
-import { llmJudge } from "@smithers-orchestrator/scorers";
-import type { Scorer } from "@smithers-orchestrator/scorers";
+import { llmJudge } from "@smthrs/scorers";
+import type { Scorer } from "@smthrs/scorers";
export type RctfCompletenessScorerOptions = {
/** The judge agent. Must implement `generate({ prompt }) → string | { text }`. */
diff --git a/docs/references/smithers/.smithers/example.tsx b/docs/references/smithers/.smithers/example.tsx
index 81395fc37..3a181b392 100644
--- a/docs/references/smithers/.smithers/example.tsx
+++ b/docs/references/smithers/.smithers/example.tsx
@@ -1,5 +1,5 @@
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "./agents";
diff --git a/docs/references/smithers/.smithers/gateway.ts b/docs/references/smithers/.smithers/gateway.ts
index eae0597da..977236682 100644
--- a/docs/references/smithers/.smithers/gateway.ts
+++ b/docs/references/smithers/.smithers/gateway.ts
@@ -1,4 +1,4 @@
-import { Gateway, mdxPlugin } from "smithers-orchestrator";
+import { Gateway, mdxPlugin } from "smthrs";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { existsSync, readFileSync, readdirSync } from "node:fs";
diff --git a/docs/references/smithers/.smithers/package.json b/docs/references/smithers/.smithers/package.json
index 20f58b233..51c72f5de 100644
--- a/docs/references/smithers/.smithers/package.json
+++ b/docs/references/smithers/.smithers/package.json
@@ -13,8 +13,8 @@
"test:open-code-review": "bun test ./tests/open-code-review.test.ts ./tests/open-code-review-ui.e2e.test.ts"
},
"dependencies": {
- "@smithers-orchestrator/scorers": "workspace:*",
- "smithers-orchestrator": "workspace:*",
+ "@smthrs/scorers": "^0.33.0",
+ "smthrs": "^0.33.0",
"zod": "4.3.6"
},
"devDependencies": {
diff --git a/docs/references/smithers/.smithers/preload.ts b/docs/references/smithers/.smithers/preload.ts
index 04b77ae64..04dc24cf0 100644
--- a/docs/references/smithers/.smithers/preload.ts
+++ b/docs/references/smithers/.smithers/preload.ts
@@ -1,3 +1,3 @@
-import { mdxPlugin } from "smithers-orchestrator";
+import { mdxPlugin } from "smthrs";
mdxPlugin();
diff --git a/docs/references/smithers/.smithers/prompts/context-engineer-execute.mdx b/docs/references/smithers/.smithers/prompts/context-engineer-execute.mdx
index c72b482ee..33bd9dcfa 100644
--- a/docs/references/smithers/.smithers/prompts/context-engineer-execute.mdx
+++ b/docs/references/smithers/.smithers/prompts/context-engineer-execute.mdx
@@ -39,7 +39,7 @@ what it reported — continue from there rather than restarting.
- If the route is `single_task` or `skills`: do the work directly with your
tools, loading the route's `selectedSkills` where helpful.
- If the route is `workflow`: dispatch the chosen `selectedWorkflow` (e.g.
- `bunx smithers-orchestrator workflow run --input '{...}'`) and report what
+ `bunx smthrs workflow run --input '{...}'`) and report what
you dispatched and how to watch it.
- If the route is `manual`: do not force the work — summarize exactly what a human
must do and mark the relevant gate's evidence as pending.
diff --git a/docs/references/smithers/.smithers/prompts/context-engineer-inventory.mdx b/docs/references/smithers/.smithers/prompts/context-engineer-inventory.mdx
index 9b68c30d0..6154f6a12 100644
--- a/docs/references/smithers/.smithers/prompts/context-engineer-inventory.mdx
+++ b/docs/references/smithers/.smithers/prompts/context-engineer-inventory.mdx
@@ -27,7 +27,7 @@ Local workflows directory: {props.workflowsDir}
- Look at the repo: read `README`/`CLAUDE.md`/top-level layout to learn what this
project is and what conventions apply.
- Inventory tools: which commands and capabilities are actually available to do
- this work (build/test runners, CLIs, `bunx smithers-orchestrator ...`).
+ this work (build/test runners, CLIs, `bunx smthrs ...`).
- Inventory skills: list `{props.skillsDir}` and note the skills relevant to this
script in `availableSkills`.
- Inventory workflows: glance at `{props.workflowsDir}` for durable workflows the
diff --git a/docs/references/smithers/.smithers/prompts/create-workflow-document.mdx b/docs/references/smithers/.smithers/prompts/create-workflow-document.mdx
index ea6a7b1b8..617053d8d 100644
--- a/docs/references/smithers/.smithers/prompts/create-workflow-document.mdx
+++ b/docs/references/smithers/.smithers/prompts/create-workflow-document.mdx
@@ -30,7 +30,7 @@ The body must tell an agent:
1. What the workflow does and when to use it (1–2 sentences).
2. Its inputs — especially `prompt` and any typed knobs from the design.
3. How to start it:
- `bunx smithers-orchestrator workflow run {props.workflowName} --prompt "…"`
+ `bunx smthrs workflow run {props.workflowName} --prompt "…"`
(or `--input '{…}'` for structured inputs).
4. How to run it detached and watch it: `-d` to detach, then
`smithers ps`, `smithers logs -f`, `smithers inspect `.
diff --git a/docs/references/smithers/.smithers/prompts/create-workflow-fix.mdx b/docs/references/smithers/.smithers/prompts/create-workflow-fix.mdx
index bf7b6b926..ac08264f7 100644
--- a/docs/references/smithers/.smithers/prompts/create-workflow-fix.mdx
+++ b/docs/references/smithers/.smithers/prompts/create-workflow-fix.mdx
@@ -12,7 +12,7 @@ make it load. You have file + shell tools.
## Verify command that failed
-`bunx smithers-orchestrator graph {props.workflowFile}`
+`bunx smthrs graph {props.workflowFile}`
## Errors
@@ -35,9 +35,9 @@ make it load. You have file + shell tools.
is duplicated, or a control-flow component is missing a required prop
(`Loop` needs `until`; `Approval` needs `request`).
3. Make the smallest change that fixes the error without abandoning the design.
- If the docs would help, run `bunx smithers-orchestrator docs` or
- `bunx smithers-orchestrator ask ""`.
-4. Re-run `bunx smithers-orchestrator graph {props.workflowFile}` yourself to
+ If the docs would help, run `bunx smthrs docs` or
+ `bunx smthrs ask ""`.
+4. Re-run `bunx smthrs graph {props.workflowFile}` yourself to
confirm it now exits 0 before you finish.
Do not delete the workflow or stub it out to "pass" — fix the real problem.
diff --git a/docs/references/smithers/.smithers/prompts/create-workflow-provision.mdx b/docs/references/smithers/.smithers/prompts/create-workflow-provision.mdx
index 475834c04..aa0886e31 100644
--- a/docs/references/smithers/.smithers/prompts/create-workflow-provision.mdx
+++ b/docs/references/smithers/.smithers/prompts/create-workflow-provision.mdx
@@ -23,13 +23,13 @@ Local workflows directory: {props.workflowsDir}
The docs are progressively disclosed as `llms-*.txt` fragments — load only what
this workflow needs, not the whole bundle.
-- `bunx smithers-orchestrator docs` — the concise `llms.txt` index.
+- `bunx smthrs docs` — the concise `llms.txt` index.
- Then pull the fragments that match this workflow's shape, e.g.
`llms-core.txt` (runtime, JSX surface, CLI, components, recipes) is almost
always relevant; add `llms-memory.txt`, `llms-openapi.txt`,
`llms-observability.txt` (HTTP/gateway/MCP/OTel), `llms-integrations.txt`
(agent runtimes, tools), or `llms-events.txt` only if the spec calls for them.
-- `bunx smithers-orchestrator ask ""` for anything specific
+- `bunx smthrs ask ""` for anything specific
(e.g. "how do I add a human approval gate?", "how does Ralph decide to stop?").
Record each fragment you pulled and why in `docsFragments`.
@@ -61,7 +61,7 @@ their agent dirs.
- Decide which skills this workflow's tasks need given its domain (e.g. a deploy
workflow → infra/k8s skills; a docs workflow → a docs skill; almost any
authoring/orchestration workflow benefits from the `smithers` skill itself).
-- Install the missing ones with `bunx smithers-orchestrator skills add `
+- Install the missing ones with `bunx smthrs skills add `
(this syncs them into the agent skill dirs). Mark those `installed`.
- If a needed skill genuinely does not exist yet, mark it `recommended` and say
what it should cover — the design step can note it as a follow-up.
diff --git a/docs/references/smithers/.smithers/prompts/create-workflow-scaffold.mdx b/docs/references/smithers/.smithers/prompts/create-workflow-scaffold.mdx
index 5b27aa511..b5207d751 100644
--- a/docs/references/smithers/.smithers/prompts/create-workflow-scaffold.mdx
+++ b/docs/references/smithers/.smithers/prompts/create-workflow-scaffold.mdx
@@ -20,15 +20,15 @@ own `.mdx` file, one per prompt named in the design.
1. **Start from the closest example** named in the provisioning manifest — copy
its structure, then adapt. Don't invent API; if unsure, re-read the example or
- `bunx smithers-orchestrator docs`.
+ `bunx smthrs docs`.
2. **Workflow file header** — begin with the two seed comments and the JSX pragma,
exactly like the other workflows in `{props.workflowsDir}`:
```
// smithers-source: seeded
// smithers-display-name:
- /** @jsxImportSource smithers-orchestrator */
+ /** @jsxImportSource smthrs */
```
-3. **Imports** — `import { createSmithers } from "smithers-orchestrator"`,
+3. **Imports** — `import { createSmithers } from "smthrs"`,
`import { z } from "zod/v4"`, `import { agents } from "../agents"`, any
components from `../components`, and each prompt from `../prompts/.mdx`.
4. **Schemas** — define the Zod input schema and one schema per task output.
diff --git a/docs/references/smithers/.smithers/prompts/extract-skill-analyze.mdx b/docs/references/smithers/.smithers/prompts/extract-skill-analyze.mdx
index 9cdebb633..4fa5d219e 100644
--- a/docs/references/smithers/.smithers/prompts/extract-skill-analyze.mdx
+++ b/docs/references/smithers/.smithers/prompts/extract-skill-analyze.mdx
@@ -17,9 +17,9 @@ If a run id is given (the `Run id` above), you have file and shell tools — ins
the real run state before deciding, substituting that id for `RUN_ID` below. Read
it, do not guess:
-- `bunx smithers-orchestrator inspect RUN_ID` for the full run state (steps, agents, outputs).
-- `bunx smithers-orchestrator events RUN_ID --limit 200` for the event history.
-- `bunx smithers-orchestrator node NODE_ID --run-id RUN_ID` for a specific node's tool calls and output.
+- `bunx smthrs inspect RUN_ID` for the full run state (steps, agents, outputs).
+- `bunx smthrs events RUN_ID --limit 200` for the event history.
+- `bunx smthrs node NODE_ID --run-id RUN_ID` for a specific node's tool calls and output.
These are read-only. Do NOT start, cancel, fork, or graph any run — another step
owns that. If no run id is given, work purely from the prompt and context above.
diff --git a/docs/references/smithers/.smithers/prompts/smoketest.mdx b/docs/references/smithers/.smithers/prompts/smoketest.mdx
index 13a23c5ab..7a174fa8b 100644
--- a/docs/references/smithers/.smithers/prompts/smoketest.mdx
+++ b/docs/references/smithers/.smithers/prompts/smoketest.mdx
@@ -1,10 +1,10 @@
# Smoke Test
-You are running a **release smoke test** for the `smithers-orchestrator`
+You are running a **release smoke test** for the `smthrs`
npm package. Your job is to prove that a user who has never touched
Smithers can install it and exercise the feature set — and that every
claim in the changelog below actually holds against the published
-`smithers-orchestrator@{props.version}` on npm.
+`smthrs@{props.version}` on npm.
## Version under test
@@ -27,14 +27,14 @@ looking for it elsewhere — this text is the source of truth.
1. Before doing anything else, clear caches so you're testing the
registry, not a stale copy:
- `bun pm cache rm`
- - macOS: `rm -rf $(echo $TMPDIR)bunx-*smithers-orchestrator*`
- (or check `/var/folders/**/T/bunx-*smithers-orchestrator*`).
- - Linux / other: `rm -rf $TMPDIR/bunx-*smithers-orchestrator*`.
+ - macOS: `rm -rf $(echo $TMPDIR)bunx-*smthrs*`
+ (or check `/var/folders/**/T/bunx-*smthrs*`).
+ - Linux / other: `rm -rf $TMPDIR/bunx-*smthrs*`.
2. Create a fresh scratch directory outside any existing project:
`SMOKE_DIR=$(mktemp -d)/smoketest && mkdir -p "$SMOKE_DIR" && cd
"$SMOKE_DIR"`. Never reuse an existing folder. Never work in the
monorepo itself.
-3. Run `bunx smithers-orchestrator@latest init` from the scratch
+3. Run `bunx smthrs@latest init` from the scratch
directory. Capture stdout/stderr.
## Baseline tests — run these every time
@@ -42,18 +42,18 @@ looking for it elsewhere — this text is the source of truth.
Do each, record pass/fail with evidence (exact command, exit code,
relevant output lines):
-- `bunx smithers-orchestrator@latest init` succeeds on a fresh folder.
+- `bunx smthrs@latest init` succeeds on a fresh folder.
Confirm `.smithers/package.json` exists, `.smithers/workflows/`
contains workflow files, and the `install` result reports
`status: ok` (i.e. `bun install` ran inside `.smithers/`).
- `.smithers/node_modules/skills/` exists with at least one
`/SKILL.md` inside — proving the `github:mattpocock/skills`
dep was fetched (runtime auto-install can't do that).
-- Both `$(echo $TMPDIR)bunx-*smithers-orchestrator*/node_modules/.bin/smithers`
+- Both `$(echo $TMPDIR)bunx-*smthrs*/node_modules/.bin/smithers`
AND `.smithers/node_modules/.bin/smithers` symlink to
- `smithers-orchestrator/src/bin/smithers.js` (not
- `@smithers-orchestrator/cli/src/index.js`). Use `readlink`.
-- `bunx smithers-orchestrator@latest workflow grill-me` loads without
+ `smthrs/src/bin/smithers.js` (not
+ `@smthrs/cli/src/index.js`). Use `readlink`.
+- `bunx smthrs@latest workflow grill-me` loads without
crashing. The agent call itself is allowed to fail for unrelated
reasons (API auth, scorer schema errors). What matters is that you
see `workflowName=grill-me` and `→ grill-me:grill (attempt 1,
@@ -71,7 +71,7 @@ relevant output lines):
For every bullet under `## Fixes` or `## Features` in the changelog
embedded above, construct a minimal reproduction of the *original* bug
and verify it no longer reproduces on
-`smithers-orchestrator@{props.version}`. Common patterns:
+`smthrs@{props.version}`. Common patterns:
- Fix says a dependency was missing from a generated file → open the
file after `init` and grep for the dep.
diff --git a/docs/references/smithers/.smithers/prompts/triage-run-recommend.mdx b/docs/references/smithers/.smithers/prompts/triage-run-recommend.mdx
index d50122c30..9256a7bb0 100644
--- a/docs/references/smithers/.smithers/prompts/triage-run-recommend.mdx
+++ b/docs/references/smithers/.smithers/prompts/triage-run-recommend.mdx
@@ -22,20 +22,20 @@ Run id: {props.runId}
- **fix** — the run failed because of a real bug in the code or the workflow
(a task errored, a command exited non-zero, an output failed validation). The
underlying defect must be changed before the run can succeed. The `command`
- should point at the follow-up (for example a `bunx smithers-orchestrator node
+ should point at the follow-up (for example a `bunx smthrs node
` to inspect the failing node, then an edit-and-`retry-task`).
- **rewind** — earlier frames were fine but the run went off the rails after a
specific point; roll back to a known-good frame with
- `bunx smithers-orchestrator rewind ` (target the frame just before the
+ `bunx smthrs rewind ` (target the frame just before the
failure).
- **retry** — the failure looks transient (a flaky agent, a heartbeat timeout, a
rate limit) and re-running the failing node should clear it:
- `bunx smithers-orchestrator retry-task --node `.
+ `bunx smthrs retry-task --node `.
- **escalate** — the run is *stuck* waiting on a human (an `Approval` or
`HumanTask`), or the right call is genuinely a judgement a person must make.
The `command` should clear or surface the gate (for example
- `bunx smithers-orchestrator approve --node ` or
- `bunx smithers-orchestrator human inbox`).
+ `bunx smthrs approve --node ` or
+ `bunx smthrs human inbox`).
## Produce
diff --git a/docs/references/smithers/.smithers/scripts/ultragrill.ts b/docs/references/smithers/.smithers/scripts/ultragrill.ts
index beb7b9729..cc9560b95 100644
--- a/docs/references/smithers/.smithers/scripts/ultragrill.ts
+++ b/docs/references/smithers/.smithers/scripts/ultragrill.ts
@@ -8,7 +8,7 @@
* your browser, and stays alive until you Ctrl-C. The worker is a real agent
* working directly in this repo (shared-repo model), so it will read/edit files.
*/
-import { Gateway, mdxPlugin } from "smithers-orchestrator";
+import { Gateway, mdxPlugin } from "smthrs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { spawn } from "node:child_process";
diff --git a/docs/references/smithers/.smithers/specs/cloud-execution-engineering.md b/docs/references/smithers/.smithers/specs/cloud-execution-engineering.md
index a18c7df12..d54f866e3 100644
--- a/docs/references/smithers/.smithers/specs/cloud-execution-engineering.md
+++ b/docs/references/smithers/.smithers/specs/cloud-execution-engineering.md
@@ -243,11 +243,11 @@ In Kubernetes, worker pods discover the orchestrator via a Service:
apiVersion: v1
kind: Service
metadata:
- name: smithers-orchestrator
+ name: smthrs
namespace: smithers-system
spec:
selector:
- app: smithers-orchestrator
+ app: smthrs
ports:
- name: gateway
port: 3000
@@ -255,7 +255,7 @@ spec:
port: 3001
```
-Workers set `SMITHERS_ORCHESTRATOR_URL=http://smithers-orchestrator:3001`.
+Workers set `SMITHERS_ORCHESTRATOR_URL=http://smthrs:3001`.
### Task Serialization
@@ -348,10 +348,10 @@ import { $ } from "bun";
const tag = process.env.IMAGE_TAG ?? "latest";
-await $`docker build --target orchestrator -t smithers-orchestrator:${tag} .`;
+await $`docker build --target orchestrator -t smthrs:${tag} .`;
await $`docker build --target worker -t smithers-worker:${tag} .`;
-console.log(`Built smithers-orchestrator:${tag} and smithers-worker:${tag}`);
+console.log(`Built smthrs:${tag} and smithers-worker:${tag}`);
```
### Alternative: Init Container (no custom image)
@@ -463,21 +463,21 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
- name: smithers-orchestrator
+ name: smthrs
namespace: smithers-system
spec:
replicas: 1
selector:
matchLabels:
- app: smithers-orchestrator
+ app: smthrs
template:
metadata:
labels:
- app: smithers-orchestrator
+ app: smthrs
spec:
containers:
- name: orchestrator
- image: smithers-orchestrator:latest
+ image: smthrs:latest
ports:
- name: gateway
containerPort: 3000
@@ -513,11 +513,11 @@ spec:
apiVersion: v1
kind: Service
metadata:
- name: smithers-orchestrator
+ name: smthrs
namespace: smithers-system
spec:
selector:
- app: smithers-orchestrator
+ app: smthrs
ports:
- name: gateway
port: 3000
@@ -554,7 +554,7 @@ spec:
- name: SMITHERS_ROLE
value: worker
- name: SMITHERS_ORCHESTRATOR_URL
- value: http://smithers-orchestrator.smithers-system.svc.cluster.local:3001
+ value: http://smthrs.smithers-system.svc.cluster.local:3001
envFrom:
- secretRef:
name: smithers-api-keys
@@ -590,7 +590,7 @@ metadata:
spec:
type: LoadBalancer
selector:
- app: smithers-orchestrator
+ app: smthrs
ports:
- name: http
port: 80
@@ -836,7 +836,7 @@ async function deploy() {
await $`bun run scripts/build.ts`;
// Load into minikube
- await $`minikube image load smithers-orchestrator:latest`;
+ await $`minikube image load smthrs:latest`;
await $`minikube image load smithers-worker:latest`;
// Apply manifests
@@ -852,7 +852,7 @@ async function deploy() {
await $`kubectl apply -f k8s/gateway.yaml`;
// Wait for orchestrator
- await $`kubectl wait --for=condition=ready pod -l app=smithers-orchestrator -n smithers-system --timeout=120s`;
+ await $`kubectl wait --for=condition=ready pod -l app=smthrs -n smithers-system --timeout=120s`;
const url = await $`minikube service smithers-gateway -n smithers-system --url`.text();
console.log(`Gateway available at: ${url.trim()}`);
@@ -949,7 +949,7 @@ JJHub may need updates to support the worker model described here. Specifically:
[Fabrik](https://github.com/SamuelLHuber/local-isolated-ralph) by
[Samuel Huber](https://github.com/SamuelLHuber) (dTech.vision) is an existing
-K3s-based Kubernetes layer for Smithers. It has `smithers-orchestrator` as a
+K3s-based Kubernetes layer for Smithers. It has `smthrs` as a
direct dependency and takes a fundamentally different architecture.
### Fabrik Architecture
diff --git a/docs/references/smithers/.smithers/specs/cloud-execution-product.md b/docs/references/smithers/.smithers/specs/cloud-execution-product.md
index 415760efb..e35b92295 100644
--- a/docs/references/smithers/.smithers/specs/cloud-execution-product.md
+++ b/docs/references/smithers/.smithers/specs/cloud-execution-product.md
@@ -146,7 +146,7 @@ minikube image load smithers-example:latest
kubectl apply -f k8s/
# Watch it run
-kubectl logs -f deployment/smithers-orchestrator
+kubectl logs -f deployment/smthrs
# Access the Gateway
minikube service smithers-gateway --url
@@ -223,7 +223,7 @@ Environment variables in `k8s/secrets.yaml`:
Your workflow code is identical to local Smithers:
```tsx
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, Workflow, Task, outputs } = createSmithers({
diff --git a/docs/references/smithers/.smithers/specs/devtools-prd.md b/docs/references/smithers/.smithers/specs/devtools-prd.md
index aecf9225f..386a1974a 100644
--- a/docs/references/smithers/.smithers/specs/devtools-prd.md
+++ b/docs/references/smithers/.smithers/specs/devtools-prd.md
@@ -26,7 +26,7 @@ Both surfaces consume the same data from the same backend (HTTP API, SSE streams
## Package Architecture
-Smithers DevTools ships as a separate internal package (`@smithers-orchestrator/devtools`) that is a dependency of the main `smithers-orchestrator` package. From the user's perspective, devtools is included out of the box — no additional install step.
+Smithers DevTools ships as a separate internal package (`@smthrs/devtools`) that is a dependency of the main `smthrs` package. From the user's perspective, devtools is included out of the box — no additional install step.
## Core Experience
@@ -161,7 +161,7 @@ Each agent type stores conversation transcripts in its own format and location.
- **Antigravity CLI**: reads from Antigravity's conversation storage
- **Custom agents**: extensible adapter interface so users can add support for their own agent types
-The adapter interface is part of the `@smithers-orchestrator/devtools` package API, allowing third-party agent integrations to provide their own chat log reader.
+The adapter interface is part of the `@smthrs/devtools` package API, allowing third-party agent integrations to provide their own chat log reader.
## Connectivity
diff --git a/docs/references/smithers/.smithers/specs/extract-prompt-design.md b/docs/references/smithers/.smithers/specs/extract-prompt-design.md
index dbdc88010..b3622cccf 100644
--- a/docs/references/smithers/.smithers/specs/extract-prompt-design.md
+++ b/docs/references/smithers/.smithers/specs/extract-prompt-design.md
@@ -45,8 +45,8 @@ References: see *Sources* at the bottom.
### ``
```ts
-import type { AgentLike, OutputTarget } from "smithers-orchestrator";
-import type { Scorer } from "@smithers-orchestrator/scorers";
+import type { AgentLike, OutputTarget } from "smthrs";
+import type { Scorer } from "@smthrs/scorers";
import type { PromptCache } from "./extract-prompt/PromptCache";
type ExtractPromptProps = {
diff --git a/docs/references/smithers/.smithers/specs/hmr-design.md b/docs/references/smithers/.smithers/specs/hmr-design.md
index d4e20594b..9a3dae3a4 100644
--- a/docs/references/smithers/.smithers/specs/hmr-design.md
+++ b/docs/references/smithers/.smithers/specs/hmr-design.md
@@ -192,8 +192,8 @@ components/workflow.tsx ← the root workflow component
├── ./focuses.ts ← list of work categories
├── ./focusDirs.ts ← directory mappings
├── ./focusTestSuites.ts ← test suite mappings
- ├── @smithers-orchestrator/super-ralph ← smithers package (stable, not user code)
- └── smithers-orchestrator ← smithers core (stable, not user code)
+ ├── @smthrs/super-ralph ← smithers package (stable, not user code)
+ └── smthrs ← smithers core (stable, not user code)
```
The user frequently wants to change:
@@ -274,7 +274,7 @@ Bun supports this same `import.meta.hot` API in `Bun.serve()` with `development:
- A way to read prompt files that are automatically watched? e.g., `useFile("./prompts/planning.md")`
- Or is just re-importing the module enough?
-8. **Scope of watched files**: The workflow imports smithers-orchestrator and super-ralph packages. These are **library code** and should NOT be watched (just like Vite doesn't watch `node_modules/`). Only the user's workflow files should be watched. How do we distinguish?
+8. **Scope of watched files**: The workflow imports smthrs and super-ralph packages. These are **library code** and should NOT be watched (just like Vite doesn't watch `node_modules/`). Only the user's workflow files should be watched. How do we distinguish?
9. **Error handling**: What happens if the user saves a file with a syntax error?
- The old workflow should keep running
diff --git a/docs/references/smithers/.smithers/specs/smithers-gateway-sdk-migration.md b/docs/references/smithers/.smithers/specs/smithers-gateway-sdk-migration.md
index 0855c18b5..1cf0a1057 100644
--- a/docs/references/smithers/.smithers/specs/smithers-gateway-sdk-migration.md
+++ b/docs/references/smithers/.smithers/specs/smithers-gateway-sdk-migration.md
@@ -2,8 +2,8 @@
This slice moves the apps/smithers PWA off its hand-written gateway RPC helper
(`src/gateway/gatewayRpc.ts`) and 3-second `setInterval` polls onto the
-first-class SDK packages — `@smithers-orchestrator/gateway-client` and (where
-React hooks make sense) `@smithers-orchestrator/gateway-react`.
+first-class SDK packages — `@smthrs/gateway-client` and (where
+React hooks make sense) `@smthrs/gateway-react`.
## What changed
@@ -84,7 +84,7 @@ RPC-frame `Unauthorized` errors arrive as a `GatewayRpcError` and the store's
## Out of scope
- Migrating `WorkflowRunUi` / `GatewayRunInspector` to `useGatewayRun` /
- `useGatewayRunEvents` from `@smithers-orchestrator/gateway-react` is a
+ `useGatewayRunEvents` from `@smthrs/gateway-react` is a
separate slice (slice B). The store/SDK boundary is enough to remove the
polling loop and fix the `launchRun` bug today.
- Mounting `SmithersGatewayProvider` at the app root + a hooks-only inspector
diff --git a/docs/references/smithers/.smithers/specs/smithers-init-command-design.md b/docs/references/smithers/.smithers/specs/smithers-init-command-design.md
index 20f331837..546452c62 100644
--- a/docs/references/smithers/.smithers/specs/smithers-init-command-design.md
+++ b/docs/references/smithers/.smithers/specs/smithers-init-command-design.md
@@ -13,8 +13,8 @@ This document proposes a simpler local-first Smithers experience centered on:
The key product insight is that users mostly want a ready-made folder of workflows they can use immediately and edit later if they choose. The hello-world path should feel like:
```bash
-bunx smithers-orchestrator init
-bunx smithers-orchestrator workflow implement --prompt "Commit the .smithers folder created with smithers init"
+bunx smthrs init
+bunx smthrs workflow implement --prompt "Commit the .smithers folder created with smithers init"
```
## Goals
@@ -201,14 +201,14 @@ Why this shape:
Recommended command surface:
```bash
-bunx smithers-orchestrator init
-bunx smithers-orchestrator workflow # same as workflow list
-bunx smithers-orchestrator workflow list
-bunx smithers-orchestrator workflow
-bunx smithers-orchestrator workflow run
-bunx smithers-orchestrator workflow create
-bunx smithers-orchestrator workflow path
-bunx smithers-orchestrator workflow doctor []
+bunx smthrs init
+bunx smthrs workflow # same as workflow list
+bunx smthrs workflow list
+bunx smthrs workflow
+bunx smthrs workflow run
+bunx smthrs workflow create
+bunx smthrs workflow path
+bunx smthrs workflow doctor []
```
Behavior:
@@ -259,7 +259,7 @@ The generated `.smithers/` directory should be a real Bun workspace package.
Recommended dependency policy:
- runtime dependencies
- - `smithers-orchestrator`
+ - `smthrs`
- `zod`
- dev dependencies
- `typescript`
@@ -427,7 +427,7 @@ Implements a single ticket from:
Discovers or reads multiple tickets from:
- local markdown files under `.smithers/tickets/*.md`
-- Linear via custom tools or MCP-backed agent integrations, not a core `smithers-orchestrator/linear` export
+- Linear via custom tools or MCP-backed agent integrations, not a core `smthrs/linear` export
- GitHub issues via `gh` CLI or HTTP integration
Important design note:
diff --git a/docs/references/smithers/.smithers/specs/smithers-sync-sdk.md b/docs/references/smithers/.smithers/specs/smithers-sync-sdk.md
index c68681b33..5519fa967 100644
--- a/docs/references/smithers/.smithers/specs/smithers-sync-sdk.md
+++ b/docs/references/smithers/.smithers/specs/smithers-sync-sdk.md
@@ -119,11 +119,11 @@ key namespace.
The SDK lives in the two existing gateway packages so embedded workflow UIs
get the same surface in-tree code does without reaching into apps/smithers:
-- `@smithers-orchestrator/gateway-client` — vanilla core: `SyncKey`,
+- `@smthrs/gateway-client` — vanilla core: `SyncKey`,
`SyncCache`, `SyncSubscriptionHub`, `SyncClient`, `SyncTransport`,
`SyncBackoff`, `gatewayKeys`, and `createSmithersGatewayTransport` which
wires `SmithersGatewayClient`'s resilient stream generators in.
-- `@smithers-orchestrator/gateway-react` — React surface: `SyncProvider`,
+- `@smthrs/gateway-react` — React surface: `SyncProvider`,
`useSyncClient`, `useSyncQuery`, `useSyncMutation`, `useSyncSubscription`,
and the typed gateway shortcuts (`useGatewayQuery`, `useGatewayMutation`,
`useGatewayRunStream`).
@@ -147,7 +147,7 @@ the existing store onto SDK primitives is out of scope for slice C.
A workflow UI mounted at `/workflows/` can either:
-- import from `@smithers-orchestrator/gateway-react` (in-tree or embedded UIs)
+- import from `@smthrs/gateway-react` (in-tree or embedded UIs)
- pass a `SyncTransport` of its own (third-party UIs that talk to their own
RPC over postMessage to the host iframe)
diff --git a/docs/references/smithers/.smithers/specs/ui-feature-planning-prompt.md b/docs/references/smithers/.smithers/specs/ui-feature-planning-prompt.md
index 06ef6eaa0..7b9b008eb 100644
--- a/docs/references/smithers/.smithers/specs/ui-feature-planning-prompt.md
+++ b/docs/references/smithers/.smithers/specs/ui-feature-planning-prompt.md
@@ -49,7 +49,7 @@ Your job: produce a **step-by-step implementation plan**: architecture decisions
| Package | Role |
|---|---|
-| `smithers` | Public facade (`smithers-orchestrator` on npm). `createSmithers`, JSX runtime, `mdx-plugin`. |
+| `smithers` | Public facade (`smthrs` on npm). `createSmithers`, JSX runtime, `mdx-plugin`. |
| `components` | 50+ React components: `Workflow`, `Task`, `Sequence`, `Parallel`, `Branch`, `Loop`, `Ralph`, `Approval`, `Sandbox`, `Signal`, `Timer`, `HumanTask`, `Saga`, `Kanban`, `Debate`, `ReviewLoop`, etc. |
| `react-reconciler` | Custom React reconciler that renders JSX into Smithers host trees (NOT DOM). Also contains a DOM adapter used only for devtools. |
| `driver` | Workflow driver, `SmithersCtx`, task runner, decision actor. Pure logic (no HTTP). |
@@ -72,8 +72,8 @@ Your job: produce a **step-by-step implementation plan**: architecture decisions
### Path aliases (`tsconfig.json`)
-- `smithers-orchestrator` → `packages/smithers/src/index.js`
-- `@smithers-orchestrator/*` → `packages/*/src/index.js` (or sub-paths)
+- `smthrs` → `packages/smithers/src/index.js`
+- `@smthrs/*` → `packages/*/src/index.js` (or sub-paths)
- All 21 sibling packages aliased. User code always imports via these aliases, never relative paths across packages.
### Organization rules (from user's standing preferences — memory notes)
@@ -260,9 +260,9 @@ type SmithersWorkflow = {
```js
#!/usr/bin/env bun
-import { ... } from "@smithers-orchestrator/engine";
-import { mdxPlugin } from "smithers-orchestrator/mdx-plugin";
-import { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import { ... } from "@smthrs/engine";
+import { mdxPlugin } from "smthrs/mdx-plugin";
+import { SmithersDb } from "@smthrs/db/adapter";
async function loadWorkflowAsync(path) {
const abs = resolve(process.cwd(), path);
@@ -341,7 +341,7 @@ Key Effect packages already present: `effect` v3.21.1, `@effect/sql`, `@effect/s
"moduleResolution": "bundler",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator", // <-- !!
+ "jsxImportSource": "smthrs", // <-- !!
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"strict": true
@@ -349,7 +349,7 @@ Key Effect packages already present: `effect` v3.21.1, `@effect/sql`, `@effect/s
}
```
-**The JSX gotcha you must solve**: smithers sets `jsxImportSource: "smithers-orchestrator"` globally, which points JSX at `packages/smithers/src/jsx-runtime.js`. That runtime is written for the Smithers reconciler (workflow graph), not DOM. The UI app needs **standard React JSX** (DOM). Options the planner must weigh:
+**The JSX gotcha you must solve**: smithers sets `jsxImportSource: "smthrs"` globally, which points JSX at `packages/smithers/src/jsx-runtime.js`. That runtime is written for the Smithers reconciler (workflow graph), not DOM. The UI app needs **standard React JSX** (DOM). Options the planner must weigh:
1. Per-directory / per-file `@jsxImportSource react` override for UI files.
2. A separate `tsconfig.ui.json` for the UI directory.
@@ -367,11 +367,11 @@ Key Effect packages already present: `effect` v3.21.1, `@effect/sql`, `@effect/s
`examples/code-review-loop.jsx`:
```jsx
-import { Sequence, Ralph } from "smithers-orchestrator";
+import { Sequence, Ralph } from "smthrs";
import { createExampleSmithers } from "./_example-kit.js";
import { ToolLoopAgent as Agent, Output } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { read, bash, grep } from "smithers-orchestrator/tools";
+import { read, bash, grep } from "smthrs/tools";
import { z } from "zod";
import ReviewPrompt from "./prompts/code-review-loop/review.mdx";
import FixPrompt from "./prompts/code-review-loop/fix.mdx";
@@ -528,7 +528,7 @@ A non-exhaustive list of decisions the planner must make explicit. Present each
11. **Errors & boundaries**
- UI render failures must not crash the workflow engine.
- - Pipe UI-surface errors through `@smithers-orchestrator/errors` tagged-error patterns.
+ - Pipe UI-surface errors through `@smthrs/errors` tagged-error patterns.
12. **Testing story**
- Bun test for server SSR rendering.
diff --git a/docs/references/smithers/.smithers/tests/openCodeReviewRunFixture.ts b/docs/references/smithers/.smithers/tests/openCodeReviewRunFixture.ts
index e43c736a0..28cd859c7 100644
--- a/docs/references/smithers/.smithers/tests/openCodeReviewRunFixture.ts
+++ b/docs/references/smithers/.smithers/tests/openCodeReviewRunFixture.ts
@@ -1,5 +1,5 @@
-import { Gateway, mdxPlugin } from "smithers-orchestrator";
-import type { AgentLike } from "smithers-orchestrator";
+import { Gateway, mdxPlugin } from "smthrs";
+import type { AgentLike } from "smthrs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
diff --git a/docs/references/smithers/.smithers/tests/ship-pipeline-ui.e2e.test.tsx b/docs/references/smithers/.smithers/tests/ship-pipeline-ui.e2e.test.tsx
index cb101578b..dbed38638 100644
--- a/docs/references/smithers/.smithers/tests/ship-pipeline-ui.e2e.test.tsx
+++ b/docs/references/smithers/.smithers/tests/ship-pipeline-ui.e2e.test.tsx
@@ -1,11 +1,11 @@
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { afterAll, beforeAll, expect, test } from "bun:test";
import { mkdtempSync, rmSync } from "node:fs";
import { createServer } from "node:net";
import { tmpdir } from "node:os";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
-import { createSmithers, Gateway, Sequence } from "smithers-orchestrator";
+import { createSmithers, Gateway, Sequence } from "smthrs";
import { z } from "zod/v4";
/**
diff --git a/docs/references/smithers/.smithers/tests/shipPipelineRunFixture.ts b/docs/references/smithers/.smithers/tests/shipPipelineRunFixture.ts
index 4afafee30..e10bbe3bd 100644
--- a/docs/references/smithers/.smithers/tests/shipPipelineRunFixture.ts
+++ b/docs/references/smithers/.smithers/tests/shipPipelineRunFixture.ts
@@ -4,7 +4,7 @@
// renders the real run. Spawned by ship-pipeline-run.e2e.test.tsx with cwd set to a
// throwaway git repo (so the worktrees + ticket files land there, and bun
// resolves modules from the real tree rather than a stale global cache).
-import { Gateway, mdxPlugin } from "smithers-orchestrator";
+import { Gateway, mdxPlugin } from "smthrs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
diff --git a/docs/references/smithers/.smithers/tests/ultragrillRunFixture.ts b/docs/references/smithers/.smithers/tests/ultragrillRunFixture.ts
index ae68a134a..5da88882c 100644
--- a/docs/references/smithers/.smithers/tests/ultragrillRunFixture.ts
+++ b/docs/references/smithers/.smithers/tests/ultragrillRunFixture.ts
@@ -3,7 +3,7 @@
// session over real RPC (submitSignal utterances → worker dispatch → end).
// Spawned by ultragrill.e2e.test with cwd set to a throwaway dir and a fake
// `claude` on PATH so the worker resolves deterministically.
-import { Gateway, SmithersDb, mdxPlugin } from "smithers-orchestrator";
+import { Gateway, SmithersDb, mdxPlugin } from "smthrs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
diff --git a/docs/references/smithers/.smithers/tickets/0003-6larp-assessment.md b/docs/references/smithers/.smithers/tickets/0003-6larp-assessment.md
index 0836dcc50..a89ad4fbb 100644
--- a/docs/references/smithers/.smithers/tickets/0003-6larp-assessment.md
+++ b/docs/references/smithers/.smithers/tickets/0003-6larp-assessment.md
@@ -25,6 +25,6 @@ Objective: critically evaluate whether shipped code is real or performative, the
- [x] Run package-level tests for touched packages.
- [x] Run `apps/smithers-demo` tests and build after dependency-manifest fix.
- [x] Run package-level agents tests after fixing the unawaited diagnostics test and timeout watchdog.
-- [x] Run full engine package after serializing the engine package script and fixing the timer/CLI harness races. `pnpm --filter @smithers-orchestrator/engine --config.verify-deps-before-run=false test` passed: 527 tests across 87 files.
+- [x] Run full engine package after serializing the engine package script and fixing the timer/CLI harness races. `pnpm --filter @smthrs/engine --config.verify-deps-before-run=false test` passed: 527 tests across 87 files.
- [x] Run broader root checks. Root preflight checks passed: `node scripts/check-single-effect-version.mjs`, `node scripts/check-dependency-boundaries.mjs`, and `node scripts/check-architecture-budget.mjs`.
- [x] Run a full recursive workspace test after fixes. `pnpm -r --workspace-concurrency=1 --config.verify-deps-before-run=false test` passed across 31 workspace projects. Notable remaining skips are documented above.
diff --git a/docs/references/smithers/.smithers/tsconfig.json b/docs/references/smithers/.smithers/tsconfig.json
index 55186e925..4cb8c9a0d 100644
--- a/docs/references/smithers/.smithers/tsconfig.json
+++ b/docs/references/smithers/.smithers/tsconfig.json
@@ -9,7 +9,7 @@
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator",
+ "jsxImportSource": "smthrs",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"allowJs": true,
@@ -22,15 +22,15 @@
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
- "smithers-orchestrator": ["../packages/smithers/src/index.js"],
- "smithers-orchestrator/jsx-runtime": ["../packages/smithers/src/jsx-runtime.js"],
- "smithers-orchestrator/jsx-dev-runtime": ["../packages/smithers/src/jsx-runtime.js"],
- "smithers-orchestrator/tools": ["../packages/smithers/src/tools.js"],
- "smithers-orchestrator/*": [
+ "smthrs": ["../packages/smithers/src/index.js"],
+ "smthrs/jsx-runtime": ["../packages/smithers/src/jsx-runtime.js"],
+ "smthrs/jsx-dev-runtime": ["../packages/smithers/src/jsx-runtime.js"],
+ "smthrs/tools": ["../packages/smithers/src/tools.js"],
+ "smthrs/*": [
"../packages/smithers/src/*.js",
"../packages/smithers/src/*/index.js"
],
- "smithers-orchestrator/scorers": ["../packages/scorers/src/index.js"],
+ "smthrs/scorers": ["../packages/scorers/src/index.js"],
"@smithers/agents": ["../packages/agents/src/index.js"],
"@smithers/agents/*": [
"../packages/agents/src/*.ts",
diff --git a/docs/references/smithers/.smithers/ui/audit.tsx b/docs/references/smithers/.smithers/ui/audit.tsx
index 656486853..968f01795 100644
--- a/docs/references/smithers/.smithers/ui/audit.tsx
+++ b/docs/references/smithers/.smithers/ui/audit.tsx
@@ -7,7 +7,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "audit";
diff --git a/docs/references/smithers/.smithers/ui/grill-me.tsx b/docs/references/smithers/.smithers/ui/grill-me.tsx
index 6d9a221aa..1a49f6e34 100644
--- a/docs/references/smithers/.smithers/ui/grill-me.tsx
+++ b/docs/references/smithers/.smithers/ui/grill-me.tsx
@@ -7,7 +7,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "grill-me";
const GRILL_NODE_ID = "grill-me:grill";
diff --git a/docs/references/smithers/.smithers/ui/implement.tsx b/docs/references/smithers/.smithers/ui/implement.tsx
index dec61fe4b..b38b3901c 100644
--- a/docs/references/smithers/.smithers/ui/implement.tsx
+++ b/docs/references/smithers/.smithers/ui/implement.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "implement";
diff --git a/docs/references/smithers/.smithers/ui/improve-test-coverage.tsx b/docs/references/smithers/.smithers/ui/improve-test-coverage.tsx
index 1dc1fc2bb..859843b2c 100644
--- a/docs/references/smithers/.smithers/ui/improve-test-coverage.tsx
+++ b/docs/references/smithers/.smithers/ui/improve-test-coverage.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "improve-test-coverage";
diff --git a/docs/references/smithers/.smithers/ui/mission.tsx b/docs/references/smithers/.smithers/ui/mission.tsx
index d91eac65e..f43d8bafe 100644
--- a/docs/references/smithers/.smithers/ui/mission.tsx
+++ b/docs/references/smithers/.smithers/ui/mission.tsx
@@ -8,7 +8,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "mission";
const MAX_MILESTONES = 6;
diff --git a/docs/references/smithers/.smithers/ui/open-code-review.tsx b/docs/references/smithers/.smithers/ui/open-code-review.tsx
index 6d4823310..8cfe82932 100644
--- a/docs/references/smithers/.smithers/ui/open-code-review.tsx
+++ b/docs/references/smithers/.smithers/ui/open-code-review.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "open-code-review";
diff --git a/docs/references/smithers/.smithers/ui/ralph.tsx b/docs/references/smithers/.smithers/ui/ralph.tsx
index 785623772..73da334f1 100644
--- a/docs/references/smithers/.smithers/ui/ralph.tsx
+++ b/docs/references/smithers/.smithers/ui/ralph.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "ralph";
diff --git a/docs/references/smithers/.smithers/ui/research-plan-implement.tsx b/docs/references/smithers/.smithers/ui/research-plan-implement.tsx
index 4a6f3cedc..39a00d148 100644
--- a/docs/references/smithers/.smithers/ui/research-plan-implement.tsx
+++ b/docs/references/smithers/.smithers/ui/research-plan-implement.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "research-plan-implement";
diff --git a/docs/references/smithers/.smithers/ui/research.tsx b/docs/references/smithers/.smithers/ui/research.tsx
index 7ff15bb82..75c065948 100644
--- a/docs/references/smithers/.smithers/ui/research.tsx
+++ b/docs/references/smithers/.smithers/ui/research.tsx
@@ -7,7 +7,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "research";
diff --git a/docs/references/smithers/.smithers/ui/review.tsx b/docs/references/smithers/.smithers/ui/review.tsx
index e87cd1b4e..4b8bc7f2b 100644
--- a/docs/references/smithers/.smithers/ui/review.tsx
+++ b/docs/references/smithers/.smithers/ui/review.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "review";
const MAX_REVIEWERS = 6;
diff --git a/docs/references/smithers/.smithers/ui/ship-pipeline.tsx b/docs/references/smithers/.smithers/ui/ship-pipeline.tsx
index 5054e047a..7addfe1df 100644
--- a/docs/references/smithers/.smithers/ui/ship-pipeline.tsx
+++ b/docs/references/smithers/.smithers/ui/ship-pipeline.tsx
@@ -7,7 +7,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "ship-pipeline";
diff --git a/docs/references/smithers/.smithers/ui/ticket-create.tsx b/docs/references/smithers/.smithers/ui/ticket-create.tsx
index dbff0352b..9f22674b8 100644
--- a/docs/references/smithers/.smithers/ui/ticket-create.tsx
+++ b/docs/references/smithers/.smithers/ui/ticket-create.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "ticket-create";
diff --git a/docs/references/smithers/.smithers/ui/tickets-create.tsx b/docs/references/smithers/.smithers/ui/tickets-create.tsx
index f6aba884b..1e86e0094 100644
--- a/docs/references/smithers/.smithers/ui/tickets-create.tsx
+++ b/docs/references/smithers/.smithers/ui/tickets-create.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "tickets-create";
diff --git a/docs/references/smithers/.smithers/ui/ultragrill.tsx b/docs/references/smithers/.smithers/ui/ultragrill.tsx
index c430fc1f9..4ae821247 100644
--- a/docs/references/smithers/.smithers/ui/ultragrill.tsx
+++ b/docs/references/smithers/.smithers/ui/ultragrill.tsx
@@ -7,7 +7,7 @@ import {
useGatewayRun,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "ultragrill";
diff --git a/docs/references/smithers/.smithers/ui/vcs.tsx b/docs/references/smithers/.smithers/ui/vcs.tsx
index a22cc5d69..f50cb714c 100644
--- a/docs/references/smithers/.smithers/ui/vcs.tsx
+++ b/docs/references/smithers/.smithers/ui/vcs.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "vcs";
const ACTIONS = ["status", "log", "commit", "rebase-plan"] as const;
diff --git a/docs/references/smithers/.smithers/ui/workflow-skill.tsx b/docs/references/smithers/.smithers/ui/workflow-skill.tsx
index 6a916401b..b98f35c62 100644
--- a/docs/references/smithers/.smithers/ui/workflow-skill.tsx
+++ b/docs/references/smithers/.smithers/ui/workflow-skill.tsx
@@ -6,7 +6,7 @@ import {
useGatewayNodeOutput,
useGatewayRunEvents,
useGatewayRuns,
-} from "smithers-orchestrator/gateway-react";
+} from "smthrs/gateway-react";
const WORKFLOW_KEY = "workflow-skill";
diff --git a/docs/references/smithers/.smithers/workflows/audit.tsx b/docs/references/smithers/.smithers/workflows/audit.tsx
index abb391a6e..8b1bfb964 100644
--- a/docs/references/smithers/.smithers/workflows/audit.tsx
+++ b/docs/references/smithers/.smithers/workflows/audit.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Audit
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ForEachFeature, forEachFeatureMergeSchema, forEachFeatureResultSchema } from "../components/ForEachFeature";
diff --git a/docs/references/smithers/.smithers/workflows/backpressure-plan.tsx b/docs/references/smithers/.smithers/workflows/backpressure-plan.tsx
index 1c4809db8..fff26ae1a 100644
--- a/docs/references/smithers/.smithers/workflows/backpressure-plan.tsx
+++ b/docs/references/smithers/.smithers/workflows/backpressure-plan.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Backpressure Plan
// smithers-description: Turn acceptance criteria into a gate matrix (schema/test/eval/review/approval/trace) so a workflow cannot just try-its-best and move on.
// smithers-tags: quality, backpressure
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ExtractCriteriaPrompt from "../prompts/backpressure-plan-extract-criteria.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/context-doctor.tsx b/docs/references/smithers/.smithers/workflows/context-doctor.tsx
index 7b876e63a..bdeeccb8b 100644
--- a/docs/references/smithers/.smithers/workflows/context-doctor.tsx
+++ b/docs/references/smithers/.smithers/workflows/context-doctor.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Context Doctor
// smithers-description: Run deterministic checks over a context contract and report missing goals, inputs, verification, approvals, and report specs.
// smithers-tags: quality, context-engineering
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import AdvisePrompt from "../prompts/context-doctor-advise.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/context-engineer.tsx b/docs/references/smithers/.smithers/workflows/context-engineer.tsx
index f3fa8b837..4f8437b43 100644
--- a/docs/references/smithers/.smithers/workflows/context-engineer.tsx
+++ b/docs/references/smithers/.smithers/workflows/context-engineer.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Context Engineer
// smithers-description: Turn a vague user script into a context contract, route it to skills/workflows, add backpressure, execute, and report — the concierge proxy.
// smithers-tags: concierge, context-engineering, planning
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { GrillMe, grillOutputSchema } from "../components/GrillMe";
diff --git a/docs/references/smithers/.smithers/workflows/create-skill.tsx b/docs/references/smithers/.smithers/workflows/create-skill.tsx
index 4b4838ca9..d63b0790b 100644
--- a/docs/references/smithers/.smithers/workflows/create-skill.tsx
+++ b/docs/references/smithers/.smithers/workflows/create-skill.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Create Skill
// smithers-description: Author a new agent skill (SKILL.md + supporting files) from a plain-English ask.
// smithers-tags: authoring, skills
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ClarifyPrompt from "../prompts/create-skill-clarify.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/create-workflow.tsx b/docs/references/smithers/.smithers/workflows/create-workflow.tsx
index 0d6700d7f..dafdbe5be 100644
--- a/docs/references/smithers/.smithers/workflows/create-workflow.tsx
+++ b/docs/references/smithers/.smithers/workflows/create-workflow.tsx
@@ -3,9 +3,9 @@
// smithers-display-name: Create Workflow
// smithers-description: Build a new Smithers workflow from a plain-English ask — clarify, provision docs & skills, design, scaffold, verify, and document.
// smithers-tags: authoring, workflow-pack, scaffolding
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { $ } from "bun";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ClarifyPrompt from "../prompts/create-workflow-clarify.mdx";
@@ -251,8 +251,8 @@ export default smithers((ctx) => {
{async () => {
- const command = `bunx smithers-orchestrator graph ${workflowFile}`;
- const res = await $`bunx smithers-orchestrator graph ${workflowFile}`.nothrow().quiet();
+ const command = `bunx smthrs graph ${workflowFile}`;
+ const res = await $`bunx smthrs graph ${workflowFile}`.nothrow().quiet();
const passed = res.exitCode === 0;
const errText = `${res.stderr?.toString() ?? ""}\n${res.stdout?.toString() ?? ""}`.trim();
return {
diff --git a/docs/references/smithers/.smithers/workflows/debug.tsx b/docs/references/smithers/.smithers/workflows/debug.tsx
index e7bf1619d..bf7107260 100644
--- a/docs/references/smithers/.smithers/workflows/debug.tsx
+++ b/docs/references/smithers/.smithers/workflows/debug.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Debug
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/demo-stage/sample.tsx b/docs/references/smithers/.smithers/workflows/demo-stage/sample.tsx
index 0ebf45f1a..43e032f0e 100644
--- a/docs/references/smithers/.smithers/workflows/demo-stage/sample.tsx
+++ b/docs/references/smithers/.smithers/workflows/demo-stage/sample.tsx
@@ -1,6 +1,6 @@
// smithers-source: authored
// smithers-display-name: Demo Sample (Ship It)
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
//
// Tiny 3-task workflow the autonomous demo runs LIVE to show crash-resume.
// Designed so:
@@ -9,7 +9,7 @@
// - implement is fast (~1.2s)
// If you run it through, total wall time is ~10s.
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
const result = z.object({ message: z.string() });
diff --git a/docs/references/smithers/.smithers/workflows/demo.tsx b/docs/references/smithers/.smithers/workflows/demo.tsx
index 7aad3af1a..a5d49fa61 100644
--- a/docs/references/smithers/.smithers/workflows/demo.tsx
+++ b/docs/references/smithers/.smithers/workflows/demo.tsx
@@ -1,6 +1,6 @@
// smithers-source: authored
// smithers-display-name: Slideshow Demo
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
/**
* A keyboard-driven Smithers slide deck for a 5–15 minute screenshare.
@@ -28,7 +28,7 @@
* ./.smithers/scripts/run-demo.sh --voice Daniel
*/
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
const inputSchema = z.object({
@@ -944,7 +944,7 @@ export function Optimizer({
render: () => {
printCode(
`import { llmJudge, faithfulness, relevancy, schemaAdherence } from
- "smithers-orchestrator/scorers";
+ "smthrs/scorers";
{
printCode(
-`import { createMemoryStore } from "smithers-orchestrator/memory";
+`import { createMemoryStore } from "smthrs/memory";
const ns = { kind: "workflow", id: "code-review" };
{
printCode(
-`import { Smithers } from "smithers-orchestrator";
+`import { Smithers } from "smthrs";
import { Effect, Schema } from "effect";
const G = Smithers.workflow({
@@ -1363,7 +1363,7 @@ const analyze = G.step("analyze", {
` ${C.cyan}ralph-loop${C.reset} ${C.dim}keep going until done${C.reset}`,
"",
` ${C.dim}101 files in examples/. Read one, copy it, edit it.${C.reset}`,
- ` ${C.green}bunx smithers-orchestrator init${C.reset}${C.dim} ← scaffolds seeded workflows into your repo${C.reset}`,
+ ` ${C.green}bunx smthrs init${C.reset}${C.dim} ← scaffolds seeded workflows into your repo${C.reset}`,
"",
],
C.cyan,
@@ -1404,7 +1404,7 @@ const analyze = G.step("analyze", {
{
title: "THREE LAYERS",
- subtitle: "smithers-orchestrator. The forge. The GUI.",
+ subtitle: "smthrs. The forge. The GUI.",
narration:
"Smithers is three things. " +
"The orchestrator — what you just watched — shipped today on N P M. " +
@@ -1415,9 +1415,9 @@ const analyze = G.step("analyze", {
"Smithers, three layers",
[
"",
- ` ${C.cyan}1${C.reset} ${C.bold}smithers-orchestrator${C.reset} ${C.dim}shipped today · OSS · npm${C.reset}`,
+ ` ${C.cyan}1${C.reset} ${C.bold}smthrs${C.reset} ${C.dim}shipped today · OSS · npm${C.reset}`,
` the durable JSX workflow runtime`,
- ` ${C.green}bunx smithers-orchestrator init${C.reset}`,
+ ` ${C.green}bunx smthrs init${C.reset}`,
"",
` ${C.cyan}2${C.reset} ${C.bold}Smithers (the forge)${C.reset} ${C.dim}AGPL · in build · ~78% of MVP${C.reset}`,
` jj-native code host · landing requests · agent runtime`,
@@ -1437,10 +1437,10 @@ const analyze = G.step("analyze", {
title: "READY TO TRY?",
subtitle: "",
narration:
- "Try it. B U N X smithers-orchestrator init. Thanks for watching.",
+ "Try it. B U N X smthrs init. Thanks for watching.",
render: () => {
write("\n\n\n");
- write(` ${C.bold}${C.green}bunx smithers-orchestrator init${C.reset}\n`);
+ write(` ${C.bold}${C.green}bunx smthrs init${C.reset}\n`);
write(` ${C.dim}scaffolds .smithers/ in any project${C.reset}\n\n\n`);
write(` ${C.bold}smithers.sh${C.reset}\n`);
write(` ${C.dim}docs · llms-full.txt · GUI download${C.reset}\n\n\n`);
diff --git a/docs/references/smithers/.smithers/workflows/dynamic-demo.tsx b/docs/references/smithers/.smithers/workflows/dynamic-demo.tsx
index 6d5995afb..b4a9b39fa 100644
--- a/docs/references/smithers/.smithers/workflows/dynamic-demo.tsx
+++ b/docs/references/smithers/.smithers/workflows/dynamic-demo.tsx
@@ -1,7 +1,7 @@
// smithers-source: authored
// smithers-display-name: Dynamic Task Demo
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
const inputSchema = z.object({
diff --git a/docs/references/smithers/.smithers/workflows/eval-author.tsx b/docs/references/smithers/.smithers/workflows/eval-author.tsx
index f1504bc33..82680e49e 100644
--- a/docs/references/smithers/.smithers/workflows/eval-author.tsx
+++ b/docs/references/smithers/.smithers/workflows/eval-author.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Eval Author
// smithers-description: Turn acceptance criteria into eval fixtures (JSONL cases + rubric) wired to smithers eval.
// smithers-tags: quality, evals
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import DerivePrompt from "../prompts/eval-author-derive.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/extract-prompt.tsx b/docs/references/smithers/.smithers/workflows/extract-prompt.tsx
index 56034c69b..d8c660c54 100644
--- a/docs/references/smithers/.smithers/workflows/extract-prompt.tsx
+++ b/docs/references/smithers/.smithers/workflows/extract-prompt.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Extract Prompt
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import {
diff --git a/docs/references/smithers/.smithers/workflows/extract-skill.tsx b/docs/references/smithers/.smithers/workflows/extract-skill.tsx
index 401b50a62..7e9fabebb 100644
--- a/docs/references/smithers/.smithers/workflows/extract-skill.tsx
+++ b/docs/references/smithers/.smithers/workflows/extract-skill.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Extract Skill
// smithers-description: After a run, harvest a reusable skill or workflow and durable memory from the pattern.
// smithers-tags: reuse, skills, memory
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import AnalyzePrompt from "../prompts/extract-skill-analyze.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/feature-enum.tsx b/docs/references/smithers/.smithers/workflows/feature-enum.tsx
index f96b998c8..30179f401 100644
--- a/docs/references/smithers/.smithers/workflows/feature-enum.tsx
+++ b/docs/references/smithers/.smithers/workflows/feature-enum.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Feature Enum
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { FeatureEnum, featureEnumOutputSchema } from "../components/FeatureEnum";
diff --git a/docs/references/smithers/.smithers/workflows/grill-all-three.tsx b/docs/references/smithers/.smithers/workflows/grill-all-three.tsx
index 72dd8f1c0..0bf9b6afc 100644
--- a/docs/references/smithers/.smithers/workflows/grill-all-three.tsx
+++ b/docs/references/smithers/.smithers/workflows/grill-all-three.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Grill All Three
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Loop, Sequence } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Loop, Sequence } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { grillOutputSchema } from "../components/GrillMe";
diff --git a/docs/references/smithers/.smithers/workflows/grill-me.tsx b/docs/references/smithers/.smithers/workflows/grill-me.tsx
index 950140f77..2e8fd68bf 100644
--- a/docs/references/smithers/.smithers/workflows/grill-me.tsx
+++ b/docs/references/smithers/.smithers/workflows/grill-me.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Grill Me
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { GrillMe, grillOutputSchema } from "../components/GrillMe";
diff --git a/docs/references/smithers/.smithers/workflows/implement-codex-gemini.tsx b/docs/references/smithers/.smithers/workflows/implement-codex-gemini.tsx
index 5e0b848ab..452e15f83 100644
--- a/docs/references/smithers/.smithers/workflows/implement-codex-gemini.tsx
+++ b/docs/references/smithers/.smithers/workflows/implement-codex-gemini.tsx
@@ -1,7 +1,7 @@
// smithers-source: user
// smithers-display-name: Implement Codex Gemini
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { providers } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/implement-stable.tsx b/docs/references/smithers/.smithers/workflows/implement-stable.tsx
index fa568c386..0f60d2021 100644
--- a/docs/references/smithers/.smithers/workflows/implement-stable.tsx
+++ b/docs/references/smithers/.smithers/workflows/implement-stable.tsx
@@ -1,7 +1,7 @@
// smithers-source: user
// smithers-display-name: Implement Stable
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { providers } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/implement.tsx b/docs/references/smithers/.smithers/workflows/implement.tsx
index 3e3d7a709..7822675f5 100644
--- a/docs/references/smithers/.smithers/workflows/implement.tsx
+++ b/docs/references/smithers/.smithers/workflows/implement.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Implement
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/improve-test-coverage.tsx b/docs/references/smithers/.smithers/workflows/improve-test-coverage.tsx
index a9c3e4799..f76b31f8a 100644
--- a/docs/references/smithers/.smithers/workflows/improve-test-coverage.tsx
+++ b/docs/references/smithers/.smithers/workflows/improve-test-coverage.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Improve Test Coverage
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/kanban.tsx b/docs/references/smithers/.smithers/workflows/kanban.tsx
index 4f557e26e..4e92219ea 100644
--- a/docs/references/smithers/.smithers/workflows/kanban.tsx
+++ b/docs/references/smithers/.smithers/workflows/kanban.tsx
@@ -1,6 +1,6 @@
// smithers-display-name: Kanban
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence, Parallel, Worktree } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence, Parallel, Worktree } from "smthrs";
import { readdirSync, readFileSync } from "node:fs";
import { resolve, relative } from "node:path";
import { z } from "zod/v4";
diff --git a/docs/references/smithers/.smithers/workflows/mission.tsx b/docs/references/smithers/.smithers/workflows/mission.tsx
index 5ba47ce27..b98d9cd0b 100644
--- a/docs/references/smithers/.smithers/workflows/mission.tsx
+++ b/docs/references/smithers/.smithers/workflows/mission.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Mission
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import AskUserInstructions from "../prompts/ask-user-instructions.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/monitor-smithers.tsx b/docs/references/smithers/.smithers/workflows/monitor-smithers.tsx
index d0330a0e3..457fa9676 100644
--- a/docs/references/smithers/.smithers/workflows/monitor-smithers.tsx
+++ b/docs/references/smithers/.smithers/workflows/monitor-smithers.tsx
@@ -3,9 +3,9 @@
// smithers-display-name: Monitor Smithers
// smithers-description: Watchdog over Smithers runs: detect stuck, blocked, failed, or over-budget runs and escalate.
// smithers-tags: ops, monitoring
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { $ } from "bun";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ClassifyPrompt from "../prompts/monitor-smithers-classify.mdx";
@@ -68,7 +68,7 @@ const { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({
// JSON, and normalise into the watchdog's run shape. Any failure (CLI missing,
// non-zero exit, bad JSON) degrades to an empty list rather than throwing.
async function pollRuns(staleMinutes: number) {
- const res = await $`bunx smithers-orchestrator ps --format json --all`.nothrow().quiet();
+ const res = await $`bunx smthrs ps --format json --all`.nothrow().quiet();
if (res.exitCode !== 0) {
return { runs: [], summary: "Could not read runs from `smithers ps` (non-zero exit)." };
}
diff --git a/docs/references/smithers/.smithers/workflows/open-code-review.tsx b/docs/references/smithers/.smithers/workflows/open-code-review.tsx
index 023958ae2..e17d3859c 100644
--- a/docs/references/smithers/.smithers/workflows/open-code-review.tsx
+++ b/docs/references/smithers/.smithers/workflows/open-code-review.tsx
@@ -1,7 +1,7 @@
// smithers-source: authored
// smithers-display-name: Open Code Review
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Parallel, Sequence, type AgentLike } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Parallel, Sequence, type AgentLike } from "smthrs";
import { agents } from "../agents";
import {
buildNativeReviewPrompt,
diff --git a/docs/references/smithers/.smithers/workflows/plan.tsx b/docs/references/smithers/.smithers/workflows/plan.tsx
index ba5403001..c032d21f1 100644
--- a/docs/references/smithers/.smithers/workflows/plan.tsx
+++ b/docs/references/smithers/.smithers/workflows/plan.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Plan
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import PlanPrompt from "../prompts/plan.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/ralph.tsx b/docs/references/smithers/.smithers/workflows/ralph.tsx
index beb86febe..b951cb590 100644
--- a/docs/references/smithers/.smithers/workflows/ralph.tsx
+++ b/docs/references/smithers/.smithers/workflows/ralph.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Ralph
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers/.smithers/workflows/release.tsx b/docs/references/smithers/.smithers/workflows/release.tsx
index da4fcc98c..88a685fbf 100644
--- a/docs/references/smithers/.smithers/workflows/release.tsx
+++ b/docs/references/smithers/.smithers/workflows/release.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Release
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence } from "smthrs";
import { z } from "zod/v4";
const inputSchema = z.object({
diff --git a/docs/references/smithers/.smithers/workflows/report-slideshow.tsx b/docs/references/smithers/.smithers/workflows/report-slideshow.tsx
index 71c00bda6..4aade58e2 100644
--- a/docs/references/smithers/.smithers/workflows/report-slideshow.tsx
+++ b/docs/references/smithers/.smithers/workflows/report-slideshow.tsx
@@ -3,9 +3,9 @@
// smithers-display-name: Report Slideshow
// smithers-description: Generate a concise HTML slideshow report from a Smithers run state and artifacts.
// smithers-tags: ops, reporting
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { $ } from "bun";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import RenderPrompt from "../prompts/report-slideshow-render.mdx";
@@ -100,7 +100,7 @@ export default smithers((ctx) => {
{/* 1 — Deterministically capture the run state, nodes, and a summary. */}
{async () => {
- const res = await $`bunx smithers-orchestrator inspect ${runId} --format json --full-output`
+ const res = await $`bunx smthrs inspect ${runId} --format json --full-output`
.nothrow()
.quiet();
const stdout = res.stdout?.toString() ?? "";
diff --git a/docs/references/smithers/.smithers/workflows/research-plan-implement.tsx b/docs/references/smithers/.smithers/workflows/research-plan-implement.tsx
index 998e2f629..f0d5ba3fd 100644
--- a/docs/references/smithers/.smithers/workflows/research-plan-implement.tsx
+++ b/docs/references/smithers/.smithers/workflows/research-plan-implement.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Research Plan Implement
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { ValidationLoop, implementOutputSchema, validateOutputSchema } from "../components/ValidationLoop";
diff --git a/docs/references/smithers/.smithers/workflows/research.tsx b/docs/references/smithers/.smithers/workflows/research.tsx
index d81e23060..a7925a7bb 100644
--- a/docs/references/smithers/.smithers/workflows/research.tsx
+++ b/docs/references/smithers/.smithers/workflows/research.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Research
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ResearchPrompt from "../prompts/research.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/restore-claude-implement.tsx b/docs/references/smithers/.smithers/workflows/restore-claude-implement.tsx
index f2c5455dc..a1e3bab64 100644
--- a/docs/references/smithers/.smithers/workflows/restore-claude-implement.tsx
+++ b/docs/references/smithers/.smithers/workflows/restore-claude-implement.tsx
@@ -1,7 +1,7 @@
// smithers-source: user
// smithers-display-name: Restore Claude Implement Agents
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
const restoreSchema = z.object({
diff --git a/docs/references/smithers/.smithers/workflows/review-codex-gemini.tsx b/docs/references/smithers/.smithers/workflows/review-codex-gemini.tsx
index 203d43e00..24df29834 100644
--- a/docs/references/smithers/.smithers/workflows/review-codex-gemini.tsx
+++ b/docs/references/smithers/.smithers/workflows/review-codex-gemini.tsx
@@ -1,7 +1,7 @@
// smithers-source: user
// smithers-display-name: Review Codex Gemini
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { providers } from "../agents";
import { Review, reviewOutputSchema } from "../components/Review";
diff --git a/docs/references/smithers/.smithers/workflows/review-nokimi.tsx b/docs/references/smithers/.smithers/workflows/review-nokimi.tsx
index 66462181c..7f19960ed 100644
--- a/docs/references/smithers/.smithers/workflows/review-nokimi.tsx
+++ b/docs/references/smithers/.smithers/workflows/review-nokimi.tsx
@@ -1,7 +1,7 @@
// smithers-source: user
// smithers-display-name: Review No Kimi
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { providers } from "../agents";
import { Review, reviewOutputSchema } from "../components/Review";
diff --git a/docs/references/smithers/.smithers/workflows/review.tsx b/docs/references/smithers/.smithers/workflows/review.tsx
index 877bbbdfd..c0f92da7c 100644
--- a/docs/references/smithers/.smithers/workflows/review.tsx
+++ b/docs/references/smithers/.smithers/workflows/review.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Review
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { Review, reviewOutputSchema } from "../components/Review";
diff --git a/docs/references/smithers/.smithers/workflows/roadmapbench.tsx b/docs/references/smithers/.smithers/workflows/roadmapbench.tsx
index 3ec7f1823..7bd67358c 100644
--- a/docs/references/smithers/.smithers/workflows/roadmapbench.tsx
+++ b/docs/references/smithers/.smithers/workflows/roadmapbench.tsx
@@ -1,5 +1,5 @@
// smithers-display-name: RoadmapBench
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
//
// RoadmapBench-on-smithers: a multi-agent, long-horizon software-development
// workflow that mixes Claude Opus 4.8 and Codex 5.5 to implement a real
@@ -24,7 +24,7 @@ import {
Task,
createScorer,
createSmithers,
-} from "smithers-orchestrator";
+} from "smthrs";
import { z } from "zod/v4";
const HARNESS = join(
diff --git a/docs/references/smithers/.smithers/workflows/route-task.tsx b/docs/references/smithers/.smithers/workflows/route-task.tsx
index d465961e7..afcad5ca0 100644
--- a/docs/references/smithers/.smithers/workflows/route-task.tsx
+++ b/docs/references/smithers/.smithers/workflows/route-task.tsx
@@ -3,8 +3,8 @@
// smithers-display-name: Route Task
// smithers-description: Classify a plain-English script and either run it as a single task or recommend the right durable workflow.
// smithers-tags: concierge, routing
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import ClassifyPrompt from "../prompts/route-task-classify.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/ship-pipeline.tsx b/docs/references/smithers/.smithers/workflows/ship-pipeline.tsx
index a90254198..9b8e16c97 100644
--- a/docs/references/smithers/.smithers/workflows/ship-pipeline.tsx
+++ b/docs/references/smithers/.smithers/workflows/ship-pipeline.tsx
@@ -1,7 +1,7 @@
// smithers-source: authored
// smithers-display-name: Ship Pipeline
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import { VerifiableGoals, goalsSchema, writtenSchema } from "../components/VerifiableGoals";
diff --git a/docs/references/smithers/.smithers/workflows/smoketest.tsx b/docs/references/smithers/.smithers/workflows/smoketest.tsx
index fe1e3c492..9601ee7cd 100644
--- a/docs/references/smithers/.smithers/workflows/smoketest.tsx
+++ b/docs/references/smithers/.smithers/workflows/smoketest.tsx
@@ -1,10 +1,10 @@
// smithers-source: seeded
// smithers-display-name: Smoke Test
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import SmoketestPrompt from "../prompts/smoketest.mdx";
@@ -47,7 +47,7 @@ const inputSchema = z.object({
prompt: z
.string()
.default(
- "Smoke test the latest published smithers-orchestrator release against the pinned changelog entry.",
+ "Smoke test the latest published smthrs release against the pinned changelog entry.",
),
version: z.string().default(CURRENT_VERSION),
changelog: z.string().default(CURRENT_CHANGELOG),
diff --git a/docs/references/smithers/.smithers/workflows/studio-parity-swarm.tsx b/docs/references/smithers/.smithers/workflows/studio-parity-swarm.tsx
index 26bbd825a..922807003 100644
--- a/docs/references/smithers/.smithers/workflows/studio-parity-swarm.tsx
+++ b/docs/references/smithers/.smithers/workflows/studio-parity-swarm.tsx
@@ -1,5 +1,5 @@
// smithers-display-name: Smithers Studio Parity Swarm
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import {
AntigravityAgent,
ClaudeCodeAgent,
@@ -13,7 +13,7 @@ import {
Worktree,
createSmithers,
type AgentLike,
-} from "smithers-orchestrator";
+} from "smthrs";
import { spawnSync } from "node:child_process";
import { join } from "node:path";
import { z } from "zod/v4";
diff --git a/docs/references/smithers/.smithers/workflows/sweep.tsx b/docs/references/smithers/.smithers/workflows/sweep.tsx
index 5c3f3c67d..029020174 100644
--- a/docs/references/smithers/.smithers/workflows/sweep.tsx
+++ b/docs/references/smithers/.smithers/workflows/sweep.tsx
@@ -1,6 +1,6 @@
// smithers-display-name: Sweep
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import {
diff --git a/docs/references/smithers/.smithers/workflows/sync-features.tsx b/docs/references/smithers/.smithers/workflows/sync-features.tsx
index ddd013354..c40f916f6 100644
--- a/docs/references/smithers/.smithers/workflows/sync-features.tsx
+++ b/docs/references/smithers/.smithers/workflows/sync-features.tsx
@@ -1,6 +1,6 @@
// smithers-display-name: Sync Features
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import SyncFeaturesScanPrompt from "../prompts/sync-features-scan.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/ticket-create.tsx b/docs/references/smithers/.smithers/workflows/ticket-create.tsx
index 3497efc8d..859cc391d 100644
--- a/docs/references/smithers/.smithers/workflows/ticket-create.tsx
+++ b/docs/references/smithers/.smithers/workflows/ticket-create.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Ticket Create
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import TicketPrompt from "../prompts/ticket.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/tickets-create.tsx b/docs/references/smithers/.smithers/workflows/tickets-create.tsx
index 96de05a5d..13463f938 100644
--- a/docs/references/smithers/.smithers/workflows/tickets-create.tsx
+++ b/docs/references/smithers/.smithers/workflows/tickets-create.tsx
@@ -1,7 +1,7 @@
// smithers-source: seeded
// smithers-display-name: Tickets Create
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import TicketsCreatePrompt from "../prompts/tickets-create.mdx";
diff --git a/docs/references/smithers/.smithers/workflows/triage-run.tsx b/docs/references/smithers/.smithers/workflows/triage-run.tsx
index 560762c8f..c8f11a90f 100644
--- a/docs/references/smithers/.smithers/workflows/triage-run.tsx
+++ b/docs/references/smithers/.smithers/workflows/triage-run.tsx
@@ -3,9 +3,9 @@
// smithers-display-name: Triage Run
// smithers-description: Diagnose one failed or stuck Smithers run: pull events/logs, find the root cause, propose a fix/rewind/retry.
// smithers-tags: ops, debugging
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { $ } from "bun";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import DiagnosePrompt from "../prompts/triage-run-diagnose.mdx";
@@ -94,10 +94,10 @@ export default smithers((ctx) => {
{/* 1 — Deterministically pull run state + the recent event log. */}
{async () => {
- const inspectRes = await $`bunx smithers-orchestrator inspect ${runId} --json`
+ const inspectRes = await $`bunx smthrs inspect ${runId} --json`
.nothrow()
.quiet();
- const eventsRes = await $`bunx smithers-orchestrator events ${runId}`
+ const eventsRes = await $`bunx smthrs events ${runId}`
.nothrow()
.quiet();
diff --git a/docs/references/smithers/.smithers/workflows/ultragrill.tsx b/docs/references/smithers/.smithers/workflows/ultragrill.tsx
index 505411c28..8a11570ab 100644
--- a/docs/references/smithers/.smithers/workflows/ultragrill.tsx
+++ b/docs/references/smithers/.smithers/workflows/ultragrill.tsx
@@ -1,7 +1,7 @@
// smithers-source: authored
// smithers-display-name: UltraGrill
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Loop, Parallel, Task, WaitForEvent } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Loop, Parallel, Task, WaitForEvent } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
diff --git a/docs/references/smithers/.smithers/workflows/vcs.tsx b/docs/references/smithers/.smithers/workflows/vcs.tsx
index 99228c96e..e36ebdb8f 100644
--- a/docs/references/smithers/.smithers/workflows/vcs.tsx
+++ b/docs/references/smithers/.smithers/workflows/vcs.tsx
@@ -1,8 +1,8 @@
// smithers-source: authored
// smithers-display-name: VCS
// smithers-description: Inspect and act on a git or jj working tree. Status and log are deterministic; commit messages and rebase plans are written by an agent.
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Task, Sequence } from 'smithers-orchestrator';
+/** @jsxImportSource smthrs */
+import { createSmithers, Task, Sequence } from 'smthrs';
import { execFileSync } from 'node:child_process';
import { z } from 'zod/v4';
import { agents } from '../agents';
diff --git a/docs/references/smithers/.smithers/workflows/workflow-skill.tsx b/docs/references/smithers/.smithers/workflows/workflow-skill.tsx
index f4340a9f5..e18d6b599 100644
--- a/docs/references/smithers/.smithers/workflows/workflow-skill.tsx
+++ b/docs/references/smithers/.smithers/workflows/workflow-skill.tsx
@@ -1,9 +1,9 @@
// smithers-source: seeded
// smithers-display-name: Workflow Skill
-/** @jsxImportSource smithers-orchestrator */
+/** @jsxImportSource smthrs */
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
import { join, resolve } from "node:path";
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { z } from "zod/v4";
import { agents } from "../agents";
import WorkflowSkillPrompt from "../prompts/workflow-skill.mdx";
diff --git a/docs/references/smithers/README.md b/docs/references/smithers/README.md
index b5ffb8596..519ff9f24 100644
--- a/docs/references/smithers/README.md
+++ b/docs/references/smithers/README.md
@@ -27,8 +27,8 @@ Smithers skill and register the MCP server into **every coding agent on your mac
(Claude Code, Codex, Cursor, Copilot, Pi, Hermes, OpenClaw, and ~20 more):
```bash
-bunx smithers-orchestrator skills add # install the skill set into every detected agent
-bunx smithers-orchestrator mcp add # register Smithers as an MCP server everywhere
+bunx smthrs skills add # install the skill set into every detected agent
+bunx smthrs mcp add # register Smithers as an MCP server everywhere
```
Then just ask:
@@ -60,10 +60,10 @@ Prefer to drive it yourself from the CLI? Start here.
```bash
# scaffold the workflow pack into .smithers/
-bunx smithers-orchestrator init
+bunx smthrs init
# turn a request into a practical implementation plan
-bunx smithers-orchestrator workflow run plan --prompt "add rate limiting, audit logging, and API key rotation"
+bunx smthrs workflow run plan --prompt "add rate limiting, audit logging, and API key rotation"
```
`init` scaffolds a `.smithers/` folder preloaded with production-ready workflows. Once
@@ -71,13 +71,13 @@ that's in place, you can chain a request from tickets to implementation:
```bash
# break a request into ticket files under .smithers/tickets/
-bunx smithers-orchestrator workflow run tickets-create --prompt "add rate limiting, audit logging, and API key rotation"
+bunx smthrs workflow run tickets-create --prompt "add rate limiting, audit logging, and API key rotation"
# implement the tickets, each in its own worktree branch
-bunx smithers-orchestrator workflow run kanban
+bunx smthrs workflow run kanban
```
-Run `bunx smithers-orchestrator starters` to browse plain-English starters, and
+Run `bunx smthrs starters` to browse plain-English starters, and
`smithers workflow list` to see what's installed.
## Watch your runs
@@ -125,7 +125,7 @@ for the job and switch freely:
## Built-in workflows
`smithers init` installs a pack of ready-to-run workflows. Point your agent at one and go
-via `bunx smithers-orchestrator workflow run --prompt "..."`:
+via `bunx smthrs workflow run --prompt "..."`:
**Build**
@@ -184,7 +184,7 @@ adapt them to your repo, or have it write new ones from the same primitives. A w
is a JSX tree of tasks:
```tsx
-import { createSmithers, Sequence } from "smithers-orchestrator";
+import { createSmithers, Sequence } from "smthrs";
import { z } from "zod";
const { Workflow, Task, smithers, outputs } = createSmithers({
diff --git a/docs/references/smithers/apps/cli/docs/llms-full.txt b/docs/references/smithers/apps/cli/docs/llms-full.txt
index 079a15a12..58fb225df 100644
--- a/docs/references/smithers/apps/cli/docs/llms-full.txt
+++ b/docs/references/smithers/apps/cli/docs/llms-full.txt
@@ -1,7 +1,7 @@
# Smithers — full documentation
> Durable AI workflow orchestration as a JSX runtime.
-> Repo: github.com/smithersai/smithers · Package: smithers-orchestrator (npm)
+> Repo: github.com/smithersai/smithers · Package: smthrs (npm)
This is the complete agent-facing Smithers documentation in one file. It is the concatenation of every fragment listed in /llms.txt.
@@ -24,7 +24,7 @@ Changelogs are not included; see /docs/changelogs/ on the docs site.
# Smithers
> Smithers — durable AI workflow orchestration as a JSX runtime.
-> Repo: github.com/smithersai/smithers · Package: smithers-orchestrator (npm)
+> Repo: github.com/smithersai/smithers · Package: smthrs (npm)
This file is the agent-facing core Smithers documentation. It is for Claude, Codex, and other AI harnesses operating Smithers for a human. Read top to bottom for the runtime, agent operating playbook, JSX surface, CLI, and components.
@@ -81,8 +81,8 @@ harnesses should operate Smithers for the human, including the `llms.txt` and
```tsx
-/** @jsxImportSource smithers-orchestrator */
-import { createSmithers, Sequence, Task } from "smithers-orchestrator";
+/** @jsxImportSource smthrs */
+import { createSmithers, Sequence, Task } from "smthrs";
import { z } from "zod";
const { Workflow, smithers, outputs } = createSmithers({
@@ -101,8 +101,8 @@ export default smithers((ctx) => (
```
```bash
-bunx smithers-orchestrator init
-bunx smithers-orchestrator up workflow.tsx --input '{"name":"world"}'
+bunx smthrs init
+bunx smthrs up workflow.tsx --input '{"name":"world"}'
```
Outputs are validated by Zod, persisted to SQLite, and survive crashes. Resume with
@@ -144,14 +144,14 @@ to run, and treats having your agent author new ones as a first-class path.
## Built-in workflows
-`bunx smithers-orchestrator init` scaffolds a `.smithers/` folder preloaded with
+`bunx smthrs init` scaffolds a `.smithers/` folder preloaded with
production-ready workflows. Point your agent at one and go with
-`bunx smithers-orchestrator workflow run --prompt "..."`:
+`bunx smthrs workflow run --prompt "..."`:
```bash
# break a request into tickets, then implement them on a board
-bunx smithers-orchestrator workflow run tickets-create --prompt "add rate limiting and audit logging"
-bunx smithers-orchestrator workflow run kanban
+bunx smthrs workflow run tickets-create --prompt "add rate limiting and audit logging"
+bunx smthrs workflow run kanban
```
@@ -306,24 +306,24 @@ Don't use it for a single prompt → single response. Use your model provider's
## Installation
-> Install smithers-orchestrator with the workflow pack, or manually for standalone JSX workflow projects.
+> Install smthrs with the workflow pack, or manually for standalone JSX workflow projects.
Most teams should start with the workflow pack. It gives you a working `.smithers/` directory with seeded workflows, prompts, and agent configuration instead of assembling the project structure by hand.
## Always Run with `bunx`
-Every CLI invocation in these docs is `bunx smithers-orchestrator `. Do **not** install Smithers globally and do **not** use the bare `smithers` or `bunx smithers` shorthand.
+Every CLI invocation in these docs is `bunx smthrs `. Do **not** install Smithers globally and do **not** use the bare `smithers` or `bunx smithers` shorthand.
- `bunx` resolves the package locally if your project depends on it, otherwise it pulls and runs the latest published version.
-- The published npm package is [`smithers-orchestrator`](https://www.npmjs.com/package/smithers-orchestrator). The bare name `smithers` is a different package, so `bunx smithers` runs something else entirely.
+- The published npm package is [`smthrs`](https://www.npmjs.com/package/smthrs). The bare name `smithers` is a different package, so `bunx smithers` runs something else entirely.
- A global install creates version-drift problems across machines, CI, and contributors. With `bunx`, every project pins Smithers through its own `package.json`.
-If you previously ran `npm i -g smithers-orchestrator`, uninstall it (`npm rm -g smithers-orchestrator`) and switch to `bunx`.
+If you previously ran `npm i -g smthrs`, uninstall it (`npm rm -g smthrs`) and switch to `bunx`.
## Recommended: Install the Workflow Pack
```bash
-bunx smithers-orchestrator init
+bunx smthrs init
```
That scaffolds `.smithers/` with files such as:
@@ -333,7 +333,7 @@ That scaffolds `.smithers/` with files such as:
| `.smithers/workflows/` | Pre-built workflows (`implement`, `review`, `plan`, `ralph`, `debug`, ...) |
| `.smithers/prompts/` | Shared MDX prompt templates |
| `.smithers/components/` | Reusable TSX components (`Review`, `ValidationLoop`, ...) |
-| `.smithers/package.json` | Local workflow project manifest with `smithers-orchestrator` dependency |
+| `.smithers/package.json` | Local workflow project manifest with `smthrs` dependency |
| `.smithers/tsconfig.json` | TypeScript config for JSX workflow authoring |
| `.smithers/bunfig.toml` | Bun preload config for MDX workflow prompts |
| `.smithers/preload.ts` | Registers the MDX preload plugin |
@@ -347,7 +347,7 @@ That scaffolds `.smithers/` with files such as:
To overwrite an existing scaffold:
```bash
-bunx smithers-orchestrator init --force
+bunx smthrs init --force
```
## Install the Agent Skill
@@ -372,8 +372,8 @@ outcome — *"orchestrate an agent to add rate limiting and keep iterating until
tests pass"* — and the agent reaches for Smithers itself.
For agents without a skills directory, point them at
-`bunx smithers-orchestrator docs-full` (prints the same bundle) or
-`bunx smithers-orchestrator ask ""`.
+`bunx smthrs docs-full` (prints the same bundle) or
+`bunx smthrs ask ""`.
To install the skill **and** register the MCP server into every coding agent on
your machine at once, see Agent Support — it covers Claude
@@ -394,13 +394,13 @@ See JSX Installation for the package list, TypeScript configuration, and optiona
### Version control
-Smithers bundles jj. The optional `@smithers-orchestrator/jj-` package installs a vendored jj binary for your platform, so a fresh install works with no system jj. Resolution order is:
+Smithers bundles jj. The optional `@smthrs/jj-` package installs a vendored jj binary for your platform, so a fresh install works with no system jj. Resolution order is:
1. `SMITHERS_JJ_PATH` — point this at a jj binary to override everything.
2. The bundled binary for your platform.
3. `jj` on your `PATH`.
-If no bundled binary installed (an unsupported platform, or `--no-optional`) and neither `jj` nor `git` is on `PATH`, runs that need a worktree fail with a message telling you to install one. Check what Smithers found with `bunx smithers-orchestrator workflow doctor` (the `vcs` section reports the resolved jj and git).
+If no bundled binary installed (an unsupported platform, or `--no-optional`) and neither `jj` nor `git` is on `PATH`, runs that need a worktree fail with a message telling you to install one. Check what Smithers found with `bunx smthrs workflow doctor` (the `vcs` section reports the resolved jj and git).
## After Installation
@@ -419,25 +419,25 @@ If no bundled binary installed (an unsupported platform, or `--no-optional`) and
> Scaffold and run a Smithers workflow in two commands.
```bash
-bunx smithers-orchestrator init
-bunx smithers-orchestrator init --template idea-to-tickets
-bunx smithers-orchestrator workflow run implement --prompt "Add rate limiting"
+bunx smthrs init
+bunx smthrs init --template idea-to-tickets
+bunx smthrs workflow run implement --prompt "Add rate limiting"
```
-`init` scaffolds `.smithers/` (workflows, prompts, components, agent config). Add `--template ` when you want the init result to include the selected starter command and follow-up notes. Run `bunx smithers-orchestrator starters` to browse template IDs.
+`init` scaffolds `.smithers/` (workflows, prompts, components, agent config). Add `--template ` when you want the init result to include the selected starter command and follow-up notes. Run `bunx smthrs starters` to browse template IDs.
Inspect the run:
```bash
-bunx smithers-orchestrator ps
-bunx smithers-orchestrator inspect
-bunx smithers-orchestrator logs --tail 20
+bunx smthrs ps
+bunx smthrs inspect
+bunx smthrs logs --tail 20
```
Resume after a crash:
```bash
-bunx smithers-orchestrator up workflow.tsx --run-id --resume true
+bunx smthrs up workflow.tsx --run-id --resume true
```
Prefer to let your agent drive? Install the agent skill and just ask for the outcome — your coding agent runs Smithers for you.
@@ -453,19 +453,19 @@ For a full worked example, see the Tour. For every CLI command see the CLI catal
Smithers ships with starter workflows for when you want a result before your agent writes any workflow code. Browse the starter gallery from any repo:
```bash
-bunx smithers-orchestrator starters
+bunx smthrs starters
```
First-time setup:
```bash
-bunx smithers-orchestrator init --add-agents
+bunx smthrs init --add-agents
```
Or initialize with guided next steps for one template:
```bash
-bunx smithers-orchestrator init --template idea-to-tickets
+bunx smthrs init --template idea-to-tickets
```
Template IDs:
@@ -474,37 +474,37 @@ Pass any ID from this table to `init --template ` to scaffold that starter.
| Starter | Best for | Workflow | Command |
| --- | --- | --- | --- |
-| `idea-to-prd` | founders, product | `write-a-prd` | `bunx smithers-orchestrator init --template idea-to-prd` |
-| `idea-to-tickets` | founders, product, operations, engineering | `tickets-create` | `bunx smithers-orchestrator init --template idea-to-tickets` |
-| `launch-checklist` | launch owners and operators | `plan` | `bunx smithers-orchestrator init --template launch-checklist` |
-| `customer-incident` | support escalations | `debug` | `bunx smithers-orchestrator init --template customer-incident` |
-| `nontechnical-research` | before-build decisions | `research` | `bunx smithers-orchestrator init --template nontechnical-research` |
-| `requirements-interview` | vague stakeholder requests | `grill-me` | `bunx smithers-orchestrator init --template requirements-interview` |
-| `quality-audit` | release readiness | `audit` | `bunx smithers-orchestrator init --template quality-audit` |
-| `test-coverage` | regression prevention | `improve-test-coverage` | `bunx smithers-orchestrator init --template test-coverage` |
-| `ship-a-change` | focused product improvements | `research-plan-implement` | `bunx smithers-orchestrator init --template ship-a-change` |
-| `mission-mode` | larger approved milestones | `mission` | `bunx smithers-orchestrator init --template mission-mode` |
+| `idea-to-prd` | founders, product | `write-a-prd` | `bunx smthrs init --template idea-to-prd` |
+| `idea-to-tickets` | founders, product, operations, engineering | `tickets-create` | `bunx smthrs init --template idea-to-tickets` |
+| `launch-checklist` | launch owners and operators | `plan` | `bunx smthrs init --template launch-checklist` |
+| `customer-incident` | support escalations | `debug` | `bunx smthrs init --template customer-incident` |
+| `nontechnical-research` | before-build decisions | `research` | `bunx smthrs init --template nontechnical-research` |
+| `requirements-interview` | vague stakeholder requests | `grill-me` | `bunx smthrs init --template requirements-interview` |
+| `quality-audit` | release readiness | `audit` | `bunx smthrs init --template quality-audit` |
+| `test-coverage` | regression prevention | `improve-test-coverage` | `bunx smthrs init --template test-coverage` |
+| `ship-a-change` | focused product improvements | `research-plan-implement` | `bunx smthrs init --template ship-a-change` |
+| `mission-mode` | larger approved milestones | `mission` | `bunx smthrs init --template mission-mode` |
Each detailed starter prints:
- What outcome to expect
- What context to gather before running
-- The exact `bunx smithers-orchestrator workflow run ...` command
+- The exact `bunx smthrs workflow run ...` command
- Useful follow-up commands
- When not to use that starter
Filter by audience or goal:
```bash
-bunx smithers-orchestrator starters --audience product
-bunx smithers-orchestrator starters --goal quality
-bunx smithers-orchestrator starters --workflow debug
+bunx smthrs starters --audience product
+bunx smthrs starters --goal quality
+bunx smthrs starters --workflow debug
```
Use JSON when another tool needs the catalog:
```bash
-bunx smithers-orchestrator starters --format json
+bunx smthrs starters --format json
```
---
@@ -518,8 +518,8 @@ A code-review workflow built one capability at a time. Each step is a diff again
## 1. Install and scaffold
```bash
-bunx smithers-orchestrator init
-bun add smithers-orchestrator ai @ai-sdk/anthropic zod
+bunx smthrs init
+bun add smthrs ai @ai-sdk/anthropic zod
bun add -d typescript @types/bun
export ANTHROPIC_API_KEY="sk-ant-..."
```
@@ -535,7 +535,7 @@ A minimal `tsconfig.json`:
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator",
+ "jsxImportSource": "smthrs",
"strict": true,
"noEmit": true,
"skipLibCheck": true
@@ -548,7 +548,7 @@ A minimal `tsconfig.json`:
## 2. One-task workflow
```tsx
-import { createSmithers, Sequence, Task } from "smithers-orchestrator";
+import { createSmithers, Sequence, Task } from "smthrs";
import { z } from "zod";
const { Workflow, smithers, outputs } = createSmithers({
@@ -571,14 +571,14 @@ export default smithers((ctx) => (
This Task has no `agent`, just a literal value. Run it.
```bash
-bunx smithers-orchestrator up workflow.tsx --input '{"name":"world"}'
+bunx smthrs up workflow.tsx --input '{"name":"world"}'
```
Inspect:
```bash
-bunx smithers-orchestrator ps # find the run id
-bunx smithers-orchestrator inspect # structured state
+bunx smthrs ps # find the run id
+bunx smthrs inspect # structured state
sqlite3 smithers.db "SELECT * FROM greeting;" # the persisted output
```
@@ -587,7 +587,7 @@ sqlite3 smithers.db "SELECT * FROM greeting;" # the persisted output
Replace the literal Task with an agent Task whose output is structured.
```tsx
-import { createSmithers, Sequence, Task, AnthropicAgent } from "smithers-orchestrator";
+import { createSmithers, Sequence, Task, AnthropicAgent } from "smthrs";
import { z } from "zod";
const { Workflow, smithers, outputs } = createSmithers({
@@ -625,7 +625,7 @@ The runtime injects a JSON-schema description of `outputs.analysis` into the pro
Tasks see each other's outputs through `ctx.outputMaybe(...)`. An incomplete upstream returns `undefined`; on the next render frame the upstream output appears and the downstream Task mounts.
```tsx
-import { createSmithers, Sequence, Task, AnthropicAgent } from "smithers-orchestrator";
+import { createSmithers, Sequence, Task, AnthropicAgent } from "smthrs";
import { z } from "zod";
const AnalysisSchema = z.object({
@@ -700,7 +700,7 @@ Same shape works for branching, parallel groups, and loops:
Pause for a human. The runtime persists the pending decision and exits cleanly; an operator approves or denies through the CLI; resume picks up from the gate.
```tsx
-import { Approval } from "smithers-orchestrator";
+import { Approval } from "smthrs";
{analysis ? (
# see the request
-bunx smithers-orchestrator approve --node confirm-fix --by alice
-bunx smithers-orchestrator up workflow.tsx --run-id --resume true
+bunx smthrs ps --status waiting-approval # find paused runs
+bunx smthrs inspect # see the request
+bunx smthrs approve --node confirm-fix --by alice
+bunx smthrs up workflow.tsx --run-id --resume true
```
`onDeny` controls behavior on rejection: `"fail"` aborts the run, `"continue"` proceeds without the approved branch, `"skip"` skips the gated tasks.
@@ -739,10 +739,10 @@ bunx smithers-orchestrator up workflow.tsx --run-id --resume true
Every completed task's output sits in SQLite. A crash, kill, or restart loses no work — the next run with `--resume true` skips finished tasks.
```bash
-bunx smithers-orchestrator up workflow.tsx --input '{"repo":"."}' --run-id review-1
+bunx smthrs up workflow.tsx --input '{"repo":"."}' --run-id review-1
# ...analyze finishes, fix is mid-flight, you Ctrl+C
-bunx smithers-orchestrator up workflow.tsx --run-id review-1 --resume true
+bunx smthrs up workflow.tsx --run-id review-1 --resume true
# analyze is skipped (already in DB), fix re-runs from scratch (was incomplete)
```
@@ -751,14 +751,14 @@ In-flight attempts are marked stale and re-tried; finished tasks are not. Resume
For unattended recovery, run the supervisor:
```bash
-bunx smithers-orchestrator supervise --interval 30s --stale-threshold 1m
+bunx smthrs supervise --interval 30s --stale-threshold 1m
```
It auto-resumes runs whose owner process died.
## What you skipped (and where to find it)
-- **Time travel** (replay a frame, fork a run, diff two runs): `bunx smithers-orchestrator replay|fork|diff|timeline` — see How It Works → Time travel.
+- **Time travel** (replay a frame, fork a run, diff two runs): `bunx smthrs replay|fork|diff|timeline` — see How It Works → Time travel.
- **Scorers** (attach evaluators to Tasks): see Recipes → Scoring tasks.
- **Memory** (cross-run facts and message history): see llms-memory.txt.
- **RAG**, **voice**, **OpenAPI tools**: opt-in fragments — see the index in llms.txt.
@@ -999,7 +999,7 @@ Replay with `--restore-vcs` checks out the jj revision the snapshot was taken at
Attach evaluators to a Task. They run **after** completion and never block.
```tsx
-import { schemaAdherenceScorer, latencyScorer } from "smithers-orchestrator/scorers";
+import { schemaAdherenceScorer, latencyScorer } from "smthrs/scorers";
--watch
-bunx smithers-orchestrator events --watch
-bunx smithers-orchestrator node
-bunx smithers-orchestrator scores
-bunx smithers-orchestrator why
+bunx smthrs ps
+bunx smthrs inspect --watch
+bunx smthrs events --watch
+bunx smthrs node
+bunx smthrs scores
+bunx smthrs why
```
Use serve mode when you need HTTP status, SSE events, remote approvals, or
Prometheus metrics:
```bash
-bunx smithers-orchestrator up workflow.tsx --serve --metrics --port 7331
+bunx smthrs up workflow.tsx --serve --metrics --port 7331
```
Use the observability stack when the work needs traces, metrics, dashboards, or
a reviewer evidence bundle:
```bash
-bunx smithers-orchestrator observability
+bunx smthrs observability
```
Enable OpenTelemetry export when you need trace-level proof, then include the
@@ -1280,8 +1280,8 @@ plan, gates, and evidence live." Do not phrase it as homework for the human.
Use hot mode while authoring or tuning a workflow:
```bash
-bunx smithers-orchestrator graph workflow.tsx
-bunx smithers-orchestrator up workflow.tsx --hot true --input '{"prompt":"..."}'
+bunx smthrs graph workflow.tsx
+bunx smthrs up workflow.tsx --hot true --input '{"prompt":"..."}'
```
The graph command validates the rendered shape without executing the whole job.
@@ -1402,12 +1402,12 @@ Workflows are JSX trees. Smithers renders the tree, extracts ready tasks, execut
## Setup
-Most projects should use `bunx smithers-orchestrator init` — it scaffolds everything below.
+Most projects should use `bunx smthrs init` — it scaffolds everything below.
To embed into an existing codebase:
```bash
-bun add smithers-orchestrator react react-dom zod
+bun add smthrs react react-dom zod
bun add -d typescript @types/react @types/react-dom @types/node
```
@@ -1420,7 +1420,7 @@ Minimal `tsconfig.json`:
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator",
+ "jsxImportSource": "smthrs",
"strict": true,
"noEmit": true,
"skipLibCheck": true
@@ -1428,17 +1428,17 @@ Minimal `tsconfig.json`:
}
```
-`jsxImportSource` is the only non-standard line — it routes JSX through `smithers-orchestrator/jsx-runtime` instead of React DOM.
+`jsxImportSource` is the only non-standard line — it routes JSX through `smthrs/jsx-runtime` instead of React DOM.
Optional MDX prompts: add `bun add -d @types/mdx` and a `preload.ts` that calls `mdxPlugin()`, register it in `bunfig.toml` as `preload = ["./preload.ts"]`.
-Verify with `bunx tsc --noEmit` and `bunx smithers-orchestrator --help`.
+Verify with `bunx tsc --noEmit` and `bunx smthrs --help`.
## A minimal workflow
```tsx
-// @jsxImportSource smithers-orchestrator — only needed if not set in tsconfig.json
-import { createSmithers, Sequence, Task } from "smithers-orchestrator";
+// @jsxImportSource smthrs — only needed if not set in tsconfig.json
+import { createSmithers, Sequence, Task } from "smthrs";
import { z } from "zod";
const { Workflow, smithers, outputs } = createSmithers({
@@ -1481,7 +1481,7 @@ The `report` Task doesn't exist in the plan until `analysis` completes. No place
> Every Smithers CLI command in one structured catalog (TOON format).
-Always invoke as `bunx smithers-orchestrator ` (see Installation for why). Use `--help` on any command for the canonical option list.
+Always invoke as `bunx smthrs ` (see Installation for why). Use `--help` on any command for the canonical option list.
## Conventions
@@ -2062,27 +2062,27 @@ commands[66]:
**Set up**
```bash
-bunx smithers-orchestrator init # scaffold .smithers/
-bunx smithers-orchestrator init --template idea-to-tickets # scaffold with guided template next steps
-bunx smithers-orchestrator starters # browse template IDs
+bunx smthrs init # scaffold .smithers/
+bunx smthrs init --template idea-to-tickets # scaffold with guided template next steps
+bunx smthrs starters # browse template IDs
```
**Run**
```bash
-bunx smithers-orchestrator workflow run implement --prompt "…" # launch a seeded workflow
-bunx smithers-orchestrator up workflow.tsx --run-id --resume true # resume a paused run
+bunx smthrs workflow run implement --prompt "…" # launch a seeded workflow
+bunx smthrs up workflow.tsx --run-id --resume true # resume a paused run
```
**Observe & control**
```bash
-bunx smithers-orchestrator ps # list runs
-bunx smithers-orchestrator inspect # structured run state
-bunx smithers-orchestrator logs --tail 20 --follow # stream events
-bunx smithers-orchestrator why # why is it paused?
-bunx smithers-orchestrator approve --node --by # approve a paused node
-bunx smithers-orchestrator cancel # cancel a run
+bunx smthrs ps # list runs
+bunx smthrs inspect # structured run state
+bunx smthrs logs --tail 20 --follow # stream events
+bunx smthrs why # why is it paused?
+bunx smthrs approve --node --by # approve a paused node
+bunx smthrs cancel # cancel a run
```
See Tour for a full worked example. See CLI overview for the complete flag reference.
@@ -2094,7 +2094,7 @@ See Tour for a full worked example. See CLI overview for the complete flag refer
> Root container; sequences direct children, optionally caches for resume.
```ts
-import { Workflow } from "smithers-orchestrator";
+import { Workflow } from "smthrs";
type WorkflowProps = {
name: string;
@@ -2104,7 +2104,7 @@ type WorkflowProps = {
```
```tsx
-import { createSmithers } from "smithers-orchestrator";
+import { createSmithers } from "smthrs";
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
@@ -2139,7 +2139,7 @@ export default smithers((ctx) => (
> Executable node; runs an agent, compute callback, or emits a static value.
```ts
-import { Task } from "smithers-orchestrator";
+import { Task } from "smthrs";
type TaskProps = {
id: string;
@@ -2273,7 +2273,7 @@ const VERIFY = "verify" as const;
> Run children in source order.
```ts
-import { Sequence } from "smithers-orchestrator";
+import { Sequence } from "smthrs";
type SequenceProps = {
key?: string;
@@ -2317,7 +2317,7 @@ type SequenceProps = {
> Run children concurrently with an optional concurrency cap.
```ts
-import { Parallel } from "smithers-orchestrator";
+import { Parallel } from "smthrs";
type ParallelProps = {
id?: string;
@@ -2355,7 +2355,7 @@ type ParallelProps = {
> Conditional fork; mounts `then` when `if` is true, otherwise `else`.
```ts
-import { Branch } from "smithers-orchestrator";
+import { Branch } from "smthrs";
type BranchProps = {
if: boolean;
@@ -2400,7 +2400,7 @@ type BranchProps = {
> Re-run children until `until` is true or `maxIterations` is hit.
```ts
-import { Loop } from "smithers-orchestrator";
+import { Loop } from "smthrs";
type LoopProps = {
id?: string; // auto-generated from tree position
@@ -2450,7 +2450,7 @@ export default smithers((ctx) => {
> Durable human approval; persists ApprovalDecision, selection, or ranking.
```ts
-import { Approval, approvalDecisionSchema } from "smithers-orchestrator";
+import { Approval, approvalDecisionSchema } from "smthrs";
type ApprovalProps = {
id: string;
@@ -2485,7 +2485,7 @@ type ApprovalProps = {
```
```tsx
-import { Approval, Sequence, Task, Workflow, approvalDecisionSchema, createSmithers } from "smithers-orchestrator";
+import { Approval, Sequence, Task, Workflow, approvalDecisionSchema, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -2528,7 +2528,7 @@ export default smithers((ctx) => {
> Conditional approval; pauses for human when `when` is true, else auto-approves.
```ts
-import { ApprovalGate } from "smithers-orchestrator";
+import { ApprovalGate } from "smthrs";
type ApprovalGateProps = {
id: string;
@@ -2584,7 +2584,7 @@ const risk = ctx.output(outputs.riskScore, { nodeId: "risk" });
```ts
// Props
-import { EscalationChain } from "smithers-orchestrator";
+import { EscalationChain } from "smthrs";
type EscalationChainProps = {
id?: string; // default "escalation"
@@ -2634,7 +2634,7 @@ type EscalationLevel = {
```ts
// Props
-import { DecisionTable } from "smithers-orchestrator";
+import { DecisionTable } from "smthrs";
type DecisionTableProps = {
id?: string;
@@ -2683,7 +2683,7 @@ type DecisionRule = {
> Suspend until a human submits JSON matching the output schema.
```ts
-import { HumanTask } from "smithers-orchestrator";
+import { HumanTask } from "smthrs";
type HumanTaskProps = {
id: string;
@@ -2704,7 +2704,7 @@ type HumanTaskProps = {
```
```tsx
-import { Workflow, Sequence, Task, HumanTask, createSmithers } from "smithers-orchestrator";
+import { Workflow, Sequence, Task, HumanTask, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -2752,7 +2752,7 @@ export default smithers((ctx) => {
> Typed wrapper around <WaitForEvent>; signal name equals node id.
```ts
-import { Signal } from "smithers-orchestrator";
+import { Signal } from "smthrs";
type SignalProps = {
id: string; // signal name and node id
@@ -2773,7 +2773,7 @@ type SignalProps = {
```
```tsx
-import { Signal, Task, Workflow, createSmithers } from "smithers-orchestrator";
+import { Signal, Task, Workflow, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -2806,7 +2806,7 @@ export default smithers(() => (
> Durably suspend until a correlated external event arrives, or time out.
```ts
-import { WaitForEvent } from "smithers-orchestrator";
+import { WaitForEvent } from "smthrs";
type WaitForEventProps = {
id: string;
@@ -2858,7 +2858,7 @@ type WaitForEventProps = {
> Durably suspend for a relative duration or until an absolute time.
```ts
-import { Timer } from "smithers-orchestrator";
+import { Timer } from "smthrs";
type TimerProps = {
id: string;
@@ -2898,7 +2898,7 @@ type TimerProps = {
> Forward steps with compensations run in reverse on failure.
```ts
-import { Saga } from "smithers-orchestrator";
+import { Saga } from "smthrs";
type SagaStepDef = {
id: string;
@@ -2949,7 +2949,7 @@ type SagaProps = {
> Workflow-scoped error boundary with catch handlers and guaranteed cleanup.
```ts
-import { TryCatchFinally } from "smithers-orchestrator";
+import { TryCatchFinally } from "smthrs";
type TryCatchFinallyProps = {
id?: string;
@@ -2997,8 +2997,8 @@ type TryCatchFinallyProps = {
`` is a task boundary for work that should execute outside the parent task process. The public component is provider-first: pass an injectable provider object or a registered provider id. `runtime` remains only for the built-in legacy local transports.
```ts
-import { Sandbox } from "smithers-orchestrator";
-import type { SandboxProvider } from "smithers-orchestrator/sandbox";
+import { Sandbox } from "smthrs";
+import type { SandboxProvider } from "smthrs/sandbox";
type SandboxProps = {
id: string;
@@ -3084,7 +3084,7 @@ type SandboxProvider = {
Register reusable providers when a workflow should reference them by id:
```ts
-import { registerSandboxProvider } from "smithers-orchestrator/sandbox";
+import { registerSandboxProvider } from "smthrs/sandbox";
const unregister = registerSandboxProvider(provider);
@@ -3172,7 +3172,7 @@ Freestyle's current VM docs show the stable package as `freestyle`, VM creation
> Invoke a child workflow with its own retry, cache, resume boundary.
```ts
-import { Subflow } from "smithers-orchestrator";
+import { Subflow } from "smthrs";
type SubflowProps = {
id: string;
@@ -3228,7 +3228,7 @@ type SubflowProps = {
> Close the current run; start a fresh one with optional carried state.
```ts
-import { ContinueAsNew, continueAsNew } from "smithers-orchestrator";
+import { ContinueAsNew, continueAsNew } from "smthrs";
type ContinueAsNewProps = {
state?: unknown; // JSON-serializable; arrives as ctx.input.__smithersContinuation.payload
@@ -3277,7 +3277,7 @@ export default smithers((ctx) => {
> Reads and modifies source code at runtime via a markdown strategy doc.
```ts
-import { SuperSmithers } from "smithers-orchestrator";
+import { SuperSmithers } from "smthrs";
type SuperSmithersProps = {
strategy: string | ReactElement; // markdown or MDX strategy document
@@ -3320,7 +3320,7 @@ type SuperSmithersProps = {
> Propagate token, latency, and cost budgets to descendant tasks.
```ts
-import { Aspects } from "smithers-orchestrator";
+import { Aspects } from "smthrs";
type TokenBudgetConfig = {
max: number;
@@ -3380,7 +3380,7 @@ type AspectsProps = {
> Run a subtree in an isolated worktree (git or jj) rooted at `path`.
```ts
-import { Worktree } from "smithers-orchestrator";
+import { Worktree } from "smthrs";
type WorktreeProps = {
key?: string;
@@ -3420,7 +3420,7 @@ type WorktreeProps = {
```ts
// Props
-import { ReviewLoop } from "smithers-orchestrator";
+import { ReviewLoop } from "smthrs";
type ReviewLoopProps = {
id?: string; // default "review-loop"; task ids derived as {id}-produce, {id}-review
@@ -3464,7 +3464,7 @@ export default smithers(() => (
```ts
// Props
-import { Optimizer } from "smithers-orchestrator";
+import { Optimizer } from "smthrs";
type OptimizerProps = {
id?: string; // default "optimizer"; task ids {id}-generate, {id}-evaluate
@@ -3510,7 +3510,7 @@ export default smithers(() => (
```ts
// Props
-import { ContentPipeline } from "smithers-orchestrator";
+import { ContentPipeline } from "smthrs";
type ContentPipelineProps = {
id?: string;
@@ -3556,7 +3556,7 @@ export default smithers(() => (
```ts
// Props
-import { DriftDetector } from "smithers-orchestrator";
+import { DriftDetector } from "smthrs";
type DriftDetectorProps = {
id?: string; // default "drift"; ids {id}-capture, {id}-compare
@@ -3602,7 +3602,7 @@ type DriftDetectorProps = {
```ts
// Props
-import { ScanFixVerify } from "smithers-orchestrator";
+import { ScanFixVerify } from "smthrs";
type ScanFixVerifyProps = {
id?: string; // default "sfv"
@@ -3651,7 +3651,7 @@ type ScanFixVerifyProps = {
```ts
// Props
-import { Poller } from "smithers-orchestrator";
+import { Poller } from "smthrs";
type PollerProps = {
id?: string; // default "poll"
@@ -3694,7 +3694,7 @@ type PollerProps = {
```ts
// Props
-import { Runbook } from "smithers-orchestrator";
+import { Runbook } from "smthrs";
type RunbookProps = {
id?: string; // used as step-id prefix; defaults to "runbook" when omitted
@@ -3747,7 +3747,7 @@ export default smithers(() => (
```ts
// Props
-import { Supervisor } from "smithers-orchestrator";
+import { Supervisor } from "smthrs";
type SupervisorProps = {
id?: string; // default: "supervisor"
@@ -3798,7 +3798,7 @@ export default smithers(() => (
```ts
// Props
-import { MergeQueue } from "smithers-orchestrator";
+import { MergeQueue } from "smthrs";
type MergeQueueProps = {
id?: string;
@@ -3829,7 +3829,7 @@ type MergeQueueProps = {
```ts
// Props
-import { CheckSuite } from "smithers-orchestrator";
+import { CheckSuite } from "smthrs";
type CheckConfig = { id: string; agent?: AgentLike; command?: string; label?: string };
@@ -3872,7 +3872,7 @@ type CheckSuiteProps = {
```ts
// Props
-import { ClassifyAndRoute } from "smithers-orchestrator";
+import { ClassifyAndRoute } from "smthrs";
type CategoryConfig = {
agent: AgentLike;
@@ -3925,7 +3925,7 @@ const classification = ctx.outputMaybe(outputs.classification, {
```ts
// Props
-import { GatherAndSynthesize } from "smithers-orchestrator";
+import { GatherAndSynthesize } from "smthrs";
type SourceDef = {
agent: AgentLike;
@@ -3978,7 +3978,7 @@ type GatherAndSynthesizeProps = {
```ts
// Props
-import { Panel } from "smithers-orchestrator";
+import { Panel } from "smthrs";
type PanelistConfig = { agent: AgentLike; role?: string; label?: string };
@@ -4027,7 +4027,7 @@ type PanelProps = {
```ts
// Props
-import { Debate } from "smithers-orchestrator";
+import { Debate } from "smthrs";
type DebateProps = {
id?: string; // default: "debate"
@@ -4070,7 +4070,7 @@ type DebateProps = {
```ts
// Props
-import { Kanban } from "smithers-orchestrator";
+import { Kanban } from "smthrs";
type ColumnDef = {
name: string;
@@ -4125,7 +4125,7 @@ const columns = [
Each recipe is a working snippet plus one line of context. They compose freely.
-If you want a ready-to-run outcome before writing workflow code, start with Starters or run `bunx smithers-orchestrator starters`.
+If you want a ready-to-run outcome before writing workflow code, start with Starters or run `bunx smthrs starters`.
## Implement → review loop
@@ -4266,7 +4266,7 @@ One context boundary per logical operation, not per step. Splitting too finely l
## Per-agent least-privilege tools
```tsx
-import { AnthropicAgent } from "smithers-orchestrator";
+import { AnthropicAgent } from "smthrs";
const analyst = new AnthropicAgent({ model, system: "Return JSON" }); // no tools
const reviewer = new AnthropicAgent({ model, system: "...", tools: { read, grep } }); // read-only
@@ -4280,7 +4280,7 @@ Match the tool surface to the role.
External mutations must mark themselves and use the runtime idempotency key.
```tsx
-import { defineTool } from "smithers-orchestrator/tools";
+import { defineTool } from "smthrs/tools";
const createTicket = defineTool({
name: "jira.create",
@@ -4365,7 +4365,7 @@ Workflow logic factors out into hooks the same way React UI logic does.
Smithers records a jj change ID (or git SHA) per attempt. Revert any attempt to its exact workspace state:
```bash
-bunx smithers-orchestrator revert workflow.tsx --run-id --node-id implement --attempt 1
+bunx smthrs revert workflow.tsx --run-id --node-id implement --attempt 1
```
Useful when an experiment leaves the worktree in a bad state.
@@ -4373,10 +4373,10 @@ Useful when an experiment leaves the worktree in a bad state.
## Time travel: fork, replay, diff
```bash
-bunx smithers-orchestrator timeline --tree
-bunx smithers-orchestrator diff
-bunx smithers-orchestrator fork workflow.tsx --run-id --frame 5 --reset-node analyze --label exp1
-bunx smithers-orchestrator replay workflow.tsx --run-id --frame 5 --restore-vcs
+bunx smthrs timeline --tree
+bunx smthrs diff
+bunx smthrs fork workflow.tsx --run-id --frame 5 --reset-node analyze --label exp1
+bunx smthrs replay workflow.tsx --run-id --frame 5 --restore-vcs
```
Fork makes a child run without starting it (add `--run` to start immediately); replay also makes a child run but immediately resumes it. `--restore-vcs` checks out the original revision so re-execution sees the same source.
@@ -4384,7 +4384,7 @@ Fork makes a child run without starting it (add `--run` to start immediately); r
## Scoring tasks
```tsx
-import { schemaAdherenceScorer, latencyScorer, llmJudge } from "smithers-orchestrator/scorers";
+import { schemaAdherenceScorer, latencyScorer, llmJudge } from "smthrs/scorers";
.json`; the command exits non-zero on failures.
@@ -4431,7 +4431,7 @@ Avoids unbounded SQLite growth in long-lived loops.
## Hot reload while authoring
```bash
-bunx smithers-orchestrator up workflow.tsx --hot
+bunx smthrs up workflow.tsx --hot
```
Edits to the workflow source apply on the next render frame without losing in-flight task state. Schema changes still require a fresh run.
@@ -4467,9 +4467,9 @@ Every agent task produces a reusable session snapshot. `fork` starts a new task
## Types
-> Public TypeScript surface for smithers-orchestrator.
+> Public TypeScript surface for smthrs.
-One source of truth: `tsc --emitDeclarationOnly` would produce something close to this. Import these types from `smithers-orchestrator` unless noted otherwise.
+One source of truth: `tsc --emitDeclarationOnly` would produce something close to this. Import these types from `smthrs` unless noted otherwise.
Major sections at a glance:
- **Workflow / Context** — `SmithersWorkflow`, `SmithersCtx`, `RunOptions`, `RunResult` — the entry points for defining and running workflows.
@@ -4477,7 +4477,7 @@ Major sections at a glance:
- **Component props** — `WorkflowProps`, `ApprovalProps`, `SignalProps`, `LoopProps`, etc. — all JSX component interfaces.
- **Errors** — `SmithersError`, `KnownSmithersErrorCode` — typed error codes; see Errors for descriptions.
- **Server / Gateway** — `ServerOptions`, `GatewayOptions`, `GatewayAuthConfig` — self-hosting configuration.
-- **Scorers / Memory / OpenAPI / Observability** — sub-path imports (`smithers-orchestrator/scorers`, `/memory`, `/openapi`, `/observability`).
+- **Scorers / Memory / OpenAPI / Observability** — sub-path imports (`smthrs/scorers`, `/memory`, `/openapi`, `/observability`).
```ts
// =============================================================================
@@ -5088,7 +5088,7 @@ type GatewayOptions = {
};
// =============================================================================
-// Scorers (smithers-orchestrator/scorers)
+// Scorers (smthrs/scorers)
// =============================================================================
type ScoreResult = { score: number; reason?: string; meta?: Record };
@@ -5113,7 +5113,7 @@ type CreateScorerConfig = {
};
// =============================================================================
-// Memory (smithers-orchestrator/memory)
+// Memory (smthrs/memory)
// =============================================================================
type MemoryFact = { namespace: string; key: string; valueJson: string; schemaSig?: string | null; createdAtMs: number; updatedAtMs: number; ttlMs?: number | null };
@@ -5146,7 +5146,7 @@ type MemoryStore = {
};
// =============================================================================
-// OpenAPI tools (smithers-orchestrator/openapi)
+// OpenAPI tools (smthrs/openapi)
// =============================================================================
type OpenApiAuth =
@@ -5191,7 +5191,7 @@ type CreateSmithersApi = {
};
// =============================================================================
-// Observability (smithers-orchestrator/observability)
+// Observability (smthrs/observability)
// =============================================================================
type SmithersLogFormat = "json" | "pretty";
@@ -5200,7 +5200,7 @@ type SmithersObservabilityOptions = { service?: SmithersObservabilityService; lo
type ResolvedSmithersObservabilityOptions = SmithersObservabilityOptions & { metricsPort?: number; metricsPath?: string };
```
-For canonical, machine-checked types, install `smithers-orchestrator` and use editor go-to-definition. For runtime errors, see Errors.
+For canonical, machine-checked types, install `smthrs` and use editor go-to-definition. For runtime errors, see Errors.
---
@@ -5220,12 +5220,12 @@ import {
isKnownSmithersErrorCode,
isSmithersError,
knownSmithersErrorCodes,
-} from "smithers-orchestrator";
+} from "smthrs";
import type {
KnownSmithersErrorCode,
SmithersError,
SmithersErrorCode,
-} from "smithers-orchestrator";
+} from "smthrs";
```
Every built-in `SmithersErrorInstance` carries three pieces of documentation metadata:
@@ -5254,7 +5254,7 @@ Use `KnownSmithersErrorCode` for an exhaustive switch over built-in Smithers cod
```ts
import { Effect } from "effect";
-import { runWorkflow } from "smithers-orchestrator";
+import { runWorkflow } from "smthrs";
try {
await Effect.runPromise(runWorkflow(workflow, { input: {} }));
@@ -5446,7 +5446,7 @@ JSON response codes, not `SmithersErrorInstance` objects.
## Package Configuration
-> Reference for the smithers-orchestrator package exports, TypeScript configuration, and Bun preload setup.
+> Reference for the smthrs package exports, TypeScript configuration, and Bun preload setup.
This page covers: CLI binary usage, subpath export map, TypeScript compiler options, Bun preload and test config, and npm scripts.
@@ -5460,88 +5460,88 @@ Use the subpath form to import only the surface you need.
| Import path | Entry file | Purpose |
|---|---|---|
-| `smithers-orchestrator` | `./src/index.js` | Core API: `createSmithers`, components, `runWorkflow`, `renderMdx`, errors |
-| `smithers-orchestrator/gateway` | `./src/gateway.js` | Gateway server primitives from `@smithers-orchestrator/server/gateway` |
-| `smithers-orchestrator/gateway-client` | `./src/gateway-client.js` | Typed client helpers from `@smithers-orchestrator/gateway-client` |
-| `smithers-orchestrator/gateway-react` | `./src/gateway-react.js` | React hooks and providers for gateway-backed UIs |
-| `smithers-orchestrator/sandbox` | `./src/sandbox.js` | Sandbox provider contracts, bundles, and execution helpers |
-| `smithers-orchestrator/jsx-runtime` | `./src/jsx-runtime.js` | JSX runtime (auto-resolved by `jsxImportSource`) |
-| `smithers-orchestrator/jsx-dev-runtime` | `./src/jsx-runtime.js` | JSX dev runtime (auto-resolved in dev mode) |
-| `smithers-orchestrator/tools` | `./src/tools.js` | Tool sandbox: `defineTool`, `read`, `grep`, `bash`, `edit`, `write` |
-| `smithers-orchestrator/server` | `./src/server.js` | HTTP server for run management and event streaming |
-| `smithers-orchestrator/observability` | `./src/observability.js` | OpenTelemetry traces, metrics, and Prometheus integration |
-| `smithers-orchestrator/mdx-plugin` | `./src/mdx-plugin.js` | Bun preload plugin for `.mdx` imports |
-| `smithers-orchestrator/dom/renderer` | `./src/dom/renderer.js` | Internal renderer (advanced use) |
-| `smithers-orchestrator/serve` | `./src/serve.js` | Single-workflow HTTP server via `createServeApp` |
-| `smithers-orchestrator/scorers` | `./src/scorers.js` | Eval scorers: `createScorer`, `llmJudge`, `aggregateScores` |
-| `smithers-orchestrator/memory` | `./src/memory.js` | Cross-run facts, message history, processors, and metrics |
-| `smithers-orchestrator/openapi` | `./src/openapi.js` | Generate AI SDK tools from OpenAPI specs |
-| `smithers-orchestrator/control-plane` | `./src/control-plane.js` | Organization, project, billing, usage, secret-reference, and audit primitives |
-
-The PI plugin is published as the separate `@smithers-orchestrator/pi-plugin` package. The old `smithers-orchestrator/pi-plugin` and `smithers-orchestrator/pi-extension` subpaths are no longer exported.
+| `smthrs` | `./src/index.js` | Core API: `createSmithers`, components, `runWorkflow`, `renderMdx`, errors |
+| `smthrs/gateway` | `./src/gateway.js` | Gateway server primitives from `@smthrs/server/gateway` |
+| `smthrs/gateway-client` | `./src/gateway-client.js` | Typed client helpers from `@smthrs/gateway-client` |
+| `smthrs/gateway-react` | `./src/gateway-react.js` | React hooks and providers for gateway-backed UIs |
+| `smthrs/sandbox` | `./src/sandbox.js` | Sandbox provider contracts, bundles, and execution helpers |
+| `smthrs/jsx-runtime` | `./src/jsx-runtime.js` | JSX runtime (auto-resolved by `jsxImportSource`) |
+| `smthrs/jsx-dev-runtime` | `./src/jsx-runtime.js` | JSX dev runtime (auto-resolved in dev mode) |
+| `smthrs/tools` | `./src/tools.js` | Tool sandbox: `defineTool`, `read`, `grep`, `bash`, `edit`, `write` |
+| `smthrs/server` | `./src/server.js` | HTTP server for run management and event streaming |
+| `smthrs/observability` | `./src/observability.js` | OpenTelemetry traces, metrics, and Prometheus integration |
+| `smthrs/mdx-plugin` | `./src/mdx-plugin.js` | Bun preload plugin for `.mdx` imports |
+| `smthrs/dom/renderer` | `./src/dom/renderer.js` | Internal renderer (advanced use) |
+| `smthrs/serve` | `./src/serve.js` | Single-workflow HTTP server via `createServeApp` |
+| `smthrs/scorers` | `./src/scorers.js` | Eval scorers: `createScorer`, `llmJudge`, `aggregateScores` |
+| `smthrs/memory` | `./src/memory.js` | Cross-run facts, message history, processors, and metrics |
+| `smthrs/openapi` | `./src/openapi.js` | Generate AI SDK tools from OpenAPI specs |
+| `smthrs/control-plane` | `./src/control-plane.js` | Organization, project, billing, usage, secret-reference, and audit primitives |
+
+The PI plugin is published as the separate `@smthrs/pi-plugin` package. The old `smthrs/pi-plugin` and `smthrs/pi-extension` subpaths are no longer exported.
## Workspace Packages
-Most applications should import from `smithers-orchestrator`. The scoped workspace packages below are published for advanced integrations, custom clients, and framework development.
+Most applications should import from `smthrs`. The scoped workspace packages below are published for advanced integrations, custom clients, and framework development.
| Package | Primary surface | Related docs |
|---|---|---|
-| `smithers-orchestrator` | Public facade for workflow authoring, components, agents, tools, server helpers, memory, OpenAPI tools, scorers, and JSX runtime setup | This page, Types |
-| `@smithers-orchestrator/cli` | CLI entrypoint, MCP server, local workflow pack, account registry commands, DevTools commands, cron, alerts, and server commands | CLI Overview, MCP Server |
-| `@smithers-orchestrator/accounts` | Subscription and API-key account registry helpers: `listAccounts`, `addAccount`, `removeAccount`, `getAccount`, `accountToProviderEnv` | CLI Agents |
-| `@smithers-orchestrator/agents` | AI SDK and CLI agent adapters, CLI capability reports, agent contracts, and tool capability registry | CLI Agents, SDK Agents |
-| `@smithers-orchestrator/components` | JSX workflow components such as `Task`, `Workflow`, `Approval`, `Sandbox`, `Timer`, `Signal`, and control-flow components | Components |
-| `@smithers-orchestrator/control-plane` | Durable organization, project, team, billing, usage, secret-reference, and audit primitives for hosted deployments | Control Plane |
-| `@smithers-orchestrator/db` | SQLite/Drizzle adapter, table setup, run-state derivation, schema helpers, and output tables | Data Model, Run State |
-| `@smithers-orchestrator/devtools` | Snapshot, tree, diff, node lookup, task collection, and DevTools run-store helpers behind the CLI inspect commands | Debugging, CLI Overview |
-| `@smithers-orchestrator/driver` | Runtime driver contracts: `RunOptions`, `RunResult`, `RunStatus`, `SmithersCtx`, outputs, task runtime, interop, and child process helpers | Run Workflow, Execution Model |
-| `@smithers-orchestrator/engine` | Workflow rendering/execution API: `runWorkflow`, `renderFrame`, `workflow`, `Smithers`, `fragment`, signals, and Effect versioning | Render Frame, Run Workflow |
-| `@smithers-orchestrator/errors` | Error definitions, known codes, JSON serialization, docs URLs, and type guards | Errors |
-| `@smithers-orchestrator/gateway` | Stable Gateway RPC contracts, auth scopes, deployment metadata, and generated OpenAPI schema | Gateway, RPC |
-| `@smithers-orchestrator/gateway-client` | Browser/client SDK for Gateway RPC requests and event streams | Gateway |
-| `@smithers-orchestrator/gateway-react` | React hooks and root helpers for Gateway-backed UIs | Gateway |
-| `@smithers-orchestrator/graph` | Framework-neutral workflow graph model, XML nodes, task descriptors, and graph snapshots | Planner Internals, Types |
-| `@smithers-orchestrator/jj-darwin-arm64` | Vendored jj (Jujutsu) binary for darwin-arm64; auto-installed as an optional dependency of `@smithers-orchestrator/vcs`, not depended on directly | VCS Guide |
-| `@smithers-orchestrator/jj-darwin-x64` | Vendored jj (Jujutsu) binary for darwin-x64; auto-installed as an optional dependency of `@smithers-orchestrator/vcs`, not depended on directly | VCS Guide |
-| `@smithers-orchestrator/jj-linux-arm64` | Vendored jj (Jujutsu) binary for linux-arm64; auto-installed as an optional dependency of `@smithers-orchestrator/vcs`, not depended on directly | VCS Guide |
-| `@smithers-orchestrator/jj-linux-x64` | Vendored jj (Jujutsu) binary for linux-x64; auto-installed as an optional dependency of `@smithers-orchestrator/vcs`, not depended on directly | VCS Guide |
-| `@smithers-orchestrator/jj-win32-x64` | Vendored jj (Jujutsu) binary for win32-x64; auto-installed as an optional dependency of `@smithers-orchestrator/vcs`, not depended on directly | VCS Guide |
-| `@smithers-orchestrator/memory` | Cross-run facts, message history, processors, namespaces, service layer, and metrics | Memory, Memory Quickstart |
-| `@smithers-orchestrator/observability` | Event types, logging, tracing, metrics, Prometheus rendering, and runtime observability layers | Events, Event Types |
-| `@smithers-orchestrator/openapi` | OpenAPI parsing, operation extraction, AI SDK tool generation, schema conversion, and metrics | OpenAPI Tools, OpenAPI Quickstart |
-| `@smithers-orchestrator/pi-plugin` | PI extension runtime, views, API wrappers, and workflow inspection integration | PI Integration |
-| `@smithers-orchestrator/protocol` | Shared contracts, small value types, and protocol-level errors for cross-package use | Types, Errors |
-| `@smithers-orchestrator/react-reconciler` | Custom React reconciler, host context, DOM renderer, DevTools preload, driver, and JSX runtime internals | Why React, Render Frame |
-| `@smithers-orchestrator/sandbox` | Sandbox bundle, execute, and transport primitives used by the `Sandbox` component | Sandbox |
-| `@smithers-orchestrator/scheduler` | Pure workflow state machine: task state, scheduler decisions, retry/cache policies, wait reasons, and workflow session services | Workflow State, Suspend and Resume |
-| `@smithers-orchestrator/scorers` | Scorer definitions, LLM judges, batch execution, aggregation, persistence schema, and metrics | Evals, Evals Quickstart |
-| `@smithers-orchestrator/server` | HTTP, WebSocket, Gateway, cron, webhook, metrics, and single-workflow serving APIs | Server, Serve |
-| `@smithers-orchestrator/smithers` | Cerebras chat PWA and workflow graph demo application | CLI Overview |
-| `@smithers-orchestrator/smithers-demo` | Interactive Smithers workflow generator demo with React Flow visualization | CLI Overview |
-| `@smithers-orchestrator/smithers-studio-2` | Next Smithers Studio UI shell for browsing and driving workflow runs | CLI Overview |
-| `@smithers-orchestrator/smithers-tui-demo` | Private React TUI demo app for terminal workflow interaction experiments | CLI Overview |
-| `@smithers-orchestrator/time-travel` | Snapshots, diffs, forks, replay, timelines, VCS tags, rewind locks/audits, and time-travel metrics | Time Travel, Time Travel Quickstart |
-| `@smithers-orchestrator/tool-context` | AsyncLocalStorage tool-execution context (run/node/idempotency keys, durability snapshot hook) shared by the engine and `smithers-orchestrator` without a dependency cycle | Execution Model |
-| `@smithers-orchestrator/usage` | Account quota and rate-limit usage reporting for Smithers providers | CLI Overview |
-| `@smithers-orchestrator/vcs` | VCS discovery and jj workspace operations such as `runJj`, `workspaceAdd`, `workspaceList`, and pointer reverts | VCS Helpers, VCS Guide |
+| `smthrs` | Public facade for workflow authoring, components, agents, tools, server helpers, memory, OpenAPI tools, scorers, and JSX runtime setup | This page, Types |
+| `@smthrs/cli` | CLI entrypoint, MCP server, local workflow pack, account registry commands, DevTools commands, cron, alerts, and server commands | CLI Overview, MCP Server |
+| `@smthrs/accounts` | Subscription and API-key account registry helpers: `listAccounts`, `addAccount`, `removeAccount`, `getAccount`, `accountToProviderEnv` | CLI Agents |
+| `@smthrs/agents` | AI SDK and CLI agent adapters, CLI capability reports, agent contracts, and tool capability registry | CLI Agents, SDK Agents |
+| `@smthrs/components` | JSX workflow components such as `Task`, `Workflow`, `Approval`, `Sandbox`, `Timer`, `Signal`, and control-flow components | Components |
+| `@smthrs/control-plane` | Durable organization, project, team, billing, usage, secret-reference, and audit primitives for hosted deployments | Control Plane |
+| `@smthrs/db` | SQLite/Drizzle adapter, table setup, run-state derivation, schema helpers, and output tables | Data Model, Run State |
+| `@smthrs/devtools` | Snapshot, tree, diff, node lookup, task collection, and DevTools run-store helpers behind the CLI inspect commands | Debugging, CLI Overview |
+| `@smthrs/driver` | Runtime driver contracts: `RunOptions`, `RunResult`, `RunStatus`, `SmithersCtx`, outputs, task runtime, interop, and child process helpers | Run Workflow, Execution Model |
+| `@smthrs/engine` | Workflow rendering/execution API: `runWorkflow`, `renderFrame`, `workflow`, `Smithers`, `fragment`, signals, and Effect versioning | Render Frame, Run Workflow |
+| `@smthrs/errors` | Error definitions, known codes, JSON serialization, docs URLs, and type guards | Errors |
+| `@smthrs/gateway` | Stable Gateway RPC contracts, auth scopes, deployment metadata, and generated OpenAPI schema | Gateway, RPC |
+| `@smthrs/gateway-client` | Browser/client SDK for Gateway RPC requests and event streams | Gateway |
+| `@smthrs/gateway-react` | React hooks and root helpers for Gateway-backed UIs | Gateway |
+| `@smthrs/graph` | Framework-neutral workflow graph model, XML nodes, task descriptors, and graph snapshots | Planner Internals, Types |
+| `@smthrs/jj-darwin-arm64` | Vendored jj (Jujutsu) binary for darwin-arm64; auto-installed as an optional dependency of `@smthrs/vcs`, not depended on directly | VCS Guide |
+| `@smthrs/jj-darwin-x64` | Vendored jj (Jujutsu) binary for darwin-x64; auto-installed as an optional dependency of `@smthrs/vcs`, not depended on directly | VCS Guide |
+| `@smthrs/jj-linux-arm64` | Vendored jj (Jujutsu) binary for linux-arm64; auto-installed as an optional dependency of `@smthrs/vcs`, not depended on directly | VCS Guide |
+| `@smthrs/jj-linux-x64` | Vendored jj (Jujutsu) binary for linux-x64; auto-installed as an optional dependency of `@smthrs/vcs`, not depended on directly | VCS Guide |
+| `@smthrs/jj-win32-x64` | Vendored jj (Jujutsu) binary for win32-x64; auto-installed as an optional dependency of `@smthrs/vcs`, not depended on directly | VCS Guide |
+| `@smthrs/memory` | Cross-run facts, message history, processors, namespaces, service layer, and metrics | Memory, Memory Quickstart |
+| `@smthrs/observability` | Event types, logging, tracing, metrics, Prometheus rendering, and runtime observability layers | Events, Event Types |
+| `@smthrs/openapi` | OpenAPI parsing, operation extraction, AI SDK tool generation, schema conversion, and metrics | OpenAPI Tools, OpenAPI Quickstart |
+| `@smthrs/pi-plugin` | PI extension runtime, views, API wrappers, and workflow inspection integration | PI Integration |
+| `@smthrs/protocol` | Shared contracts, small value types, and protocol-level errors for cross-package use | Types, Errors |
+| `@smthrs/react-reconciler` | Custom React reconciler, host context, DOM renderer, DevTools preload, driver, and JSX runtime internals | Why React, Render Frame |
+| `@smthrs/sandbox` | Sandbox bundle, execute, and transport primitives used by the `Sandbox` component | Sandbox |
+| `@smthrs/scheduler` | Pure workflow state machine: task state, scheduler decisions, retry/cache policies, wait reasons, and workflow session services | Workflow State, Suspend and Resume |
+| `@smthrs/scorers` | Scorer definitions, LLM judges, batch execution, aggregation, persistence schema, and metrics | Evals, Evals Quickstart |
+| `@smthrs/server` | HTTP, WebSocket, Gateway, cron, webhook, metrics, and single-workflow serving APIs | Server, Serve |
+| `@smthrs/smithers` | Cerebras chat PWA and workflow graph demo application | CLI Overview |
+| `@smthrs/smithers-demo` | Interactive Smithers workflow generator demo with React Flow visualization | CLI Overview |
+| `@smthrs/smithers-studio-2` | Next Smithers Studio UI shell for browsing and driving workflow runs | CLI Overview |
+| `@smthrs/smithers-tui-demo` | Private React TUI demo app for terminal workflow interaction experiments | CLI Overview |
+| `@smthrs/time-travel` | Snapshots, diffs, forks, replay, timelines, VCS tags, rewind locks/audits, and time-travel metrics | Time Travel, Time Travel Quickstart |
+| `@smthrs/tool-context` | AsyncLocalStorage tool-execution context (run/node/idempotency keys, durability snapshot hook) shared by the engine and `smthrs` without a dependency cycle | Execution Model |
+| `@smthrs/usage` | Account quota and rate-limit usage reporting for Smithers providers | CLI Overview |
+| `@smthrs/vcs` | VCS discovery and jj workspace operations such as `runJj`, `workspaceAdd`, `workspaceList`, and pointer reverts | VCS Helpers, VCS Guide |
### Usage
```ts
// Core API
-import { createSmithers, runWorkflow } from "smithers-orchestrator";
+import { createSmithers, runWorkflow } from "smthrs";
// Tools
-import { defineTool, bash, read, write } from "smithers-orchestrator/tools";
+import { defineTool, bash, read, write } from "smthrs/tools";
// Scorers
-import { createScorer, llmJudge } from "smithers-orchestrator/scorers";
+import { createScorer, llmJudge } from "smthrs/scorers";
// MDX plugin (in preload.ts)
-import { mdxPlugin } from "smithers-orchestrator/mdx-plugin";
+import { mdxPlugin } from "smthrs/mdx-plugin";
// Control-plane primitives
-import { ControlPlaneStore } from "smithers-orchestrator/control-plane";
+import { ControlPlaneStore } from "smthrs/control-plane";
```
## TypeScript Configuration
@@ -5552,42 +5552,42 @@ import { ControlPlaneStore } from "smithers-orchestrator/control-plane";
{
"compilerOptions": {
"jsx": "react-jsx",
- "jsxImportSource": "smithers-orchestrator"
+ "jsxImportSource": "smthrs"
}
}
```
-This tells TypeScript to resolve JSX transforms from `smithers-orchestrator/jsx-runtime` instead of `react/jsx-runtime`. The Smithers JSX runtime re-exports React's runtime, so component behavior is identical. This setting enables proper type resolution for Smithers workflow components.
+This tells TypeScript to resolve JSX transforms from `smthrs/jsx-runtime` instead of `react/jsx-runtime`. The Smithers JSX runtime re-exports React's runtime, so component behavior is identical. This setting enables proper type resolution for Smithers workflow components.
See JSX Installation for the complete TypeScript setup.
### Path Aliases
-When developing inside the `smithers-orchestrator` monorepo, the root `tsconfig.json` defines path aliases so source imports resolve without a build step:
+When developing inside the `smthrs` monorepo, the root `tsconfig.json` defines path aliases so source imports resolve without a build step:
```jsonc
"paths": {
- "smithers-orchestrator": ["./packages/smithers/src/index.js"],
- "smithers-orchestrator/jsx-runtime": ["./packages/smithers/src/jsx-runtime.js"],
- "smithers-orchestrator/jsx-dev-runtime": ["./packages/smithers/src/jsx-runtime.js"],
- "smithers-orchestrator/tools": ["./packages/smithers/src/tools.js"],
- "smithers-orchestrator/*": [
+ "smthrs": ["./packages/smithers/src/index.js"],
+ "smthrs/jsx-runtime": ["./packages/smithers/src/jsx-runtime.js"],
+ "smthrs/jsx-dev-runtime": ["./packages/smithers/src/jsx-runtime.js"],
+ "smthrs/tools": ["./packages/smithers/src/tools.js"],
+ "smthrs/*": [
"./packages/smithers/src/*.js",
"./packages/smithers/src/*/index.js"
],
- "smithers-orchestrator/scorers": ["./packages/scorers/src/index.js"],
- "@smithers-orchestrator/agents": ["./packages/agents/src/index.js"],
- "@smithers-orchestrator/gateway-client": ["./packages/gateway-client/src/index.ts"],
- "@smithers-orchestrator/gateway-react": ["./packages/gateway-react/src/index.ts"],
- "@smithers-orchestrator/pi-plugin": ["./packages/pi-plugin/src/index.ts"],
- "@smithers-orchestrator/server": ["./packages/server/src/index.js"]
+ "smthrs/scorers": ["./packages/scorers/src/index.js"],
+ "@smthrs/agents": ["./packages/agents/src/index.js"],
+ "@smthrs/gateway-client": ["./packages/gateway-client/src/index.ts"],
+ "@smthrs/gateway-react": ["./packages/gateway-react/src/index.ts"],
+ "@smthrs/pi-plugin": ["./packages/pi-plugin/src/index.ts"],
+ "@smthrs/server": ["./packages/server/src/index.js"]
// The root tsconfig includes the same style of alias for each workspace package.
}
```
-The root package is a private `smithers-monorepo`; `smithers-orchestrator` resolves to `packages/smithers`.
+The root package is a private `smithers-monorepo`; `smthrs` resolves to `packages/smithers`.
-**End users do not need path aliases** — only framework developers do. Installing `smithers-orchestrator` as a dependency lets Node/Bun module resolution handle import paths automatically.
+**End users do not need path aliases** — only framework developers do. Installing `smthrs` as a dependency lets Node/Bun module resolution handle import paths automatically.
### Local Type Root Shims
@@ -5634,7 +5634,7 @@ Defined in the root `package.json` for development:
| Script | Command | Purpose |
|---|---|---|
| `typecheck` | `tsc --noEmit` | Type-check the `src/` and `tests/` trees against `tsconfig.json` |
-| `typecheck:examples` | `tsc -p examples/tsconfig.json --noEmit` | Type-check example files against a separate config that maps `smithers-orchestrator` to `examples-entry.js` |
+| `typecheck:examples` | `tsc -p examples/tsconfig.json --noEmit` | Type-check example files against a separate config that maps `smthrs` to `examples-entry.js` |
| `lint` | `oxlint ... packages/*/src packages/*/tests` | Lint package source and tests with oxlint |
| `lint:fix` | `oxlint ... --fix --fix-suggestions packages/*/src packages/*/tests` | Apply supported oxlint fixes |
| `cli` | `bun run apps/cli/src/index.js` | Run the local development CLI entrypoint |
@@ -5663,7 +5663,7 @@ See Production Project Structure for a complete user-project `package.json` exam
## VCS Helper Reference
-> Public JJ helper APIs exported by smithers-orchestrator for repo detection, snapshot inspection, and workspace management.
+> Public JJ helper APIs exported by smthrs for repo detection, snapshot inspection, and workspace management.
Smithers exports a small JJ helper surface for applications that inspect or manage Jujutsu state directly.
@@ -5684,7 +5684,7 @@ import {
workspaceAdd,
workspaceList,
workspaceClose,
-} from "smithers-orchestrator";
+} from "smthrs";
```
## `runJj(args, opts?)`
@@ -5842,10 +5842,10 @@ For workflow-level revert behavior, prefer the runtime and CLI docs:
## runWorkflow
-> Programmatic entry point. Equivalent to `bunx smithers-orchestrator up`.
+> Programmatic entry point. Equivalent to `bunx smthrs up`.
```ts
-import { runWorkflow } from "smithers-orchestrator";
+import { runWorkflow } from "smthrs";
import { Effect } from "effect";
const result = await Effect.runPromise(runWorkflow(workflow, {
@@ -5893,7 +5893,7 @@ All in-flight attempts are marked cancelled and `NodeCancelled` events are emitt
## Hijack handoff
-If a CLI hijack happens mid-run (`bunx smithers-orchestrator hijack `), the run ends `"cancelled"` and the latest attempt metadata stores `hijackHandoff`. On `resume: true`, Smithers waits for a safe handoff point and continues with the persisted CLI session id (see CLI Agents) or the persisted message history (SDK agents).
+If a CLI hijack happens mid-run (`bunx smthrs hijack `), the run ends `"cancelled"` and the latest attempt metadata stores `hijackHandoff`. On `resume: true`, Smithers waits for a safe handoff point and continues with the persisted CLI session id (see CLI Agents) or the persisted message history (SDK agents).
## `result.output`
@@ -5920,8 +5920,8 @@ const rows = db.query("SELECT * FROM page WHERE run_id = ? ORDER BY iteration DE
Use `renderFrame` to preview the task graph — for CI validation, graph-inspection UIs, or dry-run checks — without executing or persisting anything. `runId` and `iteration` are arbitrary strings used only for snapshot identity.
```ts
-import { renderFrame } from "smithers-orchestrator";
-import { SmithersCtx } from "@smithers-orchestrator/driver";
+import { renderFrame } from "smthrs";
+import { SmithersCtx } from "@smthrs/driver";
import { Effect } from "effect";
const ctx = new SmithersCtx({ runId: "preview", iteration: 0, input: { task: "preview" }, outputs: {} });
@@ -5961,7 +5961,7 @@ bunx smithers graph workflow.tsx --input '{"task":"preview"}'
Each successful task attempt captures the current [JJ](https://jj-vcs.github.io/jj/) change ID into `_smithers_attempts.jj_pointer`. `revert` restores the workspace to that state and discards any graph snapshots recorded after the attempt began, so the run's timeline rolls back to the point-in-time of that attempt.
```bash
-bunx smithers-orchestrator revert workflow.tsx \
+bunx smthrs revert workflow.tsx \
--run-id --node-id [--attempt N=1] [--iteration N=0]
```
@@ -5976,7 +5976,7 @@ Revert restores files only — it doesn't alter JJ history; the restoration crea
## Programmatic
```ts
-import { revertToAttempt } from "smithers-orchestrator";
+import { revertToAttempt } from "smthrs";
const result = await revertToAttempt(adapter, {
runId: "abc123",
@@ -6080,7 +6080,7 @@ Terminal states (`succeeded`, `failed`, `cancelled`) carry neither.
## computeRunState
```ts
-import { computeRunState } from "@smithers-orchestrator/db/runState";
+import { computeRunState } from "@smthrs/db/runState";
const view = await computeRunState(adapter, runId);
view.state; // "running" | ...
@@ -6096,7 +6096,7 @@ not run heuristics.
when you already have the rows in memory:
```ts
-import { deriveRunState } from "@smithers-orchestrator/db/runState";
+import { deriveRunState } from "@smthrs/db/runState";
const view = deriveRunState({
run,
@@ -6161,7 +6161,7 @@ Historical TUI product/design material is kept for reference, but it does not de
Run `smithers optimize` to generate improved prompts for agent tasks via GEPA, verify the improvement against your eval suite, and save the result as a reusable artifact.
```bash
-bunx smithers-orchestrator optimize workflow.tsx \
+bunx smthrs optimize workflow.tsx \
--cases evals/smoke.jsonl \
--suite smoke-gepa \
--provider cerebras \
@@ -6181,7 +6181,7 @@ The command writes the artifact only when the optimized score improves by at lea
Apply the optimized prompts to future evals with `--optimization`:
```bash
-bunx smithers-orchestrator eval workflow.tsx \
+bunx smthrs eval workflow.tsx \
--cases evals/smoke.jsonl \
--suite smoke-optimized \
--optimization .smithers/optimizations/smoke-gepa.json
@@ -6194,7 +6194,7 @@ The artifact patches only agent-backed `` prompts by `nodeId`. Workflow st
Example: the following run demonstrates a baseline failure corrected by a GEPA-generated patch. The baseline prompt did not include the required optimization token, so the eval failed. Cerebras GEPA generated a prompt patch that included the missing requirement, and the optimized eval passed.
```bash
-CEREBRAS_API_KEY=... bunx smithers-orchestrator optimize workflow.tsx \
+CEREBRAS_API_KEY=... bunx smthrs optimize workflow.tsx \
--cases evals/opt.jsonl \
--suite cerebras-proof \
--provider cerebras \
@@ -6265,7 +6265,7 @@ Memory persists state **across runs**. Task outputs are per-run; memory is per-n
## Three layers
```ts
-import { createMemoryStore } from "smithers-orchestrator/memory";
+import { createMemoryStore } from "smthrs/memory";
import { Database } from "bun:sqlite";
const store = createMemoryStore(new Database("smithers.db"));
@@ -6310,7 +6310,7 @@ Pick the kind to match the lifetime: `workflow` is scoped to a workflow definiti
Maintenance jobs you run periodically:
```ts
-import { TtlGarbageCollector, TokenLimiter, Summarizer } from "smithers-orchestrator/memory";
+import { TtlGarbageCollector, TokenLimiter, Summarizer } from "smthrs/memory";
const gc = TtlGarbageCollector(); // expire facts past their TTL
const limiter = TokenLimiter(4000); // keep history under token budget
@@ -6324,7 +6324,7 @@ await summarizer.process(store);
## Inspect from the CLI
```bash
-bunx smithers-orchestrator memory list workflow:code-review -w workflow.tsx
+bunx smthrs memory list workflow:code-review -w workflow.tsx
```
The CLI currently exposes fact listing. Use the store API for writes, deletes, threads, messages, and TTL cleanup.
@@ -6358,7 +6358,7 @@ This material is now in the opt-in `/llms-memory.txt` fragment.
`createOpenApiTools` parses an OpenAPI 3.x spec and returns AI SDK tools — one per operation, with Zod schemas converted from the spec's JSON schemas.
```ts
-import { createOpenApiTools } from "smithers-orchestrator/openapi";
+import { createOpenApiTools } from "smthrs/openapi";
const tools = await createOpenApiTools("./petstore.json", {
baseUrl: "https://api.petstore.example.com",
@@ -6403,7 +6403,7 @@ Pass the spec itself as the first argument to `createOpenApiTools(input, options
## CLI preview
```bash
-bunx smithers-orchestrator openapi list ./api/openapi.yaml
+bunx smthrs openapi list ./api/openapi.yaml
```
Lists every operationId, method, path, and summary — useful for auditing what an agent will be able to call before wiring it up.
@@ -6429,7 +6429,7 @@ For each operation:
## Observability
-Each tool call emits an `OpenApiToolCalled` event with `operationId`, `method`, `path`, `durationMs`, `status`. Visible via `bunx smithers-orchestrator events --type openapi`.
+Each tool call emits an `OpenApiToolCalled` event with `operationId`, `method`, `path`, `durationMs`, `status`. Visible via `bunx smthrs events --type openapi`.
## Notes
@@ -6462,7 +6462,7 @@ This material is now in the opt-in `/llms-openapi.txt` fragment.
## Quick start
```ts
-import { startServer } from "smithers-orchestrator";
+import { startServer } from "smthrs";
import { drizzle } from "drizzle-orm/bun-sqlite";
const server = startServer({
@@ -6527,7 +6527,7 @@ Errors use the envelope `{ "error": { "code", "message", "details" } }`. Common
Tools resolve relative to `rootDir`. The example below exposes a workflow that uses the built-in `bash` tool through the server; clients call it via `POST /v1/runs`.
```tsx
-import { Task, Workflow, createSmithers, bash } from "smithers-orchestrator";
+import { Task, Workflow, createSmithers, bash } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -6572,7 +6572,7 @@ Serve mode starts a Hono-based HTTP server alongside a running workflow. Every r
## CLI
```bash
-bunx smithers-orchestrator up workflow.tsx --serve --port 3000 --host 0.0.0.0
+bunx smthrs up workflow.tsx --serve --port 3000 --host 0.0.0.0
```
| Flag | Default | Description |
@@ -6588,13 +6588,13 @@ The process stays alive after the workflow completes so final state remains quer
Detached mode:
```bash
-bunx smithers-orchestrator up workflow.tsx --serve --port 8080 -d
+bunx smthrs up workflow.tsx --serve --port 8080 -d
```
## Programmatic
```ts
-import { createServeApp } from "smithers-orchestrator/serve";
+import { createServeApp } from "smthrs/serve";
const app = createServeApp({
workflow,
@@ -6755,7 +6755,7 @@ Unknown routes return `404` with code `NOT_FOUND`.
```bash
# Start a workflow with serve mode
-bunx smithers-orchestrator up workflow.tsx --serve --port 8080 --auth-token sk-secret
+bunx smthrs up workflow.tsx --serve --port 8080 --auth-token sk-secret
# Status
curl http://localhost:8080/ -H "Authorization: Bearer sk-secret"
@@ -6784,7 +6784,7 @@ curl http://localhost:8080/health
## Quick start
```tsx
-import { Gateway, Task, Workflow, createSmithers } from "smithers-orchestrator";
+import { Gateway, Task, Workflow, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -6830,7 +6830,7 @@ ws.onopen = () => ws.send(JSON.stringify({
Programmatic clients — bots, schedulers, dashboards, third-party UIs — talk to the Gateway through the typed client SDK over the same RPC and WebSocket API. For the full custom-UI guide (declarative queries, pushed updates, stale guards, reconnect/resume, backpressure, optimistic mutations, auth, vanilla JS + React hooks) see Custom UIs.
```ts
-import { SmithersGatewayClient } from "smithers-orchestrator/gateway-client";
+import { SmithersGatewayClient } from "smthrs/gateway-client";
const gateway = new SmithersGatewayClient();
const workflows = await gateway.listWorkflows();
@@ -6846,8 +6846,8 @@ Gateway client exports:
| Package | Exports |
|---|---|
-| `smithers-orchestrator/gateway-client` | `SmithersGatewayClient`, `SmithersGatewayConnection`, `GatewayRpcError`, `gatewayBackoffDelay`, RPC frame/type-map types, `GatewayUiBootConfig`, `SmithersGatewayClientOptions` |
-| `smithers-orchestrator/gateway-react` | `SmithersGatewayProvider`, `createGatewayReactRoot`, `useGatewayRun`, `useGatewayRuns`, `useGatewayWorkflows`, `useGatewayApprovals`, `useGatewayNodeOutput`, `useGatewayRunEvents`, `useGatewayActions`, `useGatewayRpc`, `useSmithersGateway` |
+| `smthrs/gateway-client` | `SmithersGatewayClient`, `SmithersGatewayConnection`, `GatewayRpcError`, `gatewayBackoffDelay`, RPC frame/type-map types, `GatewayUiBootConfig`, `SmithersGatewayClientOptions` |
+| `smthrs/gateway-react` | `SmithersGatewayProvider`, `createGatewayReactRoot`, `useGatewayRun`, `useGatewayRuns`, `useGatewayWorkflows`, `useGatewayApprovals`, `useGatewayNodeOutput`, `useGatewayRunEvents`, `useGatewayActions`, `useGatewayRpc`, `useSmithersGateway` |
## RPC methods (TOON)
@@ -7207,20 +7207,20 @@ For clients that read JSON config directly:
"mcpServers": {
"smithers": {
"command": "bunx",
- "args": ["smithers-orchestrator", "--mcp"]
+ "args": ["smthrs", "--mcp"]
}
}
}
```
-Project-scoped install (e.g. a monorepo where Smithers is a dev dependency — ensure `smithers-orchestrator` is in the local `package.json`):
+Project-scoped install (e.g. a monorepo where Smithers is a dev dependency — ensure `smthrs` is in the local `package.json`):
```json
{
"mcpServers": {
"smithers": {
"command": "bunx",
- "args": ["smithers-orchestrator", "--mcp"]
+ "args": ["smthrs", "--mcp"]
}
}
}
@@ -7934,7 +7934,7 @@ you need a React-free API for generated workflow definitions.
## Minimal workflow
```ts
-import { Smithers } from "smithers-orchestrator";
+import { Smithers } from "smthrs";
import { Effect, Schema } from "effect";
const inputSchema = Schema.Struct({
@@ -8213,7 +8213,7 @@ const opsAgent = new Agent({
Use this when your CLI agent already supports external integrations and Smithers should only orchestrate the task.
```ts
-import { PiAgent } from "smithers-orchestrator";
+import { PiAgent } from "smthrs";
const pi = new PiAgent({
provider: "openai",
@@ -8267,7 +8267,7 @@ CLI-backed agent classes wrap external AI command-line tools and implement the [
## Quick Start
```tsx
-import { ClaudeCodeAgent, Task, Workflow, createSmithers } from "smithers-orchestrator";
+import { ClaudeCodeAgent, Task, Workflow, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -8310,7 +8310,7 @@ CLI binaries must be on `PATH`: `claude`, `codex`, `agy`, `pi`, `kimi`, `forge`,
`CodexAgent` is the Smithers wrapper for OpenAI's `codex` CLI. It runs `codex exec` in non-interactive mode, sends the task prompt over stdin, forces `--json` so Smithers can stream structured progress, and captures the final assistant message via `--output-last-message`.
```tsx
-import { CodexAgent, Task, Workflow, createSmithers } from "smithers-orchestrator";
+import { CodexAgent, Task, Workflow, createSmithers } from "smthrs";
import { z } from "zod";
const { smithers, outputs } = createSmithers({
@@ -8337,7 +8337,7 @@ export default smithers(() => (
- Subscription login: run `codex login` once. For isolated accounts, pass `configDir`; Smithers sets `CODEX_HOME` for that invocation.
- API billing: pass `apiKey` or set `OPENAI_API_KEY`; Smithers forwards it to the spawned `codex` process.
-- Account registry: `bunx smithers-orchestrator agents add --provider codex ...` registers a subscription config directory, while `--provider openai-api` registers API-key billing for Codex-compatible providers.
+- Account registry: `bunx smthrs agents add --provider codex ...` registers a subscription config directory, while `--provider openai-api` registers API-key billing for Codex-compatible providers.
### Structured output
@@ -8379,7 +8379,7 @@ await agent.generate({
`ClaudeCodeAgent` extends the base with Claude Code-specific session and permission flags. Key additions: `permissionMode`, `sessionId`, `mcpConfig`, `resume`.
```ts
-import { ClaudeCodeAgent } from "smithers-orchestrator";
+import { ClaudeCodeAgent } from "smthrs";
new ClaudeCodeAgent({
permissionMode?: "acceptEdits" | "bypassPermissions" | "default" | "delegate" | "dontAsk" | "plan";
allowedTools?: string[]; disallowedTools?: string[]; disableSlashCommands?: boolean;
@@ -8400,7 +8400,7 @@ new ClaudeCodeAgent({
`CodexAgent` extends the base with OpenAI Codex-specific flags. Key additions: `sandbox`, `config`, `outputSchema`.
```ts
-import { CodexAgent } from "smithers-orchestrator";
+import { CodexAgent } from "smthrs";
new CodexAgent({
sandbox?: "read-only" | "workspace-write" | "danger-full-access";
fullAuto?: boolean; dangerouslyBypassApprovalsAndSandbox?: boolean;
@@ -8417,7 +8417,7 @@ new CodexAgent({
`AntigravityAgent` wraps the Google `agy` CLI. Key additions: `allowedMcpServerNames`, `geminiDir`, `conversation`, `continue`, and `resume`.
```ts
-import { AntigravityAgent } from "smithers-orchestrator";
+import { AntigravityAgent } from "smthrs";
new AntigravityAgent({
model?: string; sandbox?: boolean;
yolo?: boolean; dangerouslySkipPermissions?: boolean;
@@ -8454,7 +8454,7 @@ outside workflow launch through `agy plugin`.
`PiAgent` wraps the Pi CLI and adds extension UI hook support. Key additions: `mode`, `onExtensionUiRequest`, `extension`, `thinking`.
```ts
-import { PiAgent, type PiExtensionUiRequest, type PiExtensionUiResponse } from "smithers-orchestrator";
+import { PiAgent, type PiExtensionUiRequest, type PiExtensionUiResponse } from "smthrs";
new PiAgent({
provider?: string; apiKey?: string; appendSystemPrompt?: string; mode?: "text" | "json" | "rpc";
print?: boolean; continue?: boolean; resume?: boolean; session?: string;
@@ -8472,7 +8472,7 @@ new PiAgent({
`KimiAgent` wraps the Moonshot Kimi CLI with automatic session isolation. Key additions: `thinking`, `agent`, `maxRalphIterations`.
```ts
-import { KimiAgent } from "smithers-orchestrator";
+import { KimiAgent } from "smthrs";
new KimiAgent({
thinking?: boolean; outputFormat?: "text" | "stream-json";
finalMessageOnly?: boolean; quiet?: boolean;
@@ -8487,7 +8487,7 @@ new KimiAgent({
`ForgeAgent` wraps the Forge CLI and supports 300+ models via provider/model strings. Key additions: `conversationId`, `provider`, `workflow`.
```ts
-import { ForgeAgent } from "smithers-orchestrator";
+import { ForgeAgent } from "smthrs";
new ForgeAgent({
directory?: string; provider?: string; agent?: string;
conversationId?: string; sandbox?: string; restricted?: boolean;
@@ -8498,7 +8498,7 @@ new ForgeAgent({
`AmpAgent` wraps the Amp CLI in `--execute` headless mode. Key additions: `visibility`, `mcpConfig`, `dangerouslyAllowAll`.
```ts
-import { AmpAgent } from "smithers-orchestrator";
+import { AmpAgent } from "smthrs";
new AmpAgent({
visibility?: "private" | "public" | "workspace" | "group";
mcpConfig?: string; settingsFile?: string;
@@ -8510,7 +8510,7 @@ new AmpAgent({
`OpenCodeAgent` wraps the OpenCode CLI via `opencode run --format json`. Key additions: `agentName`, `continueSession`, `sessionId`. Note: native hijack support is not yet shipped.
```ts
-import { OpenCodeAgent } from "smithers-orchestrator";
+import { OpenCodeAgent } from "smthrs";
new OpenCodeAgent({
model?: string; agentName?: string;
attachFiles?: string[];
@@ -8521,7 +8521,7 @@ new OpenCodeAgent({
## Hijack handoff
-Most built-in CLI agents support `bunx smithers-orchestrator hijack `, which relaunches the agent in its native CLI session for interactive takeover.
+Most built-in CLI agents support `bunx smthrs hijack `, which relaunches the agent in its native CLI session for interactive takeover.
Smithers persists the native session or conversation id on each task event. On hijack, it waits for a safe boundary between blocking tool calls, then reopens the session via the vendor's resume flag:
@@ -8560,7 +8560,7 @@ import {
AnthropicAgent,
OpenAIAgent,
tools,
-} from "smithers-orchestrator";
+} from "smthrs";
import { stepCountIs } from "ai";
```
@@ -8651,7 +8651,7 @@ Use the `createOpenAI` path when you need provider-level configuration beyond `b
[Hermes](https://github.com/NousResearch/hermes-agent) (Nous Research) exposes an OpenAI-compatible HTTP API, so `HermesAgent` is a convenience subclass of `OpenAIAgent` that points the provider at your Hermes server and disables native structured output by default (a local Hermes server may not honor JSON-schema response formats).
```ts
-import { HermesAgent } from "smithers-orchestrator";
+import { HermesAgent } from "smthrs";
const hermes = new HermesAgent({
baseURL: "http://127.0.0.1:5123/v1", // or set HERMES_BASE_URL
@@ -8714,7 +8714,7 @@ export const claude = useCli
> Sandboxed file and shell tools for AI agent tasks, with exact input schemas, security policies, and usage examples.
```ts
-import { tools, read, write, edit, grep, bash, defineTool, getDefinedToolMetadata } from "smithers-orchestrator";
+import { tools, read, write, edit, grep, bash, defineTool, getDefinedToolMetadata } from "smthrs";
```
`tools` bundles all five tools keyed by name:
@@ -8723,7 +8723,7 @@ import { tools, read, write, edit, grep, bash, defineTool, getDefinedToolMetadat
const { read, write, edit, grep, bash } = tools;
```
-The `smithers-orchestrator/tools` subpath also exports lower-level helpers for advanced integrations:
+The `smthrs/tools` subpath also exports lower-level helpers for advanced integrations:
| Export | Purpose |
|---|---|
@@ -8769,7 +8769,7 @@ Every invocation is logged to `_smithers_tool_calls`:
`defineTool()` wraps custom AI SDK tools with Smithers runtime context, deterministic idempotency keys, and durable tool-call logging.
```ts
-import { defineTool } from "smithers-orchestrator";
+import { defineTool } from "smthrs";
import { z } from "zod";
const placeOrder = defineTool({
@@ -8870,7 +8870,7 @@ Returns file contents as UTF-8. Throws `"File too large"` if size exceeds `maxOu
```ts
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { read, grep } from "smithers-orchestrator";
+import { read, grep } from "smthrs";
const codeAgent = new Agent({
model: anthropic("claude-sonnet-4-20250514"),
@@ -8903,7 +8903,7 @@ Returns `"ok"`. Throws `"Content too large"` if content exceeds `maxOutputBytes`
```ts
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { write, read } from "smithers-orchestrator";
+import { write, read } from "smthrs";
const writerAgent = new Agent({
model: anthropic("claude-sonnet-4-20250514"),
@@ -8990,7 +8990,7 @@ Local git commands (`git status`, `git diff`, `git log`) are allowed.
```ts
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { bash } from "smithers-orchestrator";
+import { bash } from "smthrs";
const devAgent = new Agent({
model: anthropic("claude-sonnet-4-20250514"),
@@ -9014,7 +9014,7 @@ Pass tools to an AI SDK agent and assign the agent to a ``:
```tsx
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { createSmithers, read, write, edit, grep, bash, Task } from "smithers-orchestrator";
+import { createSmithers, read, write, edit, grep, bash, Task } from "smthrs";
import { z } from "zod";
const codeAgent = new Agent({
@@ -9041,7 +9041,7 @@ The full bundle works too:
```ts
import { ToolLoopAgent as Agent } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
-import { tools } from "smithers-orchestrator";
+import { tools } from "smthrs";
const fullAgent = new Agent({
model: anthropic("claude-sonnet-4-20250514"),
@@ -9060,7 +9060,7 @@ const fullAgent = new Agent({
```ts
import { Effect } from "effect";
-import { runWorkflow } from "smithers-orchestrator";
+import { runWorkflow } from "smthrs";
const result = await Effect.runPromise(runWorkflow(workflow, {
input: { file: "src/auth.ts" },
@@ -9188,7 +9188,7 @@ Smithers provides deterministic orchestration (workflow graph, approvals, retrie
### 1) PI as Workflow Agent
```tsx
-import { PiAgent } from "smithers-orchestrator";
+import { PiAgent } from "smthrs";
const pi = new PiAgent({
provider: "openai",
@@ -9208,13 +9208,13 @@ PI sessions are first-class hijack targets. `smithers hijack --target pi
### 2) PI Server Client
-Drive Smithers server APIs from a PI extension or any Node process via `@smithers-orchestrator/pi-plugin`:
+Drive Smithers server APIs from a PI extension or any Node process via `@smthrs/pi-plugin`:
```ts
-import { runWorkflow, approve, streamEvents } from "@smithers-orchestrator/pi-plugin";
+import { runWorkflow, approve, streamEvents } from "@smthrs/pi-plugin";
```
-The older `smithers-orchestrator/pi-plugin` and `smithers-orchestrator/pi-extension` subpaths were removed; use the scoped package directly.
+The older `smthrs/pi-plugin` and `smthrs/pi-extension` subpaths were removed; use the scoped package directly.
### 3) Hybrid: PI Extensibility + Smithers Orchestration
@@ -9224,7 +9224,7 @@ The older `smithers-orchestrator/pi-plugin` and `smithers-orchestrator/pi-extens
Patterns:
1. PI skill-driven coding task inside a Smithers ``.
-2. PI extension command that starts/resumes Smithers workflows via server API or `@smithers-orchestrator/pi-plugin`.
+2. PI extension command that starts/resumes Smithers workflows via server API or `@smthrs/pi-plugin`.
3. Smithers workflow output persisted to SQLite and consumed by later PI-assisted tasks.
## Hijacking PI Sessions
@@ -9247,7 +9247,7 @@ Session persistence:
1. Install PI CLI and add to `PATH`.
2. Configure PI credentials via env/config (prefer over CLI args for API keys).
3. Instantiate `PiAgent` with explicit options in workflows.
-4. For server-driven workflows, use `@smithers-orchestrator/pi-plugin`.
+4. For server-driven workflows, use `@smthrs/pi-plugin`.
```bash
# Verify PI is installed
@@ -9263,7 +9263,7 @@ pi --version
## Limitations
-Smithers does not provide a chat interface for PI. Chat UI integration is the responsibility of the host application using `@smithers-orchestrator/pi-plugin`.
+Smithers does not provide a chat interface for PI. Chat UI integration is the responsibility of the host application using `@smthrs/pi-plugin`.
===============================================================================
@@ -9283,7 +9283,7 @@ Smithers does not provide a chat interface for PI. Chat UI integration is the re
## Subscribe via `onProgress`
```ts
-import { runWorkflow } from "smithers-orchestrator";
+import { runWorkflow } from "smthrs";
import { Effect } from "effect";
import workflow from "./workflow";
@@ -9310,8 +9310,8 @@ jq -r .type .smithers/executions//logs/stream.ndjson | sort | uniq -c |
Or with the CLI:
```bash
-bunx smithers-orchestrator events --json
-bunx smithers-orchestrator events --type tool-call --node analyze
+bunx smthrs events --json
+bunx smthrs events --type tool-call --node analyze
```
## Common fields
@@ -9326,7 +9326,7 @@ Every event includes `type`, `runId`, `timestampMs`. Node-scoped events add `nod
## Event categories
-Used by `bunx smithers-orchestrator events --type ` and the metrics layer.
+Used by `bunx smthrs events --type ` and the metrics layer.
| Category | Events |
|---|---|
@@ -9359,7 +9359,7 @@ Used by `bunx smithers-orchestrator events --type ` and the metrics la
| `ApprovalGranted` / `ApprovalDenied` | Approval counters |
| `TokenUsageReported` | Token usage counters per model/agent |
-`trackSmithersEvent` from `smithers-orchestrator/observability` exposes this mapping for custom integrations. See Observability for the full OTLP/Prometheus setup.
+`trackSmithersEvent` from `smthrs/observability` exposes this mapping for custom integrations. See Observability for the full OTLP/Prometheus setup.
---
diff --git a/docs/references/smithers/apps/cli/docs/llms.txt b/docs/references/smithers/apps/cli/docs/llms.txt
index b2849b48f..af292c7c6 100644
--- a/docs/references/smithers/apps/cli/docs/llms.txt
+++ b/docs/references/smithers/apps/cli/docs/llms.txt
@@ -44,6 +44,6 @@ Examples:
## Pointers
-- npm: smithers-orchestrator
+- npm: smthrs
- github: github.com/smithersai/smithers
- changelogs: docs/changelogs/ on the site (not duplicated in llms files)
diff --git a/docs/references/smithers/apps/cli/package.json b/docs/references/smithers/apps/cli/package.json
index 468a05651..d6c49a9a0 100644
--- a/docs/references/smithers/apps/cli/package.json
+++ b/docs/references/smithers/apps/cli/package.json
@@ -1,5 +1,5 @@
{
- "name": "@smithers-orchestrator/cli",
+ "name": "@smthrs/cli",
"version": "0.23.0",
"description": "Smithers command-line interface, MCP server, and local workflow tools",
"type": "module",
@@ -31,24 +31,24 @@
"@effect/workflow": "^0.18.0",
"@clack/prompts": "^0.10.1",
"@modelcontextprotocol/sdk": "^1.29.0",
- "@smithers-orchestrator/accounts": "workspace:*",
- "@smithers-orchestrator/agents": "workspace:*",
- "@smithers-orchestrator/usage": "workspace:*",
- "@smithers-orchestrator/components": "workspace:*",
- "@smithers-orchestrator/db": "workspace:*",
- "@smithers-orchestrator/devtools": "workspace:*",
- "@smithers-orchestrator/driver": "workspace:*",
- "@smithers-orchestrator/engine": "workspace:*",
- "@smithers-orchestrator/errors": "workspace:*",
- "@smithers-orchestrator/memory": "workspace:*",
- "@smithers-orchestrator/observability": "workspace:*",
- "@smithers-orchestrator/openapi": "workspace:*",
- "@smithers-orchestrator/protocol": "workspace:*",
- "@smithers-orchestrator/scheduler": "workspace:*",
- "@smithers-orchestrator/server": "workspace:*",
- "@smithers-orchestrator/time-travel": "workspace:*",
- "@smithers-orchestrator/vcs": "workspace:*",
- "smithers-orchestrator": "workspace:*",
+ "@smthrs/accounts": "^0.33.0",
+ "@smthrs/agents": "^0.33.0",
+ "@smthrs/usage": "^0.33.0",
+ "@smthrs/components": "^0.33.0",
+ "@smthrs/db": "^0.33.0",
+ "@smthrs/devtools": "^0.33.0",
+ "@smthrs/driver": "^0.33.0",
+ "@smthrs/engine": "^0.33.0",
+ "@smthrs/errors": "^0.33.0",
+ "@smthrs/memory": "^0.33.0",
+ "@smthrs/observability": "^0.33.0",
+ "@smthrs/openapi": "^0.33.0",
+ "@smthrs/protocol": "^0.33.0",
+ "@smthrs/scheduler": "^0.33.0",
+ "@smthrs/server": "^0.33.0",
+ "@smthrs/time-travel": "^0.33.0",
+ "@smthrs/vcs": "^0.33.0",
+ "smthrs": "^0.33.0",
"cron-parser": "^5.5.0",
"drizzle-orm": "^0.45.2",
"effect": "^3.21.1",
diff --git a/docs/references/smithers/apps/cli/src/AskOptions.ts b/docs/references/smithers/apps/cli/src/AskOptions.ts
index f289767f3..685d9d9fe 100644
--- a/docs/references/smithers/apps/cli/src/AskOptions.ts
+++ b/docs/references/smithers/apps/cli/src/AskOptions.ts
@@ -1,4 +1,4 @@
-import type { SmithersToolSurface } from "@smithers-orchestrator/agents/agent-contract";
+import type { SmithersToolSurface } from "@smthrs/agents/agent-contract";
export type AskAgentId = "claude" | "codex" | "kimi" | "antigravity" | "gemini" | "pi";
diff --git a/docs/references/smithers/apps/cli/src/RunDiffCommandInput.ts b/docs/references/smithers/apps/cli/src/RunDiffCommandInput.ts
index 07a2a3b40..98a2317c2 100644
--- a/docs/references/smithers/apps/cli/src/RunDiffCommandInput.ts
+++ b/docs/references/smithers/apps/cli/src/RunDiffCommandInput.ts
@@ -1,4 +1,4 @@
-import type { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import type { SmithersDb } from "@smthrs/db/adapter";
export type RunDiffCommandInput = {
adapter: SmithersDb;
diff --git a/docs/references/smithers/apps/cli/src/RunOutputCommandInput.ts b/docs/references/smithers/apps/cli/src/RunOutputCommandInput.ts
index 421c75eb0..ede31fd4c 100644
--- a/docs/references/smithers/apps/cli/src/RunOutputCommandInput.ts
+++ b/docs/references/smithers/apps/cli/src/RunOutputCommandInput.ts
@@ -1,4 +1,4 @@
-import type { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import type { SmithersDb } from "@smthrs/db/adapter";
export type RunOutputCommandInput = {
adapter: SmithersDb;
diff --git a/docs/references/smithers/apps/cli/src/RunRewindCommandInput.ts b/docs/references/smithers/apps/cli/src/RunRewindCommandInput.ts
index 143efe2aa..ce987ff6d 100644
--- a/docs/references/smithers/apps/cli/src/RunRewindCommandInput.ts
+++ b/docs/references/smithers/apps/cli/src/RunRewindCommandInput.ts
@@ -1,4 +1,4 @@
-import type { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import type { SmithersDb } from "@smthrs/db/adapter";
export type RunRewindCommandInput = {
adapter: SmithersDb;
diff --git a/docs/references/smithers/apps/cli/src/RunTreeCommandInput.ts b/docs/references/smithers/apps/cli/src/RunTreeCommandInput.ts
index c2b05adf8..dc6ec9789 100644
--- a/docs/references/smithers/apps/cli/src/RunTreeCommandInput.ts
+++ b/docs/references/smithers/apps/cli/src/RunTreeCommandInput.ts
@@ -1,4 +1,4 @@
-import type { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import type { SmithersDb } from "@smthrs/db/adapter";
export type RunTreeCommandInput = {
adapter: SmithersDb;
diff --git a/docs/references/smithers/apps/cli/src/SmithersEventType.ts b/docs/references/smithers/apps/cli/src/SmithersEventType.ts
index aa6164023..ea5056b66 100644
--- a/docs/references/smithers/apps/cli/src/SmithersEventType.ts
+++ b/docs/references/smithers/apps/cli/src/SmithersEventType.ts
@@ -1,3 +1,3 @@
-import type { SmithersEvent } from "@smithers-orchestrator/observability/SmithersEvent";
+import type { SmithersEvent } from "@smthrs/observability/SmithersEvent";
export type SmithersEventType = SmithersEvent["type"];
diff --git a/docs/references/smithers/apps/cli/src/SupervisorOptions.ts b/docs/references/smithers/apps/cli/src/SupervisorOptions.ts
index 647347339..359e2eead 100644
--- a/docs/references/smithers/apps/cli/src/SupervisorOptions.ts
+++ b/docs/references/smithers/apps/cli/src/SupervisorOptions.ts
@@ -1,4 +1,4 @@
-import type { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import type { SmithersDb } from "@smthrs/db/adapter";
export type SupervisorSpawnClaim = {
claimOwnerId: string;
diff --git a/docs/references/smithers/apps/cli/src/agent-commands/agentAddWizard.js b/docs/references/smithers/apps/cli/src/agent-commands/agentAddWizard.js
index ea57ca4b7..e378dc31c 100644
--- a/docs/references/smithers/apps/cli/src/agent-commands/agentAddWizard.js
+++ b/docs/references/smithers/apps/cli/src/agent-commands/agentAddWizard.js
@@ -1,8 +1,8 @@
import { confirm, intro, isCancel, note, outro, password, select, spinner, text } from "@clack/prompts";
-import { defaultConfigDir } from "@smithers-orchestrator/accounts";
+import { defaultConfigDir } from "@smthrs/accounts";
import { runAgentAdd, pingAccount } from "./runAgentAdd.js";
-/** @typedef {import("@smithers-orchestrator/accounts").AccountProvider} AccountProvider */
+/** @typedef {import("@smthrs/accounts").AccountProvider} AccountProvider */
const PROVIDER_CHOICES = [
{ value: "claude-code", label: "Claude Code (subscription)", hint: "Pro / Max plan via `claude` CLI" },
diff --git a/docs/references/smithers/apps/cli/src/agent-commands/runAgentAdd.js b/docs/references/smithers/apps/cli/src/agent-commands/runAgentAdd.js
index 6d5aa6f6a..3905b8be1 100644
--- a/docs/references/smithers/apps/cli/src/agent-commands/runAgentAdd.js
+++ b/docs/references/smithers/apps/cli/src/agent-commands/runAgentAdd.js
@@ -1,9 +1,9 @@
import { mkdirSync, existsSync, readdirSync } from "node:fs";
import { spawnSync } from "node:child_process";
-import { addAccount, defaultConfigDir } from "@smithers-orchestrator/accounts";
+import { addAccount, defaultConfigDir } from "@smthrs/accounts";
import { regenerateAgentsTsIfPresent } from "./regenerateAgentsTsIfPresent.js";
-/** @typedef {import("@smithers-orchestrator/accounts").AccountProvider} AccountProvider */
+/** @typedef {import("@smthrs/accounts").AccountProvider} AccountProvider */
/**
* Provider id → CLI binary name. For API-key providers this is null because
diff --git a/docs/references/smithers/apps/cli/src/agent-detection.js b/docs/references/smithers/apps/cli/src/agent-detection.js
index f67e1b236..f601eae2e 100644
--- a/docs/references/smithers/apps/cli/src/agent-detection.js
+++ b/docs/references/smithers/apps/cli/src/agent-detection.js
@@ -2,8 +2,8 @@ import { existsSync, readFileSync } from "node:fs";
import { homedir } from "node:os";
import { join, resolve, sep } from "node:path";
import { spawnSync } from "node:child_process";
-import { SmithersError } from "@smithers-orchestrator/errors";
-import { listAccounts } from "@smithers-orchestrator/accounts";
+import { SmithersError } from "@smthrs/errors";
+import { listAccounts } from "@smthrs/accounts";
/** @typedef {import("./AgentAvailability.ts").AgentAvailability} AgentAvailability */
/** @typedef {import("./AgentAvailabilityStatus.ts").AgentAvailabilityStatus} AgentAvailabilityStatus */
@@ -570,7 +570,7 @@ function pathLiteral(absPath, homeDir) {
* `providers.` entry is emitted per registered account; pools
* group accounts by engine family.
*
- * @param {import("@smithers-orchestrator/accounts").Account[]} accounts
+ * @param {import("@smthrs/accounts").Account[]} accounts
* @param {NodeJS.ProcessEnv} env
* @returns {string}
*/
@@ -606,7 +606,7 @@ function generateAccountsAgentsTs(accounts, env) {
"// Source of truth: ~/.smithers/accounts.json (managed via `smithers agent add|list|remove`)",
'import { homedir } from "node:os";',
'import path from "node:path";',
- `import { ${smithersImportSpecifiers.join(", ")} } from "smithers-orchestrator";`,
+ `import { ${smithersImportSpecifiers.join(", ")} } from "smthrs";`,
"",
"export const providers = {",
...providerLines,
@@ -623,7 +623,7 @@ function generateAccountsAgentsTs(accounts, env) {
* Renders an account as `: new SmithersFooAgent({ ... })` for
* inclusion in the providers map.
*
- * @param {import("@smithers-orchestrator/accounts").Account} account
+ * @param {import("@smthrs/accounts").Account} account
* @param {string} homeDir
* @returns {string}
*/
@@ -786,7 +786,7 @@ export function generateAgentsTs(env = process.env, options = {}) {
"// smithers-source: generated",
...(hasAccounts ? ["// Account providers (camelCase labels) come from ~/.smithers/accounts.json — managed via `smithers agent add|list|remove`."] : []),
...(hasAccounts ? ['import { homedir } from "node:os";', 'import path from "node:path";'] : []),
- `import { ${smithersImportSpecifiers.join(", ")} } from "smithers-orchestrator";`,
+ `import { ${smithersImportSpecifiers.join(", ")} } from "smthrs";`,
...scaffoldImportLines,
"",
...scaffoldExportLines,
diff --git a/docs/references/smithers/apps/cli/src/agent-wiring/registerHermesMcp.js b/docs/references/smithers/apps/cli/src/agent-wiring/registerHermesMcp.js
index f2503489c..79df2ce66 100644
--- a/docs/references/smithers/apps/cli/src/agent-wiring/registerHermesMcp.js
+++ b/docs/references/smithers/apps/cli/src/agent-wiring/registerHermesMcp.js
@@ -15,7 +15,7 @@ import { parse, stringify } from "yaml";
* @param {object} opts
* @param {string} [opts.name] Server name (default `"smithers"`).
* @param {string} opts.command Executable agents will run (e.g. `"bunx"`).
- * @param {string[]} opts.args Arguments for the command (e.g. `["smithers-orchestrator", "--mcp"]`).
+ * @param {string[]} opts.args Arguments for the command (e.g. `["smthrs", "--mcp"]`).
* @param {string} [opts.homeDir] Home directory override (for tests).
* @returns {{ agent: "Hermes"; registered: boolean; path: string; reason?: string }}
*/
diff --git a/docs/references/smithers/apps/cli/src/agent-wiring/registerOpenClawMcp.js b/docs/references/smithers/apps/cli/src/agent-wiring/registerOpenClawMcp.js
index 1fda19a3b..823e40da7 100644
--- a/docs/references/smithers/apps/cli/src/agent-wiring/registerOpenClawMcp.js
+++ b/docs/references/smithers/apps/cli/src/agent-wiring/registerOpenClawMcp.js
@@ -13,7 +13,7 @@ import { dirname, join } from "node:path";
* @param {object} opts
* @param {string} [opts.name] Server name (default `"smithers"`).
* @param {string} opts.command Executable agents will run (e.g. `"bunx"`).
- * @param {string[]} opts.args Arguments for the command (e.g. `["smithers-orchestrator", "--mcp"]`).
+ * @param {string[]} opts.args Arguments for the command (e.g. `["smthrs", "--mcp"]`).
* @param {string} [opts.homeDir] Home directory override (for tests).
* @returns {{ agent: "OpenClaw"; registered: boolean; path: string; reason?: string }}
*/
diff --git a/docs/references/smithers/apps/cli/src/agent-wiring/wireExtraAgents.js b/docs/references/smithers/apps/cli/src/agent-wiring/wireExtraAgents.js
index bd58ee3f6..c4dbcf646 100644
--- a/docs/references/smithers/apps/cli/src/agent-wiring/wireExtraAgents.js
+++ b/docs/references/smithers/apps/cli/src/agent-wiring/wireExtraAgents.js
@@ -33,7 +33,7 @@ function detectRunner() {
* @param {"mcp" | "skills"} opts.kind Which install ran.
* @param {string} [opts.name] MCP server name (default `"smithers"`).
* @param {string} [opts.command] MCP launch executable (default: the detected runner — `npx`/`pnpx`/`bunx` — matching what incur registers for other agents).
- * @param {string[]} [opts.args] MCP launch args (default `["smithers-orchestrator", "--mcp"]`).
+ * @param {string[]} [opts.args] MCP launch args (default `["smthrs", "--mcp"]`).
* @param {boolean} [opts.global] Install globally (default `true`).
* @param {string} [opts.cwd] Working directory for project-scoped installs.
* @param {string[]} [opts.agents] Optional `--agent` filter; when set, only these ids are wired.
@@ -44,7 +44,7 @@ export function wireExtraAgents({
kind,
name = "smithers",
command = detectRunner(),
- args = ["smithers-orchestrator", "--mcp"],
+ args = ["smthrs", "--mcp"],
global = true,
cwd = process.cwd(),
agents,
diff --git a/docs/references/smithers/apps/cli/src/ask-human.js b/docs/references/smithers/apps/cli/src/ask-human.js
index 4c23decf2..10e1ddef5 100644
--- a/docs/references/smithers/apps/cli/src/ask-human.js
+++ b/docs/references/smithers/apps/cli/src/ask-human.js
@@ -1,5 +1,5 @@
-import { SmithersError } from "@smithers-orchestrator/errors";
-import { DEFAULT_AGENT_ASK_NODE_ID } from "@smithers-orchestrator/engine/human-requests";
+import { SmithersError } from "@smthrs/errors";
+import { DEFAULT_AGENT_ASK_NODE_ID } from "@smthrs/engine/human-requests";
/**
* Run statuses we treat as "in progress" for autodetecting which run an ad-hoc
diff --git a/docs/references/smithers/apps/cli/src/ask.js b/docs/references/smithers/apps/cli/src/ask.js
index 5ef202e6a..7a88d6128 100644
--- a/docs/references/smithers/apps/cli/src/ask.js
+++ b/docs/references/smithers/apps/cli/src/ask.js
@@ -4,14 +4,14 @@ import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
-import { AntigravityAgent } from "@smithers-orchestrator/agents/AntigravityAgent";
-import { ClaudeCodeAgent } from "@smithers-orchestrator/agents/ClaudeCodeAgent";
-import { CodexAgent } from "@smithers-orchestrator/agents/CodexAgent";
-import { GeminiAgent } from "@smithers-orchestrator/agents/GeminiAgent";
-import { KimiAgent } from "@smithers-orchestrator/agents/KimiAgent";
-import { PiAgent } from "@smithers-orchestrator/agents/PiAgent";
-import { SmithersError } from "@smithers-orchestrator/errors";
-import { createSmithersAgentContract, renderSmithersAgentPromptGuidance, } from "@smithers-orchestrator/agents/agent-contract";
+import { AntigravityAgent } from "@smthrs/agents/AntigravityAgent";
+import { ClaudeCodeAgent } from "@smthrs/agents/ClaudeCodeAgent";
+import { CodexAgent } from "@smthrs/agents/CodexAgent";
+import { GeminiAgent } from "@smthrs/agents/GeminiAgent";
+import { KimiAgent } from "@smthrs/agents/KimiAgent";
+import { PiAgent } from "@smthrs/agents/PiAgent";
+import { SmithersError } from "@smthrs/errors";
+import { createSmithersAgentContract, renderSmithersAgentPromptGuidance, } from "@smthrs/agents/agent-contract";
import { describeUnavailableAgent, detectAvailableAgents, formatNoUsableAgentsMessage, } from "./agent-detection.js";
/**
* @typedef {typeof ASK_AGENT_IDS[number]} AskAgentId
@@ -19,7 +19,7 @@ import { describeUnavailableAgent, detectAvailableAgents, formatNoUsableAgentsMe
/**
* @typedef {{ agent?: AskAgentId; listAgents?: boolean; dumpPrompt?: boolean; toolSurface?: SmithersToolSurface; noMcp?: boolean; printBootstrap?: boolean; }} AskOptions
*/
-/** @typedef {import("@smithers-orchestrator/agents/agent-contract").SmithersToolSurface} SmithersToolSurface */
+/** @typedef {import("@smthrs/agents/agent-contract").SmithersToolSurface} SmithersToolSurface */
const ASK_AGENT_IDS = ["claude", "codex", "kimi", "antigravity", "gemini", "pi"];
const DEFAULT_SERVER_NAME = "smithers";
diff --git a/docs/references/smithers/apps/cli/src/diff.js b/docs/references/smithers/apps/cli/src/diff.js
index 538fe7adf..755b62c62 100644
--- a/docs/references/smithers/apps/cli/src/diff.js
+++ b/docs/references/smithers/apps/cli/src/diff.js
@@ -5,7 +5,7 @@
// @smithers-type-exports-end
import pc from "picocolors";
-import { getNodeDiffRoute } from "@smithers-orchestrator/server/gatewayRoutes/getNodeDiff";
+import { getNodeDiffRoute } from "@smthrs/server/gatewayRoutes/getNodeDiff";
import { EXIT_OK, EXIT_SERVER_ERROR } from "./util/exitCodes.js";
import { formatCliErrorForStderr, getCliErrorMapping } from "./util/errorMessage.js";
diff --git a/docs/references/smithers/apps/cli/src/eval-suite.js b/docs/references/smithers/apps/cli/src/eval-suite.js
index 44cc0a47c..19a396d76 100644
--- a/docs/references/smithers/apps/cli/src/eval-suite.js
+++ b/docs/references/smithers/apps/cli/src/eval-suite.js
@@ -1,7 +1,7 @@
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { basename, dirname, extname, isAbsolute, join, resolve } from "node:path";
import crypto from "node:crypto";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
export const EVAL_CASE_STATUSES = [
"finished",
diff --git a/docs/references/smithers/apps/cli/src/find-db.js b/docs/references/smithers/apps/cli/src/find-db.js
index 1dfc6ba68..b3699af53 100644
--- a/docs/references/smithers/apps/cli/src/find-db.js
+++ b/docs/references/smithers/apps/cli/src/find-db.js
@@ -1,8 +1,8 @@
import { resolve, dirname } from "node:path";
import { existsSync } from "node:fs";
-import { SmithersDb } from "@smithers-orchestrator/db/adapter";
-import { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersDb } from "@smthrs/db/adapter";
+import { ensureSmithersTables } from "@smthrs/db/ensure";
+import { SmithersError } from "@smthrs/errors";
/** @typedef {import("./FindDbWaitOptions.ts").FindDbWaitOptions} FindDbWaitOptions */
/**
diff --git a/docs/references/smithers/apps/cli/src/hijack-session.js b/docs/references/smithers/apps/cli/src/hijack-session.js
index d82403c06..1e209811b 100644
--- a/docs/references/smithers/apps/cli/src/hijack-session.js
+++ b/docs/references/smithers/apps/cli/src/hijack-session.js
@@ -2,14 +2,14 @@ import { createInterface } from "node:readline/promises";
import { stdin, stdout, stderr } from "node:process";
import { dirname, resolve } from "node:path";
import { pathToFileURL } from "node:url";
-import { SmithersCtx } from "@smithers-orchestrator/driver";
-import { loadInput, loadOutputs } from "@smithers-orchestrator/db/snapshot";
-import { renderFrame, resolveSchema } from "@smithers-orchestrator/engine";
+import { SmithersCtx } from "@smthrs/driver";
+import { loadInput, loadOutputs } from "@smthrs/db/snapshot";
+import { renderFrame, resolveSchema } from "@smthrs/engine";
import { mdxPlugin } from "./mdx-plugin.js";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
import { Effect } from "effect";
/** @typedef {import("./HijackCandidate.ts").HijackCandidate} HijackCandidate */
-/** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
+/** @typedef {import("@smthrs/db/adapter").SmithersDb} SmithersDb */
/**
* @template T
diff --git a/docs/references/smithers/apps/cli/src/hijack.js b/docs/references/smithers/apps/cli/src/hijack.js
index 070ca8bfa..f034bc21b 100644
--- a/docs/references/smithers/apps/cli/src/hijack.js
+++ b/docs/references/smithers/apps/cli/src/hijack.js
@@ -1,9 +1,9 @@
import { spawn } from "node:child_process";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
/** @typedef {import("./HijackCandidate.ts").HijackCandidate} HijackCandidate */
/** @typedef {import("./HijackLaunchSpec.ts").HijackLaunchSpec} HijackLaunchSpec */
/** @typedef {import("./NativeHijackEngine.ts").NativeHijackEngine} NativeHijackEngine */
-/** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
+/** @typedef {import("@smthrs/db/adapter").SmithersDb} SmithersDb */
/**
* @param {string | null} [metaJson]
diff --git a/docs/references/smithers/apps/cli/src/index.js b/docs/references/smithers/apps/cli/src/index.js
index 37eadbf24..5c7f923c3 100755
--- a/docs/references/smithers/apps/cli/src/index.js
+++ b/docs/references/smithers/apps/cli/src/index.js
@@ -8,27 +8,27 @@ import { readFileSync, existsSync, openSync, statSync, writeSync } from "node:fs
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { Effect, Fiber } from "effect";
import { Cli, Mcp as IncurMcp, z } from "incur";
-import { isRunHeartbeatFresh, runWorkflow, renderFrame, resolveSchema } from "@smithers-orchestrator/engine";
+import { isRunHeartbeatFresh, runWorkflow, renderFrame, resolveSchema } from "@smthrs/engine";
import { mdxPlugin } from "./mdx-plugin.js";
-import { approveNode, denyNode } from "@smithers-orchestrator/engine/approvals";
-import { signalRun } from "@smithers-orchestrator/engine/signals";
-import { loadInput, loadOutputs } from "@smithers-orchestrator/db/snapshot";
-import { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
-import { SmithersDb } from "@smithers-orchestrator/db/adapter";
-import { computeRunStateFromRow } from "@smithers-orchestrator/db/runState";
-import { SmithersCtx } from "@smithers-orchestrator/driver";
-import { toSmithersError } from "@smithers-orchestrator/errors/toSmithersError";
+import { approveNode, denyNode } from "@smthrs/engine/approvals";
+import { signalRun } from "@smthrs/engine/signals";
+import { loadInput, loadOutputs } from "@smthrs/db/snapshot";
+import { ensureSmithersTables } from "@smthrs/db/ensure";
+import { SmithersDb } from "@smthrs/db/adapter";
+import { computeRunStateFromRow } from "@smthrs/db/runState";
+import { SmithersCtx } from "@smthrs/driver";
+import { toSmithersError } from "@smthrs/errors/toSmithersError";
import { runFork, runPromise } from "./smithersRuntime.js";
-import { trackEvent } from "@smithers-orchestrator/observability/metrics";
-import { vcsToolingStatus } from "@smithers-orchestrator/vcs/vcsToolingStatus";
-import { revertToAttempt } from "@smithers-orchestrator/time-travel/revert";
-import { retryTask } from "@smithers-orchestrator/time-travel/retry-task";
-import { timeTravel } from "@smithers-orchestrator/time-travel/timetravel";
+import { trackEvent } from "@smthrs/observability/metrics";
+import { vcsToolingStatus } from "@smthrs/vcs/vcsToolingStatus";
+import { revertToAttempt } from "@smthrs/time-travel/revert";
+import { retryTask } from "@smthrs/time-travel/retry-task";
+import { timeTravel } from "@smthrs/time-travel/timetravel";
import { runSync } from "./smithersRuntime.js";
import { spawn } from "node:child_process";
-import { buildAgentAskRequestRow, isHumanRequestPastTimeout, validateHumanRequestValue, waitForHumanAnswer, } from "@smithers-orchestrator/engine/human-requests";
-import { SmithersError } from "@smithers-orchestrator/errors";
-import { assertMaxBytes, assertMaxStringLength } from "@smithers-orchestrator/db/input-bounds";
+import { buildAgentAskRequestRow, isHumanRequestPastTimeout, validateHumanRequestValue, waitForHumanAnswer, } from "@smthrs/engine/human-requests";
+import { SmithersError } from "@smthrs/errors";
+import { assertMaxBytes, assertMaxStringLength } from "@smthrs/db/input-bounds";
import { findAndOpenDb } from "./find-db.js";
import { buildAskKindFields, buildAskPromptText, buildAskUniqueToken, formatAskHumanResolveHelp, parseChoices, resolveAskHumanContext, } from "./ask-human.js";
import { chatAttemptKey, formatChatAttemptHeader, formatChatBlock, parseAgentEvent, parseChatAttemptMeta, parseNodeOutputEvent, selectChatAttempts, } from "./chat.js";
@@ -41,8 +41,8 @@ import { EVENT_CATEGORY_VALUES, eventTypesForCategory, normalizeEventCategory, }
import { aggregateNodeDetailEffect, renderNodeDetailHuman, } from "./node-detail.js";
import { diagnoseRunEffect, diagnosisCtaCommands, renderWhyDiagnosisHuman, } from "./why-diagnosis.js";
import { detectAvailableAgents } from "./agent-detection.js";
-import { listAccounts, removeAccount } from "@smithers-orchestrator/accounts";
-import { getUsageForAccounts, formatUsageReports } from "@smithers-orchestrator/usage";
+import { listAccounts, removeAccount } from "@smthrs/accounts";
+import { getUsageForAccounts, formatUsageReports } from "@smthrs/usage";
import { runAgentAdd, pingAccount } from "./agent-commands/runAgentAdd.js";
import { agentAddWizard } from "./agent-commands/agentAddWizard.js";
import { getWorkflowFollowUpCtas } from "./workflow-pack.js";
@@ -64,7 +64,7 @@ import { optimizeOptions, runOptimizeCommand, withOptimizationArtifactEnv } from
import { ask } from "./ask.js";
import { runScheduler } from "./scheduler.js";
import { resumeRunDetached } from "./resume-detached.js";
-import { formatCliAgentCapabilityDoctorReport, getCliAgentCapabilityDoctorReport, getCliAgentCapabilityReport, } from "@smithers-orchestrator/agents/cli-capabilities";
+import { formatCliAgentCapabilityDoctorReport, getCliAgentCapabilityDoctorReport, getCliAgentCapabilityReport, } from "@smthrs/agents/cli-capabilities";
import { parseDurationMs, supervisorLoopEffect, } from "./supervisor.js";
import { WATCH_MIN_INTERVAL_MS, runWatchLoop, watchIntervalSecondsToMs, } from "./watch.js";
import { createSemanticMcpServer } from "./mcp/semantic-server.js";
@@ -1066,7 +1066,7 @@ async function buildPsRows(adapter, limit, status) {
* Older consumers (and the dashboard CTA logic) still key off `status`, so a row
* whose owner is dead must surface as something other than "running".
*
- * @param {import("@smithers-orchestrator/db/runState").RunStateView["state"]} state
+ * @param {import("@smthrs/db/runState").RunStateView["state"]} state
* @returns {string}
*/
function derivedStateToStatus(state) {
@@ -1780,7 +1780,7 @@ async function executeUpCommand(c, workflowPath, options, fail) {
});
}
}
- const { createServeApp } = await import("@smithers-orchestrator/server/serve");
+ const { createServeApp } = await import("@smthrs/server/serve");
const effectiveRunId = runId ?? `run-${Date.now()}`;
const serveApp = createServeApp({
workflow: workflow,
@@ -2047,7 +2047,7 @@ const workflowCli = Cli.create({
if (!vcs.ok && c.format !== "json") {
process.stderr.write(
`${pc.yellow("⚠ No jj or git found.")} Smithers needs one to snapshot and isolate agent work.\n` +
- ` Smithers bundles jj via the optional @smithers-orchestrator/jj- package; if it could not\n` +
+ ` Smithers bundles jj via the optional @smthrs/jj- package; if it could not\n` +
` install for your platform, install jj (https://github.com/jj-vcs/jj) or git, or set SMITHERS_JJ_PATH.\n`,
);
}
@@ -2092,8 +2092,8 @@ const memoryCli = Cli.create({
alias: { workflow: "w" },
async run(c) {
try {
- const { createMemoryStore } = await import("@smithers-orchestrator/memory/store");
- const { parseNamespace } = await import("@smithers-orchestrator/memory/types");
+ const { createMemoryStore } = await import("@smthrs/memory/store");
+ const { parseNamespace } = await import("@smthrs/memory/types");
const workflow = await loadWorkflowAsync(c.options.workflow);
ensureSmithersTables(workflow.db);
setupSqliteCleanup(workflow);
@@ -2346,7 +2346,7 @@ const openapiCli = Cli.create({
args: openapiListArgs,
async run(c) {
try {
- const { listOperations } = await import("@smithers-orchestrator/openapi/tool-factory");
+ const { listOperations } = await import("@smthrs/openapi/tool-factory");
const ops = listOperations(c.args.specPath);
if (ops.length === 0) {
console.log(" No operations found in spec.");
@@ -4913,7 +4913,7 @@ const cli = Cli.create({
if (!existsSync(composeFile)) {
return fail({
code: "COMPOSE_NOT_FOUND",
- message: `Docker Compose file not found at ${composeFile}. Ensure the smithers-orchestrator package includes the observability/ directory.`,
+ message: `Docker Compose file not found at ${composeFile}. Ensure the smthrs package includes the observability/ directory.`,
exitCode: 1,
});
}
@@ -5030,7 +5030,7 @@ const cli = Cli.create({
return c.error(opts);
};
try {
- const { replayFromCheckpoint } = await import("@smithers-orchestrator/time-travel/replay");
+ const { replayFromCheckpoint } = await import("@smthrs/time-travel/replay");
const { adapter, cleanup } = await loadWorkflowDb(c.args.workflow);
try {
const inputOverrides = parseJsonInput(c.options.input, "input", fail);
@@ -5052,7 +5052,7 @@ const cli = Cli.create({
const workflow = await loadWorkflow(c.args.workflow);
const onProgress = buildProgressReporter();
const abort = setupAbortSignal();
- const engine = await import("@smithers-orchestrator/engine");
+ const engine = await import("@smthrs/engine");
const runResult = await Effect.runPromise(engine.runWorkflow(workflow, {
input: {},
runId: result.runId,
@@ -5286,7 +5286,7 @@ const cli = Cli.create({
return c.error(opts);
};
try {
- const { forkRun } = await import("@smithers-orchestrator/time-travel/fork");
+ const { forkRun } = await import("@smthrs/time-travel/fork");
const { adapter, cleanup } = await loadWorkflowDb(c.args.workflow);
try {
const inputOverrides = parseJsonInput(c.options.input, "input", fail);
@@ -5304,7 +5304,7 @@ const cli = Cli.create({
const workflow = await loadWorkflow(c.args.workflow);
const onProgress = buildProgressReporter();
const abort = setupAbortSignal();
- const engine = await import("@smithers-orchestrator/engine");
+ const engine = await import("@smthrs/engine");
const runResult = await Effect.runPromise(engine.runWorkflow(workflow, {
input: {},
runId: result.runId,
@@ -5355,7 +5355,7 @@ const cli = Cli.create({
return c.error(opts);
};
try {
- const { buildTimeline, buildTimelineTree, formatTimelineForTui, formatTimelineAsJson } = await import("@smithers-orchestrator/time-travel/timeline");
+ const { buildTimeline, buildTimelineTree, formatTimelineForTui, formatTimelineAsJson } = await import("@smthrs/time-travel/timeline");
const { adapter, cleanup } = await findAndOpenDb();
try {
if (c.options.tree) {
@@ -5846,14 +5846,14 @@ const CHAT_CREATE_PROMPT = [
async function createChatAgent(agentId, cwd) {
switch (agentId) {
case "claude-code": {
- const { ClaudeCodeAgent } = await import("@smithers-orchestrator/agents/ClaudeCodeAgent");
+ const { ClaudeCodeAgent } = await import("@smthrs/agents/ClaudeCodeAgent");
return new ClaudeCodeAgent({
cwd,
model: "claude-opus-4-7",
});
}
case "codex": {
- const { CodexAgent } = await import("@smithers-orchestrator/agents/CodexAgent");
+ const { CodexAgent } = await import("@smthrs/agents/CodexAgent");
return new CodexAgent({
cwd,
model: "gpt-5.3-codex",
@@ -5861,13 +5861,13 @@ async function createChatAgent(agentId, cwd) {
});
}
case "antigravity": {
- const { AntigravityAgent } = await import("@smithers-orchestrator/agents/AntigravityAgent");
+ const { AntigravityAgent } = await import("@smthrs/agents/AntigravityAgent");
return new AntigravityAgent({
cwd,
});
}
case "gemini": {
- const { GeminiAgent } = await import("@smithers-orchestrator/agents/GeminiAgent");
+ const { GeminiAgent } = await import("@smthrs/agents/GeminiAgent");
return new GeminiAgent({
cwd,
model: "gemini-3.1-pro-preview",
@@ -5878,7 +5878,7 @@ async function createChatAgent(agentId, cwd) {
/**
* @param {"claude-code" | "codex" | "antigravity" | "gemini"} agentId
* @param {string} cwd
- * @returns {Promise>}
+ * @returns {Promise>}
*/
async function buildInlineChatWorkflow(agentId, cwd) {
const [
@@ -5894,10 +5894,10 @@ async function buildInlineChatWorkflow(agentId, cwd) {
import("bun:sqlite"),
import("drizzle-orm/bun-sqlite"),
import("drizzle-orm/sqlite-core"),
- import("@smithers-orchestrator/components"),
- import("@smithers-orchestrator/db/zodToTable"),
- import("@smithers-orchestrator/db/zodToCreateTableSQL"),
- import("@smithers-orchestrator/db/utils/camelToSnake"),
+ import("@smthrs/components"),
+ import("@smthrs/db/zodToTable"),
+ import("@smthrs/db/zodToCreateTableSQL"),
+ import("@smthrs/db/utils/camelToSnake"),
import("zod"),
]);
const agent = await createChatAgent(agentId, cwd);
diff --git a/docs/references/smithers/apps/cli/src/init-command.js b/docs/references/smithers/apps/cli/src/init-command.js
index 186d2ba57..c471f6d7c 100644
--- a/docs/references/smithers/apps/cli/src/init-command.js
+++ b/docs/references/smithers/apps/cli/src/init-command.js
@@ -1,5 +1,5 @@
import { z } from "incur";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
import { agentAddWizard } from "./agent-commands/agentAddWizard.js";
import { runInitCeremony } from "./initCeremony.js";
import { renderInitNextSteps } from "./renderInitNextSteps.js";
@@ -48,7 +48,7 @@ function buildInitCta(templateResult) {
description: "Next steps",
commands: templateResult
? [
- { command: templateResult.command.replace(/^bunx smithers-orchestrator\s+/, ""), description: `Run ${templateResult.id}` },
+ { command: templateResult.command.replace(/^bunx smthrs\s+/, ""), description: `Run ${templateResult.id}` },
{ command: "starters", description: "Browse the other templates" },
{ command: "workflow list", description: "View all available workflows" },
]
diff --git a/docs/references/smithers/apps/cli/src/json-args.js b/docs/references/smithers/apps/cli/src/json-args.js
index f5c48ccd2..c2048aad7 100644
--- a/docs/references/smithers/apps/cli/src/json-args.js
+++ b/docs/references/smithers/apps/cli/src/json-args.js
@@ -1,6 +1,6 @@
import { readFileSync } from "node:fs";
-import { assertMaxBytes } from "@smithers-orchestrator/db/input-bounds";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { assertMaxBytes } from "@smthrs/db/input-bounds";
+import { SmithersError } from "@smthrs/errors";
export const CLI_JSON_ARGUMENT_MAX_BYTES = 1024 * 1024;
diff --git a/docs/references/smithers/apps/cli/src/mcp/semantic-tools.js b/docs/references/smithers/apps/cli/src/mcp/semantic-tools.js
index 87a2a3e63..6a4de2646 100644
--- a/docs/references/smithers/apps/cli/src/mcp/semantic-tools.js
+++ b/docs/references/smithers/apps/cli/src/mcp/semantic-tools.js
@@ -2,8 +2,8 @@ import { basename, extname, resolve } from "node:path";
import { pathToFileURL } from "node:url";
import { Effect } from "effect";
import { z } from "zod";
-import { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
-import { SmithersDb } from "@smithers-orchestrator/db/adapter";
+import { ensureSmithersTables } from "@smthrs/db/ensure";
+import { SmithersDb } from "@smthrs/db/adapter";
import { findAndOpenDb } from "../find-db.js";
import { aggregateNodeDetailEffect, } from "../node-detail.js";
import { diagnoseRunEffect, } from "../why-diagnosis.js";
@@ -11,14 +11,14 @@ import { chatAttemptKey, parseChatAttemptMeta, parseNodeOutputEvent, selectChatA
import { WATCH_MIN_INTERVAL_MS } from "../watch.js";
import { discoverWorkflows, resolveWorkflow } from "../workflows.js";
import { mdxPlugin } from "../mdx-plugin.js";
-import { approveNode, denyNode } from "@smithers-orchestrator/engine/approvals";
-import { buildAgentAskRequestRow, waitForHumanAnswer, } from "@smithers-orchestrator/engine/human-requests";
+import { approveNode, denyNode } from "@smthrs/engine/approvals";
+import { buildAgentAskRequestRow, waitForHumanAnswer, } from "@smthrs/engine/human-requests";
import { buildAskKindFields, buildAskPromptText, buildAskUniqueToken, resolveAskHumanContext, } from "../ask-human.js";
-import { runWorkflow } from "@smithers-orchestrator/engine";
-import { revertToAttempt } from "@smithers-orchestrator/time-travel/revert";
+import { runWorkflow } from "@smthrs/engine";
+import { revertToAttempt } from "@smthrs/time-travel/revert";
import { runPromise } from "../smithersRuntime.js";
-import { SmithersError } from "@smithers-orchestrator/errors";
-import { toSmithersError } from "@smithers-orchestrator/errors/toSmithersError";
+import { SmithersError } from "@smthrs/errors";
+import { toSmithersError } from "@smthrs/errors/toSmithersError";
/**
* @typedef {{ content: Array<{ type: "text"; text: string; }>; structuredContent: { ok: boolean; data?: unknown; error?: z.infer; }; isError?: boolean; }} SemanticToolCallResult
*/
diff --git a/docs/references/smithers/apps/cli/src/node-detail.js b/docs/references/smithers/apps/cli/src/node-detail.js
index f0d630a69..c7600f33b 100644
--- a/docs/references/smithers/apps/cli/src/node-detail.js
+++ b/docs/references/smithers/apps/cli/src/node-detail.js
@@ -1,5 +1,5 @@
import { Effect } from "effect";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
/** @typedef {import("./AggregateNodeDetailParams.ts").AggregateNodeDetailParams} AggregateNodeDetailParams */
/**
* @typedef {{ total: number; failed: number; cancelled: number; succeeded: number; waiting: number; }} AttemptSummary
@@ -9,7 +9,7 @@ import { SmithersError } from "@smithers-orchestrator/errors";
/** @typedef {import("./NodeDetailTokenUsage.ts").NodeDetailTokenUsage} NodeDetailTokenUsage */
/** @typedef {import("./NodeDetailToolCall.ts").NodeDetailToolCall} NodeDetailToolCall */
/** @typedef {import("./RenderNodeDetailOptions.ts").RenderNodeDetailOptions} RenderNodeDetailOptions */
-/** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
+/** @typedef {import("@smthrs/db/adapter").SmithersDb} SmithersDb */
const MAX_TOOL_PAYLOAD_BYTES_HUMAN = 1024;
const MAX_VALIDATED_OUTPUT_BYTES_HUMAN = 10 * 1024;
diff --git a/docs/references/smithers/apps/cli/src/optimize-command.js b/docs/references/smithers/apps/cli/src/optimize-command.js
index fbf2c986a..06cbc68a0 100644
--- a/docs/references/smithers/apps/cli/src/optimize-command.js
+++ b/docs/references/smithers/apps/cli/src/optimize-command.js
@@ -2,12 +2,12 @@ import { basename, dirname, extname, join, resolve } from "node:path";
import crypto from "node:crypto";
import { Effect } from "effect";
import { z } from "incur";
-import { OPTIMIZATION_ARTIFACT_ENV, renderFrame, resolveSchema, runWorkflow } from "@smithers-orchestrator/engine";
-import { loadOutputs } from "@smithers-orchestrator/db/snapshot";
-import { ensureSmithersTables } from "@smithers-orchestrator/db/ensure";
-import { SmithersDb } from "@smithers-orchestrator/db/adapter";
-import { SmithersCtx } from "@smithers-orchestrator/driver";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { OPTIMIZATION_ARTIFACT_ENV, renderFrame, resolveSchema, runWorkflow } from "@smthrs/engine";
+import { loadOutputs } from "@smthrs/db/snapshot";
+import { ensureSmithersTables } from "@smthrs/db/ensure";
+import { SmithersDb } from "@smthrs/db/adapter";
+import { SmithersCtx } from "@smthrs/driver";
+import { SmithersError } from "@smthrs/errors";
import {
assertEvalRunIdsAvailable,
buildEvalPlan,
@@ -97,7 +97,7 @@ async function runWithLimit(items, limit, worker) {
/**
* @param {{
- * workflow: import("@smithers-orchestrator/components").SmithersWorkflow;
+ * workflow: import("@smthrs/components").SmithersWorkflow;
* workflowPath: string;
* plan: ReturnType;
* options: Record;
@@ -191,7 +191,7 @@ async function executeEvalPlan(input) {
/**
* @param {{
- * workflow: import("@smithers-orchestrator/components").SmithersWorkflow;
+ * workflow: import("@smthrs/components").SmithersWorkflow;
* workflowPath: string;
* cases: Array>;
* }} input
@@ -238,10 +238,10 @@ async function discoverOptimizablePromptTasksForCases(input) {
* @param {{
* defaultEvalRunLabel: () => string;
* formatRequestedJsonOutput: () => boolean;
- * loadWorkflow: (path: string) => Promise>;
+ * loadWorkflow: (path: string) => Promise>;
* resolveWorkflowPathForEval: (workflowInput: string) => string;
* setupAbortSignal: () => AbortController;
- * setupSqliteCleanup: (workflow: import("@smithers-orchestrator/components").SmithersWorkflow) => void;
+ * setupSqliteCleanup: (workflow: import("@smthrs/components").SmithersWorkflow) => void;
* setCommandExitOverride: (exitCode: number) => void;
* }} deps
*/
diff --git a/docs/references/smithers/apps/cli/src/optimize-suite.js b/docs/references/smithers/apps/cli/src/optimize-suite.js
index 5f04da016..ac916fb8d 100644
--- a/docs/references/smithers/apps/cli/src/optimize-suite.js
+++ b/docs/references/smithers/apps/cli/src/optimize-suite.js
@@ -1,7 +1,7 @@
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
import { basename, dirname, extname, isAbsolute, join, resolve } from "node:path";
import crypto from "node:crypto";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { SmithersError } from "@smthrs/errors";
const ARTIFACT_SCHEMA_VERSION = 1;
export const OPTIMIZER_PROVIDER_IDS = [
diff --git a/docs/references/smithers/apps/cli/src/output.js b/docs/references/smithers/apps/cli/src/output.js
index 48e392ea0..e1747baad 100644
--- a/docs/references/smithers/apps/cli/src/output.js
+++ b/docs/references/smithers/apps/cli/src/output.js
@@ -3,8 +3,8 @@
/** @typedef {import("./RunOutputCommandResult.ts").RunOutputCommandResult} RunOutputCommandResult */
// @smithers-type-exports-end
-import { getNodeOutputRoute } from "@smithers-orchestrator/server/gatewayRoutes/getNodeOutput";
-import { NodeOutputRouteError } from "@smithers-orchestrator/server/gatewayRoutes/NodeOutputRouteError";
+import { getNodeOutputRoute } from "@smthrs/server/gatewayRoutes/getNodeOutput";
+import { NodeOutputRouteError } from "@smthrs/server/gatewayRoutes/NodeOutputRouteError";
import { EXIT_OK } from "./util/exitCodes.js";
import { formatCliErrorForStderr, getCliErrorMapping } from "./util/errorMessage.js";
@@ -54,7 +54,7 @@ function formatValue(value) {
}
/**
- * @param {import("@smithers-orchestrator/db/adapter").SmithersDb} adapter
+ * @param {import("@smthrs/db/adapter").SmithersDb} adapter
* @param {string} runId
* @param {string} nodeId
* @returns {Promise}
diff --git a/docs/references/smithers/apps/cli/src/restore.js b/docs/references/smithers/apps/cli/src/restore.js
index b11c6f54c..4c8ed2843 100644
--- a/docs/references/smithers/apps/cli/src/restore.js
+++ b/docs/references/smithers/apps/cli/src/restore.js
@@ -3,7 +3,7 @@
// the vcs revert (jj restore --from ). DI seam on `revert` for tests.
import { spawnSync } from "node:child_process";
-import { resolveJjBinary } from "@smithers-orchestrator/vcs/resolveJjBinary";
+import { resolveJjBinary } from "@smthrs/vcs/resolveJjBinary";
/** @param {unknown} id */
function short(id) {
diff --git a/docs/references/smithers/apps/cli/src/rewind.js b/docs/references/smithers/apps/cli/src/rewind.js
index ab7855f95..a820c6040 100644
--- a/docs/references/smithers/apps/cli/src/rewind.js
+++ b/docs/references/smithers/apps/cli/src/rewind.js
@@ -4,8 +4,8 @@
// @smithers-type-exports-end
import readline from "node:readline";
-import { jumpToFrameRoute } from "@smithers-orchestrator/server/gatewayRoutes/jumpToFrame";
-import { JumpToFrameError } from "@smithers-orchestrator/time-travel/jumpToFrame";
+import { jumpToFrameRoute } from "@smthrs/server/gatewayRoutes/jumpToFrame";
+import { JumpToFrameError } from "@smthrs/time-travel/jumpToFrame";
import {
EXIT_OK,
EXIT_USER_ERROR,
diff --git a/docs/references/smithers/apps/cli/src/scheduler.js b/docs/references/smithers/apps/cli/src/scheduler.js
index 2a6341ceb..d18c4b0e7 100644
--- a/docs/references/smithers/apps/cli/src/scheduler.js
+++ b/docs/references/smithers/apps/cli/src/scheduler.js
@@ -1,7 +1,7 @@
import { spawn } from "node:child_process";
import { CronExpressionParser } from "cron-parser";
import { Effect, Schedule } from "effect";
-import { toSmithersError } from "@smithers-orchestrator/errors/toSmithersError";
+import { toSmithersError } from "@smthrs/errors/toSmithersError";
import { runPromise } from "./smithersRuntime.js";
import { findAndOpenDb } from "./find-db.js";
/**
diff --git a/docs/references/smithers/apps/cli/src/seeded-workflow-pack.generated.js b/docs/references/smithers/apps/cli/src/seeded-workflow-pack.generated.js
index c878250c5..2f3818380 100644
--- a/docs/references/smithers/apps/cli/src/seeded-workflow-pack.generated.js
+++ b/docs/references/smithers/apps/cli/src/seeded-workflow-pack.generated.js
@@ -9,7 +9,7 @@
export const GENERATED_SEEDED_FILES = [
{
"path": ".smithers/workflows/create-workflow.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Create Workflow\n// smithers-description: Build a new Smithers workflow from a plain-English ask — clarify, provision docs & skills, design, scaffold, verify, and document.\n// smithers-tags: authoring, workflow-pack, scaffolding\n/** @jsxImportSource smithers-orchestrator */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClarifyPrompt from \"../prompts/create-workflow-clarify.mdx\";\nimport ProvisionPrompt from \"../prompts/create-workflow-provision.mdx\";\nimport DesignPrompt from \"../prompts/create-workflow-design.mdx\";\nimport ScaffoldPrompt from \"../prompts/create-workflow-scaffold.mdx\";\nimport FixPrompt from \"../prompts/create-workflow-fix.mdx\";\nimport DocumentPrompt from \"../prompts/create-workflow-document.mdx\";\n\nconst WORKFLOWS_DIR = \".smithers/workflows\";\nconst PROMPTS_DIR = \".smithers/prompts\";\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the workflow you want to build, in plain English.\")\n .describe(\"Plain-English description of the workflow you want Smithers to build.\"),\n name: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Desired kebab-case workflow id. Null lets the clarify/design steps choose one.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the design before any files are written.\"),\n});\n\n// 1. The freeform ask, turned into a structured, buildable spec.\nconst clarifiedSpecSchema = z.looseObject({\n name: z.string().describe(\"Proposed kebab-case workflow id.\"),\n goal: z.string().describe(\"One sentence: what the finished workflow accomplishes.\"),\n trigger: z\n .string()\n .describe(\"How it starts: manual | push | schedule | issue | landing-request | workflow-run | webhook.\"),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), purpose: z.string() }))\n .default([]),\n stages: z.array(z.string()).default([]).describe(\"Ordered high-level steps the workflow performs.\"),\n loops: z.array(z.string()).default([]).describe(\"Where it should iterate until a condition holds.\"),\n humanGates: z.array(z.string()).default([]).describe(\"Where a human approval / question belongs.\"),\n successCriteria: z.array(z.string()).default([]),\n openQuestions: z.array(z.string()).default([]).describe(\"Anything ambiguous the author should resolve.\"),\n});\n\n// 2. THE docs & skills step — what the new workflow (and the authoring agents)\n// need installed/available before it can be designed and built.\nconst provisioningSchema = z.looseObject({\n docsFragments: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"smithers.sh llms-*.txt fragments pulled into context.\"),\n examples: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"Closest examples/ workflows to copy as a starting template.\"),\n components: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"Built-in or local components the new workflow should compose.\"),\n skills: z\n .array(\n z.object({\n name: z.string(),\n action: z.enum([\"installed\", \"recommended\", \"present\"]).default(\"recommended\"),\n reason: z.string(),\n }),\n )\n .default([])\n .describe(\"Agent skills the workflow's workers need; installed ones were actually synced.\"),\n agents: z.array(z.string()).default([]).describe(\"Named agent pools / providers the workflow will use.\"),\n notes: z.string().default(\"\"),\n});\n\n// 3. The concrete design the scaffolder will turn into real files.\nconst designSchema = z.looseObject({\n workflowName: z.string(),\n summary: z.string(),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), default: z.string().nullable().default(null) }))\n .default([]),\n tasks: z\n .array(\n z.object({\n id: z.string(),\n purpose: z.string(),\n agent: z.string().describe(\"agents.smart | agents.smartTool | agents.cheapFast | (none) for a function task.\"),\n outputs: z.array(z.string()).default([]),\n }),\n )\n .default([]),\n graphShape: z\n .string()\n .describe(\"How the JSX tree nests: Sequence/Parallel/Branch/Loop/Ralph/ReviewLoop, with gates and loops.\"),\n components: z.array(z.string()).default([]),\n prompts: z.array(z.string()).default([]).describe(\".mdx prompt files to author alongside the workflow.\"),\n triggers: z.array(z.string()).default([]),\n humanGates: z.array(z.string()).default([]),\n rationale: z.string().default(\"\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 5 & 6. Files written by the scaffold / fix agents.\nconst scaffoldSchema = z.looseObject({\n summary: z.string(),\n workflowName: z.string(),\n filesWritten: z\n .array(\n z.object({\n path: z.string(),\n kind: z.enum([\"workflow\", \"prompt\", \"component\", \"agents\", \"skill\", \"other\"]).default(\"other\"),\n }),\n )\n .default([]),\n});\n\n// 6. Result of rendering the new workflow's graph without executing it.\nconst verifySchema = z.looseObject({\n passed: z.boolean(),\n command: z.string(),\n errors: z.array(z.string()).default([]),\n notes: z.string().default(\"\"),\n});\n\n// 7. Agent-facing skill doc so future agents know how to run the new workflow.\nconst documentSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, Loop, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n clarify: clarifiedSpecSchema,\n provision: provisioningSchema,\n design: designSchema,\n approval: approvalSchema,\n scaffold: scaffoldSchema,\n verify: verifySchema,\n document: documentSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const clarify = ctx.outputMaybe(\"clarify\", { nodeId: \"clarify\" });\n const provision = ctx.outputMaybe(\"provision\", { nodeId: \"provision\" });\n const design = ctx.outputMaybe(\"design\", { nodeId: \"design\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-design\" });\n const scaffold = ctx.outputMaybe(\"scaffold\", { nodeId: \"scaffold\" });\n\n const designed = design !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // The name we scaffold + verify against, resolved as soon as it is known.\n const workflowName =\n scaffold?.workflowName ?? design?.workflowName ?? clarify?.name ?? ctx.input.name ?? \"new-workflow\";\n const workflowFile = `${WORKFLOWS_DIR}/${workflowName}.tsx`;\n\n // Verify-loop bookkeeping: re-render `until` against the latest verify output.\n const verifyOutputs = ctx.outputs.verify ?? [];\n const lastVerify = verifyOutputs.at(-1);\n const verifyPassed = lastVerify?.passed === true;\n const verifyFailed = lastVerify !== undefined && lastVerify.passed === false;\n\n return (\n \n \n {/* 1 — Turn the freeform ask into a structured, buildable spec. */}\n \n \n \n\n {/* 2 — Docs & skills: decide and ACTUALLY install/gather what the new\n workflow and its worker agents need before we design anything. */}\n {clarify ? (\n \n \n \n ) : null}\n\n {/* 3 — Design the concrete workflow graph from spec + provisioning. */}\n {provision ? (\n \n \n \n ) : null}\n\n {/* 4 — Optional durable human approval of the design before writing files. */}\n \n }\n else={null}\n />\n\n {/* 5 — Scaffold the real files (workflow .tsx + prompts). */}\n {proceed ? (\n \n \n \n ) : null}\n\n {/* 6 — Verify the graph renders; fix-and-retry until it compiles cleanly. */}\n {proceed && scaffold ? (\n \n \n \n {async () => {\n const command = `bunx smithers-orchestrator graph ${workflowFile}`;\n const res = await $`bunx smithers-orchestrator graph ${workflowFile}`.nothrow().quiet();\n const passed = res.exitCode === 0;\n const errText = `${res.stderr?.toString() ?? \"\"}\\n${res.stdout?.toString() ?? \"\"}`.trim();\n return {\n passed,\n command,\n errors: passed ? [] : [errText.slice(0, 6000)],\n notes: passed\n ? `${workflowName} loads and its graph renders without executing.`\n : `graph render failed for ${workflowName} — see errors.`,\n };\n }}\n \n\n \n \n \n }\n else={null}\n />\n \n \n ) : null}\n\n {/* 7 — Document the new workflow so future agents know how to run it. */}\n {proceed && verifyPassed ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Create Workflow\n// smithers-description: Build a new Smithers workflow from a plain-English ask — clarify, provision docs & skills, design, scaffold, verify, and document.\n// smithers-tags: authoring, workflow-pack, scaffolding\n/** @jsxImportSource smthrs */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClarifyPrompt from \"../prompts/create-workflow-clarify.mdx\";\nimport ProvisionPrompt from \"../prompts/create-workflow-provision.mdx\";\nimport DesignPrompt from \"../prompts/create-workflow-design.mdx\";\nimport ScaffoldPrompt from \"../prompts/create-workflow-scaffold.mdx\";\nimport FixPrompt from \"../prompts/create-workflow-fix.mdx\";\nimport DocumentPrompt from \"../prompts/create-workflow-document.mdx\";\n\nconst WORKFLOWS_DIR = \".smithers/workflows\";\nconst PROMPTS_DIR = \".smithers/prompts\";\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the workflow you want to build, in plain English.\")\n .describe(\"Plain-English description of the workflow you want Smithers to build.\"),\n name: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Desired kebab-case workflow id. Null lets the clarify/design steps choose one.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the design before any files are written.\"),\n});\n\n// 1. The freeform ask, turned into a structured, buildable spec.\nconst clarifiedSpecSchema = z.looseObject({\n name: z.string().describe(\"Proposed kebab-case workflow id.\"),\n goal: z.string().describe(\"One sentence: what the finished workflow accomplishes.\"),\n trigger: z\n .string()\n .describe(\"How it starts: manual | push | schedule | issue | landing-request | workflow-run | webhook.\"),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), purpose: z.string() }))\n .default([]),\n stages: z.array(z.string()).default([]).describe(\"Ordered high-level steps the workflow performs.\"),\n loops: z.array(z.string()).default([]).describe(\"Where it should iterate until a condition holds.\"),\n humanGates: z.array(z.string()).default([]).describe(\"Where a human approval / question belongs.\"),\n successCriteria: z.array(z.string()).default([]),\n openQuestions: z.array(z.string()).default([]).describe(\"Anything ambiguous the author should resolve.\"),\n});\n\n// 2. THE docs & skills step — what the new workflow (and the authoring agents)\n// need installed/available before it can be designed and built.\nconst provisioningSchema = z.looseObject({\n docsFragments: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"smithers.sh llms-*.txt fragments pulled into context.\"),\n examples: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"Closest examples/ workflows to copy as a starting template.\"),\n components: z\n .array(z.object({ name: z.string(), reason: z.string() }))\n .default([])\n .describe(\"Built-in or local components the new workflow should compose.\"),\n skills: z\n .array(\n z.object({\n name: z.string(),\n action: z.enum([\"installed\", \"recommended\", \"present\"]).default(\"recommended\"),\n reason: z.string(),\n }),\n )\n .default([])\n .describe(\"Agent skills the workflow's workers need; installed ones were actually synced.\"),\n agents: z.array(z.string()).default([]).describe(\"Named agent pools / providers the workflow will use.\"),\n notes: z.string().default(\"\"),\n});\n\n// 3. The concrete design the scaffolder will turn into real files.\nconst designSchema = z.looseObject({\n workflowName: z.string(),\n summary: z.string(),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), default: z.string().nullable().default(null) }))\n .default([]),\n tasks: z\n .array(\n z.object({\n id: z.string(),\n purpose: z.string(),\n agent: z.string().describe(\"agents.smart | agents.smartTool | agents.cheapFast | (none) for a function task.\"),\n outputs: z.array(z.string()).default([]),\n }),\n )\n .default([]),\n graphShape: z\n .string()\n .describe(\"How the JSX tree nests: Sequence/Parallel/Branch/Loop/Ralph/ReviewLoop, with gates and loops.\"),\n components: z.array(z.string()).default([]),\n prompts: z.array(z.string()).default([]).describe(\".mdx prompt files to author alongside the workflow.\"),\n triggers: z.array(z.string()).default([]),\n humanGates: z.array(z.string()).default([]),\n rationale: z.string().default(\"\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 5 & 6. Files written by the scaffold / fix agents.\nconst scaffoldSchema = z.looseObject({\n summary: z.string(),\n workflowName: z.string(),\n filesWritten: z\n .array(\n z.object({\n path: z.string(),\n kind: z.enum([\"workflow\", \"prompt\", \"component\", \"agents\", \"skill\", \"other\"]).default(\"other\"),\n }),\n )\n .default([]),\n});\n\n// 6. Result of rendering the new workflow's graph without executing it.\nconst verifySchema = z.looseObject({\n passed: z.boolean(),\n command: z.string(),\n errors: z.array(z.string()).default([]),\n notes: z.string().default(\"\"),\n});\n\n// 7. Agent-facing skill doc so future agents know how to run the new workflow.\nconst documentSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, Loop, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n clarify: clarifiedSpecSchema,\n provision: provisioningSchema,\n design: designSchema,\n approval: approvalSchema,\n scaffold: scaffoldSchema,\n verify: verifySchema,\n document: documentSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const clarify = ctx.outputMaybe(\"clarify\", { nodeId: \"clarify\" });\n const provision = ctx.outputMaybe(\"provision\", { nodeId: \"provision\" });\n const design = ctx.outputMaybe(\"design\", { nodeId: \"design\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-design\" });\n const scaffold = ctx.outputMaybe(\"scaffold\", { nodeId: \"scaffold\" });\n\n const designed = design !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // The name we scaffold + verify against, resolved as soon as it is known.\n const workflowName =\n scaffold?.workflowName ?? design?.workflowName ?? clarify?.name ?? ctx.input.name ?? \"new-workflow\";\n const workflowFile = `${WORKFLOWS_DIR}/${workflowName}.tsx`;\n\n // Verify-loop bookkeeping: re-render `until` against the latest verify output.\n const verifyOutputs = ctx.outputs.verify ?? [];\n const lastVerify = verifyOutputs.at(-1);\n const verifyPassed = lastVerify?.passed === true;\n const verifyFailed = lastVerify !== undefined && lastVerify.passed === false;\n\n return (\n \n \n {/* 1 — Turn the freeform ask into a structured, buildable spec. */}\n \n \n \n\n {/* 2 — Docs & skills: decide and ACTUALLY install/gather what the new\n workflow and its worker agents need before we design anything. */}\n {clarify ? (\n \n \n \n ) : null}\n\n {/* 3 — Design the concrete workflow graph from spec + provisioning. */}\n {provision ? (\n \n \n \n ) : null}\n\n {/* 4 — Optional durable human approval of the design before writing files. */}\n \n }\n else={null}\n />\n\n {/* 5 — Scaffold the real files (workflow .tsx + prompts). */}\n {proceed ? (\n \n \n \n ) : null}\n\n {/* 6 — Verify the graph renders; fix-and-retry until it compiles cleanly. */}\n {proceed && scaffold ? (\n \n \n \n {async () => {\n const command = `bunx smthrs graph ${workflowFile}`;\n const res = await $`bunx smthrs graph ${workflowFile}`.nothrow().quiet();\n const passed = res.exitCode === 0;\n const errText = `${res.stderr?.toString() ?? \"\"}\\n${res.stdout?.toString() ?? \"\"}`.trim();\n return {\n passed,\n command,\n errors: passed ? [] : [errText.slice(0, 6000)],\n notes: passed\n ? `${workflowName} loads and its graph renders without executing.`\n : `graph render failed for ${workflowName} — see errors.`,\n };\n }}\n \n\n \n \n \n }\n else={null}\n />\n \n \n ) : null}\n\n {/* 7 — Document the new workflow so future agents know how to run it. */}\n {proceed && verifyPassed ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/create-workflow-clarify.mdx",
@@ -17,7 +17,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/prompts/create-workflow-provision.mdx",
- "contents": "# Provision docs & skills for the new workflow\n\nYou are the **docs & skills** step of the \"build me a Smithers workflow\"\npipeline. Before anyone designs or writes the workflow, your job is to make sure\nthe right knowledge and capabilities are actually available — both for the\nauthoring agents (so the design is grounded in the real API, not guessed) and\nfor the worker agents the finished workflow will dispatch.\n\nYou have shell + file tools. **Actually run the commands and install what's\nmissing** — do not just recommend. Then report what you did.\n\n## Target workflow spec\n\n{JSON.stringify(props.spec, null, 2)}\n\nLocal skills directory: {props.skillsDir}\nLocal workflows directory: {props.workflowsDir}\n\n## Do this\n\n### 1. Pull the relevant Smithers docs into context\n\nThe docs are progressively disclosed as `llms-*.txt` fragments — load only what\nthis workflow needs, not the whole bundle.\n\n- `bunx smithers-orchestrator docs` — the concise `llms.txt` index.\n- Then pull the fragments that match this workflow's shape, e.g.\n `llms-core.txt` (runtime, JSX surface, CLI, components, recipes) is almost\n always relevant; add `llms-memory.txt`, `llms-openapi.txt`,\n `llms-observability.txt` (HTTP/gateway/MCP/OTel), `llms-integrations.txt`\n (agent runtimes, tools), or `llms-events.txt` only if the spec calls for them.\n- `bunx smithers-orchestrator ask \"\"` for anything specific\n (e.g. \"how do I add a human approval gate?\", \"how does Ralph decide to stop?\").\n\nRecord each fragment you pulled and why in `docsFragments`.\n\n### 2. Find the closest example to copy\n\nBrowse `examples/` (and `{props.workflowsDir}`) for the workflow(s) nearest to\nthis spec — they are the fastest correct starting point. `ls examples`, then read\n1–3 candidates. Note them in `examples` with the reason each is a good template.\n\n### 3. Pick the components to compose — don't hand-roll loops\n\nPatterns seen twice in the field already ship as components. Identify which the\nnew workflow should reuse instead of re-implementing: ``,\n``, ``, ``, ``, ``,\n``, ``, ``, ``,\n``, ``, plus the local\n`.smithers/components/*` (e.g. `ValidationLoop`, `Review`, `ForEachFeature`).\nRecord them in `components`.\n\n### 4. Install the skills the worker agents will need\n\nThe finished workflow dispatches real agents (Claude Code, Codex, …) to do the\nwork. Those agents are far more capable when the right **skills** are synced into\ntheir agent dirs.\n\n- Inventory what already exists: list `{props.skillsDir}` and note relevant\n existing skills as `present`.\n- Decide which skills this workflow's tasks need given its domain (e.g. a deploy\n workflow → infra/k8s skills; a docs workflow → a docs skill; almost any\n authoring/orchestration workflow benefits from the `smithers` skill itself).\n- Install the missing ones with `bunx smithers-orchestrator skills add `\n (this syncs them into the agent skill dirs). Mark those `installed`.\n- If a needed skill genuinely does not exist yet, mark it `recommended` and say\n what it should cover — the design step can note it as a follow-up.\n\nRecord every skill in `skills` with its `action` (installed | present |\nrecommended) and the reason.\n\n### 5. Choose the agent pools\n\nFrom `.smithers/agents.ts`, pick which named pools the workflow's tasks should\nuse — `agents.smart` (deep reasoning), `agents.smartTool` (reasoning + file/shell\ntools, for steps that edit or run things), `agents.cheapFast` (cheap validation /\nclassification). List them in `agents`.\n\n## Output\n\nReturn the provisioning manifest. `notes` should call out anything the design\nstep must know (a missing skill, an API gotcha you found in the docs, a template\nto start from). Do not design or write the workflow here.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Provision docs & skills for the new workflow\n\nYou are the **docs & skills** step of the \"build me a Smithers workflow\"\npipeline. Before anyone designs or writes the workflow, your job is to make sure\nthe right knowledge and capabilities are actually available — both for the\nauthoring agents (so the design is grounded in the real API, not guessed) and\nfor the worker agents the finished workflow will dispatch.\n\nYou have shell + file tools. **Actually run the commands and install what's\nmissing** — do not just recommend. Then report what you did.\n\n## Target workflow spec\n\n{JSON.stringify(props.spec, null, 2)}\n\nLocal skills directory: {props.skillsDir}\nLocal workflows directory: {props.workflowsDir}\n\n## Do this\n\n### 1. Pull the relevant Smithers docs into context\n\nThe docs are progressively disclosed as `llms-*.txt` fragments — load only what\nthis workflow needs, not the whole bundle.\n\n- `bunx smthrs docs` — the concise `llms.txt` index.\n- Then pull the fragments that match this workflow's shape, e.g.\n `llms-core.txt` (runtime, JSX surface, CLI, components, recipes) is almost\n always relevant; add `llms-memory.txt`, `llms-openapi.txt`,\n `llms-observability.txt` (HTTP/gateway/MCP/OTel), `llms-integrations.txt`\n (agent runtimes, tools), or `llms-events.txt` only if the spec calls for them.\n- `bunx smthrs ask \"\"` for anything specific\n (e.g. \"how do I add a human approval gate?\", \"how does Ralph decide to stop?\").\n\nRecord each fragment you pulled and why in `docsFragments`.\n\n### 2. Find the closest example to copy\n\nBrowse `examples/` (and `{props.workflowsDir}`) for the workflow(s) nearest to\nthis spec — they are the fastest correct starting point. `ls examples`, then read\n1–3 candidates. Note them in `examples` with the reason each is a good template.\n\n### 3. Pick the components to compose — don't hand-roll loops\n\nPatterns seen twice in the field already ship as components. Identify which the\nnew workflow should reuse instead of re-implementing: ``,\n``, ``, ``, ``, ``,\n``, ``, ``, ``,\n``, ``, plus the local\n`.smithers/components/*` (e.g. `ValidationLoop`, `Review`, `ForEachFeature`).\nRecord them in `components`.\n\n### 4. Install the skills the worker agents will need\n\nThe finished workflow dispatches real agents (Claude Code, Codex, …) to do the\nwork. Those agents are far more capable when the right **skills** are synced into\ntheir agent dirs.\n\n- Inventory what already exists: list `{props.skillsDir}` and note relevant\n existing skills as `present`.\n- Decide which skills this workflow's tasks need given its domain (e.g. a deploy\n workflow → infra/k8s skills; a docs workflow → a docs skill; almost any\n authoring/orchestration workflow benefits from the `smithers` skill itself).\n- Install the missing ones with `bunx smthrs skills add `\n (this syncs them into the agent skill dirs). Mark those `installed`.\n- If a needed skill genuinely does not exist yet, mark it `recommended` and say\n what it should cover — the design step can note it as a follow-up.\n\nRecord every skill in `skills` with its `action` (installed | present |\nrecommended) and the reason.\n\n### 5. Choose the agent pools\n\nFrom `.smithers/agents.ts`, pick which named pools the workflow's tasks should\nuse — `agents.smart` (deep reasoning), `agents.smartTool` (reasoning + file/shell\ntools, for steps that edit or run things), `agents.cheapFast` (cheap validation /\nclassification). List them in `agents`.\n\n## Output\n\nReturn the provisioning manifest. `notes` should call out anything the design\nstep must know (a missing skill, an API gotcha you found in the docs, a template\nto start from). Do not design or write the workflow here.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/create-workflow-design.mdx",
@@ -25,19 +25,19 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/prompts/create-workflow-scaffold.mdx",
- "contents": "# Scaffold the workflow files\n\nYou are the scaffolder. Turn the approved design into real, runnable Smithers\nfiles. You have file + shell tools — **write the files to disk**, then report\nexactly what you wrote.\n\n## Design\n\n{JSON.stringify(props.design, null, 2)}\n\n## Provisioning (templates, components, skills, agents available)\n\n{JSON.stringify(props.provisioning, null, 2)}\n\nWrite the workflow to {props.workflowsDir} as a `NAME.tsx` file (NAME = the\ndesign's kebab-case workflowName). Write each prompt to {props.promptsDir} as its\nown `.mdx` file, one per prompt named in the design.\n\n## How to write it\n\n1. **Start from the closest example** named in the provisioning manifest — copy\n its structure, then adapt. Don't invent API; if unsure, re-read the example or\n `bunx smithers-orchestrator docs`.\n2. **Workflow file header** — begin with the two seed comments and the JSX pragma,\n exactly like the other workflows in `{props.workflowsDir}`:\n ```\n // smithers-source: seeded\n // smithers-display-name: \n /** @jsxImportSource smithers-orchestrator */\n ```\n3. **Imports** — `import { createSmithers } from \"smithers-orchestrator\"`,\n `import { z } from \"zod/v4\"`, `import { agents } from \"../agents\"`, any\n components from `../components`, and each prompt from `../prompts/.mdx`.\n4. **Schemas** — define the Zod input schema and one schema per task output.\n Call `createSmithers({ input: inputSchema,
: , ... })` and\n destructure only the components you use (`Workflow`, `Task`, `Sequence`,\n `Branch`, `Loop`, `Approval`, `smithers`, `outputs`).\n5. **Graph** — `export default smithers((ctx) => ( \"> … ))`,\n matching the design's `graphShape`. Gate later stages on earlier outputs with\n `ctx.outputMaybe(\"table\", { nodeId })`, exactly like the existing workflows.\n6. **Prompts** — author each `.mdx` from the design's `prompts` list. Pass props\n from the task and end every prompt with:\n ```\n REQUIRED OUTPUT:\n {props.schema}\n ```\n7. **Agents** — only add a new provider/pool to `../agents.ts` if the design\n truly needs one that doesn't exist; otherwise reuse the existing pools.\n8. **Skills** — if the design relies on a worker skill the provisioning step\n marked `recommended` (not yet installed), create a concise skill file under\n the local skills dir so the workflow's agents have it.\n\nKeep it idiomatic and minimal — match the style of the neighbouring files. Do not\nadd dead code, placeholders, or \"TODO\" stubs. The next step renders the graph to\nverify it compiles, so make it actually load.\n\n## Output\n\nReturn a `workflowName` and the full list of `filesWritten` (path + kind).\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Scaffold the workflow files\n\nYou are the scaffolder. Turn the approved design into real, runnable Smithers\nfiles. You have file + shell tools — **write the files to disk**, then report\nexactly what you wrote.\n\n## Design\n\n{JSON.stringify(props.design, null, 2)}\n\n## Provisioning (templates, components, skills, agents available)\n\n{JSON.stringify(props.provisioning, null, 2)}\n\nWrite the workflow to {props.workflowsDir} as a `NAME.tsx` file (NAME = the\ndesign's kebab-case workflowName). Write each prompt to {props.promptsDir} as its\nown `.mdx` file, one per prompt named in the design.\n\n## How to write it\n\n1. **Start from the closest example** named in the provisioning manifest — copy\n its structure, then adapt. Don't invent API; if unsure, re-read the example or\n `bunx smthrs docs`.\n2. **Workflow file header** — begin with the two seed comments and the JSX pragma,\n exactly like the other workflows in `{props.workflowsDir}`:\n ```\n // smithers-source: seeded\n // smithers-display-name: \n /** @jsxImportSource smthrs */\n ```\n3. **Imports** — `import { createSmithers } from \"smthrs\"`,\n `import { z } from \"zod/v4\"`, `import { agents } from \"../agents\"`, any\n components from `../components`, and each prompt from `../prompts/.mdx`.\n4. **Schemas** — define the Zod input schema and one schema per task output.\n Call `createSmithers({ input: inputSchema,
: , ... })` and\n destructure only the components you use (`Workflow`, `Task`, `Sequence`,\n `Branch`, `Loop`, `Approval`, `smithers`, `outputs`).\n5. **Graph** — `export default smithers((ctx) => ( \"> … ))`,\n matching the design's `graphShape`. Gate later stages on earlier outputs with\n `ctx.outputMaybe(\"table\", { nodeId })`, exactly like the existing workflows.\n6. **Prompts** — author each `.mdx` from the design's `prompts` list. Pass props\n from the task and end every prompt with:\n ```\n REQUIRED OUTPUT:\n {props.schema}\n ```\n7. **Agents** — only add a new provider/pool to `../agents.ts` if the design\n truly needs one that doesn't exist; otherwise reuse the existing pools.\n8. **Skills** — if the design relies on a worker skill the provisioning step\n marked `recommended` (not yet installed), create a concise skill file under\n the local skills dir so the workflow's agents have it.\n\nKeep it idiomatic and minimal — match the style of the neighbouring files. Do not\nadd dead code, placeholders, or \"TODO\" stubs. The next step renders the graph to\nverify it compiles, so make it actually load.\n\n## Output\n\nReturn a `workflowName` and the full list of `filesWritten` (path + kind).\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/create-workflow-fix.mdx",
- "contents": "# Fix the workflow until its graph renders\n\nThe new workflow failed to render its graph. `smithers graph` loads the module\n(catching TypeScript / import / JSX errors) and renders one frame without\nexecuting it (catching structural errors). Read the error, fix the files, and\nmake it load. You have file + shell tools.\n\n## Workflow\n\n- Name: {props.workflowName}\n- Entry file: {props.workflowFile}\n\n## Verify command that failed\n\n`bunx smithers-orchestrator graph {props.workflowFile}`\n\n## Errors\n\n{JSON.stringify(props.errors, null, 2)}\n\n## Intended design (the source of truth for behaviour)\n\n{JSON.stringify(props.design, null, 2)}\n\n## How to fix\n\n1. Read the entry file and any prompt/component files it imports.\n2. Map the error to a cause. Common ones:\n - **Import / module not found** — a prompt or component path is wrong, or a\n named export doesn't exist. Check `{props.promptsDir}` and `../components`.\n - **Type / schema error** — a `` doesn't match its\n Zod schema, or a destructured component (`Branch`, `Loop`, `Approval`) was\n never pulled out of `createSmithers(...)`.\n - **JSX / structural** — a conditional renders the wrong child type, a node id\n is duplicated, or a control-flow component is missing a required prop\n (`Loop` needs `until`; `Approval` needs `request`).\n3. Make the smallest change that fixes the error without abandoning the design.\n If the docs would help, run `bunx smithers-orchestrator docs` or\n `bunx smithers-orchestrator ask \"\"`.\n4. Re-run `bunx smithers-orchestrator graph {props.workflowFile}` yourself to\n confirm it now exits 0 before you finish.\n\nDo not delete the workflow or stub it out to \"pass\" — fix the real problem.\n\n## Output\n\nReturn the files you changed as `filesWritten` (path + kind) and a one-line\n`summary` of the fix.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Fix the workflow until its graph renders\n\nThe new workflow failed to render its graph. `smithers graph` loads the module\n(catching TypeScript / import / JSX errors) and renders one frame without\nexecuting it (catching structural errors). Read the error, fix the files, and\nmake it load. You have file + shell tools.\n\n## Workflow\n\n- Name: {props.workflowName}\n- Entry file: {props.workflowFile}\n\n## Verify command that failed\n\n`bunx smthrs graph {props.workflowFile}`\n\n## Errors\n\n{JSON.stringify(props.errors, null, 2)}\n\n## Intended design (the source of truth for behaviour)\n\n{JSON.stringify(props.design, null, 2)}\n\n## How to fix\n\n1. Read the entry file and any prompt/component files it imports.\n2. Map the error to a cause. Common ones:\n - **Import / module not found** — a prompt or component path is wrong, or a\n named export doesn't exist. Check `{props.promptsDir}` and `../components`.\n - **Type / schema error** — a `` doesn't match its\n Zod schema, or a destructured component (`Branch`, `Loop`, `Approval`) was\n never pulled out of `createSmithers(...)`.\n - **JSX / structural** — a conditional renders the wrong child type, a node id\n is duplicated, or a control-flow component is missing a required prop\n (`Loop` needs `until`; `Approval` needs `request`).\n3. Make the smallest change that fixes the error without abandoning the design.\n If the docs would help, run `bunx smthrs docs` or\n `bunx smthrs ask \"\"`.\n4. Re-run `bunx smthrs graph {props.workflowFile}` yourself to\n confirm it now exits 0 before you finish.\n\nDo not delete the workflow or stub it out to \"pass\" — fix the real problem.\n\n## Output\n\nReturn the files you changed as `filesWritten` (path + kind) and a one-line\n`summary` of the fix.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/create-workflow-document.mdx",
- "contents": "# Document the new workflow\n\nThe new workflow renders cleanly. Write a short, agent-facing skill file so that\nfuture agents (and the human) know it exists and how to run it. You have file\ntools — write the file, then report its path.\n\n## Workflow\n\n- Name: {props.workflowName}\n\n## Design\n\n{JSON.stringify(props.design, null, 2)}\n\n## Write the skill\n\nCreate `{props.skillsDir}/{props.workflowName}.md` (create the directory if\nneeded). Use YAML frontmatter then a concise body:\n\n```\n---\nname: {props.workflowName}\ndescription: \nworkflow: {props.workflowName}\n---\n```\n\nThe body must tell an agent:\n\n1. What the workflow does and when to use it (1–2 sentences).\n2. Its inputs — especially `prompt` and any typed knobs from the design.\n3. How to start it:\n `bunx smithers-orchestrator workflow run {props.workflowName} --prompt \"…\"`\n (or `--input '{…}'` for structured inputs).\n4. How to run it detached and watch it: `-d` to detach, then\n `smithers ps`, `smithers logs -f`, `smithers inspect `.\n5. How to handle blocked states: `smithers approve ` for approval gates,\n `smithers why ` for signal waits, `smithers cancel ` to stop.\n\nKeep it practical and short — no marketing copy. Match the style of any existing\nfiles in `{props.skillsDir}` and update rather than duplicate if one already\ncovers this workflow.\n\n## Output\n\nReturn a one-line `summary` and the `skillPath` you wrote.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Document the new workflow\n\nThe new workflow renders cleanly. Write a short, agent-facing skill file so that\nfuture agents (and the human) know it exists and how to run it. You have file\ntools — write the file, then report its path.\n\n## Workflow\n\n- Name: {props.workflowName}\n\n## Design\n\n{JSON.stringify(props.design, null, 2)}\n\n## Write the skill\n\nCreate `{props.skillsDir}/{props.workflowName}.md` (create the directory if\nneeded). Use YAML frontmatter then a concise body:\n\n```\n---\nname: {props.workflowName}\ndescription: \nworkflow: {props.workflowName}\n---\n```\n\nThe body must tell an agent:\n\n1. What the workflow does and when to use it (1–2 sentences).\n2. Its inputs — especially `prompt` and any typed knobs from the design.\n3. How to start it:\n `bunx smthrs workflow run {props.workflowName} --prompt \"…\"`\n (or `--input '{…}'` for structured inputs).\n4. How to run it detached and watch it: `-d` to detach, then\n `smithers ps`, `smithers logs -f`, `smithers inspect `.\n5. How to handle blocked states: `smithers approve ` for approval gates,\n `smithers why ` for signal waits, `smithers cancel ` to stop.\n\nKeep it practical and short — no marketing copy. Match the style of any existing\nfiles in `{props.skillsDir}` and update rather than duplicate if one already\ncovers this workflow.\n\n## Output\n\nReturn a one-line `summary` and the `skillPath` you wrote.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/workflows/context-engineer.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Context Engineer\n// smithers-description: Turn a vague user script into a context contract, route it to skills/workflows, add backpressure, execute, and report — the concierge proxy.\n// smithers-tags: concierge, context-engineering, planning\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport { GrillMe, grillOutputSchema } from \"../components/GrillMe\";\nimport ClassifyPrompt from \"../prompts/context-engineer-classify.mdx\";\nimport InventoryPrompt from \"../prompts/context-engineer-inventory.mdx\";\nimport RoutePrompt from \"../prompts/context-engineer-route.mdx\";\nimport BackpressurePrompt from \"../prompts/context-engineer-backpressure.mdx\";\nimport ExecutePrompt from \"../prompts/context-engineer-execute.mdx\";\nimport ReportPrompt from \"../prompts/context-engineer-report.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\nconst WORKFLOWS_DIR = \".smithers/workflows\";\n\n// The durable, seeded workflows the concierge can route the script to. Keep this\n// loosely in sync with the workflows actually present in .smithers/workflows/.\nconst SEEDED_WORKFLOWS = [\n \"implement\",\n \"research-plan-implement\",\n \"review\",\n \"plan\",\n \"research\",\n \"grill-me\",\n \"ralph\",\n \"debug\",\n \"audit\",\n \"create-workflow\",\n \"create-skill\",\n \"context-doctor\",\n \"backpressure-plan\",\n \"route-task\",\n \"report-slideshow\",\n \"monitor-smithers\",\n] as const;\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe what you want Smithers to do, in plain English.\")\n .describe(\"The vague user script the concierge turns into a context contract and then executes.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the context contract before any work is executed.\"),\n});\n\n// 1. The classifier's read on the script: which modes it touches, and whether it\n// earns the overhead of a durable workflow.\nconst classifySchema = z.looseObject({\n modes: z\n .array(z.string())\n .default([])\n .describe(\"The task modes the script maps onto (e.g. research, planning, implementation, debugging, report).\"),\n durable: z\n .boolean()\n .describe(\"True when the work needs ordering, crash-recovery, approvals, or loops — i.e. a real workflow.\"),\n reason: z.string().default(\"\").describe(\"One or two sentences justifying the modes + durable call.\"),\n});\n\n// 2. The context contract draft — the heart of the proxy. The inventory step\n// inspects the repo, tools, and .smithers/skills to fill this in.\nconst contractSchema = z.looseObject({\n goal: z.string().describe(\"One sentence: the outcome the script is really after.\"),\n nonGoals: z.array(z.string()).default([]).describe(\"Explicitly out of scope, to stop drift.\"),\n assumptions: z.array(z.string()).default([]).describe(\"Reasonable assumptions made to fill gaps in the script.\"),\n inputs: z\n .array(z.looseObject({ name: z.string(), source: z.string().default(\"\"), value: z.string().default(\"\") }))\n .default([])\n .describe(\"Inputs the work needs and where each comes from.\"),\n missingInputs: z.array(z.string()).default([]).describe(\"Inputs the script is missing — candidates for grilling.\"),\n availableTools: z.array(z.string()).default([]).describe(\"Tools/commands available to do the work.\"),\n availableSkills: z.array(z.string()).default([]).describe(\"Relevant skills found under .smithers/skills.\"),\n constraints: z.array(z.string()).default([]).describe(\"Hard constraints the work must respect.\"),\n risks: z.array(z.string()).default([]).describe(\"Risks or side effects to guard against.\"),\n desiredArtifacts: z.array(z.string()).default([]).describe(\"Concrete artifacts a successful run should produce.\"),\n successCriteria: z.array(z.string()).default([]).describe(\"How we know the work is done.\"),\n verificationSignals: z\n .array(z.string())\n .default([])\n .describe(\"Observable signals (tests, traces, reviews) that prove each success criterion.\"),\n});\n\n// 3. The grill output — reuses GrillMe's schema so the component can write to it.\n// Used to resolve blocking ambiguity, one question at a time.\n\n// 4. The router's decision: how to actually carry out the contracted work.\nconst routeSchema = z.looseObject({\n selectedRoute: z\n .enum([\"single_task\", \"skills\", \"workflow\", \"manual\"])\n .describe(\"How the work is carried out: a one-shot task, a set of skills, a durable workflow, or hand to a human.\"),\n selectedSkills: z.array(z.string()).default([]).describe(\"Skills the executor should load, best-first.\"),\n selectedWorkflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"If routed to a durable workflow, the single best-fit seeded workflow id; otherwise null.\"),\n durableRequired: z.boolean().default(false).describe(\"True when the route genuinely needs durable execution.\"),\n humanApprovalRequired: z.boolean().default(false).describe(\"True when a human gate is needed before side effects.\"),\n reason: z.string().default(\"\").describe(\"Why this route fits the contract and classification.\"),\n});\n\n// 5. The backpressure gate matrix — every success criterion mapped to how it is\n// verified and enforced, so the executor cannot just try-its-best and move on.\nconst backpressureSchema = z.looseObject({\n gates: z\n .array(\n z.looseObject({\n criterion: z.string().describe(\"The success criterion this gate enforces.\"),\n verificationMethod: z\n .enum([\n \"schema\",\n \"unit_test\",\n \"integration_test\",\n \"eval\",\n \"review\",\n \"approval\",\n \"trace\",\n \"manual_check\",\n ])\n .describe(\"How the criterion is checked.\"),\n gateType: z\n .enum([\"blocking\", \"warning\", \"informational\"])\n .describe(\"blocking stops the run; warning flags; informational only records.\"),\n failureAction: z.string().describe(\"What happens when this gate fails.\"),\n evidenceRequired: z\n .array(z.string())\n .default([])\n .describe(\"Concrete artifacts that prove the gate passed (logs, diffs, reports, traces).\"),\n }),\n )\n .default([])\n .describe(\"One gate per success criterion; every blocking criterion names a verification method.\"),\n summary: z.string().default(\"\").describe(\"2-3 sentence overview of the backpressure plan.\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 7. The execution step's report of what it did or dispatched.\nconst executeSchema = z.looseObject({\n summary: z.string().describe(\"What was done or dispatched this iteration.\"),\n done: z.boolean().describe(\"True when the contracted work is fully carried out.\"),\n artifacts: z.array(z.string()).default([]).describe(\"Files written, outputs produced, or workflows dispatched.\"),\n});\n\n// 8. The final HTML slideshow-style report of the whole concierge run.\nconst reportSchema = z.looseObject({\n html: z.string().describe(\"A complete, self-contained HTML slideshow report (inline CSS, no external deps).\"),\n summary: z.string().default(\"\").describe(\"One-line summary of the run for the CLI.\"),\n});\n\nconst { Workflow, Task, Sequence, Branch, Ralph, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n classify: classifySchema,\n inventory: contractSchema,\n grill: grillOutputSchema,\n route: routeSchema,\n backpressure: backpressureSchema,\n approval: approvalSchema,\n execute: executeSchema,\n report: reportSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify-script\" });\n const contract = ctx.outputMaybe(\"inventory\", { nodeId: \"inventory-context\" });\n const route = ctx.outputMaybe(\"route\", { nodeId: \"route\" });\n const backpressure = ctx.outputMaybe(\"backpressure\", { nodeId: \"build-backpressure\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-contract\" });\n\n // Grill bookkeeping: the latest answer from the one-question-at-a-time loop.\n const grills = ctx.outputs.grill ?? [];\n const lastGrill = grills.at(-1);\n const grillResolved = lastGrill?.resolved === true;\n\n // The contract is \"designed\" once it has been drafted and grilling has settled.\n const designed = contract !== undefined && backpressure !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // Execute-loop bookkeeping: re-render the `until` against the latest execute output.\n const executeOutputs = ctx.outputs.execute ?? [];\n const lastExecute = executeOutputs.at(-1);\n const executed = lastExecute?.done === true;\n\n return (\n \n \n {/* 1 — Classify the vague script into modes + a durability call. */}\n \n \n \n\n {/* 2 — Inventory the repo/tools/skills into a context contract draft. */}\n {classify ? (\n \n \n \n ) : null}\n\n {/* 3 — Resolve blocking ambiguity by grilling, one question at a time,\n with a recommended answer each time. Reuses the GrillMe component. */}\n {contract ? (\n \n ) : null}\n\n {/* 4 — Route the contracted work: single task, skills, durable workflow, or human. */}\n {contract ? (\n \n \n \n ) : null}\n\n {/* 5 — Turn the success criteria into a backpressure gate matrix. */}\n {route ? (\n \n \n \n ) : null}\n\n {/* 6 — Optional durable human approval of the whole contract before executing. */}\n \n }\n else={null}\n />\n\n {/* 7 — Execute (or dispatch) the contracted work, looping until done. */}\n {proceed ? (\n \n \n \n \n \n ) : null}\n\n {/* 8 — Report the whole concierge run as a self-contained HTML slideshow. */}\n {proceed && executed ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Context Engineer\n// smithers-description: Turn a vague user script into a context contract, route it to skills/workflows, add backpressure, execute, and report — the concierge proxy.\n// smithers-tags: concierge, context-engineering, planning\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport { GrillMe, grillOutputSchema } from \"../components/GrillMe\";\nimport ClassifyPrompt from \"../prompts/context-engineer-classify.mdx\";\nimport InventoryPrompt from \"../prompts/context-engineer-inventory.mdx\";\nimport RoutePrompt from \"../prompts/context-engineer-route.mdx\";\nimport BackpressurePrompt from \"../prompts/context-engineer-backpressure.mdx\";\nimport ExecutePrompt from \"../prompts/context-engineer-execute.mdx\";\nimport ReportPrompt from \"../prompts/context-engineer-report.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\nconst WORKFLOWS_DIR = \".smithers/workflows\";\n\n// The durable, seeded workflows the concierge can route the script to. Keep this\n// loosely in sync with the workflows actually present in .smithers/workflows/.\nconst SEEDED_WORKFLOWS = [\n \"implement\",\n \"research-plan-implement\",\n \"review\",\n \"plan\",\n \"research\",\n \"grill-me\",\n \"ralph\",\n \"debug\",\n \"audit\",\n \"create-workflow\",\n \"create-skill\",\n \"context-doctor\",\n \"backpressure-plan\",\n \"route-task\",\n \"report-slideshow\",\n \"monitor-smithers\",\n] as const;\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe what you want Smithers to do, in plain English.\")\n .describe(\"The vague user script the concierge turns into a context contract and then executes.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the context contract before any work is executed.\"),\n});\n\n// 1. The classifier's read on the script: which modes it touches, and whether it\n// earns the overhead of a durable workflow.\nconst classifySchema = z.looseObject({\n modes: z\n .array(z.string())\n .default([])\n .describe(\"The task modes the script maps onto (e.g. research, planning, implementation, debugging, report).\"),\n durable: z\n .boolean()\n .describe(\"True when the work needs ordering, crash-recovery, approvals, or loops — i.e. a real workflow.\"),\n reason: z.string().default(\"\").describe(\"One or two sentences justifying the modes + durable call.\"),\n});\n\n// 2. The context contract draft — the heart of the proxy. The inventory step\n// inspects the repo, tools, and .smithers/skills to fill this in.\nconst contractSchema = z.looseObject({\n goal: z.string().describe(\"One sentence: the outcome the script is really after.\"),\n nonGoals: z.array(z.string()).default([]).describe(\"Explicitly out of scope, to stop drift.\"),\n assumptions: z.array(z.string()).default([]).describe(\"Reasonable assumptions made to fill gaps in the script.\"),\n inputs: z\n .array(z.looseObject({ name: z.string(), source: z.string().default(\"\"), value: z.string().default(\"\") }))\n .default([])\n .describe(\"Inputs the work needs and where each comes from.\"),\n missingInputs: z.array(z.string()).default([]).describe(\"Inputs the script is missing — candidates for grilling.\"),\n availableTools: z.array(z.string()).default([]).describe(\"Tools/commands available to do the work.\"),\n availableSkills: z.array(z.string()).default([]).describe(\"Relevant skills found under .smithers/skills.\"),\n constraints: z.array(z.string()).default([]).describe(\"Hard constraints the work must respect.\"),\n risks: z.array(z.string()).default([]).describe(\"Risks or side effects to guard against.\"),\n desiredArtifacts: z.array(z.string()).default([]).describe(\"Concrete artifacts a successful run should produce.\"),\n successCriteria: z.array(z.string()).default([]).describe(\"How we know the work is done.\"),\n verificationSignals: z\n .array(z.string())\n .default([])\n .describe(\"Observable signals (tests, traces, reviews) that prove each success criterion.\"),\n});\n\n// 3. The grill output — reuses GrillMe's schema so the component can write to it.\n// Used to resolve blocking ambiguity, one question at a time.\n\n// 4. The router's decision: how to actually carry out the contracted work.\nconst routeSchema = z.looseObject({\n selectedRoute: z\n .enum([\"single_task\", \"skills\", \"workflow\", \"manual\"])\n .describe(\"How the work is carried out: a one-shot task, a set of skills, a durable workflow, or hand to a human.\"),\n selectedSkills: z.array(z.string()).default([]).describe(\"Skills the executor should load, best-first.\"),\n selectedWorkflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"If routed to a durable workflow, the single best-fit seeded workflow id; otherwise null.\"),\n durableRequired: z.boolean().default(false).describe(\"True when the route genuinely needs durable execution.\"),\n humanApprovalRequired: z.boolean().default(false).describe(\"True when a human gate is needed before side effects.\"),\n reason: z.string().default(\"\").describe(\"Why this route fits the contract and classification.\"),\n});\n\n// 5. The backpressure gate matrix — every success criterion mapped to how it is\n// verified and enforced, so the executor cannot just try-its-best and move on.\nconst backpressureSchema = z.looseObject({\n gates: z\n .array(\n z.looseObject({\n criterion: z.string().describe(\"The success criterion this gate enforces.\"),\n verificationMethod: z\n .enum([\n \"schema\",\n \"unit_test\",\n \"integration_test\",\n \"eval\",\n \"review\",\n \"approval\",\n \"trace\",\n \"manual_check\",\n ])\n .describe(\"How the criterion is checked.\"),\n gateType: z\n .enum([\"blocking\", \"warning\", \"informational\"])\n .describe(\"blocking stops the run; warning flags; informational only records.\"),\n failureAction: z.string().describe(\"What happens when this gate fails.\"),\n evidenceRequired: z\n .array(z.string())\n .default([])\n .describe(\"Concrete artifacts that prove the gate passed (logs, diffs, reports, traces).\"),\n }),\n )\n .default([])\n .describe(\"One gate per success criterion; every blocking criterion names a verification method.\"),\n summary: z.string().default(\"\").describe(\"2-3 sentence overview of the backpressure plan.\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 7. The execution step's report of what it did or dispatched.\nconst executeSchema = z.looseObject({\n summary: z.string().describe(\"What was done or dispatched this iteration.\"),\n done: z.boolean().describe(\"True when the contracted work is fully carried out.\"),\n artifacts: z.array(z.string()).default([]).describe(\"Files written, outputs produced, or workflows dispatched.\"),\n});\n\n// 8. The final HTML slideshow-style report of the whole concierge run.\nconst reportSchema = z.looseObject({\n html: z.string().describe(\"A complete, self-contained HTML slideshow report (inline CSS, no external deps).\"),\n summary: z.string().default(\"\").describe(\"One-line summary of the run for the CLI.\"),\n});\n\nconst { Workflow, Task, Sequence, Branch, Ralph, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n classify: classifySchema,\n inventory: contractSchema,\n grill: grillOutputSchema,\n route: routeSchema,\n backpressure: backpressureSchema,\n approval: approvalSchema,\n execute: executeSchema,\n report: reportSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify-script\" });\n const contract = ctx.outputMaybe(\"inventory\", { nodeId: \"inventory-context\" });\n const route = ctx.outputMaybe(\"route\", { nodeId: \"route\" });\n const backpressure = ctx.outputMaybe(\"backpressure\", { nodeId: \"build-backpressure\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-contract\" });\n\n // Grill bookkeeping: the latest answer from the one-question-at-a-time loop.\n const grills = ctx.outputs.grill ?? [];\n const lastGrill = grills.at(-1);\n const grillResolved = lastGrill?.resolved === true;\n\n // The contract is \"designed\" once it has been drafted and grilling has settled.\n const designed = contract !== undefined && backpressure !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // Execute-loop bookkeeping: re-render the `until` against the latest execute output.\n const executeOutputs = ctx.outputs.execute ?? [];\n const lastExecute = executeOutputs.at(-1);\n const executed = lastExecute?.done === true;\n\n return (\n \n \n {/* 1 — Classify the vague script into modes + a durability call. */}\n \n \n \n\n {/* 2 — Inventory the repo/tools/skills into a context contract draft. */}\n {classify ? (\n \n \n \n ) : null}\n\n {/* 3 — Resolve blocking ambiguity by grilling, one question at a time,\n with a recommended answer each time. Reuses the GrillMe component. */}\n {contract ? (\n \n ) : null}\n\n {/* 4 — Route the contracted work: single task, skills, durable workflow, or human. */}\n {contract ? (\n \n \n \n ) : null}\n\n {/* 5 — Turn the success criteria into a backpressure gate matrix. */}\n {route ? (\n \n \n \n ) : null}\n\n {/* 6 — Optional durable human approval of the whole contract before executing. */}\n \n }\n else={null}\n />\n\n {/* 7 — Execute (or dispatch) the contracted work, looping until done. */}\n {proceed ? (\n \n \n \n \n \n ) : null}\n\n {/* 8 — Report the whole concierge run as a self-contained HTML slideshow. */}\n {proceed && executed ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/context-engineer-classify.mdx",
@@ -45,7 +45,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/prompts/context-engineer-inventory.mdx",
- "contents": "# Inventory the context into a contract\n\nYou are the **context contract** step of the Context Engineer. A vague user\nscript just arrived. Before anyone routes or executes it, your job is to turn it\ninto an explicit, grounded **context contract** — the shared understanding of\nwhat is really being asked, what is available to do it, and how we will know it\nworked.\n\nYou have shell + file tools. **Actually inspect the environment** to ground the\ncontract in reality, not guesses. Then report the contract.\n\n## The script\n\n{props.prompt}\n\n## Classification (from the intake step)\n\n```json\n{JSON.stringify(props.classification, null, 2)}\n```\n\nLocal skills directory: {props.skillsDir}\nLocal workflows directory: {props.workflowsDir}\n\n## Inspect before you fill in the contract\n\n- Look at the repo: read `README`/`CLAUDE.md`/top-level layout to learn what this\n project is and what conventions apply.\n- Inventory tools: which commands and capabilities are actually available to do\n this work (build/test runners, CLIs, `bunx smithers-orchestrator ...`).\n- Inventory skills: list `{props.skillsDir}` and note the skills relevant to this\n script in `availableSkills`.\n- Inventory workflows: glance at `{props.workflowsDir}` for durable workflows the\n router might reuse.\n\nUse real findings — a `goal` and `availableSkills` you confirmed beat ones you\nimagined.\n\n## Fill in the contract\n\nProduce a context contract with these fields:\n\n- `goal` — one sentence: the outcome the script is really after.\n- `nonGoals` — explicitly out of scope, to stop drift.\n- `assumptions` — reasonable assumptions you made to fill gaps in the script.\n- `inputs` — inputs the work needs, each with a `name`, a `source` (where it comes\n from), and a `value` if already known.\n- `missingInputs` — inputs the script is missing. Be honest: these become the\n questions a later grilling step asks the user.\n- `availableTools` — tools/commands you confirmed are available.\n- `availableSkills` — relevant skills found under `{props.skillsDir}`.\n- `constraints` — hard constraints the work must respect (style rules, \"only jj\",\n \"don't modify file X\", etc.).\n- `risks` — risks or side effects to guard against.\n- `desiredArtifacts` — concrete artifacts a successful run should produce.\n- `successCriteria` — how we know the work is done.\n- `verificationSignals` — observable signals (tests, traces, reviews, manual\n checks) that prove each success criterion.\n\nBe concrete and minimal. Do NOT execute the user's actual task here — only build\nthe contract that describes it.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Inventory the context into a contract\n\nYou are the **context contract** step of the Context Engineer. A vague user\nscript just arrived. Before anyone routes or executes it, your job is to turn it\ninto an explicit, grounded **context contract** — the shared understanding of\nwhat is really being asked, what is available to do it, and how we will know it\nworked.\n\nYou have shell + file tools. **Actually inspect the environment** to ground the\ncontract in reality, not guesses. Then report the contract.\n\n## The script\n\n{props.prompt}\n\n## Classification (from the intake step)\n\n```json\n{JSON.stringify(props.classification, null, 2)}\n```\n\nLocal skills directory: {props.skillsDir}\nLocal workflows directory: {props.workflowsDir}\n\n## Inspect before you fill in the contract\n\n- Look at the repo: read `README`/`CLAUDE.md`/top-level layout to learn what this\n project is and what conventions apply.\n- Inventory tools: which commands and capabilities are actually available to do\n this work (build/test runners, CLIs, `bunx smthrs ...`).\n- Inventory skills: list `{props.skillsDir}` and note the skills relevant to this\n script in `availableSkills`.\n- Inventory workflows: glance at `{props.workflowsDir}` for durable workflows the\n router might reuse.\n\nUse real findings — a `goal` and `availableSkills` you confirmed beat ones you\nimagined.\n\n## Fill in the contract\n\nProduce a context contract with these fields:\n\n- `goal` — one sentence: the outcome the script is really after.\n- `nonGoals` — explicitly out of scope, to stop drift.\n- `assumptions` — reasonable assumptions you made to fill gaps in the script.\n- `inputs` — inputs the work needs, each with a `name`, a `source` (where it comes\n from), and a `value` if already known.\n- `missingInputs` — inputs the script is missing. Be honest: these become the\n questions a later grilling step asks the user.\n- `availableTools` — tools/commands you confirmed are available.\n- `availableSkills` — relevant skills found under `{props.skillsDir}`.\n- `constraints` — hard constraints the work must respect (style rules, \"only jj\",\n \"don't modify file X\", etc.).\n- `risks` — risks or side effects to guard against.\n- `desiredArtifacts` — concrete artifacts a successful run should produce.\n- `successCriteria` — how we know the work is done.\n- `verificationSignals` — observable signals (tests, traces, reviews, manual\n checks) that prove each success criterion.\n\nBe concrete and minimal. Do NOT execute the user's actual task here — only build\nthe contract that describes it.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/context-engineer-route.mdx",
@@ -57,7 +57,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/prompts/context-engineer-execute.mdx",
- "contents": "# Execute the contracted work\n\nYou are the **executor** of the Context Engineer. The context contract is\napproved, the route is chosen, and the backpressure gates are defined. Carry out\nthe work — or dispatch it along the chosen route — honoring every gate. You have\nshell + file tools.\n\n## The script\n\n{props.prompt}\n\n## Context contract\n\n```json\n{JSON.stringify(props.contract, null, 2)}\n```\n\n## Chosen route\n\n```json\n{JSON.stringify(props.route, null, 2)}\n```\n\n## Backpressure gates you must satisfy\n\n```json\n{JSON.stringify(props.backpressure, null, 2)}\n```\n\n## Previous iteration (may be null)\n\nThis task runs in a loop until `done` is true. If a prior iteration ran, here is\nwhat it reported — continue from there rather than restarting.\n\n{props.previous ? \"```json\\n\" + JSON.stringify(props.previous, null, 2) + \"\\n```\" : \"(this is the first execution iteration)\"}\n\n## Do the work along the route\n\n- If the route is `single_task` or `skills`: do the work directly with your\n tools, loading the route's `selectedSkills` where helpful.\n- If the route is `workflow`: dispatch the chosen `selectedWorkflow` (e.g.\n `bunx smithers-orchestrator workflow run --input '{...}'`) and report what\n you dispatched and how to watch it.\n- If the route is `manual`: do not force the work — summarize exactly what a human\n must do and mark the relevant gate's evidence as pending.\n\nFor every `blocking` gate, produce the `evidenceRequired` and run the\n`verificationMethod` (run the tests, capture the trace, etc.). Do not claim\n`done: true` until every blocking gate is satisfied with real evidence.\n\n## Output\n\n- `summary` — what you did or dispatched this iteration.\n- `done` — true only when the contracted work is fully carried out and every\n blocking gate is satisfied; false to run another iteration.\n- `artifacts` — files written, outputs produced, or workflows dispatched.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Execute the contracted work\n\nYou are the **executor** of the Context Engineer. The context contract is\napproved, the route is chosen, and the backpressure gates are defined. Carry out\nthe work — or dispatch it along the chosen route — honoring every gate. You have\nshell + file tools.\n\n## The script\n\n{props.prompt}\n\n## Context contract\n\n```json\n{JSON.stringify(props.contract, null, 2)}\n```\n\n## Chosen route\n\n```json\n{JSON.stringify(props.route, null, 2)}\n```\n\n## Backpressure gates you must satisfy\n\n```json\n{JSON.stringify(props.backpressure, null, 2)}\n```\n\n## Previous iteration (may be null)\n\nThis task runs in a loop until `done` is true. If a prior iteration ran, here is\nwhat it reported — continue from there rather than restarting.\n\n{props.previous ? \"```json\\n\" + JSON.stringify(props.previous, null, 2) + \"\\n```\" : \"(this is the first execution iteration)\"}\n\n## Do the work along the route\n\n- If the route is `single_task` or `skills`: do the work directly with your\n tools, loading the route's `selectedSkills` where helpful.\n- If the route is `workflow`: dispatch the chosen `selectedWorkflow` (e.g.\n `bunx smthrs workflow run --input '{...}'`) and report what\n you dispatched and how to watch it.\n- If the route is `manual`: do not force the work — summarize exactly what a human\n must do and mark the relevant gate's evidence as pending.\n\nFor every `blocking` gate, produce the `evidenceRequired` and run the\n`verificationMethod` (run the tests, capture the trace, etc.). Do not claim\n`done: true` until every blocking gate is satisfied with real evidence.\n\n## Output\n\n- `summary` — what you did or dispatched this iteration.\n- `done` — true only when the contracted work is fully carried out and every\n blocking gate is satisfied; false to run another iteration.\n- `artifacts` — files written, outputs produced, or workflows dispatched.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/context-engineer-report.mdx",
@@ -65,7 +65,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/route-task.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Route Task\n// smithers-description: Classify a plain-English script and either run it as a single task or recommend the right durable workflow.\n// smithers-tags: concierge, routing\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClassifyPrompt from \"../prompts/route-task-classify.mdx\";\nimport ExecutePrompt from \"../prompts/route-task-execute.mdx\";\nimport RecommendPrompt from \"../prompts/route-task-recommend.mdx\";\n\n// The seeded, durable workflows the concierge can hand off to. Keep this in sync\n// with the workflows actually present in .smithers/workflows/.\nconst SEEDED_WORKFLOWS = [\n \"implement\",\n \"research-plan-implement\",\n \"review\",\n \"plan\",\n \"research\",\n \"grill-me\",\n \"ralph\",\n \"debug\",\n \"audit\",\n \"create-workflow\",\n \"context-doctor\",\n \"monitor-smithers\",\n] as const;\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the task you want Smithers to handle, in plain English.\")\n .describe(\"Plain-English description of the task to route — run directly or hand to a durable workflow.\"),\n});\n\n// 1. The classifier's verdict: what kind of task this is, and whether it needs a\n// durable workflow (ordering, crash-recovery, approvals, loops) or can run as\n// a single one-shot task.\nconst classifySchema = z.looseObject({\n mode: z\n .enum([\n \"single_task\",\n \"research\",\n \"planning\",\n \"implementation\",\n \"debugging\",\n \"report\",\n \"data_extraction\",\n \"multi_step\",\n ])\n .describe(\"The task mode the script maps onto.\"),\n durable: z\n .boolean()\n .describe(\"True when the task needs ordering, crash-recovery, approvals, or loops — i.e. a real workflow.\"),\n recommendedWorkflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"If durable, the best-fit seeded workflow id; otherwise null.\"),\n reason: z.string().describe(\"One or two sentences justifying the mode + durable call.\"),\n});\n\n// 2a. Non-durable path: the work was actually done in a single task.\nconst executeSchema = z.looseObject({\n summary: z.string().describe(\"What was done, in a sentence or two.\"),\n done: z.boolean().describe(\"True when the task was fully completed in this single step.\"),\n});\n\n// 2b. Durable path: a pointer at the right seeded workflow to run instead.\nconst recommendSchema = z.looseObject({\n recommendedWorkflow: z.string().describe(\"The single best-fit seeded workflow id to run.\"),\n why: z.string().describe(\"Why this workflow fits the task — what durable behaviour it provides.\"),\n alternativeWorkflows: z\n .array(z.string())\n .default([])\n .describe(\"Other seeded workflows that could also fit, best-first.\"),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n classify: classifySchema,\n execute: executeSchema,\n recommend: recommendSchema,\n});\n\nexport default smithers((ctx) => {\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify\" });\n\n // Gate the two paths on the classifier's verdict. Only one branch runs.\n const classified = classify !== undefined;\n const durable = classify?.durable === true;\n\n return (\n \n \n {/* 1 — Classify the script into a mode and decide whether it needs a durable workflow. */}\n \n \n \n\n {/* 2 — Branch: run it directly (non-durable) or recommend a durable workflow. */}\n {classified ? (\n \n \n \n }\n else={\n \n \n \n }\n />\n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Route Task\n// smithers-description: Classify a plain-English script and either run it as a single task or recommend the right durable workflow.\n// smithers-tags: concierge, routing\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClassifyPrompt from \"../prompts/route-task-classify.mdx\";\nimport ExecutePrompt from \"../prompts/route-task-execute.mdx\";\nimport RecommendPrompt from \"../prompts/route-task-recommend.mdx\";\n\n// The seeded, durable workflows the concierge can hand off to. Keep this in sync\n// with the workflows actually present in .smithers/workflows/.\nconst SEEDED_WORKFLOWS = [\n \"implement\",\n \"research-plan-implement\",\n \"review\",\n \"plan\",\n \"research\",\n \"grill-me\",\n \"ralph\",\n \"debug\",\n \"audit\",\n \"create-workflow\",\n \"context-doctor\",\n \"monitor-smithers\",\n] as const;\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the task you want Smithers to handle, in plain English.\")\n .describe(\"Plain-English description of the task to route — run directly or hand to a durable workflow.\"),\n});\n\n// 1. The classifier's verdict: what kind of task this is, and whether it needs a\n// durable workflow (ordering, crash-recovery, approvals, loops) or can run as\n// a single one-shot task.\nconst classifySchema = z.looseObject({\n mode: z\n .enum([\n \"single_task\",\n \"research\",\n \"planning\",\n \"implementation\",\n \"debugging\",\n \"report\",\n \"data_extraction\",\n \"multi_step\",\n ])\n .describe(\"The task mode the script maps onto.\"),\n durable: z\n .boolean()\n .describe(\"True when the task needs ordering, crash-recovery, approvals, or loops — i.e. a real workflow.\"),\n recommendedWorkflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"If durable, the best-fit seeded workflow id; otherwise null.\"),\n reason: z.string().describe(\"One or two sentences justifying the mode + durable call.\"),\n});\n\n// 2a. Non-durable path: the work was actually done in a single task.\nconst executeSchema = z.looseObject({\n summary: z.string().describe(\"What was done, in a sentence or two.\"),\n done: z.boolean().describe(\"True when the task was fully completed in this single step.\"),\n});\n\n// 2b. Durable path: a pointer at the right seeded workflow to run instead.\nconst recommendSchema = z.looseObject({\n recommendedWorkflow: z.string().describe(\"The single best-fit seeded workflow id to run.\"),\n why: z.string().describe(\"Why this workflow fits the task — what durable behaviour it provides.\"),\n alternativeWorkflows: z\n .array(z.string())\n .default([])\n .describe(\"Other seeded workflows that could also fit, best-first.\"),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n classify: classifySchema,\n execute: executeSchema,\n recommend: recommendSchema,\n});\n\nexport default smithers((ctx) => {\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify\" });\n\n // Gate the two paths on the classifier's verdict. Only one branch runs.\n const classified = classify !== undefined;\n const durable = classify?.durable === true;\n\n return (\n \n \n {/* 1 — Classify the script into a mode and decide whether it needs a durable workflow. */}\n \n \n \n\n {/* 2 — Branch: run it directly (non-durable) or recommend a durable workflow. */}\n {classified ? (\n \n \n \n }\n else={\n \n \n \n }\n />\n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/route-task-classify.mdx",
@@ -81,7 +81,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/create-skill.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Create Skill\n// smithers-description: Author a new agent skill (SKILL.md + supporting files) from a plain-English ask.\n// smithers-tags: authoring, skills\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClarifyPrompt from \"../prompts/create-skill-clarify.mdx\";\nimport DesignPrompt from \"../prompts/create-skill-design.mdx\";\nimport ScaffoldPrompt from \"../prompts/create-skill-scaffold.mdx\";\nimport DocumentPrompt from \"../prompts/create-skill-document.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the agent skill you want to create, in plain English.\")\n .describe(\"Plain-English description of the agent skill you want Smithers to author.\"),\n name: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Desired kebab-case skill id. Null lets the clarify/design steps choose one.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the design before any files are written.\"),\n});\n\n// 1. The freeform ask, turned into a structured skill spec.\nconst skillSpecSchema = z.looseObject({\n name: z.string().describe(\"Proposed kebab-case skill id.\"),\n purpose: z.string().describe(\"One sentence: what the skill equips an agent to do.\"),\n whenToUse: z\n .string()\n .describe(\"Trigger phrasing — when an agent should reach for this skill.\"),\n capabilities: z\n .array(z.string())\n .default([])\n .describe(\"The concrete things an agent can do once this skill is in context.\"),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Parameters / context the skill expects when invoked.\"),\n openQuestions: z\n .array(z.string())\n .default([])\n .describe(\"Anything ambiguous the author should resolve.\"),\n});\n\n// 2. The concrete design the scaffolder turns into a real SKILL.md.\nconst designSchema = z.looseObject({\n skillName: z.string().describe(\"Final kebab-case skill id.\"),\n frontmatter: z\n .object({\n name: z.string(),\n description: z\n .string()\n .describe(\"One line: what it does and when to use it — goes in YAML frontmatter.\"),\n })\n .describe(\"YAML frontmatter for the SKILL.md file.\"),\n sections: z\n .array(z.object({ heading: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Ordered body sections the SKILL.md should contain.\"),\n supportingFiles: z\n .array(z.object({ path: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Optional extra files (scripts, references) the skill ships alongside SKILL.md.\"),\n rationale: z.string().default(\"\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 3. Files written by the scaffold agent.\nconst scaffoldSchema = z.looseObject({\n summary: z.string(),\n skillName: z.string(),\n filesWritten: z\n .array(\n z.object({\n path: z.string(),\n kind: z.enum([\"skill\", \"supporting\", \"other\"]).default(\"skill\"),\n }),\n )\n .default([]),\n});\n\n// 4. Agent-facing summary of what was created.\nconst documentSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n clarify: skillSpecSchema,\n design: designSchema,\n approval: approvalSchema,\n scaffold: scaffoldSchema,\n document: documentSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const clarify = ctx.outputMaybe(\"clarify\", { nodeId: \"clarify\" });\n const design = ctx.outputMaybe(\"design\", { nodeId: \"design\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-design\" });\n const scaffold = ctx.outputMaybe(\"scaffold\", { nodeId: \"scaffold\" });\n\n const designed = design !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // The name we scaffold against, resolved as soon as it is known.\n const skillName =\n scaffold?.skillName ?? design?.skillName ?? clarify?.name ?? ctx.input.name ?? \"new-skill\";\n\n return (\n \n \n {/* 1 — Turn the freeform ask into a structured skill spec. */}\n \n \n \n\n {/* 2 — Design the concrete SKILL.md from the spec. */}\n {clarify ? (\n \n \n \n ) : null}\n\n {/* 3 — Optional durable human approval of the design before writing files. */}\n \n }\n else={null}\n />\n\n {/* 4 — Scaffold the real SKILL.md (and any supporting files). */}\n {proceed ? (\n \n \n \n ) : null}\n\n {/* 5 — Document what was created so the human knows how to use it. */}\n {proceed && scaffold ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Create Skill\n// smithers-description: Author a new agent skill (SKILL.md + supporting files) from a plain-English ask.\n// smithers-tags: authoring, skills\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClarifyPrompt from \"../prompts/create-skill-clarify.mdx\";\nimport DesignPrompt from \"../prompts/create-skill-design.mdx\";\nimport ScaffoldPrompt from \"../prompts/create-skill-scaffold.mdx\";\nimport DocumentPrompt from \"../prompts/create-skill-document.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the agent skill you want to create, in plain English.\")\n .describe(\"Plain-English description of the agent skill you want Smithers to author.\"),\n name: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Desired kebab-case skill id. Null lets the clarify/design steps choose one.\"),\n review: z\n .boolean()\n .default(true)\n .describe(\"Pause for human approval of the design before any files are written.\"),\n});\n\n// 1. The freeform ask, turned into a structured skill spec.\nconst skillSpecSchema = z.looseObject({\n name: z.string().describe(\"Proposed kebab-case skill id.\"),\n purpose: z.string().describe(\"One sentence: what the skill equips an agent to do.\"),\n whenToUse: z\n .string()\n .describe(\"Trigger phrasing — when an agent should reach for this skill.\"),\n capabilities: z\n .array(z.string())\n .default([])\n .describe(\"The concrete things an agent can do once this skill is in context.\"),\n inputs: z\n .array(z.object({ name: z.string(), type: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Parameters / context the skill expects when invoked.\"),\n openQuestions: z\n .array(z.string())\n .default([])\n .describe(\"Anything ambiguous the author should resolve.\"),\n});\n\n// 2. The concrete design the scaffolder turns into a real SKILL.md.\nconst designSchema = z.looseObject({\n skillName: z.string().describe(\"Final kebab-case skill id.\"),\n frontmatter: z\n .object({\n name: z.string(),\n description: z\n .string()\n .describe(\"One line: what it does and when to use it — goes in YAML frontmatter.\"),\n })\n .describe(\"YAML frontmatter for the SKILL.md file.\"),\n sections: z\n .array(z.object({ heading: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Ordered body sections the SKILL.md should contain.\"),\n supportingFiles: z\n .array(z.object({ path: z.string(), purpose: z.string() }))\n .default([])\n .describe(\"Optional extra files (scripts, references) the skill ships alongside SKILL.md.\"),\n rationale: z.string().default(\"\"),\n});\n\n// Durable human approval decision (matches the Approval component's output shape).\nconst approvalSchema = z.object({\n approved: z.boolean(),\n note: z.string().nullable(),\n decidedBy: z.string().nullable(),\n decidedAt: z.string().nullable(),\n});\n\n// 3. Files written by the scaffold agent.\nconst scaffoldSchema = z.looseObject({\n summary: z.string(),\n skillName: z.string(),\n filesWritten: z\n .array(\n z.object({\n path: z.string(),\n kind: z.enum([\"skill\", \"supporting\", \"other\"]).default(\"skill\"),\n }),\n )\n .default([]),\n});\n\n// 4. Agent-facing summary of what was created.\nconst documentSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, Approval, smithers, outputs } = createSmithers({\n input: inputSchema,\n clarify: skillSpecSchema,\n design: designSchema,\n approval: approvalSchema,\n scaffold: scaffoldSchema,\n document: documentSchema,\n});\n\nexport default smithers((ctx) => {\n const review = ctx.input.review;\n\n const clarify = ctx.outputMaybe(\"clarify\", { nodeId: \"clarify\" });\n const design = ctx.outputMaybe(\"design\", { nodeId: \"design\" });\n const approval = ctx.outputMaybe(\"approval\", { nodeId: \"approve-design\" });\n const scaffold = ctx.outputMaybe(\"scaffold\", { nodeId: \"scaffold\" });\n\n const designed = design !== undefined;\n const approved = !review || approval?.approved === true;\n const proceed = designed && approved;\n\n // The name we scaffold against, resolved as soon as it is known.\n const skillName =\n scaffold?.skillName ?? design?.skillName ?? clarify?.name ?? ctx.input.name ?? \"new-skill\";\n\n return (\n \n \n {/* 1 — Turn the freeform ask into a structured skill spec. */}\n \n \n \n\n {/* 2 — Design the concrete SKILL.md from the spec. */}\n {clarify ? (\n \n \n \n ) : null}\n\n {/* 3 — Optional durable human approval of the design before writing files. */}\n \n }\n else={null}\n />\n\n {/* 4 — Scaffold the real SKILL.md (and any supporting files). */}\n {proceed ? (\n \n \n \n ) : null}\n\n {/* 5 — Document what was created so the human knows how to use it. */}\n {proceed && scaffold ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/create-skill-clarify.mdx",
@@ -101,11 +101,11 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/extract-skill.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Extract Skill\n// smithers-description: After a run, harvest a reusable skill or workflow and durable memory from the pattern.\n// smithers-tags: reuse, skills, memory\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport AnalyzePrompt from \"../prompts/extract-skill-analyze.mdx\";\nimport ProposePrompt from \"../prompts/extract-skill-propose.mdx\";\nimport ScaffoldSkillPrompt from \"../prompts/extract-skill-scaffold-skill.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Run to harvest from. Null analyses the prompt/context alone, with no run state.\"),\n prompt: z\n .string()\n .default(\"Describe the pattern or run you want to harvest into a reusable skill, workflow, or memory.\")\n .describe(\"What to harvest, plus any context the analysis should ground itself in.\"),\n});\n\n// 1. Read the run/pattern and decide what is worth keeping.\nconst analyzeSchema = z.looseObject({\n repeatedPattern: z\n .string()\n .describe(\"One paragraph: the durable, repeatable pattern observed in the run/context.\"),\n reusableAsSkill: z\n .boolean()\n .describe(\"True when the pattern is best captured as an agent skill doc the workers can reuse.\"),\n reusableAsWorkflow: z\n .boolean()\n .describe(\"True when the pattern is better captured as a whole new Smithers workflow.\"),\n memoryFacts: z\n .array(z.string())\n .default([])\n .describe(\"Durable, run-independent facts worth remembering across future runs.\"),\n});\n\n// 2. Turn the analysis into concrete proposals.\nconst proposeSchema = z.looseObject({\n proposedSkill: z\n .object({\n name: z.string().describe(\"kebab-case skill id, used as the file name.\"),\n description: z.string().describe(\"One line: what it does and when to reach for it.\"),\n body: z.string().describe(\"Markdown body of the skill doc, ready to write to disk.\"),\n })\n .nullable()\n .default(null),\n proposedWorkflow: z\n .object({\n id: z.string().describe(\"kebab-case workflow id.\"),\n sketch: z.string().describe(\"A short prose sketch of the workflow graph and its stages.\"),\n })\n .nullable()\n .default(null),\n memoryToPersist: z\n .array(z.string())\n .default([])\n .describe(\"Final, polished memory facts to persist.\"),\n});\n\n// 3. The skill file actually written to disk when the pattern is reusable as a skill.\nconst scaffoldSkillSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n analyze: analyzeSchema,\n propose: proposeSchema,\n scaffoldSkill: scaffoldSkillSchema,\n});\n\nexport default smithers((ctx) => {\n const analyze = ctx.outputMaybe(\"analyze\", { nodeId: \"analyze\" });\n const propose = ctx.outputMaybe(\"propose\", { nodeId: \"propose\" });\n\n // Only scaffold a skill file when the analysis says the pattern is skill-shaped\n // and the proposal actually produced a skill to write.\n const reusableAsSkill = analyze?.reusableAsSkill === true;\n const hasProposedSkill = propose?.proposedSkill != null;\n\n return (\n \n \n {/* 1 — Read the run (if given) and decide what is worth harvesting. */}\n \n \n \n\n {/* 2 — Turn the analysis into a concrete skill/workflow proposal + memory. */}\n {analyze ? (\n \n \n \n ) : null}\n\n {/* 3 — If the pattern is reusable as a skill, write the skill file to disk. */}\n {propose ? (\n \n \n \n }\n else={null}\n />\n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Extract Skill\n// smithers-description: After a run, harvest a reusable skill or workflow and durable memory from the pattern.\n// smithers-tags: reuse, skills, memory\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport AnalyzePrompt from \"../prompts/extract-skill-analyze.mdx\";\nimport ProposePrompt from \"../prompts/extract-skill-propose.mdx\";\nimport ScaffoldSkillPrompt from \"../prompts/extract-skill-scaffold-skill.mdx\";\n\nconst SKILLS_DIR = \".smithers/skills\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Run to harvest from. Null analyses the prompt/context alone, with no run state.\"),\n prompt: z\n .string()\n .default(\"Describe the pattern or run you want to harvest into a reusable skill, workflow, or memory.\")\n .describe(\"What to harvest, plus any context the analysis should ground itself in.\"),\n});\n\n// 1. Read the run/pattern and decide what is worth keeping.\nconst analyzeSchema = z.looseObject({\n repeatedPattern: z\n .string()\n .describe(\"One paragraph: the durable, repeatable pattern observed in the run/context.\"),\n reusableAsSkill: z\n .boolean()\n .describe(\"True when the pattern is best captured as an agent skill doc the workers can reuse.\"),\n reusableAsWorkflow: z\n .boolean()\n .describe(\"True when the pattern is better captured as a whole new Smithers workflow.\"),\n memoryFacts: z\n .array(z.string())\n .default([])\n .describe(\"Durable, run-independent facts worth remembering across future runs.\"),\n});\n\n// 2. Turn the analysis into concrete proposals.\nconst proposeSchema = z.looseObject({\n proposedSkill: z\n .object({\n name: z.string().describe(\"kebab-case skill id, used as the file name.\"),\n description: z.string().describe(\"One line: what it does and when to reach for it.\"),\n body: z.string().describe(\"Markdown body of the skill doc, ready to write to disk.\"),\n })\n .nullable()\n .default(null),\n proposedWorkflow: z\n .object({\n id: z.string().describe(\"kebab-case workflow id.\"),\n sketch: z.string().describe(\"A short prose sketch of the workflow graph and its stages.\"),\n })\n .nullable()\n .default(null),\n memoryToPersist: z\n .array(z.string())\n .default([])\n .describe(\"Final, polished memory facts to persist.\"),\n});\n\n// 3. The skill file actually written to disk when the pattern is reusable as a skill.\nconst scaffoldSkillSchema = z.looseObject({\n summary: z.string(),\n skillPath: z.string().nullable().default(null),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n analyze: analyzeSchema,\n propose: proposeSchema,\n scaffoldSkill: scaffoldSkillSchema,\n});\n\nexport default smithers((ctx) => {\n const analyze = ctx.outputMaybe(\"analyze\", { nodeId: \"analyze\" });\n const propose = ctx.outputMaybe(\"propose\", { nodeId: \"propose\" });\n\n // Only scaffold a skill file when the analysis says the pattern is skill-shaped\n // and the proposal actually produced a skill to write.\n const reusableAsSkill = analyze?.reusableAsSkill === true;\n const hasProposedSkill = propose?.proposedSkill != null;\n\n return (\n \n \n {/* 1 — Read the run (if given) and decide what is worth harvesting. */}\n \n \n \n\n {/* 2 — Turn the analysis into a concrete skill/workflow proposal + memory. */}\n {analyze ? (\n \n \n \n ) : null}\n\n {/* 3 — If the pattern is reusable as a skill, write the skill file to disk. */}\n {propose ? (\n \n \n \n }\n else={null}\n />\n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/extract-skill-analyze.mdx",
- "contents": "# Analyze the pattern to harvest\n\nYou are the analysis step of an \"extract a reusable skill\" pipeline. A run (or a\ndescribed pattern) just happened, and we want to harvest whatever is durable and\nreusable from it. Do NOT write any files yet — only produce the structured\nanalysis.\n\n## What to harvest\n\n{props.prompt}\n\n## Run to read\n\nRun id: {props.runId ?? \"(none given — analyse the prompt/context above on its own)\"}\n\nIf a run id is given (the `Run id` above), you have file and shell tools — inspect\nthe real run state before deciding, substituting that id for `RUN_ID` below. Read\nit, do not guess:\n\n- `bunx smithers-orchestrator inspect RUN_ID` for the full run state (steps, agents, outputs).\n- `bunx smithers-orchestrator events RUN_ID --limit 200` for the event history.\n- `bunx smithers-orchestrator node NODE_ID --run-id RUN_ID` for a specific node's tool calls and output.\n\nThese are read-only. Do NOT start, cancel, fork, or graph any run — another step\nowns that. If no run id is given, work purely from the prompt and context above.\n\n## What to decide\n\nA harvest can land in three places, and they are not mutually exclusive:\n\n1. **A skill** — a short agent-facing markdown doc under `{props.skillsDir}` that\n future worker agents read. Best when the pattern is \"here is how to do X well\".\n2. **A whole workflow** — a new Smithers `.tsx` graph. Best when the pattern is a\n multi-step, repeatable process worth running end-to-end (clarify, loop, gate).\n3. **Memory** — durable, run-independent facts worth remembering across future\n runs (a convention, a gotcha, a decision). Avoid run-specific trivia.\n\nProduce:\n\n- **repeatedPattern** — one paragraph naming the durable, repeatable pattern.\n- **reusableAsSkill** — `true` when a skill doc is the right home for it.\n- **reusableAsWorkflow** — `true` when a new workflow is the right home for it.\n- **memoryFacts** — the durable facts worth persisting (may be empty).\n\nBe decisive and conservative: only mark something reusable when you can name the\nconcrete, repeatable shape. The next step turns this into proposals.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Analyze the pattern to harvest\n\nYou are the analysis step of an \"extract a reusable skill\" pipeline. A run (or a\ndescribed pattern) just happened, and we want to harvest whatever is durable and\nreusable from it. Do NOT write any files yet — only produce the structured\nanalysis.\n\n## What to harvest\n\n{props.prompt}\n\n## Run to read\n\nRun id: {props.runId ?? \"(none given — analyse the prompt/context above on its own)\"}\n\nIf a run id is given (the `Run id` above), you have file and shell tools — inspect\nthe real run state before deciding, substituting that id for `RUN_ID` below. Read\nit, do not guess:\n\n- `bunx smthrs inspect RUN_ID` for the full run state (steps, agents, outputs).\n- `bunx smthrs events RUN_ID --limit 200` for the event history.\n- `bunx smthrs node NODE_ID --run-id RUN_ID` for a specific node's tool calls and output.\n\nThese are read-only. Do NOT start, cancel, fork, or graph any run — another step\nowns that. If no run id is given, work purely from the prompt and context above.\n\n## What to decide\n\nA harvest can land in three places, and they are not mutually exclusive:\n\n1. **A skill** — a short agent-facing markdown doc under `{props.skillsDir}` that\n future worker agents read. Best when the pattern is \"here is how to do X well\".\n2. **A whole workflow** — a new Smithers `.tsx` graph. Best when the pattern is a\n multi-step, repeatable process worth running end-to-end (clarify, loop, gate).\n3. **Memory** — durable, run-independent facts worth remembering across future\n runs (a convention, a gotcha, a decision). Avoid run-specific trivia.\n\nProduce:\n\n- **repeatedPattern** — one paragraph naming the durable, repeatable pattern.\n- **reusableAsSkill** — `true` when a skill doc is the right home for it.\n- **reusableAsWorkflow** — `true` when a new workflow is the right home for it.\n- **memoryFacts** — the durable facts worth persisting (may be empty).\n\nBe decisive and conservative: only mark something reusable when you can name the\nconcrete, repeatable shape. The next step turns this into proposals.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/prompts/extract-skill-propose.mdx",
@@ -117,7 +117,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/monitor-smithers.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Monitor Smithers\n// smithers-description: Watchdog over Smithers runs: detect stuck, blocked, failed, or over-budget runs and escalate.\n// smithers-tags: ops, monitoring\n/** @jsxImportSource smithers-orchestrator */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClassifyPrompt from \"../prompts/monitor-smithers-classify.mdx\";\nimport TriagePrompt from \"../prompts/monitor-smithers-triage.mdx\";\n\nconst inputSchema = z.object({\n staleMinutes: z\n .number()\n .default(15)\n .describe(\"A run with no recent activity past this many minutes is treated as stale/stuck.\"),\n});\n\n// 1. The raw snapshot of currently-known runs, gathered by shelling out to `ps`.\nconst runSchema = z.looseObject({\n runId: z.string(),\n status: z.string(),\n ageMinutes: z.number().default(0),\n lastEvent: z.string().nullable().default(null),\n});\n\nconst pollSchema = z.looseObject({\n runs: z.array(runSchema).default([]),\n summary: z.string(),\n});\n\n// 2. The same runs, sorted into health buckets by a cheap/fast agent.\nconst classifySchema = z.looseObject({\n buckets: z.looseObject({\n healthy: z.array(z.string()).default([]),\n stuck: z.array(z.string()).default([]),\n blocked: z.array(z.string()).default([]),\n failed: z.array(z.string()).default([]),\n overBudget: z.array(z.string()).default([]),\n }),\n summary: z.string(),\n});\n\n// 3. Concrete escalation actions for every non-healthy run.\nconst triageSchema = z.looseObject({\n actions: z\n .array(\n z.object({\n runId: z.string(),\n problem: z.string(),\n recommendedAction: z.string(),\n }),\n )\n .default([]),\n digest: z.string(),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n poll: pollSchema,\n classify: classifySchema,\n triage: triageSchema,\n});\n\n// Pull the live run table from the CLI. Deterministic, no agent: shell out, parse\n// JSON, and normalise into the watchdog's run shape. Any failure (CLI missing,\n// non-zero exit, bad JSON) degrades to an empty list rather than throwing.\nasync function pollRuns(staleMinutes: number) {\n const res = await $`bunx smithers-orchestrator ps --format json --all`.nothrow().quiet();\n if (res.exitCode !== 0) {\n return { runs: [], summary: \"Could not read runs from `smithers ps` (non-zero exit).\" };\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(res.stdout.toString());\n } catch {\n return { runs: [], summary: \"Could not parse `smithers ps --format json` output.\" };\n }\n\n const rawList = Array.isArray(parsed)\n ? parsed\n : Array.isArray((parsed as { runs?: unknown }).runs)\n ? (parsed as { runs: unknown[] }).runs\n : [];\n\n const runs = rawList.map((row) => {\n const r = row as Record;\n const runId = String(r.id ?? r.runId ?? \"unknown\");\n const status = String(r.status ?? r.dbStatus ?? r.state ?? \"unknown\");\n const startedRaw = r.started ?? r.startedAt;\n const ageMatch = typeof startedRaw === \"string\" ? startedRaw.match(/(\\d+)\\s*([smhd])/) : null;\n let ageMinutes = 0;\n if (ageMatch) {\n const n = Number(ageMatch[1]);\n const unit = ageMatch[2];\n ageMinutes = unit === \"m\" ? n : unit === \"h\" ? n * 60 : unit === \"d\" ? n * 1440 : Math.round(n / 60);\n }\n const step = r.step ?? r.lastEvent;\n const lastEvent = step != null && String(step) !== \"—\" ? String(step) : null;\n return { runId, status, ageMinutes, lastEvent };\n });\n\n const staleCount = runs.filter((run) => run.ageMinutes >= staleMinutes).length;\n return {\n runs,\n summary: `${runs.length} run(s) seen; ${staleCount} past the ${staleMinutes}m stale threshold.`,\n };\n}\n\n/**\n * A watchdog over Smithers itself. It polls the live run table, has a cheap agent\n * sort runs into health buckets, and — only when something is wrong — has a smart\n * agent produce concrete escalation actions (which gate to clear, which run to\n * triage). Healthy fleets short-circuit before the expensive triage step.\n */\nexport default smithers((ctx) => {\n const staleMinutes = ctx.input.staleMinutes ?? 15;\n\n const poll = ctx.outputMaybe(\"poll\", { nodeId: \"poll\" });\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify\" });\n\n // Anything not in the `healthy` bucket needs escalation.\n const buckets = classify?.buckets;\n const unhealthy = buckets\n ? [...buckets.stuck, ...buckets.blocked, ...buckets.failed, ...buckets.overBudget]\n : [];\n const hasProblems = unhealthy.length > 0;\n\n return (\n \n \n {/* 1 — Deterministically read the live run table from the CLI. */}\n \n {async () => await pollRuns(staleMinutes)}\n \n\n {/* 2 — Sort the runs into health buckets. Cheap/fast: pure classification. */}\n {poll ? (\n \n \n \n ) : null}\n\n {/* 3 — Only escalate when something is actually wrong. */}\n \n \n \n }\n else={null}\n />\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Monitor Smithers\n// smithers-description: Watchdog over Smithers runs: detect stuck, blocked, failed, or over-budget runs and escalate.\n// smithers-tags: ops, monitoring\n/** @jsxImportSource smthrs */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ClassifyPrompt from \"../prompts/monitor-smithers-classify.mdx\";\nimport TriagePrompt from \"../prompts/monitor-smithers-triage.mdx\";\n\nconst inputSchema = z.object({\n staleMinutes: z\n .number()\n .default(15)\n .describe(\"A run with no recent activity past this many minutes is treated as stale/stuck.\"),\n});\n\n// 1. The raw snapshot of currently-known runs, gathered by shelling out to `ps`.\nconst runSchema = z.looseObject({\n runId: z.string(),\n status: z.string(),\n ageMinutes: z.number().default(0),\n lastEvent: z.string().nullable().default(null),\n});\n\nconst pollSchema = z.looseObject({\n runs: z.array(runSchema).default([]),\n summary: z.string(),\n});\n\n// 2. The same runs, sorted into health buckets by a cheap/fast agent.\nconst classifySchema = z.looseObject({\n buckets: z.looseObject({\n healthy: z.array(z.string()).default([]),\n stuck: z.array(z.string()).default([]),\n blocked: z.array(z.string()).default([]),\n failed: z.array(z.string()).default([]),\n overBudget: z.array(z.string()).default([]),\n }),\n summary: z.string(),\n});\n\n// 3. Concrete escalation actions for every non-healthy run.\nconst triageSchema = z.looseObject({\n actions: z\n .array(\n z.object({\n runId: z.string(),\n problem: z.string(),\n recommendedAction: z.string(),\n }),\n )\n .default([]),\n digest: z.string(),\n});\n\nconst { Workflow, Task, Sequence, Branch, smithers, outputs } = createSmithers({\n input: inputSchema,\n poll: pollSchema,\n classify: classifySchema,\n triage: triageSchema,\n});\n\n// Pull the live run table from the CLI. Deterministic, no agent: shell out, parse\n// JSON, and normalise into the watchdog's run shape. Any failure (CLI missing,\n// non-zero exit, bad JSON) degrades to an empty list rather than throwing.\nasync function pollRuns(staleMinutes: number) {\n const res = await $`bunx smthrs ps --format json --all`.nothrow().quiet();\n if (res.exitCode !== 0) {\n return { runs: [], summary: \"Could not read runs from `smithers ps` (non-zero exit).\" };\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(res.stdout.toString());\n } catch {\n return { runs: [], summary: \"Could not parse `smithers ps --format json` output.\" };\n }\n\n const rawList = Array.isArray(parsed)\n ? parsed\n : Array.isArray((parsed as { runs?: unknown }).runs)\n ? (parsed as { runs: unknown[] }).runs\n : [];\n\n const runs = rawList.map((row) => {\n const r = row as Record;\n const runId = String(r.id ?? r.runId ?? \"unknown\");\n const status = String(r.status ?? r.dbStatus ?? r.state ?? \"unknown\");\n const startedRaw = r.started ?? r.startedAt;\n const ageMatch = typeof startedRaw === \"string\" ? startedRaw.match(/(\\d+)\\s*([smhd])/) : null;\n let ageMinutes = 0;\n if (ageMatch) {\n const n = Number(ageMatch[1]);\n const unit = ageMatch[2];\n ageMinutes = unit === \"m\" ? n : unit === \"h\" ? n * 60 : unit === \"d\" ? n * 1440 : Math.round(n / 60);\n }\n const step = r.step ?? r.lastEvent;\n const lastEvent = step != null && String(step) !== \"—\" ? String(step) : null;\n return { runId, status, ageMinutes, lastEvent };\n });\n\n const staleCount = runs.filter((run) => run.ageMinutes >= staleMinutes).length;\n return {\n runs,\n summary: `${runs.length} run(s) seen; ${staleCount} past the ${staleMinutes}m stale threshold.`,\n };\n}\n\n/**\n * A watchdog over Smithers itself. It polls the live run table, has a cheap agent\n * sort runs into health buckets, and — only when something is wrong — has a smart\n * agent produce concrete escalation actions (which gate to clear, which run to\n * triage). Healthy fleets short-circuit before the expensive triage step.\n */\nexport default smithers((ctx) => {\n const staleMinutes = ctx.input.staleMinutes ?? 15;\n\n const poll = ctx.outputMaybe(\"poll\", { nodeId: \"poll\" });\n const classify = ctx.outputMaybe(\"classify\", { nodeId: \"classify\" });\n\n // Anything not in the `healthy` bucket needs escalation.\n const buckets = classify?.buckets;\n const unhealthy = buckets\n ? [...buckets.stuck, ...buckets.blocked, ...buckets.failed, ...buckets.overBudget]\n : [];\n const hasProblems = unhealthy.length > 0;\n\n return (\n \n \n {/* 1 — Deterministically read the live run table from the CLI. */}\n \n {async () => await pollRuns(staleMinutes)}\n \n\n {/* 2 — Sort the runs into health buckets. Cheap/fast: pure classification. */}\n {poll ? (\n \n \n \n ) : null}\n\n {/* 3 — Only escalate when something is actually wrong. */}\n \n \n \n }\n else={null}\n />\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/monitor-smithers-classify.mdx",
@@ -129,7 +129,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/triage-run.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Triage Run\n// smithers-description: Diagnose one failed or stuck Smithers run: pull events/logs, find the root cause, propose a fix/rewind/retry.\n// smithers-tags: ops, debugging\n/** @jsxImportSource smithers-orchestrator */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport DiagnosePrompt from \"../prompts/triage-run-diagnose.mdx\";\nimport RecommendPrompt from \"../prompts/triage-run-recommend.mdx\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .describe(\"The id of the failed or stuck Smithers run to triage.\"),\n});\n\n// 1. Deterministic evidence pulled straight from the run's state + event log.\nconst gatherSchema = z.looseObject({\n state: z\n .string()\n .describe(\"The run's overall status (running | paused | failed | completed | unknown).\"),\n failingNodes: z\n .array(z.object({ id: z.string(), reason: z.string().default(\"\") }))\n .default([])\n .describe(\"Nodes that errored, are stuck, or are blocking progress.\"),\n lastEvents: z\n .array(z.string())\n .default([])\n .describe(\"The tail of the run's event log, most recent last.\"),\n summary: z\n .string()\n .describe(\"One line describing what the run state + events show.\"),\n});\n\n// 2. The agent's root-cause read of the gathered evidence.\nconst diagnoseSchema = z.looseObject({\n rootCauseHypothesis: z\n .string()\n .describe(\"The single most likely reason the run failed or stalled.\"),\n evidence: z\n .array(z.string())\n .default([])\n .describe(\"Concrete observations from state/events that support the hypothesis.\"),\n confidence: z\n .enum([\"low\", \"medium\", \"high\"])\n .default(\"medium\")\n .describe(\"How strongly the evidence supports the hypothesis.\"),\n});\n\n// 3. The recommended next move, with the exact command to run.\nconst recommendSchema = z.looseObject({\n recommendedAction: z\n .enum([\"fix\", \"rewind\", \"retry\", \"escalate\"])\n .describe(\"fix code, rewind to an earlier frame, retry the failing task, or escalate to a human.\"),\n command: z\n .string()\n .describe(\"The exact CLI command to run next (e.g. a smithers rewind / retry-task invocation).\"),\n rationale: z\n .string()\n .describe(\"Why this action over the alternatives, grounded in the diagnosis.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n gather: gatherSchema,\n diagnose: diagnoseSchema,\n recommend: recommendSchema,\n});\n\nconst MAX_EVENT_LINES = 60;\n\nfunction tailLines(text: string, max: number): string[] {\n return text\n .split(\"\\n\")\n .map((line) => line.trimEnd())\n .filter((line) => line.length > 0)\n .slice(-max);\n}\n\nexport default smithers((ctx) => {\n const runId = ctx.input.runId;\n\n // Gate each AI stage on the previous one's persisted output so a resumed run\n // re-renders from exactly where it left off.\n const gather = ctx.outputMaybe(\"gather\", { nodeId: \"gather\" });\n const diagnose = ctx.outputMaybe(\"diagnose\", { nodeId: \"diagnose\" });\n\n return (\n \n \n {/* 1 — Deterministically pull run state + the recent event log. */}\n \n {async () => {\n const inspectRes = await $`bunx smithers-orchestrator inspect ${runId} --json`\n .nothrow()\n .quiet();\n const eventsRes = await $`bunx smithers-orchestrator events ${runId}`\n .nothrow()\n .quiet();\n\n const inspectText = inspectRes.stdout?.toString() ?? \"\";\n const eventsText = `${eventsRes.stdout?.toString() ?? \"\"}\\n${eventsRes.stderr?.toString() ?? \"\"}`;\n\n let state = \"unknown\";\n const failingNodes: Array<{ id: string; reason: string }> = [];\n\n try {\n const parsed = JSON.parse(inspectText) as Record;\n const rawState = parsed.state ?? parsed.status;\n if (typeof rawState === \"string\") state = rawState;\n\n const nodes = parsed.nodes ?? parsed.steps;\n if (Array.isArray(nodes)) {\n for (const node of nodes) {\n if (node && typeof node === \"object\") {\n const n = node as Record;\n const nodeState = typeof n.state === \"string\" ? n.state : typeof n.status === \"string\" ? n.status : \"\";\n if (nodeState === \"failed\" || nodeState === \"error\" || nodeState === \"stuck\") {\n const id = typeof n.id === \"string\" ? n.id : typeof n.nodeId === \"string\" ? n.nodeId : \"(unknown)\";\n const reason = typeof n.error === \"string\" ? n.error : typeof n.reason === \"string\" ? n.reason : nodeState;\n failingNodes.push({ id, reason });\n }\n }\n }\n }\n } catch {\n // inspect did not return parseable JSON; leave defaults and rely on events.\n }\n\n const lastEvents = tailLines(eventsText, MAX_EVENT_LINES);\n const inspectOk = inspectRes.exitCode === 0 && state !== \"unknown\";\n\n const summary = inspectOk\n ? `Run ${runId} is \"${state}\" with ${failingNodes.length} failing/stuck node(s) and ${lastEvents.length} recent event line(s).`\n : `Could not read full state for run ${runId}; triaging from ${lastEvents.length} recent event line(s).`;\n\n return { state, failingNodes, lastEvents, summary };\n }}\n \n\n {/* 2 — Agent reads the evidence and names the most likely root cause. */}\n {gather ? (\n \n \n \n ) : null}\n\n {/* 3 — Agent proposes the concrete next action + the exact command. */}\n {gather && diagnose ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Triage Run\n// smithers-description: Diagnose one failed or stuck Smithers run: pull events/logs, find the root cause, propose a fix/rewind/retry.\n// smithers-tags: ops, debugging\n/** @jsxImportSource smthrs */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport DiagnosePrompt from \"../prompts/triage-run-diagnose.mdx\";\nimport RecommendPrompt from \"../prompts/triage-run-recommend.mdx\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .describe(\"The id of the failed or stuck Smithers run to triage.\"),\n});\n\n// 1. Deterministic evidence pulled straight from the run's state + event log.\nconst gatherSchema = z.looseObject({\n state: z\n .string()\n .describe(\"The run's overall status (running | paused | failed | completed | unknown).\"),\n failingNodes: z\n .array(z.object({ id: z.string(), reason: z.string().default(\"\") }))\n .default([])\n .describe(\"Nodes that errored, are stuck, or are blocking progress.\"),\n lastEvents: z\n .array(z.string())\n .default([])\n .describe(\"The tail of the run's event log, most recent last.\"),\n summary: z\n .string()\n .describe(\"One line describing what the run state + events show.\"),\n});\n\n// 2. The agent's root-cause read of the gathered evidence.\nconst diagnoseSchema = z.looseObject({\n rootCauseHypothesis: z\n .string()\n .describe(\"The single most likely reason the run failed or stalled.\"),\n evidence: z\n .array(z.string())\n .default([])\n .describe(\"Concrete observations from state/events that support the hypothesis.\"),\n confidence: z\n .enum([\"low\", \"medium\", \"high\"])\n .default(\"medium\")\n .describe(\"How strongly the evidence supports the hypothesis.\"),\n});\n\n// 3. The recommended next move, with the exact command to run.\nconst recommendSchema = z.looseObject({\n recommendedAction: z\n .enum([\"fix\", \"rewind\", \"retry\", \"escalate\"])\n .describe(\"fix code, rewind to an earlier frame, retry the failing task, or escalate to a human.\"),\n command: z\n .string()\n .describe(\"The exact CLI command to run next (e.g. a smithers rewind / retry-task invocation).\"),\n rationale: z\n .string()\n .describe(\"Why this action over the alternatives, grounded in the diagnosis.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n gather: gatherSchema,\n diagnose: diagnoseSchema,\n recommend: recommendSchema,\n});\n\nconst MAX_EVENT_LINES = 60;\n\nfunction tailLines(text: string, max: number): string[] {\n return text\n .split(\"\\n\")\n .map((line) => line.trimEnd())\n .filter((line) => line.length > 0)\n .slice(-max);\n}\n\nexport default smithers((ctx) => {\n const runId = ctx.input.runId;\n\n // Gate each AI stage on the previous one's persisted output so a resumed run\n // re-renders from exactly where it left off.\n const gather = ctx.outputMaybe(\"gather\", { nodeId: \"gather\" });\n const diagnose = ctx.outputMaybe(\"diagnose\", { nodeId: \"diagnose\" });\n\n return (\n \n \n {/* 1 — Deterministically pull run state + the recent event log. */}\n \n {async () => {\n const inspectRes = await $`bunx smthrs inspect ${runId} --json`\n .nothrow()\n .quiet();\n const eventsRes = await $`bunx smthrs events ${runId}`\n .nothrow()\n .quiet();\n\n const inspectText = inspectRes.stdout?.toString() ?? \"\";\n const eventsText = `${eventsRes.stdout?.toString() ?? \"\"}\\n${eventsRes.stderr?.toString() ?? \"\"}`;\n\n let state = \"unknown\";\n const failingNodes: Array<{ id: string; reason: string }> = [];\n\n try {\n const parsed = JSON.parse(inspectText) as Record;\n const rawState = parsed.state ?? parsed.status;\n if (typeof rawState === \"string\") state = rawState;\n\n const nodes = parsed.nodes ?? parsed.steps;\n if (Array.isArray(nodes)) {\n for (const node of nodes) {\n if (node && typeof node === \"object\") {\n const n = node as Record;\n const nodeState = typeof n.state === \"string\" ? n.state : typeof n.status === \"string\" ? n.status : \"\";\n if (nodeState === \"failed\" || nodeState === \"error\" || nodeState === \"stuck\") {\n const id = typeof n.id === \"string\" ? n.id : typeof n.nodeId === \"string\" ? n.nodeId : \"(unknown)\";\n const reason = typeof n.error === \"string\" ? n.error : typeof n.reason === \"string\" ? n.reason : nodeState;\n failingNodes.push({ id, reason });\n }\n }\n }\n }\n } catch {\n // inspect did not return parseable JSON; leave defaults and rely on events.\n }\n\n const lastEvents = tailLines(eventsText, MAX_EVENT_LINES);\n const inspectOk = inspectRes.exitCode === 0 && state !== \"unknown\";\n\n const summary = inspectOk\n ? `Run ${runId} is \"${state}\" with ${failingNodes.length} failing/stuck node(s) and ${lastEvents.length} recent event line(s).`\n : `Could not read full state for run ${runId}; triaging from ${lastEvents.length} recent event line(s).`;\n\n return { state, failingNodes, lastEvents, summary };\n }}\n \n\n {/* 2 — Agent reads the evidence and names the most likely root cause. */}\n {gather ? (\n \n \n \n ) : null}\n\n {/* 3 — Agent proposes the concrete next action + the exact command. */}\n {gather && diagnose ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/triage-run-diagnose.mdx",
@@ -137,11 +137,11 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/prompts/triage-run-recommend.mdx",
- "contents": "# Recommend the next move\n\nYou are the final step of the \"triage one Smithers run\" pipeline. You have the\ndeterministic evidence and a diagnosis of the most likely root cause. Decide the\nsingle best next action for this run and give the exact command to run. Plan\nonly — do not execute anything.\n\n## Run under triage\n\nRun id: {props.runId}\n\n## Evidence (run state + event tail)\n\n{JSON.stringify(props.evidence, null, 2)}\n\n## Diagnosis\n\n{JSON.stringify(props.diagnosis, null, 2)}\n\n## Choose ONE action\n\n- **fix** — the run failed because of a real bug in the code or the workflow\n (a task errored, a command exited non-zero, an output failed validation). The\n underlying defect must be changed before the run can succeed. The `command`\n should point at the follow-up (for example a `bunx smithers-orchestrator node\n ` to inspect the failing node, then an edit-and-`retry-task`).\n- **rewind** — earlier frames were fine but the run went off the rails after a\n specific point; roll back to a known-good frame with\n `bunx smithers-orchestrator rewind ` (target the frame just before the\n failure).\n- **retry** — the failure looks transient (a flaky agent, a heartbeat timeout, a\n rate limit) and re-running the failing node should clear it:\n `bunx smithers-orchestrator retry-task --node `.\n- **escalate** — the run is *stuck* waiting on a human (an `Approval` or\n `HumanTask`), or the right call is genuinely a judgement a person must make.\n The `command` should clear or surface the gate (for example\n `bunx smithers-orchestrator approve --node ` or\n `bunx smithers-orchestrator human inbox`).\n\n## Produce\n\n1. **recommendedAction** — exactly one of `fix`, `rewind`, `retry`, `escalate`.\n2. **command** — the exact CLI command to run next. Fill in the real ``\n and the specific failing/blocking `` from the evidence; do not leave\n placeholders if the evidence names the node.\n3. **rationale** — why this action over the alternatives, tied back to the\n diagnosis and confidence. If confidence was `low`, prefer `escalate` or a\n read-only inspect command over a destructive `rewind`.\n\nPick the safest action that actually moves the run forward. When in doubt,\ninspect before you mutate.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
+ "contents": "# Recommend the next move\n\nYou are the final step of the \"triage one Smithers run\" pipeline. You have the\ndeterministic evidence and a diagnosis of the most likely root cause. Decide the\nsingle best next action for this run and give the exact command to run. Plan\nonly — do not execute anything.\n\n## Run under triage\n\nRun id: {props.runId}\n\n## Evidence (run state + event tail)\n\n{JSON.stringify(props.evidence, null, 2)}\n\n## Diagnosis\n\n{JSON.stringify(props.diagnosis, null, 2)}\n\n## Choose ONE action\n\n- **fix** — the run failed because of a real bug in the code or the workflow\n (a task errored, a command exited non-zero, an output failed validation). The\n underlying defect must be changed before the run can succeed. The `command`\n should point at the follow-up (for example a `bunx smthrs node\n ` to inspect the failing node, then an edit-and-`retry-task`).\n- **rewind** — earlier frames were fine but the run went off the rails after a\n specific point; roll back to a known-good frame with\n `bunx smthrs rewind ` (target the frame just before the\n failure).\n- **retry** — the failure looks transient (a flaky agent, a heartbeat timeout, a\n rate limit) and re-running the failing node should clear it:\n `bunx smthrs retry-task --node `.\n- **escalate** — the run is *stuck* waiting on a human (an `Approval` or\n `HumanTask`), or the right call is genuinely a judgement a person must make.\n The `command` should clear or surface the gate (for example\n `bunx smthrs approve --node ` or\n `bunx smthrs human inbox`).\n\n## Produce\n\n1. **recommendedAction** — exactly one of `fix`, `rewind`, `retry`, `escalate`.\n2. **command** — the exact CLI command to run next. Fill in the real ``\n and the specific failing/blocking `` from the evidence; do not leave\n placeholders if the evidence names the node.\n3. **rationale** — why this action over the alternatives, tied back to the\n diagnosis and confidence. If confidence was `low`, prefer `escalate` or a\n read-only inspect command over a destructive `rewind`.\n\nPick the safest action that actually moves the run forward. When in doubt,\ninspect before you mutate.\n\nREQUIRED OUTPUT:\n{props.schema}\n"
},
{
"path": ".smithers/workflows/context-doctor.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Context Doctor\n// smithers-description: Run deterministic checks over a context contract and report missing goals, inputs, verification, approvals, and report specs.\n// smithers-tags: quality, context-engineering\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport AdvisePrompt from \"../prompts/context-doctor-advise.mdx\";\n\nconst inputSchema = z.object({\n contract: z\n .string()\n .default(\"{}\")\n .describe(\"JSON string of a context contract to diagnose.\"),\n});\n\n// Severity ranking used by the deterministic checks below.\nconst severitySchema = z.enum([\"ok\", \"warning\", \"error\", \"info\"]);\n\nconst issueSchema = z.object({\n check: z.string().describe(\"Stable id of the check that produced this issue.\"),\n severity: severitySchema,\n message: z.string().describe(\"Human-readable explanation of the finding.\"),\n});\n\n// 1. Deterministic diagnosis of the contract (pure JS, no agent).\nconst checkSchema = z.looseObject({\n issues: z.array(issueSchema).default([]),\n summary: z.string(),\n score: z.number().describe(\"0–100 health score; 100 means every check passed.\"),\n});\n\n// 2. Agent advice on how to resolve each non-ok finding.\nconst adviseSchema = z.looseObject({\n fixes: z.array(z.string()).default([]).describe(\"Concrete suggestions, one per non-ok issue.\"),\n summary: z.string(),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n check: checkSchema,\n advise: adviseSchema,\n});\n\n// --- Deterministic contract checks: the hardcoded path, no agent involved. ---\n\ntype Severity = z.infer;\ntype Issue = z.infer;\n\nfunction isObject(value: unknown): value is Record {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isNonEmptyString(value: unknown): boolean {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nfunction asArray(value: unknown): unknown[] {\n return Array.isArray(value) ? value : [];\n}\n\nfunction ok(check: string, message: string): Issue {\n return { check, severity: \"ok\", message };\n}\n\nfunction fail(check: string, severity: Severity, message: string): Issue {\n return { check, severity, message };\n}\n\nfunction diagnose(raw: string): z.infer {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err);\n return {\n issues: [fail(\"parse\", \"error\", \"Contract is not valid JSON: \" + reason)],\n summary: \"Could not parse the contract as JSON.\",\n score: 0,\n };\n }\n\n if (!isObject(parsed)) {\n return {\n issues: [fail(\"parse\", \"error\", \"Contract must be a JSON object at the top level.\")],\n summary: \"Contract is valid JSON but not an object.\",\n score: 0,\n };\n }\n\n const contract = parsed;\n const issues: Issue[] = [];\n\n // hasGoal — a non-empty goal statement exists.\n if (isNonEmptyString(contract.goal)) {\n issues.push(ok(\"hasGoal\", \"Contract declares a goal.\"));\n } else {\n issues.push(fail(\"hasGoal\", \"error\", \"Missing a non-empty `goal` describing the intended outcome.\"));\n }\n\n // hasOutputSpec — the contract says what artifact/output it produces.\n const outputSpec = contract.outputSpec ?? contract.output;\n if (isNonEmptyString(outputSpec) || isObject(outputSpec)) {\n issues.push(ok(\"hasOutputSpec\", \"Contract declares an output spec.\"));\n } else {\n issues.push(fail(\"hasOutputSpec\", \"error\", \"Missing an `outputSpec` describing the produced artifact.\"));\n }\n\n // hasAcceptanceCriteria — at least one acceptance criterion is listed.\n const acceptanceCriteria = asArray(contract.acceptanceCriteria ?? contract.acceptance_criteria);\n if (acceptanceCriteria.length > 0) {\n issues.push(ok(\"hasAcceptanceCriteria\", acceptanceCriteria.length + \" acceptance criteria declared.\"));\n } else {\n issues.push(fail(\"hasAcceptanceCriteria\", \"error\", \"Missing `acceptanceCriteria`; no way to know when the work is done.\"));\n }\n\n // allBlockingCriteriaHaveVerification — every blocking criterion names a verification.\n const blocking = acceptanceCriteria.filter((c) => isObject(c) && c.blocking === true);\n if (blocking.length === 0) {\n issues.push(ok(\"allBlockingCriteriaHaveVerification\", \"No blocking acceptance criteria to verify.\"));\n } else {\n const unverified = blocking.filter(\n (c) => isObject(c) && !isNonEmptyString(c.verification) && !isNonEmptyString(c.verify),\n );\n if (unverified.length === 0) {\n issues.push(ok(\"allBlockingCriteriaHaveVerification\", \"Every blocking criterion names a verification.\"));\n } else {\n issues.push(\n fail(\n \"allBlockingCriteriaHaveVerification\",\n \"error\",\n unverified.length + \" blocking criterion/criteria lack a `verification` step.\",\n ),\n );\n }\n }\n\n // allRequiredInputsHaveSource — every required input declares where it comes from.\n const inputs = asArray(contract.inputs);\n const requiredInputs = inputs.filter((i) => isObject(i) && i.required === true);\n if (requiredInputs.length === 0) {\n issues.push(ok(\"allRequiredInputsHaveSource\", \"No required inputs to source.\"));\n } else {\n const sourceless = requiredInputs.filter((i) => isObject(i) && !isNonEmptyString(i.source));\n if (sourceless.length === 0) {\n issues.push(ok(\"allRequiredInputsHaveSource\", \"Every required input declares a `source`.\"));\n } else {\n issues.push(\n fail(\n \"allRequiredInputsHaveSource\",\n \"error\",\n sourceless.length + \" required input(s) are missing a `source`.\",\n ),\n );\n }\n }\n\n // allSideEffectsHaveApproval — every side effect declares an approval gate.\n const sideEffects = asArray(contract.sideEffects ?? contract.side_effects);\n if (sideEffects.length === 0) {\n issues.push(ok(\"allSideEffectsHaveApproval\", \"No declared side effects.\"));\n } else {\n const unguarded = sideEffects.filter(\n (s) => isObject(s) && s.approval !== true && !isNonEmptyString(s.approval),\n );\n if (unguarded.length === 0) {\n issues.push(ok(\"allSideEffectsHaveApproval\", \"Every side effect is gated by an approval.\"));\n } else {\n issues.push(\n fail(\n \"allSideEffectsHaveApproval\",\n \"warning\",\n unguarded.length + \" side effect(s) have no `approval` gate.\",\n ),\n );\n }\n }\n\n // reportSpecExists — the contract says how to report results.\n const reportSpec = contract.reportSpec ?? contract.report ?? contract.report_spec;\n if (isNonEmptyString(reportSpec) || isObject(reportSpec)) {\n issues.push(ok(\"reportSpecExists\", \"Contract declares a report spec.\"));\n } else {\n issues.push(fail(\"reportSpecExists\", \"info\", \"No `reportSpec`; results have no declared reporting format.\"));\n }\n\n const total = issues.length;\n const passed = issues.filter((i) => i.severity === \"ok\").length;\n const errors = issues.filter((i) => i.severity === \"error\").length;\n const warnings = issues.filter((i) => i.severity === \"warning\").length;\n const score = total === 0 ? 100 : Math.round((passed / total) * 100);\n\n const summary =\n errors > 0\n ? errors + \" error(s) and \" + warnings + \" warning(s) — contract is incomplete (score \" + score + \"/100).\"\n : warnings > 0\n ? warnings + \" warning(s) — contract is usable but could be tightened (score \" + score + \"/100).\"\n : \"Contract passes every check (score \" + score + \"/100).\";\n\n return { issues, summary, score };\n}\n\n/**\n * Context Doctor. A deterministic `check` task parses the contract and runs the\n * seven structural checks; an agent `advise` task then suggests concrete fixes\n * for each non-ok finding.\n */\nexport default smithers((ctx) => {\n const check = ctx.outputMaybe(\"check\", { nodeId: \"check\" });\n\n return (\n \n \n {/* 1 — Deterministic diagnosis of the contract (pure JS, no agent). */}\n \n {() => diagnose(ctx.input.contract)}\n \n\n {/* 2 — Agent advice for resolving every non-ok finding. */}\n {check ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Context Doctor\n// smithers-description: Run deterministic checks over a context contract and report missing goals, inputs, verification, approvals, and report specs.\n// smithers-tags: quality, context-engineering\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport AdvisePrompt from \"../prompts/context-doctor-advise.mdx\";\n\nconst inputSchema = z.object({\n contract: z\n .string()\n .default(\"{}\")\n .describe(\"JSON string of a context contract to diagnose.\"),\n});\n\n// Severity ranking used by the deterministic checks below.\nconst severitySchema = z.enum([\"ok\", \"warning\", \"error\", \"info\"]);\n\nconst issueSchema = z.object({\n check: z.string().describe(\"Stable id of the check that produced this issue.\"),\n severity: severitySchema,\n message: z.string().describe(\"Human-readable explanation of the finding.\"),\n});\n\n// 1. Deterministic diagnosis of the contract (pure JS, no agent).\nconst checkSchema = z.looseObject({\n issues: z.array(issueSchema).default([]),\n summary: z.string(),\n score: z.number().describe(\"0–100 health score; 100 means every check passed.\"),\n});\n\n// 2. Agent advice on how to resolve each non-ok finding.\nconst adviseSchema = z.looseObject({\n fixes: z.array(z.string()).default([]).describe(\"Concrete suggestions, one per non-ok issue.\"),\n summary: z.string(),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n check: checkSchema,\n advise: adviseSchema,\n});\n\n// --- Deterministic contract checks: the hardcoded path, no agent involved. ---\n\ntype Severity = z.infer;\ntype Issue = z.infer;\n\nfunction isObject(value: unknown): value is Record {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isNonEmptyString(value: unknown): boolean {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nfunction asArray(value: unknown): unknown[] {\n return Array.isArray(value) ? value : [];\n}\n\nfunction ok(check: string, message: string): Issue {\n return { check, severity: \"ok\", message };\n}\n\nfunction fail(check: string, severity: Severity, message: string): Issue {\n return { check, severity, message };\n}\n\nfunction diagnose(raw: string): z.infer {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err);\n return {\n issues: [fail(\"parse\", \"error\", \"Contract is not valid JSON: \" + reason)],\n summary: \"Could not parse the contract as JSON.\",\n score: 0,\n };\n }\n\n if (!isObject(parsed)) {\n return {\n issues: [fail(\"parse\", \"error\", \"Contract must be a JSON object at the top level.\")],\n summary: \"Contract is valid JSON but not an object.\",\n score: 0,\n };\n }\n\n const contract = parsed;\n const issues: Issue[] = [];\n\n // hasGoal — a non-empty goal statement exists.\n if (isNonEmptyString(contract.goal)) {\n issues.push(ok(\"hasGoal\", \"Contract declares a goal.\"));\n } else {\n issues.push(fail(\"hasGoal\", \"error\", \"Missing a non-empty `goal` describing the intended outcome.\"));\n }\n\n // hasOutputSpec — the contract says what artifact/output it produces.\n const outputSpec = contract.outputSpec ?? contract.output;\n if (isNonEmptyString(outputSpec) || isObject(outputSpec)) {\n issues.push(ok(\"hasOutputSpec\", \"Contract declares an output spec.\"));\n } else {\n issues.push(fail(\"hasOutputSpec\", \"error\", \"Missing an `outputSpec` describing the produced artifact.\"));\n }\n\n // hasAcceptanceCriteria — at least one acceptance criterion is listed.\n const acceptanceCriteria = asArray(contract.acceptanceCriteria ?? contract.acceptance_criteria);\n if (acceptanceCriteria.length > 0) {\n issues.push(ok(\"hasAcceptanceCriteria\", acceptanceCriteria.length + \" acceptance criteria declared.\"));\n } else {\n issues.push(fail(\"hasAcceptanceCriteria\", \"error\", \"Missing `acceptanceCriteria`; no way to know when the work is done.\"));\n }\n\n // allBlockingCriteriaHaveVerification — every blocking criterion names a verification.\n const blocking = acceptanceCriteria.filter((c) => isObject(c) && c.blocking === true);\n if (blocking.length === 0) {\n issues.push(ok(\"allBlockingCriteriaHaveVerification\", \"No blocking acceptance criteria to verify.\"));\n } else {\n const unverified = blocking.filter(\n (c) => isObject(c) && !isNonEmptyString(c.verification) && !isNonEmptyString(c.verify),\n );\n if (unverified.length === 0) {\n issues.push(ok(\"allBlockingCriteriaHaveVerification\", \"Every blocking criterion names a verification.\"));\n } else {\n issues.push(\n fail(\n \"allBlockingCriteriaHaveVerification\",\n \"error\",\n unverified.length + \" blocking criterion/criteria lack a `verification` step.\",\n ),\n );\n }\n }\n\n // allRequiredInputsHaveSource — every required input declares where it comes from.\n const inputs = asArray(contract.inputs);\n const requiredInputs = inputs.filter((i) => isObject(i) && i.required === true);\n if (requiredInputs.length === 0) {\n issues.push(ok(\"allRequiredInputsHaveSource\", \"No required inputs to source.\"));\n } else {\n const sourceless = requiredInputs.filter((i) => isObject(i) && !isNonEmptyString(i.source));\n if (sourceless.length === 0) {\n issues.push(ok(\"allRequiredInputsHaveSource\", \"Every required input declares a `source`.\"));\n } else {\n issues.push(\n fail(\n \"allRequiredInputsHaveSource\",\n \"error\",\n sourceless.length + \" required input(s) are missing a `source`.\",\n ),\n );\n }\n }\n\n // allSideEffectsHaveApproval — every side effect declares an approval gate.\n const sideEffects = asArray(contract.sideEffects ?? contract.side_effects);\n if (sideEffects.length === 0) {\n issues.push(ok(\"allSideEffectsHaveApproval\", \"No declared side effects.\"));\n } else {\n const unguarded = sideEffects.filter(\n (s) => isObject(s) && s.approval !== true && !isNonEmptyString(s.approval),\n );\n if (unguarded.length === 0) {\n issues.push(ok(\"allSideEffectsHaveApproval\", \"Every side effect is gated by an approval.\"));\n } else {\n issues.push(\n fail(\n \"allSideEffectsHaveApproval\",\n \"warning\",\n unguarded.length + \" side effect(s) have no `approval` gate.\",\n ),\n );\n }\n }\n\n // reportSpecExists — the contract says how to report results.\n const reportSpec = contract.reportSpec ?? contract.report ?? contract.report_spec;\n if (isNonEmptyString(reportSpec) || isObject(reportSpec)) {\n issues.push(ok(\"reportSpecExists\", \"Contract declares a report spec.\"));\n } else {\n issues.push(fail(\"reportSpecExists\", \"info\", \"No `reportSpec`; results have no declared reporting format.\"));\n }\n\n const total = issues.length;\n const passed = issues.filter((i) => i.severity === \"ok\").length;\n const errors = issues.filter((i) => i.severity === \"error\").length;\n const warnings = issues.filter((i) => i.severity === \"warning\").length;\n const score = total === 0 ? 100 : Math.round((passed / total) * 100);\n\n const summary =\n errors > 0\n ? errors + \" error(s) and \" + warnings + \" warning(s) — contract is incomplete (score \" + score + \"/100).\"\n : warnings > 0\n ? warnings + \" warning(s) — contract is usable but could be tightened (score \" + score + \"/100).\"\n : \"Contract passes every check (score \" + score + \"/100).\";\n\n return { issues, summary, score };\n}\n\n/**\n * Context Doctor. A deterministic `check` task parses the contract and runs the\n * seven structural checks; an agent `advise` task then suggests concrete fixes\n * for each non-ok finding.\n */\nexport default smithers((ctx) => {\n const check = ctx.outputMaybe(\"check\", { nodeId: \"check\" });\n\n return (\n \n \n {/* 1 — Deterministic diagnosis of the contract (pure JS, no agent). */}\n \n {() => diagnose(ctx.input.contract)}\n \n\n {/* 2 — Agent advice for resolving every non-ok finding. */}\n {check ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/context-doctor-advise.mdx",
@@ -149,7 +149,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/backpressure-plan.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Backpressure Plan\n// smithers-description: Turn acceptance criteria into a gate matrix (schema/test/eval/review/approval/trace) so a workflow cannot just try-its-best and move on.\n// smithers-tags: quality, backpressure\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ExtractCriteriaPrompt from \"../prompts/backpressure-plan-extract-criteria.mdx\";\nimport PlanGatesPrompt from \"../prompts/backpressure-plan-plan-gates.mdx\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the goal and its acceptance criteria in plain English.\")\n .describe(\"The goal / acceptance criteria to turn into a backpressure gate matrix.\"),\n});\n\n// 1. The flat list of testable acceptance criteria pulled out of the prompt.\nconst criteriaSchema = z.looseObject({\n criteria: z\n .array(z.string())\n .default([])\n .describe(\"One atomic, verifiable acceptance criterion per entry.\"),\n});\n\n// 2. The gate matrix: every criterion mapped to how it is verified and enforced.\nconst gatesSchema = z.looseObject({\n gates: z\n .array(\n z.object({\n criterion: z.string().describe(\"The acceptance criterion this gate enforces.\"),\n verificationMethod: z\n .enum([\n \"schema\",\n \"unit_test\",\n \"integration_test\",\n \"eval\",\n \"review\",\n \"approval\",\n \"trace\",\n \"manual_check\",\n ])\n .describe(\"How the criterion is checked.\"),\n gateType: z\n .enum([\"blocking\", \"warning\", \"informational\"])\n .describe(\"blocking stops the run; warning flags; informational only records.\"),\n checkedBy: z.string().describe(\"Who/what runs the check (a task id, scorer, human role, or tool).\"),\n failureAction: z.string().describe(\"What happens when this gate fails.\"),\n evidenceRequired: z\n .array(z.string())\n .default([])\n .describe(\"Concrete artifacts that prove the gate passed (logs, diffs, reports, traces).\"),\n humanApprovalRequired: z\n .boolean()\n .default(false)\n .describe(\"True if a durable human approval gate is needed for this criterion.\"),\n }),\n )\n .default([])\n .describe(\"One gate per criterion; every blocking criterion maps to a verification method.\"),\n summary: z.string().default(\"\").describe(\"2-3 sentence overview of the backpressure plan.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n extractCriteria: criteriaSchema,\n planGates: gatesSchema,\n});\n\nexport default smithers((ctx) => {\n // Gate the plan-gates stage on the extracted criteria being available.\n const criteria = ctx.outputMaybe(\"extractCriteria\", { nodeId: \"extract-criteria\" });\n\n return (\n \n \n {/* 1 — Pull the prompt apart into atomic, verifiable acceptance criteria. */}\n \n \n \n\n {/* 2 — Map each criterion to a verification method + enforcement gate. */}\n {criteria ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Backpressure Plan\n// smithers-description: Turn acceptance criteria into a gate matrix (schema/test/eval/review/approval/trace) so a workflow cannot just try-its-best and move on.\n// smithers-tags: quality, backpressure\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport ExtractCriteriaPrompt from \"../prompts/backpressure-plan-extract-criteria.mdx\";\nimport PlanGatesPrompt from \"../prompts/backpressure-plan-plan-gates.mdx\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the goal and its acceptance criteria in plain English.\")\n .describe(\"The goal / acceptance criteria to turn into a backpressure gate matrix.\"),\n});\n\n// 1. The flat list of testable acceptance criteria pulled out of the prompt.\nconst criteriaSchema = z.looseObject({\n criteria: z\n .array(z.string())\n .default([])\n .describe(\"One atomic, verifiable acceptance criterion per entry.\"),\n});\n\n// 2. The gate matrix: every criterion mapped to how it is verified and enforced.\nconst gatesSchema = z.looseObject({\n gates: z\n .array(\n z.object({\n criterion: z.string().describe(\"The acceptance criterion this gate enforces.\"),\n verificationMethod: z\n .enum([\n \"schema\",\n \"unit_test\",\n \"integration_test\",\n \"eval\",\n \"review\",\n \"approval\",\n \"trace\",\n \"manual_check\",\n ])\n .describe(\"How the criterion is checked.\"),\n gateType: z\n .enum([\"blocking\", \"warning\", \"informational\"])\n .describe(\"blocking stops the run; warning flags; informational only records.\"),\n checkedBy: z.string().describe(\"Who/what runs the check (a task id, scorer, human role, or tool).\"),\n failureAction: z.string().describe(\"What happens when this gate fails.\"),\n evidenceRequired: z\n .array(z.string())\n .default([])\n .describe(\"Concrete artifacts that prove the gate passed (logs, diffs, reports, traces).\"),\n humanApprovalRequired: z\n .boolean()\n .default(false)\n .describe(\"True if a durable human approval gate is needed for this criterion.\"),\n }),\n )\n .default([])\n .describe(\"One gate per criterion; every blocking criterion maps to a verification method.\"),\n summary: z.string().default(\"\").describe(\"2-3 sentence overview of the backpressure plan.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n extractCriteria: criteriaSchema,\n planGates: gatesSchema,\n});\n\nexport default smithers((ctx) => {\n // Gate the plan-gates stage on the extracted criteria being available.\n const criteria = ctx.outputMaybe(\"extractCriteria\", { nodeId: \"extract-criteria\" });\n\n return (\n \n \n {/* 1 — Pull the prompt apart into atomic, verifiable acceptance criteria. */}\n \n \n \n\n {/* 2 — Map each criterion to a verification method + enforcement gate. */}\n {criteria ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/backpressure-plan-extract-criteria.mdx",
@@ -161,7 +161,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/eval-author.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Eval Author\n// smithers-description: Turn acceptance criteria into eval fixtures (JSONL cases + rubric) wired to smithers eval.\n// smithers-tags: quality, evals\n/** @jsxImportSource smithers-orchestrator */\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport DerivePrompt from \"../prompts/eval-author-derive.mdx\";\nimport WritePrompt from \"../prompts/eval-author-write.mdx\";\n\nconst EVALS_DIR = \".smithers/evals\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the acceptance criteria / goal to turn into eval cases.\")\n .describe(\"Acceptance criteria or goal to convert into eval fixtures.\"),\n workflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Path or id of the workflow the eval suite targets. Null leaves a placeholder in the run command.\"),\n});\n\n// 1. The criteria, turned into a structured eval suite: a name plus a list of\n// cases the suite should cover. Each case pairs an input with the expected\n// assertion shape (status / output / outputContains) and a plain-text rubric.\nconst evalCaseSchema = z.looseObject({\n id: z.string().describe(\"Stable kebab-case id for this case.\"),\n input: z.looseObject({}).describe(\"The workflow input object this case runs with.\"),\n expected: z\n .looseObject({})\n .describe(\"Assertion object: status, output (exact), and/or outputContains (partial).\"),\n rubric: z.string().describe(\"Plain-English pass/fail criteria for a human or judge reviewing this case.\"),\n});\n\nconst derivedSuiteSchema = z.looseObject({\n suiteName: z.string().describe(\"Proposed kebab-case suite id (also the fixture filename stem).\"),\n cases: z.array(evalCaseSchema).default([]).describe(\"Ordered eval cases covering the acceptance criteria.\"),\n});\n\n// 2. The fixture actually written to disk, plus the command to run it.\nconst writtenSuiteSchema = z.looseObject({\n path: z.string().describe(\"Path to the written .jsonl fixture.\"),\n caseCount: z.number().describe(\"Number of cases written to the fixture.\"),\n runCommand: z.string().describe(\"The smithers eval command to run the suite.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n derive: derivedSuiteSchema,\n write: writtenSuiteSchema,\n});\n\nexport default smithers((ctx) => {\n const derive = ctx.outputMaybe(\"derive\", { nodeId: \"derive\" });\n\n return (\n \n \n {/* 1 — Turn the acceptance criteria into a structured eval suite. */}\n \n \n \n\n {/* 2 — Write the JSONL fixture to disk and report the run command. */}\n {derive ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Eval Author\n// smithers-description: Turn acceptance criteria into eval fixtures (JSONL cases + rubric) wired to smithers eval.\n// smithers-tags: quality, evals\n/** @jsxImportSource smthrs */\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport DerivePrompt from \"../prompts/eval-author-derive.mdx\";\nimport WritePrompt from \"../prompts/eval-author-write.mdx\";\n\nconst EVALS_DIR = \".smithers/evals\";\n\nconst inputSchema = z.object({\n prompt: z\n .string()\n .default(\"Describe the acceptance criteria / goal to turn into eval cases.\")\n .describe(\"Acceptance criteria or goal to convert into eval fixtures.\"),\n workflow: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Path or id of the workflow the eval suite targets. Null leaves a placeholder in the run command.\"),\n});\n\n// 1. The criteria, turned into a structured eval suite: a name plus a list of\n// cases the suite should cover. Each case pairs an input with the expected\n// assertion shape (status / output / outputContains) and a plain-text rubric.\nconst evalCaseSchema = z.looseObject({\n id: z.string().describe(\"Stable kebab-case id for this case.\"),\n input: z.looseObject({}).describe(\"The workflow input object this case runs with.\"),\n expected: z\n .looseObject({})\n .describe(\"Assertion object: status, output (exact), and/or outputContains (partial).\"),\n rubric: z.string().describe(\"Plain-English pass/fail criteria for a human or judge reviewing this case.\"),\n});\n\nconst derivedSuiteSchema = z.looseObject({\n suiteName: z.string().describe(\"Proposed kebab-case suite id (also the fixture filename stem).\"),\n cases: z.array(evalCaseSchema).default([]).describe(\"Ordered eval cases covering the acceptance criteria.\"),\n});\n\n// 2. The fixture actually written to disk, plus the command to run it.\nconst writtenSuiteSchema = z.looseObject({\n path: z.string().describe(\"Path to the written .jsonl fixture.\"),\n caseCount: z.number().describe(\"Number of cases written to the fixture.\"),\n runCommand: z.string().describe(\"The smithers eval command to run the suite.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n derive: derivedSuiteSchema,\n write: writtenSuiteSchema,\n});\n\nexport default smithers((ctx) => {\n const derive = ctx.outputMaybe(\"derive\", { nodeId: \"derive\" });\n\n return (\n \n \n {/* 1 — Turn the acceptance criteria into a structured eval suite. */}\n \n \n \n\n {/* 2 — Write the JSONL fixture to disk and report the run command. */}\n {derive ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/eval-author-derive.mdx",
@@ -173,7 +173,7 @@ export const GENERATED_SEEDED_FILES = [
},
{
"path": ".smithers/workflows/report-slideshow.tsx",
- "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Report Slideshow\n// smithers-description: Generate a concise HTML slideshow report from a Smithers run state and artifacts.\n// smithers-tags: ops, reporting\n/** @jsxImportSource smithers-orchestrator */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smithers-orchestrator\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport RenderPrompt from \"../prompts/report-slideshow-render.mdx\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .describe(\"The Smithers run id to build a slideshow report from.\"),\n title: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Optional report title. Null lets the render step derive one from the run.\"),\n});\n\n// 1. Deterministic capture of the run's persisted state, nodes, and a summary.\nconst gatherSchema = z.looseObject({\n ok: z.boolean().describe(\"Whether `smithers inspect` returned usable JSON.\"),\n state: z.string().default(\"unknown\").describe(\"Run status: running | completed | failed | unknown.\"),\n nodes: z\n .array(\n z.looseObject({\n id: z.string().default(\"\"),\n type: z.string().default(\"\"),\n status: z.string().default(\"\"),\n summary: z.string().default(\"\"),\n }),\n )\n .default([])\n .describe(\"One row per workflow node, flattened for the renderer.\"),\n summary: z.string().default(\"\").describe(\"A short human summary of what the run did and where it ended.\"),\n raw: z.string().default(\"\").describe(\"The raw inspect JSON (truncated) for the renderer to mine for detail.\"),\n});\n\n// 2. The self-contained HTML slideshow the render agent produces.\nconst renderSchema = z.looseObject({\n title: z.string().describe(\"The report title used in the slideshow.\"),\n html: z.string().describe(\"A complete, self-contained HTML document (inline CSS, no external deps).\"),\n slideCount: z.number().default(0).describe(\"How many slide sections the report contains.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n gather: gatherSchema,\n render: renderSchema,\n});\n\n// --- Deterministic helpers for the gather step (no agent). ---\nconst MAX_RAW = 60_000;\n\nfunction asString(value: unknown): string {\n if (typeof value === \"string\") return value;\n if (value === null || value === undefined) return \"\";\n return String(value);\n}\n\nfunction pickArray(value: unknown): unknown[] {\n return Array.isArray(value) ? value : [];\n}\n\n/**\n * Flatten whatever the inspect payload calls its node list into the minimal\n * { id, type, status, summary } rows the renderer consumes. The shape of\n * `inspect --format json` varies by version, so probe a few likely keys and\n * fall back to an empty list rather than throwing.\n */\nfunction flattenNodes(parsed: Record): Array<{ id: string; type: string; status: string; summary: string }> {\n const candidates = [parsed.nodes, parsed.steps, parsed.tasks];\n const list = candidates.find((c) => Array.isArray(c) && c.length > 0);\n return pickArray(list).map((n) => {\n const node = (n ?? {}) as Record;\n return {\n id: asString(node.id ?? node.nodeId ?? node.name),\n type: asString(node.type ?? node.kind ?? node.component),\n status: asString(node.status ?? node.state ?? node.phase),\n summary: asString(node.summary ?? node.title ?? node.label).slice(0, 400),\n };\n });\n}\n\nexport default smithers((ctx) => {\n const runId = ctx.input.runId;\n\n // Gate the render step on the gather output being present.\n const gather = ctx.outputMaybe(\"gather\", { nodeId: \"gather\" });\n\n const fallbackTitle = ctx.input.title ?? `Smithers run ${runId}`;\n\n return (\n \n \n {/* 1 — Deterministically capture the run state, nodes, and a summary. */}\n \n {async () => {\n const res = await $`bunx smithers-orchestrator inspect ${runId} --format json --full-output`\n .nothrow()\n .quiet();\n const stdout = res.stdout?.toString() ?? \"\";\n const stderr = res.stderr?.toString() ?? \"\";\n\n let parsed: Record = {};\n let ok = false;\n if (res.exitCode === 0 && stdout.trim().length > 0) {\n try {\n parsed = JSON.parse(stdout) as Record;\n ok = true;\n } catch {\n ok = false;\n }\n }\n\n const nodes = ok ? flattenNodes(parsed) : [];\n const state = ok\n ? asString(parsed.status ?? parsed.state ?? \"unknown\") || \"unknown\"\n : \"unknown\";\n const summary = ok\n ? `Run ${runId} is \"${state}\" with ${nodes.length} node(s).`\n : `Could not inspect run ${runId}: ${(stderr || stdout || \"no output\").slice(0, 300)}`;\n\n return {\n ok,\n state,\n nodes,\n summary,\n raw: (ok ? stdout : `${stdout}\\n${stderr}`).slice(0, MAX_RAW),\n };\n }}\n \n\n {/* 2 — Render a self-contained HTML slideshow from the captured state. */}\n {gather ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
+ "contents": "// smithers-source: seeded\n// smithers-metadata-version: 1\n// smithers-display-name: Report Slideshow\n// smithers-description: Generate a concise HTML slideshow report from a Smithers run state and artifacts.\n// smithers-tags: ops, reporting\n/** @jsxImportSource smthrs */\nimport { $ } from \"bun\";\nimport { createSmithers } from \"smthrs\";\nimport { z } from \"zod/v4\";\nimport { agents } from \"../agents\";\nimport RenderPrompt from \"../prompts/report-slideshow-render.mdx\";\n\nconst inputSchema = z.object({\n runId: z\n .string()\n .describe(\"The Smithers run id to build a slideshow report from.\"),\n title: z\n .string()\n .nullable()\n .default(null)\n .describe(\"Optional report title. Null lets the render step derive one from the run.\"),\n});\n\n// 1. Deterministic capture of the run's persisted state, nodes, and a summary.\nconst gatherSchema = z.looseObject({\n ok: z.boolean().describe(\"Whether `smithers inspect` returned usable JSON.\"),\n state: z.string().default(\"unknown\").describe(\"Run status: running | completed | failed | unknown.\"),\n nodes: z\n .array(\n z.looseObject({\n id: z.string().default(\"\"),\n type: z.string().default(\"\"),\n status: z.string().default(\"\"),\n summary: z.string().default(\"\"),\n }),\n )\n .default([])\n .describe(\"One row per workflow node, flattened for the renderer.\"),\n summary: z.string().default(\"\").describe(\"A short human summary of what the run did and where it ended.\"),\n raw: z.string().default(\"\").describe(\"The raw inspect JSON (truncated) for the renderer to mine for detail.\"),\n});\n\n// 2. The self-contained HTML slideshow the render agent produces.\nconst renderSchema = z.looseObject({\n title: z.string().describe(\"The report title used in the slideshow.\"),\n html: z.string().describe(\"A complete, self-contained HTML document (inline CSS, no external deps).\"),\n slideCount: z.number().default(0).describe(\"How many slide sections the report contains.\"),\n});\n\nconst { Workflow, Task, Sequence, smithers, outputs } = createSmithers({\n input: inputSchema,\n gather: gatherSchema,\n render: renderSchema,\n});\n\n// --- Deterministic helpers for the gather step (no agent). ---\nconst MAX_RAW = 60_000;\n\nfunction asString(value: unknown): string {\n if (typeof value === \"string\") return value;\n if (value === null || value === undefined) return \"\";\n return String(value);\n}\n\nfunction pickArray(value: unknown): unknown[] {\n return Array.isArray(value) ? value : [];\n}\n\n/**\n * Flatten whatever the inspect payload calls its node list into the minimal\n * { id, type, status, summary } rows the renderer consumes. The shape of\n * `inspect --format json` varies by version, so probe a few likely keys and\n * fall back to an empty list rather than throwing.\n */\nfunction flattenNodes(parsed: Record): Array<{ id: string; type: string; status: string; summary: string }> {\n const candidates = [parsed.nodes, parsed.steps, parsed.tasks];\n const list = candidates.find((c) => Array.isArray(c) && c.length > 0);\n return pickArray(list).map((n) => {\n const node = (n ?? {}) as Record;\n return {\n id: asString(node.id ?? node.nodeId ?? node.name),\n type: asString(node.type ?? node.kind ?? node.component),\n status: asString(node.status ?? node.state ?? node.phase),\n summary: asString(node.summary ?? node.title ?? node.label).slice(0, 400),\n };\n });\n}\n\nexport default smithers((ctx) => {\n const runId = ctx.input.runId;\n\n // Gate the render step on the gather output being present.\n const gather = ctx.outputMaybe(\"gather\", { nodeId: \"gather\" });\n\n const fallbackTitle = ctx.input.title ?? `Smithers run ${runId}`;\n\n return (\n \n \n {/* 1 — Deterministically capture the run state, nodes, and a summary. */}\n \n {async () => {\n const res = await $`bunx smthrs inspect ${runId} --format json --full-output`\n .nothrow()\n .quiet();\n const stdout = res.stdout?.toString() ?? \"\";\n const stderr = res.stderr?.toString() ?? \"\";\n\n let parsed: Record = {};\n let ok = false;\n if (res.exitCode === 0 && stdout.trim().length > 0) {\n try {\n parsed = JSON.parse(stdout) as Record;\n ok = true;\n } catch {\n ok = false;\n }\n }\n\n const nodes = ok ? flattenNodes(parsed) : [];\n const state = ok\n ? asString(parsed.status ?? parsed.state ?? \"unknown\") || \"unknown\"\n : \"unknown\";\n const summary = ok\n ? `Run ${runId} is \"${state}\" with ${nodes.length} node(s).`\n : `Could not inspect run ${runId}: ${(stderr || stdout || \"no output\").slice(0, 300)}`;\n\n return {\n ok,\n state,\n nodes,\n summary,\n raw: (ok ? stdout : `${stdout}\\n${stderr}`).slice(0, MAX_RAW),\n };\n }}\n \n\n {/* 2 — Render a self-contained HTML slideshow from the captured state. */}\n {gather ? (\n \n \n \n ) : null}\n \n \n );\n});\n"
},
{
"path": ".smithers/prompts/report-slideshow-render.mdx",
diff --git a/docs/references/smithers/apps/cli/src/smithersRuntime.js b/docs/references/smithers/apps/cli/src/smithersRuntime.js
index 0dc783f49..98584d972 100644
--- a/docs/references/smithers/apps/cli/src/smithersRuntime.js
+++ b/docs/references/smithers/apps/cli/src/smithersRuntime.js
@@ -1,8 +1,8 @@
import * as WorkflowEngine from "@effect/workflow/WorkflowEngine";
import { Cause, Effect, Exit, Layer, ManagedRuntime } from "effect";
-import { SchedulerLive, WorkflowSessionLive } from "@smithers-orchestrator/scheduler";
-import { CorrelationContextLive, MetricsServiceLive, TracingServiceLive, createSmithersRuntimeLayer, getCurrentSmithersTraceAnnotations, getCurrentSmithersTraceSpan, } from "@smithers-orchestrator/observability";
-import { toSmithersError } from "@smithers-orchestrator/errors/toSmithersError";
+import { SchedulerLive, WorkflowSessionLive } from "@smthrs/scheduler";
+import { CorrelationContextLive, MetricsServiceLive, TracingServiceLive, createSmithersRuntimeLayer, getCurrentSmithersTraceAnnotations, getCurrentSmithersTraceSpan, } from "@smthrs/observability";
+import { toSmithersError } from "@smthrs/errors/toSmithersError";
import { SmithersLoggerLayer } from "./util/logger.ts";
const ObservabilityLayer = Layer.mergeAll(CorrelationContextLive, MetricsServiceLive, TracingServiceLive);
const SmithersCoreLayer = Layer.mergeAll(ObservabilityLayer, SchedulerLive.pipe(Layer.provide(ObservabilityLayer)), WorkflowSessionLive);
diff --git a/docs/references/smithers/apps/cli/src/snapshot-hook.js b/docs/references/smithers/apps/cli/src/snapshot-hook.js
index 15dc2539e..8b6cfaba0 100644
--- a/docs/references/smithers/apps/cli/src/snapshot-hook.js
+++ b/docs/references/smithers/apps/cli/src/snapshot-hook.js
@@ -6,7 +6,7 @@
// is visible.
import * as net from "node:net";
-import { appendGap, defaultGapSpoolPath } from "@smithers-orchestrator/engine/durabilityGapSpool";
+import { appendGap, defaultGapSpoolPath } from "@smthrs/engine/durabilityGapSpool";
/** Read a whole stream to a string. */
function readAll(stream) {
diff --git a/docs/references/smithers/apps/cli/src/starter-gallery-command.js b/docs/references/smithers/apps/cli/src/starter-gallery-command.js
index 16744a659..23615c8d0 100644
--- a/docs/references/smithers/apps/cli/src/starter-gallery-command.js
+++ b/docs/references/smithers/apps/cli/src/starter-gallery-command.js
@@ -20,7 +20,7 @@ export function runStartersCommand(c, fail) {
if (c.args.id && !findStarterRecipe(c.args.id)) {
return fail({
code: "STARTER_NOT_FOUND",
- message: `Starter not found: ${c.args.id}. Run "bunx smithers-orchestrator starters" to list available starters.`,
+ message: `Starter not found: ${c.args.id}. Run "bunx smthrs starters" to list available starters.`,
details: {
availableStarters: buildStarterGallery().starters.map((starter) => starter.id),
},
diff --git a/docs/references/smithers/apps/cli/src/starter-gallery.js b/docs/references/smithers/apps/cli/src/starter-gallery.js
index 5b36fbebe..4c66c7c98 100644
--- a/docs/references/smithers/apps/cli/src/starter-gallery.js
+++ b/docs/references/smithers/apps/cli/src/starter-gallery.js
@@ -1,4 +1,4 @@
-const CLI_COMMAND = "bunx smithers-orchestrator";
+const CLI_COMMAND = "bunx smthrs";
const INSTALL_COMMAND = `${CLI_COMMAND} init --add-agents`;
/**
diff --git a/docs/references/smithers/apps/cli/src/supervisor.js b/docs/references/smithers/apps/cli/src/supervisor.js
index 75fc7553a..98f15ddf3 100644
--- a/docs/references/smithers/apps/cli/src/supervisor.js
+++ b/docs/references/smithers/apps/cli/src/supervisor.js
@@ -2,13 +2,13 @@ import { randomUUID } from "node:crypto";
import { existsSync } from "node:fs";
import { isAbsolute, resolve } from "node:path";
import { Effect, Schedule } from "effect";
-import { toSmithersError } from "@smithers-orchestrator/errors/toSmithersError";
-import { trackEvent } from "@smithers-orchestrator/observability/metrics";
-import { isPidAlive, parseRuntimeOwnerPid } from "@smithers-orchestrator/engine/runtime-owner";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { toSmithersError } from "@smthrs/errors/toSmithersError";
+import { trackEvent } from "@smthrs/observability/metrics";
+import { isPidAlive, parseRuntimeOwnerPid } from "@smthrs/engine/runtime-owner";
+import { SmithersError } from "@smthrs/errors";
import { resumeRunDetached } from "./resume-detached.js";
/** @typedef {import("./RunAutoResumeSkipReason.ts").RunAutoResumeSkipReason} RunAutoResumeSkipReason */
-/** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
+/** @typedef {import("@smthrs/db/adapter").SmithersDb} SmithersDb */
/** @typedef {import("./SupervisorOptions.ts").SupervisorOptions} SupervisorOptions */
/** @typedef {import("./SupervisorPollSummary.ts").SupervisorPollSummary} SupervisorPollSummary */
@@ -43,7 +43,7 @@ export function parseDurationMs(raw, fieldName) {
}
return ms;
}
-export { isPidAlive, parseRuntimeOwnerPid } from "@smithers-orchestrator/engine/runtime-owner";
+export { isPidAlive, parseRuntimeOwnerPid } from "@smthrs/engine/runtime-owner";
/**
* @param {SupervisorOptions} options
* @returns {NormalizedSupervisorOptions}
diff --git a/docs/references/smithers/apps/cli/src/tree.js b/docs/references/smithers/apps/cli/src/tree.js
index 740665768..37e23aeaa 100644
--- a/docs/references/smithers/apps/cli/src/tree.js
+++ b/docs/references/smithers/apps/cli/src/tree.js
@@ -5,9 +5,9 @@
// @smithers-type-exports-end
import pc from "picocolors";
-import { getDevToolsSnapshotRoute, DevToolsRouteError } from "@smithers-orchestrator/server/gatewayRoutes/getDevToolsSnapshot";
-import { streamDevToolsRoute } from "@smithers-orchestrator/server/gatewayRoutes/streamDevTools";
-import { applyDelta } from "@smithers-orchestrator/devtools";
+import { getDevToolsSnapshotRoute, DevToolsRouteError } from "@smthrs/server/gatewayRoutes/getDevToolsSnapshot";
+import { streamDevToolsRoute } from "@smthrs/server/gatewayRoutes/streamDevTools";
+import { applyDelta } from "@smthrs/devtools";
import { EXIT_OK, EXIT_USER_ERROR, EXIT_SERVER_ERROR, EXIT_SIGINT } from "./util/exitCodes.js";
import { formatCliErrorForStderr, getCliErrorMapping } from "./util/errorMessage.js";
@@ -34,7 +34,7 @@ function renderAttr(value) {
}
/**
- * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} node
+ * @param {import("@smthrs/protocol/devtools").DevToolsNode} node
* @param {boolean} useColor
*/
function renderOpenTag(node, useColor) {
@@ -65,13 +65,13 @@ function renderOpenTag(node, useColor) {
return parts.join("");
}
-/** @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} node @param {boolean} useColor */
+/** @param {import("@smthrs/protocol/devtools").DevToolsNode} node @param {boolean} useColor */
function renderCloseTag(node, useColor) {
const c = colors(useColor);
return c.cyan(`${node.type}>`);
}
-/** @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} node @param {string} id */
+/** @param {import("@smthrs/protocol/devtools").DevToolsNode} node @param {string} id */
function findNode(node, id) {
if (node.task?.nodeId === id) return node;
if (typeof node.name === "string" && node.name === id) return node;
@@ -83,16 +83,16 @@ function findNode(node, id) {
}
/**
- * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} root
+ * @param {import("@smthrs/protocol/devtools").DevToolsNode} root
* @param {string} nodeId
- * @returns {import("@smithers-orchestrator/protocol/devtools").DevToolsNode | null}
+ * @returns {import("@smthrs/protocol/devtools").DevToolsNode | null}
*/
export function selectSubtree(root, nodeId) {
return findNode(root, nodeId);
}
/**
- * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsSnapshot} snapshot
+ * @param {import("@smthrs/protocol/devtools").DevToolsSnapshot} snapshot
* @param {TreeRenderOptions} [options]
* @returns {string}
*/
@@ -106,7 +106,7 @@ export function renderDevToolsTree(snapshot, options) {
/** @type {string[]} */
const lines = [];
/**
- * @param {import("@smithers-orchestrator/protocol/devtools").DevToolsNode} node
+ * @param {import("@smthrs/protocol/devtools").DevToolsNode} node
* @param {number} indent
*/
const walk = (node, indent) => {
@@ -195,11 +195,11 @@ export async function runTreeWatch(input) {
nodeId: input.node,
color: input.color,
};
- /** @type {import("@smithers-orchestrator/protocol/devtools").DevToolsSnapshot | null} */
+ /** @type {import("@smthrs/protocol/devtools").DevToolsSnapshot | null} */
let snapshot = null;
/** @type {number | undefined} */
let lastDeliveredSeq;
- /** @param {import("@smithers-orchestrator/protocol/devtools").DevToolsSnapshot} snap */
+ /** @param {import("@smthrs/protocol/devtools").DevToolsSnapshot} snap */
const emit = (snap) => {
lastDeliveredSeq = snap.seq;
if (input.json) {
diff --git a/docs/references/smithers/apps/cli/src/why-diagnosis.js b/docs/references/smithers/apps/cli/src/why-diagnosis.js
index 8f907e59e..a465cc470 100644
--- a/docs/references/smithers/apps/cli/src/why-diagnosis.js
+++ b/docs/references/smithers/apps/cli/src/why-diagnosis.js
@@ -3,11 +3,11 @@
// @smithers-type-exports-end
import { Effect } from "effect";
-import { isRunHeartbeatFresh } from "@smithers-orchestrator/engine";
-import { computeRetryDelayMs } from "@smithers-orchestrator/scheduler/computeRetryDelayMs";
-import { SmithersError } from "@smithers-orchestrator/errors";
+import { isRunHeartbeatFresh } from "@smthrs/engine";
+import { computeRetryDelayMs } from "@smthrs/scheduler/computeRetryDelayMs";
+import { SmithersError } from "@smthrs/errors";
import { formatAge } from "./format.js";
-/** @typedef {import("@smithers-orchestrator/db/adapter").SmithersDb} SmithersDb */
+/** @typedef {import("@smthrs/db/adapter").SmithersDb} SmithersDb */
/** @typedef {import("./WhyBlocker.ts").WhyBlocker} WhyBlocker */
/** @typedef {import("./WhyDiagnosis.ts").WhyDiagnosis} WhyDiagnosis */
diff --git a/docs/references/smithers/apps/cli/src/workflow-pack.js b/docs/references/smithers/apps/cli/src/workflow-pack.js
index b0bb0cad3..87a0def3b 100644
--- a/docs/references/smithers/apps/cli/src/workflow-pack.js
+++ b/docs/references/smithers/apps/cli/src/workflow-pack.js
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
-import { accountsRoot } from "@smithers-orchestrator/accounts";
+import { accountsRoot } from "@smthrs/accounts";
import { generateAgentsTs } from "./agent-detection.js";
import { WORKFLOW_UI_SOURCES } from "./workflowUiSources.js";
// Seeded workflows authored as canonical files in .smithers/ and emitted by
@@ -91,7 +91,7 @@ function readOwnPackageVersion() {
}
/**
* Pins shipped with this release for devDep-only specs that won't be in the
- * user's `node_modules` after `bunx smithers-orchestrator@latest init`. Bump
+ * user's `node_modules` after `bunx smthrs@latest init`. Bump
* these when updating the monorepo's root devDependencies.
*/
const BUNDLED_VERSION_PINS = {
@@ -143,7 +143,7 @@ function renderPackageJson(versions) {
dependencies: {
react: versions.reactVersion,
"react-dom": versions.reactDomVersion,
- "smithers-orchestrator": smithersSpec,
+ "smthrs": smithersSpec,
zod: versions.zodVersion,
},
devDependencies: {
@@ -163,7 +163,7 @@ function renderTsconfig() {
module: "ESNext",
moduleDetection: "force",
jsx: "react-jsx",
- jsxImportSource: "smithers-orchestrator",
+ jsxImportSource: "smthrs",
moduleResolution: "bundler",
allowImportingTsExtensions: true,
verbatimModuleSyntax: true,
@@ -188,7 +188,7 @@ function renderAgentScaffoldFiles() {
path: ".smithers/agents/claude-code.ts",
preserveExisting: true,
contents: [
- 'import { ClaudeCodeAgent as SmithersClaudeCodeAgent } from "smithers-orchestrator";',
+ 'import { ClaudeCodeAgent as SmithersClaudeCodeAgent } from "smthrs";',
"",
'// Built-in Claude Code CLI agent (cliEngine: "claude-code").',
"// Tweak `model`, `cwd`, or uncomment extra options below to match your setup.",
@@ -206,7 +206,7 @@ function renderAgentScaffoldFiles() {
path: ".smithers/agents/codex.ts",
preserveExisting: true,
contents: [
- 'import { CodexAgent as SmithersCodexAgent } from "smithers-orchestrator";',
+ 'import { CodexAgent as SmithersCodexAgent } from "smthrs";',
"",
'// Built-in Codex CLI agent (cliEngine: "codex").',
"// Tweak `model`, `cwd`, or uncomment extra options below to match your setup.",
@@ -225,7 +225,7 @@ function renderAgentScaffoldFiles() {
path: ".smithers/agents/opencode.ts",
preserveExisting: true,
contents: [
- 'import { OpenCodeAgent as SmithersOpenCodeAgent } from "smithers-orchestrator";',
+ 'import { OpenCodeAgent as SmithersOpenCodeAgent } from "smthrs";',
"",
'// Built-in OpenCode CLI agent (cliEngine: "opencode").',
"// Tweak `model`, `cwd`, or uncomment extra options below to match your setup.",
@@ -243,7 +243,7 @@ function renderAgentScaffoldFiles() {
path: ".smithers/agents/antigravity.ts",
preserveExisting: true,
contents: [
- 'import { AntigravityAgent as SmithersAntigravityAgent } from "smithers-orchestrator";',
+ 'import { AntigravityAgent as SmithersAntigravityAgent } from "smthrs";',
"",
'// Built-in Antigravity CLI agent (cliEngine: "antigravity").',
"// Tweak `model`, `cwd`, or uncomment extra options below to match your setup.",
@@ -1052,8 +1052,8 @@ function renderComponents() {
path: ".smithers/components/Review.tsx",
contents: [
"// smithers-source: seeded",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Parallel, Task, type AgentLike } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Parallel, Task, type AgentLike } from "smthrs";',
'import { z } from "zod/v4";',
'import ReviewPrompt from "../prompts/review.mdx";',
"",
@@ -1102,8 +1102,8 @@ function renderComponents() {
path: ".smithers/components/ValidationLoop.tsx",
contents: [
"// smithers-source: seeded",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Sequence, Loop, Task, type AgentLike } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Sequence, Loop, Task, type AgentLike } from "smthrs";',
'import { z } from "zod/v4";',
'import { Review } from "~/components/Review";',
'import ImplementPrompt from "~/prompts/implement.mdx";',
@@ -1167,8 +1167,8 @@ function renderComponents() {
path: ".smithers/components/CommandProbe.tsx",
contents: [
"// smithers-source: seeded",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Task } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Task } from "smthrs";',
'import { z } from "zod/v4";',
"",
"export const commandProbeOutputSchema = z.looseObject({",
@@ -1189,8 +1189,8 @@ function renderComponents() {
{
path: ".smithers/components/GrillMe.tsx",
contents: [
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Loop, Sequence, Task, type AgentLike, type OutputTarget } from "smthrs";',
'import { z } from "zod/v4";',
'import GrillMeSkill from "../prompts/grill-me.mdx";',
'import AskUserInstructions from "../prompts/ask-user-instructions.mdx";',
@@ -1255,8 +1255,8 @@ function renderComponents() {
path: ".smithers/components/ForEachFeature.tsx",
contents: [
"// smithers-source: seeded",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Parallel, Sequence, Task, type AgentLike } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Parallel, Sequence, Task, type AgentLike } from "smthrs";',
'import { z } from "zod/v4";',
'import FeatureTaskPrompt from "~/prompts/feature-task.mdx";',
"",
@@ -1408,8 +1408,8 @@ function renderComponents() {
path: ".smithers/components/FeatureEnum.tsx",
contents: [
"// smithers-source: seeded",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { Sequence, Task, type AgentLike } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { Sequence, Task, type AgentLike } from "smthrs";',
'import { z } from "zod/v4";',
'import FeatureEnumScanPrompt from "../prompts/feature-enum-scan.mdx";',
'import FeatureEnumRefinePrompt from "../prompts/feature-enum-refine.mdx";',
@@ -1634,7 +1634,7 @@ function renderWorkflowFile(id, displayName, body, metadata = {}) {
...(resolvedMetadata.description ? [`// smithers-description: ${resolvedMetadata.description}`] : []),
...(resolvedMetadata.tags?.length ? [`// smithers-tags: ${resolvedMetadata.tags.join(", ")}`] : []),
...(resolvedMetadata.aliases?.length ? [`// smithers-aliases: ${resolvedMetadata.aliases.join(", ")}`] : []),
- "/** @jsxImportSource smithers-orchestrator */",
+ "/** @jsxImportSource smthrs */",
...body,
"",
].join("\n"),
@@ -1694,7 +1694,7 @@ function renderGatewayFile() {
return {
path: ".smithers/gateway.ts",
contents: [
- 'import { Gateway, mdxPlugin } from "smithers-orchestrator";',
+ 'import { Gateway, mdxPlugin } from "smthrs";',
'import { dirname, resolve } from "node:path";',
'import { fileURLToPath } from "node:url";',
"",
@@ -1748,7 +1748,7 @@ function renderKanbanUiFile() {
" useGatewayNodeOutput,",
" useGatewayRunEvents,",
" useGatewayRuns,",
- '} from "smithers-orchestrator/gateway-react";',
+ '} from "smthrs/gateway-react";',
"",
'const WORKFLOW_KEY = "kanban";',
"",
@@ -2172,7 +2172,7 @@ function renderPlanUiFile() {
" useGatewayNodeOutput,",
" useGatewayRunEvents,",
" useGatewayRuns,",
- '} from "smithers-orchestrator/gateway-react";',
+ '} from "smthrs/gateway-react";',
].join("\n");
return {
path: ".smithers/ui/plan.tsx",
@@ -2394,7 +2394,7 @@ function renderVcsUiFile() {
" useGatewayNodeOutput,",
" useGatewayRunEvents,",
" useGatewayRuns,",
- "} from \"smithers-orchestrator/gateway-react\";",
+ "} from \"smthrs/gateway-react\";",
"",
"const WORKFLOW_KEY = \"vcs\";",
"const ACTIONS = [\"status\", \"log\", \"commit\", \"rebase-plan\"] as const;",
@@ -2726,13 +2726,13 @@ function renderVcsUiFile() {
}
function renderWorkflows() {
const sharedImports = [
- 'import { createSmithers } from "smithers-orchestrator";',
+ 'import { createSmithers } from "smthrs";',
'import { z } from "zod/v4";',
'import { agents } from "../agents";',
];
return [
renderWorkflowFile("vcs", "VCS", [
- "import { createSmithers, Task, Sequence } from 'smithers-orchestrator';",
+ "import { createSmithers, Task, Sequence } from 'smthrs';",
"import { execFileSync } from 'node:child_process';",
"import { z } from 'zod/v4';",
"import { agents } from '../agents';",
@@ -3943,8 +3943,8 @@ function renderWorkflows() {
"// smithers-display-name: Kanban",
"// smithers-description: Implement ticket files from `.smithers/tickets/` in worktree branches with a Kanban UI.",
"// smithers-tags: tickets, ui, worktrees",
- "/** @jsxImportSource smithers-orchestrator */",
- 'import { createSmithers, Sequence, Parallel, Worktree } from "smithers-orchestrator";',
+ "/** @jsxImportSource smthrs */",
+ 'import { createSmithers, Sequence, Parallel, Worktree } from "smthrs";',
'import { readdirSync, readFileSync } from "node:fs";',
'import { resolve } from "node:path";',
'import { z } from "zod/v4";',
@@ -4200,7 +4200,7 @@ function renderTemplateFiles(versions, env, projectRoot) {
},
{
path: ".smithers/preload.ts",
- contents: ['import { mdxPlugin } from "smithers-orchestrator";', "", "mdxPlugin();", ""].join("\n"),
+ contents: ['import { mdxPlugin } from "smthrs";', "", "mdxPlugin();", ""].join("\n"),
},
renderGatewayFile(),
...renderAgentScaffoldFiles(),
diff --git a/docs/references/smithers/apps/cli/src/workflowUiSources.js b/docs/references/smithers/apps/cli/src/workflowUiSources.js
index 9de19d705..c40342104 100644
--- a/docs/references/smithers/apps/cli/src/workflowUiSources.js
+++ b/docs/references/smithers/apps/cli/src/workflowUiSources.js
@@ -2,18 +2,18 @@
// full source of a .smithers/ui/.tsx standalone React app, served by the
// Gateway at /workflows/. Regenerate via the build swarm + integration.
export const WORKFLOW_UI_SOURCES = {
- "implement": "/** @jsxImportSource react */\nimport { useMemo, useState } from \"react\";\nimport {\n createGatewayReactRoot,\n useGatewayActions,\n useGatewayNodeOutput,\n useGatewayRunEvents,\n useGatewayRuns,\n} from \"smithers-orchestrator/gateway-react\";\n\nconst WORKFLOW_KEY = \"implement\";\n\ntype RunSummary = { runId: string; workflowKey?: string; status?: string; createdAtMs?: number };\n\nfunction isRecord(value: unknown): value is Record {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction asString(value: unknown): string | undefined {\n return typeof value === \"string\" ? value : undefined;\n}\nfunction asBool(value: unknown): boolean | undefined {\n return typeof value === \"boolean\" ? value : undefined;\n}\nfunction shortRunId(runId: string | undefined) {\n return runId ? runId.slice(0, 8) : \"--\";\n}\nfunction runIdFromUrl(): string | undefined {\n if (typeof location === \"undefined\") return undefined;\n return new URLSearchParams(location.search).get(\"runId\") ?? undefined;\n}\n\nfunction unwrapRow(value: unknown): Record | null {\n const response = isRecord(value) ? value : {};\n const data = isRecord(response.data) ? response.data : response;\n const row = isRecord(data.row) ? data.row : isRecord(data) ? data : null;\n return row;\n}\n\ntype ImplementOutput = {\n summary: string;\n filesChanged: string[];\n allTestsPassing: boolean | undefined;\n};\nfunction extractImplement(value: unknown): ImplementOutput | null {\n const row = unwrapRow(value);\n if (!row) return null;\n const summary = asString(row.summary);\n if (summary === undefined) return null;\n const filesChanged = Array.isArray(row.filesChanged)\n ? row.filesChanged.filter((f): f is string => typeof f === \"string\")\n : [];\n return { summary, filesChanged, allTestsPassing: asBool(row.allTestsPassing) };\n}\n\ntype ValidateOutput = {\n summary: string;\n allPassed: boolean | undefined;\n failingSummary: string | null;\n};\nfunction extractValidate(value: unknown): ValidateOutput | null {\n const row = unwrapRow(value);\n if (!row) return null;\n const summary = asString(row.summary);\n if (summary === undefined) return null;\n const failingSummary = asString(row.failingSummary) ?? null;\n return { summary, allPassed: asBool(row.allPassed), failingSummary };\n}\n\ntype ReviewIssue = { severity: string; title: string; file: string | null; description: string };\ntype ReviewOutput = {\n reviewer: string;\n approved: boolean | undefined;\n feedback: string;\n issues: ReviewIssue[];\n};\nfunction extractReview(value: unknown): ReviewOutput | null {\n const row = unwrapRow(value);\n if (!row) return null;\n const reviewer = asString(row.reviewer);\n const feedback = asString(row.feedback);\n if (reviewer === undefined && feedback === undefined) return null;\n const issues = Array.isArray(row.issues)\n ? row.issues\n .map((raw): ReviewIssue | null => {\n if (!isRecord(raw)) return null;\n const title = asString(raw.title);\n if (title === undefined) return null;\n return {\n severity: asString(raw.severity) ?? \"nit\",\n title,\n file: asString(raw.file) ?? null,\n description: asString(raw.description) ?? \"\",\n };\n })\n .filter((i): i is ReviewIssue => i !== null)\n : [];\n return {\n reviewer: reviewer ?? \"reviewer\",\n approved: asBool(row.approved),\n feedback: feedback ?? \"\",\n issues,\n };\n}\n\nconst styles = [\n \":root { --bg:#0c0c0e; --panel:#151518; --card:#1c1c1f; --text:#eee; --muted:#8a8a8e; --border:#262629; --primary:#5e6ad2; --ok:#4ade80; --err:#f87171; --warn:#fbbf24; color-scheme:dark; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; }\",\n \"* { box-sizing:border-box; }\",\n \"body { margin:0; background:var(--bg); color:var(--text); font-size:13px; line-height:1.5; }\",\n \"button,input { font:inherit; }\",\n \".shell { height:100vh; display:flex; flex-direction:column; overflow:hidden; }\",\n \".topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 20px; border-bottom:1px solid var(--border); }\",\n \".title-group { display:flex; align-items:center; gap:12px; min-width:0; }\",\n \"h1 { margin:0; font-size:14px; font-weight:600; }\",\n \".pill { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); background:var(--panel); padding:4px 10px; border-radius:6px; border:1px solid var(--border); }\",\n \".toolbar { display:flex; align-items:center; gap:8px; flex:1; justify-content:flex-end; }\",\n \".prompt { flex:1; max-width:420px; height:30px; padding:0 10px; border:1px solid var(--border); border-radius:6px; background:var(--panel); color:var(--text); }\",\n \".button { height:30px; padding:0 12px; border:1px solid var(--border); border-radius:6px; background:var(--panel); color:var(--text); cursor:pointer; font-weight:500; }\",\n \".button:hover { background:var(--card); }\",\n \".button.primary { background:var(--primary); color:#fff; border-color:var(--primary); }\",\n \".button.danger { color:var(--err); }\",\n \".button:disabled { opacity:0.4; cursor:not-allowed; }\",\n \".main { display:grid; grid-template-columns:1fr 280px; flex:1; overflow:hidden; }\",\n \".content { padding:20px; overflow:auto; }\",\n \".status-row { display:flex; align-items:center; gap:10px; margin-bottom:16px; }\",\n \".badge { font-size:11px; font-weight:600; text-transform:uppercase; padding:3px 8px; border-radius:5px; border:1px solid var(--border); }\",\n \".badge.running { color:var(--warn); border-color:var(--warn); }\",\n \".badge.finished { color:var(--ok); border-color:var(--ok); }\",\n \".badge.failed { color:var(--err); border-color:var(--err); }\",\n \".banner { display:flex; align-items:center; gap:12px; padding:14px 18px; border-radius:10px; margin-bottom:18px; border:1px solid var(--border); font-weight:600; }\",\n \".banner.done { background:rgba(74,222,128,0.08); border-color:var(--ok); color:var(--ok); }\",\n \".banner.blocked { background:rgba(248,113,113,0.08); border-color:var(--err); color:var(--err); }\",\n \".banner.progress { background:rgba(94,106,210,0.1); border-color:var(--primary); color:#aab2f0; }\",\n \".banner-icon { font-size:18px; }\",\n \".banner-sub { font-weight:400; color:var(--muted); font-size:12px; }\",\n \".iteration { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); background:var(--panel); padding:4px 10px; border-radius:6px; border:1px solid var(--border); }\",\n \".phase { background:var(--card); border:1px solid var(--border); border-radius:10px; margin-bottom:14px; overflow:hidden; }\",\n \".phase-head { display:flex; align-items:center; gap:10px; padding:14px 18px; cursor:pointer; user-select:none; }\",\n \".phase-head:hover { background:var(--panel); }\",\n \".phase-dot { flex:0 0 10px; width:10px; height:10px; border-radius:50%; background:var(--muted); }\",\n \".phase-dot.ok { background:var(--ok); }\",\n \".phase-dot.err { background:var(--err); }\",\n \".phase-dot.pending { background:var(--border); }\",\n \".phase-title { font-weight:600; font-size:13px; }\",\n \".phase-meta { margin-left:auto; font-size:11px; color:var(--muted); }\",\n \".phase-body { padding:0 18px 16px; }\",\n \".phase-empty { color:var(--muted); padding:0 18px 16px; font-size:12px; }\",\n \".kv { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:0.04em; margin:10px 0 6px; }\",\n \".summary-text { font-size:14px; line-height:1.55; }\",\n \".chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }\",\n \".chip { font-family:ui-monospace,monospace; font-size:11px; background:var(--panel); border:1px solid var(--border); border-radius:5px; padding:3px 8px; }\",\n \".reviewers { display:grid; grid-template-columns:1fr 1fr; gap:12px; }\",\n \".reviewer-card { background:var(--panel); border:1px solid var(--border); border-radius:8px; padding:14px; }\",\n \".reviewer-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }\",\n \".reviewer-name { font-weight:600; font-size:12px; }\",\n \".verdict { font-size:11px; font-weight:600; text-transform:uppercase; padding:3px 8px; border-radius:5px; border:1px solid var(--border); }\",\n \".verdict.approved { color:var(--ok); border-color:var(--ok); }\",\n \".verdict.rejected { color:var(--err); border-color:var(--err); }\",\n \".reviewer-feedback { font-size:12px; color:var(--text); line-height:1.5; }\",\n \".issues { list-style:none; margin:10px 0 0; padding:0; }\",\n \".issue { display:flex; gap:8px; align-items:flex-start; padding:6px 0; border-top:1px solid var(--border); }\",\n \".sev { flex:0 0 auto; font-size:10px; font-weight:700; text-transform:uppercase; padding:2px 6px; border-radius:4px; }\",\n \".sev.critical { background:rgba(248,113,113,0.15); color:var(--err); }\",\n \".sev.major { background:rgba(251,146,60,0.15); color:#fb923c; }\",\n \".sev.minor { background:rgba(251,191,36,0.15); color:var(--warn); }\",\n \".sev.nit { background:var(--card); color:var(--muted); }\",\n \".issue-body { font-size:12px; }\",\n \".issue-title { font-weight:600; }\",\n \".issue-file { font-family:ui-monospace,monospace; font-size:11px; color:var(--muted); }\",\n \".feedback-block { background:#0e0e10; border:1px solid var(--err); border-radius:10px; padding:14px 16px; margin-bottom:14px; }\",\n \".feedback-block h2 { margin:0 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:0.04em; color:var(--err); }\",\n \".feedback-pre { margin:0; white-space:pre-wrap; font-family:ui-monospace,monospace; font-size:11px; color:#ddd; max-height:260px; overflow:auto; }\",\n \".empty { color:var(--muted); text-align:center; padding:48px 16px; }\",\n \".empty .button { margin-top:14px; }\",\n \".empty-lead { max-width:420px; margin:0 auto 8px; }\",\n \".sidebar { border-left:1px solid var(--border); background:var(--panel); overflow:auto; }\",\n \".side-head { padding:12px 16px; font-size:11px; text-transform:uppercase; letter-spacing:0.04em; color:var(--muted); border-bottom:1px solid var(--border); }\",\n \".run-row { width:100%; text-align:left; padding:10px 16px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text); cursor:pointer; display:flex; justify-content:space-between; gap:8px; }\",\n \".run-row:hover { background:var(--card); }\",\n \".run-row.active { background:var(--card); box-shadow:inset 2px 0 0 var(--primary); }\",\n \".run-row .mono { font-family:ui-monospace,monospace; font-size:11px; }\",\n].join(\"\\n\");\n\nfunction statusClass(status: string | undefined) {\n if (status === \"running\" || status === \"continued\") return \"running\";\n if (status === \"finished\") return \"finished\";\n if (status === \"failed\" || status === \"cancelled\") return \"failed\";\n return \"\";\n}\n\ntype PhaseCardProps = {\n testId: string;\n title: string;\n dot: string;\n meta: string;\n children: React.ReactNode;\n emptyText: string;\n hasContent: boolean;\n};\nfunction PhaseCard(props: PhaseCardProps) {\n const [open, setOpen] = useState(true);\n return (\n \n
\n Implement a code change with automated validation and code review. The workflow will iterate up to 3 times\n if validation or reviews fail, incorporating feedback each round.\n
\n
{activeRunId ? \"Waiting for the first task to run…\" : \"No run yet.\"}
{activeRunId ? \"Waiting for reviewers…\" : \"No review runs yet.\"}
\n
\n Launch a review to have the code changes examined by reviewers in parallel. Each reviewer reports\n an approve/deny verdict, written feedback, and a list of issues by severity. The verdict above\n turns green only when every reviewer approves.\n
\n No discrete key findings were extracted for this run.\n
\n )}\n >\n ) : (\n
\n {isRunning(status)\n ? \"Research in progress — findings will appear here when the agent finishes.\"\n : \"No research output is available for this run yet.\"}\n
\n )}\n \n >\n ) : (\n
\n
Select a research run from the history, or launch a new research run by entering a prompt.
\n
\n setPrompt(e.currentTarget.value)}\n placeholder=\"What should we research?\"\n />\n \n
{activeRunId ? \"Waiting for the first iteration…\" : \"No loop running\"}
\n
\n Ralph runs a single task in an infinite loop, posting a fresh summary after every iteration. Enter a\n prompt and start the loop to watch each iteration land here. Cancel whenever the work is done.\n
\n Implement a code change with automated validation and code review. The workflow will iterate up to 3 times\n if validation or reviews fail, incorporating feedback each round.\n
\n
{activeRunId ? \"Waiting for the first task to run…\" : \"No run yet.\"}
{activeRunId ? \"Waiting for reviewers…\" : \"No review runs yet.\"}
\n
\n Launch a review to have the code changes examined by reviewers in parallel. Each reviewer reports\n an approve/deny verdict, written feedback, and a list of issues by severity. The verdict above\n turns green only when every reviewer approves.\n
\n No discrete key findings were extracted for this run.\n
\n )}\n >\n ) : (\n
\n {isRunning(status)\n ? \"Research in progress — findings will appear here when the agent finishes.\"\n : \"No research output is available for this run yet.\"}\n
\n )}\n \n >\n ) : (\n
\n
Select a research run from the history, or launch a new research run by entering a prompt.
\n
\n setPrompt(e.currentTarget.value)}\n placeholder=\"What should we research?\"\n />\n \n
{activeRunId ? \"Waiting for the first iteration…\" : \"No loop running\"}
\n
\n Ralph runs a single task in an infinite loop, posting a fresh summary after every iteration. Enter a\n prompt and start the loop to watch each iteration land here. Cancel whenever the work is done.\n