docks-kit 0.10.2 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -20,9 +20,9 @@ launcher can fall back to Bun source.
20
20
  | Path | Purpose |
21
21
  |------|---------|
22
22
  | `docks-kit` | CLI launcher: on supported hosts, runs the platform binary in `cli/dist/` only when its `--version` matches `package.json`, otherwise Bun-from-source (auto-installs Bun + `node_modules`). Unsupported hosts fail before source fallback. No-Bun recovery is the standalone platform release binary |
23
- | `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, `workflow`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
23
+ | `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
24
24
  | `cli/` | Effect-TS CLI + bundled docs topics |
25
- | `SoT/models.json` | Kit-verified model catalog plus the strict Docks workflow-role registry |
25
+ | `SoT/models.json` | Kit-verified Claude and Codex model catalog |
26
26
  | `SoT/toolchain.json` | Toolchain floors manifest (verified pins consumed by EngineNative) |
27
27
  | `SoT/.claude/bin/` | Dependency-free Bun runtime programs for Claude's statusline, SessionStart, and Notification |
28
28
  | `install.sh` | Global installer |
@@ -42,8 +42,6 @@ Codex SoT notes:
42
42
  - `SoT/.codex/plugins/marketplace.json` deploys to Codex's personal marketplace path at `~/.agents/plugins/marketplace.json`; when the `codex` CLI is available, sync reruns `codex plugin add <plugin@marketplace>` for enabled SoT plugins so stale cached installs are refreshed.
43
43
  - `docks-kit status` verifies Session Relay only through the supported `codex plugin list --json` inventory. `ready` means installed and enabled for a newly started Codex session; it is not evidence about an old process, lifecycle state, receive-path health, or worker quiescence. The global prompt SoTs carry the owner's standing authorization for Docks cross-company plan review, which never overrides host or platform denial.
44
44
  - Claude and Codex sync call `sessionRelayCli.ts ensureSessionRelayCli` immediately before their plugin passes. It installs the exact source-pinned precompiled command at `~/.local/bin/session-relay` for Linux/macOS x64/arm64 only, requires committed digest = same-release `SHA256SUMS` row = downloaded bytes, smoke-tests the staged version, and atomically replaces the stable path. `agents`-only sync never enters this boundary. The four pinned production digests correspond to the stable `session-relay--v0.12.0` assets and its `SHA256SUMS`.
45
- - Both global prompt SoTs carry one byte-identical compact `Docks-workflow-models:` record. Root `--model-orchestrator` / `--model-reviewer` / `--model-implementer` / review-bound flags update only that deployed record; `docks-kit models workflow` lists the closed selectors, and a flag-less sync restores defaults.
46
- - Codex workflow selectors use the closed `<tool>:<model>@<effort>[+fast]` routing grammar. Fast is intentionally absent from the global SoT: no suffix means Standard and keeps the backward-compatible schema-1 record; `+fast` emits a schema-2 candidate with `service_tier: "fast"`. Docks and Session Relay consumers must explicitly launch unsuffixed Codex roles with the default service tier so a user's global Fast preference cannot leak into workflows.
47
45
  - The `codex` CLI binary is upstream-owned, not kit-owned. The official standalone installer keeps package metadata under `$CODEX_HOME/packages/standalone` and places the `codex` symlink in `~/.local/bin` by default; sync only warns with a download-then-run installer command when the CLI is missing. Existing installs can self-update with `codex update`; npm and Homebrew remain upstream alternatives.
48
46
  - Neither global prompt SoT imports `@RTK.md`; Claude uses the hook-backed RTK integration, while Codex has no kit-managed RTK integration.
49
47
  - Claude runtime settings are an authoring template with sentinels. `claudeRuntime.ts` materializes absolute Bun/script paths only after the shared `bun.ts` bootstrap is ready; `claudeSync.ts` writes all runtime assets before atomically committing settings, then prunes the legacy shell scripts and Stop hook. Native `rate_limits` is the sole quota source, so jq/curl/OAuth caches are not runtime dependencies. A missing Bun defers only this cutover and preserves legacy pointers/files.
@@ -93,9 +91,9 @@ When a kit-mechanic skill, its `references/`, or a wrapper agent (`.claude/agent
93
91
 
94
92
  ## Plans
95
93
 
96
- Multi-commit plans live in `docs/plans/active/`; lifecycle is a frontmatter field. `docs/plans/finished/` is the terminal archive. Every plan is a complete cold handoff. `plan-workspace` owns bootstrap/migrate/audit/explicit refresh, `plan-creator` owns creation of one nonexistent plan, `plan-manager` owns every existing-plan and lifecycle operation, `plan-reviewer` returns sealed-bundle evidence only, and `plan-repairer` returns one exact accepted-blocker patch or `cannot_repair`. Historical `plan-improver` is not a live skill; `plan-manager` alone validates, applies, and persists the repairer result. `active/` is multi-occupancy.
94
+ Canonical plans live in `docs/plans/active/`; status is frontmatter and `docs/plans/finished/` is terminal. Exactly three skills are live: `plan-workspace` maintains the workspace; main-context `plan-manager` classifies, drafts, reviews, repairs once, executes, verifies, and archives; internal `plan-reviewer` returns read-only `PlanReviewV1` evidence from one immutable bundle. Only the reviewer has Claude/Codex wrappers.
97
95
 
98
- The complete schema-6 contract lives in `docs/plans/AGENTS.md`; schemas 1–5 are historical validation-only. `docs/plans/CLAUDE.md` contains only `@AGENTS.md`. Optional project-local dispatch wrappers exist only for `plan-manager` and `plan-reviewer`; the five skills remain canonical.
96
+ Current plans carry one compact-JCS `Plan-run: PlanRunV1` record. Schemas 1–6 are historical validation/quarantine only and never authorize current dispatch or external effects. Persisted requested effects are intent, not authority; any probe, production access, publish, push, release, or deploy requires matching live authority from the exact current-user request. The full contract lives in `docs/plans/AGENTS.md`.
99
97
 
100
98
  Distinct from per-tool **Open Concerns** sections (wait-on-upstream
101
99
  blockers tied to a vendor shipping a fix — these live inside the per-tool
package/README.md CHANGED
@@ -43,7 +43,7 @@ RTK/Bun download boundaries, not as a global sync prerequisite.
43
43
  docks-kit sync [claude] [codex] [agents] deploy the SoT (default: all three)
44
44
  docks-kit update [--no-sync] self-update the kit (autodetects checkout vs global install), then sync
45
45
  docks-kit model <claude|codex> [value] get/set the DEPLOYED model (TTY picker)
46
- docks-kit models [claude|codex|workflow] model and workflow-role catalogs (`--json`)
46
+ docks-kit models [claude|codex] model catalogs (`--json`)
47
47
  docks-kit toolchain [check|ensure <tool>] verified-version floors for external tools
48
48
  docks-kit status [--json] deployed-vs-SoT drift + toolchain + counts
49
49
  docks-kit plugins list [--json] enabledPlugins tri-state vs installed
@@ -76,23 +76,6 @@ golden-regression coverage for dry-run output, mutation snapshots, and argv logs
76
76
  and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
77
77
  (includes the old→new rename table for the pre-CLI `sync.sh` flags).
78
78
 
79
- ### Docks workflow roles (root flags)
80
-
81
- | Flag | Effect |
82
- |------|--------|
83
- | `--model-orchestrator=<selector>` | Override the Docks orchestrator candidate/profile |
84
- | `--model-reviewer=<selector>` | Override the Docks reviewer candidate/profile |
85
- | `--model-implementer=<selector>` | Override the Docks implementer candidate/profile |
86
- | `--review-min-score=<0..100>` | Override the completion-review target |
87
- | `--review-max-rounds=<1..10>` | Bound completion-review batches |
88
-
89
- Selectors are strict `profile:<name>` or `<tool>:<model>@<effort>[+fast]`
90
- values from `docks-kit models workflow`; `+fast` is Codex-only. A selector
91
- without `+fast` means Standard, while `+fast` writes a schema-2 candidate with
92
- `service_tier: "fast"`. These root flags update only the identical compact record
93
- in `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md`; omitted fields retain their
94
- current valid values, while a later flag-less sync restores all defaults.
95
-
96
79
  ## How syncing works
97
80
 
98
81
  - **Additive by default** — user-only settings keys, plugins, and skills
@@ -109,10 +92,14 @@ current valid values, while a later flag-less sync restores all defaults.
109
92
  Session Relay plugin reconciliation. Linux/macOS x64/arm64 assets must match
110
93
  both the committed digest and their release `SHA256SUMS`, then pass an exact
111
94
  staged version smoke before atomic replacement; failures preserve any prior
112
- command. The four production digests are pinned for the stable
113
- `session-relay--v0.12.0` assets and match the same-release `SHA256SUMS`.
95
+ command. The four production digests are pinned for the tagged
96
+ `session-relay--v0.14.0` assets and match the same-release `SHA256SUMS`:
97
+ `x86_64-unknown-linux-musl` — `140ea11b700b307c07219616ca6e9b3c4fe552916871af54c3bb15712efd4ee3`
98
+ `aarch64-unknown-linux-musl` — `726aa5e4f112310a360ab0291600947404d885055844b2041d4f76b5fbeedd30`
99
+ `x86_64-apple-darwin` — `5cc8c7d77c5d93f2873841497171efd6ed3c981466625b0370817e094194e4f0`
100
+ `aarch64-apple-darwin` — `9256e96d0757f1ffbb2c7ee8aafa1b8bf5de7ee782ab85c30377a5d836ccee87`
114
101
  - **Model catalog** — `SoT/models.json` is the research-verified source for
115
- model validation, listings, pickers, and the Docks workflow-role registry.
102
+ model validation, listings, and pickers.
116
103
  - **Claude runtime** — sync materializes three dependency-free Bun `.mjs`
117
104
  programs for statusline, SessionStart, and Notification. Quota display uses
118
105
  Claude's native `rate_limits`; there is no OAuth fetch, shared usage cache,
@@ -126,7 +113,7 @@ current valid values, while a later flag-less sync restores all defaults.
126
113
  | `SoT/.claude/` | Claude Code SoT (settings template, Bun runtime programs, CLAUDE.md) |
127
114
  | `SoT/.codex/` | Codex SoT (config.toml, rules, AGENTS.md, marketplace) |
128
115
  | `SoT/.agents/` | Universal-skill manifest |
129
- | `SoT/models.json` | Kit-verified model and Docks workflow-role catalog |
116
+ | `SoT/models.json` | Kit-verified Claude and Codex model catalog |
130
117
  | `SoT/toolchain.json` | Verified-version floors |
131
118
  | `cli/src/engine-native/` | EngineNative sync/model/toolchain implementation |
132
119
  | `cli/src/generated/sotPayload.ts` | Generated in-memory payload used by standalone and npm installs |
@@ -152,8 +139,8 @@ Details: `docks-kit docs platforms`.
152
139
  Tagging `cli-v*` builds four standalone binaries (Linux x64/arm64 and macOS
153
140
  x64/arm64) plus `SHA256SUMS` and attaches them to the GitHub release; npm
154
141
  publish runs when the `NPM_TOKEN` secret is configured.
155
- Package bundles the CLI + generated payload, so npm releases are
156
- versioned config snapshots without shipping the authoring `SoT/` tree.
142
+ Package `docks-kit` 0.12.0 bundles the CLI + generated payload, so npm releases
143
+ are versioned config snapshots without shipping the authoring `SoT/` tree.
157
144
 
158
145
  ## Deeper docs
159
146
 
package/cli/docs/flags.md CHANGED
@@ -40,26 +40,6 @@ Bare model, effort, or advisor modifiers print the relevant valid-value catalog
40
40
  and exit 2. A modifier for a target not selected by the positional arguments is
41
41
  ignored with a warning; Claude modifiers never touch Codex config and vice versa.
42
42
 
43
- ## Docks workflow root flags
44
-
45
- These flags belong at the root (`docks-kit --model-reviewer=...`), not after
46
- `sync`. They update only the shared deployed workflow record.
47
-
48
- | Flag | Accepted value |
49
- |------|----------------|
50
- | `--model-orchestrator=<selector>` | `profile:<name>` or `<tool>:<model>@<effort>[+fast]` |
51
- | `--model-reviewer=<selector>` | same strict selector grammar |
52
- | `--model-implementer=<selector>` | same strict selector grammar |
53
- | `--review-min-score=<n>` | base-10 integer `0..100` |
54
- | `--review-max-rounds=<n>` | base-10 integer `1..10` |
55
-
56
- Use `docks-kit models workflow [--json]` for the closed registry. Bare, empty,
57
- unknown, or malformed values print that helper and exit 2 before either prompt
58
- file changes. `+fast` is accepted only on Codex exact targets and writes
59
- `service_tier: "fast"` in workflow record schema 2. Without `+fast`, the role is
60
- Standard and the record remains schema 1 unless another role is Fast. Shell
61
- quotes are optional but recommended around selectors containing `+fast`.
62
-
63
43
  ## Renamed legacy flags (pre-CLI sync.sh)
64
44
 
65
45
  Old flags exit with a rename hint — there is no compat behavior.
@@ -31,35 +31,8 @@ docks-kit models claude --json # machine-readable
31
31
  docks-kit model claude # current deployed + SoT + picker (TTY)
32
32
  docks-kit model claude opus # per-machine override from the Fable SoT
33
33
  docks-kit sync claude --claude-model=opus # same, as part of a sync
34
- docks-kit models workflow # Docks workflow profiles and defaults
35
- docks-kit models workflow --json # closed machine-readable registry
36
34
  ```
37
35
 
38
- ## Docks workflow-role registry
39
-
40
- The `workflow` section is strict even though ordinary tool-model modifiers are
41
- forward-compatible. It accepts only known `profile:<name>` values or exact
42
- `<tool>:<model>@<effort>[+fast]` targets whose model and effort both appear in
43
- the catalog. `+fast` is accepted only for Codex exact targets. The defaults are:
44
-
45
- - orchestrator: `profile:claude-best`, ordered as `claude:fable@high` then
46
- `claude:opus@xhigh`;
47
- - reviewer and implementer: `codex:gpt-5.6-sol@high`;
48
- - review minimum score 90 and maximum 3 rounds.
49
-
50
- `claude:best@high` is Claude's native one-model alias. It is deliberately not
51
- the same as the Docks-managed `profile:claude-best` candidate chain.
52
- Availability is `checked_when_used`: Docks classifies each launch attempt;
53
- docks-kit neither probes providers nor promises provider-wide fallback.
54
-
55
- The default and every unsuffixed selector emit the backward-compatible schema-1
56
- record with no service-tier field; absence means Standard. A `+fast` selector
57
- promotes the complete record to schema 2 and adds `service_tier: "fast"` only to
58
- the selected Codex candidate. Replacing the last Fast selector with an
59
- unsuffixed selector demotes the record back to schema 1. Docks and Session Relay
60
- must support schema 2 before `+fast` is deployed, and must explicitly select the
61
- default tier for unsuffixed roles so global Codex configuration cannot leak in.
62
-
63
36
  ## Advisor pairing note (Claude)
64
37
 
65
38
  The SoT ships `model: fable` with advisor off (`advisorModel` unset).
@@ -33,13 +33,6 @@ owns that key for the run: `on` writes `fable`; `off` and `default` delete it.
33
33
  Codex has no advisor modifier because its documented config has no advisor
34
34
  setting; `review_model` applies only to `/review`.
35
35
 
36
- Codex Fast mode is intentionally not a global SoT default or per-machine
37
- modifier. It is role-scoped through the root workflow flags: append `+fast` to a
38
- Codex exact selector to emit `service_tier: "fast"` in record schema 2. Without
39
- the suffix, the role means Standard and emits no tier field. Docks and Session
40
- Relay consumers must map that absence to an explicit default-tier process
41
- override rather than inherit a user's global Fast preference.
42
-
43
36
  ## Standalone get/set (no full sync)
44
37
 
45
38
  ```
@@ -52,32 +45,6 @@ docks-kit model codex gpt-5.5 # codex flavor
52
45
  The set path calls the same engine functions as the sync flags —
53
46
  one implementation, two entry points.
54
47
 
55
- ## Workflow-role overrides (root, no full sync)
56
-
57
- The root workflow flags are deployed modifiers for Docks rather than one tool:
58
-
59
- ```text
60
- docks-kit --model-orchestrator=profile:claude-best \
61
- --model-reviewer="codex:gpt-5.6-sol@high+fast" \
62
- --model-implementer=codex:gpt-5.6-sol@high \
63
- --review-min-score=80 --review-max-rounds=5
64
- ```
65
-
66
- They atomically write one byte-identical complete record to
67
- `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md`. Omitted fields retain the
68
- current valid record; a missing side is repaired. Invalid or conflicting state
69
- stops before mutation, a repeated request is a no-op, and failure on the second
70
- atomic write restores both snapshots. A later flag-less sync restores the
71
- embedded defaults. Start fresh sessions after changing the record.
72
-
73
- Selectors are strict `profile:<name>` or `<tool>:<model>@<effort>[+fast]`
74
- entries from `docks-kit models workflow`. `+fast` is Codex-only and quotes are
75
- optional; its absence means Standard. `profile:claude-best` is the ordered Docks
76
- Fable-high then Opus-xhigh chain; `claude:best@high` is instead Claude's native
77
- single-model alias. Docks checks each candidate when used—there is no docks-kit
78
- provider preflight. Install schema-2 support in Docks and Session Relay before
79
- using a Fast selector.
80
-
81
48
  ## Sticky opt-ins are NOT modifiers
82
49
 
83
50
  `--claude-plugin=<name>` installs+enables an optional plugin and it STAYS
@@ -40,13 +40,17 @@ now kit-approved" act.
40
40
  `docks-kit toolchain ensure session-relay` select exactly one of four targets
41
41
  (`x86_64-unknown-linux-musl`, `aarch64-unknown-linux-musl`,
42
42
  `x86_64-apple-darwin`, `aarch64-apple-darwin`). The installer downloads the
43
- pinned `session-relay--v0.12.0` asset and same-release `SHA256SUMS`, requires
43
+ pinned `session-relay--v0.14.0` asset and same-release `SHA256SUMS`, requires
44
44
  source pin = selected row = downloaded bytes, chmods/smoke-tests only the
45
45
  sibling stage, then renames it over `~/.local/bin/session-relay`. Offline,
46
46
  unsupported-host, checksum, chmod, version, download, or rename failures
47
47
  preserve an existing command byte-for-byte. The four pinned production
48
- digests correspond to the stable `session-relay--v0.12.0` assets and match
49
- its `SHA256SUMS`.
48
+ digests correspond to the tagged `session-relay--v0.14.0` assets and match
49
+ its `SHA256SUMS`:
50
+ `x86_64-unknown-linux-musl` — `140ea11b700b307c07219616ca6e9b3c4fe552916871af54c3bb15712efd4ee3`
51
+ `aarch64-unknown-linux-musl` — `726aa5e4f112310a360ab0291600947404d885055844b2041d4f76b5fbeedd30`
52
+ `x86_64-apple-darwin` — `5cc8c7d77c5d93f2873841497171efd6ed3c981466625b0370817e094194e4f0`
53
+ `aarch64-apple-darwin` — `9256e96d0757f1ffbb2c7ee8aafa1b8bf5de7ee782ab85c30377a5d836ccee87`
50
54
 
51
55
  jq and curl are `check` rows, not global prerequisites. jq is not consumed by
52
56
  normal sync. curl is checked only at a requested Linux/macOS RTK/Bun installer
@@ -2,10 +2,9 @@ import { Args, Command, Options } from "@effect/cli"
2
2
  import { Console, Effect, Option } from "effect"
3
3
  import { bail } from "../engine"
4
4
  import { modelCatalog, type Tool } from "../manifests"
5
- import { workflowCatalog, workflowRegistryJson } from "../workflowModels"
6
5
 
7
6
  const tool = Args.text({ name: "tool" }).pipe(
8
- Args.withDescription("claude | codex | workflow (omit for both tool catalogs)"),
7
+ Args.withDescription("claude | codex (omit for both tool catalogs)"),
9
8
  Args.optional
10
9
  )
11
10
  const json = Options.boolean("json").pipe(
@@ -25,11 +24,8 @@ const renderTool = (t: Tool) =>
25
24
  export const modelsCommand = Command.make("models", { tool, json }, (config) =>
26
25
  Effect.gen(function* () {
27
26
  const requested = Option.getOrUndefined(config.tool)
28
- if (requested === "workflow") {
29
- return yield* Console.log(config.json ? workflowRegistryJson() : workflowCatalog())
30
- }
31
27
  if (requested !== undefined && requested !== "claude" && requested !== "codex") {
32
- return yield* bail(`Unknown tool '${requested}' (valid: claude, codex, workflow)`)
28
+ return yield* bail(`Unknown tool '${requested}' (valid: claude, codex)`)
33
29
  }
34
30
  const tools: Array<Tool> = requested !== undefined ? [requested as Tool] : ["claude", "codex"]
35
31
 
@@ -46,5 +42,5 @@ export const modelsCommand = Command.make("models", { tool, json }, (config) =>
46
42
  )
47
43
  })
48
44
  ).pipe(
49
- Command.withDescription("List kit-verified tool models or the Docks workflow role registry (SoT/models.json).")
45
+ Command.withDescription("List kit-verified Claude and Codex models (SoT/models.json).")
50
46
  )
@@ -31,7 +31,6 @@ import { ExitError } from "./parseArgs"
31
31
  import { mergeSettings, reconcileSettings } from "./settings"
32
32
  import { ensure, field } from "./toolchain"
33
33
  import { payloadBytes, payloadDisplayPath, payloadText } from "../payload"
34
- import { renderDefaultWorkflowInstructions } from "./workflowDeploy"
35
34
  import { ensureSessionRelayCli } from "./sessionRelayCli"
36
35
 
37
36
  export type ClaudeRuntimeState =
@@ -207,7 +206,7 @@ function syncClaudeMd(ctx: Ctx, claudeDir: string): void {
207
206
  return
208
207
  }
209
208
 
210
- const source = renderDefaultWorkflowInstructions(payloadText("SoT/.claude/CLAUDE.md"))
209
+ const source = payloadText("SoT/.claude/CLAUDE.md")
211
210
  if (writeTextIfChanged(p(claudeDir, "CLAUDE.md"), source)) {
212
211
  change("CLAUDE.md synced")
213
212
  } else {
@@ -12,7 +12,6 @@ import type { Ctx } from "./index"
12
12
  import { compareCodepoints, isObject, jqStringify, parseJson, type Json } from "./jq"
13
13
  import { sessionRelayReadiness } from "./sessionRelayReadiness"
14
14
  import { payloadBytes, payloadDisplayPath, payloadPaths, payloadText, type PayloadPath } from "../payload"
15
- import { renderDefaultWorkflowInstructions } from "./workflowDeploy"
16
15
  import { ensureSessionRelayCli } from "./sessionRelayCli"
17
16
 
18
17
  export function codexSync(ctx: Ctx): void {
@@ -26,7 +25,7 @@ export function codexSync(ctx: Ctx): void {
26
25
  syncCodexModel(ctx, ctx.codexModel)
27
26
  syncCodexEffort(ctx, ctx.codexEffort)
28
27
  syncRules(ctx, payloadPaths("SoT/.codex/rules/"), p(codexDir, "rules"))
29
- syncAgentsMd(ctx, renderDefaultWorkflowInstructions(payloadText("SoT/.codex/AGENTS.md")), p(codexDir, "AGENTS.md"))
28
+ syncAgentsMd(ctx, payloadText("SoT/.codex/AGENTS.md"), p(codexDir, "AGENTS.md"))
30
29
  syncMarketplace(ctx, payloadText("SoT/.codex/plugins/marketplace.json"), p(ctx.agentsDir, "plugins", "marketplace.json"))
31
30
  removeLegacyDocksMarketplace(ctx, userConfig)
32
31
  ensureSessionRelayCli(ctx)
@@ -15,8 +15,7 @@ import { claudeNextSteps, claudeSummary, claudeSync } from "./claudeSync"
15
15
  import { codexNextSteps, codexSummary, codexSync } from "./codexSync"
16
16
  import { skillsNextSteps, skillsSummary, skillsSync } from "./skillsSync"
17
17
  import { modeModel, modeToolchain } from "./modes"
18
- import { ExitError, parseArgs, parseWorkflowArgs, printWorkflowUsage, validateModifierFlags } from "./parseArgs"
19
- import { deployWorkflowOverrides } from "./workflowDeploy"
18
+ import { ExitError, parseArgs, validateModifierFlags } from "./parseArgs"
20
19
 
21
20
  export type ModifierFlag =
22
21
  | "--claude-model"
@@ -127,18 +126,6 @@ function engineSync(ctx: Ctx, args: ReadonlyArray<string>): number {
127
126
  return 0
128
127
  }
129
128
 
130
- function engineWorkflow(ctx: Ctx, args: ReadonlyArray<string>): number {
131
- try {
132
- const overrides = parseWorkflowArgs(ctx, args)
133
- deployWorkflowOverrides(ctx, overrides)
134
- return 0
135
- } catch (error) {
136
- if (error instanceof ExitError) throw error
137
- printWorkflowUsage(ctx)
138
- ctx.services.logger.err(error instanceof Error ? error.message : String(error))
139
- throw new ExitError(2)
140
- }
141
- }
142
129
 
143
130
  export function runEngineNative(argv: ReadonlyArray<string>, services?: EngineServices): number {
144
131
  let ctx!: Ctx
@@ -165,8 +152,6 @@ export function runEngineNative(argv: ReadonlyArray<string>, services?: EngineSe
165
152
  return modeModel(ctx, argv.slice(1))
166
153
  case "toolchain":
167
154
  return modeToolchain(ctx, argv.slice(1))
168
- case "workflow":
169
- return engineWorkflow(ctx, argv.slice(1))
170
155
  case "sync":
171
156
  return engineSync(ctx, argv.slice(1))
172
157
  default:
@@ -16,11 +16,6 @@ import {
16
16
  isEffortModifierValue
17
17
  } from "../efforts"
18
18
  import { printModels, validateClaudeModel, validateCodexModel } from "./models"
19
- import {
20
- buildWorkflowRecord,
21
- workflowCatalog,
22
- type WorkflowOverrides
23
- } from "../workflowModels"
24
19
 
25
20
  export class ExitError extends Error {
26
21
  constructor(readonly code: number) {
@@ -268,64 +263,6 @@ function printCatalog(ctx: Ctx, catalog: string): void {
268
263
  for (const line of catalog.split("\n")) ctx.services.logger.echo(line)
269
264
  }
270
265
 
271
- const WORKFLOW_FLAGS = {
272
- "--model-orchestrator": "orchestrator",
273
- "--model-reviewer": "reviewer",
274
- "--model-implementer": "implementer",
275
- "--review-min-score": "minimumScore",
276
- "--review-max-rounds": "maxRounds"
277
- } as const satisfies Readonly<Record<string, keyof WorkflowOverrides>>
278
-
279
- function workflowUsage(ctx: Ctx): void {
280
- printCatalog(ctx, workflowCatalog())
281
- ctx.services.logger.echo("")
282
- ctx.services.logger.echo("Workflow override flags:")
283
- ctx.services.logger.echo(" --model-orchestrator=<profile:name|tool:model@effort[+fast]>")
284
- ctx.services.logger.echo(" --model-reviewer=<profile:name|tool:model@effort[+fast]>")
285
- ctx.services.logger.echo(" --model-implementer=<profile:name|tool:model@effort[+fast]>")
286
- ctx.services.logger.echo(" --review-min-score=<0..100>")
287
- ctx.services.logger.echo(" --review-max-rounds=<1..10>")
288
- }
289
-
290
- export function parseWorkflowArgs(ctx: Ctx, args: ReadonlyArray<string>): WorkflowOverrides {
291
- const overrides: Partial<Record<keyof WorkflowOverrides, string>> = {}
292
- for (let index = 0; index < args.length; index += 1) {
293
- const arg = args[index] ?? ""
294
- if (arg === "-h" || arg === "--help") {
295
- workflowUsage(ctx)
296
- throw new ExitError(0)
297
- }
298
-
299
- const equals = arg.indexOf("=")
300
- const flag = equals === -1 ? arg : arg.slice(0, equals)
301
- const key = WORKFLOW_FLAGS[flag as keyof typeof WORKFLOW_FLAGS]
302
- if (key === undefined) throw new Error(`Unknown workflow arg: ${arg}`)
303
-
304
- let value: string
305
- if (equals !== -1) {
306
- value = arg.slice(equals + 1)
307
- } else {
308
- const next = args[index + 1]
309
- if (next === undefined || next.startsWith("--")) {
310
- throw new Error(`${flag} requires a value: ${flag}=<value>`)
311
- }
312
- value = next
313
- index += 1
314
- }
315
- if (value === "") throw new Error(`${flag} requires a value: ${flag}=<value>`)
316
- overrides[key] = value
317
- }
318
-
319
- if (Object.keys(overrides).length === 0) {
320
- throw new Error("At least one workflow override flag is required")
321
- }
322
- buildWorkflowRecord(overrides)
323
- return overrides
324
- }
325
-
326
- export function printWorkflowUsage(ctx: Ctx): void {
327
- workflowUsage(ctx)
328
- }
329
266
 
330
267
  export function validateModifierFlags(ctx: Ctx): void {
331
268
  const { err, warn } = ctx.services.logger