@iowarp/clio-coder 0.3.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/CHANGELOG.md +407 -0
- package/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +224 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +798 -0
- package/SECURITY.md +72 -0
- package/assets/clio-coder-logo-128.webp +0 -0
- package/damage-control-rules.yaml +419 -0
- package/dist/acp-UMLFVA3F.js +92 -0
- package/dist/agents-Q4MYPMUW.js +91 -0
- package/dist/auth-O6HYIJ6J.js +521 -0
- package/dist/chunk-262G75JS.js +35 -0
- package/dist/chunk-26BZQOAD.js +1281 -0
- package/dist/chunk-2J63S4SF.js +508 -0
- package/dist/chunk-3DANZDGR.js +717 -0
- package/dist/chunk-4UQA7NCT.js +29 -0
- package/dist/chunk-527KG6XR.js +497 -0
- package/dist/chunk-5LDRNKX2.js +1063 -0
- package/dist/chunk-5N2FG33Q.js +25 -0
- package/dist/chunk-67MTHP2E.js +135 -0
- package/dist/chunk-6CWDTGUC.js +20 -0
- package/dist/chunk-7BHLZB3A.js +2115 -0
- package/dist/chunk-7RBKDI66.js +348 -0
- package/dist/chunk-AMFR5YA3.js +541 -0
- package/dist/chunk-BBUH4VAA.js +1224 -0
- package/dist/chunk-BYEU76JP.js +899 -0
- package/dist/chunk-CLJ5HLUD.js +458 -0
- package/dist/chunk-D5YD55AR.js +116 -0
- package/dist/chunk-DXQNI4PC.js +61 -0
- package/dist/chunk-E3NYWENM.js +1004 -0
- package/dist/chunk-GNGDQYDU.js +34688 -0
- package/dist/chunk-GOTUR54M.js +9 -0
- package/dist/chunk-HBU5MTAM.js +41 -0
- package/dist/chunk-HMYNFFY4.js +28 -0
- package/dist/chunk-JPOWPFCU.js +1010 -0
- package/dist/chunk-JWHCJDCI.js +1215 -0
- package/dist/chunk-KBR4MZZR.js +41 -0
- package/dist/chunk-KKKPTZLM.js +93 -0
- package/dist/chunk-ME6DNWIU.js +66 -0
- package/dist/chunk-NI4DEJMC.js +88 -0
- package/dist/chunk-O4EJEDHO.js +659 -0
- package/dist/chunk-PIDUD6M2.js +31 -0
- package/dist/chunk-PS4PFJQP.js +29459 -0
- package/dist/chunk-QV47YRF4.js +48 -0
- package/dist/chunk-RQDWMVRB.js +279 -0
- package/dist/chunk-TFSSEXL6.js +136 -0
- package/dist/chunk-TKHQ4DGZ.js +8290 -0
- package/dist/chunk-TPOCL34A.js +2876 -0
- package/dist/chunk-UGYAX5YI.js +565 -0
- package/dist/chunk-UHTSULZS.js +461 -0
- package/dist/chunk-UU3R62TT.js +128 -0
- package/dist/chunk-UWIJNAOB.js +3906 -0
- package/dist/chunk-VOO7NYPP.js +914 -0
- package/dist/chunk-VPAWTYLY.js +117 -0
- package/dist/chunk-WD6AJM35.js +1216 -0
- package/dist/chunk-X3BR7HWV.js +115 -0
- package/dist/chunk-X3NE4WVW.js +120 -0
- package/dist/chunk-XNISANGE.js +1395 -0
- package/dist/chunk-XV4ZJ6ZM.js +3177 -0
- package/dist/cli/index.js +236 -0
- package/dist/clio-KIQ5SNDS.js +53 -0
- package/dist/components-JVHMUBEB.js +653 -0
- package/dist/config-ZFCDBMDC.js +372 -0
- package/dist/configure-G4E3A2PG.js +27 -0
- package/dist/context-CDXTP2MP.js +293 -0
- package/dist/context-E3KIFVXI.js +185 -0
- package/dist/context-clear-3F4PLXOS.js +102 -0
- package/dist/context-index-Q7YSYTR3.js +106 -0
- package/dist/docs-YIETIWZI.js +280 -0
- package/dist/doctor-M5HJJZOL.js +61 -0
- package/dist/domains/agents/builtins/architect.md +33 -0
- package/dist/domains/agents/builtins/coder.md +31 -0
- package/dist/domains/agents/builtins/context-bootstrap.md +38 -0
- package/dist/domains/agents/builtins/debugger.md +30 -0
- package/dist/domains/agents/builtins/documenter.md +31 -0
- package/dist/domains/agents/builtins/git-master.md +30 -0
- package/dist/domains/agents/builtins/provenance.md +30 -0
- package/dist/domains/agents/builtins/researcher.md +71 -0
- package/dist/domains/agents/builtins/scout.md +42 -0
- package/dist/domains/agents/builtins/tester.md +31 -0
- package/dist/domains/agents/builtins/verifier.md +30 -0
- package/dist/domains/agents/builtins/wiki-writer.md +41 -0
- package/dist/eval-B3KZZESM.js +2674 -0
- package/dist/evidence-V67CHM35.js +233 -0
- package/dist/evolve-YDZSUQYA.js +518 -0
- package/dist/extensions-SRG7XCAH.js +207 -0
- package/dist/fleet-CA2CRTVG.js +760 -0
- package/dist/fleet-preflight-CLIAX7YR.js +21 -0
- package/dist/init-2OZDJE2D.js +227 -0
- package/dist/memory-3PIQQAKX.js +207 -0
- package/dist/models-DY35XI7Y.js +237 -0
- package/dist/paths-5OMXW7Z4.js +57 -0
- package/dist/preload-KZVHET2B.js +11 -0
- package/dist/reset-PIFYNOS3.js +216 -0
- package/dist/run-3VSPP24F.js +735 -0
- package/dist/share-D36RQCXM.js +241 -0
- package/dist/skills-F2MRLELY.js +445 -0
- package/dist/skills-eval-E2ZTW4PL.js +932 -0
- package/dist/targets-DZMEZAH4.js +977 -0
- package/dist/trace-7NYCUI2J.js +250 -0
- package/dist/uninstall-AD3JWHBB.js +322 -0
- package/dist/upgrade-WYYBKGDY.js +301 -0
- package/dist/usage-ULIDAGFF.js +755 -0
- package/dist/version-ROZ6CZKH.js +16 -0
- package/dist/wiki-generate-PKFIX6OB.js +377 -0
- package/dist/worker/entry.js +1739 -0
- package/docs/README.md +93 -0
- package/docs/acp.md +120 -0
- package/docs/alcf-provider.md +72 -0
- package/docs/architecture.md +172 -0
- package/docs/artifact-versions.md +54 -0
- package/docs/built-in-agents.md +265 -0
- package/docs/capacity-and-scheduling.md +97 -0
- package/docs/commands-and-modes.md +554 -0
- package/docs/config-knobs-audit.md +115 -0
- package/docs/configuration-and-targets.md +812 -0
- package/docs/context-engine.md +236 -0
- package/docs/dispatch-architecture-rationale.md +126 -0
- package/docs/documentation-coverage.md +46 -0
- package/docs/documentation-guide.md +166 -0
- package/docs/environment-variables.md +105 -0
- package/docs/eval-runner.md +205 -0
- package/docs/evals-internal.md +298 -0
- package/docs/evidence-and-memory.md +243 -0
- package/docs/evolution.md +143 -0
- package/docs/exit-codes-and-output.md +74 -0
- package/docs/extensions-and-sharing.md +306 -0
- package/docs/fleet-demo-runbook.md +179 -0
- package/docs/fleet-dispatch.md +591 -0
- package/docs/glossary.md +75 -0
- package/docs/html/agents_blueprint.html +936 -0
- package/docs/html/alcf_blueprint.html +324 -0
- package/docs/html/architecture_blueprint.html +850 -0
- package/docs/html/commands_blueprint.html +794 -0
- package/docs/html/config_knobs_audit_blueprint.html +178 -0
- package/docs/html/configuration_blueprint.html +1080 -0
- package/docs/html/context_blueprint.html +603 -0
- package/docs/html/documentation_blueprint.html +832 -0
- package/docs/html/environment_blueprint.html +404 -0
- package/docs/html/eval_blueprint.html +743 -0
- package/docs/html/evals_internal_blueprint.html +190 -0
- package/docs/html/evolution_blueprint.html +674 -0
- package/docs/html/extensions_blueprint.html +2065 -0
- package/docs/html/fleet_dispatch_blueprint.html +286 -0
- package/docs/html/index.html +919 -0
- package/docs/html/lifecycle_blueprint.html +723 -0
- package/docs/html/memory_blueprint.html +699 -0
- package/docs/html/middleware_blueprint.html +664 -0
- package/docs/html/models_blueprint.html +2366 -0
- package/docs/html/observability_blueprint.html +683 -0
- package/docs/html/provider_adapter_blueprint.html +245 -0
- package/docs/html/safety_blueprint.html +1386 -0
- package/docs/html/shared.css +571 -0
- package/docs/html/shared.js +143 -0
- package/docs/html/skills_blueprint.html +671 -0
- package/docs/html/soak_blueprint.html +182 -0
- package/docs/html/tool_usage_blueprint.html +350 -0
- package/docs/html/tools_blueprint.html +2249 -0
- package/docs/html/trace_blueprint.html +235 -0
- package/docs/html/tui_design_blueprint.html +314 -0
- package/docs/html/validation_blueprint.html +961 -0
- package/docs/html/worker_dispatch_blueprint.html +231 -0
- package/docs/installation-and-lifecycle.md +308 -0
- package/docs/middleware-and-components.md +148 -0
- package/docs/model-catalog.md +189 -0
- package/docs/observability.md +233 -0
- package/docs/proactive-memory.md +452 -0
- package/docs/prompt-envelope-and-tools.md +142 -0
- package/docs/provider-adapter-cookbook.md +148 -0
- package/docs/release-cut-checklist.md +138 -0
- package/docs/safety-model.md +357 -0
- package/docs/scientific-validation.md +105 -0
- package/docs/session-lifecycle.md +156 -0
- package/docs/skills-marketplace.md +46 -0
- package/docs/tool-usage.md +527 -0
- package/docs/trace-store.md +132 -0
- package/docs/troubleshooting.md +33 -0
- package/docs/tui-design.md +239 -0
- package/docs/worker-dispatch-mechanics.md +242 -0
- package/package.json +132 -0
- package/skills/README.md +408 -0
- package/skills/git/commit-crafting/SKILL.md +79 -0
- package/skills/git/commit-crafting/evals.md +92 -0
- package/skills/git/create-pr/SKILL.md +116 -0
- package/skills/git/create-pr/evals.md +114 -0
- package/skills/git/investigate-issue/SKILL.md +139 -0
- package/skills/git/investigate-issue/evals.md +94 -0
- package/skills/git/resolve-merge-conflicts/SKILL.md +96 -0
- package/skills/git/resolve-merge-conflicts/evals.md +58 -0
- package/skills/git/review-changes/SKILL.md +103 -0
- package/skills/git/review-changes/evals.md +85 -0
- package/skills/git/worktree-create/SKILL.md +92 -0
- package/skills/git/worktree-create/evals.md +97 -0
- package/skills/git/worktree-create/references/worktree-setup.md +66 -0
- package/skills/git/worktree-merge/SKILL.md +95 -0
- package/skills/git/worktree-merge/evals.md +114 -0
- package/skills/skill-marketplace.json +261 -0
- package/skills/workflow/cut-it/SKILL.md +86 -0
- package/skills/workflow/cut-it/evals.md +42 -0
- package/src/domains/agents/builtins/architect.md +33 -0
- package/src/domains/agents/builtins/coder.md +31 -0
- package/src/domains/agents/builtins/context-bootstrap.md +38 -0
- package/src/domains/agents/builtins/debugger.md +30 -0
- package/src/domains/agents/builtins/documenter.md +31 -0
- package/src/domains/agents/builtins/git-master.md +30 -0
- package/src/domains/agents/builtins/provenance.md +30 -0
- package/src/domains/agents/builtins/researcher.md +71 -0
- package/src/domains/agents/builtins/scout.md +42 -0
- package/src/domains/agents/builtins/tester.md +31 -0
- package/src/domains/agents/builtins/verifier.md +30 -0
- package/src/domains/agents/builtins/wiki-writer.md +41 -0
- package/src/domains/agents/fleets/build-review.md +34 -0
- package/src/domains/agents/fleets/build-test.md +35 -0
- package/src/domains/agents/fleets/sdlc.md +86 -0
- package/src/domains/prompts/fragments/identity/clio-worker.md +11 -0
- package/src/domains/prompts/fragments/identity/clio.md +26 -0
- package/src/domains/prompts/fragments/operating/contract.md +64 -0
- package/src/domains/prompts/fragments/safety/auto-edit.md +14 -0
- package/src/domains/prompts/fragments/safety/full-auto.md +14 -0
- package/src/domains/prompts/fragments/safety/read-only.md +13 -0
- package/src/domains/prompts/fragments/safety/suggest.md +13 -0
- package/src/domains/prompts/fragments/wiki/page.md +75 -0
- package/src/domains/prompts/fragments/wiki/plan.md +48 -0
- package/src/domains/providers/models/cloud-models/alcf.yaml +40 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +993 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# Commands and Modes
|
|
2
|
+
|
|
3
|
+
> [!TIP]
|
|
4
|
+
> **Interactive Spec Available:** An interactive dashboard is located at [docs/html/commands_blueprint.html](html/commands_blueprint.html) (Version: 0.3.0).
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Clio Coder is a terminal-first alpha harness. This page keeps the command
|
|
8
|
+
reference, interaction modes, dispatch surface, verification lanes, and common
|
|
9
|
+
operator guidance out of the README so the release entry point stays short.
|
|
10
|
+
|
|
11
|
+
Source of truth: `src/cli/index.ts`, `src/interactive/slash-commands.ts`,
|
|
12
|
+
`src/domains/dispatch/**`, `src/tools/registry.ts`, and the current test suite.
|
|
13
|
+
For process exit codes, stdout deliverable guarantees, and machine-readable JSON streaming formats, see [exit-codes-and-output.md](exit-codes-and-output.md).
|
|
14
|
+
|
|
15
|
+
## CLI Commands
|
|
16
|
+
|
|
17
|
+
| Command | Purpose |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `clio-coder` | Launch the interactive terminal UI. |
|
|
20
|
+
| `clio-coder run "<task>" [flags]` | Run one headless main-agent turn. Use `--json` for JSONL events. |
|
|
21
|
+
| `clio-coder run "<task>" --agent <id> [flags]` | Dispatch one explicit fleet agent non-interactively and write a receipt. |
|
|
22
|
+
| `clio-coder acp` | Serve Clio as an ACP v1 agent over stdio for ACP frontends. |
|
|
23
|
+
| `clio-coder --version` | Print the installed version. |
|
|
24
|
+
| `clio-coder --api-key <key>` | Override the active target API key for one invocation. |
|
|
25
|
+
| `clio-coder --no-context-files` / `clio-coder -nc` | Skip `CLIO-CODER.md` project-context injection for one invocation. |
|
|
26
|
+
| `clio-coder --no-skills` | Disable skill discovery for one invocation while still honoring explicit `--skill` paths. |
|
|
27
|
+
| `clio-coder --skill <path>` | Load one explicit skill file or directory for one invocation (repeatable). |
|
|
28
|
+
| `clio-coder configure` | Run the configuration wizard. |
|
|
29
|
+
| `clio-coder configure --list` | List user-facing runtime ids. |
|
|
30
|
+
| `clio-coder configure --list --all` | List every registered runtime, including aliases. |
|
|
31
|
+
| `clio-coder targets [--json] [--probe] [--target <id>]` | List configured targets, health, auth, runtime, model, and capabilities. |
|
|
32
|
+
| `clio-coder targets add` | Add a target interactively or through configure flags. |
|
|
33
|
+
| `clio-coder targets use <id> [--model <id>] [--orchestrator-model <id>] [--background-model <id>] [--fleet-target <id>] [--fleet-model <id>]` | Point the orchestrator at one target. Without `--fleet-target` the fleet default follows it; with `--fleet-target` the fleet runs on a different node. `--worker-target` and `--worker-model` are accepted aliases from before the worker/fleet rename. |
|
|
34
|
+
| `clio-coder targets profile list\|set\|remove\|rename\|bind\|unbind\|bindings` | Manage named fleet profiles and agent bindings. |
|
|
35
|
+
| `clio-coder targets convert <id> --runtime <runtimeId>` | Convert older local target definitions to a runtime-specific target. |
|
|
36
|
+
| `clio-coder targets remove <id>` | Remove a target. |
|
|
37
|
+
| `clio-coder targets rename <old> <new>` | Rename a target id. |
|
|
38
|
+
| `clio-coder models [search] [--target <id>] [--json] [--offline]` | List models. Live probing is the default; `--offline` skips it. |
|
|
39
|
+
| `clio-coder paths [--json]` | Print the resolved config, data, state, and cache directories. |
|
|
40
|
+
| `clio-coder auth list` | Show known auth entries. |
|
|
41
|
+
| `clio-coder auth status [target-or-runtime]` | Inspect auth state. |
|
|
42
|
+
| `clio-coder auth login [target-or-runtime] [--api-key <value>]` | Add credentials through the supported flow. |
|
|
43
|
+
| `clio-coder auth logout [target-or-runtime]` | Remove stored credentials. |
|
|
44
|
+
| `clio-coder doctor [--fix] [--json]` | Diagnose state; with `--fix`, create missing structure and templates, repair credential permissions, and refresh install metadata. Settings remain strict and are not migrated. |
|
|
45
|
+
| `clio-coder reset [--state\|--data\|--cache\|--auth\|--config\|--all] [--dry-run] [--force]` | Reset selected Clio Coder state. `--state` is the default level. |
|
|
46
|
+
| `clio-coder uninstall [--dry-run] [--remove-binary] [--force]` | Remove Clio Coder state and print uninstall guidance. |
|
|
47
|
+
| `clio-coder upgrade [--dry-run] [--channel=<latest\|beta\|dev>] [--skip-migrations]` | Refresh state metadata, apply migrations, and update npm installs when applicable. |
|
|
48
|
+
| `clio-coder agents [--json] [--all]` | List discovered agent specs. |
|
|
49
|
+
| `clio-coder fleet list\|run\|status` | List fleet contracts, run a contract, or show dispatch state. |
|
|
50
|
+
| `clio-coder dev components [list] [--json]` | List behavior-affecting harness components. |
|
|
51
|
+
| `clio-coder dev components snapshot --out <path>` | Write a component snapshot JSON file. |
|
|
52
|
+
| `clio-coder dev components diff --from <a> --to <b> [--json]` | Compare component snapshots. |
|
|
53
|
+
| `clio-coder evidence build\|inspect\|list` | Build and inspect deterministic evidence artifacts. |
|
|
54
|
+
| `clio-coder eval validate\|run\|report\|compare\|gate` | Validate, run, report, compare, and gate local evaluation suites (Suite v2). |
|
|
55
|
+
| `clio-coder memory list\|propose\|approve\|reject\|prune` | Manage scoped, evidence-linked memory records. |
|
|
56
|
+
| `clio-coder trace runs [--db PATH] [--limit N]` | List runs recorded in the durable trace mirror beside the ledger. |
|
|
57
|
+
| `clio-coder trace phases <runId> [--db PATH]` | Show one run's recorded phases. |
|
|
58
|
+
| `clio-coder trace tail <runId> [--follow] [--db PATH]` | Tail one run's recorded events; `--follow` streams as they land. |
|
|
59
|
+
| `clio-coder trace procs <runId> [--db PATH]` | Show the processes one run spawned. |
|
|
60
|
+
| `clio-coder trace sql <SELECT query> [--db PATH]` | Run one read-only SELECT against the mirror. Only SELECT is accepted. |
|
|
61
|
+
| `clio-coder trace ui [--db PATH] [--port N]` | Serve the localhost-only waterfall viewer. The viewer is not part of the published package. |
|
|
62
|
+
| `clio-coder dev evolve manifest init\|validate\|summarize` | Create and check typed harness change manifests. |
|
|
63
|
+
| `clio-coder extensions list\|discover\|install\|enable\|disable\|remove` | Manage installed extension packages and resource roots. |
|
|
64
|
+
| `clio-coder skills list\|search\|inspect\|validate\|install\|update\|sync\|eval` | Manage discovered skills, Clio-native skills, and local marketplace installs. |
|
|
65
|
+
| `clio-coder docs [topic] [--no-open]` | Serve bundled HTML docs on 127.0.0.1. |
|
|
66
|
+
| `clio-coder dev share export --out <path> [--project\|--user\|--both] [--context] [--prompts] [--skills] [--settings] [--extensions]` | Export project context, prompts, skills, settings fragments, and extension bundles. |
|
|
67
|
+
| `clio-coder dev share import <path> [--dry-run] [--force] [--project\|--user] [--json]` | Import a share archive with conflict reporting. |
|
|
68
|
+
| `clio-coder dev share inspect <path> [--json]` | Inspect a share archive without importing it. |
|
|
69
|
+
| `clio-coder context` | Show project context status, preload class, codewiki freshness, and the codewiki digest when present. |
|
|
70
|
+
| `clio-coder context init [--preview] [--heuristic] [--yes] [--json] [--adopt] [--propose\|--apply\|--rewrite] [--target <id> [--model <id>] [--thinking <level>]]` | Explore the repo and bootstrap or update project context: `CLIO-CODER.md`, `.clio-coder/codewiki.json`, and `.clio-coder/state.json`. |
|
|
71
|
+
| `clio-coder context refresh [--wiki]` | Rebuild the codewiki and state without touching `CLIO-CODER.md`; with `--wiki`, update an existing Markdown wiki. |
|
|
72
|
+
| `clio-coder context wiki [--update\|--status]` | Generate, update, or inspect the agent-authored Markdown wiki under `.clio-coder/wiki/`. |
|
|
73
|
+
| `clio-coder context reset [--all] [--yes]` | Clear accumulated project context artifacts; `--all` also removes `CLIO-CODER.md`. `--yes` (or `-y`) answers every confirmation and is required when stdin is not a terminal. |
|
|
74
|
+
| `clio-coder context index [--json]` | Build the structural codewiki index without model calls; writes `.clio-coder/codewiki.json` and `.clio-coder/state.json` and prints coverage plus a structural hash. |
|
|
75
|
+
|
|
76
|
+
## Headless Run Flags
|
|
77
|
+
|
|
78
|
+
| Flag | Meaning |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| `--target <id>` | One-run main-agent or dispatch target override. |
|
|
81
|
+
| `--model <wireId>` | One-run model override. |
|
|
82
|
+
| `--thinking <level>` | One-run thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`. |
|
|
83
|
+
| `--autonomy <level>` | One-run autonomy override: `read-only`, `suggest`, `auto-edit`, or `full-auto`; it does not change saved settings. |
|
|
84
|
+
| `--temperature <n>` / `--top-p <n>` / `--top-k <n>` / `--min-p <n>` | One-run sampler overrides when the selected runtime supports them. |
|
|
85
|
+
| `--presence-penalty <n>` / `--frequency-penalty <n>` / `--repeat-penalty <n>` | One-run penalty overrides when the selected runtime supports them. |
|
|
86
|
+
| `--max-context-tokens <n>` | One-run context-window override for supported local runtimes. |
|
|
87
|
+
| `--kv-cache-mode <mode>` | One-run KV-cache override for supported local runtimes: `f16`, `f32`, `none`, `false`, `q8_0`, `q4_0`, `q4_1`, `iq4_nl`, `q5_0`, or `q5_1`. |
|
|
88
|
+
| `--json` | Stream JSONL events for main-agent runs; dispatch streams events and receipt JSON. |
|
|
89
|
+
| `--json-events <mode>` | Main-agent JSON stream mode: `full` or `terminal`; implies `--json`. |
|
|
90
|
+
| `--session <id>` | Append this turn to an existing session identified by `<id>`. |
|
|
91
|
+
| `--continue` | Append this turn to the most recent session for the current working directory. |
|
|
92
|
+
| `--agent <recipe-id>` | Dispatch a fleet agent instead of the main agent. Unknown ids fail fast. |
|
|
93
|
+
| `--skill <path>` | Load one explicit skill file or skill directory for this run. Repeatable. |
|
|
94
|
+
| `--no-skills` | Disable skill discovery for this run while still honoring explicit `--skill` paths. |
|
|
95
|
+
| `--agent-profile <name>` | Use a named fleet profile for dispatch. |
|
|
96
|
+
| `--agent-runtime <id>` | Pick the first fleet profile whose target uses this runtime. |
|
|
97
|
+
| `--tool-profile <name>` | Restrict dispatched-agent tools: `minimal-local`, `science-local`, or `full-agent`. |
|
|
98
|
+
| `--require <capability>` | Require a target capability for dispatch. Repeatable. |
|
|
99
|
+
| `--steer-channel <path>` | Read live steering lines from a FIFO or an appended regular file to steer the active run. |
|
|
100
|
+
|
|
101
|
+
### Headless Session Continuity
|
|
102
|
+
|
|
103
|
+
A headless turn (`clio-coder run`) starts a fresh session unless `--session <id>` or `--continue` specifies a session to append to.
|
|
104
|
+
- `--session <id>` appends the turn to the session with id `<id>`.
|
|
105
|
+
- `--continue` appends the turn to the most recent session recorded for the current working directory.
|
|
106
|
+
- `--session` and `--continue` are mutually exclusive. Specifying both causes the invocation to fail with exit code 2 before execution.
|
|
107
|
+
- Session continuity options apply strictly to main-agent execution. They are non-applicable to `--agent` fleet dispatches because dispatched agents execute in isolated worker processes with independent transcripts; specifying session flags alongside `--agent` exits with code 2.
|
|
108
|
+
- A named session that cannot be resumed (such as an unknown session ID or unreadable history) fails the run with exit code 2 before any model call is initiated.
|
|
109
|
+
- The session ID is discoverable via the `session` event when running under `--json` mode and on stderr via the `clio-coder run: session <id>` line in text mode. Standard output remains reserved for the assistant answer alone.
|
|
110
|
+
|
|
111
|
+
### JSON Event Streaming and Wire Projection Promise
|
|
112
|
+
|
|
113
|
+
When `--json` or `--json-events <mode>` (`full` | `terminal`) is passed, `clio-coder run` streams structured JSONL events.
|
|
114
|
+
- **Wire Projection Promise:** Each piece of turn content crosses the wire exactly once.
|
|
115
|
+
- Intermediate `message_update` events are dropped to prevent quadratic snapshot duplication over stdout.
|
|
116
|
+
- `text_delta` and `thinking_delta` events stream incremental text deltas rather than accumulating message snapshots.
|
|
117
|
+
- `agent_end` events carry segment summary metrics (`messageCount` and a `usage` object containing `input`, `output`, `cacheRead`, `cacheWrite`, `reasoning`, `totalTokens`, `costUsd`, `apiCalls`, and `measured`) instead of duplicating the full message transcript.
|
|
118
|
+
- `turn_end` preserves the final assistant message while dropping `toolResults` array objects, each of which already crossed the wire in an preceding `tool_execution_end` event.
|
|
119
|
+
|
|
120
|
+
Example:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
clio-coder run \
|
|
124
|
+
"Find the test command and summarize the project structure." \
|
|
125
|
+
--target local-lmstudio \
|
|
126
|
+
--model your-model-id
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Interactive Slash Commands
|
|
130
|
+
|
|
131
|
+
Slash commands are available inside the TUI. Type `/` at the start of the prompt to open autocomplete.
|
|
132
|
+
|
|
133
|
+
The registry table below lists the available interactive slash commands. The "Aliases" column shows alternative command triggers that invoke the same command. The "Usage" column details the expected arguments and options, with brackets `[]` indicating optional arguments and angle brackets `<>` indicating required arguments.
|
|
134
|
+
|
|
135
|
+
| Command | Aliases | Usage | Purpose |
|
|
136
|
+
| --- | --- | --- | --- |
|
|
137
|
+
| `/quit` | `/exit` | `/quit` | Exit Clio Coder |
|
|
138
|
+
| `/help` | - | `/help [query]` | Open the interactive help center showing commands and keys |
|
|
139
|
+
| `/skill` | `/skill:`, `/skills:` | `/skill [name] [task]` | Open the Skills Hub or invoke a skill |
|
|
140
|
+
| `/prompts` | - | `/prompts` | List prompt templates |
|
|
141
|
+
| `/extensions` | - | `/extensions` | List installed extensions |
|
|
142
|
+
| `/share` | - | `/share export <path> \| /share import [--dry-run] [--force] <path>` | Export or import Clio archives |
|
|
143
|
+
| `/run` | - | `/run [--agent-profile <profile>] [--runtime <runtimeId>] [--target <id>] [--model <id>] [--thinking <level>] [--tool-profile <minimal-local\|science-local\|full-agent>] [--require <cap>] <agent> <task>` | Run a fleet agent |
|
|
144
|
+
| `/delegate` | - | `/delegate <agent-id> <task>` | Run an ACP delegation agent |
|
|
145
|
+
| `/agents` | - | `/agents` | List Clio agents and ACP delegation agents |
|
|
146
|
+
| `/targets` | - | `/targets` | Show target hub for health, auth, models, and actions |
|
|
147
|
+
| `/cost` | - | `/cost` | Show session token and cost totals |
|
|
148
|
+
| `/context` | `/ctx`, `/compact` | `/context compact [instructions] \| /context init \| /context refresh \| /context reset` | Context hub: window overlay plus compact, init, refresh, and reset |
|
|
149
|
+
| `/fleet` | - | `/fleet` | Show in-process dispatch running/retry status |
|
|
150
|
+
| `/tasks` | - | `/tasks` | Show the session task board the agent tracks with the tasks tool |
|
|
151
|
+
| `/memory` | - | `/memory seed` | Inspect task memory or seed it from the newest handoff |
|
|
152
|
+
| `/view` | - | `/view [filter] \| /view verify <runId>` | Browse session artifacts and verify receipts |
|
|
153
|
+
| `/thinking` | - | `/thinking [level]` | Open thinking-level selector, or set a level directly |
|
|
154
|
+
| `/output` | - | `/output <verbosity>` | Set transcript detail: minimal, default, or verbose |
|
|
155
|
+
| `/model` | `/models` | `/model [pattern]` | Open model selector or set a model |
|
|
156
|
+
| `/scoped-models` | - | `/scoped-models` | Edit the Alt+J / Alt+K model cycle set |
|
|
157
|
+
| `/settings` | `/config` | `/settings` | Open interactive settings |
|
|
158
|
+
| `/resume` | - | `/resume` | Resume a past session |
|
|
159
|
+
| `/new` | - | `/new` | Start a fresh session |
|
|
160
|
+
| `/tree` | - | `/tree` | Open session tree navigator |
|
|
161
|
+
| `/fork` | - | `/fork` | Fork from an assistant turn |
|
|
162
|
+
| `/export` | - | `/export [path]` | Export the session transcript to Markdown |
|
|
163
|
+
|
|
164
|
+
`/context` with no arguments opens the context-window ledger overlay. The
|
|
165
|
+
subcommands own the durable project-context noun: `compact` summarizes older
|
|
166
|
+
turns in the session window, `init` bootstraps or updates `CLIO-CODER.md` and the
|
|
167
|
+
codewiki, `refresh` re-indexes the codewiki and refreshes `.clio-coder/state.json`
|
|
168
|
+
without touching `CLIO-CODER.md`, and `reset` deletes accumulated
|
|
169
|
+
context artifacts (`.clio-coder/codewiki.json`, `.clio-coder/state.json`,
|
|
170
|
+
`.clio-coder/handoffs/`, `.clio-coder/proposals/`). Its interactive choice preserves or
|
|
171
|
+
deletes `CLIO-CODER.md`; cancellation makes no changes. Session reset stays `/new`;
|
|
172
|
+
there is deliberately no `/context clear`. The spellings `/context-init`,
|
|
173
|
+
`/context-clear`, and `/context-view` are gone and are not aliased to anything.
|
|
174
|
+
`/compact` is an alias for `/context compact` and carries the same optional
|
|
175
|
+
instructions, so `/compact drop the old turns` runs the compaction the operator
|
|
176
|
+
asked for instead of reporting that the spelling does not exist. `/exit` and
|
|
177
|
+
`/config` are aliases of `/quit` and `/settings` on the same grounds: the
|
|
178
|
+
command exists and the spelling is the one other tools in this class use.
|
|
179
|
+
`/clear` has no counterpart here, so it stays an error that names `/help`.
|
|
180
|
+
|
|
181
|
+
Only active commands run. Typing anything command-shaped that the registry does
|
|
182
|
+
not own reports `is not a command` and points at `/help`; it is never sent to the
|
|
183
|
+
model. That covers spellings removed outright, such as `/status` and `/receipts`,
|
|
184
|
+
as well as ordinary typos. It replaces the earlier behavior where an unrecognized
|
|
185
|
+
spelling reached the model as prose and was answered conversationally, which left
|
|
186
|
+
the operator believing a command had run when nothing had.
|
|
187
|
+
|
|
188
|
+
Command-shaped means one word of letters, digits, and hyphens after the slash, so
|
|
189
|
+
paths such as `/home/user/notes.md` still reach the model unchanged. One word
|
|
190
|
+
followed by prose is treated as a command, because `/compact tidy up` and `/tmp is
|
|
191
|
+
full` are indistinguishable. To send such a line as text, escape the slash:
|
|
192
|
+
`\/tmp is full` reaches the model as `/tmp is full`. The escape claims a single
|
|
193
|
+
backslash and only in front of a slash, so `\\server\share` is unchanged, and it
|
|
194
|
+
works on a real command too, so `\/help` is a question about `/help` rather than
|
|
195
|
+
the help overlay.
|
|
196
|
+
|
|
197
|
+
A rejected command stays in the input line. The error names the spelling and the
|
|
198
|
+
text is still there to correct, rather than having to be retyped.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
The `/targets` hub is the only interactive target command. Use `j`/`k` or the arrow keys to browse targets, `Enter` to expand or collapse details, `u` to use the selected target for chat, `f` to set the selected target as the fleet default, `c` to connect, `r` to probe the selected target, and `R` to probe all targets. Worker-only targets such as `claude-sdk` and `claude-code` are selected for dispatch through fleet defaults or profiles, not through the chat target action.
|
|
202
|
+
|
|
203
|
+
The `/fleet` overlay displays current running and retrying fleet state. It includes four tabs: Status, Nodes, Profiles, and Bindings; cycle with `Tab`. Status shows active runs, aggregate execution stats, and scheduled retries with backoff times. Nodes shows fleet placement health. Profiles supports creating, editing, renaming, and deleting worker profiles. Bindings supports binding or unbinding agents to profiles. Recent terminal run cards live in the `Alt+W` Fleet Runs board.
|
|
204
|
+
|
|
205
|
+
The `/tasks` overlay shows the session task board the agent maintains through
|
|
206
|
+
the `tasks` tool: every task with its status, the evidence note recorded when
|
|
207
|
+
it was completed, and the reason recorded when it was blocked or dropped. The
|
|
208
|
+
board persists in the session ledger as `taskLedger` entries, so it survives
|
|
209
|
+
`/resume` and `/fork` and can be audited from the JSONL alone.
|
|
210
|
+
|
|
211
|
+
The read-only `/memory` overlay keeps durable and session memory attributable
|
|
212
|
+
in one place. It lists approved evidence-backed lessons, then the live task
|
|
213
|
+
bank by private status, knowledge, and procedural class, including each
|
|
214
|
+
entry's injection count and the last memory-step outcome. The welcome island
|
|
215
|
+
and expanded dashboard summarize whether intervention is on, its rules or LLM
|
|
216
|
+
tier, and current bank size.
|
|
217
|
+
After `/resume`, Clio offers `/memory seed` when the newest handoff contains a
|
|
218
|
+
structured snapshot. Seeding is explicit, deduplicated, and unavailable while
|
|
219
|
+
`memory.intervention.enabled` is off.
|
|
220
|
+
|
|
221
|
+
## Keybindings
|
|
222
|
+
|
|
223
|
+
App bindings use `Alt + <key>` as the primary scheme, plus `Shift+Tab`,
|
|
224
|
+
`Ctrl+D`, and a portable `Ctrl+G` leader. Modern terminals and Linux/meta
|
|
225
|
+
setups send Alt directly. Stock macOS Terminal.app needs **Use Option as Meta
|
|
226
|
+
key** enabled in Settings > Profiles > Keyboard for native Alt; otherwise use
|
|
227
|
+
`Ctrl+G` then the Alt binding letter.
|
|
228
|
+
|
|
229
|
+
| Binding | Action |
|
|
230
|
+
| --- | --- |
|
|
231
|
+
| `Shift+Tab` | Cycle thinking level. |
|
|
232
|
+
| `Alt+T` | Open the session tree navigator. |
|
|
233
|
+
| `Alt+U` | Toggle the footer dashboard between compact and expanded layouts. |
|
|
234
|
+
| `Alt+L` | Open the model and targets selector. |
|
|
235
|
+
| `Alt+J` / `Alt+K` | Cycle through the scoped model set (when empty, displays a notice directing the operator to run `/scoped-models`). |
|
|
236
|
+
| `Alt+W` | Toggle the Fleet Runs board (task, run ID, live telemetry, retry, and terminal history). |
|
|
237
|
+
| `Alt+S` / `Ctrl+Alt+B` | Convert an active attached dispatch to a detached background batch. |
|
|
238
|
+
| `Alt+O` | Toggle the latest tool segment between collapsed and full body. |
|
|
239
|
+
| `Ctrl+Alt+O` / `Alt+Shift+O` | Toggle all tool segments between collapsed and full bodies. |
|
|
240
|
+
| `Alt+P` | Toggle live partial tool output in expanded tool bodies. |
|
|
241
|
+
| `Alt+R` | Toggle the latest thinking block between hidden marker and full body. |
|
|
242
|
+
| `Ctrl+Alt+R` / `Alt+Shift+R` | Toggle all thinking blocks between hidden markers and full bodies. |
|
|
243
|
+
| `Alt+G` | Open the current input in an external editor. |
|
|
244
|
+
| `Alt+X` | Dismiss footer notifications. |
|
|
245
|
+
| `Alt+Enter` | Queue the current input as a follow-up message. |
|
|
246
|
+
| `Alt+Up` | Restore queued follow-up messages to the editor. |
|
|
247
|
+
| `Ctrl+G`, then a letter | Portable leader fallback for Alt-letter actions. |
|
|
248
|
+
| `Ctrl+C` | With no overlay, cancel a stream, clear input, or press twice to exit. With an overlay open, close/cancel that overlay only. |
|
|
249
|
+
| `Ctrl+D` | Exit when the editor is empty; otherwise delete the next character (pi-compatible). It never exits from inside an overlay. |
|
|
250
|
+
| `Esc` | With an overlay open, stays inside it (list filters clear first, then close). With no overlay, cancel a stream/bash operation or collapse the dashboard. |
|
|
251
|
+
|
|
252
|
+
When scripting Clio inside tmux, prefer `tmux send-keys C-m` for submit/confirm keys instead of the literal `Enter` token; some tmux/terminal combinations do not deliver `Enter` reliably.
|
|
253
|
+
|
|
254
|
+
## Live Steering
|
|
255
|
+
|
|
256
|
+
During an active assistant stream, pressing `Enter` sends the current editor
|
|
257
|
+
text as steering for the active run instead of waiting for the turn to finish.
|
|
258
|
+
The input is delivered through `agent.steer` before the next model turn.
|
|
259
|
+
`Alt+Enter` keeps the after-run follow-up behavior.
|
|
260
|
+
|
|
261
|
+
For running dispatches, the editor also accepts:
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
@<agentId-or-runId-prefix> <steering text>
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Clio resolves the token to an exact agent id first, then to a run-id prefix,
|
|
268
|
+
and forwards the text to an HTTP or SDK worker's steering channel. File-looking
|
|
269
|
+
tokens such as `@package.json` are rejected so ordinary repository references
|
|
270
|
+
do not accidentally become steering requests.
|
|
271
|
+
|
|
272
|
+
The `Alt+W` Fleet Runs board makes this control path discoverable: use
|
|
273
|
+
Up/Down or `j`/`k` to select a run, `s` to close the board and prefill its
|
|
274
|
+
exact `@<runId> ` steering prefix, and `x` to cancel a live worker or queued
|
|
275
|
+
retry. A steer first reports `queued`; only the worker's
|
|
276
|
+
`clio_steer_received` acknowledgement reports `received`. Single-shot
|
|
277
|
+
subprocess runtimes and ACP delegation do not expose a live steering channel
|
|
278
|
+
and are labeled accordingly.
|
|
279
|
+
|
|
280
|
+
## Operating Posture and Autonomy
|
|
281
|
+
|
|
282
|
+
Clio Coder operates with a single, unified tool surface. There are no separate tool-visibility modes; what varies is the `autonomy` level (`read-only` | `suggest` | `auto-edit` | `full-auto`), edited in the `/settings` Autonomy & Safety section.
|
|
283
|
+
|
|
284
|
+
Tool and command execution is governed by:
|
|
285
|
+
- **Target Capabilities:** What the selected model target actually supports (such as tools, streaming, and vision).
|
|
286
|
+
- **Safety Net:** Granular rule packs loaded from `damage-control-rules.yaml`, project policies, and protected artifact paths; always on, identical at every autonomy level.
|
|
287
|
+
- **Autonomy Mapping:** Once the net passes a call, the level decides whether it runs, asks, or is denied. See [safety-model.md](safety-model.md) for the full matrix.
|
|
288
|
+
|
|
289
|
+
When an action asks for confirmation, whether from a safety-net rail or from the autonomy level, the call parks and the TUI displays a queued permission dialog whose `Asked by:` line names the asking axis. The operator can approve or deny that single action without changing the level.
|
|
290
|
+
|
|
291
|
+
Notice vocabulary, one prefix per mechanism: `[safety-net]` for level-independent blocks, `[approval]` for parked calls, `[autonomy]` for read-only denials, and `[middleware]` for hook diagnostics.
|
|
292
|
+
|
|
293
|
+
## Dispatch and Built-In Agents
|
|
294
|
+
|
|
295
|
+
Fleet dispatch runs focused agent recipes through configured targets. The final agent fleet includes:
|
|
296
|
+
|
|
297
|
+
| Agent | Category / Audience | Use it for |
|
|
298
|
+
| --- | --- | --- |
|
|
299
|
+
| `architect` | `plan` / `base` | Mapping boundaries, contracts, and migration slices. |
|
|
300
|
+
| `coder` | `implement` / `base` | Bounded implementation, repairs, and behavior-preserving refactors. |
|
|
301
|
+
| `debugger` | `quality` / `base` | Explaining a failing run, test failure, or session evidence without edits. |
|
|
302
|
+
| `documenter` | `implement` / `base` | Updating developer-facing docs, examples, and operational runbooks. |
|
|
303
|
+
| `git-master` | `implement` / `base` | Bounded git repository operations, history, commits, worktrees, and PR preparation. |
|
|
304
|
+
| `tester` | `quality` / `base` | Focused tests for regressions and verification gaps. |
|
|
305
|
+
| `verifier` | `quality` / `base` | Independent test, lint, build, and quality gate reports. |
|
|
306
|
+
| `wiki-writer` | `implement` / `base` | Planning one repository wiki or researching and writing one wiki page. |
|
|
307
|
+
| `scout` | `explore` / `shadow` | Read-only repository exploration, symbol mapping, and context assembly. |
|
|
308
|
+
| `researcher` | `research` / `shadow` | Documentation, literature, and web-grounded investigation. |
|
|
309
|
+
| `provenance` | `operations` / `shadow` | Reading evidence files, receipts, diffs, and telemetry for handoffs. |
|
|
310
|
+
| `context-bootstrap` | `internal` / `internal` | Bootstrap agent behind `clio-coder context init` that inspects the repository and returns `CLIO-CODER.md`. |
|
|
311
|
+
|
|
312
|
+
Examples:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
clio-coder run --agent coder "Find the main build, test, and lint commands."
|
|
316
|
+
clio-coder run --agent architect "Plan a minimal change to add JSON output to the CLI."
|
|
317
|
+
clio-coder run --agent verifier "Run tests and confirm the build passes."
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Shadow agents (`scout`, `researcher`, `provenance`) are internal orchestration
|
|
321
|
+
helpers. They appear in `clio-coder agents --all` and the main prompt catalog, but
|
|
322
|
+
user-origin `/run` and `clio-coder run --agent` requests are rejected for them.
|
|
323
|
+
For broad repository reconnaissance, the operating contract and Scout catalog
|
|
324
|
+
description steer the model to author a Scout dispatch. The chat harness does
|
|
325
|
+
not mechanically route the request. A threshold nudge advises Scout delegation
|
|
326
|
+
after 9 or more manual read-only exploration calls in one turn.
|
|
327
|
+
|
|
328
|
+
Agent recipes are the Markdown source files. The normalized agent spec is the
|
|
329
|
+
catalog/runtime view: category, capability class, latency class, tags, mode, and
|
|
330
|
+
tool set. This keeps Clio's product vocabulary stable while dispatch continues
|
|
331
|
+
to execute through the existing Pi-backed worker path, the sanctioned Claude Code worker runtimes (`claude-sdk` and `claude-code`), or external ACP delegation agents.
|
|
332
|
+
|
|
333
|
+
## Verification Lanes
|
|
334
|
+
|
|
335
|
+
| Command | Purpose |
|
|
336
|
+
| --- | --- |
|
|
337
|
+
| `npm run ci` | Local and GitHub PR gate: typecheck, Biome check, skills pin check, build, and deterministic tests. |
|
|
338
|
+
| `npm run ci:release` | Maintainer release gate: `npm run ci`, then the `check-release` dist and packaging audit. |
|
|
339
|
+
| `npm run test:live` | Local manual live-model smoke. Requires `CLIO_CODER_LIVE_SMOKE=1` and a configured real model target. Add `-- --delegation` for `opencode` and `copilot` ACP delegation checks. |
|
|
340
|
+
| `npm run typecheck` | Strict TypeScript pass. |
|
|
341
|
+
| `npm run lint` | Biome checks; warnings are reported in the release gate output. |
|
|
342
|
+
| `npm run test` | Contract, smoke, and boundary tests. |
|
|
343
|
+
| `npm run check:boundaries` | Boundary invariants only. |
|
|
344
|
+
| `npm run build` | Production bundle through `tsup`. |
|
|
345
|
+
| `npm run dev` | `tsup --watch`. |
|
|
346
|
+
| `npm run clean` | Remove `dist/`. |
|
|
347
|
+
|
|
348
|
+
Live smoke example:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
CLIO_CODER_LIVE_SMOKE=1 \
|
|
352
|
+
CLIO_CODER_LIVE_TARGET=openai-compat \
|
|
353
|
+
CLIO_CODER_LIVE_RUNTIME=openai-compat \
|
|
354
|
+
CLIO_CODER_LIVE_MODEL=your-model \
|
|
355
|
+
CLIO_CODER_LIVE_BASE_URL=http://localhost:8080/v1 \
|
|
356
|
+
npm run test:live
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Delegation validation is a separate opt-in flag because it depends on local
|
|
360
|
+
`opencode` and `copilot` commands:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
CLIO_CODER_LIVE_SMOKE=1 npm run test:live -- --delegation
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Live checks cost tokens or local GPU time and are not deterministic CI. They
|
|
367
|
+
are useful for OpenAI-compatible local gateways such as llama.cpp, LM Studio
|
|
368
|
+
with Dynamo-backed workers, vLLM, and SGLang, plus cloud targets when
|
|
369
|
+
credentials are available.
|
|
370
|
+
|
|
371
|
+
## Environment Variables
|
|
372
|
+
|
|
373
|
+
Clio Coder's behavior can be customized or overridden using various environment variables (such as `CLIO_CODER_RIGOR`, `CLIO_CODER_HOME`, and guardrail overrides). For the complete, detailed, and maintained inventory of environment variables, please refer to [environment-variables.md](environment-variables.md).
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Project Context
|
|
378
|
+
|
|
379
|
+
Clio uses the nearest checked-in `CLIO-CODER.md` as the canonical project guide. Run
|
|
380
|
+
`/context init` in the TUI or `clio-coder context init` from the shell to create or
|
|
381
|
+
refresh it. During adoption, Clio can fold useful content from supported agent
|
|
382
|
+
instruction files into `CLIO-CODER.md` with provenance.
|
|
383
|
+
|
|
384
|
+
To skip project context for one invocation:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
clio-coder --no-context-files
|
|
388
|
+
clio-coder -nc run --agent scout "..."
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Codewiki index
|
|
392
|
+
|
|
393
|
+
`clio-coder context index` builds the structural codewiki without any model calls. It
|
|
394
|
+
writes `.clio-coder/codewiki.json` plus
|
|
395
|
+
`.clio-coder/state.json`, records `codewikiVersion`, and prints coverage plus a
|
|
396
|
+
structural hash. The same builder is used by `clio-coder context init`, `clio-coder context
|
|
397
|
+
refresh`, session freshness checks, tool-demand backfill, and in-session
|
|
398
|
+
incremental updates.
|
|
399
|
+
|
|
400
|
+
The current artifact is schema v5. It records files with path, language, line
|
|
401
|
+
count, role, content hash, imports, and optional summary; declaration-only
|
|
402
|
+
symbols with name, kind, file id, line, and optional signature; and import edges
|
|
403
|
+
to internal files or external modules. The writer emits compact JSON.
|
|
404
|
+
Tree-sitter extraction covers TypeScript, JavaScript, Python, Go, Rust, C, C++,
|
|
405
|
+
Java, Ruby, and C#, with per-file regex fallback where a regex extractor exists.
|
|
406
|
+
|
|
407
|
+
### Markdown wiki commands
|
|
408
|
+
|
|
409
|
+
`clio-coder context wiki` generates the optional agent-authored wiki under
|
|
410
|
+
`.clio-coder/wiki/` by dispatching the `wiki-writer` agent through the configured
|
|
411
|
+
model target. It makes one planning dispatch, which revises the page plan the
|
|
412
|
+
codewiki index derived, then one dispatch per page. `quickstart.md` and every
|
|
413
|
+
directory `index.md` are generated deterministically from the pages' front
|
|
414
|
+
matter after the run, so no dispatch writes them. `.clio-coder/wiki/meta.json` records
|
|
415
|
+
the page list, model label, content hash, git head, indexed source-tree hash,
|
|
416
|
+
and the plan.
|
|
417
|
+
|
|
418
|
+
Each page dispatch is bounded on its own wall clock, and the run is bounded
|
|
419
|
+
between pages. Neither bound loses work: a page that fails or times out is
|
|
420
|
+
recorded as still owed and the run continues to the next one, and every finished
|
|
421
|
+
page is assembled and promoted. When `generation.pagesWritten` is below
|
|
422
|
+
`generation.pagesPlanned`, run `clio-coder context wiki --update` to finish the rest;
|
|
423
|
+
it resumes from the plan rather than starting over.
|
|
424
|
+
|
|
425
|
+
`clio-coder context wiki --update` requests update mode explicitly. It rewrites the
|
|
426
|
+
pages whose front-matter `sources` git reports as changed since the recorded
|
|
427
|
+
wiki `gitHead`, and leaves the rest alone.
|
|
428
|
+
`clio-coder context wiki --status` is read-only: it prints whether wiki metadata is
|
|
429
|
+
present, page count, `updatedAt`, recorded `gitHead`, whether that head differs
|
|
430
|
+
from current `HEAD`, and how many planned pages remain unwritten. It dispatches
|
|
431
|
+
nothing and spends no model tokens.
|
|
432
|
+
|
|
433
|
+
`clio-coder context refresh` rebuilds only the structural codewiki and state. It does
|
|
434
|
+
not run a model and does not touch `CLIO-CODER.md` or `.clio-coder/wiki/`. If a wiki exists
|
|
435
|
+
and its recorded git head is stale, the command prints the hint:
|
|
436
|
+
|
|
437
|
+
```text
|
|
438
|
+
wiki is stale; run clio-coder context refresh --wiki or clio-coder context wiki --update
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
`clio-coder context refresh --wiki` is the explicit model-spend path for refresh. It
|
|
442
|
+
first rebuilds the structural codewiki, then updates an existing wiki when
|
|
443
|
+
`.clio-coder/wiki/meta.json` exists. If no wiki metadata exists, the flag is accepted
|
|
444
|
+
and no wiki model call is made; use `clio-coder context wiki` to create the first
|
|
445
|
+
wiki.
|
|
446
|
+
|
|
447
|
+
### code_nav modes
|
|
448
|
+
|
|
449
|
+
Agents query the codewiki through the read-only `code_nav` tool instead of
|
|
450
|
+
grepping the tree. Every mode reads local artifacts, so lookups are fast and
|
|
451
|
+
model-free.
|
|
452
|
+
|
|
453
|
+
| Mode | Arguments | Returns |
|
|
454
|
+
| --- | --- | --- |
|
|
455
|
+
| `symbol` | `query=<name>` | Declaration records with path, line, kind, and signature. |
|
|
456
|
+
| `path` | `query=<glob \| /regex/ \| substring>` | Indexed files whose path matches the pattern. |
|
|
457
|
+
| `entries` | `[limit=<n>]` | Likely entry points from file roles and `package.json` main/bin. |
|
|
458
|
+
| `outline` | `query=<path>` | Declarations in one indexed file. |
|
|
459
|
+
| `deps` | `query=<path>` | The file's internal and external imports. |
|
|
460
|
+
| `dependents` | `query=<path>` | Indexed files that import the target file. |
|
|
461
|
+
| `wiki` | none | Wiki pages plus absent/fresh/stale state and layout warnings. |
|
|
462
|
+
|
|
463
|
+
`entries` defaults to 25 results and caps at 200. `path` accepts a
|
|
464
|
+
`/pattern/flags` regex, a glob using `*`, `?`, or `[...]`, or a plain substring.
|
|
465
|
+
`outline`, `deps`, and `dependents` resolve an exact indexed path or a unique
|
|
466
|
+
substring match.
|
|
467
|
+
|
|
468
|
+
## Reasoning and Live Thinking Controls
|
|
469
|
+
|
|
470
|
+
Clio Coder features direct, interactive controls for model reasoning and thinking streams:
|
|
471
|
+
|
|
472
|
+
- **Thinking Level (`Shift+Tab`):** Allows operators to cycle through available thinking configurations. This is useful for dialing model reasoning budgets up or down in real time.
|
|
473
|
+
- **Thinking Blocks Toggle (`Alt+R`):** Toggles the latest assistant thinking block between a compact, single-line folded marker and an expanded, full-body view.
|
|
474
|
+
- **All Thinking (`Ctrl+Alt+R` / `Alt+Shift+R`):** Toggles every thinking block in the transcript.
|
|
475
|
+
- **Tool Body Toggle (`Alt+O`) / All Tools (`Ctrl+Alt+O` / `Alt+Shift+O`):** Expand the latest tool or every tool body.
|
|
476
|
+
- **Live Tool Output (`Alt+P`):** Pause or resume cumulative partial tool output in expanded live tool bodies; the tool still executes.
|
|
477
|
+
- **Live Streaming:** During active assistant turns, thinking increments stream live into the chat panel down a rail-prefixed segment. Reasoning totals marked `≈` are approximations from visible text; provider-reported totals are shown without that marker. Neither implies complete or cryptographically verified hidden reasoning.
|
|
478
|
+
- **Thinking Replay:** When continuing a conversation, prior thinking is preserved and replayed in the history according to target-specific rules.
|
|
479
|
+
|
|
480
|
+
## TUI Surface Refinements
|
|
481
|
+
|
|
482
|
+
The Clio TUI has been enhanced to maximize readability and command discovery:
|
|
483
|
+
|
|
484
|
+
- **Redesigned Compact Footer:** The footer dashboard displays real-time token, cost, and target indicators in a single-row layout. Use `Alt+U` to toggle the footer between compact and expanded widgets.
|
|
485
|
+
- **Relocated Telemetry:** Per-turn telemetry is surfaced in the footer activity area, keeping token consumption and execution costs visible without adding extra transcript noise.
|
|
486
|
+
- **Overlay Navigation:** Standardized overlays are available for settings, model selection, `/help` key reference, target health, and session tracking.
|
|
487
|
+
|
|
488
|
+
## Overlay and Presentation Conventions
|
|
489
|
+
|
|
490
|
+
Clio Coder follows strict presentation guidelines across all TUI surfaces:
|
|
491
|
+
|
|
492
|
+
### Hint Grammar
|
|
493
|
+
All TUI overlays construct footer hints using a standard grammar. Keys are displayed in brackets and normalized to canonical casing (`Enter`, `Esc`, `Space`, `Tab`, `↑↓`, `r`, `R`, `type`), separated by a middle dot (` · `):
|
|
494
|
+
- Format: `[Key] action · [Esc] close`
|
|
495
|
+
|
|
496
|
+
### Browse vs. Commit Modes
|
|
497
|
+
Overlays operate in one of two modes which govern the Escape key behavior:
|
|
498
|
+
- **Browse Mode:** Used for read-only viewing or exploration. The Escape key is labeled `close` (`[Esc] close`).
|
|
499
|
+
- **Commit Mode:** Used for forms, selections, or settings changes that alter state. The Escape key is labeled `cancel` (`[Esc] cancel`).
|
|
500
|
+
|
|
501
|
+
### Notice Levels
|
|
502
|
+
Diagnostic writes in the transcript use the themed notice channel instead of raw ANSI or bracket prefixes. Notices render a single themed line containing a colorized glyph and the message:
|
|
503
|
+
|
|
504
|
+
| Level | Glyphs | Color Token | Purpose |
|
|
505
|
+
| --- | --- | --- | --- |
|
|
506
|
+
| `info` | `·` | `dim` | General system information and usage |
|
|
507
|
+
| `success` | `✓` | `success` | Operation completed successfully |
|
|
508
|
+
| `warn` | `!` | `warning` | Non-fatal issue or precaution |
|
|
509
|
+
| `error` | `✗` | `error` | Fatal issue or operation failure |
|
|
510
|
+
|
|
511
|
+
### ListOverlay Behavior
|
|
512
|
+
The `ListOverlay` component provides a reusable kit for filterable, grouped, and selectable lists with an optional detail pane.
|
|
513
|
+
|
|
514
|
+
Navigation keys include the up and down arrow keys, as well as the 'j' and 'k' keys when the filter input is not focused. These keys wrap selection around the ends of the list.
|
|
515
|
+
|
|
516
|
+
The Tab key, or the Enter key when no primary action is defined, toggles the detail pane below the list.
|
|
517
|
+
|
|
518
|
+
For filtering, typing in the input row dynamically filters items using a fuzzy search that matches both the item label and the group name. Group headers that have no matching items are hidden. The Escape key clears a non-empty filter, and pressing it again closes or cancels the overlay.
|
|
519
|
+
|
|
520
|
+
The detail pane displays structured descriptions, usage, or state metadata using the Markdown component with the Clio markdown theme.
|
|
521
|
+
|
|
522
|
+
### Responsive Width Adaptation
|
|
523
|
+
|
|
524
|
+
All TUI overlays fluidly adapt to narrow terminals down to 40 columns:
|
|
525
|
+
- Split overlays such as `/view` gracefully fall back to a single-pane presentation with `[Tab]` switching between list and content panes.
|
|
526
|
+
- Text content and detail descriptions wrap cleanly without line truncation.
|
|
527
|
+
|
|
528
|
+
## Troubleshooting
|
|
529
|
+
|
|
530
|
+
| Problem | Try this |
|
|
531
|
+
| --- | --- |
|
|
532
|
+
| `clio-coder: command not found` | Run `npm run install:local`, then `hash -r`; confirm `${CLIO_CODER_BIN_DIR:-$HOME/.local/bin}` is on `PATH`. |
|
|
533
|
+
| No model target is available | Run `clio-coder configure`, then `clio-coder targets --probe`. |
|
|
534
|
+
| Local model does not respond | Confirm the runtime is running and the target URL is correct. |
|
|
535
|
+
| Cloud model auth fails | Check `clio-coder auth status <target>` and verify the relevant API key or login flow. |
|
|
536
|
+
| Source changes do not appear | Re-run `npm run build`; linked CLI points at `dist/`. |
|
|
537
|
+
| Session replay looks incomplete | Confirm durable session entries exist for the relevant tool, bash, or display activity. |
|
|
538
|
+
| Doctor reports stale state metadata | Run `clio-coder doctor --fix`; upgrades also refresh install metadata after reinstalling. |
|
|
539
|
+
| You need a clean start | Use `clio-coder reset --state`, `--data`, `--cache`, `--auth`, `--config`, or `--all`. |
|
|
540
|
+
|
|
541
|
+
For issue reports, include `clio-coder --version`, `node --version`, `clio-coder doctor`,
|
|
542
|
+
`clio-coder targets`, the command you ran, the target/model, expected behavior, and
|
|
543
|
+
actual behavior. Redact secrets and private repository content.
|
|
544
|
+
|
|
545
|
+
> [!NOTE]
|
|
546
|
+
> `clio-coder dev <command>` groups the instruments that answer a question about the
|
|
547
|
+
> harness rather than about your own work. Bare `clio-coder dev` or `clio-coder dev --help` prints
|
|
548
|
+
> developer instrument help and exits with code 0. Nothing under it is deprecated: every
|
|
549
|
+
> name still resolves without the prefix, so scripts and agents driving Clio over
|
|
550
|
+
> bash keep working unchanged. The prefix exists so `clio-coder --help` stays the set of
|
|
551
|
+
> commands a person needs to read; `clio-coder --help --all` prints both lists. Across all
|
|
552
|
+
> CLI subcommands (`targets use/remove/rename/profile/convert`, `context refresh`,
|
|
553
|
+
> `fleet list/run/status/drain/resume`, `auth login`), passing `--help` prints
|
|
554
|
+
> usage instructions and exits with code 0.
|