@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
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol": "context.indexer.cli-release-manifest/v1",
|
|
3
|
+
"package": "@c4a/context-cli",
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"issuer": "context4ai/context",
|
|
6
|
+
"bundles": [
|
|
7
|
+
{
|
|
8
|
+
"skill": "context-code-indexer",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"distribution": {
|
|
11
|
+
"kind": "cli-bundled",
|
|
12
|
+
"locator": "cli-bundled://context/context-code-indexer"
|
|
13
|
+
},
|
|
14
|
+
"integrity": "sha256:3719500f30c5920037dc2421b1ade80befdcfba0ea0eb0e38cccf13ed1ad04b5",
|
|
15
|
+
"manifest_digest": "sha256:eee1260214de0cca784c9984158a69c1d687ba6912edff006b896a1aa536e2d4",
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"path": "SKILL.md",
|
|
19
|
+
"digest": "sha256:b0404c969051ad490e4ccfa49b44d99780bf4d052a5a31b2b252ec0463d49b78"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "context-indexer.yaml",
|
|
23
|
+
"digest": "sha256:eee1260214de0cca784c9984158a69c1d687ba6912edff006b896a1aa536e2d4"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "references/composers/contracts-and-chains.md",
|
|
27
|
+
"digest": "sha256:b462e6b140c99a05c69ab0b60f64d377e40a12ba63019e4ffcef43ea4680fce2"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "references/composers/cross-module-chain.md",
|
|
31
|
+
"digest": "sha256:a1ef4ee3a6aa248f721620b02be89b714a9fc1ff73d1ced51a9d22aeebf9e3cf"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "references/composers/development-and-delivery.md",
|
|
35
|
+
"digest": "sha256:494a2db4ca16cfb5061e4185feea4ebcbad243811bdfe52e4b8c699a60cff015"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "references/composers/event-flow.md",
|
|
39
|
+
"digest": "sha256:597a6ace833b2c1eec5cd753ac6f841b93e655a2a350812cbad93e8188286446"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "references/composers/examples-and-documentation.md",
|
|
43
|
+
"digest": "sha256:3d3e89f512d3c163f23abe6b6766b92f3835a6d194c7c4c9292083a05d124e93"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "references/composers/persistence-boundary.md",
|
|
47
|
+
"digest": "sha256:50124b8644f9fd68db5b95a5d7885d3d4433fe00b53539c6627173490fdd718b"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"path": "references/composers/protocol-boundary.md",
|
|
51
|
+
"digest": "sha256:4658e69dd1fa69920e6dcb383125f096cea8f772ea8103a38ce12d57c40ec7ae"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "references/composers/public-contract.md",
|
|
55
|
+
"digest": "sha256:aab601aed34492ec33e662471842a64512aa3fa1433cb8450fb6858e3895a89d"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "references/indexer.md",
|
|
59
|
+
"digest": "sha256:583997d7cc096ebccc3981f733608ccb553a3c6964747f95fd4d356ff08d758b"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"path": "references/metrics.md",
|
|
63
|
+
"digest": "sha256:38de0a9ef59b70e252d446b55c87796a360047571ac725baed1a7afa2379cd07"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "templates/adapter-integration.md",
|
|
67
|
+
"digest": "sha256:f6eb18e62cea2edaf08d5babf10dd9c8c4cbbcde9d5002ad35b89a4a24b2fc93"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": "templates/api-service.md",
|
|
71
|
+
"digest": "sha256:55b1f42541a001d3a86b815e14b03ac6e5dfab8480e5e133c8425c946e7e96dc"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"path": "templates/background-runtime.md",
|
|
75
|
+
"digest": "sha256:ab79645c0e32921a69dc1e82cc98da030958579ce3b525c162077d040fd7a40d"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "templates/cli-tool.md",
|
|
79
|
+
"digest": "sha256:4de15964d515a28c8f6e56786f1b287a5132159a29f5f0fae1022aaaa84c0313"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"path": "templates/component-library.md",
|
|
83
|
+
"digest": "sha256:aa21a8a0395c95e402ff58ae036c64a1cc9e6d223b676cfde50ac0556a4fb2de"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"path": "templates/contract-source.md",
|
|
87
|
+
"digest": "sha256:0380b7393cd60eec1d5430787d3406bf7e43ba97f1d87c438432ef95e4b5114b"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "templates/data-sync-reconciliation.md",
|
|
91
|
+
"digest": "sha256:eecacb3869edad0e4f31f24a6d9ed45b31da99cde90adbbd6e39b8428e06b3c6"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"path": "templates/derived-generated-source.md",
|
|
95
|
+
"digest": "sha256:da01d6c8306b1f2e9d12d1b63b66b5ed62c062ec22869bf2a9e61527d7ef98b1"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": "templates/domain-service.md",
|
|
99
|
+
"digest": "sha256:a249498adf6b6a3a88997946964c7ff11448e18a3efaba2f6feccbb7bac314d5"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"path": "templates/event-consumer.md",
|
|
103
|
+
"digest": "sha256:9884cda5e5e64bf5a96745b793cfc7eff093827119f775b8aed824a6317a2f3c"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"path": "templates/gateway-facade.md",
|
|
107
|
+
"digest": "sha256:0fbfb5195dbb84f1833aee21947c0605a0a8d85b93d2fcde577dbf85cb5b92b1"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"path": "templates/monorepo-container.md",
|
|
111
|
+
"digest": "sha256:8bfc79d942a6c7c3ccc5d8cb4ec12e2ce725bd37094d8be39133e93cf0c75d19"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"path": "templates/plugin-extension.md",
|
|
115
|
+
"digest": "sha256:bd8cd97644d6aad1900e82bf0993ed32464781203c295af8e84fca5d106e4d37"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"path": "templates/sdk-library.md",
|
|
119
|
+
"digest": "sha256:a46a8d057ba422dfb0265b9942a96fda8fa2ffe735952e545bae6480901270d7"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": "templates/storage-repository.md",
|
|
123
|
+
"digest": "sha256:800bce6f6eac3b2a672ec839c4313d85a78a2819e7aa30681ba38634e786103e"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"path": "templates/web-application.md",
|
|
127
|
+
"digest": "sha256:c8d734caec97b1a42f12fcf4cc029a4dc49cc1ba7edfbb5b7fdb9293cf40aa26"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"path": "tests/fixtures/chapters.json",
|
|
131
|
+
"digest": "sha256:0af13cfd8bc39dd43caf2f23fc92c84eb7ce5905bf683a5d7f6f6bd1ebc3ccf2"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"path": "tests/fixtures/composers.json",
|
|
135
|
+
"digest": "sha256:43dee25ee924eb2f6096fdf166e83d2e5695f25b7dda8ee625aaefdd831b68f3"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"path": "tests/fixtures/profiles.json",
|
|
139
|
+
"digest": "sha256:4dca7f2504b95c67d647c5678a1eeb4f629772b2674b5b53b49f1e382d33ba01"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"path": "tests/fixtures/scenarios.json",
|
|
143
|
+
"digest": "sha256:7f12c65cce5469f7c84b06c973bdc8179b244ee845521ca5978c5b87d6255ddd"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"skill": "context-markdown-indexer",
|
|
149
|
+
"version": "1.0.0",
|
|
150
|
+
"distribution": {
|
|
151
|
+
"kind": "cli-bundled",
|
|
152
|
+
"locator": "cli-bundled://context/context-markdown-indexer"
|
|
153
|
+
},
|
|
154
|
+
"integrity": "sha256:308c84e7ca62c87614eb8318939f7fee8ccd859907d63effd10b33247708bb48",
|
|
155
|
+
"manifest_digest": "sha256:ef7b4649f39d1ac8d38413770012c73c9a54d63d120c9d2a5bbf7c68ff8c01bc",
|
|
156
|
+
"files": [
|
|
157
|
+
{
|
|
158
|
+
"path": "SKILL.md",
|
|
159
|
+
"digest": "sha256:1c6c261541fed808ff791b48324cb490f58dd1234deb09c7a43661564d6045b3"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"path": "context-indexer.yaml",
|
|
163
|
+
"digest": "sha256:ef7b4649f39d1ac8d38413770012c73c9a54d63d120c9d2a5bbf7c68ff8c01bc"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"path": "references/classification.md",
|
|
167
|
+
"digest": "sha256:c09cf236f730eea1f3a3959ffd099cf62561e84d5c255ed047c4ee4ccad84f3c"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"path": "references/editorial-policy.md",
|
|
171
|
+
"digest": "sha256:c34d1ecc0d18d7cb0226993053523e4a7e5e6553b77e7b47d0b4264c8c78b23b"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"path": "references/indexer.md",
|
|
175
|
+
"digest": "sha256:ed506c14b13a2855c47a7503df78dd5a9abbd55d3663584369b85f4cbba14c95"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"path": "references/semantic-planning.md",
|
|
179
|
+
"digest": "sha256:fd0b7cfe28c44a7cc2bfcf4fe575c8df595a9931fae06ece1d3a48f21c9ea2b2"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"path": "references/structure-and-artifacts.md",
|
|
183
|
+
"digest": "sha256:c8a31e5ed4cad1369f3647e4eff796509db5a3609183ad7d63c215f0da9ab4c6"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"path": "tests/fixtures/anonymous.json",
|
|
187
|
+
"digest": "sha256:38c4cfe7c39f3d5358b265b39b2799219019ef1c94cc9961ef6a7b09250cbebe"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"path": "tests/fixtures/editorial.json",
|
|
191
|
+
"digest": "sha256:e62699eef46733b0b5ec52db594b88de7c45eb18e2bc22957f9e32d612182d79"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"path": "tests/fixtures/migration-equivalence.json",
|
|
195
|
+
"digest": "sha256:51f3834f5a90482d9e4aa92fad874a0661085c121e8cc78efc313a1c8b362740"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"path": "tests/fixtures/profiles.json",
|
|
199
|
+
"digest": "sha256:c43fc25f7f00a662a1fd144623041be16a149778eb88064b497aef1690f33850"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"path": "tests/fixtures/routing.json",
|
|
203
|
+
"digest": "sha256:85675d965ac67289672145e80f6cb54922eeddb5cc4b6d80b9e5ce0e5dcd8947"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local runtime and Agent integration for traceable knowledge production",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"context": "cli.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@c4a/agent-graph": "0.2.
|
|
27
|
-
"@c4a/context": "0.
|
|
26
|
+
"@c4a/agent-graph": "0.2.7",
|
|
27
|
+
"@c4a/context": "0.7.0",
|
|
28
28
|
"commander": "^11.0.0",
|
|
29
29
|
"fast-xml-parser": "^5.10.1",
|
|
30
30
|
"handlebars": "^4.7.8",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"typescript": "^5.5.4",
|
|
41
41
|
"unified": "^11.0.5",
|
|
42
42
|
"web-tree-sitter": "^0.20.8",
|
|
43
|
-
"yaml": "^2.5.1"
|
|
43
|
+
"yaml": "^2.5.1",
|
|
44
|
+
"zod": "^3.23.8"
|
|
44
45
|
},
|
|
45
46
|
"main": "./cli.js",
|
|
46
47
|
"scripts": {
|
package/plugins/README.md
CHANGED
|
@@ -2,112 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](./README_CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Context
|
|
22
|
-
|
|
23
|
-
```text
|
|
24
|
-
/c4a:context Build a searchable Agent knowledge package from our architecture
|
|
25
|
-
documents and this repository. Preserve source evidence and show me the final
|
|
26
|
-
structure before approval.
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The same entry can initialize a requested workspace, locate an existing one,
|
|
30
|
-
or continue its current production round. The Agent explains user decisions in
|
|
31
|
-
the conversation and uses the runtime for mechanical state transitions. Users
|
|
32
|
-
do not need to select low-level lifecycle commands themselves.
|
|
33
|
-
|
|
34
|
-
## Install
|
|
35
|
-
|
|
36
|
-
The plugin is bundled with the Context runtime:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install -g @c4a/context-cli@latest
|
|
40
|
-
context plugin install
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
For a source checkout, build first and install the development projection:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
bun run --filter @c4a/context-cli build
|
|
47
|
-
context plugin install --dev
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Use `context plugin install --dry-run` to inspect the host projections and
|
|
51
|
-
`context plugin status` to diagnose an installation. Refresh the Agent host
|
|
52
|
-
after changing or reinstalling the plugin.
|
|
53
|
-
|
|
54
|
-
## Entry contract
|
|
55
|
-
|
|
56
|
-
The maintained source is [`commands/context.md`](./commands/context.md). Its
|
|
57
|
-
bootstrap flow is:
|
|
58
|
-
|
|
59
|
-
1. run the read-only `context entry --language <language> --format json`;
|
|
60
|
-
2. execute only its returned `next_action.command`;
|
|
61
|
-
3. after workspace setup, treat `workflow.current` as the current-step
|
|
62
|
-
authority;
|
|
63
|
-
4. read every required Route resource completely;
|
|
64
|
-
5. execute only the selected action or configuration change;
|
|
65
|
-
6. evaluate the workspace again.
|
|
66
|
-
|
|
67
|
-
The entry does not infer workspace state from surrounding files. Initialization
|
|
68
|
-
is executed only when explicitly requested or confirmed; entering and
|
|
69
|
-
evaluating an existing workspace is read-only. There is no `context continue`
|
|
70
|
-
primitive and no stage-specific public Skill.
|
|
71
|
-
|
|
72
|
-
## Progressive workflow context
|
|
73
|
-
|
|
74
|
-
Procedures, dialogue, diagnostics, schemas, source bodies, and generated views
|
|
75
|
-
are addressable workflow resources. Static resources use content digests;
|
|
76
|
-
dynamic views are tied to the workflow revision that selected them. Read
|
|
77
|
-
receipts can keep unchanged resources current within one conversation, but a
|
|
78
|
-
receipt never proves that an external action completed.
|
|
79
|
-
|
|
80
|
-
At a human Gate, inspection and resolution resources remain phase-local. The
|
|
81
|
-
Agent loads inspection material before a decision and resolution material only
|
|
82
|
-
after confirmation. This keeps the ordinary review path available without
|
|
83
|
-
preloading every possible decision surface.
|
|
84
|
-
|
|
85
|
-
## Fully managed conversations
|
|
86
|
-
|
|
87
|
-
Fully managed operation is used only after the user explicitly authorizes it in
|
|
88
|
-
the current conversation. The Agent then starts with:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
context run --managed --until blocked-or-complete --format json
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
The loop executes consecutive deterministic actions and Route-delegated Gates,
|
|
95
|
-
re-evaluating after every action. It stops before semantic reading, project
|
|
96
|
-
configuration, unresolved permission, diagnostic repair, or a non-unique plan.
|
|
97
|
-
Managed authority is never persisted or reused in another conversation.
|
|
98
|
-
|
|
99
|
-
## Boundaries
|
|
100
|
-
|
|
101
|
-
- The plugin does not call an LLM; it is consumed by the host Agent.
|
|
102
|
-
- All workspace lifecycle writes go through Route-selected Context actions.
|
|
103
|
-
- It does not silently clone, fetch, checkout, install, build, test, or read
|
|
104
|
-
external content without the required authority.
|
|
105
|
-
- It does not duplicate workflow facts or lifecycle routing in the prompt.
|
|
106
|
-
- It keeps CLI tokens, paths, ids, flags, and `source_ref` values unchanged,
|
|
107
|
-
while explaining decisions in the user's current conversation language.
|
|
108
|
-
|
|
109
|
-
## Maintainer note
|
|
110
|
-
|
|
111
|
-
`plugin/` is the only hand-maintained integration source. The build projects it
|
|
112
|
-
to Claude commands, Codex Skills, Cursor commands, and a Skill-only layout under
|
|
113
|
-
`dist/plugins`. Do not edit generated projections directly.
|
|
5
|
+
This directory is the only human-maintained source for the Context Agent
|
|
6
|
+
integration. It contains the single Context entry Skill, the Code and Markdown
|
|
7
|
+
Indexer Provider Skills, host manifest templates, and shared assets.
|
|
8
|
+
|
|
9
|
+
Run `bun run --filter @c4a/context-cli build:plugin` to regenerate the npm
|
|
10
|
+
projection and the committed `repo-install/` tree. Do not edit generated files
|
|
11
|
+
under `repo-install/` or `packages/context-cli/dist/plugins/`.
|
|
12
|
+
|
|
13
|
+
`repo-install/{claude,codex,cursor}/` contains host-specific plugin roots with
|
|
14
|
+
only the public Context entry; `repo-install/skills/` is the portable Skill
|
|
15
|
+
projection. In the same install, `context plugin install` projects Providers
|
|
16
|
+
to the Codex/Cursor shared `~/.agents/skills` directory and Claude's
|
|
17
|
+
`~/.claude/skills`, so Provider names do not inherit a plugin namespace.
|
|
18
|
+
|
|
19
|
+
The conversational entry delegates workspace state and lifecycle authority to
|
|
20
|
+
the local `context` CLI. Indexer Skills are activated only through the verified
|
|
21
|
+
Context workflow and Indexer Provider lifecycle.
|
package/plugins/README_CN.md
CHANGED
|
@@ -2,95 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本目录是 Context Agent 接入唯一的人工维护真源,包含单一 Context 入口 Skill、
|
|
6
|
+
Code/Markdown Indexer Provider Skills、各宿主 manifest 模板和共享资产。
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
运行 `bun run --filter @c4a/context-cli build:plugin` 可重新生成 npm 投影及提交到
|
|
9
|
+
仓库的 `repo-install/`。不要直接编辑 `repo-install/` 或
|
|
10
|
+
`packages/context-cli/dist/plugins/` 下的生成文件。
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
`repo-install/{claude,codex,cursor}/` 分别是只包含 Context 主入口的宿主插件根;
|
|
13
|
+
`repo-install/skills/` 是可移植 Skill 投影。`context plugin install` 在同一次安装中
|
|
14
|
+
把 Provider 投影到 Codex/Cursor 共用的 `~/.agents/skills` 与 Claude 的
|
|
15
|
+
`~/.claude/skills`,因此 Provider 不获得插件命名空间。
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
安装接入并刷新 Agent 宿主后,调用 Context 入口并说明期望知识:
|
|
17
|
-
|
|
18
|
-
```text
|
|
19
|
-
/c4a:context 请把架构文档和当前仓库整理成可搜索的 Agent 知识包,保留来源证据,
|
|
20
|
-
最终结构批准前先让我确认。
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
同一个入口可以初始化用户请求的工作区、定位已有工作区,或继续当前知识生产轮次。
|
|
24
|
-
Agent 在对话中解释用户决策,并使用运行时完成机械状态变更;用户不需要自行选择
|
|
25
|
-
底层生命周期命令。
|
|
26
|
-
|
|
27
|
-
## 安装
|
|
28
|
-
|
|
29
|
-
插件随 Context 运行时一起发布:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm install -g @c4a/context-cli@latest
|
|
33
|
-
context plugin install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
从源码开发时,先构建再安装开发投影:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
bun run --filter @c4a/context-cli build
|
|
40
|
-
context plugin install --dev
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
`context plugin install --dry-run` 可以预览宿主投影,`context plugin status`
|
|
44
|
-
用于诊断安装。修改或重装插件后需要刷新 Agent 宿主。
|
|
45
|
-
|
|
46
|
-
## 入口契约
|
|
47
|
-
|
|
48
|
-
人工维护的源文件是 [`commands/context.md`](./commands/context.md),启动流程为:
|
|
49
|
-
|
|
50
|
-
1. 运行只读的 `context entry --language <language> --format json`;
|
|
51
|
-
2. 只执行它返回的 `next_action.command`;
|
|
52
|
-
3. 工作区就绪后,将 `workflow.current` 视为当前步骤权威;
|
|
53
|
-
4. 完整读取当前 Route 的所有必需资源;
|
|
54
|
-
5. 只执行选中的动作或配置修改;
|
|
55
|
-
6. 再次求值工作区。
|
|
56
|
-
|
|
57
|
-
入口不会根据周边文件自行推断工作区状态。只有用户明确请求或确认时才执行初始化;
|
|
58
|
-
进入或求值已有工作区是只读行为。不存在 `context continue` primitive,也没有阶段
|
|
59
|
-
专属的公开 Skill。
|
|
60
|
-
|
|
61
|
-
## 按需加载工作流上下文
|
|
62
|
-
|
|
63
|
-
操作说明、对话、诊断、Schema、来源正文和生成 View 都是可寻址的工作流资源。
|
|
64
|
-
静态资源使用内容 digest,动态 View 绑定选择它的 workflow revision。读取回执可以
|
|
65
|
-
在同一对话中复用未变化资源,但不能证明外部动作已经完成。
|
|
66
|
-
|
|
67
|
-
人工 Gate 的检查和决议资源保持阶段隔离:Agent 在决定前加载 inspection 内容,
|
|
68
|
-
用户确认后才加载 resolution 内容。这样既保留普通审核能力,也不会预加载所有可能
|
|
69
|
-
的决策界面。
|
|
70
|
-
|
|
71
|
-
## 全托管对话
|
|
72
|
-
|
|
73
|
-
只有用户在当前对话明确授权后,才使用全托管模式。Agent 从以下命令开始:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
context run --managed --until blocked-or-complete --format json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
循环会执行连续的确定性动作和 Route-delegated Gate,并在每个动作后重新求值。遇到
|
|
80
|
-
语义阅读、项目配置、未解决权限、诊断修复或非唯一计划时停止。全托管权限不会被
|
|
81
|
-
持久化,也不能在另一场对话复用。
|
|
82
|
-
|
|
83
|
-
## 边界
|
|
84
|
-
|
|
85
|
-
- 插件本身不调用 LLM,而是由宿主 Agent 消费。
|
|
86
|
-
- 所有工作区生命周期写入都通过 Route 选择的 Context Action 完成。
|
|
87
|
-
- 不会在缺少相应授权时静默 clone、fetch、checkout、install、build、test 或
|
|
88
|
-
读取外部内容。
|
|
89
|
-
- 不在 Prompt 中复制工作流事实或生命周期路由。
|
|
90
|
-
- CLI token、路径、id、flag 和 `source_ref` 保持原样;面向用户的解释使用当前
|
|
91
|
-
对话语言。
|
|
92
|
-
|
|
93
|
-
## 维护说明
|
|
94
|
-
|
|
95
|
-
`plugin/` 是唯一人工维护的接入源。构建会将它投影为 `dist/plugins` 下的 Claude
|
|
96
|
-
commands、Codex Skills、Cursor commands 和纯 Skill 目录。不要直接编辑生成投影。
|
|
17
|
+
对话入口把工作区状态和 workflow 生命周期权威交给本地 `context` CLI;Indexer
|
|
18
|
+
Skills 只能通过完成校验的 Context Indexer Provider 生命周期激活。
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.7.0
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c4a",
|
|
3
3
|
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "c4a"
|
|
7
|
-
},
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"author": { "name": "c4a" },
|
|
8
6
|
"license": "MIT",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"context",
|
|
11
|
-
"knowledge-base",
|
|
12
|
-
"wiki",
|
|
13
|
-
"claude-plugin",
|
|
14
|
-
"c4a"
|
|
15
|
-
]
|
|
7
|
+
"keywords": ["context", "knowledge-base", "wiki", "claude-plugin", "c4a"]
|
|
16
8
|
}
|
package/plugins/claude/CLAUDE.md
CHANGED
package/plugins/claude/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Build or continue structured, traceable Agent knowledge from documents and code."
|
|
2
|
+
description: "Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes."
|
|
3
3
|
argument-hint: "[project-dir or user intent]"
|
|
4
4
|
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
5
|
---
|
|
@@ -26,6 +26,18 @@ Run:
|
|
|
26
26
|
context entry [project-dir] --language <language> --format json
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
If the request does not already choose ordinary review or fully managed
|
|
30
|
+
operation, first use the read-only entry result to state a short execution
|
|
31
|
+
plan, then ask the user to choose once. Explain that ordinary review pauses at
|
|
32
|
+
human Gates and presents HTML reports, while fully managed operation resolves
|
|
33
|
+
delegatable Gates within this conversation but still stops for permissions,
|
|
34
|
+
hard validation, or non-delegatable decisions. Prefer the host's native choice
|
|
35
|
+
UI. When initialization already needs a confirmation or missing option, combine
|
|
36
|
+
the mode choice with that question instead of adding another round. Keep the
|
|
37
|
+
answer only in this conversation and do not ask again after initialization,
|
|
38
|
+
capture, or resume. An explicit request for review, human confirmation, fully
|
|
39
|
+
managed work, or no further review already resolves this choice.
|
|
40
|
+
|
|
29
41
|
Use the user's explicit language choice when present; otherwise pass `zh-CN`
|
|
30
42
|
for a Chinese conversation and `en` for an English conversation. Pass
|
|
31
43
|
`project-dir`, `--name`, `--dev`, or `--debug` only when the user explicitly
|
|
@@ -91,12 +103,14 @@ before workflow evaluation. Debugging records traces below
|
|
|
91
103
|
source evidence.
|
|
92
104
|
|
|
93
105
|
Document optimization is enabled by default for newly initialized workspaces.
|
|
94
|
-
It
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
106
|
+
It performs source-constrained editorial revision: the CLI identifies
|
|
107
|
+
readability and knowledge-value signals, and the Agent may keep, repair,
|
|
108
|
+
reshape, or safely omit content only inside its existing source Section. It
|
|
109
|
+
must preserve facts, link targets, images, code, numbers, identifiers, and
|
|
110
|
+
source evidence. Approved pages remain source-faithful; only changed full-page
|
|
111
|
+
revisions are stored beside them as `knowledge/**/*__revision.md`. Default
|
|
112
|
+
knowledge discovery excludes those reserved sidecars, and internal editorial
|
|
113
|
+
audit state is not included in package output.
|
|
100
114
|
|
|
101
115
|
For an existing workspace, respect its current `package.json` setting. Run
|
|
102
116
|
`context optimize-docs enable` or `context optimize-docs disable` only when the
|
|
@@ -123,6 +137,89 @@ The managed loop executes only Route-selected work and returns the current
|
|
|
123
137
|
host execution, diagnostics, or a non-unique plan needs attention. Resume from
|
|
124
138
|
that returned Route; never reconstruct a command from an earlier step.
|
|
125
139
|
|
|
140
|
+
Code knowledge is published under `codeindex`. Context mechanically audits each
|
|
141
|
+
module's input analysis, stable boundaries, facts, explanation, evidence scope,
|
|
142
|
+
and page shape without producing a total score. In fully managed operation,
|
|
143
|
+
follow returned repair actions automatically; after three failed revisions of
|
|
144
|
+
the same module problem, stop at the one aggregated human-guidance Gate. If a
|
|
145
|
+
legacy workspace returns `route.extract.codeindex-migration-required`, execute
|
|
146
|
+
only its migration command; do not rename `codegraph` paths manually.
|
|
147
|
+
|
|
148
|
+
### Discover Indexer Providers before selection
|
|
149
|
+
|
|
150
|
+
For `indexer-provider-required`, `indexer-provider-unavailable`,
|
|
151
|
+
`indexer-customization-required`, `indexer-customization-invalid`, or
|
|
152
|
+
`indexer-customization-upstream-changed`, read
|
|
153
|
+
`node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`
|
|
154
|
+
before proposing a selection or project change. It defines the registry-only
|
|
155
|
+
default, six-level customization ladder, upgrade conflict handling, debugging
|
|
156
|
+
commands, and the exit condition for each level. Do not replace it with a
|
|
157
|
+
remembered or host-specific workflow.
|
|
158
|
+
|
|
159
|
+
When the current Route starts a new Code or Markdown indexing task, run this
|
|
160
|
+
read-only command once before creating or changing any Provider registry entry:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
context indexer catalog --format json
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Report the returned CLI-bundled entry Skills together with every other Indexer
|
|
167
|
+
Skill already visible through the current host. The conversational report must
|
|
168
|
+
include each Skill name, readable exact version when available, and source type
|
|
169
|
+
(CLI-bundled community, workspace, installed plugin, or authorized marketplace
|
|
170
|
+
result). When the host already exposes an exact Skill root or `SKILL.md` path,
|
|
171
|
+
read only its YAML frontmatter and sibling `context-indexer.yaml` during
|
|
172
|
+
discovery. The manifest version is authoritative;
|
|
173
|
+
`metadata.context-provider-version` is a readable copy that must match it. Do
|
|
174
|
+
not load the Provider body or other guidance until the Route selects it. If the
|
|
175
|
+
host exposes no readable root or exact version, report the version as
|
|
176
|
+
unavailable rather than guessing it.
|
|
177
|
+
|
|
178
|
+
Group observations with the same Skill name and exact version into one
|
|
179
|
+
conversational item and list all observed source types on that item. An
|
|
180
|
+
installed projection of an identical CLI-bundled identity is not a second
|
|
181
|
+
Provider. Keep different versions separate. The route input still preserves
|
|
182
|
+
each distinct source observation as its own `visible_skills` entry because
|
|
183
|
+
`source_type` is singular; never use source count or discovery order as
|
|
184
|
+
selection precedence. Do not search arbitrary directories, infer host cache
|
|
185
|
+
paths, install a plugin, or query a marketplace unless the user separately
|
|
186
|
+
authorizes it. Keep this discovery report only in the conversation: do not
|
|
187
|
+
write it to `src/`, `package.json`, lifecycle state, receipts, audit output, or
|
|
188
|
+
`dist/`. Do not repeat it during an unchanged task resume; repeat it only for a
|
|
189
|
+
new indexing task, a changed host-visible Skill set, or an explicit diagnostic
|
|
190
|
+
request.
|
|
191
|
+
|
|
192
|
+
After the requirements are applied, author one
|
|
193
|
+
`context.indexer.provider-route-input/v1` payload whose `registry` preserves
|
|
194
|
+
the applied `requirements` block exactly and whose `visible_skills` contains
|
|
195
|
+
only the just-reported path-free identities. Route it before any Host resolves
|
|
196
|
+
or reads an external Provider:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
context indexer route-indexer-provider-selection --input <payload.yaml-or-json> --format json
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
On `community-fallback-required`, retry with the applicable CLI-bundled profile
|
|
203
|
+
and set `community_fallback_attempted: true`. Read-scope overlap is allowed, but
|
|
204
|
+
an exact primary owner-cell conflict must be resolved explicitly; do not use
|
|
205
|
+
array or discovery order as precedence. If fallback leaves a required owner
|
|
206
|
+
cell uncovered, preserve the returned `capability_gap_proof`. Only the Route's
|
|
207
|
+
following `propose-indexer-customization` Agent Action may turn that exact proof
|
|
208
|
+
into a dependency-free minimal `extend` draft; do not weaken the requirement,
|
|
209
|
+
write source, add dependencies, or claim the draft is applied.
|
|
210
|
+
|
|
211
|
+
Only `selection-validation-required` returns a
|
|
212
|
+
`selection_proposal_input`. Pass that exact object to:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
context indexer validate-indexer-selection-proposal --input <payload.yaml-or-json> --format json
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Use only the returned `next_provider_requests` for resolution. A successful
|
|
219
|
+
static report does not authorize materialization, installation, execution, or
|
|
220
|
+
writing the proposal into `src/indexers.yaml`; continue through the Route's
|
|
221
|
+
resolver, staging, final validation, confirmation, and apply Actions.
|
|
222
|
+
|
|
126
223
|
### Follow the current Route
|
|
127
224
|
|
|
128
225
|
Treat `workflow.current` as the current-step authority:
|
|
@@ -168,6 +265,14 @@ Explain, ask, confirm, and summarize in the user's current conversation
|
|
|
168
265
|
language. Keep commands, flags, paths, ids, status values, JSONL keys,
|
|
169
266
|
`source_ref` values, and copied CLI tokens unchanged.
|
|
170
267
|
|
|
268
|
+
Keep a conversation-local list of HTML review reports that the user actually
|
|
269
|
+
used to make a review decision. Preserve each exact report URL or local path
|
|
270
|
+
and its reviewed scope when the Route provides them. In the final completion
|
|
271
|
+
summary, include one compact `Review reports` section containing those exact
|
|
272
|
+
references. Do not scan workspace internals to reconstruct the list, persist a
|
|
273
|
+
second ledger, invent a public URL, or describe an inaccessible report or a
|
|
274
|
+
fully managed/force approval as user-reviewed.
|
|
275
|
+
|
|
171
276
|
When the user explicitly asks to publish a completed build, treat publication
|
|
172
277
|
as a downstream distribution step outside the Context Route. Use only an
|
|
173
278
|
explicitly installed distribution tool and its documented complete-output
|