@c4a/context-cli 0.7.1 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -39
- package/README.zh-CN.md +13 -27
- package/cli.js +59797 -81281
- package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
- package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
- package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
- package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
- package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
- package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
- package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
- package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/indexers/contracts/operator-contract.json +2 -2
- package/indexers/contracts/profile-contract.json +3819 -454
- package/indexers/release-manifest.json +22 -22
- package/package.json +12 -2
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +44 -85
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +44 -85
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +44 -85
- package/plugins/skills/context/SKILL.md +44 -85
- package/plugins/skills/context-code-indexer/SKILL.md +30 -3
- package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
- package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
- package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
- package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
- package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
- package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
- package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
- package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
- package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
- package/providers/context/actions/configure-indexer-providers.yaml +1 -1
- package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
- package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
- package/providers/context/codes.yaml +6 -22
- package/providers/context/graphs/indexer.yaml +73 -564
- package/providers/context/graphs/workspace.yaml +5 -44
- package/providers/context/manifest.json +77 -666
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/dialogue/human-gates.md +3 -3
- package/providers/context/resources/manuals/reference/package-templates.md +2 -3
- package/providers/context/resources/manuals/reference/project-api.md +52 -986
- package/providers/context/resources/procedures/close-and-build.md +8 -23
- package/providers/context/resources/procedures/knowledge-review.md +13 -4
- package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
- package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
- package/providers/context/schemas/indexer-agent-step-input.schema.json +2 -2
- package/providers/context/schemas/indexer-agent-step-result.schema.json +298 -32
- package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
- package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
- package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
- package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
- package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +51 -2
- package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +32 -0
- package/providers/context/skills/configure-indexer-providers/SKILL.md +40 -27
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +34 -8
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +5 -4
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +38 -9
- package/docs/document-optimization.md +0 -82
- package/docs/document-optimization.zh-CN.md +0 -70
- package/indexers/capability-manifest.json +0 -35
- package/indexers/contracts/hard-rule-conformance.json +0 -2644
- package/providers/context/actions/accept-main-index-run.yaml +0 -7
- package/providers/context/actions/accept-material-answer-run.yaml +0 -7
- package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
- package/providers/context/actions/audit-material-gap-state.yaml +0 -8
- package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
- package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
- package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
- package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
- package/providers/context/actions/build-material-question-workset.yaml +0 -7
- package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/build-question-target-inventory.yaml +0 -7
- package/providers/context/actions/build-subject-catalog.yaml +0 -7
- package/providers/context/actions/build-target-resolution-views.yaml +0 -7
- package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
- package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
- package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
- package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
- package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
- package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
- package/providers/context/actions/fail-main-index-run.yaml +0 -7
- package/providers/context/actions/fail-material-answer-run.yaml +0 -7
- package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
- package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
- package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
- package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
- package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/override-index-profile-audit.yaml +0 -7
- package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
- package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
- package/providers/context/actions/reconcile-review-identities.yaml +0 -5
- package/providers/context/actions/record-index-profile-revision.yaml +0 -7
- package/providers/context/actions/report-index-profile-failure.yaml +0 -7
- package/providers/context/actions/resolve-effective-composers.yaml +0 -7
- package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
- package/providers/context/actions/revise-document.yaml +0 -5
- package/providers/context/actions/revise-index-output.yaml +0 -7
- package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
- package/providers/context/actions/start-main-index-run.yaml +0 -7
- package/providers/context/actions/start-material-answer-run.yaml +0 -7
- package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
- package/providers/context/resources/procedures/document-revision.md +0 -36
- package/providers/context/resources/views/document-optimization-current.yaml +0 -6
- package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
- package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
- package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
- package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
- package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
- package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
- package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
- package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
- package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
- package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
- package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
- package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
- package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
- package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
- package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
- package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
- package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
- package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
- package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
- package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
- package/providers/context/skills/revise-index-output/SKILL.md +0 -12
|
@@ -4,33 +4,29 @@
|
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["protocol", "requirement_set_digest"
|
|
7
|
+
"required": ["protocol", "requirement_set_digest"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"protocol": { "const": "context.indexer.question-target-inventory-input/v1" },
|
|
10
|
-
"requirement_set_digest": { "$ref": "#/$defs/digest" }
|
|
11
|
-
"profile_contract_digests": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/digest" } },
|
|
12
|
-
"source_inventory_digests": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/digest" } },
|
|
13
|
-
"items": { "type": "array", "items": { "type": "object" } }
|
|
10
|
+
"requirement_set_digest": { "$ref": "#/$defs/digest" }
|
|
14
11
|
},
|
|
15
12
|
"additionalProperties": false
|
|
16
13
|
},
|
|
17
14
|
{
|
|
18
15
|
"type": "object",
|
|
19
|
-
"required": ["protocol", "
|
|
16
|
+
"required": ["protocol", "question_target_inventory"],
|
|
20
17
|
"properties": {
|
|
21
18
|
"protocol": { "const": "context.indexer.main-partition-workset-build-input/v1" },
|
|
22
|
-
"
|
|
19
|
+
"question_target_inventory": { "type": "object" }
|
|
23
20
|
},
|
|
24
21
|
"additionalProperties": false
|
|
25
22
|
},
|
|
26
23
|
{
|
|
27
24
|
"type": "object",
|
|
28
|
-
"required": ["protocol", "request", "result", "
|
|
25
|
+
"required": ["protocol", "request", "result", "validation"],
|
|
29
26
|
"properties": {
|
|
30
27
|
"protocol": { "const": "context.indexer.main-run-validation-input/v1" },
|
|
31
28
|
"request": { "type": "object" },
|
|
32
29
|
"result": { "type": "object" },
|
|
33
|
-
"workset_read_receipts": { "type": "array", "minItems": 1, "items": { "type": "object" } },
|
|
34
30
|
"validation": { "type": "object" }
|
|
35
31
|
},
|
|
36
32
|
"additionalProperties": false
|
|
@@ -60,11 +56,11 @@
|
|
|
60
56
|
},
|
|
61
57
|
{
|
|
62
58
|
"type": "object",
|
|
63
|
-
"required": ["protocol", "partitions", "
|
|
59
|
+
"required": ["protocol", "partitions", "target_resolution_views"],
|
|
64
60
|
"properties": {
|
|
65
61
|
"protocol": { "const": "context.indexer.main-author-workset-build-input/v1" },
|
|
66
62
|
"partitions": { "type": "array", "minItems": 1, "items": { "type": "object" } },
|
|
67
|
-
"
|
|
63
|
+
"target_resolution_views": { "type": "array", "items": { "type": "object" } }
|
|
68
64
|
},
|
|
69
65
|
"additionalProperties": false
|
|
70
66
|
},
|
|
@@ -124,38 +120,35 @@
|
|
|
124
120
|
},
|
|
125
121
|
{
|
|
126
122
|
"type": "object",
|
|
127
|
-
"required": ["protocol", "requirement_set_digest", "workset_digest", "result"
|
|
123
|
+
"required": ["protocol", "requirement_set_digest", "workset_digest", "result"],
|
|
128
124
|
"properties": {
|
|
129
125
|
"protocol": { "const": "context.indexer.main-run-partition-convergence-input/v1" },
|
|
130
126
|
"requirement_set_digest": { "$ref": "#/$defs/digest" },
|
|
131
127
|
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
132
|
-
"result": { "type": "object" }
|
|
133
|
-
"workset_read_receipts": { "type": "array", "minItems": 1, "items": { "type": "object" } }
|
|
128
|
+
"result": { "type": "object" }
|
|
134
129
|
},
|
|
135
130
|
"additionalProperties": false
|
|
136
131
|
},
|
|
137
132
|
{
|
|
138
133
|
"type": "object",
|
|
139
|
-
"required": ["protocol", "requirement_set_digest", "request", "convergence", "validation"
|
|
134
|
+
"required": ["protocol", "requirement_set_digest", "request", "convergence", "validation"],
|
|
140
135
|
"properties": {
|
|
141
136
|
"protocol": { "const": "context.indexer.catalog-fallback-build-input/v1" },
|
|
142
137
|
"requirement_set_digest": { "$ref": "#/$defs/digest" },
|
|
143
138
|
"request": { "type": "object" },
|
|
144
139
|
"convergence": { "type": "object" },
|
|
145
|
-
"validation": { "type": "object" }
|
|
146
|
-
"workset_read_receipts": { "type": "array", "minItems": 1, "items": { "type": "object" } }
|
|
140
|
+
"validation": { "type": "object" }
|
|
147
141
|
},
|
|
148
142
|
"additionalProperties": false
|
|
149
143
|
},
|
|
150
144
|
{
|
|
151
145
|
"type": "object",
|
|
152
|
-
"required": ["protocol", "requirement_set_digest", "workset_digest", "result"
|
|
146
|
+
"required": ["protocol", "requirement_set_digest", "workset_digest", "result"],
|
|
153
147
|
"properties": {
|
|
154
148
|
"protocol": { "const": "context.indexer.main-run-store-accept-input/v1" },
|
|
155
149
|
"requirement_set_digest": { "$ref": "#/$defs/digest" },
|
|
156
150
|
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
157
|
-
"result": { "type": "object" }
|
|
158
|
-
"workset_read_receipts": { "type": "array", "minItems": 1, "items": { "type": "object" } }
|
|
151
|
+
"result": { "type": "object" }
|
|
159
152
|
},
|
|
160
153
|
"additionalProperties": false
|
|
161
154
|
},
|
|
@@ -17,11 +17,26 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "object",
|
|
20
|
-
"required": ["protocol", "worksets", "workset_set"],
|
|
20
|
+
"required": ["protocol", "requirement_set_digest", "worksets", "workset_set", "run_specs", "graph_outcome"],
|
|
21
21
|
"properties": {
|
|
22
|
-
"protocol": { "
|
|
22
|
+
"protocol": { "const": "context.indexer.main-partition-workset-build/v1" },
|
|
23
|
+
"requirement_set_digest": { "$ref": "#/$defs/digest" },
|
|
24
|
+
"worksets": { "type": "array" },
|
|
25
|
+
"workset_set": { "type": "object" },
|
|
26
|
+
"run_specs": { "type": "array", "minItems": 1, "items": { "type": "object" } },
|
|
27
|
+
"graph_outcome": { "const": "completed" }
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["protocol", "requirement_set_digest", "worksets", "workset_set", "run_specs", "graph_outcome"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"protocol": { "const": "context.indexer.main-author-workset-build/v1" },
|
|
36
|
+
"requirement_set_digest": { "$ref": "#/$defs/digest" },
|
|
23
37
|
"worksets": { "type": "array" },
|
|
24
38
|
"workset_set": { "type": "object" },
|
|
39
|
+
"run_specs": { "type": "array", "minItems": 1, "items": { "type": "object" } },
|
|
25
40
|
"graph_outcome": { "const": "completed" }
|
|
26
41
|
},
|
|
27
42
|
"additionalProperties": false
|
|
@@ -23,7 +23,14 @@
|
|
|
23
23
|
"additionalProperties": false,
|
|
24
24
|
"required": ["kind", "resource_ref", "digest", "content"],
|
|
25
25
|
"properties": {
|
|
26
|
-
"kind": {
|
|
26
|
+
"kind": {
|
|
27
|
+
"enum": [
|
|
28
|
+
"provider",
|
|
29
|
+
"template",
|
|
30
|
+
"composer",
|
|
31
|
+
"customization-append"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
27
34
|
"resource_ref": { "type": "string", "minLength": 1 },
|
|
28
35
|
"digest": { "$ref": "#/$defs/digest" },
|
|
29
36
|
"content": { "type": "string" }
|
|
@@ -23,10 +23,59 @@
|
|
|
23
23
|
},
|
|
24
24
|
"validation_result": {
|
|
25
25
|
"type": "object",
|
|
26
|
-
"
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": [
|
|
28
|
+
"protocol",
|
|
29
|
+
"outcome",
|
|
30
|
+
"graph_outcome",
|
|
31
|
+
"validation_input_digest",
|
|
32
|
+
"project_ref",
|
|
33
|
+
"overlay",
|
|
34
|
+
"effective_profile",
|
|
35
|
+
"conformance_report",
|
|
36
|
+
"validation_receipt",
|
|
37
|
+
"result_digest"
|
|
38
|
+
],
|
|
27
39
|
"properties": {
|
|
28
40
|
"protocol": { "const": "context.indexer.contract-overlay-validation-result/v1" },
|
|
29
|
-
"outcome": { "const": "
|
|
41
|
+
"outcome": { "const": "valid" },
|
|
42
|
+
"graph_outcome": { "const": "completed" },
|
|
43
|
+
"validation_input_digest": { "$ref": "#/$defs/digest" },
|
|
44
|
+
"project_ref": { "type": "string", "minLength": 1 },
|
|
45
|
+
"overlay": { "type": "object" },
|
|
46
|
+
"effective_profile": { "type": "object" },
|
|
47
|
+
"conformance_report": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["protocol", "report_digest"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"protocol": { "const": "context.indexer.overlay-conformance-report/v1" },
|
|
52
|
+
"report_digest": { "$ref": "#/$defs/digest" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"validation_receipt": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": [
|
|
59
|
+
"protocol",
|
|
60
|
+
"project_ref",
|
|
61
|
+
"overlay_digest",
|
|
62
|
+
"base_contract_digest",
|
|
63
|
+
"provider_integrity",
|
|
64
|
+
"operator_contract_digest",
|
|
65
|
+
"conformance_report_digest",
|
|
66
|
+
"receipt_digest"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"protocol": { "const": "context.indexer.overlay-validation-receipt/v1" },
|
|
70
|
+
"project_ref": { "type": "string", "minLength": 1 },
|
|
71
|
+
"overlay_digest": { "$ref": "#/$defs/digest" },
|
|
72
|
+
"base_contract_digest": { "$ref": "#/$defs/digest" },
|
|
73
|
+
"provider_integrity": { "$ref": "#/$defs/digest" },
|
|
74
|
+
"operator_contract_digest": { "$ref": "#/$defs/digest" },
|
|
75
|
+
"conformance_report_digest": { "$ref": "#/$defs/digest" },
|
|
76
|
+
"receipt_digest": { "$ref": "#/$defs/digest" }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
30
79
|
"result_digest": { "$ref": "#/$defs/digest" }
|
|
31
80
|
}
|
|
32
81
|
},
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "context.indexer.workset-view-materialization-request/v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"protocol",
|
|
8
|
+
"handler",
|
|
9
|
+
"resource_id",
|
|
10
|
+
"workset_digest",
|
|
11
|
+
"execution_request_digest",
|
|
12
|
+
"view_digest",
|
|
13
|
+
"payload_digest",
|
|
14
|
+
"request_digest"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"protocol": { "const": "context.indexer.workset-view-materialization-request/v1" },
|
|
18
|
+
"handler": { "const": "context.materialize-indexer-workset-view/v1" },
|
|
19
|
+
"resource_id": { "const": "authorized-indexer-workset-view" },
|
|
20
|
+
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
21
|
+
"execution_request_digest": { "$ref": "#/$defs/digest" },
|
|
22
|
+
"view_digest": { "$ref": "#/$defs/digest" },
|
|
23
|
+
"payload_digest": { "$ref": "#/$defs/digest" },
|
|
24
|
+
"request_digest": { "$ref": "#/$defs/digest" }
|
|
25
|
+
},
|
|
26
|
+
"$defs": {
|
|
27
|
+
"digest": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -17,17 +17,17 @@ completion conditions. This Action is the entry for
|
|
|
17
17
|
the guide's `indexer-provider-unavailable` handling instead of substituting a
|
|
18
18
|
different version or cache.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
The current Action input already contains the exact requirements and
|
|
21
|
+
CLI-bundled catalog. Report those bundled entries together with other Indexer
|
|
22
|
+
entry Skills already visible in this conversation. For an exact Skill root
|
|
23
|
+
already exposed by the Host, read only `SKILL.md` frontmatter and the sibling
|
|
23
24
|
`context-indexer.yaml`: the manifest version is authoritative and
|
|
24
25
|
`metadata.context-provider-version` must match it. Do not load Provider guidance
|
|
25
26
|
until selection. Group the same Skill name and exact version into one
|
|
26
27
|
conversation item with all observed source types; an installed copy of the
|
|
27
|
-
same CLI-bundled identity is not another Provider.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
persist this discovery list.
|
|
28
|
+
same CLI-bundled identity is not another Provider. Keep different versions
|
|
29
|
+
separate, never use source count or discovery order as precedence, and do not
|
|
30
|
+
scan plugin caches or persist this discovery list.
|
|
31
31
|
|
|
32
32
|
When the Graph enters through `markdown-provider`, first require the completed
|
|
33
33
|
capture report and report the visible `context-markdown-indexer*` Skills before
|
|
@@ -36,23 +36,36 @@ current evidence. Do not infer semantic ownership from filenames, titles, or
|
|
|
36
36
|
headings, and do not persist the discovery list. Capture proves byte/currentness
|
|
37
37
|
only; the selected Markdown Provider remains responsible for semantic indexing.
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
Return only the compact current-Action result:
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
stage: provider-selection
|
|
43
|
+
host_visible_skills: []
|
|
44
|
+
indexers:
|
|
45
|
+
- <one complete selected Indexer registry entry>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`host_visible_skills` contains only non-CLI observations already visible to
|
|
49
|
+
the Host. `indexers` contains the semantic registry entries selected for the
|
|
50
|
+
unchanged requirements in the Action input. Select portable distribution
|
|
51
|
+
locators and exact versions and integrities. Each required
|
|
52
|
+
requirement/domain/source/module owner cell needs one primary Indexer;
|
|
53
|
+
overlapping read scope is allowed for enrichers. One Indexer may combine a
|
|
54
|
+
primary layer, supporting profiles, extension layers, and composers, but
|
|
55
|
+
Provider array order is not precedence.
|
|
56
|
+
|
|
57
|
+
Choose the applicable CLI-bundled community profile directly when no visible
|
|
58
|
+
specialized Provider is required. The CLI constructs the full route input,
|
|
59
|
+
performs fallback/conflict checks, validates the proposal, resolves and stages
|
|
60
|
+
bundles, and atomically applies `src/indexers.yaml`. If the current Route reports
|
|
61
|
+
a primary owner conflict or an uncovered required cell, present that exact
|
|
62
|
+
problem and wait; never invent a Provider or weaken the requirement.
|
|
63
|
+
|
|
64
|
+
Submit the result only through the exact `context action complete-current`
|
|
65
|
+
command returned by the Route. Never call the low-level route, validation,
|
|
66
|
+
resolution, staging or apply commands as a production workflow. If a selected
|
|
67
|
+
external Provider needs Host resolution, the next current Route exposes that
|
|
68
|
+
existing Host Action and its exact request; invoke it once and submit its Host
|
|
69
|
+
result through the next `complete-current` command. If the resolved Bundle carries a
|
|
70
|
+
non-allowlisted program, continue through the returned existing program-execution
|
|
71
|
+
Gate; never bypass it or fall back to its low-level command.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-run-indexer-agent-step
|
|
3
|
-
description: Execute one Context-authorized Indexer workset using only the current Route input
|
|
3
|
+
description: Execute one Context-authorized Indexer workset using only the current Route input, resolved Provider instructions, and authorized workset View.
|
|
4
4
|
metadata:
|
|
5
5
|
agent-graph: path:../../provider.yaml
|
|
6
6
|
agent-graph.graph: indexer
|
|
@@ -10,11 +10,37 @@ metadata:
|
|
|
10
10
|
# Run one Indexer Agent step
|
|
11
11
|
|
|
12
12
|
Read the current Route action input and every required Resource marked `read-required`.
|
|
13
|
-
Use only the materialized `resolved-indexer-instructions
|
|
14
|
-
|
|
15
|
-
Provider
|
|
13
|
+
Use only the materialized `resolved-indexer-instructions`, the supplied workset authority,
|
|
14
|
+
and the single `authorized-indexer-workset-view`. The View already contains the exact facts,
|
|
15
|
+
dependencies, Provider fragments, and Author authority authorized for this workset. Do not
|
|
16
|
+
construct evidence read requests, manage pages or cursors, discover another Skill, read a
|
|
17
|
+
Provider path, widen source scope, run an unauthorized Indexer or parser, or invent missing
|
|
18
|
+
evidence.
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
Author the stage-specific operation Result described by the Action output schema. Copy dynamic
|
|
21
|
+
authority values only from the Route input or authorized View; in particular,
|
|
22
|
+
`consumed_input_view_digest` means `run_request.composition_input.view_digest`, not the
|
|
23
|
+
authorized View's own digest.
|
|
24
|
+
|
|
25
|
+
For a Partition Result, read `partition-authority` before choosing each group subject. A string
|
|
26
|
+
changes only the local key and preserves `base_subject_key` namespace and kind. Use an explicit
|
|
27
|
+
subject object only when its kind is listed in `subject_key_contract.kinds`; never invent a kind
|
|
28
|
+
from a page title, operation name, framework term, or business vocabulary.
|
|
29
|
+
|
|
30
|
+
For an Author Result, a selected parser Fact is an immutable projection, not material for a new
|
|
31
|
+
Fact shape. Build it only from the matching View items:
|
|
32
|
+
|
|
33
|
+
- `fact_ref` = the `fact` item's `value.fact_ref`;
|
|
34
|
+
- `fact_kind` = the `fact` item's `value.kind`;
|
|
35
|
+
- `subject_key` = `author-authority.expected_subject_key`;
|
|
36
|
+
- `value` = the `fact` item's `value.payload` exactly, without wrapping, renaming, or adding fields;
|
|
37
|
+
- `evidence_refs` = the source-span evidence refs reached through the matching `selected-fact`
|
|
38
|
+
dependency node.
|
|
39
|
+
|
|
40
|
+
Build each EvidenceBinding from that same source-span dependency's `evidence_ref`, `source_ref`,
|
|
41
|
+
`module_ref`, `locator`, and `content_digest`. Do not infer a new locator or digest from prose.
|
|
42
|
+
Do not invent or manually copy read-receipt, execution-receipt, or stable-result digests. The Host
|
|
43
|
+
integration must use Context's protocol builders to derive content-addressed fields and finalize
|
|
44
|
+
exactly `context.indexer.agent-step-result/v1`; Context performs the existing dependency, schema,
|
|
45
|
+
owner, scope, and workset validation before reporting success. Never report success merely because
|
|
46
|
+
the envelope or prose looks valid.
|
|
@@ -9,9 +9,10 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
# Run The Indexer Lifecycle
|
|
11
11
|
|
|
12
|
-
This Action
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
This Action continues the sole registry-and-Provider indexing route. Use the
|
|
13
|
+
current Indexer subroute for semantic partitioning, structure review, authoring,
|
|
14
|
+
composition, layout, Candidate compilation, and repair. Existing approved
|
|
15
|
+
knowledge is an input to incremental planning, never a parallel authoring path.
|
|
15
16
|
|
|
16
17
|
Read
|
|
17
18
|
`node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`,
|
|
@@ -19,7 +20,7 @@ then follow the root `context` Skill's Indexer instructions and the exact
|
|
|
19
20
|
structured outcomes returned by `context indexer ...`. Start by forming and
|
|
20
21
|
confirming requirements when `src/indexers.yaml` is absent or stale; otherwise
|
|
21
22
|
continue the current registry selection, Provider resolution, execution,
|
|
22
|
-
reconciliation,
|
|
23
|
+
reconciliation, mechanical validation, layout, and Candidate compile subroute. The Indexer
|
|
23
24
|
Graph is the authority for each substep. Never skip directly to compile and
|
|
24
25
|
never synthesize a Provider Result or a default plan.
|
|
25
26
|
|
|
@@ -9,13 +9,42 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
# Run one post-author composer
|
|
11
11
|
|
|
12
|
-
Read
|
|
13
|
-
Use only its bounded `primary_result_view`, selected `composer_ref`, allowed target refs,
|
|
14
|
-
and the resolved instructions supplied by Context. Do not discover another Skill or
|
|
15
|
-
composer, read project files outside the request, change a SubjectKey, create a complete
|
|
16
|
-
primary Result, or widen the target set.
|
|
12
|
+
Read both required Route resources before acting:
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
- `resolved-indexer-instructions` defines the selected Composer's job;
|
|
15
|
+
- `authorized-indexer-workset-view` is the complete, bounded PrimaryResult View.
|
|
16
|
+
|
|
17
|
+
Use only the target aliases and source aliases exposed by that View and the current Route.
|
|
18
|
+
Do not discover another Skill or Composer, scan project files outside the View, change a
|
|
19
|
+
SubjectKey, rewrite the primary Result, or widen the target set.
|
|
20
|
+
|
|
21
|
+
Return only the minimal semantic JSON accepted by the current Route:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"stage": "post-author",
|
|
26
|
+
"outcome": "complete",
|
|
27
|
+
"proposals": [
|
|
28
|
+
{
|
|
29
|
+
"target": "target:1",
|
|
30
|
+
"artifact_kind": "content",
|
|
31
|
+
"title": "Reader-facing title",
|
|
32
|
+
"summary": "Why this derived page is useful",
|
|
33
|
+
"sections": [
|
|
34
|
+
{
|
|
35
|
+
"key": "overview",
|
|
36
|
+
"heading": "Overview",
|
|
37
|
+
"markdown": "Reader-facing content",
|
|
38
|
+
"source_refs": ["fact:1"]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"diagnostics": []
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If no derived Artifact is needed, return `outcome: "complete"` with an empty
|
|
48
|
+
`proposals` array. If the bounded inputs cannot be processed, return `outcome: "failed"`
|
|
49
|
+
with at least one diagnostic. Context expands aliases, validates evidence and policy,
|
|
50
|
+
creates internal fragments and digests, then resumes the same production state machine.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Document revisions
|
|
2
|
-
|
|
3
|
-
New workspaces enable source-constrained editorial revision by default. It is a
|
|
4
|
-
build phase for source-backed prose that improves publication value and
|
|
5
|
-
readability without changing the approved knowledge page or inventing facts.
|
|
6
|
-
|
|
7
|
-
To opt out during initialization:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
context init context --no-optimize-docs
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Existing workspaces retain their current setting. Change it explicitly with:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
context optimize-docs enable
|
|
17
|
-
context optimize-docs disable
|
|
18
|
-
context status --format json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
When enabled, the workflow plans only new or changed source Sections. For each
|
|
22
|
-
Section the CLI reports mechanical signals and allowed actions. The Agent may
|
|
23
|
-
keep it, repair local presentation, reshape it within the same source boundary,
|
|
24
|
-
or omit it when the CLI confirms a non-knowledge reason. Only changed pages
|
|
25
|
-
receive a full revision beside their approved page:
|
|
26
|
-
|
|
27
|
-
Signals are review leads rather than a complete readability verdict. The Agent
|
|
28
|
-
must read every Section. Keeping a signaled Section requires a concrete,
|
|
29
|
-
decision-only assessment explaining why each signal is a false positive or why
|
|
30
|
-
editing would reduce source fidelity. The assessment names every reported
|
|
31
|
-
signal code so the CLI can verify complete coverage; it is never published.
|
|
32
|
-
Time, cost, workload, batch size, or delivery pressure are not valid keep or
|
|
33
|
-
defer reasons. Fully managed operation applies all safe repairs, reshapes, and
|
|
34
|
-
eligible omissions autonomously; only genuinely unavailable semantic input is
|
|
35
|
-
batched for the user. A large fragment set must meet the same quality standard
|
|
36
|
-
as a single fragment.
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
knowledge/guides/setup.md
|
|
40
|
-
knowledge/guides/setup__revision.md
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The `__revision.md` suffix is reserved. Default knowledge discovery, structure,
|
|
44
|
-
search, and package selection exclude revision files. Validation and build
|
|
45
|
-
associate a revision with its sibling base page and apply it under the original
|
|
46
|
-
package path. A revision stores only the base digest that cannot be inferred;
|
|
47
|
-
its path and revised Sections are derived. Unchanged Sections inside a full
|
|
48
|
-
revision are inferred. A page with no changes stores only one derived negative
|
|
49
|
-
cache key below `.tmp/context-runtime/document-optimization/`; replacement
|
|
50
|
-
prose and Section metadata are not duplicated there.
|
|
51
|
-
|
|
52
|
-
Typical repair candidates are Markdown syntax, spacing, empty table rows, and
|
|
53
|
-
descriptive labels for links whose purpose is already present. Reshape handles
|
|
54
|
-
wide tables, long cells, mixed images and links, or long prose by creating a
|
|
55
|
-
clearer structure inside the same Section. Unanswered question sets, empty
|
|
56
|
-
placeholders, decision-free drafts, duplicates, and obsolete-only Sections may
|
|
57
|
-
be omitted. Questions with answers, limitations with an action, and
|
|
58
|
-
deprecations with a replacement remain knowledge. Link targets, images, code,
|
|
59
|
-
commands, numbers, identifiers, conditions, and source references are protected
|
|
60
|
-
through validation. Ambiguous currency, ownership, or sensitive values appear
|
|
61
|
-
together in the plan's `input_requests` and require one batched user decision.
|
|
62
|
-
|
|
63
|
-
After capture, review, or build, a user may ask conversationally to correct one
|
|
64
|
-
existing knowledge page. Start the correction by title, approved path, or
|
|
65
|
-
ViewRef:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
context revise "<title, approved path, or ViewRef>" --format json
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Context starts `route.document-revision.requested` only after resolving one
|
|
72
|
-
page. Ambiguous requests return candidates instead of guessing. Edit
|
|
73
|
-
reader-visible prose within existing `context:section` boundaries without
|
|
74
|
-
changing provenance or protected values, then run `context optimize-docs
|
|
75
|
-
validate`. A valid correction ends
|
|
76
|
-
the request and the next Route offers a package build when output is stale. If
|
|
77
|
-
broad document optimization was disabled, this entry activates only the target
|
|
78
|
-
page and keeps every other eligible page out of the pending batch. If upstream
|
|
79
|
-
content changes, the revision becomes a conflict and must be reviewed again.
|
|
80
|
-
|
|
81
|
-
Disabling moves active revision pages to Context runtime recovery storage. The
|
|
82
|
-
next build uses approved knowledge directly.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# 文档修订页
|
|
2
|
-
|
|
3
|
-
新工作区默认开启来源约束的编辑修订。它是面向来源可追溯正文的构建阶段,在不修改
|
|
4
|
-
正式知识页、不补写事实的前提下,提高发布内容的知识价值和可读性。
|
|
5
|
-
|
|
6
|
-
初始化时如需关闭:
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
context init context --no-optimize-docs
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
已有工作区保持当前设置,可显式调整:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
context optimize-docs enable
|
|
16
|
-
context optimize-docs disable
|
|
17
|
-
context status --format json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
开启后,工作流只规划新增或发生变化的来源 Section。CLI 为每个 Section 枚举机械
|
|
21
|
-
信号和允许动作;Agent 可以保持不变、局部修复、在同一来源边界内重排,或在 CLI
|
|
22
|
-
确认其属于无知识价值内容时省略。只有实际变化的页面才在原文旁生成完整修订页:
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
knowledge/guides/setup.md
|
|
26
|
-
knowledge/guides/setup__revision.md
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`__revision.md` 是保留后缀。默认知识发现、结构、检索和包选择都排除修订页;
|
|
30
|
-
校验和构建根据文件名把它关联回同目录原文,并仍按原文件名输出。修订页只额外
|
|
31
|
-
记录无法推导的原文摘要;原文路径和修订 Section 由文件名与正文差异推导。完整修订
|
|
32
|
-
页中未变化的 Section 直接推导为 `keep`;整页都不修改时,运行时只保存一个页级负
|
|
33
|
-
缓存键,不重复保存改写正文或 Section 元数据。
|
|
34
|
-
|
|
35
|
-
局部修复适用于 Markdown、空白、空表格行,以及来源已经说明用途的链接名称。结构
|
|
36
|
-
重排适用于宽表格、长单元格、图片与链接混排或过长段落,但不能跨 Section 搬运事实。
|
|
37
|
-
未回答的问题集合、空占位、没有结论的草稿、重复内容和只有旧稿的 Section 可以省略;
|
|
38
|
-
有答案的问句、有影响和动作的限制、带替代方案的废弃说明仍属于知识。链接目标、图片、
|
|
39
|
-
代码、命令、数字、标识符、条件和来源引用由 CLI 机械保护。事实时效、职责或敏感值不
|
|
40
|
-
明确时,CLI 会把相关 Section 集中列入计划的 `input_requests`,工作流只询问用户一次,
|
|
41
|
-
不会自动省略。
|
|
42
|
-
|
|
43
|
-
机械信号只是审阅线索,不代表最终结论,也不是完整的可读性检查。Agent 必须阅读每个
|
|
44
|
-
Section;若对带信号的 Section 选择 `keep`,需要在本次决策中逐段说明信号为何误报,
|
|
45
|
-
或修改为何会损害来源忠实度,并在说明中逐一写出对应的信号 code,供 CLI 机械核对覆盖
|
|
46
|
-
是否完整。CLI 会拒绝没有具体说明或漏掉信号的 `keep`,但这段说明只用于当前决策审计,
|
|
47
|
-
不会写入正式知识、修订页或构建产物。部分信号误报也不能成为整批保持不变的理由。
|
|
48
|
-
|
|
49
|
-
时间、成本、工作量、批次规模或赶进度都不是 `keep`、跳过或延期的有效理由。全托管
|
|
50
|
-
模式下,Agent 应自动完成所有安全的局部修复、结构重排和允许省略,直到当前批次收敛;
|
|
51
|
-
只有确实无法从当前 Section 或来源证据取得的语义信息,才集中向用户询问一次。片段多
|
|
52
|
-
不能降低质量标准,也不能把整批默认判为 `keep`。
|
|
53
|
-
|
|
54
|
-
工作区采集、审核或构建完成后,用户可以直接通过对话要求修正某篇知识。Agent
|
|
55
|
-
先使用标题、正式知识路径或 ViewRef 启动修订:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
context revise "<标题、正式知识路径或 ViewRef>" --format json
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
CLI 只在目标唯一时创建或复用该页修订,并由 Agent Graph 返回
|
|
62
|
-
`route.document-revision.requested`。若有多个候选,Agent 必须依据当前对话选定,
|
|
63
|
-
否则询问用户。Agent 只在已有 `context:section` 内编辑面向读者的正文,不修改来源
|
|
64
|
-
信息、Section 边界和受保护值,随后运行 `context optimize-docs validate`。校验成功后,
|
|
65
|
-
请求自动结束;若产物因此过期,下一条 Route 会直接提示重新构建。即使工作区
|
|
66
|
-
此前关闭了整库文档编译优化,这个入口也只激活目标页面,不会让其他页面进入
|
|
67
|
-
待优化队列。上游内容变化后,旧修订页会成为冲突,不会被静默应用。
|
|
68
|
-
|
|
69
|
-
关闭后,修订页会被移动到 Context 的运行时恢复目录,下一次构建直接使用正式
|
|
70
|
-
知识。
|