iosm-cli 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +33 -2
- package/dist/core/blast.d.ts +62 -0
- package/dist/core/blast.d.ts.map +1 -0
- package/dist/core/blast.js +448 -0
- package/dist/core/blast.js.map +1 -0
- package/dist/core/contract.d.ts +54 -0
- package/dist/core/contract.d.ts.map +1 -0
- package/dist/core/contract.js +300 -0
- package/dist/core/contract.js.map +1 -0
- package/dist/core/semantic/config.d.ts.map +1 -1
- package/dist/core/semantic/config.js +5 -0
- package/dist/core/semantic/config.js.map +1 -1
- package/dist/core/semantic/index.d.ts +1 -1
- package/dist/core/semantic/index.d.ts.map +1 -1
- package/dist/core/semantic/index.js +1 -1
- package/dist/core/semantic/index.js.map +1 -1
- package/dist/core/semantic/runtime.d.ts.map +1 -1
- package/dist/core/semantic/runtime.js +12 -1
- package/dist/core/semantic/runtime.js.map +1 -1
- package/dist/core/semantic/types.d.ts +6 -0
- package/dist/core/semantic/types.d.ts.map +1 -1
- package/dist/core/semantic/types.js +6 -0
- package/dist/core/semantic/types.js.map +1 -1
- package/dist/core/shadow-guard.d.ts +30 -0
- package/dist/core/shadow-guard.d.ts.map +1 -0
- package/dist/core/shadow-guard.js +81 -0
- package/dist/core/shadow-guard.js.map +1 -0
- package/dist/core/singular.d.ts +73 -0
- package/dist/core/singular.d.ts.map +1 -0
- package/dist/core/singular.js +413 -0
- package/dist/core/singular.js.map +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +9 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/semantic-search.d.ts.map +1 -1
- package/dist/core/tools/semantic-search.js +1 -0
- package/dist/core/tools/semantic-search.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +8 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +8 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +70 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +43 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1304 -24
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/cli-reference.md +19 -1
- package/docs/configuration.md +5 -0
- package/docs/interactive-mode.md +131 -1
- package/package.json +1 -1
package/docs/cli-reference.md
CHANGED
|
@@ -112,7 +112,25 @@ iosm semantic query "<text>" [--top-k N]
|
|
|
112
112
|
|
|
113
113
|
Notes:
|
|
114
114
|
- If semantic config is missing, the command prints actionable paths and suggests `/semantic setup`.
|
|
115
|
-
- `query` auto-refreshes stale indexes
|
|
115
|
+
- `query` auto-refreshes stale indexes only when `semanticSearch.autoIndex=true` (default is `true`).
|
|
116
|
+
- When auto-index is off, run `iosm semantic index` (or `rebuild` for provider/chunk/filter changes).
|
|
117
|
+
|
|
118
|
+
### Interactive feasibility/contract commands
|
|
119
|
+
|
|
120
|
+
These commands run inside interactive mode (`iosm`), not as top-level CLI subcommands:
|
|
121
|
+
|
|
122
|
+
- `/contract` — interactive engineering contract manager:
|
|
123
|
+
- edit fields one-by-one
|
|
124
|
+
- autosave on `Enter`
|
|
125
|
+
- auto-build `.iosm/contract.json` for project scope
|
|
126
|
+
- `/singular <feature request>` — command-first feasibility analyzer:
|
|
127
|
+
- baseline repository scan + standard agent pass
|
|
128
|
+
- outputs exactly 3 implementation options with recommendation
|
|
129
|
+
- lets user choose option `1/2/3` before implementation
|
|
130
|
+
|
|
131
|
+
Migration notes:
|
|
132
|
+
- `/blast` removed in favor of `/singular`
|
|
133
|
+
- `/shadow` removed
|
|
116
134
|
|
|
117
135
|
---
|
|
118
136
|
|
package/docs/configuration.md
CHANGED
|
@@ -135,6 +135,7 @@ Schema (`semanticSearch` object):
|
|
|
135
135
|
{
|
|
136
136
|
"semanticSearch": {
|
|
137
137
|
"enabled": true,
|
|
138
|
+
"autoIndex": true,
|
|
138
139
|
"provider": {
|
|
139
140
|
"type": "openrouter",
|
|
140
141
|
"model": "openai/text-embedding-3-small",
|
|
@@ -166,6 +167,10 @@ Schema (`semanticSearch` object):
|
|
|
166
167
|
}
|
|
167
168
|
```
|
|
168
169
|
|
|
170
|
+
`autoIndex` controls query-time automatic refresh:
|
|
171
|
+
- `true` (default): `query` automatically refreshes stale index (and rebuilds when required)
|
|
172
|
+
- `false`: stale/missing index must be updated manually via `iosm semantic index` / `rebuild`
|
|
173
|
+
|
|
169
174
|
Index storage (global cache):
|
|
170
175
|
|
|
171
176
|
```
|
package/docs/interactive-mode.md
CHANGED
|
@@ -53,7 +53,9 @@ iosm --continue
|
|
|
53
53
|
| `/model` | Open provider-first model selector (`provider -> model`) | `/model` |
|
|
54
54
|
| `/scoped-models` | Manage model rotation | `/scoped-models` |
|
|
55
55
|
| `/mcp` | Open MCP manager UI and run MCP subcommands | `/mcp` |
|
|
56
|
-
| `/semantic` | Open semantic search manager (`setup/status/index/rebuild/query`) | `/semantic` |
|
|
56
|
+
| `/semantic` | Open semantic search manager (`setup/auto-index/status/index/rebuild/query`) | `/semantic` |
|
|
57
|
+
| `/contract` | Interactive engineering contract editor (field-by-field, auto JSON build) | `/contract` |
|
|
58
|
+
| `/singular` | Feature feasibility analyzer with implementation options and recommendation | `/singular add account dashboard` |
|
|
57
59
|
| `/memory` | Interactive memory manager (`add/edit/remove/scope/path`) | `/memory` |
|
|
58
60
|
| `/settings` | View/modify settings | `/settings` |
|
|
59
61
|
| `/hotkeys` | View keyboard shortcuts | `/hotkeys` |
|
|
@@ -99,9 +101,137 @@ iosm --continue
|
|
|
99
101
|
|
|
100
102
|
`/mcp add` without flags starts a guided wizard in the terminal UI.
|
|
101
103
|
`/semantic` opens an interactive setup/status/index/query manager for embeddings search.
|
|
104
|
+
Manager includes `Automatic indexing` toggle (default `on`) to control query-time auto-refresh.
|
|
102
105
|
`/semantic setup` now auto-loads model catalogs for OpenRouter (`/api/v1/embeddings/models`) and Ollama (`/api/tags`) with manual fallback.
|
|
103
106
|
In `/semantic setup`, the headers step is optional: press `Enter` on empty input to skip.
|
|
104
107
|
`/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
|
+
`/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.
|
|
110
|
+
`/blast` and `/shadow` are removed from active interactive workflow.
|
|
111
|
+
|
|
112
|
+
### `/contract` Detailed Guide
|
|
113
|
+
|
|
114
|
+
`/contract` is a layered contract editor with two sources and one merged output:
|
|
115
|
+
|
|
116
|
+
| Layer | Scope | Persistence | Storage |
|
|
117
|
+
|------|-------|-------------|---------|
|
|
118
|
+
| `project` | Project-wide baseline | Persistent | `.iosm/contract.json` |
|
|
119
|
+
| `session` | Current session override | Temporary | In-memory session overlay |
|
|
120
|
+
| `effective` | `project + session` merged result | Derived | Computed at runtime |
|
|
121
|
+
|
|
122
|
+
Important merge rule:
|
|
123
|
+
- `session` overrides `project` for the same keys.
|
|
124
|
+
- `effective` is what the runtime actually uses.
|
|
125
|
+
|
|
126
|
+
#### Quick Difference: Effective vs Session vs Project
|
|
127
|
+
|
|
128
|
+
- `Open effective contract` is read-only and shows what runtime is enforcing right now.
|
|
129
|
+
- `Edit session contract` changes only this session (temporary overlay, not persisted to disk).
|
|
130
|
+
- `Edit project contract` changes `.iosm/contract.json` (persistent baseline for future sessions).
|
|
131
|
+
|
|
132
|
+
#### Manager Actions
|
|
133
|
+
|
|
134
|
+
| Action | What it does | When to use |
|
|
135
|
+
|------|---------------|-------------|
|
|
136
|
+
| `Open effective contract` | Shows the merged JSON currently enforced by runtime | Verify final active constraints |
|
|
137
|
+
| `Edit session contract` | Edits temporary overrides for current session | Experiments, one-off constraints |
|
|
138
|
+
| `Edit project contract` | Edits persistent project contract file | Team-wide stable defaults |
|
|
139
|
+
| `Copy effective -> session` | Saves merged state into session layer | Freeze current merged state for this run |
|
|
140
|
+
| `Copy effective -> project` | Saves merged state into project file | Promote temporary decisions to baseline |
|
|
141
|
+
| `Delete session contract` | Clears temporary overlay | Reset session overrides |
|
|
142
|
+
| `Delete project contract` | Removes `.iosm/contract.json` | Full baseline reset |
|
|
143
|
+
|
|
144
|
+
#### Field Editor Behavior
|
|
145
|
+
|
|
146
|
+
- Select a field and press `Enter`.
|
|
147
|
+
- Input text (single-line or multi-line list depending on field type).
|
|
148
|
+
- Press `Enter` to submit.
|
|
149
|
+
- Change is saved immediately to selected scope (`session` or `project`).
|
|
150
|
+
- Empty input clears that field.
|
|
151
|
+
|
|
152
|
+
There is no separate "Save" step in field editor mode.
|
|
153
|
+
|
|
154
|
+
#### Common Workflows
|
|
155
|
+
|
|
156
|
+
1. Temporary tightening for one run:
|
|
157
|
+
- Open `/contract`
|
|
158
|
+
- `Edit session contract`
|
|
159
|
+
- Set `constraints` and `quality_gates`
|
|
160
|
+
- Confirm via `Open effective contract`
|
|
161
|
+
|
|
162
|
+
2. Promote temporary policy to project baseline:
|
|
163
|
+
- Open `/contract`
|
|
164
|
+
- `Copy effective -> project`
|
|
165
|
+
- Review `.iosm/contract.json` in VCS
|
|
166
|
+
|
|
167
|
+
3. Recover from aggressive temporary overrides:
|
|
168
|
+
- Open `/contract`
|
|
169
|
+
- `Delete session contract`
|
|
170
|
+
- Re-open `effective` and verify fallback to `project`
|
|
171
|
+
|
|
172
|
+
### `/singular` Detailed Guide
|
|
173
|
+
|
|
174
|
+
`/singular` is a command-first feasibility mode (no pre-menu).
|
|
175
|
+
Pattern: `/singular <feature request>`
|
|
176
|
+
|
|
177
|
+
Examples:
|
|
178
|
+
- `/singular add account dashboard`
|
|
179
|
+
- `/singular introduce RBAC for API`
|
|
180
|
+
- `/singular redesign billing reconciliation flow`
|
|
181
|
+
|
|
182
|
+
#### What Happens Internally
|
|
183
|
+
|
|
184
|
+
1. Baseline repository pass:
|
|
185
|
+
- Scans project files and estimates baseline complexity/blast radius.
|
|
186
|
+
- Collects likely impacted files and contract signals.
|
|
187
|
+
|
|
188
|
+
2. Standard agent feasibility pass:
|
|
189
|
+
- Launches an isolated standard agent run (`plan` profile) with repository tools.
|
|
190
|
+
- Agent inspects real files and returns structured feasibility JSON.
|
|
191
|
+
- Produces recommendation, impact analysis, and implementation variants.
|
|
192
|
+
|
|
193
|
+
3. Merge + persistence:
|
|
194
|
+
- Agent insights are merged with baseline data.
|
|
195
|
+
- Analysis is saved to `.iosm/singular/<run-id>/analysis.json` (+ `meta.json`).
|
|
196
|
+
|
|
197
|
+
#### Output Shape
|
|
198
|
+
|
|
199
|
+
Each run includes:
|
|
200
|
+
- `recommendation`: `implement_now | implement_incrementally | defer`
|
|
201
|
+
- `reason`: why this recommendation is best for current stage
|
|
202
|
+
- `complexity` and `blast_radius`
|
|
203
|
+
- `stage_fit`: `needed_now | optional_now | later`
|
|
204
|
+
- `impact_analysis`: codebase, delivery, risks, operations
|
|
205
|
+
- `implementation_options` (exactly 3 variants):
|
|
206
|
+
- Option 1: practical/recommended path
|
|
207
|
+
- Option 2: alternative approach
|
|
208
|
+
- Option 3: defer / do not implement now
|
|
209
|
+
|
|
210
|
+
Each option includes:
|
|
211
|
+
- summary and trade-offs (`pros`/`cons`)
|
|
212
|
+
- concrete file targets (`suggested_files`)
|
|
213
|
+
- step-by-step plan (`plan`)
|
|
214
|
+
- `when_to_choose` guidance
|
|
215
|
+
|
|
216
|
+
#### Decision Flow
|
|
217
|
+
|
|
218
|
+
After analysis, selector opens with variants:
|
|
219
|
+
- choose Option 1 / Option 2 / Option 3
|
|
220
|
+
- or close without decision
|
|
221
|
+
|
|
222
|
+
If Option 1 or 2 is selected, execution draft is inserted into editor (ready to run).
|
|
223
|
+
If Option 3 is selected, run is explicitly marked as postponed.
|
|
224
|
+
|
|
225
|
+
#### Fallback Behavior
|
|
226
|
+
|
|
227
|
+
If no model is selected (or agent pass fails), `/singular` still returns a heuristic baseline analysis.
|
|
228
|
+
Use `/model` to enable full agent feasibility pass.
|
|
229
|
+
|
|
230
|
+
#### Command Migration
|
|
231
|
+
|
|
232
|
+
- `/singular` is the feasibility command to use.
|
|
233
|
+
- `/blast` is deprecated/removed.
|
|
234
|
+
- `/shadow` is removed.
|
|
105
235
|
|
|
106
236
|
---
|
|
107
237
|
|