@c4a/context-cli 0.7.14-beta.1 → 0.7.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/cli.js +1082 -1242
  2. package/indexers/contracts/profile-contract.json +245 -245
  3. package/indexers/release-manifest.json +1 -1
  4. package/package.json +12 -12
  5. package/parserEntryWorker.js +8 -0
  6. package/plugins/VERSION +1 -1
  7. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  8. package/plugins/claude/commands/context.md +11 -0
  9. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  10. package/plugins/codex/skills/context/SKILL.md +11 -0
  11. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  12. package/plugins/cursor/commands/c4a-context.md +11 -0
  13. package/plugins/skills/context/SKILL.md +11 -0
  14. package/providers/context/manifest.json +23 -23
  15. package/providers/context/provider.yaml +1 -1
  16. package/providers/context/resources/dialogue/knowledge-review.md +14 -6
  17. package/providers/context/resources/manuals/guides/knowledge-updates.md +50 -2
  18. package/providers/context/resources/manuals/guides/lark-resources.md +38 -0
  19. package/providers/context/resources/procedures/document-capture.md +7 -0
  20. package/providers/context/resources/procedures/knowledge-review.md +26 -5
  21. package/providers/context/resources/procedures/knowledge-updates.md +50 -2
  22. package/providers/context/resources/procedures/production-requirements.md +23 -0
  23. package/providers/context/resources/procedures/runtime-event-delivery.md +7 -1
  24. package/providers/context/resources/procedures/work-start-report.md +83 -0
  25. package/providers/context/resources/templates/work-start-report.md +7 -1
  26. package/providers/context/skills/work-production-stage/SKILL.md +3 -1
@@ -200,6 +200,48 @@ coverage by mechanically placing every new page under an unrelated catch-all.
200
200
  Build reports missing bindings for the Agent to resolve; it does not classify
201
201
  content. Moving a menu entry does not change the article URL.
202
202
 
203
+ ### Preserve established navigation intent
204
+
205
+ Before placing new knowledge, read the workspace's AGENTS.md, current
206
+ `src/knowledge-map.yaml`, existing overview pages and relevant category/article
207
+ bodies. Reuse any settled directory intent in the current plan. Establish what
208
+ each affected category helps readers do and why adjacent categories are separate;
209
+ do not infer this from labels alone. Read only affected branches and enough
210
+ neighboring content to distinguish them, not the entire library on every update.
211
+ If intent remains ambiguous, state the proposed interpretation in the plan.
212
+
213
+ Prefer, in order: revise an existing article; add a page to a matching category;
214
+ add a coherent child category; propose a top-level change only when existing
215
+ categories cannot serve a distinct, lasting reader need. Do not create a top-level
216
+ category merely because a source, repository, product, team or batch is new.
217
+ For example, a new assistant's usage guide, frontend integration and runtime
218
+ architecture can belong in existing usage, frontend and backend categories, with
219
+ cross-links for the shared product. Keep them together only when the site's
220
+ established organizing principle supports that choice.
221
+
222
+ In the work-start report or current plan, briefly state the affected articles'
223
+ intended placements and reused category intent. For proposed top-level additions,
224
+ renames, removals or changes of purpose, show the before/after tree, why reuse is
225
+ insufficient, affected existing pages and reading order. Present that change for
226
+ human review before applying it. This uses the existing report feedback where
227
+ available; do not add a new CLI state, schema field or routine per-article gate.
228
+ Explicit user approval of that concrete structure is sufficient; do not ask again.
229
+ General permission to write knowledge or organize batches is not approval to
230
+ change the site's top-level organization. If the need emerges after report
231
+ approval, update the same plan and ask about that structural change only; continue
232
+ independent work within the approved organization.
233
+
234
+ Before delivery, compare the resulting map with the approved plan: article
235
+ placement matches its main reader task, titles match the bodies, sibling ordering
236
+ is deliberate, and directories are neither empty nor accidental duplicates.
237
+ Honor the workspace's chosen directory depth and homogeneous sibling convention;
238
+ where it requires directory-only or article-only siblings, do not mix them.
239
+ Use an "Other" group last only for genuinely useful residual content, not to
240
+ avoid classification. Apply supported map adjustments through the current CLI
241
+ flow, retaining article identities and URLs. Record lasting category intent
242
+ briefly in the workspace AGENTS.md or existing organization guide; do not create
243
+ a separate taxonomy ledger or put planning instructions in reader articles.
244
+
203
245
  ### Reader tasks, names and reading order
204
246
 
205
247
  Read the affected articles' bodies before changing their categories or titles.
@@ -257,8 +299,8 @@ change does not require a prose rewrite or file migration; changing its label do
257
299
  not silently rename the approved article. Needed title or content revisions use
258
300
  the existing revision and Review flow. Splits and merges use ordinary article
259
301
  tasks, link repair and any explicit retirement after replacement content is
260
- delivered. These are Agent editorial decisions, not new CLI checks or approval
261
- gates.
302
+ delivered. These are Agent editorial decisions, not new CLI checks or routine per-article
303
+ approval gates. Top-level changes follow the focused review described above.
262
304
 
263
305
  ## Edit one section or review part of a batch
264
306
 
@@ -283,6 +325,12 @@ input without that flag to continue. A preview is not approval and does not make
283
325
  a stale revision valid.
284
326
 
285
327
  Review can approve checked pages while leaving repair pages pending. The HTML
328
+ report shows the current site navigation, candidate changes and expected file
329
+ paths. Unchanged approved pages retain their titles with omitted bodies. Enter
330
+ revision instructions directly in the report; the copied code and following
331
+ instruction lines must be returned together without edits. The CLI binds them to
332
+ the reviewed content and baseline and returns repair commands while leaving
333
+ those pages pending. Changed candidates require a fresh review. The HTML
286
334
  review code includes pending positions; managed Review provides the same current
287
335
  scope as a JSON template. Send decisions only for pages actually reviewed. Omit
288
336
  means a durable exclusion, not repair. Partial approval alone does not build.
@@ -59,3 +59,26 @@ contains `path`, `question`, `sources` and `batch`, with optional `brief` and
59
59
  command to prepare those tasks without a separate investigation-plan submission.
60
60
  This does not approve the report or permit writing before user feedback.
61
61
  When targets are unclear, use normal preparation and investigate the skeletons.
62
+
63
+ ## Configured coverage and the current request
64
+
65
+ `src/indexers.yaml` describes the workspace's standing coverage configuration.
66
+ Source registration or presence in that configuration does not, by itself, mean
67
+ that the source needs investigation again for this request. For a bounded document
68
+ addition or revision, identify its reader task and actual evidence dependencies;
69
+ reuse existing approved articles and applicable completed work. Do not broaden a
70
+ document task to unrelated code repositories merely because they are configured.
71
+
72
+ In planning and completion reports distinguish:
73
+ - work requested and completed in this task;
74
+ - specific content gaps established by reading, with their affected reader tasks;
75
+ - source/environment failures, and whether this task depends on those sources.
76
+
77
+ A `pending_scopes` count is workflow state, not a count of missing topics,
78
+ repositories to rewrite, or articles to produce. A Git spawn/baseline-read error
79
+ means source availability could not be checked; it does not prove that existing
80
+ knowledge is absent or obsolete. If unrelated configured sources remain blocked,
81
+ say so as a workflow limitation rather than announcing new investigation work.
82
+ Do not delete configured sources, invent exclusions, clear stage files, or mark
83
+ unread material investigated to make the current task appear complete. Follow the
84
+ returned resolution action when the workflow still needs a decision.
@@ -22,12 +22,18 @@ remove the Agent host's network approval boundary. Satisfy that boundary by
22
22
  requesting host network escalation in the tool invocation that executes the
23
23
  flush, not by turning it into another conversational approval gate.
24
24
 
25
- Before requesting network access, run:
25
+ When first requesting host network access, or diagnosing an unknown destination, run:
26
26
 
27
27
  ```bash
28
28
  context logs plan --format json
29
29
  ```
30
30
 
31
+ When delivery is already authorized and the fixed destination and data policy are
32
+ unchanged, execute `context logs flush --format json` directly. A prior plan
33
+ receipt is not a CLI prerequisite. Do not repeatedly plan or ask for consent on
34
+ retries. `invalid_batch` from the command bridge is local protocol rejection before
35
+ HTTP; repair/update the compatible sink client rather than retrying network access.
36
+
31
37
  The plan is the audit contract. It reports the canonical workspace outbox,
32
38
  normally `.tmp/context-runtime/logs/outbox.jsonl`, the event count and kinds,
33
39
  the allowlisted property names, the sink command, and the resolved HTTP
@@ -78,6 +78,53 @@ Estimate timing or savings only when supported by measurements and conditions.
78
78
  For a small addition to an existing site, describe only the affected reading
79
79
  position; reuse its layout and delivery choices instead of proposing them again.
80
80
 
81
+ ## Confirm image handling for large tasks
82
+
83
+ Before bulk image interpretation or article writing, count distinct image resources
84
+ across the current authorized task (all its sources, not each document or batch).
85
+ Use source descriptors and capture reports; do not download images just to count
86
+ or recount unchanged snapshots. If the count exceeds 30 and the user has not
87
+ already selected a policy for this task, include one image-handling question in
88
+ this planning confirmation, in the user's language:
89
+
90
+ - **Process all (default): intelligent conversion and inclusion.** Read images as
91
+ needed; retain useful images or convert suitable content into text, tables or
92
+ diagrams. Conversion is an Agent writing decision supported by actual reading.
93
+ - **Include all:** retain the image presentation; automatic compression and safe
94
+ processing still apply. An image that cannot be processed within limits becomes
95
+ a visible placeholder, not an unlimited original-byte delivery promise.
96
+ - **Include none (placeholders):** skip image bytes and interpretation; preserve
97
+ placeholders and source document links. Do not claim image-content coverage.
98
+
99
+ Default means the recommended option, not consent after silence. Wait for this
100
+ choice together with the existing plan confirmation; never add per-image or
101
+ per-batch approval. Reuse an explicit choice and any GIF exclusions throughout
102
+ retries. Persist the choice in the existing plan/requirements. If discovery only
103
+ reveals the threshold after initial capture, ask before further image work and
104
+ writing; do not restart completed capture solely to show this question.
105
+
106
+ Report the known count and unknown resources separately. If the scale was unknown
107
+ and later crosses 30, ask once at that point. At content Review summarize retained,
108
+ converted and placeholder outcomes with reasons, including automatic fallbacks;
109
+ do not ask the same policy question again. A later material policy change belongs
110
+ in the existing plan and normal Review, not a separate approval protocol.
111
+
112
+ Use `captureLark.resources.images: reference-only` for excluded images and
113
+ `resources.gifs: reference-only` for an explicit GIF exclusion. Both inclusion
114
+ choices use normal capture and package optimization; the Agent controls semantic
115
+ conversion. See the Lark resource guide for configuration and limitations.
116
+
117
+ ## Review navigation changes in context
118
+
119
+ Read the knowledge-updates guidance on preserving established navigation intent.
120
+ For an existing site, explain the category intent being reused and the affected
121
+ article placements. A new source or product is not a reason for a new top-level
122
+ menu. If a top-level addition, rename, removal or purpose change is warranted,
123
+ include its before/after tree, reuse alternatives and impact in this report.
124
+ Obtain explicit feedback before applying that structural change, reusing a
125
+ concrete structure already approved by the user. If it emerges later, update this
126
+ same plan and review only the changed decision; do not restart approved batches.
127
+
81
128
  ## Mandatory feedback
82
129
 
83
130
  Write the scratch report using the host file tool, show its clickable path,
@@ -108,3 +155,39 @@ Reports, plans, skills, candidates, confirmation and transaction process stay in
108
155
  `.tmp`. Only formal results and necessary long-term source/requirement decisions
109
156
  belong in non-temporary storage. On a new machine, start new production from those
110
157
  formal inputs, without requiring the previous report or production session.
158
+
159
+ ## Inputs for the content Review report
160
+
161
+ Keep approved article titles, paths, reading order and intended placements in the
162
+ normal article plan and knowledge map. Complete their existing structure workflow
163
+ before presenting content Review. The CLI collects those inputs and the actual
164
+ candidate bodies to render the report; do not ask an Agent to fabricate a site
165
+ snapshot, infer approved content from titles, or maintain a second report model.
166
+ For a new workspace, plan the initial categories through the same workflow; the
167
+ report will label its candidate pages New. If it shows unplaced articles, finish
168
+ those placements rather than presenting the fallback as an approved new category.
169
+ Content Review displays changes; it does not replace specific authorization for
170
+ a top-level navigation change already required by this procedure.
171
+
172
+ ## Configured coverage and the current request
173
+
174
+ `src/indexers.yaml` describes the workspace's standing coverage configuration.
175
+ Source registration or presence in that configuration does not, by itself, mean
176
+ that the source needs investigation again for this request. For a bounded document
177
+ addition or revision, identify its reader task and actual evidence dependencies;
178
+ reuse existing approved articles and applicable completed work. Do not broaden a
179
+ document task to unrelated code repositories merely because they are configured.
180
+
181
+ In planning and completion reports distinguish:
182
+ - work requested and completed in this task;
183
+ - specific content gaps established by reading, with their affected reader tasks;
184
+ - source/environment failures, and whether this task depends on those sources.
185
+
186
+ A `pending_scopes` count is workflow state, not a count of missing topics,
187
+ repositories to rewrite, or articles to produce. A Git spawn/baseline-read error
188
+ means source availability could not be checked; it does not prove that existing
189
+ knowledge is absent or obsolete. If unrelated configured sources remain blocked,
190
+ say so as a workflow limitation rather than announcing new investigation work.
191
+ Do not delete configured sources, invent exclusions, clear stage files, or mark
192
+ unread material investigated to make the current task appear complete. Follow the
193
+ returned resolution action when the workflow still needs a decision.
@@ -44,7 +44,13 @@ modules, public capabilities, product operations or another evidenced structure.
44
44
  Distinguish navigation groups from sourced articles; reuse articles rather than
45
45
  duplicating bodies. Retain existing KB, website and LLMS delivery choices.
46
46
 
47
- For website delivery, add a compact sketch showing the site title, top-level
47
+ For an existing site, summarize the existing categories' intent and affected
48
+ article placements. For a proposed top-level change, show the before/after tree,
49
+ why existing categories cannot accommodate it and the affected pages/order.
50
+ Mark it as a decision for review; omit this comparison when top-level structure
51
+ is unchanged. Reuse explicit prior approval of the concrete structure.
52
+
53
+ For a new website or an approved navigation redesign, add a compact sketch showing the site title, top-level
48
54
  groups, a representative left menu, article chapters and on-page outline.
49
55
  For a new homepage or requested redesign, also propose a short title, slogan,
50
56
  description and the verified optional resource cards. Briefly explain mobile
@@ -9,7 +9,9 @@ in the user's conversation language.
9
9
  When planning or revising article placement, titles or reading order, read
10
10
  [reader organization guidance](../../resources/procedures/knowledge-updates.md#reader-tasks-names-and-reading-order).
11
11
  Apply it to the affected topics within the user's scope; it adds no production
12
- stage or permission gate.
12
+ stage. Reuse existing category intent; propose top-level changes in the current
13
+ report/plan for explicit review before applying them, unless the concrete
14
+ structure is already approved. Ordinary placements need no additional gate.
13
15
 
14
16
  For investigation, use the supplied directory and its submission schema. Start
15
17
  with code skeletons and document outlines; selectively read original material