@c4a/context 0.7.8 → 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.
- package/articleStructure.d.ts +254 -0
- package/docs/guides/agent-dialogue.md +6 -5
- package/docs/guides/agent-guide.md +11 -5
- package/docs/guides/code-indexer-skill-authoring.md +76 -178
- package/docs/guides/indexer-provider-and-customization.md +93 -398
- package/docs/guides/indexer-skill-creation.md +107 -97
- package/docs/guides/knowledge-updates.md +137 -18
- package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
- package/docs/guides/package-outputs.md +213 -47
- package/docs/reference/indexer-provider-protocol.md +71 -102
- package/docs/reference/package-templates.md +39 -65
- package/docs/reference/project-api.md +53 -0
- package/docs/reference/template-variables.md +2 -3
- package/index.d.ts +11 -11
- package/index.js +5826 -8062
- 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 +4 -22
- 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/indexerProtocolHash.d.ts +2 -0
- package/indexerProvider.d.ts +76 -318
- package/indexerProviderComposition.d.ts +16 -42
- package/indexerQuestionAuthority.d.ts +2 -82
- package/indexerReaderTargetInventory.d.ts +6 -6
- package/indexerRegistry.d.ts +606 -0
- package/indexerRequirementLifecycle.d.ts +6 -6
- package/indexerResultReconciliation.d.ts +35 -149
- package/indexerSemanticInput.d.ts +10926 -5665
- package/indexerStructuredDeclaration.d.ts +24 -24
- package/indexerTemplateRendering.d.ts +239 -113
- package/{readingStructure.d.ts → knowledgeMap.d.ts} +21 -21
- package/package.json +1 -1
- package/packageSite.d.ts +25 -0
- 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
|
@@ -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
|
|
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
|
|
@@ -67,7 +67,8 @@ again. Resolve essential missing goals or source boundaries before production.
|
|
|
67
67
|
|
|
68
68
|
`grill-me` is targeted clarification, not a fixed questionnaire. Research what the
|
|
69
69
|
available material can answer, then ask about consequential unknowns. A required
|
|
70
|
-
schema field is not automatically a question for the user. For
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
schema field is not automatically a question for the user. For the first production
|
|
71
|
+
task in a new workspace, the work-start report must resolve and display the agreed
|
|
72
|
+
purpose, source families, language, settings, outputs and first delivery before
|
|
73
|
+
source registration. Present it and wait for feedback even in managed mode. A
|
|
74
|
+
report must not silently substitute guessed decisions for unanswered questions.
|
|
@@ -96,11 +96,17 @@ delivery batches do complete their applicable content review, close and build;
|
|
|
96
96
|
they are distinct from Partition transport batches. The first delivery normally
|
|
97
97
|
contains 1–3 pages, followed by 30–50-page batches or a smaller remaining tail.
|
|
98
98
|
|
|
99
|
-
For
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
For the first production task in a new workspace, follow the selected work-start
|
|
100
|
+
report procedure using the user's task instructions and batch metadata titles for
|
|
101
|
+
the supplied list, falling back to at most 10 unresolved title lookups if unavailable.
|
|
102
|
+
Do not fetch source bodies or outlines before
|
|
103
|
+
capture; missing titles may remain unknown. Detailed plans are provisional until
|
|
104
|
+
captured evidence is available.
|
|
105
|
+
Resolve its required start conditions, present it and wait for feedback before
|
|
106
|
+
source registration or capture. Reuse explicit answers and defaults instead of
|
|
107
|
+
asking a fixed questionnaire. Existing-workspace lightweight changes may keep a
|
|
108
|
+
short conversational summary. The source-boundary Gate remains the confirmation
|
|
109
|
+
authority; fully managed mode does not bypass the first report handoff.
|
|
104
110
|
|
|
105
111
|
## Quality bar
|
|
106
112
|
|
|
@@ -1,180 +1,78 @@
|
|
|
1
1
|
# Code Indexer Skill authoring
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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.
|