@c4a/context-cli 0.7.105 → 0.7.107
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 +2458 -1557
- 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 +17 -5
- package/plugins/claude/resources/context/routine-update.md +46 -27
- 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 +17 -5
- package/plugins/codex/skills/context/references/routine-update.md +46 -27
- 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 +17 -5
- package/plugins/cursor/resources/context/routine-update.md +46 -27
- 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 +17 -5
- package/plugins/skills/context/references/routine-update.md +46 -27
- 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 +137 -0
- package/providers/context/resources/procedures/approved-revision.md +6 -1
- package/providers/context/resources/procedures/knowledge-updates.md +137 -0
- package/providers/context/resources/procedures/source-update.md +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.107",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local runtime and Agent integration for traceable knowledge production",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@c4a/agent-graph": "0.3.0",
|
|
27
|
-
"@c4a/context": "0.7.
|
|
28
|
-
"@c4a/extract": "0.7.
|
|
29
|
-
"@c4a/extract-contract": "0.7.
|
|
30
|
-
"@c4a/extract-go": "0.7.
|
|
31
|
-
"@c4a/extract-mdx": "0.7.
|
|
32
|
-
"@c4a/extract-proto": "0.7.
|
|
33
|
-
"@c4a/extract-rush": "0.7.
|
|
34
|
-
"@c4a/extract-sql": "0.7.
|
|
35
|
-
"@c4a/extract-style": "0.7.
|
|
36
|
-
"@c4a/extract-thrift": "0.7.
|
|
37
|
-
"@c4a/extract-ts": "0.7.
|
|
27
|
+
"@c4a/context": "0.7.107",
|
|
28
|
+
"@c4a/extract": "0.7.107",
|
|
29
|
+
"@c4a/extract-contract": "0.7.107",
|
|
30
|
+
"@c4a/extract-go": "0.7.107",
|
|
31
|
+
"@c4a/extract-mdx": "0.7.107",
|
|
32
|
+
"@c4a/extract-proto": "0.7.107",
|
|
33
|
+
"@c4a/extract-rush": "0.7.107",
|
|
34
|
+
"@c4a/extract-sql": "0.7.107",
|
|
35
|
+
"@c4a/extract-style": "0.7.107",
|
|
36
|
+
"@c4a/extract-thrift": "0.7.107",
|
|
37
|
+
"@c4a/extract-ts": "0.7.107",
|
|
38
38
|
"@mermaid-js/layout-elk": "0.2.0",
|
|
39
39
|
"commander": "^11.0.0",
|
|
40
40
|
"d3-force": "3.0.0",
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.107
|
|
@@ -95,8 +95,10 @@ as knowledge. Explicit audience-oriented rewriting remains ordinary production.
|
|
|
95
95
|
For an authorized knowledge-production request involving more than 30 original
|
|
96
96
|
documents or at least two repositories needing substantive investigation, use
|
|
97
97
|
the installed `context-plan` Skill before registering the full request. Also use
|
|
98
|
-
it for
|
|
99
|
-
|
|
98
|
+
it for broad document-change scans. A refresh of already registered sources
|
|
99
|
+
is not new investigation: batch it as the knowledge-updates guide describes in
|
|
100
|
+
"Refresh several registered sources", and plan only a large repository or a
|
|
101
|
+
monorepo that needs its own stages. Count the requested change, not all historical workspace sources; repositories used
|
|
100
102
|
only as existing reference material do not count as new investigation. A large
|
|
101
103
|
single repository or long document may warrant planning by module or chapter.
|
|
102
104
|
For a new knowledge project with unclear boundaries or several deliveries,
|
|
@@ -142,7 +144,7 @@ without the user's authorization.
|
|
|
142
144
|
|
|
143
145
|
### Check the CLI first
|
|
144
146
|
|
|
145
|
-
This Skill ships with Context 0.7.
|
|
147
|
+
This Skill ships with Context 0.7.107.
|
|
146
148
|
|
|
147
149
|
When entering production in a workspace, align the CLI, this Skill and the
|
|
148
150
|
workspace SDK once per session with [version alignment](../resources/context/version-alignment.md):
|
|
@@ -257,8 +259,8 @@ Within an active Context workflow, requests include, but are not limited to:
|
|
|
257
259
|
| 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. |
|
|
258
260
|
| Preserve conversation insights | Save or use a summary of supplied discussion, not an entire session history. Code-change links are optional. |
|
|
259
261
|
| Plan a large knowledge project or source refresh | Use `context-plan` for investigation, an approved PLAN and one bounded production stage at a time. |
|
|
260
|
-
| Update knowledge from source changes | Assess a selected commit, MR/PR or document change against a fixed source version;
|
|
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"), 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. |
|
|
262
|
+
| 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. |
|
|
263
|
+
| 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. |
|
|
262
264
|
| Run a routine update | Refresh all registered sources (or the named subset) on a schedule without repeating task instructions: read [routine update](../resources/context/routine-update.md). |
|
|
263
265
|
| Revise existing content | Correct current drafts or approved pages, including several pages or supported API-table regeneration. |
|
|
264
266
|
| Organize pages and sources | Move pages within a collection, rename supported sources or remove unused sources with reference checks. |
|
|
@@ -514,6 +516,16 @@ follow its private-install recovery. Keep `CONTEXT_LARK_CLI_BIN` pointing to tha
|
|
|
514
516
|
private executable on subsequent Context commands that access Lark; do not
|
|
515
517
|
upgrade or replace the host's global `lark-cli`.
|
|
516
518
|
|
|
519
|
+
Repository sources are read from local checkouts unless `CONTEXT_SOURCE_MODE`
|
|
520
|
+
(or `--source-mode`) is `remote` or `auto`; pass the mode the user or host
|
|
521
|
+
configuration sets to every Context command. A source shown as `access: remote`
|
|
522
|
+
needs no clone for updates, revisions or verification: read its code through
|
|
523
|
+
the Sourcegraph MCP tools at the registered commit. When a command returns
|
|
524
|
+
`next_action.mcp_tool: authorize_cli`, call that tool with `client: "context"`
|
|
525
|
+
once and run the returned `command` with its `code` and `host`; never print the
|
|
526
|
+
token. New pages and code parsing still need a local checkout. The
|
|
527
|
+
knowledge-updates guide, "Update without cloning", has the details.
|
|
528
|
+
|
|
517
529
|
### Continue
|
|
518
530
|
|
|
519
531
|
Use `next_route.inline` as the complete Route when present. Read
|
|
@@ -73,7 +73,11 @@ workspace targets or the delivery configuration.
|
|
|
73
73
|
with [version alignment](version-alignment.md). Enter the workspace named by
|
|
74
74
|
the host configuration before the entry, cloning it when the current
|
|
75
75
|
directory does not have it; never initialize a new workspace for a routine
|
|
76
|
-
run, and report a missing or unconfigured workspace instead.
|
|
76
|
+
run, and report a missing or unconfigured workspace instead. Run every
|
|
77
|
+
Context command with the `CONTEXT_SOURCE_MODE` the host configuration sets
|
|
78
|
+
(`local` when unset). With `remote` or `auto`, a repository `context status`
|
|
79
|
+
reports as `access: remote` is read from Sourcegraph and needs no clone (the
|
|
80
|
+
knowledge-updates guide, "Update without cloning"). Clone any other missing
|
|
77
81
|
registered repository (shallow or partial for large ones), then update the
|
|
78
82
|
workspace branch from its remote. Never discard local work.
|
|
79
83
|
2. **Resume first.** If `context status` shows an unfinished task, finish it (use
|
|
@@ -96,32 +100,43 @@ workspace targets or the delivery configuration.
|
|
|
96
100
|
ones that hold no lasting knowledge (step 7), report "no knowledge changes
|
|
97
101
|
this run" and stop without publication. The only commit allowed then is a
|
|
98
102
|
workspace SDK upgrade from version alignment, delivered on its own.
|
|
99
|
-
5. **Size the work.**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
5. **Size the work.** Batch the changed sources as the knowledge-updates guide
|
|
104
|
+
describes in "Refresh several registered sources": size them read-only, give
|
|
105
|
+
a large repository or a monorepo its own batch, and group the rest by
|
|
106
|
+
requirement. Use `context-plan` only for a large repository that needs
|
|
107
|
+
several stages. One source update always covers all affected articles of its
|
|
108
|
+
sources; to keep a large one in groups of about 30, approve and deliver
|
|
109
|
+
checked pages early with the Route's `context run --deliver` while the rest
|
|
110
|
+
stay pending. Above 500 source documents, the `context-plan` human scope
|
|
111
|
+
gate applies: save progress and stop.
|
|
106
112
|
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
|
-
|
|
113
|
+
review and delivery before the next. Start each batch in this order (the
|
|
114
|
+
knowledge-updates guide, "Refresh several registered sources", step 4):
|
|
115
|
+
1. Fetch and check out each of the batch's repositories at its new commit in
|
|
116
|
+
a shallow or partial clone, keeping the processed commit available:
|
|
117
|
+
`--input` reads only what the checkout already has. Skip this for a
|
|
118
|
+
repository read from Sourcegraph; size its change with the Sourcegraph
|
|
119
|
+
diff instead.
|
|
120
|
+
2. Move only the batch's registrations: rerun `context source add repo` with
|
|
121
|
+
the registered namespace, `--module`, remote or local path and subpath,
|
|
122
|
+
changing only `--ref <sha>`.
|
|
123
|
+
3. Re-capture the batch's changed documents through their normal capture
|
|
124
|
+
Route; for a newer origin version, install it into a new version
|
|
125
|
+
directory and move the registration first, as in the knowledge-updates
|
|
126
|
+
guide's "Versioned external content and archived collections".
|
|
127
|
+
4. Start one `context update --input` naming the batch's repository and
|
|
128
|
+
document scopes, each with its `requirement_ref`; list a source shared by
|
|
129
|
+
several requirements once per requirement. Use `context update --pending
|
|
130
|
+
--format json` instead only when the batch is every pending repository
|
|
131
|
+
and has no documents; it also downloads what it needs.
|
|
132
|
+
|
|
133
|
+
Before writing, restore every source the candidate pages cite, not only this
|
|
134
|
+
batch's: a page that cites a missing source cannot be submitted. `context
|
|
135
|
+
source recovery-plan --format json` lists them with a fill-in restore input.
|
|
136
|
+
For pages kept as written, keep revisions of code contradictions locally,
|
|
137
|
+
list them in the run report, and do not raise again a contradiction the
|
|
138
|
+
history shows was kept unless its cited code changed. Do not start a new
|
|
139
|
+
batch after the time budget; finish or checkpoint the current one.
|
|
125
140
|
7. **Cover uncited changes.** In the source-update decision, go through
|
|
126
141
|
`uncited_changes` by directory, new directories first. Skip tests, lock
|
|
127
142
|
files, generated code and third-party directories, and read the diff only for
|
|
@@ -134,7 +149,9 @@ workspace targets or the delivery configuration.
|
|
|
134
149
|
`instruction`; when it needs a page, add it to `new_topics` and let the Indexer
|
|
135
150
|
Skills write it with the revisions. Write at most 5 new pages per run; put the
|
|
136
151
|
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.
|
|
152
|
+
and give each assessed group you do not write a one-line reason. When the
|
|
153
|
+
trigger or the workspace `AGENTS.md` asks for corrections only, add no
|
|
154
|
+
`new_topics`; state the left-out additions in `scope_summary` and the result.
|
|
138
155
|
8. **Write the current state.** Revise each affected article so it reads as the
|
|
139
156
|
current knowledge, one coherent article: work the change into the existing
|
|
140
157
|
text instead of appending patch notes, "updated", "new" or "no longer"
|
|
@@ -176,6 +193,8 @@ workspace targets or the delivery configuration.
|
|
|
176
193
|
| CLI missing or below the host minimum | Install or upgrade once as the entry Skill describes |
|
|
177
194
|
| Previous run left a task or PLAN | Resume it; never reset or plan again |
|
|
178
195
|
| Repository or document unreadable | Record a gap, continue with the rest |
|
|
196
|
+
| A command returns `next_action.mcp_tool: authorize_cli` | Call that Sourcegraph MCP tool with `client: "context"` once, run the returned `command` with its `code` and `host`, then rerun the command; on `TEMPORARY_TOKEN_LIMIT` run `context source sourcegraph-auth --refused TEMPORARY_TOKEN_LIMIT` and continue without remote reads |
|
|
197
|
+
| The update lists `skipped_sources` | Those repositories keep their processed versions; report each reason and step, and continue with the rest |
|
|
179
198
|
| Update stops because cited file contents are not downloaded (`source-content-missing`) | Make them available in the checkout in whatever way suits the environment, such as fetching, checking out the commit or cloning again, then rerun the update |
|
|
180
199
|
| Review finds fixable problems | Fix the drafts and review again under delegation |
|
|
181
200
|
| Remote moved during merge | Rebase; re-inspect against the remote commit and record the version again |
|
|
@@ -131,8 +131,10 @@ Recommend **30 source documents per stage**. Adjust the group to its subject,
|
|
|
131
131
|
length, complexity and dependencies, with an absolute maximum of **50**.
|
|
132
132
|
Explain groups above 30 in the PLAN; split even smaller groups when needed.
|
|
133
133
|
Investigate at most **one new repository per stage**; existing studied
|
|
134
|
-
repositories may support a document stage.
|
|
135
|
-
|
|
134
|
+
repositories may support a document stage. Refreshing repositories that are
|
|
135
|
+
already registered is not new investigation: batch it by requirement as the
|
|
136
|
+
knowledge-updates guide describes, with only a large repository on its own.
|
|
137
|
+
Limit a revision stage to **30 target articles**. These are planning boundaries, not additional CLI gates.
|
|
136
138
|
|
|
137
139
|
After each stage, record actual research, production, review, merge and delivery
|
|
138
140
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c4a",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.107",
|
|
4
4
|
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
|
|
5
5
|
"author": { "name": "c4a" },
|
|
6
6
|
"homepage": "https://github.com/context4ai/c4a",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"skills": "./skills/",
|
|
11
11
|
"interface": {
|
|
12
12
|
"displayName": "C4A Context",
|
|
13
|
-
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.
|
|
13
|
+
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.107",
|
|
14
14
|
"longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
|
|
15
15
|
"developerName": "c4a",
|
|
16
16
|
"category": "Productivity",
|
|
@@ -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.107.
|
|
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. |
|
|
@@ -512,6 +514,16 @@ follow its private-install recovery. Keep `CONTEXT_LARK_CLI_BIN` pointing to tha
|
|
|
512
514
|
private executable on subsequent Context commands that access Lark; do not
|
|
513
515
|
upgrade or replace the host's global `lark-cli`.
|
|
514
516
|
|
|
517
|
+
Repository sources are read from local checkouts unless `CONTEXT_SOURCE_MODE`
|
|
518
|
+
(or `--source-mode`) is `remote` or `auto`; pass the mode the user or host
|
|
519
|
+
configuration sets to every Context command. A source shown as `access: remote`
|
|
520
|
+
needs no clone for updates, revisions or verification: read its code through
|
|
521
|
+
the Sourcegraph MCP tools at the registered commit. When a command returns
|
|
522
|
+
`next_action.mcp_tool: authorize_cli`, call that tool with `client: "context"`
|
|
523
|
+
once and run the returned `command` with its `code` and `host`; never print the
|
|
524
|
+
token. New pages and code parsing still need a local checkout. The
|
|
525
|
+
knowledge-updates guide, "Update without cloning", has the details.
|
|
526
|
+
|
|
515
527
|
### Continue
|
|
516
528
|
|
|
517
529
|
Use `next_route.inline` as the complete Route when present. Read
|
|
@@ -73,7 +73,11 @@ workspace targets or the delivery configuration.
|
|
|
73
73
|
with [version alignment](version-alignment.md). Enter the workspace named by
|
|
74
74
|
the host configuration before the entry, cloning it when the current
|
|
75
75
|
directory does not have it; never initialize a new workspace for a routine
|
|
76
|
-
run, and report a missing or unconfigured workspace instead.
|
|
76
|
+
run, and report a missing or unconfigured workspace instead. Run every
|
|
77
|
+
Context command with the `CONTEXT_SOURCE_MODE` the host configuration sets
|
|
78
|
+
(`local` when unset). With `remote` or `auto`, a repository `context status`
|
|
79
|
+
reports as `access: remote` is read from Sourcegraph and needs no clone (the
|
|
80
|
+
knowledge-updates guide, "Update without cloning"). Clone any other missing
|
|
77
81
|
registered repository (shallow or partial for large ones), then update the
|
|
78
82
|
workspace branch from its remote. Never discard local work.
|
|
79
83
|
2. **Resume first.** If `context status` shows an unfinished task, finish it (use
|
|
@@ -96,32 +100,43 @@ workspace targets or the delivery configuration.
|
|
|
96
100
|
ones that hold no lasting knowledge (step 7), report "no knowledge changes
|
|
97
101
|
this run" and stop without publication. The only commit allowed then is a
|
|
98
102
|
workspace SDK upgrade from version alignment, delivered on its own.
|
|
99
|
-
5. **Size the work.**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
5. **Size the work.** Batch the changed sources as the knowledge-updates guide
|
|
104
|
+
describes in "Refresh several registered sources": size them read-only, give
|
|
105
|
+
a large repository or a monorepo its own batch, and group the rest by
|
|
106
|
+
requirement. Use `context-plan` only for a large repository that needs
|
|
107
|
+
several stages. One source update always covers all affected articles of its
|
|
108
|
+
sources; to keep a large one in groups of about 30, approve and deliver
|
|
109
|
+
checked pages early with the Route's `context run --deliver` while the rest
|
|
110
|
+
stay pending. Above 500 source documents, the `context-plan` human scope
|
|
111
|
+
gate applies: save progress and stop.
|
|
106
112
|
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
|
-
|
|
113
|
+
review and delivery before the next. Start each batch in this order (the
|
|
114
|
+
knowledge-updates guide, "Refresh several registered sources", step 4):
|
|
115
|
+
1. Fetch and check out each of the batch's repositories at its new commit in
|
|
116
|
+
a shallow or partial clone, keeping the processed commit available:
|
|
117
|
+
`--input` reads only what the checkout already has. Skip this for a
|
|
118
|
+
repository read from Sourcegraph; size its change with the Sourcegraph
|
|
119
|
+
diff instead.
|
|
120
|
+
2. Move only the batch's registrations: rerun `context source add repo` with
|
|
121
|
+
the registered namespace, `--module`, remote or local path and subpath,
|
|
122
|
+
changing only `--ref <sha>`.
|
|
123
|
+
3. Re-capture the batch's changed documents through their normal capture
|
|
124
|
+
Route; for a newer origin version, install it into a new version
|
|
125
|
+
directory and move the registration first, as in the knowledge-updates
|
|
126
|
+
guide's "Versioned external content and archived collections".
|
|
127
|
+
4. Start one `context update --input` naming the batch's repository and
|
|
128
|
+
document scopes, each with its `requirement_ref`; list a source shared by
|
|
129
|
+
several requirements once per requirement. Use `context update --pending
|
|
130
|
+
--format json` instead only when the batch is every pending repository
|
|
131
|
+
and has no documents; it also downloads what it needs.
|
|
132
|
+
|
|
133
|
+
Before writing, restore every source the candidate pages cite, not only this
|
|
134
|
+
batch's: a page that cites a missing source cannot be submitted. `context
|
|
135
|
+
source recovery-plan --format json` lists them with a fill-in restore input.
|
|
136
|
+
For pages kept as written, keep revisions of code contradictions locally,
|
|
137
|
+
list them in the run report, and do not raise again a contradiction the
|
|
138
|
+
history shows was kept unless its cited code changed. Do not start a new
|
|
139
|
+
batch after the time budget; finish or checkpoint the current one.
|
|
125
140
|
7. **Cover uncited changes.** In the source-update decision, go through
|
|
126
141
|
`uncited_changes` by directory, new directories first. Skip tests, lock
|
|
127
142
|
files, generated code and third-party directories, and read the diff only for
|
|
@@ -134,7 +149,9 @@ workspace targets or the delivery configuration.
|
|
|
134
149
|
`instruction`; when it needs a page, add it to `new_topics` and let the Indexer
|
|
135
150
|
Skills write it with the revisions. Write at most 5 new pages per run; put the
|
|
136
151
|
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.
|
|
152
|
+
and give each assessed group you do not write a one-line reason. When the
|
|
153
|
+
trigger or the workspace `AGENTS.md` asks for corrections only, add no
|
|
154
|
+
`new_topics`; state the left-out additions in `scope_summary` and the result.
|
|
138
155
|
8. **Write the current state.** Revise each affected article so it reads as the
|
|
139
156
|
current knowledge, one coherent article: work the change into the existing
|
|
140
157
|
text instead of appending patch notes, "updated", "new" or "no longer"
|
|
@@ -176,6 +193,8 @@ workspace targets or the delivery configuration.
|
|
|
176
193
|
| CLI missing or below the host minimum | Install or upgrade once as the entry Skill describes |
|
|
177
194
|
| Previous run left a task or PLAN | Resume it; never reset or plan again |
|
|
178
195
|
| Repository or document unreadable | Record a gap, continue with the rest |
|
|
196
|
+
| A command returns `next_action.mcp_tool: authorize_cli` | Call that Sourcegraph MCP tool with `client: "context"` once, run the returned `command` with its `code` and `host`, then rerun the command; on `TEMPORARY_TOKEN_LIMIT` run `context source sourcegraph-auth --refused TEMPORARY_TOKEN_LIMIT` and continue without remote reads |
|
|
197
|
+
| The update lists `skipped_sources` | Those repositories keep their processed versions; report each reason and step, and continue with the rest |
|
|
179
198
|
| Update stops because cited file contents are not downloaded (`source-content-missing`) | Make them available in the checkout in whatever way suits the environment, such as fetching, checking out the commit or cloning again, then rerun the update |
|
|
180
199
|
| Review finds fixable problems | Fix the drafts and review again under delegation |
|
|
181
200
|
| Remote moved during merge | Rebase; re-inspect against the remote commit and record the version again |
|
|
@@ -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
|
|
@@ -90,8 +90,10 @@ as knowledge. Explicit audience-oriented rewriting remains ordinary production.
|
|
|
90
90
|
For an authorized knowledge-production request involving more than 30 original
|
|
91
91
|
documents or at least two repositories needing substantive investigation, use
|
|
92
92
|
the installed `context-plan` Skill before registering the full request. Also use
|
|
93
|
-
it for
|
|
94
|
-
|
|
93
|
+
it for broad document-change scans. A refresh of already registered sources
|
|
94
|
+
is not new investigation: batch it as the knowledge-updates guide describes in
|
|
95
|
+
"Refresh several registered sources", and plan only a large repository or a
|
|
96
|
+
monorepo that needs its own stages. Count the requested change, not all historical workspace sources; repositories used
|
|
95
97
|
only as existing reference material do not count as new investigation. A large
|
|
96
98
|
single repository or long document may warrant planning by module or chapter.
|
|
97
99
|
For a new knowledge project with unclear boundaries or several deliveries,
|
|
@@ -137,7 +139,7 @@ without the user's authorization.
|
|
|
137
139
|
|
|
138
140
|
### Check the CLI first
|
|
139
141
|
|
|
140
|
-
This Skill ships with Context 0.7.
|
|
142
|
+
This Skill ships with Context 0.7.107.
|
|
141
143
|
|
|
142
144
|
When entering production in a workspace, align the CLI, this Skill and the
|
|
143
145
|
workspace SDK once per session with [version alignment](../resources/context/version-alignment.md):
|
|
@@ -252,8 +254,8 @@ Within an active Context workflow, requests include, but are not limited to:
|
|
|
252
254
|
| 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. |
|
|
253
255
|
| Preserve conversation insights | Save or use a summary of supplied discussion, not an entire session history. Code-change links are optional. |
|
|
254
256
|
| Plan a large knowledge project or source refresh | Use `context-plan` for investigation, an approved PLAN and one bounded production stage at a time. |
|
|
255
|
-
| Update knowledge from source changes | Assess a selected commit, MR/PR or document change against a fixed source version;
|
|
256
|
-
| 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. |
|
|
257
|
+
| 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. |
|
|
258
|
+
| 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. |
|
|
257
259
|
| Run a routine update | Refresh all registered sources (or the named subset) on a schedule without repeating task instructions: read [routine update](../resources/context/routine-update.md). |
|
|
258
260
|
| Revise existing content | Correct current drafts or approved pages, including several pages or supported API-table regeneration. |
|
|
259
261
|
| Organize pages and sources | Move pages within a collection, rename supported sources or remove unused sources with reference checks. |
|
|
@@ -509,6 +511,16 @@ follow its private-install recovery. Keep `CONTEXT_LARK_CLI_BIN` pointing to tha
|
|
|
509
511
|
private executable on subsequent Context commands that access Lark; do not
|
|
510
512
|
upgrade or replace the host's global `lark-cli`.
|
|
511
513
|
|
|
514
|
+
Repository sources are read from local checkouts unless `CONTEXT_SOURCE_MODE`
|
|
515
|
+
(or `--source-mode`) is `remote` or `auto`; pass the mode the user or host
|
|
516
|
+
configuration sets to every Context command. A source shown as `access: remote`
|
|
517
|
+
needs no clone for updates, revisions or verification: read its code through
|
|
518
|
+
the Sourcegraph MCP tools at the registered commit. When a command returns
|
|
519
|
+
`next_action.mcp_tool: authorize_cli`, call that tool with `client: "context"`
|
|
520
|
+
once and run the returned `command` with its `code` and `host`; never print the
|
|
521
|
+
token. New pages and code parsing still need a local checkout. The
|
|
522
|
+
knowledge-updates guide, "Update without cloning", has the details.
|
|
523
|
+
|
|
512
524
|
### Continue
|
|
513
525
|
|
|
514
526
|
Use `next_route.inline` as the complete Route when present. Read
|