@c4a/context 0.7.9 → 0.7.10-alpha.1

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.
Files changed (78) hide show
  1. package/articleStructure.d.ts +254 -0
  2. package/docs/guides/agent-dialogue.md +1 -1
  3. package/docs/guides/code-indexer-skill-authoring.md +76 -178
  4. package/docs/guides/indexer-provider-and-customization.md +93 -453
  5. package/docs/guides/indexer-skill-creation.md +107 -97
  6. package/docs/guides/knowledge-updates.md +35 -14
  7. package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
  8. package/docs/reference/indexer-provider-protocol.md +52 -102
  9. package/docs/reference/package-templates.md +39 -65
  10. package/docs/reference/template-variables.md +2 -3
  11. package/index.d.ts +6 -10
  12. package/index.js +6441 -8771
  13. package/indexerAgentStepProtocol.d.ts +0 -910
  14. package/indexerApprovedKnowledge.d.ts +98 -359
  15. package/indexerArticlePlan.d.ts +3 -26
  16. package/indexerArtifact.d.ts +201 -70
  17. package/indexerArtifactPolicy.d.ts +0 -18
  18. package/indexerArtifactResult.d.ts +240 -888
  19. package/indexerAuthoringFixture.d.ts +0 -13
  20. package/indexerBenchmark.d.ts +2 -2
  21. package/indexerCandidateCompile.d.ts +123 -167
  22. package/indexerCatalogFallback.d.ts +32 -374
  23. package/indexerCollectionMapping.d.ts +2 -2
  24. package/indexerContentLayers.d.ts +187 -41
  25. package/indexerContractOverlay.d.ts +30 -44
  26. package/indexerControlledInvocation.d.ts +6 -6
  27. package/indexerControlledProgram.d.ts +959 -3020
  28. package/indexerDependencyView.d.ts +96 -96
  29. package/indexerEffectiveArtifact.d.ts +381 -242
  30. package/indexerExampleDecision.d.ts +134 -134
  31. package/indexerExampleIdentity.d.ts +6 -6
  32. package/indexerExampleIdentityAudit.d.ts +6 -6
  33. package/indexerInventoryDisposition.d.ts +0 -39
  34. package/indexerLayerComposition.d.ts +1378 -852
  35. package/indexerLayoutChange.d.ts +24 -33
  36. package/indexerLayoutProposalSet.d.ts +143 -137
  37. package/indexerLayoutResolver.d.ts +116 -101
  38. package/indexerLayoutTransition.d.ts +6 -6
  39. package/indexerMainLifecycle.d.ts +1 -11
  40. package/indexerMainRunLedger.d.ts +0 -14
  41. package/indexerMainRunProtocol.d.ts +806 -2530
  42. package/indexerMainWorkset.d.ts +0 -1212
  43. package/indexerNavigationArtifactPlan.d.ts +2 -2
  44. package/indexerOverlayQuestionApplyProposal.d.ts +0 -4
  45. package/indexerParserCoordinate.d.ts +2 -2
  46. package/indexerParserExecutionPlan.d.ts +42 -42
  47. package/indexerPartitionPlan.d.ts +24 -354
  48. package/indexerPhysicalArtifactManifest.d.ts +12 -27
  49. package/indexerPostAuthorComposition.d.ts +2 -253
  50. package/indexerPostAuthorRunLedger.d.ts +860 -562
  51. package/indexerPrimaryProjection.d.ts +2 -2
  52. package/indexerPrimaryResultView.d.ts +0 -318
  53. package/indexerProfileContract.d.ts +200 -549
  54. package/indexerProgramExecutionAuthorization.d.ts +4 -4
  55. package/indexerProgramRunProtocol.d.ts +806 -2527
  56. package/indexerProjectProposal.d.ts +8 -8
  57. package/indexerProjectedArtifactFanOutAudit.d.ts +8 -8
  58. package/indexerProjectedArtifactPlan.d.ts +0 -9
  59. package/indexerProvider.d.ts +46 -288
  60. package/indexerProviderComposition.d.ts +16 -42
  61. package/indexerQuestionAuthority.d.ts +2 -82
  62. package/indexerReaderTargetInventory.d.ts +6 -6
  63. package/indexerRequirementLifecycle.d.ts +6 -6
  64. package/indexerResultReconciliation.d.ts +35 -149
  65. package/indexerSemanticInput.d.ts +10642 -4685
  66. package/indexerStructuredDeclaration.d.ts +24 -24
  67. package/indexerTemplateRendering.d.ts +239 -113
  68. package/knowledgeMap.d.ts +5 -5
  69. package/package.json +1 -1
  70. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +13 -16
  71. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +9 -9
  72. package/indexerArtifactDependencies.d.ts +0 -693
  73. package/indexerCompositionFactDependencies.d.ts +0 -16
  74. package/indexerExampleFactDependencies.d.ts +0 -17
  75. package/indexerIncrementalImpact.d.ts +0 -221
  76. package/indexerKnowledgeDependency.d.ts +0 -46
  77. package/indexerSubjectCatalog.d.ts +0 -230
  78. package/indexerSubjectKeyAuthority.d.ts +0 -786
@@ -0,0 +1,254 @@
1
+ import { z } from "zod";
2
+ export declare const articleSourceLocatorSchema: z.ZodEffects<z.ZodObject<{
3
+ path: z.ZodEffects<z.ZodString, string, string>;
4
+ start_line: z.ZodNumber;
5
+ end_line: z.ZodNumber;
6
+ }, "strict", z.ZodTypeAny, {
7
+ path: string;
8
+ start_line: number;
9
+ end_line: number;
10
+ }, {
11
+ path: string;
12
+ start_line: number;
13
+ end_line: number;
14
+ }>, {
15
+ path: string;
16
+ start_line: number;
17
+ end_line: number;
18
+ }, {
19
+ path: string;
20
+ start_line: number;
21
+ end_line: number;
22
+ }>;
23
+ export declare const articleSourceReferenceSchema: z.ZodObject<{
24
+ source_ref: z.ZodString;
25
+ locator: z.ZodEffects<z.ZodObject<{
26
+ path: z.ZodEffects<z.ZodString, string, string>;
27
+ start_line: z.ZodNumber;
28
+ end_line: z.ZodNumber;
29
+ }, "strict", z.ZodTypeAny, {
30
+ path: string;
31
+ start_line: number;
32
+ end_line: number;
33
+ }, {
34
+ path: string;
35
+ start_line: number;
36
+ end_line: number;
37
+ }>, {
38
+ path: string;
39
+ start_line: number;
40
+ end_line: number;
41
+ }, {
42
+ path: string;
43
+ start_line: number;
44
+ end_line: number;
45
+ }>;
46
+ content_digest: z.ZodString;
47
+ }, "strict", z.ZodTypeAny, {
48
+ source_ref: string;
49
+ locator: {
50
+ path: string;
51
+ start_line: number;
52
+ end_line: number;
53
+ };
54
+ content_digest: string;
55
+ }, {
56
+ source_ref: string;
57
+ locator: {
58
+ path: string;
59
+ start_line: number;
60
+ end_line: number;
61
+ };
62
+ content_digest: string;
63
+ }>;
64
+ export declare const articleSectionSchema: z.ZodObject<{
65
+ id: z.ZodString;
66
+ references: z.ZodArray<z.ZodObject<{
67
+ source_ref: z.ZodString;
68
+ locator: z.ZodEffects<z.ZodObject<{
69
+ path: z.ZodEffects<z.ZodString, string, string>;
70
+ start_line: z.ZodNumber;
71
+ end_line: z.ZodNumber;
72
+ }, "strict", z.ZodTypeAny, {
73
+ path: string;
74
+ start_line: number;
75
+ end_line: number;
76
+ }, {
77
+ path: string;
78
+ start_line: number;
79
+ end_line: number;
80
+ }>, {
81
+ path: string;
82
+ start_line: number;
83
+ end_line: number;
84
+ }, {
85
+ path: string;
86
+ start_line: number;
87
+ end_line: number;
88
+ }>;
89
+ content_digest: z.ZodString;
90
+ }, "strict", z.ZodTypeAny, {
91
+ source_ref: string;
92
+ locator: {
93
+ path: string;
94
+ start_line: number;
95
+ end_line: number;
96
+ };
97
+ content_digest: string;
98
+ }, {
99
+ source_ref: string;
100
+ locator: {
101
+ path: string;
102
+ start_line: number;
103
+ end_line: number;
104
+ };
105
+ content_digest: string;
106
+ }>, "many">;
107
+ }, "strict", z.ZodTypeAny, {
108
+ id: string;
109
+ references: {
110
+ source_ref: string;
111
+ locator: {
112
+ path: string;
113
+ start_line: number;
114
+ end_line: number;
115
+ };
116
+ content_digest: string;
117
+ }[];
118
+ }, {
119
+ id: string;
120
+ references: {
121
+ source_ref: string;
122
+ locator: {
123
+ path: string;
124
+ start_line: number;
125
+ end_line: number;
126
+ };
127
+ content_digest: string;
128
+ }[];
129
+ }>;
130
+ export declare const articleStructureEntrySchema: z.ZodObject<{
131
+ article_id: z.ZodString;
132
+ path: z.ZodEffects<z.ZodString, string, string>;
133
+ collection: z.ZodType<import("./contracts.js").TopLevelNamespace, z.ZodTypeDef, import("./contracts.js").TopLevelNamespace>;
134
+ visibility: z.ZodString;
135
+ sections: z.ZodArray<z.ZodObject<{
136
+ id: z.ZodString;
137
+ references: z.ZodArray<z.ZodObject<{
138
+ source_ref: z.ZodString;
139
+ locator: z.ZodEffects<z.ZodObject<{
140
+ path: z.ZodEffects<z.ZodString, string, string>;
141
+ start_line: z.ZodNumber;
142
+ end_line: z.ZodNumber;
143
+ }, "strict", z.ZodTypeAny, {
144
+ path: string;
145
+ start_line: number;
146
+ end_line: number;
147
+ }, {
148
+ path: string;
149
+ start_line: number;
150
+ end_line: number;
151
+ }>, {
152
+ path: string;
153
+ start_line: number;
154
+ end_line: number;
155
+ }, {
156
+ path: string;
157
+ start_line: number;
158
+ end_line: number;
159
+ }>;
160
+ content_digest: z.ZodString;
161
+ }, "strict", z.ZodTypeAny, {
162
+ source_ref: string;
163
+ locator: {
164
+ path: string;
165
+ start_line: number;
166
+ end_line: number;
167
+ };
168
+ content_digest: string;
169
+ }, {
170
+ source_ref: string;
171
+ locator: {
172
+ path: string;
173
+ start_line: number;
174
+ end_line: number;
175
+ };
176
+ content_digest: string;
177
+ }>, "many">;
178
+ }, "strict", z.ZodTypeAny, {
179
+ id: string;
180
+ references: {
181
+ source_ref: string;
182
+ locator: {
183
+ path: string;
184
+ start_line: number;
185
+ end_line: number;
186
+ };
187
+ content_digest: string;
188
+ }[];
189
+ }, {
190
+ id: string;
191
+ references: {
192
+ source_ref: string;
193
+ locator: {
194
+ path: string;
195
+ start_line: number;
196
+ end_line: number;
197
+ };
198
+ content_digest: string;
199
+ }[];
200
+ }>, "many">;
201
+ }, "strict", z.ZodTypeAny, {
202
+ path: string;
203
+ article_id: string;
204
+ collection: import("./contracts.js").TopLevelNamespace;
205
+ visibility: string;
206
+ sections: {
207
+ id: string;
208
+ references: {
209
+ source_ref: string;
210
+ locator: {
211
+ path: string;
212
+ start_line: number;
213
+ end_line: number;
214
+ };
215
+ content_digest: string;
216
+ }[];
217
+ }[];
218
+ }, {
219
+ path: string;
220
+ article_id: string;
221
+ collection: import("./contracts.js").TopLevelNamespace;
222
+ visibility: string;
223
+ sections: {
224
+ id: string;
225
+ references: {
226
+ source_ref: string;
227
+ locator: {
228
+ path: string;
229
+ start_line: number;
230
+ end_line: number;
231
+ };
232
+ content_digest: string;
233
+ }[];
234
+ }[];
235
+ }>;
236
+ export type ArticleSourceLocator = z.infer<typeof articleSourceLocatorSchema>;
237
+ export type ArticleSourceReference = z.infer<typeof articleSourceReferenceSchema>;
238
+ export type ArticleStructureEntry = z.infer<typeof articleStructureEntrySchema>;
239
+ /** Merge repeated citations without dropping distinct source regions. A fragment
240
+ * over the agreed limit must be split by its author, never silently truncated. */
241
+ export declare function articleFragmentReferences(values: readonly ArticleSourceReference[]): ArticleSourceReference[];
242
+ export declare function articleSourceRegion(text: string, locator: ArticleSourceLocator): string;
243
+ export declare function articleSourceRegionDigest(text: string, locator: ArticleSourceLocator): string;
244
+ /** The caller supplies the authorized captured source, not an arbitrary path
245
+ * read from an Agent payload. Digests are always computed by the tool. */
246
+ export declare function createArticleSourceReference(source_ref: string, locator: ArticleSourceLocator, capturedText: string): ArticleSourceReference;
247
+ export declare function validateArticleStructureEntries(value: unknown): ArticleStructureEntry[];
248
+ /** Only a unique unchanged region can be relocated without semantic input.
249
+ * Changed, missing or ambiguous regions return null for the existing review
250
+ * path; they are never silently treated as current. The caller still examines
251
+ * source changes outside citations for new topics and indirect effects. */
252
+ export declare function relocateUnchangedArticleRegion(oldText: string, newText: string, locator: ArticleSourceLocator): ArticleSourceLocator | null;
253
+ /** Locate a saved cited region without reconstructing or scanning parser facts. */
254
+ export declare function locateArticleRegion(regionText: string, newText: string, path: string): ArticleSourceLocator | null;
@@ -15,7 +15,7 @@ For a gate, `workflow.current.resources.required` includes the exact dialogue
15
15
  resource for that decision together with its operating procedure and current
16
16
  workspace view. Read those selected resources before asking the question. The
17
17
  gate-specific source-boundary, read-permission, classification, extraction,
18
- structure, Review, package, and evidence-maintenance guidance is intentionally
18
+ structure, Review, package, and revision guidance is intentionally
19
19
  not duplicated in this SDK manual.
20
20
 
21
21
  This keeps a new Agent from loading every possible conversation script before
@@ -1,180 +1,78 @@
1
1
  # Code Indexer Skill authoring
2
2
 
3
- This guide defines the release checklist for a Code Indexer Provider Skill.
4
- It does not reproduce Context's internal Agent Graph lifecycle. The Provider
5
- receives validated requirements, scopes, worksets and evidence views and
6
- returns only its declared structured Results/fragments.
7
-
8
- ## Minimal package
9
-
10
- Use one `context-indexer.yaml` with protocol
11
- `context.indexer.provider/v1`. Give the Skill a SemVer version and publish the
12
- complete Bundle with a reproducible integrity digest. Instructions, templates,
13
- fixtures and portable program entries live below the Skill root. Do not invent
14
- source-specific manifest names or a second schema tree.
15
-
16
- Programs use a structured `runtime: node`, portable `entry` and literal `args`.
17
- They never use a free-form command. A detector only reports activation signals;
18
- an inspector only returns bounded evidence/enrichment. Neither is a hard-gate
19
- authority. CLI profile contracts and verified data-only overlays own mechanical
20
- rules, metric operators and thresholds.
21
-
22
- ## Author contract checklist
23
-
24
- For generated API tables, test the final Candidate as well as the parser payload
25
- and template preview. Cover direct and supporting references, partial contracts,
26
- shared types with different implementation defaults, ambiguous or cross-file
27
- links, and an approved-page regeneration after the source changes. Keep a known
28
- field when only part of its implementation can be extracted. Do not equate an
29
- accepted result with a corrected page.
30
-
31
- Document what each supported language adapter actually establishes. Preserve
32
- written expressions without evaluating arbitrary code, distinguish declaration
33
- defaults from implementation defaults, and explain unresolved imports or types.
34
- Unknown material, an unsupported parse, and a renderer contradicting a known fact
35
- need different responses. Use existing material requests and repair routes;
36
- neither a new content-quality gate nor a Provider-specific retry ledger is needed.
37
-
38
- 1. **Responsibility.** Classify supported code modules and produce evidence-
39
- bound partitions, logical units, Artifact Bundles and Results. Do not own
40
- source authorization, requirement approval, final review, CLI metrics or
41
- package publication. Source-specific Note/Sessions layers may contribute
42
- declared guidance to a code page; they do not become another primary or
43
- turn a conversation's proposed change into implemented code behavior.
44
- 2. **Manifest.** Use the sole `context-indexer.yaml` field tree. Bind domains,
45
- profiles, operations/fragments, resources, source roles, logical units,
46
- customization support and composition without duplicate aliases.
47
- 3. **Resource composition.** Combine only declared programs, profile-bound
48
- instructions, templates and optional detector/inspector resources. Omitted
49
- capabilities remain unsupported; natural language cannot add them.
50
- Put any Agent-executed grouping rules in those declared instructions or
51
- templates so Context delivers them with the current View. A partition
52
- strategy id or digest is not an instruction resource. Context selects and
53
- records strategy attempts; the Agent returns semantic groups and dispositions,
54
- without discovering strategy implementations or managing fallback order.
55
- 4. **Activation and profiles.** Declare strong/supporting/negative signals.
56
- Dependency names are candidates, not runtime proof. One module may combine
57
- one primary profile with supporting/extensions and selected composers.
58
- 5. **Sources and Artifacts.** Write for a reader outside the indexed module:
59
- make responsibility, stable interfaces/entrypoints, handoffs and the core
60
- state, failure, operation and source-of-truth facts needed for correct use
61
- and attribution discoverable. Declare source roles and logical-unit intent;
62
- select only CLI-registered Artifact kinds/policy variants. Keep logical unit
63
- identity separate from physical Artifact count, and measure useful coverage
64
- by answered profile questions rather than symbol or path counts.
65
- 6. **Inventory protocols.** Close every input member with an explicit
66
- disposition. Use stable aggregation, full-path example identity and
67
- structured chain decisions; do not substitute page prose for inventory.
68
- 7. **Metrics.** Reference registered metric ids as reader-quality guidance.
69
- The CLI may report advisory observations, but a Provider cannot return a
70
- pass, threshold, retry count, or risk-acceptance decision.
71
- 8. **Revision boundary.** Hard contract or source failures block at their
72
- owner. Reader-quality feedback reopens the same Author or Composer through
73
- `context revise`; it does not create a metric retry ledger or risk Gate.
74
- 9. **Reader questions.** Declare reusable question templates with stable refs,
75
- target domains and allowed evidence contracts. Do not make a question id
76
- globally unique to one SubjectKey group.
77
- 10. **Inspector safety.** Accept only the versioned stdin request and bounded
78
- authorized evidence view; emit strict JSON within limits. Never read the
79
- repository, environment or network implicitly, and never expose raw
80
- config values, secrets or unbounded stderr/stdout.
81
- 11. **Base gates.** Do not reduce source scope integrity, identity, evidence,
82
- requirement, disposition, reference-only or provenance gates. Provider
83
- integrity identifies content; it does not grant pass authority.
84
- 12. **Anonymous fixtures.** Cover at least a component library, Web app, API
85
- service, SDK/library and runtime/worker with neutral paths and identifiers.
86
- 13. **Release tests.** Validate the manifest/resource ledger, run positive and
87
- negative fixtures, forward-test the complete Skill, pack it, reinstall the
88
- exact artifact and compare Bundle bytes/digest.
89
- 14. **Content ownership.** Public technology belongs in the community Skill;
90
- company-wide infrastructure belongs in a separate namespaced Provider;
91
- repository, service, team and business mappings belong in business/project
92
- Providers. Community fixtures remain anonymous.
93
- 15. **Marketplace layout.** Archives keep one top-level Skill directory with
94
- `SKILL.md`, the manifest and referenced runtime resources. Exclude tests,
95
- caches, credentials, local paths and Host-specific temporary manifests.
96
- 16. **Material gaps.** Return a canonical question disposition in the same
97
- main Result when required evidence is missing. Never render a gap as an
98
- empty page or speculative prose. Registered Markdown or tool material may
99
- enrich the same main indexing batch before Candidate generation; do not
100
- create a separate answer operation, Candidate, checkpoint or Review. The
101
- CLI projects allowed enrichment material into that same Authorized
102
- Workset View; Providers must not reopen registered sources themselves.
103
- 17. **Backend profiles.** Test neutral RPC/HTTP, Gateway, Event/function,
104
- Cron/worker, sync/reconciliation, stateful service/storage and library
105
- shapes. Local facts remain baseline when optional remote metadata is absent.
106
- 18. **Versioning.** Use Skill/Provider SemVer, exact Provider pins and Bundle
107
- integrity. Fixed dependencies require exact versions and resolved
108
- integrity. `@context-indexer-origin` is required on workspace-local customization
109
- files and grants no authority. It is not required on Provider bundle files.
110
- 19. **Trust boundary.** Skill/manifest describes capabilities; the verified
111
- Bundle supplies bytes; workspace customization supplies project deltas;
112
- CLI contracts supply hard rules. Keep these four authorities distinct.
113
- 20. **Requirement direction.** `IndexRequirementSet` constrains registry,
114
- extractor and Result in one direction. Apply requirement/registry changes
115
- through staged, digest-bound proposals and transactional apply; do not edit
116
- a live registry around the Route.
117
- 21. **Program and remote authority.** Programs must pass static policy and the
118
- applicable trusted/sandbox authorization. Optional remote tools use a
119
- versioned Host Action, exact source-bound request and readable receipt;
120
- they never expand scope or perform writes.
121
- 22. **End-to-end recovery.** Test discovery, exact Provider resolution,
122
- content-addressed staging, controlled execution, Artifact/Evidence Result
123
- validation and crash recovery. A resumed run reuses only complete accepted
124
- records and never infers success from a partial receipt.
125
- 23. **Customization ladder.** Preserve this order: Provider only → config →
126
- instructions append → one template override → program extension →
127
- restricted replace. Document the proof and exit condition at every step;
128
- see [Provider selection and customization](./indexer-provider-and-customization.md).
129
- 24. **Batch neutrality.** Write instructions for one semantic task and accept
130
- that Context may transport several independent tasks in one Agent step.
131
- Never derive identity, ordering, ownership or evidence scope from a task
132
- key or batch position. Partition should decide consumer-facing ownership
133
- from public anchors and unresolved material; detailed supporting Facts are
134
- consumed in the bounded Author View rather than copied into every
135
- Partition decision.
136
-
137
- The current Route delivers readable task material with goals and constraints
138
- first, followed by the authorized sources and facts. For behavioral explanations,
139
- read the complete source excerpts. Copy the displayed `source_items` into the
140
- section's `source_items`; use Fact references in `facts`, not as source items.
141
- Context resolves a text item's authorized source spans internally. Inventory
142
- identities and a repository reference do not identify section source material.
143
- These process-local excerpts are not new Facts or reader-page metadata. Do not
144
- reopen the repository or infer behavior from a locator alone when the supplied
145
- lines do not establish it. Batch size does not define a knowledge page boundary.
146
-
147
- Author task resources may point to one shared batch reading file. Read that path
148
- once, use shared material only for its listed task keys, and consider each task's
149
- own goals and source excerpts. Context shares identical material, not conclusions:
150
- prepare a separate result for each task and submit the `results[]` together through
151
- the current completion command. A retry includes the remaining tasks' material in
152
- full; no earlier batch file or additional reading command is required.
153
-
154
- ## Result and composition rules
155
-
156
- Exactly one primary layer returns a complete partition/author Result for an
157
- operation. Pre-author extensions return only declared fragments and cannot
158
- change ownership, denominator or Subject identity. Post-author composers bind
159
- one current `PrimaryResultView` and return only a derived proposal fragment;
160
- an empty composer run still has a receipt. Composer selection is the
161
- intersection of registry selection, manifest declaration and current profile
162
- applicability, not array order.
163
-
164
- Use canonical SubjectKey schemas and the Context NodeRef formula. All selected
165
- Providers must reuse the same Node when the SubjectKey is equal. An
166
- enricher uses the supplied TargetResolutionView (`resolved`, `absent` or
167
- `ambiguous`) and never guesses identity from a title or path resemblance.
168
-
169
- Every Section uses the exact `document_kind`, `reader_goal` and
170
- `artifact_kind` tuple from the current profile's unique layout mapping. The
171
- Provider never returns a collection name; Context resolves the collection from
172
- that tuple and rejects missing or ambiguous mappings.
173
-
174
- ## Publication gate
175
-
176
- Do not publish until the exact packed artifact passes manifest/schema
177
- validation, anonymous positive/negative fixtures, no-scope-expansion and
178
- secret-leak tests, deterministic Bundle reconstruction, exact-version install,
179
- controlled execution and forward tests. Publishing a new version does not make
180
- existing workspace pins current; workspace selection must re-resolve it.
3
+ An Indexer exposes the source skeleton and guides source-grounded writing.
4
+ Read [planning and writing guidance](./indexer-provider-and-customization.md)
5
+ for the current workflow. Do not recreate routing inside a Skill.
6
+
7
+ ## Skill responsibilities
8
+
9
+ Describe the supported technology, activation signals, useful reader questions,
10
+ and how to investigate an authorized module. A module may use several Skills for
11
+ different concerns. There is no exclusive primary owner, version pin, integrity
12
+ receipt or production registration prerequisite. Skill names and optional usage
13
+ configuration are temporary planning guidance, not article metadata.
14
+
15
+ Keep `SKILL.md` focused on discovery and decisions. Put optional detailed writing
16
+ guidance and reusable scripts beside it, with relative links and clear triggers.
17
+ Distribution metadata does not impose workspace version validation.
18
+
19
+ ## Skeleton first
20
+
21
+ During planning, prefer directories, manifests, registration points and bounded
22
+ search. Either let the Agent inspect these directly or offer a fast helper suited
23
+ to the stack. Report matching names, known counts and file locations. Do not
24
+ require complete symbol extraction, call graphs or reading every implementation
25
+ before proposing articles.
26
+
27
+ Distinguish file-list counts from syntax-derived feature counts. A helper with a
28
+ budget must identify inspected and uninspected scope, return a continuation when
29
+ available, and label partial counts. Never present a stopped scan as a full total.
30
+ Representative deeper reading is optional when it clarifies a topic boundary.
31
+
32
+ Signals suggest topics; they do not prove semantics. A route registration can
33
+ suggest an API topic, but not its error behavior or business meaning. Prefer
34
+ reader questions to a mechanical page for each directory, symbol or heading.
35
+ Keep module directories explicit in task guidance when needed, without adding
36
+ a separate persisted boundary protocol or a new validation gate.
37
+
38
+ ## Writing and evidence
39
+
40
+ Once the current report is confirmed, read the source needed for each assigned
41
+ article. Describe contracts, state changes, failure behavior and integration
42
+ points where relevant. Optional parsing can help locate declarations; it is not
43
+ proof of runtime behavior. Preserve expressions without executing project code,
44
+ distinguish declaration defaults from implementation defaults, and state unknowns.
45
+
46
+ Use the current stage's Markdown and reference-file schemas. Each fragment cites
47
+ at most three actual source locations; the CLI computes regional digests. Split
48
+ an explanation when it needs separate evidence, not to fill a fixed template.
49
+ Reuse stable article and fragment identities when revising. Supporting documents,
50
+ notes or sessions may contribute to the same article without becoming code facts.
51
+
52
+ The Agent plans batches and chooses reading order within the work released by
53
+ the CLI. If supported, workers write assigned drafts and the coordinator submits
54
+ completed subsets. Do not require every batch to finish before submission.
55
+ Use the existing missing-material and repair outputs, not a per-member ledger,
56
+ another content audit or a Skill-specific retry protocol.
57
+
58
+ ## Optional scripts
59
+
60
+ Scripts serve a concrete repeated task; they are not mandatory for every stack.
61
+ Take explicit authorized paths and bounded options, keep source files read-only,
62
+ and return concise output or a file in the supplied temporary area. Do not execute
63
+ repository code, read credentials, traverse unrelated directories or contact
64
+ external services implicitly. Full parsing belongs to selected writing tasks.
65
+ Report unsupported syntax and incomplete traversal separately from zero matches.
66
+
67
+ ## Validation and distribution
68
+
69
+ Test supported technology with anonymous fixtures: feature discovery, bounded
70
+ stopping, unsupported input, repeated names in different paths, and final article
71
+ references. For generated API explanations, verify defaults, shared types and
72
+ unresolved cross-file links in the final page as well as the parser output.
73
+ Use relevant fixtures, not a mandatory matrix for unrelated technologies.
74
+
75
+ Verify packaged relative links and executable helpers. Keep community examples
76
+ free of company-specific services; organization and project knowledge belongs in
77
+ their own Skills. Publishing or installing a Skill requires the appropriate
78
+ authorization and does not add a hash or version check to knowledge production.