@c4a/context-cli 0.7.105 → 0.7.106
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/cli.js +200 -161
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +1 -1
- package/package.json +12 -12
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +7 -5
- package/plugins/claude/resources/context/routine-update.md +37 -26
- package/plugins/claude/skills/context-plan/SKILL.md +4 -2
- package/plugins/claude/skills/context-plan/references/project-planning.md +9 -1
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +7 -5
- package/plugins/codex/skills/context/references/routine-update.md +37 -26
- package/plugins/codex/skills/context-plan/SKILL.md +4 -2
- package/plugins/codex/skills/context-plan/references/project-planning.md +9 -1
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +7 -5
- package/plugins/cursor/resources/context/routine-update.md +37 -26
- package/plugins/cursor/skills/context-plan/SKILL.md +4 -2
- package/plugins/cursor/skills/context-plan/references/project-planning.md +9 -1
- package/plugins/skills/context/SKILL.md +7 -5
- package/plugins/skills/context/references/routine-update.md +37 -26
- package/plugins/skills/context-plan/SKILL.md +4 -2
- package/plugins/skills/context-plan/references/project-planning.md +9 -1
- package/providers/context/manifest.json +10 -10
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/manuals/guides/knowledge-updates.md +66 -0
- package/providers/context/resources/procedures/approved-revision.md +6 -1
- package/providers/context/resources/procedures/knowledge-updates.md +66 -0
- package/providers/context/resources/procedures/source-update.md +14 -0
|
@@ -93,8 +93,10 @@ as knowledge. Explicit audience-oriented rewriting remains ordinary production.
|
|
|
93
93
|
For an authorized knowledge-production request involving more than 30 original
|
|
94
94
|
documents or at least two repositories needing substantive investigation, use
|
|
95
95
|
the installed `context-plan` Skill before registering the full request. Also use
|
|
96
|
-
it for
|
|
97
|
-
|
|
96
|
+
it for broad document-change scans. A refresh of already registered sources
|
|
97
|
+
is not new investigation: batch it as the knowledge-updates guide describes in
|
|
98
|
+
"Refresh several registered sources", and plan only a large repository or a
|
|
99
|
+
monorepo that needs its own stages. Count the requested change, not all historical workspace sources; repositories used
|
|
98
100
|
only as existing reference material do not count as new investigation. A large
|
|
99
101
|
single repository or long document may warrant planning by module or chapter.
|
|
100
102
|
For a new knowledge project with unclear boundaries or several deliveries,
|
|
@@ -140,7 +142,7 @@ without the user's authorization.
|
|
|
140
142
|
|
|
141
143
|
### Check the CLI first
|
|
142
144
|
|
|
143
|
-
This Skill ships with Context 0.7.
|
|
145
|
+
This Skill ships with Context 0.7.106.
|
|
144
146
|
|
|
145
147
|
When entering production in a workspace, align the CLI, this Skill and the
|
|
146
148
|
workspace SDK once per session with [version alignment](references/version-alignment.md):
|
|
@@ -255,8 +257,8 @@ Within an active Context workflow, requests include, but are not limited to:
|
|
|
255
257
|
| Capture named documents and pause | Register only the selected documents, capture through the current authorized Route, report usable snapshots and resource gaps, then stop before article planning. |
|
|
256
258
|
| Preserve conversation insights | Save or use a summary of supplied discussion, not an entire session history. Code-change links are optional. |
|
|
257
259
|
| Plan a large knowledge project or source refresh | Use `context-plan` for investigation, an approved PLAN and one bounded production stage at a time. |
|
|
258
|
-
| Update knowledge from source changes | Assess a selected commit, MR/PR or document change against a fixed source version;
|
|
259
|
-
| Bring in another team's knowledge and follow it | A released knowledge package, Skill, documentation repository or wiki that another team maintains, shown here and kept current: register it as a `file` source with its origin and version (knowledge-updates guide, "Versioned external content"), then let the user choose between keeping its pages as written (`preserve_original`) and rewriting them as this knowledge base's articles. Do not copy it into custom website pages or write sync scripts; to only point readers to it, register an import. |
|
|
260
|
+
| Update knowledge from source changes | Assess a selected commit, MR/PR or document change against a fixed source version; refresh several registered sources in batches by requirement (knowledge-updates guide, "Refresh several registered sources"); route broad scans or a large repository through `context-plan`, then update the selected stage's affected pages. |
|
|
261
|
+
| Bring in another team's knowledge and follow it | A released knowledge package, Skill, documentation repository or wiki that another team maintains, shown here and kept current: register it as a `file` source with its origin and version (knowledge-updates guide, "Versioned external content and archived collections"), then let the user choose between keeping its pages as written (`preserve_original`) and rewriting them as this knowledge base's articles. Do not copy it into custom website pages or write sync scripts; to only point readers to it, register an import. |
|
|
260
262
|
| Run a routine update | Refresh all registered sources (or the named subset) on a schedule without repeating task instructions: read [routine update](references/routine-update.md). |
|
|
261
263
|
| Revise existing content | Correct current drafts or approved pages, including several pages or supported API-table regeneration. |
|
|
262
264
|
| Organize pages and sources | Move pages within a collection, rename supported sources or remove unused sources with reference checks. |
|
|
@@ -96,32 +96,41 @@ workspace targets or the delivery configuration.
|
|
|
96
96
|
ones that hold no lasting knowledge (step 7), report "no knowledge changes
|
|
97
97
|
this run" and stop without publication. The only commit allowed then is a
|
|
98
98
|
workspace SDK upgrade from version alignment, delivered on its own.
|
|
99
|
-
5. **Size the work.**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
5. **Size the work.** Batch the changed sources as the knowledge-updates guide
|
|
100
|
+
describes in "Refresh several registered sources": size them read-only, give
|
|
101
|
+
a large repository or a monorepo its own batch, and group the rest by
|
|
102
|
+
requirement. Use `context-plan` only for a large repository that needs
|
|
103
|
+
several stages. One source update always covers all affected articles of its
|
|
104
|
+
sources; to keep a large one in groups of about 30, approve and deliver
|
|
105
|
+
checked pages early with the Route's `context run --deliver` while the rest
|
|
106
|
+
stay pending. Above 500 source documents, the `context-plan` human scope
|
|
107
|
+
gate applies: save progress and stop.
|
|
106
108
|
6. **Run one batch at a time.** Context keeps one active update; finish its
|
|
107
|
-
review and delivery before the next.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
review and delivery before the next. Start each batch in this order (the
|
|
110
|
+
knowledge-updates guide, "Refresh several registered sources", step 4):
|
|
111
|
+
1. Fetch and check out each of the batch's repositories at its new commit in
|
|
112
|
+
a shallow or partial clone, keeping the processed commit available:
|
|
113
|
+
`--input` reads only what the checkout already has.
|
|
114
|
+
2. Move only the batch's registrations: rerun `context source add repo` with
|
|
115
|
+
the registered namespace, `--module`, remote or local path and subpath,
|
|
116
|
+
changing only `--ref <sha>`.
|
|
117
|
+
3. Re-capture the batch's changed documents through their normal capture
|
|
118
|
+
Route; for a newer origin version, install it into a new version
|
|
119
|
+
directory and move the registration first, as in the knowledge-updates
|
|
120
|
+
guide's "Versioned external content and archived collections".
|
|
121
|
+
4. Start one `context update --input` naming the batch's repository and
|
|
122
|
+
document scopes, each with its `requirement_ref`; list a source shared by
|
|
123
|
+
several requirements once per requirement. Use `context update --pending
|
|
124
|
+
--format json` instead only when the batch is every pending repository
|
|
125
|
+
and has no documents; it also downloads what it needs.
|
|
126
|
+
|
|
127
|
+
Before writing, restore every source the candidate pages cite, not only this
|
|
128
|
+
batch's: a page that cites a missing source cannot be submitted. `context
|
|
129
|
+
source recovery-plan --format json` lists them with a fill-in restore input.
|
|
130
|
+
For pages kept as written, keep revisions of code contradictions locally,
|
|
131
|
+
list them in the run report, and do not raise again a contradiction the
|
|
132
|
+
history shows was kept unless its cited code changed. Do not start a new
|
|
133
|
+
batch after the time budget; finish or checkpoint the current one.
|
|
125
134
|
7. **Cover uncited changes.** In the source-update decision, go through
|
|
126
135
|
`uncited_changes` by directory, new directories first. Skip tests, lock
|
|
127
136
|
files, generated code and third-party directories, and read the diff only for
|
|
@@ -134,7 +143,9 @@ workspace targets or the delivery configuration.
|
|
|
134
143
|
`instruction`; when it needs a page, add it to `new_topics` and let the Indexer
|
|
135
144
|
Skills write it with the revisions. Write at most 5 new pages per run; put the
|
|
136
145
|
rest, or a whole new subsystem, into the PLAN as a later `context-plan` stage,
|
|
137
|
-
and give each assessed group you do not write a one-line reason.
|
|
146
|
+
and give each assessed group you do not write a one-line reason. When the
|
|
147
|
+
trigger or the workspace `AGENTS.md` asks for corrections only, add no
|
|
148
|
+
`new_topics`; state the left-out additions in `scope_summary` and the result.
|
|
138
149
|
8. **Write the current state.** Revise each affected article so it reads as the
|
|
139
150
|
current knowledge, one coherent article: work the change into the existing
|
|
140
151
|
text instead of appending patch notes, "updated", "new" or "no longer"
|
|
@@ -130,8 +130,10 @@ Recommend **30 source documents per stage**. Adjust the group to its subject,
|
|
|
130
130
|
length, complexity and dependencies, with an absolute maximum of **50**.
|
|
131
131
|
Explain groups above 30 in the PLAN; split even smaller groups when needed.
|
|
132
132
|
Investigate at most **one new repository per stage**; existing studied
|
|
133
|
-
repositories may support a document stage.
|
|
134
|
-
|
|
133
|
+
repositories may support a document stage. Refreshing repositories that are
|
|
134
|
+
already registered is not new investigation: batch it by requirement as the
|
|
135
|
+
knowledge-updates guide describes, with only a large repository on its own.
|
|
136
|
+
Limit a revision stage to **30 target articles**. These are planning boundaries, not additional CLI gates.
|
|
135
137
|
|
|
136
138
|
After each stage, record actual research, production, review, merge and delivery
|
|
137
139
|
results in the PLAN. When publication is required, mark it delivered only after
|
|
@@ -174,7 +174,7 @@ the next production stage. Plan these bounds:
|
|
|
174
174
|
| Stage kind | Default scope |
|
|
175
175
|
| --- | --- |
|
|
176
176
|
| Document research and writing | Recommend 30 source documents; dynamically choose smaller or larger groups based on subject, length, complexity and dependencies, never exceeding 50. Explain groups above 30 in the PLAN. |
|
|
177
|
-
| New repository investigation | One repository, with selected modules and research objectives. Split additional repositories into later stages. |
|
|
177
|
+
| New repository investigation | One repository, with selected modules and research objectives. Split additional repositories into later stages. A refresh of already registered repositories is not new investigation; see below. |
|
|
178
178
|
| Revision of existing knowledge | At most 30 target articles, while respecting the stage's source limits. |
|
|
179
179
|
|
|
180
180
|
Thirty is a recommended batch size, not a minimum or a required exact count.
|
|
@@ -223,6 +223,14 @@ without an old snapshot, explain the observable current state and do not claim
|
|
|
223
223
|
a line-by-line historical diff. Treat unsupported resource representations as
|
|
224
224
|
coverage limits rather than silently considering the document fully read.
|
|
225
225
|
|
|
226
|
+
When the comparison covers repositories that are already registered, batch the
|
|
227
|
+
update as the knowledge-updates guide describes in "Refresh several registered
|
|
228
|
+
sources": size every source read-only first, give a large repository or a
|
|
229
|
+
monorepo its own stage, and group the rest by requirement. Its changed-file
|
|
230
|
+
hint (about 500 code and Markdown files) only decides whether a repository gets
|
|
231
|
+
its own stage; it is unrelated to the mandatory human scope gate above 500 source
|
|
232
|
+
documents.
|
|
233
|
+
|
|
226
234
|
Summarize the proposed article changes, unchanged coverage and uncertain cases
|
|
227
235
|
in the PLAN. If the user asked only to inspect changes or provide a comparison,
|
|
228
236
|
stop at that report. Agreement with the findings alone does not authorize
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema": "agent-graph.bundle.v1",
|
|
3
3
|
"provider": {
|
|
4
4
|
"id": "c4a/context",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.106"
|
|
6
6
|
},
|
|
7
7
|
"providerManifest": "provider.yaml",
|
|
8
8
|
"graphs": [
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
{
|
|
294
294
|
"id": "procedure.approved-revision",
|
|
295
295
|
"path": "resources/procedures/approved-revision.md",
|
|
296
|
-
"digest": "sha256:
|
|
296
|
+
"digest": "sha256:4614b1564a07caeedd6d6af370edaa897bcd5e85e1a486845485af8e945a33c5"
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
299
|
"id": "procedure.close-and-build",
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
{
|
|
329
329
|
"id": "procedure.knowledge-updates",
|
|
330
330
|
"path": "resources/procedures/knowledge-updates.md",
|
|
331
|
-
"digest": "sha256:
|
|
331
|
+
"digest": "sha256:5cc8360df85e11c32ac64cf287ca431a4b59a0da40fc2ad4d009293ba679dcc6"
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
"id": "procedure.note",
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
{
|
|
389
389
|
"id": "procedure.source-update",
|
|
390
390
|
"path": "resources/procedures/source-update.md",
|
|
391
|
-
"digest": "sha256:
|
|
391
|
+
"digest": "sha256:3522ac1e0155ce243d0cde3b5472def5e1172cd543ba4ae268f729c696a87c9a"
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
"id": "procedure.task-recovery",
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
},
|
|
599
599
|
{
|
|
600
600
|
"path": "provider.yaml",
|
|
601
|
-
"digest": "sha256:
|
|
601
|
+
"digest": "sha256:c26d87a30118c2fc22859430ff771627839c5f6cb427d1b75127496ccc2cf946"
|
|
602
602
|
},
|
|
603
603
|
{
|
|
604
604
|
"path": "resources/contracts/indexer-provider-guide.yaml",
|
|
@@ -658,7 +658,7 @@
|
|
|
658
658
|
},
|
|
659
659
|
{
|
|
660
660
|
"path": "resources/manuals/guides/knowledge-updates.md",
|
|
661
|
-
"digest": "sha256:
|
|
661
|
+
"digest": "sha256:53dc283e318edf1962e83588a7b9a5bf398aa51bc9556160ac3b8200fb406b1b"
|
|
662
662
|
},
|
|
663
663
|
{
|
|
664
664
|
"path": "resources/manuals/guides/lark-resources.md",
|
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
},
|
|
727
727
|
{
|
|
728
728
|
"path": "resources/procedures/approved-revision.md",
|
|
729
|
-
"digest": "sha256:
|
|
729
|
+
"digest": "sha256:4614b1564a07caeedd6d6af370edaa897bcd5e85e1a486845485af8e945a33c5"
|
|
730
730
|
},
|
|
731
731
|
{
|
|
732
732
|
"path": "resources/procedures/close-and-build.md",
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
},
|
|
755
755
|
{
|
|
756
756
|
"path": "resources/procedures/knowledge-updates.md",
|
|
757
|
-
"digest": "sha256:
|
|
757
|
+
"digest": "sha256:5cc8360df85e11c32ac64cf287ca431a4b59a0da40fc2ad4d009293ba679dcc6"
|
|
758
758
|
},
|
|
759
759
|
{
|
|
760
760
|
"path": "resources/procedures/note.md",
|
|
@@ -802,7 +802,7 @@
|
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
804
|
"path": "resources/procedures/source-update.md",
|
|
805
|
-
"digest": "sha256:
|
|
805
|
+
"digest": "sha256:3522ac1e0155ce243d0cde3b5472def5e1172cd543ba4ae268f729c696a87c9a"
|
|
806
806
|
},
|
|
807
807
|
{
|
|
808
808
|
"path": "resources/procedures/task-recovery.md",
|
|
@@ -921,5 +921,5 @@
|
|
|
921
921
|
"indexer": [],
|
|
922
922
|
"workspace": []
|
|
923
923
|
},
|
|
924
|
-
"digest": "sha256:
|
|
924
|
+
"digest": "sha256:6ddb5d8b440774cfaeae24b65eb5a7490f34f534e7bbf8ae9a4911fea0292e94"
|
|
925
925
|
}
|
|
@@ -456,6 +456,65 @@ Before importing a `note`, read [note source preparation](note.md).
|
|
|
456
456
|
Before importing `sessions`, read [development summary preparation](sessions.md).
|
|
457
457
|
Choose the reference for the actual input; do not read both by default.
|
|
458
458
|
|
|
459
|
+
## Refresh several registered sources
|
|
460
|
+
|
|
461
|
+
When several registered sources move to newer versions together, size them
|
|
462
|
+
first and update them in batches, so each review covers related pages:
|
|
463
|
+
|
|
464
|
+
1. **Size read-only.** Before changing `sources/repo/index.yaml`, fetch only the
|
|
465
|
+
target commits (`git ls-remote`, or `git fetch` with `--filter=blob:none` in a
|
|
466
|
+
partial clone). Do not pull, check out or move any HEAD yet: a checkout that
|
|
467
|
+
no longer matches its registered commit reports a changed source boundary.
|
|
468
|
+
List each repository's changes with `git diff --name-status <processed>
|
|
469
|
+
<target> -- <registered subpath>`, which compares trees without downloading
|
|
470
|
+
file contents and prints full paths; do not use `--stat`, which downloads
|
|
471
|
+
both versions of every changed file. Count official code and Markdown files,
|
|
472
|
+
not tests, lock files, generated output (including run records such as
|
|
473
|
+
workflow artifacts) or third-party directories. For documents, check their
|
|
474
|
+
current revision; a `file` source whose local directory no longer exists
|
|
475
|
+
cannot be refreshed, so report it instead of counting it as unchanged.
|
|
476
|
+
2. **Separate large repositories.** A monorepo, a large repository, or one with
|
|
477
|
+
many relevant changed files (about 500 as a guide, or many new directories
|
|
478
|
+
whose features need assessing) gets its own batch. This is a judgment, not a
|
|
479
|
+
limit: a few new directories are assessed as uncited changes in their batch.
|
|
480
|
+
3. **Group the rest by requirement.** Each requirement in `src/indexers.yaml`
|
|
481
|
+
whose sources changed forms one batch. A source shared by several
|
|
482
|
+
requirements moves once, in one batch: put it with the requirement whose
|
|
483
|
+
pages cite it most (`knowledge/structure.yaml` lists each page's citations),
|
|
484
|
+
and list it in that update once per
|
|
485
|
+
requirement that includes it. The update covers every page citing it
|
|
486
|
+
whatever its requirement, but advances only the listed requirements; one
|
|
487
|
+
left out stays pending and returns the same citations in another update. A
|
|
488
|
+
requirement whose sources bring only citation changes or one to three pages
|
|
489
|
+
joins the smallest batch instead of forming its own; mention it separately
|
|
490
|
+
in the batch report. Across
|
|
491
|
+
sources, split a batch above 30 pages by source: `module_refs` do not narrow
|
|
492
|
+
the candidate pages of one source, so a smaller batch needs fewer sources. A
|
|
493
|
+
single source above 30 pages uses `context run --deliver` to deliver checked
|
|
494
|
+
pages in groups.
|
|
495
|
+
4. **Run one batch at a time.** Context keeps one active update. When a batch
|
|
496
|
+
starts, fetch and check out its repositories at the target commits with the
|
|
497
|
+
cited files' contents available (`--input` reads only what the checkout has;
|
|
498
|
+
keep the processed commit available for history), move only this batch's
|
|
499
|
+
registrations (`context source add repo` changing only `--ref`; register a
|
|
500
|
+
checkout kept outside the workspace through a workspace-relative alias such
|
|
501
|
+
as `.tmp/repo/<name>`, as `context source restore` does, not an absolute
|
|
502
|
+
path that only exists on this machine), recapture its documents and upgrade
|
|
503
|
+
its versioned file sources (see "Versioned external content and archived
|
|
504
|
+
collections"), then start one `context update --input` listing all of the batch's `repo:`, `lark:` and `file:` scopes, each
|
|
505
|
+
with its `requirement_ref`. Do not move later batches' registrations early.
|
|
506
|
+
5. **`--pending` only for one repository-only batch.** `context update
|
|
507
|
+
--pending` covers repositories only and is a write: once it runs, the batch
|
|
508
|
+
cannot be split with `--input` without rolling back. Use it only when the
|
|
509
|
+
batch is every pending repository and has no documents.
|
|
510
|
+
|
|
511
|
+
The user or the workspace `AGENTS.md` may also ask for a corrections-only
|
|
512
|
+
update: correct what pages already say, add no features or topics the pages did
|
|
513
|
+
not cover, and avoid repeating the same detail across pages. In the
|
|
514
|
+
source-update decision, then leave `new_topics` empty, say in `scope_summary`
|
|
515
|
+
which uncited additions were left out, and put the rule into each revised
|
|
516
|
+
page's `instruction` so the writing step follows it.
|
|
517
|
+
|
|
459
518
|
## Versioned external content and archived collections
|
|
460
519
|
|
|
461
520
|
Published content that another team versions, such as a documentation
|
|
@@ -771,6 +830,13 @@ An unrelated queued page does not revoke an unchanged current page's review.
|
|
|
771
830
|
If a page has already been applied, finish its close/build before changing its
|
|
772
831
|
inputs. Only the final completed scope advances its processed baseline.
|
|
773
832
|
|
|
833
|
+
For a source update, the adjustment keeps the citation results the update
|
|
834
|
+
already computed; it does not read the sources again. When those results came
|
|
835
|
+
from the local checkout rather than the source (for example, every citation of
|
|
836
|
+
a repository reported `unavailable` before its checkout was restored or moved),
|
|
837
|
+
discard the unfinished update as described in "Adjust or roll back current work"
|
|
838
|
+
and start `context update` again.
|
|
839
|
+
|
|
774
840
|
For several documents, `source import` also accepts a JSON/YAML array of the same
|
|
775
841
|
single-document inputs. Its receipt reports each zero-based input index and
|
|
776
842
|
success or error separately; a partial batch returns a nonzero exit code.
|
|
@@ -9,6 +9,8 @@ mediaType: text/markdown
|
|
|
9
9
|
The current action contains the approved page and the user's instruction. Read
|
|
10
10
|
the entire page first. Revise only what the instruction and available sources
|
|
11
11
|
support; retain still-correct explanations and confirmed user contributions.
|
|
12
|
+
When the instruction asks for corrections only, do not add material it does not
|
|
13
|
+
ask for.
|
|
12
14
|
|
|
13
15
|
For an expression-only change, the approved text is enough. Do not capture,
|
|
14
16
|
parse, partition, or reconfigure its source. For changed facts, read the relevant
|
|
@@ -178,7 +180,10 @@ fixed source, signing) against the current Route and returns one result per page
|
|
|
178
180
|
with its issues, without saving drafts, task state or source caches. It reports problems and never repairs them: for example, a line range
|
|
179
181
|
past the end of a file is reported, not clamped. Write the whole batch, preview
|
|
180
182
|
it once, correct the flagged pages, then submit; do not write ad-hoc validation
|
|
181
|
-
or re-signing scripts.
|
|
183
|
+
or re-signing scripts. For pages from a source update, the task input does not
|
|
184
|
+
list which citations changed: the preview reports each citation the processed
|
|
185
|
+
source no longer confirms (`processed-reference-stale`, with the old text's new
|
|
186
|
+
lines when known), so re-cite those, or quote or rewrite the paragraph.
|
|
182
187
|
|
|
183
188
|
Preview is useful only when its assembled text will be read before deciding to
|
|
184
189
|
submit. An unattended loop submits directly. Continue from the receipt's
|
|
@@ -456,6 +456,65 @@ Before importing a `note`, read [note source preparation](note.md).
|
|
|
456
456
|
Before importing `sessions`, read [development summary preparation](sessions.md).
|
|
457
457
|
Choose the reference for the actual input; do not read both by default.
|
|
458
458
|
|
|
459
|
+
## Refresh several registered sources
|
|
460
|
+
|
|
461
|
+
When several registered sources move to newer versions together, size them
|
|
462
|
+
first and update them in batches, so each review covers related pages:
|
|
463
|
+
|
|
464
|
+
1. **Size read-only.** Before changing `sources/repo/index.yaml`, fetch only the
|
|
465
|
+
target commits (`git ls-remote`, or `git fetch` with `--filter=blob:none` in a
|
|
466
|
+
partial clone). Do not pull, check out or move any HEAD yet: a checkout that
|
|
467
|
+
no longer matches its registered commit reports a changed source boundary.
|
|
468
|
+
List each repository's changes with `git diff --name-status <processed>
|
|
469
|
+
<target> -- <registered subpath>`, which compares trees without downloading
|
|
470
|
+
file contents and prints full paths; do not use `--stat`, which downloads
|
|
471
|
+
both versions of every changed file. Count official code and Markdown files,
|
|
472
|
+
not tests, lock files, generated output (including run records such as
|
|
473
|
+
workflow artifacts) or third-party directories. For documents, check their
|
|
474
|
+
current revision; a `file` source whose local directory no longer exists
|
|
475
|
+
cannot be refreshed, so report it instead of counting it as unchanged.
|
|
476
|
+
2. **Separate large repositories.** A monorepo, a large repository, or one with
|
|
477
|
+
many relevant changed files (about 500 as a guide, or many new directories
|
|
478
|
+
whose features need assessing) gets its own batch. This is a judgment, not a
|
|
479
|
+
limit: a few new directories are assessed as uncited changes in their batch.
|
|
480
|
+
3. **Group the rest by requirement.** Each requirement in `src/indexers.yaml`
|
|
481
|
+
whose sources changed forms one batch. A source shared by several
|
|
482
|
+
requirements moves once, in one batch: put it with the requirement whose
|
|
483
|
+
pages cite it most (`knowledge/structure.yaml` lists each page's citations),
|
|
484
|
+
and list it in that update once per
|
|
485
|
+
requirement that includes it. The update covers every page citing it
|
|
486
|
+
whatever its requirement, but advances only the listed requirements; one
|
|
487
|
+
left out stays pending and returns the same citations in another update. A
|
|
488
|
+
requirement whose sources bring only citation changes or one to three pages
|
|
489
|
+
joins the smallest batch instead of forming its own; mention it separately
|
|
490
|
+
in the batch report. Across
|
|
491
|
+
sources, split a batch above 30 pages by source: `module_refs` do not narrow
|
|
492
|
+
the candidate pages of one source, so a smaller batch needs fewer sources. A
|
|
493
|
+
single source above 30 pages uses `context run --deliver` to deliver checked
|
|
494
|
+
pages in groups.
|
|
495
|
+
4. **Run one batch at a time.** Context keeps one active update. When a batch
|
|
496
|
+
starts, fetch and check out its repositories at the target commits with the
|
|
497
|
+
cited files' contents available (`--input` reads only what the checkout has;
|
|
498
|
+
keep the processed commit available for history), move only this batch's
|
|
499
|
+
registrations (`context source add repo` changing only `--ref`; register a
|
|
500
|
+
checkout kept outside the workspace through a workspace-relative alias such
|
|
501
|
+
as `.tmp/repo/<name>`, as `context source restore` does, not an absolute
|
|
502
|
+
path that only exists on this machine), recapture its documents and upgrade
|
|
503
|
+
its versioned file sources (see "Versioned external content and archived
|
|
504
|
+
collections"), then start one `context update --input` listing all of the batch's `repo:`, `lark:` and `file:` scopes, each
|
|
505
|
+
with its `requirement_ref`. Do not move later batches' registrations early.
|
|
506
|
+
5. **`--pending` only for one repository-only batch.** `context update
|
|
507
|
+
--pending` covers repositories only and is a write: once it runs, the batch
|
|
508
|
+
cannot be split with `--input` without rolling back. Use it only when the
|
|
509
|
+
batch is every pending repository and has no documents.
|
|
510
|
+
|
|
511
|
+
The user or the workspace `AGENTS.md` may also ask for a corrections-only
|
|
512
|
+
update: correct what pages already say, add no features or topics the pages did
|
|
513
|
+
not cover, and avoid repeating the same detail across pages. In the
|
|
514
|
+
source-update decision, then leave `new_topics` empty, say in `scope_summary`
|
|
515
|
+
which uncited additions were left out, and put the rule into each revised
|
|
516
|
+
page's `instruction` so the writing step follows it.
|
|
517
|
+
|
|
459
518
|
## Versioned external content and archived collections
|
|
460
519
|
|
|
461
520
|
Published content that another team versions, such as a documentation
|
|
@@ -771,6 +830,13 @@ An unrelated queued page does not revoke an unchanged current page's review.
|
|
|
771
830
|
If a page has already been applied, finish its close/build before changing its
|
|
772
831
|
inputs. Only the final completed scope advances its processed baseline.
|
|
773
832
|
|
|
833
|
+
For a source update, the adjustment keeps the citation results the update
|
|
834
|
+
already computed; it does not read the sources again. When those results came
|
|
835
|
+
from the local checkout rather than the source (for example, every citation of
|
|
836
|
+
a repository reported `unavailable` before its checkout was restored or moved),
|
|
837
|
+
discard the unfinished update as described in "Adjust or roll back current work"
|
|
838
|
+
and start `context update` again.
|
|
839
|
+
|
|
774
840
|
For several documents, `source import` also accepts a JSON/YAML array of the same
|
|
775
841
|
single-document inputs. Its receipt reports each zero-based input index and
|
|
776
842
|
success or error separately; a partial batch returns a nonzero exit code.
|
|
@@ -52,6 +52,14 @@ link targets or a restored table may change meaning even if the text looks simil
|
|
|
52
52
|
If any mapping is missing or uncertain, use normal revision. A format-only
|
|
53
53
|
decision does not authorize publication or suppress unrelated version changes.
|
|
54
54
|
|
|
55
|
+
Without a proposal, document evidence stays positional, so find the cited text
|
|
56
|
+
in the current snapshot (a distinctive line or its heading) before deciding. A
|
|
57
|
+
change that is only export formatting (merged bold markers, regenerated
|
|
58
|
+
descriptions in omitted-image placeholders) needs no change to the page body:
|
|
59
|
+
kept without an instruction, its citations stay at their previous locations and
|
|
60
|
+
are listed in `reference_warnings`; to clear them now, give the page an
|
|
61
|
+
instruction to re-cite the current text only.
|
|
62
|
+
|
|
55
63
|
Also inspect additions and shared dependencies in the source change. Existing
|
|
56
64
|
page references cannot discover every new topic. For repositories,
|
|
57
65
|
`uncited_changes` lists the changed files no approved page cites, grouped by
|
|
@@ -66,6 +74,12 @@ Use an empty list only when existing pages cover the change or the additions
|
|
|
66
74
|
are outside the confirmed purpose. New pages go through the same writing and
|
|
67
75
|
review process as revisions; a new topic is not a no-change decision.
|
|
68
76
|
|
|
77
|
+
When the task or the workspace `AGENTS.md` asks for corrections only, leave
|
|
78
|
+
`new_topics` empty, say in `scope_summary` which additions were left out, and
|
|
79
|
+
write the rule into each revised page's `instruction`: correct what the page
|
|
80
|
+
already says, add no features or topics it did not cover, and avoid repeating
|
|
81
|
+
detail that other pages carry.
|
|
82
|
+
|
|
69
83
|
A kept page's citations whose text only moved in the updated source are
|
|
70
84
|
relocated when the update settles. When cited text changed or cannot be
|
|
71
85
|
confirmed, the completion result lists it in `reference_warnings`; those
|