@nimiplatform/nimi-coding 0.5.0 → 0.6.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 (33) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +50 -25
  4. package/README.zh-CN.md +50 -25
  5. package/cli/commands/clear.mjs +3 -2
  6. package/cli/commands/code.mjs +225 -0
  7. package/cli/commands/start.mjs +3 -2
  8. package/cli/constants.mjs +2 -1
  9. package/cli/dev/run-cli-smoke.mjs +6 -0
  10. package/cli/help.mjs +8 -3
  11. package/cli/index.mjs +3 -2
  12. package/cli/lib/authority/diagnostics.mjs +3 -1
  13. package/cli/lib/code/authority-annotation-response.mjs +43 -0
  14. package/cli/lib/code/authority-annotation-scan.mjs +162 -0
  15. package/cli/lib/code/authority-annotations.mjs +293 -0
  16. package/cli/lib/code/context.mjs +710 -0
  17. package/cli/lib/code/response.mjs +165 -0
  18. package/cli/lib/doctor.mjs +3 -2
  19. package/cli/lib/entrypoints.mjs +12 -5
  20. package/cli/seeds/seed-policy.yaml +2 -2
  21. package/methodology/authority-authoring.yaml +67 -52
  22. package/methodology/core.yaml +6 -4
  23. package/package.json +5 -3
  24. package/spec/code-authority-annotations.yaml +42 -0
  25. package/spec/code-context.yaml +38 -0
  26. package/spec/product-scope.yaml +8 -3
  27. package/cli/commands/validate-ai-governance.mjs +0 -335
  28. package/cli/lib/internal/governance/ai/ai-context-budget-core.mjs +0 -377
  29. package/cli/lib/internal/governance/ai/ai-structure-budget-core.mjs +0 -376
  30. package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +0 -155
  31. package/cli/lib/internal/governance/ai/check-high-risk-doc-metadata-core.mjs +0 -173
  32. package/cli/lib/internal/governance/config.mjs +0 -114
  33. package/cli/lib/internal/governance/shared/read-yaml-with-fragments.mjs +0 -49
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.6.0
6
+
7
+ - Made all AI-visible operational guidance resolve the pinned project-local CLI through repository-root `pnpm exec nimicoding`, removing the false global-`PATH` availability assumption.
8
+ - Added experimental `nimicoding code context`: a JSON-only, output-bounded TypeScript 5.9.3 root-direct static context over explicit current-filesystem inputs; it does not claim inbound impact, runtime dispatch, or complete task context. TypeScript 5.9.3 is now a package runtime dependency.
9
+ - Added experimental `nimicoding code authority`: transient JSON-only Authority-to-Code, Code-to-Authority, and lifecycle audit for exact optional `nimi-authority` and `nimi-deprecated` markers in tracked current TypeScript, TSX, and Go source. Managed host instructions teach AI coding hosts to add markers only at key semantic owners and keep unannotated code unevaluated.
10
+ - Removed the legacy optional `validate-ai-governance` command and its threshold, waiver, freshness, and metadata implementation surface without a compatibility path.
11
+
5
12
  ## 0.5.0
6
13
 
7
14
  - Hard-cut canonical source admission to `nimicoding.authority/v2`; removed `fmt --upgrade`, `check --require-format`, and all v1 migration/history compatibility paths.
package/CONTRIBUTING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Contributing
2
2
 
3
- Nimi Coding accepts changes to canonical-authority methodology, formatter/compiler primitives, exact managed projections, deterministic authority gates, and optional L3 repository checks. Historical-format reconstruction, product-semantic generation, AI-host control, provider execution, task-state management, and review-state management are outside this package.
3
+ Nimi Coding accepts changes to canonical-authority products, formatter/compiler primitives, exact managed projections, and bounded read-only code queries over explicit inputs or markers. Historical-format reconstruction, product-semantic generation, AI-host control, provider execution, task-state management, and review-state management are outside this package. Code queries remain request-local and do not establish implementation conformance.
4
4
 
5
5
  Before opening a change:
6
6
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Deterministic authority for AI coding systems and third-party extensions.**
6
6
 
7
- Nimi Coding turns project-owned normative specifications into stable identities, exact source locations, authored relations, and bounded fail-closed machine products. AI hosts, agent frameworks, CI systems, editor tooling, and third-party extensions can use those products to discover authority, navigate relationships, and review exact changes without treating model inference as repository truth.
7
+ Nimi Coding turns project-owned normative specifications into stable identities, exact source locations, authored relations, and bounded fail-closed machine products. It also derives one bounded, read-only TypeScript outbound context from explicit repository, source, symbol, and tsconfig inputs. AI hosts can use these products without treating model inference as repository truth.
8
8
 
9
9
  Most end users should not need to invoke `nimicoding` directly. The primary integration surface is the documented CLI and its purpose-specific JSON products. Nimi Coding is not an AI agent, planner, code generator, approval workflow, or universal specification language.
10
10
 
@@ -19,6 +19,8 @@ Nimi Coding makes those questions explicit:
19
19
  | Several documents appear authoritative | One closed canonical authority boundary |
20
20
  | Paths and headings change | Stable logical unit IDs independent of files and order |
21
21
  | Search returns noisy or truncated context | Bounded discovery, exact query, declared context, and graph products |
22
+ | A selected TypeScript symbol still requires broad file reading | One explicitly bounded root-direct outbound code-context projection |
23
+ | Authority-to-code links are guessed from names or nearby text | Optional exact authored markers with deterministic bidirectional lookup |
22
24
  | A semantic cut leaves unchanged survivors outside declared relations | Change-derived recall over caller-selected exact owner/scope/term/relation/Definition channels |
23
25
  | A model cannot cite the exact source | Portable field- and relation-level SourceMap locations |
24
26
  | Textual diffs obscure semantic change | Stable-ID semantic diff and declared impact obligations |
@@ -60,9 +62,17 @@ Projects own all product meaning. Nimi Coding admits, locates, relates, and deri
60
62
  | Change intelligence | Stable-ID semantic diff, change-derived active-survivor recall, and relation-derived impact obligations | Candidate completeness is scoped to explicit channels; impact accepts no disposition or completion state |
61
63
  | Deterministic audit | Project-owned bindings for the graph verifier and exact lexical invariants, with JSON and SARIF 2.1.0 | Exact case-sensitive token/phrase checks only; no synonym, embedding, or natural-language contradiction inference |
62
64
  | Git-aware review | Immutable base commit plus exact, race-checked current worktree snapshot composed through compile/diff/impact/audit | Read-only; business semantics and implementation conformance are explicitly `not_evaluated` |
65
+ | TypeScript code context | Root declaration source plus root-direct static bindings, portable declaration loci, and eligible target source slices | Explicit `.ts`/`.tsx` root and tsconfig, TypeScript 5.9.3, outbound only; no locating, inbound impact, runtime dispatch, or task-completeness claim |
66
+ | Explicit code-authority links | Transient Authority→Code, Code→Authority, and lifecycle audit over optional exact markers in tracked current `.ts`, `.tsx`, and `.go` source | Marker location only; no declaration ownership, annotation coverage, implementation conformance, or unannotated legacy detection |
63
67
 
64
68
  The current Nimi-realm validation corpus contains 33 canonical containers, 2,212 authority units, and 2,159 authored relations. Those figures demonstrate a real large-corpus replay; they are not package limits or a claim that the grammar covers every possible domain.
65
69
 
70
+ ## Using the 0.6 code surface
71
+
72
+ `start` writes package-managed guidance into the marked blocks in `AGENTS.md` and `CLAUDE.md`. On an existing installation, `doctor` diagnoses drift in that guidance and the compact methodology projection; `sync --apply` restores the exact current package projections while preserving host-owned text outside the managed blocks. An AI host that honors repository instructions can therefore learn when to request `code authority` or `code context`, and when a changed authority-governed feature warrants a small number of `nimi-authority` markers at key semantic owners.
73
+
74
+ This is instruction-based integration, not an automatic execution layer. Nimi Coding installs no hook or daemon, intercepts no task, requires no fixed preflight, and owns no task or completion state. The host decides whether a query is useful for the current coding task. `code authority` only recalls explicit markers and current authority lifecycle; `code context` only returns the admitted root-direct TypeScript projection. Neither result proves conformance, replaces affected builds and tests, or evaluates unannotated code.
75
+
66
76
  ## Five-minute adoption path
67
77
 
68
78
  Install and initialize the package:
@@ -74,6 +84,8 @@ pnpm exec nimicoding start --yes
74
84
 
75
85
  `start` creates the compact AI-visible authoring guide, managed instruction blocks in `AGENTS.md` and `CLAUDE.md`, and the ignored `.nimi/local/` root. It does not generate product semantics or create `.nimi/spec` for the project.
76
86
 
87
+ `pnpm exec nimicoding` is the supported host invocation: run it from the repository root so automation resolves the pinned project-local package. A global `nimicoding` binary in `PATH` is neither required nor a valid availability check.
88
+
77
89
  Author a complete canonical source such as `.nimi/spec/checkout.authority.yaml`:
78
90
 
79
91
  ```yaml
@@ -163,7 +175,7 @@ pnpm exec nimicoding authority review . \
163
175
  --json
164
176
  ```
165
177
 
166
- This example assumes that the repository already owns valid verifier bindings and that `origin/main` resolves to a commit containing `.nimi/spec`. `start` intentionally creates none of those project semantics or governance files.
178
+ This example assumes that the repository already owns valid verifier bindings and that `origin/main` resolves to a commit containing `.nimi/spec`. `start` intentionally creates none of those project semantics or policy files.
167
179
 
168
180
  The base ref is resolved once to a full commit OID. The base `.nimi/spec` tree is read from Git objects; the complete current `.nimi/spec` filesystem tree includes tracked unchanged files, edits, deletions, untracked files, and unsupported entries. Capture races, missing objects, invalid corpora, malformed bindings, and insufficient budgets refuse the result instead of publishing mixed analysis. The command never checks out, stashes, resets, stages, commits, or manages a PR.
169
181
 
@@ -203,7 +215,7 @@ Diff, review, and change-derived recall reuse immutable per-invocation compiler
203
215
  | Semantic change | File diff and generated drift dominated | Stable-ID semantic diff; rename/regroup/format-only changes can be semantic zero | Prose is line-diffed; specialized formats may have excellent domain diff tools |
204
216
  | Impact and audit | Project scripts, maps, and team knowledge | Declared relation impact plus configured graph and exact lexical findings | Build graphs, CODEOWNERS, linters, and tests are strong but fragmented |
205
217
  | Git review | No unified exact authority snapshot product | Immutable-base, race-checked worktree review | Usually Git diff plus independent format-specific checks |
206
- | Spec-to-code relationship | Direct paths were detailed but could become stale | Not currently modeled by the authority core | Codegen, type checking, and contract tests can be substantially stronger |
218
+ | Spec-to-code relationship | Direct paths were detailed but could become stale | Authority core stores no mapping; optional exact code markers provide authored locating only, with unannotated code and conformance not evaluated | Codegen, type checking, and contract tests can be substantially stronger |
207
219
  | Executable conformance | Some custom scripts checked specific project facts | Explicitly `not_evaluated` by review | High-quality tests and executable contracts are strongest |
208
220
  | Ecosystem | Highly project-specific | Stable CLI/JSON products, but no public JS SDK or model/tool standard yet | OpenAPI/Schema/test ecosystems and third-party interoperability are mature |
209
221
  | Authoring cost | Multiple representations and generators were expensive | IDs, owners, scopes, lifecycles, and relations require discipline | Lowest during exploration; governance cost rises with corpus size |
@@ -218,7 +230,7 @@ The current architecture is already a strong substrate for AI coding because it
218
230
  Three levels of product truth should remain distinct:
219
231
 
220
232
  1. **Strong today:** stable identity, fail-closed admission, exact SourceMap, authored graph navigation, bounded machine products, semantic diff, and exact Git review.
221
- 2. **Improved but incomplete:** locating and tracing the exact inputs for human/AI conflict review, task-context assembly, owner/scope accountability, and spec-to-code traceability. Contradiction judgment itself is not a deterministic product.
233
+ 2. **Improved but incomplete:** optional authored marker lookup and bounded TypeScript outbound context reduce implementation navigation, while complete task context, unannotated code, and conformance remain unevaluated. Contradiction judgment itself is not a deterministic product.
222
234
  3. **Intentionally not solved:** universal business-semantic completeness, automatic authority selection, executable code conformance, model reasoning, and AI workflow orchestration.
223
235
 
224
236
  The long-term ceiling is high if Nimi Coding standardizes the authority protocol rather than attempting to absorb every domain language. A model-native ecosystem could train AI systems to discover before guessing, resolve exact IDs, distinguish authored facts from inference, honor refusal and scoped status, and request bounded analysis after edits. Deterministic runtime products must remain the oracle; model familiarity must never replace admission or the project's real tests and gates.
@@ -237,25 +249,14 @@ The long-term ceiling is high if Nimi Coding standardizes the authority protocol
237
249
  - Raw AuthorityIR, SourceMap internals, and compiler implementation are package-private. There is currently no public JavaScript API (`exports` is empty).
238
250
  - `.nimi/local/**` is derived or local output, never product authority.
239
251
 
240
- ## Future roadmap
241
-
242
- The roadmap is paused at the current validated baseline. The entries below are candidate lanes, not implementation authorization, release promises, or an implied sequence. A future iteration should select one real adopter journey at a time.
243
-
244
- | Candidate lane | Intended product | Entry condition |
245
- | --- | --- | --- |
246
- | Stateless AI tool adapter | Typed tools over current bounded JSON products, potentially via MCP or an extension API | A real host integration demonstrates that direct CLI invocation is insufficient |
247
- | Read-only unit/code locator | Exact project-declared unit → declaration/test/gate bindings and reverse lookup | A real implementation-alignment journey demonstrates stable explicit bindings; no execution or conformance status is added |
248
- | D2 IDE/LSP | Live diagnostics, exact-ID navigation/completion, full-snapshot unsaved-buffer overlays | A sustained editor journey justifies a separate delivery unit |
249
- | D3 local Studio | Read-only unit/graph/diff/impact/audit exploration | Several real review/exploration journeys are validated first |
250
- | D4 external semantic candidates | Model/embedding/reranking candidates with provenance and abstention | Lexical/graph shortcomings are measured on an owner-approved task corpus |
251
- | E1 multi-repository Atlas | Visibility-filtered composition of canonical repository snapshots | Ecosystem repositories, identity, visibility, ownership, and workspace membership are explicit |
252
+ ## Future work
252
253
 
253
- Conditional work remains separate:
254
+ Version 0.6 intentionally stops at the current request-local products. No next phase is implied. A later iteration should begin with one real adopter failure and add only the smallest missing mechanism:
254
255
 
255
- - Structured Definitions, replacement DAGs, owner/scope registries, or a public library API require demonstrated authoring/query/consumer loss.
256
- - Storage, SQLite, cache, or incremental compilation require a real workload to violate a predeclared SLO and profiling to identify repeated parse/index/join as the cause.
257
- - Version bump, tag, publish, ecosystem activation, and release compatibility are independent release decisions.
258
- - AI planning, delegation, execution, approval, task state, model/provider orchestration, and inferred model findings do not belong in the core package.
256
+ - Add a typed host adapter only if direct CLI invocation proves insufficient in actual use.
257
+ - Add unsaved-buffer support only if a sustained editor journey requires it.
258
+ - Add storage, semantic retrieval, or multi-repository composition only after measured use demonstrates a concrete loss that the current transient exact products cannot address.
259
+ - AI planning, delegation, execution, approval, task state, model/provider orchestration, implementation conformance, and completion tracking remain outside the core package.
259
260
 
260
261
  ## Command reference
261
262
 
@@ -268,8 +269,8 @@ The current public integration surface is the CLI. All budgets are explicit posi
268
269
  | Navigate | `authority refs`, `authority path`, `authority subgraph` |
269
270
  | Analyze and review | `authority audit`, `authority diff`, `authority change-candidates`, `authority impact`, `authority review` |
270
271
  | Validate lexical anchors | `authority anchors` |
272
+ | Read implementation context and explicit links | `code context`, `code authority` |
271
273
  | Project lifecycle | `start`, `sync`, `doctor`, `clear` |
272
- | Optional L3 repository governance | `validate-ai-governance` |
273
274
 
274
275
  <details>
275
276
  <summary>Complete authority command syntax</summary>
@@ -297,24 +298,48 @@ nimicoding authority review <repository-path> --base <git-ref> --bindings <file>
297
298
 
298
299
  </details>
299
300
 
301
+ <details>
302
+ <summary>Explicit code-authority marker syntax</summary>
303
+
304
+ ```text
305
+ // nimi-authority: <exact-authority-id>
306
+ // nimi-deprecated: <exact-authority-id>
307
+
308
+ nimicoding code authority --repo <exact-git-worktree-root> (--authority <exact-id>|--source <repo-relative-.ts-.tsx-or-.go-path>|--audit) --max-files <integer> --max-bytes <integer>=512
309
+ ```
310
+
311
+ Markers are optional exact authored links. The command compiles the repository's complete canonical `.nimi/spec`, scans the selected Git-tracked current-filesystem source scope once, and returns one complete compact JSON result or refuses. `nimi-deprecated` records an explicit developer judgment and is reported by the audit; the tool does not infer that judgment or prove marker pairing, declaration ownership, conformance, or hard-cut completion. Unannotated code remains valid and `not_evaluated`. No index, cache, scope binding, report, or task state is written.
312
+
313
+ </details>
314
+
315
+ <details>
316
+ <summary>TypeScript code context syntax</summary>
317
+
318
+ ```text
319
+ nimicoding code context <repo-relative-.ts-or-.tsx-path> --repo <exact-git-worktree-root> --symbol <top-level-identifier> --tsconfig <repo-relative-tsconfig> --max-bytes <integer>=512
320
+ ```
321
+
322
+ The command reads the current filesystem and writes one compact JSON response to stdout. `completed` covers only its closed root-direct static-binding policy. `partial` reports the first output-budget frontier; `refused` contains no usable context product. The command neither edits the repository nor selects, runs, or records verification.
323
+
324
+ </details>
325
+
300
326
  Relation types are a non-empty unique subset of the closed set `applies_to,supersedes`; discovery relation preview requires direction, relation types, and edge budget together.
301
327
 
302
328
  <details>
303
- <summary>Project lifecycle, governance, and global syntax</summary>
329
+ <summary>Project lifecycle and global syntax</summary>
304
330
 
305
331
  ```text
306
332
  nimicoding start [--yes]
307
333
  nimicoding sync [--apply|--check|--dry-run] [--json]
308
334
  nimicoding clear [--yes]
309
335
  nimicoding doctor [--verbose|--json]
310
- nimicoding validate-ai-governance --profile <profile-id> --scope <all|agents-freshness|context-budget|structure-budget|high-risk-doc-metadata> [--json]
311
336
  ```
312
337
 
313
338
  Global presentation options are `--lang en|zh`, `--color`, and `--no-color`.
314
339
 
315
340
  </details>
316
341
 
317
- Projection ownership is exact: `start`/`sync` own only their documented managed paths and marked instruction blocks. Files outside those exact managed surfaces are not inspected or modified by projection sync. Optional `validate-ai-governance` remains separate from authority admission and host task execution.
342
+ Projection ownership is exact: `start`/`sync` own only their documented managed paths and marked instruction blocks. Files outside those exact managed surfaces are not inspected or modified by projection sync. Code queries are request-local and do not participate in authority admission or host task execution.
318
343
 
319
344
  ## Development
320
345
 
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **面向 AI Coding 系统和第三方扩展的确定性 authority 控制层。**
6
6
 
7
- Nimi Coding 将项目自行拥有的规范性规则转化为稳定身份、精确源码位置、显式关系和有界、fail-closed 的机器产品。AI host、agent framework、CI、编辑器工具和第三方扩展可以据此发现 authority、导航关系并审查精确变更,而不把模型推断当作 repository truth。
7
+ Nimi Coding 将项目自行拥有的规范性规则转化为稳定身份、精确源码位置、显式关系和有界、fail-closed 的机器产品。它也能从明确的 repository、source、symbol 和 tsconfig 输入即时派生一份有界、只读的 TypeScript outbound context。AI host 可以使用这些产品,而不把模型推断当作 repository truth。
8
8
 
9
9
  大多数最终用户不需要直接调用 `nimicoding`。当前主要 integration surface 是已文档化的 CLI 及其 purpose-specific JSON 产品。Nimi Coding 不是 AI agent、planner、代码生成器、审批 workflow 或万能规范语言。
10
10
 
@@ -19,6 +19,8 @@ Nimi Coding 把这些问题变成显式产品语义:
19
19
  | 多份文档看起来都像 authority | 一个封闭的 canonical authority 边界 |
20
20
  | 路径和 heading 发生变化 | 与文件和顺序无关的稳定 logical unit ID |
21
21
  | 搜索产生噪声或被截断的上下文 | 有界 discovery、exact query、declared context 和 graph 产品 |
22
+ | 选定 TypeScript symbol 后仍需宽泛读取文件 | 一份有显式预算的 root-direct outbound code-context projection |
23
+ | Authority-to-code 链接依赖名称或邻近文本猜测 | 可选的 exact authored marker 与确定性双向查询 |
22
24
  | Semantic hard cut 在 declared relations 之外留下 unchanged survivors | 基于 caller-selected exact owner/scope/term/relation/Definition channels 的 change-derived recall |
23
25
  | 模型无法精确引用规则来源 | 字段级和关系级的 portable SourceMap location |
24
26
  | 文本 diff 掩盖真实语义变化 | Stable-ID semantic diff 和 declared impact obligations |
@@ -60,9 +62,17 @@ AI host · 第三方扩展 · CI · future editor/UI surfaces
60
62
  | Change intelligence | Stable-ID semantic diff、change-derived active-survivor recall 和 relation-derived impact obligations | Candidate completeness 只覆盖显式 channels;impact 不接受 disposition 或 completion state |
61
63
  | Deterministic audit | Project-owned graph verifier 与 exact lexical invariant bindings,输出 JSON 和 SARIF 2.1.0 | 只做大小写敏感的 exact token/phrase 检查;不做 synonym、embedding 或自然语言矛盾推断 |
62
64
  | Git-aware review | Immutable base commit 加 exact、race-checked current worktree snapshot,并复用 compile/diff/impact/audit | 只读;business semantics 与 implementation conformance 固定为 `not_evaluated` |
65
+ | TypeScript code context | Root declaration source、root-direct static bindings、portable declaration loci 和符合条件的 target source slices | 明确的 `.ts`/`.tsx` root 与 tsconfig、TypeScript 5.9.3、仅 outbound;不承诺 locating、inbound impact、runtime dispatch 或 task completeness |
66
+ | 显式 code-authority 链接 | 对 Git tracked 当前 `.ts`、`.tsx`、`.go` 源码中的可选 exact marker 提供 transient Authority→Code、Code→Authority 和 lifecycle audit | 只声明 marker location;不声明 declaration ownership、annotation coverage、implementation conformance 或未标注 legacy detection |
63
67
 
64
68
  当前 Nimi-realm 验证 corpus 包含 33 个 canonical containers、2,212 个 authority units 和 2,159 条 authored relations。这些数字证明了真实大型 corpus replay,不是 package 上限,也不代表 grammar 已覆盖所有领域。
65
69
 
70
+ ## 使用 0.6 code surface
71
+
72
+ `start` 会把 package 管理的指导写入 `AGENTS.md` 和 `CLAUDE.md` 的 marked blocks。对于已有安装,`doctor` 会诊断这些指导及 compact methodology projection 的 drift,`sync --apply` 则恢复当前 package 的精确 projections,同时保留 managed blocks 之外的宿主文本。因此,遵守 repository instructions 的 AI host 可以知道何时按需调用 `code authority` 或 `code context`,以及何时只在发生变更、受 authority 约束的功能中,为少数关键语义 owner 添加 `nimi-authority` marker。
73
+
74
+ 这是一种基于 instruction 的集成,不是自动执行层。Nimi Coding 不安装 hook 或 daemon,不拦截 task,不要求固定 preflight,也不拥有 task 或 completion state。是否需要查询由 host 根据当前 coding task 决定。`code authority` 只召回显式 marker 和当前 authority lifecycle;`code context` 只返回 admitted root-direct TypeScript projection。两者都不证明 conformance,不替代 affected build/tests,也不评价未标注代码。
75
+
66
76
  ## 五分钟接入
67
77
 
68
78
  安装并初始化:
@@ -74,6 +84,8 @@ pnpm exec nimicoding start --yes
74
84
 
75
85
  `start` 创建紧凑的 AI-visible authoring guide、`AGENTS.md`/`CLAUDE.md` 中的 managed instruction blocks,以及 ignored `.nimi/local/` root。它不会生成产品语义,也不会替项目创建 `.nimi/spec`。
76
86
 
87
+ `pnpm exec nimicoding` 是受支持的宿主调用方式:应从仓库根目录执行,使自动化解析到项目锁定的本地 package。既不要求全局 `PATH` 中存在 `nimicoding`,也不能用它判断 CLI 是否可用。
88
+
77
89
  创建一个完整 canonical source,例如 `.nimi/spec/checkout.authority.yaml`:
78
90
 
79
91
  ```yaml
@@ -163,7 +175,7 @@ pnpm exec nimicoding authority review . \
163
175
  --json
164
176
  ```
165
177
 
166
- 这个例子假设 repository 已经拥有合法 verifier bindings,并且 `origin/main` 能解析到包含 `.nimi/spec` 的 commit。`start` 刻意不会创建这些项目语义或 governance files。
178
+ 这个例子假设 repository 已经拥有合法 verifier bindings,并且 `origin/main` 能解析到包含 `.nimi/spec` 的 commit。`start` 刻意不会创建这些项目语义或 policy files。
167
179
 
168
180
  Base ref 在开始时只解析一次并固定为 full commit OID。Base `.nimi/spec` tree 从 Git objects 读取;完整 current `.nimi/spec` filesystem tree 包含 tracked unchanged files、edits、deletions、untracked files 和 unsupported entries。Capture race、missing object、invalid corpus、malformed binding 或 budget 不足都会拒绝结果,而不是发布混合分析。该命令不会 checkout、stash、reset、stage、commit,也不管理 PR。
169
181
 
@@ -203,7 +215,7 @@ Diff、review 与 change-derived recall 复用 per-invocation immutable compiler
203
215
  | Semantic change | File diff 和 generated drift 占主导 | Stable-ID semantic diff;rename/regroup/format-only 可为 semantic zero | Prose 多为 line diff;专业格式可能有优秀 domain diff |
204
216
  | Impact 与 audit | Project scripts、maps 和团队知识共同决定 | Declared relation impact 加 configured graph 与 exact lexical findings | Build graph、CODEOWNERS、linters 和 tests 很强但分散 |
205
217
  | Git review | 没有统一 exact authority snapshot product | Immutable-base、race-checked worktree review | 通常是 Git diff 加多个独立 format-specific checks |
206
- | Spec-to-code | Direct paths 很细,但可能 stale | Authority core 当前不建模这一关系 | Codegen、type checking 和 contract tests 可能明显更强 |
218
+ | Spec-to-code | Direct paths 很细,但可能 stale | Authority core 不保存 mapping;可选 exact code marker 只提供 authored locating,未标注代码与 conformance 均保持 `not_evaluated` | Codegen、type checking 和 contract tests 可能明显更强 |
207
219
  | Executable conformance | 部分 custom scripts 验证具体项目事实 | Review 显式固定为 `not_evaluated` | 高质量 tests 和 executable contracts 最强 |
208
220
  | 生态 | 高度 project-specific | 有稳定 CLI/JSON products,但还没有 public JS SDK 或模型/tool 标准 | OpenAPI/Schema/test 生态与第三方互操作最成熟 |
209
221
  | Authoring 成本 | 多种表示和 generators 成本高 | 必须维护 ID、owner、scope、lifecycle 和 relation | 探索期最低;corpus 扩大后治理成本上升 |
@@ -218,7 +230,7 @@ Diff、review 与 change-derived recall 复用 per-invocation immutable compiler
218
230
  必须始终区分三层产品事实:
219
231
 
220
232
  1. **当前已经很强:** stable identity、fail-closed admission、exact SourceMap、authored graph navigation、bounded machine products、semantic diff 和 exact Git review。
221
- 2. **已经改善但仍不完整:** 为人/AI conflict review 定位和追踪 exact inputs、task-context assembly、owner/scope accountability 和 spec-to-code traceability;矛盾判定本身不是 deterministic product。
233
+ 2. **已经改善但仍不完整:** 可选 authored marker lookup 和 bounded TypeScript outbound context 减少 implementation navigation;完整 task context、未标注代码和 conformance 仍不评价。矛盾判定本身不是 deterministic product。
222
234
  3. **刻意没有解决:** 通用业务语义完备性、自动 authority selection、可执行 code conformance、模型推理和 AI workflow orchestration。
223
235
 
224
236
  如果 Nimi Coding 标准化的是 authority protocol,而不是试图吞并所有领域语言,它的长期上限很高。Model-native 生态可以训练 AI:先 discover 再猜测、解析 exact ID、区分 authored fact 与 inference、尊重 refusal 与窄作用域 status,并在编辑后主动请求有界分析。但 deterministic runtime product 必须继续作为 oracle;模型熟悉 Nimi Coding 不能替代 admission 或项目真实的 tests 和 gates。
@@ -237,25 +249,14 @@ Diff、review 与 change-derived recall 复用 per-invocation immutable compiler
237
249
  - Raw AuthorityIR、SourceMap internals 和 compiler implementation 都是 package-private。当前没有 public JavaScript API(`exports` 为空)。
238
250
  - `.nimi/local/**` 是 derived/local output,永远不是 product authority。
239
251
 
240
- ## Future roadmap
241
-
242
- Roadmap 当前暂停在已经验证的 baseline。以下是 future candidate lanes,不代表 implementation authorization、release promise 或隐含顺序。未来每次迭代应只选择一个真实 adopter journey。
243
-
244
- | Candidate lane | 目标产品 | Entry condition |
245
- | --- | --- | --- |
246
- | Stateless AI tool adapter | 在现有 bounded JSON products 上提供 typed tools,可采用 MCP 或 extension API | 真实 host integration 证明直接调用 CLI 不足 |
247
- | Read-only unit/code locator | 精确的 project-declared unit → declaration/test/gate binding 和反向查询 | 真实 implementation-alignment journey 证明 binding 稳定;不加入执行或 conformance status |
248
- | D2 IDE/LSP | Live diagnostics、exact-ID navigation/completion、full-snapshot unsaved-buffer overlay | 持续 editor journey 足以支持独立 delivery unit |
249
- | D3 local Studio | Read-only unit/graph/diff/impact/audit exploration | 先验证多个真实 review/exploration journeys |
250
- | D4 external semantic candidates | 带 provenance 和 abstention 的 model/embedding/reranking candidates | 在 owner-approved task corpus 上量化 lexical/graph 不足 |
251
- | E1 multi-repository Atlas | Visibility-filtered canonical repository snapshot composition | Ecosystem repositories、identity、visibility、ownership 和 workspace membership 都已明确 |
252
+ ## Future work
252
253
 
253
- 以下工作必须独立、按条件进入:
254
+ 0.6 有意停在当前 request-local products,不暗示下一阶段。后续迭代应从一个真实 adopter failure 开始,并且只增加解决它所需的最小机制:
254
255
 
255
- - Structured Definitions、replacement DAG、owner/scope registry 或 public library API,必须先证明真实 authoring/query/consumer loss。
256
- - Storage、SQLite、cache 或 incremental compilation,必须先有真实 workload 违反预先声明的 SLO,并由 profiling 证明瓶颈来自 repeated parse/index/join。
257
- - Version bump、tag、publish、ecosystem activation 和 release compatibility 都属于独立 release decision。
258
- - AI planning、delegation、execution、approval、task state、model/provider orchestration 和 inferred model findings 不属于 core package。
256
+ - 只有真实使用证明直接调用 CLI 不足时,才增加 typed host adapter。
257
+ - 只有持续的 editor journey 确实需要时,才增加 unsaved-buffer 支持。
258
+ - 只有实测使用证明当前 transient exact products 无法解决具体损失时,才增加 storage、semantic retrieval 或 multi-repository composition。
259
+ - AI planning、delegation、execution、approval、task state、model/provider orchestration、implementation conformance 和 completion tracking 继续位于 core package 之外。
259
260
 
260
261
  ## Command reference
261
262
 
@@ -268,8 +269,8 @@ Roadmap 当前暂停在已经验证的 baseline。以下是 future candidate lan
268
269
  | Navigate | `authority refs`、`authority path`、`authority subgraph` |
269
270
  | Analyze 和 review | `authority audit`、`authority diff`、`authority change-candidates`、`authority impact`、`authority review` |
270
271
  | 校验词法 anchors | `authority anchors` |
272
+ | 读取 implementation context 与显式链接 | `code context`、`code authority` |
271
273
  | Project lifecycle | `start`、`sync`、`doctor`、`clear` |
272
- | 可选 L3 repository governance | `validate-ai-governance` |
273
274
 
274
275
  <details>
275
276
  <summary>完整 authority command syntax</summary>
@@ -297,24 +298,48 @@ nimicoding authority review <repository-path> --base <git-ref> --bindings <file>
297
298
 
298
299
  </details>
299
300
 
301
+ <details>
302
+ <summary>显式 code-authority marker syntax</summary>
303
+
304
+ ```text
305
+ // nimi-authority: <exact-authority-id>
306
+ // nimi-deprecated: <exact-authority-id>
307
+
308
+ nimicoding code authority --repo <exact-git-worktree-root> (--authority <exact-id>|--source <repo-relative-.ts-.tsx-or-.go-path>|--audit) --max-files <integer> --max-bytes <integer>=512
309
+ ```
310
+
311
+ Marker 是可选的 exact authored link。命令编译 repository 的完整 canonical `.nimi/spec`,一次扫描所选 Git tracked 当前文件系统源码范围,并返回一个完整 compact JSON result,否则拒绝。`nimi-deprecated` 记录开发者的显式判断并由 audit 报告;工具不推断该判断,也不证明 marker pairing、declaration ownership、conformance 或 hard-cut completion。未标注代码仍然合法并保持 `not_evaluated`。命令不写入 index、cache、scope binding、report 或 task state。
312
+
313
+ </details>
314
+
315
+ <details>
316
+ <summary>TypeScript code context syntax</summary>
317
+
318
+ ```text
319
+ nimicoding code context <repo-relative-.ts-or-.tsx-path> --repo <exact-git-worktree-root> --symbol <top-level-identifier> --tsconfig <repo-relative-tsconfig> --max-bytes <integer>=512
320
+ ```
321
+
322
+ 该命令读取当前文件系统,并向 stdout 写入一个 compact JSON response。`completed` 只覆盖封闭的 root-direct static-binding policy;`partial` 返回首个 output-budget frontier;`refused` 不包含可用 context product。命令不会编辑 repository,也不会选择、运行或保存 verification。
323
+
324
+ </details>
325
+
300
326
  Relation types 是 closed set `applies_to,supersedes` 的非空、无重复 subset;discovery relation preview 必须同时提供 direction、relation types 和 edge budget。
301
327
 
302
328
  <details>
303
- <summary>Project lifecycle、governance 和 global syntax</summary>
329
+ <summary>Project lifecycle 和 global syntax</summary>
304
330
 
305
331
  ```text
306
332
  nimicoding start [--yes]
307
333
  nimicoding sync [--apply|--check|--dry-run] [--json]
308
334
  nimicoding clear [--yes]
309
335
  nimicoding doctor [--verbose|--json]
310
- nimicoding validate-ai-governance --profile <profile-id> --scope <all|agents-freshness|context-budget|structure-budget|high-risk-doc-metadata> [--json]
311
336
  ```
312
337
 
313
338
  Global presentation options 是 `--lang en|zh`、`--color` 和 `--no-color`。
314
339
 
315
340
  </details>
316
341
 
317
- Projection ownership 是精确的:`start`/`sync` 只拥有其已文档化的 managed paths 和 marked instruction blocks。Projection sync 不检查或修改这些 exact managed surfaces 之外的 files。可选 `validate-ai-governance` 与 authority admission、host task execution 保持分离。
342
+ Projection ownership 是精确的:`start`/`sync` 只拥有其已文档化的 managed paths 和 marked instruction blocks。Projection sync 不检查或修改这些 exact managed surfaces 之外的 files。Code queries 是 request-local 的,不参与 authority admission 或 host task execution。
318
343
 
319
344
  ## Development
320
345
 
@@ -1,6 +1,7 @@
1
1
  import { createInterface } from "node:readline/promises";
2
2
  import process from "node:process";
3
3
 
4
+ import { PROJECT_LOCAL_CLI_INVOCATION } from "../constants.mjs";
4
5
  import {
5
6
  previewBootstrapRemoval,
6
7
  previewEntrypointRemoval,
@@ -177,8 +178,8 @@ ${styleLabel(localize("What You Should Review Next:", "你下一步应该检查
177
178
  "如果你想完整移除项目本地 AI truth,请手动检查 .nimi/spec/** 和本地产物。",
178
179
  )}
179
180
  - ${localize(
180
- "If you want nimicoding again later, run `nimicoding start`.",
181
- "如果以后还要重新接入 nimicoding,请运行 `nimicoding start`。",
181
+ `If you want nimicoding again later, run \`${PROJECT_LOCAL_CLI_INVOCATION} start\`.`,
182
+ `如果以后还要重新接入 nimicoding,请运行 \`${PROJECT_LOCAL_CLI_INVOCATION} start\`。`,
182
183
  )}
183
184
  `);
184
185
 
@@ -0,0 +1,225 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { queryCodeAuthority, CodeAuthorityFailure } from "../lib/code/authority-annotations.mjs";
3
+ import {
4
+ completedCodeAuthorityResponse,
5
+ MIN_CODE_AUTHORITY_BYTES,
6
+ refusedCodeAuthorityResponse,
7
+ renderCodeAuthorityResponse,
8
+ serializeCodeAuthorityResponse,
9
+ } from "../lib/code/authority-annotation-response.mjs";
10
+ import { contextForTypeScript, CodeContextFailure } from "../lib/code/context.mjs";
11
+ import {
12
+ MIN_CODE_CONTEXT_BYTES,
13
+ refusedCodeResponse,
14
+ renderContextResponse,
15
+ serializeCodeResponse,
16
+ } from "../lib/code/response.mjs";
17
+
18
+ export const CODE_CONTEXT_USAGE = "nimicoding code context <repo-relative-.ts-or-.tsx-path> --repo <exact-git-worktree-root> --symbol <top-level-identifier> --tsconfig <repo-relative-tsconfig> --max-bytes <integer>=512";
19
+ export const CODE_AUTHORITY_USAGE = "nimicoding code authority --repo <exact-git-worktree-root> (--authority <exact-id>|--source <repo-relative-.ts-.tsx-or-.go-path>|--audit) --max-files <integer> --max-bytes <integer>=512";
20
+ export const CODE_COMMAND_USAGE = [CODE_CONTEXT_USAGE, CODE_AUTHORITY_USAGE];
21
+
22
+ const GLOBAL_FLAG_OPTIONS = new Set(["--color", "--no-color"]);
23
+ const CODE_OPTIONS = new Set(["--repo", "--symbol", "--tsconfig", "--max-bytes"]);
24
+ const CODE_AUTHORITY_VALUE_OPTIONS = new Set(["--repo", "--authority", "--source", "--max-files", "--max-bytes"]);
25
+ const SUPPORTED_LANGUAGES = new Set(["en", "zh"]);
26
+
27
+ function writeResponse(response) {
28
+ process.stdout.write(serializeCodeResponse(response));
29
+ }
30
+
31
+ function writeRefusal(code, message, exitCode) {
32
+ writeResponse(refusedCodeResponse(code, message));
33
+ return exitCode;
34
+ }
35
+
36
+ function writeAuthorityResponse(response) {
37
+ process.stdout.write(serializeCodeAuthorityResponse(response));
38
+ }
39
+
40
+ function writeAuthorityRefusal(code, message, exitCode) {
41
+ writeAuthorityResponse(refusedCodeAuthorityResponse(code, message));
42
+ return exitCode;
43
+ }
44
+
45
+ export function classifyCodeInvocation(args) {
46
+ for (let index = 0; index < args.length; index += 1) {
47
+ const argument = args[index];
48
+ if (GLOBAL_FLAG_OPTIONS.has(argument) || argument.startsWith("--lang=")) continue;
49
+ if (argument === "--lang") {
50
+ const value = args[index + 1];
51
+ if (value !== undefined && !value.startsWith("--")) index += 1;
52
+ continue;
53
+ }
54
+ return argument === "code" ? index : null;
55
+ }
56
+ return null;
57
+ }
58
+
59
+ function parseLeadingGlobals(args, commandIndex) {
60
+ for (let index = 0; index < commandIndex; index += 1) {
61
+ const argument = args[index];
62
+ if (GLOBAL_FLAG_OPTIONS.has(argument)) continue;
63
+ if (argument.startsWith("--lang=")) {
64
+ if (!SUPPORTED_LANGUAGES.has(argument.slice("--lang=".length))) return false;
65
+ continue;
66
+ }
67
+ if (argument === "--lang") {
68
+ const value = args[index + 1];
69
+ if (!SUPPORTED_LANGUAGES.has(value)) return false;
70
+ index += 1;
71
+ continue;
72
+ }
73
+ return false;
74
+ }
75
+ return true;
76
+ }
77
+
78
+ function parseContextArguments(args) {
79
+ if (args[0] !== "context") return null;
80
+ const positional = [];
81
+ const options = new Map();
82
+ for (let index = 1; index < args.length; index += 1) {
83
+ const argument = args[index];
84
+ if (GLOBAL_FLAG_OPTIONS.has(argument)) continue;
85
+ if (argument.startsWith("--lang=")) {
86
+ if (!SUPPORTED_LANGUAGES.has(argument.slice("--lang=".length))) return null;
87
+ continue;
88
+ }
89
+ if (argument === "--lang") {
90
+ const value = args[index + 1];
91
+ if (!SUPPORTED_LANGUAGES.has(value)) return null;
92
+ index += 1;
93
+ continue;
94
+ }
95
+ if (argument.startsWith("--")) {
96
+ if (!CODE_OPTIONS.has(argument) || options.has(argument)) return null;
97
+ const value = args[index + 1];
98
+ if (value === undefined || value.startsWith("--")) return null;
99
+ options.set(argument, value);
100
+ index += 1;
101
+ continue;
102
+ }
103
+ positional.push(argument);
104
+ }
105
+ if (positional.length !== 1 || options.size !== CODE_OPTIONS.size) return null;
106
+ const maxBytesText = options.get("--max-bytes");
107
+ if (!/^(?:0|[1-9][0-9]*)$/u.test(maxBytesText)) return null;
108
+ const maxBytes = Number(maxBytesText);
109
+ if (!Number.isSafeInteger(maxBytes) || maxBytes < MIN_CODE_CONTEXT_BYTES) return null;
110
+ const symbol = options.get("--symbol");
111
+ if (!/^[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}]*$/u.test(symbol)) return null;
112
+ return {
113
+ source: positional[0],
114
+ repository: options.get("--repo"),
115
+ symbol,
116
+ tsconfig: options.get("--tsconfig"),
117
+ maxBytes,
118
+ };
119
+ }
120
+
121
+ function parseAuthorityArguments(args) {
122
+ if (args[0] !== "authority") return null;
123
+ const options = new Map();
124
+ let audit = false;
125
+ for (let index = 1; index < args.length; index += 1) {
126
+ const argument = args[index];
127
+ if (GLOBAL_FLAG_OPTIONS.has(argument)) continue;
128
+ if (argument.startsWith("--lang=")) {
129
+ if (!SUPPORTED_LANGUAGES.has(argument.slice("--lang=".length))) return null;
130
+ continue;
131
+ }
132
+ if (argument === "--lang") {
133
+ const value = args[index + 1];
134
+ if (!SUPPORTED_LANGUAGES.has(value)) return null;
135
+ index += 1;
136
+ continue;
137
+ }
138
+ if (argument === "--audit") {
139
+ if (audit) return null;
140
+ audit = true;
141
+ continue;
142
+ }
143
+ if (!CODE_AUTHORITY_VALUE_OPTIONS.has(argument) || options.has(argument)) return null;
144
+ const value = args[index + 1];
145
+ if (value === undefined || value.startsWith("--")) return null;
146
+ options.set(argument, value);
147
+ index += 1;
148
+ }
149
+ if (!options.has("--repo") || !options.has("--max-files") || !options.has("--max-bytes")) return null;
150
+ const selectors = Number(options.has("--authority")) + Number(options.has("--source")) + Number(audit);
151
+ if (selectors !== 1) return null;
152
+ const maxFilesText = options.get("--max-files");
153
+ const maxBytesText = options.get("--max-bytes");
154
+ if (!/^[1-9][0-9]*$/u.test(maxFilesText) || !/^(?:0|[1-9][0-9]*)$/u.test(maxBytesText)) return null;
155
+ const maxFiles = Number(maxFilesText);
156
+ const maxBytes = Number(maxBytesText);
157
+ if (!Number.isSafeInteger(maxFiles) || !Number.isSafeInteger(maxBytes) || maxBytes < MIN_CODE_AUTHORITY_BYTES) return null;
158
+ const selector = options.has("--authority")
159
+ ? { kind: "authority", id: options.get("--authority") }
160
+ : options.has("--source")
161
+ ? { kind: "source", path: options.get("--source") }
162
+ : { kind: "audit" };
163
+ return { repository: options.get("--repo"), selector, maxFiles, maxBytes };
164
+ }
165
+
166
+ async function runAuthorityInvocation(args) {
167
+ const parsed = parseAuthorityArguments(args);
168
+ if (parsed === null) return writeAuthorityRefusal("CODE_USAGE", "invalid code authority command arguments", 2);
169
+ try {
170
+ const result = await queryCodeAuthority(parsed);
171
+ const response = completedCodeAuthorityResponse(result);
172
+ const rendered = renderCodeAuthorityResponse(response, parsed.maxBytes);
173
+ if (rendered === null) {
174
+ const refusal = serializeCodeAuthorityResponse(refusedCodeAuthorityResponse(
175
+ "CODE_AUTHORITY_OUTPUT_BUDGET",
176
+ "max-bytes cannot contain the complete code authority response",
177
+ ));
178
+ if (Buffer.byteLength(refusal, "utf8") > parsed.maxBytes) {
179
+ throw new Error("minimum code authority response budget cannot contain its refusal envelope");
180
+ }
181
+ process.stdout.write(refusal);
182
+ return 1;
183
+ }
184
+ process.stdout.write(rendered);
185
+ return response.status === "findings" ? 1 : 0;
186
+ } catch (error) {
187
+ if (error instanceof CodeAuthorityFailure) {
188
+ return writeAuthorityRefusal(error.code, error.message, error.exitCode);
189
+ }
190
+ return writeAuthorityRefusal("CODE_AUTHORITY_INTERNAL", "code authority query failed unexpectedly", 2);
191
+ }
192
+ }
193
+
194
+ export async function runCodeInvocation(args, commandIndex) {
195
+ const operation = args[commandIndex + 1];
196
+ if (!parseLeadingGlobals(args, commandIndex)) {
197
+ return operation === "authority"
198
+ ? writeAuthorityRefusal("CODE_USAGE", "invalid code authority command arguments", 2)
199
+ : writeRefusal("CODE_USAGE", "invalid code command arguments", 2);
200
+ }
201
+ if (operation === "authority") return runAuthorityInvocation(args.slice(commandIndex + 1));
202
+ const parsed = parseContextArguments(args.slice(commandIndex + 1));
203
+ if (parsed === null) return writeRefusal("CODE_USAGE", "invalid code command arguments", 2);
204
+ try {
205
+ const { maxBytes, ...request } = parsed;
206
+ const { scope, projection } = await contextForTypeScript(request);
207
+ const rendered = renderContextResponse({ scope, projection, maxBytes });
208
+ if (rendered === null) {
209
+ const response = serializeCodeResponse(refusedCodeResponse(
210
+ "CODE_OUTPUT_BUDGET",
211
+ "max-bytes cannot contain the mandatory code context response",
212
+ ));
213
+ if (Buffer.byteLength(response, "utf8") > maxBytes) {
214
+ throw new Error("minimum code response budget cannot contain its refusal envelope");
215
+ }
216
+ process.stdout.write(response);
217
+ return 1;
218
+ }
219
+ process.stdout.write(rendered.text);
220
+ return 0;
221
+ } catch (error) {
222
+ if (error instanceof CodeContextFailure) return writeRefusal(error.code, error.message, 2);
223
+ return writeRefusal("CODE_INTERNAL", "code context failed unexpectedly", 2);
224
+ }
225
+ }
@@ -1,5 +1,6 @@
1
1
  import path from "node:path";
2
2
 
3
+ import { PROJECT_LOCAL_CLI_INVOCATION } from "../constants.mjs";
3
4
  import {
4
5
  integrateEntrypoints,
5
6
  pathExists,
@@ -65,8 +66,8 @@ export async function runStart(args) {
65
66
  entrypoints,
66
67
  next: [
67
68
  "Author project-owned canonical authority under .nimi/spec using only *.authority.yaml or *.authority.md.",
68
- "Run nimicoding authority fmt on each changed authority file.",
69
- "Run nimicoding authority check .nimi/spec on the complete canonical root.",
69
+ `Run ${PROJECT_LOCAL_CLI_INVOCATION} authority fmt on each changed authority file.`,
70
+ `Run ${PROJECT_LOCAL_CLI_INVOCATION} authority check .nimi/spec on the complete canonical root.`,
70
71
  ],
71
72
  };
72
73