@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,12 +1,13 @@
|
|
|
1
1
|
schema: agent-graph.provider.v1
|
|
2
2
|
id: c4a/context
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.7.0
|
|
4
4
|
name: Context workflow
|
|
5
5
|
description: Internal work contract for Context knowledge workspaces.
|
|
6
6
|
graphs:
|
|
7
7
|
- graphs/workspace.yaml
|
|
8
|
+
- graphs/indexer.yaml
|
|
8
9
|
catalogs:
|
|
9
10
|
codes: codes.yaml
|
|
10
11
|
compatibility:
|
|
11
|
-
agentGraph: ^0.2.
|
|
12
|
+
agentGraph: ^0.2.7
|
|
12
13
|
node: ">=20"
|
|
@@ -55,6 +55,12 @@ Treat those fields as structural scope evidence, not a semantic ranking. Stop
|
|
|
55
55
|
when the preview crosses the confirmed module boundary or the module
|
|
56
56
|
identity/path shape is wrong.
|
|
57
57
|
|
|
58
|
+
Also report the unit inventory: eligible/analyzed file and LOC counts,
|
|
59
|
+
discovered/read Markdown, target/exported symbols, stable entry and boundary
|
|
60
|
+
targets, exclusions and parser gaps. After extraction, read every independent
|
|
61
|
+
audit dimension and the exact uncovered identities. Use the CLI-selected
|
|
62
|
+
repair actions and matching templates; do not invent a total score.
|
|
63
|
+
|
|
58
64
|
Apply the per-index-unit policy exactly: up to 100 pages proceeds; 101–300 pages
|
|
59
65
|
warns and proceeds; more than 300 pages stops even in fully managed mode. Group
|
|
60
66
|
all oversized or capability-gap units into one explanation and one plan-revision
|
|
@@ -69,6 +75,12 @@ or mirrored areas, enable `exportedOnly`, change to an aggregate
|
|
|
69
75
|
`extractTs()` source into overlapping index units. Report a batch-total page
|
|
70
76
|
advisory as a cost signal, not a new Gate.
|
|
71
77
|
|
|
78
|
+
In fully managed mode, revise absolute failures automatically and aim for each
|
|
79
|
+
recommended target. After three attempts with the same unit/problem fingerprint,
|
|
80
|
+
stop at the single aggregated guidance Gate and report all failed modules,
|
|
81
|
+
dimensions, attempted actions, and likely missing material together. Ordinary
|
|
82
|
+
mode also makes one batch decision; it does not create one user Gate per module.
|
|
83
|
+
|
|
72
84
|
For a multi-module round, finish every pending extraction target before opening
|
|
73
85
|
one Review. For an unchanged repeat run, explain that no added, changed, or
|
|
74
86
|
removed symbols need a decision. Mention `extractTs`, `include`, `entries`,
|
|
@@ -23,7 +23,7 @@ recommendation, and describe its package root:
|
|
|
23
23
|
| `incident` | incident timelines, impact, causes, response, and prevention | `guides/` |
|
|
24
24
|
| `test` | test plans, validation scenarios, matrices, and acceptance cases | `rules/` |
|
|
25
25
|
|
|
26
|
-
`
|
|
26
|
+
`codeindex` comes from code extraction and `feats` is not a document mainline
|
|
27
27
|
collection. Filenames, URLs, titles, and example collection names are
|
|
28
28
|
insufficient evidence.
|
|
29
29
|
|
|
@@ -18,6 +18,12 @@ The user does not need to create a payload file; the Agent may write the pasted
|
|
|
18
18
|
payload to ignored scratch storage for the CLI command. Never derive a payload
|
|
19
19
|
from HTML, candidate ids, snapshots, or a default decision.
|
|
20
20
|
|
|
21
|
+
When the user completes a decision from the report, retain the exact report URL
|
|
22
|
+
or local report path and reviewed scope in the current conversation for the
|
|
23
|
+
final completion summary. Do not persist a separate workspace ledger or count a
|
|
24
|
+
report as user-reviewed when it was inaccessible, fully managed, or bypassed by
|
|
25
|
+
force approval.
|
|
26
|
+
|
|
21
27
|
Do not mention force approval when first presenting Review. If the user replies
|
|
22
28
|
without a Payload that they approve or want to continue, explain that the
|
|
23
29
|
report Payload remains the normal path. Only at that point, when the report is
|
|
@@ -28,7 +34,7 @@ that exact phrase appears in the current conversation. Phrases such as `我批
|
|
|
28
34
|
`继续`, or `全部通过` do not invoke this escape path.
|
|
29
35
|
|
|
30
36
|
Do not open Review for one page or module while another confirmed item in the
|
|
31
|
-
same round is still being generated. If a repeat
|
|
37
|
+
same round is still being generated. If a repeat codeindex run has no delta,
|
|
32
38
|
state that existing approvals were preserved and no Review gate remains.
|
|
33
39
|
|
|
34
40
|
When the user explicitly requested fully managed operation, use only the
|
|
@@ -17,11 +17,19 @@ Explain the observable impact:
|
|
|
17
17
|
- every confirmed source is a module inside that batch;
|
|
18
18
|
- several code and document modules may share the date;
|
|
19
19
|
- `date/module` appears in source refs and phase ids; and
|
|
20
|
-
- stable
|
|
20
|
+
- stable codeindex knowledge paths use the module name without the date.
|
|
21
21
|
|
|
22
22
|
Do not invent `-A`, `-B`, or sequence suffixes. If today's batch exists, append
|
|
23
23
|
the newly confirmed module to it.
|
|
24
24
|
|
|
25
|
+
When the current request already lists exact local modules or documents, do not
|
|
26
|
+
repeat the source-boundary question in either ordinary or fully managed mode.
|
|
27
|
+
Resolve each named module to one unique existing local path inside the
|
|
28
|
+
user-scoped root, then pass that path in the batch payload. Repository paths are
|
|
29
|
+
relative to the Context project root; the CLI may mechanically read their Git
|
|
30
|
+
root, `origin`, and current commit. Ask only when a name is ambiguous, no
|
|
31
|
+
matching path exists, or selecting one match would broaden the requested scope.
|
|
32
|
+
|
|
25
33
|
When inspection finds several package boundaries, show their paths and ask
|
|
26
34
|
which concrete boundaries should become sources. Explain that `include`
|
|
27
35
|
filters files inside a source and cannot select a monorepo package. Only after
|
|
@@ -6,17 +6,20 @@ mediaType: text/markdown
|
|
|
6
6
|
|
|
7
7
|
# Workflow mode after source capture
|
|
8
8
|
|
|
9
|
-
When source capture has completed
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
and
|
|
9
|
+
When source capture has completed, ask about execution mode only if the
|
|
10
|
+
conversation still has no explicit choice and no earlier mode question was
|
|
11
|
+
asked. If ordinary review or fully managed operation was already selected,
|
|
12
|
+
continue without a reminder or another confirmation. When a choice is still
|
|
13
|
+
needed, explain in the user's current conversation language that ordinary
|
|
14
|
+
review pauses at review decisions and provides HTML reports for inspection.
|
|
15
|
+
The current product estimate is that ordinary review makes the overall workflow
|
|
16
|
+
about 40% slower, with the exact difference depending on scope and response
|
|
17
|
+
time.
|
|
15
18
|
|
|
16
19
|
Offer fully managed operation for the rest of the current conversation. Explain
|
|
17
20
|
that it skips delegatable content-review surfaces and is faster, but reduces the
|
|
18
21
|
user's ability to control or adjust intermediate content. It does not bypass
|
|
19
22
|
source boundaries, external permissions, hard validation, evidence checks,
|
|
20
23
|
verification failures, or other non-delegatable safety boundaries. Do not ask
|
|
21
|
-
again
|
|
22
|
-
|
|
24
|
+
again after this one-time conversation choice, and never persist it in project
|
|
25
|
+
files.
|
|
@@ -6,9 +6,10 @@ mediaType: text/markdown
|
|
|
6
6
|
|
|
7
7
|
# Workflow mode after workspace creation
|
|
8
8
|
|
|
9
|
-
After the workspace is created,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
After the workspace is created, explain the two execution modes only when the
|
|
10
|
+
conversation has not already selected a mode and no earlier mode question was
|
|
11
|
+
asked. If the entry plan or initialization confirmation already resolved this
|
|
12
|
+
choice, continue without asking again.
|
|
12
13
|
|
|
13
14
|
- Ordinary review mode is the default. Context pauses at review decisions and
|
|
14
15
|
provides HTML reports for the user to inspect. The current product estimate is
|
|
@@ -22,4 +23,5 @@ Make clear that fully managed mode does not bypass source boundaries, external
|
|
|
22
23
|
permissions, hard validation, evidence checks, verification failures, or other
|
|
23
24
|
non-delegatable safety boundaries. Ask whether the user wants to keep the
|
|
24
25
|
default ordinary review mode or authorize fully managed operation for the
|
|
25
|
-
current conversation.
|
|
26
|
+
current conversation. This is a one-time conversation choice: do not repeat it
|
|
27
|
+
after capture or resume, and do not persist it in project files.
|
|
@@ -39,6 +39,13 @@ resources remain explicit in the capture report. Unknown non-empty XML blocks
|
|
|
39
39
|
stay auditable in the raw XML and receive a warning; the CLI does not infer
|
|
40
40
|
their meaning.
|
|
41
41
|
|
|
42
|
+
Document and resource reads share one access identity. Context first uses the
|
|
43
|
+
user identity; it falls back to the bot identity only when user credentials
|
|
44
|
+
are unavailable, never when the source denies permission or reports missing
|
|
45
|
+
scopes. This prevents a capture from mixing document text read by one identity
|
|
46
|
+
with attachments read by another. A bot fallback is reported in the capture
|
|
47
|
+
result and remains subject to the bot's own access boundary.
|
|
48
|
+
|
|
42
49
|
## Storage lifecycle
|
|
43
50
|
|
|
44
51
|
Resources have three distinct locations:
|
|
@@ -111,8 +111,8 @@ capture reports are never distributed as reader assets. See
|
|
|
111
111
|
[Lark Resource Materialization](./lark-resources.md).
|
|
112
112
|
|
|
113
113
|
The same inventory exposes `structure.relationship_coverage`. It records
|
|
114
|
-
whether selected
|
|
115
|
-
metadata, how many
|
|
114
|
+
whether selected codeindex pages have current source-backed AST relationship
|
|
115
|
+
metadata, how many codeindex views were selected, and how many package-visible
|
|
116
116
|
edges were emitted. An empty edge list is therefore explicit evidence of a
|
|
117
117
|
coverage state, not permission to invent a dependency.
|
|
118
118
|
|
|
@@ -136,7 +136,7 @@ Current collection mapping:
|
|
|
136
136
|
|
|
137
137
|
| Internal collection | Package path | Role |
|
|
138
138
|
|---|---|---|
|
|
139
|
-
| `
|
|
139
|
+
| `codeindex` | `wikis/codeindex/` | Source-backed code indexes with optional structured relationships. |
|
|
140
140
|
| `business` | `wikis/business/` | Structured business entities and relationships. |
|
|
141
141
|
| `product` | `wikis/product/` | Structured product entities, behavior, and relationships. |
|
|
142
142
|
| `architecture` | `guides/architecture/` | Architecture explanations and design narratives. |
|
|
@@ -44,10 +44,10 @@ Current reusable capabilities are:
|
|
|
44
44
|
|
|
45
45
|
| Source fact | Preferred capability | Lifecycle integration |
|
|
46
46
|
|---|---|---|
|
|
47
|
-
| TypeScript/
|
|
47
|
+
| TypeScript/JavaScript package or TSX/JSX file scope | `extractTs()` | Context-owned phase |
|
|
48
48
|
| Go declarations, imports, calls, and common HTTP routes | `@c4a/extract-go` | call from `extractCustom()` |
|
|
49
49
|
| Rush workspace packages, tags, dependencies, entries, and owners | `@c4a/extract-rush` | call from `extractCustom()`; may complement a language extractor |
|
|
50
|
-
| React Router route declarations | `extractReactRouterRoutes()` from `@c4a/extract-ts` | call from `extractCustom()`; complements
|
|
50
|
+
| React Router route declarations | `extractReactRouterRoutes()` from `@c4a/extract-ts` | call from `extractCustom()`; complements ECMAScript symbols |
|
|
51
51
|
| Rust, Python, Java/JVM, or an unsupported framework/protocol | no assumed built-in parser | project-owned `extractCustom()` adapter |
|
|
52
52
|
|
|
53
53
|
The custom extraction preview verifies this selection mechanically. Context
|
|
@@ -104,7 +104,7 @@ configuration problem, not a Review decision.
|
|
|
104
104
|
|
|
105
105
|
If no current capability can parse the source reliably, stop at configuration
|
|
106
106
|
and report the missing generic capability. Do not silently emit an empty
|
|
107
|
-
|
|
107
|
+
codeindex or reuse an unrelated parser.
|
|
108
108
|
|
|
109
109
|
## Plan Before Parsing
|
|
110
110
|
|
|
@@ -114,7 +114,7 @@ application, adapter, CLI/tool, monorepo container, derived source,
|
|
|
114
114
|
authoritative contract source, or unknown.
|
|
115
115
|
A hybrid module may declare several `moduleTypes` and several behavior `facets`;
|
|
116
116
|
keep one primary `moduleType` for concise reports. Record inspected paths in
|
|
117
|
-
`moduleTypeEvidence`, then read all matching Route-recommended files below
|
|
117
|
+
`moduleTypeEvidence`, record every Markdown file actually read in `documents`, then read all matching Route-recommended files below
|
|
118
118
|
`resources/semantic/code-index/templates/` and combine them into one plan.
|
|
119
119
|
After that, choose exactly one closed output profile: `module-map`,
|
|
120
120
|
`application-map`, `protocol-index`, `service-boundary`, `runtime-map`,
|
|
@@ -136,8 +136,9 @@ selected symbol and permits one owning index unit per source. Use it for an
|
|
|
136
136
|
intentional granular public reference. Use `extractCustom()` for module-level
|
|
137
137
|
aggregation, registries, protocol indexes, cross-module flows, or multiple
|
|
138
138
|
candidate owners over one source; each candidate declares its `module` and
|
|
139
|
-
evidence-scoped `
|
|
140
|
-
|
|
139
|
+
at least one evidence-scoped `section`; there is no page-level Markdown
|
|
140
|
+
fallback. Each section's typed coverage and exact evidence is checked against
|
|
141
|
+
the output profile during preview. Resolve repositories from
|
|
141
142
|
the extractor context's `sources[].absolutePath`, never from a
|
|
142
143
|
machine-specific checkout path. Cross-module flow output must also emit
|
|
143
144
|
source-backed structured edges. Generated clients/models, mirrored sources, legacy
|
|
@@ -47,7 +47,7 @@ kbPackage({
|
|
|
47
47
|
llmsPackage({
|
|
48
48
|
name: "component-lib-llms",
|
|
49
49
|
template: "src/package-templates/llms",
|
|
50
|
-
select: { include: ["
|
|
50
|
+
select: { include: ["codeindex/component-lib/**"] },
|
|
51
51
|
});
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -265,7 +265,7 @@ its pages instead of producing one index per path segment.
|
|
|
265
265
|
The generated
|
|
266
266
|
`dist/<package-name>/wikis/` tree is the required default
|
|
267
267
|
KB entry surface. Internal collections are mapped into OKF roots during build:
|
|
268
|
-
`
|
|
268
|
+
`codeindex`, `business`, and `product` go to `wikis/`; `architecture`, `sop`,
|
|
269
269
|
`faq`, `decision`, and `incident` go to `guides/`; `standards` and `test` go to
|
|
270
270
|
`rules/`; and `feats` goes to `feats/`. Treat `wikis/` as the structured
|
|
271
271
|
entity-and-relationship layer. Guides and rules may explain, operationalize,
|
|
@@ -313,17 +313,25 @@ wants project-specific behavior beyond knowledge lookup.
|
|
|
313
313
|
|
|
314
314
|
## Context OKF Profiles
|
|
315
315
|
|
|
316
|
-
Approved Markdown under `knowledge/`
|
|
316
|
+
Approved Markdown under `knowledge/` and its deterministic
|
|
317
|
+
`knowledge/structure.yaml` projection form the authoring source of truth:
|
|
317
318
|
|
|
318
319
|
- top-level YAML frontmatter uses OKF fields such as `type`, `title`,
|
|
319
320
|
`description`, `tags`, `timestamp`, and `resource`;
|
|
320
|
-
-
|
|
321
|
-
`
|
|
322
|
-
|
|
321
|
+
- each Markdown page keeps reader fields, stable page identity, `sources`, and a
|
|
322
|
+
small recovery capsule (`resource`, `node_type`, containment fields, and
|
|
323
|
+
relationship mode);
|
|
324
|
+
- large or repeated machine state such as complete `code_symbols`, code
|
|
325
|
+
evidence, relationship records, candidate fingerprints, and optimization
|
|
326
|
+
decisions lives once in the corresponding `structure.yaml` view record;
|
|
327
|
+
- Context readers hydrate that machine state in memory before verify, audit,
|
|
328
|
+
revision, or build. Do not copy a compact page as a new page without using a
|
|
329
|
+
Context authoring command;
|
|
323
330
|
- do not nest Context production metadata under `context`; fields such as
|
|
324
331
|
`context.sources` and `context.code_symbols` are not part of the 0.6 profile;
|
|
325
332
|
- section provenance lives in `<!-- context:section ... source_ref="..." -->`
|
|
326
|
-
comments
|
|
333
|
+
comments. When a Section needs more than one citation, the CLI preserves the
|
|
334
|
+
complete set in its adjacent `context:source_refs` block;
|
|
327
335
|
- do not add frontmatter `source_refs`; page-level provenance is derived from
|
|
328
336
|
section source refs when needed;
|
|
329
337
|
- do not add `context` or `schema` fields.
|
|
@@ -346,7 +354,7 @@ src-N#span:<heading-hint> L<start>-<end>@<span-hash>
|
|
|
346
354
|
|
|
347
355
|
The code symbol form includes the source-relative file so same-name symbols in
|
|
348
356
|
different files resolve to one exact symbol-index row. Consumers should still
|
|
349
|
-
treat the complete `source_ref` as opaque. Production
|
|
357
|
+
treat the complete `source_ref` as opaque. Production codeindex pages keep
|
|
350
358
|
`candidate_fingerprint` at the top level and do not duplicate this evidence in
|
|
351
359
|
`code_origin`.
|
|
352
360
|
|
|
@@ -398,8 +406,8 @@ current closed state.
|
|
|
398
406
|
|
|
399
407
|
Before writing output, `context build` validates that rendered template paths
|
|
400
408
|
are safe, unique, and do not collide with copied knowledge paths. For example,
|
|
401
|
-
a template file that renders to `wikis/
|
|
402
|
-
selected knowledge such as `knowledge/
|
|
409
|
+
a template file that renders to `wikis/codeindex/foo.md` is rejected if
|
|
410
|
+
selected knowledge such as `knowledge/codeindex/foo.md` maps to that same OKF
|
|
403
411
|
output path. Rename the template file or use `select.exclude` when the
|
|
404
412
|
collision is intentional.
|
|
405
413
|
|
|
@@ -35,7 +35,7 @@ the date:
|
|
|
35
35
|
```text
|
|
36
36
|
knowledge/<collection>/<slug>.md
|
|
37
37
|
knowledge/<collection>/<containment>/<slug>.md # only for an intentional hierarchy
|
|
38
|
-
knowledge/
|
|
38
|
+
knowledge/codeindex/<module>/symbol/<slug>.md
|
|
39
39
|
repo:<date>/<module>#symbol:...
|
|
40
40
|
file:<date>/<module>/<document>#span:...
|
|
41
41
|
lark:<date>/<module>/<document>#span:...
|
|
@@ -47,12 +47,12 @@ dist/<source-name>-kb/...
|
|
|
47
47
|
Choose the module boundary before extraction. In a monorepo, register each
|
|
48
48
|
confirmed package/subdirectory under the same date batch. A repo root that
|
|
49
49
|
resolves to multiple modules is for inspection; it is not an extraction unit.
|
|
50
|
-
Approved
|
|
50
|
+
Approved codeindex paths use the stable module name; the date remains only in
|
|
51
51
|
source selectors, phase ids, and evidence refs:
|
|
52
52
|
|
|
53
53
|
```text
|
|
54
|
-
knowledge/
|
|
55
|
-
knowledge/
|
|
54
|
+
knowledge/codeindex/module-a/...
|
|
55
|
+
knowledge/codeindex/module-b/...
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
For prose Views, provide a stable filename `slug` and omit `path`; the CLI
|
|
@@ -63,7 +63,7 @@ it is not a required source/module wrapper.
|
|
|
63
63
|
|
|
64
64
|
The registry stores this as one date entry containing several `modules` entries,
|
|
65
65
|
and materializes each module at `sources/repo/<date>/<module>`.
|
|
66
|
-
Repo module names are project-wide
|
|
66
|
+
Repo module names are project-wide codeindex identities and therefore cannot be
|
|
67
67
|
reused under another date batch. Refresh an existing module through its original
|
|
68
68
|
date/module selector.
|
|
69
69
|
When a repo module and the Context workspace share the same Git root, the CLI
|
|
@@ -408,7 +408,7 @@ alignProse({
|
|
|
408
408
|
```
|
|
409
409
|
|
|
410
410
|
`collection` is an internal knowledge classification, not a package directory.
|
|
411
|
-
Package build maps `
|
|
411
|
+
Package build maps `codeindex`/`business`/`product` to `wikis/`,
|
|
412
412
|
`architecture`/`sop`/`faq`/`decision`/`incident` to `guides/`,
|
|
413
413
|
`standards`/`test` to `rules/`, and `feats` to `feats/`. The complete output
|
|
414
414
|
contract is documented in [Package Outputs](../guides/package-outputs.md).
|
|
@@ -593,12 +593,12 @@ does not infer relationships or inject relation markers into verbatim body.
|
|
|
593
593
|
|
|
594
594
|
### `extractTs`
|
|
595
595
|
|
|
596
|
-
Extract exported TypeScript / TSX symbols into draft candidates:
|
|
596
|
+
Extract exported TypeScript / JavaScript / TSX / JSX symbols into draft candidates:
|
|
597
597
|
|
|
598
598
|
```ts
|
|
599
599
|
extractTs({
|
|
600
600
|
source: componentLib,
|
|
601
|
-
collection: "
|
|
601
|
+
collection: "codeindex",
|
|
602
602
|
});
|
|
603
603
|
```
|
|
604
604
|
|
|
@@ -607,8 +607,8 @@ Options:
|
|
|
607
607
|
| Field | Meaning |
|
|
608
608
|
|---|---|
|
|
609
609
|
| `source` | `source("date", "module")` for one repo module |
|
|
610
|
-
| `collection` | Code extraction uses `"
|
|
611
|
-
| `include` | Optional glob list inside the selected source; default is `["src/**/*.{ts,tsx}"]` |
|
|
610
|
+
| `collection` | Code extraction uses `"codeindex"` |
|
|
611
|
+
| `include` | Optional glob list inside the selected source; default is `["src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"]` |
|
|
612
612
|
| `mode` | `"exports"` (default) traces public exports from automatic or configured entries; `"scan"` uses every file matched by `include` as an entry root |
|
|
613
613
|
| `entries` | Optional source-relative entry files for `"exports"` mode. They override `package.json` entry detection and live only in the Context project configuration |
|
|
614
614
|
| `exportedOnly` | Defaults to `true` in `"exports"` mode and `false` in `"scan"` mode |
|
|
@@ -620,7 +620,7 @@ An explicit index unit records production intent rather than parser settings:
|
|
|
620
620
|
```ts
|
|
621
621
|
extractTs({
|
|
622
622
|
source: componentLib,
|
|
623
|
-
collection: "
|
|
623
|
+
collection: "codeindex",
|
|
624
624
|
indexUnits: [{
|
|
625
625
|
id: "component-public-api",
|
|
626
626
|
inputSources: ["20260712/component-lib"],
|
|
@@ -629,6 +629,7 @@ extractTs({
|
|
|
629
629
|
moduleTypes: ["sdk-library"],
|
|
630
630
|
facets: ["public-api", "plugin-extension"],
|
|
631
631
|
moduleTypeEvidence: ["package.json exports and src/index.ts public entry"],
|
|
632
|
+
documents: ["README.md", "docs/public-api.md"],
|
|
632
633
|
outputProfile: "public-api-reference",
|
|
633
634
|
responsibility: "Document stable exported component contracts.",
|
|
634
635
|
entries: ["src/index.ts"],
|
|
@@ -655,6 +656,9 @@ behaviors such as routing, protocol consumption, events, persistence, plugins,
|
|
|
655
656
|
release, or cross-module chains. `moduleTypeEvidence` records the inspected
|
|
656
657
|
paths that support the classification. Classify first, then read the matching
|
|
657
658
|
Route-provided code-index templates, and only then finish the extraction plan.
|
|
659
|
+
`documents` contains exact source-relative Markdown paths read for that plan;
|
|
660
|
+
Context compares it with discovered module documents instead of treating a
|
|
661
|
+
source-code comment as documentation coverage.
|
|
658
662
|
`lifecycle` is `"authoritative"`, `"generated"`, `"mirrored"`, `"legacy"`,
|
|
659
663
|
or `"vendored"`; derived sources normally use `"provenance-only"` rather
|
|
660
664
|
than duplicating reader-facing pages. These are generic project facts, not
|
|
@@ -680,7 +684,7 @@ editing the source repository:
|
|
|
680
684
|
```ts
|
|
681
685
|
extractTs({
|
|
682
686
|
source: componentLib,
|
|
683
|
-
collection: "
|
|
687
|
+
collection: "codeindex",
|
|
684
688
|
include: ["src/**/*.ts"],
|
|
685
689
|
entries: ["src/api.ts"],
|
|
686
690
|
});
|
|
@@ -740,7 +744,7 @@ remain report signals and do not create another Gate.
|
|
|
740
744
|
Phase id shape:
|
|
741
745
|
|
|
742
746
|
```text
|
|
743
|
-
extract:<source-name-or-repo>:
|
|
747
|
+
extract:<source-name-or-repo>:codeindex
|
|
744
748
|
```
|
|
745
749
|
|
|
746
750
|
Codegraph extraction has two execution policies:
|
|
@@ -751,7 +755,7 @@ Codegraph extraction has two execution policies:
|
|
|
751
755
|
the Agent re-evaluates `context status --format json`; only
|
|
752
756
|
`workflow.current` decides whether Review is now required.
|
|
753
757
|
- `context run <phase-id> --auto-promote` is the explicit CI/CD path. It is valid
|
|
754
|
-
only for `phase.extract.ts`
|
|
758
|
+
only for `phase.extract.ts` codeindex phases, applies deterministic code deltas
|
|
755
759
|
without Review, refreshes deterministic close when approved knowledge changed,
|
|
756
760
|
then runs project verification. Close or verification errors make the command
|
|
757
761
|
fail; JSON output reports applied/materialized/removed counts plus a `close`
|
|
@@ -763,7 +767,7 @@ other semantic knowledge. Agents must not infer a human gate from a phase-local
|
|
|
763
767
|
result. Human gates and their inspection/resolution Actions are exposed only by
|
|
764
768
|
`workflow.current`.
|
|
765
769
|
|
|
766
|
-
Approved
|
|
770
|
+
Approved codeindex sections use the local evidence form
|
|
767
771
|
`src-N#symbol:<file>:<symbol>:<kind>@<digest>`. The file segment makes reverse
|
|
768
772
|
lookup exact when multiple files contain the same symbol name, kind, and digest;
|
|
769
773
|
the complete ref remains opaque to agents. New pages keep only top-level
|
|
@@ -779,7 +783,7 @@ aggregated repository protocol:
|
|
|
779
783
|
extractCustom({
|
|
780
784
|
id: "extract:service:protocol",
|
|
781
785
|
sources: [service],
|
|
782
|
-
collection: "
|
|
786
|
+
collection: "codeindex",
|
|
783
787
|
indexUnits: [{
|
|
784
788
|
id: "service-protocol",
|
|
785
789
|
inputSources: ["20260811/service"],
|
|
@@ -850,6 +854,12 @@ least one source-backed structured edge. `context status` therefore treats this
|
|
|
850
854
|
pending code extraction target, and Review can verify snapshot freshness
|
|
851
855
|
without a placeholder `extractTs` phase.
|
|
852
856
|
|
|
857
|
+
Each `sections[].markdown` value is Section body content only; do not copy the
|
|
858
|
+
template heading into it. Context renders `sections[].title` and rejects nested
|
|
859
|
+
reader headings at the SDK boundary so empty template chapters cannot leak into
|
|
860
|
+
knowledge. Evidence `symbol` and `kind` are canonical-ref tokens and cannot
|
|
861
|
+
contain `:` or `@`; exact qualified signatures remain reader-facing prose.
|
|
862
|
+
|
|
853
863
|
`indexUnits` is also the batch scale and ownership contract. Candidate
|
|
854
864
|
`module` must match one declared unit id or output owner. Older callbacks that
|
|
855
865
|
omit `indexUnits` remain compatible: Context groups candidates by `module` and
|
|
@@ -879,6 +889,21 @@ output profile. Coverage is based on source-backed evidence paths, not Markdown
|
|
|
879
889
|
page count, so one aggregate page can pass while an entry-only static module
|
|
880
890
|
card cannot.
|
|
881
891
|
|
|
892
|
+
For a single-source index unit, Context also scans every represented language
|
|
893
|
+
family and Markdown/MDX file after the unit's declared exclusions. The adapter's
|
|
894
|
+
`eligibleFileTargets` and `eligibleLoc` must cover that independent baseline.
|
|
895
|
+
Configuration files may be evidence, but a hand-picked evidence list cannot be
|
|
896
|
+
reused as the source or LOC denominator. Cross-module-flow units remain scored
|
|
897
|
+
against their declared entry, protocol, operation, and handoff boundaries rather
|
|
898
|
+
than treating several repositories as one source-code page.
|
|
899
|
+
|
|
900
|
+
The same baseline discovers conventional sibling page entries, route-register
|
|
901
|
+
calls in Go router files, and exported receiver operations when a Go handler is
|
|
902
|
+
the declared service source of truth. Every discovered identity must appear in
|
|
903
|
+
the target-symbol and boundary denominators. An aggregate page may summarize
|
|
904
|
+
these identities, but an adapter cannot list one representative sibling and
|
|
905
|
+
silently omit the rest.
|
|
906
|
+
|
|
882
907
|
The extractor returns knowledge semantics (`nodeRef`, rendered Markdown,
|
|
883
908
|
Review summary and source-backed evidence). It must not write `knowledge/`,
|
|
884
909
|
`.tmp/context-runtime/lifecycle/candidates.jsonl`, extraction fingerprints or
|
|
@@ -899,9 +924,9 @@ import { indexGoRepository } from "@c4a/extract-go";
|
|
|
899
924
|
import { extractCustom } from "@c4a/context";
|
|
900
925
|
|
|
901
926
|
extractCustom({
|
|
902
|
-
id: "extract:service:
|
|
927
|
+
id: "extract:service:codeindex",
|
|
903
928
|
sources: [service],
|
|
904
|
-
collection: "
|
|
929
|
+
collection: "codeindex",
|
|
905
930
|
extract: async ({ projectRoot }) => {
|
|
906
931
|
const facts = await indexGoRepository(resolveServiceCheckout(projectRoot));
|
|
907
932
|
return { candidates: buildServiceCandidates(facts) };
|
|
@@ -927,7 +952,7 @@ and its evidence coverage auditable before candidate writes.
|
|
|
927
952
|
Declare the review step for a collection:
|
|
928
953
|
|
|
929
954
|
```ts
|
|
930
|
-
reviewValidity({ collection: "
|
|
955
|
+
reviewValidity({ collection: "codeindex" });
|
|
931
956
|
```
|
|
932
957
|
|
|
933
958
|
Declare one review gate for all current draft collections:
|
|
@@ -939,7 +964,7 @@ reviewValidity({ scope: "all" });
|
|
|
939
964
|
Phase id:
|
|
940
965
|
|
|
941
966
|
```text
|
|
942
|
-
review:
|
|
967
|
+
review:codeindex:validity
|
|
943
968
|
review:all:validity
|
|
944
969
|
```
|
|
945
970
|
|
|
@@ -965,7 +990,7 @@ continue wording does not invoke it.
|
|
|
965
990
|
|
|
966
991
|
The gate is batch-scoped: prose waits for every planned View across all active
|
|
967
992
|
structure slots and every declared `pendingStructureTargets` item in the round;
|
|
968
|
-
|
|
993
|
+
codeindex waits for every pending extract phase in the confirmed module round.
|
|
969
994
|
Candidate count/hash therefore describes the complete current batch rather than
|
|
970
995
|
one page, source slot, or module. Deterministic close later merges all active
|
|
971
996
|
slots into `knowledge/structure.yaml`, retains only their source, collection,
|
|
@@ -995,13 +1020,13 @@ const sample = source("20260712", "sample");
|
|
|
995
1020
|
|
|
996
1021
|
customPhase("custom:20260712/sample:review", async (ctx) => {
|
|
997
1022
|
await ctx.ensureSources({ source: sample });
|
|
998
|
-
await ctx.extract.ts(extractTs({ source: sample, collection: "
|
|
999
|
-
await ctx.review.html(reviewValidity({ collection: "
|
|
1023
|
+
await ctx.extract.ts(extractTs({ source: sample, collection: "codeindex" }));
|
|
1024
|
+
await ctx.review.html(reviewValidity({ collection: "codeindex" }));
|
|
1000
1025
|
});
|
|
1001
1026
|
```
|
|
1002
1027
|
|
|
1003
1028
|
Custom phases are an orchestration escape hatch. Use `extractCustom()` instead
|
|
1004
|
-
when project code needs to publish
|
|
1029
|
+
when project code needs to publish codeindex candidates. The supported runtime
|
|
1005
1030
|
helpers are:
|
|
1006
1031
|
|
|
1007
1032
|
- `ctx.ensureSources(...)` for repo source readiness.
|
|
@@ -6,14 +6,20 @@ mediaType: text/markdown
|
|
|
6
6
|
|
|
7
7
|
# Close and build
|
|
8
8
|
|
|
9
|
-
Close deterministically
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Close deterministically reconciles approved Markdown, existing durable machine
|
|
10
|
+
metadata, and confirmed structure snapshots into `knowledge/structure.yaml`.
|
|
11
|
+
It then compacts repeated machine fields out of each Markdown page and validates
|
|
12
|
+
the hydrated result. When an approved page still points at a captured source asset,
|
|
12
13
|
close may mechanically replace that target with its content-addressed
|
|
13
14
|
`knowledge/assets` path; it does not rewrite reader-visible prose. Before
|
|
14
15
|
removing the transient snapshots, it retains only each closed prose target's
|
|
15
16
|
source, collection, and consumed snapshot hash under `source_inputs`.
|
|
16
17
|
|
|
18
|
+
Do not hand-edit, duplicate, or move fields between Markdown and
|
|
19
|
+
`structure.yaml`. The CLI owns compaction and hydration. A compact Markdown page
|
|
20
|
+
remains readable and keeps enough identity for projection diagnostics; complete
|
|
21
|
+
code and optimization metadata is intentionally not duplicated.
|
|
22
|
+
|
|
17
23
|
Build runs only after close and verification are current. It writes declared
|
|
18
24
|
packages under `dist/` and records an inventory receipt with added, updated,
|
|
19
25
|
removed, and index changes.
|
|
@@ -26,11 +32,20 @@ package inventory. Revision sidecars are never emitted as separate knowledge.
|
|
|
26
32
|
Run only the current route command, then evaluate again. A successful build
|
|
27
33
|
means the currently declared scope is current; newly captured or newly declared
|
|
28
34
|
targets can reopen earlier graph nodes.
|
|
35
|
+
|
|
36
|
+
The final completion summary must cover the built outputs, validation status,
|
|
37
|
+
knowledge scale, and unresolved issues. Add a compact `Review reports` section with every
|
|
38
|
+
exact HTML report URL or local report path that the user actually used for a
|
|
39
|
+
review decision in this conversation, together with its reviewed scope. Omit
|
|
40
|
+
the section when no report was user-reviewed. Do not reconstruct it by scanning
|
|
41
|
+
`.tmp`, invent a shareable URL, or classify fully managed or force approval as
|
|
42
|
+
user review.
|
|
29
43
|
# Code-index audit record
|
|
30
44
|
|
|
31
|
-
When a package selects approved `
|
|
32
|
-
batch-level Agent audit to be accepted. The complete report
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
When a package selects approved `codeindex` pages, build requires the current
|
|
46
|
+
batch-level Agent audit to be accepted. The complete report and decision state
|
|
47
|
+
are runtime data below `.tmp/context-runtime/code-index-audit/`; deleting
|
|
48
|
+
`.tmp/` causes Context to recompute and re-audit them. They are not copied into
|
|
49
|
+
`dist/`, uploaded with the package, or committed as knowledge. The package
|
|
50
|
+
inventory stores only the report digest, decision, and compact summary needed
|
|
51
|
+
to identify the audited build.
|