simt-dev 0.7.1 → 0.8.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.
Files changed (186) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +169 -80
  3. package/docs/decisions/ADR-014-workspace-is-configuration.md +1 -1
  4. package/docs/decisions/ADR-025-a-baseline-is-a-region-in-a-file-the-repo-owns.md +1 -1
  5. package/docs/decisions/ADR-026-a-config-without-a-region-is-a-file-the-repo-owns.md +1 -1
  6. package/docs/decisions/ADR-027-the-one-gitattributes-line-that-is-neither-dangerous-nor-empty.md +1 -1
  7. package/docs/decisions/ADR-028-a-base-file-is-a-floor-so-the-disagreement-it-cannot-repair-becomes-a-check.md +1 -1
  8. package/docs/decisions/ADR-029-the-pins-a-repository-declares-are-its-own.md +1 -1
  9. package/docs/decisions/ADR-030-what-a-plan-does-not-ship-is-a-decision-with-a-record.md +1 -1
  10. package/docs/decisions/ADR-048-a-baseline-carries-only-keys-a-reader-honours.md +1 -1
  11. package/docs/decisions/ADR-082-the-tracker-override-is-a-manifest-key.md +1 -1
  12. package/docs/decisions/ADR-126-the-mcp-surface-stays-a-reader-so-there-is-no-write-path-to-build.md +68 -0
  13. package/docs/decisions/ADR-127-the-mcp-tool-list-is-written-by-hand-and-roots-is-not-asked-for.md +65 -0
  14. package/docs/decisions/ADR-128-a-research-plan-is-a-plan-and-the-tracker-reads-it.md +42 -0
  15. package/ecosystems/bun.json +6 -0
  16. package/ecosystems/cargo.json +25 -0
  17. package/ecosystems/composer.json +6 -0
  18. package/ecosystems/dart.json +24 -0
  19. package/ecosystems/deno.json +21 -0
  20. package/ecosystems/devcontainers.json +6 -0
  21. package/ecosystems/docker-compose.json +6 -0
  22. package/ecosystems/docker.json +6 -0
  23. package/ecosystems/dotnet.json +25 -0
  24. package/ecosystems/elixir.json +23 -0
  25. package/ecosystems/gitsubmodule.json +6 -0
  26. package/ecosystems/go.json +25 -0
  27. package/ecosystems/gradle.json +13 -0
  28. package/ecosystems/maven.json +23 -0
  29. package/ecosystems/node.json +25 -0
  30. package/ecosystems/python.json +20 -0
  31. package/ecosystems/ruby.json +23 -0
  32. package/ecosystems/swift.json +25 -0
  33. package/ecosystems/terraform.json +6 -0
  34. package/ecosystems/uv.json +6 -0
  35. package/harnesses/antigravity.json +162 -0
  36. package/harnesses/claude.json +206 -0
  37. package/harnesses/codex.json +136 -0
  38. package/harnesses/copilot.json +88 -0
  39. package/harnesses/cursor.json +140 -0
  40. package/harnesses/deepseek.json +99 -0
  41. package/harnesses/gemini.json +122 -0
  42. package/harnesses/opencode.json +173 -0
  43. package/package.json +3 -1
  44. package/rules/mdc/intake-questions.mdc +8 -0
  45. package/src/advice/advice.mjs +3 -2
  46. package/src/agenthooks/render.mjs +86 -180
  47. package/src/agents/render.mjs +15 -18
  48. package/src/api.mjs +7 -5
  49. package/src/argv.mjs +19 -0
  50. package/src/bench/ablate.mjs +3 -4
  51. package/src/bench/adapters.json +155 -113
  52. package/src/bench/adapters.mjs +466 -0
  53. package/src/bench/arms.mjs +333 -0
  54. package/src/bench/grade.mjs +12 -26
  55. package/src/bench/graders.mjs +42 -0
  56. package/src/bench/mine.mjs +17 -535
  57. package/src/bench/probe-ledger.mjs +149 -0
  58. package/src/bench/probes.catalog.mjs +918 -0
  59. package/src/bench/probes.mjs +15 -1037
  60. package/src/bench/render.mjs +111 -0
  61. package/src/bench/report.mjs +116 -971
  62. package/src/bench/run.mjs +164 -881
  63. package/src/bench/variants.mjs +4 -5
  64. package/src/bench/workspace.mjs +160 -0
  65. package/src/brief/assemble.mjs +11 -13
  66. package/src/ci/dependabot.mjs +25 -55
  67. package/src/commands/agent.mjs +1 -9
  68. package/src/commands/agenthook.mjs +66 -35
  69. package/src/commands/bench.mjs +2 -2
  70. package/src/commands/ci.mjs +11 -13
  71. package/src/commands/docs.mjs +88 -0
  72. package/src/commands/gate.mjs +10 -13
  73. package/src/commands/harness.mjs +3 -3
  74. package/src/commands/help.mjs +44 -3
  75. package/src/commands/hooks.mjs +20 -20
  76. package/src/commands/ignore.mjs +11 -7
  77. package/src/commands/impact.mjs +4 -8
  78. package/src/commands/index.mjs +49 -9
  79. package/src/commands/init-scan.mjs +90 -0
  80. package/src/commands/init.mjs +122 -104
  81. package/src/commands/lease.mjs +67 -18
  82. package/src/commands/map.mjs +10 -5
  83. package/src/commands/mcp.mjs +2 -17
  84. package/src/commands/repoindex.mjs +8 -8
  85. package/src/commands/rules.mjs +8 -4
  86. package/src/commands/shared.mjs +12 -16
  87. package/src/commands/skills.mjs +5 -6
  88. package/src/commands/skillscompile.mjs +3 -3
  89. package/src/commands/skillsinstall.mjs +5 -4
  90. package/src/commands/slice.mjs +199 -64
  91. package/src/commands/spec.mjs +78 -62
  92. package/src/commands/status.mjs +24 -12
  93. package/src/commands/sync.mjs +14 -14
  94. package/src/commands/tests.mjs +12 -12
  95. package/src/commands/tokens.mjs +19 -24
  96. package/src/commands/upgrade.mjs +8 -4
  97. package/src/commands/why.mjs +6 -13
  98. package/src/compare/hooksstate.mjs +2 -6
  99. package/src/compare/learn.mjs +3 -1
  100. package/src/decisions/index.mjs +3 -2
  101. package/src/docs/commands.mjs +65 -0
  102. package/src/ecosystem/records.mjs +219 -0
  103. package/src/explain.mjs +31 -0
  104. package/src/gates/index.mjs +385 -0
  105. package/src/graph/compile.mjs +8 -4
  106. package/src/graph/load.mjs +2 -1
  107. package/src/graph/spec.mjs +10 -8
  108. package/src/harness/records.mjs +143 -0
  109. package/src/hooks/capability.mjs +5 -3
  110. package/src/hooks/dispatcher.mjs +26 -32
  111. package/src/hooks/gates.mjs +12 -2
  112. package/src/hooks/resolve.mjs +2 -7
  113. package/src/hooks/where.mjs +2 -7
  114. package/src/identity.mjs +2 -11
  115. package/src/index/coverage.mjs +58 -0
  116. package/src/index/extract.mjs +6 -16
  117. package/src/index/gate.mjs +1 -1
  118. package/src/index/govern.mjs +26 -9
  119. package/src/index/impact.mjs +4 -8
  120. package/src/index/map.mjs +14 -15
  121. package/src/index/open.mjs +173 -0
  122. package/src/index/persist.mjs +224 -57
  123. package/src/index/store.mjs +82 -39
  124. package/src/index/tests.mjs +2 -6
  125. package/src/journal.mjs +16 -11
  126. package/src/kernel/card.mjs +37 -63
  127. package/src/kernel/checks.mjs +4 -10
  128. package/src/lease.mjs +102 -7
  129. package/src/ledger/index.mjs +124 -17
  130. package/src/mcp/paginate.mjs +33 -0
  131. package/src/mcp/schemas.mjs +512 -0
  132. package/src/mcp/server.mjs +49 -9
  133. package/src/mcp/tools-facts.mjs +326 -0
  134. package/src/mcp/tools-read.mjs +221 -0
  135. package/src/mcp/tools.mjs +4 -1005
  136. package/src/{bench → measure}/corpus.mjs +1 -1
  137. package/src/measure/metrics.mjs +236 -0
  138. package/src/measure/records.mjs +211 -0
  139. package/src/measure/stats.mjs +538 -0
  140. package/src/measure/task-schema.mjs +125 -0
  141. package/src/measure/tasks.mjs +69 -0
  142. package/src/memory/decide.mjs +6 -15
  143. package/src/memory/lesson-text.mjs +61 -0
  144. package/src/memory/lessons.mjs +29 -82
  145. package/src/name.mjs +7 -0
  146. package/src/output/index.mjs +122 -31
  147. package/src/packs/manage.mjs +15 -9
  148. package/src/plan/index.mjs +1 -1
  149. package/src/plugins.mjs +22 -16
  150. package/src/prbody.mjs +7 -11
  151. package/src/projection/loaders.mjs +7 -692
  152. package/src/projection/manifest.mjs +10 -435
  153. package/src/projection/mdc.mjs +7 -8
  154. package/src/projection/project.mjs +126 -221
  155. package/src/projection/region.mjs +561 -0
  156. package/src/projection/rules.mjs +16 -547
  157. package/src/projection/surfaces.mjs +43 -210
  158. package/src/projection/targets.mjs +5 -5
  159. package/src/repo-root.mjs +13 -1
  160. package/src/resolve/eval.mjs +2 -1
  161. package/src/resolve/fingerprint.mjs +0 -7
  162. package/src/resolve/resolve.mjs +1 -41
  163. package/src/review/critic.mjs +8 -12
  164. package/src/run.mjs +98 -0
  165. package/src/secrets.mjs +14 -22
  166. package/src/state/events.mjs +129 -0
  167. package/src/status-snapshot.mjs +233 -0
  168. package/src/status.mjs +2 -6
  169. package/src/sys/git.mjs +82 -0
  170. package/src/{bench/process.mjs → sys/proc.mjs} +28 -5
  171. package/src/testing/parsers.mjs +265 -0
  172. package/src/testing/patches.mjs +23 -0
  173. package/src/testing/paths.mjs +49 -0
  174. package/src/testing/runners.mjs +186 -0
  175. package/src/testing/vault.mjs +68 -0
  176. package/src/text/frontmatter.mjs +49 -0
  177. package/src/text/tokens.mjs +52 -0
  178. package/src/toolwords.mjs +1 -1
  179. package/src/util/fs.mjs +20 -0
  180. package/src/util/sort.mjs +12 -0
  181. package/src/workspace.mjs +3 -1
  182. package/src/write/plan.mjs +82 -0
  183. package/templates/plan/tracker.json +1 -0
  184. package/docs/decisions/ADR-033-three-plan-rows-closed-by-decision-not-by-authoring.md +0 -82
  185. package/docs/decisions/ADR-102-the-two-queued-review-rows-are-closed-by-ruling.md +0 -49
  186. package/src/bench/tasks.mjs +0 -36
package/CHANGELOG.md CHANGED
@@ -4,7 +4,42 @@ All notable changes to this package are recorded here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project follows
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [0.8.0] — 2026-11-01
8
+
9
+ ### Added
10
+
11
+ - Every writer runs through one plan/apply engine: `init`, `sync`, `ci`, `ignore`, `rules decisions`, `pack new`, `upgrade`, `hooks install`, `agent-hooks install` and the agent plan derive create/update/remove from the bytes, journal one set per run, and a rehearsal reports the plan and writes nothing.
12
+ - An append-only event log every store writes to (`.simt/local/events.jsonl`): journal commits and undos, gate runs, lease acquire/release and lesson captures all land in it; the ledger, lease and lessons files remain the projections readers already use.
13
+ - Lease schema v2: a claim names a resource (a file, or a directory and its subtree), its holder, and a fencing token that increments per acquisition, with renew and release; a v1 lease file is read as path resources rather than dropped.
14
+ - The MCP list methods answer one page and name the cursor for the next; a subscription request is refused with its reason, and a cancelled call is answered with its interruption. The surface stays a reader. — [ADR-126](docs/decisions/ADR-126-the-mcp-surface-stays-a-reader-so-there-is-no-write-path-to-build.md)
15
+ - Index storage v4: generic nodes and edges with ownership, an `openIndex()` API, and O(n) PageRank; one `coverage()` and one `governs()` sit behind every reader that answers from the index.
16
+ - The ledger gets a seeded private index, a tail read and a rotation.
17
+ - Ecosystem/language data records — runner, gates, card, test conventions, extraction, resolution — ship in every channel beside the harness records. — [ADR-013](docs/decisions/ADR-013-genericity-by-facts-and-local-profiles.md)
18
+ - The release process is a repo-local skill the tool recognises and injects when a release task is in play.
19
+ - Bare `simt status` is the repository snapshot — the last check, git hook routing, which harnesses decide tool calls, evidence for the tree on disk, active leases, tracker counts and the last journal set — while `--line` keeps its cached one line. Each slot is read through the module that owns it and carries its own error, so one unreadable file does not blank the answer.
20
+ - `simt explain` answers the five policy ids a denial names (`push`, `rewrite`, `hooks-disable`, `generated`, `lease`), so a refusal can say `run: simt explain push`.
21
+ - A spec row declares `aliases`, and an alias resolves to that row before the registry is consulted: `skills list`, `skills lint`, `skills select`, `harness cost`, `harness hook`, `harness install`, `harness plugin`, `plan start`, `plan finish` and `plan abandon` answer, and help keeps listing the path.
22
+ - The bench has one registry per seam — arms, adapters, task schema, records and graders — and a record written by an earlier version is read as written rather than migrated.
23
+ - Production reads test conventions without the bench: `src/testing/` and `src/measure/` are separable from it.
24
+
25
+ ### Changed
26
+
27
+ - `run(command, input)` answers with what the command produced — text, documents, notes, warnings, failure and exit code — instead of printing it, and one call carries one presentation state, not one per process.
28
+ - The harness facet data — the surfaces each harness loads, its pointer files, its loader chain, its hook dialect and payload keys, its plugin components — moves out of the engine modules into `harnesses/`: one JSON record per harness, shipped in the tarball, the wheel and the sdist alongside the rule bodies. The views read the record by id, so a new harness is a record, not a table edit across four modules. — [ADR-013](docs/decisions/ADR-013-genericity-by-facts-and-local-profiles.md)
29
+ - The git and process plumbing is one module: one runner behind identity, hooks, the store and `tracked()`, a bounded `spawnBounded`, and shared frontmatter and tokenizer helpers.
30
+ - `agent-hooks install` folds into `init`, and help flags the prerequisites a command needs.
31
+ - The plan tracker reads `docs/research`, and small work — fewer than three slices — skips the plan file.
32
+ - The README's command list renders from the spec table, so it cannot drift from the commands the binary dispatches.
33
+ - Bare `simt bench` summarises the vault (`bench report`) instead of mining into it: a reader who types a group name has asked a question, not given consent.
34
+ - The projection gate reads the plan the writer built instead of rebuilding it, and gate planning lives in `src/gates/index.mjs`, so the manifest module keeps only its writer. — [ADR-013](docs/decisions/ADR-013-genericity-by-facts-and-local-profiles.md)
35
+ - No source or test module is over 1,000 lines with one exclusion (the generated skill registry), and the ceiling's remaining long files — rules, MCP tools and schemas, the hooks tests, `init` — are split rather than excused.
36
+ - The tolerated-flag window moves to 0.9.0. It named 0.8.0, and closing it here would refuse flags that work: the spec has not yet declared every flag some command honours (`ci --dry-run` among them). A window that closes over an incomplete declaration list turns working invocations into usage errors, so it closes when the list is complete.
37
+
38
+ ### Fixed
39
+
40
+ - A v2 lease write keeps the flat aliases and caller fields a v1 reader expects.
41
+ - The lesson event is emitted where the record is written, so it lands in the event log.
42
+ - `simt status` no longer refuses a bare invocation: the answer it declined to give was five commands away.
8
43
 
9
44
  ## [0.7.1] — 2026-11-01
10
45
 
package/README.md CHANGED
@@ -91,87 +91,176 @@ truncated or substituted download never becomes the command.
91
91
 
92
92
  ## What `simt` does
93
93
 
94
+ <!-- simt:commands:begin -->
95
+ <!-- Rendered from the spec by `simt docs readme --yes`; do not edit by hand. -->
96
+
94
97
  ```sh
95
- # Adopt, inspect, and maintain a repository
96
- simt init # adopt or scaffold; prints a plan; --yes writes
97
- simt doctor [--fix] # stack, facts, evidence, and config health (--fix applies safe remedies, journaled)
98
- simt check [--frozen] # projection drift, manifest, lock, and declared checkers
99
- simt sync [--explain] --yes # regenerate the projection
100
- simt upgrade --yes # move every consumer in the workspace to this SHA
101
-
102
- # Orient on a task and query the local code and governance graph
103
- simt brief "<task>" # one <= 2 KB packet: kind, commands, files, tests, ADRs, skills, lessons
104
- simt index [--embed] # files, symbols, edges, FTS5 tokens (+ optional local embeddings)
105
- simt map --task "<task>" # hybrid BM25 + PageRank + resolver file ranking (outline|names|signatures)
106
- simt impact <file|symbol> # importers, covering tests, governance, and cross-repo consumers
107
- simt tests <path> [--cochange] # tests covering a file via imports, naming, coverage, or co-change
108
- simt gate --changed # run only the tests the current diff reaches, with compacted output
109
- simt why [path] # ADRs, rules, skills, gates, and lessons governing a path
110
-
111
- # Rules, skills, decisions, and lessons
112
- simt rules list [--root <path>] # rule catalogue and what applies to a repository
113
- simt rules show <id> # read one rule body (including rules deferred in kernel mode)
114
- simt rules why <id|ADR-NNN> [--all] # the decision that settled a rule, and whether it still stands
115
- simt explain <CODE> [--json] # what a check finding means, why it is reported, and how to fix it
116
- simt decide "<title>" --yes # scaffold the next ADR with structured simt-affects / simt-supersedes
117
- simt lessons list # fail-to-fix, revert, review-block, and hook-denial candidates
118
- simt lessons review <id> --yes # promote a candidate to docs/lessons/NNNN-<slug>.md
119
- simt skills index # tier-0 catalogue: every skill, one line each
120
- simt skills brief --task "<task>" # tier-1 ranked skill selection within budget
121
- simt skills show <name> # tier-2 skill body on demand (respects --max-bytes)
122
- simt skills why <name> # the signal chain that selected or rejected a skill
123
- simt skills find <query> # search skills by capability and keyword
124
- simt skills install <name> --yes # pin a skill into the repository
125
- simt skills compile [<name>] # compile to Agent Skills layout, split > 5,000-token bodies, report triggers
126
- simt skills eval [corpus] # measure resolver precision and recall against a gold corpus
127
- simt graph lint [--spec agentskills]# verify the skill registry against skills on disk
128
-
129
- # Dual gates (git time and agent tool-call time) and execution evidence
130
- simt hooks install --yes # install the shared POSIX git hook dispatcher
131
- simt hooks status # what each git event routes to, and whether it is wired
132
- simt hooks run <event> # run pre-commit or pre-push gates now, as git would
133
- simt agent-hooks install --yes # write pre/post-tool and prompt-submit hooks for active harnesses
134
- simt agent-hooks status # what each harness will run, and whether Codex trusts it
135
- simt agent-hook <event> --harness # evaluate pre-tool-use, post-tool-use, or prompt-submit
136
- simt evidence # gate and test runs recorded against the current git tree
137
- simt evidence check <msg-file> # verify a commit message does not claim unrecorded passing runs
138
- simt pr-body [--base <ref>] # a PR body: the evidence block for this tree, changed
139
- # decisions, gate state, and residual risk in ADR-008 vocabulary
140
-
141
- # Plans, context metering, workspace learning, benchmarks, local models, and MCP
142
- simt plan status # count queued, in-progress, complete, and accepted tracker rows
143
- simt plan next [<id>] # print the next ready slice section (~1 KB)
144
- simt plan done <id> [<sha>] --yes # mark a tracker row complete with its commit SHA and test command
145
- simt status --line # one-line gate state from the last check, for prompts (< 50 ms)
146
- simt undo --yes # restore the last journaled set of writes, if untouched since
147
- simt slice start <id> --yes # a worktree on branch slice/<id> with the brief preloaded; row In progress
148
- simt slice finish <id> --yes # run the pre-commit gates, commit a Conventional subject from the
149
- # row's title, and record the SHA and --test command on the row
150
- simt lease [<paths>] --session # claim files for this session (--ttl, default 1h) or list claims;
151
- # the pre-edit hook refuses another session's edit until the TTL
152
- simt tokens [--repos] [--session] # measure bytes loaded at session start or split a transcript
153
- simt harness detect [--user] # detect configured harnesses at repo and user level
154
- simt harness loaders [--table] # what each harness loads, in what order, and where its cap truncates
155
- simt shared plan # rules repeated across a workspace and the bytes saved by sharing
156
- simt shared install --yes # write shared rules once at user level and record the repo delta
157
- simt compare # workspace matrix, violated rules, noisy/slow gates, and ADR drafts
158
- simt local doctor [--allow-remote] # probe configured OpenAI-compatible local chat and embed endpoints
159
- simt bench mine --yes # mine verified fail-to-pass tasks from git history into the vault
160
- simt bench run --yes # evaluate arms (bare, current, kernel, brief) in isolated exports
161
- simt bench report [--compare a b] # resolved rate, quality, cost, CPI, bootstrap CIs, McNemar/Wilcoxon
162
- simt bench ablate --yes # leave-one-out rule ablation ranked by value per KB
163
- simt bench probes --yes # 12 deterministic rule-compliance probes
164
- simt bench variants --yes # evaluate simt-variants slots and lock winners in simt.lock.json
165
- simt review [--local] # an advisory ADR-008 verdict skeleton over the staged diff
166
- simt distill <skill|doc> # a budgeted proposal summary with line citations, for a person to merge
167
- simt pack new <name> --source <spec> # scaffold a versioned pack: pack.json, bench.json, one rule
168
- simt pack lint [dir] [--require-measured] # validate a pack and state its measured ΔR
169
- simt pack publish [dir] --yes # publish an npm-sourced pack (git packs name the tag-and-push)
170
- simt mcp [--list] # serve the 15 read-only tools over stdio JSON-RPC
171
- simt completions <bash|zsh|fish> # a completion script generated from the command registry
172
- simt ignore [--yes] [--diff] # render the one .simtignore list into .cursorignore,
173
- # .aiderignore, .geminiignore and Claude's permissions.deny
98
+ # agent-hook
99
+ simt agent-hook <event> --harness # the harness entry point: decide one tool call, or deliver the prompt packet
100
+
101
+ # agent-hooks
102
+ simt agent-hooks install --yes # write this repository's policies into each harness hooks file
103
+ simt agent-hooks status # what each harness will run, and what is not trusted yet
104
+
105
+ # agents
106
+ simt agents install --yes # write the Simt-Agent into each harness agents file
107
+ simt agents status # what each harness carries, and what is not installed yet
108
+
109
+ # bench
110
+ simt bench ablate --yes # measure one arm of the brief against its ablation
111
+ simt bench critic # score the review critic against the labelled bench set
112
+ simt bench export --yes # write the sealed bench corpus as one signed document
113
+ simt bench import # verify a sealed corpus and load it into the vault
114
+ simt bench mine --yes # mine tasks out of a repository history
115
+ simt bench probes --yes # run the deterministic probes against a workspace
116
+ simt bench report [--compare a b] # summarise the runs recorded in the vault
117
+ simt bench run --yes # run agents against the mined tasks
118
+ simt bench variants --yes # run one task across its variant prompts
119
+
120
+ # brief
121
+ simt brief "<task>" # the packet for a task: rules, skills and the files it names, within a budget
122
+
123
+ # check
124
+ simt check # report stale or missing generated regions and every check finding
125
+
126
+ # ci
127
+ simt ci # refresh simt-dev's own .github workflow and Dependabot files
128
+
129
+ # compare
130
+ simt compare # the adoption and drift matrix across every sibling repository
131
+
132
+ # completions
133
+ simt completions <bash|zsh|fish> # print a bash, zsh or fish completion script generated from this spec
134
+
135
+ # decide
136
+ simt decide "<title>" --yes # scaffold a numbered decision record with its frontmatter
137
+
138
+ # distill
139
+ simt distill <skill|doc> # turn a repository into a skill or rule proposal
140
+
141
+ # docs
142
+ simt docs readme # render the README command list from the spec
143
+
144
+ # doctor
145
+ simt doctor [--fix] # report what is wrong with this installation
146
+
147
+ # evidence
148
+ simt evidence # the runs recorded against the tree on disk
149
+ simt evidence check <msg-file> # a commit message claiming a run this tree does not have
150
+
151
+ # explain
152
+ simt explain <CODE> # what one check finding code means, and how to fix it
153
+
154
+ # gate
155
+ simt gate --changed # the tests a change reaches, and only those
156
+
157
+ # graph
158
+ simt graph lint [--spec agentskills] # check the skill registry against the skills on disk
159
+
160
+ # harness
161
+ simt harness detect [--user] # which harness is installed, and what it carries
162
+ simt harness loaders [--table] # the instruction files each harness loads, and what they cost
163
+
164
+ # hooks
165
+ simt hooks install --yes # install the shared dispatcher and report what it would run
166
+ simt hooks run <event> # run one git event's gates now, as git would
167
+ simt hooks status # what each git event routes to, and whether it is wired
168
+
169
+ # ignore
170
+ simt ignore [--yes] [--diff] # render the one ignore list into every harness ignore file
171
+
172
+ # impact
173
+ simt impact <file|symbol> # who a change reaches: importers, their tests and the contract
174
+
175
+ # index
176
+ simt index [--embed] # rebuild the local file index from git blob hashes
177
+
178
+ # init
179
+ simt init [path] # adopt this repository: manifest, region, hooks, agents and agent-hooks
180
+
181
+ # lease
182
+ simt lease [<paths>] --session # claim files for one session, or list the claims
183
+
184
+ # lessons
185
+ simt lessons capture # scan the ledger and history for new lesson candidates
186
+ simt lessons list # deterministic lesson candidates and the promoted lessons
187
+ simt lessons review <id> --yes # promote one lesson candidate into docs/lessons
188
+
189
+ # local
190
+ simt local doctor [--allow-remote] # the local model endpoints, and whether they answer
191
+
192
+ # map
193
+ simt map --task "<task>" # the files a task is most likely to touch, within a byte budget
194
+
195
+ # mcp
196
+ simt mcp [--list] # serve the read-only MCP surface over stdio
197
+
198
+ # pack
199
+ simt pack lint [dir] [--require-measured] # lint a rule pack in the working directory
200
+ simt pack new <name> --source <spec> # scaffold a rule pack
201
+ simt pack publish [dir] --yes # publish a rule pack
202
+
203
+ # plan
204
+ simt plan done <id> [<sha>] --yes # mark one tracker row complete, with its SHA and its evidence
205
+ simt plan next [<id>] # one ready slice's section, or the one named
206
+ simt plan status # count the tracker rows
207
+
208
+ # plugin
209
+ simt plugin <claude|gemini|cursor|opencode> # generate a harness package from the same tables the hooks use
210
+
211
+ # pr-body
212
+ simt pr-body [--base <ref>] # the pull request body: evidence, decisions, gate state and residual risk
213
+
214
+ # review
215
+ simt review [--local] # review the staged diff against the estate rules
216
+
217
+ # rules
218
+ simt rules decisions # every known decision, and which layer each came from
219
+ simt rules list [--root <path>] # the rule catalogue, marked with what applies to this repository
220
+ simt rules show <id> # one rule body
221
+ simt rules why <id|ADR-NNN> [--all] # the decision that settled a rule, and whether it is still in force
222
+
223
+ # shared
224
+ simt shared install --yes # install the shared rules into a reader home directory
225
+ simt shared plan # what the shared install would write, and where
226
+
227
+ # skills
228
+ simt skills brief --task "<task>" # the packet for a task, read from the skill registry
229
+ simt skills compile [<name>] # compile a skill to the Agent Skills standard
230
+ simt skills eval [corpus] # score the skill registry against transcripts
231
+ simt skills find <query> # skills that match a query
232
+ simt skills index # rebuild the skill index
233
+ simt skills install <name> --yes # install skills into the workspace
234
+ simt skills show <name> # one skill packet
235
+ simt skills why <name> # which skill covers a task
236
+
237
+ # slice
238
+ simt slice abandon <id> # remove a slice worktree, delete its branch, and return the row
239
+ simt slice finish <id> --yes # run the gates, commit the slice and record its evidence
240
+ simt slice start <id> --yes | -- "<text>" # give a slice its worktree, branch and brief; -- starts one from a prompt, no row
241
+
242
+ # status
243
+ simt status [--line] # the repository snapshot, or one line of the last check
244
+
245
+ # sync
246
+ simt sync [--explain] --yes # re-render the generated regions from the rule content
247
+
248
+ # tests
249
+ simt tests <path> [--cochange] # the tests that exercise a file
250
+
251
+ # tokens
252
+ simt tokens [--repos] [--session] # count tokens per instruction file and per skill
253
+
254
+ # undo
255
+ simt undo --yes # restore the last journaled set of writes, if untouched
256
+
257
+ # upgrade
258
+ simt upgrade --yes # replace this installation with the pinned release
259
+
260
+ # why
261
+ simt why [path] # what governs a file: decisions, rules, skills, gates and lessons
174
262
  ```
263
+ <!-- simt:commands:end -->
175
264
 
176
265
  `init`, `sync`, `upgrade`, `hooks install`, `agent-hooks install`, `shared install`,
177
266
  `skills install`, `plan done`, `lessons review`, `decide`, `ignore`, `pack new`,
@@ -239,7 +328,7 @@ on top of `0.6.0`:
239
328
  for parallel agents, and `simt pr-body` assembled from the evidence ledger.
240
329
 
241
330
  The last two rows of review `0002` (`S38` workspace token cost, `S39` estate policy
242
- as a pack) are closed by ruling in ADR-102: the instrument, the declaration and the
331
+ as a pack) are closed by ruling: the instrument, the declaration and the
243
332
  non-blocking finding shipped, the blocking gate and the registry-carrying pack were
244
333
  refused by ruling, and the estate-side move is recorded as whose commit it waits on.
245
334
  Everything in plans `0001`–`0003` and reviews `0001`–`0002` is Complete or Accepted.
@@ -133,7 +133,7 @@ a feature; `rules why` is the provenance mechanism the whole one-canonical-home
133
133
  on, and it cannot depend on a git checkout being present.
134
134
 
135
135
  `docs/plans` ships with it, because every non-zero exit prints a remedy pointing at
136
- `docs/plans/0002-simt-dev-cli.md section 11`.
136
+ `docs/research/0002-simt-dev-cli.md section 11`.
137
137
 
138
138
  ### 6. "Absent", "wrong" and "moved" are three different facts
139
139
 
@@ -4,7 +4,7 @@ Status: accepted · 2026-10-06 · rulings 1 and 2 narrowed by ADR-026 · ruling
4
4
  **Affects:** `src/projection/baselines.mjs`, `src/projection/markers.mjs`,
5
5
  `src/projection/project.mjs`, `src/commands/init.mjs`, `test/baselines.test.mjs`,
6
6
  `test/leaks.mjs`, `test/surfaces.test.mjs`. Settles §3.1 row 5 and row 7 of
7
- `docs/plans/0001-centralise-agent-rules.md` for the files it names, and leaves the rest ruled
7
+ `docs/research/0001-centralise-agent-rules.md` for the files it names, and leaves the rest ruled
8
8
  out by name rather than outstanding.
9
9
 
10
10
  Rulings 1 and 2 did not survive whole: ADR-026 rules that a config whose grammar cannot
@@ -5,7 +5,7 @@ Status: accepted · 2026-10-06
5
5
  `src/commands/help.mjs`, `src/projection/project.mjs`, `test/ci.test.mjs`.
6
6
  **Narrows:** ADR-025 rulings 1 and 2. **Extends:** ADR-023 (bytes copied, written once),
7
7
  ADR-024 (simt-dev's own copies are refreshed by `simt-dev ci`). Settles the Dependabot
8
- item §3.1 row 8 of `docs/plans/0001-centralise-agent-rules.md` named as still missing.
8
+ item §3.1 row 8 of `docs/research/0001-centralise-agent-rules.md` named as still missing.
9
9
 
10
10
  ## Context
11
11
 
@@ -5,7 +5,7 @@ Status: accepted · 2026-10-06
5
5
  `test/baselines.test.mjs`, `test/surfaces.test.mjs`.
6
6
  **Supersedes:** ADR-025 ruling 9, which ruled `.gitattributes` out for now and required this
7
7
  record. Settles the `.gitattributes` item in §3.1 row 5 of
8
- `docs/plans/0001-centralise-agent-rules.md`.
8
+ `docs/research/0001-centralise-agent-rules.md`.
9
9
 
10
10
  ## Context
11
11
 
@@ -5,7 +5,7 @@ Status: accepted · 2026-10-07
5
5
  `test/tsconfig.test.mjs`. **Narrows:** ADR-026 ruling 2 (ownership does not depend on
6
6
  content being mergeable) by applying it to a file whose mechanism is `extends` rather than
7
7
  a copied byte range. Settles the `tsconfig.base.json` item of §3.1 row 5 and row 7 of
8
- `docs/plans/0001-centralise-agent-rules.md`.
8
+ `docs/research/0001-centralise-agent-rules.md`.
9
9
 
10
10
  ## Context
11
11
 
@@ -3,7 +3,7 @@
3
3
  Status: accepted · 2026-10-07
4
4
  **Affects:** `src/toolchain.mjs`, `src/projection/project.mjs`, `test/toolchain.test.mjs`.
5
5
  **Settles:** the `packageManager`/`engines`/`.nvmrc` items of §3.1 row 5 of
6
- `docs/plans/0001-centralise-agent-rules.md`. **Extends:** ADR-026 ruling 9 (absence and
6
+ `docs/research/0001-centralise-agent-rules.md`. **Extends:** ADR-026 ruling 9 (absence and
7
7
  disagreement are reportable; content is not) to a file this tool authors no part of.
8
8
 
9
9
  ## Context
@@ -1,7 +1,7 @@
1
1
  # ADR-030 — what a plan does not ship is a decision with a record, not a silence
2
2
 
3
3
  Status: accepted · 2026-10-07
4
- **Affects:** `docs/plans/0001-centralise-agent-rules.md` §3.1 row 5 and row 7. Ships no
4
+ **Affects:** `docs/research/0001-centralise-agent-rules.md` §3.1 row 5 and row 7. Ships no
5
5
  code. **Refuses:** the commitlint baseline and the shared ESLint block named in row 5 and
6
6
  row 7, and records why in the plan itself rather than leaving the rows to imply that two
7
7
  mechanisms are merely unwritten.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Status: accepted · 2026-10-09 · amends ADR-025 (withdraws ruling 8, corrects its context)
4
4
  **Affects:** `src/projection/baselines.mjs`, `test/baselines.test.mjs`,
5
- `docs/plans/0001-centralise-agent-rules.md`. Closes S30 of
5
+ `docs/research/0001-centralise-agent-rules.md`. Closes S30 of
6
6
  `docs/reviews/0002-full-review-adoption-and-public-release.md`.
7
7
 
8
8
  ## Context
@@ -1,6 +1,6 @@
1
1
  # ADR-082 — The tracker override is a manifest key, and init keeps what it did not write
2
2
 
3
- Status: **accepted** · 2026-10-16 · supersedes ADR-081 rulings 1 and 2
3
+ Status: **accepted** · 2026-10-16 · supersedes ADR-081 rulings 1 and 2 · ruling 1 superseded by ADR-128
4
4
 
5
5
  ## Context
6
6
 
@@ -0,0 +1,68 @@
1
+ ---
2
+ simt-affects: ["src/mcp/server.mjs", "src/mcp/tools.mjs", "docs/reviews/0003-pre-plan-0004-review.md"]
3
+ simt-supersedes: []
4
+ ---
5
+
6
+ # ADR-126 — the MCP surface stays a reader, so there is no write path to build
7
+
8
+ Status: **accepted** · 2026-11-01
9
+
10
+ ## Context
11
+
12
+ Review 0003's Q66 lists "the two-step write path" among the clauses still open for the
13
+ MCP surface. The clause reads as work to do; the file says otherwise. `src/mcp/server.mjs`
14
+ opens with three decisions, the third of which is that no mutating tool is exposed —
15
+ `init`, `sync`, `hooks install`, `skills install` and `upgrade` are absent on purpose,
16
+ because an editor that can call a tool can call it without a human reading a diff first.
17
+
18
+ Those two statements have stood in the same repository for months without meeting. The
19
+ question the row asks and the rule the file states are the same question, and the answer
20
+ was written down where the row's reader would not look.
21
+
22
+ The argument for exposure is real and worth stating: a client that can read a repository
23
+ can also want to fix it, and a plan-then-apply pair would let it see what would change
24
+ before changing anything. What it would not do is make the change reviewed. `--yes` on
25
+ the command line is a human decision with a preview in front of it; the same flag arriving
26
+ inside a tool call is a model deciding to pass it.
27
+
28
+ ## Ruling
29
+
30
+ ### 1. No tool on this surface writes
31
+
32
+ Every tool returns a value and changes nothing. The capability block advertises no write
33
+ capability, and this is not a gap to be filled later: a tool that writes is a different
34
+ surface with a different review obligation, and it is not this one.
35
+
36
+ ### 2. A caller that wants to write runs the command
37
+
38
+ The commands already do plan-then-apply properly: they print a preview, refuse without
39
+ `--yes`, journal what they write, and `undo` restores it. A client that wants that power
40
+ runs `simt <command>` as a subprocess, where the human who opened the editor sees the
41
+ preview and passes the flag — or does not.
42
+
43
+ ### 3. Exposing a writer needs a superseding record, not a patch
44
+
45
+ If a future surface must write, it arrives with its own decision: what the plan token
46
+ proves, who approves the apply, how a half-applied run is undone, and what the journal
47
+ says. Approving a diff in an editor is a claim the server cannot verify, and a
48
+ confirmation prompt is a user interface the server does not own.
49
+
50
+ ## Consequences
51
+
52
+ - Q66's write-path clause closes as withdrawn, not deferred. The row names this record so
53
+ the next reader does not reopen it as unfinished work.
54
+ - The read-only guarantee in the server's header, the capability block and the tests now
55
+ have one record behind them instead of three comments.
56
+ - A tool that returns `{ written: false }` for every input is not a compromise: it is the
57
+ shape that makes a client believe a write happened.
58
+
59
+ ## Rejected
60
+
61
+ - **A plan/apply pair behind a confirmation prompt.** The prompt is rendered by the client,
62
+ which may not render one, and the server cannot tell an approved apply from an unapproved
63
+ one. A safety property that depends on another program's UI is not a property.
64
+ - **A write tool gated on `--yes` passed through the arguments.** The flag would be asserted
65
+ by the same model that decided to write; the preview would be read by nobody.
66
+ - **Exposing `sync` alone because it is idempotent.** It rewrites the generated region of
67
+ every repository in a workspace. Idempotence says a second run changes nothing, not that
68
+ the first run was reviewed.
@@ -0,0 +1,65 @@
1
+ ---
2
+ simt-affects: ["src/mcp/tools.mjs", "src/commands/spec.mjs", "test/mcp-spec.test.mjs", "docs/reviews/0003-pre-plan-0004-review.md"]
3
+ simt-supersedes: []
4
+ ---
5
+
6
+ # ADR-127 — the MCP tool list is written by hand and held to the spec, and roots is not asked for
7
+
8
+ Status: **accepted** · 2026-11-01
9
+
10
+ ## Context
11
+
12
+ Two clauses of review 0003's Q66 read as work still to do: "`tools/list` generated from
13
+ spec rows with `mcp` set", and "`roots`". Both were written before the spec rows existed,
14
+ when the four lists this review found disagreeing were the live problem and generation
15
+ looked like the answer to all of them.
16
+
17
+ The spec rows now exist, and they carry `path`, `summary`, `flags` and, for the commands
18
+ the surface exposes, `mcp: {name, flags}`. That is enough to say *which* flags a tool
19
+ exposes and not enough to say what they are: no types, no per-argument descriptions, and
20
+ no vocabulary shared with the transport. `check` declares no `mcp` flags and its tool
21
+ takes `root`; `compare` declares none and its tool takes `root`, `limit`, `cursor` and
22
+ `concurrency`. An `inputSchema` derived from the rows would describe `--dry-run` as a
23
+ property and omit `root`, which is a contract a client cannot call.
24
+
25
+ `roots` is the other direction. It is a client capability: the server sends `roots/list`
26
+ and the client answers with the directories it may touch. `src/mcp/server.mjs` answers
27
+ requests and never sends them — the only thing it writes unprompted is a notification for
28
+ a progress token the client supplied. A server that asks a question needs a correlation
29
+ table for replies, a timeout for a client that never answers, and a fallback for the
30
+ clients that do not implement the capability; and every tool here already takes its root
31
+ as an argument (`root`, `workspace`, or `--paths`), which is the same information stated
32
+ once, by the caller, where it can be read in the call rather than inferred from a
33
+ handshake.
34
+
35
+ ## Ruling
36
+
37
+ ### 1. The tool list stays written by hand, and tests hold it to the spec
38
+
39
+ The spec row is the source of the *command*: its path, its summary and its flags. It is
40
+ not the source of the transport's schema, which carries descriptions, types and defaults
41
+ the row does not have, and arguments the command line does not spell as flags.
42
+
43
+ What generation was meant to prevent — a tool with no command, a command nobody can reach
44
+ over the transport, an advertised flag the tool refuses — is enforced in
45
+ `test/mcp-spec.test.mjs`, in all three directions, plus `MCP_ONLY` for the one tool that is
46
+ deliberately not a command (`federation_query`, which names its reason). A hand-written
47
+ list under a test that fails on every kind of drift is the same guarantee as a generated
48
+ one, without a schema nobody would trust enough to keep descriptions in.
49
+
50
+ ### 2. `roots` is withdrawn, not deferred
51
+
52
+ No tool is changed to accept an implicit root, and the server gains no request path. A
53
+ client that wants a tool to run against a directory passes it as the argument the schema
54
+ already names. If a future capability genuinely needs an answer from the client, that is
55
+ a different surface with its own correlation and timeout design, and it needs its own
56
+ record.
57
+
58
+ ## Consequences
59
+
60
+ - Reading `mcp: {name, flags}` tells a reader which flags reach the transport; reading
61
+ `src/mcp/tools.mjs` tells them what a caller sees. Both are checked against each other.
62
+ - Adding a second MCP-only tool means a `MCP_ONLY` entry with a reason, which is a place a
63
+ reviewer looks, rather than a hole in the table.
64
+ - The 2 KB `tools/list` budget keeps being spent on descriptions a reader can act on,
65
+ because nothing regenerates them from a summary phrase.
@@ -0,0 +1,42 @@
1
+ ---
2
+ simt-affects: ["templates/plan/tracker.json", "src/plan/index.mjs", "src/projection/manifest.mjs", "test/rules.test.mjs", "test/plan.test.mjs"]
3
+ simt-supersedes: ["ADR-082"]
4
+ ---
5
+
6
+ # ADR-128 — A research plan is a plan, and the tracker reads it
7
+
8
+ Status: **accepted** · 2026-11-01 · supersedes ADR-082 ruling 1
9
+
10
+ ## Context
11
+
12
+ The four founding plans left `docs/plans` for `docs/research`: completed work of a
13
+ different kind — research — but plans nonetheless, with tracker tables, slice ids and wave
14
+ dependencies. The tracker reads only the directories its template lists, so the move
15
+ de-indexed all four at once. A wave dependency that resolved through them broke with it:
16
+ `R01` in the research plan 0003 depends on `review 0002 Wave 0`, and the slices it names
17
+ live in the de-indexed documents.
18
+
19
+ The directory set was never code. ADR-081 and ADR-082 settled the mechanism — a template
20
+ lists any number of directories, each with a `kind`, a `word` and a `path`, and the parser,
21
+ the help text and `plan status` all read it — and ADR-082 ruling 1 fixed the *delivered*
22
+ set at two. Fixing the delivered set is a ruling, and this is the new one.
23
+
24
+ ## Ruling
25
+
26
+ 1. **The delivered template lists `docs/research` as a third directory, kind `research`,
27
+ word `research`.** A repository that sets nothing gets all three; a repository that
28
+ overrides `plans` replaces the `directories` section wholesale, exactly as before, so no
29
+ existing override is disturbed.
30
+ 2. **The directory is data, not a special case.** Nothing in `src/` names `research`; the
31
+ parser, help and status keep reading the template. A fourth directory arrives the same
32
+ way: one entry in the file, one record here.
33
+
34
+ ## Consequences
35
+
36
+ - `simt plan status` names three directories, and the research plans are indexed again:
37
+ their slices count, and a dependency may name one as `research 0003 R01`.
38
+ - Template order is index order. `research` sits between `plans` and `reviews`, which keeps
39
+ the moved documents ahead of the reviews they depend on — the same relative order they
40
+ had while they were in `docs/plans`.
41
+ - The tests that walk the tracker's documents (`test/rules.test.mjs`) read the template's
42
+ directories instead of a hardcoded pair, so a future entry reaches them without an edit.
@@ -0,0 +1,6 @@
1
+ {
2
+ "id": "bun",
3
+ "dependabot": [
4
+ { "order": 20, "fact": "has-bun-lock", "value": "bun", "manifest": "bun.lock" }
5
+ ]
6
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "id": "cargo",
3
+ "facts": ["has-cargo-toml"],
4
+ "tool": "cargo",
5
+ "manifestOrder": 1,
6
+ "gates": {
7
+ "preCommit": ["format", "lint"],
8
+ "prePush": ["test"],
9
+ "commands": {
10
+ "format": "cargo fmt --check",
11
+ "lint": "cargo clippy -- -D warnings",
12
+ "test": "cargo test"
13
+ }
14
+ },
15
+ "card": {
16
+ "build": { "order": 1, "condition": { "fact": "has-cargo-toml" }, "command": "cargo build" },
17
+ "focused": [
18
+ { "order": 5, "kind": "Rust", "condition": { "fact": "has-cargo-toml" }, "template": "cargo test {name}" }
19
+ ]
20
+ },
21
+ "dependabot": [
22
+ { "order": 6, "fact": "has-cargo-toml", "value": "cargo", "manifest": "Cargo.toml" }
23
+ ],
24
+ "languages": [{ "lang": "rust", "exts": [".rs"] }]
25
+ }