@c4a/context-cli 0.5.35-beta.1 → 0.5.36-beta.1
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/README.md +7 -7
- package/cli.js +45817 -37848
- package/package.json +1 -1
- package/plugin/README.md +2 -2
- package/plugin/README_CN.md +2 -2
- package/plugin/commands/align.md +52 -99
- package/plugin/commands/capture.md +28 -16
- package/plugin/commands/compile.md +76 -154
- package/plugin/commands/context.md +1 -1
- package/plugin/commands/drop.md +14 -1
- package/plugin/commands/extract.md +1 -1
- package/plugin/commands/init.md +5 -2
- package/plugin/commands/purge.md +1 -1
- package/plugin/commands/query.md +1 -1
- package/plugin/commands/status.md +1 -1
- package/plugin/skills/skill-align-workflow/SKILL.md +46 -62
- package/plugin/skills/skill-align-workflow/references/candidate-resolution.md +1 -1
- package/plugin/skills/skill-align-workflow/references/density-profile.md +2 -0
- package/plugin/skills/skill-compile-close/SKILL.md +12 -16
- package/plugin/skills/skill-compile-draft/SKILL.md +25 -78
- package/plugin/skills/skill-compile-draft/references/structural-challenges.md +1 -1
- package/plugin/skills/skill-compile-judge/SKILL.md +13 -11
- package/plugin/skills/skill-context-query/SKILL.md +4 -4
- package/plugin/skills/skill-semantic-reconcile/SKILL.md +3 -3
- package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +1 -1
- package/scripts/build-plugin.ts +10 -8
- package/templates/aspects/code/prompt.md +5 -2
package/package.json
CHANGED
package/plugin/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Then install the plugin matching the agent you use:
|
|
|
52
52
|
|
|
53
53
|
| Agent | Install |
|
|
54
54
|
|---|---|
|
|
55
|
-
| Claude Code | `/plugin marketplace add context4ai/context`, then `/plugin install context@
|
|
55
|
+
| Claude Code | `/plugin marketplace add context4ai/context`, then `/plugin install context@c4a` |
|
|
56
56
|
| Cursor | Dashboard → Settings → Plugins → Import → `https://github.com/context4ai/context` |
|
|
57
57
|
| Codex CLI | `codex marketplace add context4ai/context` |
|
|
58
58
|
| Vercel-style skills (Windsurf / OpenCode / Cline / Copilot, etc.) | `npx skills add github:context4ai/context <skill-name>` |
|
|
@@ -67,7 +67,7 @@ From your project directory:
|
|
|
67
67
|
|
|
68
68
|
1. **Init** — `/context:init` creates the `.context/` workspace;
|
|
69
69
|
2. **Capture** — `/context:capture <url-or-path>` pulls in Feishu docs, local Markdown, code snapshots, and so on;
|
|
70
|
-
3. **Code projection** — for code snapshots, `/context:compile
|
|
70
|
+
3. **Code projection** — for code snapshots, `/context:compile code <source-slug>` materializes package/category/symbol Nodes such as `pkg`, `pkg/components`, and `pkg/symbol/button`;
|
|
71
71
|
4. **Align** — `/context:align` places prose material onto the Node structure, including docs or examples that should attach to existing code symbol Nodes;
|
|
72
72
|
5. **Compile** — `/context:compile` lets the AI turn prose material into structured Sections;
|
|
73
73
|
6. **Query** — `/context:query <question>` answers from local knowledge, citing Node and Section; code workspaces can filter mixed evidence with `--evidence code|prose|all`;
|
package/plugin/README_CN.md
CHANGED
|
@@ -52,7 +52,7 @@ bun add -g @c4a/context-cli
|
|
|
52
52
|
|
|
53
53
|
| Agent | 安装方式 |
|
|
54
54
|
|---|---|
|
|
55
|
-
| Claude Code | `/plugin marketplace add context4ai/context`,再执行 `/plugin install context@
|
|
55
|
+
| Claude Code | `/plugin marketplace add context4ai/context`,再执行 `/plugin install context@c4a` |
|
|
56
56
|
| Cursor | Dashboard → Settings → Plugins → Import → `https://github.com/context4ai/context` |
|
|
57
57
|
| Codex CLI | `codex marketplace add context4ai/context` |
|
|
58
58
|
| Vercel-style skills(Windsurf / OpenCode / Cline / Copilot 等) | `npx skills add github:context4ai/context <skill-name>` |
|
|
@@ -67,7 +67,7 @@ bun add -g @c4a/context-cli
|
|
|
67
67
|
|
|
68
68
|
1. **初始化** — `/context:init` 创建 `.context/` 工作目录;
|
|
69
69
|
2. **采集** — `/context:capture <url-or-path>` 拉取飞书文档、本地 Markdown、代码快照等原始资料;
|
|
70
|
-
3. **代码投影** — 对代码快照执行 `/context:compile
|
|
70
|
+
3. **代码投影** — 对代码快照执行 `/context:compile code <source-slug>`,生成 `pkg`、`pkg/components`、`pkg/symbol/button` 这类 package/category/symbol Node;
|
|
71
71
|
4. **对齐** — `/context:align` 将文档原料归位至 Node 结构,包括挂靠到已有 code symbol Node 的手册、示例和经验;
|
|
72
72
|
5. **编译** — `/context:compile` 由 AI 将文档原料加工为结构化 Section;
|
|
73
73
|
6. **检索** — `/context:query <问题>` 在本地知识中查询答案,返回 Node 与 Section 级引用;代码工作区可用 `--evidence code|prose|all` 区分代码证据和文档证据;
|
package/plugin/commands/align.md
CHANGED
|
@@ -6,102 +6,55 @@ allowed-tools: Bash(context:*)
|
|
|
6
6
|
|
|
7
7
|
## Your Task
|
|
8
8
|
|
|
9
|
-
Run the
|
|
10
|
-
|
|
11
|
-
If `$ARGUMENTS`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
After a successful finalize, use a targeted ownership patch for small role corrections only; do not resubmit the whole structure just to move a few blocks between `context_only`, `ignored`, `owned`, or `shared`:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"schema_version": "align.ownership-patch.v1",
|
|
67
|
-
"base_digest": "sha256:<finalized-ownership-digest>",
|
|
68
|
-
"block_ownership": [
|
|
69
|
-
{
|
|
70
|
-
"block_id": "<block-id>",
|
|
71
|
-
"ownership_role": "owned",
|
|
72
|
-
"owners": ["<node-slug>"],
|
|
73
|
-
"visible_to": ["<node-slug>"],
|
|
74
|
-
"reason": "Why this block is citation evidence for the node."
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Submit it with `context align --ownership-patch - --format json`. Keep `base_digest` in the patch body when you want stale ownership rejection. Use `context schema align-ownership-patch` for the exact shape.
|
|
81
|
-
|
|
82
|
-
If `align-segments.incremental.mode` is `incremental`, the finalize step is a delta merge: submit only the Nodes and block ownership supported by the current scanned sources, and reference previous finalized Nodes when they are parents, dependencies, domain children, owners, or visibility targets. Absence of an old Node or edge is not a delete signal. Do not redeclare an old parent/domain just to attach a new child. `sections[].owner` must be a Node declared in the current payload; previous finalized Nodes can be referenced structurally but do not receive new section plans from this incremental payload. Existing or previously removed Node slugs cannot change `node_type`; `context align --scan --full` does not bypass that guard. Use a new slug for a different type, or retire the old slug through `context drop` or explicit structure correction before re-aligning.
|
|
83
|
-
|
|
84
|
-
For code-projection Nodes, distinguish "reuse the existing knowledge file" from "previous finalized prose ownership". A freshly projected code Node may exist in `knowledge/` but not yet appear in finalized ownership. To attach current prose evidence to it, declare that same slug in the current finalize payload and plan only prose-owned Sections for the current evidence; the compile step will merge the prose source and Sections into the existing code Node while preserving code metadata and code-owned Sections.
|
|
85
|
-
|
|
86
|
-
`nodes[].planned_sections` is the distinct set of Section kinds planned for that Node. List each kind at most once; do not copy `sections[].section_kind` one-for-one when a Node has multiple Sections of the same kind.
|
|
87
|
-
|
|
88
|
-
For large finalize decisions, use `block_ownership_defaults[]` instead of enumerating every block. Each default names a `source_id` plus the same ownership fields as a block-level entry except `block_id`; the CLI expands it across that source's coverable blocks. Put only exceptions in `block_ownership[]`, which override defaults for their `block_id`. Keep the payload on stdin; do not generate temp JSON files just to list hundreds of ownership rows.
|
|
89
|
-
|
|
90
|
-
If a source is only navigation or placeholder context, keep the Node only when the graph/slug is still useful: set `planned_sections: []`, mark the navigation evidence `context_only` or `ignored` as appropriate, and do not promote relation lines to `owned` just to satisfy citations. Compile close will materialize an empty placeholder Node with no active Sections.
|
|
91
|
-
|
|
92
|
-
Do not submit legacy candidate tables, old patch payloads, or full-tree proposal files. Do not write `knowledge/`; align finalize writes finalized workflow artifacts and source ownership only.
|
|
93
|
-
|
|
94
|
-
## Constraints
|
|
95
|
-
|
|
96
|
-
- Node types are `domain`, `entity`, and `action`.
|
|
97
|
-
- Entity tag `term` is mutually exclusive with concrete A/B tags. If both identities matter, create one concrete Entity and one separate term Entity, then connect them later with Section-local `refers_to_nodes[]`.
|
|
98
|
-
- Document structure uses `nodes[].contains_parent` and `edges[].edge_type = "depends_on"` only.
|
|
99
|
-
- Section-local references stay in `refers_to_nodes[]`; do not project them into Node edges.
|
|
100
|
-
- Semantic boundary failures should become downgrade warnings or unresolved items. Do not retry the same semantic judgment in a loop.
|
|
101
|
-
- Hard reference failures must be repaired at the exact op/path with a valid id/ref from the current payload. Use CLI `agent_hints[]` as the repair contract when present.
|
|
102
|
-
- Do not read or modify source snapshots, caches, or rendered workflow artifacts with generic tools. Use `context workflow show`, schema commands, payload name, scope id, digest, and candidate ids as the workflow contract.
|
|
103
|
-
- Do not pipe `context ... --format json` through `jq`, `head`, `tail`, `sed`, `cat`, `2>&1`, Python, Node.js, or shell scripts. Do not read host persisted output files such as Claude `tool-results/**`. Consume complete CLI stdout directly. Use semantic views plus `--source` / `--heading` / `--window` / `--token-budget` and returned `how_to_explore[]` when the payload is too large.
|
|
104
|
-
|
|
105
|
-
## Final Report
|
|
106
|
-
|
|
107
|
-
Report in the user's language. Include final Node counts by type, unresolved ownership count, workflow payload identifiers, and the next step (`/context:compile` or another `/context:align` pass for unresolved structure).
|
|
9
|
+
Run the CLI-guided align workflow. `/context:align` is the user entrypoint; the CLI owns route, stage, validation, workflow payload storage, and the canonical next write. The agent owns semantic Node/Section grouping and any user-facing questions.
|
|
10
|
+
|
|
11
|
+
If `$ARGUMENTS` starts with `code`, run `context align code [slug]`, report the dry-run projection plan, and stop. This route is CLI-owned and does not enter the prose align workflow.
|
|
12
|
+
|
|
13
|
+
### Step 1 — Scan
|
|
14
|
+
|
|
15
|
+
Run `context align scan --format json`.
|
|
16
|
+
|
|
17
|
+
Use the returned `workflow.next-action-envelope.v2` as the source of truth:
|
|
18
|
+
|
|
19
|
+
- Follow top-level `next_action.kind` and `next_action.command` for every write.
|
|
20
|
+
- Use `views[].command` for evidence reads, prioritizing entries with `expected: true`.
|
|
21
|
+
- Treat `allowed_actions[]` as permission for read-only insertions such as `show_view`; do not choose a different write path from it.
|
|
22
|
+
- Treat `agent_hints[]`, when present, as a temporary mirror or diagnostic only. If it conflicts with `next_action`, follow `next_action`.
|
|
23
|
+
|
|
24
|
+
For protocol discovery, prefer narrow commands:
|
|
25
|
+
|
|
26
|
+
- `context schema workflow.next-action-envelope.v2 --view minimal --format json`
|
|
27
|
+
- `context protocol show align-compile --format json`
|
|
28
|
+
- `context schema align-structure-decision --view minimal --format json`
|
|
29
|
+
|
|
30
|
+
### Step 2 — Read Evidence Through Views
|
|
31
|
+
|
|
32
|
+
Run the expected view commands from the envelope. For additional reads, use only budget-safe workflow views such as:
|
|
33
|
+
|
|
34
|
+
- `context workflow show --payload align-segments --view blocks --page-size 10 --token-budget 8000 --unwrap --format json`
|
|
35
|
+
- `context workflow show --payload align-segments --view windows --page-size 10 --compact-hints --unwrap --format json`
|
|
36
|
+
- `context workflow show --payload align-segments --view source-mapping --unwrap --format json`
|
|
37
|
+
|
|
38
|
+
When a view returns `page.next_command`, follow that command to continue the same semantic view. Use `--source`, `--heading`, `--window`, or `--token-budget` only as view filters; do not inspect workflow files, cache files, host tool-results, or stdout fragments with generic tools.
|
|
39
|
+
|
|
40
|
+
### Step 3 — Produce The Semantic Payload
|
|
41
|
+
|
|
42
|
+
Reuse existing knowledge before inventing new Nodes: use `context mdrive glossary match <name>` and `context mdrive node list --format json` for term/entity reuse.
|
|
43
|
+
|
|
44
|
+
Apply packaged `context:skill-align-workflow` Node classification gates and structure-decision procedure. Keep generated payloads on stdin. Do not create scratch files under the workspace or `/tmp`.
|
|
45
|
+
|
|
46
|
+
Use CLI diagnostics instead of static prompt rules:
|
|
47
|
+
|
|
48
|
+
- `diagnostics.automatic_ownership_adjustments[]` explains mechanical external-reference demotions and the explicit ownership override shape.
|
|
49
|
+
- Validation diagnostics identify contiguity, citation eligibility, ownership, and mount-matrix problems.
|
|
50
|
+
- `views[]` and `diagnostics` distinguish citable evidence from supporting context; do not infer citation eligibility from raw ownership prose.
|
|
51
|
+
|
|
52
|
+
### Step 4 — Validate And Submit
|
|
53
|
+
|
|
54
|
+
When the envelope asks for `validate_align_decision`, submit the structure-decision payload to `context align validate --input - --format json` or the exact returned command. If validate returns blocking diagnostics, repair the payload and rerun validate. If validate returns a `submit_structure_decision` next_action, execute that command with the validated payload.
|
|
55
|
+
|
|
56
|
+
For any other write kind, execute the top-level `next_action.command` exactly. If the command rejects the payload, follow the returned `next_action` and `reason_code`; do not infer a route fallback from memory.
|
|
57
|
+
|
|
58
|
+
### Final Report
|
|
59
|
+
|
|
60
|
+
Report in the user's conversation language. Summarize finalized Node counts and meaningful warnings. Do not surface workflow payload digests, scope ids, block hashes, snapshot digests, or absolute paths.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Capture URLs, local Markdown, source code, stdin path lists, inbox/refresh sources, or conversation notes as Context sources."
|
|
3
|
-
argument-hint: "[url | ./path.md [./more.md...] | --code [
|
|
3
|
+
argument-hint: "[url | ./path.md [./more.md...] | --code [paths...] | --stdin | --inbox | --refresh | note]"
|
|
4
4
|
allowed-tools: Bash(context:*, bun:*, brew:*, curl:*, sh:*, scoop:*, choco:*, lark-cli:*), WebFetch
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ missing-dependency install flow) lives inline here per the slash-command
|
|
|
10
10
|
length exemption for self-contained slash commands.
|
|
11
11
|
-->
|
|
12
12
|
|
|
13
|
-
## Your
|
|
13
|
+
## Your Task
|
|
14
14
|
|
|
15
15
|
Capture is entirely CLI-driven — your role is to route the right `context capture` invocation and relay its output. Never hand-write captured source snapshots: the CLI owns normalisation (NFC, BOM strip, line endings) and the `content_hash` contract, so any manual edit breaks idempotency.
|
|
16
16
|
|
|
@@ -24,18 +24,14 @@ Invocation note: code capture does not run through `npx`. `context capture --cod
|
|
|
24
24
|
|
|
25
25
|
### Route by argument
|
|
26
26
|
|
|
27
|
-
- `$ARGUMENTS`
|
|
28
|
-
-
|
|
29
|
-
- User provides a long newline-separated path list → pass it to `context capture --stdin` with a direct heredoc.
|
|
27
|
+
- `$ARGUMENTS` is one or more `http://` / `https://` targets and/or local `.md` paths → `context capture $ARGUMENTS` (Feishu docx/wiki URLs need `lark-cli`; URL and mixed batches are supported). Do not write an Agent-side URL loop.
|
|
28
|
+
- User provides a long newline-separated URL list or local `.md` path list → pass it to `context capture --stdin` with a direct heredoc. Mixed URL + local `.md` batches are supported when the user intentionally provides both.
|
|
30
29
|
- `$ARGUMENTS` contains `--inbox` → `context capture --inbox`.
|
|
31
30
|
- `$ARGUMENTS` contains `--refresh` → `context capture --refresh`. This refreshes active Feishu URL sources and local Markdown sources whose stored origin file still exists; code sources use `context capture --code`.
|
|
32
31
|
- User asks for code capture with explicit `--module` flags → run `context capture --code $ARGUMENTS`, preserving code flags such as `--module`, `--version`, `--version-from`, and `--no-runner-cache`.
|
|
33
32
|
- User asks to refresh/re-capture an already configured code source → run `context capture --code` unless the user explicitly wants to change package selection or version flags. The CLI reuses stored `capture_config`, appends a new snapshot only when code/version content changes, and never overwrites prior snapshots.
|
|
34
|
-
- User provides
|
|
35
|
-
-
|
|
36
|
-
- Present only candidate package name, module path, and version. Do not show file counts or the derived path filter.
|
|
37
|
-
- If the plan returns exactly one candidate package, run `context capture --code <original-target-if-present> --module <candidate.path> --format json` immediately.
|
|
38
|
-
- If the plan returns multiple candidate packages, ask the user which package paths to capture. If the host interaction supports multi-select, allow multi-select; otherwise ask the user to reply with one or more package paths/names.
|
|
33
|
+
- User provides one or more code target paths, or asks for code capture without explicit `--module` flags → run `context capture --code $ARGUMENTS --format json` directly. The CLI preflights every target first; if any target is ambiguous it returns candidates without writing, otherwise it captures all selected code targets serially.
|
|
34
|
+
- If the CLI returns candidate packages, ask the user which package paths to capture.
|
|
39
35
|
- Then run `context capture --code <original-target-if-present>` with one repeated `--module <path>` for every selected package. The CLI derives and stores path filtering silently from that selection.
|
|
40
36
|
- User asks to record conversation material, a decision, a revision intent, or a temporary observation → use note capture:
|
|
41
37
|
- Classify once as `revision`, `decision`, or `brainstorm`; temporary observations are `brainstorm`. If unclear, ask one clarification.
|
|
@@ -49,6 +45,7 @@ For stdin batches, use this shape:
|
|
|
49
45
|
|
|
50
46
|
```bash
|
|
51
47
|
context capture --stdin <<'EOF'
|
|
48
|
+
https://example.feishu.cn/wiki/abc
|
|
52
49
|
docs/a.md
|
|
53
50
|
docs/b.md
|
|
54
51
|
EOF
|
|
@@ -56,20 +53,35 @@ EOF
|
|
|
56
53
|
|
|
57
54
|
Do not pipe the heredoc through another command, and do not discover files with `find` / `ls` when the user already supplied the paths.
|
|
58
55
|
|
|
59
|
-
### Output
|
|
56
|
+
### Output Handling
|
|
60
57
|
|
|
61
58
|
Report the CLI output verbatim. If the CLI reports `N sources changed`, suggest the right next step:
|
|
62
59
|
|
|
63
60
|
- Run `context status --format json` and use its `next_step.command` / `workflow.next_step`.
|
|
64
61
|
- If status says aligned knowledge is missing or alignment is required → suggest `/context:align`.
|
|
65
62
|
- If status says compile work is pending for Markdown / evidence-backed knowledge → suggest `/context:compile`. Mention `/context:align` only if the user wants to revise the structure.
|
|
66
|
-
- If the capture was code-only and status reports pending code projection, suggest the CLI-owned code route: `/context:compile
|
|
63
|
+
- If the capture was code-only and status reports pending code projection, suggest the CLI-owned code route: `/context:compile code <source-slug>` or `context compile code <source-slug>`, followed by `context compile close` when the CLI asks for close.
|
|
67
64
|
|
|
68
|
-
Never suggest prose compile or hand-built code knowledge for a code-only source. Code snapshots become active knowledge only through `context compile
|
|
65
|
+
Never suggest prose compile or hand-built code knowledge for a code-only source. Code snapshots become active knowledge only through `context compile code`, which materializes package/category/symbol Nodes deterministically.
|
|
69
66
|
|
|
70
67
|
If capture is rejected with `agent_hints[].code = "workflow-cross-family-rejected"`, do **not** run `context workflow abandon ...` automatically. First run or ask the user to run `context workflow status --format json` and explain that another workflow is active in this workspace. Continue that workflow when it is the intended task; ask the user before abandoning it when the user wants to discard that in-progress work. If the user expected a different repository/workspace, change to the confirmed workspace root before retrying capture.
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
## Final Report
|
|
70
|
+
|
|
71
|
+
Report in the user's conversation language. Translate section headings into the user's language instead of copying the English labels below verbatim. Optimize for human readability: use document titles instead of source ids, package names instead of `aspect:code:*` strings, and human-readable kind labels ("local markdown", "Feishu doc", "code package") instead of internal tokens. Do not surface content hashes, snapshot digests, workflow payload ids, or absolute file paths.
|
|
72
|
+
|
|
73
|
+
Stable structure:
|
|
74
|
+
|
|
75
|
+
1. Completion headline. Single line with the action verb plus core counts: how many sources were captured this round, broken down by `new` / `updated` / `unchanged`. Capture data from `context capture ... --format json` `result.summary` (or per-source statuses when no aggregate is returned).
|
|
76
|
+
2. Per-source list grouped by status. Show each captured source under one of three groups (`new` / `updated` / `unchanged`); within each group list the document title (`source.title`), kind label, and a short delta indicator for updated sources (for example added/removed line counts when the CLI returns them; otherwise "content changed"). Cache-hit code packages belong in `unchanged`. Omit groups that are empty.
|
|
77
|
+
3. Pending workflow signals. When `context status --view summary --format json` reports follow-up work tied to this capture (sources pending align, sources pending compile, refreshed sources pending recompile, code sources pending projection), summarize each as a single line naming the work and which sources are affected. Omit the section entirely when there is no pending follow-up.
|
|
78
|
+
4. Next step. Single command suggestion driven by status: `/context:align` when structure work is pending, `/context:compile` when prose compile work is pending, `context compile code <slug>` (or `/context:compile code <slug>`) when code projection is pending. If nothing is pending, say so explicitly.
|
|
79
|
+
|
|
80
|
+
Do not include raw CLI diagnostics, agent_hints content, schema names, or workflow payload identifiers in the report. Those belong in earlier troubleshooting output, not in the completion summary.
|
|
81
|
+
|
|
82
|
+
## Reference
|
|
83
|
+
|
|
84
|
+
### Missing Dependency Recovery
|
|
73
85
|
|
|
74
86
|
If the CLI returns `agent_hints[]` with `code: "capture-code-typescript-plugin-missing"`, stop and surface the hint. Ask the user once for permission to run `agent_hints[0].command` (the CLI has already picked the correct package manager — `npm install -g` or `bun install -g` — based on how `context` itself was installed). If approved, run that exact command via `Bash` and then retry the original capture; if declined, leave the command visible for manual install. Never substitute a different package manager or version.
|
|
75
87
|
|
|
@@ -81,7 +93,7 @@ If the CLI prints a missing-dependency error like `lark-cli not installed`, walk
|
|
|
81
93
|
4. Stop on any failure; surface stderr verbatim.
|
|
82
94
|
5. After success, tell the user to re-run their original `/context:*` command themselves.
|
|
83
95
|
|
|
84
|
-
### Language
|
|
96
|
+
### Language Policy
|
|
85
97
|
|
|
86
98
|
Your prose to the user follows the user's conversation language. CLI commands, flag names, URLs, env-var names, binary names, source-ids stay English.
|
|
87
99
|
|
|
@@ -93,5 +105,5 @@ Your prose to the user follows the user's conversation language. CLI commands, f
|
|
|
93
105
|
- In `--format json`, code capture runner cache state is authoritative in `result.runner.cacheMode`: `prepared` means a workspace runner was prepared, `cached` means workspace cache hit, and `bypass` means `--no-runner-cache` used a temporary runner directory instead of the workspace runner cache.
|
|
94
106
|
- Aspect snapshots default to `evidence.mode: none`. Prose-like custom aspects must opt in with `evidence: { mode: block }` in `aspects/<name>/aspect.yaml` before they generate evidence manifests. Invalid `evidence.mode` values are reported as `evidence-policy-invalid`; they are not silently treated as `none`.
|
|
95
107
|
- Code aspect snapshots ship with `evidence.mode: none`; symbols/files/edges are indexed inside the code bucket. Do not ask users to inspect or repair a code `.evidence` manifest.
|
|
96
|
-
- Code aspect capture writes raw code snapshots first. Materialize them with `context compile
|
|
108
|
+
- Code aspect capture writes raw code snapshots first. Materialize them with `context compile code <slug>` (or no slug for all actionable code sources) before prose align needs to attach documentation to code Nodes.
|
|
97
109
|
- On duplicate capture of the same URL: identical `content_hash` → CLI skips with `unchanged`; different hash → CLI appends a new snapshot.
|