@c4a/context 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/guides/agent-dialogue.md +5 -4
- package/docs/guides/agent-guide.md +11 -5
- package/docs/guides/indexer-provider-and-customization.md +75 -20
- package/docs/guides/knowledge-updates.md +102 -4
- package/docs/guides/package-outputs.md +213 -47
- package/docs/reference/indexer-provider-protocol.md +19 -0
- package/docs/reference/project-api.md +53 -0
- package/index.d.ts +5 -1
- package/index.js +178 -84
- package/indexerArtifactPolicy.d.ts +4 -4
- package/indexerProtocolHash.d.ts +2 -0
- package/indexerProvider.d.ts +30 -30
- package/indexerRegistry.d.ts +606 -0
- package/indexerSemanticInput.d.ts +255 -951
- package/{readingStructure.d.ts → knowledgeMap.d.ts} +16 -16
- package/package.json +1 -1
- package/packageSite.d.ts +25 -0
|
@@ -67,7 +67,8 @@ again. Resolve essential missing goals or source boundaries before production.
|
|
|
67
67
|
|
|
68
68
|
`grill-me` is targeted clarification, not a fixed questionnaire. Research what the
|
|
69
69
|
available material can answer, then ask about consequential unknowns. A required
|
|
70
|
-
schema field is not automatically a question for the user. For
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
schema field is not automatically a question for the user. For the first production
|
|
71
|
+
task in a new workspace, the work-start report must resolve and display the agreed
|
|
72
|
+
purpose, source families, language, settings, outputs and first delivery before
|
|
73
|
+
source registration. Present it and wait for feedback even in managed mode. A
|
|
74
|
+
report must not silently substitute guessed decisions for unanswered questions.
|
|
@@ -96,11 +96,17 @@ delivery batches do complete their applicable content review, close and build;
|
|
|
96
96
|
they are distinct from Partition transport batches. The first delivery normally
|
|
97
97
|
contains 1–3 pages, followed by 30–50-page batches or a smaller remaining tail.
|
|
98
98
|
|
|
99
|
-
For
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
For the first production task in a new workspace, follow the selected work-start
|
|
100
|
+
report procedure using the user's task instructions and batch metadata titles for
|
|
101
|
+
the supplied list, falling back to at most 10 unresolved title lookups if unavailable.
|
|
102
|
+
Do not fetch source bodies or outlines before
|
|
103
|
+
capture; missing titles may remain unknown. Detailed plans are provisional until
|
|
104
|
+
captured evidence is available.
|
|
105
|
+
Resolve its required start conditions, present it and wait for feedback before
|
|
106
|
+
source registration or capture. Reuse explicit answers and defaults instead of
|
|
107
|
+
asking a fixed questionnaire. Existing-workspace lightweight changes may keep a
|
|
108
|
+
short conversational summary. The source-boundary Gate remains the confirmation
|
|
109
|
+
authority; fully managed mode does not bypass the first report handoff.
|
|
104
110
|
|
|
105
111
|
## Quality bar
|
|
106
112
|
|
|
@@ -10,6 +10,35 @@ Context is registry-only by default. The durable selection lives in
|
|
|
10
10
|
resolved transport paths and runtime staging directories are not selection
|
|
11
11
|
authority. A Provider-only project does not create `src/indexer/`.
|
|
12
12
|
|
|
13
|
+
|
|
14
|
+
## Large sources and planning depth
|
|
15
|
+
|
|
16
|
+
Use directory/manifests, route or service registration and representative code to
|
|
17
|
+
select Providers and plan reader subjects. Do not run a complete symbol index
|
|
18
|
+
just to decide the initial article menu. Application/service file-inventory
|
|
19
|
+
batches describe reading scope; they are not business module boundaries or a
|
|
20
|
+
requirement to publish one article per directory. Inspect the supplied source
|
|
21
|
+
access and converge related batches into reader subjects. A file with no supplied
|
|
22
|
+
symbol facts has not been deeply parsed; this is not evidence that it has no APIs.
|
|
23
|
+
Accepted application batches acquire parser facts before Author. Existing
|
|
24
|
+
request-material remains the next action for implementation outside the initial
|
|
25
|
+
reading scope. Public-contract-led profiles, including component libraries,
|
|
26
|
+
retain their contract preparation because those facts define their reader targets.
|
|
27
|
+
|
|
28
|
+
A read scope is an authorization ceiling. Each Indexer should own its actual
|
|
29
|
+
module, with other sources as supporting evidence only when needed. Mixed
|
|
30
|
+
frameworks require per-module Provider choices; do not disable a relevant
|
|
31
|
+
extension to avoid fixing an oversized source boundary. Framework facts are
|
|
32
|
+
still prepared at Author after the selected code has been parsed. For large
|
|
33
|
+
IDL sources, first follow the selected applications' concrete protocol references
|
|
34
|
+
and required includes; an entire protocol monorepo is not a default target.
|
|
35
|
+
|
|
36
|
+
Parser progress is on stderr; stdout remains the command's JSON result. Report
|
|
37
|
+
actual phase, source and available counts without estimating a percentage from
|
|
38
|
+
elapsed time. A preparation-cache hit only reuses parser work, not proof of
|
|
39
|
+
completed articles. After interruption use the current Route; do not clear state
|
|
40
|
+
or increase memory automatically to retry the same oversized scope.
|
|
41
|
+
|
|
13
42
|
## Selection flow
|
|
14
43
|
|
|
15
44
|
Follow `workflow.current` from `context status --format json` or `context run`.
|
|
@@ -31,8 +60,9 @@ configuration or semantic input boundary; it does not make those decisions.
|
|
|
31
60
|
installed-Skill inventory, discovery report, or discovery-only confirmation
|
|
32
61
|
is required. Use the supplied exact identity and cli-bundled distribution
|
|
33
62
|
for shipped Providers, even when their Skills are also visible to the Host.
|
|
34
|
-
For a relevant external Skill, read
|
|
35
|
-
and sibling `context-indexer.yaml
|
|
63
|
+
For a relevant external Skill, read its exact Host-exposed `SKILL.md`
|
|
64
|
+
and sibling `context-indexer.yaml`, then only the linked framework references
|
|
65
|
+
needed to evaluate observed module signals. Do not guess versions
|
|
36
66
|
or scan `.claude`, `.codex`, `.agents` or arbitrary user directories. Different
|
|
37
67
|
versions remain distinct; discovery order is not selection precedence.
|
|
38
68
|
3. Submit the semantic `indexers` and any relevant non-CLI `host_visible_skills`
|
|
@@ -57,6 +87,31 @@ For CLI-bundled instruction Providers, these fields record the original
|
|
|
57
87
|
selection; they are not a requirement to reinstall old bytes when resuming.
|
|
58
88
|
The current CLI supplies its installed Provider's guidance automatically.
|
|
59
89
|
|
|
90
|
+
### Select technology profiles per module
|
|
91
|
+
|
|
92
|
+
A registered repository is a source boundary, not a single technology profile.
|
|
93
|
+
Different modules may need different primary profiles and extension layers. Use
|
|
94
|
+
the current selection contract's supported module and target/read scopes; never
|
|
95
|
+
assign one module's stack to the entire repository merely because it was
|
|
96
|
+
registered as one source.
|
|
97
|
+
|
|
98
|
+
An observed framework dependency, configuration, entry or adapter signal is a
|
|
99
|
+
reason to load the relevant Provider Skill and its applicable reference during
|
|
100
|
+
selection. Reading this guidance is not activation or permission to execute the
|
|
101
|
+
Provider. Follow its evidence rules to verify the signal within authorized source
|
|
102
|
+
material, then bind the applicable profile only to the supported modules. A name
|
|
103
|
+
alone may justify investigation without proving a framework is active.
|
|
104
|
+
|
|
105
|
+
If boundaries are still unclear, identify the relevant modules and inspect their
|
|
106
|
+
configuration and entries in the existing selection flow. Do not reject a
|
|
107
|
+
relevant Provider solely because the repository contains mixed stacks, or defer
|
|
108
|
+
investigation until generic authoring happens to report a capability gap. Record
|
|
109
|
+
unresolved evidence and the concrete next inspection when it cannot yet be
|
|
110
|
+
obtained. Keep unrelated modules on their appropriate primary profiles; multiple
|
|
111
|
+
compatible, proven extensions may support one module without becoming duplicate
|
|
112
|
+
primary owners. These are Agent selection responsibilities, not CLI semantic
|
|
113
|
+
checks or new review gates.
|
|
114
|
+
|
|
60
115
|
## Resuming after a tool update
|
|
61
116
|
|
|
62
117
|
Continue with the current Route and its supplied source material. Agents do not
|
|
@@ -110,18 +165,19 @@ indexers:
|
|
|
110
165
|
providers:
|
|
111
166
|
- id: community
|
|
112
167
|
role: primary
|
|
113
|
-
|
|
114
|
-
version: "<catalog.version>"
|
|
115
|
-
integrity: "<catalog.integrity>"
|
|
116
|
-
distribution:
|
|
117
|
-
kind: cli-bundled
|
|
118
|
-
locator: "<catalog.distribution.locator>"
|
|
168
|
+
catalog_skill: "<catalog.skill>"
|
|
119
169
|
```
|
|
120
170
|
|
|
121
171
|
- Choose `component-library` only if it matches the reader task and appears in
|
|
122
172
|
the selected catalog entry's `capabilities.profiles`. For captured documents,
|
|
123
173
|
notes or conversation summaries, select a profile from the corresponding
|
|
124
|
-
compatible Provider.
|
|
174
|
+
compatible Provider. `catalog_skill` selects exactly one bundled entry from the
|
|
175
|
+
current Action catalog. The CLI fills its version, integrity and distribution
|
|
176
|
+
after checking the Route revision; a changed catalog invalidates that revision.
|
|
177
|
+
Do not combine this reference with identity overrides. Full identities remain
|
|
178
|
+
available for explicitly pinned entries and external Providers, which retain
|
|
179
|
+
their resolution and authorization requirements. The persisted registry always
|
|
180
|
+
contains complete identities, never `catalog_skill` references.
|
|
125
181
|
- Bind each selected requirement and all required coverage domains it owns;
|
|
126
182
|
the single-domain template is not permission to drop other required domains.
|
|
127
183
|
`owned_scope` names the target being described. `read_scope` may also include
|
|
@@ -347,17 +403,16 @@ Existing `reader_goals` remain valid when it is absent. Context passes this
|
|
|
347
403
|
requirement through Partition, Author, and Review; it does not classify free
|
|
348
404
|
text against a fixed vocabulary.
|
|
349
405
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
and
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
continuing the same task; do not add a per-batch pause or report-status field.
|
|
406
|
+
For the first production task in a new workspace, the source-boundary Route
|
|
407
|
+
requires `.tmp/work-start-report.md` before source registration. The current
|
|
408
|
+
workflow supplies `procedure.work-start-report` and `template.work-start-report`:
|
|
409
|
+
a readable report covering readers, purpose, source families, language, settings,
|
|
410
|
+
delivery outputs, first delivery and proposed organization. The Agent reads the
|
|
411
|
+
brief and representative authorized material with Host tools, presents the report
|
|
412
|
+
and resolves its missing choices before registration or capture. The CLI only
|
|
413
|
+
checks the Route payload references a real non-empty report and records its digest;
|
|
414
|
+
it does not judge prose or infer semantic decisions. Reuse and update the report
|
|
415
|
+
with actual Provider choices before Partition rather than adding a per-batch report.
|
|
361
416
|
|
|
362
417
|
Partition may select `artifact_intent` and `template_id` from the current
|
|
363
418
|
Provider catalog, along with `reader_task`, `outline`, `priority`, and
|
|
@@ -16,18 +16,116 @@ 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
|
-
##
|
|
19
|
+
## First-task intake budget
|
|
20
|
+
|
|
21
|
+
Before registration and capture, the Agent uses the user's task instructions and
|
|
22
|
+
reads batch metadata titles across the explicitly supplied document list. Lark
|
|
23
|
+
metadata requests accept at most 200 entries each, not 200 words or 200 documents
|
|
24
|
+
overall. H1/H2 may be reused only when metadata returns them without
|
|
25
|
+
body retrieval; Lark batch metadata returns titles, not headings. Batch failure
|
|
26
|
+
falls back to at most 10 unresolved document title lookups total, unless a shared
|
|
27
|
+
authentication failure makes those calls redundant. The Agent does not fetch
|
|
28
|
+
source bodies, outlines, images or attachments. Missing title metadata is
|
|
29
|
+
optional: preserve the original URL without falling back to body retrieval or
|
|
30
|
+
changing credentials. Resolve intent from the conversation; refine provisional
|
|
31
|
+
chapters and module boundaries from evidence after formal capture.
|
|
32
|
+
|
|
33
|
+
## Workspace versions and changelog
|
|
34
|
+
|
|
35
|
+
`package.json.version` is the workspace SemVer. At completed-scope delivery the
|
|
36
|
+
workflow asks the Agent to inspect formal changes and record an increasing version
|
|
37
|
+
with a concise changelog. Added modules or expanded material coverage increment
|
|
38
|
+
minor; corrections, existing-module updates, navigation and persistent status
|
|
39
|
+
changes increment patch. Major requires an explicit user instruction. Temporary
|
|
40
|
+
progress under `.tmp/` never causes a version increase.
|
|
41
|
+
|
|
42
|
+
Version recording runs at completed-scope delivery after Review, Close and package
|
|
43
|
+
configuration/template approval, before the final build. The record response
|
|
44
|
+
returns the next workspace Route, so no extra status call is needed. Build retries
|
|
45
|
+
reuse the recorded version when formal content is unchanged. Intermediate batches
|
|
46
|
+
do not each receive a version.
|
|
47
|
+
|
|
48
|
+
The workspace AGENTS.md and version-writing instructions require each entry's
|
|
49
|
+
details to stay within 1500 visible characters, including punctuation across the
|
|
50
|
+
title, changes, trigger descriptions and actor display name, excluding protocol
|
|
51
|
+
keys, version and date. The Agent compresses longer drafts before submission,
|
|
52
|
+
preserving main changes, impact and triggers instead of truncating text or splitting
|
|
53
|
+
the iteration into extra versions. This is an Agent writing rule, not a prose-quality
|
|
54
|
+
CLI gate.
|
|
55
|
+
|
|
56
|
+
`context version inspect --format json` returns changed paths and a digest. The
|
|
57
|
+
coordinator submits `context version record --input <file> --format json` with:
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
expected_digest: "<digest returned by inspect>"
|
|
61
|
+
version: 0.2.0
|
|
62
|
+
title: Add module recovery guidance
|
|
63
|
+
changes:
|
|
64
|
+
- Document recovery conditions and the supported retry flow.
|
|
65
|
+
triggers:
|
|
66
|
+
- kind: module
|
|
67
|
+
description: Additional module material requested in this iteration.
|
|
68
|
+
actor:
|
|
69
|
+
kind: lark
|
|
70
|
+
name: Example User
|
|
71
|
+
```
|
|
20
72
|
|
|
21
|
-
|
|
22
|
-
|
|
73
|
+
`actor` is optional; omit it to use local Git `user.name` when configured. Use a
|
|
74
|
+
Lark display name only when explicitly known from the conversation. Trigger kinds
|
|
75
|
+
are `initial`, `note`, `sessions`, `mr`, `module`, `document`, `navigation`,
|
|
76
|
+
`repair`, `dist`, and `other`. Agent-written fields describe the actual diff and
|
|
77
|
+
conversation; they must not expose credentials, raw transcripts or private IDs.
|
|
78
|
+
|
|
79
|
+
The CLI writes `changelog.yaml`, generated `CHANGELOG.md`, `package.json` and the
|
|
80
|
+
`.context-version.json` content baseline together. Keep these formal files with
|
|
81
|
+
the workspace; do not hand-edit generated baselines. Git-managed and unignored
|
|
82
|
+
new files are compared (without Git, non-runtime workspace files are compared).
|
|
83
|
+
Version metadata itself, `dist`, `.tmp` and dependencies do not cause changes.
|
|
84
|
+
|
|
85
|
+
Successful builds record version and per-package hashes in `.context-builds.json`.
|
|
86
|
+
They do not increase versions. Before publishing, `context version publish-check
|
|
87
|
+
--format json` compares against `.context-published.json`. A same-version changed
|
|
88
|
+
output requires a patch using `version inspect --publish` and a `dist` trigger,
|
|
89
|
+
then a rebuild. Record `version published --hash <checked-hash> --receipt
|
|
90
|
+
<successful-publication-reference> --format json` only after external success.
|
|
91
|
+
No command commits, tags or uploads automatically.
|
|
92
|
+
|
|
93
|
+
Website history is available at `changelog.html`: cards are newest first, the
|
|
94
|
+
latest three expanded and older cards collapsed. The History button beside the
|
|
95
|
+
theme switch and footer update timestamps link there. KB and LLMS outputs carry
|
|
96
|
+
the same workspace version and changelog.
|
|
97
|
+
|
|
98
|
+
## Customize the knowledge map at any time
|
|
99
|
+
|
|
100
|
+
For a knowledge-map-only change, use the existing `context task adjust
|
|
101
|
+
--input <file|-> --format json` action with `knowledge_map`. Supply its
|
|
23
102
|
current `expected_revision`, explicit `upsert` entries and `remove` keys. Each
|
|
24
103
|
entry retains its stable key, parent, title and order; optional targets use
|
|
25
104
|
article identity and section key. The current structure preview supplies those
|
|
26
|
-
identities.
|
|
105
|
+
identities. Read the persistent `src/knowledge-map.yaml`; use
|
|
106
|
+
`expected_revision: null` only when no knowledge map exists.
|
|
27
107
|
After adjustment, follow status to rebuild affected packages. This changes the
|
|
28
108
|
reading organization without capturing sources or rewriting approved prose.
|
|
29
109
|
Do not directly edit generated package navigation or use titles as identities.
|
|
30
110
|
|
|
111
|
+
Users can ask in conversation to move a topic, rename a directory, change order,
|
|
112
|
+
or organize the same articles for another reader task. Handle this during ongoing
|
|
113
|
+
production or after completion through the same adjustment; no active Indexer
|
|
114
|
+
task, source recapture or new mode choice is required. Finish or revoke active
|
|
115
|
+
worker assignments before changing the map. Preserve unrelated entries and page
|
|
116
|
+
identities. The map controls website navigation and LLMS organization together.
|
|
117
|
+
|
|
118
|
+
For each new or changed article, the Agent decides whether to retain its current
|
|
119
|
+
placement, add another placement, move it, or create a warranted category. Check
|
|
120
|
+
these choices against the user's settled organization before structure approval
|
|
121
|
+
and delivery. New articles must be bound even if the map revision has not changed;
|
|
122
|
+
modifying a title alone is not a reason to change article identity. Never satisfy
|
|
123
|
+
coverage by mechanically placing every new page under an unrelated catch-all.
|
|
124
|
+
Build reports missing bindings for the Agent to resolve; it does not classify
|
|
125
|
+
content. Moving a menu entry does not change the article URL.
|
|
126
|
+
|
|
127
|
+
## Edit one section or review part of a batch
|
|
128
|
+
|
|
31
129
|
The current approved-revision Route accepts either full `markdown` or explicit
|
|
32
130
|
`sections` edits. Use an existing `writing_context.current_sections` ID and an
|
|
33
131
|
ordered `content` list of `{ "markdown": "new text" }` and/or
|
|
@@ -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
|
-
##
|
|
18
|
+
## Default New-Workspace Outputs: Knowledge Base + Website
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
```
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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,
|