@c4a/context 0.7.10-alpha.2 → 0.7.11

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.
@@ -17,7 +17,7 @@ Use the dependency-install command returned by initialization if it differs.
17
17
  Initialization creates the project configuration, source directories, package
18
18
  templates and workspace rules. Read the generated `AGENTS.md`. It does not create
19
19
  an empty `src/indexers.yaml`: the later configuration Route supplies its schema
20
- and asks for the confirmed requirements with `indexers: []`.
20
+ and asks for confirmed `requirements` only, without `protocol` or `indexers` keys.
21
21
 
22
22
  Run workspace commands inside this initialized directory. Route paths and
23
23
  `.tmp/` belong to this workspace, not the surrounding repository.
@@ -27,8 +27,8 @@ Run workspace commands inside this initialized directory. Route paths and
27
27
  This example uses a code module and a local documentation directory:
28
28
 
29
29
  ```bash
30
- context source add repo 20260901 --module component-lib --local ../component-lib
31
- context source add file 20260901 --module product-docs --local ../docs
30
+ context source add repo 20260901 --module component-lib --local ../component-lib --configure
31
+ context source add file 20260901 --module product-docs --local ../docs --configure
32
32
  ```
33
33
 
34
34
  Replace the date and paths with the actual inputs. Both commands register a
@@ -40,17 +40,21 @@ Do not exclude content merely because a filename looks old.
40
40
  For an authorized Lark document, registration instead looks like:
41
41
 
42
42
  ```bash
43
- context source add lark 20260901 --module handbook --doc-token "<actual-token>"
43
+ context source add lark 20260901 --module handbook --doc-token "<actual-token>" --configure
44
44
  ```
45
45
 
46
- Use `captureLark()` for that registered document. Notes and conversation summaries
46
+ `--configure` adds explicit source and default capture declarations to a simple
47
+ project entry without fetching content. Existing custom settings are preserved;
48
+ a `manual` configuration result asks for a focused edit, not a registration retry.
49
+ Omit the flag when you only want registration. Notes and conversation summaries
47
50
  use `context source import`, without a source registry or capture phase. Read
48
51
  [note preparation](guides/note.md) or [sessions preparation](guides/sessions.md)
49
52
  for the actual input. Saving them alone does not start knowledge production.
50
53
 
51
54
  ## 3. Declare capture and output
52
55
 
53
- For the code and local-document example, `src/index.ts` contains:
56
+ The generated source/capture declarations can be combined with the selected output
57
+ configuration. For the code and local-document example, `src/index.ts` contains:
54
58
 
55
59
  ```ts
56
60
  import { captureFile, defineProject, kbPackage, source } from "@c4a/context";
@@ -76,27 +80,26 @@ see [Package Outputs](guides/package-outputs.md) for alternatives. Repo sources
76
80
  need no capture phase. For saved text, declare an explicit typed `source()` or
77
81
  `allSources()` selection as described in [Project API](reference/project-api.md).
78
82
 
79
- ## 4. Follow requirements and Provider selection
83
+ ## 4. Plan the requested knowledge
80
84
 
81
85
  The Agent researches representative material, reuses the user's stated goals,
82
86
  and asks about missing information that would change the scope or useful output.
83
87
  Fully managed mode does not authorize guessing those answers. For substantial
84
88
  new work, the selected workflow provides an opening report under `.tmp/`, with
85
- scope, Provider choices and the first pages to expect. The Agent invites the user
86
- to read it before continuing unless that pause was explicitly waived; this is
87
- conversation coordination, not a new approval record.
88
-
89
- The configuration Route supplies the initial registry schema and guide. Declare
90
- requirements with no selected Indexers, re-read the Route, then submit Provider
91
- selection through its completion command. The shipped Code, Markdown, Note and
92
- Sessions Providers share the same lifecycle. A compatible business Provider may
93
- replace a default; installation alone does not enable it.
94
-
95
- Partition organizes the selected material into reader topics. Its task batches
96
- are planning work, not finished-page deliveries. After the outline is reviewed,
97
- Author writes complete pages, selected Composers contribute where applicable,
98
- and the CLI compiles Candidates. Do not create a second knowledge pipeline in
99
- `src/index.ts`.
89
+ scope, relevant Skills and the first pages to expect. The report requires user
90
+ confirmation before writing, including in managed mode.
91
+
92
+ The configuration Route supplies the requirements schema and guide. Record the
93
+ reader purpose and authorized sources in `src/indexers.yaml`. The Agent chooses
94
+ relevant installed Code, Markdown, Note, Sessions or custom Indexer Skills during
95
+ planning; their use is recorded in the temporary plan, not a persistent Provider
96
+ registry. There is no separate Provider selection gate.
97
+
98
+ Plan reader topics, reusing related existing articles. Keep small document or
99
+ single-module tasks local; do not redesign the whole workspace. Once the report
100
+ is approved, write Markdown and references in the returned task directories and
101
+ submit their manifest. The CLI creates Candidates. Do not create a second
102
+ knowledge pipeline in `src/index.ts`.
100
103
 
101
104
  ## 5. Review and deliver pages
102
105
 
@@ -109,9 +112,8 @@ Review shows readable titles, paths, summaries and content. Approval applies the
109
112
  pages to `knowledge/`; rejection or revision follows the current Route back to
110
113
  writing. `close` rebuilds `knowledge/structure.yaml` and verifies the approved
111
114
  knowledge without rewriting its prose. Build produces `dist/<package-name>/`.
112
- The first readable delivery normally contains 1–3 pages, followed by batches of
113
- 30–50 pages or a smaller remaining tail. Each delivery completes review, close
114
- and build before continuing. These page counts do not count Partition tasks.
115
+ Delivery scope follows the agreed task and current Route, not fixed page-count
116
+ waves. Each delivery completes review, close and build before continuing.
115
117
 
116
118
  ## 6. Continue or update
117
119
 
@@ -133,8 +135,8 @@ explains their inputs, same-task adjustment and explicit rollback.
133
135
 
134
136
  - Fix a missing or stale source through the source commands returned by the Route.
135
137
  - Fix capture and output configuration in `src/index.ts`.
136
- - Fix requirements or Provider selection through the current configuration or
137
- proposal Route; use its supplied schema rather than guessing payload fields.
138
+ - Fix requirements through the current configuration Route; use its supplied
139
+ schema rather than adding Skill selections to the requirements file.
138
140
  - Correct page content through revision and Review. Change Provider guidance when
139
141
  the same writing problem affects future pages.
140
142
  - Keep temporary input files under this workspace's `.tmp/`. Never use `dist/`
@@ -38,24 +38,18 @@ those mechanical operations or invent state to declare a step complete.
38
38
  ## Authoring boundary
39
39
 
40
40
  `src/index.ts` owns source capture and package output. `src/indexers.yaml` owns
41
- knowledge requirements and Provider selection. Keep these responsibilities
41
+ long-term reader requirements and authorized sources. Keep these responsibilities
42
42
  separate.
43
43
 
44
- Code, Markdown, Note, Sessions and compatible business Providers receive controlled worksets and return typed
45
- results. They do not write Candidate, Review, `knowledge/`, or `dist/` files.
46
- Context validates and persists their result before the next action consumes it.
47
- Initial Provider selection follows the same rule: use the requirements and
48
- CLI-bundled catalog in the current Action input, return only non-CLI visible
49
- Skill identities and semantic Indexer entries, and let the CLI perform routing,
50
- resolution, staging, validation, and atomic registry apply. External resolver
51
- results and non-allowlisted program decisions resume through subsequent
52
- `complete-current` Routes; do not invoke the low-level Provider commands.
53
- For Partition and Author steps, one Route may contain several independent
54
- `tasks`. Read the shared instructions once, read each task's Authorized Workset
55
- View, and return one `results[]` item for every task key in that batch. Submit
56
- the whole batch with the Route's single `context action complete-current`
57
- command. Use a workspace `.tmp/` JSON or YAML input file for a large payload,
58
- then submit with `--input <file>`; avoid long JSON through an interactive PTY.
44
+ Code, Markdown, Note, Sessions and custom Indexer Skills guide source investigation
45
+ and writing. Record relevant Skill use in the temporary plan's `indexer_usage`,
46
+ not `src/indexers.yaml`; there is no Provider resolution or registry-apply step.
47
+ Read shared instructions once, then the relevant task materials. Write Markdown
48
+ and reference files in the returned Agent directory and submit the short manifest
49
+ with the current `context action complete-current` command. Completed subsets
50
+ may be submitted without repeating accepted tasks. The CLI validates and persists
51
+ Candidates and owns Review, `knowledge/` and `dist/` writes. Do not fill retired
52
+ workset `results[]` protocols or put full article bodies in command arguments.
59
53
  A shortened completion may point to `result_file` and `next_route.file`; read
60
54
  them before deciding what was accepted. If preparing the next Route fails,
61
55
  keep accepted results and use the supplied refresh action. Retry only tasks
@@ -28,7 +28,6 @@ production assignments. For example, replace the source and goals with the
28
28
  user's actual scope:
29
29
 
30
30
  ```yaml
31
- protocol: context.indexer.registry/v1
32
31
  requirements:
33
32
  - id: integration-guide
34
33
  purpose: Help application developers understand and integrate the system.
@@ -41,7 +40,6 @@ requirements:
41
40
  evidence_source_scope:
42
41
  targets:
43
42
  - source_ref: repo:sample
44
- indexers: []
45
43
  ```
46
44
 
47
45
  Use registered source identities, not guessed paths or URLs. Keep any confirmed
@@ -16,6 +16,49 @@ and continues through Review and delivery. Expression-only changes need no
16
16
  source capture or Parser. Preserve prior confirmed contributions; distinguish
17
17
  actual behavior, a confirmed decision, and a proposal that is not implemented.
18
18
 
19
+ ## Keep planning local to the change
20
+
21
+ Before starting production, compare the proposed content with the workspace's
22
+ reader purpose. For clearly unrelated anecdotes or personal rankings, briefly
23
+ recommend leaving them out of the formal manual or saving them separately because
24
+ they can dilute useful retrieval. Attribution alone does not make content relevant.
25
+ This is advice, not a CLI gate: honor the user's informed choice without repeated
26
+ objections, while preserving subjective attribution and normal Review.
27
+
28
+ Registered repositories are not prerequisites for every new request. Restore only
29
+ sources needed to investigate or write the current task, including unchanged code
30
+ when its implementation needs checking. Notes, document-only work, wording edits
31
+ and navigation changes do not require unrelated checkouts. Retained article
32
+ references alone do not require restoring every referenced repository. Missing
33
+ material remains a gap; it must not be treated as investigated or permanently
34
+ excluded. Independent available material can proceed through planning and delivery.
35
+ For required code, use `context source recovery-plan <registered-name> --format json`.
36
+ Reuse a valid local checkout or obtain clone authorization for the returned pinned
37
+ version, then submit the decision using the returned recovery command and schema.
38
+ Do not restore all registered sources merely because a checkout is missing.
39
+
40
+ For one or two documents or a clearly bounded module, retain the useful planning
41
+ decision: add or revise which articles, and place them where readers expect them.
42
+ Do not expand this into a whole-workspace taxonomy, full navigation redesign or
43
+ multi-wave plan. Read related existing topics first and expand only as needed.
44
+ One module can contain several topics; scope and ambiguity, not source count,
45
+ determine how much investigation is useful.
46
+
47
+ Reuse an approved stage's plan for in-scope additions through its existing amendment
48
+ route. Keep completed work and unrelated pending investigation intact. If article
49
+ targets are already decided before approval, the preparation route supports a
50
+ known-task input to combine preparation and task creation. It still prepares
51
+ navigation and retains report confirmation; it is not a bypass for new source
52
+ authorization. Planning depth is an Agent judgment, not an additional CLI gate.
53
+
54
+ For broad work, distinguish the whole requested outcome, the current batch and
55
+ remaining capability families or document tasks. Entry-first knowledge should
56
+ locate a checked file/symbol or source section and a concrete next step; a module
57
+ name alone is not problem coverage. When merging or revising, preserve useful
58
+ existing detail rather than replacing it with lookup advice. Review checks the
59
+ promised reader task; task completion and navigation binding only describe the
60
+ declared articles, not semantic coverage of all source material.
61
+
19
62
  ## First-task intake budget
20
63
 
21
64
  Before registration and capture, the Agent uses the user's task instructions and
@@ -56,7 +99,14 @@ progress under `.tmp/` never causes a version increase.
56
99
  Version recording runs at completed-scope delivery after Review, Close and package
57
100
  configuration/template approval, before the final build. The record response
58
101
  returns the next workspace Route, so no extra status call is needed. Build retries
59
- reuse the recorded version when formal content is unchanged. Intermediate batches
102
+ reuse the recorded version when formal content is unchanged. If build preparation
103
+ or rendering fails and formal corrections are needed, `version inspect` returns
104
+ `reusable_version` for the current entry only while it has no successful build or
105
+ publication receipt. Submit that same version with the complete iteration's title,
106
+ changes and triggers, including the repair; this replaces the pending changelog
107
+ entry rather than appending another version. Do not submit only the repair and
108
+ lose the original delivery description. Once built or published, the version is
109
+ sealed and further formal changes require an increase. Intermediate batches
60
110
  do not each receive a version.
61
111
 
62
112
  The workspace AGENTS.md and version-writing instructions require each entry's
@@ -85,7 +135,10 @@ actor:
85
135
  ```
86
136
 
87
137
  `actor` is optional; omit it to use local Git `user.name` when configured. Use a
88
- Lark display name only when explicitly known from the conversation. Trigger kinds
138
+ Lark display name only when explicitly known from the conversation. Amending an
139
+ unbuilt entry preserves its actor unless a replacement is explicitly supplied.
140
+ If neither the conversation nor Git identifies the user, omit the actor and
141
+ mention the missing identity in the delivery summary; never guess it. Trigger kinds
89
142
  are `initial`, `note`, `sessions`, `mr`, `module`, `document`, `navigation`,
90
143
  `repair`, `dist`, and `other`. Agent-written fields describe the actual diff and
91
144
  conversation; they must not expose credentials, raw transcripts or private IDs.
@@ -396,11 +449,61 @@ knowledge structure and packages.
396
449
 
397
450
  To move an approved page, use `context revise "<old path>" --move-to "<new path>"
398
451
  --instruction "<requested move and content changes>" --format json`. The new
399
- path stays in the same collection. The revision retains the page identity,
452
+ path may use another supported knowledge collection. The revision retains the page identity,
400
453
  rebases outgoing links and updates incoming Markdown links at approval. A new
401
454
  subject name alone only needs a title/content revision; do not create duplicate
402
- pages. Retirement is a content decision: explain the inapplicable material and
403
- supported replacement before changing its page and referring navigation.
455
+ pages. Changing a website group alone does not require moving or reclassifying an article.
456
+
457
+ ### Restructure existing knowledge
458
+
459
+ Read the affected approved articles and current sources before deciding what to
460
+ keep, deepen, split, merge, retain as history or retire. Reuse the current plan
461
+ and remaining scope; a new article plan does not prove old content was preserved.
462
+ Work by reader task, not source or menu count.
463
+
464
+ For a split or merge, first approve destination content, then revise the original
465
+ and incoming links. Preserve useful details until their destination is available.
466
+ Same-page fragments use ordinary revision edits; cross-page work uses new/revision
467
+ tasks and explicit retirement. Finish each coherent batch's content and navigation
468
+ before delivery; inspect both new content and the old articles' disposition.
469
+
470
+ Preview approved-page retirement with `context task retire --input <file> --format json`:
471
+
472
+ ```yaml
473
+ reason: These reader tasks are now covered by the approved guide.
474
+ targets:
475
+ - path: architecture/old-guide.md
476
+ replacement: sop/current-guide.md
477
+ ```
478
+
479
+ `replacement` is optional and must already be approved, outside the retirement set.
480
+ Use several targets for a batch. Read affected files and blockers, then execute
481
+ the returned digest-bound apply command within the user's authorization; do not
482
+ ask for another confirmation when that retirement is already authorized.
483
+ `context task retire --schema --format yaml` describes the input.
484
+
485
+ Retirement removes selected Markdown and structure entries together, updates
486
+ page-level incoming Markdown links to explicit replacements, and rebinds page
487
+ navigation or removes retired navigation targets while retaining groups.
488
+ Repair fragment links explicitly first: the CLI cannot infer where a split moved
489
+ a paragraph. Without a replacement, repair incoming links before applying.
490
+ Finish active drafts/revisions first; unfinished production targeting a selected
491
+ page must be finished or amended rather than discarded.
492
+
493
+ Follow status and the normal close/version/build flow before delivery. Sources
494
+ and shared assets are not deleted. The response provides a temporary restore
495
+ input for the existing rollback preview, including exact previous article,
496
+ structure and modified navigation/link bytes. Retain that input or a Git baseline
497
+ if restoration is needed after temporary cleanup. Retry an interrupted apply
498
+ with the same input and digest; never delete runtime files to recover. Later
499
+ conflicting edits require inspection instead of blind rollback.
500
+
501
+ Historical pages with continuing reader value should normally retain their
502
+ applicable version. Source read failure, shorter new text or a changed menu is
503
+ not sufficient reason to retire an article.
504
+ Retirement does not narrow the registered production scope. If the user also
505
+ excludes the underlying topic from future work, record that through the existing
506
+ requirements/exclusion flow rather than assuming file removal changes the goal.
404
507
 
405
508
  ### Adjust inputs while a local update is unfinished
406
509
 
@@ -40,13 +40,51 @@ prefixes only, not filesystem output paths.
40
40
  kbPackage({
41
41
  name: "project-kb",
42
42
  template: "src/package-templates/kb",
43
- site: { title: "Project knowledge", lang: "en-US", base: "/" },
43
+ site: {
44
+ title: "Project knowledge",
45
+ lang: "en-US",
46
+ base: "/",
47
+ home: {
48
+ title: "Project knowledge",
49
+ slogan: "Find the context behind the work",
50
+ description: "Browse the approved knowledge map and supporting resources.",
51
+ resources: [{
52
+ title: "Project workspace",
53
+ description: "Open the repository that maintains this knowledge.",
54
+ href: "https://example.com/project",
55
+ featured: true,
56
+ }],
57
+ },
58
+ },
44
59
  });
45
60
  ```
46
61
 
47
62
  `site` is opt-in; omission keeps the existing KB-only output. Optional fields
48
63
  are `title` (defaults to the package name), `description`, `lang` (defaults to
49
64
  `en-US`), and `base` (defaults to `/`; use `/docs/` when hosted under that path).
65
+ `home` optionally customizes the landing-page `title`, `slogan`, `description`
66
+ and action buttons. Its `resources` list adds only configured repository,
67
+ service or support cards; each item requires a safe `href`, a copyable
68
+ `command`, or both. Set `featured: true` on a linked resource to also place it
69
+ between the Browse knowledge and LLM Docs hero actions. Do not add placeholders
70
+ for unknown destinations.
71
+
72
+ Configure resources from confirmed project settings, repository remotes or
73
+ successful publication receipts. If a service has not been created or its URL is
74
+ unknown, omit the resource object; empty strings are not placeholders. Missing
75
+ optional resources do not block building the site or authorize creating services.
76
+ After an authorized deployment succeeds, add its returned destination to the
77
+ existing resource list, avoiding duplicates. Rebuild when this changes the
78
+ configuration; updating the hosted site still requires publication authorization.
79
+
80
+ The homepage uses the first-level knowledge map as a complete site map. Each
81
+ section card previews a bounded number of page links and retains a link to the
82
+ full section, so large knowledge bases remain scannable without hiding top-level
83
+ coverage. LLM Docs and Changelog remain dedicated generated resources. On wide
84
+ screens the homepage content aligns with article content while preserving the
85
+ sidebar rail; on narrow screens it uses the available width. Motion is limited
86
+ to short card entrance and hover feedback and is disabled when the reader asks
87
+ the operating system to reduce motion.
50
88
  The website uses a full-width VitePress theme with system fonts, compact navigation,
51
89
  a wide reading area and a smaller article outline. It starts in
52
90
  light mode regardless of the operating system; an explicit reader choice is
@@ -36,6 +36,23 @@ reports, unique material, unknown files and modified checkouts unless their
36
36
  specific loss is authorized. Do not delete locks, transaction records or active
37
37
  tool directories. Empty task directories can remain.
38
38
 
39
+ Prefer cleanup after successful delivery, not immediately after close: version
40
+ recording, build and retries may still need the current task. Completed production
41
+ drafts and Review state are removed by delivery cleanup. Do not invoke
42
+ `task resume` merely to make a completed workspace advance; it starts a new task
43
+ and requires an actual new user request.
44
+
45
+ Keep repository checkouts referenced by registered sources, including fixed
46
+ commits: removing them can force a costly clone before the next update. Keep
47
+ pending telemetry and source-region baselines; losing the latter reduces the
48
+ ability to distinguish relocated text from changed text. Debug and historical
49
+ views may be archived or removed after diagnosis when no operation is active,
50
+ but unknown Agent files are not automatically disposable.
51
+
52
+ After all scratch state is lost, an existing build receipt defaults the workspace
53
+ to waiting for an explicit new task. This does not restore lost drafts or prove
54
+ sources and outputs are current. Use the recovery checks below before resuming.
55
+
39
56
  ## Restore usable sources
40
57
 
41
58
  For repositories, run `context source recovery-plan --format json` and read
@@ -4,8 +4,8 @@ The project has two durable declarations with separate responsibilities:
4
4
 
5
5
  - `src/index.ts`: source references, document capture, custom non-knowledge
6
6
  orchestration, and package outputs.
7
- - `src/indexers.yaml`: knowledge requirements, Provider selection, target/read
8
- scopes, profiles, and Provider customization.
7
+ - `src/indexers.yaml`: long-term reader requirements, authorized target/supporting
8
+ sources and confirmed exclusions. Skill choices belong to the temporary plan.
9
9
 
10
10
  Do not describe the same knowledge transformation in both files.
11
11
 
@@ -53,6 +53,19 @@ and [knowledge updates](../guides/knowledge-updates.md).
53
53
 
54
54
  ## Capture phases
55
55
 
56
+ For ordinary acquisition, add `--configure` to `context source add repo`, `file`,
57
+ `lark` or `batch`. The command registers the selected inputs and generates explicit
58
+ source references and default document capture phases in `src/index.ts`. It does
59
+ not fetch content, select other registrations or change package outputs.
60
+
61
+ Generation supports a literal `defineProject` with literal source/phase arrays
62
+ and recognizable SDK calls. Existing capture settings are preserved, repeated
63
+ registration is idempotent, and custom/dynamic entries remain untouched with a
64
+ `configuration.status: manual` hint. Registration is still saved; edit only the
65
+ needed declarations through the normal configuration path. For special processors
66
+ or resource options, configure them before following the capture Route. Omitting
67
+ `--configure` keeps registration-only behavior.
68
+
56
69
  ```ts
57
70
  captureFile({ source: docs });
58
71
  captureFile({ source: docs, processor: mdxJsonDocs() });
@@ -67,24 +80,27 @@ creating a second capture or knowledge pipeline.
67
80
 
68
81
  ### Batch capture from the source registry
69
82
 
70
- When all registered Lark documents are intended for this project and share capture
71
- settings, read the registry once instead of copying its module names into
72
- `src/index.ts`. For the standard `src/index.ts` entry:
83
+ For documents with shared capture settings, prefer registry-driven configuration
84
+ over repeating source declarations and capture calls, even for two documents.
85
+ Select the task's intended registrations first. The example below assumes all
86
+ registered Lark documents are in scope, with the standard `src/index.ts` entry:
73
87
 
74
88
  ```ts
75
89
  import { fileURLToPath } from "node:url";
76
90
  import {
77
- allSources, captureLark, defineProject, loadSourcesRegistry, source,
91
+ captureLark, defineProject, loadSourcesRegistry, source,
78
92
  } from "@c4a/context";
79
93
 
80
94
  const workspaceRoot = fileURLToPath(new URL("../", import.meta.url));
81
95
  const registry = await loadSourcesRegistry({ rootDir: workspaceRoot });
96
+ // For a subset, filter registry.larks by the authorized namespace/names here.
82
97
  const documents = registry.larks.map(entry =>
83
98
  source(entry.name, { type: "lark" }),
84
99
  );
85
100
 
86
101
  export default defineProject({
87
- sources: [...allSources("repo"), ...documents],
102
+ sources: documents,
103
+ // Shared settings, independent source identities and capture phases.
88
104
  phases: documents.map(document => captureLark({ source: document })),
89
105
  packages: [],
90
106
  });
@@ -109,6 +125,10 @@ Registry loading only reads local registrations; it does not fetch documents.
109
125
  - The map declares one phase per document. It does not fetch URLs, change capture
110
126
  permissions, or request parallel execution. Run the declared phases through the
111
127
  existing CLI flow so each document retains independent refresh and retry behavior.
128
+ This reduces configuration repetition, not the number of capture operations.
129
+ - Capture boundaries do not dictate article boundaries. During planning and
130
+ writing, combine related captured documents around reader tasks when useful;
131
+ do not create one article or a complete production cycle per source by default.
112
132
 
113
133
  ## `customPhase`
114
134
 
@@ -128,7 +148,22 @@ kbPackage({
128
148
  name: "component-kb",
129
149
  template: "src/package-templates/kb",
130
150
  select: { collections: ["codeindex", "architecture"] },
131
- site: { title: "Component knowledge", lang: "en-US", base: "/" },
151
+ site: {
152
+ title: "Component knowledge",
153
+ lang: "en-US",
154
+ base: "/",
155
+ home: {
156
+ title: "Component knowledge",
157
+ slogan: "Build with the public contract in view",
158
+ description: "Browse components, usage guidance and implementation boundaries.",
159
+ resources: [{
160
+ title: "Project workspace",
161
+ description: "Open the repository that maintains this knowledge.",
162
+ href: "https://example.com/project",
163
+ featured: true,
164
+ }],
165
+ },
166
+ },
132
167
  });
133
168
 
134
169
  llmsPackage({
@@ -144,22 +179,26 @@ may be rebuilt; it is not an authoring source.
144
179
  `kbPackage.site` optionally adds a VitePress website at `dist/<base>-site/` in
145
180
  the same build, beside the KB directory. `<base>` removes one trailing `-kb`
146
181
  from the package name, if present. Omit it for KB-only output. It accepts `title`, `description`,
147
- `lang` and a deployment `base` path. Knowledge map is projected from
182
+ `lang`, a deployment `base` path, and an optional `home` presentation. `home`
183
+ accepts `title`, `slogan`, `description`, hero `actions`, and `resources` shown
184
+ below the generated site map. Each resource needs an `href`, a copyable
185
+ `command`, or both. Omit unknown resources; the builder never invents service
186
+ or repository links. Knowledge map is projected from
148
187
  `src/knowledge-map.yaml` independently of KB directories; see
149
188
  [Package Outputs](../guides/package-outputs.md#optional-static-documentation-website).
150
189
 
151
- ## Indexer registry
190
+ ## Knowledge requirements and Indexer Skills
152
191
 
153
- When this file is absent, the configuration Route supplies the initial schema:
154
- write confirmed `requirements` with `indexers: []`, then re-evaluate. The Provider
155
- selection Action supplies its own completion schema; that payload is not the
156
- configuration file. Subsequent changes use typed proposals and applicable gates. Each selected Indexer binds requirements and scopes to one
157
- primary Provider, with optional declared layers or composers. Provider code
158
- must return the current Indexer result protocol; it must not write Candidate,
159
- knowledge, or Review files directly.
192
+ When `src/indexers.yaml` is absent, the configuration Route supplies its schema.
193
+ Write `requirements` only; do not add `protocol`, `indexers`, Provider selections
194
+ or profiles. Re-evaluate after changing confirmed requirements.
160
195
 
161
- Detailed Provider protocol and customization guidance is selected by the
162
- current workflow Route when it is needed.
196
+ Installed Indexer Skills guide investigation and writing. Relevant Skill choices
197
+ and optional configuration use `indexer_usage` in the temporary production plan,
198
+ not this durable file. There is no separate Provider selection or resolution gate.
199
+ The Agent writes task drafts and reference files under the returned temporary
200
+ directory; the CLI accepts them and owns Candidate, Review and formal output.
201
+ See [Indexer guidance](../guides/indexer-provider-and-customization.md).
163
202
 
164
203
  ## Persistent versus runtime state
165
204
 
package/index.js CHANGED
@@ -10889,11 +10889,35 @@ var coerce = {
10889
10889
  };
10890
10890
  var NEVER = INVALID;
10891
10891
  // src/packageSite.ts
10892
+ var siteHrefSchema = exports_external.string().trim().min(1).refine((value) => /^(?:https?:\/\/|mailto:|\/(?!\/)|#)/u.test(value), "Use an https URL, mailto URL, root-relative path, or page anchor");
10893
+ var packageSiteHomeActionSchema = exports_external.object({
10894
+ text: exports_external.string().trim().min(1),
10895
+ link: siteHrefSchema,
10896
+ theme: exports_external.enum(["brand", "alt"]).optional()
10897
+ }).strict();
10898
+ var packageSiteHomeResourceSchema = exports_external.object({
10899
+ title: exports_external.string().trim().min(1),
10900
+ description: exports_external.string().trim().min(1).optional(),
10901
+ href: siteHrefSchema.optional(),
10902
+ action: exports_external.string().trim().min(1).optional(),
10903
+ command: exports_external.string().trim().min(1).optional(),
10904
+ featured: exports_external.boolean().optional()
10905
+ }).strict().refine((value) => value.href !== undefined || value.command !== undefined, {
10906
+ message: "A homepage resource requires href or command"
10907
+ });
10908
+ var packageSiteHomeSchema = exports_external.object({
10909
+ title: exports_external.string().trim().min(1).optional(),
10910
+ slogan: exports_external.string().trim().min(1).optional(),
10911
+ description: exports_external.string().trim().min(1).optional(),
10912
+ actions: exports_external.array(packageSiteHomeActionSchema).optional(),
10913
+ resources: exports_external.array(packageSiteHomeResourceSchema).optional()
10914
+ }).strict();
10892
10915
  var packageSiteSchema = exports_external.object({
10893
10916
  title: exports_external.string().trim().min(1).optional(),
10894
10917
  description: exports_external.string().optional(),
10895
10918
  lang: exports_external.string().min(1).default("en-US"),
10896
- base: exports_external.string().regex(/^\/(?:[a-zA-Z0-9_-]+\/)*$/, "Use / or a slash-delimited deployment path, such as /docs/").default("/")
10919
+ base: exports_external.string().regex(/^\/(?:[a-zA-Z0-9_-]+\/)*$/, "Use / or a slash-delimited deployment path, such as /docs/").default("/"),
10920
+ home: packageSiteHomeSchema.optional()
10897
10921
  }).strict();
10898
10922
  function normalizePackageSite(value) {
10899
10923
  return value === undefined ? undefined : packageSiteSchema.parse(value);
@@ -15959,7 +15983,7 @@ function validateIndexerArtifactResult(input) {
15959
15983
  capability_group_ref: group.capability_group_ref,
15960
15984
  member_ids: group.member_evidence.map((member) => member.member_id)
15961
15985
  })),
15962
- material_gap_proposal_refs: result.material_question_proposals.map((proposal) => proposal.proposal_ref)
15986
+ material_gap_proposal_refs: result.question_target_dispositions.flatMap((disposition) => disposition.state === "material-gap" ? [disposition.material_question_proposal_ref] : [])
15963
15987
  });
15964
15988
  const targets = new Map(input.allowed_question_targets.map((target) => [target.question_target_key, target.question_ref]));
15965
15989
  assertUnique(result.question_target_dispositions.map((item) => item.question_target_key), "question targets");
@@ -10,11 +10,11 @@ export declare const indexerArtifactPolicyEligibilitySchema: z.ZodObject<{
10
10
  path: z.ZodString;
11
11
  value: z.ZodType<IndexerJson, z.ZodTypeDef, IndexerJson>;
12
12
  }, "strict", z.ZodTypeAny, {
13
- value: IndexerJson;
14
13
  path: string;
15
- }, {
16
14
  value: IndexerJson;
15
+ }, {
17
16
  path: string;
17
+ value: IndexerJson;
18
18
  }>, "many">;
19
19
  provider_supported_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
20
20
  eligible_variants: z.ZodArray<z.ZodObject<{
@@ -71,8 +71,8 @@ export declare const indexerArtifactPolicyEligibilitySchema: z.ZodObject<{
71
71
  profile_id: string;
72
72
  profile_contract_digest: string;
73
73
  canonical_facts: {
74
- value: IndexerJson;
75
74
  path: string;
75
+ value: IndexerJson;
76
76
  }[];
77
77
  provider_supported_variants: string[];
78
78
  eligible_variants: {
@@ -94,8 +94,8 @@ export declare const indexerArtifactPolicyEligibilitySchema: z.ZodObject<{
94
94
  profile_id: string;
95
95
  profile_contract_digest: string;
96
96
  canonical_facts: {
97
- value: IndexerJson;
98
97
  path: string;
98
+ value: IndexerJson;
99
99
  }[];
100
100
  provider_supported_variants: string[];
101
101
  eligible_variants: {