@c4a/context-cli 0.5.35-beta.3 → 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 +44686 -38289
- package/package.json +1 -1
- package/plugin/README.md +1 -1
- package/plugin/README_CN.md +1 -1
- package/plugin/commands/align.md +30 -99
- package/plugin/commands/capture.md +6 -9
- package/plugin/commands/compile.md +67 -148
- package/plugin/commands/init.md +4 -1
- package/plugin/skills/skill-align-workflow/SKILL.md +39 -84
- 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 +4 -8
- package/plugin/skills/skill-compile-draft/SKILL.md +21 -76
- 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-semantic-reconcile/SKILL.md +3 -3
- package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +1 -1
- package/scripts/build-plugin.ts +8 -6
- package/templates/aspects/code/prompt.md +1 -1
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-align-workflow
|
|
3
|
-
description: "Internal procedure for /context:align.
|
|
3
|
+
description: "Internal procedure for /context:align. Reads CLI-guided align evidence, applies semantic Node classification gates, and emits align structure-decision payloads for CLI validation/finalize."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Align Workflow Procedure
|
|
7
7
|
|
|
8
8
|
## TL;DR
|
|
9
9
|
|
|
10
|
-
Run `context align
|
|
10
|
+
Run `context align scan --format json`, read expected evidence views, produce semantic structure payloads, and follow top-level `next_action`. The CLI owns route, validation, repair commands, and stage guards; this skill owns only semantic classification and source-bound structure judgment.
|
|
11
11
|
|
|
12
12
|
<reference>
|
|
13
13
|
|
|
14
14
|
## Canonical Data
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
- `
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- Source titles and headings are ordinary evidence, not structural authority. Do not automatically copy them into Node titles or aliases; classify the evidence referent first, then generate a title that fits the final Node type.
|
|
16
|
+
- `workflow.next-action-envelope.v2` is authoritative. Branch on `next_action.kind`, execute `next_action.command` for writes, and use `views[].command` for budget-safe evidence reads.
|
|
17
|
+
- `allowed_actions[]` may permit extra read-only work before the next write; it is not a menu of alternate write paths.
|
|
18
|
+
- `agent_hints[]`, when still present, is a short-term cutover mirror or diagnostic. Do not prefer it over top-level `next_action`.
|
|
19
|
+
- Schema names and enum values come from `context schema <name>`; use `--view minimal` for protocol discovery before full schema reads.
|
|
20
|
+
- Existing knowledge is the lookup registry. Use `context mdrive glossary match <name>` and `context mdrive node list --format json`; do not read `knowledge/**` or create a separate registry file.
|
|
21
|
+
- Code projection Nodes are reusable knowledge handles. When document evidence belongs on a code symbol, reuse the code slug instead of creating a parallel document Node.
|
|
22
|
+
- `diagnostics.automatic_ownership_adjustments[]` and validation diagnostics are the mechanical external-reference ownership source of truth. Independent reference definitions, pure URLs, relation kind blocks, and multiline reference-only lists default to context_only; submit an explicit `block_ownership[]` owned/shared entry only when such a reference block is primary citation evidence.
|
|
23
|
+
- `views[]` and diagnostics distinguish citable evidence from supporting context. Do not promote supporting/context-only material into cited Sections unless a later ownership correction makes it citation-eligible.
|
|
24
|
+
- Keep cache-friendly prompt order: fixed protocol/schema first, existing knowledge lookup second, source evidence views third, current semantic payload last. Preserve CLI JSON order and do not add timestamps, random ids, scratch paths, or host paths to generated payloads.
|
|
26
25
|
- Node type, tag, fake-Entity, `domain`, and `action` gates are in `references/gates.md`.
|
|
27
|
-
- Coarse
|
|
26
|
+
- Coarse reading density and neutral signal rules are in `references/density-profile.md`.
|
|
28
27
|
- Candidate anomaly handling, `label_hint`, and `llm_slug_hint` reference rules are in `references/candidate-resolution.md`.
|
|
29
28
|
|
|
30
29
|
</reference>
|
|
@@ -33,97 +32,53 @@ Run `context align --scan --format json`, inspect the needed evidence, and follo
|
|
|
33
32
|
|
|
34
33
|
Use this only inside `/context:align`.
|
|
35
34
|
|
|
36
|
-
### Step 1 — Start From
|
|
35
|
+
### Step 1 — Start From The Envelope
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
Run `context align scan --format json`. Confirm `schema_version: "workflow.next-action-envelope.v2"`, then identify `next_action`, `views`, `workflow`, `route`, and `diagnostics`.
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
If no envelope is present, stop and surface the CLI output; do not reconstruct an align route from old prompt memory.
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
### Step 2 — Inspect Expected Views
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Query existing knowledge for reusable names before proposing new term/service/system/action Nodes. `context mdrive glossary match <name>` returns deterministic `match.kind`, `match.matched`, and `match.rank`; exact title/slug/alias hits should usually become references to the existing Node, not duplicate candidates.
|
|
47
|
-
|
|
48
|
-
### Step 4 — Default Path: Direct Finalize
|
|
49
|
-
|
|
50
|
-
When `align_route.next_command` points to `context align --finalize -`, do not run coarse-read, candidate ops, ledger, or aggregate. Inspect the evidence you need, produce one `align-structure-decision`, and submit it to the returned finalize command. Do not infer route thresholds from source count, token count, or window size; the CLI already made that decision.
|
|
51
|
-
|
|
52
|
-
Before producing `align-structure-decision`, refresh and apply `references/gates.md`: classify Node type in order (`action` scale + process evidence, then concrete/term `entity`, then child-bearing `domain`), reject fake Entities only when at least two suspicious signals match, keep `term` separate from concrete A/B tags, and provide required `action_gate` / `domain_gate` fields. Classification is about the content referent, not the source title. After type is chosen, rewrite the Node title to fit that type: Entities name concrete objects or atomic terms, Domains name grouping scopes, and Actions name executable processes.
|
|
53
|
-
|
|
54
|
-
### Step 5 — Staged Path: Batched Review
|
|
55
|
-
|
|
56
|
-
Use this path only when `align_route.next_command` points to `context align --coarse-read -` or the CLI explicitly returns a batched-review hint. This path is for large or ambiguous scans where the CLI requires a checkpoint before final structure.
|
|
43
|
+
Run `views[].command` entries marked `expected: true` before writing. Use additional `show_view` commands only when listed in `allowed_actions[]` or returned in `how_to_explore[]`.
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
Read evidence through semantic CLI views, not shell parsing. Follow `page.next_command` for pagination. Use `--source`, `--heading`, `--window`, and `--token-budget` as view filters only. `--unwrap` removes workflow metadata; it does not expand a compact view into full detail.
|
|
59
46
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Then read the candidate state with `context workflow show --payload align-candidate-ledger --view ledger --unwrap --format json` and `context workflow show --payload align-candidate-aggregate --view aggregate --unwrap --format json`. To revisit one source's coarse-read notes, add `--source <source-id>` to the ledger view; candidates do not carry source ids, so add `--status` or `--candidate-id` only when you also need candidate rows. Treat aggregate fields as mechanical statistics and warnings, not semantic recommendations. Review `anomaly_signals[]`; address clear mistakes with another ops batch, otherwise continue to finalize. These signals are warnings and do not by themselves block finalizing.
|
|
63
|
-
|
|
64
|
-
### Step 6 — Follow Hints
|
|
65
|
-
|
|
66
|
-
At any point, if the CLI returns `agent_hints[]`, follow the provided `command` / `next_action` before retrying. Legacy-protocol hints mean the submitted payload/schema is retired; switch to the named current schema instead of reshaping old fields.
|
|
67
|
-
|
|
68
|
-
### Step 7 — Finalize Structure
|
|
69
|
-
|
|
70
|
-
Produce `align-structure-decision` as JSON with finalized nodes, `contains_parent`, `depends_on`, and one `block_ownership[]` entry per coverable block. Node titles and summaries must follow the latest `generation_policy` language; do not default to English scaffolding such as "How-To", "Strategy", or "Architecture" when the workspace language is not English. Do not automatically add the original source title as an alias. Submit it through stdin with `context align --finalize -`; the CLI resolves the current align-segments payload. Prefer stable `llm_slug_hint` values for `contains_parent_ref`, `from_ref`, `to_ref`, owners, and section owners while the final slug is still being normalized.
|
|
71
|
-
|
|
72
|
-
If `align-segments.incremental.mode` is `incremental`, finalize is a delta merge. Submit only the Nodes and ownership supported by the current scanned sources; 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.
|
|
47
|
+
### Step 3 — Reuse Existing Knowledge
|
|
73
48
|
|
|
74
|
-
|
|
49
|
+
Query existing knowledge for reusable names before proposing new term/service/system/action Nodes. Exact title/slug/alias hits should usually become references to the existing Node, not duplicate candidates.
|
|
75
50
|
|
|
76
|
-
|
|
51
|
+
When a code projection Node already represents the object, reuse its slug for prose evidence and plan only prose-owned Sections for the current source evidence.
|
|
77
52
|
|
|
78
|
-
|
|
53
|
+
### Step 4 — Classify Semantic Structure
|
|
79
54
|
|
|
80
|
-
|
|
55
|
+
Apply `references/gates.md` before authoring Nodes: classify Node type in order (`action` scale + process evidence, then concrete/term `entity`, then child-bearing `domain`), reject fake Entities only when at least two suspicious signals match, keep `term` separate from concrete tags, and provide required gate evidence.
|
|
81
56
|
|
|
82
|
-
|
|
57
|
+
Source titles and headings are ordinary evidence, not structural authority. Choose titles and summaries that fit the final Node type and the CLI-provided generation policy.
|
|
83
58
|
|
|
84
|
-
|
|
59
|
+
For large or batched payloads, use `references/density-profile.md` and `references/candidate-resolution.md` only when the CLI `next_action` asks for coarse-read or candidate-op payloads. Do not choose those stages yourself.
|
|
85
60
|
|
|
86
|
-
|
|
87
|
-
- `shared`: at least two slugs in `owners[]`, `primary_owner` chosen from those owners (the Node that authors cited Sections from this block; secondaries receive compact raw preview and must request full text or raise an ownership challenge before citing it), `visible_to[]`, `reason`. Do not include `question_id`.
|
|
88
|
-
- `context_only`: **omit `owners` and `primary_owner` entirely.** Required: `visible_to[]`, `reason`. Do not include `question_id`. Also use this for **external-URL reference-link blocks** (orphan `[label]: https://...` / `[label]: http://...` definitions, including ByteDance internal hosts and Lark / docs wikis) when no Node in this batch clearly owns the references — the URLs themselves are unique knowledge not duplicated in body prose, so they must stay reachable downstream even if no inline body usage exists. `context_only` keeps those URLs as raw background only; compile must not cite them as active Sections unless a later ownership patch upgrades the block to `owned` / primary `shared`.
|
|
89
|
-
- `ignored`: **omit `owners`, `primary_owner`, and `visible_to`.** Required: `reason`. Use for outdated markers, **intra-workspace navigation lines** (`Parent:` / `Children:` / `Related:` / `Relations:` rows whose targets are other Nodes already represented in the align graph), and placeholders without independent knowledge. **Do not put external-URL reference-link blocks here** — those carry unique URLs that the align graph cannot reconstruct; route them to `context_only` (or `owned` / `shared` if a Node should author a citation-eligible "相关链接" Section). Do not include `question_id`.
|
|
90
|
-
- `unresolved`: **omit `owners` and `primary_owner`.** Required: `question_id` (matching a top-level `unresolved[].question_id`) and `reason`. Use when classification is blocked by missing evidence.
|
|
61
|
+
### Step 5 — Build The Payload Requested By `next_action`
|
|
91
62
|
|
|
92
|
-
|
|
63
|
+
Use `next_action.input_schema` or the matching `context schema <name> --view minimal --format json` output to shape the payload.
|
|
93
64
|
|
|
94
|
-
|
|
65
|
+
For `submit_structure_decision`, produce one structure-decision document with finalized Nodes, document edges, planned Sections, and ownership. Keep only source-supported semantic decisions in the payload; leave mechanical repair and patch routing to CLI diagnostics.
|
|
95
66
|
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
"schema_version": "align.finalize-patch.v1",
|
|
99
|
-
"operations": [
|
|
100
|
-
{ "op": "replace", "path": "/block_ownership/3/primary_owner", "value": "rspack" }
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
```
|
|
67
|
+
For coarse-read, candidate-op, patch, ownership, or rescan actions, follow the command and schema in the returned `next_action`. Do not carry old candidate-table, decision-patch, or full-tree payload shapes forward.
|
|
104
68
|
|
|
105
|
-
|
|
69
|
+
### Step 6 — Validate And Submit
|
|
106
70
|
|
|
107
|
-
|
|
71
|
+
Before finalizing a structure decision, run `context align validate --input - --format json`. If validate returns blocking diagnostics, repair the exact paths it reports and rerun validate. If validate returns a finalize `next_action`, submit the same validated payload to that command.
|
|
108
72
|
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
"schema_version": "align.ownership-patch.v1",
|
|
112
|
-
"base_digest": "sha256:<finalized-ownership-digest>",
|
|
113
|
-
"block_ownership": [
|
|
114
|
-
{
|
|
115
|
-
"block_id": "<block-id>",
|
|
116
|
-
"ownership_role": "owned",
|
|
117
|
-
"owners": ["<node-slug>"],
|
|
118
|
-
"visible_to": ["<node-slug>"],
|
|
119
|
-
"reason": "Why this block is citation evidence for the node."
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
```
|
|
73
|
+
If any write is rejected, follow the returned `next_action` and `reason_code`. Do not retry by guessing direct/batched stages, forcing route bypasses, or editing workflow files.
|
|
124
74
|
|
|
125
|
-
|
|
75
|
+
### Step 7 — Self-verify
|
|
126
76
|
|
|
127
|
-
|
|
77
|
+
- [ ] All writes followed top-level `next_action.command`. If not, return to **Step 1**.
|
|
78
|
+
- [ ] Evidence was read through `views[].command`, `how_to_explore[]`, or CLI schema/protocol commands only. If not, return to **Step 2**.
|
|
79
|
+
- [ ] Node classification used the semantic gates in `references/gates.md`. If not, return to **Step 4**.
|
|
80
|
+
- [ ] URL/reference ownership followed CLI diagnostics, not static prompt rules. If not, return to **Step 5**.
|
|
81
|
+
- [ ] Structure decisions passed `context align validate --input - --format json` before finalize. If not, return to **Step 6**.
|
|
82
|
+
- [ ] No raw, cache, knowledge, `/tmp`, host tool-results, or workflow scratch files were read or written with generic tools. If violated, restart from **Step 1**.
|
|
128
83
|
|
|
129
84
|
</procedures>
|
|
@@ -57,4 +57,4 @@ block_ownership:
|
|
|
57
57
|
- owners: [local:data-region]
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Refs may point to `llm_slug_hint` or final `slug`; prefer `*_ref` fields when a schema provides them. If the CLI rejects an unknown ref, use the
|
|
60
|
+
Refs may point to `llm_slug_hint` or final `slug`; prefer `*_ref` fields when a schema provides them. If the CLI rejects an unknown ref, use the top-level envelope diagnostics (`issues[].expected_shape.available_node_refs`, `diagnostics.*.available_node_refs`, or the returned repair view) and resubmit the corrected `align-structure-decision` payload. `agent_hints[]`, when present, is only a cutover mirror and must not be the source of truth.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Use `density_profile` in `align-coarse-read` to describe how much structure the document needs before candidate discovery. This is a reading strategy, not a quality score.
|
|
4
4
|
|
|
5
|
+
This reference applies only when the current envelope asks for `next_action.kind: "submit_coarse_read"`. A small or moderate direct route should follow `validate_align_decision`; do not emit a `single_pass` coarse-read payload unless the CLI requested coarse-read.
|
|
6
|
+
|
|
5
7
|
| Profile | Use When | Agent Behavior |
|
|
6
8
|
|---|---|---|
|
|
7
9
|
| `macro` | A long source has many headings, sections, or broad topic shifts. | Create section proposals around major headings and preserve document-level anchors so later passes do not flatten scope. |
|
|
@@ -32,7 +32,7 @@ command. It does not hand-edit rendered knowledge.
|
|
|
32
32
|
- Source issues (`dropped-source-reference`) → user runs `/context:drop <id>` to complete the drop
|
|
33
33
|
- Exit 0 → summarise node/section totals, verify, `recompiled`, `locator_updates`, `rebuilt`, fingerprint rebuild count, archive status / archived file count, and any `ready_with_debt` coverage warnings when printed; then stop.
|
|
34
34
|
- Exit 2 → report the full issue list verbatim + point at the right re-entry command above. Do not hand-open the affected rendered article.
|
|
35
|
-
- Coverage
|
|
35
|
+
- Coverage warnings are CLI-owned diagnostics. `ready_with_debt` means close succeeded and unresolved coverage remains visible; report the warning and follow returned coverage view commands / `available_actions[]` only if the user chooses a repair or skip round.
|
|
36
36
|
- Materialized knowledge means either a CLI-written knowledge article, or an explicit no-write placeholder from align: `planned_sections: []` plus source/context/graph support. A compile skip action records reviewed evidence, but it does not by itself materialize an arbitrary finalized Node.
|
|
37
37
|
- Never re-run `context compile draft` from close to paper over verify failures. Draft failures belong in the draft loop.
|
|
38
38
|
- Do not use Python, Node.js, shell scripts, `ls`, `find`, `rg`, `cat`, or similar ad-hoc commands to inspect `WORKSPACE_DIR`, `.context`, knowledge files, or `/tmp` workflow artifacts.
|
|
@@ -63,7 +63,7 @@ Close is one in-process command with one exit code:
|
|
|
63
63
|
| Outcome | Agent action |
|
|
64
64
|
|---|---|
|
|
65
65
|
| Exit 0, 0 issues | Summarise those counts in the user's language: Nodes touched; Sections added / updated / superseded / deprecated / skipped; `recompiled`; `locator_updates`; `rebuilt`; verify green. Stop. |
|
|
66
|
-
| Exit 0, warnings only | Summarise + list warnings verbatim. For coverage warnings,
|
|
66
|
+
| Exit 0, warnings only | Summarise + list warnings verbatim. For coverage warnings, surface the CLI-returned coverage view commands / `available_actions[]` instead of inventing a local decision matrix. Stop. |
|
|
67
67
|
| Exit 2, Section / content issue | Surface the full issue list; point the user at re-running `/context:compile` (the draft loop owns Section writes). Do NOT Edit the affected rendered article. |
|
|
68
68
|
| Exit 2, `compile-close-finalized-node-missing-knowledge` | If the missing Node has real citation evidence, point the user at `/context:compile` for that Node. If it is intentionally navigation-only or placeholder-only, point the user at `/context:align` to make it explicit no-write with `planned_sections: []` and context-only/ignored relation or placeholder blocks. |
|
|
69
69
|
| Exit 2, structural issue (cycle, duplicate slug, `invalid-node-type`, `domain-same-file-child`) | Surface the full issue list; point the user at `/context:align` to revise structure. Do not re-run compile. |
|
|
@@ -118,12 +118,8 @@ Summarise in the user's language:
|
|
|
118
118
|
|
|
119
119
|
Stop. Do not auto-invoke follow-on commands.
|
|
120
120
|
|
|
121
|
-
### Step 5 —
|
|
121
|
+
### Step 5 — Final guardrails
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
- [ ] If exit 2, every error is surfaced to the user with a re-entry command (compile / align / drop); no silent ignores — **Step 3**.
|
|
125
|
-
- [ ] No agent-hand edits to rendered knowledge — if any, revert; the close stage is read-only for knowledge content.
|
|
126
|
-
- [ ] No Read / Glob / Grep / Write was used against `WORKSPACE_DIR`; CLI-owned output archival is allowed.
|
|
127
|
-
- [ ] No ad-hoc script or shell file traversal was used against `WORKSPACE_DIR`, `.context`, or `/tmp` workflow artifacts.
|
|
123
|
+
Run close once, surface every error with its re-entry command, and never inspect or edit rendered knowledge outside the CLI.
|
|
128
124
|
|
|
129
125
|
</procedures>
|
|
@@ -5,8 +5,8 @@ description: >
|
|
|
5
5
|
the CLI-provided `NodeContext` (planned metadata, raw snippets, and
|
|
6
6
|
existing Sections if any), classifies every raw fragment into a Section
|
|
7
7
|
kind via the priority chain, writes `content` + optional `summary` + `source_refs[]`,
|
|
8
|
-
and emits a compile draft JSON document
|
|
9
|
-
|
|
8
|
+
and emits a compile draft JSON document for the caller to submit to the current envelope's
|
|
9
|
+
`next_action.command`.
|
|
10
10
|
Activates when `/context:compile` iterates across the confirmed align plan.
|
|
11
11
|
tools:
|
|
12
12
|
- Bash
|
|
@@ -19,16 +19,16 @@ Classify raw evidence for one Node into `add` / `skip` (and on refresh: `update`
|
|
|
19
19
|
## TL;DR — Non-negotiables
|
|
20
20
|
|
|
21
21
|
- One Node per invocation — `target_node` MUST equal `node.slug`; no cross-Node writes. Finish the current Node's draft quality checks before the caller moves to another Node's review/apply loop.
|
|
22
|
-
- Agent emits JSON only; no markdown, no direct workspace file writes. The caller
|
|
23
|
-
- Evidence boundary: treat
|
|
22
|
+
- Agent emits JSON only; no markdown, no direct workspace file writes. The caller submits the JSON to the current envelope's `next_action.command`; the CLI validates and stores workflow payloads.
|
|
23
|
+
- Evidence boundary: treat the CLI-provided NodeContext and evidence views as complete. Cite only refs surfaced in `citable_source_refs[]` or `raw_snippet_indexes.citation_eligible`; treat `supporting_context_refs[]`, `context_only`, and secondary-shared snippets as background. `request_full_text` may expose visible text for inspection through the narrow text view (`context compile context <slug> --request-full-text <block_id> --view text --format json`), and it does not change citation eligibility. If supporting/context-only evidence is needed as a citation, emit `pending_ownership_challenge` or `structure_challenge` — see [references/structural-challenges.md](references/structural-challenges.md). Never `grep` / `sed` / `jq` / `cat` / `head` raw `--format json` stdout or workflow scratch files in `/tmp` or `.context/.cache/`; use semantic views and follow returned `next_command` / `how_to_explore[]`. For write commands that take `--payload-digest`, omit the flag unless the CLI explicitly asks for a stale guard.
|
|
24
24
|
- Actions are candidate write actions, not final semantic decisions; `context reconcile prepare` re-derives near-duplicate / conflict / merge relations from `candidates[]` on its own. Op naming is scoped by schema: compile-draft `actions[]` already targets Sections, so Section lifecycle ops are verb-only (`add`, `update`, `supersede`, `deprecate`, `skip`). Do not use align-style names such as `add_section`, `write_section`, or `propose_section`.
|
|
25
25
|
- Source support passing is not completion. Before emitting, estimate coverage from the provided `raw_snippets[]`: if there are 3+ citation-eligible snippets, a one-action draft is valid only when the later snippets are duplicates, navigation, placeholders, or continuations of the same fact. Small dense docs still need multiple actions when later snippets state distinct capabilities, constraints, examples, risks, FAQ, or usage notes. Large manuals/design docs should compile to several orthogonal actions in the same draft. Do not switch into "speed mode" because the first action validates; coverage is part of the draft task.
|
|
26
|
-
- Pick `kind`
|
|
26
|
+
- Pick `kind` from the CLI's `context schema compile-draft` contract, especially `section_kind_priority` and the mount matrix. First matching form wins. A `decision` needs at least two surfaced alternatives plus a reason; bare "we use X because Y" is `spec`. Reach `description` only after every more specific kind fails.
|
|
27
27
|
- `node.planned_sections[]` is an align-time scaffold hint, not a hard completion gate. Prefer a planned kind when the evidence fits; if a source-backed stronger kind differs, emit it and let the CLI warning guide review.
|
|
28
28
|
- `kind × node.type` must satisfy the CLI Section mount matrix; mismatches get rejected at write time. When the strongest kind is blocked by mount matrix, fall to the next legal kind whose form actually fits — do not collapse to `description` just because it mounts everywhere, and do not invent thin precision (e.g. one-line `spec`) just to avoid `description` either. See [Description anti-abuse gates](#description-anti-abuse-gates) for the classification checks at the description boundary.
|
|
29
29
|
- Every write action cites raw via `source_refs[]`, choosing values from `raw_snippets[].source_ref`. Use a single-element array for one citation. Treat each source ref as an opaque citation token; never fabricate, parse, dereference, or cite navigation-only blocks as evidence for a content Section.
|
|
30
30
|
- Use `content` for the Section text the reader should see. It may be long and may contain URLs, tables, commands, config, or code fences. Add `summary` for long content or when it helps readers/query output; omit it when content is short. Summary quality checks are warning hints only, not schema or evidence failures. The CLI rejects retired fields (`body`, `detail`, `raw`, singular `source_ref`, quoted-evidence) with canonical repair hints — read those hints rather than memorising the blacklist. Omit optional fields when empty.
|
|
31
|
-
- Preserve
|
|
31
|
+
- Preserve literals required by the CLI. When source-refs or scaffold output lists `required_preserved_literals[]`, keep those URL, code identifier, `source_ref`, or `block_id` literals visible in the relevant `content`, `summary`, skip reason, or repair challenge. Do not rely on memorized URL rules; let CLI literal fields and citation diagnostics define what must be preserved.
|
|
32
32
|
- `refers_to_nodes[]` only carries slugs present in the context's glossary, existing Sections, or the current align plan; never invent one.
|
|
33
33
|
- `skip` is the honest default when raw adds nothing. Bare `skip` (no `source_refs[]`) is only for deterministic no-ops such as unchanged input or pure navigation. When a snippet was reviewed and intentionally not written, emit `skip` with `source_refs[]` from that snippet so semantic review can record `reviewed_no_write`.
|
|
34
34
|
- Any Node may legitimately compile to no Sections when the provided snippets contain only navigation (`Parent` / `Children` / `Related` / `Relations`) or placeholder text that explicitly says no detailed content is available. Emit `skip`; do not turn align summaries, parent/child lists, sibling links, or placeholders into `description` Sections. The align graph and Node metadata preserve structure; active Sections need citation-eligible content.
|
|
@@ -69,57 +69,15 @@ Main-path ops are **`add`** and **`skip`**. A typical new Section action is `{ o
|
|
|
69
69
|
|
|
70
70
|
`source_refs[]` values are copied verbatim from `raw_snippets[].source_ref`; a single citation is still a single-element array. When one Section summarises contiguous multi-block evidence, list only the source refs the `content` actually consumes. If the CLI reports `compile-source-refs-auto-narrowed`, it safely reduced an over-wide citation; removed refs are still uncovered, so add separate actions for distinct knowledge or leave them to an evidence-carrying `skip`. Preserve raw wording in `content` when it is already clear. Preserving a cited prose/bullet list as the Section's user-facing content is allowed when that list is the actual knowledge; the anti-pattern is copying raw text only as traceability or lexical-score padding. For `example` Sections that cite command / config / code fences, include the relevant fenced block in `content`.
|
|
71
71
|
|
|
72
|
-
## Section Kind
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
| kind | Use when | `content` should contain | Positive / negative boundary |
|
|
82
|
-
|---|---|---|---|
|
|
83
|
-
| `example` | fenced code, config, or command sample | what the sample does plus the full snippet when useful | `<AppProvider />` sample or `bun run build`; plain "wrap with AppProvider" is `description` |
|
|
84
|
-
| `comparison` | at least two subjects across at least two dimensions | compared subjects, dimensions, and table/matrix | `X vs Y vs Z` table; "two options have tradeoffs" is `description`; "choose X over Y" is `decision` |
|
|
85
|
-
| `faq` | one explicit question-answer pair | question plus answer | Q/A block; an "X FAQ collection" is several `faq` Sections on X, not a container Node |
|
|
86
|
-
| `incident` | happened event with time, impact, and root cause / handling | time, severity/impact, root cause, timeline/actions | dated outage postmortem; "risk may happen" is `warning` |
|
|
87
|
-
| `changelog` | version/date plus change description | version, change type, migration notes if present | `v1.2.0 added X`; "X supports Y" without version is `spec` or `description` |
|
|
88
|
-
| `decision` | text surfaces at least two alternatives plus a reason | selected option, alternatives, reason, impact | "choose async rather than sync because..."; bare "use X because..." is `spec` |
|
|
89
|
-
| `spec` | verifiable behavior, threshold, default, limit, or check method | object, condition, value/constraint | retry max 3; vague "consider concurrency" is `principle` or `description` |
|
|
90
|
-
| `warning` | factual risk, caveat, or negative consequence | trigger condition and consequence | "without warmup first 30s timeout"; "don't change config" without consequence is too vague |
|
|
91
|
-
| `principle` | stable design invariant / philosophy with no check method and no choice action | invariant and reason | "single way to write UI"; retry max 3 is `spec`; "choose X over Y" is `decision` |
|
|
92
|
-
| `description` | fallback definition, overview, or plain narrative | definition, purpose, scope, distinction | only after the nine kinds above fail; do not use it to hide lists, rules, tables, samples, risks, or decisions |
|
|
93
|
-
|
|
94
|
-
Mount matrix:
|
|
95
|
-
|
|
96
|
-
| kind | domain | entity | action |
|
|
97
|
-
|---|:---:|:---:|:---:|
|
|
98
|
-
| `description` | yes | yes | yes |
|
|
99
|
-
| `spec` | no | yes | yes |
|
|
100
|
-
| `warning` | yes | yes | yes |
|
|
101
|
-
| `principle` | yes | yes | no |
|
|
102
|
-
| `decision` | yes | yes | yes |
|
|
103
|
-
| `incident` | no | yes | yes |
|
|
104
|
-
| `example` | no | yes | no |
|
|
105
|
-
| `changelog` | no | yes | no |
|
|
106
|
-
| `comparison` | no | yes | no |
|
|
107
|
-
| `faq` | yes | yes | yes |
|
|
108
|
-
|
|
109
|
-
When the strongest kind is not mountable on this Node type, choose the next legal kind that the evidence truly supports, or `skip` with a structural challenge reason. Do not force `description` just because it mounts everywhere.
|
|
110
|
-
|
|
111
|
-
## Confidence rubric
|
|
112
|
-
|
|
113
|
-
Four legal values; pick per raw evidence strength.
|
|
114
|
-
|
|
115
|
-
| `confidence` | When |
|
|
116
|
-
|---|---|
|
|
117
|
-
| `verified` | Raw shows the fact already happened or held — recorded run output, observed metric value, incident timestamp, benchmark result, or explicit "ran X, got Y" log. Executable form alone is not enough; without execution evidence, downgrade to `confirmed`. |
|
|
118
|
-
| `confirmed` | Raw states the fact in normative voice or as a documented spec / config / example, without showing the run that confirmed it. This is the default for code blocks, configuration samples, feature lists, and design rules. |
|
|
119
|
-
| `inferred` | You combined ≥2 raw fragments into a load-bearing conclusion that no single fragment states. |
|
|
120
|
-
| `speculative` | Raw only hints; the Section is a best-effort reading that may not survive review. |
|
|
72
|
+
## Section Kind Choice
|
|
73
|
+
|
|
74
|
+
Use `context schema compile-draft --view minimal --format json` (or yaml) for the current legal kind list, priority order, and mount matrix. This skill adds only semantic guardrails:
|
|
75
|
+
|
|
76
|
+
- Stop at the first kind whose source-backed form fits.
|
|
77
|
+
- Do not choose `description` to hide lists, rules, tables, samples, risks, choices, or Q+A evidence that has a more precise kind.
|
|
78
|
+
- When the strongest kind is not mountable on this Node type, choose the next legal kind that the evidence truly supports, or `skip` with a structural challenge reason.
|
|
121
79
|
|
|
122
|
-
|
|
80
|
+
Confidence is optional. Omit it for ordinary confirmed claims; set it only when the evidence is clearly verified, inferred, or speculative according to the schema enum.
|
|
123
81
|
|
|
124
82
|
## Description anti-abuse gates
|
|
125
83
|
|
|
@@ -160,20 +118,14 @@ Check edge case conditions from the routing table at the top of this skill. If a
|
|
|
160
118
|
|
|
161
119
|
Estimate coverage from the provided `raw_snippets[]` before writing actions. Treat "the first quote is supported" as only a validation result, not a completion signal.
|
|
162
120
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
1. Count citation-eligible, non-navigation snippets and group them by `block_locator_id` heading prefix.
|
|
166
|
-
2. For 3-11 such snippets, read each snippet once. If later snippets are distinct facts, emit separate actions before moving to the next Node. Do not stop after one supported description just because the file is short.
|
|
167
|
-
3. For roughly 12+ citation-eligible snippets or 5+ distinct locator areas, plan multiple Sections in this single draft. Large manuals/design docs usually need several orthogonal actions.
|
|
168
|
-
4. This is not a quota: skip duplicates, navigation-only blocks, placeholders, and unsupported fragments. The goal is coverage of distinct source-backed knowledge, not maximum Section count.
|
|
169
|
-
5. If `context reconcile prepare` returns `compact-source-low-coverage` or `dense-source-low-coverage`, revise the same draft to cover the suggested uncovered evidence candidates before review/apply. Do not treat those warnings as ignorable polish.
|
|
121
|
+
Use the CLI-provided citation-eligible snippets and diagnostics as the coverage contract. Distinct source-backed facts should become distinct actions or evidence-carrying skips; duplicates, navigation-only blocks, placeholders, and unsupported fragments can be skipped. If later CLI diagnostics report low coverage, repair the same draft through the returned `next_action`.
|
|
170
122
|
|
|
171
123
|
### Step 2 — Classify each raw snippet
|
|
172
124
|
|
|
173
125
|
For each `raw_snippets[]` entry:
|
|
174
126
|
|
|
175
127
|
1. If the snippet only contains navigation or placeholder evidence (`Parent` / `Children` / `Related` / `Relations`, sibling links, "no detailed content", etc.), emit `skip`. Do not create a Section whose content is just "Children: ..." or "Related: ..." and do not summarize facts that are not present in the snippet.
|
|
176
|
-
2.
|
|
128
|
+
2. Pick kind using [Section Kind Choice](#section-kind-choice); stop at the first kind whose trigger fires.
|
|
177
129
|
3. Verify the kind against the mount matrix for `node.type`. Mismatch → pick the next legal kind down the chain, or emit `skip` with a reason pointing at a better Node. Never "fall through to description" just to place evidence.
|
|
178
130
|
4. If you land on `description`, walk the [Description anti-abuse gates](#description-anti-abuse-gates). Any gate fires → split or `skip`.
|
|
179
131
|
|
|
@@ -190,9 +142,9 @@ For each classified snippet:
|
|
|
190
142
|
- There is no separate default `evidence-echo` warning. Treat "echo" as an anti-pattern: raw copied only to show basis/evidence, while `source_ref` already provides traceability.
|
|
191
143
|
- For `description` / `spec`, a concise summary plus the cited bullet list is acceptable when the bullets are the useful user-facing knowledge. It becomes echo only when the copied text is not meant to be read as active knowledge.
|
|
192
144
|
- For `example` Sections that cite a code, config, or command fence, keep `content` centered on the cited fenced block. Put framing prose such as "basic configuration example" in `summary`, or cite a separate prose block in a separate action when that prose is itself source-backed knowledge.
|
|
193
|
-
3.
|
|
194
|
-
4.
|
|
195
|
-
5. Omit `confidence` for ordinary confirmed claims. Assign
|
|
145
|
+
3. For long `content`, add `summary` when it helps readers or query output. Summary is LLM-authored reader/query aid: one plain paragraph, no Markdown, and should stay compact. The CLI only reports advisory hints for missing summaries on long content, Markdown/multi-paragraph formatting, or clearly overlong summaries; it does not enforce a content-length ratio and does not treat summary quality as an evidence failure. `source_support` hard-term matching checks `content` (and legacy `detail` when present), not `summary`; keep summaries faithful to `content`, but do not copy raw-only keywords into `summary` for lexical scoring.
|
|
146
|
+
4. Preserve `required_preserved_literals[]` from the CLI evidence view. For link-heavy citation-eligible evidence, keep the listed URLs in `content` when the action writes knowledge; for supporting-only literals, keep them in the repair/challenge context instead of citing them.
|
|
147
|
+
5. Omit `confidence` for ordinary confirmed claims. Assign it only when the evidence is clearly verified, inferred, or speculative according to the schema enum.
|
|
196
148
|
6. Fill `refers_to_nodes[]` per [Glossary and refers_to_nodes](#glossary-and-refers_to_nodes).
|
|
197
149
|
7. Cite evidence with `source_refs[]`, picking values from `raw_snippets[].source_ref`. When one Section summarizes contiguous multi-block evidence, list only the source refs consumed by that Section content; the CLI verifies that the refs can collapse to one canonical citation token and may auto-narrow over-wide citations. If the evidence is non-contiguous or contains separable claims, split the draft into separately cited actions instead of stretching one action across unrelated blocks. For `skip`, include `source_refs[]` only when the skip represents reviewed no-write material; omit evidence for purely deterministic no-ops such as unchanged input. Never submit singular `source_ref` or quoted-evidence fields; the CLI rejects them.
|
|
198
150
|
|
|
@@ -200,15 +152,8 @@ Rendered knowledge starts with optional `c4a:summary`, then the active `content`
|
|
|
200
152
|
|
|
201
153
|
### Step 4 — Emit the JSON
|
|
202
154
|
|
|
203
|
-
Emit one compile draft JSON document for the caller to
|
|
204
|
-
|
|
205
|
-
### Step 5 — Self-verify
|
|
155
|
+
Emit one compile draft JSON document for the caller to submit to the current envelope's `next_action.command`. No markdown wrapper, no leading prose, no trailing commentary.
|
|
206
156
|
|
|
207
|
-
|
|
208
|
-
- [ ] Every `description` action survives the [Description anti-abuse gates](#description-anti-abuse-gates). If not, **Step 2** to split or `skip`.
|
|
209
|
-
- [ ] Coverage matches evidence density: dense raw with one broad action returns to **Step 2** unless remaining snippets are duplicates / navigation / placeholders / already covered. Citation-eligible URL blocks are either preserved or `skip`-with-evidence.
|
|
210
|
-
- [ ] `skip` semantics: bare `skip` only for deterministic no-op (unchanged input or pure navigation); reviewed-no-write `skip` carries `source_refs[]` from the cited snippet. When raw adds nothing, exactly one `op: skip` with a reason — not `actions: []`. If not, **Step 3**.
|
|
211
|
-
- [ ] If any edge case condition applies (action/domain Node, note snippets, existing Sections, non-changed-only incremental, or structural defect), the relevant reference's Self-verify items were also satisfied.
|
|
212
|
-
- [ ] NodeContext was the only evidence source — no Read / Glob / Grep / Write / ad-hoc script or shell file traversal against `WORKSPACE_DIR`, `.context`, `/tmp` workflow artifacts, or CLI `--format json` stdout. If any was used, restart from the CLI-provided NodeContext.
|
|
157
|
+
Before returning, ensure `target_node` matches `node.slug`, fields conform to `context schema compile-draft`, `required_preserved_literals[]` are preserved or carried into an evidence-backed skip/repair challenge, and NodeContext was the only evidence source.
|
|
213
158
|
|
|
214
159
|
</procedures>
|
|
@@ -62,7 +62,7 @@ Supported `structure_challenge.kind` values: `missing_action_node`, `extra_actio
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Different `kind` values demand different sub-fields.
|
|
65
|
+
Different `kind` values demand different sub-fields. On shape errors, follow the CLI's top-level diagnostics / `expected_shape` / returned repair `next_action` instead of guessing. `agent_hints[]`, when present, is only a cutover mirror and must not be the source of truth.
|
|
66
66
|
|
|
67
67
|
## What these are NOT
|
|
68
68
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-compile-judge
|
|
3
3
|
description: >
|
|
4
|
-
Packaged skill invoked by `/context:compile`; not a user slash command. Consumes the
|
|
5
|
-
judges each draft action's source support and relation to listed candidates,
|
|
6
|
-
and emits a compile.judge-decisions.
|
|
4
|
+
Packaged skill invoked by `/context:compile`; not a user slash command. Consumes the budget-safe compile prepare summary
|
|
5
|
+
and candidate detail views, judges each draft action's source support and relation to listed candidates,
|
|
6
|
+
and emits a compile.judge-decisions.v2 document for `context reconcile review`.
|
|
7
7
|
tools:
|
|
8
8
|
- Bash
|
|
9
9
|
---
|
|
@@ -16,9 +16,10 @@ decisions only; the CLI reviews, applies, and writes every workspace change.
|
|
|
16
16
|
|
|
17
17
|
## TL;DR — Non-negotiables
|
|
18
18
|
|
|
19
|
-
-
|
|
19
|
+
- Invoke this skill only when the caller's top-level envelope has `next_action.kind: "review_reconcile_decisions"` or the prepare payload contains `judge_handoff`. If the active envelope asks for `patch_compile_draft`, `continue_compile_cycle`, or another action, stop and follow that `next_action.command` instead.
|
|
20
|
+
- Input is the budget-safe compile prepare summary. For items with candidates, load only that item's candidate detail view with `context workflow show --payload prepare --view candidates --item-id <item-id> --unwrap --format json`.
|
|
20
21
|
- Do not inspect workspace storage directly or run ad-hoc scripts to reconstruct candidates. Use only `items[]`, `evidence[]`, `source_support` diagnostics, `candidates[]`, `previous_decisions[]`, and `judge_handoff`.
|
|
21
|
-
- Output exactly one JSON or YAML document with `schema_version: "compile.judge-decisions.
|
|
22
|
+
- Output exactly one JSON or YAML document with `schema_version: "compile.judge-decisions.v2"` and `decisions[]`.
|
|
22
23
|
- Keep one decision per prepared `item_id`, preserving prepare order.
|
|
23
24
|
- For support, output `support_verdict: supported | weak | unsupported` plus `support_reason`.
|
|
24
25
|
- For relation, output `relation_verdict: new | duplicate | supersede | conflict | merge_into` plus `relation_reason`.
|
|
@@ -35,7 +36,7 @@ decisions only; the CLI reviews, applies, and writes every workspace change.
|
|
|
35
36
|
## Output Shape
|
|
36
37
|
|
|
37
38
|
```yaml
|
|
38
|
-
schema_version: "compile.judge-decisions.
|
|
39
|
+
schema_version: "compile.judge-decisions.v2"
|
|
39
40
|
mode: compile
|
|
40
41
|
decisions:
|
|
41
42
|
- item_id: claim-001
|
|
@@ -50,7 +51,7 @@ decisions:
|
|
|
50
51
|
For a relation against an existing candidate:
|
|
51
52
|
|
|
52
53
|
```yaml
|
|
53
|
-
schema_version: "compile.judge-decisions.
|
|
54
|
+
schema_version: "compile.judge-decisions.v2"
|
|
54
55
|
mode: compile
|
|
55
56
|
decisions:
|
|
56
57
|
- item_id: claim-002
|
|
@@ -80,10 +81,11 @@ decisions:
|
|
|
80
81
|
|
|
81
82
|
<procedures>
|
|
82
83
|
|
|
83
|
-
### Step 1 — Load
|
|
84
|
+
### Step 1 — Load Prepare Summary And Candidate Details
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
load
|
|
86
|
+
Use the caller-provided compact prepare output. For every item with candidates,
|
|
87
|
+
load its candidate detail view before judging relation. Do not infer missing
|
|
88
|
+
candidates from memory or bypass the candidate detail view.
|
|
87
89
|
|
|
88
90
|
### Step 2 — Judge Support
|
|
89
91
|
|
|
@@ -101,7 +103,7 @@ candidate list is empty, emit `new` with an empty compared list and
|
|
|
101
103
|
|
|
102
104
|
### Step 4 — Emit Judge Decisions
|
|
103
105
|
|
|
104
|
-
Return only the `compile.judge-decisions.
|
|
106
|
+
Return only the `compile.judge-decisions.v2` document. The caller passes it
|
|
105
107
|
directly to `context reconcile review --decisions -`.
|
|
106
108
|
|
|
107
109
|
</procedures>
|
|
@@ -19,7 +19,7 @@ only; the CLI performs every write.
|
|
|
19
19
|
|
|
20
20
|
## TL;DR — Non-negotiables
|
|
21
21
|
|
|
22
|
-
- Input is the
|
|
22
|
+
- Input is the budget-safe `context reconcile prepare` summary or issues view. When an item lists candidates, load that item's candidate detail view with `context workflow show --payload prepare --view candidates --item-id <item-id> --unwrap --format json`; request broader detail only when a CLI `next_action` or detail command explicitly asks for it. Never `grep` / `sed` / `jq` / `cat` / `head` workflow scratch files or `--format json` stdout to recover prepare fields, and do not Read / Glob / Grep / Write workspace `raw/` / `knowledge/` / `archive/` / `decisions/` — the prepare payload and review output are the only inputs.
|
|
23
23
|
- Ordinary compile prepare judgment belongs to `skill-compile-judge`. Use this skill for refresh/drop/non-compile reconcile, or when compile review asks for scope/omit/user-confirmation reasoning that is outside the judge handoff.
|
|
24
24
|
- Output: one YAML or JSON document conforming to `context schema semantic-decisions --format yaml`. The schema defines canonical `relation` and `action` enums and the per-action required fields; do not memorise the enum list from this skill.
|
|
25
25
|
- Accept a prepared `default_decision` with the compact form `{ item_id, accept_default: true }` (optionally `decided_by` / `rationale`); the CLI hydrates `target` / `proposed`. Empty `decisions: []` means "no items in prepare," not "accept all defaults." Without `--accept-safe-defaults`, emit one compact accept entry per safe default you intend to accept. With `--accept-safe-defaults`, the CLI auto-accepts mechanically safe no-candidate supported writes and reviewed-no-write skips, so emit only the manual decisions that still need judgment.
|
|
@@ -37,7 +37,7 @@ only; the CLI performs every write.
|
|
|
37
37
|
|---|---|
|
|
38
38
|
| `prepare.mode` is `drop` or `refresh` (covers `remove_unsupported` mode semantics, `reanchor`, `split_then_reanchor`) | [references/mode-semantics.md](references/mode-semantics.md) |
|
|
39
39
|
| review returned `support_confirmation`, `omit_confirmation`, `scope_review_required`, or any `ask_user` you need to upgrade to an executable decision | [references/user-confirmation.md](references/user-confirmation.md) |
|
|
40
|
-
| review
|
|
40
|
+
| review diagnostics or cutover hints returned `code: "context-only-leakage-high"` | [references/leakage-and-ownership.md](references/leakage-and-ownership.md) |
|
|
41
41
|
| items carry `temporal_prior` / `source_captured_at` / `temporal_disposition`, `source_support.evidence_block_*`, or prepared long `proposed.content` / `proposed.summary` | [references/temporal-and-evidence.md](references/temporal-and-evidence.md) |
|
|
42
42
|
| considering `action: omit`, or items look redundant / low-value / scope-wrong | [references/scope-review-and-omit.md](references/scope-review-and-omit.md) |
|
|
43
43
|
|
|
@@ -122,7 +122,7 @@ Drop-mode-only branches (`reanchor`, `split_then_reanchor`, `remove_unsupported`
|
|
|
122
122
|
|
|
123
123
|
Emit one document with `schema_version: "1.0"` and `decisions[]`. Include only executable final decisions plus unresolved `ask_user` questions. Do not include prose outside the document.
|
|
124
124
|
|
|
125
|
-
If the latest review rejected the batch with `context-only-leakage-high`, do not convert it into a generic `ask_user`. Follow [references/leakage-and-ownership.md](references/leakage-and-ownership.md): regenerate the affected decision using
|
|
125
|
+
If the latest review rejected the batch with `context-only-leakage-high`, do not convert it into a generic `ask_user`. Follow [references/leakage-and-ownership.md](references/leakage-and-ownership.md): regenerate the affected decision using the review diagnostic's explicit repair options and cited item ids, then rerun `context reconcile review`.
|
|
126
126
|
|
|
127
127
|
### Step 4 — Self-verify
|
|
128
128
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Context-only leakage and ownership upgrades
|
|
2
2
|
|
|
3
|
-
Consult this reference when `context reconcile review` returns
|
|
3
|
+
Consult this reference when `context reconcile review` returns diagnostics or cutover hints with `code: "context-only-leakage-high"`. For runs without that code, ignore this file.
|
|
4
4
|
|
|
5
5
|
## What the hint means
|
|
6
6
|
|