@c4a/context-cli 0.7.1 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +18 -39
  2. package/README.zh-CN.md +13 -27
  3. package/cli.js +59797 -81281
  4. package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
  5. package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
  6. package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
  7. package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
  8. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
  9. package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
  10. package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
  11. package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
  12. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
  13. package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
  14. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
  15. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  16. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  17. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  18. package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  19. package/indexers/contracts/operator-contract.json +2 -2
  20. package/indexers/contracts/profile-contract.json +3819 -454
  21. package/indexers/release-manifest.json +22 -22
  22. package/package.json +12 -2
  23. package/plugins/VERSION +1 -1
  24. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  25. package/plugins/claude/commands/context.md +44 -85
  26. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  27. package/plugins/codex/skills/context/SKILL.md +44 -85
  28. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  29. package/plugins/cursor/commands/c4a-context.md +44 -85
  30. package/plugins/skills/context/SKILL.md +44 -85
  31. package/plugins/skills/context-code-indexer/SKILL.md +30 -3
  32. package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
  33. package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
  34. package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
  35. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
  36. package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
  37. package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
  38. package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
  39. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
  40. package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
  41. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
  42. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  43. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  44. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  45. package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  46. package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
  47. package/providers/context/actions/configure-indexer-providers.yaml +1 -1
  48. package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
  49. package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
  50. package/providers/context/codes.yaml +6 -22
  51. package/providers/context/graphs/indexer.yaml +73 -564
  52. package/providers/context/graphs/workspace.yaml +5 -44
  53. package/providers/context/manifest.json +77 -666
  54. package/providers/context/provider.yaml +1 -1
  55. package/providers/context/resources/dialogue/human-gates.md +3 -3
  56. package/providers/context/resources/manuals/reference/package-templates.md +2 -3
  57. package/providers/context/resources/manuals/reference/project-api.md +52 -986
  58. package/providers/context/resources/procedures/close-and-build.md +8 -23
  59. package/providers/context/resources/procedures/knowledge-review.md +13 -4
  60. package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
  61. package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
  62. package/providers/context/schemas/indexer-agent-step-input.schema.json +2 -2
  63. package/providers/context/schemas/indexer-agent-step-result.schema.json +298 -32
  64. package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
  65. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
  66. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
  67. package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
  68. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +51 -2
  69. package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +32 -0
  70. package/providers/context/skills/configure-indexer-providers/SKILL.md +40 -27
  71. package/providers/context/skills/run-indexer-agent-step/SKILL.md +34 -8
  72. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +5 -4
  73. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +38 -9
  74. package/docs/document-optimization.md +0 -82
  75. package/docs/document-optimization.zh-CN.md +0 -70
  76. package/indexers/capability-manifest.json +0 -35
  77. package/indexers/contracts/hard-rule-conformance.json +0 -2644
  78. package/providers/context/actions/accept-main-index-run.yaml +0 -7
  79. package/providers/context/actions/accept-material-answer-run.yaml +0 -7
  80. package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
  81. package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
  82. package/providers/context/actions/audit-material-gap-state.yaml +0 -8
  83. package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
  84. package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
  85. package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
  86. package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
  87. package/providers/context/actions/build-material-question-workset.yaml +0 -7
  88. package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
  89. package/providers/context/actions/build-question-target-inventory.yaml +0 -7
  90. package/providers/context/actions/build-subject-catalog.yaml +0 -7
  91. package/providers/context/actions/build-target-resolution-views.yaml +0 -7
  92. package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
  93. package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
  94. package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
  95. package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
  96. package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
  97. package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
  98. package/providers/context/actions/fail-main-index-run.yaml +0 -7
  99. package/providers/context/actions/fail-material-answer-run.yaml +0 -7
  100. package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
  101. package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
  102. package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
  103. package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
  104. package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
  105. package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
  106. package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
  107. package/providers/context/actions/override-index-profile-audit.yaml +0 -7
  108. package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
  109. package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
  110. package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
  111. package/providers/context/actions/reconcile-review-identities.yaml +0 -5
  112. package/providers/context/actions/record-index-profile-revision.yaml +0 -7
  113. package/providers/context/actions/report-index-profile-failure.yaml +0 -7
  114. package/providers/context/actions/resolve-effective-composers.yaml +0 -7
  115. package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
  116. package/providers/context/actions/revise-document.yaml +0 -5
  117. package/providers/context/actions/revise-index-output.yaml +0 -7
  118. package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
  119. package/providers/context/actions/start-main-index-run.yaml +0 -7
  120. package/providers/context/actions/start-material-answer-run.yaml +0 -7
  121. package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
  122. package/providers/context/resources/procedures/document-revision.md +0 -36
  123. package/providers/context/resources/views/document-optimization-current.yaml +0 -6
  124. package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
  125. package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
  126. package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
  127. package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
  128. package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
  129. package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
  130. package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
  131. package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
  132. package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
  133. package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
  134. package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
  135. package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
  136. package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
  137. package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
  138. package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
  139. package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
  140. package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
  141. package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
  142. package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
  143. package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
  144. package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
  145. package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
  146. package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
  147. package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
  148. package/providers/context/skills/revise-index-output/SKILL.md +0 -12
@@ -1,20 +1,77 @@
1
1
  # Profile metric revision guide
2
2
 
3
- Use the current CLI audit as the sole source of actual, recommended, and hard values. This guide explains how to revise a Result; it does not define thresholds or authorize changing a denominator.
3
+ This guide names reader-facing quality problems and explains how to revise a
4
+ Result. It does not define a second readiness check, ask the Agent to score its
5
+ own output, or authorize changing the profile contract.
6
+
7
+ ## What this catalog does not prove
8
+
9
+ Read this before treating a metric catalog as proof of success. These entries
10
+ describe useful review lenses, but they do not read prose for meaning and they
11
+ do not replace Context's deterministic validation or final Review. A Result can
12
+ look tidy by these measures and still fail to answer a reader's question.
13
+
14
+ Count entries point to shapes that should normally disappear, coverage entries
15
+ ask whether a known inventory was handled, and ratios help find excessive
16
+ duplication or scaffolding. They interact, so repair the reader problem rather
17
+ than optimizing one number in isolation.
18
+
19
+ One entry, `discretionary-artifacts-per-logical-unit`, is judged
20
+ comparatively rather than against a fixed ceiling: it reacts to inflation
21
+ relative to the selected Bundle variant. Do not look for a constant here.
22
+
23
+ Context blocks only facts it can calculate from current authority, including
24
+ workset identity, complete question planning, inventory disposition coverage,
25
+ evidence contracts, layout and currentness. Natural-language usefulness and
26
+ support remain authoring and final-Review responsibilities. No Agent-supplied
27
+ metric value can weaken or satisfy those checks.
28
+
29
+ ## Do not satisfy one entry by breaking another
30
+
31
+ These conflicts are the common cause of a second failed audit.
32
+
33
+ The inventory denominator is protected. Reduce
34
+ `narrative-enumeration-ratio` by relocating identities into the deterministic
35
+ catalog, never by dropping them from the Result. A dropped identity converts an
36
+ enumeration finding into an `inventory-disposition-coverage` failure.
37
+
38
+ Merging is not concatenation. When resolving
39
+ `duplicated-fact-target-ratio`, name one canonical owner and replace the other
40
+ copies with explicit relationships. Pasting several pages together moves the
41
+ duplication into one page and raises its enumeration instead.
42
+
43
+ A deterministic catalog is not a discretionary Artifact. When enumeration
44
+ moves into a catalog, bind that catalog to the logical unit that owns it. Do
45
+ not create a new optional Artifact to hold it, which trades an enumeration
46
+ finding for artifact inflation.
47
+
48
+ Re-home facts before removing a target. Satisfying
49
+ `reference-only-reader-targets` means merging an alias or ordinary reference
50
+ into its canonical owner. Deleting the target and its facts loses evidence and
51
+ reopens disposition coverage.
52
+
53
+ Regrouping must be semantic. Satisfying `unresolved-ordinal-partitions` by
54
+ renaming numbered batches to non-numeric labels changes nothing; the identity
55
+ must come from a boundary a reader can name.
4
56
 
5
57
  ## inventory-disposition-coverage
6
58
 
7
59
  ### Meaning
8
60
 
9
- Every identity in the CLI inventory needs an owned, excluded, or unsupported disposition.
61
+ Every identity in the CLI inventory needs an owned, excluded, or unsupported
62
+ disposition.
10
63
 
11
64
  ### Revise
12
65
 
13
- Return decisions for the reported missing identities, preserving the complete inventory denominator and citing the evidence behind exclusions or unsupported cases.
66
+ Return decisions for the reported missing identities, preserving the complete
67
+ inventory denominator and citing the evidence behind exclusions or unsupported
68
+ cases.
14
69
 
15
70
  ### Positive example
16
71
 
17
- An internal generated file is retained in the inventory and marked excluded with its generated-source evidence.
72
+ An internal generated file is retained in the inventory and marked excluded
73
+ with its generated-source evidence, so a reader can see it was considered and
74
+ why it carries no reader knowledge.
18
75
 
19
76
  ### Anti-example
20
77
 
@@ -24,11 +81,13 @@ The Result omits files that did not fit the selected template.
24
81
 
25
82
  ### Meaning
26
83
 
27
- The same reader fact should have one canonical target rather than competing copies across Artifacts.
84
+ The same reader fact should have one canonical target rather than competing
85
+ copies across Artifacts.
28
86
 
29
87
  ### Revise
30
88
 
31
- Choose the canonical owner, replace other copies with explicit relationships, and keep evidence on the owning fact.
89
+ Choose the canonical owner, replace other copies with explicit relationships,
90
+ and keep evidence on the owning fact.
32
91
 
33
92
  ### Positive example
34
93
 
@@ -42,33 +101,55 @@ Several pages repeat the same behavior paragraph with different headings.
42
101
 
43
102
  ### Meaning
44
103
 
45
- Reader prose should explain capabilities and boundaries instead of restating a deterministic inventory as sentences.
104
+ Reader prose should explain capabilities and boundaries instead of restating a
105
+ deterministic inventory as sentences.
106
+
107
+ The measured scope is reader prose only. A deterministic catalog Artifact that
108
+ the Result declares as such is outside both the numerator and the denominator:
109
+ a complete inventory is that Artifact's entire purpose, and counting it as
110
+ narrative enumeration would penalise the Result for holding the catalog it was
111
+ asked to produce. Count an identity once, in the prose that mentions it. An
112
+ identity that lives only in a declared catalog is not counted at all.
46
113
 
47
114
  ### Revise
48
115
 
49
- Move exhaustive identities into the deterministic catalog, group related items by a reader question, and explain responsibility, differences, and handoffs.
116
+ Move exhaustive identities into the deterministic catalog, group related items
117
+ by a reader question, and explain responsibility, differences, and handoffs.
118
+
119
+ One allowance serves every profile, because excluding declared catalogs from
120
+ the scope already accounts for the profiles whose reader value lies in a
121
+ complete inventory. A catalog-heavy Result is measured on its prose like any
122
+ other, so a breach here means the prose itself restates the catalog rather than
123
+ explaining it — never that the profile is inherently enumerative. Do not
124
+ rewrite a catalog into prose, and do not move prose into a catalog to change
125
+ the count: relocating an identity is legitimate only when the catalog is where
126
+ the reader should look for it.
50
127
 
51
128
  ### Positive example
52
129
 
53
- A capability section explains dispatch choices and links to a complete generated route catalog.
130
+ A capability section explains dispatch choices and links to a complete
131
+ generated route catalog.
54
132
 
55
133
  ### Anti-example
56
134
 
57
- The page turns every discovered symbol into an observed bullet.
135
+ The page turns every discovered symbol into an "observed" bullet.
58
136
 
59
137
  ## normalized-template-repetition-ratio
60
138
 
61
139
  ### Meaning
62
140
 
63
- Repeated sentence frames with only identity substitutions indicate template residue rather than evidence-specific explanation.
141
+ Repeated sentence frames with only identity substitutions indicate template
142
+ residue rather than evidence-specific explanation.
64
143
 
65
144
  ### Revise
66
145
 
67
- Merge repeated observations, describe the shared rule once, and record meaningful exceptions with their own evidence.
146
+ Merge repeated observations, describe the shared rule once, and record
147
+ meaningful exceptions with their own evidence.
68
148
 
69
149
  ### Positive example
70
150
 
71
- A family section states the common lifecycle and separately explains the exceptional member.
151
+ A family section states the common lifecycle and separately explains the
152
+ exceptional member.
72
153
 
73
154
  ### Anti-example
74
155
 
@@ -78,47 +159,58 @@ Every member receives the same sentence with only its name changed.
78
159
 
79
160
  ### Meaning
80
161
 
81
- Reader knowledge should describe stable behavior without copying implementation bodies, generated payloads, or declaration dumps.
162
+ Reader knowledge should describe stable behavior without copying implementation
163
+ bodies, generated payloads, or declaration dumps.
82
164
 
83
165
  ### Revise
84
166
 
85
- Replace copied code with an evidence-bound behavioral statement and retain only a small excerpt when it is necessary to explain a contract or failure boundary.
167
+ Replace copied code with an evidence-bound behavioral statement and retain only
168
+ a small excerpt when it is necessary to explain a contract or failure boundary.
86
169
 
87
170
  ### Positive example
88
171
 
89
- The page explains the validation and rollback sequence and links to the exact implementation locator.
172
+ The page explains the validation and rollback sequence and links to the exact
173
+ implementation locator.
90
174
 
91
175
  ### Anti-example
92
176
 
93
- The page embeds the complete function or generated type file as its main content.
177
+ The page embeds the complete function or generated type file as its main
178
+ content.
94
179
 
95
180
  ## reference-only-reader-targets
96
181
 
97
182
  ### Meaning
98
183
 
99
- A reader target requires a CLI-authorized declaration, registration, public contract, approved Subject, or Partition Subject identity.
184
+ A reader target requires a CLI-authorized declaration, registration, public
185
+ contract, approved Subject, or Partition Subject identity.
100
186
 
101
187
  ### Revise
102
188
 
103
- Merge aliases and ordinary references into their canonical owner, or remove the target when no authorized identity observation exists.
189
+ Merge aliases and ordinary references into their canonical owner, or remove the
190
+ target when no authorized identity observation exists.
104
191
 
105
192
  ### Positive example
106
193
 
107
- A re-export alias points to the canonical public target instead of creating another page.
194
+ A re-export alias points to the canonical public target instead of creating
195
+ another page.
108
196
 
109
197
  ### Anti-example
110
198
 
111
- A frequently imported helper becomes a target solely because it has many references.
199
+ A frequently imported helper becomes a target solely because it has many
200
+ references.
112
201
 
113
202
  ## unresolved-ordinal-partitions
114
203
 
115
204
  ### Meaning
116
205
 
117
- Partition identity must come from a stable semantic boundary, not traversal order or a fixed batch label.
206
+ Partition identity must come from a stable semantic boundary, not traversal
207
+ order or a fixed batch label.
118
208
 
119
209
  ### Revise
120
210
 
121
- Regroup members by capability, entrypoint, lifecycle stage, state owner, protocol boundary, or handoff; if none applies, return the protocol outcome for CLI-owned catalog fallback.
211
+ Regroup members by capability, entrypoint, lifecycle stage, state owner,
212
+ protocol boundary, or handoff; if none applies, return the protocol outcome for
213
+ CLI-owned catalog fallback.
122
214
 
123
215
  ### Positive example
124
216
 
@@ -132,15 +224,18 @@ Files are divided into successive numbered batches to reduce page size.
132
224
 
133
225
  ### Meaning
134
226
 
135
- Optional Artifacts must answer distinct reader questions allowed by the selected Bundle variant.
227
+ Optional Artifacts must answer distinct reader questions allowed by the
228
+ selected Bundle variant.
136
229
 
137
230
  ### Revise
138
231
 
139
- Remove unsupported optional Artifacts, merge overlapping ones, or select another CLI-eligible variant when canonical facts justify it.
232
+ Remove unsupported optional Artifacts, merge overlapping ones, or select
233
+ another CLI-eligible variant when canonical facts justify it.
140
234
 
141
235
  ### Positive example
142
236
 
143
- An examples Artifact is retained because it explains a distinct usage scenario with independent evidence.
237
+ An examples Artifact is retained because it explains a distinct usage scenario
238
+ with independent evidence.
144
239
 
145
240
  ### Anti-example
146
241
 
@@ -150,33 +245,40 @@ The Result creates extra pages to spread the same prose across a larger Bundle.
150
245
 
151
246
  ### Meaning
152
247
 
153
- Every CLI-discovered example candidate needs one explicit terminal or merge decision.
248
+ Every CLI-discovered example candidate needs one explicit terminal or merge
249
+ decision.
154
250
 
155
251
  ### Revise
156
252
 
157
- Decide each reported candidate as linked, merged, documentation-only, excluded with reason, or blocked by a material request.
253
+ Decide each reported candidate as linked, merged, documentation-only, excluded
254
+ with reason, or blocked by a material request.
158
255
 
159
256
  ### Positive example
160
257
 
161
- A duplicate scenario is merged into a canonical example through its full example identity.
258
+ A duplicate scenario is merged into a canonical example through its full
259
+ example identity.
162
260
 
163
261
  ### Anti-example
164
262
 
165
- Unclear examples disappear from the Result without a disposition.
263
+ A candidate whose purpose was unclear is left out of the Result entirely, so a
264
+ later reader cannot tell whether it was rejected or never examined.
166
265
 
167
266
  ## example-representative-coverage
168
267
 
169
268
  ### Meaning
170
269
 
171
- Eligible scenarios need retained representatives that explain setup, key calls, parameters, and expected behavior.
270
+ Eligible scenarios need retained representatives that explain setup, key calls,
271
+ parameters, and expected behavior.
172
272
 
173
273
  ### Revise
174
274
 
175
- Promote or merge evidence-backed examples for the reported uncovered scenarios and close each required facet explicitly.
275
+ Promote or merge evidence-backed examples for the reported uncovered scenarios
276
+ and close each required facet explicitly.
176
277
 
177
278
  ### Positive example
178
279
 
179
- A canonical example covers the scenario and records evidence-backed not-applicable facets.
280
+ A canonical example covers the scenario and records evidence-backed
281
+ not-applicable facets.
180
282
 
181
283
  ### Anti-example
182
284
 
@@ -186,16 +288,20 @@ A path is listed as an example without explaining how or why it is used.
186
288
 
187
289
  ### Meaning
188
290
 
189
- Eligible examples should resolve to the exact public target they demonstrate whenever that target exists.
291
+ Eligible examples should resolve to the exact public target they demonstrate
292
+ whenever that target exists.
190
293
 
191
294
  ### Revise
192
295
 
193
- Resolve aliases, repair the terminal decision chain, and bind the representative to the CLI-supplied public target identity.
296
+ Resolve aliases, repair the terminal decision chain, and bind the
297
+ representative to the CLI-supplied public target identity.
194
298
 
195
299
  ### Positive example
196
300
 
197
- A scenario variant merges into a representative whose terminal decision links the canonical public target.
301
+ A scenario variant merges into a representative whose terminal decision links
302
+ the canonical public target.
198
303
 
199
304
  ### Anti-example
200
305
 
201
- An example is linked to a similarly named internal helper or only to a directory.
306
+ An example is linked to a similarly named internal helper or only to a
307
+ directory.
@@ -90,8 +90,8 @@ helper separately.
90
90
  Add structured edges only for concrete registration and call paths. Keep a
91
91
  narrative locator when dynamic dispatch prevents an unambiguous edge.
92
92
 
93
- Return `identityGroups` when several target identities share one explained
94
- adapter responsibility. Return every source-backed adjacency in
93
+ Use one canonical semantic subject when several target identities share one
94
+ explained adapter responsibility. Return every source-backed adjacency in
95
95
  `chainCandidates`, then provide one `chainCandidateDecisions` record for each
96
96
  candidate. A documented decision names the reader-facing view and emits its
97
97
  structured edge; an equivalent candidate merges into that canonical candidate;
@@ -30,6 +30,14 @@ Treat stories and examples as usage evidence, not as authority for unsupported
30
30
  props or behavior. When generated declarations disagree with source, identify
31
31
  the authoritative source and record the gap.
32
32
 
33
+ When the Authorized Workset View supplies a public declaration together with
34
+ structured props, events, defaults, variants, maintained examples, or source
35
+ roles, the corresponding reader section must consume those facts or record an
36
+ explicit supported omission/material-gap disposition. Do not replace available
37
+ contract facts with a generic statement about the component directory. A group
38
+ without any reader-authorizing public declaration remains catalog-only and does
39
+ not produce an empty component page.
40
+
33
41
  ## Questions the knowledge must answer
34
42
 
35
43
  1. Which component families are public, and how are they imported?
@@ -36,6 +36,22 @@ fields, imports, or transport-library dependencies.
36
36
  4. What timeout, retry, compatibility, and failure behavior is source-backed?
37
37
  5. Which generated artifacts are locators rather than independent authority?
38
38
 
39
+ ## Chapter blueprint
40
+
41
+ ```markdown
42
+ # <Gateway or facade boundary>
43
+ ## Exposed and translated responsibilities
44
+ ## Operations provided or consumed
45
+ ## Request, identity, and context mapping
46
+ ## Timeout, retry, compatibility, and failure translation
47
+ ## Contract authority and generated bindings
48
+ ## Source-backed provider-to-consumer relationships
49
+ ```
50
+
51
+ Operations belong under the operations chapter as canonical records. Do not
52
+ promote a single operation to a page heading unless its authority, security, or
53
+ failure semantics differ materially from the rest of the boundary.
54
+
39
55
  ## Canonical operation record
40
56
 
41
57
  Use this record wherever another selected template asks for an operation,
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: context-markdown-indexer
3
- description: Context-managed Provider for evidence-bound document knowledge. Use only when the Context Indexer lifecycle selects this Provider, not as a standalone workflow.
3
+ description: Context-managed Provider for source-grounded document knowledge. Use only when the Context Indexer lifecycle selects this Provider, not as a standalone workflow.
4
4
  metadata:
5
5
  context-role: "indexer-provider"
6
6
  context-public-entry: "false"
7
- context-provider-version: "1.0.0"
7
+ context-provider-version: "1.1.0"
8
8
  ---
9
9
 
10
10
  # Context Markdown Indexer
@@ -15,6 +15,16 @@ the shared Provider/customization guide before publishing or extending this
15
15
  Skill. Those documents are authoring contracts; the current captured evidence,
16
16
  workset and Route remain execution authority.
17
17
 
18
- Use this Provider only through the Context Indexer lifecycle. Context supplies exact captured sources, profile authority, worksets, and evidence views; the Provider does not read arbitrary workspace paths or write approved knowledge directly.
18
+ Use this Provider only through the Context Indexer lifecycle. Context supplies exact profile/workset authority and one Authorized Workset View containing the permitted captured evidence. The Provider does not open source-specific readers, manage pagination/receipts, read arbitrary workspace paths, or write approved knowledge directly.
19
+
20
+ Treat the captured document as reader material, not as pipeline metadata. Every
21
+ reader Artifact must preserve or synthesize the source-backed guidance needed by
22
+ the selected profile. A heading inventory, directory summary, generic document
23
+ description, internal Fact/View/digest count, or a sentence sending the reader
24
+ back to the source is not useful knowledge and must not be emitted. Keep
25
+ execution receipts, content digests, internal refs, and other recovery machinery
26
+ out of reader Markdown. Bind each reader claim only to the smallest relevant
27
+ source span or captured evidence set; never attach a whole document corpus or
28
+ Authorized Workset View to a generic summary.
19
29
 
20
30
  The machine-readable authority is `context-indexer.yaml`. Context materializes the detailed guidance only after verifying this Bundle's release identity and complete file ledger.
@@ -1,6 +1,6 @@
1
1
  protocol: context.indexer.provider/v1
2
2
  id: context-markdown-indexer
3
- version: 1.0.0
3
+ version: 1.1.0
4
4
  domains: [markdown]
5
5
 
6
6
  activation:
@@ -34,16 +34,28 @@ provides:
34
34
  - test-validation
35
35
  - release-migration-guide
36
36
  - documentation-site
37
+ partition_strategies:
38
+ - id: reader-subject
39
+ profiles:
40
+ - domain-reference
41
+ - product-requirements
42
+ - technical-guide
43
+ - user-and-developer-guide
44
+ - public-api-reference
45
+ - runbook
46
+ - faq-support
47
+ - standard-policy
48
+ - decision-record
49
+ - incident-review
50
+ - test-validation
51
+ - release-migration-guide
52
+ - documentation-site
53
+ priority: 100
37
54
  operations:
38
55
  - id: main-index
39
- consumes: context.indexer.main-workset/v1
56
+ consumes: context.indexer.main-workset/v2
40
57
  produces: context.indexer.main-result/v1
41
58
  accepts_layer_fragments: [fact-enrichment, template-variables]
42
- - id: material-answer
43
- consumes: context.indexer.material-question-workset/v1
44
- produces: context.indexer.material-answer-result/v1
45
- supported_evidence_kinds: [contract, configuration, documentation, runbook, decision-record, test-result, runtime-observation, tool-snapshot]
46
- accepts_layer_fragments: [fact-enrichment]
47
59
  source_roles: [authoritative-document, supporting-document, operational-document, decision-record]
48
60
  logical_units:
49
61
  - id: reader-subject
@@ -145,3 +157,4 @@ quality_guidance:
145
157
  - reference-only-reader-targets
146
158
  - unresolved-ordinal-partitions
147
159
  - discretionary-artifacts-per-logical-unit
160
+ repair: references/indexer.md
@@ -1,6 +1,6 @@
1
1
  # Markdown Indexer authoring contract
2
2
 
3
- Classify and author at the source-backed Section level. A document profile describes reader intent; it is not an output directory. Mixed documents may contain Sections with different reader goals, but every Section must retain one stable subject, owner, source authority, and projection intent.
3
+ Classify and author at the source-backed Section level using only the current Authorized Workset View. A document profile describes reader intent; it is not an output directory. Mixed documents may contain Sections with different reader goals, but every Section must retain one stable subject, owner, source authority, and projection intent.
4
4
 
5
5
  Use `classification.md` as the semantic source for `document_kind`, `reader_goal`, and current `artifact_kind` selection. Use `structure-and-artifacts.md` for mixed-document routing, Section-versus-Artifact promotion, density, duplicate/conflict handling, and target candidate resolution. The CLI-supplied profile contract remains the only authority for collection and path projection.
6
6
 
@@ -14,10 +14,39 @@ Use `editorial-policy.md` for scenario editorial signals, recommended outcomes,
14
14
 
15
15
  Preserve exact commands, identifiers, links, attachments, tables, and code blocks when they are evidence-bearing. Separate deterministic catalogs from explanation. Do not publish unsupported claims, conversion annotations, placeholders, or unresolved requests as knowledge.
16
16
 
17
- When current source material cannot answer a required canonical question, return the exact material-question disposition for the supplied target. Answers may use only authorized evidence kinds and spans. Context owns review, layout, collection mapping, material-gap persistence, quality thresholds, and final close.
17
+ When a captured document already contains coherent reader-facing guidance, preserve and organize that supported content instead of replacing it with a heading inventory, directory summary, or a sentence that points the reader back to the source. Summarize only repetition or navigation scaffolding. A shorter Artifact is acceptable only when it still answers the selected reader questions and retains the source's useful contracts, examples, conditions, compatibility notes, and uncertainty.
18
18
 
19
- Follow the operation in the supplied run request. For `main-index`, return only the current `IndexerResult`/`ArtifactResult` contract; Context derives the exact source-span, selected-fact, logical-unit, Artifact, and negative group-input dependencies from that result. For `material-answer`, return only `context.indexer.material-answer-result/v1`. Each binding must echo one eligible `question_key`, its exact `question_revision_digest`, and canonical evidence claims containing only `kind`, authorized `source_ref`, normalized `source_spans`, and the current content `evidence_digest`. Do not return reader prose, an answer body, source-origin/input identities, an `EvidenceItemRef`, a future Artifact/Section identity, or an actualization. Context canonicalizes evidence, performs the limited Review, derives a body-free planned answer from the approved binding, and maps its supplied answer landing after layout.
19
+ For each reader Artifact, start the first actual Section with exactly one
20
+ level-one heading that names the reader subject. Keep the heading concise and
21
+ source-backed. It is a display title for outline and final Candidate Review,
22
+ not a SubjectKey, ownership signal, or identity fallback. Later Sections in the
23
+ same Artifact must not add another level-one heading.
20
24
 
21
- Never create a legacy `MarkdownCollectionSlice` or invoke the independent `alignProse` phase. Never mix `main-index` and `material-answer` output.
25
+ When current source material cannot answer a required canonical question, return the exact material-question disposition for the supplied target. A later run may consume newly captured Markdown as ordinary source and update the same knowledge candidate. Context owns layout, collection mapping, runtime material-gap state, quality thresholds, the single final content Review, and close.
26
+
27
+ Return only the current `main-index` `IndexerResult`/`ArtifactResult` contract. Context derives the source dependencies needed for stale detection and recovery from that result. Do not emit a separate answer body, answer-only result, future Artifact/Section landing, or post-layout actualization.
28
+
29
+ Return all knowledge through the current Indexer result; do not create an independent authoring pipeline.
30
+
31
+ ## Quality guidance and production checks
32
+
33
+ Context blocks only conditions it can derive from current inputs: the complete
34
+ source inventory needs dispositions, the selected reader-question set needs a
35
+ complete plan, answered questions must satisfy their evidence contracts, and
36
+ references, layout and currentness must remain valid.
37
+
38
+ Profile metrics are writing guidance rather than a separate pass decision.
39
+ They point out duplicated facts, enumeration where explanation was expected,
40
+ repeated template scaffolding, oversized quoted bodies, traversal-ordered
41
+ Partitions, reference-only targets and unsupported optional Artifacts. Treat a
42
+ finding as a prompt to reread the Section. Do not adjust wording, headings,
43
+ sentence counts or Partitions merely to move a counter.
44
+
45
+ Natural-language statements are not mechanically checked sentence by sentence.
46
+ Use only behavior stated by the supplied material, record a material gap when
47
+ the source does not establish a needed conclusion, and rely on final Review to
48
+ reject unsupported interpretation. When shape guidance conflicts with source
49
+ coverage, preserve the source-backed content and improve its presentation
50
+ rather than deleting it.
22
51
 
23
52
  Do not return output paths, collection names, arbitrary question text, new authority, or pass/fail claims.
@@ -1,15 +1,31 @@
1
- # Evidence, subject, and claim planning
2
-
3
- Use these rules while producing the operation selected by the current run
4
- request. For the current `main-index` `ArtifactResult`, apply every rule below. For
5
- `material-answer`, produce only evidence claims for eligible questions; the
6
- question identity, landing, canonical evidence items, planned-answer projection
7
- and post-layout actualization remain Context-owned. These rules preserve the
8
- useful semantic judgments from the former classification and align path without
9
- restoring `context.structure.v1`, collection selection, or a second write
10
- workflow. Context remains the authority for schemas, SubjectKey normalization,
11
- identities, paths, collisions, stale state, layout changes, Review, and
12
- publication.
1
+ # Source, subject, and claim planning
2
+
3
+ Use these rules while producing the current `main-index` `ArtifactResult`.
4
+ Captured Markdown is ordinary source material: it may create or enrich the same
5
+ knowledge candidates as code-derived input. If required material is still
6
+ missing, return a material-gap disposition and let a later main-index run consume
7
+ the newly captured source. Do not create an answer-only result, landing, or
8
+ second review workflow. Context remains the authority for schemas, SubjectKey
9
+ normalization, identities, paths, collisions, stale state, layout changes,
10
+ Review, and publication.
11
+
12
+ ## `reader-subject` partition strategy
13
+
14
+ For a partition workset, group captured document members by durable reader
15
+ subject rather than by file, heading, route, or temporary capture batch. Use
16
+ the complete authorized document text together with maintained title,
17
+ `source_path`, route, audience, and reader-task evidence. These fields are
18
+ evidence for the decision; none is sufficient by itself.
19
+
20
+ One group may contain multiple documents when they jointly explain the same
21
+ reader subject. Split platform or runtime variants only when their supported
22
+ contract, behavior, lifecycle, or reader task is materially different. Keep
23
+ navigation-only indexes, generated duplicates, empty placeholders, and
24
+ superseded pages out of authored groups with an explicit inventory
25
+ disposition. Every current inventory member must still receive exactly one
26
+ partition disposition. If durable subject boundaries cannot be established,
27
+ fail this semantic strategy so Context can use its existing catalog fallback;
28
+ do not silently return one group per file under `reader-subject`.
13
29
 
14
30
  ## Evidence and authority
15
31
 
@@ -18,8 +34,8 @@ making a source-wide decision. A file name, URL, title, heading, navigation
18
34
  label, polished wording, profile id, or example is a navigation signal, not
19
35
  proof of subject identity, authority, or reader intent.
20
36
 
21
- Use only current source roles, evidence bindings, target-resolution views, and
22
- question targets supplied with the workset. Supporting or context-only material
37
+ Use only current source roles, authorized source views, target-resolution views,
38
+ and question targets supplied with the workset. Supporting or context-only material
23
39
  may guide investigation but cannot become a cited Section or structured claim
24
40
  unless the current authority makes it eligible. Preserve exact identifiers,
25
41
  commands, links, numbers, conditions, code, and source-authored uncertainty.
@@ -32,6 +32,12 @@ or a long table. Do not create thin Artifacts to improve counts. If material has
32
32
  an independent subject rather than merely a separate reader page, use the
33
33
  workset's target-resolution choices; never invent a Node identity from a title.
34
34
 
35
+ Do not collapse a substantial captured document into a page that only lists its
36
+ headings or says the source should be consulted. Preserve supported procedures,
37
+ API tables, examples, constraints, compatibility notes, and decisions inside
38
+ the selected reader Artifact; remove only navigation chrome, conversion noise,
39
+ duplicates, and content with an explicit omission disposition.
40
+
35
41
  Within one Artifact, every Section must use that Artifact's `artifact_kind`.
36
42
  Start by grouping only Sections with the same exact
37
43
  `document_kind + reader_goal + artifact_kind` intent. Different intents may be
@@ -18,7 +18,7 @@
18
18
  "artifact_kind": "content",
19
19
  "purpose": "required",
20
20
  "reader_question_refs": [
21
- "question:source-authority"
21
+ "question:reader-structure"
22
22
  ],
23
23
  "evidence_refs": [
24
24
  "evidence:anonymous-guide-source"