iosm-cli 0.2.0 → 0.2.2

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 (111) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +64 -52
  3. package/dist/core/agent-teams.d.ts.map +1 -1
  4. package/dist/core/agent-teams.js +38 -11
  5. package/dist/core/agent-teams.js.map +1 -1
  6. package/dist/core/failure-retrospective.d.ts +12 -0
  7. package/dist/core/failure-retrospective.d.ts.map +1 -0
  8. package/dist/core/failure-retrospective.js +115 -0
  9. package/dist/core/failure-retrospective.js.map +1 -0
  10. package/dist/core/model-registry.d.ts.map +1 -1
  11. package/dist/core/model-registry.js +2 -3
  12. package/dist/core/model-registry.js.map +1 -1
  13. package/dist/core/models-dev-provider-catalog.d.ts +30 -0
  14. package/dist/core/models-dev-provider-catalog.d.ts.map +1 -0
  15. package/dist/core/models-dev-provider-catalog.js +118 -0
  16. package/dist/core/models-dev-provider-catalog.js.map +1 -0
  17. package/dist/core/models-dev-providers.d.ts +12 -0
  18. package/dist/core/models-dev-providers.d.ts.map +1 -0
  19. package/dist/core/models-dev-providers.js +736 -0
  20. package/dist/core/models-dev-providers.js.map +1 -0
  21. package/dist/core/project-index/index.d.ts +17 -0
  22. package/dist/core/project-index/index.d.ts.map +1 -0
  23. package/dist/core/project-index/index.js +323 -0
  24. package/dist/core/project-index/index.js.map +1 -0
  25. package/dist/core/project-index/types.d.ts +34 -0
  26. package/dist/core/project-index/types.d.ts.map +1 -0
  27. package/dist/core/project-index/types.js +2 -0
  28. package/dist/core/project-index/types.js.map +1 -0
  29. package/dist/core/sdk.d.ts.map +1 -1
  30. package/dist/core/sdk.js +8 -0
  31. package/dist/core/sdk.js.map +1 -1
  32. package/dist/core/shared-memory.d.ts +46 -0
  33. package/dist/core/shared-memory.d.ts.map +1 -0
  34. package/dist/core/shared-memory.js +253 -0
  35. package/dist/core/shared-memory.js.map +1 -0
  36. package/dist/core/slash-commands.d.ts.map +1 -1
  37. package/dist/core/slash-commands.js +5 -1
  38. package/dist/core/slash-commands.js.map +1 -1
  39. package/dist/core/subagents.js +1 -1
  40. package/dist/core/subagents.js.map +1 -1
  41. package/dist/core/swarm/gates.d.ts +9 -0
  42. package/dist/core/swarm/gates.d.ts.map +1 -0
  43. package/dist/core/swarm/gates.js +65 -0
  44. package/dist/core/swarm/gates.js.map +1 -0
  45. package/dist/core/swarm/index.d.ts +9 -0
  46. package/dist/core/swarm/index.d.ts.map +1 -0
  47. package/dist/core/swarm/index.js +9 -0
  48. package/dist/core/swarm/index.js.map +1 -0
  49. package/dist/core/swarm/locks.d.ts +21 -0
  50. package/dist/core/swarm/locks.d.ts.map +1 -0
  51. package/dist/core/swarm/locks.js +93 -0
  52. package/dist/core/swarm/locks.js.map +1 -0
  53. package/dist/core/swarm/planner.d.ts +16 -0
  54. package/dist/core/swarm/planner.d.ts.map +1 -0
  55. package/dist/core/swarm/planner.js +137 -0
  56. package/dist/core/swarm/planner.js.map +1 -0
  57. package/dist/core/swarm/retry.d.ts +16 -0
  58. package/dist/core/swarm/retry.d.ts.map +1 -0
  59. package/dist/core/swarm/retry.js +32 -0
  60. package/dist/core/swarm/retry.js.map +1 -0
  61. package/dist/core/swarm/scheduler.d.ts +48 -0
  62. package/dist/core/swarm/scheduler.d.ts.map +1 -0
  63. package/dist/core/swarm/scheduler.js +554 -0
  64. package/dist/core/swarm/scheduler.js.map +1 -0
  65. package/dist/core/swarm/spawn.d.ts +16 -0
  66. package/dist/core/swarm/spawn.d.ts.map +1 -0
  67. package/dist/core/swarm/spawn.js +42 -0
  68. package/dist/core/swarm/spawn.js.map +1 -0
  69. package/dist/core/swarm/state-store.d.ts +35 -0
  70. package/dist/core/swarm/state-store.d.ts.map +1 -0
  71. package/dist/core/swarm/state-store.js +106 -0
  72. package/dist/core/swarm/state-store.js.map +1 -0
  73. package/dist/core/swarm/types.d.ts +116 -0
  74. package/dist/core/swarm/types.d.ts.map +1 -0
  75. package/dist/core/swarm/types.js +2 -0
  76. package/dist/core/swarm/types.js.map +1 -0
  77. package/dist/core/system-prompt.d.ts.map +1 -1
  78. package/dist/core/system-prompt.js +3 -2
  79. package/dist/core/system-prompt.js.map +1 -1
  80. package/dist/core/tools/shared-memory.d.ts +23 -0
  81. package/dist/core/tools/shared-memory.d.ts.map +1 -0
  82. package/dist/core/tools/shared-memory.js +134 -0
  83. package/dist/core/tools/shared-memory.js.map +1 -0
  84. package/dist/core/tools/task.d.ts +8 -1
  85. package/dist/core/tools/task.d.ts.map +1 -1
  86. package/dist/core/tools/task.js +664 -123
  87. package/dist/core/tools/task.js.map +1 -1
  88. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  89. package/dist/modes/interactive/components/footer.js +3 -11
  90. package/dist/modes/interactive/components/footer.js.map +1 -1
  91. package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
  92. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  93. package/dist/modes/interactive/components/login-dialog.js +27 -4
  94. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  95. package/dist/modes/interactive/components/oauth-selector.d.ts +13 -1
  96. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  97. package/dist/modes/interactive/components/oauth-selector.js +89 -27
  98. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  99. package/dist/modes/interactive/components/subagent-message.d.ts.map +1 -1
  100. package/dist/modes/interactive/components/subagent-message.js +14 -0
  101. package/dist/modes/interactive/components/subagent-message.js.map +1 -1
  102. package/dist/modes/interactive/interactive-mode.d.ts +50 -0
  103. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  104. package/dist/modes/interactive/interactive-mode.js +1594 -51
  105. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  106. package/docs/cli-reference.md +11 -1
  107. package/docs/configuration.md +4 -1
  108. package/docs/getting-started.md +2 -2
  109. package/docs/interactive-mode.md +43 -4
  110. package/docs/orchestration-and-subagents.md +96 -169
  111. package/package.json +5 -4
@@ -126,7 +126,17 @@ These commands run inside interactive mode (`iosm`), not as top-level CLI subcom
126
126
  - `/singular <feature request>` — command-first feasibility analyzer:
127
127
  - baseline repository scan + standard agent pass
128
128
  - outputs exactly 3 implementation options with recommendation
129
- - lets user choose option `1/2/3` before implementation
129
+ - lets user choose option `1/2/3`, then `Start with Swarm` or `Continue without Swarm`
130
+ - `/swarm` — canonical gated execution runtime:
131
+ - `/swarm run <task> [--max-parallel N] [--budget-usd X]`
132
+ - `/swarm from-singular <run-id> --option <1|2|3> [--max-parallel N] [--budget-usd X]`
133
+ - `/swarm watch [run-id]`
134
+ - `/swarm retry <run-id> <task-id> [--reset-brief]`
135
+ - `/swarm resume <run-id>`
136
+ - limits: `--max-parallel` supports `1..20`; delegated intra-task fan-out supports up to `10`
137
+ - consistency model: `Scopes -> Touches -> Locks -> Gates -> Done`
138
+ - built-in scheduler guards: progress heuristic + conflict density guard
139
+ - high-risk spawn candidates are confirmation-gated
130
140
 
131
141
  Migration notes:
132
142
  - `/blast` removed in favor of `/singular`
@@ -186,6 +186,9 @@ Index storage (global cache):
186
186
 
187
187
  ### Provider API Keys
188
188
 
189
+ `/login` supports the full provider catalog from `models.dev` and stores credentials in `~/.iosm/agent/auth.json`.
190
+ The table below lists common environment variables, but is not exhaustive.
191
+
189
192
  | Variable | Provider | Notes |
190
193
  |----------|----------|-------|
191
194
  | `ANTHROPIC_API_KEY` | Anthropic (Claude) | Primary recommended provider |
@@ -360,7 +363,7 @@ iosm --provider azure --model gpt-5.3
360
363
 
361
364
  ### OAuth-Based Providers
362
365
 
363
- Some providers support OAuth login (for example, Qwen CLI free OAuth):
366
+ Some providers support OAuth login (for example, Qwen CLI free OAuth). API-key providers are available via the same `/login` flow from the models.dev catalog:
364
367
 
365
368
  ```bash
366
369
  iosm
@@ -64,7 +64,7 @@ export OPENROUTER_API_KEY="sk-or-..."
64
64
  export MISTRAL_API_KEY="..."
65
65
  ```
66
66
 
67
- You can also use `/login` in interactive mode for OAuth providers (including free Qwen OAuth) and OpenRouter API key setup:
67
+ You can also use `/login` in interactive mode for OAuth providers and API-key providers from the full `models.dev` catalog:
68
68
 
69
69
  ```bash
70
70
  iosm
@@ -91,7 +91,7 @@ You'll see a prompt where you can type messages. The agent has access to your fi
91
91
  | Command | What it does |
92
92
  |---------|-------------|
93
93
  | `/model` | Pick or change the active model |
94
- | `/login` | Authenticate with OAuth providers (including Qwen) or add OpenRouter API key |
94
+ | `/login` | Authenticate with OAuth providers or add API keys for providers from models.dev catalog |
95
95
  | `/semantic` | Configure semantic provider and index/query meaning-based code search |
96
96
  | `/init` | Bootstrap IOSM artifacts for the current project |
97
97
  | `/agents` | View available custom/system agents |
@@ -56,6 +56,7 @@ iosm --continue
56
56
  | `/semantic` | Open semantic search manager (`setup/auto-index/status/index/rebuild/query`) | `/semantic` |
57
57
  | `/contract` | Interactive engineering contract editor (field-by-field, auto JSON build) | `/contract` |
58
58
  | `/singular` | Feature feasibility analyzer with implementation options and recommendation | `/singular add account dashboard` |
59
+ | `/swarm` | Recommended multi-agent orchestration runtime for complex/risky tasks (`run`, `from-singular`, `watch`, `retry`, `resume`) | `/swarm run refactor auth module --max-parallel 3` |
59
60
  | `/memory` | Interactive memory manager (`add/edit/remove/scope/path`) | `/memory` |
60
61
  | `/settings` | View/modify settings | `/settings` |
61
62
  | `/hotkeys` | View keyboard shortcuts | `/hotkeys` |
@@ -76,7 +77,8 @@ iosm --continue
76
77
 
77
78
  | Command | Description | Example |
78
79
  |---------|-------------|---------|
79
- | `/orchestrate` | Launch subagent orchestration | See below |
80
+ | `/swarm` | Swarm-first multi-agent orchestration runtime for complex/risky work | `/swarm run refactor auth and token flow` |
81
+ | `/orchestrate` | Manual legacy multi-agent orchestration (explicit agent splitting) | See below |
80
82
  | `/agents` | Inspect custom/system agents | `/agents` |
81
83
  | `/subagent-runs` | List subagent run history | `/subagent-runs` |
82
84
  | `/subagent-resume` | Resume a subagent run | `/subagent-resume run-123` |
@@ -95,7 +97,7 @@ iosm --continue
95
97
  | `/reload` | Reload extensions and resources | `/reload` |
96
98
  | `/permissions` | View/set tool permissions | `/permissions` |
97
99
  | `/yolo` | Toggle auto-approve mode | `/yolo on` |
98
- | `/login` | Authenticate with provider (OAuth incl. Qwen + OpenRouter API key) | `/login` |
100
+ | `/login` | Authenticate with provider (OAuth + API key providers from full models.dev catalog) | `/login` |
99
101
  | `/auth` | Alias for `/login` | `/auth` |
100
102
  | `/logout` | Clear saved provider credentials | `/logout` |
101
103
 
@@ -106,7 +108,8 @@ Manager includes `Automatic indexing` toggle (default `on`) to control query-tim
106
108
  In `/semantic setup`, the headers step is optional: press `Enter` on empty input to skip.
107
109
  `/memory` opens an interactive manager. `/memory <text>` saves a note to `memory.md` and reloads session context. Use `/memory edit <index> <text>` for direct updates.
108
110
  `/contract` edits contract fields interactively (`goal`, scope, constraints, quality gates, DoD, risks, etc.), then writes JSON automatically.
109
- `/singular <request>` runs a two-pass feasibility analysis (baseline scan + standard agent pass), builds concrete implementation options, and asks user to choose one.
111
+ `/singular <request>` runs a two-pass feasibility analysis (baseline scan + standard agent pass), builds concrete implementation options, then prompts `Start with Swarm` / `Continue without Swarm` / `Cancel`.
112
+ `/swarm` enforces `Scopes -> Touches -> Locks -> Gates -> Done`. If effective contract is missing, it blocks execution and opens a bootstrap menu (auto-draft, guided Q&A, or manual `/contract` editor).
110
113
  `/blast` and `/shadow` are removed from active interactive workflow.
111
114
 
112
115
  ### `/contract` Detailed Guide
@@ -219,7 +222,11 @@ After analysis, selector opens with variants:
219
222
  - choose Option 1 / Option 2 / Option 3
220
223
  - or close without decision
221
224
 
222
- If Option 1 or 2 is selected, execution draft is inserted into editor (ready to run).
225
+ If Option 1 or 2 is selected, execution mode prompt opens:
226
+ - `Start with Swarm (Recommended)` -> runs `/swarm from-singular <run-id> --option <n>`
227
+ - `Continue without Swarm` -> inserts execution draft into editor (ready to run)
228
+ - `Cancel` -> exits without changes
229
+
223
230
  If Option 3 is selected, run is explicitly marked as postponed.
224
231
 
225
232
  #### Fallback Behavior
@@ -233,6 +240,38 @@ Use `/model` to enable full agent feasibility pass.
233
240
  - `/blast` is deprecated/removed.
234
241
  - `/shadow` is removed.
235
242
 
243
+ ### `/swarm` Detailed Guide
244
+
245
+ Canonical commands:
246
+ - `/swarm run <task> [--max-parallel N] [--budget-usd X]`
247
+ - `/swarm from-singular <run-id> --option <1|2|3> [--max-parallel N] [--budget-usd X]`
248
+ - `/swarm watch [run-id]`
249
+ - `/swarm retry <run-id> <task-id> [--reset-brief]`
250
+ - `/swarm resume <run-id>`
251
+
252
+ Execution note:
253
+ - Run-level `--max-parallel` supports `1..20`.
254
+ - A single swarm task can use delegated intra-task subagents in parallel (up to 10) when decomposition is beneficial.
255
+ - Shared memory tools (`shared_memory_write` / `shared_memory_read`) are available to tasks/delegates that share a `run_id`.
256
+ - Standalone `task` calls auto-generate internal `run_id/task_id`, so shared-memory collaboration still works for root + delegates.
257
+
258
+ Runtime artifacts:
259
+ - `.iosm/orchestrate/<run-id>/run.json`
260
+ - `.iosm/orchestrate/<run-id>/dag.json`
261
+ - `.iosm/orchestrate/<run-id>/state.json`
262
+ - `.iosm/orchestrate/<run-id>/events.jsonl`
263
+ - `.iosm/orchestrate/<run-id>/checkpoints/latest.json`
264
+ - `.iosm/orchestrate/<run-id>/reports/*`
265
+
266
+ `/swarm watch` includes:
267
+ - current state and task breakdown
268
+ - budget and warning state
269
+ - ETA ticks and throughput
270
+ - critical path and theoretical speedup
271
+ - lock snapshot and bottleneck tasks
272
+
273
+ `/orchestrate --swarm` was removed. Use `/swarm ...` directly.
274
+
236
275
  ---
237
276
 
238
277
  ## Keyboard Shortcuts
@@ -1,184 +1,152 @@
1
1
  # Orchestration & Subagents
2
2
 
3
- `iosm-cli` supports delegated execution through subagents specialized AI agents that handle task delegation, parallel execution, and multi-agent workflows.
3
+ `iosm-cli` now uses a **swarm-first** execution model for complex/risky changes.
4
4
 
5
- ## Overview
5
+ Canonical path:
6
+ - `/singular` -> choose option
7
+ - effective `/contract` applied (or bootstrap required)
8
+ - `/swarm` execution runtime
9
+ - optional `/iosm` optimization loop
6
10
 
7
- Subagents allow you to:
8
- - **Delegate tasks** to specialized agents with isolated context windows
9
- - **Run agents in parallel** for independent analyses or implementations
10
- - **Orchestrate teams** with dependency ordering and lock-based coordination
11
- - **Track runs** with full transcripts and result aggregation
11
+ Core consistency model:
12
+ - **Scopes -> Touches -> Locks -> Gates -> Done**
12
13
 
13
14
  ---
14
15
 
15
16
  ## User-Level Entry Points
16
17
 
17
- ### 1. Natural Language Delegation
18
+ ### 1. Decision-first flow (recommended)
18
19
 
19
- Simply describe what you want delegated, and the agent handles orchestration:
20
-
21
- ```
22
- You: Launch 3 agents to analyze security, performance, and code quality separately
23
-
24
- Agent: I'll create 3 parallel subagents for each analysis area...
20
+ ```bash
21
+ /singular "Refactor auth and split session handling from token validation"
22
+ # choose Option 1/2/3
23
+ # choose Start with Swarm (Recommended)
25
24
  ```
26
25
 
27
- ### 2. Slash Command Orchestration
28
-
29
- Use `/orchestrate` for explicit control:
26
+ ### 2. Direct swarm execution
30
27
 
31
28
  ```bash
32
- /orchestrate --parallel --agents 3 \
33
- --profiles explore,full,iosm_verifier \
34
- --cwd .,src,.iosm \
35
- Analyze security, optimize performance, verify IOSM compliance
29
+ /swarm run "Refactor auth and reduce integration risk" --max-parallel 3 --budget-usd 12
36
30
  ```
37
31
 
38
- ### 3. Agent Mention
32
+ ### 3. Agent mention / delegated tasks
39
33
 
40
- Reference a specific agent by name:
41
-
42
- ```
34
+ ```text
43
35
  @security-auditor Review the authentication module for vulnerabilities
44
36
  ```
45
37
 
46
38
  ---
47
39
 
48
- ## `/orchestrate` Command
40
+ ## `/swarm` Command Surface
49
41
 
50
42
  ### Syntax
51
43
 
52
44
  ```bash
53
- /orchestrate [flags] <task description>
54
- ```
55
-
56
- ### Execution Flags
45
+ /swarm run <task> [--max-parallel N] [--budget-usd X]
46
+ /swarm from-singular <run-id> --option <1|2|3> [--max-parallel N] [--budget-usd X]
47
+ /swarm watch [run-id]
48
+ /swarm retry <run-id> <task-id> [--reset-brief]
49
+ /swarm resume <run-id>
50
+ /swarm help
51
+ ```
52
+
53
+ ### Notes
54
+
55
+ - `/swarm` will not execute without an effective `/contract`.
56
+ - Run-level `--max-parallel` supports `1..20`.
57
+ - Within a single swarm task, the execution agent can fan out delegated subagents in parallel (up to 10) when the subtask is decomposable.
58
+ - Tasks/delegates with the same `run_id` can exchange intermediate state via `shared_memory_write` / `shared_memory_read`.
59
+ - Standalone `task` calls without explicit `run_id` use an internal run/task id, so shared memory still works inside that task execution (root + delegates).
60
+ - If contract is missing, bootstrap menu is blocking:
61
+ - `Auto-draft from task (Recommended)`
62
+ - `Guided Q&A`
63
+ - `Open manual /contract editor`
64
+ - Medium/large repositories use Project Index planning by default.
65
+ - Semantic index is optional enrichment; when stale/missing, swarm continues with guided recommendations.
66
+ - Scheduler guards are enabled by default:
67
+ - `progress heuristic` (prioritizes high-impact tasks when progress stalls)
68
+ - `conflict density guard` (reduces parallelism under heavy touch overlap)
69
+ - High-risk spawn candidates require confirmation (approve/reject/abort run).
57
70
 
58
- | Flag | Description | Example |
59
- |------|-------------|---------|
60
- | `--parallel` | Run agents concurrently | `--parallel` |
61
- | `--sequential` | Run agents one after another | `--sequential` |
62
- | `--agents <N>` | Number of agents to spawn | `--agents 3` |
63
- | `--max-parallel <N>` | Concurrency limit for parallel runs | `--max-parallel 2` |
64
-
65
- ### Profile & Context Flags
66
-
67
- | Flag | Description | Example |
68
- |------|-------------|---------|
69
- | `--profile <name>` | Single profile for all agents | `--profile explore` |
70
- | `--profiles p1,p2,...` | Per-agent profile assignment | `--profiles explore,full,iosm_verifier` |
71
- | `--cwd path1,path2,...` | Per-agent working directories | `--cwd .,src,test` |
71
+ ---
72
72
 
73
- ### Coordination Flags
73
+ ## Command Separation
74
74
 
75
- | Flag | Description | Example |
76
- |------|-------------|---------|
77
- | `--locks lock1,lock2,...` | Write serialization domains | `--locks db,config` |
78
- | `--depends 2>1,3>2` | Dependency ordering | `--depends 2>1` (agent 2 waits for 1) |
79
- | `--worktree` | Git worktree isolation | `--worktree` |
75
+ - Use direct prompt to the main agent for simple tasks.
76
+ - Use legacy `/orchestrate ...` when you explicitly want manual multi-agent splitting with old team-run semantics.
77
+ - Use canonical `/swarm ...` as multi-agent orchestration runtime for complex/risky work.
78
+ - `/orchestrate --swarm` was removed to avoid command ambiguity.
80
79
 
81
80
  ---
82
81
 
83
- ## Usage Examples
84
-
85
- ### Parallel Independent Analysis
82
+ ## Runtime Artifacts
86
83
 
87
- Three agents analyze different aspects simultaneously:
84
+ Swarm run artifacts are written to:
88
85
 
89
- ```bash
90
- /orchestrate --parallel --agents 3 \
91
- --profiles explore,explore,explore \
92
- --cwd src/auth,src/api,src/data \
93
- Analyze code quality and suggest improvements
86
+ ```text
87
+ .iosm/orchestrate/<run-id>/
88
+ ├── run.json
89
+ ├── dag.json
90
+ ├── state.json
91
+ ├── events.jsonl
92
+ ├── checkpoints/
93
+ │ └── latest.json
94
+ └── reports/
95
+ ├── integration_report.md
96
+ ├── gates.json
97
+ └── shared_context.md
94
98
  ```
95
99
 
96
- ### Sequential Pipeline
100
+ Swarm run history is native to `/swarm` commands (`watch`, `retry`, `resume`), not mirrored into legacy team-run storage.
97
101
 
98
- Agent 2 depends on Agent 1's output:
99
-
100
- ```bash
101
- /orchestrate --sequential --agents 2 \
102
- --depends 2>1 \
103
- First: analyze the codebase architecture. \
104
- Second: propose a refactoring plan based on the analysis.
105
- ```
102
+ ---
106
103
 
107
- ### Parallel with Write Isolation
104
+ ## Visibility & Recovery
108
105
 
109
- For concurrent changes that might conflict:
106
+ ### Watch
110
107
 
111
108
  ```bash
112
- /orchestrate --parallel --worktree --agents 2 \
113
- Agent 1: refactor auth module \
114
- Agent 2: refactor payment module
109
+ /swarm watch [run-id]
115
110
  ```
116
111
 
117
- ### Locked Write Coordination
118
-
119
- Serialize writes to shared resources:
120
-
121
- ```bash
122
- /orchestrate --parallel --agents 3 \
123
- --locks database-schema \
124
- All agents: optimize your assigned module's database queries
125
- ```
112
+ Shows live snapshot fields:
113
+ - run status
114
+ - ready/running/blocked/done/error counts
115
+ - budget usage and 80% warning state
116
+ - locks and current touches map
117
+ - ETA ticks, throughput per tick, critical path estimate, theoretical speedup, and top bottleneck tasks
126
118
 
127
- ### Full Team Orchestration
119
+ ### Retry
128
120
 
129
121
  ```bash
130
- /orchestrate --parallel --agents 4 \
131
- --profiles iosm_analyst,explore,iosm_verifier,full \
132
- --max-parallel 2 \
133
- 1: Collect baseline metrics \
134
- 2: Identify optimization opportunities \
135
- 3: Verify current quality gate compliance \
136
- 4: Implement the top-priority fix
122
+ /swarm retry <run-id> <task-id> [--reset-brief]
137
123
  ```
138
124
 
139
- ---
140
-
141
- ## Visibility & Tracking
125
+ - retries one failed/blocked task under retry taxonomy
126
+ - optional `--reset-brief` lets you edit task brief before retry
142
127
 
143
- ### View Subagent Runs
128
+ ### Resume
144
129
 
145
130
  ```bash
146
- /subagent-runs
131
+ /swarm resume <run-id>
147
132
  ```
148
133
 
149
- Lists all subagent runs with:
150
- - Run ID, status (running/complete/failed)
151
- - Agent profile and task description
152
- - Timestamps and duration
153
-
154
- ### Resume a Subagent Run
155
-
156
- ```bash
157
- /subagent-resume <run-id> [extra instructions]
158
- ```
134
+ Resumes from checkpoint + snapshot state.
159
135
 
160
- Continue or refine a previous subagent's work:
136
+ ---
161
137
 
162
- ```bash
163
- /subagent-resume run-abc123 "Focus more on error handling"
164
- ```
138
+ ## Legacy `/orchestrate` (non-swarm)
165
139
 
166
- ### Team Run Status
140
+ Legacy orchestration remains available for existing workflows:
167
141
 
168
142
  ```bash
169
- /team-runs # List team orchestration runs
170
- /team-status <team-run-id> # Detailed status of a specific team run
143
+ /orchestrate --parallel --agents 3 \
144
+ --profiles explore,full,iosm_verifier \
145
+ --cwd .,src,.iosm \
146
+ Analyze security, optimize performance, verify IOSM compliance
171
147
  ```
172
148
 
173
- ### Artifacts
174
-
175
- Subagent transcripts and team records are stored in:
176
-
177
- ```
178
- .iosm/subagents/
179
- ├── runs/ # Individual subagent transcripts
180
- └── teams/ # Team orchestration records
181
- ```
149
+ Use legacy mode when you explicitly need old team-run semantics.
182
150
 
183
151
  ---
184
152
 
@@ -217,57 +185,16 @@ Always provide:
217
185
 
218
186
  # View all available agents
219
187
  /agents
220
-
221
- # Use in orchestration
222
- /orchestrate --agents 1 --profile security-auditor \
223
- Audit the authentication module
224
188
  ```
225
189
 
226
- ### System Agents
227
-
228
- Built-in system agents available by default include auditor, verifier, and executor roles. View them with `/agents`.
229
-
230
- ---
231
-
232
- ## Parallel Safety Model
233
-
234
- ### When to Use Locks
235
-
236
- Use `lock_key` domains when multiple agents might write to the same files:
237
-
238
- ```bash
239
- /orchestrate --parallel --agents 2 \
240
- --locks "config-files" \
241
- Both modify shared configuration
242
- ```
243
-
244
- ### When to Use Worktrees
245
-
246
- Use `--worktree` for large-scale concurrent edits:
247
-
248
- ```bash
249
- /orchestrate --parallel --worktree --agents 3 \
250
- Each refactor a major module independently
251
- ```
252
-
253
- ### When No Coordination Is Needed
254
-
255
- Keep independent analyses lock-free:
256
-
257
- ```bash
258
- /orchestrate --parallel --agents 3 \
259
- --profiles explore,explore,explore \
260
- Each analyze a different module (read-only)
261
- ```
190
+ Built-in system agents remain available; inspect via `/agents`.
262
191
 
263
192
  ---
264
193
 
265
- ## Best Practices
194
+ ## Safety Guidance
266
195
 
267
- 1. **Keep tasks independent** Each agent works best with a well-defined, independent scope
268
- 2. **Narrow responsibilities** One agent, one clear task
269
- 3. **Use appropriate profiles** Read-only tasks don't need `full` profile
270
- 4. **Aggregate results** The orchestrating agent synthesizes all subagent outputs
271
- 5. **Clarify constraints** Specify boundaries and expected output format
272
- 6. **Monitor progress** — Use `/subagent-runs` and `/team-status` to track execution
273
- 7. **Start small** — Begin with 2-3 agents and scale up as needed
196
+ - Use `/contract` to lock execution scope before running swarm.
197
+ - Prefer `/singular` when scope/impact is unclear.
198
+ - Use `/swarm watch` frequently on medium/high-risk runs.
199
+ - Use `/checkpoint`/`/rollback` before broad refactors.
200
+ - Follow up with `/iosm` for measurable post-change quality improvements.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iosm-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Standalone IOSM CLI with agent tooling, session management, and IOSM artifact orchestration",
5
5
  "type": "module",
6
6
  "iosmConfig": {
@@ -32,7 +32,7 @@
32
32
  "clean": "shx rm -rf dist",
33
33
  "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
34
34
  "build": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js && npm run copy-assets",
35
- "deploy-local": "npm run build && rsync -a --delete dist/ \"$(node -e \"console.log(require('child_process').execSync('volta which iosm').toString().trim().replace(/\\/bin\\/iosm$/, '/lib/node_modules/iosm-cli/dist'))\")/\"",
35
+ "deploy-local": "npm run build && node scripts/deploy-local.mjs",
36
36
  "build:binary": "npm run build && bun build --compile ./dist/cli.js --outfile dist/iosm && npm run copy-binary-assets",
37
37
  "check": "tsc --noEmit -p tsconfig.build.json",
38
38
  "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
@@ -53,7 +53,7 @@
53
53
  "cli-highlight": "^2.1.11",
54
54
  "diff": "^8.0.2",
55
55
  "extract-zip": "^2.0.1",
56
- "file-type": "^21.1.1",
56
+ "file-type": "^21.3.1",
57
57
  "glob": "^13.0.1",
58
58
  "hosted-git-info": "^9.0.2",
59
59
  "ignore": "^7.0.5",
@@ -68,7 +68,8 @@
68
68
  "rimraf": "6.1.2",
69
69
  "gaxios": {
70
70
  "rimraf": "6.1.2"
71
- }
71
+ },
72
+ "hono": "4.12.7"
72
73
  },
73
74
  "optionalDependencies": {
74
75
  "@mariozechner/clipboard": "^0.3.2"