@c4a/context-cli 0.6.18 → 0.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/README.md +73 -8
- package/README.zh-CN.md +47 -7
- package/cli.js +89881 -53821
- package/docs/document-optimization.md +35 -11
- package/docs/document-optimization.zh-CN.md +29 -9
- package/indexers/bundles/context-code-indexer/SKILL.md +20 -0
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +230 -0
- package/indexers/bundles/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
- package/indexers/bundles/context-code-indexer/references/composers/cross-module-chain.md +22 -0
- package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md +22 -0
- package/indexers/bundles/context-code-indexer/references/composers/event-flow.md +21 -0
- package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
- package/indexers/bundles/context-code-indexer/references/composers/persistence-boundary.md +21 -0
- package/indexers/bundles/context-code-indexer/references/composers/protocol-boundary.md +22 -0
- package/indexers/bundles/context-code-indexer/references/composers/public-contract.md +23 -0
- package/indexers/bundles/context-code-indexer/references/indexer.md +49 -0
- package/indexers/bundles/context-code-indexer/references/metrics.md +201 -0
- package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +119 -0
- package/indexers/bundles/context-code-indexer/templates/api-service.md +118 -0
- package/indexers/bundles/context-code-indexer/templates/background-runtime.md +109 -0
- package/indexers/bundles/context-code-indexer/templates/cli-tool.md +129 -0
- package/indexers/bundles/context-code-indexer/templates/component-library.md +99 -0
- package/indexers/bundles/context-code-indexer/templates/contract-source.md +73 -0
- package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
- package/indexers/bundles/context-code-indexer/templates/derived-generated-source.md +117 -0
- package/indexers/bundles/context-code-indexer/templates/domain-service.md +109 -0
- package/indexers/bundles/context-code-indexer/templates/event-consumer.md +62 -0
- package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +89 -0
- package/indexers/bundles/context-code-indexer/templates/monorepo-container.md +124 -0
- package/indexers/bundles/context-code-indexer/templates/plugin-extension.md +52 -0
- package/indexers/bundles/context-code-indexer/templates/sdk-library.md +132 -0
- package/indexers/bundles/context-code-indexer/templates/storage-repository.md +56 -0
- package/indexers/bundles/context-code-indexer/templates/web-application.md +146 -0
- package/indexers/bundles/context-code-indexer/tests/fixtures/chapters.json +226 -0
- package/indexers/bundles/context-code-indexer/tests/fixtures/composers.json +82 -0
- package/indexers/bundles/context-code-indexer/tests/fixtures/profiles.json +210 -0
- package/indexers/bundles/context-code-indexer/tests/fixtures/scenarios.json +122 -0
- package/indexers/bundles/context-markdown-indexer/SKILL.md +20 -0
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +147 -0
- package/indexers/bundles/context-markdown-indexer/references/classification.md +63 -0
- package/indexers/bundles/context-markdown-indexer/references/editorial-policy.md +106 -0
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +23 -0
- package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +146 -0
- package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +151 -0
- package/indexers/capability-manifest.json +40 -0
- package/indexers/contracts/hard-rule-conformance.json +2644 -0
- package/indexers/contracts/operator-contract.json +35 -0
- package/indexers/contracts/profile-contract.json +10162 -0
- package/indexers/release-manifest.json +208 -0
- package/package.json +5 -4
- package/plugins/README.md +17 -109
- package/plugins/README_CN.md +11 -89
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +3 -11
- package/plugins/claude/CLAUDE.md +1 -1
- package/plugins/claude/README.md +1 -1
- package/plugins/claude/commands/context.md +112 -7
- package/plugins/codex/.codex-plugin/plugin.json +6 -17
- package/plugins/codex/AGENTS.md +1 -1
- package/plugins/codex/README.md +1 -1
- package/plugins/codex/skills/context/SKILL.md +113 -19
- package/plugins/cursor/.cursor-plugin/plugin.json +4 -17
- package/plugins/cursor/AGENTS.md +1 -1
- package/plugins/cursor/README.md +3 -2
- package/plugins/cursor/commands/c4a-context.md +112 -9
- package/plugins/skills/{c4a-context → context}/SKILL.md +114 -20
- package/plugins/skills/context-code-indexer/SKILL.md +20 -0
- package/plugins/skills/context-code-indexer/context-indexer.yaml +230 -0
- package/plugins/skills/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
- package/plugins/skills/context-code-indexer/references/composers/cross-module-chain.md +22 -0
- package/plugins/skills/context-code-indexer/references/composers/development-and-delivery.md +22 -0
- package/plugins/skills/context-code-indexer/references/composers/event-flow.md +21 -0
- package/plugins/skills/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
- package/plugins/skills/context-code-indexer/references/composers/persistence-boundary.md +21 -0
- package/plugins/skills/context-code-indexer/references/composers/protocol-boundary.md +22 -0
- package/plugins/skills/context-code-indexer/references/composers/public-contract.md +23 -0
- package/plugins/skills/context-code-indexer/references/indexer.md +49 -0
- package/plugins/skills/context-code-indexer/references/metrics.md +201 -0
- package/plugins/skills/context-code-indexer/templates/adapter-integration.md +119 -0
- package/plugins/skills/context-code-indexer/templates/api-service.md +118 -0
- package/plugins/skills/context-code-indexer/templates/background-runtime.md +109 -0
- package/plugins/skills/context-code-indexer/templates/cli-tool.md +129 -0
- package/plugins/skills/context-code-indexer/templates/component-library.md +99 -0
- package/plugins/skills/context-code-indexer/templates/contract-source.md +73 -0
- package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
- package/plugins/skills/context-code-indexer/templates/derived-generated-source.md +117 -0
- package/plugins/skills/context-code-indexer/templates/domain-service.md +109 -0
- package/plugins/skills/context-code-indexer/templates/event-consumer.md +62 -0
- package/plugins/skills/context-code-indexer/templates/gateway-facade.md +89 -0
- package/plugins/skills/context-code-indexer/templates/monorepo-container.md +124 -0
- package/plugins/skills/context-code-indexer/templates/plugin-extension.md +52 -0
- package/plugins/skills/context-code-indexer/templates/sdk-library.md +132 -0
- package/plugins/skills/context-code-indexer/templates/storage-repository.md +56 -0
- package/plugins/skills/context-code-indexer/templates/web-application.md +146 -0
- package/plugins/skills/context-code-indexer/tests/fixtures/chapters.json +226 -0
- package/plugins/skills/context-code-indexer/tests/fixtures/composers.json +82 -0
- package/plugins/skills/context-code-indexer/tests/fixtures/profiles.json +210 -0
- package/plugins/skills/context-code-indexer/tests/fixtures/scenarios.json +122 -0
- package/plugins/skills/context-markdown-indexer/SKILL.md +20 -0
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +147 -0
- package/plugins/skills/context-markdown-indexer/references/classification.md +63 -0
- package/plugins/skills/context-markdown-indexer/references/editorial-policy.md +106 -0
- package/plugins/skills/context-markdown-indexer/references/indexer.md +23 -0
- package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +146 -0
- package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +151 -0
- package/providers/context/actions/accept-main-index-run.yaml +7 -0
- package/providers/context/actions/accept-material-answer-run.yaml +7 -0
- package/providers/context/actions/accept-post-author-composer-run.yaml +7 -0
- package/providers/context/actions/actualize-material-answer-bindings.yaml +8 -0
- package/providers/context/actions/apply-code-index-guidance.yaml +5 -0
- package/providers/context/actions/apply-document-optimization-guidance.yaml +5 -0
- package/providers/context/actions/apply-indexer-project.yaml +7 -0
- package/providers/context/actions/audit-material-gap-state.yaml +8 -0
- package/providers/context/actions/audit-projected-artifact-fan-out.yaml +8 -0
- package/providers/context/actions/authorize-indexer-contract-overlay.yaml +7 -0
- package/providers/context/actions/authorize-indexer-dependencies.yaml +7 -0
- package/providers/context/actions/authorize-indexer-program-execution.yaml +7 -0
- package/providers/context/actions/build-main-index-author-worksets.yaml +7 -0
- package/providers/context/actions/build-main-index-catalog-fallback.yaml +7 -0
- package/providers/context/actions/build-main-index-partition-worksets.yaml +7 -0
- package/providers/context/actions/build-material-question-workset.yaml +7 -0
- package/providers/context/actions/build-post-author-composer-worksets.yaml +7 -0
- package/providers/context/actions/build-question-target-inventory.yaml +7 -0
- package/providers/context/actions/build-subject-catalog.yaml +7 -0
- package/providers/context/actions/build-target-resolution-views.yaml +7 -0
- package/providers/context/actions/checkpoint-material-answer-review.yaml +8 -0
- package/providers/context/actions/checkpoint-material-gaps.yaml +8 -0
- package/providers/context/actions/close-indexer-approved-knowledge.yaml +8 -0
- package/providers/context/actions/compile-indexer-candidates.yaml +8 -0
- package/providers/context/actions/compose-indexer-post-author-fragments.yaml +7 -0
- package/providers/context/actions/configure-community-indexer-fallback.yaml +6 -0
- package/providers/context/actions/configure-indexer-providers.yaml +6 -0
- package/providers/context/actions/confirm-index-requirement-workset.yaml +8 -0
- package/providers/context/actions/confirm-subject-reidentification.yaml +8 -0
- package/providers/context/actions/converge-main-index-partition-run.yaml +7 -0
- package/providers/context/actions/discover-markdown-indexer-providers.yaml +6 -0
- package/providers/context/actions/evaluate-material-gaps.yaml +8 -0
- package/providers/context/actions/fail-main-index-run.yaml +7 -0
- package/providers/context/actions/fail-material-answer-run.yaml +7 -0
- package/providers/context/actions/fail-post-author-composer-run.yaml +7 -0
- package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +8 -0
- package/providers/context/actions/inspect-index-profile-failure.yaml +7 -0
- package/providers/context/actions/inspect-indexer-dependencies.yaml +7 -0
- package/providers/context/actions/inspect-indexer-program-execution.yaml +7 -0
- package/providers/context/actions/inspect-indexer-project-proposal.yaml +7 -0
- package/providers/context/actions/inspect-markdown-provider-capture.yaml +7 -0
- package/providers/context/actions/inspect-material-answer-review.yaml +8 -0
- package/providers/context/actions/maintain-evidence.yaml +1 -1
- package/providers/context/actions/materialize-indexer-instructions.yaml +7 -0
- package/providers/context/actions/migrate-codeindex.yaml +5 -0
- package/providers/context/actions/observe-indexer-project.yaml +7 -0
- package/providers/context/actions/observe-main-index-run-ledger.yaml +7 -0
- package/providers/context/actions/observe-material-answer-runs.yaml +7 -0
- package/providers/context/actions/observe-post-author-composer-worksets.yaml +7 -0
- package/providers/context/actions/override-index-profile-audit.yaml +7 -0
- package/providers/context/actions/prepare-indexer-customization-project.yaml +7 -0
- package/providers/context/actions/prepare-main-index-run-ledger.yaml +7 -0
- package/providers/context/actions/prepare-material-answer-runs.yaml +7 -0
- package/providers/context/actions/propose-indexer-customization.yaml +7 -0
- package/providers/context/actions/propose-overlay-question-amendment.yaml +7 -0
- package/providers/context/actions/rebind-indexer-selection-to-requirement.yaml +7 -0
- package/providers/context/actions/reconcile-indexer-results.yaml +7 -0
- package/providers/context/actions/record-index-profile-revision.yaml +7 -0
- package/providers/context/actions/register-source-batch.yaml +1 -1
- package/providers/context/actions/report-index-profile-failure.yaml +7 -0
- package/providers/context/actions/report-indexer-incremental-impact.yaml +8 -0
- package/providers/context/actions/resolve-effective-composers.yaml +7 -0
- package/providers/context/actions/restore-repository-sources.yaml +1 -1
- package/providers/context/actions/review-material-answer-candidate.yaml +8 -0
- package/providers/context/actions/revise-index-output.yaml +7 -0
- package/providers/context/actions/route-index-requirement-confirmation.yaml +8 -0
- package/providers/context/actions/route-indexer-provider-selection.yaml +7 -0
- package/providers/context/actions/run-indexer-agent-step.yaml +7 -0
- package/providers/context/actions/run-indexer-post-author-composer.yaml +7 -0
- package/providers/context/actions/run-material-answer-indexers.yaml +7 -0
- package/providers/context/actions/start-main-index-run.yaml +7 -0
- package/providers/context/actions/start-material-answer-run.yaml +7 -0
- package/providers/context/actions/start-post-author-composer-run.yaml +7 -0
- package/providers/context/actions/validate-indexer-contract-overlays.yaml +7 -0
- package/providers/context/actions/validate-indexer-customization.yaml +7 -0
- package/providers/context/actions/validate-indexer-selection-proposal.yaml +7 -0
- package/providers/context/actions/validate-main-index-run.yaml +7 -0
- package/providers/context/actions/validate-markdown-provider-selection.yaml +7 -0
- package/providers/context/actions/validate-subject-key-schemas.yaml +8 -0
- package/providers/context/codes.yaml +72 -0
- package/providers/context/graphs/indexer.yaml +1068 -0
- package/providers/context/graphs/workspace.yaml +52 -3
- package/providers/context/manifest.json +1487 -157
- package/providers/context/provider.yaml +3 -2
- package/providers/context/resources/dialogue/code-extraction.md +12 -0
- package/providers/context/resources/dialogue/document-classification.md +1 -1
- package/providers/context/resources/dialogue/knowledge-review.md +7 -1
- package/providers/context/resources/dialogue/source-boundary.md +9 -1
- package/providers/context/resources/dialogue/workflow-mode-after-capture.md +11 -8
- package/providers/context/resources/dialogue/workflow-mode-after-creation.md +6 -4
- package/providers/context/resources/manuals/guides/lark-resources.md +7 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +3 -3
- package/providers/context/resources/manuals/reference/code-extractors.md +7 -6
- package/providers/context/resources/manuals/reference/package-templates.md +18 -10
- package/providers/context/resources/manuals/reference/project-api.md +49 -24
- package/providers/context/resources/procedures/close-and-build.md +24 -9
- package/providers/context/resources/procedures/code-extraction.md +41 -13
- package/providers/context/resources/procedures/code-index-audit.md +83 -13
- package/providers/context/resources/procedures/document-capture.md +9 -0
- package/providers/context/resources/procedures/document-optimization.md +88 -21
- package/providers/context/resources/procedures/document-revision.md +11 -6
- package/providers/context/resources/procedures/knowledge-review.md +4 -1
- package/providers/context/resources/procedures/source-boundary.md +20 -8
- package/providers/context/resources/semantic/align/structure-planning.md +4 -4
- package/providers/context/resources/semantic/code-index/classification.md +8 -5
- package/providers/context/resources/semantic/code-index/templates/adapter.md +9 -0
- package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +81 -0
- package/providers/context/resources/views/resolved-indexer-instructions.yaml +23 -0
- package/providers/context/schemas/document-optimization-decisions.schema.json +29 -6
- package/providers/context/schemas/indexer-agent-step-input.schema.json +30 -0
- package/providers/context/schemas/indexer-agent-step-result.schema.json +47 -0
- package/providers/context/schemas/indexer-candidate-compile-input.schema.json +57 -0
- package/providers/context/schemas/indexer-candidate-compile-output.schema.json +38 -0
- package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +46 -0
- package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +104 -0
- package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +32 -0
- package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +121 -0
- package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +90 -0
- package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +158 -0
- package/providers/context/schemas/indexer-customization-project-preparation-result.schema.json +44 -0
- package/providers/context/schemas/indexer-customization-proposal-draft.schema.json +83 -0
- package/providers/context/schemas/indexer-customization-validation-result.schema.json +36 -0
- package/providers/context/schemas/indexer-dependency-authorization-input.schema.json +71 -0
- package/providers/context/schemas/indexer-dependency-authorization-result.schema.json +138 -0
- package/providers/context/schemas/indexer-incremental-impact-input.schema.json +31 -0
- package/providers/context/schemas/indexer-incremental-impact-output.schema.json +52 -0
- package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +187 -0
- package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +180 -0
- package/providers/context/schemas/indexer-markdown-provider-capture-input.schema.json +17 -0
- package/providers/context/schemas/indexer-markdown-provider-capture-output.schema.json +54 -0
- package/providers/context/schemas/indexer-markdown-provider-validation-input.schema.json +34 -0
- package/providers/context/schemas/indexer-markdown-provider-validation-output.schema.json +75 -0
- package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +90 -0
- package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +80 -0
- package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +32 -0
- package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +32 -0
- package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +19 -0
- package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +87 -0
- package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +86 -0
- package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +19 -0
- package/providers/context/schemas/indexer-materialize-request.schema.json +53 -0
- package/providers/context/schemas/indexer-materialized-resource.schema.json +57 -0
- package/providers/context/schemas/indexer-overlay-question-amendment.schema.json +13 -0
- package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +40 -0
- package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +35 -0
- package/providers/context/schemas/indexer-overlay-question-rebind-result.schema.json +25 -0
- package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +26 -0
- package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +18 -0
- package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +94 -0
- package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +72 -0
- package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +13 -0
- package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +19 -0
- package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +22 -0
- package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +49 -0
- package/providers/context/schemas/indexer-profile-override-decision.schema.json +20 -0
- package/providers/context/schemas/indexer-profile-override-result.schema.json +49 -0
- package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +18 -0
- package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +31 -0
- package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +45 -0
- package/providers/context/schemas/indexer-program-execution-authorization-input.schema.json +145 -0
- package/providers/context/schemas/indexer-program-execution-authorization-result.schema.json +60 -0
- package/providers/context/schemas/indexer-project-action-result.schema.json +19 -0
- package/providers/context/schemas/indexer-project-gate-input.schema.json +100 -0
- package/providers/context/schemas/indexer-project-observation-input.schema.json +16 -0
- package/providers/context/schemas/indexer-project-observation-result.schema.json +42 -0
- package/providers/context/schemas/indexer-provider-route-input.schema.json +55 -0
- package/providers/context/schemas/indexer-provider-route-report.schema.json +188 -0
- package/providers/context/schemas/indexer-requirement-confirmation-input.schema.json +27 -0
- package/providers/context/schemas/indexer-requirement-confirmation-output.schema.json +24 -0
- package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +59 -0
- package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +43 -0
- package/providers/context/schemas/indexer-selection-proposal-input.schema.json +12 -0
- package/providers/context/schemas/indexer-selection-proposal-validation.schema.json +23 -0
- package/providers/context/schemas/indexer-subject-reidentification-input.schema.json +37 -0
- package/providers/context/schemas/indexer-subject-reidentification-output.schema.json +31 -0
- package/providers/context/schemas/source-batch-input.schema.json +18 -3
- package/providers/context/skills/configure-indexer-providers/SKILL.md +58 -0
- package/providers/context/skills/prepare-indexer-customization-project/SKILL.md +31 -0
- package/providers/context/skills/propose-indexer-customization/SKILL.md +40 -0
- package/providers/context/skills/revise-index-output/SKILL.md +12 -0
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +20 -0
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +21 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Document revisions
|
|
2
2
|
|
|
3
|
-
New workspaces enable
|
|
4
|
-
build phase for source-backed prose that
|
|
5
|
-
|
|
6
|
-
broadly rewriting its meaning.
|
|
3
|
+
New workspaces enable source-constrained editorial revision by default. It is a
|
|
4
|
+
build phase for source-backed prose that improves publication value and
|
|
5
|
+
readability without changing the approved knowledge page or inventing facts.
|
|
7
6
|
|
|
8
7
|
To opt out during initialization:
|
|
9
8
|
|
|
@@ -19,9 +18,22 @@ context optimize-docs disable
|
|
|
19
18
|
context status --format json
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
When enabled, the workflow plans only new or changed
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
When enabled, the workflow plans only new or changed source Sections. For each
|
|
22
|
+
Section the CLI reports mechanical signals and allowed actions. The Agent may
|
|
23
|
+
keep it, repair local presentation, reshape it within the same source boundary,
|
|
24
|
+
or omit it when the CLI confirms a non-knowledge reason. Only changed pages
|
|
25
|
+
receive a full revision beside their approved page:
|
|
26
|
+
|
|
27
|
+
Signals are review leads rather than a complete readability verdict. The Agent
|
|
28
|
+
must read every Section. Keeping a signaled Section requires a concrete,
|
|
29
|
+
decision-only assessment explaining why each signal is a false positive or why
|
|
30
|
+
editing would reduce source fidelity. The assessment names every reported
|
|
31
|
+
signal code so the CLI can verify complete coverage; it is never published.
|
|
32
|
+
Time, cost, workload, batch size, or delivery pressure are not valid keep or
|
|
33
|
+
defer reasons. Fully managed operation applies all safe repairs, reshapes, and
|
|
34
|
+
eligible omissions autonomously; only genuinely unavailable semantic input is
|
|
35
|
+
batched for the user. A large fragment set must meet the same quality standard
|
|
36
|
+
as a single fragment.
|
|
25
37
|
|
|
26
38
|
```text
|
|
27
39
|
knowledge/guides/setup.md
|
|
@@ -32,10 +44,21 @@ The `__revision.md` suffix is reserved. Default knowledge discovery, structure,
|
|
|
32
44
|
search, and package selection exclude revision files. Validation and build
|
|
33
45
|
associate a revision with its sibling base page and apply it under the original
|
|
34
46
|
package path. A revision stores only the base digest that cannot be inferred;
|
|
35
|
-
its path and revised
|
|
47
|
+
its path and revised Sections are derived. Unchanged Sections inside a full
|
|
36
48
|
revision are inferred. A page with no changes stores only one derived negative
|
|
37
49
|
cache key below `.tmp/context-runtime/document-optimization/`; replacement
|
|
38
|
-
prose and
|
|
50
|
+
prose and Section metadata are not duplicated there.
|
|
51
|
+
|
|
52
|
+
Typical repair candidates are Markdown syntax, spacing, empty table rows, and
|
|
53
|
+
descriptive labels for links whose purpose is already present. Reshape handles
|
|
54
|
+
wide tables, long cells, mixed images and links, or long prose by creating a
|
|
55
|
+
clearer structure inside the same Section. Unanswered question sets, empty
|
|
56
|
+
placeholders, decision-free drafts, duplicates, and obsolete-only Sections may
|
|
57
|
+
be omitted. Questions with answers, limitations with an action, and
|
|
58
|
+
deprecations with a replacement remain knowledge. Link targets, images, code,
|
|
59
|
+
commands, numbers, identifiers, conditions, and source references are protected
|
|
60
|
+
through validation. Ambiguous currency, ownership, or sensitive values appear
|
|
61
|
+
together in the plan's `input_requests` and require one batched user decision.
|
|
39
62
|
|
|
40
63
|
After capture, review, or build, a user may ask conversationally to correct one
|
|
41
64
|
existing knowledge page. Start the correction by title, approved path, or
|
|
@@ -47,8 +70,9 @@ context revise "<title, approved path, or ViewRef>" --format json
|
|
|
47
70
|
|
|
48
71
|
Context starts `route.document-revision.requested` only after resolving one
|
|
49
72
|
page. Ambiguous requests return candidates instead of guessing. Edit
|
|
50
|
-
reader-visible prose
|
|
51
|
-
|
|
73
|
+
reader-visible prose within existing `context:section` boundaries without
|
|
74
|
+
changing provenance or protected values, then run `context optimize-docs
|
|
75
|
+
validate`. A valid correction ends
|
|
52
76
|
the request and the next Route offers a package build when output is stale. If
|
|
53
77
|
broad document optimization was disabled, this entry activates only the target
|
|
54
78
|
page and keeps every other eligible page out of the pending batch. If upstream
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 文档修订页
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
新工作区默认开启来源约束的编辑修订。它是面向来源可追溯正文的构建阶段,在不修改
|
|
4
|
+
正式知识页、不补写事实的前提下,提高发布内容的知识价值和可读性。
|
|
5
5
|
|
|
6
6
|
初始化时如需关闭:
|
|
7
7
|
|
|
@@ -17,8 +17,9 @@ context optimize-docs disable
|
|
|
17
17
|
context status --format json
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
开启后,工作流只规划新增或发生变化的来源 Section。CLI 为每个 Section 枚举机械
|
|
21
|
+
信号和允许动作;Agent 可以保持不变、局部修复、在同一来源边界内重排,或在 CLI
|
|
22
|
+
确认其属于无知识价值内容时省略。只有实际变化的页面才在原文旁生成完整修订页:
|
|
22
23
|
|
|
23
24
|
```text
|
|
24
25
|
knowledge/guides/setup.md
|
|
@@ -27,9 +28,28 @@ knowledge/guides/setup__revision.md
|
|
|
27
28
|
|
|
28
29
|
`__revision.md` 是保留后缀。默认知识发现、结构、检索和包选择都排除修订页;
|
|
29
30
|
校验和构建根据文件名把它关联回同目录原文,并仍按原文件名输出。修订页只额外
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
记录无法推导的原文摘要;原文路径和修订 Section 由文件名与正文差异推导。完整修订
|
|
32
|
+
页中未变化的 Section 直接推导为 `keep`;整页都不修改时,运行时只保存一个页级负
|
|
33
|
+
缓存键,不重复保存改写正文或 Section 元数据。
|
|
34
|
+
|
|
35
|
+
局部修复适用于 Markdown、空白、空表格行,以及来源已经说明用途的链接名称。结构
|
|
36
|
+
重排适用于宽表格、长单元格、图片与链接混排或过长段落,但不能跨 Section 搬运事实。
|
|
37
|
+
未回答的问题集合、空占位、没有结论的草稿、重复内容和只有旧稿的 Section 可以省略;
|
|
38
|
+
有答案的问句、有影响和动作的限制、带替代方案的废弃说明仍属于知识。链接目标、图片、
|
|
39
|
+
代码、命令、数字、标识符、条件和来源引用由 CLI 机械保护。事实时效、职责或敏感值不
|
|
40
|
+
明确时,CLI 会把相关 Section 集中列入计划的 `input_requests`,工作流只询问用户一次,
|
|
41
|
+
不会自动省略。
|
|
42
|
+
|
|
43
|
+
机械信号只是审阅线索,不代表最终结论,也不是完整的可读性检查。Agent 必须阅读每个
|
|
44
|
+
Section;若对带信号的 Section 选择 `keep`,需要在本次决策中逐段说明信号为何误报,
|
|
45
|
+
或修改为何会损害来源忠实度,并在说明中逐一写出对应的信号 code,供 CLI 机械核对覆盖
|
|
46
|
+
是否完整。CLI 会拒绝没有具体说明或漏掉信号的 `keep`,但这段说明只用于当前决策审计,
|
|
47
|
+
不会写入正式知识、修订页或构建产物。部分信号误报也不能成为整批保持不变的理由。
|
|
48
|
+
|
|
49
|
+
时间、成本、工作量、批次规模或赶进度都不是 `keep`、跳过或延期的有效理由。全托管
|
|
50
|
+
模式下,Agent 应自动完成所有安全的局部修复、结构重排和允许省略,直到当前批次收敛;
|
|
51
|
+
只有确实无法从当前 Section 或来源证据取得的语义信息,才集中向用户询问一次。片段多
|
|
52
|
+
不能降低质量标准,也不能把整批默认判为 `keep`。
|
|
33
53
|
|
|
34
54
|
工作区采集、审核或构建完成后,用户可以直接通过对话要求修正某篇知识。Agent
|
|
35
55
|
先使用标题、正式知识路径或 ViewRef 启动修订:
|
|
@@ -40,8 +60,8 @@ context revise "<标题、正式知识路径或 ViewRef>" --format json
|
|
|
40
60
|
|
|
41
61
|
CLI 只在目标唯一时创建或复用该页修订,并由 Agent Graph 返回
|
|
42
62
|
`route.document-revision.requested`。若有多个候选,Agent 必须依据当前对话选定,
|
|
43
|
-
否则询问用户。Agent
|
|
44
|
-
|
|
63
|
+
否则询问用户。Agent 只在已有 `context:section` 内编辑面向读者的正文,不修改来源
|
|
64
|
+
信息、Section 边界和受保护值,随后运行 `context optimize-docs validate`。校验成功后,
|
|
45
65
|
请求自动结束;若产物因此过期,下一条 Route 会直接提示重新构建。即使工作区
|
|
46
66
|
此前关闭了整库文档编译优化,这个入口也只激活目标页面,不会让其他页面进入
|
|
47
67
|
待优化队列。上游内容变化后,旧修订页会成为冲突,不会被静默应用。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-code-indexer
|
|
3
|
+
description: Context-managed Provider for evidence-bound code knowledge. Use only when the Context Indexer lifecycle selects this Provider, not as a standalone workflow.
|
|
4
|
+
metadata:
|
|
5
|
+
context-role: "indexer-provider"
|
|
6
|
+
context-public-entry: "false"
|
|
7
|
+
context-provider-version: "1.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Context Code Indexer
|
|
11
|
+
|
|
12
|
+
Provider authors must satisfy
|
|
13
|
+
`node_modules/@c4a/context/docs/guides/code-indexer-skill-authoring.md` and the
|
|
14
|
+
shared Provider/customization guide before publishing or extending this Skill.
|
|
15
|
+
Those documents are authoring contracts; the current workset and Route remain
|
|
16
|
+
execution authority.
|
|
17
|
+
|
|
18
|
+
Use this Provider only through the Context Indexer lifecycle. The workspace registry selects an exact profile, version, integrity, scope, and operation. Do not scan outside the supplied workset or write project files directly.
|
|
19
|
+
|
|
20
|
+
The machine-readable authority is `context-indexer.yaml`. Detailed authoring guidance is materialized by Context from the registered Bundle after its file ledger and integrity have been verified.
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
protocol: context.indexer.provider/v1
|
|
2
|
+
id: context-code-indexer
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
domains: [code]
|
|
5
|
+
|
|
6
|
+
activation:
|
|
7
|
+
target_kinds: [repository, package, library, service, application]
|
|
8
|
+
required_signals:
|
|
9
|
+
- id: supported-source
|
|
10
|
+
description: The registered target scope contains source or contract files supported by Context.
|
|
11
|
+
supporting_signals:
|
|
12
|
+
- id: stable-entry
|
|
13
|
+
description: The target exposes a stable entry, protocol, command, route, export, or runtime boundary.
|
|
14
|
+
- id: usage-material
|
|
15
|
+
description: The readable scope contains examples, tests, documentation, or operational material.
|
|
16
|
+
negative_signals:
|
|
17
|
+
- id: generated-only
|
|
18
|
+
description: The scope contains only generated artifacts with no authoritative source boundary.
|
|
19
|
+
agent_questions:
|
|
20
|
+
- Which stable reader capability groups the complete eligible inventory?
|
|
21
|
+
|
|
22
|
+
provides:
|
|
23
|
+
profiles:
|
|
24
|
+
- monorepo-container
|
|
25
|
+
- web-application
|
|
26
|
+
- component-library
|
|
27
|
+
- sdk-library
|
|
28
|
+
- cli-tool
|
|
29
|
+
- plugin-extension
|
|
30
|
+
- api-service
|
|
31
|
+
- gateway-facade
|
|
32
|
+
- domain-service
|
|
33
|
+
- background-runtime
|
|
34
|
+
- event-consumer
|
|
35
|
+
- data-sync-reconciliation
|
|
36
|
+
- storage-repository
|
|
37
|
+
- adapter-integration
|
|
38
|
+
- contract-source
|
|
39
|
+
- derived-generated-source
|
|
40
|
+
partition_strategies:
|
|
41
|
+
- id: public-target-family
|
|
42
|
+
profiles: [component-library, sdk-library, plugin-extension, contract-source]
|
|
43
|
+
priority: 100
|
|
44
|
+
- id: canonical-semantic-subject
|
|
45
|
+
profiles:
|
|
46
|
+
- monorepo-container
|
|
47
|
+
- web-application
|
|
48
|
+
- component-library
|
|
49
|
+
- sdk-library
|
|
50
|
+
- cli-tool
|
|
51
|
+
- plugin-extension
|
|
52
|
+
- api-service
|
|
53
|
+
- gateway-facade
|
|
54
|
+
- domain-service
|
|
55
|
+
- background-runtime
|
|
56
|
+
- event-consumer
|
|
57
|
+
- data-sync-reconciliation
|
|
58
|
+
- storage-repository
|
|
59
|
+
- adapter-integration
|
|
60
|
+
- contract-source
|
|
61
|
+
- derived-generated-source
|
|
62
|
+
priority: 200
|
|
63
|
+
operations:
|
|
64
|
+
- id: main-index
|
|
65
|
+
consumes: context.indexer.main-workset/v1
|
|
66
|
+
produces: context.indexer.main-result/v1
|
|
67
|
+
accepts_layer_fragments: [fact-enrichment, template-variables]
|
|
68
|
+
- id: material-answer
|
|
69
|
+
consumes: context.indexer.material-question-workset/v1
|
|
70
|
+
produces: context.indexer.material-answer-result/v1
|
|
71
|
+
supported_evidence_kinds: [code, contract, configuration, documentation, runbook, test-result, runtime-observation]
|
|
72
|
+
accepts_layer_fragments: [fact-enrichment]
|
|
73
|
+
layer_fragments:
|
|
74
|
+
- kind: derived-artifact-proposal
|
|
75
|
+
phase: post-author
|
|
76
|
+
produces: context.indexer.layer-fragment/v1
|
|
77
|
+
composers:
|
|
78
|
+
- id: public-contract
|
|
79
|
+
supported_profiles: [component-library, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, adapter-integration, contract-source, derived-generated-source]
|
|
80
|
+
contract:
|
|
81
|
+
instruction: references/composers/public-contract.md
|
|
82
|
+
primary_requirements: { fact_kinds: [public-surface], artifact_kinds: [content] }
|
|
83
|
+
derived_artifact_policy:
|
|
84
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
85
|
+
fragment_kind: derived-artifact-proposal
|
|
86
|
+
artifact_policy_variant: standard
|
|
87
|
+
artifact_kinds: [contract]
|
|
88
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
89
|
+
- id: protocol-boundary
|
|
90
|
+
supported_profiles: [web-application, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration, contract-source, derived-generated-source]
|
|
91
|
+
contract:
|
|
92
|
+
instruction: references/composers/protocol-boundary.md
|
|
93
|
+
primary_requirements: { fact_kinds: [protocol-operation], artifact_kinds: [contract] }
|
|
94
|
+
derived_artifact_policy:
|
|
95
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
96
|
+
fragment_kind: derived-artifact-proposal
|
|
97
|
+
artifact_policy_variant: standard
|
|
98
|
+
artifact_kinds: [contract]
|
|
99
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
100
|
+
- id: cross-module-chain
|
|
101
|
+
supported_profiles: [monorepo-container, web-application, component-library, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration]
|
|
102
|
+
contract:
|
|
103
|
+
instruction: references/composers/cross-module-chain.md
|
|
104
|
+
primary_requirements: { fact_kinds: [module-dependency], artifact_kinds: [content] }
|
|
105
|
+
derived_artifact_policy:
|
|
106
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
107
|
+
fragment_kind: derived-artifact-proposal
|
|
108
|
+
artifact_policy_variant: standard
|
|
109
|
+
artifact_kinds: [content]
|
|
110
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
111
|
+
- id: contracts-and-chains
|
|
112
|
+
supported_profiles: [monorepo-container, web-application, component-library, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration, contract-source, derived-generated-source]
|
|
113
|
+
contract:
|
|
114
|
+
instruction: references/composers/contracts-and-chains.md
|
|
115
|
+
primary_requirements: { fact_kinds: [contract-binding, module-dependency], artifact_kinds: [contract] }
|
|
116
|
+
derived_artifact_policy:
|
|
117
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
118
|
+
fragment_kind: derived-artifact-proposal
|
|
119
|
+
artifact_policy_variant: standard
|
|
120
|
+
artifact_kinds: [contract]
|
|
121
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
122
|
+
- id: event-flow
|
|
123
|
+
supported_profiles: [web-application, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, adapter-integration, contract-source]
|
|
124
|
+
contract:
|
|
125
|
+
instruction: references/composers/event-flow.md
|
|
126
|
+
primary_requirements: { fact_kinds: [event-binding], artifact_kinds: [content] }
|
|
127
|
+
derived_artifact_policy:
|
|
128
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
129
|
+
fragment_kind: derived-artifact-proposal
|
|
130
|
+
artifact_policy_variant: standard
|
|
131
|
+
artifact_kinds: [content]
|
|
132
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
133
|
+
- id: persistence-boundary
|
|
134
|
+
supported_profiles: [api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration]
|
|
135
|
+
contract:
|
|
136
|
+
instruction: references/composers/persistence-boundary.md
|
|
137
|
+
primary_requirements: { fact_kinds: [persistence-binding], artifact_kinds: [content] }
|
|
138
|
+
derived_artifact_policy:
|
|
139
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
140
|
+
fragment_kind: derived-artifact-proposal
|
|
141
|
+
artifact_policy_variant: standard
|
|
142
|
+
artifact_kinds: [content]
|
|
143
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
144
|
+
- id: examples-and-documentation
|
|
145
|
+
supported_profiles: [monorepo-container, web-application, component-library, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration, contract-source, derived-generated-source]
|
|
146
|
+
contract:
|
|
147
|
+
instruction: references/composers/examples-and-documentation.md
|
|
148
|
+
primary_requirements: { fact_kinds: [example-candidate], artifact_kinds: [content] }
|
|
149
|
+
derived_artifact_policy:
|
|
150
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
151
|
+
fragment_kind: derived-artifact-proposal
|
|
152
|
+
artifact_policy_variant: standard
|
|
153
|
+
artifact_kinds: [examples]
|
|
154
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
155
|
+
- id: development-and-delivery
|
|
156
|
+
supported_profiles: [monorepo-container, web-application, component-library, sdk-library, cli-tool, plugin-extension, api-service, gateway-facade, domain-service, background-runtime, event-consumer, data-sync-reconciliation, storage-repository, adapter-integration, contract-source, derived-generated-source]
|
|
157
|
+
contract:
|
|
158
|
+
instruction: references/composers/development-and-delivery.md
|
|
159
|
+
primary_requirements: { fact_kinds: [development-entry], artifact_kinds: [content] }
|
|
160
|
+
derived_artifact_policy:
|
|
161
|
+
fragment_protocol: context.indexer.layer-fragment/v1
|
|
162
|
+
fragment_kind: derived-artifact-proposal
|
|
163
|
+
artifact_policy_variant: standard
|
|
164
|
+
artifact_kinds: [content]
|
|
165
|
+
empty_result: { result_protocol: context.indexer.layer-fragment-result/v1, behavior: empty-fragment-set }
|
|
166
|
+
source_roles: [authoritative-source, public-contract-source, example-source, operational-source]
|
|
167
|
+
logical_units:
|
|
168
|
+
- id: semantic-subject
|
|
169
|
+
identity: canonical-subject-key
|
|
170
|
+
artifacts:
|
|
171
|
+
recommended: [content, contract, examples]
|
|
172
|
+
supported_policy_variants: [compact, standard, expanded]
|
|
173
|
+
|
|
174
|
+
provider:
|
|
175
|
+
instructions:
|
|
176
|
+
- path: references/indexer.md
|
|
177
|
+
profiles:
|
|
178
|
+
- monorepo-container
|
|
179
|
+
- web-application
|
|
180
|
+
- component-library
|
|
181
|
+
- sdk-library
|
|
182
|
+
- cli-tool
|
|
183
|
+
- plugin-extension
|
|
184
|
+
- api-service
|
|
185
|
+
- gateway-facade
|
|
186
|
+
- domain-service
|
|
187
|
+
- background-runtime
|
|
188
|
+
- event-consumer
|
|
189
|
+
- data-sync-reconciliation
|
|
190
|
+
- storage-repository
|
|
191
|
+
- adapter-integration
|
|
192
|
+
- contract-source
|
|
193
|
+
- derived-generated-source
|
|
194
|
+
templates:
|
|
195
|
+
- { id: monorepo-container, profile: monorepo-container, path: templates/monorepo-container.md }
|
|
196
|
+
- { id: web-application, profile: web-application, path: templates/web-application.md }
|
|
197
|
+
- { id: component-library, profile: component-library, path: templates/component-library.md }
|
|
198
|
+
- { id: sdk-library, profile: sdk-library, path: templates/sdk-library.md }
|
|
199
|
+
- { id: cli-tool, profile: cli-tool, path: templates/cli-tool.md }
|
|
200
|
+
- { id: plugin-extension, profile: plugin-extension, path: templates/plugin-extension.md }
|
|
201
|
+
- { id: api-service, profile: api-service, path: templates/api-service.md }
|
|
202
|
+
- { id: gateway-facade, profile: gateway-facade, path: templates/gateway-facade.md }
|
|
203
|
+
- { id: domain-service, profile: domain-service, path: templates/domain-service.md }
|
|
204
|
+
- { id: background-runtime, profile: background-runtime, path: templates/background-runtime.md }
|
|
205
|
+
- { id: event-consumer, profile: event-consumer, path: templates/event-consumer.md }
|
|
206
|
+
- { id: data-sync-reconciliation, profile: data-sync-reconciliation, path: templates/data-sync-reconciliation.md }
|
|
207
|
+
- { id: storage-repository, profile: storage-repository, path: templates/storage-repository.md }
|
|
208
|
+
- { id: adapter-integration, profile: adapter-integration, path: templates/adapter-integration.md }
|
|
209
|
+
- { id: contract-source, profile: contract-source, path: templates/contract-source.md }
|
|
210
|
+
- { id: derived-generated-source, profile: derived-generated-source, path: templates/derived-generated-source.md }
|
|
211
|
+
forbidden_fallbacks: [one-page-per-symbol, ordinal-batch-pages, inferred-runtime-chain]
|
|
212
|
+
completion_checks: [inventory-disposition-closure, subject-owner-closure, evidence-binding]
|
|
213
|
+
|
|
214
|
+
customization:
|
|
215
|
+
supports: [config, instructions-append, template-override, program-extend]
|
|
216
|
+
|
|
217
|
+
quality_guidance:
|
|
218
|
+
metric_ids:
|
|
219
|
+
- inventory-disposition-coverage
|
|
220
|
+
- duplicated-fact-target-ratio
|
|
221
|
+
- narrative-enumeration-ratio
|
|
222
|
+
- normalized-template-repetition-ratio
|
|
223
|
+
- implementation-body-ratio
|
|
224
|
+
- reference-only-reader-targets
|
|
225
|
+
- unresolved-ordinal-partitions
|
|
226
|
+
- discretionary-artifacts-per-logical-unit
|
|
227
|
+
- example-candidate-decision-coverage
|
|
228
|
+
- example-representative-coverage
|
|
229
|
+
- example-public-target-linkage
|
|
230
|
+
repair: references/metrics.md
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.contracts-and-chains
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Contracts and chains composer
|
|
8
|
+
|
|
9
|
+
Use only when `contracts-and-chains` is present in the effective composer set.
|
|
10
|
+
Consume the exact primary view and return post-author proposals, never another
|
|
11
|
+
complete Indexer Result.
|
|
12
|
+
|
|
13
|
+
Require both `contract-binding` and `module-dependency` facts plus a primary
|
|
14
|
+
`contract` Artifact. A derived `contract` Artifact may summarize how a stable
|
|
15
|
+
contract identity is produced, transported, implemented, consumed, and traced
|
|
16
|
+
across registered modules. Preserve the authoritative schema and distinguish
|
|
17
|
+
generated bindings from source contracts.
|
|
18
|
+
|
|
19
|
+
Use the existing target, the `standard` policy, and evidence already bound to
|
|
20
|
+
the view. Do not merge unrelated protocols merely because they share a
|
|
21
|
+
transport. If either fact, the primary Artifact, or an evidenced end-to-end
|
|
22
|
+
binding is absent, return `context.indexer.layer-fragment-result/v1` with an
|
|
23
|
+
empty `fragments` array.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.cross-module-chain
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cross-module chain composer
|
|
8
|
+
|
|
9
|
+
Run only for the selected composer and the supplied `PrimaryResultView`.
|
|
10
|
+
Derived output supplements an existing target Node; it cannot create scope,
|
|
11
|
+
change ownership, or replace the primary Result.
|
|
12
|
+
|
|
13
|
+
Require an evidenced `module-dependency` fact and primary `content` Artifact.
|
|
14
|
+
Propose derived `content` only when a stable reader question crosses at least
|
|
15
|
+
two registered module boundaries and every hop has an unambiguous identity and
|
|
16
|
+
evidence. Describe trigger, ordered boundaries, transformations, outcome,
|
|
17
|
+
failure propagation, and recovery without copying each module page.
|
|
18
|
+
|
|
19
|
+
Use the `standard` policy and view evidence only. Import adjacency, directory
|
|
20
|
+
proximity, or a guessed runtime call is insufficient. Missing requirements,
|
|
21
|
+
an incomplete chain, or an already answered question yields the structured
|
|
22
|
+
empty result: the accepted layer-fragment result with `fragments: []`.
|
package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.development-and-delivery
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Development and delivery composer
|
|
8
|
+
|
|
9
|
+
Run only for an effective `development-and-delivery` workset. It supplements
|
|
10
|
+
the primary target and cannot own repository scope, release authority, or the
|
|
11
|
+
final Indexer Result.
|
|
12
|
+
|
|
13
|
+
Require an evidenced `development-entry` fact and primary `content` Artifact.
|
|
14
|
+
Propose derived `content` only for module-owned setup, build, test, packaging,
|
|
15
|
+
deployment, release, rollback, or recovery behavior that answers a stable
|
|
16
|
+
reader question. Distinguish local commands from CI orchestration and record
|
|
17
|
+
configuration inputs without copying secret-like values.
|
|
18
|
+
|
|
19
|
+
Use the existing Node, `standard` policy, and view evidence. Workspace-wide
|
|
20
|
+
processes belong on a container target, not every module. If the required input
|
|
21
|
+
is absent or the view contains no module-owned development/delivery contract,
|
|
22
|
+
return `fragments: []` in the ordinary structured result.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.event-flow
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Event flow composer
|
|
8
|
+
|
|
9
|
+
Run only from an effective `event-flow` workset. The supplied primary view is
|
|
10
|
+
the complete authority boundary for this invocation.
|
|
11
|
+
|
|
12
|
+
Require an evidenced `event-binding` fact and primary `content` Artifact.
|
|
13
|
+
Propose derived `content` only when a stable event identity connects producer,
|
|
14
|
+
transport or dispatch, consumer, state effect, retry/idempotency behavior, and
|
|
15
|
+
failure handling. Timers and scheduled triggers qualify only when their
|
|
16
|
+
registration and downstream behavior are explicit.
|
|
17
|
+
|
|
18
|
+
Keep the current target Node, use `standard`, and cite view evidence. Do not
|
|
19
|
+
invent a producer from a consumer name or infer delivery guarantees from a
|
|
20
|
+
library default. Missing requirements, an unpaired boundary, or no additional
|
|
21
|
+
reader value must return the normal result envelope with `fragments: []`.
|
package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.examples-and-documentation
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Examples and documentation composer
|
|
8
|
+
|
|
9
|
+
Run only when selected for the current profile. The workset-scoped primary
|
|
10
|
+
view is the sole input; documentation files outside that view are not implicit
|
|
11
|
+
authority.
|
|
12
|
+
|
|
13
|
+
Require an evidenced `example-candidate` fact and primary `content` Artifact.
|
|
14
|
+
Propose an `examples` Artifact only for maintained usage that demonstrates a
|
|
15
|
+
supported public target, meaningful setup, expected outcome, and important
|
|
16
|
+
constraints. Merge scenario variants and exclude fixtures, generated samples,
|
|
17
|
+
and demos that do not represent supported use.
|
|
18
|
+
|
|
19
|
+
Use the existing target Node and `standard` policy. Evidence must come from the
|
|
20
|
+
view. When no representative example closes the reader question, or either
|
|
21
|
+
required input is missing, return the structured empty fragment-set result;
|
|
22
|
+
never invent tutorial steps.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.persistence-boundary
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Persistence boundary composer
|
|
8
|
+
|
|
9
|
+
Run only for an effective `persistence-boundary` selection. Consume the exact
|
|
10
|
+
`PrimaryResultView` and keep all proposals subordinate to its Node and Result.
|
|
11
|
+
|
|
12
|
+
Require an evidenced `persistence-binding` fact and primary `content`
|
|
13
|
+
Artifact. Derived `content` may connect the domain operation to repository or
|
|
14
|
+
store, model/schema authority, transaction or consistency boundary, caching,
|
|
15
|
+
migration, failure, and recovery. Separate authoritative schema sources from
|
|
16
|
+
generated models and runtime observations.
|
|
17
|
+
|
|
18
|
+
Use `standard` and existing evidence. Do not infer storage semantics from a
|
|
19
|
+
driver dependency or method name. If the binding, required Artifact, or a
|
|
20
|
+
source-backed persistence question is absent, return a valid empty fragment
|
|
21
|
+
set rather than reading outside the workset.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.protocol-boundary
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Protocol boundary composer
|
|
8
|
+
|
|
9
|
+
Run only for an effective `protocol-boundary` composer workset and consume its
|
|
10
|
+
exact `PrimaryResultView`. Never discover new scope or claim final Result
|
|
11
|
+
authority.
|
|
12
|
+
|
|
13
|
+
Require an evidenced `protocol-operation` fact and a primary `contract`
|
|
14
|
+
Artifact. A derived `contract` proposal may connect a stable operation identity
|
|
15
|
+
to transport, request/response or message shapes, provider and consumer,
|
|
16
|
+
errors, compatibility, and authoritative schema evidence. Keep generated
|
|
17
|
+
clients and bindings pointed at their source contract.
|
|
18
|
+
|
|
19
|
+
Use the existing target Node and `standard` policy. Do not infer operations
|
|
20
|
+
from names or import adjacency. If the required fact/Artifact is missing, the
|
|
21
|
+
provider/consumer pairing is ambiguous, or the primary contract already
|
|
22
|
+
answers the reader question, return a valid result with `fragments: []`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: context.code-indexer.composer.public-contract
|
|
3
|
+
kind: procedure
|
|
4
|
+
media-type: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Public contract composer
|
|
8
|
+
|
|
9
|
+
Run only for an effective `public-contract` composer workset. Consume the
|
|
10
|
+
workset-scoped `PrimaryResultView`; do not inspect a broader repository or
|
|
11
|
+
replace the primary Result.
|
|
12
|
+
|
|
13
|
+
Require an evidenced `public-surface` fact and its owning primary `content`
|
|
14
|
+
Artifact. Propose a `contract` Artifact only when the view establishes stable
|
|
15
|
+
consumer identities, entrypoints, behavior, constraints, and evidence. Group
|
|
16
|
+
related exports, commands, routes, or extension points by the public concept a
|
|
17
|
+
consumer uses; do not enumerate incidental symbols.
|
|
18
|
+
|
|
19
|
+
Every proposal must retain the existing target Node, use the `standard`
|
|
20
|
+
Artifact policy variant, and cite evidence already present in the view. Return
|
|
21
|
+
only a post-author `derived-artifact-proposal` fragment. If either required
|
|
22
|
+
input is absent or no independent reader question is supported, return the
|
|
23
|
+
normal layer-fragment result with `fragments: []`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Code Indexer authoring contract
|
|
2
|
+
|
|
3
|
+
Consume only the current workset, normalized parser facts, verified layer input, and scoped evidence views supplied by Context.
|
|
4
|
+
|
|
5
|
+
## Classify before selecting templates
|
|
6
|
+
|
|
7
|
+
Classify each requested module from current manifests, stable entries, public contracts, runtime registration, maintained documentation, and source-backed boundary evidence. Select one primary profile and only the additional profiles supplied by the current workset. A directory name, framework dependency, class suffix, or generated file is not sufficient classification evidence.
|
|
8
|
+
|
|
9
|
+
Read only the templates materialized for the selected profiles. Combine their questions into one deduplicated plan for the reader-visible capability; a template is guidance, not a source of facts, page counts, output paths, thresholds, or authority. Keep a repository container, public contract, runtime boundary, event flow, persistence boundary, adapter, generated-source provenance, and cross-module handoff separate when they answer different reader questions. Do not copy a template outline when source evidence does not support its sections.
|
|
10
|
+
|
|
11
|
+
## Partition and identity
|
|
12
|
+
|
|
13
|
+
For partition work, close every inventory member as owned, excluded, or unsupported and use stable semantic subjects. Each member has exactly one primary owner; extension layers may enrich but cannot claim final authority. Do not create ordinal batches or infer identity from display titles, filenames, headings, or traversal order. If no defensible semantic grouping exists, return the protocol failure that permits the CLI-owned catalog fallback.
|
|
14
|
+
|
|
15
|
+
Use only the ordered partition strategy materialized by Context for the current workset. The order is project-first and authority-bound; do not skip to a CLI builtin, substitute another strategy id, or recalculate an implementation digest. A strategy may group only the canonical members and profiles supplied with that workset.
|
|
16
|
+
|
|
17
|
+
Group related identities by a capability, entrypoint, protocol boundary, lifecycle stage, state owner, or handoff. A granular catalog is appropriate only when the selected profile and reader goal require a public API, protocol, command, or registry reference. A cross-module chain requires an explicit trigger, source-backed joins on both sides of every boundary, transformations or state handoffs, and a terminal outcome; imports or similar names do not prove execution order.
|
|
18
|
+
|
|
19
|
+
Create a reader target only from a CLI-supplied declaration, public export, contract declaration, runtime registration, approved Subject, or Partition Subject identity. Import/re-export aliases, ordinary references, internal helpers, and lightweight evidence may enrich their canonical owner but cannot independently authorize a target. Normalize aliases into the supplied canonical identity. Never promote a name merely because it appears in prose or has many inbound references.
|
|
20
|
+
|
|
21
|
+
## Author Result and evidence
|
|
22
|
+
|
|
23
|
+
For author work, produce exactly one Result for the supplied logical unit. Keep deterministic catalogs separate from explanatory prose, bind every declaration and Section to current evidence, and select only an Artifact policy variant listed in the workset. Missing material must become a canonical question disposition; never invent an answer or emit placeholder knowledge.
|
|
24
|
+
|
|
25
|
+
Treat the CLI inventory as the complete denominator, not a sample. Parser facts may prove files, declarations, entries, contracts, and relationships; they do not by themselves prove business meaning, runtime defaults, failure behavior, or ownership. Every relationship must cite the concrete evidence for its own handoff. Do not repeat one whole-page evidence set across unrelated facts, and do not reduce a multi-source fact to one arbitrary primary file.
|
|
26
|
+
|
|
27
|
+
Close every CLI-supplied example candidate with exactly one decision: link it to its public target, merge it into a canonical example for the same target and scenario, retain it as a documentation example, exclude it with a reason, or request missing material. A retained representative must decide setup, key calls, parameters, and expected behavior as either extracted facts or evidence-backed not-applicable facets. Merge only by the full example identity supplied by Context; filenames and basenames are not identities. Do not omit an unresolved candidate from the decision set, and do not treat a material request as completed linkage.
|
|
28
|
+
|
|
29
|
+
Explain stable responsibility, inputs, outputs, state and failure boundaries, the next handoff, and the evidence that supports each claim. Keep implementation bodies, generated payloads, exhaustive internal helper lists, and normalized template repetition out of reader prose. Empty Results are valid only when every target receives a legal disposition.
|
|
30
|
+
|
|
31
|
+
## Post-author composer result
|
|
32
|
+
|
|
33
|
+
For a post-author workset, use only the effective composer named by Context and the matching composer instruction materialized beside this contract. Consume the complete workset-scoped `PrimaryResultView`; do not reopen discovery, expand scope, change Subject identity or ownership, or return another complete main Result. A composer may emit only the declared `derived-artifact-proposal` kind and Artifact policy.
|
|
34
|
+
|
|
35
|
+
If a declared primary fact or Artifact requirement is absent, or the view does not support an independent reader question, return the ordinary `context.indexer.layer-fragment-result/v1` with `fragments: []` and the exact consumed view digest. This is a successful structured empty invocation, not a license to inspect temporary files or infer missing content.
|
|
36
|
+
|
|
37
|
+
## Mechanical audit and revision
|
|
38
|
+
|
|
39
|
+
Context independently validates inventory closure, owner closure, parser coverage, Artifact completeness, evidence scope, relationship candidates, semantic density, template repetition, enumeration, and implementation-body limits. These dimensions are independent; one strong dimension cannot offset a hard failure in another. Do not alter wording, Markdown syntax, sentence counts, or partitions solely to influence a counter.
|
|
40
|
+
|
|
41
|
+
For a failed metric, follow the matching entry in `references/metrics.md`. Each entry explains the denominator-preserving repair, a positive example, and an anti-example. It deliberately contains no numeric threshold: use the current CLI audit for actual, recommended, and hard values.
|
|
42
|
+
|
|
43
|
+
The reference-only reader-target metric is a zero-count hard gate. Context joins the proposed reader-target projection to its own current identity observations and separately rejects targets with no identity observation at all. Provider prose, display titles, filenames, inbound-reference counts, and self-reported target authority cannot satisfy this gate.
|
|
44
|
+
|
|
45
|
+
Context recomputes example candidate decision coverage over the complete example inventory. Representative coverage and public-target linkage keep undecided and material-request candidates in their denominator, while only a confirmed exclusion removes a candidate. A scenario variant inherits coverage only when its canonical decision chain terminates at a retained representative; it inherits public-target linkage only when that terminal decision links the exact public target.
|
|
46
|
+
|
|
47
|
+
When the current audit reports a repairable profile failure, revise the complete affected logical-unit set and return a new Result under the same stable problem lineage. Use the reported uncovered identities, failed metric ids, evidence locators, and legal actions. Request material only when reliable correction requires a source, contract, protocol, or access boundary absent from the registered scope. Three failed revisions produce one complete human report; only the explicit non-delegable profile-risk Gate may accept that runtime profile risk, and no baseline integrity failure is bypassable.
|
|
48
|
+
|
|
49
|
+
Do not return output paths, collection names, quality thresholds, pass/fail decisions, extra owners, ad hoc question contracts, or facts outside the supplied authority. Context validates structure, evidence, layout, metrics, freshness, reconciliation, and final Review independently.
|