@c4a/context-cli 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +6420 -1986
- package/indexers/bundles/context-code-indexer/SKILL.md +1 -1
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +1 -1
- package/indexers/bundles/context-markdown-indexer/SKILL.md +1 -1
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +1 -1
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +11 -11
- package/package.json +12 -12
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +15 -25
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +15 -25
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +15 -25
- package/plugins/skills/context/SKILL.md +15 -25
- package/plugins/skills/context-code-indexer/SKILL.md +1 -1
- package/plugins/skills/context-code-indexer/context-indexer.yaml +1 -1
- package/plugins/skills/context-markdown-indexer/SKILL.md +1 -1
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +1 -1
- package/providers/context/actions/authorize-current-indexer-provider-program.yaml +6 -0
- package/providers/context/actions/finalize-current-indexer-provider-selection.yaml +5 -0
- package/providers/context/actions/resolve-current-indexer-gate.yaml +6 -0
- package/providers/context/actions/resolve-current-indexer-provider.yaml +6 -0
- package/providers/context/actions/run-indexer-lifecycle.yaml +0 -1
- package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
- package/providers/context/codes.yaml +2 -0
- package/providers/context/graphs/indexer.yaml +22 -0
- package/providers/context/graphs/workspace.yaml +1 -0
- package/providers/context/manifest.json +78 -48
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/dialogue/knowledge-review.md +6 -3
- package/providers/context/resources/procedures/knowledge-review.md +11 -8
- package/providers/context/resources/views/resolved-indexer-instructions.yaml +2 -4
- package/providers/context/schemas/indexer-agent-step-input.schema.json +71 -21
- package/providers/context/schemas/indexer-agent-step-result.schema.json +107 -20
- package/providers/context/schemas/indexer-materialize-request.schema.json +4 -8
- package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +4 -1
- package/providers/context/skills/authorize-current-indexer-provider-program/SKILL.md +20 -0
- package/providers/context/skills/configure-indexer-providers/SKILL.md +15 -14
- package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +27 -0
- package/providers/context/skills/resolve-current-indexer-provider/SKILL.md +20 -0
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +27 -14
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +14 -9
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +35 -23
- package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +0 -15
- package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +0 -26
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "context.indexer.current-action-input/
|
|
3
|
+
"$id": "context.indexer.current-action-input/v2",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{ "$ref": "#/$defs/providerSelection" },
|
|
6
6
|
{ "$ref": "#/$defs/providerResolution" },
|
|
7
7
|
{ "$ref": "#/$defs/providerProgramAuthorization" },
|
|
8
|
-
{ "$ref": "#/$defs/
|
|
9
|
-
{ "$ref": "#/$defs/
|
|
10
|
-
{ "$ref": "#/$defs/author" },
|
|
8
|
+
{ "$ref": "#/$defs/partitionBatch" },
|
|
9
|
+
{ "$ref": "#/$defs/authorBatch" },
|
|
11
10
|
{ "$ref": "#/$defs/postAuthor" },
|
|
12
11
|
{ "$ref": "#/$defs/structureReview" },
|
|
13
12
|
{ "$ref": "#/$defs/layoutConfirmation" }
|
|
@@ -61,32 +60,46 @@
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
},
|
|
64
|
-
"
|
|
63
|
+
"providerProgramAuthorization": {
|
|
65
64
|
"type": "object",
|
|
66
65
|
"additionalProperties": false,
|
|
67
|
-
"required": ["stage"],
|
|
66
|
+
"required": ["stage", "decision"],
|
|
68
67
|
"properties": {
|
|
69
|
-
"stage": { "const": "provider-
|
|
68
|
+
"stage": { "const": "provider-program-authorization" },
|
|
69
|
+
"decision": { "enum": ["approved", "rejected"] }
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"
|
|
72
|
+
"partitionBatch": {
|
|
73
73
|
"type": "object",
|
|
74
74
|
"additionalProperties": false,
|
|
75
|
-
"required": ["stage", "
|
|
75
|
+
"required": ["stage", "results"],
|
|
76
76
|
"properties": {
|
|
77
|
-
"stage": { "const": "
|
|
78
|
-
"
|
|
77
|
+
"stage": { "const": "partition" },
|
|
78
|
+
"results": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"minItems": 1,
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["task_key", "result"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"task_key": { "type": "string", "pattern": "^task-[0-9]{3}$" },
|
|
87
|
+
"result": { "$ref": "#/$defs/partition" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
79
91
|
}
|
|
80
92
|
},
|
|
81
93
|
"partition": {
|
|
82
94
|
"type": "object",
|
|
83
95
|
"additionalProperties": false,
|
|
84
|
-
"required": ["stage", "outcome", "
|
|
96
|
+
"required": ["stage", "outcome", "groups", "excluded", "unsupported"],
|
|
85
97
|
"properties": {
|
|
86
98
|
"stage": { "const": "partition" },
|
|
87
|
-
"outcome": {
|
|
88
|
-
|
|
89
|
-
|
|
99
|
+
"outcome": {
|
|
100
|
+
"enum": ["complete", "failed"],
|
|
101
|
+
"description": "Use complete when the semantic partition is ready; use failed only with failure details. accepted is not an Agent outcome."
|
|
102
|
+
},
|
|
90
103
|
"groups": { "type": "array", "items": { "$ref": "#/$defs/partitionGroup" } },
|
|
91
104
|
"excluded": { "type": "array", "items": { "$ref": "#/$defs/excluded" } },
|
|
92
105
|
"unsupported": { "type": "array", "items": { "$ref": "#/$defs/unsupported" } },
|
|
@@ -99,6 +112,27 @@
|
|
|
99
112
|
}
|
|
100
113
|
]
|
|
101
114
|
},
|
|
115
|
+
"authorBatch": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": ["stage", "results"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"stage": { "const": "author" },
|
|
121
|
+
"results": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["task_key", "result"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"task_key": { "type": "string", "pattern": "^task-[0-9]{3}$" },
|
|
130
|
+
"result": { "$ref": "#/$defs/author" }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
102
136
|
"partitionGroup": {
|
|
103
137
|
"type": "object",
|
|
104
138
|
"additionalProperties": false,
|
|
@@ -122,7 +156,10 @@
|
|
|
122
156
|
}
|
|
123
157
|
]
|
|
124
158
|
},
|
|
125
|
-
"subject_intent": {
|
|
159
|
+
"subject_intent": {
|
|
160
|
+
"enum": ["primary", "enrich-or-independent"],
|
|
161
|
+
"description": "Use primary when this group owns a reader subject. Use enrich-or-independent for a publishable supplemental view, including test or example behavior: Context enriches an existing matching subject when one exists and otherwise creates an independent subject. supporting is not a valid intent; material that must never become a reader subject must not be emitted as a group."
|
|
162
|
+
},
|
|
126
163
|
"members": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/string" } },
|
|
127
164
|
"questions": { "type": "array", "items": { "$ref": "#/$defs/string" } },
|
|
128
165
|
"question_targets": { "type": "array", "items": { "$ref": "#/$defs/questionTarget" } },
|
|
@@ -241,6 +278,27 @@
|
|
|
241
278
|
}
|
|
242
279
|
},
|
|
243
280
|
"postAuthor": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"required": ["stage", "results"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"stage": { "const": "post-author" },
|
|
286
|
+
"results": {
|
|
287
|
+
"type": "array",
|
|
288
|
+
"minItems": 1,
|
|
289
|
+
"items": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"additionalProperties": false,
|
|
292
|
+
"required": ["task_key", "result"],
|
|
293
|
+
"properties": {
|
|
294
|
+
"task_key": { "type": "string", "pattern": "^task-[0-9]{3}$" },
|
|
295
|
+
"result": { "$ref": "#/$defs/postAuthorResult" }
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"postAuthorResult": {
|
|
244
302
|
"type": "object",
|
|
245
303
|
"additionalProperties": false,
|
|
246
304
|
"required": ["stage", "outcome", "proposals", "diagnostics"],
|
|
@@ -285,7 +343,11 @@
|
|
|
285
343
|
"allOf": [
|
|
286
344
|
{
|
|
287
345
|
"if": { "properties": { "outcome": { "const": "failed" } } },
|
|
288
|
-
"then": {
|
|
346
|
+
"then": {
|
|
347
|
+
"properties": {
|
|
348
|
+
"diagnostics": { "type": "array", "minItems": 1 }
|
|
349
|
+
}
|
|
350
|
+
}
|
|
289
351
|
}
|
|
290
352
|
]
|
|
291
353
|
},
|
|
@@ -297,7 +359,13 @@
|
|
|
297
359
|
"stage": { "const": "structure-review" },
|
|
298
360
|
"decision": { "enum": ["approved", "request-adjustment"] },
|
|
299
361
|
"feedback": { "$ref": "#/$defs/string" }
|
|
300
|
-
}
|
|
362
|
+
},
|
|
363
|
+
"allOf": [
|
|
364
|
+
{
|
|
365
|
+
"if": { "properties": { "decision": { "const": "request-adjustment" } } },
|
|
366
|
+
"then": { "required": ["feedback"] }
|
|
367
|
+
}
|
|
368
|
+
]
|
|
301
369
|
},
|
|
302
370
|
"layoutConfirmation": {
|
|
303
371
|
"type": "object",
|
|
@@ -306,8 +374,27 @@
|
|
|
306
374
|
"properties": {
|
|
307
375
|
"stage": { "const": "layout-confirmation" },
|
|
308
376
|
"decision": { "enum": ["approved", "rejected"] },
|
|
309
|
-
"feedback": { "$ref": "#/$defs/string" }
|
|
310
|
-
|
|
377
|
+
"feedback": { "$ref": "#/$defs/string" },
|
|
378
|
+
"paths": {
|
|
379
|
+
"type": "array",
|
|
380
|
+
"minItems": 1,
|
|
381
|
+
"items": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"additionalProperties": false,
|
|
384
|
+
"required": ["artifact_ref", "output_path"],
|
|
385
|
+
"properties": {
|
|
386
|
+
"artifact_ref": { "$ref": "#/$defs/string" },
|
|
387
|
+
"output_path": { "$ref": "#/$defs/string" }
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"allOf": [
|
|
393
|
+
{
|
|
394
|
+
"if": { "properties": { "decision": { "const": "rejected" } } },
|
|
395
|
+
"then": { "required": ["feedback"], "not": { "required": ["paths"] } }
|
|
396
|
+
}
|
|
397
|
+
]
|
|
311
398
|
}
|
|
312
399
|
}
|
|
313
400
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "context.indexer.materialize-request/
|
|
3
|
+
"$id": "context.indexer.materialize-request/v2",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"required": [
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
"provider_fingerprint",
|
|
13
13
|
"provider_integrity",
|
|
14
14
|
"manifest_digest",
|
|
15
|
-
"
|
|
16
|
-
"workset_ref",
|
|
17
|
-
"workset_digest",
|
|
15
|
+
"stage",
|
|
18
16
|
"profile",
|
|
19
17
|
"composer_id",
|
|
20
18
|
"instruction_set_digest",
|
|
@@ -22,7 +20,7 @@
|
|
|
22
20
|
"request_digest"
|
|
23
21
|
],
|
|
24
22
|
"properties": {
|
|
25
|
-
"protocol": { "const": "context.indexer.materialize-request/
|
|
23
|
+
"protocol": { "const": "context.indexer.materialize-request/v2" },
|
|
26
24
|
"handler": { "const": "context.materialize-indexer-instructions/v1" },
|
|
27
25
|
"resource_id": { "const": "resolved-indexer-instructions" },
|
|
28
26
|
"indexer_id": { "type": "string", "minLength": 1 },
|
|
@@ -30,9 +28,7 @@
|
|
|
30
28
|
"provider_fingerprint": { "$ref": "#/$defs/digest" },
|
|
31
29
|
"provider_integrity": { "$ref": "#/$defs/digest" },
|
|
32
30
|
"manifest_digest": { "$ref": "#/$defs/digest" },
|
|
33
|
-
"
|
|
34
|
-
"workset_ref": { "type": "string", "minLength": 1 },
|
|
35
|
-
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
31
|
+
"stage": { "enum": ["partition", "author", "post-author"] },
|
|
36
32
|
"profile": { "type": "string", "minLength": 1 },
|
|
37
33
|
"composer_id": {
|
|
38
34
|
"oneOf": [
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
"properties": {
|
|
17
17
|
"protocol": { "const": "context.indexer.workset-view-materialization-request/v1" },
|
|
18
18
|
"handler": { "const": "context.materialize-indexer-workset-view/v1" },
|
|
19
|
-
"resource_id": {
|
|
19
|
+
"resource_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^authorized-indexer-workset-view(?:/task-[0-9]{3})?$"
|
|
22
|
+
},
|
|
20
23
|
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
21
24
|
"execution_request_digest": { "$ref": "#/$defs/digest" },
|
|
22
25
|
"view_digest": { "$ref": "#/$defs/digest" },
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-authorize-current-indexer-provider-program
|
|
3
|
+
description: Resolve the current Context Gate for an exact non-sandboxed Indexer Provider program.
|
|
4
|
+
metadata:
|
|
5
|
+
agent-graph: path:../../provider.yaml
|
|
6
|
+
agent-graph.graph: indexer
|
|
7
|
+
agent-graph.entry: current-provider-program-authorization
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Authorize the current Provider program
|
|
11
|
+
|
|
12
|
+
Read the exact program report in `gate.resolution_action.input`. Resolve only the current Gate:
|
|
13
|
+
|
|
14
|
+
- return `stage: provider-program-authorization`;
|
|
15
|
+
- return `decision: approved` only when the user approved it or the Route says the Gate is resolved
|
|
16
|
+
by session authority;
|
|
17
|
+
- otherwise return `decision: rejected`.
|
|
18
|
+
|
|
19
|
+
Do not change Provider identity, program content, scope, limits, or authority. Submit the value to
|
|
20
|
+
the Route's only `complete-current` command and then follow the newly returned Route.
|
|
@@ -18,20 +18,19 @@ the guide's `indexer-provider-unavailable` handling instead of substituting a
|
|
|
18
18
|
different version or cache.
|
|
19
19
|
|
|
20
20
|
The current Action input already contains the exact requirements and
|
|
21
|
-
CLI-bundled catalog.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
CLI-bundled catalog. Select applicable Providers using that input and the Skills
|
|
22
|
+
already visible in this conversation. Do not run a separate catalog command,
|
|
23
|
+
enumerate every installed Skill, or require a discovery report/confirmation.
|
|
24
|
+
For a selected shipped Provider, copy its exact version, integrity and
|
|
25
|
+
cli-bundled distribution from the supplied catalog. The same Skill/version
|
|
26
|
+
visible in the Host is a projection, not another Provider or a reason for Host
|
|
27
|
+
resolution. If selecting a relevant external Skill, read only its exact
|
|
28
|
+
Host-exposed frontmatter and sibling `context-indexer.yaml` needed to identify
|
|
29
|
+
it; manifest version is authoritative. Do not guess missing versions, substitute
|
|
30
|
+
a different version, or scan caches. Read Provider guidance only when selected.
|
|
31
31
|
|
|
32
32
|
When the Graph enters through `markdown-provider`, first require the completed
|
|
33
|
-
capture report
|
|
34
|
-
building the route input. Treat only the report's exact `source_inputs` as
|
|
33
|
+
capture report. Treat only the report's exact `source_inputs` as
|
|
35
34
|
current evidence. Do not infer semantic ownership from filenames, titles, or
|
|
36
35
|
headings, and do not persist the discovery list. Capture proves byte/currentness
|
|
37
36
|
only; the selected Markdown Provider remains responsible for semantic indexing.
|
|
@@ -45,8 +44,10 @@ indexers:
|
|
|
45
44
|
- <one complete selected Indexer registry entry>
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
`host_visible_skills` contains only non-CLI observations already
|
|
49
|
-
the Host
|
|
47
|
+
`host_visible_skills` contains only relevant non-CLI observations already
|
|
48
|
+
visible to the Host; leave it empty for a CLI-bundled selection without external
|
|
49
|
+
observations. It is not an inventory of installed Skills. `indexers` contains
|
|
50
|
+
the semantic registry entries selected for the
|
|
50
51
|
unchanged requirements in the Action input. Select portable distribution
|
|
51
52
|
locators and exact versions and integrities. Each required
|
|
52
53
|
requirement/domain/source/module owner cell needs one primary Indexer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-resolve-current-indexer-gate
|
|
3
|
+
description: Resolve the current Indexer structure or layout Gate using the exact current Route input and output schema.
|
|
4
|
+
metadata:
|
|
5
|
+
agent-graph: path:../../provider.yaml
|
|
6
|
+
agent-graph.graph: indexer
|
|
7
|
+
agent-graph.entry: current-lifecycle
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Resolve the current Indexer Gate
|
|
11
|
+
|
|
12
|
+
Use this Skill only when the current Indexer Route exposes it as
|
|
13
|
+
`gate.resolution_action`. Read the Route input and the resolution Action output
|
|
14
|
+
schema before deciding.
|
|
15
|
+
|
|
16
|
+
For `stage: structure-review`, inspect the complete semantic structure Resource
|
|
17
|
+
and return either `approved` or `request-adjustment`. Include specific feedback
|
|
18
|
+
when requesting adjustment.
|
|
19
|
+
|
|
20
|
+
For `stage: layout-confirmation`, use the supplied change reports and the
|
|
21
|
+
user's decision. Return either `approved` or `rejected`. Include specific
|
|
22
|
+
feedback when rejecting. A non-delegatable layout Gate must not be approved on
|
|
23
|
+
the user's behalf.
|
|
24
|
+
|
|
25
|
+
Submit exactly one existing `context.indexer.current-action-input/v2` value to
|
|
26
|
+
the Route's completion command. Do not invent a lifecycle continuation
|
|
27
|
+
envelope, a second approval protocol, or additional audit data.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-resolve-current-indexer-provider
|
|
3
|
+
description: Resolve the exact Host-backed Provider request selected by the current Context workflow Route.
|
|
4
|
+
metadata:
|
|
5
|
+
agent-graph: path:../../provider.yaml
|
|
6
|
+
agent-graph.graph: indexer
|
|
7
|
+
agent-graph.entry: current-provider-resolution
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Resolve the current Indexer Provider
|
|
11
|
+
|
|
12
|
+
Use only the Host Action Resource required by the current Route. Materialize that Resource once and
|
|
13
|
+
return one `context.indexer.current-action-input/v2` value with `stage` set to
|
|
14
|
+
`provider-resolution` and `result` set to the complete Host Action result. If the Host also returns
|
|
15
|
+
the managed output named by the Route, include it as `managed_output` without changing its ref,
|
|
16
|
+
digest, or value.
|
|
17
|
+
|
|
18
|
+
Do not discover another Provider, substitute a version, read Provider files directly, or recreate
|
|
19
|
+
the Host result. Submit the value to the Route's only `complete-current` command and then follow the
|
|
20
|
+
newly returned Route.
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-run-indexer-agent-step
|
|
3
|
-
description: Execute one Context-authorized Indexer
|
|
3
|
+
description: Execute one bounded batch of Context-authorized Indexer worksets using the current Route input, shared Provider instructions, and each task's authorized View.
|
|
4
4
|
metadata:
|
|
5
5
|
agent-graph: path:../../provider.yaml
|
|
6
6
|
agent-graph.graph: indexer
|
|
7
7
|
agent-graph.entry: agent-step
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Run one Indexer Agent
|
|
10
|
+
# Run one bounded Indexer Agent batch
|
|
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`, the supplied
|
|
14
|
-
and
|
|
15
|
-
|
|
13
|
+
Use only the materialized `resolved-indexer-instructions`, the supplied transport worksets,
|
|
14
|
+
and each task's `authorized-indexer-workset-view/task-NNN`. Match Views and outputs only through
|
|
15
|
+
the short `task_key`; do not copy internal digests into the semantic result. Each View contains the
|
|
16
|
+
exact facts, dependencies, Provider fragments, and Author authority authorized for that task. Do not
|
|
16
17
|
construct evidence read requests, manage pages or cursors, discover another Skill, read a
|
|
17
18
|
Provider path, widen source scope, run an unauthorized Indexer or parser, or invent missing
|
|
18
19
|
evidence.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
Return exactly one `results[]` entry for every task in the current batch, in task-key order. Each
|
|
22
|
+
entry carries its `task_key` and the existing stage-specific semantic Result. A single-task batch
|
|
23
|
+
still uses the same array shape. Copy dynamic authority values only from the Route input or that
|
|
24
|
+
task's authorized View.
|
|
24
25
|
|
|
25
26
|
For a Partition Result, read `partition-authority` before choosing each group subject. A string
|
|
26
27
|
changes only the local key and preserves `base_subject_key` namespace and kind. Use an explicit
|
|
27
28
|
subject object only when its kind is listed in `subject_key_contract.kinds`; never invent a kind
|
|
28
29
|
from a page title, operation name, framework term, or business vocabulary.
|
|
29
30
|
|
|
31
|
+
`subject_intent` describes the reader-subject outcome, not the source file's role. Use `primary`
|
|
32
|
+
when the group owns a reader subject. Use `enrich-or-independent` for a publishable supplemental
|
|
33
|
+
view such as test or example behavior: Context reuses a matching subject when available and creates
|
|
34
|
+
an independent subject otherwise. Do not emit `supporting`; material that must never become a reader
|
|
35
|
+
subject must not be emitted as a group.
|
|
36
|
+
|
|
30
37
|
For an Author Result, a selected parser Fact is an immutable projection, not material for a new
|
|
31
38
|
Fact shape. Build it only from the matching View items:
|
|
32
39
|
|
|
@@ -39,8 +46,14 @@ Fact shape. Build it only from the matching View items:
|
|
|
39
46
|
|
|
40
47
|
Build each EvidenceBinding from that same source-span dependency's `evidence_ref`, `source_ref`,
|
|
41
48
|
`module_ref`, `locator`, and `content_digest`. Do not infer a new locator or digest from prose.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
For behavior, read the Author View's `source-text` items. Their `spans` contain the authorized
|
|
50
|
+
source lines; `source_span_refs` link back to existing dependency nodes, not new evidence identities.
|
|
51
|
+
Overlapping ranges appear once. A signature or call name alone does not establish behavior absent
|
|
52
|
+
from those lines. Do not copy these process-only carriers into reader Markdown.
|
|
53
|
+
Do not invent or manually copy read-receipt, execution-receipt, or stable-result digests. Submit
|
|
54
|
+
exactly `context.indexer.current-action-input/v2` through the Route's completion command; Context
|
|
55
|
+
derives internal envelopes and performs dependency, schema, owner, scope, and per-workset validation
|
|
56
|
+
before reporting each task accepted. Read the completion's `outcomes`, then continue directly from
|
|
57
|
+
its `next` Route and ready Resource paths. Do not run `context status` or either Resource materializer
|
|
58
|
+
between successful batches. A failed item is retried from its returned task-only skeleton; already
|
|
59
|
+
accepted peers are not repeated. Never report success merely because the envelope or prose looks valid.
|
|
@@ -18,20 +18,25 @@ Read
|
|
|
18
18
|
`node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`,
|
|
19
19
|
then follow the root `context` Skill's Indexer instructions and the exact
|
|
20
20
|
structured outcomes returned by `context indexer ...`. Start by forming and
|
|
21
|
-
confirming requirements when `src/indexers.yaml` is absent or stale
|
|
21
|
+
confirming requirements when `src/indexers.yaml` is absent or stale. When the
|
|
22
|
+
Route returns `configuration`, edit the named project file and re-evaluate;
|
|
23
|
+
do not submit a lifecycle Result or repeatedly run an unconfigured project. Otherwise
|
|
22
24
|
continue the current registry selection, Provider resolution, execution,
|
|
23
25
|
reconciliation, mechanical validation, layout, and Candidate compile subroute. The Indexer
|
|
24
26
|
Graph is the authority for each substep. Never skip directly to compile and
|
|
25
27
|
never synthesize a Provider Result or a default plan.
|
|
26
28
|
|
|
29
|
+
When the current subroute is a Gate, follow `gate.resolution_action` rather
|
|
30
|
+
than looking for a top-level `action`. Read its Skill and output schema, use its
|
|
31
|
+
Route input, and submit the resulting value through the Route completion
|
|
32
|
+
command. The Indexer Graph owns the Gate identity, authority, delegation and
|
|
33
|
+
resolution Action; do not replace them with an inferred command or handler.
|
|
34
|
+
|
|
27
35
|
Stop on the first Host permission, non-delegatable Gate, validation failure, or
|
|
28
36
|
human decision. Once current Candidates have been compiled, return control to
|
|
29
37
|
`context status --format json`; the workspace Graph will select Knowledge
|
|
30
|
-
Review.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"outcome": "follow-indexer-route"
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
+
Review. This outer Action has no payload of its own and must never be submitted
|
|
39
|
+
through `complete-current`. Context projects it to the one current Indexer
|
|
40
|
+
subroute; follow that Route's command and output schema exactly. If project
|
|
41
|
+
configuration was edited, re-run `context status --format json` to obtain the
|
|
42
|
+
new revision instead of inventing a lifecycle continuation result.
|
|
@@ -1,50 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-run-indexer-post-author-composer
|
|
3
|
-
description: Execute one CLI-authorized post-author composer
|
|
3
|
+
description: Execute one bounded batch of CLI-authorized post-author composer tasks without changing primary facts, identity, scope, or composer selection.
|
|
4
4
|
metadata:
|
|
5
5
|
agent-graph: path:../../provider.yaml
|
|
6
6
|
agent-graph.graph: indexer
|
|
7
7
|
agent-graph.entry: post-author-composer-step
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Run
|
|
10
|
+
# Run a post-author composer batch
|
|
11
11
|
|
|
12
12
|
Read both required Route resources before acting:
|
|
13
13
|
|
|
14
14
|
- `resolved-indexer-instructions` defines the selected Composer's job;
|
|
15
|
-
- `authorized-indexer-workset-view` is
|
|
15
|
+
- each `authorized-indexer-workset-view/task-NNN` is one complete, bounded PrimaryResult View.
|
|
16
16
|
|
|
17
17
|
Use only the target aliases and source aliases exposed by that View and the current Route.
|
|
18
18
|
Do not discover another Skill or Composer, scan project files outside the View, change a
|
|
19
19
|
SubjectKey, rewrite the primary Result, or widen the target set.
|
|
20
20
|
|
|
21
|
+
Return exactly one result for every task key in the Action input. Keep task results
|
|
22
|
+
independent: one empty or failed result must not replace another task's proposal.
|
|
23
|
+
|
|
21
24
|
Return only the minimal semantic JSON accepted by the current Route:
|
|
22
25
|
|
|
23
26
|
```json
|
|
24
27
|
{
|
|
25
28
|
"stage": "post-author",
|
|
26
|
-
"
|
|
27
|
-
"proposals": [
|
|
29
|
+
"results": [
|
|
28
30
|
{
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
"task_key": "task-001",
|
|
32
|
+
"result": {
|
|
33
|
+
"stage": "post-author",
|
|
34
|
+
"outcome": "complete",
|
|
35
|
+
"proposals": [
|
|
36
|
+
{
|
|
37
|
+
"target": "target:1",
|
|
38
|
+
"artifact_kind": "content",
|
|
39
|
+
"title": "Reader-facing title",
|
|
40
|
+
"summary": "Why this derived page is useful",
|
|
41
|
+
"sections": [
|
|
42
|
+
{
|
|
43
|
+
"key": "overview",
|
|
44
|
+
"heading": "Overview",
|
|
45
|
+
"markdown": "Reader-facing content",
|
|
46
|
+
"source_refs": ["fact:1"]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"diagnostics": []
|
|
52
|
+
}
|
|
41
53
|
}
|
|
42
|
-
]
|
|
43
|
-
"diagnostics": []
|
|
54
|
+
]
|
|
44
55
|
}
|
|
45
56
|
```
|
|
46
57
|
|
|
47
|
-
If no derived Artifact
|
|
48
|
-
`proposals` array. If
|
|
49
|
-
with at least one diagnostic
|
|
50
|
-
|
|
58
|
+
If a task needs no derived Artifact, return `outcome: "complete"` with an empty
|
|
59
|
+
`proposals` array for that task. If one bounded input cannot be processed, return
|
|
60
|
+
`outcome: "failed"` with at least one diagnostic for that task and still return the
|
|
61
|
+
other task results. Context expands aliases, validates evidence and policy, creates
|
|
62
|
+
internal fragments and digests, then resumes the same production state machine.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "context.indexer.lifecycle-continuation/v1",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"required": ["protocol", "outcome"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"protocol": {
|
|
9
|
-
"const": "context.indexer.lifecycle-continuation/v1"
|
|
10
|
-
},
|
|
11
|
-
"outcome": {
|
|
12
|
-
"const": "follow-indexer-route"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "context.indexer.layer-fragment-request/v1",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"required": ["protocol", "operation", "phase", "target_layer_ref", "target_layer_integrity", "target_bundle_digest", "allowed_fragment_kinds", "allowed_target_refs", "workset", "composer_ref", "composer_selection_entry_digest", "current_profile_binding_digest", "primary_result_view", "request_digest"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"protocol": { "const": "context.indexer.layer-fragment-request/v1" },
|
|
9
|
-
"operation": { "const": "main-index" },
|
|
10
|
-
"phase": { "const": "post-author" },
|
|
11
|
-
"target_layer_ref": { "type": "string", "minLength": 1 },
|
|
12
|
-
"target_layer_integrity": { "$ref": "#/$defs/digest" },
|
|
13
|
-
"target_bundle_digest": { "$ref": "#/$defs/digest" },
|
|
14
|
-
"allowed_fragment_kinds": { "const": ["derived-artifact-proposal"] },
|
|
15
|
-
"allowed_target_refs": { "type": "array", "items": { "type": "string" } },
|
|
16
|
-
"workset": { "type": "object" },
|
|
17
|
-
"composer_ref": { "type": "string", "minLength": 1 },
|
|
18
|
-
"composer_selection_entry_digest": { "$ref": "#/$defs/digest" },
|
|
19
|
-
"current_profile_binding_digest": { "$ref": "#/$defs/digest" },
|
|
20
|
-
"primary_result_view": { "type": "object" },
|
|
21
|
-
"request_digest": { "$ref": "#/$defs/digest" }
|
|
22
|
-
},
|
|
23
|
-
"$defs": {
|
|
24
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
25
|
-
}
|
|
26
|
-
}
|