frontend-project-context 1.6.0 → 1.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 (60) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +101 -48
  3. package/UPGRADING.md +30 -1
  4. package/docs/05-ACCEPTANCE-CONTRACT.md +20 -1
  5. package/docs/08-INSTALLATION-AND-DISTRIBUTION.md +62 -22
  6. package/docs/14-FORMAL-RELEASE-READINESS.md +9 -5
  7. package/docs/19-POST-1.3.1-AI-TAKEOVER-EVIDENCE-AND-UPGRADE-PLAN.md +5 -5
  8. package/docs/20-PHASE-A-AI-TAKEOVER-AND-HEALTH-CLOSURE-DESIGN.md +11 -11
  9. package/docs/22-PHASE-C-TARGET-UPGRADE-PROTOCOL-DESIGN.md +4 -4
  10. package/docs/23-ADAPTIVE-BOUNDED-TASK-CONTEXT-DESIGN.md +432 -0
  11. package/docs/24-A130-REAL-HOST-TARGET-PROJECT-COMPARISON.md +210 -0
  12. package/docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md +409 -0
  13. package/docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md +609 -0
  14. package/docs/27-TEAM-SHARED-CONTEXT-DIRECTION-DISCUSSION.md +30 -0
  15. package/docs/28-REAL-PROJECT-ONBOARDING-CLOSURE-DESIGN.md +534 -0
  16. package/docs/AI-PROJECT-INITIALIZATION.md +89 -0
  17. package/docs/README.md +34 -6
  18. package/docs/USER-AND-AI-OPERATION-MANUAL.md +87 -40
  19. package/examples/README.md +6 -6
  20. package/examples/package.json +1 -1
  21. package/migration-manifest.json +42 -8
  22. package/package.json +2 -2
  23. package/schemas/adaptive-context-bundle.schema.json +70 -0
  24. package/schemas/capabilities.schema.json +37 -8
  25. package/schemas/context-query.schema.json +69 -0
  26. package/schemas/coverage-audit.schema.json +32 -0
  27. package/schemas/evidence-bundle.schema.json +2 -2
  28. package/schemas/host-promotion-evidence.schema.json +33 -0
  29. package/schemas/initialization-instruction.schema.json +60 -0
  30. package/schemas/migration-manifest.schema.json +3 -3
  31. package/schemas/migration-plan.schema.json +2 -2
  32. package/schemas/project-status.schema.json +5 -4
  33. package/schemas/projection-lock.schema.json +1 -1
  34. package/schemas/routing-index.schema.json +58 -0
  35. package/schemas/truth-reconciliation-input.schema.json +60 -0
  36. package/schemas/truth-reconciliation-review-bundle.schema.json +155 -0
  37. package/schemas/upgrade-assessment.schema.json +2 -2
  38. package/schemas/upgrade-result-bundle.schema.json +1 -1
  39. package/src/project-context/a130-evaluation.mjs +91 -0
  40. package/src/project-context/adaptive-context-schema.mjs +392 -0
  41. package/src/project-context/adaptive-context.mjs +547 -0
  42. package/src/project-context/ai-entry.mjs +11 -9
  43. package/src/project-context/assist.mjs +4 -2
  44. package/src/project-context/capabilities.mjs +32 -0
  45. package/src/project-context/checker.mjs +4 -3
  46. package/src/project-context/cli.mjs +55 -5
  47. package/src/project-context/contract-schema.mjs +1 -1
  48. package/src/project-context/discovery.mjs +7 -7
  49. package/src/project-context/exchange-schema.mjs +6 -5
  50. package/src/project-context/initialization-instruction.mjs +42 -0
  51. package/src/project-context/maintenance.mjs +2 -2
  52. package/src/project-context/migration-manifest.mjs +7 -5
  53. package/src/project-context/project-status.mjs +14 -3
  54. package/src/project-context/project-store.mjs +27 -2
  55. package/src/project-context/renderer.mjs +75 -1
  56. package/src/project-context/source-reader.mjs +63 -30
  57. package/src/project-context/task-context.mjs +14 -2
  58. package/src/project-context/truth-reconciliation-schema.mjs +488 -0
  59. package/src/project-context/truth-reconciliation.mjs +543 -0
  60. package/src/project-context/upgrade-schema.mjs +5 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.0 - Unreleased
4
+
5
+ - Add the package-owned `docs/AI-PROJECT-INITIALIZATION.md` as the only normative Host initialization procedure and expose it through read-only `instructions --json|--prompt` plus capabilities discovery.
6
+ - Resolve and freeze `targetRoot`, forbid parent-project truth discovery and outside symlink evidence, and keep Provider, Agent Runtime, Git, network, package mutation, business-code writes, automatic approval, and publication outside the runtime.
7
+ - Upgrade capabilities / Exchange Protocol to 8, add initialization-instruction schema 1, and upgrade project-status to schema 2 with independent `contractReadiness` and `compile-task-context` routing.
8
+ - Upgrade AI Entry to renderer 4 so clean status still requires task/path context, actual item IDs/scopes/read targets, and fail-closed onboarding/context gaps before source development.
9
+ - Reuse create-only proposals, atomic multi-item `approveProposal`, managed-region CAS, final entry digest binding, and the existing scope compiler; add no new persistent store, universal apply command, or business-file writer.
10
+ - Add O-01 through O-12 deterministic local acceptance. Real-project memoryless Host acceptance and publication remain separate blocking gates.
11
+
12
+ ## 1.7.0 - Unreleased
13
+
14
+ - Generate human-readable AI Entry and discovery statements in Chinese while preserving English machine IDs, subjects, commands, markers, JSON fields, and enums; AI Entry renderer 3 also fixes the cross-platform offline project-local CLI invocation, while existing renderer 1/2 regions require an explicit owned republish instead of being silently rewritten.
15
+ - Pin README, examples, and release acceptance to `frontend-project-context@1.7.0`; install the exact development dependency before persistent setup, fail closed when the local CLI is absent, and document fresh reinitialization without losing human-authored rules.
16
+ - Complete the reviewed docs/26 local repair: Context Query, Adaptive Context Bundle, Routing Index, Truth Reconciliation Input, and Truth Reconciliation Review Bundle are schema 2; selector, capabilities, and Exchange Protocol are version 2/7/7.
17
+ - Bind adaptive delivery to effective scope, task lineage, audited delivery items, monotonic expansion, and separate audit/delivery/read-target budgets; withhold all model content whenever task delivery is not ready.
18
+ - Add a task-only renderer that deduplicates shared items and omits source locators while leaving persistent renderer 3 and managed projection bytes unchanged.
19
+ - Add previous-Review-bound truth resolution contracts, structured human/external-fix paths, stable finding digests, and recomputed open/deferred/resolved/rejected outcomes without adding write authority.
20
+ - Pass A-130D-01 through A-130D-31, A-130T-01 through A-130T-10, and all existing regressions: 194/194 locally. Provider revalidation and release remain unauthorized.
21
+ - Initially add strict Host Promotion Evidence, Truth Reconciliation Input, and Truth Reconciliation Review Bundle schema 1 plus read-only `reconcile-truth` for current-baseline branch/source/item/subject collision review.
22
+ - Bind QA/preproduction evidence to Host-asserted code, source, artifact, acceptance-suite, and Project Context digests; separate reusable local evidence from required integration verification.
23
+ - Give every finding exact affected source/item/subject/scope sets, task-vs-existing-delivery blocking, human roles, deterministic preview invocations, and finite recomputation paths.
24
+ - Verify truth-reconciliation current source/item views against the live stores, block stale candidate snapshots, bind promotion evidence to the current acceptance suite and Project Context snapshots, and publish an exact Review Bundle schema.
25
+ - The initial truth-reconciliation slice upgraded capabilities and Exchange Protocol to 6 without changing stores or Action Plan/Review Bundle schemas; it passed A-131 through A-143, four protocol regressions, A-130R, and all then-existing regressions, 153/153 total.
26
+ - Add read-only `context-query` and `coverage-audit`, plus preview-by-default `index-context` whose only explicit write is a disposable derived Routing Index.
27
+ - Add Context Query, Adaptive Context Bundle, Routing Index, and Coverage Audit schema 1; upgrade capabilities and Exchange Protocol to 5 while existing store and Action/Review schemas remain unchanged.
28
+ - Hydrate all applicable policy/validation items, route fact/reference items by original task text/topics after scope narrowing, preserve provenance/conflict closures, and fail closed at hard UTF-8/read-target budgets.
29
+ - Separate registration coverage, Contract coverage, freshness, task health, and global health; reject stale indexes and digest-bind incremental expansion without resending prior bodies.
30
+ - Reuse source digest/body reads within one command and share the adaptive selector with `stage-context` without adding Provider, Agent Runtime, Git, network, dependency, business-code write, or automatic approval behavior.
31
+ - Establish the initial A-115 through A-129 local baseline at 135/135 before the later A-130R and truth-reconciliation expansion to 153/153.
32
+ - Repair the known A-130 input-envelope difference locally with a digest-bound `context-query --prompt` projection and deterministic complete-context fallback whenever the complete prompt is no larger than the review envelope. The authorized real Host/Provider revalidation reduced the adaptive first prompt to 5,283 bytes but still scored 7/8 against the full arm's 8/8; further remediation is required and release remains blocked.
33
+
3
34
  ## 1.6.0 - 2026-09-11
4
35
 
5
36
  - Add read-only `upgrade-check` and `upgrade-plan`, plus preview-by-default `upgrade-apply` with explicit `--write` for one compiled product-owned migration unit.
package/README.md CHANGED
@@ -32,33 +32,40 @@ It does **not** call an AI provider, edit business code, manage Git, install dep
32
32
  Pin it as a development dependency so local users and CI run the same version:
33
33
 
34
34
  ```bash
35
- npm install --save-dev frontend-project-context@1.6.0
35
+ npm install --save-dev frontend-project-context@1.8.0
36
36
  ```
37
37
 
38
38
  The package has zero runtime dependencies.
39
39
 
40
- `1.6.0` is the current release line and includes the cumulative `1.4.0` status/takeover, `1.5.0` evidence, and `1.6.0` target-upgrade protocols.
40
+ `1.8.0` is the Real Project Onboarding Closure release. It adds one package-owned Host initialization instruction, capabilities schema / Exchange Protocol 8, project-status schema 2 with independent Contract readiness, and AI Entry renderer 4. Local O-01 through O-12, the complete regression suite, and an isolated real-project memoryless Host acceptance form its release gate.
41
41
 
42
42
  ### Quick start
43
43
 
44
- Every host can begin with one read-only status command, including before initialization:
44
+ Every initializing Host begins by loading the package's single normative instruction and resolved target root:
45
45
 
46
46
  ```bash
47
- npx project-context status --project . --json
47
+ npm exec --offline -- project-context instructions --project . --prompt
48
+ npm exec --offline -- project-context status --project . --json
48
49
  ```
49
50
 
51
+ The only initialization procedure is [AI Project Initialization](./docs/AI-PROJECT-INITIALIZATION.md). The examples below document individual governance primitives; they are not a second initialization workflow and must not be composed in place of that instruction.
52
+
53
+ All `npm exec --offline -- project-context` commands below require the exact development dependency installed above. `--offline` makes a missing local binary fail closed instead of downloading the unrelated `project-context` package from a configured registry.
54
+
50
55
  `status` classifies uninitialized, partial, invalid, attention, clean, and ownership-conflict states without reading business source bodies or writing project files. After initialization, publish a fixed startup route into a managed region of root `AGENTS.md` while preserving all human content outside that region:
51
56
 
52
57
  ```bash
53
- npx project-context publish-entry --project . --output AGENTS.md --write --json
58
+ npm exec --offline -- project-context publish-entry --project . --output AGENTS.md --write --json
54
59
  ```
55
60
 
61
+ The `1.8.0` AI Entry renderer 4 requires every clean-state real task to compile task/path context and consume actual Contract item IDs, scopes, and read targets before source development. Existing renderer-1/2/3 entries remain readable but become stale and require an explicit owned republish; no entry is rewritten automatically.
62
+
56
63
  Use `remove-entry` with the same output to remove only a trusted managed region. Plans and previews never include `--write`; human approval of the exact path remains required.
57
64
 
58
65
  Let an existing Coding Agent prepare deterministic onboarding candidates:
59
66
 
60
67
  ```bash
61
- npx project-context setup \
68
+ npm exec --offline -- project-context setup \
62
69
  --project . \
63
70
  --id my-project \
64
71
  --name "My Project" \
@@ -68,10 +75,12 @@ npx project-context setup \
68
75
 
69
76
  `setup` creates only the three stores and a create-only proposal. It does not approve candidates or publish Agent files. Its JSON `artifacts` receipt reports the exact proposal path and whether it was previewed, created, or already unchanged. Read `summary`, `workUnits`, and `readTargets`, then review the exact proposed IDs.
70
77
 
78
+ `setup` is idempotent for an initialized project; it does not reset stores or translate already approved statements. Before an explicitly authorized fresh reinitialization, preserve every human-authored policy, validation description, manual source, and approval decision. Remove only a trusted managed AI Entry, clean up the exact disposable Project Context files externally, rerun setup from the installed package, then re-author and reapprove the preserved rules.
79
+
71
80
  Register an explicit source:
72
81
 
73
82
  ```bash
74
- npx project-context register \
83
+ npm exec --offline -- project-context register \
75
84
  --project . \
76
85
  --id source.package \
77
86
  --kind file \
@@ -82,7 +91,7 @@ npx project-context register \
82
91
  Propose a scoped contract item. This creates a reviewable proposal; it does not approve it:
83
92
 
84
93
  ```bash
85
- npx project-context propose \
94
+ npm exec --offline -- project-context propose \
86
95
  --project . \
87
96
  --id policy.ui-copy \
88
97
  --kind policy \
@@ -99,7 +108,7 @@ npx project-context propose \
99
108
  Approve only the item you reviewed:
100
109
 
101
110
  ```bash
102
- npx project-context approve \
111
+ npm exec --offline -- project-context approve \
103
112
  --project . \
104
113
  --proposal .project-context/policy.ui-copy.proposal.json \
105
114
  --ids policy.ui-copy \
@@ -110,14 +119,25 @@ npx project-context approve \
110
119
  Compile context for a target and check for drift:
111
120
 
112
121
  ```bash
113
- npx project-context context --project . --path src --locale en
114
- npx project-context check --project .
122
+ npm exec --offline -- project-context context --project . --path src --locale en
123
+ npm exec --offline -- project-context check --project .
115
124
  ```
116
125
 
126
+ For task-sensitive routing, save a schema-1 Context Query with the current snapshots and run:
127
+
128
+ ```bash
129
+ npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --json
130
+ npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --prompt
131
+ npm exec --offline -- project-context coverage-audit --project . --json
132
+ npm exec --offline -- project-context index-context --project . --json
133
+ ```
134
+
135
+ `context-query --json` returns the auditable machine bundle. `--prompt` returns its digest-bound, model-facing Markdown projection without the deferred/review envelope. When the complete applicable Context is no larger than the machine review bundle, the projection deterministically falls back to the complete Context; otherwise it uses the selected evidence closure. `index-context` is read-only unless `--write` is explicit; its persisted output is disposable derived data.
136
+
117
137
  After project sources or implementation paths change, create one read-only reconciliation work unit:
118
138
 
119
139
  ```bash
120
- npx project-context sync \
140
+ npm exec --offline -- project-context sync \
121
141
  --project . \
122
142
  --changed-path src/example.ts \
123
143
  --json
@@ -128,13 +148,13 @@ npx project-context sync \
128
148
  Discover the exchange contract without initializing the project:
129
149
 
130
150
  ```bash
131
- npx project-context capabilities --project . --json
151
+ npm exec --offline -- project-context capabilities --project . --json
132
152
  ```
133
153
 
134
154
  An external AI host can create an Action Plan schema 2 using the returned project snapshots and one of the ten advertised action kinds. Schema-1 plans remain readable. Save that short-lived plan inside the project, then produce a read-only Review Bundle:
135
155
 
136
156
  ```bash
137
- npx project-context preflight \
157
+ npm exec --offline -- project-context preflight \
138
158
  --project . \
139
159
  --plan .project-context/action-plan.json \
140
160
  --json
@@ -145,7 +165,7 @@ npx project-context preflight \
145
165
  For multi-stage feature work, a host can provide a Task Context Plan, prior Stage Receipts, and explicit changed-path signals. Compile only the requested stage:
146
166
 
147
167
  ```bash
148
- npx project-context stage-context \
168
+ npm exec --offline -- project-context stage-context \
149
169
  --project . \
150
170
  --plan task-context-plan.json \
151
171
  --stage stage-render \
@@ -158,7 +178,7 @@ npx project-context stage-context \
158
178
  Before an external merge, compare host-provided main/branch path signals with the plan, receipts, current Contract snapshots, and checker findings:
159
179
 
160
180
  ```bash
161
- npx project-context integration-review \
181
+ npm exec --offline -- project-context integration-review \
162
182
  --project . \
163
183
  --plan task-context-plan.json \
164
184
  --receipt stage-understand.receipt.json \
@@ -175,7 +195,7 @@ Starting with `1.3.1`, every supplied Stage Receipt must have exactly one matchi
175
195
  To turn an already-redacted local observation into a deterministic Evidence Bundle, keep the input JSON inside the project and run:
176
196
 
177
197
  ```bash
178
- npx project-context evidence --project . --input evidence-input.json --json
198
+ npm exec --offline -- project-context evidence --project . --input evidence-input.json --json
179
199
  ```
180
200
 
181
201
  `evidence` reads only the supplied input plus Project Context health metadata, writes nothing, and never uploads. It excludes project identity, paths, source bodies, logs, and Contract values by structure. The two summary fields remain free text, so every bundle is permanently marked `human-review-required`; a person decides whether and where to transfer it.
@@ -183,20 +203,20 @@ npx project-context evidence --project . --input evidence-input.json --json
183
203
  After a human and the Host pin an exact target package version outside this product, assess the project-owned migration surface and create one digest-bound work unit:
184
204
 
185
205
  ```bash
186
- npx project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
187
- npx project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
188
- npx project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
189
- npx project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
206
+ npm exec --offline -- project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
207
+ npm exec --offline -- project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
208
+ npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
209
+ npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
190
210
  ```
191
211
 
192
212
  `upgrade-check` and `upgrade-plan` are permanently read-only. `upgrade-apply` previews by default and can write only the single compiled, product-owned unit shown in that exact plan. Re-run check and plan after every unit. Even `coreMigration: complete` still requires the Host to verify dependency/lockfile pins, project tests or CI, and an independent new window. The product does not run a package manager, Git, network, project tests, business writes, automatic approval, rollback, or publication.
193
213
 
194
- The package publishes sixteen machine schemas, including capabilities, project status, projection lock 1/2, Migration Manifest 2, Upgrade Assessment/Migration Plan/Upgrade Result Bundle 1, Evidence Input/Bundle, Assist/Action/Review bundles, and the four staged-context schemas.
214
+ The package publishes twenty machine schemas, including capabilities 7, project status, projection lock 1/2, Migration Manifest 2, Upgrade Assessment/Migration Plan/Upgrade Result Bundle 1, Evidence Input/Bundle, Assist/Action/Review bundles, the four staged-context schemas, Context Query/Adaptive Context Bundle/Routing Index 2, and Coverage Audit 1.
195
215
 
196
216
  Generate the read-only governance dashboard:
197
217
 
198
218
  ```bash
199
- npx project-context dashboard --project . > project-context-dashboard.html
219
+ npm exec --offline -- project-context dashboard --project . > project-context-dashboard.html
200
220
  ```
201
221
 
202
222
  The dashboard is a self-contained offline HTML file. The command writes only to stdout and does not open a browser or change the contract.
@@ -245,19 +265,23 @@ All commands are read-only unless that command explicitly includes `--write`. So
245
265
  | `propose` | Author a fact, policy, reference, or validation description |
246
266
  | `approve` | Explicitly approve selected proposal IDs |
247
267
  | `context` | Compile approved context for one or more paths |
268
+ | `context-query` | Compile adaptive review JSON or its compact model-facing `--prompt` projection with complete-context fallback |
269
+ | `coverage-audit` | Audit declared registration coverage without claiming all project truth |
270
+ | `index-context` | Preview or explicitly persist a disposable routing index |
248
271
  | `publish` | Write an owned AGENTS, Markdown, or Ruler projection |
249
272
  | `check` | Detect stale sources, contracts, and projections |
250
273
  | `sync` | Aggregate source drift, item impact, changed paths, and reconciliation work units |
251
274
  | `preflight` | Validate an Action Plan and return a read-only grouped Review Bundle |
252
275
  | `stage-context` | Rebuild receipt/bundle inputs and compile the explicitly requested stage within caller-provided byte/read-target budgets |
253
276
  | `integration-review` | Review paired receipts/bundles, host path signals, baselines, and context-layer conflicts without Git |
277
+ | `reconcile-truth` | Reconcile explicit branch/promotion evidence against the current truth baseline without reading Git or CI |
254
278
  | `dashboard` | Render the read-only governance dashboard |
255
279
  | `review-source` | Review a changed source and its exact impact set |
256
280
  | `accept-source-change` | Accept a pinned source digest and revoke affected approvals |
257
281
  | `revise` / `deprecate` | Maintain contract items explicitly |
258
282
  | `deprecate-source` | Retire an unreferenced source with an audit record |
259
283
 
260
- Run `npx project-context --help` for the complete command syntax.
284
+ Run `npm exec --offline -- project-context --help` for the complete command syntax.
261
285
 
262
286
  ### Documentation
263
287
 
@@ -273,6 +297,8 @@ Run `npx project-context --help` for the complete command syntax.
273
297
  - [AI exchange boundary](./docs/17-AI-EXCHANGE-BOUNDARY-DESIGN.md)
274
298
  - [Branch-aware staged context and handoff](./docs/18-BRANCH-AWARE-STAGED-CONTEXT-DESIGN.md)
275
299
  - [Evidence Feedback Protocol](./docs/21-PHASE-B-EVIDENCE-FEEDBACK-PROTOCOL-DESIGN.md)
300
+ - [Real-project source-of-truth maintenance design](./docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md)
301
+ - [A-130 quality closure and adaptive delivery repair](./docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md)
276
302
  - [Upgrade notes](./UPGRADING.md)
277
303
 
278
304
  ## 中文
@@ -301,33 +327,40 @@ AI 编程工具通常只读取仓库的一部分,而项目约定分散在文
301
327
  建议固定为开发依赖,让本地与 CI 使用同一版本:
302
328
 
303
329
  ```bash
304
- npm install --save-dev frontend-project-context@1.6.0
330
+ npm install --save-dev frontend-project-context@1.8.0
305
331
  ```
306
332
 
307
333
  本包没有运行时第三方依赖。
308
334
 
309
- `1.3.1` 仍是已核验的 npm 公开版本。当前仓库包含本地已实现的 `1.6.0` 候选;公开发布仍需单独授权。
335
+ `1.8.0` Real Project Onboarding Closure 正式版本:新增包内唯一 Host 初始化指令、capabilities schema / Exchange Protocol 8、带独立 Contract readiness 的 project-status schema 2,以及 AI Entry renderer 4。本地 O-01 至 O-12、完整回归与隔离真实项目的无历史 Host 接管共同构成发布门。
310
336
 
311
337
  ### 快速开始
312
338
 
313
- 任何宿主都可以先运行同一条只读状态命令,包括尚未初始化的项目:
339
+ 执行初始化的 Host 必须先读取包内唯一规范和 resolved targetRoot:
314
340
 
315
341
  ```bash
316
- npx project-context status --project . --json
342
+ npm exec --offline -- project-context instructions --project . --prompt
343
+ npm exec --offline -- project-context status --project . --json
317
344
  ```
318
345
 
346
+ 唯一初始化流程见 [AI Project Initialization](./docs/AI-PROJECT-INITIALIZATION.md)。下文命令只解释各治理原语,不构成另一套初始化步骤,也不能替代该指令由 Host 自行拼装流程。
347
+
348
+ 以下所有 `npm exec --offline -- project-context` 命令都要求先安装上面的精确开发依赖。`--offline` 会在本地 CLI 缺失时失败封闭,避免从配置的 registry 下载无关的同名 `project-context` 包。
349
+
319
350
  `status` 在不读取业务源码正文、不写项目文件的前提下分类 uninitialized、partial、invalid、attention、clean 和所有权冲突。初始化后,可把固定启动路由发布到根 `AGENTS.md` 的受管区域,同时完整保留区域外人工内容:
320
351
 
321
352
  ```bash
322
- npx project-context publish-entry --project . --output AGENTS.md --write --json
353
+ npm exec --offline -- project-context publish-entry --project . --output AGENTS.md --write --json
323
354
  ```
324
355
 
356
+ `1.8.0` 的 AI Entry renderer 4 要求 clean 状态下的真实任务先编译 task/path context,消费实际命中的 Contract item IDs、scope 和 read targets,之后才能进入源码。既有 renderer 1/2/3 入口仍可读取但会标记 stale,只有显式受管 republish 才会升级,不会自动重写。
357
+
325
358
  使用相同 output 的 `remove-entry` 只移除可信受管区域。计划与 preview 都不含 `--write`,仍需人对精确路径授权。
326
359
 
327
360
  让现有 Coding Agent 生成确定性的首次接入候选:
328
361
 
329
362
  ```bash
330
- npx project-context setup \
363
+ npm exec --offline -- project-context setup \
331
364
  --project . \
332
365
  --id my-project \
333
366
  --name "My Project" \
@@ -337,10 +370,12 @@ npx project-context setup \
337
370
 
338
371
  `setup` 只创建三个 store 和一份 create-only proposal,不会批准候选或发布 Agent 文件。JSON 中的 `artifacts` receipt 会返回精确 proposal 路径,以及 preview、create 或 unchanged 结果。先读取 `summary`、`workUnits` 和 `readTargets`,再审查具体 proposal ID。
339
372
 
373
+ `setup` 对已初始化项目是幂等操作,不会重置 store,也不会翻译已经批准的 statement。明确授权全新初始化前,必须先保留所有人工 policy、validation-description、手工 source 和批准决定;只移除可信受管 AI Entry,再由外部精确清理可丢弃的 Project Context 文件,使用已安装包重新 setup,最后重新录入并批准所保留的人工规则。
374
+
340
375
  登记一个明确来源:
341
376
 
342
377
  ```bash
343
- npx project-context register \
378
+ npm exec --offline -- project-context register \
344
379
  --project . \
345
380
  --id source.package \
346
381
  --kind file \
@@ -351,7 +386,7 @@ npx project-context register \
351
386
  提出一条带作用域的合同项。这里只生成待审 proposal,不会自动批准:
352
387
 
353
388
  ```bash
354
- npx project-context propose \
389
+ npm exec --offline -- project-context propose \
355
390
  --project . \
356
391
  --id policy.ui-copy \
357
392
  --kind policy \
@@ -368,7 +403,7 @@ npx project-context propose \
368
403
  人工审查后,只批准明确选中的 item:
369
404
 
370
405
  ```bash
371
- npx project-context approve \
406
+ npm exec --offline -- project-context approve \
372
407
  --project . \
373
408
  --proposal .project-context/policy.ui-copy.proposal.json \
374
409
  --ids policy.ui-copy \
@@ -379,14 +414,25 @@ npx project-context approve \
379
414
  为目标目录生成上下文,并检查漂移:
380
415
 
381
416
  ```bash
382
- npx project-context context --project . --path src --locale zh-CN
383
- npx project-context check --project .
417
+ npm exec --offline -- project-context context --project . --path src --locale zh-CN
418
+ npm exec --offline -- project-context check --project .
384
419
  ```
385
420
 
421
+ 需要按任务路由上下文时,把当前 snapshot 写入 schema 2 Context Query,再运行:
422
+
423
+ ```bash
424
+ npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --json
425
+ npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --prompt
426
+ npm exec --offline -- project-context coverage-audit --project . --json
427
+ npm exec --offline -- project-context index-context --project . --json
428
+ ```
429
+
430
+ `context-query --json` 返回可审计的机器 Bundle,`--prompt` 只返回与 digest 绑定的模型面向 Markdown,不把 deferred/review 包络或 source locator 发给模型。完整 Context 在 delivery soft threshold 内或不大于 adaptive 正文时优先;非 ready 交付 stdout 为空。`index-context` 默认只读;只有显式 `--write` 才保存可删除、可重建的派生索引。
431
+
386
432
  项目来源或实现路径变化后,可一次生成只读的增量维护工作单元:
387
433
 
388
434
  ```bash
389
- npx project-context sync \
435
+ npm exec --offline -- project-context sync \
390
436
  --project . \
391
437
  --changed-path src/example.ts \
392
438
  --json
@@ -397,13 +443,13 @@ npx project-context sync \
397
443
  无需初始化项目即可查询双向交换协议:
398
444
 
399
445
  ```bash
400
- npx project-context capabilities --project . --json
446
+ npm exec --offline -- project-context capabilities --project . --json
401
447
  ```
402
448
 
403
449
  外部 AI 宿主可使用返回的三个项目 snapshot 和十类 action 生成 Action Plan schema 2;schema-1 plan 仍可读取。把这份短生命周期计划保存在项目内,再生成只读 Review Bundle:
404
450
 
405
451
  ```bash
406
- npx project-context preflight \
452
+ npm exec --offline -- project-context preflight \
407
453
  --project . \
408
454
  --plan .project-context/action-plan.json \
409
455
  --json
@@ -414,7 +460,7 @@ npx project-context preflight \
414
460
  多阶段功能开发中,宿主可以显式提供 Task Context Plan、前序 Stage Receipt 和 changed-path 信号,只编译当前指定阶段:
415
461
 
416
462
  ```bash
417
- npx project-context stage-context \
463
+ npm exec --offline -- project-context stage-context \
418
464
  --project . \
419
465
  --plan task-context-plan.json \
420
466
  --stage stage-render \
@@ -427,7 +473,7 @@ npx project-context stage-context \
427
473
  外部合并前,可把宿主提供的 main/branch 路径信号与 plan、receipt、当前 Contract snapshot 和 checker finding 一起进行只读审查:
428
474
 
429
475
  ```bash
430
- npx project-context integration-review \
476
+ npm exec --offline -- project-context integration-review \
431
477
  --project . \
432
478
  --plan task-context-plan.json \
433
479
  --receipt stage-understand.receipt.json \
@@ -444,7 +490,7 @@ npx project-context integration-review \
444
490
  要把一次已经脱敏的本地观察收敛为确定性 Evidence Bundle,请把输入 JSON 保持在项目内并运行:
445
491
 
446
492
  ```bash
447
- npx project-context evidence --project . --input evidence-input.json --json
493
+ npm exec --offline -- project-context evidence --project . --input evidence-input.json --json
448
494
  ```
449
495
 
450
496
  `evidence` 只读取这份输入和 Project Context 健康元数据,不写文件,也不上传;项目身份、路径、来源正文、日志和 Contract value 按结构排除。两个 summary 仍是自由文本,因此所有 bundle 永远标记为 `human-review-required`,由人决定是否以及向谁转交。
@@ -452,20 +498,20 @@ npx project-context evidence --project . --input evidence-input.json --json
452
498
  在人和 Host 已于产品边界外把依赖固定到精确目标版本后,可以评估产品自有迁移面,并生成一个 digest 绑定的工作单元:
453
499
 
454
500
  ```bash
455
- npx project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
456
- npx project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
457
- npx project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
458
- npx project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
501
+ npm exec --offline -- project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
502
+ npm exec --offline -- project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
503
+ npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
504
+ npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
459
505
  ```
460
506
 
461
507
  `upgrade-check` 与 `upgrade-plan` 永久只读;`upgrade-apply` 默认 preview,只有显式 `--write` 才能执行该 plan 展示的一个已编译、产品自有单元。每个单元后必须重新 check/plan。即使 `coreMigration: complete`,Host 仍需核对依赖与 lockfile、运行项目测试或 CI,并用独立新窗口复核。产品不会执行包管理器、Git、网络、项目测试、业务写入、自动批准、回滚或发布。
462
508
 
463
- npm 包公开十六份机器 schema,包括 capabilities、project status、projection lock 1/2、Migration Manifest 2、Upgrade Assessment/Migration Plan/Upgrade Result Bundle 1、Evidence Input/Bundle、Assist/Action/Review Bundle 与四份 staged-context schema。
509
+ npm 包包含版本化机器 schema,包括 capabilities 8initialization instruction 1、project status 2、projection lock 1/2、Migration Manifest 2、Upgrade Assessment/Migration Plan/Upgrade Result Bundle 1、Evidence Input/Bundle、Assist/Action/Review Bundle、四份 staged-context schema、Context Query/Adaptive Context Bundle/Routing Index 2 与 Coverage Audit 1
464
510
 
465
511
  生成只读治理看板:
466
512
 
467
513
  ```bash
468
- npx project-context dashboard --project . > project-context-dashboard.html
514
+ npm exec --offline -- project-context dashboard --project . > project-context-dashboard.html
469
515
  ```
470
516
 
471
517
  看板是一个可离线打开的自包含 HTML。命令只输出到 stdout,不会自动打开浏览器,也不会修改合同。
@@ -505,6 +551,7 @@ npx project-context dashboard --project . > project-context-dashboard.html
505
551
 
506
552
  | 命令 | 用途 |
507
553
  | --- | --- |
554
+ | `instructions` | 读取包内唯一初始化指令并固定 resolved targetRoot |
508
555
  | `setup` | 聚合安全初始化、保守 discovery 和 Assist Bundle |
509
556
  | `capabilities` | 查询协议版本、schema、action kind、初始化状态和永久边界 |
510
557
  | `evidence` | 从项目内输入生成确定性、只读且需人工复核的 Evidence Bundle |
@@ -514,19 +561,23 @@ npx project-context dashboard --project . > project-context-dashboard.html
514
561
  | `propose` | 创建 fact、policy、reference 或 validation-description |
515
562
  | `approve` | 显式批准选中的 proposal ID |
516
563
  | `context` | 为一个或多个路径编译已批准上下文 |
564
+ | `context-query` | 编译自适应审查 JSON,或生成带完整上下文回退的紧凑 `--prompt` 模型投影 |
565
+ | `coverage-audit` | 审计声明范围内的来源登记覆盖,不宣称发现全部项目真源 |
566
+ | `index-context` | 预览或显式保存可删除的派生路由索引 |
517
567
  | `publish` | 写入仍归工具所有的 AGENTS、Markdown 或 Ruler 投影 |
518
568
  | `check` | 检测来源、合同和投影漂移 |
519
569
  | `sync` | 聚合来源漂移、item 影响、变化路径和维护工作单元 |
520
570
  | `preflight` | 验证 Action Plan 并返回只读分组 Review Bundle |
521
571
  | `stage-context` | 重建 receipt/bundle 输入,并在调用方字节/read-target 预算内编译显式指定的当前阶段 |
522
572
  | `integration-review` | 不读取 Git,只读审查成对 receipt/bundle、路径信号、baseline 与上下文冲突 |
573
+ | `reconcile-truth` | 不读取 Git/CI,将显式分支与晋升证据对当前真源基线做只读重算 |
523
574
  | `dashboard` | 生成只读治理看板 |
524
575
  | `review-source` | 查看来源变化及精确影响集 |
525
576
  | `accept-source-change` | 接受固定摘要并撤销受影响批准 |
526
577
  | `revise` / `deprecate` | 显式维护合同项 |
527
578
  | `deprecate-source` | 用审计记录退役已无引用的来源 |
528
579
 
529
- 运行 `npx project-context --help` 查看完整命令语法。
580
+ 运行 `npm exec --offline -- project-context --help` 查看完整命令语法。
530
581
 
531
582
  ### 深入文档
532
583
 
@@ -542,6 +593,8 @@ npx project-context dashboard --project . > project-context-dashboard.html
542
593
  - [AI 双向交换边界](./docs/17-AI-EXCHANGE-BOUNDARY-DESIGN.md)
543
594
  - [分支感知的分阶段上下文与交接](./docs/18-BRANCH-AWARE-STAGED-CONTEXT-DESIGN.md)
544
595
  - [Evidence Feedback Protocol](./docs/21-PHASE-B-EVIDENCE-FEEDBACK-PROTOCOL-DESIGN.md)
596
+ - [真实项目全量应用下的真源维护设计](./docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md)
597
+ - [A-130 质量闭环与自适应交付协议修订](./docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md)
545
598
  - [升级说明](./UPGRADING.md)
546
599
 
547
600
  ## License / 许可证
package/UPGRADING.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # 升级说明
2
2
 
3
+ ## `1.7.0 → 1.8.0`
4
+
5
+ `1.8.0` 新增只读 `instructions` 和唯一包内规范 `docs/AI-PROJECT-INITIALIZATION.md`;capabilities / Exchange Protocol 升至 8,新增 initialization-instruction schema 1;project-status 升至 schema 2,以 `contractReadiness` 独立区分 `not-initialized`、`contract-incomplete` 与 `contract-ready`;AI Entry 升至 renderer 4,clean 状态也必须先运行 task/path context 并消费实际 Contract。
6
+
7
+ Contract、source lock、proposal、projection lock 和普通 projection renderer 均不迁移。既有 AI Entry renderer 1/2/3 保持可读但会报告 stale;`upgrade-check --from-version 1.7.0` 可生成受当前 baseline 绑定的 `republish-ai-entry` 单元。初始化方法只以包内唯一指令为准;README、操作手册和 CLI help 只提供链接或发现入口。
8
+
9
+ 本地 O-01 至 O-12 和完整回归是实现门。升级或初始化后的真实无历史 Host 接管、目标项目访问、Provider、Git、网络与发布均不在本轮权限内。
10
+
11
+ ## `1.6.0 → 1.7.0`(本地实现,未发布)
12
+
13
+ `1.7.0` 新增只读 `context-query`、`coverage-audit`、`reconcile-truth`,以及默认 preview、只有显式 `--write` 才持久化可删除派生索引的 `index-context`。Context Query、Adaptive Context Bundle、Routing Index、Truth Reconciliation Input 与 Truth Reconciliation Review Bundle 当前写 schema 2,Coverage Audit 与 Host Promotion Evidence 保持 schema 1,capabilities / Exchange Protocol 升至 7;Contract、source lock、proposal、持久 renderer、Action Plan 与 Review Bundle 均不迁移。AI Entry 的人类可读文案改为中文,并固定 `npm exec --offline -- project-context` 的项目本地安全入口,renderer 从 1/2 升至 3;Projection Lock schema 仍为 2。
14
+
15
+ Migration Manifest 把 `1.6.0` 到中文 AI Entry renderer 3 的迁移记录为显式 `republish-ai-entry`。升级后应重新生成 capabilities、schema 2 Context Query/Adaptive Context Bundle/Truth Reconciliation 工件与 Coverage Audit;schema 1 Routing Index 可在内存中重建,schema 1 Adaptive Bundle/Truth Review 不得作为 previous 输入。既有 renderer 1/2 AI Entry 仍可读取但会报告 stale,工具只生成一个摘要绑定的 republish 单元,未经 `--write` 不修改 `AGENTS.md` 或 Projection Lock。这些派生、短生命周期或投影工件不得回写 Project Contract,也不授予任务执行权限。
16
+
17
+ 目标项目必须先由 Host 把依赖精确固定到 `frontend-project-context@1.7.0`,再使用 `npm exec --offline -- project-context` 执行升级或初始化;不能用可能回退到 registry 同名包的 `npx project-context`。`setup` 不是 reset/翻译命令:需要全新初始化时,先外部留存人工规则并安全移除受管 Entry,再经明确授权清理精确 store,最后从已安装包重建和重新批准。
18
+
19
+ ```bash
20
+ project-context upgrade-check --project . --from-version 1.6.0 --json
21
+ project-context index-context --project . --json
22
+ project-context index-context --project . --write --json
23
+ project-context coverage-audit --project . --json
24
+ project-context context-query --project . --input .project-context/context-query.json --json
25
+ project-context context-query --project . --input .project-context/context-query.json --prompt
26
+ project-context reconcile-truth --project . --input truth-reconciliation-input.json --json
27
+ project-context reconcile-truth --project . --input truth-reconciliation-resolution.json --previous-review truth-reconciliation-review.json --json
28
+ ```
29
+
30
+ `context-query --json` 返回可审计包络,`--prompt` 只返回 digest-bound 模型输入;默认只在当前证据闭包中校验相关来源,`strict-current` 或 `complete` 会回退到完整健康与覆盖审计。audit、delivery、read-target 预算独立,非 ready 交付不输出正文。`reconcile-truth` 严格核对 live source/item 基线、Project snapshots、acceptance suite 与 previous Review,只生成无权 Review Bundle。docs/26 本地实现和 194/194 回归已完成;历史真实 Host/Provider 复验仍因质量 7/8 对 8/8 而失败,新的 Provider 复验、Git 和发布仍未授权。
31
+
3
32
  ## `1.3.1 / 1.4.0 / 1.5.0 → 1.6.0`
4
33
 
5
34
  `1.6.0` 新增 Target Upgrade Protocol:Migration Manifest 升至 schema 2,新增 Upgrade Assessment、Migration Plan 与 Upgrade Result Bundle schema 1,并把 capabilities / Exchange Protocol 升至 4。Action Plan 与 Review Bundle 继续写 schema 2;Contract、source lock、proposal、projection lock 与 renderer 的目标版本不变。
@@ -31,7 +60,7 @@ assessment 与 plan 文件由 Host 保存到项目内 `.project-context/` 的非
31
60
 
32
61
  只安装新包且未写 AI Entry 时可仅回退包版本。第一次成功执行 `publish-entry --write` 才会把 `.project-context/projections.lock.json` 延迟转换为 schema 2;此后对 `1.3.1` reader 为 forward-only。如必须回到 `1.3.1`,需通过外部 Git 或备份同时恢复 `AGENTS.md` 与 projection lock,不能只降包版本。精确 reader/writer、consumer change 与 rollback class 见 `migration-manifest.json`。
33
62
 
34
- Action Plan 2 新增 `publish-ai-entry` 和 `remove-ai-entry`,但仍只是无权建议;Review Bundle 的 structured invocation 不含 `--write` 或 `--by`。`status.health: clean` 只证明 Project Context 治理层健康,不代表业务测试、Git 或发布状态。本仓库已完成本地实现与隔离验收,npm 发布仍需单独授权。
63
+ Action Plan 2 新增 `publish-ai-entry` 和 `remove-ai-entry`,但仍只是无权建议;Review Bundle 的 structured invocation 不含 `--write` 或 `--by`。`status.health: clean` 只证明 Project Context 治理层健康,不代表业务测试、Git 或发布状态。这些能力已随 `1.6.0` 发布到官方公共 npm,并完成候选/registry 逐字节一致性与全新安装复验。
35
64
 
36
65
  ## `1.3.0 → 1.3.1`
37
66
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 权威说明:本文记录核心引擎验收;完整 v1 完成定义以 [00-PRODUCT-CONSTITUTION.md](./00-PRODUCT-CONSTITUTION.md) 第 7 节为准。
4
4
 
5
- > 状态:`A-01 through A-114 plus B0-01/B0-02, CLI, machine schemas, and release artifacts passed locally; 120 tests total. Public npm latest remains independently verified at 1.3.1; 1.6.0 release is not authorized.`
5
+ > 状态:`A-01 through A-143, A-130R, A-130D-01 through A-130D-32, A-130T-01 through A-130T-10, protocol regressions, B0-01/B0-02, CLI, machine schemas, and release artifacts passed locally; 195 tests total. Bounded Host/Provider revalidation has not run and is not authorized. Public npm latest remains independently verified at 1.6.0; local 1.7.0 is release-blocked.`
6
6
 
7
7
  ## 1. 验收原则
8
8
 
@@ -425,3 +425,22 @@ A-39 是发布工件一致性验证,不扩展 Project Contract、CLI、schema
425
425
  `docs/22` 冻结的 A-101 至 A-114 已全部落为独立顶层测试:Manifest schema 2 严格性与运行时 registry 绑定、三个精确历史基线、初始化/健康阻断、Assessment 确定性、单步 Plan、preview/显式写、assessment/plan/target CAS、所有权与 renderer、注入失败/条件恢复、短期协议兼容分类、三类 rollback 语义、context 隔离、capabilities/exchange 4 及端到端 Host 边界。
426
426
 
427
427
  完整 `npm run check` 结果为 120/120:新增 14 项,既有 106 项无删除、跳过或弱化。验证只使用隔离临时 fixture;生产源码仍无第三方依赖、Provider、Agent Runtime、包管理器、Git、网络、项目测试执行、业务代码写入、自动批准、自动升级、自动回滚或发布行为。`coreMigration: complete` 仍固定要求 Host 完成 dependency/lockfile、项目测试或 CI 与独立新窗口验收。
428
+
429
+ ## 20. `1.7.0` Adaptive Bounded Task Context 验收(本地自动验收通过,A-130 真实 Host 复验失败)
430
+
431
+ `docs/23` 的 A-115 至 A-129 已落为 15 个独立顶层测试:多层 policy/validation 必选、软/硬预算、冲突闭包、Routing Index 过期/缺失回退、相关 source drift、sibling warning、signal-bound/strict freshness、source read 去重、digest-bound 增量扩展、task/topic 路由、Registration Coverage、required-item oracle 和隔离效率门槛。
432
+
433
+ 在 docs/26 统一修复前,本节初始实现的 `npm run check` 当时为 153/153:A-115 至 A-129、A-130R、A-131 至 A-143、四项 truth-protocol 回归及既有测试均无删除、跳过或弱化。第一次敌意路由 fixture 反证了“通用 path segment 可以直接作为语义命中”的实现解释,因此 selector 已修订为路径先约束 scope、原始 task text/topics 再选择 fact/reference。
434
+
435
+ A-130 于 `2026-09-12` 使用相同 Codex 模型、相同任务和只读 `dtg-tmc-pc` 执行首次对照,完整 Context 得到 8/8,Adaptive Context 得到 7/8。A-130R 随后分离审查 JSON 与模型 `--prompt`,并通过本地回归。获授权的同日真实 Host/Provider 复验重新运行两臂:完整臂仍为 8/8,自适应臂仍为 7/8,并再次对 `priceList[0]` 的既定方向语义产生假阳性;自适应首包虽从 14,466 降至 5,283 字节,但 input tokens、命令数、耗时与质量均未优于同轮完整臂。因此 A-130 严格复验失败。完整证据见 [24-A130-REAL-HOST-TARGET-PROJECT-COMPARISON.md](./24-A130-REAL-HOST-TARGET-PROJECT-COMPARISON.md)。153 项本地自动测试不因此改写为失败,但 `1.7.0` 发布继续被阻断。
436
+
437
+ ## 21. `1.7.0` A-130 Quality Closure 与 Truth Resolution Closure(本地实现通过)
438
+
439
+ [26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md](./26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md) 冻结的 A-130D-01 至 A-130D-32 与 A-130T-01 至 A-130T-10 已全部落为独立顶层测试:
440
+
441
+ - A-130D 覆盖 oracle/输入语法有效性、scope 与 override、task lineage、schema 2 深层结构、targeted expansion、声明式 dependency、无 locator 的 task renderer、最终交付审计、withheld delivery、三类预算与 complete/adaptive 支配规则;
442
+ - A-130T 覆盖 finding digest、resolution contract、previous Review 绑定、Contract 与外部实现修复分流、deferred/open/rejected/resolved 终态和只读无权限边界;
443
+ - Context Query、Adaptive Context Bundle、Routing Index、Truth Reconciliation Input/Review Bundle 写 schema 2,selector 为 2,capabilities / Exchange Protocol 为 7;
444
+ - 持久 Contract、source/projection lock、Action Plan、Review Bundle 与 renderer 不迁移;核心不增加 Provider、Agent Runtime、Git、网络、业务代码写入或自动批准。
445
+
446
+ 完整 `npm run check` 为 195/195,既有 153 项无删除、跳过或弱化。A-130D-32 新增人工 oracle digest 门,A-130D-18 收缩为 S 一对、L 三对并区分 fixture、因果不明与可重现产品缺陷。Project Context 自托管状态已回到 clean。这证明本地实现合同闭合,不替代有界 Host/Provider A-130-S/L 复验;该复验及发布仍需分别授权。