@c4a/context-cli 0.6.0-beta.8 → 0.6.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/LICENSE +21 -0
- package/README.md +129 -137
- package/cli.js +1573 -3320
- package/package.json +18 -3
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -3
- package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -6
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -3
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -6
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugin/.claude-plugin/plugin.json.template +0 -16
- package/plugin/.codex-plugin/plugin.json.template +0 -38
- package/plugin/.cursor-plugin/plugin.json.template +0 -29
- package/plugin/README.md +0 -158
- package/plugin/README_CN.md +0 -142
- package/plugin/assets/icon.svg +0 -3
- package/plugin/assets/logo.svg +0 -3
- package/plugin/assets/workflow-en.png +0 -0
- package/plugin/assets/workflow.png +0 -0
- package/plugin/commands/continue.md +0 -34
- package/plugin/commands/init.md +0 -21
- package/plugin/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugin/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugin/skills/skill-package-output/SKILL.md +0 -180
- package/plugin/skills/skill-prose-align/SKILL.md +0 -322
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugin/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugin/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugin/skills/skill-review-gate/SKILL.md +0 -141
- package/plugin/skills/skill-source-scope/SKILL.md +0 -531
- package/plugin/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/assets/icon.svg +0 -3
- package/plugins/assets/workflow-en.png +0 -0
- package/plugins/assets/workflow.png +0 -0
- package/plugins/codex/assets/workflow-en.png +0 -0
- package/plugins/codex/assets/workflow.png +0 -0
- package/plugins/cursor/assets/icon.svg +0 -3
- package/plugins/cursor/assets/workflow-en.png +0 -0
- package/plugins/cursor/assets/workflow.png +0 -0
- package/scripts/build-plugin.ts +0 -658
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-prose-align
|
|
3
|
-
description: >
|
|
4
|
-
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Uses Context document evidence views to propose, validate, and confirm
|
|
6
|
-
`unapproved/structure.yaml` without reading raw snapshots directly.
|
|
7
|
-
tools:
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# skill-prose-align
|
|
12
|
-
|
|
13
|
-
Turn captured document evidence into confirmed structure.
|
|
14
|
-
|
|
15
|
-
## TL;DR
|
|
16
|
-
|
|
17
|
-
- Use this after document capture, or when the user asks to split, merge,
|
|
18
|
-
reorganize, classify, or relate document evidence.
|
|
19
|
-
- When status is `captured-ready-to-classify`, run every returned capture-phase
|
|
20
|
-
evidence command before editing `src/index.ts`. Use the collection-neutral
|
|
21
|
-
title tree, span index, and exact text to propose a mainline collection; wait
|
|
22
|
-
for user confirmation, then declare matching align/compile/review phases.
|
|
23
|
-
- The first product output is a structure draft, not final page body.
|
|
24
|
-
- Read source material only through CLI evidence views: `read-plan`,
|
|
25
|
-
`source-index`, `span-detail`, `span-text`, `schema`, and
|
|
26
|
-
`structure-summary`. Additional views are diagnostic surfaces; use the route
|
|
27
|
-
and view set returned by the CLI.
|
|
28
|
-
- Write and validate `context.structure.v1` into `unapproved/structure.yaml`.
|
|
29
|
-
Stop for user confirmation before compile.
|
|
30
|
-
- Before semantic judgment, use the CLI `semantic-rules` View to page through
|
|
31
|
-
only `semantic_rules.required`. Use each selection `reason` to keep unrelated
|
|
32
|
-
rules out of the current judgment.
|
|
33
|
-
- Plan source evidence as Sections before promoting any heading to a Node/View.
|
|
34
|
-
Promotion depends on source-backed standalone retrieval identity, not on a
|
|
35
|
-
hard-coded section kind or collection name.
|
|
36
|
-
- Do not produce or validate a structure payload from this entry file alone. A
|
|
37
|
-
ruleset already present in the active context may be reused only when both its
|
|
38
|
-
`handle` and `digest` match. If the context was compacted, the digest changed,
|
|
39
|
-
or the rule content is no longer present, resume the CLI rule-page sequence.
|
|
40
|
-
- When status reaches `structure-ready` or `needs-prose-compile`, hand off to
|
|
41
|
-
`${CLAUDE_PLUGIN_ROOT}/skills/skill-prose-compile/SKILL.md`.
|
|
42
|
-
- Compile, review, close, verify, and build remain separate gates.
|
|
43
|
-
|
|
44
|
-
<reference>
|
|
45
|
-
|
|
46
|
-
## User-Facing Gates
|
|
47
|
-
|
|
48
|
-
Use semantic labels, not SDK function names:
|
|
49
|
-
|
|
50
|
-
| Gate | Say this | Do not say this first |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| Collection classification | "I have inspected the captured evidence. Based on these source characteristics, I recommend this knowledge category; please confirm before I configure compilation." | Guessing from a filename, URL, or SDK collection enum before investigation |
|
|
53
|
-
| Material investigation | "I will read the evidence index and source spans through Context, then propose a structure draft." | `alignProse`, `source-index`, `context.structure.v1` |
|
|
54
|
-
| Structure confirmation | "Confirming this structure freezes page paths, section ownership, and relationships for this compile round." | `unapproved/structure.yaml` as a raw parameter |
|
|
55
|
-
| Compile handoff | "The structure is confirmed; I will switch to source-bound compile for draft pages." | Continuing to edit structure in compile |
|
|
56
|
-
|
|
57
|
-
## Runtime Discipline
|
|
58
|
-
|
|
59
|
-
`skill-continue-workflow` owns global state routing; this Skill owns only the
|
|
60
|
-
align phase selected by that route. Use CLI evidence/rule/diagnostic Views,
|
|
61
|
-
follow their exact continuation commands, and treat hints as subordinate to
|
|
62
|
-
`next_action`. Evidence reads may be parallel; stage, confirm, Review apply,
|
|
63
|
-
close, and build writes remain serial. Never reconstruct digest values or
|
|
64
|
-
inspect CLI-managed state files as a substitute for a View.
|
|
65
|
-
- If a payload is too large for a heredoc, stage it under
|
|
66
|
-
`.tmp/agent-payloads/<run-id>/...` in the workspace root and redirect stdin
|
|
67
|
-
from that file. Never reuse fixed `/tmp/c4a-*` names, and never place agent
|
|
68
|
-
scratch payloads under CLI-managed `.tmp/context-cli/`, `sources/`,
|
|
69
|
-
`unapproved/`, `knowledge/`, `dist/`, or package output directories.
|
|
70
|
-
- If a validation or view response includes `reason_code`, `path`, `missing[]`,
|
|
71
|
-
`diagnostics`, `repair_hints`, or `agent_hints`, treat those fields as the
|
|
72
|
-
repair contract. Do not recover by replaying a stale manual route, editing
|
|
73
|
-
rendered files, or guessing schema aliases.
|
|
74
|
-
|
|
75
|
-
## Evidence Views
|
|
76
|
-
|
|
77
|
-
Recommended read order:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
81
|
-
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
82
|
-
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
83
|
-
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
84
|
-
context run align:<type>:<source>:<collection> --view schema --format json
|
|
85
|
-
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Use CLI-returned `next_command` values for pagination. Do not reconstruct
|
|
89
|
-
documents with ad hoc `cat`, `grep`, or scripts against `sources/` or `.tmp`.
|
|
90
|
-
|
|
91
|
-
## Structure Contract
|
|
92
|
-
|
|
93
|
-
The structure draft uses `schema_version: context.structure.v1` and lives at
|
|
94
|
-
`unapproved/structure.yaml` after staging. It contains:
|
|
95
|
-
|
|
96
|
-
- lifecycle state such as validated/confirmed and frozen snapshot metadata;
|
|
97
|
-
- concept `nodes[]` with stable `node_ref`, `node_type`, title/summary, and
|
|
98
|
-
ownership;
|
|
99
|
-
- materialized `views[]` with `view_ref`, collection, path, section plans, and
|
|
100
|
-
evidence refs;
|
|
101
|
-
- typed edges using the closed set defined by the CLI;
|
|
102
|
-
- unresolved items when evidence is weak, conflicting, or the target node is
|
|
103
|
-
missing.
|
|
104
|
-
|
|
105
|
-
Confirmed structure is a human gate. Validation passing is not the same as
|
|
106
|
-
confirmation. Do not write `lifecycle.state: confirmed`, `confirmed_by`,
|
|
107
|
-
`confirmed_at`, or `structure_digest` until the user has explicitly confirmed
|
|
108
|
-
the structure proposal in the conversation.
|
|
109
|
-
|
|
110
|
-
When the current conversation explicitly authorizes fully managed operation,
|
|
111
|
-
use the CLI-returned `--stage --managed` command after successful validation.
|
|
112
|
-
The CLI records `confirmed_by: managed-session`; validation errors and unresolved
|
|
113
|
-
evidence still block confirmation. Never persist managed mode in `defineProject`
|
|
114
|
-
or reuse it in another conversation.
|
|
115
|
-
|
|
116
|
-
## Procedure References
|
|
117
|
-
|
|
118
|
-
These are current structure planning rules. They define the source-bound
|
|
119
|
-
semantic gates for Node planning, section ownership, and relationship handling.
|
|
120
|
-
|
|
121
|
-
| Decision | Reference |
|
|
122
|
-
|---|---|
|
|
123
|
-
| Structure planning, Node ownership, density, candidate resolution | [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md) |
|
|
124
|
-
| Node type, title, tags, fake entity, action/domain gates, edge gates | [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md) |
|
|
125
|
-
| Source density and coarse reading judgment | [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md) |
|
|
126
|
-
| Candidate anomalies, stable ids, paths, duplicates, and conflicts | [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md) |
|
|
127
|
-
|
|
128
|
-
</reference>
|
|
129
|
-
|
|
130
|
-
<procedures>
|
|
131
|
-
|
|
132
|
-
### Step 1 — Open Material Investigation
|
|
133
|
-
|
|
134
|
-
Run:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
context run align:<type>:<source>:<collection> --view read-plan --format json
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Use the returned views, budgets, snapshot hash, and next actions. If the CLI
|
|
141
|
-
reports a missing or stale snapshot, route back to source capture/refresh. Do
|
|
142
|
-
not read the snapshot file yourself.
|
|
143
|
-
|
|
144
|
-
### Step 2 — Read Evidence Through The Index
|
|
145
|
-
|
|
146
|
-
Read a compact index before requesting exact spans:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
context run align:<type>:<source>:<collection> --view source-index --compact --format json
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
For exact evidence, copy CLI-returned source refs or next commands:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
context run align:<type>:<source>:<collection> --view span-detail --span <source-ref> --format json
|
|
156
|
-
context run align:<type>:<source>:<collection> --view span-text --span <source-ref> --format json
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Keep a short note of what evidence supports each proposed node, section, and
|
|
160
|
-
edge. If the evidence is weak or conflicting, keep it as unresolved instead of
|
|
161
|
-
turning it into a fact.
|
|
162
|
-
|
|
163
|
-
Before drafting structure, read:
|
|
164
|
-
|
|
165
|
-
- [references/internal-procedures/structure-planning.md](references/internal-procedures/structure-planning.md)
|
|
166
|
-
- [references/internal-procedures/structure-planning/references/gates.md](references/internal-procedures/structure-planning/references/gates.md)
|
|
167
|
-
- [references/internal-procedures/structure-planning/references/density-profile.md](references/internal-procedures/structure-planning/references/density-profile.md)
|
|
168
|
-
- [references/internal-procedures/structure-planning/references/candidate-resolution.md](references/internal-procedures/structure-planning/references/candidate-resolution.md)
|
|
169
|
-
|
|
170
|
-
Do not treat this as optional background. These files contain the current
|
|
171
|
-
semantic gates for source-bound structure planning. A structure payload drafted
|
|
172
|
-
without the applicable references is incomplete, even if the CLI schema accepts
|
|
173
|
-
its shape.
|
|
174
|
-
|
|
175
|
-
### Step 3 — Draft And Validate Structure
|
|
176
|
-
|
|
177
|
-
Request the schema:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
context run align:<type>:<source>:<collection> --view schema --format json
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Create a `context.structure.v1` YAML file. The draft may include a one-page-per
|
|
184
|
-
source shape, but that is represented as ordinary nodes and sections; it does
|
|
185
|
-
not bypass structure confirmation.
|
|
186
|
-
|
|
187
|
-
For small payloads, use stdin/heredoc. For larger payloads, write a scratch file
|
|
188
|
-
under `.tmp/agent-payloads/<run-id>/` and pass it through `--input`. Scratch
|
|
189
|
-
files are disposable agent working files; they are never phase state and
|
|
190
|
-
must not be read back as a substitute for CLI views.
|
|
191
|
-
|
|
192
|
-
Validate:
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
context run align:<type>:<source>:<collection> --validate --input <structure.yaml> --format json
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Validation returns a compact summary and writes a temporary HTML report under
|
|
199
|
-
`.tmp/context-runtime/reports/`. A validation report with
|
|
200
|
-
`confirmation_ready=false` is an Agent repair artifact, not a user review gate:
|
|
201
|
-
do not ask the user to approve it. The staged report produced after
|
|
202
|
-
`confirmation_ready=true` is the final review surface; use its
|
|
203
|
-
`structure_report.file_url` as the primary user-facing link and include
|
|
204
|
-
`structure_report.absolute_path` as a copyable fallback.
|
|
205
|
-
If the user needs a focused view, run:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
context run align:<type>:<source>:<collection> --view structure-summary --input <structure.yaml> --format json
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
The explicit `structure-summary` View returns the full summary for focused
|
|
212
|
-
debugging. For user confirmation, prioritize the default first-screen fields:
|
|
213
|
-
`review_notice`, `structure_report`, and `structure_summary_compact`. A valid
|
|
214
|
-
user-facing confirmation prompt must include the report `file_url`, the absolute
|
|
215
|
-
path fallback, and a compact summary of collections/views/unresolved/diagnostics.
|
|
216
|
-
Do not ask the user to confirm from counts alone.
|
|
217
|
-
|
|
218
|
-
Repair diagnostics by routing them to the right decision:
|
|
219
|
-
|
|
220
|
-
- source ref or snapshot mismatch -> reread evidence views or refresh capture;
|
|
221
|
-
- unsupported node/section/edge -> remove it or mark unresolved;
|
|
222
|
-
- duplicate/conflict -> ask the user which structure should win;
|
|
223
|
-
- illegal edge type, missing target node, or edge without source refs -> fix the
|
|
224
|
-
structure or keep the relation unresolved;
|
|
225
|
-
- stale structure -> regenerate from the current snapshot hash.
|
|
226
|
-
|
|
227
|
-
When validation returns `repair_confirmation_blockers`, follow its exact repair
|
|
228
|
-
route without stopping for human confirmation. `--repair suggested-splits`
|
|
229
|
-
mechanically splits non-contiguous source mirror Sections; write its
|
|
230
|
-
`repaired_payload` to a scratch YAML file and validate again. For oversized
|
|
231
|
-
Views, use the returned child-View and contains-edge suggestions, but classify
|
|
232
|
-
each child Node from evidence instead of mechanically inheriting the parent
|
|
233
|
-
type. Repair other diagnostics from evidence and validate again. Ask the user only when evidence
|
|
234
|
-
supports multiple incompatible semantic choices, and label that question as a
|
|
235
|
-
structure-design choice rather than final review. Do not stage until
|
|
236
|
-
`confirmation_ready=true`.
|
|
237
|
-
|
|
238
|
-
### Step 4 — Review Structure Before Confirmation
|
|
239
|
-
|
|
240
|
-
After validation reports `confirmation_ready=true`, stage the draft. The stage
|
|
241
|
-
command opens the final report. Then show the user:
|
|
242
|
-
|
|
243
|
-
- node list and planned paths;
|
|
244
|
-
- section ownership;
|
|
245
|
-
- typed edges and unresolved relation candidates;
|
|
246
|
-
- expected compile order;
|
|
247
|
-
- downstream impact: these choices freeze paths, section ownership, and
|
|
248
|
-
relationships for this compile round.
|
|
249
|
-
- the `structure_report.file_url` generated by validate or `--view
|
|
250
|
-
structure-summary`;
|
|
251
|
-
- the `structure_report.absolute_path` fallback in case the host cannot click
|
|
252
|
-
file URLs.
|
|
253
|
-
|
|
254
|
-
If the CLI stage result includes `next_action.human_gate: true`, treat it as a
|
|
255
|
-
hard stop for structure review. Do not ask for a blind "confirm structure"
|
|
256
|
-
reply. Surface the report `file_url`, absolute path, and enough structured
|
|
257
|
-
summary for the user to inspect what will be confirmed.
|
|
258
|
-
|
|
259
|
-
Do not turn `confirmation_blockers` into a preliminary approval round. A
|
|
260
|
-
validator-required page split, continuous-source split, ref repair, or
|
|
261
|
-
structure-spine connection is work to resolve before staging. If a genuinely
|
|
262
|
-
ambiguous semantic choice needs the user, ask only that choice and then resume
|
|
263
|
-
repair; it does not replace the final report-based confirmation.
|
|
264
|
-
|
|
265
|
-
Use the host's multi-choice question tool when available. If unavailable, use a
|
|
266
|
-
short Markdown fallback. Good options are:
|
|
267
|
-
|
|
268
|
-
- Confirm this structure and continue to compile.
|
|
269
|
-
- Revise the structure with additional guidance.
|
|
270
|
-
- Go back to source scope or capture because the evidence set is wrong.
|
|
271
|
-
|
|
272
|
-
Only after confirmation, run the CLI confirmation command, normally:
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
context run align:<type>:<source>:<collection> --confirm --format json
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
If confirming a structure file other than `unapproved/structure.yaml`, pass it
|
|
279
|
-
with `--input <structure.yaml>`. A draft stage in `unapproved/structure.yaml` is
|
|
280
|
-
not confirmation. Do not edit `unapproved/structure.yaml` after confirmation to
|
|
281
|
-
change meaning; return to this gate instead.
|
|
282
|
-
|
|
283
|
-
### Step 5 — Handoff To Compile
|
|
284
|
-
|
|
285
|
-
After the user confirms the structure and the CLI reports `structure-ready` or
|
|
286
|
-
`needs-prose-compile`, stop this procedure and follow:
|
|
287
|
-
|
|
288
|
-
```text
|
|
289
|
-
${CLAUDE_PLUGIN_ROOT}/skills/skill-prose-compile/SKILL.md
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
Do not keep editing structure while compiling. If compile diagnostics show the
|
|
293
|
-
planned structure is wrong, return to this align gate and ask the user to
|
|
294
|
-
confirm the corrected structure.
|
|
295
|
-
|
|
296
|
-
### Step 6 — Self-verify Checklist
|
|
297
|
-
|
|
298
|
-
- [ ] Evidence came only from Context evidence views.
|
|
299
|
-
- [ ] `context.structure.v1` was validated before user confirmation.
|
|
300
|
-
- [ ] User confirmed the structure before compile.
|
|
301
|
-
- [ ] Compile was delegated to `skill-prose-compile`; this procedure did not
|
|
302
|
-
write draft page body.
|
|
303
|
-
- [ ] Relationships are expressed as structure edges or unresolved items.
|
|
304
|
-
- [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
|
|
305
|
-
`knowledge/`, review HTML, or `dist/`.
|
|
306
|
-
|
|
307
|
-
### Final Report
|
|
308
|
-
|
|
309
|
-
Report in the user's language. Include only:
|
|
310
|
-
|
|
311
|
-
- evidence views actually read;
|
|
312
|
-
- proposed and confirmed node count, section count, edge count, and unresolved
|
|
313
|
-
count;
|
|
314
|
-
- user confirmation outcome;
|
|
315
|
-
- validation warnings that still matter for compile;
|
|
316
|
-
- next route reported by status or the align phase.
|
|
317
|
-
|
|
318
|
-
Do not report payload digests, snapshot hashes, source-ref hashes, absolute
|
|
319
|
-
paths, or scratch file paths unless the CLI explicitly asks the user to repair
|
|
320
|
-
one.
|
|
321
|
-
|
|
322
|
-
</procedures>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# Candidate Resolution Rules
|
|
2
|
-
|
|
3
|
-
Use these rules after reading the current align evidence views and before
|
|
4
|
-
authoring `context.structure.v1`. They define how current anomaly diagnostics
|
|
5
|
-
map to supported structure outcomes.
|
|
6
|
-
|
|
7
|
-
## Anomaly Signals
|
|
8
|
-
|
|
9
|
-
Anomaly diagnostics are mechanical warnings. Do not ignore them and do not treat
|
|
10
|
-
them as recommendations.
|
|
11
|
-
|
|
12
|
-
For each anomaly, choose one current outcome and record the reasoning in the
|
|
13
|
-
structure payload or user-facing explanation:
|
|
14
|
-
|
|
15
|
-
| Outcome | Use When |
|
|
16
|
-
|---|---|
|
|
17
|
-
| Accept the correction | The anomaly points to a real structure fix. Apply a concrete node, section, edge, or ownership correction supported by source refs. |
|
|
18
|
-
| Dismiss with rationale | The warning is mechanically true but semantically harmless. Keep the structure and state why in the confirmation summary. |
|
|
19
|
-
| Keep unresolved | The warning changes structure but source evidence is insufficient. Add an `unresolved[]` item instead of guessing. |
|
|
20
|
-
|
|
21
|
-
Known anomaly kinds:
|
|
22
|
-
|
|
23
|
-
| Kind | Meaning | Required handling |
|
|
24
|
-
|---|---|---|
|
|
25
|
-
| Missing evidence | A proposed node, section, or edge has no source-backed evidence. | Add source refs, remove it, or keep the issue unresolved. |
|
|
26
|
-
| Structure churn | A node was renamed, split, merged, replaced, or rejected during investigation. | Confirm the final id/title/target with the user or keep the ambiguity unresolved. |
|
|
27
|
-
| Duplicate evidence | The same source ref appears more than once for the same semantic role. | Deduplicate it or explain why the repeated ref supports different roles. |
|
|
28
|
-
| Broad review needed | The CLI collapsed many anomalies or reports aggregate risk. | Review the affected structure broadly; do not finalize solely from ordering. |
|
|
29
|
-
|
|
30
|
-
## Stable References
|
|
31
|
-
|
|
32
|
-
Use stable `node_ref`, `view_ref`, and `section_ref` values from the current
|
|
33
|
-
`context.structure.v1` payload for in-payload references. A NodeRef should be
|
|
34
|
-
safe, lower-case, and path-shaped, such as `entity/rspack` or
|
|
35
|
-
`domain/build-tooling`. `slug` and `path` are derived fields in the current
|
|
36
|
-
flow; do not invent alternate reference aliases.
|
|
37
|
-
|
|
38
|
-
When an edge or section points at knowledge:
|
|
39
|
-
|
|
40
|
-
- use the schema ref that matches the target layer:
|
|
41
|
-
`node_ref` for a conceptual Node, `view_ref` for a collection view, and
|
|
42
|
-
`section_ref` for a planned section;
|
|
43
|
-
- ensure the target NodeRef, ViewRef, or SectionRef exists in the current
|
|
44
|
-
structure or approved knowledge;
|
|
45
|
-
- keep relation hints unresolved when the target does not exist;
|
|
46
|
-
- follow CLI diagnostics if a ref is unknown or stale.
|
|
47
|
-
|
|
48
|
-
Do not create alternate alias fields or non-schema candidate ledger fields.
|
|
49
|
-
They are not part of the current structure contract.
|
|
50
|
-
|
|
51
|
-
## Visible Labels And Audit Rationale
|
|
52
|
-
|
|
53
|
-
Humans need to understand merge, reject, rename, and replacement choices
|
|
54
|
-
without decoding temporary ids. Keep that discipline in the current structure
|
|
55
|
-
flow through current fields:
|
|
56
|
-
|
|
57
|
-
- use `title` and `summary` to name the final node in user-facing language;
|
|
58
|
-
- explain renamed/split/merged candidates in the confirmation summary, not by
|
|
59
|
-
adding non-schema label fields;
|
|
60
|
-
- when a relation or rename cannot be settled from evidence, put the visible
|
|
61
|
-
title/target clue in `unresolved[]`;
|
|
62
|
-
- when asking the user, phrase the choice with business labels ("Rspack build
|
|
63
|
-
tool page" vs "Webpack page"), not with source refs or internal section ids.
|
|
64
|
-
|
|
65
|
-
NodeRef is the stable conceptual identity. ViewRef is the collection-specific
|
|
66
|
-
view identity and is the durable approved-page identity. SectionRef is the
|
|
67
|
-
stable planned-section identity under a ViewRef. Package paths are derived from
|
|
68
|
-
the approved ViewRef plus containment/slug; do not treat paths as an alternate
|
|
69
|
-
identity contract. Visible labels help humans review the choice, but they do
|
|
70
|
-
not authorize a different NodeRef, ViewRef, edge, or section ownership without
|
|
71
|
-
source-backed evidence and user confirmation.
|
|
72
|
-
|
|
73
|
-
## Duplicate And Conflict Handling
|
|
74
|
-
|
|
75
|
-
- Exact duplicate structure -> keep one node/section/edge and explain the
|
|
76
|
-
duplicate in the confirmation summary.
|
|
77
|
-
- Same topic but different evidence boundary -> keep separate sections only
|
|
78
|
-
when each section has a distinct source-backed role.
|
|
79
|
-
- Conflicting facts -> ask the user or keep an `unresolved[]` item. Do not
|
|
80
|
-
pick a winner from title order or source order.
|
|
81
|
-
- Replacement or rename -> ask the user when it changes NodeRef, ViewRef,
|
|
82
|
-
containment, slug, or the derived approved path. These are durable user-facing
|
|
83
|
-
identities, not disposable labels.
|
|
84
|
-
|
|
85
|
-
## Self-verify
|
|
86
|
-
|
|
87
|
-
- [ ] Every accepted node, section, and edge has source-backed support.
|
|
88
|
-
- [ ] Every unresolved relation or conflict is explicit in `unresolved[]`.
|
|
89
|
-
- [ ] No non-schema candidate ledger fields or alias fields appear in the payload.
|
|
90
|
-
- [ ] NodeRef, ViewRef, and SectionRef values, not temporary labels or paths,
|
|
91
|
-
are used for current references.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Evidence Density Selection
|
|
2
|
-
|
|
3
|
-
Use density as a private reading and section-planning strategy. It is not a
|
|
4
|
-
separate payload, not a quality score, and not a workflow stage. Persist only
|
|
5
|
-
current `context.structure.v1` fields such as `nodes[]`, `sections[]`,
|
|
6
|
-
`source_refs[]`, `edges[]`, and `unresolved[]`.
|
|
7
|
-
|
|
8
|
-
Apply this reference when a captured source is long, dense, fragmented, or hard
|
|
9
|
-
to split into stable planned sections. Use the current CLI evidence views
|
|
10
|
-
(`read-plan`, `source-index`, `span-detail`, `span-text`) to inspect material;
|
|
11
|
-
do not invent a separate coarse-read artifact.
|
|
12
|
-
|
|
13
|
-
| Profile | Use When | Agent Behavior |
|
|
14
|
-
|---|---|---|
|
|
15
|
-
| `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. |
|
|
16
|
-
| `meso` | Default for normal product, design, or operational documents with several related sections. | Produce section proposals for meaningful local units and preserve evidence anchors. |
|
|
17
|
-
| `micro` | The source is fragmented, note-like, or dense with short independent claims. | Keep section proposals narrow and avoid bundling unrelated blocks into one candidate. |
|
|
18
|
-
| `single_pass` | The source is short enough that one read can safely discover all relevant structure. | Keep anchors minimal and avoid over-segmentation, but still validate the resulting structure. |
|
|
19
|
-
|
|
20
|
-
Treat Markdown heading changes as section-planning hints, not hard boundaries.
|
|
21
|
-
Sibling sub-headings under a shared parent can remain in one planned section
|
|
22
|
-
when they form one coherent semantic topic for that parent. Headings with no
|
|
23
|
-
shared parent should usually split unless you intentionally want one section to
|
|
24
|
-
span them. When a dense source has many headings, split by heading first, then
|
|
25
|
-
merge adjacent or sibling groups only when the merged section is still one
|
|
26
|
-
coherent fact group.
|
|
27
|
-
|
|
28
|
-
Do not let density alone choose `node_type`, `tags`, `section.kind`, or body
|
|
29
|
-
content. Action/domain gates are decided from source evidence and the current
|
|
30
|
-
schema, not from density metadata.
|