@azure-id/orc 2.1.0 → 2.2.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 +374 -0
- package/README.md +49 -36
- package/bin/build-agents.js +7 -5
- package/bin/cli.js +1006 -235
- package/bin/fix.js +21 -18
- package/bin/graph-extract.js +314 -6
- package/bin/graph-gain.js +83 -2
- package/bin/graph-map.js +23 -1
- package/bin/graph-notes.js +1 -1
- package/bin/graph-query.js +1362 -37
- package/bin/graph-resolve.js +1 -1
- package/bin/graph-shard.js +29 -6
- package/bin/graph-signals.js +5 -3
- package/bin/graph.js +7 -3
- package/bin/habit.js +1 -1
- package/bin/pricing.json +8 -1
- package/bin/trace-write.js +40 -11
- package/bin/verify-contracts.js +169 -60
- package/bin/verify-package.js +3 -3
- package/bin/webui/api.js +8 -0
- package/bin/webui/fixtures/extra.js +9 -9
- package/bin/webui/fixtures/flow.js +1 -1
- package/bin/webui/fixtures/index.js +2 -2
- package/bin/webui/fixtures/knowledge.js +8 -1
- package/bin/webui/fixtures/pact.js +112 -111
- package/bin/webui/fixtures/stats.js +2 -2
- package/bin/webui/i18n/en/knowledge.json +2 -0
- package/bin/webui/i18n/id/knowledge.json +2 -0
- package/bin/webui/js/panels/knowledge.js +17 -0
- package/guides/code-graph-benefit.md +116 -0
- package/guides/configuration.md +150 -0
- package/guides/documents.md +262 -0
- package/guides/extra-models.md +448 -0
- package/guides/habits-and-gotchas.md +152 -0
- package/guides/knowledge-reads.md +190 -0
- package/guides/model-selection.md +186 -0
- package/guides/rules.md +305 -0
- package/guides/status-line.md +344 -0
- package/mock-run/a-normal-day.md +2 -2
- package/mock-run/extra-slots.md +177 -177
- package/mock-run/orc-cli.md +3 -2
- package/mock-run/orc-doc.md +452 -448
- package/mock-run/orc-fast.md +2 -2
- package/mock-run/orc-quick.md +146 -146
- package/mock-run/orc.md +4 -4
- package/package.json +2 -1
- package/templates/agents/MODEL-MAPPING.md +12 -12
- package/templates/agents/{orc-executor-haiku-4-5.md → orc-executor-haiku-5-high.md} +21 -8
- package/templates/agents/orc-executor-opus-4-7-high.md +17 -5
- package/templates/agents/orc-executor-opus-4-7-med.md +17 -5
- package/templates/agents/orc-executor-opus-4-8-high.md +17 -5
- package/templates/agents/orc-executor-opus-5-high.md +17 -5
- package/templates/agents/orc-executor-opus-5-low.md +17 -5
- package/templates/agents/orc-executor-opus-5-med.md +17 -5
- package/templates/agents/orc-executor-sonnet-4-6-high.md +17 -5
- package/templates/agents/orc-executor-sonnet-5-high.md +17 -5
- package/templates/agents/orc-executor-sonnet-5-low.md +17 -5
- package/templates/agents/orc-executor-sonnet-5-med.md +17 -5
- package/templates/agents/{orc-graph-noter-sonnet-4-6-med.md → orc-graph-noter-haiku-5-high.md} +4 -4
- package/templates/agents/orc-planner-mini-opus-5-med.md +3 -1
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +3 -1
- package/templates/agents/orc-planner-opus-5-med.md +3 -1
- package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
- package/templates/agents/{orc-trace-writer-haiku-4-5.md → orc-trace-writer-haiku-5-high.md} +4 -3
- package/templates/commands/orc-doc.md +128 -128
- package/templates/commands/orc-export.md +51 -46
- package/templates/commands/orc-fast.md +10 -10
- package/templates/hooks/README.md +8 -3
- package/templates/hooks/orc-effort-guard.js +105 -27
- package/templates/hooks/orc-graph-hook.js +252 -4
- package/templates/hooks/orc-statusline.js +13 -6
- package/templates/hooks/orc-trace.js +1 -1
- package/templates/skills/_shared/README.md +2 -2
- package/templates/skills/_shared/code-graph.md +185 -251
- package/templates/skills/_shared/extra-dispatch.md +4 -4
- package/templates/skills/_shared/lane-contract.md +7 -3
- package/templates/skills/_shared/opus5-only.md +3 -3
- package/templates/skills/_shared/phases/execution.md +13 -11
- package/templates/skills/_shared/phases/planning.md +27 -9
- package/templates/skills/_shared/phases/preflight.md +3 -3
- package/templates/skills/_shared/phases/review.md +4 -3
- package/templates/skills/_shared/phases/ship.md +7 -10
- package/templates/skills/_shared/phases/summary.md +2 -3
- package/templates/skills/_shared/phases/trace-verbs.md +21 -16
- package/templates/skills/_shared/phases/trace.md +3 -3
- package/templates/skills/_shared/phases/wiki-consult.md +2 -2
- package/templates/skills/_shared/pr-templates.md +108 -106
- package/templates/skills/_shared/read-ladder.md +8 -2
- package/templates/skills/_shared/return-validation.md +10 -6
- package/templates/skills/_shared/review-slice.md +1 -1
- package/templates/skills/_shared/stack-plan.md +135 -135
- package/templates/skills/_shared/wait.md +14 -2
- package/templates/skills/context-combiner/SKILL.md +2 -2
- package/templates/skills/orc/SKILL.md +7 -7
- package/templates/skills/orc/config.md +2 -2
- package/templates/skills/orc/examples/full-run-mock.md +7 -7
- package/templates/skills/orc/references/effort-and-mode.md +222 -222
- package/templates/skills/orc/schemas/planning-output.md +3 -0
- package/templates/skills/orc-aftermath/SKILL.md +15 -15
- package/templates/skills/orc-analyze/SKILL.md +2 -2
- package/templates/skills/orc-analyze-mini/SKILL.md +2 -2
- package/templates/skills/orc-boundary/SKILL.md +15 -15
- package/templates/skills/orc-boundary/references/card.md +81 -78
- package/templates/skills/orc-boundary/references/gate.md +113 -113
- package/templates/skills/orc-brainstorm/SKILL.md +15 -15
- package/templates/skills/orc-budget/SKILL.md +15 -15
- package/templates/skills/orc-challenge/README.md +1 -1
- package/templates/skills/orc-challenge/SKILL.md +16 -16
- package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
- package/templates/skills/orc-claude/SKILL.md +4 -4
- package/templates/skills/orc-claude/examples/claude-run-mock.md +1 -1
- package/templates/skills/orc-diy/SKILL.md +2 -2
- package/templates/skills/orc-diy/references/blocks/wiki.md +26 -26
- package/templates/skills/orc-diy/references/flow-schema.md +2 -2
- package/templates/skills/orc-doc/README.md +2 -2
- package/templates/skills/orc-doc/SKILL.md +501 -490
- package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +12 -1
- package/templates/skills/orc-doc/references/chunking.md +6 -4
- package/templates/skills/orc-doc/references/gates.md +311 -311
- package/templates/skills/orc-doc/references/resume-protocol.md +229 -228
- package/templates/skills/orc-explain/SKILL.md +88 -88
- package/templates/skills/orc-export/SKILL.md +190 -187
- package/templates/skills/orc-fast/SKILL.md +17 -14
- package/templates/skills/orc-grill/SKILL.md +16 -16
- package/templates/skills/orc-grill/references/grill-doc.md +1 -1
- package/templates/skills/orc-handoff/SKILL.md +11 -11
- package/templates/skills/orc-learn/SKILL.md +13 -13
- package/templates/skills/orc-learn/examples/learn-run-mock.md +2 -2
- package/templates/skills/orc-mini/SKILL.md +12 -12
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -5
- package/templates/skills/orc-pact/SKILL.md +15 -15
- package/templates/skills/orc-pact/references/gate.md +70 -70
- package/templates/skills/orc-pattern/SKILL.md +3 -3
- package/templates/skills/orc-poly/SKILL.md +4 -4
- package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -51
- package/templates/skills/orc-pr-driver/SKILL.md +4 -3
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +108 -99
- package/templates/skills/orc-pr-setup/SKILL.md +2 -2
- package/templates/skills/orc-quick/README.md +11 -12
- package/templates/skills/orc-quick/SKILL.md +29 -32
- package/templates/skills/orc-quick/references/context-doc.md +5 -5
- package/templates/skills/orc-quick/references/dispatch-gate.md +10 -10
- package/templates/skills/orc-quick/references/gh-mode.md +2 -1
- package/templates/skills/orc-quick/references/look.md +34 -12
- package/templates/skills/orc-retro/SKILL.md +2 -2
- package/templates/skills/orc-retro/examples/retro-mock.md +2 -2
- package/templates/skills/orc-route/SKILL.md +2 -2
- package/templates/skills/orc-test/SKILL.md +6 -3
- package/templates/skills/orc-verify/SKILL.md +2 -2
- package/templates/skills/orc-wait/SKILL.md +10 -2
- package/templates/skills/orc-wiki/SKILL.md +4 -4
- package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -19
- package/templates/agents/orc-executor-sonnet-4-6-med.md +0 -155
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
Every setting is edited with the **`orc config` CLI**. That is deterministic
|
|
4
|
+
terminal input and output, so editing settings costs **zero model tokens** —
|
|
5
|
+
nothing is loaded into a Claude session.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
orc config # interactive menu — each value, its default, and what it does
|
|
9
|
+
orc config list # print the effective config (--json for a machine)
|
|
10
|
+
orc config set max_scouts 5 # validate, then write one setting
|
|
11
|
+
orc config reset max_scouts # revert one key (omit the key to reset everything)
|
|
12
|
+
orc config path # where the override file lives
|
|
13
|
+
orc config recommend # read this repo and suggest ONE profile, with its reasons
|
|
14
|
+
orc config profile <name> # apply a coherent bundle: solo-fast | balanced | paranoid | token-lean
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Your changes go into `.claude/orc.config.yaml`, which `orc update` and
|
|
18
|
+
`orc upgrade` never touch. `skills/orc/config.md` holds the shipped defaults.
|
|
19
|
+
Add `--global` to edit `~/.claude`.
|
|
20
|
+
|
|
21
|
+
**Config does not merge.** `~/.claude/orc.config.yaml` and
|
|
22
|
+
`<project>/.claude/orc.config.yaml` are separate files; the one that applies is
|
|
23
|
+
the one belonging to the install that answered. `orc doctor` reports that
|
|
24
|
+
conflict when both exist.
|
|
25
|
+
|
|
26
|
+
`orc ui` ▸ Settings edits the same keys with the same validators — it shells
|
|
27
|
+
this CLI for every write.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Common keys
|
|
32
|
+
|
|
33
|
+
| Key | Default | What it does |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `max_wave_tasks` | `3` | Parallel tasks per wave (a hard cap). |
|
|
36
|
+
| `batch_pause_every` | `2` | Waves between stop-and-continue pauses. It is a **gate**, not a hint. |
|
|
37
|
+
| `rubric_bands` | `5` | How finely the scoring report is grouped (2–8). The score→model table does not change. |
|
|
38
|
+
| `max_scouts` | `3` | Parallel read-only scouts in deep analysis. |
|
|
39
|
+
| `default_analysis_depth` | `standard` | `standard` or `deep`. The run still confirms. |
|
|
40
|
+
| `generate_tests` | `false` | Phase 6.5 writes test cases (files + `TEST-PLAN.md` + a curl bundle) into `test-generator/<slug>/`. It never runs them. |
|
|
41
|
+
| `pattern_findings` | `ask` | On a code-pattern cache miss: `ask` prompts, `on` learns automatically, `off` stays language-agnostic. |
|
|
42
|
+
| `gotchas` | `on` | Repair memory: record what went red→green, and inject the matching ones into later executor slices. Since v2.0.0 the reviewer card is always on: `off` turns off the executor block only, and `orc config set gotchas off` says so. |
|
|
43
|
+
| `gotcha_card_budget` | `600` | The size of the reviewer card from `orc gotcha card`, in tokens (options 200 · 400 · 600 · 900). It is a size, never an off switch. The minimum is 200; a lower value is refused. An entry that does not fit is counted in the card header. |
|
|
44
|
+
| `habits` | `off` | Whether ORC learns the answers you give to its questions (`off` · `observe` · `propose`). `off` reads nothing and changes nothing. `observe` shows your usual answers in `orc habit show` and proposes nothing. `propose` asks at most ONE question at the end of a run. Nothing is applied without your yes, and there is no automatic level (`auto` is refused). An accepted habit is the `learned` rank, below this file; `orc habit forget <id>` undoes it. See [habits and gotchas](habits-and-gotchas.md). |
|
|
45
|
+
| `review_before_push` | `ask` | Whether a lane offers a code review before it pushes (`ask` · `on` · `off`). A habit can learn only `on`. |
|
|
46
|
+
| `mini_tdd` | `ask` | Whether `/orc-mini` asks at intake for a test-driven loop (`ask` · `on` · `off`). A habit can learn only `on`. |
|
|
47
|
+
| `quick_update_tests` | `ask` | Whether `/orc-quick` offers to update the tests after a code change (`ask` · `on`). There is no `off`. It changes only the offer after the work, never the dispatch gate. |
|
|
48
|
+
| `notify` | `off` | `bell` rings the terminal bell once when a turn of an ORC run ends — only while a run is open in this session, and only when the run moved. `off` is silent. `orc update` always wires the session hook; the hook reads this key first. No OS notification and no network. |
|
|
49
|
+
| `gotchas_max` | `40` | Live gotchas kept before the least useful are archived (never deleted). |
|
|
50
|
+
| `code_graph` | `off` | `off` · `on` · `semi`. `semi` keeps the map current (preflight heal and the hook), but every lane read answers exit 3, as for `off`. Code lanes build and use a local map of the code (`orc graph`). The structure is free — the CLI parses it, no model. `orc graph map` ranks the repository, `orc graph ctx` prints one card, and `orc graph gain` says what the map put in and estimates what it kept out. `orc graph status` says `THIN` when most files hold no symbol, and `orc graph audit` lists those files by language, longest first — by hand, never from a lane. |
|
|
51
|
+
| `code_graph_notes` | `off` | One-sentence notes on changed functions: `wave` (one batch per wave) or `end` (one batch per run). The only part of the graph that costs tokens. |
|
|
52
|
+
| `security_review` | `off` | Opt-in Phase 5.5 security pass. Fires only when a task scored ≥ 70. |
|
|
53
|
+
| `run_budget_dispatches` | `0` | Stop before wave 1 if the run is forecast to exceed this many subagents. `0` = off. |
|
|
54
|
+
| `mock_example` | `ask` | After a green verify, offer a runnable mocked example in `mock-examples/<slug>/` (never committed). |
|
|
55
|
+
| `tdd_loop_max` | `3` | Implement→test→repair rounds per task before an honest red report. |
|
|
56
|
+
| `stacked_pr` | `ask` | Ship as a stack of PRs when the change trips the thresholds below. |
|
|
57
|
+
| `stacked_pr_loc` | `1000` | LoC that trips the gate, and the per-layer ceiling. |
|
|
58
|
+
| `stacked_pr_files` | `20` | Changed files that trip the gate, and the per-layer maximum. |
|
|
59
|
+
| `stacked_pr_max_layers` | `6` | Soft cap on layers per stack. |
|
|
60
|
+
| `opus5_only` | `false` | One model for every role, with effort as the cost dial. See [model selection](model-selection.md). |
|
|
61
|
+
| `pact_gate` | `warn` | Inject a drifted promise into the planner as a constraint. There is no `block`. |
|
|
62
|
+
| `pact_recheck_on_verify` | `true` | At verify, re-check only the promises this change touched. |
|
|
63
|
+
| `boundary_gate` | `warn` | `block` lifts a REFUSED task out of its wave — **the wave still runs the rest**. |
|
|
64
|
+
| `handoff_write` | `true` | Whether `/orc-handoff` may write a graded surface at all. |
|
|
65
|
+
| `budget_min_samples` | `5` | Dispatches a band needs before a forecast is called confident. |
|
|
66
|
+
| `budget_units` | `auto` | Which unit a forecast leads with: tokens, usd, quota, or all. |
|
|
67
|
+
| `budget_plan` | `auto` | Your Claude plan, for the quota view. Asked once, then stored. |
|
|
68
|
+
| `challenge_pass_severity` | `p1` | The severity at or above which an open `/orc-challenge` finding blocks a pass. Accepted exceptions are subtracted first, and the pass itself is computed by the CLI — never declared by the judge. |
|
|
69
|
+
| `challenge_stall_after` | `3` | Iterations with no net reduction before a cycle is flagged `stalled`. A flag, never a cap: each turn is a person sitting down to work. |
|
|
70
|
+
| `challenge_reader` | `on` | The cold read that measures whether a reader with no context can follow the artifact. `off` makes that dimension report `NOT-CHECKED` with that reason — never silently. |
|
|
71
|
+
| `challenge_gate` | `warn` | One `/orc` preflight line when the document it is about to build from has an in-flight, failing review cycle. There is no `block`. |
|
|
72
|
+
| `doc_max_lines_per_agent` | `400` | Write/read budget per dispatched `/orc-doc` agent, in lines. A section is never split to fit — one over the cap is reported as a planning smell and offered as a split instead. |
|
|
73
|
+
| `doc_max_parallel` | `4` | Agents per `/orc-doc` wave. **Hard cap 4** — a larger value is clamped and the clamp is announced, because more parallel writers is more chances for the outline to drift. |
|
|
74
|
+
| `doc_language` | `en` | Default output language, always confirmable per run. A non-English document is held to the same plain-language bar in that language. |
|
|
75
|
+
| `doc_dir` | `orc/orc-doc` | Where `/orc-doc` folders live. Project root, not `.claude/` — a document is a deliverable a human opens. |
|
|
76
|
+
|
|
77
|
+
## Fable 5 role override
|
|
78
|
+
|
|
79
|
+
| Key | Default | What it does |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `fable5_enabled` | `false` | Master switch. Nothing changes unless this is true. |
|
|
82
|
+
| `fable5_effort` | `medium` | Effort for the Fable 5 agents. |
|
|
83
|
+
| `fable5_roles` | *(empty)* | Which roles use it: `analyze`, `plan`, `advisor`, `judge`, `review`. |
|
|
84
|
+
|
|
85
|
+
`opus5_only: true` outranks this whole block, and says so when you set it.
|
|
86
|
+
|
|
87
|
+
## Advanced keys
|
|
88
|
+
|
|
89
|
+
| Key | Default | What it does |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `wiki_fresh_max` / `wiki_aging_max` | `10` / `30` | Wiki freshness edges, in commits. Computed on read, never stored. |
|
|
92
|
+
| `wiki_scan_tier` | `ladder` | `ladder` sends a small no-new-surface delta to a lighter scanner (~40% cheaper). The resolved tier is always printed. |
|
|
93
|
+
| `wiki_tier_deep_files` | `3` | Covered files touched at or above this send the refresh to the deep scanner. |
|
|
94
|
+
| `wiki_refresh_budget` | `0` | Max scan-tasks per refresh. A planned stop, not an interrupt. `0` = no cap. |
|
|
95
|
+
| `wiki_retire_after_runs` | `0` | Offer to retire a doc no run has used in this many runs. Retiring moves it, never deletes it. |
|
|
96
|
+
| `wiki_delta_full_threshold` | `30` | Percent of touched docs above which a FULL refresh is recommended. |
|
|
97
|
+
| `wiki_refresh_ask_tasks` / `wiki_refresh_ask_files` | `3` / `10` | When the post-ship "refresh the wiki?" question fires. |
|
|
98
|
+
| `orc_wiki_pattern_findings` | `false` | Also learn code patterns during a wiki scan. |
|
|
99
|
+
| `code_graph_notes_min` / `code_graph_notes_cap` | `5` / `40` | Fewest and most functions in one notes batch. Below the minimum nothing is dispatched; the functions wait. |
|
|
100
|
+
| `code_graph_card_budget` | `1200` | Token budget for one `orc graph ctx` card (300–4000). A card never goes over it. |
|
|
101
|
+
| `code_graph_auto_update` | `true` | A code lane's preflight updates a DRIFTED graph itself (free). `false` = hints only until you run `orc graph update`. |
|
|
102
|
+
| `code_graph_heal_ms` | `1500` | How long a READ (`ctx`, `impact`, `coverage`, `changes`) may spend repairing a map that has moved. It never starts a repair it expects to overrun — the last update's own duration is the estimate. Over the cap, the answer comes from the old version and says so. `0` = never repair on a read. |
|
|
103
|
+
| `code_graph_hooks` | `on` | Whether the installed `orc-graph-hook.js` acts. It updates the map when an ORC worker finishes, and hands a worker the anchors it would otherwise search for — for a Grep, a Glob and a shell search (`grep`, `rg`, `git grep`, `findstr`, `Select-String`, `ag`, `ack`). It never blocks a tool call and is silent outside an ORC run. `on,read` adds one more hint: a whole-file read of a file with many symbols gets one line naming its six most reached symbols and their ranges, so a LATER read can ask for a range. The read itself always runs. Under `on`, such a read is only COUNTED — `orc graph gain` prints it as `wide reads` — so you can see what `on,read` would name before you turn it on. `off` = the lane steps are the only update path. |
|
|
104
|
+
| `code_graph_ignore` | *(empty)* | Extra paths the graph never indexes, as a comma-separated list of globs relative to the repository root (`vendor/**,generated/**,*.gen.ts`). The engine already skips `node_modules`, `vendor`, root `dist/` and `build/`, caches, bundles, `.d.ts` and generated files; this adds to that list. A skipped file is reported `excluded` by `orc graph coverage`, never in silence. |
|
|
105
|
+
| `gotcha_sync_hours` | `6` | How old the last `orc gotcha sync` may be before the next review step runs it again (≥ 1). |
|
|
106
|
+
| `sonar_url` / `sonar_project` / `sonar_org` | *(empty)* | The SonarQube or SonarCloud base URL, project key and organization for `orc gotcha import sonar`, so the import needs no flags. `sonar_org` stays empty for a self-hosted SonarQube. The token is NEVER a key: set `SONAR_TOKEN` in the environment. |
|
|
107
|
+
| `rules_card_compact` | `on` | `on` (the default since 2.0.2) gives `/orc-mini` and `/orc-fast` the compact rules card too (`/orc-quick` always gets it): every rule id and the first line of each HARD rule, without the worked examples. Eval E4 showed no new unmet items, no new rule conflicts, and a smoke gate green on the first try at least as often. `off` is the full card. |
|
|
108
|
+
| `crosslink_fresh_days` / `crosslink_aging_days` | `10` / `15` | Cross-repo snapshot age edges. Advisory; they never block. |
|
|
109
|
+
| `aftermath_window_days` | `30` | How far back `/orc-aftermath` grades. |
|
|
110
|
+
| `budget_price_table` | *(shipped)* | Your own dated price table. Older than 90 days prints a warning. |
|
|
111
|
+
| `retro_repo` | `azure-id/orc` | Where `/orc-retro` files its report. |
|
|
112
|
+
| `log_dir` | `.claude/orc/logs` | Behavior traces. Kept until you run `orc clear logs --apply`, or until the automatic sweep removes them (`log_retention_auto: on`, older than `log_retention_days`). |
|
|
113
|
+
| `log_retention_days` | `90` | `30`, `60`, `90`, `120`, `240` or `360`. The age `orc clear logs` deletes at: finished traces and finished run folders (with their `refs/orc/runs/<slug>/pre` ref) whose last activity is older than this. It never deletes user data, a waiting run, the active trace, or a file younger than 6 hours. A trace with an `ASK` line stays for 180 days. The cutoff never goes below `aftermath_window_days`. `orc stats` keeps the counts of a pruned run in `.claude/orc/logs-rollup.json`. |
|
|
114
|
+
| `log_retention_auto` | `off` | `on` = after a lane's `FINISH` packet, `orc trace write` runs `orc clear logs --apply`, at most once per 24 hours. It never blocks a run. `off` = nothing is deleted until you run the command (or press **Clear old logs** in `orc ui` ▸ Maintenance). |
|
|
115
|
+
| `statusline_refresh` | *(not set)* | `off`, `1`, `2`, `3`, `5` or `10` seconds. The timer that redraws the status line while Claude Code is idle, so a moving part (a pet, a clock) moves. This key is not stored in `orc.config.yaml`: `orc config set statusline_refresh 3` writes `statusLine.refreshInterval` in `settings.json`, the same as `orc statusline refresh 3`, and `orc config list` reads it back from there. Claude Code does not accept less than 1 second, so `0.5` is refused and the message gives the nearest value (`1`). Since v2.1.0. |
|
|
116
|
+
| `run_dir` | `.claude/orc/run` | Run state — deliberately outside the installer's reach. |
|
|
117
|
+
| `analyzer_dir` / `planner_dir` / `report_out_dir` | — | Where artifacts are written. |
|
|
118
|
+
| `orchestrator_model` | `claude-opus-4-8` | The main-session model ORC assumes. |
|
|
119
|
+
|
|
120
|
+
**Behavior-trace logging is permanent.** Every run writes a `.txt` trace under
|
|
121
|
+
`log_dir`: phases, every spawn, the model that actually answered, scores and
|
|
122
|
+
outcomes. There is no on/off key — only `log_dir` moves it. Since v2.1.0,
|
|
123
|
+
`orc clear logs` shows which old traces and run folders it can delete, and
|
|
124
|
+
`orc clear logs --apply` deletes them. Nothing is deleted automatically unless you
|
|
125
|
+
set `log_retention_auto: on`.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Two separate config families
|
|
130
|
+
|
|
131
|
+
These are **not** part of `orc config`:
|
|
132
|
+
|
|
133
|
+
| Family | File | Guide |
|
|
134
|
+
|---|---|---|
|
|
135
|
+
| `orc diy …` | `.claude/orc-diy.config.yaml` | [ORC-DIY README](../templates/skills/orc-diy/README.md) |
|
|
136
|
+
| `orc crosslink …` | `.claude/orc-crosslink.config.yaml` | [ORC-WIKI README](../templates/skills/orc-wiki/README.md) |
|
|
137
|
+
|
|
138
|
+
## Profiles
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
$ orc config profile
|
|
142
|
+
solo-fast One person moving fast, reads their own diffs. Fewer gates, bigger waves.
|
|
143
|
+
balanced Today's defaults. Change nothing unless you know why.
|
|
144
|
+
paranoid Shared codebase, real users. Every gate on, small waves, pause often.
|
|
145
|
+
token-lean Big repo, tight budget. Narrow scans, shallow analysis.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`orc config recommend` reads your repo (tests? CI? contributors? a wiki?
|
|
149
|
+
monorepo?) and suggests one, listing the reasons it decided from. It writes
|
|
150
|
+
nothing.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Documents — `/orc-doc` in detail
|
|
2
|
+
|
|
3
|
+
README overflow. The short version is in the README under *Documents that go
|
|
4
|
+
somewhere*; this is everything that would have bloated it.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The two contracts
|
|
9
|
+
|
|
10
|
+
> **The orchestrator never reads the document body.** It knows the document only
|
|
11
|
+
> through the CLI's derived section map and through what the agents it
|
|
12
|
+
> dispatched report back.
|
|
13
|
+
|
|
14
|
+
> **The context is gathered once and frozen.** A resumed session reads
|
|
15
|
+
> `context.md` from disk; it never re-interviews you for what session 1 already
|
|
16
|
+
> settled.
|
|
17
|
+
|
|
18
|
+
Both are registered contract tokens. Everything below serves one of them.
|
|
19
|
+
|
|
20
|
+
## Why it is built this way
|
|
21
|
+
|
|
22
|
+
Writing a long document with an agent fails in three ways, and all three are
|
|
23
|
+
context-window problems wearing a costume:
|
|
24
|
+
|
|
25
|
+
1. **The orchestrator reads the document it is writing.** A 900-line TSD is
|
|
26
|
+
~30,000 tokens. Read it three times across a session and the session is over.
|
|
27
|
+
2. **Every edit re-reads and re-writes the whole file.** Changing one paragraph
|
|
28
|
+
in section 9 should not cost the other 14 sections.
|
|
29
|
+
3. **The context dies with the session.** You come back on Monday, the model
|
|
30
|
+
knows nothing, and you paste the same brief for the fourth time.
|
|
31
|
+
|
|
32
|
+
## The document is a folder (v0.49.0)
|
|
33
|
+
|
|
34
|
+
> **`sections/` is the source of truth. `document.md` is a build artifact.**
|
|
35
|
+
|
|
36
|
+
Each section lives in `sections/<NN>-<slug>.md` — a real, visible file you can
|
|
37
|
+
open, edit and read in a pull request. `orc doc compile` rebuilds the document
|
|
38
|
+
from those files, for **zero model tokens**, whenever you ask; `orc doc split`
|
|
39
|
+
goes the other way and recovers the sections from a document a human reshaped by
|
|
40
|
+
hand, byte for byte.
|
|
41
|
+
|
|
42
|
+
That is a re-pointing, not a speed-up: compiling was **always** free. What the
|
|
43
|
+
folder buys is early review, a resumable wave, no extract/splice round trip, and
|
|
44
|
+
reads bounded to one file. A section too big for one file splits *underneath*
|
|
45
|
+
into sub-parts (`sections/<id>/00-head.md` + `NN-<sub>.md`) that the reader never
|
|
46
|
+
sees — the compiled document still has exactly one `## ` for it.
|
|
47
|
+
|
|
48
|
+
The join key is the **filename**. There are no markers inside the files: an HTML
|
|
49
|
+
comment is a lint error in this lane and mangles on import, and it would buy
|
|
50
|
+
nothing the filename does not already give.
|
|
51
|
+
|
|
52
|
+
## Who holds what
|
|
53
|
+
|
|
54
|
+
| Holder | What it holds |
|
|
55
|
+
|---|---|
|
|
56
|
+
| the orchestrator | `context.md`, `outline.md`, the section map, the lint findings, each agent's ~30-line return |
|
|
57
|
+
| each writer | ONE file under `sections/`, and nothing else |
|
|
58
|
+
| each checker | ONE bounded part file, read from line 1 |
|
|
59
|
+
| nobody | the whole document |
|
|
60
|
+
|
|
61
|
+
**Line arithmetic is the CLI's job.** It is the one thing a language model is
|
|
62
|
+
guaranteed to get wrong, and the entire saving depends on the numbers being
|
|
63
|
+
right — so the map is computed by `bin/cli.js`, re-derived after every write, and
|
|
64
|
+
**never stored**. A stored line number is a wrong line number one edit later.
|
|
65
|
+
|
|
66
|
+
## The arithmetic, on a real document
|
|
67
|
+
|
|
68
|
+
| | |
|
|
69
|
+
|---|---|
|
|
70
|
+
| Document | 10,000 lines, 40 sections |
|
|
71
|
+
| `doc_max_lines_per_agent` | 400 |
|
|
72
|
+
| `doc_max_parallel` | 2 (hard cap) |
|
|
73
|
+
| Batches | 25 agent slices |
|
|
74
|
+
| Waves | ⌈25 / 2⌉ = **13**, parallel within each |
|
|
75
|
+
| In `partial` mode | **wave 1 is bought, then it STOPS.** The rest is paid for only if wave 1 was right |
|
|
76
|
+
| Orchestrator context spent | 25 returns × ~30 lines ≈ **750 lines**, plus the map |
|
|
77
|
+
| Reading it twice instead | **20,000+ lines** |
|
|
78
|
+
|
|
79
|
+
On a re-check after an edit, only the sections whose hash changed are
|
|
80
|
+
re-dispatched — typically 1 or 2 slices, not 25. **The hash is what turns a
|
|
81
|
+
re-check from a full pass into a diff.**
|
|
82
|
+
|
|
83
|
+
## The gates, in order
|
|
84
|
+
|
|
85
|
+
| Gate | Question | If missing |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| **D1** | What do you want written, and about what? | **HARD STOP.** Nothing is created — no folder, no file |
|
|
88
|
+
| **D2** | Paths to supporting documents? | "none" is a complete answer and is recorded |
|
|
89
|
+
| **D3** | Do you have your own template? | Falls back to the shipped base template |
|
|
90
|
+
| **D4** | Intent · audience · expectation · language · type · target · length | Re-ask once with a recommended default per field |
|
|
91
|
+
| **D5** | The outline, confirmed before a word is written | — |
|
|
92
|
+
|
|
93
|
+
Asking D2 and D3 is mandatory even though answering them is not. D4 must be
|
|
94
|
+
answered, but *"yes, use your default"* is an answer.
|
|
95
|
+
|
|
96
|
+
## The five templates
|
|
97
|
+
|
|
98
|
+
| Type | Backbone |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `prd` | cover → problem → goals → requirements → risks → rollout |
|
|
101
|
+
| `tsd` | context → goals → design → **alternatives considered** → cross-cutting → rollout |
|
|
102
|
+
| `collaboration` | parties → shared goal → **RACI** → interfaces → decision rights → decision log |
|
|
103
|
+
| `report` | executive summary → **RAG status** → results → risks → **decisions needed from you** |
|
|
104
|
+
| `workflow` | purpose → **when NOT to use this** → the procedure → **when it goes wrong** → escalation |
|
|
105
|
+
|
|
106
|
+
Each ships as `templates/skills/orc-doc/references/templates/<type>.md`: a
|
|
107
|
+
heading skeleton, a one-line purpose comment per section (stripped at compile,
|
|
108
|
+
never reaching the deliverable), and a starter table where a table is the right
|
|
109
|
+
shape.
|
|
110
|
+
|
|
111
|
+
**A template is a floor, not a cage.** Your own template REPLACES the shipped one
|
|
112
|
+
entirely — its headings become the outline, its body is instructions for the
|
|
113
|
+
writer, and the two are never merged silently.
|
|
114
|
+
|
|
115
|
+
## Where a Markdown file can go
|
|
116
|
+
|
|
117
|
+
| Target | Imports `.md`? | Watch out for |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| **Notion** | native | **Only H1–H3 exist** — H4+ degrades to bold text. 5 MB/file free, 50 MB paid, 5 GB/ZIP. A hidden file in the ZIP fails the import |
|
|
120
|
+
| **Obsidian** | native format | nothing |
|
|
121
|
+
| **Google Docs** | native | tables convert, but complex ones flatten |
|
|
122
|
+
| **Coda** | native | `/import` on the canvas |
|
|
123
|
+
| **Craft** | yes | imports an Obsidian/Markdown folder with backlinks |
|
|
124
|
+
| **Apple Notes** | native (macOS Tahoe / iOS 26+) | older versions have no support |
|
|
125
|
+
| **GitHub / GitLab** | native | relative image paths must exist in the repo |
|
|
126
|
+
| **Docusaurus / Hugo / Jekyll / MkDocs** | yes | these **want** YAML front matter |
|
|
127
|
+
| **Confluence** | app required | a marketplace importer, or a converter script |
|
|
128
|
+
| **OneNote** | **no** | convert to Word or PDF first |
|
|
129
|
+
|
|
130
|
+
`orc doc targets` is the machine copy, and `orc doc lint --target <id>` enforces
|
|
131
|
+
it. **A lint rule that came from a real product limit is worth ten invented
|
|
132
|
+
ones.**
|
|
133
|
+
|
|
134
|
+
## The portability rules
|
|
135
|
+
|
|
136
|
+
| Rule | Why |
|
|
137
|
+
|---|---|
|
|
138
|
+
| ATX headings, exactly one H1, no skipped levels | every outline builder depends on it |
|
|
139
|
+
| max depth H3 under `notion` and `generic` | Notion has three heading levels |
|
|
140
|
+
| **one paragraph, one line** | a wrap at 80 columns becomes a line break inside a Notion paragraph — the single most common import-mangling bug |
|
|
141
|
+
| no raw HTML, no HTML comments | some importers render them as literal text |
|
|
142
|
+
| simple pipe tables only | everything else survives; these do not |
|
|
143
|
+
| ` ``` ` fences with a language tag | `~~~` and indented blocks convert unreliably |
|
|
144
|
+
| no wikilinks, footnotes or definition lists | Obsidian-only / Pandoc-only |
|
|
145
|
+
| images: alt text **and** a one-line description | images do not travel; the description does |
|
|
146
|
+
| front matter off by default, on for the static-site targets | visible junk in Notion, required by Hugo |
|
|
147
|
+
| no emoji in headings | some importers slug headings and mangle anchors |
|
|
148
|
+
|
|
149
|
+
## Writing a human can read
|
|
150
|
+
|
|
151
|
+
Average ≤ 20 words a sentence, anything over 35 is a finding with its line
|
|
152
|
+
number; common words over precise-sounding ones; every acronym expanded on first
|
|
153
|
+
use; active voice; facts in tables; each section opens with its conclusion.
|
|
154
|
+
|
|
155
|
+
**Never invent a fact — and never write the uncertainty into the document.**
|
|
156
|
+
What is not in `context.md` or `context-sources.md` is **not written at all**. It
|
|
157
|
+
comes back as a gap, is recorded with `orc doc log --kind gap`, lands in the
|
|
158
|
+
derived `gaps.md`, and is raised with you.
|
|
159
|
+
|
|
160
|
+
**The deliverable carries content only.** No `> **Open:**`, no
|
|
161
|
+
`> **Assumption:**`, no note callout, no HTML comment — not in `document.md` and
|
|
162
|
+
not in a section file. `orc doc lint`'s `annotation-in-body` is an ERROR, and it
|
|
163
|
+
matches an exact, narrow set of ORC's own markers: a line of yours beginning
|
|
164
|
+
"Note:" is content and is never flagged. `compile` REPORTS a match and never
|
|
165
|
+
silently strips it, because we cannot tell whose line it is.
|
|
166
|
+
|
|
167
|
+
Filler that reads like a fact is the worst possible output of this lane; one of
|
|
168
|
+
ORC's markers left in the reader's document is the second worst.
|
|
169
|
+
|
|
170
|
+
**The checker is `low` effort on purpose.** It reads a short range and answers a
|
|
171
|
+
bounded question, and a harder-thinking checker reasons its way past a gap a real
|
|
172
|
+
reader would trip on — the same reasoning that pins `/orc-challenge`'s cold
|
|
173
|
+
reader at `low`. Nothing may upgrade it.
|
|
174
|
+
|
|
175
|
+
## Editing safely
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# … a writer opens sections/04-goals-and-metrics.md and edits it IN PLACE …
|
|
179
|
+
orc doc compile <slug> # rebuild, then re-map and re-lint
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
No extract, no splice, no monolith touched. For a section stored as sub-parts the
|
|
183
|
+
writer opens the one ~150-line sub-part rather than all 900 lines.
|
|
184
|
+
|
|
185
|
+
A section whose hash moved is `user-edited`, and **it is never rewritten without
|
|
186
|
+
an instruction naming it**; a finding inside one is reported and the fix offered,
|
|
187
|
+
never applied. `orc doc ship` **refuses on a `document.md` that is behind its own
|
|
188
|
+
`sections/`**, and names what moved.
|
|
189
|
+
|
|
190
|
+
## Resuming
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
/orc-doc resume lists every document
|
|
194
|
+
/orc-doc resume prd-checkout a prefix is enough
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The new session runs `orc doc status` and `orc doc parts` — which works before a
|
|
198
|
+
single compile has ever run — reads `context.md` and `outline.md` (**not the
|
|
199
|
+
document**), names the sections you edited, and then **stops and asks what should
|
|
200
|
+
change**. No change request → no work.
|
|
201
|
+
|
|
202
|
+
`RESUME.md` is written by the lane itself, never by a dispatched agent — a
|
|
203
|
+
dispatch inside a stop sequence lets a stop fail because a subagent did — and it
|
|
204
|
+
lives in `.claude/orc/run/<slug>/`, the one place `orc resume` and `orc run list`
|
|
205
|
+
actually look. **It is rewritten at the end of every WAVE**, not just every
|
|
206
|
+
cycle: a usage-limit kill between waves has to leave something on disk that says
|
|
207
|
+
where it stopped, and the section files already say what is done.
|
|
208
|
+
|
|
209
|
+
## The CLI
|
|
210
|
+
|
|
211
|
+
| Command | Exit codes |
|
|
212
|
+
|---|---|
|
|
213
|
+
| `orc doc list` | 0 |
|
|
214
|
+
| `orc doc status <slug>` | **0 complete · 1 in progress · 2 unknown slug** |
|
|
215
|
+
| `orc doc show <slug> [--section <id>]` | 0 · 2 unknown |
|
|
216
|
+
| `orc doc map <slug>` | 0 · 2 no document |
|
|
217
|
+
| `orc doc plan <slug> --role write\|check\|edit` | 0 work to do · 1 nothing to do |
|
|
218
|
+
| `orc doc outline <slug> [--set <path>]` | 0 · 2 unknown |
|
|
219
|
+
| `orc doc parts <slug> [--confirm <ids>]` | 0 all written · 1 something missing or unconfirmed |
|
|
220
|
+
| `orc doc compile <slug> [--partial]` | 0 · **1 missing required section (named)** · 2 unknown |
|
|
221
|
+
| `orc doc split <slug> [--section <id> --by-heading]` | 0 · 1 nothing to split · 2 unparseable |
|
|
222
|
+
| `orc doc migrate <slug> [--clean]` | 0 migrated or already v2 · **1 refused (named)** |
|
|
223
|
+
| `orc doc mode <slug> [--set partial|all]` | 0 · 2 unknown |
|
|
224
|
+
| `orc doc extract <slug> --section <id>` | alias · 0 · 2 unknown section |
|
|
225
|
+
| `orc doc splice <slug>` | alias · 0 · **1 hash conflict** |
|
|
226
|
+
| `orc doc assemble <slug>` | alias → compile · 0 · 1 missing required section |
|
|
227
|
+
| `orc doc lint <slug\|path> [--target <t>]` | **0 clean · 1 findings · 2 unreadable** |
|
|
228
|
+
| `orc doc templates` · `orc doc targets` | 0 |
|
|
229
|
+
| `orc doc init <slug> --type <t>` | 0 · 1 exists · 2 bad args |
|
|
230
|
+
|
|
231
|
+
Every read speaks `--json`: one object on stdout, and the exit code the human
|
|
232
|
+
path would use. An empty result is an ANSWER, so it still returns its object.
|
|
233
|
+
|
|
234
|
+
## Config
|
|
235
|
+
|
|
236
|
+
| Key | Default | What it does |
|
|
237
|
+
|---|---|---|
|
|
238
|
+
| `doc_max_lines_per_agent` | `400` | write/read budget per dispatched agent |
|
|
239
|
+
| `doc_max_parallel` | `2` | agents per wave. **Hard cap 2**; larger is clamped and the clamp is announced |
|
|
240
|
+
| `doc_write_mode` | `ask` | `partial` writes ONE wave and stops · `all` writes every wave · `ask` makes it a question, asked once per run and stored |
|
|
241
|
+
| `doc_language` | `en` | the D4 default, always confirmable per run |
|
|
242
|
+
| `doc_dir` | `orc/orc-doc` | where the folders live |
|
|
243
|
+
|
|
244
|
+
`opus5_only` is a **no-op** here: both agents are already `claude-opus-5-5`. The
|
|
245
|
+
lane is *unaffected*, not exempt.
|
|
246
|
+
|
|
247
|
+
## Where it sits
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
/orc-brainstorm → which direction?
|
|
251
|
+
/orc-grill → what exactly is it?
|
|
252
|
+
↓ ("write this up")
|
|
253
|
+
/orc-doc → write it down so other people can act on it
|
|
254
|
+
↓
|
|
255
|
+
/orc-challenge → is what I wrote actually good enough? (a SEPARATE session)
|
|
256
|
+
↓
|
|
257
|
+
/orc-analyze → /orc-plan → /orc build it
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
`/orc-wiki` and `/orc-learn` generate documents derived from the **code**.
|
|
261
|
+
`/orc-doc` writes documents derived from **what you decided**, for people who may
|
|
262
|
+
never open the repository. No overlap, no shared writer.
|