@nimiplatform/nimi-coding 0.1.0 → 0.2.1
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 +19 -0
- package/CODE_OF_CONDUCT.md +28 -0
- package/CONTRIBUTING.md +45 -0
- package/README.md +371 -344
- package/README.zh-CN.md +307 -0
- package/SECURITY.md +26 -0
- package/adapters/oh-my-codex/README.md +8 -9
- package/cli/commands/audit-sweep.mjs +10 -10
- package/cli/commands/classify-spec-tree.mjs +5 -0
- package/cli/commands/closeout.mjs +3 -0
- package/cli/commands/generate-spec-derived-docs.mjs +20 -0
- package/cli/commands/generate-spec-migration-plan.mjs +30 -0
- package/cli/commands/start.mjs +5 -1
- package/cli/commands/surface-validator-command.mjs +49 -0
- package/cli/commands/sweep-design.mjs +295 -0
- package/cli/commands/sweep.mjs +22 -0
- package/cli/commands/sync.mjs +132 -0
- package/cli/commands/topic-formatters.mjs +8 -8
- package/cli/commands/validate-ai-governance.mjs +167 -46
- package/cli/commands/validate-domain-admission.mjs +5 -0
- package/cli/commands/validate-guidance-bodies.mjs +5 -0
- package/cli/commands/validate-placement.mjs +5 -0
- package/cli/commands/validate-projection-edges.mjs +5 -0
- package/cli/commands/validate-spec-audit.mjs +5 -1
- package/cli/commands/validate-table-family.mjs +5 -0
- package/cli/commands/validate-tracked-output-admission.mjs +5 -0
- package/cli/constants.mjs +5 -49
- package/cli/help.mjs +33 -11
- package/cli/index.mjs +20 -2
- package/cli/lib/audit-sweep-runtime/admissions.mjs +38 -29
- package/cli/lib/audit-sweep-runtime/audit-validity.mjs +8 -0
- package/cli/lib/audit-sweep-runtime/chunks.mjs +11 -11
- package/cli/lib/audit-sweep-runtime/closeout.mjs +8 -8
- package/cli/lib/audit-sweep-runtime/codex-auditor-evidence.mjs +3 -3
- package/cli/lib/audit-sweep-runtime/codex-auditor.mjs +10 -10
- package/cli/lib/audit-sweep-runtime/common.mjs +7 -7
- package/cli/lib/audit-sweep-runtime/format.mjs +3 -3
- package/cli/lib/audit-sweep-runtime/ingest.mjs +8 -8
- package/cli/lib/audit-sweep-runtime/inventory-spec-chunks.mjs +24 -27
- package/cli/lib/audit-sweep-runtime/inventory.mjs +58 -18
- package/cli/lib/audit-sweep-runtime/ledger.mjs +1 -1
- package/cli/lib/audit-sweep-runtime/p0p1-profile.mjs +2 -2
- package/cli/lib/audit-sweep-runtime/remediation.mjs +6 -6
- package/cli/lib/audit-sweep-runtime/rerun.mjs +6 -6
- package/cli/lib/audit-sweep-runtime/status.mjs +1 -1
- package/cli/lib/audit-sweep-runtime/validators.mjs +2 -2
- package/cli/lib/authority-convergence.mjs +397 -2
- package/cli/lib/blueprint-audit.mjs +5 -5
- package/cli/lib/closeout.mjs +126 -3
- package/cli/lib/contracts.mjs +21 -17
- package/cli/lib/handoff.mjs +29 -11
- package/cli/lib/high-risk-admission.mjs +60 -11
- package/cli/lib/high-risk-decision.mjs +31 -2
- package/cli/lib/high-risk-ingest.mjs +5 -1
- package/cli/lib/high-risk-review.mjs +5 -1
- package/cli/lib/internal/contracts-parse.mjs +195 -24
- package/cli/lib/internal/contracts-validators.mjs +3 -2
- package/cli/lib/internal/doctor-bootstrap-surface.mjs +82 -35
- package/cli/lib/internal/doctor-delegated-surface.mjs +1 -1
- package/cli/lib/internal/doctor-finalize.mjs +12 -8
- package/cli/lib/internal/doctor-inspectors.mjs +34 -1
- package/cli/lib/internal/governance/ai/ai-context-budget-core.mjs +74 -12
- package/cli/lib/internal/governance/ai/ai-structure-budget-core.mjs +24 -6
- package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +18 -23
- package/cli/lib/internal/surface-taxonomy-validators.mjs +931 -0
- package/cli/lib/internal/validators-spec.mjs +229 -20
- package/cli/lib/sweep-design-runtime/common.mjs +246 -0
- package/cli/lib/sweep-design-runtime/engine.mjs +733 -0
- package/cli/lib/sweep-design-runtime/fix-topic.mjs +414 -0
- package/cli/lib/sweep-design-runtime/lifecycle.mjs +54 -0
- package/cli/lib/sweep-design-runtime/results.mjs +324 -0
- package/cli/lib/sweep-design.mjs +8 -0
- package/cli/lib/sync.mjs +143 -0
- package/cli/lib/topic-artifacts.mjs +186 -0
- package/cli/lib/topic-authority-coverage.mjs +73 -0
- package/cli/lib/topic-closeout.mjs +560 -0
- package/cli/lib/topic-common.mjs +404 -0
- package/cli/lib/topic-decisions.mjs +332 -0
- package/cli/lib/topic-draft-packets.mjs +126 -7
- package/cli/lib/topic-execution.mjs +515 -0
- package/cli/lib/topic-goal.mjs +112 -33
- package/cli/lib/topic-ledger.mjs +281 -0
- package/cli/lib/topic-lifecycle-artifacts.mjs +173 -0
- package/cli/lib/topic-root-validation.mjs +288 -0
- package/cli/lib/topic-runner-commands.mjs +174 -0
- package/cli/lib/topic-runner-deferral.mjs +532 -0
- package/cli/lib/topic-runner-stale-gates.mjs +114 -0
- package/cli/lib/topic-runner-validation.mjs +138 -0
- package/cli/lib/topic-runner.mjs +109 -154
- package/cli/lib/topic-scaffold.mjs +252 -0
- package/cli/lib/topic-waves.mjs +403 -0
- package/cli/lib/topic.mjs +81 -93
- package/cli/lib/value-helpers.mjs +6 -1
- package/cli/seeds/bootstrap.mjs +96 -20
- package/cli/seeds/seed-policy.yaml +67 -0
- package/config/bootstrap.yaml +1 -1
- package/config/skill-manifest.yaml +4 -2
- package/config/spec-generation-inputs.yaml +41 -19
- package/contracts/audit-remediation-map.schema.yaml +1 -0
- package/contracts/audit-sweep-result.yaml +4 -0
- package/contracts/domain-admission.schema.yaml +56 -0
- package/contracts/migration-inventory.schema.yaml +80 -0
- package/contracts/negative-fixtures.yaml +91 -0
- package/contracts/placement-contract.schema.yaml +163 -0
- package/contracts/projection-edge.schema.yaml +130 -0
- package/contracts/shared-enums.yaml +68 -0
- package/contracts/spec-generation-audit.schema.yaml +19 -4
- package/contracts/spec-generation-inputs.schema.yaml +130 -29
- package/contracts/spec-reconstruction-result.yaml +9 -5
- package/contracts/surface-taxonomy.schema.yaml +201 -0
- package/contracts/sweep-design-result.yaml +349 -0
- package/contracts/table-family.schema.yaml +121 -0
- package/contracts/topic-goal.schema.yaml +10 -1
- package/contracts/tracked-output-admission.schema.yaml +70 -0
- package/contracts/workflow-consumer.schema.yaml +112 -0
- package/methodology/audit-sweep-p0p1-recall.yaml +1 -1
- package/methodology/spec-reconstruction.yaml +53 -30
- package/package.json +19 -4
- package/spec/_meta/command-gating-matrix.yaml +33 -0
- package/spec/_meta/generate-drift-migration-checklist.yaml +44 -62
- package/spec/_meta/governance-routing-cutover-checklist.yaml +3 -3
- package/spec/_meta/phase2-impacted-surface-matrix.yaml +14 -14
- package/spec/_meta/spec-authority-cutover-readiness.yaml +3 -5
- package/spec/_meta/spec-tree-model.yaml +104 -36
- package/spec/bootstrap-state.yaml +36 -36
- package/spec/product-scope.yaml +13 -10
package/README.md
CHANGED
|
@@ -1,348 +1,375 @@
|
|
|
1
1
|
# @nimiplatform/nimi-coding
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
It
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
3
|
+
**English** · [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@nimiplatform/nimi-coding)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](#requirements)
|
|
8
|
+
|
|
9
|
+
> A **vendor-neutral, AI-native methodology toolkit** for governing
|
|
10
|
+
> high-risk AI-assisted software work. Bootstraps a project-local
|
|
11
|
+
> `.nimi/**` truth surface, ships the `nimicoding` CLI, and turns
|
|
12
|
+
> "AI plausibly finished this" into "the four closure dimensions
|
|
13
|
+
> are evidenced."
|
|
14
|
+
|
|
15
|
+
Reader documentation: <https://docs.nimi.ai/nimicoding>
|
|
16
|
+
npm package: [`@nimiplatform/nimi-coding`](https://www.npmjs.com/package/@nimiplatform/nimi-coding)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Why This Exists
|
|
21
|
+
|
|
22
|
+
AI-assisted implementation routinely produces output that **compiles,
|
|
23
|
+
passes existing tests, looks plausible to a reviewer, and is still
|
|
24
|
+
wrong** about authority, scope, semantics, or product meaning. These
|
|
25
|
+
are not bugs in the conventional sense — they are *closure failures*:
|
|
26
|
+
the work was claimed done in a state where the closure conditions had
|
|
27
|
+
not actually held.
|
|
28
|
+
|
|
29
|
+
A short, non-exhaustive list of failure shapes Nimi Coding is
|
|
30
|
+
designed to catch:
|
|
31
|
+
|
|
32
|
+
- **Stale-doc anchoring** — the assistant follows a document that
|
|
33
|
+
looked authoritative but had drifted from the active spec.
|
|
34
|
+
- **Implicit scope expansion** — the assistant edits an adjacent
|
|
35
|
+
surface "while it's in the file"; ownership silently shifts.
|
|
36
|
+
- **Plausible synthesis** — when authoritative source is missing,
|
|
37
|
+
the assistant invents a coherent answer indistinguishable from a
|
|
38
|
+
real one.
|
|
39
|
+
- **Old-route preservation** — a new route is added alongside the
|
|
40
|
+
old one as "safe migration"; the old route was supposed to be
|
|
41
|
+
deleted.
|
|
42
|
+
- **Build-pass closure** — work declared done because tests run,
|
|
43
|
+
even though consumer-facing behavior is wrong.
|
|
44
|
+
- **Pseudo-success** — a typed contract failure is hidden behind a
|
|
45
|
+
fallback that returns "something" instead of failing closed.
|
|
46
|
+
|
|
47
|
+
Better prompts and better tests do not address this. The loop
|
|
48
|
+
reviewing the AI's output is the same loop that produced it. Nimi
|
|
49
|
+
Coding introduces **structural separation** instead.
|
|
50
|
+
|
|
51
|
+
## What Nimi Coding Is (And Is Not)
|
|
52
|
+
|
|
53
|
+
Nimi Coding is **not** another AI coding assistant. It does not write
|
|
54
|
+
code, dispatch to a provider, or run an agent loop.
|
|
55
|
+
|
|
56
|
+
It is the **standalone host-agnostic boundary package** that sits as
|
|
57
|
+
a governance layer under whichever AI host you use (Claude, Codex,
|
|
58
|
+
Gemini, OMX, or your own). It ships:
|
|
59
|
+
|
|
60
|
+
- a package-owned **methodology** under `methodology/**`
|
|
61
|
+
- typed **contracts** under `contracts/**`
|
|
62
|
+
- **bootstrap + host profile** config under `config/**`
|
|
63
|
+
- a **bootstrap spec seed** under `spec/**`
|
|
64
|
+
- the **`nimicoding` CLI** for bootstrap, validation, skill handoff,
|
|
65
|
+
local closeout, topic lifecycle, sweep audit, sweep design, and
|
|
66
|
+
high-risk execution gates
|
|
67
|
+
- **host adapter** profile overlays for external AI hosts
|
|
68
|
+
|
|
69
|
+
It deliberately does **not** ship:
|
|
70
|
+
|
|
71
|
+
- a packet-bound run kernel
|
|
72
|
+
- provider-backed AI execution
|
|
73
|
+
- a scheduler
|
|
74
|
+
- notification infrastructure
|
|
75
|
+
- an automation backend
|
|
63
76
|
- self-hosted methodology execution
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
`
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
The
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
78
|
+
Runtime ownership stays with an external AI host. The methodology
|
|
79
|
+
and contracts stay portable. You can change AI hosts tomorrow
|
|
80
|
+
without changing the methodology contract.
|
|
81
|
+
|
|
82
|
+
When a host project runs `nimicoding start`, the package-owned
|
|
83
|
+
sources are *projected* into that project's
|
|
84
|
+
`.nimi/{config,contracts,methodology,spec}/**` surface. The adopted
|
|
85
|
+
project then owns its `.nimi/spec/**` product authority. **The
|
|
86
|
+
package does not make a host read package source paths directly** —
|
|
87
|
+
the adopted project always reads its own projected `.nimi/**`.
|
|
88
|
+
|
|
89
|
+
## The Mental Model
|
|
90
|
+
|
|
91
|
+
Four moves separate Nimi Coding from a checklist:
|
|
92
|
+
|
|
93
|
+
| Move | What it means |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| **Authority is named** | Every change names where its truth lives (`.nimi/spec/**`), who owns the surface, and what kind of work is happening. |
|
|
96
|
+
| **Execution is packetized** | Implementation is bounded by a frozen packet declaring allowed reads, allowed writes, acceptance invariants, negative tests, stop lines, and reopen conditions — *before* the worker begins. |
|
|
97
|
+
| **Closure is multidimensional** | Four independent closure gates — Authority, Semantic, Consumer, Drift Resistance — must all hold. Three out of four is not closed. |
|
|
98
|
+
| **Roles are separated** | Manager owns wave admission and judgement; Worker owns the packet write set; Auditor performs structural review from a **structurally separate loop** (a different AI session, a different vendor). |
|
|
99
|
+
|
|
100
|
+
See [Four Closures](https://docs.nimi.ai/nimicoding/four-closures) and
|
|
101
|
+
[The Paradigm](https://docs.nimi.ai/nimicoding/the-paradigm) for the
|
|
102
|
+
full framework.
|
|
103
|
+
|
|
104
|
+
## Who This Is For
|
|
105
|
+
|
|
106
|
+
| Persona | What you get |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| Solo founder shipping with AI | Team-scale review discipline without a team — route the auditor through a second AI session on the same laptop |
|
|
109
|
+
| Small team (2–5) adopting AI | Structural review redundancy that scales without headcount |
|
|
110
|
+
| OSS maintainer accepting AI-authored PRs | Provable contribution discipline — packet boundaries, typed evidence, four-closure gates |
|
|
111
|
+
| Organization under AI-coding compliance pressure | Audit trail and structured acceptance independent of any single AI vendor |
|
|
112
|
+
| Researcher studying AI engineering practice | Observable methodology corpus over real repository history |
|
|
113
|
+
|
|
114
|
+
If you have ever watched an AI-assisted change look complete to every
|
|
115
|
+
available signal — type checker green, tests green, reviewer
|
|
116
|
+
approved — and turn out to be wrong about authority, scope, or
|
|
117
|
+
product meaning, this package is for you.
|
|
118
|
+
|
|
119
|
+
## Requirements
|
|
120
|
+
|
|
121
|
+
| Requirement | Version |
|
|
122
|
+
| --- | --- |
|
|
123
|
+
| Node.js | `>=24.0.0` |
|
|
124
|
+
| Package manager (consumer) | npm, pnpm, yarn, or compatible |
|
|
125
|
+
| pnpm (repository development) | `>=10.0.0` |
|
|
126
|
+
|
|
127
|
+
A version-controlled project is recommended — `start` creates files.
|
|
128
|
+
|
|
129
|
+
## Install
|
|
130
|
+
|
|
131
|
+
In the repository that should receive the `.nimi/**` governance
|
|
132
|
+
layer:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npm install --save-dev @nimiplatform/nimi-coding
|
|
136
|
+
# or
|
|
137
|
+
pnpm add -D @nimiplatform/nimi-coding
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Check the CLI:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx nimicoding --version
|
|
144
|
+
npx nimicoding --help
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 5-Minute Minimal Path
|
|
148
|
+
|
|
149
|
+
Most projects should start small. The first successful path is:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# 1. Bootstrap .nimi/** in your project root
|
|
153
|
+
npx nimicoding start
|
|
154
|
+
|
|
155
|
+
# 2. Check the bootstrap is healthy
|
|
156
|
+
npx nimicoding doctor --json
|
|
157
|
+
|
|
158
|
+
# 3. Hand off canonical spec reconstruction to your AI host
|
|
159
|
+
npx nimicoding handoff --skill spec_reconstruction --json
|
|
160
|
+
|
|
161
|
+
# 4. After the host consumes that payload and materializes .nimi/spec/**,
|
|
162
|
+
# validate the canonical tree
|
|
163
|
+
npx nimicoding validate-spec-tree .nimi/spec
|
|
164
|
+
npx nimicoding validate-spec-audit
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
After this, you have a project-local `.nimi/**` truth surface, a
|
|
168
|
+
typed reconstruction of project authority into `.nimi/spec/**`, and
|
|
169
|
+
mechanical validators you can re-run on every change.
|
|
170
|
+
|
|
171
|
+
`handoff` exports an authoritative task payload. It does not call an AI
|
|
172
|
+
provider or run the reconstruction itself; the external host must
|
|
173
|
+
consume the payload, write or return the expected artifacts, and then
|
|
174
|
+
the local validators check the result.
|
|
175
|
+
|
|
176
|
+
You do **not** need to create topics, freeze packets, or run
|
|
177
|
+
high-risk gates for ordinary low-risk changes. Those tools exist for
|
|
178
|
+
authority-bearing, cross-module, multi-wave, or audit-sensitive work.
|
|
179
|
+
|
|
180
|
+
To remove only package-managed bootstrap material from a test
|
|
181
|
+
project (preserves `.nimi/spec/**`, `.nimi/local/**`, `.nimi/cache/**`,
|
|
182
|
+
and locally modified bootstrap files):
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
npx nimicoding clear --yes
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## When You Need More: Topics, Waves, Packets
|
|
189
|
+
|
|
190
|
+
For authority-bearing, high-risk, or cross-module work, escalate to
|
|
191
|
+
the topic lifecycle. A topic groups one strategic change; waves split
|
|
192
|
+
the topic into bounded units of work; each wave freezes a **packet**
|
|
193
|
+
before the worker begins.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
nimicoding topic create <slug> --justification <text>
|
|
197
|
+
nimicoding topic wave add <topic-id> <wave-id> <slug> \
|
|
198
|
+
--goal <text> --owner-domain <domain>
|
|
199
|
+
nimicoding topic packet freeze <topic-id> --from <draft-path>
|
|
200
|
+
nimicoding handoff --skill high_risk_execution --json
|
|
201
|
+
nimicoding ingest-high-risk-execution --from result.json
|
|
202
|
+
nimicoding review-high-risk-execution --from ingest.json
|
|
203
|
+
nimicoding decide-high-risk-execution --from review.json \
|
|
204
|
+
--acceptance accept.md --verified-at <iso8601>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Each step is bounded by typed validation. Skipping a step or
|
|
208
|
+
smuggling fields through means the CLI refuses (fail closed, no
|
|
209
|
+
exceptions).
|
|
210
|
+
|
|
211
|
+
## The Four Declared Skills
|
|
212
|
+
|
|
213
|
+
External AI hosts implement these skills; the `handoff` CLI emits a
|
|
214
|
+
machine-readable payload for each:
|
|
215
|
+
|
|
216
|
+
| Skill | Purpose | Required at bootstrap |
|
|
217
|
+
| --- | --- | --- |
|
|
218
|
+
| `spec_reconstruction` | Reconstruct canonical project authority into `.nimi/spec/**` with source basis and unresolved-gap tracking | yes |
|
|
219
|
+
| `doc_spec_audit` | Audit per-file grounding and inference against the canonical tree | yes |
|
|
220
|
+
| `audit_sweep` | Split a target root into auditable chunks and record typed evidence | no |
|
|
221
|
+
| `high_risk_execution` | Execute admitted high-risk packets with typed packet / orchestration / prompt / worker-output / acceptance evidence | no |
|
|
222
|
+
|
|
223
|
+
See [Skills](https://docs.nimi.ai/nimicoding/skills) for contract
|
|
224
|
+
detail.
|
|
225
|
+
|
|
226
|
+
## CLI Surface
|
|
227
|
+
|
|
228
|
+
Common commands, grouped by entry scenario:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Bootstrap
|
|
232
|
+
nimicoding start
|
|
233
|
+
nimicoding sync --check
|
|
234
|
+
nimicoding doctor --json
|
|
235
|
+
nimicoding clear --yes
|
|
236
|
+
|
|
237
|
+
# Skill handoff and local closeout
|
|
238
|
+
nimicoding handoff --skill <id> --json
|
|
239
|
+
nimicoding closeout --from result.json --write-local
|
|
240
|
+
|
|
241
|
+
# Spec audit
|
|
242
|
+
nimicoding validate-spec-tree .nimi/spec
|
|
243
|
+
nimicoding validate-spec-audit
|
|
244
|
+
nimicoding blueprint-audit
|
|
245
|
+
|
|
246
|
+
# Topic lifecycle
|
|
247
|
+
nimicoding topic create <slug> --justification <text>
|
|
248
|
+
nimicoding topic wave add|select|admit ...
|
|
249
|
+
nimicoding topic packet freeze ...
|
|
250
|
+
nimicoding topic worker dispatch ...
|
|
251
|
+
nimicoding topic result record ...
|
|
252
|
+
nimicoding topic closeout ...
|
|
253
|
+
nimicoding topic true-close-audit ...
|
|
254
|
+
nimicoding topic run-next-step <topic-id> --json
|
|
255
|
+
|
|
256
|
+
# Sweep audit / sweep design
|
|
257
|
+
nimicoding sweep audit plan --root <dir> --json
|
|
258
|
+
nimicoding sweep audit chunk ...
|
|
259
|
+
nimicoding sweep design intake|packet-build|result-ingest|finalize ...
|
|
260
|
+
|
|
261
|
+
# High-risk execution gates
|
|
262
|
+
nimicoding admit-high-risk-decision --from <json> --admitted-at <iso8601>
|
|
263
|
+
nimicoding ingest-high-risk-execution --from <json>
|
|
264
|
+
nimicoding review-high-risk-execution --from <json>
|
|
265
|
+
nimicoding decide-high-risk-execution --from <json> \
|
|
266
|
+
--acceptance <path> --verified-at <iso8601>
|
|
267
|
+
|
|
268
|
+
# Mechanical artifact validators
|
|
269
|
+
nimicoding validate-execution-packet <path>
|
|
270
|
+
nimicoding validate-orchestration-state <path>
|
|
271
|
+
nimicoding validate-prompt <path>
|
|
272
|
+
nimicoding validate-worker-output <path>
|
|
273
|
+
nimicoding validate-acceptance <path>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Conceptual CLI overview:
|
|
277
|
+
<https://docs.nimi.ai/nimicoding/cli>
|
|
278
|
+
Field-level reference:
|
|
279
|
+
<https://docs.nimi.ai/nimicoding/reference/cli-commands>
|
|
280
|
+
|
|
281
|
+
## How Does This Compare To …
|
|
282
|
+
|
|
283
|
+
| | Cursor / Copilot / Claude Code | Lint / TDD / Code review | Nimi Coding |
|
|
284
|
+
| --- | --- | --- | --- |
|
|
285
|
+
| Writes code | yes | no | **no** |
|
|
286
|
+
| Catches local bugs | partial | yes | n/a |
|
|
287
|
+
| Catches authority drift | no | no | **yes** |
|
|
288
|
+
| Catches consumer-closure failure | no | no | **yes** |
|
|
289
|
+
| Vendor lock-in | yes (per tool) | no | **no — host-agnostic** |
|
|
290
|
+
| Audit trail across AI sessions | chat transcript | PR comments | **typed evidence under `.nimi/**`** |
|
|
291
|
+
|
|
292
|
+
Nimi Coding sits *underneath* the AI host you already use. It is the
|
|
293
|
+
machinery that lets the work AI did graduate from "looks done" to
|
|
294
|
+
"closed across four dimensions, with evidence."
|
|
295
|
+
|
|
296
|
+
## Repository Map
|
|
297
|
+
|
|
298
|
+
| Path | Purpose |
|
|
299
|
+
| --- | --- |
|
|
300
|
+
| `bin/nimicoding.mjs` | Executable package binary |
|
|
301
|
+
| `cli/**` | CLI implementation |
|
|
302
|
+
| `config/**` | Package-owned bootstrap and host profile source |
|
|
303
|
+
| `contracts/**` | Package-owned machine-readable schemas and contracts |
|
|
304
|
+
| `methodology/**` | Package-owned methodology source (policies) |
|
|
305
|
+
| `spec/**` | Bootstrap spec seed and package scope source |
|
|
306
|
+
| `adapters/**` | External host adapter profile overlays (e.g. `oh-my-codex`) |
|
|
307
|
+
| `test/**` | Node test suite and fixtures |
|
|
308
|
+
|
|
309
|
+
Adopted projects use `.nimi/**` for the projected layer. This
|
|
310
|
+
repository itself keeps the package-owned source directly under
|
|
311
|
+
`config/**`, `contracts/**`, `methodology/**`, and `spec/**`.
|
|
312
|
+
|
|
313
|
+
## Development
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
pnpm install
|
|
317
|
+
pnpm test # runs the node:test suite (329 tests at 0.2.1)
|
|
318
|
+
pnpm check:pack # npm pack --dry-run
|
|
319
|
+
pnpm check:ci # test + pack + CLI help/version smoke
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Local CLI smoke:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
node ./bin/nimicoding.mjs --version
|
|
326
|
+
node ./bin/nimicoding.mjs --help
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Before opening a pull request, read [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
330
|
+
The short version: keep changes scoped, preserve the host-agnostic
|
|
331
|
+
boundary, do not add runtime ownership unless the methodology
|
|
332
|
+
contract is explicitly redesigned, and run the relevant tests before
|
|
333
|
+
claiming the work is done.
|
|
334
|
+
|
|
335
|
+
## Publishing
|
|
336
|
+
|
|
337
|
+
Releases are tag-driven through GitHub Actions. A `vX.Y.Z` tag
|
|
338
|
+
publishes the matching `package.json` version after tests, dry-run
|
|
339
|
+
packing, and CLI smoke checks pass. The workflow also supports a
|
|
340
|
+
manual dry-run release gate.
|
|
341
|
+
|
|
342
|
+
The package publishes with npm provenance enabled.
|
|
343
|
+
|
|
344
|
+
## Security
|
|
345
|
+
|
|
346
|
+
Do not disclose vulnerabilities in public GitHub issues. Use a
|
|
347
|
+
private channel:
|
|
348
|
+
|
|
349
|
+
- GitHub private security advisory for
|
|
350
|
+
[`nimiplatform/nimi-coding`](https://github.com/nimiplatform/nimi-coding/security/advisories/new)
|
|
351
|
+
- `security@nimi.ai`
|
|
352
|
+
|
|
353
|
+
See [SECURITY.md](SECURITY.md) for the supported reporting path.
|
|
354
|
+
|
|
355
|
+
## Documentation
|
|
356
|
+
|
|
357
|
+
Full reader documentation lives at <https://docs.nimi.ai/nimicoding>,
|
|
358
|
+
including:
|
|
359
|
+
|
|
360
|
+
- [The Paradigm](https://docs.nimi.ai/nimicoding/the-paradigm)
|
|
361
|
+
- [Four Closures](https://docs.nimi.ai/nimicoding/four-closures)
|
|
362
|
+
- [False Closure Typology](https://docs.nimi.ai/nimicoding/false-closure-typology)
|
|
363
|
+
- [Forbidden Shortcuts](https://docs.nimi.ai/nimicoding/forbidden-shortcuts)
|
|
364
|
+
- [Role Separation](https://docs.nimi.ai/nimicoding/role-separation)
|
|
365
|
+
- [Topic Lifecycle](https://docs.nimi.ai/nimicoding/topic-lifecycle)
|
|
366
|
+
- [The Package](https://docs.nimi.ai/nimicoding/the-package)
|
|
367
|
+
- [CLI Surface](https://docs.nimi.ai/nimicoding/cli)
|
|
368
|
+
- [Installation](https://docs.nimi.ai/nimicoding/installation)
|
|
369
|
+
- [Adoption Path](https://docs.nimi.ai/nimicoding/adoption-path)
|
|
370
|
+
- [Comparison](https://docs.nimi.ai/nimicoding/comparison)
|
|
371
|
+
- [Walkthrough](https://docs.nimi.ai/nimicoding/walkthrough)
|
|
372
|
+
|
|
373
|
+
## License
|
|
374
|
+
|
|
375
|
+
MIT. See [LICENSE](LICENSE).
|