@rungs/cli 0.1.3 → 0.3.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 (40) hide show
  1. package/README.md +61 -11
  2. package/dist/cli.js +1250 -129
  3. package/dist/cli.js.map +4 -4
  4. package/modules/README.md +13 -0
  5. package/modules/adr/gates/adr.toml +14 -2
  6. package/modules/adr/module.toml +19 -1
  7. package/modules/audit/module.toml +1 -0
  8. package/modules/backlog/gates/ids.toml +33 -0
  9. package/modules/backlog/module.toml +61 -1
  10. package/modules/ci/files/{{workflow_path}} +9 -1
  11. package/modules/ci/module.toml +2 -1
  12. package/modules/concurrency/files/docs/concurrent-sessions.md +11 -5
  13. package/modules/concurrency/module.toml +3 -1
  14. package/modules/design-sync/module.toml +2 -0
  15. package/modules/doc-authority/module.toml +4 -0
  16. package/modules/findings/module.toml +3 -0
  17. package/modules/gates/gates/structural.toml +61 -17
  18. package/modules/gates/module.toml +5 -0
  19. package/modules/instructions/module.toml +4 -0
  20. package/modules/release/gates/release.toml +72 -4
  21. package/modules/release/module.toml +16 -1
  22. package/modules/release/skills/cut-release/SKILL.md +8 -1
  23. package/modules/session/module.toml +4 -2
  24. package/modules/skills/module.toml +3 -0
  25. package/modules/specs/module.toml +4 -0
  26. package/modules/workflows/module.toml +2 -0
  27. package/package.json +1 -1
  28. package/src/add.ts +64 -2
  29. package/src/backlog.ts +197 -0
  30. package/src/check.ts +56 -6
  31. package/src/cli.ts +406 -27
  32. package/src/concurrency.ts +412 -0
  33. package/src/engines.ts +261 -13
  34. package/src/engines2.ts +89 -4
  35. package/src/engines3.ts +147 -0
  36. package/src/explain.ts +189 -0
  37. package/src/lifecycle.ts +90 -3
  38. package/src/manifest.ts +13 -1
  39. package/src/selftest.ts +237 -0
  40. package/src/types.ts +34 -0
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # rungs
2
2
 
3
- **Installs and maintains a repository's agentic development system.**
3
+ **rungs CLI repository infrastructure for coding agents.** It installs and
4
+ maintains a repository's agentic development system.
4
5
 
5
6
  Your agent has instructions. Do they have gates? Is your backlog's status field
6
7
  telling the truth about what actually merged? That thing you noticed last
@@ -10,6 +11,22 @@ rungs scaffolds the parts of a working setup — agent instructions, skills, wor
10
11
  tracking, findings, decision records, validation gates — as **modules you pick**,
11
12
  then keeps checking that they still say what they said.
12
13
 
14
+ **Start read-only.** `doctor` writes nothing, works on repos that never installed
15
+ anything, and ends by naming one command:
16
+
17
+ ```console
18
+ $ npx @rungs/cli doctor
19
+ ci theirs
20
+ 1× .github/workflows/*.yml e.g. .github/workflows/ci.yml
21
+
22
+ 1 present · 0 different paradigm · 14 absent
23
+
24
+ Next
25
+ rungs add ci — adopt what you already built, in place
26
+ ```
27
+
28
+ Once you have run that:
29
+
13
30
  ```console
14
31
  $ rungs init . tracked
15
32
  instructions 3 create
@@ -47,7 +64,7 @@ So rungs does not ship a good idea about how to work. It ships **what four repos
47
64
  learned, with the incident attached**. Every module declares its provenance, and
48
65
  `doctor` quotes that incident back when a gate it installed has never fired:
49
66
 
50
- > `check-findings-register` has run 340 times and never fired. It exists because
67
+ > `audit-output-is-rows` has run 340 times and never fired. It exists because
51
68
  > one repo produced 268 audit reports with no register to close them into. Is
52
69
  > that still a risk here — or is this gate scoped too narrowly?
53
70
 
@@ -67,6 +84,9 @@ command to run next. Once you have run that:
67
84
  **[your first hour](docs/getting-started.md)** — which of the new files matter,
68
85
  what the installed skills are for, and what to do when a gate goes red.
69
86
 
87
+ New to the vocabulary? **[The nine words this page uses](docs/glossary.md)**,
88
+ defined once each.
89
+
70
90
  Requires **Node 22.18+**. The published package ships a bundled JavaScript entry point; the source
71
91
  checkout still runs the TypeScript sources directly with `node`.
72
92
 
@@ -109,6 +129,7 @@ reported as diverged and left alone.
109
129
  | --- | --- |
110
130
  | `rungs init [path] [profile]` | Scaffold — `minimal` · `tracked` · `disciplined` · `hardened` · `fleet` |
111
131
  | `rungs doctor [path]` | What does this repo already have? Works on repos that never installed anything |
132
+ | `rungs doctor --explain` | Also run the detectors over what it found — evidence rows, never a score |
112
133
  | `rungs add <module…>` | Install one module, resolving dependencies and adopting what exists |
113
134
  | `rungs check [path]` | Run the gates, record the ledger |
114
135
  | `rungs render [path]` | Re-emit path-scoped rules for each harness |
@@ -116,13 +137,20 @@ reported as diverged and left alone.
116
137
  | `rungs eject [path]` | Materialise the engines; stop depending on rungs |
117
138
  | `rungs setup git [path]` | Install the merge drivers `.gitattributes` names |
118
139
  | `rungs modules` | List the set and audit the manifests |
140
+ | `rungs backlog archive` | Move finished items to `archive/`, repointing every link that cites them |
141
+ | `rungs session start <branch>` | Cut a branch and worktree from the last **verified** merge, not the tip |
142
+ | `rungs preflight [path]` | Did the integration branch change files *you* changed? |
143
+ | `rungs land <branch>` | Merge → verify the merged tree → advance with a compare-and-swap, or refuse and park it |
144
+ | `rungs worktrees [path]` | Which worktrees are merged, prunable, or merged and still dirty |
119
145
 
120
146
  | Option | Effect |
121
147
  | --- | --- |
122
148
  | `--dry-run` | Report what would happen, write nothing. Any write command |
149
+ | `--explain` | `doctor`: run the detectors too. Read-only, and it runs no command your repo owns |
123
150
  | `--into <path>` | `add`: install into this repo rather than the working directory |
124
151
  | `--set <module>.<param>=<value>` | `add` / `init`: override a module parameter. Repeatable, and `--set m.p=v` works too |
125
152
  | `--confirm-threshold` | `add`: install a module whose rung is above this repo |
153
+ | `--confirm-paradigm` | `add`: install a module this repo already solves another way |
126
154
  | `--apply` | `upgrade`: write the changes rather than preview them |
127
155
  | `--fast` / `--full` | `check`: pick the gate tier, as the positional also does |
128
156
  | `--copilot` | Also emit Copilot instruction files |
@@ -145,6 +173,10 @@ you when you are installing above your level.
145
173
  | **4** docs that restate each other | `doc-authority` |
146
174
  | **5** 5+ concurrent sessions | `concurrency` |
147
175
 
176
+ The last four commands are the `concurrency` loop. They drive git, which nothing else in rungs
177
+ does — [ADR-0009](docs/decisions/ADR-0009-rungs-drives-git.md) sets the rules they obey: verify
178
+ before you advance, never destroy (only refuse), and never hold the integration branch.
179
+
148
180
  `concurrency` refuses to install without `--confirm-threshold`, because below
149
181
  five simultaneous sessions every mechanism in it costs more than it returns.
150
182
  Selling rung 5 to a rung-1 repo is the most likely way this tool does harm.
@@ -153,6 +185,12 @@ Full specification: [`docs/design/module-catalog.md`](docs/design/module-catalog
153
185
 
154
186
  ## Which agents
155
187
 
188
+ **Bring your own.** rungs is not a methodology and not an orchestrator: it does
189
+ not decide how your agent plans, specifies, or executes. It checks that the
190
+ repository underneath stays coherent while it does — which is why it composes
191
+ with whatever harness or spec-driven process you already run rather than
192
+ replacing one. `AGENTS.md` is embraced, not competed with.
193
+
156
194
  Skills are **spec-compliant Agent Skills**, portable to Claude Code, Codex,
157
195
  Cursor, Copilot, Gemini CLI and 40+ others without translation.
158
196
 
@@ -182,15 +220,27 @@ Four promises that shape everything else:
182
220
 
183
221
  ## Status
184
222
 
185
- **Next release, v0.1.3** — prepared locally as
186
- [`@rungs/cli`](https://www.npmjs.com/package/@rungs/cli); the public `latest` tag is v0.1.2.
187
- The release remains untagged until the release gates and publication step are run.
223
+ **Current release: v0.3.0** — that number is checked against [`package.json`](package.json) by the
224
+ `docs-version-claims` gate, so this sentence cannot drift from what ships — and the gate fails if
225
+ the sentence is reworded out of existence, because a claim nothing checks any more should not look
226
+ the same as a claim that passes.
227
+
228
+ It deliberately does **not** say "and it is on npm". Whether this version is tagged and published
229
+ is a fact about the registry, not about the manifest, and it was wrong here for two days once
230
+ already.
231
+
232
+ Whether a release is **pending**, and what npm currently serves, live on
233
+ [the versions page](https://docs.rungscli.com/versions/) — the one place that tracks them. This
234
+ file and the roadmap both carried their own copy and both said `v0.1.2` for two days after v0.1.3
235
+ went to npm. Cutting the next one follows the [release runbook](docs/design/release-runbook.md).
188
236
 
189
- rungs is installed in its own repo and its gates run on every change — 20 pass,
190
- 0 fail (`rungs check`, 2026-08-15). A clean consumer has also installed the packed
191
- artifact and completed the doctor → init → add → check → render → upgrade/eject
192
- journey locally. Detection is [verified against all four source repos](docs/design/detection-verification.md).
193
- Not yet done: an install from the public registry and a cross-platform release matrix.
237
+ rungs is installed in its own repo and its 29 gates run on every change — 29 pass,
238
+ 0 fail (`rungs check`, 2026-08-17). A clean consumer has installed from the **public
239
+ registry** and run the binary, and another completed the doctor → init → add → check →
240
+ render upgrade/eject journey from a packed artifact. Detection is
241
+ [verified against all four source repos](docs/design/detection-verification.md).
242
+ Not yet done: a cross-platform release matrix — only Windows is verified — and writing
243
+ to a repo rungs did not scaffold.
194
244
 
195
245
  Expect module *contents* to move. The command surface is settled.
196
246
 
@@ -211,7 +261,7 @@ nobody paid for does not ship.
211
261
  | [`docs/design/`](docs/design/README.md) | Product brief, module catalogue, verification |
212
262
  | [`docs/decisions/`](docs/decisions/README.md) | ADRs |
213
263
  | [`modules/`](modules/README.md) | The fifteen modules |
214
- | [`src/`](src/) | The CLI, ~2,800 lines |
264
+ | [`src/`](src/) | The CLI, ~5,100 lines (`wc -l src/*.ts`, 2026-08-17; held within 10% by `docs-version-claims`) |
215
265
 
216
266
  ## Licence
217
267