@aragon-agent/cli 0.6.16 → 0.6.18

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +107 -51
  2. package/README.md +91 -48
  3. package/dist/agent/controller.js +52 -47
  4. package/dist/agent/headless.js +7 -0
  5. package/dist/agent/reducer.js +0 -4
  6. package/dist/cli.js +0 -13
  7. package/dist/commands/builtins.js +21 -20
  8. package/dist/commands/index-build.d.ts +39 -0
  9. package/dist/commands/index-build.js +61 -0
  10. package/dist/compaction/child.d.ts +10 -8
  11. package/dist/compaction/child.js +23 -25
  12. package/dist/compaction/limits.d.ts +0 -2
  13. package/dist/compaction/limits.js +0 -2
  14. package/dist/config/cli-commands.d.ts +2 -2
  15. package/dist/config/cli-commands.js +19 -15
  16. package/dist/config/load.d.ts +0 -17
  17. package/dist/config/load.js +0 -6
  18. package/dist/config/schema.d.ts +41 -9
  19. package/dist/config/schema.js +18 -11
  20. package/dist/exec/events.d.ts +16 -9
  21. package/dist/exec/events.js +2 -2
  22. package/dist/exec/runner.js +17 -1
  23. package/dist/fast/limits.d.ts +2 -2
  24. package/dist/fast/limits.js +2 -2
  25. package/dist/fast/prompt.d.ts +10 -11
  26. package/dist/fast/prompt.js +19 -20
  27. package/dist/fast/reviewer.d.ts +1 -1
  28. package/dist/fast/reviewer.js +1 -1
  29. package/dist/fast/types.d.ts +0 -2
  30. package/dist/fast/wiring.d.ts +18 -34
  31. package/dist/fast/wiring.js +20 -51
  32. package/dist/input/csiu-keys.js +13 -2
  33. package/dist/input/limits.d.ts +15 -0
  34. package/dist/input/limits.js +15 -0
  35. package/dist/input/win32-input-mode.js +7 -1
  36. package/dist/logging/install.d.ts +9 -0
  37. package/dist/logging/install.js +11 -0
  38. package/dist/session/validate-session.js +3 -1
  39. package/dist/team/child-reviewer.d.ts +105 -0
  40. package/dist/team/child-reviewer.js +117 -0
  41. package/dist/team/human-queue.d.ts +11 -0
  42. package/dist/team/human-queue.js +18 -1
  43. package/dist/team/limits.d.ts +40 -0
  44. package/dist/team/limits.js +41 -0
  45. package/dist/team/normalize.d.ts +7 -26
  46. package/dist/team/normalize.js +9 -22
  47. package/dist/team/overseer.d.ts +157 -0
  48. package/dist/team/overseer.js +348 -0
  49. package/dist/team/prompt.d.ts +0 -11
  50. package/dist/team/prompt.js +3 -12
  51. package/dist/team/report.d.ts +4 -19
  52. package/dist/team/report.js +27 -28
  53. package/dist/team/runtime.d.ts +76 -16
  54. package/dist/team/runtime.js +410 -57
  55. package/dist/team/subagent.d.ts +48 -19
  56. package/dist/team/subagent.js +88 -31
  57. package/dist/team/task-tool.d.ts +6 -26
  58. package/dist/team/task-tool.js +17 -48
  59. package/dist/team/types.d.ts +65 -41
  60. package/dist/ui/App.d.ts +1 -1
  61. package/dist/ui/App.js +64 -4
  62. package/dist/ui/BottomStatusRow.js +2 -1
  63. package/dist/ui/Header.js +13 -2
  64. package/dist/ui/PromptInput.js +11 -1
  65. package/dist/ui/StatusBar.js +2 -1
  66. package/dist/ui/TeamPanel.js +1 -1
  67. package/dist/ui/entries/TeamCard.js +1 -6
  68. package/dist/ui/layout/status-detail-layout.js +12 -2
  69. package/dist/ui/layout/status-layout.d.ts +4 -2
  70. package/dist/ui/layout/status-layout.js +24 -1
  71. package/dist/ui/overlays/HelpOverlay.js +2 -2
  72. package/package.json +2 -2
  73. package/skills/project-indexer/SKILL.md +163 -0
  74. package/skills/project-indexer/templates/cleancode-overrides.md +46 -0
  75. package/skills/project-indexer/templates/cleancode-template.md +94 -0
  76. package/skills/project-indexer/templates/config-template.md +69 -0
  77. package/skills/project-indexer/templates/index-template.md +129 -0
  78. package/dist/ui/ModeChip.d.ts +0 -18
  79. package/dist/ui/ModeChip.js +0 -24
package/CHANGELOG.md CHANGED
@@ -5,57 +5,89 @@ All notable changes to `@aragon-agent/cli` are documented here. Entries at
5
5
  — those releases really were published under that name, so they are left as they
6
6
  were written.
7
7
 
8
- ## Unreleased
9
-
10
- ### 启动与缩窗不再误报 Frame diff lost sync
11
-
12
- - 启动即现的 "Frame diffing lost sync with the terminal and fell back to a
13
- full repaint … `--no-diff-render`" 警告已消除:Ink 挂载/卸载经渲染 stdout 写出的
14
- 光标隐藏/恢复序列(`ESC[?25l` / `ESC[?25h`)由帧写入器直接透传——不进差分、
15
- 不失效缓存、不计 fallback,也不再消耗会话的首写豁免。启动序列恢复
16
- "种子帧透传 → 首帧全量 → 之后纯 diff"。
17
- - 终端高度缩小(拖小窗口、改字号、面板重排)不再触发同一条警告:Ink 的
18
- `clearTerminal` 整帧写入被差分器识别为 Ink 自身写法,透传并失效缓存但不计
19
- fallback;该控制写同样不消耗首写豁免,其后的首个 log-update 帧仍按种子帧豁免,
20
- 下一帧自然全量重绘。
21
- - `/perf` 的 `fallbacks` 重新从 0 起步,"健康会话 fallbacks === 0" 的诊断信号
22
- (AC-11)恢复可判。
23
-
24
- ### Consistent TUI styling
25
-
26
- - Interactive sessions always use Unicode and default to truecolor, including
27
- PowerShell sessions without terminal or UTF locale markers. Ink's actual color
28
- output follows the same policy, with renderer state restored on exit.
29
- - Explicit color opt-outs keep Unicode borders and icons; the opening logo now
30
- depends only on available space. Headless terminal detection is unchanged.
31
- - Reloading model settings preserves session display preferences. Syntax
32
- highlighting follows the same color policy, and status icons use consistent
33
- single-column glyphs to prevent narrow-frame overflow.
34
- - Hiding the editor caret while scrolling preserves draft geometry, preventing
35
- a layout update loop when entering text above the full startup logo.
36
- - Register exit cleanup before mounting the application, so immediate exits and
37
- initial render failures restore terminal and color state reliably. Failed
38
- mounts no longer mark an auto-installed build as healthy.
39
-
40
- ### Model context window
41
-
42
- - Discover context limits at startup and after connection changes without blocking
43
- input. The status bar and compaction use the discovered limit; `/context` names
44
- API versus catalog metadata. Unknown windows show `?`, not a fabricated 128k
45
- capacity or percentage. Manual `contextWindow` overrides retain precedence.
46
- - Window overrides now apply to tail relief and compaction progress as well as
47
- the gauge. Workers on different models/endpoints do not inherit the lead's
48
- override. API-key changes refresh metadata, and ending a session cancels its
49
- pending model queries. `/context` also hides unknown capacities/percentages.
50
-
51
- ### TUI 输入与排队可靠性
52
-
53
- - Shift+Enter 与粘贴按输入顺序处理;普通 Enter 保持弹层兼容,混合输入最多提交一次,
54
- 余稿及拒绝提交的正文保留。结束输入流时完整排空,不泄漏内部控制标记。
55
- - 超限粘贴拒绝同一外部输入块的正文和 Enter,避免误提交旧稿;未闭合粘贴继续按正文消费。
56
- - 拖选后仅 Ctrl+C 复制;文字变化与丢失鼠标释放时取消无效高亮,避免卡住视口。
57
- - 固定 Queue 状态行按消息 ID 回执更新,支持窄屏、暂停与多条消息计数。
58
- - 保存和退出保留所有未发送全文;恢复先验证存档,旧 queued 作为警告展示且不自动重放。
8
+ ## Unreleased
9
+
10
+ ### Team dispatch supervisor (team-overseer)
11
+
12
+ - **A time ceiling on a subagent is now an inspection trigger, not a death
13
+ sentence.** With the supervisor on (new key `team.overseer`, default
14
+ `true`, needs the fast tier), two soft timers per child - event silence at
15
+ `idleTimeoutMs` and a wall clock at `subagentTimeoutMs` (or 5 minutes when
16
+ no ceiling is configured) - fire one bounded fast-tier inspection. The
17
+ supervisor decides wait / nudge / replace / abandon; the runtime applies,
18
+ funnelling every lifecycle change through the worker loop that awaits the
19
+ child, so a replacement is never built for nobody.
20
+ - **A nudge is steering; a replace is a rebuild with an amended brief.**
21
+ Guidance is queued at core's safe top-of-loop checkpoint; a replacement
22
+ carries the supervisor's reason, the dead child's `filesTouched`, and the
23
+ original brief bounded to the same prompt budget. A post-mortem inspection
24
+ diagnoses a child that died silently (watchdog death, stream loss) and may
25
+ re-assign it once.
26
+ - **Budgets are structural, not settings**: 4 inspections and 1 replacement
27
+ per child per dispatch; past them the child runs under its own (lengthened
28
+ while supervised) idle watchdog and the supervisor goes quiet. An
29
+ unparseable or failing supervision call always becomes `wait` -
30
+ supervision must never kill a healthy child.
31
+ - Every applied decision is visible three ways: the report's Supervisor
32
+ section (`[silence 30s] a1: nudge - ...`), the team panel and the `-p`
33
+ stderr line, and a `debug` log event. `aragon exec` emits it as an
34
+ additive `team` subtype `overseer` (`EXEC_SCHEMA_VERSION` unchanged).
35
+ - New command `/team overseer on|off` (refused mid-dispatch, like every
36
+ other `/team` setting) and new config key `team.overseer`, also settable
37
+ as `aragon config set team.overseer false`. With the supervisor off - or
38
+ no fast tier - every path is byte-for-byte the pre-feature regime:
39
+ `subagentTimeoutMs` is a hard abort and silence is the child's own
40
+ watchdog.
41
+
42
+ ### 启动与缩窗不再误报 Frame diff lost sync
43
+
44
+ - 启动即现的 "Frame diffing lost sync with the terminal and fell back to a
45
+ full repaint … `--no-diff-render`" 警告已消除:Ink 挂载/卸载经渲染 stdout 写出的
46
+ 光标隐藏/恢复序列(`ESC[?25l` / `ESC[?25h`)由帧写入器直接透传——不进差分、
47
+ 不失效缓存、不计 fallback,也不再消耗会话的首写豁免。启动序列恢复
48
+ "种子帧透传 → 首帧全量 → 之后纯 diff"。
49
+ - 终端高度缩小(拖小窗口、改字号、面板重排)不再触发同一条警告:Ink 的
50
+ `clearTerminal` 整帧写入被差分器识别为 Ink 自身写法,透传并失效缓存但不计
51
+ fallback;该控制写同样不消耗首写豁免,其后的首个 log-update 帧仍按种子帧豁免,
52
+ 下一帧自然全量重绘。
53
+ - `/perf` 的 `fallbacks` 重新从 0 起步,"健康会话 fallbacks === 0" 的诊断信号
54
+ (AC-11)恢复可判。
55
+
56
+ ### Consistent TUI styling
57
+
58
+ - Interactive sessions always use Unicode and default to truecolor, including
59
+ PowerShell sessions without terminal or UTF locale markers. Ink's actual color
60
+ output follows the same policy, with renderer state restored on exit.
61
+ - Explicit color opt-outs keep Unicode borders and icons; the opening logo now
62
+ depends only on available space. Headless terminal detection is unchanged.
63
+ - Reloading model settings preserves session display preferences. Syntax
64
+ highlighting follows the same color policy, and status icons use consistent
65
+ single-column glyphs to prevent narrow-frame overflow.
66
+ - Hiding the editor caret while scrolling preserves draft geometry, preventing
67
+ a layout update loop when entering text above the full startup logo.
68
+ - Register exit cleanup before mounting the application, so immediate exits and
69
+ initial render failures restore terminal and color state reliably. Failed
70
+ mounts no longer mark an auto-installed build as healthy.
71
+
72
+ ### Model context window
73
+
74
+ - Discover context limits at startup and after connection changes without blocking
75
+ input. The status bar and compaction use the discovered limit; `/context` names
76
+ API versus catalog metadata. Unknown windows show `?`, not a fabricated 128k
77
+ capacity or percentage. Manual `contextWindow` overrides retain precedence.
78
+ - Window overrides now apply to tail relief and compaction progress as well as
79
+ the gauge. Workers on different models/endpoints do not inherit the lead's
80
+ override. API-key changes refresh metadata, and ending a session cancels its
81
+ pending model queries. `/context` also hides unknown capacities/percentages.
82
+
83
+ ### TUI 输入与排队可靠性
84
+
85
+ - Shift+Enter 与粘贴按输入顺序处理;普通 Enter 保持弹层兼容,混合输入最多提交一次,
86
+ 余稿及拒绝提交的正文保留。结束输入流时完整排空,不泄漏内部控制标记。
87
+ - 超限粘贴拒绝同一外部输入块的正文和 Enter,避免误提交旧稿;未闭合粘贴继续按正文消费。
88
+ - 拖选后仅 Ctrl+C 复制;文字变化与丢失鼠标释放时取消无效高亮,避免卡住视口。
89
+ - 固定 Queue 状态行按消息 ID 回执更新,支持窄屏、暂停与多条消息计数。
90
+ - 保存和退出保留所有未发送全文;恢复先验证存档,旧 queued 作为警告展示且不自动重放。
59
91
 
60
92
  ### Removed
61
93
 
@@ -451,6 +483,30 @@ were written.
451
483
 
452
484
  ## Unreleased
453
485
 
486
+ ### Project index on Ctrl+I (bundled `project-indexer` skill)
487
+
488
+ - The `project-indexer` skill now ships **bundled** with the package
489
+ (`<pkg>/skills/project-indexer`, read-only, alongside `skill-creator`): it
490
+ generates the `.claude-index/` navigation map and injects the Google-style
491
+ Clean Code Guidelines section into `CLAUDE.md`, adapted from the standalone
492
+ Claude Code skill (ask_user instead of AskUserQuestion; body condensed under
493
+ the 30 KB invocation budget with the four templates bundled as files).
494
+ - New keybinding `Ctrl+I`: opens a Yes/No confirm that names every write
495
+ target, then dispatches `/skill:project-indexer` through the ordinary
496
+ command path - the indexing run is a normal agent turn whose tool calls
497
+ stream into the transcript. While a run is in flight the key warns instead
498
+ of queueing; with skills disabled or the skill shadowed it explains instead
499
+ of failing silently.
500
+ - `Ctrl+I` is legacy-encoded as the Tab byte, so the stdin filter's two
501
+ translators (win32-input-mode on Windows, kitty CSI-u / modifyOtherKeys
502
+ elsewhere) now emit a distinct NUL-delimited `INDEX_KEY_FRAME` for it -
503
+ the same framing technique `Shift+Enter` uses. On terminals with neither
504
+ protocol the key keeps its legacy Tab meaning (completion).
505
+ - The header names the key next to the detail toggle: `^I Index` collapsed,
506
+ `^I build index` in the `Ctrl+G` expanded state; hidden below 72 columns and
507
+ while an overlay is open. `/skill:project-indexer` and `/project-indexer`
508
+ remain available as typed commands.
509
+
454
510
  ### Added
455
511
 
456
512
  - **Drag the mouse to select text, and release to copy it.** Full-screen mode
package/README.md CHANGED
@@ -406,10 +406,10 @@ signal ends the run (`130` SIGINT, `143` SIGTERM, `129` SIGHUP).
406
406
  | `/save [file]` | Save the session to JSON |
407
407
  | `/resume [file]` | Load a saved session |
408
408
  | `/plan [on\|off\|status]` | Toggle plan mode - the keyboard-free equivalent of `Shift+Tab` |
409
- | `/team [on\|off\|max <n>]` | Team subagents: status and the live roster, the on/off switch, the fan-out width |
409
+ | `/team [on\|off\|max <n>\|overseer on\|off]` | Team subagents: status and the live roster, the on/off switch, the fan-out width, the dispatch supervisor |
410
410
  | `/todo [on\|off\|panel on\|off\|follow <mode>\|clear\|continue]` | Todo planning: status, the on/off switch, the rail, follow-through, and picking an unfinished plan back up |
411
411
  | `/retry [show\|on\|off\|max <n>]` | API retry: the effective ladder, the on/off switch, the retry count. Takes effect **in the running session**, children included |
412
- | `/fast [on\|off\|model <id>\|provider <id>\|same\|review <n\|off>\|delegate on\|off]` | Fast model tier: status and this session's totals, the on/off switch, which model, the review cadence |
412
+ | `/fast [on\|off\|model <id>\|provider <id>\|same\|review <n\|off>]` | Fast model tier: status and this session's totals, the on/off switch, which model, the review cadence |
413
413
  | `/compact [status\|on\|off\|threshold <n>\|keep <n>\|history\|show <n>\|<instructions>]` | Context compaction: occupancy and this session's totals, the on/off switch, when it fires, how much it keeps. With free text, compacts now and tells the summarizer what to pay attention to |
414
414
  | `/context` | What the context gauge is showing: occupancy split into measured and estimated, the window and **where it came from**, how stale the measurement is, compaction's actual state, and what the session-spend readout includes |
415
415
  | `/bg [list\|logs <id> [n]\|stop <id\|all>\|status]` | Background services: what is running, its log tail, and how to stop it. `list` is the default |
@@ -436,6 +436,7 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
436
436
  | `Ctrl+J` / `Alt+Enter` / `Shift+Enter` | 插入换行。应用默认请求终端区分修饰键(Windows 用 win32-input-mode,macOS/Linux 用 kitty/modifyOtherKeys),Shift+Enter 在支持的终端开箱即用;不支持的终端用 Ctrl+J。参见 [终端设置](#terminal-setup-for-shiftenter) |
437
437
  | `Shift+Tab` | Toggle **plan mode** (`BUILD` <-> `PLAN`). Equivalent: `/plan`. On Windows this needs a console flag Node < 22.17 does not set; aragon sets it at startup — see [Requirements](#requirements) |
438
438
  | `Ctrl+P` | The same toggle, over a channel no Windows console can swallow. Use it if `Shift+Tab` does nothing |
439
+ | `Ctrl+I` | **Build the project index** (bundled `project-indexer` skill). Asks for confirmation, then runs as a normal agent turn that writes `.claude-index/` and updates `CLAUDE.md`. On terminals without keyboard enhancement `Ctrl+I` is the Tab byte and completes input instead |
439
440
  | `Esc` | Close an overlay or popup; otherwise ask for interruption confirmation. While idle, cancel pending auto-continuation |
440
441
  | `Esc` ×2 | Interrupt the run when pressed within 1.5 seconds. Other keys or closing a menu cancel the first press |
441
442
  | `Esc` again after interruption | **Force-stop** a run that is still stopping, kill foreground shell commands and return to `idle`; background services remain running |
@@ -810,9 +811,11 @@ still exits the session outright.
810
811
 
811
812
  ### Where the mode is shown
812
813
 
813
- The status bar always names a non-default mode (`PLAN`, or `PLAN → BUILD` while
814
- a switch is pending), including on short terminals and with `--no-hints`. The composer additionally shows a `PLAN` chip on its hint row and
815
- tints its border, where there is room for it.
814
+ The status bar's first row always names the current mode (`BUILD` or `PLAN`,
815
+ an accent word right after the run state; `PLAN>BUILD` while a switch is
816
+ pending; `B` / `P` / `P>B` when the terminal is narrow), including on short
817
+ terminals and with `--no-hints`. The Ctrl+G details row repeats it, and the
818
+ composer tints its border in plan mode.
816
819
 
817
820
  ### Switching mid-run
818
821
 
@@ -821,7 +824,7 @@ during a run takes effect immediately — you pressed it *because* the agent is
821
824
  about to do something. Pressing it toward `BUILD` during a run is **deferred to
822
825
  the end of the run**, so a session you launched under a read-only guarantee
823
826
  cannot start writing files because of one stray keypress. The status bar shows
824
- `PLAN → BUILD` while that is pending. Approving a plan is the one exception, and
827
+ `PLAN>BUILD` while that is pending. Approving a plan is the one exception, and
825
828
  it is an informed act rather than a stray keypress.
826
829
 
827
830
  ### If `Shift+Tab` does nothing
@@ -839,7 +842,7 @@ node -e "process.stdin.setRawMode(true);process.stdin.resume();process.stdin.on(
839
842
  | It prints | What it means |
840
843
  | --- | --- |
841
844
  | `09` | The console is swallowing the modifier — the key is arriving as an ordinary `Tab`. Check `node -v`: below 22.17.0 (or on 24.0/24.1) this is expected, and aragon's own attempt to fix it was blocked. See [Requirements](#requirements) |
842
- | `1b5b5a` | The key reaches the process fine, so something inside aragon is eating it — most often an overlay is open, or the run is still going and the switch is pending (the status bar shows `BUILD → PLAN`) |
845
+ | `1b5b5a` | The key reaches the process fine, so something inside aragon is eating it — most often an overlay is open, or the run is still going and the switch is pending (the status bar shows `PLAN>BUILD`) |
843
846
  | nothing | Your terminal, multiplexer or remote-desktop stack never sent it; some never send `CSI Z` at all |
844
847
 
845
848
  On the first row the wheel is dead for the same reason, and with the `/` palette
@@ -1144,6 +1147,17 @@ subagents wrote the same file the header says so, phrased as a warning rather
1144
1147
  than a fact: the file list is derived from `write_file` / `edit_file`, so a
1145
1148
  write made through `bash` is invisible to it.
1146
1149
 
1150
+ **The dispatch supervisor.** A time ceiling on a subagent is an inspection
1151
+ trigger, not a death sentence — as long as the fast tier is enabled. Two soft
1152
+ timers per child (event silence and a wall clock) hand a bounded snapshot to the
1153
+ fast model, which decides: keep waiting, steer a nudge in, rebuild the child
1154
+ with an amended brief, or abandon it with a recorded reason. The budgets are
1155
+ structural, not settings — 4 inspections and 1 replacement per child per
1156
+ dispatch, after which the child runs under its own hard ceilings and the
1157
+ supervisor goes quiet. Every applied decision is recorded in the report's
1158
+ Supervisor section; `/team overseer off` (or no fast tier) restores the
1159
+ pre-supervisor regime exactly.
1160
+
1147
1161
  **Talking to each other.** Subagents get two extra tools, `team_send` and
1148
1162
  `team_wait`. Messages are delivered by attaching them to the recipient's next
1149
1163
  tool result, so nobody has to poll and nobody's work is interrupted. The limits
@@ -1184,25 +1198,24 @@ children's tokens are folded into the `[usage]` footer.
1184
1198
  ## Fast model tier
1185
1199
 
1186
1200
  A second, cheaper model can be made a first-class citizen of a session. It is
1187
- **off by default** — with `fast.enabled: false` the system prompt, the `task`
1188
- tool schema, the transcript and the request payloads are exactly what they were
1189
- before this feature existed — and it buys you two things once you turn it on.
1190
-
1191
- **Delegation (the agent decides).** `task` gains one optional field per
1192
- subagent, `model: "fast"`. A child marked that way runs on the fast model and is
1193
- otherwise identical: same tools, same working directory, same `--confirm` gate,
1194
- same plan-mode gate, same skills ceiling. Delegating to a cheaper model is a
1195
- *model* choice, never a permission boundary. This is where "not complicated, but
1196
- very expensive in context" is actually paid for: a child that reads nine files
1197
- and reports four sentences moves ~200 KB of file bodies out of the lead's window
1198
- and onto a model that costs a fraction as much per token.
1201
+ **off by default** — with `fast.enabled: false` the system prompt, the
1202
+ transcript and the request payloads are exactly what they were before this
1203
+ feature existed — and it buys you two things once you turn it on.
1204
+
1205
+ **Every `task` child runs the lead's own model.** Per-child fast dispatch
1206
+ (`model: "fast"`) was removed for main-agent parity: a delegation is never a
1207
+ downgrade, and all the gates (tools, working directory, `--confirm`, plan mode,
1208
+ skills ceiling, compaction policy) are the lead's own.
1199
1209
 
1200
1210
  **Periodic review (the harness decides).** Every *N* completed turns, a small
1201
1211
  digest of what the lead has been doing goes to the fast model with one question
1202
1212
  — is this still on track? — and if the answer is not "on track" it is injected
1203
1213
  back into the running loop as a `<fast_review>` block. The lead sees a short
1204
1214
  second opinion mid-run, when it can still act on it, for a few hundred tokens
1205
- instead of a second full-size turn.
1215
+ instead of a second full-size turn. **Subagents get the same review**: when the
1216
+ tier is live and `fast.review` is on, each dispatched child runs with its own
1217
+ reviewer — same cadence, same budget per child, same fail-fast transport — so a
1218
+ team is as capable as the agent that dispatched it.
1206
1219
 
1207
1220
  ```
1208
1221
  > refactor the config loader and keep the tests green
@@ -1224,7 +1237,7 @@ separately. If the fast model is not in the built-in price table the number is
1224
1237
  shown as `unknown` rather than as `$0.00` — a feature that looks free while it
1225
1238
  is spending money is worse than one that admits it does not know.
1226
1239
 
1227
- **The review has a session budget, and delegation deliberately does not.** A
1240
+ **The review has a session budget.** A
1228
1241
  session is not one run — it is one run per message you send — so a cadence alone
1229
1242
  bounds nothing over a working afternoon. `fast.reviewMaxPerSession` (default
1230
1243
  **40**) is the total number of reviews a session may *start*; reaching it prints
@@ -1233,9 +1246,7 @@ first review rather than a bare count you can only size afterwards. Raise it liv
1233
1246
  with `/fast budget 80`. The budget is denominated in **reviews, not currency**,
1234
1247
  because the fast tier is precisely where a model the price table has never seen
1235
1248
  lives — a dollar ceiling would silently never fire for the configuration that
1236
- most needs one. Delegation is never budgeted: it is spend the lead chose in
1237
- service of a message you sent, it is already bounded by `team.*`, and it exists
1238
- to *reduce* total cost.
1249
+ most needs one.
1239
1250
 
1240
1251
  ### Turning it on
1241
1252
 
@@ -1255,9 +1266,8 @@ cannot grow a field mid-session.
1255
1266
  | `fast.provider` | `''` | Empty inherits the main provider. |
1256
1267
  | `fast.model` | `''` | The fast model id. Empty means *not configured* — it never falls back to the main model, so "same as main" stays distinguishable from a typo. |
1257
1268
  | `fast.baseUrl` | `''` | Empty inherits the session's base URL **only** when the provider matches. |
1258
- | `fast.thinkingLevel` | `'off'` | Applied to fast children and to reviews. |
1259
- | `fast.delegate` | `true` | Allow `model:"fast"` on `task`. |
1260
- | `fast.review` | `true` | Run the periodic review. |
1269
+ | `fast.thinkingLevel` | `'off'` | Applied to reviews (lead and subagents) and to fast-tier compaction summaries. |
1270
+ | `fast.review` | `true` | Run the periodic review — for the lead and for every `task` child. |
1261
1271
  | `fast.reviewEveryTurns` | `5` | Turns between reviews (1–50). |
1262
1272
  | `fast.reviewContextTurns` | `3` | Turns included in one digest (1–10). |
1263
1273
  | `fast.reviewMaxChars` | `280` | Ceiling on an injected critique (80–600). |
@@ -1281,7 +1291,6 @@ reporting one:
1281
1291
  /fast same run the fast tier on the main model
1282
1292
  /fast review <n> | off
1283
1293
  /fast budget [n] the session review budget; bare form reads it
1284
- /fast delegate on | off
1285
1294
  ```
1286
1295
 
1287
1296
  `/fast budget` with no argument is a **read**, so it is answerable while a `task`
@@ -1290,9 +1299,8 @@ like every other `/fast` setting.
1290
1299
 
1291
1300
  **What you see.** A `fast` chip in the status bar's right cluster while the tier
1292
1301
  is live (`fast*` while a review is in flight, dropped below 100 columns), a
1293
- one-line card per review in the transcript, and `n fast` plus a trailing `~` on
1294
- fast children in the team roster. `/fast status` reports the session totals the
1295
- status bar cannot: reviews run, children delegated, tokens and cost. Under `-p`
1302
+ one-line card per review in the transcript. `/fast status` reports the session totals the
1303
+ status bar cannot: reviews run, tokens and cost. Under `-p`
1296
1304
  nothing extra is written to stdout or stderr — the review spend is folded into
1297
1305
  the `[usage]` footer and the reviews are in the log.
1298
1306
 
@@ -1558,19 +1566,20 @@ refusal is explained. Automatic tail clipping and failure truncation are disable
1558
1566
 
1559
1567
  ### Sub-agents get the same protection
1560
1568
 
1561
- A `task` child is bounded by `team.maxTurnsPerSubagent` (24) and
1562
- `team.dispatchTimeoutMs` (15 minutes) — the same profile as a lead run that fills
1563
- a window. When a child overflowed, its history was discarded and the whole
1564
- dispatch reached you as one partial sentence.
1565
-
1566
- Children now compact their own history, under tighter bounds: **two** retained
1567
- turns instead of four, at most **two** compactions per child instead of five, the
1568
- fast tier preferred whenever it resolves, and failures preserve history. Each
1569
+ Children compact their own history **under the lead's own policy**: the same
1570
+ `keepRecentTurns`, the same `onFailure`, the same archive setting, the same
1571
+ per-run compaction bound, the fast tier preferred whenever it resolves. Each
1569
1572
  child owns its own context meter and counts compaction only after Core accepts
1570
1573
  the candidate. There is no transcript card for a
1571
1574
  child — the lead's transcript describes the lead's context. Turn it off with
1572
1575
  `compaction.subagents: false`.
1573
1576
 
1577
+ Since main-agent parity, the turn cap, the per-child wall clock and the dispatch
1578
+ wall clock all default to **0 = no limit**: a child runs until it finishes, like
1579
+ the lead, with only its own idle watchdog and your Esc as ceilings. Set any of
1580
+ `team.subagentTimeoutMs` / `team.dispatchTimeoutMs` / `team.maxTurnsPerSubagent`
1581
+ to a positive value to bring a ceiling back.
1582
+
1574
1583
  ### A compaction is no longer irreversible
1575
1584
 
1576
1585
  After a splice is adopted, the dropped messages are written verbatim to
@@ -1630,6 +1639,39 @@ A skill is a reusable expert procedure stored on disk: a directory containing a
1630
1639
  `scripts/` and `assets/`. The format matches Claude Code's, so an existing
1631
1640
  community skill directory works as-is.
1632
1641
 
1642
+ ### Project index - `Ctrl+I`
1643
+
1644
+ Two skills ship **bundled** with the package (`<pkg>/skills`, read-only):
1645
+ `skill-creator`, and `project-indexer` - a codebase indexer that generates a
1646
+ `.claude-index/` navigation map (project overview, feature map, file index,
1647
+ exported symbols) and injects a Google-style **Clean Code Guidelines** section
1648
+ into `CLAUDE.md` so future sessions inherit the project's code-quality
1649
+ thresholds.
1650
+
1651
+ `Ctrl+I` is its dedicated keybinding. The flow is deliberately boring:
1652
+
1653
+ 1. A **Yes/No confirm** opens (what will be written is spelled out - the
1654
+ dialog names `.claude-index/` and `CLAUDE.md` before anything happens).
1655
+ 2. Approving dispatches `/skill:project-indexer` through the ordinary command
1656
+ path, so the run is a normal agent turn: every `glob` / `read_file` /
1657
+ `write_file` streams into the transcript as a tool card, `Esc`
1658
+ interrupts it, and the follow-up configuration questions (exclusions,
1659
+ priority directories, clean-code preset) arrive through the same `ask_user`
1660
+ overlay any other turn uses.
1661
+ 3. The header names the key: `^I Index` collapsed, `^I build index` once
1662
+ `Ctrl+G` expands the detail row.
1663
+
1664
+ An existing `.claude-index/config.md` is reused on rebuild. While the agent is
1665
+ running, `Ctrl+I` warns instead of queueing. `/skill:project-indexer` and
1666
+ `/project-indexer` work as typed commands too.
1667
+
1668
+ > **Terminal support:** `Ctrl+I` is the same byte as `Tab` in legacy terminal
1669
+ > encoding. AragonAgent already asks for modified-key reporting at startup
1670
+ > (win32-input-mode on Windows, kitty/modifyOtherKeys elsewhere - the same
1671
+ > machinery that makes `Shift+Enter` work), and under those protocols the key
1672
+ > is distinguishable and the binding works. On a terminal that implements
1673
+ > neither, `Ctrl+I` simply behaves as `Tab`.
1674
+
1633
1675
  ### Progressive disclosure
1634
1676
 
1635
1677
  This is the part that makes skills cheap enough to install a lot of:
@@ -1959,9 +2001,10 @@ env / `.env` → CLI flags**.
1959
2001
  | `team.enabled` | `true` | Master switch for team subagents. `false` means the `task` tool is never registered — `/team on` in such a session saves the setting for next launch and says so, rather than advertising a tool that is not there. |
1960
2002
  | `team.maxSubagents` | `5` | Subagents per dispatch, clamped to `[1, 10]`. The 10 is the hard ceiling and is enforced twice — on the config value and again on what the model asks for — so hand-editing this file cannot raise it. |
1961
2003
  | `team.maxConcurrent` | `3` | Subagents in flight at once, clamped to `[1, 10]` and capped at `maxSubagents`. A separate knob because provider rate limits are a different constraint from context economics. |
1962
- | `team.subagentTimeoutMs` | `300000` | One subagent's wall clock before it is aborted, clamped to `[30000, 1800000]`. A wedged subagent dies on its own ceiling without taking the dispatch with it. |
1963
- | `team.dispatchTimeoutMs` | `900000` | The whole dispatch's wall clock, clamped to `[60000, 3600000]`. |
1964
- | `team.maxTurnsPerSubagent` | `24` | Runaway-loop cap, clamped to `[4, 100]`. A subagent stopped here is reported as `stopped: turn cap reached`, with whatever it had produced. |
2004
+ | `team.subagentTimeoutMs` | `0` | One subagent's wall clock, clamped to `[0, 1800000]`. With the supervisor off it is a hard abort; with it on (the default) a positive value is the **first wall-clock inspection** — the supervisor looks and decides instead of killing. `0` (the default) = no ceiling — a wedged subagent still dies on its own idle watchdog, exactly like the lead. |
2005
+ | `team.dispatchTimeoutMs` | `0` | The whole dispatch's wall clock (and the `task` tool timeout), clamped to `[0, 3600000]`. `0` (the default) = no ceiling; only Esc ends a dispatch early. |
2006
+ | `team.maxTurnsPerSubagent` | `0` | Runaway-loop cap, clamped to `[0, 100]`. `0` (the default) = no cap, matching the lead. A subagent stopped at a positive cap is reported as `stopped: turn cap reached`, with whatever it had produced. |
2007
+ | `team.overseer` | `true` | The dispatch supervisor: time ceilings on subagents become inspection triggers for a fast-tier supervisor that decides wait / nudge / replace / abandon instead of aborting. Needs the fast tier (`fast.enabled`); with the tier off or this `false`, children run under the legacy hard ceilings exactly. `/team overseer on\|off` flips it live, and it is read per dispatch. |
1965
2008
  | `todo.enabled` | `true` | Master switch for todo planning. `false` means the `todo_write` tool is never registered — `/todo on` in such a session saves the setting for next launch and says so, rather than advertising a tool that is not there. |
1966
2009
  | `todo.panel` | `true` | Render the right-hand rail. Independent of `todo.enabled` on purpose: a screen-reader user wants the planning discipline without the column, and the system prompt varies one sentence accordingly. |
1967
2010
  | `todo.followThrough` | `"notify"` | What happens when a run ends with steps left. `notify` says so and stops; `auto` continues the plan after a 3-second grace window, bounded by two structural limits (one fruitless attempt, 25 continuations per plan) that are deliberately **not** settings; `off` is silent. An unrecognized value falls back to `notify`. |
@@ -1972,7 +2015,7 @@ env / `.env` → CLI flags**.
1972
2015
  | `retry.multiplier` | `2` | Growth factor, clamped to `[1, 5]`. The one **float** key in this section: `2.5` is a legitimate factor and is stored as typed. |
1973
2016
  | `retry.jitter` | `true` | Equal jitter (`d/2 + rand·d/2`), which de-correlates concurrent subagents hitting the same 429 while keeping the announced countdown within a factor of two of the truth. Full jitter can fire 40 ms after announcing 30 s, which reads as a bug. |
1974
2017
  | `retry.respectRetryAfter` | `true` | Honour `Retry-After` (and the provider rate-limit reset headers) as a **floor**, never a replacement — a `Retry-After: 1` on the ninth retry does not undo eight retries of backoff. A stated wait above 60 s is surfaced immediately instead of waited out. |
1975
- | `retry.maxElapsedMs` | `240000` | Wall-clock budget from the first failure, clamped to `[10000, 1800000]`. Deliberately **below** `team.subagentTimeoutMs`: an equal budget means a subagent is killed at the same instant its ladder ends, and the user is then told "subagent timed out" for what was a provider outage. |
2018
+ | `retry.maxElapsedMs` | `240000` | Wall-clock budget from the first failure, clamped to `[10000, 1800000]`. When `team.subagentTimeoutMs` is positive, keep this below it: an equal budget means a subagent is killed at the same instant its ladder ends, and the user is then told "subagent timed out" for what was a provider outage. |
1976
2019
  | `retry.onPartialStream` | `true` | Allow a restart after content has already streamed to the transcript. The view is rewound and the discarded tool cards removed; engine history is provably clean at that point, because it is only written on a completed turn. `false` refuses the whole path. |
1977
2020
  | `skills.enabled` | `true` | Master switch for the skill system. |
1978
2021
  | `skills.requireApproval` | `true` | Require a human to approve `skill_install` / `skill_create`. |
@@ -2364,19 +2407,19 @@ node packages/cli/dist/cli.js --version
2364
2407
  - `echo "list files" | node dist/cli.js -p` prints an answer and exits `0`.
2365
2408
  - A missing/invalid key produces a visible, actionable message (never a blank
2366
2409
  screen), both in the TUI and headless.
2367
- - `Shift+Tab` at 40, 80 and 120 columns - the chip, the hint and the status bar
2368
- are all legible and nothing wraps onto a second row.
2410
+ - `Shift+Tab` at 40, 80 and 120 columns - the status-bar mode word (`PLAN` / `P`)
2411
+ stays legible and nothing wraps onto a second row.
2369
2412
  - The question wizard at 24 rows with 5 questions x 4 options - no clipping, and
2370
2413
  the `n/N` counter matches what is on screen.
2371
2414
  - Approve a plan and watch the SAME run start writing files, with no second
2372
2415
  prompt.
2373
- - `--no-color` on a legacy `cmd.exe` - the chip renders `[PLAN]`, radios render
2374
- `*`/`o`, checkboxes render `[x]`/`[ ]`, no mojibake anywhere.
2416
+ - `--no-color` on a legacy `cmd.exe` - the mode word renders as plain `PLAN` text,
2417
+ radios render `*`/`o`, checkboxes render `[x]`/`[ ]`, no mojibake anywhere.
2375
2418
  - A plan with a 600-character summary and a 400-character step detail - the text
2376
2419
  wraps and scrolls, the footer count matches the real number of rows, and
2377
2420
  nothing is truncated to a single line.
2378
2421
  - `--no-hints` on a 20-row terminal in plan mode - the status bar still says
2379
- `PLAN` with no chip on screen.
2422
+ `PLAN`.
2380
2423
  - Dismiss a plan card with `Esc`, let the agent resubmit, then close the card and press `Esc` twice within 1.5 seconds:
2381
2424
  the run aborts and the session returns to an idle prompt. Do this one BY HAND
2382
2425
  as well as in a test - the point of the check is whether the exit is findable,