@c4a/context-cli 0.7.1 → 0.7.5
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/README.md +18 -39
- package/README.zh-CN.md +13 -27
- package/cli.js +64945 -81995
- package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
- package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
- package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
- package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
- package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
- package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
- package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
- package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/indexers/contracts/operator-contract.json +2 -2
- package/indexers/contracts/profile-contract.json +3819 -454
- package/indexers/release-manifest.json +22 -22
- package/package.json +12 -2
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +56 -107
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +56 -107
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +56 -107
- package/plugins/skills/context/SKILL.md +56 -107
- package/plugins/skills/context-code-indexer/SKILL.md +30 -3
- package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
- package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
- package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
- package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
- package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
- package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
- package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
- package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
- package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
- package/providers/context/actions/authorize-current-indexer-provider-program.yaml +6 -0
- package/providers/context/actions/configure-indexer-providers.yaml +1 -1
- package/providers/context/actions/finalize-current-indexer-provider-selection.yaml +5 -0
- package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
- package/providers/context/actions/resolve-current-indexer-gate.yaml +6 -0
- package/providers/context/actions/resolve-current-indexer-provider.yaml +6 -0
- package/providers/context/actions/run-indexer-lifecycle.yaml +0 -1
- package/providers/context/actions/run-indexer-post-author-composer.yaml +2 -2
- package/providers/context/codes.yaml +8 -22
- package/providers/context/graphs/indexer.yaml +95 -564
- package/providers/context/graphs/workspace.yaml +5 -43
- package/providers/context/manifest.json +119 -678
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/dialogue/human-gates.md +3 -3
- package/providers/context/resources/dialogue/knowledge-review.md +6 -3
- package/providers/context/resources/manuals/reference/package-templates.md +2 -3
- package/providers/context/resources/manuals/reference/project-api.md +52 -986
- package/providers/context/resources/procedures/close-and-build.md +8 -23
- package/providers/context/resources/procedures/knowledge-review.md +17 -5
- package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
- package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
- package/providers/context/resources/views/resolved-indexer-instructions.yaml +2 -4
- package/providers/context/schemas/indexer-agent-step-input.schema.json +71 -21
- package/providers/context/schemas/indexer-agent-step-result.schema.json +385 -32
- package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
- package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
- package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
- package/providers/context/schemas/indexer-materialize-request.schema.json +4 -8
- package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
- package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +51 -2
- package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +35 -0
- package/providers/context/skills/authorize-current-indexer-provider-program/SKILL.md +20 -0
- package/providers/context/skills/configure-indexer-providers/SKILL.md +47 -33
- package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +27 -0
- package/providers/context/skills/resolve-current-indexer-provider/SKILL.md +20 -0
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +49 -10
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +19 -13
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +52 -11
- package/docs/document-optimization.md +0 -82
- package/docs/document-optimization.zh-CN.md +0 -70
- package/indexers/capability-manifest.json +0 -35
- package/indexers/contracts/hard-rule-conformance.json +0 -2644
- package/providers/context/actions/accept-main-index-run.yaml +0 -7
- package/providers/context/actions/accept-material-answer-run.yaml +0 -7
- package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
- package/providers/context/actions/audit-material-gap-state.yaml +0 -8
- package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
- package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
- package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
- package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
- package/providers/context/actions/build-material-question-workset.yaml +0 -7
- package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/build-question-target-inventory.yaml +0 -7
- package/providers/context/actions/build-subject-catalog.yaml +0 -7
- package/providers/context/actions/build-target-resolution-views.yaml +0 -7
- package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
- package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
- package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
- package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
- package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
- package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
- package/providers/context/actions/fail-main-index-run.yaml +0 -7
- package/providers/context/actions/fail-material-answer-run.yaml +0 -7
- package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
- package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
- package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
- package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
- package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/override-index-profile-audit.yaml +0 -7
- package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
- package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
- package/providers/context/actions/reconcile-review-identities.yaml +0 -5
- package/providers/context/actions/record-index-profile-revision.yaml +0 -7
- package/providers/context/actions/report-index-profile-failure.yaml +0 -7
- package/providers/context/actions/resolve-effective-composers.yaml +0 -7
- package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
- package/providers/context/actions/revise-document.yaml +0 -5
- package/providers/context/actions/revise-index-output.yaml +0 -7
- package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
- package/providers/context/actions/start-main-index-run.yaml +0 -7
- package/providers/context/actions/start-material-answer-run.yaml +0 -7
- package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
- package/providers/context/resources/procedures/document-revision.md +0 -36
- package/providers/context/resources/views/document-optimization-current.yaml +0 -6
- package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
- package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
- package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +0 -15
- package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
- package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
- package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
- package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
- package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
- package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
- package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +0 -26
- package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
- package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
- package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
- package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
- package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
- package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
- package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
- package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
- package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
- package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
- package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
- package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
- package/providers/context/skills/revise-index-output/SKILL.md +0 -12
package/README.md
CHANGED
|
@@ -170,19 +170,18 @@ for maintainers, automation, and diagnostics:
|
|
|
170
170
|
- `context plugin status` checks installed Agent projections;
|
|
171
171
|
- `context debug enable` records optional traces below
|
|
172
172
|
`.tmp/context-runtime/debug/`;
|
|
173
|
-
-
|
|
174
|
-
`
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- code extraction writes `knowledge/codeindex/**` and independently audits
|
|
173
|
+
- `context revise "<current Candidate title, path, or id>" --instruction
|
|
174
|
+
"<requested correction>"` reopens exactly the owning Author workset before
|
|
175
|
+
approval; it does not create a second revision page or mutate approved
|
|
176
|
+
`knowledge/` directly;
|
|
177
|
+
- code extraction stages reader-facing `codeindex` Candidates and independently audits
|
|
179
178
|
source analysis, stable-boundary coverage, content density, evidence scope,
|
|
180
179
|
and page size before Review; legacy `codegraph` workspaces migrate through
|
|
181
180
|
the returned Route action;
|
|
182
181
|
- the `context indexer` lifecycle builds contract-derived question targets,
|
|
183
182
|
digest-bound partition and author worksets, exact SubjectKey resolution
|
|
184
183
|
views, and independent post-author composer worksets. Main runs use a local
|
|
185
|
-
content-addressed ledger whose accepted Result
|
|
184
|
+
content-addressed ledger whose accepted Result transition is atomic;
|
|
186
185
|
ordinal/fixed-count partitions advance through the authorized strategy order,
|
|
187
186
|
and exhausted strategies use a persisted-predecessor CLI catalog fallback that
|
|
188
187
|
creates one parent unit without an Agent or user Gate;
|
|
@@ -207,37 +206,18 @@ for maintainers, automation, and diagnostics:
|
|
|
207
206
|
fail before that Gate. Exact target matches that resolve to multiple Nodes
|
|
208
207
|
return `index-target-resolution-ambiguous`, and invalid reuse returns
|
|
209
208
|
`index-target-resolution-invalid`;
|
|
210
|
-
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
content-addressed precompile/postcompile audit records and verifies their
|
|
223
|
-
requirement, registry, inventory, layout, candidate-set, and effective
|
|
224
|
-
revision bindings. Missing, stale, baseline-failed, or profile-blocked audits
|
|
225
|
-
cannot resolve the Review Gate. A profile failure enters
|
|
226
|
-
`revise-index-output`; `record-index-profile-revision` retains a stable
|
|
227
|
-
problem lineage and at most three distinct result fingerprints. After the
|
|
228
|
-
third failure, `report-index-profile-failure` persists the full metrics,
|
|
229
|
-
examples, history, missing inputs, and capability-loss report.
|
|
230
|
-
`inspect-index-profile-failure` is read-only, and the following
|
|
231
|
-
`override-index-profile-audit` Gate is non-delegable. Its receipt binds the
|
|
232
|
-
report, audit, candidate revision, failed metrics, user, and timestamp.
|
|
233
|
-
Baseline failures cannot issue or consume that receipt;
|
|
234
|
-
- `checkpoint-material-gaps` is the mandatory retained writer before any
|
|
235
|
-
reconciliation stop. Approved answers inline their accepted workset;
|
|
236
|
-
`actualize-material-answer-bindings` maps them against one current layout
|
|
237
|
-
proposal set and reopens stale sources, while `close-indexer-approved-knowledge`
|
|
238
|
-
accepts provenance only from the approved structure it closes atomically.
|
|
239
|
-
`audit-material-gap-state` is read-only: it recomputes the expected ledger and
|
|
240
|
-
routes pre-Review drift to checkpoint or approved post-Review state to close;
|
|
209
|
+
- unresolved material questions remain in the current reconciliation report.
|
|
210
|
+
Newly captured Markdown or other authorized material reruns the normal main
|
|
211
|
+
Indexer path and updates the same Candidate; there is no second checkpoint,
|
|
212
|
+
answer-only operation, or Review Route;
|
|
213
|
+
- main Candidate Review requires current precompile/postcompile audit records.
|
|
214
|
+
The CLI verifies requirement, registry, inventory, layout and candidate-set
|
|
215
|
+
bindings. A blocking mechanical failure reopens the affected Author or
|
|
216
|
+
Composer workset before recompilation; advisory profile metrics are warnings
|
|
217
|
+
and do not create a retry ledger or override Gate;
|
|
218
|
+
- required material gaps block the ordinary lifecycle until new captured input
|
|
219
|
+
reruns the affected workset. The ordinary `context close` writes approved
|
|
220
|
+
structure and clears completed runtime lifecycle state;
|
|
241
221
|
- `context clean-cache --dry-run` previews cleanup of Context-owned stale
|
|
242
222
|
plugin caches.
|
|
243
223
|
|
|
@@ -245,7 +225,6 @@ Revision-bound commands should be copied from `workflow.current`; examples in
|
|
|
245
225
|
documentation are orientation, not a substitute for the current Route. See the
|
|
246
226
|
[installed quickstart](./docs/quickstart.md) and
|
|
247
227
|
[debug tracing guide](./docs/debug-tracing.md).
|
|
248
|
-
See also [source-constrained editorial revisions](./docs/document-optimization.md).
|
|
249
228
|
|
|
250
229
|
## Documentation and development
|
|
251
230
|
|
package/README.zh-CN.md
CHANGED
|
@@ -144,11 +144,10 @@ context/
|
|
|
144
144
|
- `context <command> --help` 是当前参数的权威来源;
|
|
145
145
|
- `context plugin status` 检查已安装的 Agent 投影;
|
|
146
146
|
- `context debug enable` 在 `.tmp/context-runtime/debug/` 记录可选轨迹;
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
- 代码提取写入 `knowledge/codeindex/**`,并在 Review 前分别检查输入分析、稳定边界
|
|
147
|
+
- `context revise "<当前候选标题、路径或 id>" --instruction "<修正要求>"`
|
|
148
|
+
会在批准前精确重开该候选所属的 Author workset;它不会创建第二套 revision
|
|
149
|
+
页面,也不会直接改写正式 `knowledge/`;
|
|
150
|
+
- 代码提取先暂存可读的 `codeindex` Candidate,并在 Review 前分别检查输入分析、稳定边界
|
|
152
151
|
覆盖、正文密度、证据范围和页面规模;旧 `codegraph` 工作区只通过 Route 返回的
|
|
153
152
|
迁移动作升级;
|
|
154
153
|
- `context indexer` 生命周期以内容寻址 ledger 恢复 main/post-author 运行,再由 CLI
|
|
@@ -165,33 +164,20 @@ context/
|
|
|
165
164
|
major 与精确 re-identification 授权,漏映射、split、merge 或 collision 在 Gate 前失败;精确
|
|
166
165
|
target 命中多个 Node 返回 `index-target-resolution-ambiguous`,非法复用返回
|
|
167
166
|
`index-target-resolution-invalid`;
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
inventory、layout、candidate set 与 effective revision 绑定;record 缺失、stale、基础失败或
|
|
178
|
-
profile 未通过时都不能解析 Review Gate。profile 失败进入 `revise-index-output`;
|
|
179
|
-
`record-index-profile-revision` 按稳定 problem lineage 最多记录三个不同的 Result fingerprint。
|
|
180
|
-
第三轮后 `report-index-profile-failure` 才持久化包含指标、示例、历史、缺失输入与能力损失的完整
|
|
181
|
-
报告;`inspect-index-profile-failure` 只读展示该报告,随后
|
|
182
|
-
`override-index-profile-audit` 使用不可委托 Gate。回执精确绑定报告、审计、候选 revision、失败
|
|
183
|
-
指标、用户和时间;baseline 失败不能生成或消费该回执;
|
|
184
|
-
- `checkpoint-material-gaps` 是 reconciliation 任何停止前的 retained writer。批准答案会
|
|
185
|
-
内联 accepted workset;`actualize-material-answer-bindings` 按同一个 current layout proposal
|
|
186
|
-
set 映射并在 source stale 时 reopen,`close-indexer-approved-knowledge` 只接受其同时关闭的
|
|
187
|
-
approved structure 内部 provenance,并原子收敛 ledger;`audit-material-gap-state` 始终只读,
|
|
188
|
-
内存复算 expected ledger,并把主 Review 前的漂移路由到 checkpoint、把已批准的后置状态路由到 close;
|
|
167
|
+
- 未解决的 material question 只保留在 current reconciliation report。新采集的 Markdown
|
|
168
|
+
或其他授权材料重新运行普通 main Indexer,并更新同一个 Candidate;不存在第二份
|
|
169
|
+
checkpoint、answer-only operation 或 Review Route;
|
|
170
|
+
- 主 Candidate Review 要求 current 的 precompile/postcompile audit record。CLI 会复核
|
|
171
|
+
requirement、registry、inventory、layout 与 candidate set 绑定;阻塞性的机械失败会重开受影响的
|
|
172
|
+
Author 或 Composer workset 后重新编译,建议性的 profile metric 只作为 warning,不建立重试账本或
|
|
173
|
+
override Gate;
|
|
174
|
+
- 必需 material gap 会阻塞普通生命周期,直到新增 capture 重新运行受影响 workset;普通
|
|
175
|
+
`context close` 写入 approved structure 并清理已完成的运行时生命周期状态;
|
|
189
176
|
- `context clean-cache --dry-run` 预览 Context-owned 过期插件缓存清理。
|
|
190
177
|
|
|
191
178
|
绑定 revision 的命令应从 `workflow.current` 原样复制;文档示例只用于理解入口,
|
|
192
179
|
不能替代当前 Route。参见[安装后快速说明](./docs/quickstart.zh-CN.md)和
|
|
193
180
|
[debug tracing](./docs/debug-tracing.md)。
|
|
194
|
-
文档编译优化与对话修订参见[来源约束的编辑修订](./docs/document-optimization.zh-CN.md)。
|
|
195
181
|
|
|
196
182
|
## 文档与开发
|
|
197
183
|
|