omniconductor 0.3.0 → 0.4.1
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 +24 -0
- package/README.md +43 -28
- package/core/anti-patterns/README.md +6 -2
- package/core/anti-patterns/no-sub-agent-dispatch.md +9 -0
- package/core/anti-patterns/output-verbosity-narration.md +72 -0
- package/core/anti-patterns/single-monolithic-rule-file.md +8 -1
- package/core/anti-patterns/skill-eager-load.md +1 -1
- package/core/universal-rules/meta-discipline.md +40 -4
- package/core/universal-rules/spec-as-you-go.md +13 -1
- package/docs/CONTEXT-EDITING-GUIDE.md +58 -0
- package/docs/PROMPT-CACHING-GUIDE.md +111 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to CONDUCTOR are documented here.
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/); versioning is [SemVer](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.4.1] — 2026-07-06
|
|
9
|
+
|
|
10
|
+
### Fixed (docs)
|
|
11
|
+
- **README status line** corrected to **v0.4.0** and the instruction-fidelity token-economy work re-labelled from "unreleased" to shipped (it landed in 0.4.0) — the 0.4.0 npm package page had still shown v0.3.0.
|
|
12
|
+
- **Public GitHub Releases backfilled** (v0.3.0, v0.4.0) so the repo's Latest release matches the npm version.
|
|
13
|
+
|
|
14
|
+
## [0.4.0] — 2026-07-05
|
|
15
|
+
|
|
16
|
+
### Added — Token-economy: instruction-fidelity-first
|
|
17
|
+
- **Lossless-before-lossy context reduction** — `meta-discipline.md` §5.7 rewritten to prefer clearing stale tool results (never touches user instructions) over lossy summarization, with four mandatory compaction safeguards (durable instructions in CLAUDE.md, explicit `/compact` preservation, `/clear` between tasks, re-verify after compaction). New `docs/CONTEXT-EDITING-GUIDE.md` (Claude-only) documents the API context-editing mechanism + memory tool, primary-source cited. — **ADR-035**.
|
|
18
|
+
- **Output brevity** — new `meta-discipline.md` §5.9 + **Anti-Pattern 08 (`output-verbosity-narration`)**: answer-first, no re-printed file bodies, right-sized format (output is ~5× input), with an explicit fidelity guard. Anti-pattern count **7 → 8**. — **ADR-036**.
|
|
19
|
+
- **Referenced-fact currency rule** — `spec-as-you-go.md` §2.2: when a change alters a fact other docs state (a count / list / table / version / cross-reference), grep for the old value and update **every** place in the same turn, or record a new fact that has no home.
|
|
20
|
+
- **npm now ships the guides** — `docs/PROMPT-CACHING-GUIDE.md` + `docs/CONTEXT-EDITING-GUIDE.md` added to the package `files` allowlist (the token-economy rules reference them).
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- **`meta-discipline.md` §5.5** — concrete Tool Search Tool `defer_loading` guidance (>85% tool-context reduction); mirrored into Anti-Pattern 07.
|
|
24
|
+
- **`meta-discipline.md` §6** — current model lineup/pricing snapshot; §6.4 recast as a fidelity rule (cheaper models guess missing params where Opus asks). — **ADR-036**.
|
|
25
|
+
- **Anti-Pattern 04 (`no-sub-agent-dispatch`)** — honest caveat: dispatch saves the *lead's* context and improves fidelity via isolation, but *raises* total tokens (~4×/15×). — **ADR-036**.
|
|
26
|
+
- **Anti-Pattern 03 (`single-monolithic-rule-file`)** — adds the fidelity axis (attention-budget / context-rot dilution, "minimal ≠ short", cache-vs-attention placement). — **ADR-036**.
|
|
27
|
+
- **README brought to current 0.4.0 state** — tool-coverage matrix corrected to *tool-capability vs CONDUCTOR-emission* (all six tools ship hooks / sub-agents / model routing; only emission is Claude-only today — ADR-031); status line, recipe counts, and the self-improvement + token-economy features surfaced.
|
|
28
|
+
- **Public-facing URLs** — README clone commands and `package.json` `repository` / `homepage` / `bugs` now point to the public repo (`omniconductor`) instead of the private working repo, so npm and public-README users get working links.
|
|
29
|
+
|
|
6
30
|
## [0.3.0] — 2026-07-05
|
|
7
31
|
|
|
8
32
|
### Added — Self-improvement / Reflector (opt-in, propose-only)
|
package/README.md
CHANGED
|
@@ -6,7 +6,11 @@ Write your project's rules, workflow, and discipline ONCE. Install into any AI c
|
|
|
6
6
|
|
|
7
7
|
> Born from one year of production iteration at LFamily Labs — the rules, agents, hooks, and memory patterns that survived real shipping pressure.
|
|
8
8
|
|
|
9
|
-
> **Status (v0.
|
|
9
|
+
> **Status (v0.4.0 — 2026-07-05)**: All 6 adapters ship a working `transform.sh` — **Claude Code** (full: rules + hooks + sub-agents + per-call model routing), **Cursor**, **GitHub Copilot** (one install covers 5 IDEs), **Gemini CLI** (`GEMINI.md` + `.gemini/styleguide.md`), **Codex** (`AGENTS.md`), **Windsurf / Devin Desktop** (`.windsurfrules` + `.devin/rules/*.md`). Published to npm as [`omniconductor`](https://www.npmjs.com/package/omniconductor) (v0.4.0). Output is emit-verified (format-validator + CI on all 6); live runtime consumption by Gemini / Codex / Windsurf is adopter-pending — see [`docs/ADAPTER-LIVE-VERIFICATION.md`](./docs/ADAPTER-LIVE-VERIFICATION.md). Manual install ([`docs/MANUAL-INSTALL.md`](./docs/MANUAL-INSTALL.md)) remains a fallback.
|
|
10
|
+
>
|
|
11
|
+
> **New in 0.4.0**: instruction-fidelity-first **token economy** — reduce tokens without distorting your instructions: lossless context editing before lossy compaction, an output-brevity discipline, and a new "verbose output" anti-pattern (ADR-035/036; [`docs/CONTEXT-EDITING-GUIDE.md`](./docs/CONTEXT-EDITING-GUIDE.md)). **In 0.3.0**: an opt-in **self-improvement / Reflector loop** (reads session trajectories + git and *proposes* lessons — propose-only — on all six tools; `--recipes=self-improvement`, ADR-030/032/033) + a first-party-verified **compatibility-matrix correction** (all six tools ship hooks / sub-agents / per-task model routing, retiring the old "Claude-only" view; ADR-031). Full history: [`CHANGELOG.md`](./CHANGELOG.md).
|
|
12
|
+
>
|
|
13
|
+
> Marketplace listing (VSCode Marketplace + Open VSX) remains **Phase 2** (post-0.4) — see ADR-023.
|
|
10
14
|
|
|
11
15
|
---
|
|
12
16
|
|
|
@@ -37,7 +41,7 @@ Write your project's rules, workflow, and discipline ONCE. Install into any AI c
|
|
|
37
41
|
|
|
38
42
|
- **Layer 1 (`core/`) — Universal**: 도구 독립적인 워크플로 정의, 룰 텍스트, 문서 템플릿, 4-type 메모리 패턴
|
|
39
43
|
- **Layer 2 (`adapters/<tool>/`) — Adapter**: `core/` 의 universal 자료를 각 도구의 네이티브 포맷으로 변환 (`.claude/` / `.cursor/rules/*.mdc` / `.github/instructions/*.instructions.md` / `GEMINI.md` / `AGENTS.md` / `.windsurfrules`)
|
|
40
|
-
- **Layer 3 — Tool-native (정직한 한계)**:
|
|
44
|
+
- **Layer 3 — Tool-native (정직한 한계)**: 2026년 기준 6개 도구 모두 hooks·sub-agent·per-call model routing 을 **지원**한다 (ADR-031). 다만 CONDUCTOR 어댑터가 이를 실제로 **emit 하는 건 현재 Claude 뿐** (나머지는 Phase 2). "도구가 못 함"이 아니라 "CONDUCTOR emission gap" 임을 정직하게 문서화 — ADR-004 / ADR-031. (Windsurf 는 session/stop hook 이벤트가 없는 유일한 실제 예외.)
|
|
41
45
|
|
|
42
46
|
### 강제하는 워크플로
|
|
43
47
|
|
|
@@ -53,7 +57,7 @@ Write your project's rules, workflow, and discipline ONCE. Install into any AI c
|
|
|
53
57
|
|
|
54
58
|
```bash
|
|
55
59
|
# 1. CONDUCTOR 클론
|
|
56
|
-
git clone https://github.com/lee77840/
|
|
60
|
+
git clone https://github.com/lee77840/omniconductor ~/conductor
|
|
57
61
|
|
|
58
62
|
# 2. 적용할 프로젝트로 이동
|
|
59
63
|
cd ~/your-project
|
|
@@ -84,7 +88,7 @@ Three layers:
|
|
|
84
88
|
|
|
85
89
|
- **Layer 1 (`core/`) — Universal**: tool-agnostic workflow definitions, rule text, doc templates, 4-type memory pattern.
|
|
86
90
|
- **Layer 2 (`adapters/<tool>/`) — Adapter**: per-tool transform script that reads `core/` and writes tool-native files.
|
|
87
|
-
- **Layer 3 — Tool-native (honest limits)**:
|
|
91
|
+
- **Layer 3 — Tool-native (honest limits)**: as of 2026 **all six tools ship hooks, sub-agents, and per-call model routing** (ADR-031) — but CONDUCTOR's adapters currently *emit* them for **Claude only** (the rest is Phase 2). The honest limit is CONDUCTOR's emission gap, not a tool limitation, and nothing is fake-polyfilled. See ADR-004 / ADR-031. (Windsurf / Devin Desktop is the one real exception — no session/stop hook events.)
|
|
88
92
|
|
|
89
93
|
### Why this exists
|
|
90
94
|
|
|
@@ -105,7 +109,7 @@ Three layers:
|
|
|
105
109
|
> Simplest (no clone): `npx omniconductor init --target=claude .` — the clone+bash steps below are equivalent.
|
|
106
110
|
|
|
107
111
|
```bash
|
|
108
|
-
git clone https://github.com/lee77840/
|
|
112
|
+
git clone https://github.com/lee77840/omniconductor ~/conductor
|
|
109
113
|
cd ~/your-project
|
|
110
114
|
bash ~/conductor/adapters/claude/transform.sh . \
|
|
111
115
|
--recipes=monorepo,coding-conventions \
|
|
@@ -121,20 +125,27 @@ Other tools: see [Install paths](#install-paths). Windows: see [Cross-platform](
|
|
|
121
125
|
|
|
122
126
|
## Tool coverage matrix
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|---|---|---|---|---|---|---|
|
|
126
|
-
| **Claude Code** | ✅ Full (`adapters/claude/`) | ✅ lazy load | ✅ Stop / PreToolUse | ✅ 6 named agents | ✅ per-call `model:` | `bash adapters/claude/transform.sh <target>` |
|
|
127
|
-
| **Cursor** | ✅ Full (`adapters/cursor/`) | ✅ lazy load (`.mdc` globs) | ❌ | ❌ rule reminder only | ❌ | `bash adapters/cursor/transform.sh <target>` |
|
|
128
|
-
| **GitHub Copilot** | ✅ Full (`adapters/copilot/`) | ✅ `applyTo:` scoping | ❌ | ❌ | ❌ | `bash adapters/copilot/transform.sh <target>` — 1 install covers VSCode + Cursor + Windsurf + JetBrains + Neovim |
|
|
129
|
-
| **Gemini CLI** | ✅ Full (`adapters/gemini/`) | ✅ single bundle (`GEMINI.md`) | ❌ | ❌ | ❌ | `bash adapters/gemini/transform.sh <target>` (+ `.gemini/styleguide.md` opt-in) |
|
|
130
|
-
| **Codex (OpenAI)** | ✅ Full (`adapters/codex/`) | ✅ single bundle (`AGENTS.md`) | ❌ | ❌ | ❌ | `bash adapters/codex/transform.sh <target>` |
|
|
131
|
-
| **Windsurf** | ✅ Full (`adapters/windsurf/`) | ✅ baseline (`.windsurfrules`) + `.devin/rules/*` | ❌ | ❌ | ❌ | `bash adapters/windsurf/transform.sh <target>` |
|
|
128
|
+
Separate two things (per [`docs/COMPATIBILITY-MATRIX.md`](./docs/COMPATIBILITY-MATRIX.md), re-verified against first-party sources 2026-07-04, ADR-031):
|
|
132
129
|
|
|
133
|
-
|
|
130
|
+
- **Tool capability** — as of 2026, **all six tools ship hooks, sub-agents, custom named agents, per-task model routing, and commands.** The old "these are Claude-only" view is out of date. (Windsurf / Devin Desktop is the one partial: it has hooks but no session/stop events.)
|
|
131
|
+
- **CONDUCTOR emission** — what an adapter actually *compiles to today*. Claude emits the full set; every tool also emits the opt-in Reflector loop (ADR-032/033). Emitting the rest of the hook / agent set on the five non-Claude adapters is **Phase 2**.
|
|
134
132
|
|
|
135
|
-
|
|
133
|
+
The columns below show **CONDUCTOR emission today** (⚠️ = the tool supports it, adapter emission is Phase 2 — a CONDUCTOR gap, not a tool limitation):
|
|
136
134
|
|
|
137
|
-
|
|
135
|
+
| Tool | Adapter (rules) | Hooks | Sub-agents | Model routing | Recommended install |
|
|
136
|
+
|---|---|---|---|---|---|
|
|
137
|
+
| **Claude Code** | ✅ Full, lazy load | ✅ emitted (Stop / PreToolUse) | ✅ emitted (6 named agents; 7 with `self-improvement`) | ✅ emitted (per-call `model:`) | `bash adapters/claude/transform.sh <target>` |
|
|
138
|
+
| **Cursor** | ✅ Full, lazy load (`.mdc` globs) | ⚠️ tool ✅ · emit Phase 2 | ⚠️ tool ✅ · Claude-only by design (ADR-004) | ⚠️ tool ✅ · emit Phase 2 | `bash adapters/cursor/transform.sh <target>` |
|
|
139
|
+
| **GitHub Copilot** | ✅ Full (`applyTo:` scoping) | ⚠️ tool ✅ · emit Phase 2 | ⚠️ tool ✅ · Claude-only by design | ⚠️ tool ✅ · emit Phase 2 | `bash adapters/copilot/transform.sh <target>` — 1 install covers VSCode + Cursor + Windsurf + JetBrains + Neovim |
|
|
140
|
+
| **Gemini CLI** | ✅ Full (`GEMINI.md`) | ⚠️ tool ✅ · emit Phase 2 | ⚠️ tool ✅ · Claude-only by design | ⚠️ tool ✅ · emit Phase 2 | `bash adapters/gemini/transform.sh <target>` (+ `.gemini/styleguide.md` opt-in) |
|
|
141
|
+
| **Codex (OpenAI)** | ✅ Full (`AGENTS.md`) | ⚠️ tool ✅ · emit Phase 2 | ⚠️ tool ✅ · Claude-only by design | ⚠️ tool ✅ · emit Phase 2 | `bash adapters/codex/transform.sh <target>` |
|
|
142
|
+
| **Windsurf / Devin Desktop** | ✅ Full (`.windsurfrules` + `.devin/rules/*`) | ⚠️ partial (no session/stop events) · emit Phase 2 | ⚠️ tool ✅ (Devin Local) · Claude-only by design | ⚠️ tool ✅ · emit Phase 2 | `bash adapters/windsurf/transform.sh <target>` |
|
|
143
|
+
|
|
144
|
+
Full per-feature matrix + first-party footnotes: [`docs/COMPATIBILITY-MATRIX.md`](./docs/COMPATIBILITY-MATRIX.md).
|
|
145
|
+
|
|
146
|
+
> **CLI wrapper**: `npx omniconductor init --target=<tool> <dir>` (published to npm) — or `node bin/omniconductor.js init --target=<tool> <dir>` from a local clone — dispatches to these same adapter scripts, with `list`, `--dry-run`, `--recipes=`, and `--uninstall`.
|
|
147
|
+
|
|
148
|
+
> **What you keep going Claude → other tools**: all rule text, doc templates, the 4-type memory pattern, the workflow phases, and the opt-in Reflector loop (emitted on all six). **What is still Claude-only in CONDUCTOR's *emission* today**: auto-blocking hooks, per-call model routing, sub-agent dispatch — a Phase-2 emission gap, **not** a tool limitation (the tools support them; Windsurf is the one real exception, for Stop-style hooks). The discipline is portable; the enforcement is becoming portable as adapter emission catches up.
|
|
138
149
|
|
|
139
150
|
---
|
|
140
151
|
|
|
@@ -165,7 +176,7 @@ Single command per tool. Adapter detects the target's existing state, runs an in
|
|
|
165
176
|
#### Mac / Linux
|
|
166
177
|
|
|
167
178
|
```bash
|
|
168
|
-
git clone https://github.com/lee77840/
|
|
179
|
+
git clone https://github.com/lee77840/omniconductor ~/conductor
|
|
169
180
|
cd ~/your-project
|
|
170
181
|
|
|
171
182
|
# Pick your tool:
|
|
@@ -179,7 +190,7 @@ bash ~/conductor/adapters/copilot/transform.sh . --recipes=monorepo,coding-conv
|
|
|
179
190
|
```bash
|
|
180
191
|
# 1. Install Git for Windows: https://git-scm.com/download/win
|
|
181
192
|
# 2. Open Git Bash terminal
|
|
182
|
-
git clone https://github.com/lee77840/
|
|
193
|
+
git clone https://github.com/lee77840/omniconductor /c/conductor
|
|
183
194
|
cd /c/Users/me/Projects/my-app
|
|
184
195
|
|
|
185
196
|
bash /c/conductor/adapters/claude/transform.sh . --recipes=monorepo,coding-conventions
|
|
@@ -192,7 +203,7 @@ bash /c/conductor/adapters/claude/transform.sh . --recipes=monorepo,coding-conve
|
|
|
192
203
|
```bash
|
|
193
204
|
# Inside WSL2 Ubuntu — same commands as Mac/Linux
|
|
194
205
|
wsl
|
|
195
|
-
git clone https://github.com/lee77840/
|
|
206
|
+
git clone https://github.com/lee77840/omniconductor ~/conductor
|
|
196
207
|
cd ~/your-project
|
|
197
208
|
bash ~/conductor/adapters/claude/transform.sh . --recipes=monorepo,coding-conventions
|
|
198
209
|
```
|
|
@@ -278,7 +289,7 @@ Want weekly session self-review? YES → self-improvement
|
|
|
278
289
|
| Web + mobile (single language) | `web-mobile-parity, coding-conventions` |
|
|
279
290
|
| Multi-locale SaaS | `i18n, coding-conventions` |
|
|
280
291
|
| Monorepo SaaS | `monorepo, coding-conventions` |
|
|
281
|
-
| Full-stack (monorepo + multi-locale + web/mobile) |
|
|
292
|
+
| Full-stack (monorepo + multi-locale + web/mobile) | `monorepo, i18n, web-mobile-parity, coding-conventions` |
|
|
282
293
|
|
|
283
294
|
---
|
|
284
295
|
|
|
@@ -291,7 +302,7 @@ Usage: bash adapters/<tool>/transform.sh <target-project> [options]
|
|
|
291
302
|
| Option | Description |
|
|
292
303
|
|---|---|
|
|
293
304
|
| `<target-project>` | Project directory to install into (required). `.` for current dir. |
|
|
294
|
-
| `--recipes=A,B,C` | Comma-separated recipes from the
|
|
305
|
+
| `--recipes=A,B,C` | Comma-separated recipes from the 11 in `core/recipes/`. |
|
|
295
306
|
| `--dry-run` | Preview only — no files written. |
|
|
296
307
|
| `--measure-baseline` | Run `tools/measure-tokens.sh --latest` after install; save CSV; auto-show anti-patterns if cache hit < 95%. |
|
|
297
308
|
| `--no-prompt` | Skip wizard, apply defaults (CI-safe). Combine with `--recipes` and `--measure-baseline` as needed. |
|
|
@@ -300,7 +311,7 @@ Usage: bash adapters/<tool>/transform.sh <target-project> [options]
|
|
|
300
311
|
| `--force` | Bypass uninstall safety gates (active rebase/merge, missing manifest). |
|
|
301
312
|
| `-h` `--help` | Print usage. |
|
|
302
313
|
|
|
303
|
-
**Recipe names
|
|
314
|
+
**Recipe names** (11): `web-mobile-parity`, `i18n`, `monorepo`, `branch-strategy`, `auto-mock-data`, `coding-conventions`, `tdd`, `debugging`, `database-discipline`, `design-system`, `self-improvement`.
|
|
304
315
|
|
|
305
316
|
#### File overwrite behavior
|
|
306
317
|
|
|
@@ -399,7 +410,7 @@ diff CLAUDE.md.conductor-backup-* CLAUDE.md
|
|
|
399
410
|
|
|
400
411
|
#### "recipe not found" warning
|
|
401
412
|
|
|
402
|
-
Check recipe name spelling. Available: `web-mobile-parity`, `i18n`, `monorepo`, `branch-strategy`, `auto-mock-data`, `coding-conventions`, `tdd`, `debugging`, `database-discipline`, `design-system`.
|
|
413
|
+
Check recipe name spelling. Available: `web-mobile-parity`, `i18n`, `monorepo`, `branch-strategy`, `auto-mock-data`, `coding-conventions`, `tdd`, `debugging`, `database-discipline`, `design-system`, `self-improvement`.
|
|
403
414
|
|
|
404
415
|
#### "Tool doesn't recognize the new rules"
|
|
405
416
|
|
|
@@ -413,7 +424,7 @@ chmod +x .claude/hooks/*.sh # grant if missing
|
|
|
413
424
|
# Restart Claude Code
|
|
414
425
|
```
|
|
415
426
|
|
|
416
|
-
|
|
427
|
+
All six tools now ship hooks (Windsurf / Devin Desktop is partial — no session/stop events; ADR-031). CONDUCTOR *emits* hook configs for **Claude only** today (non-Claude hook emission is Phase 2), so the files under `.claude/hooks/` are Claude-specific — but hooks as a capability are not.
|
|
417
428
|
|
|
418
429
|
#### "Disable one hook"
|
|
419
430
|
|
|
@@ -448,7 +459,7 @@ Claude Code uses `~/.claude/projects/.../memory/`; other tools use `docs/memory/
|
|
|
448
459
|
|
|
449
460
|
#### Architecture Decision Records (`docs/DESIGN-DECISIONS.md`)
|
|
450
461
|
|
|
451
|
-
|
|
462
|
+
36 ADRs cover the foundational decisions. Highlights:
|
|
452
463
|
|
|
453
464
|
| ADR | Topic | Why it matters |
|
|
454
465
|
|---|---|---|
|
|
@@ -460,17 +471,21 @@ Claude Code uses `~/.claude/projects/.../memory/`; other tools use `docs/memory/
|
|
|
460
471
|
| **ADR-020** | `--uninstall` + manifest tracking | Why install is reversible |
|
|
461
472
|
| **ADR-021** | Cursor adapter (`adapters/cursor/transform.sh`) | Adapter design for `.cursor/rules/*.mdc` |
|
|
462
473
|
| **ADR-022** | Copilot adapter (single-format, 5-IDE coverage) | Why one Copilot install covers VSCode + Cursor + Windsurf + JetBrains + Neovim |
|
|
463
|
-
| **ADR-023** | Marketplace strategy + cross-platform | Phase 1 (now: bash) → Phase 2 (
|
|
474
|
+
| **ADR-023** | Marketplace strategy + cross-platform | Phase 1 (now: bash + npm) → Phase 2 (post-0.3: VSCode extension) |
|
|
475
|
+
| **ADR-030** | Self-improvement is opt-in, propose-only | Nothing learns silently — the Reflector proposes, you approve |
|
|
476
|
+
| **ADR-035/036** | Instruction-fidelity-first token economy | Reduce tokens without distorting your instructions (context editing, output brevity, `docs/CONTEXT-EDITING-GUIDE.md`) |
|
|
464
477
|
|
|
465
478
|
Full list and bodies: [`docs/DESIGN-DECISIONS.md`](./docs/DESIGN-DECISIONS.md).
|
|
466
479
|
|
|
480
|
+
**What changed between versions:** see [`CHANGELOG.md`](./CHANGELOG.md) — every release and its Added / Changed entries, newest first.
|
|
481
|
+
|
|
467
482
|
---
|
|
468
483
|
|
|
469
484
|
## FAQ
|
|
470
485
|
|
|
471
486
|
**Q: Why no marketplace install today?**
|
|
472
487
|
|
|
473
|
-
A: ADR-023 — the bash adapter is the validated source of truth. A marketplace extension is Phase 2
|
|
488
|
+
A: ADR-023 — the bash adapter is the validated source of truth. A marketplace extension is Phase 2 (post-0.3); the wrapper depends on the adapter being stable in adopter projects first.
|
|
474
489
|
|
|
475
490
|
**Q: Cursor adopters — do I install from VSCode Marketplace or Open VSX?**
|
|
476
491
|
|
|
@@ -478,7 +493,7 @@ A: Open VSX. Cursor is a VSCode fork but cannot pull from Microsoft's marketplac
|
|
|
478
493
|
|
|
479
494
|
**Q: My project uses Go / Python / Rust, not TypeScript.**
|
|
480
495
|
|
|
481
|
-
A: Skip `coding-conventions` (TypeScript-specific). The 5 universal rule bundles and the other
|
|
496
|
+
A: Skip `coding-conventions` (TypeScript-specific). The 5 universal rule bundles and the other 10 recipes are stack-agnostic.
|
|
482
497
|
|
|
483
498
|
**Q: Windows native PowerShell?**
|
|
484
499
|
|
|
@@ -8,6 +8,7 @@ linked_rules:
|
|
|
8
8
|
- workflow (W2 docs-first, W4 7-step)
|
|
9
9
|
linked_docs:
|
|
10
10
|
- docs/PROMPT-CACHING-GUIDE.md
|
|
11
|
+
- docs/CONTEXT-EDITING-GUIDE.md
|
|
11
12
|
- docs/KPI.md
|
|
12
13
|
---
|
|
13
14
|
|
|
@@ -28,6 +29,7 @@ CONDUCTOR's universal rules describe the *correct* patterns. This catalog descri
|
|
|
28
29
|
| 05 | [Frequent rule-file edits](frequent-rule-file-edit.md) | MEDIUM | -20% to -40% / week | > 3 rule-file commits per week |
|
|
29
30
|
| 06 | [Tool-call spam](tool-call-spam.md) | MEDIUM | latency + output spike | tool calls / turn > 1.5 |
|
|
30
31
|
| 07 | [Skill / MCP eager-load](skill-eager-load.md) | MEDIUM | prefix bloat, hidden multipliers | 30+ eager skills or broad path triggers |
|
|
32
|
+
| 08 | [Verbose output / narration](output-verbosity-narration.md) | MEDIUM | output-cost, not cache-hit | output tokens/turn > 1200 with few tool calls |
|
|
31
33
|
|
|
32
34
|
Severity legend (estimated impact on cache hit rate, derived from Anthropic prompt-caching cost model + P1.5 baseline):
|
|
33
35
|
- **HIGH** ≈ -50% or more
|
|
@@ -51,7 +53,7 @@ When efficiency feels off — costs creeping up, latency climbing, sessions gett
|
|
|
51
53
|
|---|---|---|
|
|
52
54
|
| Cache hit rate | ≥ 95% | < 90% — start at Anti-Pattern 01 |
|
|
53
55
|
| Tool calls / turn | ≤ 0.8 | > 1.2 — start at Anti-Pattern 06 |
|
|
54
|
-
| Output tokens / turn | ≤ 800 | > 1200 — Anti-Pattern 04 + 06 likely |
|
|
56
|
+
| Output tokens / turn | ≤ 800 | > 1200 — Anti-Pattern 04 + 06 + 08 likely |
|
|
55
57
|
| Cache-write / session | ≤ 30M | > 50M — Anti-Pattern 02 + 03 + 07 likely |
|
|
56
58
|
| Dispatches / session | 30-150 | 0 on a multi-feature session — Anti-Pattern 04 |
|
|
57
59
|
|
|
@@ -62,7 +64,7 @@ When efficiency feels off — costs creeping up, latency climbing, sessions gett
|
|
|
62
64
|
| Cache hit rate dropped this week, no other change | 01, 05 |
|
|
63
65
|
| Session JSONL ballooning past 100MB | 02, 04, 07 |
|
|
64
66
|
| Latency creeping per turn over the session | 02, 04 |
|
|
65
|
-
| High output cost on apparently simple tasks | 04, 06 |
|
|
67
|
+
| High output cost on apparently simple tasks | 04, 06, 08 |
|
|
66
68
|
| First-turn cost (before user types anything) is large | 03, 07 |
|
|
67
69
|
| Cache hit rate fine inside session but resets each new session | 05 |
|
|
68
70
|
|
|
@@ -76,6 +78,7 @@ When efficiency feels off — costs creeping up, latency climbing, sessions gett
|
|
|
76
78
|
- **CONDUCTOR P1.5 baseline** (`docs/KPI.md`, 2026-05-07) — 8 sessions on a single active project, 100% cache hit rate ceiling, avg 0.61 tool calls / turn, avg 27.4M cache-write / session.
|
|
77
79
|
- **`core/universal-rules/meta-discipline.md` §5** — token economy rules (Read discipline, hidden injection, dispatch budget, cache-friendly prompt order, tool description compression, touched-file rule scoping).
|
|
78
80
|
- **`docs/PROMPT-CACHING-GUIDE.md`** — full Claude-adapter caching guide.
|
|
81
|
+
- **`docs/CONTEXT-EDITING-GUIDE.md`** — instruction-fidelity-first context reduction (lossless `clear_tool_uses` before lossy `/compact`).
|
|
79
82
|
|
|
80
83
|
The reference project measured in `KPI.md` is one specific monorepo (the originating workspace). Numbers in catalog entries are *estimates anchored to that baseline*. Other projects will see different absolute numbers but the same *direction* — the anti-patterns degrade efficiency on every codebase.
|
|
81
84
|
|
|
@@ -115,6 +118,7 @@ CONDUCTOR universal rules가 *옳은* 패턴을 기술한다면, 이 카탈로
|
|
|
115
118
|
| 05 | [잦은 룰 파일 수정](frequent-rule-file-edit.md) | MEDIUM | 주당 -20% ~ -40% | 주 3회 이상 룰 파일 commit |
|
|
116
119
|
| 06 | [tool-call 스팸](tool-call-spam.md) | MEDIUM | latency + output 폭증 | tool calls / turn > 1.5 |
|
|
117
120
|
| 07 | [Skill / MCP eager-load](skill-eager-load.md) | MEDIUM | prefix bloat, 숨은 multiplier | eager skill 30개 초과 또는 광범위 path trigger |
|
|
121
|
+
| 08 | [장황한 출력 / 나레이션](output-verbosity-narration.md) | MEDIUM | cache-hit 아닌 output 비용 | tool call 적은데 output tokens/turn > 1200 |
|
|
118
122
|
|
|
119
123
|
## 진단 워크플로 (요약)
|
|
120
124
|
|
|
@@ -47,6 +47,15 @@ Without dispatch:
|
|
|
47
47
|
|
|
48
48
|
**Reference data** (Conductor P1.5 baseline): the two largest sessions (219MB + 187MB) both contained heavy in-thread work; smaller sessions with active dispatch use stayed under 70MB. Avg dispatches/session = 104.6. The recommended P2 target is -25% dispatch *frequency* (batch related work) but the *anti-pattern* of zero dispatch is far more costly than over-dispatch.
|
|
49
49
|
|
|
50
|
+
### 2.1 Honest caveat — dispatch saves the *lead's* context, not the *total* token bill
|
|
51
|
+
|
|
52
|
+
Dispatch is a **context-isolation** win, not a raw total-token saver. Anthropic's own multi-agent reporting is explicit: single agents use ~4× the tokens of a chat interaction, and multi-agent systems ~15× — because every dispatched agent runs its own context window and reasoning. What dispatch buys is:
|
|
53
|
+
|
|
54
|
+
- a **lean leader context** (only the 0.5–2K summary returns, so the cacheable main thread stays small), and
|
|
55
|
+
- **higher fidelity** (the verbose intermediate state that would dilute the leader's attention budget stays quarantined in the sub-agent).
|
|
56
|
+
|
|
57
|
+
So dispatch when the *value of isolation* (a clean leader + focused attention) exceeds the *added total token cost* — i.e. verbose, self-contained subtasks. Do NOT dispatch work that needs the leader's full shared context or has tight back-and-forth dependencies: there the coordination overhead and duplicated context make a single thread both cheaper and more faithful. (Anthropic: tasks requiring "all agents to share the same context" or with "many dependencies between agents" are a poor fit; "most coding tasks involve fewer truly parallelizable tasks than research.")
|
|
58
|
+
|
|
50
59
|
## 3. Detection
|
|
51
60
|
|
|
52
61
|
**Quantitative**:
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
anti_pattern_id: output-verbosity-narration
|
|
3
|
+
name: "Verbose output / narration — the model over-explains every turn"
|
|
4
|
+
type: anti-pattern
|
|
5
|
+
severity: MEDIUM
|
|
6
|
+
hit_rate_impact: "output-cost, not cache-hit: output tokens priced ~5× input"
|
|
7
|
+
detection_method:
|
|
8
|
+
- measure-tokens (output tokens / turn vs KPI baseline)
|
|
9
|
+
- eyeball: preamble + restating the ask + re-printed file bodies
|
|
10
|
+
applies_to: ["all-tools"]
|
|
11
|
+
linked_rules:
|
|
12
|
+
- meta-discipline (5.9 output brevity)
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Anti-Pattern 08 — Verbose output / narration
|
|
16
|
+
|
|
17
|
+
## 1. What it is
|
|
18
|
+
|
|
19
|
+
The model spends output tokens on prose that carries no information the user needs: preamble ("Great question! Let me take a look…"), restating the request back, narrating each step before doing it, re-printing whole file bodies after an edit, and a long recap at the end. The *work* may be correct and efficient; the *response describing it* is 3–5× longer than the task warrants.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
# WRONG — 900-token answer to a one-line question
|
|
23
|
+
"That's a great question! Let me think through this carefully. First, I want to
|
|
24
|
+
make sure I understand what you're asking. You'd like me to rename the variable
|
|
25
|
+
`x` to `count`. Let me explain my approach before I begin. I'll start by locating
|
|
26
|
+
every usage… [200 more tokens] … Here is the full updated file: [entire 180-line
|
|
27
|
+
file re-printed] … To summarize what I did above, I renamed the variable…"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Unlike Anti-Pattern 06 (tool-call spam), which is about too many *tool calls*, this is about too much *generated prose* — it can spike even on a turn with zero tool calls.
|
|
31
|
+
|
|
32
|
+
## 2. Why it costs
|
|
33
|
+
|
|
34
|
+
- **Output is the expensive token.** Across the current lineup output is priced ~5× input (e.g. Opus 4.8 $5 in / $25 out per MTok). A turn that could answer in 150 output tokens but spends 900 costs 6× more on the priciest side of the meter.
|
|
35
|
+
- **It compounds into input next turn.** Every verbose response becomes conversation history that is re-read (cache-read, but still billed) on every subsequent turn until compaction. Bloated output today is bloated input for the rest of the session.
|
|
36
|
+
- **Re-printed file bodies are the worst offender** — a single re-printed 180-line file after an edit can be 2K+ output tokens that the Edit tool already captured for free.
|
|
37
|
+
|
|
38
|
+
Conductor's P1.5 baseline targets output tokens / turn ≤ 800; investigate above ~1200.
|
|
39
|
+
|
|
40
|
+
## 3. Detection
|
|
41
|
+
|
|
42
|
+
**Quantitative**:
|
|
43
|
+
```bash
|
|
44
|
+
bash tools/measure-tokens.sh --latest | grep -E 'output tokens'
|
|
45
|
+
```
|
|
46
|
+
- Output tokens / turn > 1200 sustained → red flag (KPI healthy ≤ 800).
|
|
47
|
+
- High output cost on turns with 0–1 tool calls → prose bloat, not tool bloat (distinguishes from Anti-Pattern 06).
|
|
48
|
+
|
|
49
|
+
**Eyeball signals**: responses that open with preamble, restate the user's request, re-print a file the model just edited, or close with a recap of what was said one screen up.
|
|
50
|
+
|
|
51
|
+
## 4. Fix / Alternative
|
|
52
|
+
|
|
53
|
+
**Per `meta-discipline.md` §5.9 (output brevity)**:
|
|
54
|
+
|
|
55
|
+
- **Answer first, no preamble/postamble.** Lead with the result; cut "Great question", "Let me…", and end-of-turn recaps.
|
|
56
|
+
- **Don't restate the ask.** The user knows what they asked.
|
|
57
|
+
- **Reference edits, don't reprint them.** After an Edit, say *what* changed and *where* (`file:line`) — the diff already exists; the file body does not need to re-enter the output stream.
|
|
58
|
+
- **Right-size the format.** One line for a one-line question; reserve tables/numbered steps for genuinely multi-part work.
|
|
59
|
+
- **Cap bounded artifacts** with `max_tokens` (Claude adapter) when the ceiling is known.
|
|
60
|
+
|
|
61
|
+
**Fidelity guard** (per §5.9): brevity trims prose, never substance. Keep every warning, caveat, failing-test result, or action the user must take. When forced to choose, completeness beats brevity.
|
|
62
|
+
|
|
63
|
+
## 5. Severity rating
|
|
64
|
+
|
|
65
|
+
**MEDIUM** — rarely session-breaking on its own, but a steady tax on every turn and the easiest anti-pattern to fix (it costs nothing to stop over-explaining). Worst when combined with re-printed file bodies on edit-heavy sessions.
|
|
66
|
+
|
|
67
|
+
| Response style | Output tokens / turn | Verdict |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| Answer-first, edits by reference | 100–400 | optimal |
|
|
70
|
+
| Some narration, occasional recap | 500–800 | acceptable |
|
|
71
|
+
| Preamble + restate + recap | 900–1400 | trim |
|
|
72
|
+
| Re-prints full files after edits | 1500+ | refactor habit |
|
|
@@ -41,7 +41,14 @@ The file IS cacheable, so cache hit rate stays high. The damage is on a differen
|
|
|
41
41
|
|
|
42
42
|
Conductor's P1.5 baseline shows avg cache-write per session = 27.4M tokens. The P2 target is -30% (to ~19M) — most of that reduction comes from splitting the monolithic file.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### 2.1 The second axis — it also degrades fidelity, not just cost
|
|
45
|
+
|
|
46
|
+
Cache-write is the measurable cost. The subtler damage is to **instruction fidelity**. Every token in the window draws down a finite *attention budget*; Anthropic's context-engineering guidance is explicit that "as the number of tokens in the context window increases, the model's ability to accurately recall information from that context decreases" (context rot). A 1,800-line rule file carrying 1,400 lines irrelevant to the current task doesn't just cost more — it **dilutes the model's attention across noise**, making it measurably likelier to miss or misapply the rules that *do* matter this turn.
|
|
47
|
+
|
|
48
|
+
Two corollaries:
|
|
49
|
+
|
|
50
|
+
- **"Minimal" ≠ "short".** The target is "the smallest set of *high-signal* tokens" — a complete rule stated once beats an exhaustive rule stated three times. Trim redundancy and irrelevance, not necessary substance.
|
|
51
|
+
- **Placement note (fidelity vs cache tension).** Prompt caching wants stable content (rules, CLAUDE.md) *first* in the prefix for cache-prefix matching (`PROMPT-CACHING-GUIDE.md`). Long-context recall, meanwhile, is strongest at the very start and very end and weakest in the middle ("lost in the middle"). These don't conflict if the prefix stays lean: the active per-turn instruction is the user's latest message, which already sits at the end. But a bloated rule prefix pushes the genuinely-relevant scoped rules into the low-attention middle — another reason to path-scope (§4) rather than pile everything into one always-loaded file.
|
|
45
52
|
|
|
46
53
|
```bash
|
|
47
54
|
# Find oversized rule files
|
|
@@ -65,7 +65,7 @@ In a 50-Read session those modifiers alone account for 10-30K tokens of cache-wr
|
|
|
65
65
|
|
|
66
66
|
2. **Path-scoped auto-injection** (per `meta-discipline.md` §5.6): when a tool offers path-triggered skills, ensure the path glob is *narrow*. The reference project pays for `<web-app>/app/**` triggering 3 skills because that glob is broad. Narrowing to `<web-app>/app/api/**/route.ts` (Next.js route handlers only) reduces trigger frequency by ~80%.
|
|
67
67
|
|
|
68
|
-
3. **
|
|
68
|
+
3. **Deferred tool loading** (per `meta-discipline.md` §5.5): when many tools / MCP servers are registered, load only tool *names* into the prefix and fetch full schemas on first use. On the Claude API this is the **Tool Search Tool** — set `defer_loading: true` per tool or on an `mcp_toolset`; Anthropic reports "over 85%" reduction in tool-definition context while preserving the prompt cache (a typical five-server MCP setup otherwise costs ~55K tokens in definitions before any work). At least one tool must stay non-deferred. Where no such API exists, route MCP servers through a lazy-loading gateway proxy to the same effect.
|
|
69
69
|
|
|
70
70
|
**Conductor's deferred-tool pattern**: this session uses `ToolSearch` to fetch tool schemas only when needed. That is the canonical example — tool names are visible in system reminders, but invoking a tool requires fetching its schema first. The same principle generalizes to skills.
|
|
71
71
|
|
|
@@ -180,26 +180,60 @@ Full guide: the CONDUCTOR repo's `docs/PROMPT-CACHING-GUIDE.md` (not installed i
|
|
|
180
180
|
|
|
181
181
|
### 5.5 Tool description compression
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
Tool schemas (names, descriptions, JSON Schemas) are billed as input tokens on **every** request, plus a small per-model tool-use system prompt. A typical multi-MCP setup (e.g. a code host + a chat platform + an error tracker + a couple of observability servers) can consume ~55K tokens in definitions before any work begins.
|
|
184
|
+
|
|
185
|
+
When many tools are loaded, use **deferred / lazy tool loading** so only tool *names* enter the prefix and full schemas are fetched on first use:
|
|
186
|
+
|
|
187
|
+
- **Claude API**: the Tool Search Tool (`defer_loading: true` per tool, or on an `mcp_toolset`) — Anthropic reports "over 85%" reduction in tool-definition context while preserving the prompt cache. At least one tool must stay non-deferred.
|
|
188
|
+
- **This session** already demonstrates the pattern via `ToolSearch`: tool names appear in system reminders, but invoking one requires fetching its schema first.
|
|
189
|
+
|
|
190
|
+
See Anti-Pattern 07 (skill / MCP eager-load).
|
|
184
191
|
|
|
185
192
|
### 5.6 Touched-file rule scoping
|
|
186
193
|
|
|
187
194
|
Use `paths:` (Claude) / `globs:` (Cursor) / `applyTo:` (Copilot) to scope rule files to the source areas they govern. A rule that fires only when a relevant file is touched is cheaper than a rule loaded into every turn.
|
|
188
195
|
|
|
189
|
-
### 5.7
|
|
196
|
+
### 5.7 Context reduction WITHOUT instruction loss
|
|
197
|
+
|
|
198
|
+
When the window fills, there are two ways to free budget — and they are NOT equal on fidelity. The orchestrator MUST prefer the lossless one.
|
|
199
|
+
|
|
200
|
+
- **Lossless (preferred) — drop stale tool results, not user turns.** Old tool outputs (file reads, command output, search hits) are the bulk of a bloated window and carry near-zero forward value once acted on. Clearing them frees budget without touching a single user instruction. On the Claude adapter this is the API context-editing feature (`clear_tool_uses`): it clears tool results / thinking blocks only and **never** user instructions or text messages. See `docs/CONTEXT-EDITING-GUIDE.md`.
|
|
201
|
+
- **Lossy (last resort) — summarizing older turns.** Summarization / compaction (`/compact`, auto-compact near the window cap) compresses **everything, including the user's own turns**, so it can silently drop or distort the original instruction. Use only after lossless clearing is exhausted.
|
|
202
|
+
|
|
203
|
+
**Compaction safeguards (mandatory whenever lossy compaction runs):**
|
|
204
|
+
|
|
205
|
+
1. Keep durable instructions in the always-loaded rule / context file (CLAUDE.md / project rules), not in conversation history — they survive compaction because they are re-loaded every turn.
|
|
206
|
+
2. When you must compact, pass explicit preservation instructions (e.g. `/compact keep the original task statement, acceptance criteria, and open TODOs verbatim`).
|
|
207
|
+
3. Between unrelated tasks, prefer a full reset (`/clear`) over letting the window bloat and then lossily compacting.
|
|
208
|
+
4. After any compaction, re-verify the compacted note still carries the original instruction before continuing. If in doubt, ask the user to restate — never proceed on a possibly-distorted summary.
|
|
190
209
|
|
|
191
|
-
|
|
210
|
+
Rationale: raw token count is a finite **attention budget**, and the goal is the *smallest set of high-signal tokens* — but never at the cost of the user's original intent. Stale tool results are the first thing to cut; user instructions are the last.
|
|
192
211
|
|
|
193
212
|
### 5.8 .ignorefile maintenance
|
|
194
213
|
|
|
195
214
|
Each tool has its own ignore file (`.claudeignore`, `.cursorignore`, `.aiderignore`, etc.). Keep these in sync — they prevent expensive accidental Reads of build outputs, large lockfiles, or vendored code.
|
|
196
215
|
|
|
216
|
+
### 5.9 Output brevity (output tokens cost ~5× input)
|
|
217
|
+
|
|
218
|
+
Output tokens are priced far higher than input — roughly 5× across the current lineup (e.g. Opus 4.8 is $5 in / $25 out per MTok). The orchestrator's own responses are a directly controllable cost:
|
|
219
|
+
|
|
220
|
+
- **Answer, don't narrate.** Skip preamble ("Great question! Let me…"), postamble, and restating what the user already said. Lead with the result.
|
|
221
|
+
- **Match verbosity to the task.** A one-line answer for a one-line question; reserve tables and step-by-steps for genuinely multi-part work.
|
|
222
|
+
- **Don't echo file bodies back.** After an edit, state what changed by reference — do not re-print the file.
|
|
223
|
+
- **Cap bounded artifacts.** Use `max_tokens` (Claude adapter) when the expected output has a known ceiling.
|
|
224
|
+
|
|
225
|
+
**Fidelity guard:** brevity trims *the model's prose*, never *required substance*. Do not drop a warning, a caveat, a failing-test result, or a step the user must act on in the name of being terse. When forced to choose, completeness beats brevity. (This trade-off caveat is CONDUCTOR discipline, not an Anthropic-documented rule.)
|
|
226
|
+
|
|
227
|
+
See Anti-Pattern 08 (verbose output / narration).
|
|
228
|
+
|
|
197
229
|
---
|
|
198
230
|
|
|
199
231
|
## 6. Model Routing (M3)
|
|
200
232
|
|
|
201
233
|
The orchestrator classifies every task and selects model tier explicitly. The user does NOT specify the model per request — that responsibility belongs to the orchestrator.
|
|
202
234
|
|
|
235
|
+
> **Lineup / pricing snapshot** (verified 2026-07, $ per MTok input / output): Haiku 4.5 **$1 / $5** · Sonnet 5 **$3 / $15** · Opus 4.8 **$5 / $25** · Fable 5 **$10 / $50**. Output is ~5× input at every tier (see §5.9). The tier labels below are generation-agnostic on purpose — prices and model names drift, so re-verify against Anthropic's pricing page before quoting.
|
|
236
|
+
|
|
203
237
|
### 6.1 Tier 1 — Conceptual / complex (Opus-tier)
|
|
204
238
|
|
|
205
239
|
Trigger if any of:
|
|
@@ -231,7 +265,9 @@ Trigger if any of:
|
|
|
231
265
|
|
|
232
266
|
### 6.4 Override rule of thumb
|
|
233
267
|
|
|
234
|
-
> When in doubt, **upgrade one tier**. Cost difference is modest; risk of
|
|
268
|
+
> When in doubt, **upgrade one tier**. Cost difference is modest; risk of a weaker model misinterpreting conceptual work is large.
|
|
269
|
+
|
|
270
|
+
This is a **fidelity** rule, not only cost caution. Anthropic's own tool-use guidance notes that on a missing required parameter, Opus "is much more likely to recognize a parameter is missing and ask," whereas a cheaper model "might also infer a reasonable value" — i.e. guess. On conceptual or instruction-dense work, a guess is instruction distortion. Route by fidelity risk, not by token price alone.
|
|
235
271
|
|
|
236
272
|
### 6.5 Surface the choice
|
|
237
273
|
|
|
@@ -63,7 +63,19 @@ When work is committed and pushed, the orchestrator MUST update the following do
|
|
|
63
63
|
|
|
64
64
|
When a task in CURRENT_WORK.md or TASKS.md is moved to status `completed`, it should be DELETED in the next session boundary, not left as historical clutter. The session log itself is the historical record. CURRENT_WORK.md is for what is current, not what was done last week. (Full rule: `operations.md` section 2.)
|
|
65
65
|
|
|
66
|
-
### 2.2
|
|
66
|
+
### 2.2 Referenced-fact currency — update EVERY place a changed fact lives
|
|
67
|
+
|
|
68
|
+
When a change alters a fact that other docs also state — a count ("7 anti-patterns"), an enumerated list (a catalog index, a table of files / recipes / tiers), a version or price, a cross-reference, or a renamed path — the same-turn sync includes **every** doc that repeats that fact, not only the file you edited. A value that is true in one file and stale in three others is a documentation bug; the reader trusts whichever file they open first, so a half-updated fact is worse than an obviously-old one.
|
|
69
|
+
|
|
70
|
+
The mechanic (before declaring the turn complete):
|
|
71
|
+
|
|
72
|
+
1. **Grep for the old value** — the old count, the removed name, the renamed path. Every hit is a candidate to update, or to *consciously* leave (e.g. a dated historical milestone entry, which stays as a record).
|
|
73
|
+
2. **If the change has no home, give it one.** A new decision / mechanism / guarantee that no existing doc states must be recorded: extend the most relevant doc, or CREATE a new one and register it in `docs/INDEX.md`. A change that is real but unrecorded is not done.
|
|
74
|
+
3. **Architectural decisions additionally get an ADR** (`meta-discipline.md` R5 → `docs/DESIGN-DECISIONS.md`).
|
|
75
|
+
|
|
76
|
+
Documented failure (this project): a catalog grew from 7 to 8 entries; the catalog's own index was updated but `CLAUDE.md`, `docs/INDEX.md`, and the changelog kept saying "7". Each was individually plausible and collectively wrong.
|
|
77
|
+
|
|
78
|
+
### 2.3 What the orchestrator does NOT update
|
|
67
79
|
|
|
68
80
|
- Session transcripts / chat exports — those are tool-specific and out of scope.
|
|
69
81
|
- External tracker tickets (Jira / Linear / GitHub Issues) — those are explicit user actions, not auto-sync.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Context Editing Guide (Claude / Anthropic SDK)
|
|
2
|
+
|
|
3
|
+
> Per ADR-035, CONDUCTOR's Claude adapter recommends **API context editing** as the *lossless-first* way to reduce context tokens without losing the user's instructions. This guide describes the mechanism, the fidelity guarantee, and the safeguards for the lossy fallback (`/compact`). Like prompt caching (`docs/PROMPT-CACHING-GUIDE.md`), context editing is an Anthropic-SDK-side concern — CONDUCTOR provides discipline and ordering, not boilerplate code.
|
|
4
|
+
>
|
|
5
|
+
> **Scope:** Claude API / Claude Code only. The five non-Claude adapters degrade to the rule text in `meta-discipline.md` §5.7. See the parity note at the end.
|
|
6
|
+
|
|
7
|
+
## Why this exists — the fidelity axis
|
|
8
|
+
|
|
9
|
+
Every token in the window depletes a finite **attention budget**, and as the window grows the model's ability to recall any single item decreases ("context rot"). So reducing context is genuinely valuable — but the naive reducer (summarize old turns) compresses the *user's own instructions* along with everything else, silently dropping or distorting the original intent.
|
|
10
|
+
|
|
11
|
+
The core rule: **cut stale tool output first; touch user instructions last.** Tool results (file reads, command output, search hits) are the bulk of a bloated window and carry near-zero forward value once acted on. Clearing them frees most of the budget while leaving every user turn intact.
|
|
12
|
+
|
|
13
|
+
## The two reducers, ranked by fidelity
|
|
14
|
+
|
|
15
|
+
| Reducer | What it removes | Instruction fidelity | When to use |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| **API context editing** (`clear_tool_uses`) | Stale tool **results** (and optionally tool inputs / thinking blocks) | **Preserved** — user instructions and text messages are never cleared | **Default.** Long tool-heavy sessions. |
|
|
18
|
+
| **`/compact`** (Claude Code) | Summarizes **all** older history, user turns included | **At risk** — lossy summarization can drop or distort the original ask | Last resort, with the safeguards below. |
|
|
19
|
+
| **`/clear`** (Claude Code) | Wipes the entire context | N/A (intentional full reset) | Between *unrelated* tasks. |
|
|
20
|
+
|
|
21
|
+
### Verified mechanics (primary sources)
|
|
22
|
+
|
|
23
|
+
**API context editing** — Anthropic Messages API, public beta (verified 2026-07):
|
|
24
|
+
- Beta header: `context-management-2025-06-27`. Strategy id: `clear_tool_uses_20250919`.
|
|
25
|
+
- **Clears** stale tool *results*; optionally tool *inputs* (`clear_tool_inputs: true`, default `false`) and thinking blocks (`clear_thinking_20251015`). Cleared results are replaced with placeholder text.
|
|
26
|
+
- **Never clears** user instructions or text messages — editing targets tool results / thinking only.
|
|
27
|
+
- Defaults: `trigger` = 100,000 input tokens; `keep` = 3 most-recent tool-use/result pairs. `clear_at_least` and `exclude_tools` are optional knobs.
|
|
28
|
+
- Applied **server-side** before the prompt reaches the model; the client keeps the full history. ZDR-eligible.
|
|
29
|
+
- Measured savings: doc example 70k → 25k tokens (~45k freed); an Anthropic 100-turn web-search eval reported **~84% token reduction**. Paired with the **memory tool** (file-based state that persists *outside* the window, same beta header), Anthropic reported **+39%** on their eval vs baseline (context editing alone **+29%**).
|
|
30
|
+
- Source: <https://platform.claude.com/docs/en/build-with-claude/context-editing> · <https://claude.com/blog/context-management>
|
|
31
|
+
|
|
32
|
+
**`/compact` vs `/clear`** — Claude Code (verified 2026-07):
|
|
33
|
+
- Auto-compaction summarizes conversation history when "approaching context limits" (exact % trigger is **not** documented). It preserves architectural decisions / unresolved bugs / implementation details and discards redundant tool output — but it is a *lossy* summary of everything, including your turns.
|
|
34
|
+
- Preservation levers: (a) `/compact <instructions>` — e.g. `/compact Focus on code samples and API usage`; (b) a `# Compact instructions` section in the project **CLAUDE.md** telling Claude what to preserve across every compaction.
|
|
35
|
+
- `/clear` starts fresh (full wipe); `/compact` compresses and continues.
|
|
36
|
+
- Source: <https://code.claude.com/docs/en/costs>
|
|
37
|
+
|
|
38
|
+
## Recommended discipline (what the orchestrator does)
|
|
39
|
+
|
|
40
|
+
1. **Default to lossless.** On the Claude API adapter, enable context editing (`clear_tool_uses`) so stale tool results are cleared automatically at the token trigger. This alone removes most window bloat without any risk to instructions.
|
|
41
|
+
2. **Protect against tool-input loss where inputs matter.** Leave `clear_tool_inputs` at its default (`false`), or list tools whose call arguments must be retained under `exclude_tools`.
|
|
42
|
+
3. **Keep durable instructions out of chat history.** Put anything that must survive the whole session in CLAUDE.md / project rules — it is re-loaded each turn and is unaffected by both compaction and context editing.
|
|
43
|
+
4. **If lossy compaction is unavoidable**, pass explicit preservation instructions (`/compact keep the original task statement, acceptance criteria, and open TODOs verbatim`) and/or maintain a `# Compact instructions` block in CLAUDE.md.
|
|
44
|
+
5. **Reset, don't bloat.** Between unrelated tasks, `/clear` beats letting the window fill and then lossily compacting.
|
|
45
|
+
6. **Re-verify after compaction.** Confirm the compacted note still carries the original instruction before continuing; if unsure, ask the user to restate rather than act on a possibly-distorted summary.
|
|
46
|
+
|
|
47
|
+
## Interaction with prompt caching
|
|
48
|
+
|
|
49
|
+
Context editing modifies the message body **below** the cached rule/CLAUDE.md prefix, so it does not touch the stable cache prefix described in `PROMPT-CACHING-GUIDE.md`. The two techniques compose: caching cuts the cost of the stable prefix; context editing cuts the size of the volatile tail. Note that clearing tool results changes the suffix, which is expected — the cache breakpoint sits above it.
|
|
50
|
+
|
|
51
|
+
## Per-tool parity (honest)
|
|
52
|
+
|
|
53
|
+
| Tool | Lossless tool-result clearing | Compaction levers |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| Claude Code / Claude API | **Yes** — `clear_tool_uses` + memory tool | `/compact <instr>`, `# Compact instructions`, `/clear` |
|
|
56
|
+
| Cursor / Copilot / Gemini / Codex / Windsurf | No equivalent API feature — falls back to `meta-discipline.md` §5.7 rule text (drop stale reads, keep instructions in the rules file, reset between tasks) | Tool-native reset only |
|
|
57
|
+
|
|
58
|
+
The honest summary: the *principle* (cut stale tool output first, never the user's instructions) is universal and lives in `meta-discipline.md` §5.7; the *lossless mechanism* is Claude-API-only today.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Prompt Caching Guide (Claude / Anthropic SDK)
|
|
2
|
+
|
|
3
|
+
> Per ADR-012, CONDUCTOR's Claude adapter actively recommends prompt caching. This guide describes the recommended structure. Caching is an Anthropic-SDK-side concern — CONDUCTOR provides structure and order, not boilerplate code.
|
|
4
|
+
|
|
5
|
+
## Why prompt caching matters
|
|
6
|
+
|
|
7
|
+
Anthropic's prompt caching reduces input cost by ~90% and latency by ~85% for prefixes that repeat across turns. Cache write is 1.25× input cost (5-min cache) or 2× (1-hr cache). Cache read is 0.1× input cost. Break-even after 2-3 reads.
|
|
8
|
+
|
|
9
|
+
For a typical CONDUCTOR-driven session:
|
|
10
|
+
- 5 universal rule bundles (~6K tokens combined).
|
|
11
|
+
- Project CLAUDE.md (~2K tokens).
|
|
12
|
+
- Selected recipes (~1-3K tokens).
|
|
13
|
+
- Project memory index (~1K tokens).
|
|
14
|
+
|
|
15
|
+
Total cacheable prefix: ~10-12K tokens. Without caching, 10-12K input tokens are billed every turn. With a 60% hit rate, the effective cost drops to ~1-1.5K tokens per turn.
|
|
16
|
+
|
|
17
|
+
## Recommended prefix order
|
|
18
|
+
|
|
19
|
+
Order matters: Anthropic prefix-matches from the START of the prompt. Items that change less frequently must come first.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
[1. Universal rules] ← changes rarely (one CONDUCTOR upgrade per quarter)
|
|
23
|
+
- .claude/rules/workflow.md
|
|
24
|
+
- .claude/rules/spec-as-you-go.md
|
|
25
|
+
- .claude/rules/quality-gates.md
|
|
26
|
+
- .claude/rules/operations.md
|
|
27
|
+
- .claude/rules/meta-discipline.md
|
|
28
|
+
|
|
29
|
+
[2. Project CLAUDE.md] ← changes occasionally (project rule additions)
|
|
30
|
+
|
|
31
|
+
[3. Selected recipes] ← changes when adopter installs / removes recipe
|
|
32
|
+
- .claude/rules/<recipe>.md (per --recipes flag)
|
|
33
|
+
|
|
34
|
+
[4. Project memory index] ← changes weekly (new feedback / project entries)
|
|
35
|
+
|
|
36
|
+
══════ cache_control: {"type": "ephemeral"} ══════
|
|
37
|
+
|
|
38
|
+
[5. CURRENT_WORK.md content] ← changes per turn
|
|
39
|
+
[6. Recent turn history] ← changes per turn
|
|
40
|
+
[7. Tool results] ← per turn
|
|
41
|
+
[8. User's new message] ← per turn
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The `cache_control` marker is placed at the boundary between sections 4 and 5. Everything above is cacheable; everything below is the per-turn variable content.
|
|
45
|
+
|
|
46
|
+
## Anthropic SDK example
|
|
47
|
+
|
|
48
|
+
The exact API call shape depends on the SDK version. Conceptually:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
client.messages.create(
|
|
52
|
+
model="claude-opus-4-7-20260101",
|
|
53
|
+
system=[
|
|
54
|
+
# cacheable section
|
|
55
|
+
{
|
|
56
|
+
"type": "text",
|
|
57
|
+
"text": load_universal_rules() + load_claude_md() + load_recipes() + load_memory_index(),
|
|
58
|
+
"cache_control": {"type": "ephemeral"}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
messages=[
|
|
62
|
+
# per-turn section
|
|
63
|
+
{"role": "user", "content": user_message}
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The orchestrator's responsibility is to ASSEMBLE the cacheable prefix in stable order. If the order shuffles between turns, the cache misses.
|
|
69
|
+
|
|
70
|
+
## 5-min vs 1-hr cache
|
|
71
|
+
|
|
72
|
+
| TTL | Write cost | When to use |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| 5 min (default) | 1.25× input | Active dev session — turns within 5 min of each other |
|
|
75
|
+
| 1 hr | 2× input | Long-running sessions, tool integrations, agent loops |
|
|
76
|
+
|
|
77
|
+
For CONDUCTOR's typical use (interactive dev session), 5-min default is correct. The break-even on the 1-hr cache requires 8+ turns within the hour.
|
|
78
|
+
|
|
79
|
+
## Measuring cache hit rate
|
|
80
|
+
|
|
81
|
+
Use the bundled tool:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
tools/measure-tokens.sh --latest
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Sample output:
|
|
88
|
+
```
|
|
89
|
+
Cache-read tokens : 9847
|
|
90
|
+
Cache hit rate : 67.3%
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Target: ≥ 60% on a steady-state dev session. If the rate is lower:
|
|
94
|
+
|
|
95
|
+
- Verify the cache marker is at the right boundary.
|
|
96
|
+
- Verify prefix order is stable (no per-turn re-ordering of CONDUCTOR rules).
|
|
97
|
+
- Verify the prefix is large enough to clear the model's minimum cache size (1024 tokens for Opus / Sonnet, 2048 for Haiku).
|
|
98
|
+
|
|
99
|
+
## Common cache misses
|
|
100
|
+
|
|
101
|
+
| Cause | Fix |
|
|
102
|
+
|---|---|
|
|
103
|
+
| Prefix too short | Combine universal rules + recipes into a single system block |
|
|
104
|
+
| Prefix order changes per turn | Stabilize the build order |
|
|
105
|
+
| New recipe installed mid-session | Expected one-time miss; subsequent turns hit |
|
|
106
|
+
| Memory index regenerated each turn | Re-generate only when memory dir changes |
|
|
107
|
+
| Model switch (Opus ↔ Sonnet ↔ Haiku) | Each model has its own cache; switching invalidates |
|
|
108
|
+
|
|
109
|
+
## Non-Claude tools
|
|
110
|
+
|
|
111
|
+
Prompt caching is an Anthropic-specific feature. Other adapters (Cursor / Copilot / Gemini / Codex / Windsurf) cannot benefit from this guide. The `docs/COMPATIBILITY-MATRIX.md` records this honestly.
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omniconductor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Multi-coding-agent workflow framework. Write your project's rules, workflow, and discipline ONCE — install into Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, or Windsurf. Encodes the discipline developers most often skip — spec-before-code, review gates, session continuity — so your AI agents catch what's easy to miss.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "LFamily Labs LLC",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/lee77840/
|
|
9
|
+
"url": "git+https://github.com/lee77840/omniconductor.git"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/lee77840/
|
|
11
|
+
"homepage": "https://github.com/lee77840/omniconductor#readme",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/lee77840/
|
|
13
|
+
"url": "https://github.com/lee77840/omniconductor/issues"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=18"
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"core/",
|
|
25
25
|
"tools/",
|
|
26
26
|
"docs/MANUAL-INSTALL.md",
|
|
27
|
+
"docs/PROMPT-CACHING-GUIDE.md",
|
|
28
|
+
"docs/CONTEXT-EDITING-GUIDE.md",
|
|
27
29
|
"README.md",
|
|
28
30
|
"VISION.md",
|
|
29
31
|
"LICENSE",
|