simt-dev 0.4.0 → 0.5.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 CHANGED
@@ -6,6 +6,53 @@ All notable changes to this package are recorded here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.0] — 2026-10-25
10
+
11
+ ### An offline distiller that proposes, never projects
12
+
13
+ `simt distill <skill|doc>` writes a budgeted summary of a skill body or repository
14
+ document with citations to source line ranges (`[L12-L15]`). The default engine is a
15
+ deterministic outline pass with no model and no network; `--local` uses the configured
16
+ local model endpoint from plan 0003 R37. Proposals are cached by content digest in
17
+ `.simt-dev/distilled/<digest>.md` and carry provenance frontmatter (source digest,
18
+ engine, prompt hash, `verified`), so a human merges them into the pack or repository:
19
+ model output never lands in projected or committed text (ADR-090). Every citation is
20
+ verified against the source, and a fabricated one makes the proposal
21
+ `verified: false` with the fault named.
22
+
23
+ ### An advisory critic over the staged diff
24
+
25
+ `simt review` gathers the brief — the governing decision records and scoped rules for
26
+ the staged files — with no model and no network. `simt review --local` sends that brief
27
+ plus the staged diff to the local model and receives an ADR-008 verdict skeleton
28
+ (`BLOCK`, `APPROVE WITH RESIDUAL RISK` or `APPROVE`) that cites rule ids with an
29
+ `@` marker; a citation to an id that governs nothing is named a fabrication, a
30
+ `BLOCK` carries no weight without a file:line or command finding, and a residual-risk
31
+ approval must list what the critic did not review. Verdicts land as proposals in
32
+ `.simt-dev/reviews/<digest>.md` and stay advisory: they become a gate only when
33
+ `simt bench critic --labels <path>` measures precision of at least 0.8 (with recall
34
+ reported) on at least 30 historical diffs human-labelled in a JSONL file the tool
35
+ consumes but never writes.
36
+
37
+ ### Model and effort advice in the brief header
38
+
39
+ `simt brief` now carries an `ADVICE` header, such as `small model, no plan mode` or
40
+ `frontier model, plan first`, derived from the estate's own bench history: the brief's
41
+ task kind and estimated file size pick a neighbourhood of similar bench tasks, the
42
+ cheapest model class that actually resolved them sets the tier on a thirds ladder of
43
+ the classes the estate has observed (no vendor names in code), and median tool calls in
44
+ the neighbourhood set the effort. Nothing is selected: a human still names the model.
45
+ With no history the brief says nothing, and with a thin one it prints a caution rather
46
+ than a guess. The advice is advisory until a held-out bench shows a cost cut of at
47
+ least 25% at a resolved-rate loss of at most 2 points, so the unmeasured bar travels
48
+ in every packet the advice appears in.
49
+
50
+ ### Fixed
51
+
52
+ `package.json` gained the `repository` field npm's provenance verification requires:
53
+ the sigstore bundle is checked against the public source repository, and the missing
54
+ URL rejected the 0.4.0 upload with `E422`.
55
+
9
56
  ## [0.4.0] — 2026-10-20
10
57
 
11
58
  ### Hybrid retrieval fuses BM25, the code graph, and the resolver
@@ -733,6 +780,7 @@ never ran `simt hooks install` again will find nothing until the dependency is r
733
780
  and `simt hooks install --yes` is re-run. That is a real upgrade step and it is called out
734
781
  here rather than discovered.
735
782
 
783
+ [0.5.0]: https://github.com/QuazarMedia/simt-dev/releases/tag/v0.5.0
736
784
  [0.4.0]: https://github.com/QuazarMedia/simt-dev/releases/tag/v0.4.0
737
785
  [0.3.1]: https://github.com/QuazarMedia/simt-dev/releases/tag/v0.3.1
738
786
  [0.3.0]: https://github.com/QuazarMedia/simt-dev/releases/tag/v0.3.0
package/README.md CHANGED
@@ -23,78 +23,271 @@ to merge. It does not write the projection.
23
23
  ## Today
24
24
 
25
25
  ```sh
26
- simt init # adopt or scaffold; prints a plan; --yes writes
27
- simt doctor # what this repo is, and whether its config is healthy
28
- simt check # projection drift, the manifest, and declared checkers
29
- simt sync --yes # regenerate the projection
30
- simt upgrade --yes # move every pin of this tool to this version
31
-
32
- simt rules why ADR-042 # the decision behind a rule, and what was rejected
33
- simt skills brief --task # a short brief for one task
34
- simt tokens # bytes a reader loads at session start
35
- simt shared plan # rules a workspace repeats, and what carrying them once saves
36
- simt harness loaders # what each harness loads, and what its cap drops
37
-
38
- simt hooks install --yes # the git dispatcher, for gates this repo can run
39
- simt agent-hooks install --yes # the same policy before a tool call
40
- simt evidence # runs recorded against this tree
41
- simt index # files, exports and imports, from git blob hashes
42
- simt plan next # the next tracker row that is ready
43
-
44
- simt bench report # resolved rate, quality, cost, across arms
45
- simt compare # every sibling checkout that has adopted
46
- simt mcp # the read-only surface, over stdio
26
+ # Adopt, inspect, and maintain a repository
27
+ simt init # adopt or scaffold; prints a plan; --yes writes
28
+ simt doctor # stack, facts, evidence, and config health
29
+ simt check [--frozen] # projection drift, manifest, lock, and declared checkers
30
+ simt sync [--explain] --yes # regenerate the projection
31
+ simt upgrade --yes # move every consumer in the workspace to this SHA
32
+
33
+ # Orient on a task and query the local code and governance graph
34
+ simt brief "<task>" # one <= 2 KB packet: kind, commands, files, tests, ADRs, skills, lessons
35
+ simt index [--embed] # files, symbols, edges, FTS5 tokens (+ optional local embeddings)
36
+ simt map --task "<task>" # hybrid BM25 + PageRank + resolver file ranking (outline|names|signatures)
37
+ simt impact <file|symbol> # importers, covering tests, governance, and cross-repo consumers
38
+ simt tests <path> [--cochange] # tests covering a file via imports, naming, coverage, or co-change
39
+ simt gate --changed # run only the tests the current diff reaches, with compacted output
40
+ simt why [path] # ADRs, rules, skills, gates, and lessons governing a path
41
+
42
+ # Rules, skills, decisions, and lessons
43
+ simt rules list [--root <path>] # rule catalogue and what applies to a repository
44
+ simt rules show <id> # read one rule body (including rules deferred in kernel mode)
45
+ simt rules why <id|ADR-NNN> [--all] # the decision that settled a rule, and whether it still stands
46
+ simt decide "<title>" --yes # scaffold the next ADR with structured simt-affects / simt-supersedes
47
+ simt lessons list # fail-to-fix, revert, review-block, and hook-denial candidates
48
+ simt lessons review <id> --yes # promote a candidate to docs/lessons/NNNN-<slug>.md
49
+ simt skills index # tier-0 catalogue: every skill, one line each
50
+ simt skills brief --task "<task>" # tier-1 ranked skill selection within budget
51
+ simt skills show <name> # tier-2 skill body on demand (respects --max-bytes)
52
+ simt skills why <name> # the signal chain that selected or rejected a skill
53
+ simt skills find <query> # search skills by capability and keyword
54
+ simt skills install <name> --yes # pin a skill into the repository
55
+ simt skills compile [<name>] # compile to Agent Skills layout, split > 5,000-token bodies, report triggers
56
+ simt skills eval [corpus] # measure resolver precision and recall against a gold corpus
57
+ simt graph lint [--spec agentskills]# verify the skill registry against skills on disk
58
+
59
+ # Dual gates (git time and agent tool-call time) and execution evidence
60
+ simt hooks install --yes # install the shared POSIX git hook dispatcher
61
+ simt hooks status # what each git event routes to, and whether it is wired
62
+ simt hooks run <event> # run pre-commit or pre-push gates now, as git would
63
+ simt agent-hooks install --yes # write pre/post-tool and prompt-submit hooks for active harnesses
64
+ simt agent-hooks status # what each harness will run, and whether Codex trusts it
65
+ simt agent-hook <event> --harness # evaluate pre-tool-use, post-tool-use, or prompt-submit
66
+ simt evidence # gate and test runs recorded against the current git tree
67
+ simt evidence check <msg-file> # verify a commit message does not claim unrecorded passing runs
68
+
69
+ # Plans, context metering, workspace learning, benchmarks, local models, and MCP
70
+ simt plan status # count queued, in-progress, complete, and accepted tracker rows
71
+ simt plan next [<id>] # print the next ready slice section (~1 KB)
72
+ simt plan done <id> [<sha>] --yes # mark a tracker row complete with its commit SHA and test command
73
+ simt tokens [--repos] [--session] # measure bytes loaded at session start or split a transcript
74
+ simt harness detect [--user] # detect configured harnesses at repo and user level
75
+ simt harness loaders [--table] # what each harness loads, in what order, and where its cap truncates
76
+ simt shared plan # rules repeated across a workspace and the bytes saved by sharing
77
+ simt shared install --yes # write shared rules once at user level and record the repo delta
78
+ simt compare # workspace matrix, violated rules, noisy/slow gates, and ADR drafts
79
+ simt local doctor [--allow-remote] # probe configured OpenAI-compatible local chat and embed endpoints
80
+ simt bench mine --yes # mine verified fail-to-pass tasks from git history into the vault
81
+ simt bench run --yes # evaluate arms (bare, current, kernel, brief) in isolated exports
82
+ simt bench report [--compare a b] # resolved rate, quality, cost, CPI, bootstrap CIs, McNemar/Wilcoxon
83
+ simt bench ablate --yes # leave-one-out rule ablation ranked by value per KB
84
+ simt bench probes --yes # 12 deterministic rule-compliance probes
85
+ simt bench variants --yes # evaluate simt-variants slots and lock winners in simt-dev.lock.json
86
+ simt mcp [--list] # serve the 13 read-only tools over stdio JSON-RPC
47
87
  ```
48
88
 
49
- `init`, `sync`, `upgrade`, `hooks install`, `agent-hooks install`, `shared install`
50
- and `plan done` print a plan and write nothing without `--yes`. None of them commit
51
- or push. `simt index` writes its cache without asking: the file is gitignored and
52
- `git ls-files` can rebuild it.
53
-
54
- `check` runs the checkers a rule names. A marked line leaves the projection as
55
- `Enforced:` and the checker's name. The file-length line warns past 400 lines and
56
- fails past 1000. `simt evidence check` warns when a commit message claims a passing
57
- run this tree does not have, and the commit fails when `gates.evidence` is `block`.
58
- The commit-msg hook is installed only when that setting is `warn` or `block`.
89
+ `init`, `sync`, `upgrade`, `hooks install`, `agent-hooks install`, `shared install`,
90
+ `skills install`, `plan done`, `lessons review`, `decide` and the `bench` writers print
91
+ a plan and write nothing without `--yes`. None of them commit or push. `simt index`
92
+ writes its cache without asking: the file is gitignored and `git ls-files` can rebuild it.
93
+
94
+ `check` runs the checkers a rule names (`max-file-lines`, `forbid-regex`,
95
+ `forbidden-path-edit`, `required-file`), verifies structured ADR supersessions
96
+ (`prose-partial-supersession`), and flags expired lessons (`LESSON-EXPIRED`). A marked
97
+ rule line leaves the projection as `Enforced:` and the checker's name. The file-length
98
+ line warns past 400 lines and fails past 1000. `simt evidence check` warns when a commit
99
+ message claims a passing run this tree does not have, and the commit fails when
100
+ `gates.evidence` is `block`.
101
+
102
+ ## Agent playbook: how and when to use each module
103
+
104
+ An agent working in an adopted repository should use `simt` as its primary orientation,
105
+ retrieval, validation and memory layer rather than scanning the tree by hand. Every
106
+ read-only command supports `--json` (and `--max-bytes <n>`) or can be called over stdio
107
+ through `simt mcp`.
108
+
109
+ ### Decision tree: which command to run when
110
+
111
+ | Situation | First command | If you need more |
112
+ | --- | --- | --- |
113
+ | New task, no context yet | `simt brief "<task>"` | `simt map --task "<task>"` for broader file ranking |
114
+ | About to edit a file | `simt why <file>` | `simt impact <file>` for blast radius |
115
+ | Need to know what tests to run | `simt tests <file>` | `simt gate --changed` to run them |
116
+ | Rule violation or error | `simt lessons list` | `simt rules why <rule-id>` for the decision |
117
+ | Working from a plan | `simt plan next` | `simt plan done <id> <sha> --yes` when finished |
118
+ | Before committing | `simt check` | `simt evidence` to verify test claims |
119
+ | Repository adoption | `simt init --yes` | `simt doctor` to verify stack detection |
120
+ | Multi-repo workspace | `simt compare` | `simt shared plan` to find deduplication opportunities |
121
+ | Local model available | `simt local doctor` | `simt index --embed` to build vector embeddings |
122
+
123
+ ### 1. Start of task — orient in one call instead of broad exploration
124
+
125
+ 1. **Assemble the task packet first.** Run `simt brief "<task>"` (or call MCP `brief`, or
126
+ read the packet injected automatically when `agent-hooks install --yes` wired
127
+ `prompt-submit`). Within `--budget 2048` bytes (pass `--budget 0` for unlimited or
128
+ `--explain` to see why items were kept or cut), the packet gives:
129
+ - `TASK`: the classified task kind (`bugfix`, `feature`, `refactor`, `test`, `docs`,
130
+ `config`) and the evidence behind it.
131
+ - `COMMANDS`: the exact `build`, `test`, `lint`, `format`, `typecheck`, and focused
132
+ test templates for this repository.
133
+ - `LIKELY FILES`: top files ranked by reciprocal-rank fusion (`RRF_K = 40`) across
134
+ SQLite FTS5 `bm25()`, PageRank graph proximity, and resolver signals.
135
+ - `TESTS`: the test files mapped to those likely files.
136
+ - `DECISIONS`, `SKILLS`, `LESSONS`, `CAUTIONS`, and `FEDERATION`: governing ADRs,
137
+ matched skills, promoted lessons for those paths, active worktree/hook cautions, and
138
+ any structural answer from a declared external code-graph server.
139
+ 2. **Pull the next tracker slice when working from a plan.** Instead of reading a multi-thousand-line
140
+ plan in `docs/plans/` or `docs/reviews/`, run `simt plan next` (or MCP `plan_next`) to
141
+ load only the next queued slice (~1 KB) whose dependencies are already `Complete` or
142
+ `Accepted`.
143
+
144
+ **When to use `--json` format.** When piping output to other tools or when the agent needs
145
+ structured data, add `--json` to any read-only command. For example, `simt brief "<task>" --json`
146
+ returns a JSON object with `task`, `commands`, `files`, `tests`, `decisions`, `skills`,
147
+ `lessons`, `cautions`, and `federation` fields that can be programmatically consumed.
148
+
149
+ ### 2. Before editing — query the graph, blast radius, and governance
150
+
151
+ 1. **Rank files or symbols at the right granularity.** When `brief`'s file list is too
152
+ narrow or the task evolves, run `simt map --task "<task>" --level outline` for paths,
153
+ `--level names` for exported symbols, or `--level signatures` for declaration lines.
154
+ Pass `--embed` when `local.embed` is configured in `simt.json` and clears the +10-point
155
+ recall@10 bar.
156
+ 2. **Check blast radius before changing a shared file or export.** Run
157
+ `simt impact <file|symbol>` to see every direct and transitive importer, the tests
158
+ covering them, the governing rules and ADRs, and any sibling repository in the
159
+ workspace that imports that symbol.
160
+ 3. **Read the governance on a path before changing its behaviour.** Run `simt why <path>`
161
+ to list every ADR whose `simt-affects` matches the file, every scoped rule, skill,
162
+ gate, and promoted lesson. Run `simt why` with no path to audit the repository for
163
+ `UNRESOLVED-AFFECTS` tokens.
164
+ 4. **Resolve deferred rules and citations on demand.** When `simt.json` sets
165
+ `"mode": "kernel"`, only `hard` and `command` rules are loaded at session start;
166
+ `convention` and `style` rules are listed by ID at the foot of the projection. Fetch a
167
+ deferred rule with `simt rules show <id>`, and read any cited `ADR-NNN` with
168
+ `simt rules why ADR-NNN` (or MCP `rules_why`) to see its rulings and whether any ruling
169
+ was superseded or narrowed.
170
+ 5. **Load skills progressively (Tier 0 → Tier 1 → Tier 2).** Never read every skill file
171
+ upfront:
172
+ - Tier 0: `simt skills index` (or MCP `skills_index`) lists one line per skill.
173
+ - Tier 1: `simt skills brief --task "<task>"` (or MCP `skills_brief`) ranks compatible
174
+ skills within budget (`--plan` emits a fetch plan without bodies).
175
+ - Tier 2: `simt skills show <name> --max-bytes 8192` (or MCP `skills_show`) loads only
176
+ the chosen skill's body.
177
+
178
+ **Optimal retrieval strategy.** For best performance, use this sequence:
179
+ 1. `simt brief "<task>"` — gets the most relevant files and tests in one call
180
+ 2. If more files are needed, `simt map --task "<task>" --level outline` — broader ranking
181
+ 3. If you need to understand a specific file's impact, `simt impact <file>` — blast radius
182
+ 4. If you need to understand governance, `simt why <file>` — ADRs and rules
183
+
184
+ ### 3. During implementation — validate incrementally under dual gates
185
+
186
+ 1. **Keep the local index current.** After adding, renaming, or changing exports/imports,
187
+ run `simt index`. It hashes tracked blobs via `git ls-files --stage` and re-extracts
188
+ only changed files in under 300 ms.
189
+ 2. **Run only the tests your change reaches.** Use `simt tests <path>` to inspect which
190
+ tests cover a file (via import edges, naming conventions, or coverage records; add
191
+ `--cochange` to include historical co-change pairs). Run `simt gate --changed` (or
192
+ `simt gate <path...>`) to execute only the tests reachable from the diff, with gate
193
+ output compacted so every failure line survives while passing noise is trimmed.
194
+ 3. **Respect agent-time hooks and learn from failures.** With `simt agent-hooks install --yes`,
195
+ `pre-tool-use` blocks unapproved `git push`, history rewrites (`--no-verify`,
196
+ `--amend`, `reset --hard`, `rebase`), and direct edits to generated regions before the
197
+ tool executes. When a test or gate fails, `post-tool-use` hashes the normalised first
198
+ error line against `docs/lessons/*.md` and injects the matching lesson into context.
199
+
200
+ **Incremental validation workflow.** After each meaningful code change:
201
+ 1. Run `simt tests <changed-file>` to see which tests cover your changes
202
+ 2. Run `simt gate --changed` to execute only the affected tests
203
+ 3. If a test fails, check `simt lessons list` for known issues and their remedies
204
+ 4. If the failure is new, fix it and consider promoting the lesson with `simt lessons review <id> --yes`
205
+
206
+ ### 4. Before committing and closing a slice — verify drift, evidence, and memory
207
+
208
+ 1. **Run the repository gate.** Run `simt check` (or MCP `check`). Fix any reported
209
+ `DRIFT` with `simt sync --yes`, and resolve any rule checker or manifest findings.
210
+ 2. **Verify execution evidence matches the current tree.** Run `simt evidence` to confirm
211
+ that the tests and gates you plan to cite were recorded against the current
212
+ `git write-tree` digest in `.simt-dev/ledger.jsonl`. Any file edit invalidates earlier
213
+ evidence.
214
+ 3. **Record decisions, lessons, and tracker state:**
215
+ - If the change alters what the repository or tool believes, scaffold an ADR with
216
+ `simt decide "<title>" [--supersedes ADR-NNN[:<ruling>]] --yes`.
217
+ - If a failing gate or test was fixed during the session, inspect captured candidates
218
+ with `simt lessons list` and promote reusable ones with
219
+ `simt lessons review <id> --yes`.
220
+ - After committing locally (never push without explicit approval per `ADR-001`), close
221
+ the tracker slice with `simt plan done <id> <sha> --test "<cmd>" --yes`.
222
+
223
+ **Pre-commit checklist.** Before committing, run this sequence:
224
+ 1. `simt check` — verify no drift and all rules pass
225
+ 2. `simt evidence` — confirm test runs are recorded against current tree
226
+ 3. `simt lessons list` — check for any unreviewed lesson candidates
227
+ 4. `git commit` — commit locally (never push without explicit approval)
228
+ 5. `simt plan done <id> <sha> --yes` — close the tracker slice if working from a plan
229
+
230
+ ## Optimal setup for every project, repository, and workspace shape
231
+
232
+ | Shape | How to configure and run `simt` optimally |
233
+ | --- | --- |
234
+ | **Single-package repository** (Node, TypeScript, Python/`uv`, Go, Rust, JVM/Gradle/Maven, Android, Swift, .NET, Deno, Ruby, Dart, Elixir, Cloudflare Workers, React Web, React Native, ConnectIQ, Container) | Run `simt init --yes`, `simt hooks install --yes`, `simt agent-hooks install --yes`, and `simt index`. Stack profiles and runnable gates are selected from committed manifests and build files (`simt doctor` shows `stack`, `facts`, and `factEvidence`). Set `"mode": "kernel"` and `"budget": { "bytes": 12000 }` in `simt.json` to keep session-start tokens minimal while keeping convention/style rules reachable via `simt rules show <id>`. |
235
+ | **Custom stack or repo-specific house rules** | An ecosystem with no built-in profile is still adopted with `core` rules. Add repo-local profiles in `.simt-dev/profiles/<id>.md` with `simt-id`, `simt-title`, `simt-applies`, and `simt-priority` (`hard`, `command`, `convention`, `style`); local profiles project alongside or shadow central ones. Declare custom gates under `gates.commands` and placeholders under `substitutions` in `simt.json`. |
236
+ | **Single-language or polyglot monorepo** (`package.json` `workspaces`, `pnpm-workspace.yaml`, `turbo.json`, `Cargo.toml` `[workspace]`, `go.work`, `settings.gradle`, `settings.gradle.kts`) | `simt init --yes` and `simt sync --yes` discover every workspace member and write both the root `AGENTS.md` and nested `<package>/AGENTS.md` projections carrying only the profiles specific to each package. Set `gates.cwd` in `simt.json` for gates that execute inside a sub-package. Measure nested context load with `simt harness loaders --at <package-dir>`, and use `simt gate --changed` to run only tests for modified packages. |
237
+ | **Multi-repository workspace / estate** (sibling checkouts under a workspace directory or `SIMT_DEV_WORKSPACE`) | Run `simt compare` across the workspace root to inspect adoption, drift, pinned SHAs, hook routing, most-violated rules, noisy/slow gates (`NOISY-GATE`), zero-value rules, and proposed ADR drafts. Run `simt tokens --repos` and `simt shared plan`, then `simt shared install --yes` to move rules repeated across repos into user-level harness files (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, etc.). Vendor shared rule packs in `.simt-dev/packs/<name>/` pinned by digest in `simt.json`, and upgrade the entire estate atomically with `simt upgrade --yes`. |
238
+ | **Repositories with external code-graph MCP servers** | Declare external stdio MCP servers under `federation` in `simt.json` (`{ name, command, args, tool, argument, languages, timeoutMs }`). `simt brief "<task>"` and the MCP `federation_query` tool ask each server one bounded structural question and cite the server name in `FEDERATION`. |
239
+ | **Offline or local-model-assisted workflows** (Ollama, `llama-server`, LM Studio, MLX) | By default, `simt` uses zero models and opens zero sockets (`ADR-075`, `ADR-090`). To opt in, add `local: { chat: { url, model }, embed: { url, model } }` in `simt.json` pointing at `http://127.0.0.1:<port>/v1`. Verify with `simt local doctor`, and build/query SQLite vector embeddings with `simt index --embed` and `simt map --embed` (non-loopback URLs are refused without `--allow-remote`). |
240
+ | **Rule, skill, and benchmark maintainers** | Lint skills with `simt graph lint --spec agentskills`, compile and split > 5,000-token skills with `simt skills compile`, and score the resolver with `simt skills eval`. Mine git history tasks with `simt bench mine --yes`, run arms with `simt bench run --yes`, compare arms with `simt bench report --compare bare kernel`, run leave-one-out ablation with `simt bench ablate --yes`, run compliance probes with `simt bench probes --yes`, and lock winning `simt-variants` wordings with `simt bench variants --yes`. |
241
+
242
+ ## Module and MCP reference
243
+
244
+ | Module | CLI commands | Read-only MCP tools | When an agent should use it |
245
+ | --- | --- | --- | --- |
246
+ | **Task Brief** | `simt brief "<task>" [--budget <n>] [--explain]` | `brief` | First call on every task to get task kind, commands, ranked files, tests, ADRs, skills, and lessons in <= 2 KB |
247
+ | **Code Graph & Retrieval** | `simt index [--embed]`, `simt map`, `simt impact`, `simt tests`, `simt gate` | `federation_query` | Before editing to rank files (`map`), trace blast radius (`impact`), or run only diff-affected tests (`gate --changed`) |
248
+ | **Governance & Provenance** | `simt why [path]`, `simt rules list`, `simt rules show <id>`, `simt rules why <id\|ADR-NNN>`, `simt decide` | `rules_list`, `rules_why` | Before touching governed files (`why`), when reading deferred kernel rules (`rules show`), or when checking/scaffolding ADRs (`rules why`, `decide`) |
249
+ | **Skills & Disclosure** | `simt skills index\|brief\|show\|why\|find\|install\|compile\|eval`, `simt graph lint` | `skills_index`, `skills_find`, `skills_brief`, `skills_show`, `skills_why` | When a task requires domain workflows or reference docs without blowing the session token budget |
250
+ | **Memory & Lessons** | `simt lessons list`, `simt lessons review <id> --yes` | — | After fixing a failing test/gate or hitting a hook denial, to inspect or promote reusable failure-to-fix lessons |
251
+ | **Plans & Trackers** | `simt plan status`, `simt plan next [<id>]`, `simt plan done <id> [<sha>] --yes` | `plan_next`, `plan_done` | When executing a phased implementation or review plan row by row |
252
+ | **Adoption & Projection** | `simt init`, `simt doctor`, `simt check [--frozen]`, `simt sync`, `simt upgrade`, `simt ci` | `doctor`, `check` | When adopting a repo, diagnosing stack/config health, or verifying zero drift before commit |
253
+ | **Dual Gates & Evidence** | `simt hooks install\|status\|run`, `simt agent-hooks install\|status`, `simt agent-hook`, `simt evidence [check]` | — | When installing git/agent hooks, running gates manually, or verifying test claims before committing |
254
+ | **Context & Harnesses** | `simt tokens [--repos] [--session]`, `simt harness detect\|loaders`, `simt shared plan\|install` | — | When auditing startup token cost across harnesses (`claude`, `codex`, `cursor`, `opencode`, `antigravity`, `copilot`, `deepseek`) or deduplicating workspace rules |
255
+ | **Workspace & Benchmarks** | `simt compare`, `simt bench mine\|run\|report\|ablate\|probes\|variants`, `simt local doctor` | `compare` | When auditing an entire multi-repo estate, measuring rule uplift/cost, or probing local model endpoints |
59
256
 
60
257
  ## Where the plan finishes
61
258
 
62
- The work above is the part that runs. The plan still adds the rest of the loop, in
63
- this order of purpose:
64
-
65
- - **Gates on the change.** A check selects the tests that cover the diff, and the
66
- tool's own gate output is shortened without dropping a failure line.
67
- - **Answers instead of exploration.** A ranked map of the repository, the impact of
68
- a file or a symbol, the tests that cover a change, and the decisions, rules and
69
- skills that govern a path. An external code graph can answer for a language it
70
- covers, and the answer names that source.
71
- - **A brief for the task in front of the agent.** At most 2 KB, pulled at submit or
72
- pushed by a hook, built from the map, the tests and the governing records.
73
- - **A memory that has to earn its place.** A lesson is a candidate when a failing run
74
- is followed by a fix. It is recalled on a later task that looks like it, and it
75
- expires. Variant wording of a rule ships only when the bench says it won.
76
- - **Local models, off unless asked.** Distillation and a critic propose. They do not
77
- write projected text. With no model configured, nothing opens a socket.
78
- - **The small doors.** One finding code explained, a safe `doctor` fix, a one-line
79
- status, an undo journal, a diff of every planned write, shell completions, one
80
- ignore list for every harness plus a secret scan, a worktree per slice, a file
81
- lease when two agents would edit the same path, and a pull-request body taken from
82
- the evidence.
259
+ Slices `R01`–`R40` are complete and shipped in `0.5.0`. The remaining queued slices
260
+ (`R41`–`R55`) finish packaging and the small ergonomics:
261
+
262
+ - **Packaging and declarative harness data (`R41`–`R45`).** MCP 2026-07-28 revision
263
+ tightening, declarative harness adapter files with provenance, single-command plugin
264
+ packaging, a single-file binary alongside npm/PyPI/Homebrew, and benchmark-measured rule
265
+ packs.
266
+ - **The small doors (`R46`–`R55`).** `simt explain <CODE>` for every finding code, safe
267
+ idempotent `simt doctor --fix`, a `< 50 ms` `simt status --line`, a write journal with
268
+ `simt undo`, `--diff` on every writer, shell completions, one cross-harness ignore list
269
+ plus a staged-diff secret scan, `simt slice start/finish <ID>` worktrees, file leases
270
+ for parallel agents, and `simt pr-body` assembled from the evidence ledger.
271
+
272
+ The local-model slices (`R38`–`R40`) shipped as they lab-written: `simt distill` proposes
273
+ budgeted summaries with line citations, `simt review` proposes an advisory ADR-008
274
+ verdict over the staged diff, and `simt brief` carries model/effort advice from bench
275
+ history. All remain off until named and propose rather than write projected text.
83
276
 
84
277
  ## Install
85
278
 
86
- Requires **Node >= 22.20.0**. The current published release is **0.4.0**. Pin it.
279
+ Requires **Node >= 22.20.0**. The current published release is **0.5.0**. Pin it.
87
280
  The tool writes a content digest into the files it generates, and an unpinned upgrade
88
281
  changes them under you.
89
282
 
90
283
  ```sh
91
- npm i -D simt-dev@0.4.0
284
+ npm i -D simt-dev@0.5.0
92
285
 
93
286
  # or globally
94
- npm i -g simt-dev@0.4.0
287
+ npm i -g simt-dev@0.5.0
95
288
 
96
289
  # or once, with no install
97
- npx -y simt-dev@0.4.0 check
290
+ npx -y simt-dev@0.5.0 check
98
291
  ```
99
292
 
100
293
  ### From PyPI
@@ -126,30 +319,36 @@ Node installed.
126
319
 
127
320
  | Path | What |
128
321
  | --- | --- |
129
- | `AGENTS.md` | the projection, between `<!-- simt:begin -->` and `<!-- simt:end -->`. The old `simt-dev:` markers are still read, and a region migrates on its next write |
130
- | `simt.json` | the manifest: gates, substitutions, budget, shared rules, surfaces |
131
- | `simt-dev.lock.json` | the digest of the inputs and the digest of the projection |
322
+ | `AGENTS.md` (and `<package>/AGENTS.md` in monorepos) | the projection, between `<!-- simt:begin -->` and `<!-- simt:end -->`. The old `simt-dev:` markers are still read, and a region migrates on its next write |
323
+ | `simt.json` | the manifest: `gates`, `substitutions`, `budget`, `mode`, `shared`, `surfaces`, `plans`, `packs`, `federation`, `local` |
324
+ | `simt-dev.lock.json` | the digest of the inputs, the digest of the projection, and locked `variants` winners from `simt bench variants` |
132
325
  | `.cursor/rules/*.mdc`, `.claude/rules/*.md`, `.agents/rules/*.md`, `.github/instructions/*.instructions.md` | one file per rule, and only for a harness that reads that directory |
133
326
  | `.editorconfig`, `.gitattributes` | baseline regions, placed first so a later setting still wins |
134
327
  | `.simt-hooks/` and `core.hooksPath` | the shared dispatcher. It fails closed |
328
+ | `docs/decisions/ADR-NNN-<slug>.md` | numbered decision records scaffolded by `simt decide --yes` with `simt-affects` and `simt-supersedes` frontmatter |
329
+ | `docs/lessons/NNNN-<slug>.md` | reviewed lessons promoted by `simt lessons review <id> --yes` with `simt-trigger`, `simt-evidence`, and `simt-expires` frontmatter |
135
330
 
136
331
  Text outside the markers is left alone. A regeneration does not revert it.
137
332
 
138
333
  `simt.json` also carries a `federation` block when the repository names external
139
- code-graph servers, each with the command that starts it. A brief may then ask one of
140
- them one structural question for a task and cite the answer's source, and the MCP
141
- `federation_query` tool asks one on demand, naming the server it asked. The question goes
142
- to the tool and argument the manifest declared, so no foreign tool is reachable that the
143
- repository did not name. Nothing is started unless the manifest declared it, and a server
144
- that does not answer costs the packet a sentence, never the packet.
334
+ code-graph servers, each with the command that starts it, and an optional `local` block
335
+ when the repository names loopback OpenAI-compatible `chat` or `embed` endpoints. A brief
336
+ may then ask a federated server one structural question for a task and cite the answer's
337
+ source, and the MCP `federation_query` tool asks one on demand, naming the server it
338
+ asked. The question goes to the tool and argument the manifest declared, so no foreign
339
+ tool is reachable that the repository did not name. Nothing is started and no socket is
340
+ opened unless the manifest declared it, and a server that does not answer costs the
341
+ packet a sentence, never the packet.
145
342
 
146
343
  These are caches, gitignored, and rebuildable. They are not repository content:
147
344
 
148
345
  | Path | What |
149
346
  | --- | --- |
150
- | `.simt-dev/index.sqlite` | files, symbols, import edges. JSON-lines at `.simt-dev/index.jsonl` when this Node cannot open `node:sqlite` with FTS5 |
151
- | `.simt-dev/ledger.jsonl` | one line per gate the dispatcher actually ran, against one git tree |
152
- | `.simt-dev/bench/runs/` | benchmark runs |
347
+ | `.simt-dev/index.sqlite` | files, symbols, import/call/test/governs/cochange edges, FTS5 `fts` tokens across `code`, `docs`, `skills`, `decisions` and `lessons`, and optional `embeddings` vector blobs. JSON-lines at `.simt-dev/index.jsonl` when this Node cannot open `node:sqlite` with FTS5 |
348
+ | `.simt-dev/ledger.jsonl` | one line per gate or test the dispatcher actually ran, against one git tree, plus normalised failure signatures |
349
+ | `.simt-dev/lessons.jsonl` | deterministic lesson candidates captured from fail-to-fix pairs, reverts, `BLOCK` reviews, and hook denials |
350
+ | `.simt-dev/bench/` | mined tasks (`tasks/`), test patch vault (`vault/`), and benchmark runs (`runs/`) |
351
+ | `.simt-dev/proposals/` | non-authoritative skill description proposals with `{model, promptHash, digest}` provenance |
153
352
 
154
353
  `simt shared install --yes` writes a user-level copy of the rules a workspace
155
354
  repeats, into the file that harness documents, and records the ids on each
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "simt-dev",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared agent rules, skills and git hooks for a repository: one command adopts a repo, and every gate it declares is probed before it is written.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Said Elimam",
7
7
  "private": false,
8
8
  "type": "module",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/QuazarMedia/simt-dev"
12
+ },
9
13
  "engines": {
10
14
  "node": ">=22.20.0"
11
15
  },