frontend-project-context 1.3.1 → 1.7.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.
- package/CHANGELOG.md +51 -2
- package/README.md +156 -40
- package/UPGRADING.md +55 -1
- package/docs/04-PROGRAM-DESIGN.md +34 -4
- package/docs/05-ACCEPTANCE-CONTRACT.md +40 -3
- package/docs/08-INSTALLATION-AND-DISTRIBUTION.md +67 -22
- package/docs/14-FORMAL-RELEASE-READINESS.md +30 -1
- package/docs/18-BRANCH-AWARE-STAGED-CONTEXT-DESIGN.md +2 -2
- package/docs/19-POST-1.3.1-AI-TAKEOVER-EVIDENCE-AND-UPGRADE-PLAN.md +579 -0
- package/docs/20-PHASE-A-AI-TAKEOVER-AND-HEALTH-CLOSURE-DESIGN.md +535 -0
- package/docs/21-PHASE-B-EVIDENCE-FEEDBACK-PROTOCOL-DESIGN.md +347 -0
- package/docs/22-PHASE-C-TARGET-UPGRADE-PROTOCOL-DESIGN.md +398 -0
- package/docs/23-ADAPTIVE-BOUNDED-TASK-CONTEXT-DESIGN.md +432 -0
- package/docs/24-A130-REAL-HOST-TARGET-PROJECT-COMPARISON.md +210 -0
- package/docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md +409 -0
- package/docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md +609 -0
- package/docs/README.md +38 -6
- package/docs/USER-AND-AI-OPERATION-MANUAL.md +840 -0
- package/examples/README.md +29 -2
- package/examples/package.json +6 -2
- package/migration-manifest.json +110 -0
- package/package.json +3 -2
- package/schemas/action-plan.schema.json +31 -3
- package/schemas/adaptive-context-bundle.schema.json +70 -0
- package/schemas/capabilities.schema.json +64 -18
- package/schemas/context-query.schema.json +69 -0
- package/schemas/coverage-audit.schema.json +32 -0
- package/schemas/evidence-bundle.schema.json +64 -0
- package/schemas/evidence-input.schema.json +82 -0
- package/schemas/host-promotion-evidence.schema.json +33 -0
- package/schemas/migration-manifest.schema.json +29 -0
- package/schemas/migration-plan.schema.json +32 -0
- package/schemas/project-status.schema.json +75 -0
- package/schemas/projection-lock.schema.json +48 -0
- package/schemas/review-bundle.schema.json +3 -3
- package/schemas/routing-index.schema.json +58 -0
- package/schemas/truth-reconciliation-input.schema.json +60 -0
- package/schemas/truth-reconciliation-review-bundle.schema.json +155 -0
- package/schemas/upgrade-assessment.schema.json +48 -0
- package/schemas/upgrade-result-bundle.schema.json +35 -0
- package/src/project-context/a130-evaluation.mjs +91 -0
- package/src/project-context/adaptive-context-schema.mjs +392 -0
- package/src/project-context/adaptive-context.mjs +547 -0
- package/src/project-context/ai-entry.mjs +320 -0
- package/src/project-context/assist.mjs +4 -2
- package/src/project-context/capabilities.mjs +62 -17
- package/src/project-context/checker.mjs +24 -6
- package/src/project-context/cli.mjs +113 -3
- package/src/project-context/contract-schema.mjs +30 -16
- package/src/project-context/dashboard-model.mjs +4 -4
- package/src/project-context/dashboard-renderer.mjs +3 -3
- package/src/project-context/discovery.mjs +13 -8
- package/src/project-context/evidence-schema.mjs +209 -0
- package/src/project-context/evidence.mjs +99 -0
- package/src/project-context/exchange-schema.mjs +23 -12
- package/src/project-context/exchange.mjs +26 -4
- package/src/project-context/maintenance.mjs +4 -4
- package/src/project-context/migration-manifest.mjs +168 -0
- package/src/project-context/project-status.mjs +157 -0
- package/src/project-context/projection-store.mjs +8 -1
- package/src/project-context/renderer.mjs +75 -1
- package/src/project-context/source-reader.mjs +63 -30
- package/src/project-context/task-context.mjs +14 -2
- package/src/project-context/truth-reconciliation-schema.mjs +488 -0
- package/src/project-context/truth-reconciliation.mjs +543 -0
- package/src/project-context/upgrade-schema.mjs +219 -0
- package/src/project-context/upgrade.mjs +494 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,62 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.7.0 - Unreleased
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
- 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.
|
|
7
|
+
- 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.
|
|
8
|
+
- 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.
|
|
9
|
+
- Add a task-only renderer that deduplicates shared items and omits source locators while leaving persistent renderer 3 and managed projection bytes unchanged.
|
|
10
|
+
- 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.
|
|
11
|
+
- 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.
|
|
12
|
+
- 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.
|
|
13
|
+
- Bind QA/preproduction evidence to Host-asserted code, source, artifact, acceptance-suite, and Project Context digests; separate reusable local evidence from required integration verification.
|
|
14
|
+
- Give every finding exact affected source/item/subject/scope sets, task-vs-existing-delivery blocking, human roles, deterministic preview invocations, and finite recomputation paths.
|
|
15
|
+
- 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.
|
|
16
|
+
- 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.
|
|
17
|
+
- Add read-only `context-query` and `coverage-audit`, plus preview-by-default `index-context` whose only explicit write is a disposable derived Routing Index.
|
|
18
|
+
- 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.
|
|
19
|
+
- 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.
|
|
20
|
+
- Separate registration coverage, Contract coverage, freshness, task health, and global health; reject stale indexes and digest-bind incremental expansion without resending prior bodies.
|
|
21
|
+
- 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.
|
|
22
|
+
- 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.
|
|
23
|
+
- 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.
|
|
24
|
+
|
|
25
|
+
## 1.6.0 - 2026-09-11
|
|
26
|
+
|
|
27
|
+
- Add read-only `upgrade-check` and `upgrade-plan`, plus preview-by-default `upgrade-apply` with explicit `--write` for one compiled product-owned migration unit.
|
|
28
|
+
- Add strict, self-digested Migration Manifest schema 2 and Upgrade Assessment, Migration Plan, and Upgrade Result Bundle schema 1.
|
|
29
|
+
- Bind every plan to manifest, assessment, store snapshots, and managed target byte digests; stale baselines and ownership conflicts fail closed.
|
|
30
|
+
- Reuse existing managed AI Entry/projection CAS, atomic replacement, and conditional recovery primitives; healthy baselines converge through zero-write `verify-complete`.
|
|
31
|
+
- Upgrade capabilities and exchange protocol to version 4 while Action Plan and Review Bundle remain schema 2.
|
|
32
|
+
- Keep package-manager, Git, network, project tests, business writes, automatic approval/upgrade/rollback, and overall-upgrade claims outside the product boundary.
|
|
33
|
+
- Pass A-101 through A-114 plus all existing regressions, 120/120 total.
|
|
34
|
+
|
|
35
|
+
## 1.5.0 - Unreleased
|
|
36
|
+
|
|
37
|
+
- Add read-only `evidence` for deterministic, project-local Evidence Bundle schema 1 output.
|
|
38
|
+
- Add strict Evidence Input schema 1, canonical 32 KiB input and 48 KiB output budgets, self-verifying digests, and structural privacy minimization.
|
|
39
|
+
- Sample uninitialized, partial, invalid, attention, conflict, and clean Project Context health without writing or conflating observation result with governance health.
|
|
40
|
+
- Upgrade capabilities and exchange protocol to version 3, publish both evidence schemas, and declare `automaticEvidenceUpload: false`.
|
|
41
|
+
- Keep all transfer states human-review-required; add no upload, telemetry, Provider, Agent Runtime, Git, network, store migration, or automatic product-decision path.
|
|
42
|
+
- Pass A-91 through A-100 plus all existing regressions, 106/106 total.
|
|
43
|
+
|
|
44
|
+
## 1.4.0 - Unreleased
|
|
45
|
+
|
|
46
|
+
- Add read-only project `status` with deterministic health and next-action references.
|
|
47
|
+
- Add managed-region `publish-entry` and `remove-entry` with byte ownership, CAS, and conditional lock recovery.
|
|
48
|
+
- Read Projection Lock schemas 1/2 and lazily write schema 2 on the first AI Entry write.
|
|
49
|
+
- Upgrade capabilities, Action Plan, Review Bundle, and exchange protocol to version 2 while retaining schema-1 Action Plan input.
|
|
50
|
+
- Publish project-status, projection-lock, and migration-manifest schemas plus the minimal `1.3.1` to `1.4.0` migration manifest.
|
|
51
|
+
|
|
52
|
+
## 1.3.1 — 2026-09-10
|
|
4
53
|
|
|
5
54
|
- `stage-context` 与 `integration-review` 新增可重复 `--receipt-bundle` 输入,按 Stage identity 将每份 receipt 与其输入 Stage Context Bundle 精确配对。
|
|
6
55
|
- 新增严格 Stage Context Bundle schema 1 运行时验证、自身 digest/规范 UTF-8 字节核对,并按 plan 依赖顺序用已验证前序 receipt 确定性重建 Bundle。
|
|
7
56
|
- 缺失、重复、多余、错配、篡改、过期 snapshot、completed receipt 绑定 blocked bundle,以及不完整或绕过的多级依赖链全部以稳定 finding 失败封闭。
|
|
8
57
|
- README 中英文安装 pin、`examples/package.json`、package version 与发布验收统一为 `1.3.1`。
|
|
9
58
|
- Task Context Plan、Stage Receipt、Stage Context Bundle、Integration Review Bundle 与所有 store schema 保持原版本;没有新增 Provider、Agent Runtime、Git/网络、任务执行或第三方依赖。
|
|
10
|
-
- A-74 至 A-76 与全部旧回归共 82/82
|
|
59
|
+
- A-74 至 A-76 与全部旧回归共 82/82 项通过;候选包与官方 registry tarball 逐字节一致,并已完成独立安装冒烟验证。
|
|
11
60
|
|
|
12
61
|
## 1.3.0 — 2026-09-10
|
|
13
62
|
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ AI coding tools often read only part of a repository. Important conventions may
|
|
|
14
14
|
|
|
15
15
|
- selects the approved guidance that applies to a file or directory;
|
|
16
16
|
- renders focused context for existing coding agents;
|
|
17
|
-
- exposes versioned machine capabilities and
|
|
17
|
+
- exposes versioned machine capabilities, schemas, and human-reviewed evidence bundles for model-neutral hosts;
|
|
18
18
|
- converts AI suggestions into authority-free Action Plans and read-only Review Bundles;
|
|
19
19
|
- publishes managed Markdown, AGENTS, or Ruler-compatible projections;
|
|
20
20
|
- reports source, contract, and projection drift;
|
|
@@ -32,19 +32,37 @@ 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.
|
|
35
|
+
npm install --save-dev frontend-project-context@1.7.0
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
The package has zero runtime dependencies.
|
|
39
39
|
|
|
40
|
-
`1.
|
|
40
|
+
`1.7.0` is the package release candidate in this source tree. It includes the cumulative `1.4.0` status/takeover, `1.5.0` evidence, `1.6.0` target-upgrade, Adaptive Bounded Task Context, truth-resolution repair, and Chinese human-readable project semantics. The candidate has passed all 194 local regressions; public release still requires the separately governed Host/Provider and release gates.
|
|
41
41
|
|
|
42
42
|
### Quick start
|
|
43
43
|
|
|
44
|
+
Every host can begin with one read-only status command, including before initialization:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm exec --offline -- project-context status --project . --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
`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:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm exec --offline -- project-context publish-entry --project . --output AGENTS.md --write --json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The `1.7.0` AI Entry renderer 3 writes human-readable project guidance in Chinese and invokes only the offline project-local CLI while keeping commands, markers, IDs, JSON fields, and enums stable in English. Existing renderer-1/2 entries remain readable but become stale and require an explicit owned republish; no entry is rewritten automatically.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
44
62
|
Let an existing Coding Agent prepare deterministic onboarding candidates:
|
|
45
63
|
|
|
46
64
|
```bash
|
|
47
|
-
|
|
65
|
+
npm exec --offline -- project-context setup \
|
|
48
66
|
--project . \
|
|
49
67
|
--id my-project \
|
|
50
68
|
--name "My Project" \
|
|
@@ -54,10 +72,12 @@ npx project-context setup \
|
|
|
54
72
|
|
|
55
73
|
`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.
|
|
56
74
|
|
|
75
|
+
`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.
|
|
76
|
+
|
|
57
77
|
Register an explicit source:
|
|
58
78
|
|
|
59
79
|
```bash
|
|
60
|
-
|
|
80
|
+
npm exec --offline -- project-context register \
|
|
61
81
|
--project . \
|
|
62
82
|
--id source.package \
|
|
63
83
|
--kind file \
|
|
@@ -68,7 +88,7 @@ npx project-context register \
|
|
|
68
88
|
Propose a scoped contract item. This creates a reviewable proposal; it does not approve it:
|
|
69
89
|
|
|
70
90
|
```bash
|
|
71
|
-
|
|
91
|
+
npm exec --offline -- project-context propose \
|
|
72
92
|
--project . \
|
|
73
93
|
--id policy.ui-copy \
|
|
74
94
|
--kind policy \
|
|
@@ -85,7 +105,7 @@ npx project-context propose \
|
|
|
85
105
|
Approve only the item you reviewed:
|
|
86
106
|
|
|
87
107
|
```bash
|
|
88
|
-
|
|
108
|
+
npm exec --offline -- project-context approve \
|
|
89
109
|
--project . \
|
|
90
110
|
--proposal .project-context/policy.ui-copy.proposal.json \
|
|
91
111
|
--ids policy.ui-copy \
|
|
@@ -96,14 +116,25 @@ npx project-context approve \
|
|
|
96
116
|
Compile context for a target and check for drift:
|
|
97
117
|
|
|
98
118
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
119
|
+
npm exec --offline -- project-context context --project . --path src --locale en
|
|
120
|
+
npm exec --offline -- project-context check --project .
|
|
101
121
|
```
|
|
102
122
|
|
|
123
|
+
For task-sensitive routing, save a schema-1 Context Query with the current snapshots and run:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --json
|
|
127
|
+
npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --prompt
|
|
128
|
+
npm exec --offline -- project-context coverage-audit --project . --json
|
|
129
|
+
npm exec --offline -- project-context index-context --project . --json
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`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.
|
|
133
|
+
|
|
103
134
|
After project sources or implementation paths change, create one read-only reconciliation work unit:
|
|
104
135
|
|
|
105
136
|
```bash
|
|
106
|
-
|
|
137
|
+
npm exec --offline -- project-context sync \
|
|
107
138
|
--project . \
|
|
108
139
|
--changed-path src/example.ts \
|
|
109
140
|
--json
|
|
@@ -114,13 +145,13 @@ npx project-context sync \
|
|
|
114
145
|
Discover the exchange contract without initializing the project:
|
|
115
146
|
|
|
116
147
|
```bash
|
|
117
|
-
|
|
148
|
+
npm exec --offline -- project-context capabilities --project . --json
|
|
118
149
|
```
|
|
119
150
|
|
|
120
|
-
An external AI host can create an Action Plan schema
|
|
151
|
+
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:
|
|
121
152
|
|
|
122
153
|
```bash
|
|
123
|
-
|
|
154
|
+
npm exec --offline -- project-context preflight \
|
|
124
155
|
--project . \
|
|
125
156
|
--plan .project-context/action-plan.json \
|
|
126
157
|
--json
|
|
@@ -131,7 +162,7 @@ npx project-context preflight \
|
|
|
131
162
|
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:
|
|
132
163
|
|
|
133
164
|
```bash
|
|
134
|
-
|
|
165
|
+
npm exec --offline -- project-context stage-context \
|
|
135
166
|
--project . \
|
|
136
167
|
--plan task-context-plan.json \
|
|
137
168
|
--stage stage-render \
|
|
@@ -144,7 +175,7 @@ npx project-context stage-context \
|
|
|
144
175
|
Before an external merge, compare host-provided main/branch path signals with the plan, receipts, current Contract snapshots, and checker findings:
|
|
145
176
|
|
|
146
177
|
```bash
|
|
147
|
-
|
|
178
|
+
npm exec --offline -- project-context integration-review \
|
|
148
179
|
--project . \
|
|
149
180
|
--plan task-context-plan.json \
|
|
150
181
|
--receipt stage-understand.receipt.json \
|
|
@@ -156,14 +187,33 @@ npx project-context integration-review \
|
|
|
156
187
|
|
|
157
188
|
Both commands are read-only. They do not inspect Git, read source bodies, execute the task or tests, save task state, promote decisions, or grant merge authority. Budget limits are caller-supplied canonical UTF-8 bytes and read-target counts, not model tokens.
|
|
158
189
|
|
|
159
|
-
Starting with
|
|
190
|
+
Starting with `1.3.1`, every supplied Stage Receipt must have exactly one matching `--receipt-bundle`. Both commands strictly validate and deterministically rebuild the complete receipt/bundle dependency chain before accepting `inputBundleDigest`; missing, duplicate, mismatched, tampered, stale, or blocked inputs fail closed.
|
|
191
|
+
|
|
192
|
+
To turn an already-redacted local observation into a deterministic Evidence Bundle, keep the input JSON inside the project and run:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm exec --offline -- project-context evidence --project . --input evidence-input.json --json
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`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.
|
|
199
|
+
|
|
200
|
+
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:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
npm exec --offline -- project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
|
|
204
|
+
npm exec --offline -- project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
|
|
205
|
+
npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
|
|
206
|
+
npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`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.
|
|
160
210
|
|
|
161
|
-
The package publishes
|
|
211
|
+
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.
|
|
162
212
|
|
|
163
213
|
Generate the read-only governance dashboard:
|
|
164
214
|
|
|
165
215
|
```bash
|
|
166
|
-
|
|
216
|
+
npm exec --offline -- project-context dashboard --project . > project-context-dashboard.html
|
|
167
217
|
```
|
|
168
218
|
|
|
169
219
|
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.
|
|
@@ -205,28 +255,34 @@ All commands are read-only unless that command explicitly includes `--write`. So
|
|
|
205
255
|
| --- | --- |
|
|
206
256
|
| `setup` | Aggregate safe initialization, conservative discovery, and an Assist Bundle |
|
|
207
257
|
| `capabilities` | Discover protocol versions, schemas, action kinds, initialization, and permanent boundaries |
|
|
258
|
+
| `evidence` | Build a deterministic, read-only, human-reviewed Evidence Bundle from a project-local input |
|
|
208
259
|
| `init` | Create an empty project contract safely |
|
|
209
260
|
| `register` | Register a file, path, JSON pointer, or human decision |
|
|
210
261
|
| `discover` | Conservatively propose bootstrap candidates |
|
|
211
262
|
| `propose` | Author a fact, policy, reference, or validation description |
|
|
212
263
|
| `approve` | Explicitly approve selected proposal IDs |
|
|
213
264
|
| `context` | Compile approved context for one or more paths |
|
|
265
|
+
| `context-query` | Compile adaptive review JSON or its compact model-facing `--prompt` projection with complete-context fallback |
|
|
266
|
+
| `coverage-audit` | Audit declared registration coverage without claiming all project truth |
|
|
267
|
+
| `index-context` | Preview or explicitly persist a disposable routing index |
|
|
214
268
|
| `publish` | Write an owned AGENTS, Markdown, or Ruler projection |
|
|
215
269
|
| `check` | Detect stale sources, contracts, and projections |
|
|
216
270
|
| `sync` | Aggregate source drift, item impact, changed paths, and reconciliation work units |
|
|
217
271
|
| `preflight` | Validate an Action Plan and return a read-only grouped Review Bundle |
|
|
218
272
|
| `stage-context` | Rebuild receipt/bundle inputs and compile the explicitly requested stage within caller-provided byte/read-target budgets |
|
|
219
273
|
| `integration-review` | Review paired receipts/bundles, host path signals, baselines, and context-layer conflicts without Git |
|
|
274
|
+
| `reconcile-truth` | Reconcile explicit branch/promotion evidence against the current truth baseline without reading Git or CI |
|
|
220
275
|
| `dashboard` | Render the read-only governance dashboard |
|
|
221
276
|
| `review-source` | Review a changed source and its exact impact set |
|
|
222
277
|
| `accept-source-change` | Accept a pinned source digest and revoke affected approvals |
|
|
223
278
|
| `revise` / `deprecate` | Maintain contract items explicitly |
|
|
224
279
|
| `deprecate-source` | Retire an unreferenced source with an audit record |
|
|
225
280
|
|
|
226
|
-
Run `
|
|
281
|
+
Run `npm exec --offline -- project-context --help` for the complete command syntax.
|
|
227
282
|
|
|
228
283
|
### Documentation
|
|
229
284
|
|
|
285
|
+
- [User and AI operation manual](./docs/USER-AND-AI-OPERATION-MANUAL.md)
|
|
230
286
|
- [Product constitution](./docs/00-PRODUCT-CONSTITUTION.md)
|
|
231
287
|
- [Program and CLI design](./docs/04-PROGRAM-DESIGN.md)
|
|
232
288
|
- [Acceptance contract](./docs/05-ACCEPTANCE-CONTRACT.md)
|
|
@@ -237,7 +293,9 @@ Run `npx project-context --help` for the complete command syntax.
|
|
|
237
293
|
- [Guided onboarding and AI-assisted reconciliation](./docs/16-GUIDED-ONBOARDING-AND-AI-RECONCILIATION-DESIGN.md)
|
|
238
294
|
- [AI exchange boundary](./docs/17-AI-EXCHANGE-BOUNDARY-DESIGN.md)
|
|
239
295
|
- [Branch-aware staged context and handoff](./docs/18-BRANCH-AWARE-STAGED-CONTEXT-DESIGN.md)
|
|
240
|
-
- [
|
|
296
|
+
- [Evidence Feedback Protocol](./docs/21-PHASE-B-EVIDENCE-FEEDBACK-PROTOCOL-DESIGN.md)
|
|
297
|
+
- [Real-project source-of-truth maintenance design](./docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md)
|
|
298
|
+
- [A-130 quality closure and adaptive delivery repair](./docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md)
|
|
241
299
|
- [Upgrade notes](./UPGRADING.md)
|
|
242
300
|
|
|
243
301
|
## 中文
|
|
@@ -248,7 +306,7 @@ AI 编程工具通常只读取仓库的一部分,而项目约定分散在文
|
|
|
248
306
|
|
|
249
307
|
- 按文件或目录选择真正生效的已批准规则;
|
|
250
308
|
- 为现有 Coding Agent 生成精简且可追溯的上下文;
|
|
251
|
-
- 向模型无关宿主公开版本化 capability
|
|
309
|
+
- 向模型无关宿主公开版本化 capability、机器 schema 与需人工复核的证据包;
|
|
252
310
|
- 把 AI 建议收敛为无权限 Action Plan 和只读 Review Bundle;
|
|
253
311
|
- 从同一合同生成受管 Markdown、AGENTS 或 Ruler 兼容投影;
|
|
254
312
|
- 检测来源、合同和投影是否过期;
|
|
@@ -266,19 +324,37 @@ AI 编程工具通常只读取仓库的一部分,而项目约定分散在文
|
|
|
266
324
|
建议固定为开发依赖,让本地与 CI 使用同一版本:
|
|
267
325
|
|
|
268
326
|
```bash
|
|
269
|
-
npm install --save-dev frontend-project-context@1.
|
|
327
|
+
npm install --save-dev frontend-project-context@1.7.0
|
|
270
328
|
```
|
|
271
329
|
|
|
272
330
|
本包没有运行时第三方依赖。
|
|
273
331
|
|
|
274
|
-
`1.
|
|
332
|
+
`1.7.0` 是当前源码树描述的版本,累计包含 `1.4.0` 状态/接管、`1.5.0` 证据、`1.6.0` 目标升级、自适应有界任务上下文、真源裁定修复和中文人类可读项目语义。候选已通过本地 194 项回归;公开发布仍必须通过单独治理的 Host/Provider 与发布门槛。
|
|
275
333
|
|
|
276
334
|
### 快速开始
|
|
277
335
|
|
|
336
|
+
任何宿主都可以先运行同一条只读状态命令,包括尚未初始化的项目:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
npm exec --offline -- project-context status --project . --json
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
以下所有 `npm exec --offline -- project-context` 命令都要求先安装上面的精确开发依赖。`--offline` 会在本地 CLI 缺失时失败封闭,避免从配置的 registry 下载无关的同名 `project-context` 包。
|
|
343
|
+
|
|
344
|
+
`status` 在不读取业务源码正文、不写项目文件的前提下分类 uninitialized、partial、invalid、attention、clean 和所有权冲突。初始化后,可把固定启动路由发布到根 `AGENTS.md` 的受管区域,同时完整保留区域外人工内容:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
npm exec --offline -- project-context publish-entry --project . --output AGENTS.md --write --json
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
`1.7.0` 的 AI Entry renderer 3 默认用中文生成人类可读的项目规则,并只调用离线的项目本地 CLI;命令、marker、ID、JSON 字段和枚举继续保持稳定英文。既有 renderer 1/2 入口仍可读取,但会标记 stale,只有显式受管 republish 才会升级,不会自动重写。
|
|
351
|
+
|
|
352
|
+
使用相同 output 的 `remove-entry` 只移除可信受管区域。计划与 preview 都不含 `--write`,仍需人对精确路径授权。
|
|
353
|
+
|
|
278
354
|
让现有 Coding Agent 生成确定性的首次接入候选:
|
|
279
355
|
|
|
280
356
|
```bash
|
|
281
|
-
|
|
357
|
+
npm exec --offline -- project-context setup \
|
|
282
358
|
--project . \
|
|
283
359
|
--id my-project \
|
|
284
360
|
--name "My Project" \
|
|
@@ -288,10 +364,12 @@ npx project-context setup \
|
|
|
288
364
|
|
|
289
365
|
`setup` 只创建三个 store 和一份 create-only proposal,不会批准候选或发布 Agent 文件。JSON 中的 `artifacts` receipt 会返回精确 proposal 路径,以及 preview、create 或 unchanged 结果。先读取 `summary`、`workUnits` 和 `readTargets`,再审查具体 proposal ID。
|
|
290
366
|
|
|
367
|
+
`setup` 对已初始化项目是幂等操作,不会重置 store,也不会翻译已经批准的 statement。明确授权全新初始化前,必须先保留所有人工 policy、validation-description、手工 source 和批准决定;只移除可信受管 AI Entry,再由外部精确清理可丢弃的 Project Context 文件,使用已安装包重新 setup,最后重新录入并批准所保留的人工规则。
|
|
368
|
+
|
|
291
369
|
登记一个明确来源:
|
|
292
370
|
|
|
293
371
|
```bash
|
|
294
|
-
|
|
372
|
+
npm exec --offline -- project-context register \
|
|
295
373
|
--project . \
|
|
296
374
|
--id source.package \
|
|
297
375
|
--kind file \
|
|
@@ -302,7 +380,7 @@ npx project-context register \
|
|
|
302
380
|
提出一条带作用域的合同项。这里只生成待审 proposal,不会自动批准:
|
|
303
381
|
|
|
304
382
|
```bash
|
|
305
|
-
|
|
383
|
+
npm exec --offline -- project-context propose \
|
|
306
384
|
--project . \
|
|
307
385
|
--id policy.ui-copy \
|
|
308
386
|
--kind policy \
|
|
@@ -319,7 +397,7 @@ npx project-context propose \
|
|
|
319
397
|
人工审查后,只批准明确选中的 item:
|
|
320
398
|
|
|
321
399
|
```bash
|
|
322
|
-
|
|
400
|
+
npm exec --offline -- project-context approve \
|
|
323
401
|
--project . \
|
|
324
402
|
--proposal .project-context/policy.ui-copy.proposal.json \
|
|
325
403
|
--ids policy.ui-copy \
|
|
@@ -330,14 +408,25 @@ npx project-context approve \
|
|
|
330
408
|
为目标目录生成上下文,并检查漂移:
|
|
331
409
|
|
|
332
410
|
```bash
|
|
333
|
-
|
|
334
|
-
|
|
411
|
+
npm exec --offline -- project-context context --project . --path src --locale zh-CN
|
|
412
|
+
npm exec --offline -- project-context check --project .
|
|
335
413
|
```
|
|
336
414
|
|
|
415
|
+
需要按任务路由上下文时,把当前 snapshot 写入 schema 2 Context Query,再运行:
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --json
|
|
419
|
+
npm exec --offline -- project-context context-query --project . --input .project-context/context-query.json --prompt
|
|
420
|
+
npm exec --offline -- project-context coverage-audit --project . --json
|
|
421
|
+
npm exec --offline -- project-context index-context --project . --json
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
`context-query --json` 返回可审计的机器 Bundle,`--prompt` 只返回与 digest 绑定的模型面向 Markdown,不把 deferred/review 包络或 source locator 发给模型。完整 Context 在 delivery soft threshold 内或不大于 adaptive 正文时优先;非 ready 交付 stdout 为空。`index-context` 默认只读;只有显式 `--write` 才保存可删除、可重建的派生索引。
|
|
425
|
+
|
|
337
426
|
项目来源或实现路径变化后,可一次生成只读的增量维护工作单元:
|
|
338
427
|
|
|
339
428
|
```bash
|
|
340
|
-
|
|
429
|
+
npm exec --offline -- project-context sync \
|
|
341
430
|
--project . \
|
|
342
431
|
--changed-path src/example.ts \
|
|
343
432
|
--json
|
|
@@ -348,13 +437,13 @@ npx project-context sync \
|
|
|
348
437
|
无需初始化项目即可查询双向交换协议:
|
|
349
438
|
|
|
350
439
|
```bash
|
|
351
|
-
|
|
440
|
+
npm exec --offline -- project-context capabilities --project . --json
|
|
352
441
|
```
|
|
353
442
|
|
|
354
|
-
外部 AI 宿主可使用返回的三个项目 snapshot
|
|
443
|
+
外部 AI 宿主可使用返回的三个项目 snapshot 和十类 action 生成 Action Plan schema 2;schema-1 plan 仍可读取。把这份短生命周期计划保存在项目内,再生成只读 Review Bundle:
|
|
355
444
|
|
|
356
445
|
```bash
|
|
357
|
-
|
|
446
|
+
npm exec --offline -- project-context preflight \
|
|
358
447
|
--project . \
|
|
359
448
|
--plan .project-context/action-plan.json \
|
|
360
449
|
--json
|
|
@@ -365,7 +454,7 @@ npx project-context preflight \
|
|
|
365
454
|
多阶段功能开发中,宿主可以显式提供 Task Context Plan、前序 Stage Receipt 和 changed-path 信号,只编译当前指定阶段:
|
|
366
455
|
|
|
367
456
|
```bash
|
|
368
|
-
|
|
457
|
+
npm exec --offline -- project-context stage-context \
|
|
369
458
|
--project . \
|
|
370
459
|
--plan task-context-plan.json \
|
|
371
460
|
--stage stage-render \
|
|
@@ -378,7 +467,7 @@ npx project-context stage-context \
|
|
|
378
467
|
外部合并前,可把宿主提供的 main/branch 路径信号与 plan、receipt、当前 Contract snapshot 和 checker finding 一起进行只读审查:
|
|
379
468
|
|
|
380
469
|
```bash
|
|
381
|
-
|
|
470
|
+
npm exec --offline -- project-context integration-review \
|
|
382
471
|
--project . \
|
|
383
472
|
--plan task-context-plan.json \
|
|
384
473
|
--receipt stage-understand.receipt.json \
|
|
@@ -390,14 +479,33 @@ npx project-context integration-review \
|
|
|
390
479
|
|
|
391
480
|
两个命令都不会读取 Git 或源码正文、执行任务或测试、保存任务状态、晋升决定或授予合并权限。预算由调用方以规范 UTF-8 字节数和 read-target 数量显式提供,不等同于模型 token。
|
|
392
481
|
|
|
393
|
-
|
|
482
|
+
从 `1.3.1` 起,每份 Stage Receipt 都必须恰好对应一份 `--receipt-bundle`。两个命令会严格验证并确定性重建完整 receipt/bundle 依赖链后再接受 `inputBundleDigest`;缺失、重复、错配、篡改、过期或 blocked 输入都会失败封闭。
|
|
483
|
+
|
|
484
|
+
要把一次已经脱敏的本地观察收敛为确定性 Evidence Bundle,请把输入 JSON 保持在项目内并运行:
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
npm exec --offline -- project-context evidence --project . --input evidence-input.json --json
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
`evidence` 只读取这份输入和 Project Context 健康元数据,不写文件,也不上传;项目身份、路径、来源正文、日志和 Contract value 按结构排除。两个 summary 仍是自由文本,因此所有 bundle 永远标记为 `human-review-required`,由人决定是否以及向谁转交。
|
|
491
|
+
|
|
492
|
+
在人和 Host 已于产品边界外把依赖固定到精确目标版本后,可以评估产品自有迁移面,并生成一个 digest 绑定的工作单元:
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
npm exec --offline -- project-context upgrade-check --project . --from-version 1.5.0 --json > .project-context/upgrade-assessment.json
|
|
496
|
+
npm exec --offline -- project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json > .project-context/migration-plan.json
|
|
497
|
+
npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
|
|
498
|
+
npm exec --offline -- project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
`upgrade-check` 与 `upgrade-plan` 永久只读;`upgrade-apply` 默认 preview,只有显式 `--write` 才能执行该 plan 展示的一个已编译、产品自有单元。每个单元后必须重新 check/plan。即使 `coreMigration: complete`,Host 仍需核对依赖与 lockfile、运行项目测试或 CI,并用独立新窗口复核。产品不会执行包管理器、Git、网络、项目测试、业务写入、自动批准、回滚或发布。
|
|
394
502
|
|
|
395
|
-
npm
|
|
503
|
+
npm 包包含二十份机器 schema,包括 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 Bundle、四份 staged-context schema、Context Query/Adaptive Context Bundle/Routing Index 2 与 Coverage Audit 1。
|
|
396
504
|
|
|
397
505
|
生成只读治理看板:
|
|
398
506
|
|
|
399
507
|
```bash
|
|
400
|
-
|
|
508
|
+
npm exec --offline -- project-context dashboard --project . > project-context-dashboard.html
|
|
401
509
|
```
|
|
402
510
|
|
|
403
511
|
看板是一个可离线打开的自包含 HTML。命令只输出到 stdout,不会自动打开浏览器,也不会修改合同。
|
|
@@ -439,28 +547,34 @@ npx project-context dashboard --project . > project-context-dashboard.html
|
|
|
439
547
|
| --- | --- |
|
|
440
548
|
| `setup` | 聚合安全初始化、保守 discovery 和 Assist Bundle |
|
|
441
549
|
| `capabilities` | 查询协议版本、schema、action kind、初始化状态和永久边界 |
|
|
550
|
+
| `evidence` | 从项目内输入生成确定性、只读且需人工复核的 Evidence Bundle |
|
|
442
551
|
| `init` | 安全创建空项目合同 |
|
|
443
552
|
| `register` | 登记文件、路径、JSON Pointer 或人工决定 |
|
|
444
553
|
| `discover` | 保守提出首次接入候选 |
|
|
445
554
|
| `propose` | 创建 fact、policy、reference 或 validation-description |
|
|
446
555
|
| `approve` | 显式批准选中的 proposal ID |
|
|
447
556
|
| `context` | 为一个或多个路径编译已批准上下文 |
|
|
557
|
+
| `context-query` | 编译自适应审查 JSON,或生成带完整上下文回退的紧凑 `--prompt` 模型投影 |
|
|
558
|
+
| `coverage-audit` | 审计声明范围内的来源登记覆盖,不宣称发现全部项目真源 |
|
|
559
|
+
| `index-context` | 预览或显式保存可删除的派生路由索引 |
|
|
448
560
|
| `publish` | 写入仍归工具所有的 AGENTS、Markdown 或 Ruler 投影 |
|
|
449
561
|
| `check` | 检测来源、合同和投影漂移 |
|
|
450
562
|
| `sync` | 聚合来源漂移、item 影响、变化路径和维护工作单元 |
|
|
451
563
|
| `preflight` | 验证 Action Plan 并返回只读分组 Review Bundle |
|
|
452
564
|
| `stage-context` | 重建 receipt/bundle 输入,并在调用方字节/read-target 预算内编译显式指定的当前阶段 |
|
|
453
565
|
| `integration-review` | 不读取 Git,只读审查成对 receipt/bundle、路径信号、baseline 与上下文冲突 |
|
|
566
|
+
| `reconcile-truth` | 不读取 Git/CI,将显式分支与晋升证据对当前真源基线做只读重算 |
|
|
454
567
|
| `dashboard` | 生成只读治理看板 |
|
|
455
568
|
| `review-source` | 查看来源变化及精确影响集 |
|
|
456
569
|
| `accept-source-change` | 接受固定摘要并撤销受影响批准 |
|
|
457
570
|
| `revise` / `deprecate` | 显式维护合同项 |
|
|
458
571
|
| `deprecate-source` | 用审计记录退役已无引用的来源 |
|
|
459
572
|
|
|
460
|
-
运行 `
|
|
573
|
+
运行 `npm exec --offline -- project-context --help` 查看完整命令语法。
|
|
461
574
|
|
|
462
575
|
### 深入文档
|
|
463
576
|
|
|
577
|
+
- [使用与 AI 协作操作手册](./docs/USER-AND-AI-OPERATION-MANUAL.md)
|
|
464
578
|
- [产品宪法](./docs/00-PRODUCT-CONSTITUTION.md)
|
|
465
579
|
- [程序与 CLI 设计](./docs/04-PROGRAM-DESIGN.md)
|
|
466
580
|
- [验收合同](./docs/05-ACCEPTANCE-CONTRACT.md)
|
|
@@ -471,7 +585,9 @@ npx project-context dashboard --project . > project-context-dashboard.html
|
|
|
471
585
|
- [引导式接入与 AI 辅助维护](./docs/16-GUIDED-ONBOARDING-AND-AI-RECONCILIATION-DESIGN.md)
|
|
472
586
|
- [AI 双向交换边界](./docs/17-AI-EXCHANGE-BOUNDARY-DESIGN.md)
|
|
473
587
|
- [分支感知的分阶段上下文与交接](./docs/18-BRANCH-AWARE-STAGED-CONTEXT-DESIGN.md)
|
|
474
|
-
- [
|
|
588
|
+
- [Evidence Feedback Protocol](./docs/21-PHASE-B-EVIDENCE-FEEDBACK-PROTOCOL-DESIGN.md)
|
|
589
|
+
- [真实项目全量应用下的真源维护设计](./docs/25-REAL-PROJECT-SOURCE-OF-TRUTH-MAINTENANCE-DESIGN.md)
|
|
590
|
+
- [A-130 质量闭环与自适应交付协议修订](./docs/26-A130-QUALITY-CLOSURE-AND-ADAPTIVE-DELIVERY-REPAIR-DESIGN.md)
|
|
475
591
|
- [升级说明](./UPGRADING.md)
|
|
476
592
|
|
|
477
593
|
## License / 许可证
|
package/UPGRADING.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# 升级说明
|
|
2
2
|
|
|
3
|
+
## `1.6.0 → 1.7.0`(本地实现,未发布)
|
|
4
|
+
|
|
5
|
+
`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。
|
|
6
|
+
|
|
7
|
+
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,也不授予任务执行权限。
|
|
8
|
+
|
|
9
|
+
目标项目必须先由 Host 把依赖精确固定到 `frontend-project-context@1.7.0`,再使用 `npm exec --offline -- project-context` 执行升级或初始化;不能用可能回退到 registry 同名包的 `npx project-context`。`setup` 不是 reset/翻译命令:需要全新初始化时,先外部留存人工规则并安全移除受管 Entry,再经明确授权清理精确 store,最后从已安装包重建和重新批准。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
project-context upgrade-check --project . --from-version 1.6.0 --json
|
|
13
|
+
project-context index-context --project . --json
|
|
14
|
+
project-context index-context --project . --write --json
|
|
15
|
+
project-context coverage-audit --project . --json
|
|
16
|
+
project-context context-query --project . --input .project-context/context-query.json --json
|
|
17
|
+
project-context context-query --project . --input .project-context/context-query.json --prompt
|
|
18
|
+
project-context reconcile-truth --project . --input truth-reconciliation-input.json --json
|
|
19
|
+
project-context reconcile-truth --project . --input truth-reconciliation-resolution.json --previous-review truth-reconciliation-review.json --json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`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 和发布仍未授权。
|
|
23
|
+
|
|
24
|
+
## `1.3.1 / 1.4.0 / 1.5.0 → 1.6.0`
|
|
25
|
+
|
|
26
|
+
`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 的目标版本不变。
|
|
27
|
+
|
|
28
|
+
依赖和 lockfile 必须先由人授权、由 Host 在产品边界外固定到精确 `1.6.0`。随后按顺序运行:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
project-context upgrade-check --project . --from-version 1.5.0 --json
|
|
32
|
+
project-context upgrade-plan --project . --assessment .project-context/upgrade-assessment.json --json
|
|
33
|
+
project-context upgrade-apply --project . --plan .project-context/migration-plan.json --json
|
|
34
|
+
project-context upgrade-apply --project . --plan .project-context/migration-plan.json --write --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
assessment 与 plan 文件由 Host 保存到项目内 `.project-context/` 的非 store JSON 路径。前两条命令永久只读;apply 默认 preview,并且每份 plan 只允许一个已编译的产品自有工作单元。每次写入后旧 plan 必然过期,必须从真实字节重新 check/plan。健康的 `1.3.1`、`1.4.0`、`1.5.0` 基线走 `package-only` / `verify-complete`,不会为了升级人为改写 store;只有仍受工具所有且 renderer 过旧的 AI Entry/projection 才会生成 republish 单元。
|
|
38
|
+
|
|
39
|
+
`coreMigration: complete` 只证明产品自有迁移面收敛。依赖/lockfile 一致性、项目测试或 CI、独立新窗口复核、外部恢复点以及临时 assessment/plan/result 清理由 Host 或人确认。工具不调用包管理器、不读 Git、不联网、不执行项目测试、不修改业务代码,也不自动批准、回滚或发布。
|
|
40
|
+
|
|
41
|
+
## `1.4.0 → 1.5.0`
|
|
42
|
+
|
|
43
|
+
`1.5.0` 新增只读 `evidence`、Evidence Input/Bundle schema 1,并把 Exchange Protocol 与 capabilities 升至 3。Action Plan/Review Bundle 保持 schema 2,Project Status、Assist Bundle 与四份 staged-context schema 保持原版本;Contract、source/projection lock、proposal 和 renderer 均无迁移。
|
|
44
|
+
|
|
45
|
+
本版本的 manifest `writes` 为空,回退类别为 `package-only`。从公开 `1.3.1` 直达 `1.5.0` 时,仍需遵守 `1.4.0` 已声明的 AI Entry/projection-lock 延迟迁移:如果曾运行 `publish-entry --write`,回到 `1.3.1` reader 需要从外部 Git 或备份同时恢复 `AGENTS.md` 和 projection lock。
|
|
46
|
+
|
|
47
|
+
外部 consumer 必须按 capabilities schema 3 / Exchange Protocol 3 分支,并把 Evidence Bundle 视为短生命周期、`human-review-required` 的本地工件。工具不上传、不保存、不自动脱敏自由文本、不创建需求或执行权限。
|
|
48
|
+
|
|
49
|
+
## `1.3.1 → 1.4.0`
|
|
50
|
+
|
|
51
|
+
`1.4.0` 新增只读 `status`、`publish-entry` / `remove-entry`区域型 AI Entry、Projection Lock schema 1/2 reader、Exchange Protocol 2 与机器可读迁移清单。Contract 1/2、source lock 1、proposal 1、Assist Bundle 1 和四份 staged-context schema 1 不变。
|
|
52
|
+
|
|
53
|
+
只安装新包且未写 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`。
|
|
54
|
+
|
|
55
|
+
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 逐字节一致性与全新安装复验。
|
|
56
|
+
|
|
3
57
|
## `1.3.0 → 1.3.1`
|
|
4
58
|
|
|
5
59
|
`1.3.1` 修复 `1.3.0` 正式调用链未把 Stage Receipt `inputBundleDigest` 绑定到实际 Stage Context Bundle 的协议缺陷,并统一 README、示例依赖、package 与发布验收的消费者版本 pin。
|
|
@@ -8,7 +62,7 @@
|
|
|
8
62
|
|
|
9
63
|
不带 receipt 的首 stage 调用不变。旧的“只传 receipt”调用会从可能错误的 ready/reviewable 收紧为 blocked,这是恢复既有失败封闭合同。四份 task/bundle schema 仍为 1,所有持久 store、exchange protocol、renderer 和 Dashboard View Model 均不迁移。命令仍只读,不创建 task store、不读取 Git/网络/源码正文、不执行任务或测试,也不增加依赖。
|
|
10
64
|
|
|
11
|
-
|
|
65
|
+
实现与 A-01 至 A-76、B0、CLI 和发布工件共 82 项验收已经完成。该版本已于 2026-09-10 发布到官方公共 npm,`latest` 指向 `1.3.1`;发布包与冻结候选逐字节一致,从 registry 独立安装后的 help、capabilities 与版本冒烟均通过。
|
|
12
66
|
|
|
13
67
|
## `1.2.0 → 1.3.0`
|
|
14
68
|
|