@c4a/context 0.7.9 → 0.7.10-alpha.2
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/articleStructure.d.ts +254 -0
- package/docs/guides/agent-dialogue.md +1 -1
- package/docs/guides/code-indexer-skill-authoring.md +76 -178
- package/docs/guides/indexer-provider-and-customization.md +93 -453
- package/docs/guides/indexer-skill-creation.md +107 -97
- package/docs/guides/knowledge-updates.md +35 -14
- package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
- package/docs/reference/indexer-provider-protocol.md +52 -102
- package/docs/reference/package-templates.md +39 -65
- package/docs/reference/template-variables.md +2 -3
- package/index.d.ts +6 -10
- package/index.js +6441 -8771
- package/indexerAgentStepProtocol.d.ts +0 -910
- package/indexerApprovedKnowledge.d.ts +98 -359
- package/indexerArticlePlan.d.ts +3 -26
- package/indexerArtifact.d.ts +201 -70
- package/indexerArtifactPolicy.d.ts +0 -18
- package/indexerArtifactResult.d.ts +240 -888
- package/indexerAuthoringFixture.d.ts +0 -13
- package/indexerBenchmark.d.ts +2 -2
- package/indexerCandidateCompile.d.ts +123 -167
- package/indexerCatalogFallback.d.ts +32 -374
- package/indexerCollectionMapping.d.ts +2 -2
- package/indexerContentLayers.d.ts +187 -41
- package/indexerContractOverlay.d.ts +30 -44
- package/indexerControlledInvocation.d.ts +6 -6
- package/indexerControlledProgram.d.ts +959 -3020
- package/indexerDependencyView.d.ts +96 -96
- package/indexerEffectiveArtifact.d.ts +381 -242
- package/indexerExampleDecision.d.ts +134 -134
- package/indexerExampleIdentity.d.ts +6 -6
- package/indexerExampleIdentityAudit.d.ts +6 -6
- package/indexerInventoryDisposition.d.ts +0 -39
- package/indexerLayerComposition.d.ts +1378 -852
- package/indexerLayoutChange.d.ts +24 -33
- package/indexerLayoutProposalSet.d.ts +143 -137
- package/indexerLayoutResolver.d.ts +116 -101
- package/indexerLayoutTransition.d.ts +6 -6
- package/indexerMainLifecycle.d.ts +1 -11
- package/indexerMainRunLedger.d.ts +0 -14
- package/indexerMainRunProtocol.d.ts +806 -2530
- package/indexerMainWorkset.d.ts +0 -1212
- package/indexerNavigationArtifactPlan.d.ts +2 -2
- package/indexerOverlayQuestionApplyProposal.d.ts +0 -4
- package/indexerParserCoordinate.d.ts +2 -2
- package/indexerParserExecutionPlan.d.ts +42 -42
- package/indexerPartitionPlan.d.ts +24 -354
- package/indexerPhysicalArtifactManifest.d.ts +12 -27
- package/indexerPostAuthorComposition.d.ts +2 -253
- package/indexerPostAuthorRunLedger.d.ts +860 -562
- package/indexerPrimaryProjection.d.ts +2 -2
- package/indexerPrimaryResultView.d.ts +0 -318
- package/indexerProfileContract.d.ts +200 -549
- package/indexerProgramExecutionAuthorization.d.ts +4 -4
- package/indexerProgramRunProtocol.d.ts +806 -2527
- package/indexerProjectProposal.d.ts +8 -8
- package/indexerProjectedArtifactFanOutAudit.d.ts +8 -8
- package/indexerProjectedArtifactPlan.d.ts +0 -9
- package/indexerProvider.d.ts +46 -288
- package/indexerProviderComposition.d.ts +16 -42
- package/indexerQuestionAuthority.d.ts +2 -82
- package/indexerReaderTargetInventory.d.ts +6 -6
- package/indexerRequirementLifecycle.d.ts +6 -6
- package/indexerResultReconciliation.d.ts +35 -149
- package/indexerSemanticInput.d.ts +10642 -4685
- package/indexerStructuredDeclaration.d.ts +24 -24
- package/indexerTemplateRendering.d.ts +239 -113
- package/knowledgeMap.d.ts +5 -5
- package/package.json +1 -1
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +13 -16
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +9 -9
- package/indexerArtifactDependencies.d.ts +0 -693
- package/indexerCompositionFactDependencies.d.ts +0 -16
- package/indexerExampleFactDependencies.d.ts +0 -17
- package/indexerIncrementalImpact.d.ts +0 -221
- package/indexerKnowledgeDependency.d.ts +0 -46
- package/indexerSubjectCatalog.d.ts +0 -230
- package/indexerSubjectKeyAuthority.d.ts +0 -786
|
@@ -1,471 +1,111 @@
|
|
|
1
|
-
# Indexer
|
|
1
|
+
# Indexer guidance for planning and writing
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[Markdown Indexer](./markdown-indexer-skill-authoring.md) authoring guide.
|
|
3
|
+
Follow the current Route returned by `context run` or `context status --format json`.
|
|
4
|
+
The CLI prepares a stage directory and returns its instructions, schemas and
|
|
5
|
+
submission command. Use those files instead of copying long content into arguments.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
`src/indexers.yaml`; `package.json`, discovered Skill paths, Host cache paths,
|
|
10
|
-
resolved transport paths and runtime staging directories are not selection
|
|
11
|
-
authority. A Provider-only project does not create `src/indexer/`.
|
|
7
|
+
## Responsibilities
|
|
12
8
|
|
|
9
|
+
An Indexer helps expose the source skeleton and guides source-grounded writing.
|
|
10
|
+
It is not a mandatory full symbol scan or a semantic classifier owned by the CLI.
|
|
11
|
+
Use a visible Skill directly, or its bounded CLI-assisted discovery, as appropriate
|
|
12
|
+
for the technology. Multiple Indexers may explain different aspects of one module.
|
|
13
|
+
There is no mandatory primary-owner selection or Provider resolution stage.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
At the start of this continuous work, declare the available relevant Skills and
|
|
16
|
+
whether the Agent can schedule sub-agents. Use the capability schema supplied in
|
|
17
|
+
the stage directory. A new session must declare its actual capabilities; do not
|
|
18
|
+
inherit another session's parallel scheduling claim. Skill names and optional
|
|
19
|
+
configuration are guidance, not version pins or evidence of completed reading.
|
|
20
|
+
Do not inspect caches, compare Skill hashes, resolve exact versions or create a
|
|
21
|
+
second installation registry. Installation and enabling Skills belong to the Host.
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
select Providers and plan reader subjects. Do not run a complete symbol index
|
|
18
|
-
just to decide the initial article menu. Application/service file-inventory
|
|
19
|
-
batches describe reading scope; they are not business module boundaries or a
|
|
20
|
-
requirement to publish one article per directory. Inspect the supplied source
|
|
21
|
-
access and converge related batches into reader subjects. A file with no supplied
|
|
22
|
-
symbol facts has not been deeply parsed; this is not evidence that it has no APIs.
|
|
23
|
-
Accepted application batches acquire parser facts before Author. Existing
|
|
24
|
-
request-material remains the next action for implementation outside the initial
|
|
25
|
-
reading scope. Public-contract-led profiles, including component libraries,
|
|
26
|
-
retain their contract preparation because those facts define their reader targets.
|
|
23
|
+
## Confirmed requirements
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
still prepared at Author after the selected code has been parsed. For large
|
|
33
|
-
IDL sources, first follow the selected applications' concrete protocol references
|
|
34
|
-
and required includes; an entire protocol monorepo is not a default target.
|
|
35
|
-
|
|
36
|
-
Parser progress is on stderr; stdout remains the command's JSON result. Report
|
|
37
|
-
actual phase, source and available counts without estimating a percentage from
|
|
38
|
-
elapsed time. A preparation-cache hit only reuses parser work, not proof of
|
|
39
|
-
completed articles. After interruption use the current Route; do not clear state
|
|
40
|
-
or increase memory automatically to retry the same oversized scope.
|
|
41
|
-
|
|
42
|
-
## Selection flow
|
|
43
|
-
|
|
44
|
-
Follow `workflow.current` from `context status --format json` or `context run`.
|
|
45
|
-
When the registry is missing, the Route names `src/indexers.yaml` in
|
|
46
|
-
`configuration`: declare the confirmed requirements with `indexers: []`, then
|
|
47
|
-
re-evaluate. The next Route supplies the Provider selection input and completion
|
|
48
|
-
command. An unconfigured project does not begin Partition or require a fabricated
|
|
49
|
-
primary owner. `run --managed --until blocked-or-complete` stops at the same
|
|
50
|
-
configuration or semantic input boundary; it does not make those decisions.
|
|
51
|
-
|
|
52
|
-
1. Form the complete requirements using the initial registry contract below.
|
|
53
|
-
Reuse the user's stated meaning and research the selected material. Ask about
|
|
54
|
-
consequential missing purpose or scope even in managed mode; delegation
|
|
55
|
-
covers execution and eligible reviews, not unanswered intent. A Provider,
|
|
56
|
-
registry entry or Result may strengthen it but cannot remove targets,
|
|
57
|
-
questions, evidence obligations or required owner cells.
|
|
58
|
-
2. Select applicable Providers from the Host-visible Skills and the CLI-bundled
|
|
59
|
-
catalog already in the current Action input. No separate catalog command,
|
|
60
|
-
installed-Skill inventory, discovery report, or discovery-only confirmation
|
|
61
|
-
is required. Use the supplied exact identity and cli-bundled distribution
|
|
62
|
-
for shipped Providers, even when their Skills are also visible to the Host.
|
|
63
|
-
For a relevant external Skill, read its exact Host-exposed `SKILL.md`
|
|
64
|
-
and sibling `context-indexer.yaml`, then only the linked framework references
|
|
65
|
-
needed to evaluate observed module signals. Do not guess versions
|
|
66
|
-
or scan `.claude`, `.codex`, `.agents` or arbitrary user directories. Different
|
|
67
|
-
versions remain distinct; discovery order is not selection precedence.
|
|
68
|
-
3. Submit the semantic `indexers` and any relevant non-CLI `host_visible_skills`
|
|
69
|
-
through the current Route's `context action complete-current` command. The
|
|
70
|
-
latter may be empty; it is not an inventory or an additional discovery step.
|
|
71
|
-
4. The CLI performs routing, validation, resolution and staging internally.
|
|
72
|
-
Shipped Providers load directly from this CLI release; only external
|
|
73
|
-
Providers may require the returned Host resolution Action. Follow the
|
|
74
|
-
current Route if a distribution is missing, a version conflicts, or program
|
|
75
|
-
execution needs authorization. Do not call the low-level commands below as
|
|
76
|
-
a second production workflow.
|
|
77
|
-
5. The CLI atomically applies the validated registry and any declared
|
|
78
|
-
customization. A successful static report alone is not write or execution
|
|
79
|
-
authority. Resume from the returned current Route.
|
|
80
|
-
|
|
81
|
-
Every required requirement/domain/source/module cell has exactly one primary
|
|
82
|
-
owner. Read scope may overlap for supporting profiles, extensions and
|
|
83
|
-
enrichers. Array order is never precedence. Each Provider layer retains its own
|
|
84
|
-
exact version, integrity, portable distribution, config and resource
|
|
85
|
-
fingerprints.
|
|
86
|
-
For CLI-bundled instruction Providers, these fields record the original
|
|
87
|
-
selection; they are not a requirement to reinstall old bytes when resuming.
|
|
88
|
-
The current CLI supplies its installed Provider's guidance automatically.
|
|
89
|
-
|
|
90
|
-
### Select technology profiles per module
|
|
91
|
-
|
|
92
|
-
A registered repository is a source boundary, not a single technology profile.
|
|
93
|
-
Different modules may need different primary profiles and extension layers. Use
|
|
94
|
-
the current selection contract's supported module and target/read scopes; never
|
|
95
|
-
assign one module's stack to the entire repository merely because it was
|
|
96
|
-
registered as one source.
|
|
97
|
-
|
|
98
|
-
An observed framework dependency, configuration, entry or adapter signal is a
|
|
99
|
-
reason to load the relevant Provider Skill and its applicable reference during
|
|
100
|
-
selection. Reading this guidance is not activation or permission to execute the
|
|
101
|
-
Provider. Follow its evidence rules to verify the signal within authorized source
|
|
102
|
-
material, then bind the applicable profile only to the supported modules. A name
|
|
103
|
-
alone may justify investigation without proving a framework is active.
|
|
104
|
-
|
|
105
|
-
If boundaries are still unclear, identify the relevant modules and inspect their
|
|
106
|
-
configuration and entries in the existing selection flow. Do not reject a
|
|
107
|
-
relevant Provider solely because the repository contains mixed stacks, or defer
|
|
108
|
-
investigation until generic authoring happens to report a capability gap. Record
|
|
109
|
-
unresolved evidence and the concrete next inspection when it cannot yet be
|
|
110
|
-
obtained. Keep unrelated modules on their appropriate primary profiles; multiple
|
|
111
|
-
compatible, proven extensions may support one module without becoming duplicate
|
|
112
|
-
primary owners. These are Agent selection responsibilities, not CLI semantic
|
|
113
|
-
checks or new review gates.
|
|
114
|
-
|
|
115
|
-
## Resuming after a tool update
|
|
116
|
-
|
|
117
|
-
Continue with the current Route and its supplied source material. Agents do not
|
|
118
|
-
compare Provider, Fact, signature or inventory fingerprints and do not rewrite
|
|
119
|
-
them in an old request. Context rebuilds the internal result from the submitted
|
|
120
|
-
page content and references.
|
|
121
|
-
|
|
122
|
-
An added parser field or a more complete line range in the same unchanged file
|
|
123
|
-
does not invalidate Author work. Continuation compares selected sources and
|
|
124
|
-
subjects rather than serialized Fact payloads; accepted work retains its
|
|
125
|
-
original request/result pair. New results retain the source references used for
|
|
126
|
-
later updates. Repeated Fact references or reader-question answers are deduplicated;
|
|
127
|
-
multiple sections may answer the same question. A question ID only identifies a
|
|
128
|
-
reader question to cover, not an additional user approval.
|
|
129
|
-
|
|
130
|
-
Missing references, a changed source file, a different page owner/subject or a
|
|
131
|
-
concurrent write remain meaningful conflicts. Requirements, membership and result
|
|
132
|
-
contracts still determine whether a task can be reused. This does not introduce a
|
|
133
|
-
new Agent protocol, hash-entry step or persistent audit file.
|
|
134
|
-
|
|
135
|
-
## Provider selection result
|
|
136
|
-
|
|
137
|
-
Use the current Action's output schema, which defines the accepted Indexer
|
|
138
|
-
entry fields. This is a `complete-current` input, not a replacement registry
|
|
139
|
-
and not the requirements-only bootstrap schema.
|
|
140
|
-
|
|
141
|
-
For one component-library requirement, the following template selects one
|
|
142
|
-
primary Code Provider. Replace the quoted placeholders using the **current
|
|
143
|
-
Action input**, not values from a different CLI installation:
|
|
144
|
-
|
|
145
|
-
```yaml
|
|
146
|
-
stage: provider-selection
|
|
147
|
-
host_visible_skills: []
|
|
148
|
-
indexers:
|
|
149
|
-
- id: component-guide
|
|
150
|
-
operations: [main-index]
|
|
151
|
-
requirement_bindings:
|
|
152
|
-
- requirement_ref: "<requirement.id>"
|
|
153
|
-
coverage_domains: ["<required-domain>"]
|
|
154
|
-
owned_scope:
|
|
155
|
-
ref: "requirement:<requirement.id>#target_scope"
|
|
156
|
-
role: primary
|
|
157
|
-
read_scope:
|
|
158
|
-
refs:
|
|
159
|
-
- "requirement:<requirement.id>#target_scope"
|
|
160
|
-
- "requirement:<requirement.id>#evidence_source_scope"
|
|
161
|
-
profile:
|
|
162
|
-
primary:
|
|
163
|
-
id: component-library
|
|
164
|
-
provider: community
|
|
165
|
-
providers:
|
|
166
|
-
- id: community
|
|
167
|
-
role: primary
|
|
168
|
-
catalog_skill: "<catalog.skill>"
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
- Choose `component-library` only if it matches the reader task and appears in
|
|
172
|
-
the selected catalog entry's `capabilities.profiles`. For captured documents,
|
|
173
|
-
notes or conversation summaries, select a profile from the corresponding
|
|
174
|
-
compatible Provider. `catalog_skill` selects exactly one bundled entry from the
|
|
175
|
-
current Action catalog. The CLI fills its version, integrity and distribution
|
|
176
|
-
after checking the Route revision; a changed catalog invalidates that revision.
|
|
177
|
-
Do not combine this reference with identity overrides. Full identities remain
|
|
178
|
-
available for explicitly pinned entries and external Providers, which retain
|
|
179
|
-
their resolution and authorization requirements. The persisted registry always
|
|
180
|
-
contains complete identities, never `catalog_skill` references.
|
|
181
|
-
- Bind each selected requirement and all required coverage domains it owns;
|
|
182
|
-
the single-domain template is not permission to drop other required domains.
|
|
183
|
-
`owned_scope` names the target being described. `read_scope` may also include
|
|
184
|
-
supporting evidence, which does not become another owned target.
|
|
185
|
-
- `profile.primary.provider`, each additional profile's `provider`, and each
|
|
186
|
-
composer's `provider` reference a layer's `providers[].id`, not a Skill path.
|
|
187
|
-
Supporting or extension profiles use `profile.additional` with `kind`;
|
|
188
|
-
composers use `profile.composers`. Select only combinations supported by the
|
|
189
|
-
manifests; do not add empty customization or speculative config.
|
|
190
|
-
- The current catalog includes domains, target kinds, profile IDs, operations,
|
|
191
|
-
composers and extension relationships. If more detail is needed, read the
|
|
192
|
-
selected entry's exact `guidance.skill_path` and `guidance.manifest_path`.
|
|
193
|
-
These paths and capabilities are reading aids, not fields to copy into the
|
|
194
|
-
persistent registry. No separate discovery command or cache scan is needed.
|
|
195
|
-
- JSON Schema describes input shapes and accepted values. The CLI additionally
|
|
196
|
-
checks coverage ownership, scope relationships and Provider composition when
|
|
197
|
-
submitting. It atomically applies the selection; do not edit `indexers`
|
|
198
|
-
manually to bypass a rejected result.
|
|
199
|
-
|
|
200
|
-
## Initial registry: `src/indexers.yaml`
|
|
201
|
-
|
|
202
|
-
The initial configuration Route provides the registered source boundary view.
|
|
203
|
-
Read it when the source identities are not already available from the current
|
|
204
|
-
source registration results. It is a metadata view, not another source capture
|
|
205
|
-
or a request to scan the repository. Use only the user's agreed source scope.
|
|
206
|
-
|
|
207
|
-
Read the `context.indexer.registry-bootstrap` schema at the exact path in the
|
|
208
|
-
current Route's required resources. It ships with the CLI, so it does not
|
|
209
|
-
require a workspace SDK reinstall. It describes this **configuration file**,
|
|
210
|
-
not an Action completion payload. It
|
|
211
|
-
covers the requirements-only state before Provider selection: `indexers` must
|
|
212
|
-
be empty here. Later the Provider selection Route fills that array.
|
|
213
|
-
|
|
214
|
-
Start with this complete YAML example. Replace the example source reference,
|
|
215
|
-
reader goals and coverage domains with the agreed project requirements:
|
|
25
|
+
The configuration Route names the required file and supplies its schema. The
|
|
26
|
+
requirements-only registry records reader goals and authorized sources, not
|
|
27
|
+
production assignments. For example, replace the source and goals with the
|
|
28
|
+
user's actual scope:
|
|
216
29
|
|
|
217
30
|
```yaml
|
|
218
31
|
protocol: context.indexer.registry/v1
|
|
219
32
|
requirements:
|
|
220
|
-
- id:
|
|
221
|
-
purpose: Help application developers
|
|
222
|
-
reader_goals: [understand-
|
|
33
|
+
- id: integration-guide
|
|
34
|
+
purpose: Help application developers understand and integrate the system.
|
|
35
|
+
reader_goals: [understand-system, integrate-system]
|
|
223
36
|
coverage_domains:
|
|
224
|
-
|
|
225
|
-
public-api: required
|
|
37
|
+
architecture: required
|
|
226
38
|
target_scope:
|
|
227
39
|
targets:
|
|
228
|
-
- source_ref: repo:
|
|
40
|
+
- source_ref: repo:sample
|
|
229
41
|
evidence_source_scope:
|
|
230
42
|
targets:
|
|
231
|
-
- source_ref: repo:
|
|
43
|
+
- source_ref: repo:sample
|
|
232
44
|
indexers: []
|
|
233
45
|
```
|
|
234
46
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
`indexer-customization-required` with a current `capability_gap_proof`. Copy the
|
|
301
|
-
proof into the draft unchanged. A draft cannot weaken requirements, widen
|
|
302
|
-
source scope, copy a parser, add an evaluator, or claim that it has been
|
|
303
|
-
applied. If no safe level closes the gap, stop instead of emitting a
|
|
304
|
-
conforming-looking file.
|
|
305
|
-
|
|
306
|
-
## Upgrade and conflict handling
|
|
307
|
-
|
|
308
|
-
For a CLI-bundled instruction Provider, resume with the installed Skill and
|
|
309
|
-
portable distribution. A version or content change alone does not require
|
|
310
|
-
Provider selection, registry edits, source capture or a restart. The CLI
|
|
311
|
-
refreshes the current batch's instruction resources and Route revision;
|
|
312
|
-
the Agent follows the returned Route without comparing fingerprints.
|
|
313
|
-
|
|
314
|
-
Compatible tasks keep their original request/result records. Instruction or
|
|
315
|
-
template edits do not, by themselves, discard accepted groups or authored
|
|
316
|
-
content. Changes to sources, requirements, executable programs, configuration,
|
|
317
|
-
result contracts or semantic extension inputs remain work invalidation reasons;
|
|
318
|
-
old results must not be relabeled as outputs of a different task.
|
|
319
|
-
|
|
320
|
-
Executable/external Providers continue using their resolved staged programs.
|
|
321
|
-
Updating instruction delivery does not replace executable code or grant new
|
|
322
|
-
execution permissions. Local customization files remain user-owned:
|
|
323
|
-
|
|
324
|
-
- An unchanged upstream resource keeps the local override current.
|
|
325
|
-
- A changed instruction resource outside the override refreshes guidance for
|
|
326
|
-
pending work, without automatically regenerating completed knowledge.
|
|
327
|
-
- A changed resource under an instruction/template/program override returns
|
|
328
|
-
`indexer-customization-upstream-changed`; rebase or remove the override.
|
|
329
|
-
- Missing, undeclared, escaping or contract-conflicting local resources return
|
|
330
|
-
`indexer-customization-invalid`.
|
|
331
|
-
- A missing CLI-bundled Provider or selected profile/operation/composer returns
|
|
332
|
-
the existing Provider selection Action, with its schema and next command.
|
|
333
|
-
Captured sources and completed knowledge are retained. External distributions
|
|
334
|
-
that cannot be resolved still require the existing resolution/selection flow.
|
|
335
|
-
- Multiple primary owners return a conflict for explicit resolution. Do not
|
|
336
|
-
use discovery order or a preferred Provider name as a tie-breaker.
|
|
337
|
-
|
|
338
|
-
The optional `@context-indexer-origin <skill>@<version>` comment records where
|
|
339
|
-
a local customization began. It grants no trust and never bypasses revalidation.
|
|
340
|
-
|
|
341
|
-
## Outcome handling
|
|
342
|
-
|
|
343
|
-
These outcomes all point back to this guide:
|
|
344
|
-
|
|
345
|
-
| Outcome | Required next action |
|
|
346
|
-
| --- | --- |
|
|
347
|
-
| `indexer-provider-required` | Discover visible entry Skills, route a path-free proposal, and keep the requirement set unchanged. |
|
|
348
|
-
| `provider-unavailable` / `indexer-provider-unavailable` | Follow the current selection/resolution Action to restore the missing capability. A historical bundled content pin alone is not a failure. |
|
|
349
|
-
| `indexer-customization-required` | Follow the six-level ladder using only the returned current gap proof. |
|
|
350
|
-
| `indexer-customization-invalid` | Remove undeclared/escaping/conflicting files, then rebuild and restage the proposal. |
|
|
351
|
-
| `indexer-customization-upstream-changed` | Reconcile the upstream change with every affected override and rerun final validation. |
|
|
352
|
-
|
|
353
|
-
## Debugging commands
|
|
354
|
-
|
|
355
|
-
These are diagnostic/manual primitives, not a checklist for normal selection.
|
|
356
|
-
Use them only for an explicit diagnostic or a returned recovery. `--help`
|
|
357
|
-
describes command options, not necessarily the payload fields. Use the current
|
|
358
|
-
Route's schema and the initial registry contract above; prefer Route-returned commands:
|
|
359
|
-
|
|
360
|
-
```bash
|
|
361
|
-
context indexer catalog --format json
|
|
362
|
-
context indexer inspect-index-requirements --help
|
|
363
|
-
context indexer compare-index-requirements --help
|
|
364
|
-
context indexer route-indexer-provider-selection --help
|
|
365
|
-
context indexer validate-indexer-selection-proposal --help
|
|
366
|
-
context indexer resolve-indexer-providers --help
|
|
367
|
-
context indexer stage-indexer-provider-bundle --help
|
|
368
|
-
context indexer validate-indexer-customization --help
|
|
369
|
-
context indexer prepare-indexer-customization-project --help
|
|
370
|
-
context indexer stage-indexer-project-proposal --help
|
|
371
|
-
context indexer apply-indexer-project --help
|
|
372
|
-
context indexer observe-indexer-project --help
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
Keep full runtime reports under `.tmp/context-runtime/`. Do not persist Bundle
|
|
376
|
-
bytes, resolution receipts, selection discovery, run ledgers or audit reports
|
|
377
|
-
in `src/`, `knowledge/` or `dist/`.
|
|
378
|
-
|
|
379
|
-
## Completion check
|
|
380
|
-
|
|
381
|
-
Selection/customization is complete only when all of these are true:
|
|
382
|
-
|
|
383
|
-
- the confirmed requirement digest is unchanged;
|
|
384
|
-
- every required owner cell has exactly one primary owner;
|
|
385
|
-
- every Provider is exact-versioned, integrity-checked and staged from a
|
|
386
|
-
portable distribution;
|
|
387
|
-
- profile variants, SubjectKey authority, config and resources pass final
|
|
388
|
-
validation;
|
|
389
|
-
- each local change is the smallest proven ladder level and has no unrelated
|
|
390
|
-
copied resources;
|
|
391
|
-
- program and dependency receipts exist when required and do not claim a
|
|
392
|
-
sandbox the Host does not provide;
|
|
393
|
-
- the transactional apply observation matches every target digest;
|
|
394
|
-
- a final static/final selection validation passes after apply.
|
|
395
|
-
|
|
396
|
-
For the complete manifest and execution surface, see
|
|
397
|
-
[Indexer Provider protocol](../reference/indexer-provider-protocol.md).
|
|
398
|
-
|
|
399
|
-
## Purpose, page selection, and delivery
|
|
400
|
-
|
|
401
|
-
`purpose` is an optional short description of the intended reader and task.
|
|
402
|
-
Existing `reader_goals` remain valid when it is absent. Context passes this
|
|
403
|
-
requirement through Partition, Author, and Review; it does not classify free
|
|
404
|
-
text against a fixed vocabulary.
|
|
405
|
-
|
|
406
|
-
For the first production task in a new workspace, the source-boundary Route
|
|
407
|
-
requires `.tmp/work-start-report.md` before source registration. The current
|
|
408
|
-
workflow supplies `procedure.work-start-report` and `template.work-start-report`:
|
|
409
|
-
a readable report covering readers, purpose, source families, language, settings,
|
|
410
|
-
delivery outputs, first delivery and proposed organization. The Agent reads the
|
|
411
|
-
brief and representative authorized material with Host tools, presents the report
|
|
412
|
-
and resolves its missing choices before registration or capture. The CLI only
|
|
413
|
-
checks the Route payload references a real non-empty report and records its digest;
|
|
414
|
-
it does not judge prose or infer semantic decisions. Reuse and update the report
|
|
415
|
-
with actual Provider choices before Partition rather than adding a per-batch report.
|
|
416
|
-
|
|
417
|
-
Partition may select `artifact_intent` and `template_id` from the current
|
|
418
|
-
Provider catalog, along with `reader_task`, `outline`, `priority`, and
|
|
419
|
-
`delivery_boundary`. These choices are saved in the existing page plan and
|
|
420
|
-
reused by Author retries. Program templates declare `kind: page-program` in the
|
|
421
|
-
Provider's template resources. Only the selected program is included in the
|
|
422
|
-
Author View; procedure templates remain shared instructions. Workspace template
|
|
423
|
-
overrides retain priority over the bundled default.
|
|
424
|
-
|
|
425
|
-
Selected Code page programs append a deterministic public-contract table to the
|
|
426
|
-
same Candidate as its semantic explanation. Declarations provide field types,
|
|
427
|
-
requiredness, explicit defaults, signatures, and supported registration facts.
|
|
428
|
-
Missing declarations remain explicit; reference tables do not substitute for
|
|
429
|
-
source-backed examples, behavior, or change guidance.
|
|
430
|
-
|
|
431
|
-
The first readable delivery normally contains one to three pages. Subsequent
|
|
432
|
-
batches contain 30–50 pages, or a smaller final tail. Context retains accepted
|
|
433
|
-
Results across Review, close, and build, then continues the remaining pages.
|
|
434
|
-
`context run --deliver --format json` requests an earlier checkpoint. It keeps
|
|
435
|
-
the current approval rules. Status reports page counts and built preview paths;
|
|
436
|
-
Author task counts are reported separately.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
## Source-specific Providers and Host switches
|
|
440
|
-
|
|
441
|
-
The default distribution includes Code, Markdown, Note and Sessions Providers.
|
|
442
|
-
`context-note-indexer` interprets saved records/excerpts/observations;
|
|
443
|
-
`context-sessions-indexer` interprets bounded conversation summaries, with or
|
|
444
|
-
without code associations. Their shared markdown domain reuses document reading
|
|
445
|
-
and profiles; it does not force all sources through Markdown's semantic policy.
|
|
446
|
-
See [note preparation](note.md) and [sessions preparation](sessions.md).
|
|
447
|
-
|
|
448
|
-
The host owns installation and enabled/disabled switches. Business skills may be
|
|
449
|
-
installed by any supported host channel. Discover relevant currently visible
|
|
450
|
-
`context-…-indexer…` skills and read the real sibling manifest; the prefix alone
|
|
451
|
-
is not compatibility proof. Declare the selected business Provider through the
|
|
452
|
-
existing host_visible_skills and indexers result. It can replace a default without
|
|
453
|
-
enabling that default. CLI validates/resolves what was declared; it does not scan
|
|
454
|
-
host caches or maintain a second business-skill enable registry. Respect explicit
|
|
455
|
-
user exclusions even when the bundled catalog contains the default.
|
|
456
|
-
|
|
457
|
-
Choose the page owner from reader need. A note may improve an existing guide,
|
|
458
|
-
answer a FAQ or justify a new reference topic. A session without code may justify
|
|
459
|
-
a decision or process guide. Neither saving nor source type requires a new page.
|
|
460
|
-
For a Code/Markdown page retain its primary and include the actual supporting
|
|
461
|
-
source in evidence/read scope. When specialized source interpretation is needed,
|
|
462
|
-
select a Note/Sessions extension layer and the matching namespaced profile
|
|
463
|
-
(`note/component-library` or `sessions/component-library`, for example) with
|
|
464
|
-
`kind: extension`. The manifest declares each supported base. Supporting profiles
|
|
465
|
-
with `kind: supporting` must come from the same primary layer. One primary writes
|
|
466
|
-
the final page; extension guidance does not create another production target.
|
|
467
|
-
|
|
468
|
-
Optional sessions `changes` records known commit/MR associations in the source
|
|
469
|
-
file. Existing structure.yaml source/section links connect knowledge to it.
|
|
470
|
-
Do not add per-page commit, session or Provider frontmatter. A reference is not
|
|
471
|
-
proof of merging/testing and does not expand source-read authorization.
|
|
47
|
+
Use registered source identities, not guessed paths or URLs. Keep any confirmed
|
|
48
|
+
exclusions and supporting-source boundaries. Sources needed for another requirement
|
|
49
|
+
are not globally excluded. Module directory boundaries can be supplied in task
|
|
50
|
+
instructions by the Agent or CLI; do not invent persistent article fields or
|
|
51
|
+
extra module-path validation. A module name alone does not identify its directory.
|
|
52
|
+
|
|
53
|
+
## Lightweight investigation and planning
|
|
54
|
+
|
|
55
|
+
For code, inspect directories, manifests and registration points. Return names,
|
|
56
|
+
known counts and locations, not every symbol, call graph or implementation detail.
|
|
57
|
+
Discovery has a bounded budget. Report incomplete coverage honestly; partial
|
|
58
|
+
feature counts are not totals. Read representative code only when it helps make
|
|
59
|
+
the plan. Deep extraction belongs to writing the selected topic.
|
|
60
|
+
|
|
61
|
+
For documents, start with titles, bounded introductory text and heading outlines.
|
|
62
|
+
Read more when necessary. Reuse code topics or existing articles where the content
|
|
63
|
+
belongs, without forcing business concepts into physical directory names. Notes
|
|
64
|
+
and sessions can directly suggest a new article or an amendment to an existing one.
|
|
65
|
+
|
|
66
|
+
Submit article paths, reader questions, source associations and writing batches
|
|
67
|
+
using the supplied planning schema. Record selected Skill names and configuration
|
|
68
|
+
in the temporary plan's `indexer_usage`; the CLI can return it during planning
|
|
69
|
+
and writing. It is not persisted on articles, sections or production results.
|
|
70
|
+
Known one-to-one tasks can use the direct-writing path without an extra semantic
|
|
71
|
+
planning submission. Do not create an inventory-member disposition ledger.
|
|
72
|
+
|
|
73
|
+
Present the final work-start report after the relevant source overviews and plan
|
|
74
|
+
are ready, before bulk writing. Wait for the user's confirmation, including in
|
|
75
|
+
managed mode. Do not add approval for internal batch counts or Skill choices.
|
|
76
|
+
|
|
77
|
+
## Directory-based writing
|
|
78
|
+
|
|
79
|
+
The CLI determines which batches are ready and supplies their material and
|
|
80
|
+
acceptance rules. Within that authorized work the Agent chooses reading order,
|
|
81
|
+
writing order and, when supported, sub-agent scheduling. Without sub-agent support,
|
|
82
|
+
work serially through the returned batch. Workers may write their assigned draft
|
|
83
|
+
files; the coordinator submits completed subsets and owns shared CLI writes.
|
|
84
|
+
|
|
85
|
+
Write Markdown and references into the stage's temporary output directory. Submit
|
|
86
|
+
the short file manifest with stage-relative paths. Whole-article submissions and
|
|
87
|
+
section repairs use the returned schemas. Read the receipt for accepted tasks,
|
|
88
|
+
precise errors and next ready work; do not resubmit accepted content unnecessarily.
|
|
89
|
+
Multiple authorized sources may support an article. A new task or changed plan
|
|
90
|
+
must still respect confirmed requirements and the work-start report boundary.
|
|
91
|
+
|
|
92
|
+
## Storage and continuation
|
|
93
|
+
|
|
94
|
+
Drafts, capability declarations, plans, candidates, acceptance receipts and
|
|
95
|
+
transaction state remain in `.tmp`. Only formal knowledge, necessary source
|
|
96
|
+
material and long-term requirements belong in durable project content.
|
|
97
|
+
With intact temporary state the current work can resume or retry safely. After
|
|
98
|
+
clearing `.tmp` or cloning elsewhere, start new production from formal knowledge
|
|
99
|
+
and sources; do not reconstruct the old workflow. There is no historical protocol
|
|
100
|
+
migration or compatibility path.
|
|
101
|
+
|
|
102
|
+
Source authorization, real references, safe file reads and concurrent-write
|
|
103
|
+
protection still apply. Skill identity is not a production acceptance condition.
|
|
104
|
+
|
|
105
|
+
## When maintaining a Skill
|
|
106
|
+
|
|
107
|
+
For an explicitly requested Skill change, use the
|
|
108
|
+
[code Skill authoring guide](./code-indexer-skill-authoring.md) or
|
|
109
|
+
[document Skill authoring guide](./markdown-indexer-skill-authoring.md).
|
|
110
|
+
These are authoring references, not additional reading required for routine
|
|
111
|
+
knowledge production.
|