@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.
Files changed (84) hide show
  1. package/articleStructure.d.ts +254 -0
  2. package/docs/guides/agent-dialogue.md +6 -5
  3. package/docs/guides/agent-guide.md +11 -5
  4. package/docs/guides/code-indexer-skill-authoring.md +76 -178
  5. package/docs/guides/indexer-provider-and-customization.md +93 -398
  6. package/docs/guides/indexer-skill-creation.md +107 -97
  7. package/docs/guides/knowledge-updates.md +137 -18
  8. package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
  9. package/docs/guides/package-outputs.md +213 -47
  10. package/docs/reference/indexer-provider-protocol.md +71 -102
  11. package/docs/reference/package-templates.md +39 -65
  12. package/docs/reference/project-api.md +53 -0
  13. package/docs/reference/template-variables.md +2 -3
  14. package/index.d.ts +11 -11
  15. package/index.js +5826 -8062
  16. package/indexerAgentStepProtocol.d.ts +0 -910
  17. package/indexerApprovedKnowledge.d.ts +98 -359
  18. package/indexerArticlePlan.d.ts +3 -26
  19. package/indexerArtifact.d.ts +201 -70
  20. package/indexerArtifactPolicy.d.ts +4 -22
  21. package/indexerArtifactResult.d.ts +240 -888
  22. package/indexerAuthoringFixture.d.ts +0 -13
  23. package/indexerBenchmark.d.ts +2 -2
  24. package/indexerCandidateCompile.d.ts +123 -167
  25. package/indexerCatalogFallback.d.ts +32 -374
  26. package/indexerCollectionMapping.d.ts +2 -2
  27. package/indexerContentLayers.d.ts +187 -41
  28. package/indexerContractOverlay.d.ts +30 -44
  29. package/indexerControlledInvocation.d.ts +6 -6
  30. package/indexerControlledProgram.d.ts +959 -3020
  31. package/indexerDependencyView.d.ts +96 -96
  32. package/indexerEffectiveArtifact.d.ts +381 -242
  33. package/indexerExampleDecision.d.ts +134 -134
  34. package/indexerExampleIdentity.d.ts +6 -6
  35. package/indexerExampleIdentityAudit.d.ts +6 -6
  36. package/indexerInventoryDisposition.d.ts +0 -39
  37. package/indexerLayerComposition.d.ts +1378 -852
  38. package/indexerLayoutChange.d.ts +24 -33
  39. package/indexerLayoutProposalSet.d.ts +143 -137
  40. package/indexerLayoutResolver.d.ts +116 -101
  41. package/indexerLayoutTransition.d.ts +6 -6
  42. package/indexerMainLifecycle.d.ts +1 -11
  43. package/indexerMainRunLedger.d.ts +0 -14
  44. package/indexerMainRunProtocol.d.ts +806 -2530
  45. package/indexerMainWorkset.d.ts +0 -1212
  46. package/indexerNavigationArtifactPlan.d.ts +2 -2
  47. package/indexerOverlayQuestionApplyProposal.d.ts +0 -4
  48. package/indexerParserCoordinate.d.ts +2 -2
  49. package/indexerParserExecutionPlan.d.ts +42 -42
  50. package/indexerPartitionPlan.d.ts +24 -354
  51. package/indexerPhysicalArtifactManifest.d.ts +12 -27
  52. package/indexerPostAuthorComposition.d.ts +2 -253
  53. package/indexerPostAuthorRunLedger.d.ts +860 -562
  54. package/indexerPrimaryProjection.d.ts +2 -2
  55. package/indexerPrimaryResultView.d.ts +0 -318
  56. package/indexerProfileContract.d.ts +200 -549
  57. package/indexerProgramExecutionAuthorization.d.ts +4 -4
  58. package/indexerProgramRunProtocol.d.ts +806 -2527
  59. package/indexerProjectProposal.d.ts +8 -8
  60. package/indexerProjectedArtifactFanOutAudit.d.ts +8 -8
  61. package/indexerProjectedArtifactPlan.d.ts +0 -9
  62. package/indexerProtocolHash.d.ts +2 -0
  63. package/indexerProvider.d.ts +76 -318
  64. package/indexerProviderComposition.d.ts +16 -42
  65. package/indexerQuestionAuthority.d.ts +2 -82
  66. package/indexerReaderTargetInventory.d.ts +6 -6
  67. package/indexerRegistry.d.ts +606 -0
  68. package/indexerRequirementLifecycle.d.ts +6 -6
  69. package/indexerResultReconciliation.d.ts +35 -149
  70. package/indexerSemanticInput.d.ts +10926 -5665
  71. package/indexerStructuredDeclaration.d.ts +24 -24
  72. package/indexerTemplateRendering.d.ts +239 -113
  73. package/{readingStructure.d.ts → knowledgeMap.d.ts} +21 -21
  74. package/package.json +1 -1
  75. package/packageSite.d.ts +25 -0
  76. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +13 -16
  77. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +9 -9
  78. package/indexerArtifactDependencies.d.ts +0 -693
  79. package/indexerCompositionFactDependencies.d.ts +0 -16
  80. package/indexerExampleFactDependencies.d.ts +0 -17
  81. package/indexerIncrementalImpact.d.ts +0 -221
  82. package/indexerKnowledgeDependency.d.ts +0 -46
  83. package/indexerSubjectCatalog.d.ts +0 -230
  84. package/indexerSubjectKeyAuthority.d.ts +0 -786
@@ -15,11 +15,85 @@ close is required, run deterministic close before build. Current close derives
15
15
  final verify gate without rewriting approved Markdown. References, changelog,
16
16
  package index, and section fingerprint rebuilds are not current close output.
17
17
 
18
- ## Recommended First Output: Agent Knowledge-Base Package
18
+ ## Default New-Workspace Outputs: Knowledge Base + Website
19
19
 
20
- Choose an agent knowledge-base package first when the knowledge should help
21
- Coding Agents work with the project. After the user chooses this semantic
22
- output shape, implement it with `kbPackage()`.
20
+ Output channels support multiple selection. In a new workspace without explicit
21
+ preferences, the Agent proposes and configures KB + website as the default. Honor
22
+ user feedback, session authority and existing workspace declarations; LLMS is an
23
+ additional selectable channel. This is an Agent configuration default, not an SDK
24
+ change that silently enables websites for existing packages.
25
+
26
+ ### Static documentation website
27
+
28
+ To include the default browser-readable site, enable `site` on the same
29
+ package. The normal `context build` produces both the Agent KB and a standalone
30
+ `dist/<base>-site/` directory containing `index.html`, article HTML,
31
+ local search, scripts, styles and the selected bundled resources.
32
+
33
+ `<base>` is the package name with one trailing `-kb` removed, when present.
34
+ For example, `project-kb` produces `dist/project-kb/` and `dist/project-site/`;
35
+ `project` produces `dist/project/` and `dist/project-site/`. Output directories
36
+ must not collide with another package or website. `site.base` controls URL
37
+ prefixes only, not filesystem output paths.
38
+
39
+ ```ts
40
+ kbPackage({
41
+ name: "project-kb",
42
+ template: "src/package-templates/kb",
43
+ site: { title: "Project knowledge", lang: "en-US", base: "/" },
44
+ });
45
+ ```
46
+
47
+ `site` is opt-in; omission keeps the existing KB-only output. Optional fields
48
+ are `title` (defaults to the package name), `description`, `lang` (defaults to
49
+ `en-US`), and `base` (defaults to `/`; use `/docs/` when hosted under that path).
50
+ The website uses a full-width VitePress theme with system fonts, compact navigation,
51
+ a wide reading area and a smaller article outline. It starts in
52
+ light mode regardless of the operating system; an explicit reader choice is
53
+ remembered in browser storage. Search runs locally, without a search service.
54
+ Mermaid renders in the browser with a restrained theme; invalid diagrams retain
55
+ their source instead of blocking publication. Code samples and raw HTML are
56
+ displayed as content, not executed as Vue components or scripts.
57
+
58
+ The accepted `src/knowledge-map.yaml` controls sidebar organization. Entries
59
+ bind to `artifact_ref` and optionally `section_key`; the builder resolves these
60
+ against this package's selected approved articles. Navigation labels and parent
61
+ groups do not determine website paths. One article may have several navigation
62
+ placements while keeping one URL. Pending/excluded targets generate warnings
63
+ and no invented link. Every selected article with an artifact identity must have
64
+ a valid reading target before packaging, including packages without a website.
65
+ Missing bindings or invalid section references block the staged output and
66
+ return the missing article list plus a navigation-only task adjustment input.
67
+ Category nodes can remain empty while future articles are planned. The builder
68
+ does not infer business categories or alter article content.
69
+
70
+ Top navigation contains the first-level reading directories. Selecting
71
+ a section shows only its descendants in the left sidebar; opening an article
72
+ directly selects its section. Skills and their Markdown references remain
73
+ reachable as linked read-only pages, but have no automatically added navigation
74
+ section. A reader-facing usage guide can link them where appropriate.
75
+ Section landing pages have stable URLs separate from article URLs.
76
+
77
+ `dist/<base>-site/context-site-map.json` records each article's approved path, KB path and
78
+ site path, plus the projected menu and unresolved targets. URLs are derived from
79
+ article identity; legacy pages without `artifact_ref` use their approved path,
80
+ so moving those legacy files changes their URL. The shared knowledge map,
81
+ KB layout and production Markdown remain unchanged.
82
+
83
+ Article pages include a small source footer from recorded article source references and the source registry. Repository entries link to the recorded revision and module (or an explicitly referenced file); document entries link to their registered HTTP(S) URL. Unrecorded associations are not inferred from prose. Source-footer changes participate in the website build fingerprint without modifying knowledge Markdown.
84
+
85
+ The website reuses resource delivery already performed for the KB: bundled
86
+ resources are copied into the site's `resources/`; Git raw links remain remote,
87
+ and explicit resource omission remains omission. It does not copy source trees
88
+ or capture audits. Website generation completes in a sibling staging directory
89
+ before either output is published, so a failed website build preserves the
90
+ previous KB and website. The website is not included in the KB directory.
91
+ Disabling the option removes the old site on the next successful package build.
92
+
93
+ Preview through an HTTP static server. Deploy the **contents of `dist/<base>-site/`** using
94
+ the user's chosen static hosting tool; no hosting SDK, login, deployment or
95
+ platform-specific skill is part of Context's build. Keep hosting credentials
96
+ out of package templates and published content.
23
97
 
24
98
  Typical output:
25
99
 
@@ -205,7 +279,9 @@ Typical output:
205
279
 
206
280
  ```text
207
281
  dist/<package-name>/
208
- └── llms.txt
282
+ ├── llms.txt # knowledge-map index
283
+ ├── llms-full.txt # consolidated approved text
284
+ └── llms/pages/<identity>.txt # individual approved articles
209
285
  ```
210
286
 
211
287
  Choose this when the user wants:
@@ -226,49 +302,139 @@ knowledge/
226
302
  └── ...
227
303
  ```
228
304
 
229
- ## How To Ask The User
230
-
231
- When `workflow.current.reason_code` is `route.package.output-required`,
232
- explain the choices with the output tree. Do not ask the user to pick from
233
- unexplained labels.
234
- Use the host's native multi-choice tool when available. If unavailable, fall
235
- back to a short Markdown A/B/C question. The option labels should be:
236
- agent knowledge-base package, LLM text bundle, and skip package output for now.
237
-
238
- Recommended question shape:
305
+ ## Agent configuration and delivery recipe
306
+
307
+ Use this guide when the user asks to generate a documentation website, selects
308
+ outputs in the work-start report, or the current Route asks for package output.
309
+ Read the current Route and existing `src/index.ts` first. Reuse settled choices;
310
+ follow its configuration/read-acknowledgement contract rather than replaying a
311
+ previous revision. The Agent edits SDK configuration; the user need not write code.
312
+
313
+ 1. Record all selected channels together. For new workspaces with no explicit
314
+ preference, use KB + website. Preserve existing declarations and explicit
315
+ KB-only, LLMS-only or deferred-delivery choices.
316
+ 2. Configure the existing KB declaration below, substituting the actual name,
317
+ title and workspace language. Retain its sources, phases, selection and resource
318
+ policy. This is one KB package with an additional website channel, not two KBs.
319
+ 3. If LLMS is selected, add its declaration and import in the same edit. Ensure
320
+ both template directories exist and resolve generic-template review using the
321
+ current Route. Do not independently ask approval for each already selected channel.
322
+ 4. Refresh `context status --format json`. Follow the returned continuation for
323
+ knowledge-map adjustment, required review, close, verification and build.
324
+ Missing article bindings require explicit targets from current CLI diagnostics;
325
+ do not classify articles from `wikis/` or `codeindex/` directory names alone.
326
+ 5. Run `context build` when ready. Verify each selected output and report its
327
+ actual location; a failed selected website is not completed delivery.
328
+ 6. Preview the generated website directory through a local HTTP server. Verify HTTP succeeds
329
+ before giving its URL. Publishing requires the user's chosen hosting tool and
330
+ authorization; do not install a hosting SDK merely to build the website.
239
331
 
240
- ```text
241
- The reviewed knowledge is approved. The next decision is how to package it.
242
-
243
- Recommended: agent knowledge-base package
244
- dist/<name>-kb/
245
- ├── AGENTS.md
246
- ├── skills/knowledge-query/SKILL.md
247
- └── wikis/
248
- ├── index.md
249
- ├── <group-page>.md
250
- └── <large-group>/index.md
251
-
252
- This is best if agents should use the knowledge as a reusable knowledge base.
253
-
254
- Alternative: LLM text bundle
255
- dist/<name>-llms/
256
- └── llms.txt
257
-
258
- This is best if you need one text bundle for model/RAG import.
259
-
260
- We can also skip package output for now and keep only knowledge/.
261
-
262
- Which one should I declare first?
332
+ ```ts
333
+ import { defineProject, kbPackage, llmsPackage } from "@c4a/context";
334
+
335
+ // Edit only the packages field of the existing defineProject declaration.
336
+ // Keep the actual project's other declarations intact.
337
+ const packages = [
338
+ kbPackage({
339
+ name: "project-kb",
340
+ template: "src/package-templates/kb",
341
+ site: { title: "Project knowledge", lang: "en-US", base: "/" },
342
+ }),
343
+ // Include this entry only when LLMS text is selected.
344
+ llmsPackage({ name: "project-llms", template: "src/package-templates/llms" }),
345
+ ];
346
+ // Existing defineProject({ ...existing declarations, packages }).
263
347
  ```
264
348
 
265
- If the user chooses the Agent knowledge-base package, explain that its OKF
266
- roots are flat within `dist/<package-name>/`; do not ask for a second namespace.
267
- If its Skills need a short prefix, the author maintains those final names
268
- independently from package paths; this is not a mandatory question.
349
+ The configuration is a small source edit, not custom frontend implementation.
350
+ Website output reuses approved articles, knowledge map and packaged assets;
351
+ rendering/search generation adds build time and size, not another indexing pass.
352
+ Measure actual cost instead of quoting a universal estimate.
353
+
354
+ | User request | Agent action |
355
+ | --- | --- |
356
+ | KB + website | One `kbPackage` with `site` enabled |
357
+ | KB only / disable website | Omit `site` on that KB and rebuild; old site output is removed |
358
+ | Add website later | Add `site` to existing KB, repair missing reading bindings, rebuild |
359
+ | Website only for distribution | Explain the KB is still built; share only the sibling website directory |
360
+ | Also produce LLMS | Add `llmsPackage` alongside the KB in the same change |
361
+ | Keep current knowledge only | Postpone packaging; do not label it completed package delivery |
362
+
363
+ ```sh
364
+ python3 -m http.server 8000 --bind 127.0.0.1 --directory dist/project-site
365
+ ```
269
366
 
270
- If the user requests multiple outputs, declare and verify each requested package.
271
- There is no additional confirmation just because two outputs were already chosen.
272
- The default adaptive index policy avoids one-page directory indexes. Configure
273
- `kbPackage().navigation` when a package needs a different inline-entry
274
- threshold or a fully expanded index at every directory.
367
+ The completion report lists KB root, website directory and LLMS file separately,
368
+ with generated/failed/not-selected status. Include website navigation coverage,
369
+ verified preview URL when running, and any remaining errors. The website contains
370
+ source cards and article update times; it does not imply an article history browser.
371
+
372
+ ## How To Present The Choice
373
+
374
+ Include a compact multi-select list in the work-start report, and reuse it later:
375
+
376
+ - [x] Agent knowledge-base package — default for a new workspace.
377
+ - [x] Documentation website — default with the KB, local preview or later hosting.
378
+ - [ ] LLMS text — optional model-context or RAG input.
379
+
380
+ Explicit choices override defaults. When current Route authority requires a user
381
+ decision, ask once for the combination rather than a sequence of mutually exclusive
382
+ questions. If the host tool supports only single selection, let the user state the
383
+ combination in text instead of presenting it as multi-select. There is no `both`
384
+ factory, separate website skill, or second permission per selected output.
385
+
386
+ ## Website deployment handoff after every successful build
387
+
388
+ After every successful website build, including intermediate delivery and an
389
+ unchanged output reused by build, tell the user the website can be deployed with
390
+ a deployment skill. Include the actual `dist/<base>-site/` directory and whether
391
+ it contains only the currently delivered scope. This notice does not wait for the
392
+ whole knowledge task to finish and does not block its next Route.
393
+
394
+ Reuse existing publishing configuration and the user's chosen target. Otherwise,
395
+ inspect the available deployment skills, recommend a compatible static-site skill,
396
+ or let the user specify one. Do not invent installed skills or a deployed URL.
397
+ If no compatible skill is available, report that and provide the site directory
398
+ for the user's deployment tool. Do not install a deployment dependency by default.
399
+
400
+ When publishing is already authorized for that target, follow the selected skill
401
+ with the built site directory; otherwise offer deployment and wait for the user's
402
+ publishing instruction. Preserve the configured base path; rebuild if the target
403
+ requires a different base. Pass only the website output, not sources, private
404
+ workspace state or the entire KB package. Report success only after checking the
405
+ hosting result and published URL. A failed deployment leaves the local build valid;
406
+ report the deployment failure and its next step separately.
407
+
408
+
409
+ ### Persistent knowledge map and report proposals
410
+
411
+ `src/knowledge-map.yaml` is the persistent knowledge map; retain it after delivery.
412
+ Its protocol is `context.knowledge-map/v1`; structure and adjustment inputs use
413
+ `knowledge_map`, and SDK functions use `KnowledgeMap` naming. It organizes website
414
+ navigation and LLMS without changing article identities or section bindings.
415
+
416
+ The work-start report explains the proposed directory and chapters, followed by
417
+ a text wireframe of the website. Material changes are communicated with the updated
418
+ report link and a short explanation. This does not build a temporary website or
419
+ create a persistent article-plan file. Website packaging uses the accepted knowledge map
420
+ and approved articles; the report is not a configuration input.
421
+
422
+ ### Website LLM Docs
423
+
424
+ Every website build also builds LLMS from the same selected approved articles and
425
+ knowledge map. The final top-navigation item is always **LLM Docs**, opening
426
+ `llms/index.html`. This page links to `llms.txt`, the structured index,
427
+ `llms-full.txt`, the complete approved text, and raw Markdown text articles under
428
+ `llms/pages/`. These files ship inside the sibling website directory and use the configured site base.
429
+ No separate LLMS package declaration or additional build command is required.
430
+ Website LLMS text files include a UTF-8 BOM so browsers can identify the encoding
431
+ when a static host omits the charset. Hosting should serve them as
432
+ `text/plain; charset=utf-8`. The HTML landing page shows one index/full-text
433
+ toolbar followed by the knowledge map; Changelog is available in the site navbar.
434
+
435
+ The index preserves knowledge-map grouping, order and repeated placements. The
436
+ full text includes each selected article only once, in first-placement order.
437
+ Only approved selected content is exported. A map or article change invalidates
438
+ both website and LLMS outputs; failure preserves the previous staged package.
439
+ Standalone `llmsPackage()` uses the same map organization and supplies the full
440
+ text and raw article files alongside its template-rendered `llms.txt` index.
@@ -47,6 +47,25 @@ Writing style, chapter drift and ordinary Provider version differences remain
47
47
  guidance. Changed source/approval identities invalidate an in-flight supporting
48
48
  projection; they are not semantic content judgments.
49
49
 
50
+ ## Current CLI Author batches
51
+
52
+ Use the current Route's task keys and supplied scaffold. Within a CLI batch,
53
+ `group_key` may be omitted: preview and completion inherit it from the selected
54
+ current task. An explicitly different group is rejected. Standalone SDK semantic
55
+ results still require `group_key`. Intent and eligible policy use the existing
56
+ page-plan defaults; changing a page's purpose is not a metadata repair.
57
+
58
+ The inventory reading joins exact member/fact identities to parser names, kinds
59
+ and explicit `propsType` values. These are navigation references, not proof that
60
+ a symbol is public or a member has been covered. Keep semantic dispositions and
61
+ source evidence explicit.
62
+
63
+ On a stale revision, the CLI exposes a current Route snapshot and current tasks,
64
+ plus accepted identities available from the current main ledger and its Composers.
65
+ Task keys are local to each Route. Compare stable workset/request identities,
66
+ read the new Route and do not replay accepted work. Missing historical records
67
+ are not evidence that old work is unaccepted.
68
+
50
69
  ## Resources and execution
51
70
 
52
71
  A Provider may contain a controlled program, profile-bound instructions,
@@ -235,27 +254,19 @@ continue with a warning, and counts above 300 return the non-Gate
235
254
  partial outcome reopens the owning semantic step; it does not create a profile
236
255
  revision ledger or an override route.
237
256
 
238
- Artifact content has three mechanically separate layers. `facts[]` contains
239
- canonical, source-bound values and never reader prose. A structured
240
- `deterministic-block` contains only a registered renderer and `fact_refs`; the
241
- CLI resolves those Facts and derives both Markdown and evidence, so a Provider
242
- cannot relabel arbitrary JSON or prose as a catalog. A `semantic-prose` block
243
- contains evidence-bound Markdown and cannot cite Facts as a way to increase
244
- deterministic coverage. The normalized rendered Section retains ordered
245
- `content_blocks` with the layer, Fact refs, evidence refs and per-block digest;
246
- its Section digest covers that ledger and the exact reader-visible Markdown.
247
-
248
- `ArtifactResult` also carries
249
- `context.indexer.capability-group-evidence/v1`. It repeats the complete member
250
- set bound by the author workset even when no capability group is selected. A
251
- non-empty capability group has a stable ref derived only from the logical unit
252
- and capability key, at least two explicit member-to-evidence bindings, and one
253
- or more actual Artifact Section evidence bindings. A member cannot belong to
254
- two capability groups. Every member evidence ref must be a current Result
255
- evidence binding and must be visible in one of the declared Sections. Unknown
256
- members or Sections, page-level evidence without Section consumption, and
257
- workset/member-set drift are rejected. This protocol does not assign projection
258
- dispositions to members outside capability groups.
257
+ Artifact content contains reader Markdown and actual source-region references.
258
+ Each semantic-prose block supplies at most three positions using `source_ref`
259
+ and a file/line `locator`; the Host verifies the current authorized source and
260
+ computes the region `content_digest`. The limit applies to an output fragment,
261
+ not the whole article. Select necessary references or split the writing by
262
+ meaning; never truncate necessary references or merge disjoint source regions.
263
+ An article has no Fact table, evidence ID table, or per-binding ledger.
264
+ Parser output remains a reading aid, not a required submission representation.
265
+
266
+ The Host retains the current workset's inventory accounting in the internal
267
+ Result. Author supplies member dispositions, not member-to-evidence bindings
268
+ or an independent capability evidence graph. This accounting is not copied
269
+ into the approved article index.
259
270
 
260
271
  ## Full-path example identity
261
272
 
@@ -275,35 +286,14 @@ for the same complete example identity are a hard
275
286
  forge an empty collision list. Candidate disposition and linkage are separate
276
287
  downstream contracts.
277
288
 
278
- ## SubjectKey schema authority
279
-
280
- Community profile identity rules have one authority: the top-level
281
- `subject_key_schemas` array in the CLI profile contract. A community Provider
282
- manifest cannot copy or replace that schema. A namespaced additional profile
283
- has the other allowed authority: the exact owner Provider's
284
- `composition.extensions[].subject_key_schema`. The extension declaration is
285
- required and may use only the CLI's closed namespace/local-key derivation
286
- operators, kind identifiers and normalization rules.
287
-
288
- Final selection resolves both forms to
289
- `context.indexer.resolved-subject-key-schema/v1`. The record binds the Indexer,
290
- profile, base-contract or Provider authority, schema digest and resolution
291
- digest. Its canonical set digest is part of the stable final selection report;
292
- transport paths and runtime receipts are not. Subject keys must match a kind in
293
- the resolved schema and satisfy its normalization before they can become a
294
- canonical NodeRef.
295
-
296
- An unchanged schema is equivalent. Adding a kind while preserving the existing
297
- namespace, normalization and local-key operators is compatible. Removing or
298
- changing an existing identity derivation is identity-breaking: the owning
299
- authority must advance its major version and the schema version must increase.
300
- When approved Nodes exist, Context requires a non-delegable
301
- `confirm-subject-reidentification` authorization bound to the exact old/new
302
- schema digests, approved catalog, complete deterministic mapping and report.
303
- Missing mappings, one old Node mapping to multiple Nodes, multiple old Nodes
304
- colliding on one new Node, stale authorization or digest drift blocks
305
- activation. With no approved Node, the human Gate is omitted but conformance
306
- and major-version checks still apply.
289
+ ## Article identity and source scope
290
+
291
+ Production does not build a subject graph or require SubjectKey schemas.
292
+ Provider extensions declare their reading and writing capabilities without
293
+ namespace/kind normalization or subject re-identification gates. Context keeps
294
+ article identity and fragment identity separately from reader titles and paths.
295
+ Sources remain registered and authorized; removing graph modeling does not
296
+ permit reading an undeclared source or changing another article's identity.
307
297
 
308
298
  ## Requirement change authority
309
299
 
@@ -404,7 +394,7 @@ identity, operations, scopes, profile composition, requirement bindings, owner
404
394
  closure and read authority are byte-identical. It revalidates overlay
405
395
  conformance,
406
396
  reuses the exact staged Bundles, and reruns both static and final selection
407
- against the target requirement digest. Provider and SubjectKey authority must
397
+ against the target requirement digest. Provider authority must
408
398
  remain unchanged. Final selection resolves every CLI-base question back to its
409
399
  exact selected profile contract and requires one current validation proof
410
400
  for every overlay question; forged bindings and duplicate, stale, or unused
@@ -412,7 +402,7 @@ proofs fail before the final report is issued. The report binds the resulting
412
402
  question authority set digest. The resulting
413
403
  `context.indexer.overlay-question-registry-apply-proposal/v1` contains the full
414
404
  target `src/indexers.yaml` snapshot and binds the amendment, confirmation,
415
- overlay validation, rebound selection, SubjectKey schema set and finalized reports.
405
+ overlay validation, rebound selection and finalized reports.
416
406
  The proposal goes through the same `stage-indexer-project-proposal` and
417
407
  `apply-indexer-project` Actions as ordinary registry/customization proposals.
418
408
  The latter dispatches this typed proposal to one expected-base CAS, project
@@ -423,15 +413,12 @@ temporary Provider path.
423
413
 
424
414
  ## Controlled invocation
425
415
 
426
- Author result acceptance checks the actual task, source/module, subject and
427
- Provider layer. Provider integrity, bundle/config/customization fingerprints
428
- remain recorded metadata, not byte-equality gates between a resumed request and
429
- its result. Selected Facts are resolved by their supplied identity and source
430
- references; their current values are recorded without comparing a previous
431
- parser payload digest. Source-span line ranges may expand within the same file
432
- content. Structured declarations resolve actual file/item identities, not a
433
- previous inventory or signature fingerprint. Source file content checks,
434
- unknown-reference rejection and atomic write protection remain in force.
416
+ Author result acceptance checks the actual task, source/module and selected
417
+ Provider authority, including its current bundle and configuration. Article
418
+ content supplies actual source regions, not selected Fact IDs or structured
419
+ claim ledgers. The Host computes region fingerprints from the current captured
420
+ text. Unknown or unauthorized paths, source-version drift and write conflicts
421
+ remain errors.
435
422
 
436
423
  These continuation rules do not relax executable program authorization or allow
437
424
  an Agent to select undeclared sources.
@@ -558,24 +545,18 @@ may route different Sections to different collections only by declaring
558
545
  separate Artifacts in its validated Bundle; the CLI does not silently split or
559
546
  merge reader pages to repair a Provider Result.
560
547
 
561
- The compile-internal resolver emits `context.indexer.layout-proposal/v1`. It
562
- binds the exact Artifact Result, profile contract, validated SubjectKey schema
563
- set and exact schema digest, Indexer and source. The resolver validates the
564
- SubjectKey against the selected schema normalization before deriving NodeRef;
565
- a caller-supplied digest is not accepted as schema authority. NodeRef plus the
566
- logical Artifact id/kind derives ArtifactRef. NodeRef, owner Indexer, Artifact
567
- kind and Section key derive a stable logical Section identity; its placement
568
- under one Artifact derives SectionRef. This lets a diff distinguish a moved
569
- Section from new content without allowing the same logical Section to have two
570
- primary placements. The ViewRef is an internal projection. Output paths are
571
- derived under `knowledge/<collection>/` and never accepted from a Provider.
548
+ The compile-internal resolver emits `context.indexer.layout-proposal/v1`.
549
+ It binds the accepted Result, profile contract, Indexer and source. A stable
550
+ article reference derives from the accepted writing group and artifact identity;
551
+ the fragment key belongs to that article. There is no independent Node or View
552
+ identity. Output paths live under `knowledge/<collection>/`; layout validates
553
+ article ownership, fragment placement and path collisions before writing.
572
554
 
573
555
  Template Artifacts enter layout only after validated rendering. Only rendered
574
556
  Sections exist; an omitted optional projection does not create an empty
575
557
  Section, while a retained material gap remains unresolved without
576
558
  reader-visible placeholder content. Artifact Bundle purpose and `split_of`
577
- lineage are retained in the proposal. A proposal set rejects duplicate Node
578
- owners, Artifact identities, logical Section identities, Section placements
559
+ lineage are retained in the proposal. A proposal set rejects duplicate Artifact identities, logical Section identities, Section placements
579
560
  and output paths across Indexers, as well as missing, nested or kind-changing
580
561
  semantic-split parents.
581
562
 
@@ -760,24 +741,16 @@ a rendered byte budget. Every body Section uses exact markers:
760
741
  <!-- /context:indexer-section -->
761
742
  ```
762
743
 
763
- Only `{{variable:<id>}}` and `{{block:<id>}}` are accepted. Direct variables are
764
- semantic prose. A block source variable is a deterministic Fact projection,
765
- must bind canonical `fact_refs`, and must equal the CLI's normalized projection
766
- of those Facts. Blocks select one of
767
- the CLI-owned `bullet-list`, `key-value-table`, `json-code-block` or `public-contract-table` renderers;
768
- templates cannot register code or helpers. A block directive occupies its own
769
- template line so the renderer can retain an exact content-layer boundary. The
770
- contract and body must declare exactly the same Sections and placeholders.
771
-
772
- `ArtifactResult` binds every template variable to current evidence refs and
773
- binds every declared Section to `section_key`, owner Indexer, document kind,
774
- reader goal and Artifact kind. Rendering validates the Provider/customization
775
- fingerprints, template digest, current CLI-owned applicability conditions,
776
- variable types and expansion limits, per-variable evidence boundary and exact
777
- CLI-owned question target. An optional Section without data
778
- or sufficient evidence is absent from the rendered Candidate. A required
779
- Section in the same state becomes the already-declared material-question
780
- transition and makes `review_ready` false.
744
+ Only `{{variable:<id>}}` and `{{block:<id>}}` are accepted. Variables carry
745
+ their declared typed values and actual source-region references. Registered
746
+ block renderers format those values; authors do not construct canonical Fact
747
+ records or bind Fact IDs. Templates cannot register executable helpers.
748
+ The contract and body must declare the same sections and placeholders.
749
+
750
+ `ArtifactResult` binds each fragment to its owner and article classification.
751
+ Rendering validates the current template, variable types and expansion limits.
752
+ Optional sections without data are omitted; an unresolved required section
753
+ uses the existing material-question path rather than fabricated prose.
781
754
 
782
755
  Context validates template-program directives, declared variable types and
783
756
  expansion limits before rendering. Supplied variable values and Section prose
@@ -791,13 +764,9 @@ digests. Deterministic blocks contribute catalog completeness but never
791
764
  semantic-prose density. Later `build` projects this approved body; it does not
792
765
  perform a first render or change its structure.
793
766
 
794
- An ArtifactResult may emit
795
- `context.indexer.structured-claim-set/v1`. Every claim binds a stable claim
796
- kind and subject to one real Artifact/Section owner and one or more evidence
797
- refs carried by that exact Section. The subject must be the current logical
798
- unit, one of its CLI-owned inventory members, or an authorized target-resolution
799
- identity. Missing owners, outside subjects, unknown evidence and evidence that
800
- is known globally but absent from the owner Section all fail Result validation.
767
+ Articles do not submit structured claims, subject identities or evidence-binding
768
+ tables. Actual source references support traceability and change detection;
769
+ their existence does not prove semantic correctness.
801
770
 
802
771
  Main-run validation does not produce a prose-quality audit. Content usefulness,
803
772
  completeness and faithfulness belong to the existing Agent or user Review.
@@ -820,16 +789,16 @@ in knowledge frontmatter and is not proof that remaining material is useful.
820
789
  ## Incremental planning handoff
821
790
 
822
791
  A semantic Partition group may declare `ready_for_author: true` when the Agent
823
- has resolved its subject, primary ownership, reader task and shared dependencies.
792
+ has resolved the writing boundary, primary ownership, reader task and shared dependencies.
824
793
  The CLI can then deliver an initial wave before all Partition tasks are accepted.
825
794
  This is an optional scheduling declaration, not a new evidence or approval gate.
826
795
  Absent/false groups wait; every inventory member still needs a final disposition.
827
796
  The original Partition ledger resumes after normal structure review, Author,
828
797
  Composer, content Review, close and successful build. Later material for the same
829
- subject reuses its page identity and approved prose. A wave finishing never means
798
+ article reuses its identity and approved prose. A wave finishing never means
830
799
  the remaining source scope is complete.
831
800
 
832
801
  Known code-symbol planning views provide member overviews with immutable full
833
802
  fact links and bounded captured-source access. Providers must inspect details
834
803
  when semantic boundaries are uncertain; unknown payload formats retain full
835
- reading. Author receives full selected facts and source material.
804
+ reading. Author reads the selected source material and cites the regions actually used.