@c4a/context-cli 0.6.0-beta.4 → 0.6.0-beta.6
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 +17 -2
- package/cli.js +20831 -18799
- package/package.json +2 -2
- package/plugin/skills/skill-continue-workflow/SKILL.md +25 -2
- package/plugin/skills/skill-prose-align/SKILL.md +25 -9
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugin/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugin/skills/skill-review-gate/SKILL.md +38 -9
- package/plugin/skills/skill-source-scope/SKILL.md +197 -102
- package/plugin/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +25 -2
- package/plugins/claude/skills/skill-prose-align/SKILL.md +25 -9
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugins/claude/skills/skill-review-gate/SKILL.md +38 -9
- package/plugins/claude/skills/skill-source-scope/SKILL.md +197 -102
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +25 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +38 -9
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +197 -102
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +25 -2
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +38 -9
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +197 -102
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +25 -2
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +25 -9
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +38 -9
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +197 -102
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +25 -2
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +38 -9
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +197 -102
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +25 -2
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +38 -9
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +197 -102
|
@@ -60,7 +60,7 @@ Use semantic labels, not SDK function names:
|
|
|
60
60
|
|
|
61
61
|
## Runtime Discipline
|
|
62
62
|
|
|
63
|
-
- Follow `context status`, `routing.
|
|
63
|
+
- Follow `context status`, `routing.command_plan`, compile view
|
|
64
64
|
`next_action`, and validation diagnostics. Treat CLI commands as the source
|
|
65
65
|
of truth.
|
|
66
66
|
- Use only the returned `next_action.command` for the next required write.
|
|
@@ -75,6 +75,9 @@ Use semantic labels, not SDK function names:
|
|
|
75
75
|
views.
|
|
76
76
|
- Run one write at a time. Do not parallelize compile stage, review apply,
|
|
77
77
|
close, or build writes.
|
|
78
|
+
- One write still means one View, not one human Review. Stage every View in the
|
|
79
|
+
same confirmed structure sequentially, follow `continue_compile_batch`, and
|
|
80
|
+
open Review only after the CLI reports that the whole batch is prepared.
|
|
78
81
|
- Compile does not get a second, looser rule set. If a rule conflicts with the
|
|
79
82
|
current CLI schema or diagnostics, follow the CLI and repair the payload.
|
|
80
83
|
- Write digest/hash flags are stale guards. Use values returned by the CLI; do
|
|
@@ -226,13 +229,21 @@ Stage only after validation has no errors:
|
|
|
226
229
|
context run compile:<type>:<source>:<collection> --stage --input <compile-actions.yaml> --format json
|
|
227
230
|
```
|
|
228
231
|
|
|
229
|
-
After staging,
|
|
230
|
-
|
|
231
|
-
`
|
|
232
|
+
After staging, follow `next_action` exactly:
|
|
233
|
+
|
|
234
|
+
- `continue_compile_batch` with `human_gate=false`: move to the returned next
|
|
235
|
+
View and repeat **Step 2–4**. Do not open Review yet.
|
|
236
|
+
- `review_candidates` with `human_gate=true`: every planned View in this
|
|
237
|
+
confirmed structure is prepared; return to `context status`, then delegate
|
|
238
|
+
one collection-level Review to
|
|
239
|
+
`skill-review-gate.md`.
|
|
240
|
+
|
|
241
|
+
The CLI blocks Review and close while confirmed Views remain unprepared. Do not
|
|
242
|
+
turn sequential View writes into sequential user approvals.
|
|
232
243
|
|
|
233
244
|
### Step 5 — Close Handoff
|
|
234
245
|
|
|
235
|
-
After review apply, return to `context status`. If status says
|
|
246
|
+
After the single batch review apply, return to `context status`. If status says
|
|
236
247
|
`compile-close-needed`, run deterministic close:
|
|
237
248
|
|
|
238
249
|
```bash
|
|
@@ -257,6 +268,7 @@ Then route to package output when status reaches `ready-to-build`.
|
|
|
257
268
|
verbatim text.
|
|
258
269
|
- [ ] No direct edits were made to `sources/`, `.tmp`, `unapproved/`,
|
|
259
270
|
`knowledge/`, review HTML, or `dist/`.
|
|
271
|
+
- [ ] Every planned View was staged before opening the one batch Review.
|
|
260
272
|
|
|
261
273
|
### Final Report
|
|
262
274
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: skill-review-gate
|
|
3
3
|
description: >
|
|
4
4
|
Internal procedure invoked by the public Context continuation entry; not a user slash command.
|
|
5
|
-
Opens the review UI, waits for user decisions, applies copied
|
|
5
|
+
Opens the review UI, waits for user decisions, applies copied review decision Payloads,
|
|
6
6
|
and prevents agent-authored approval/rejection decisions unless the user
|
|
7
7
|
explicitly requests the scoped quick-decision path.
|
|
8
8
|
tools:
|
|
@@ -16,19 +16,32 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
16
16
|
## TL;DR
|
|
17
17
|
|
|
18
18
|
- The agent never approves or rejects candidates on the user's behalf.
|
|
19
|
-
-
|
|
19
|
+
- Enter this skill only when the preceding command returns
|
|
20
|
+
`next_action.human_gate=true`. A no-delta codegraph run returns false and does
|
|
21
|
+
not need Review.
|
|
22
|
+
- For prose, enter only after every View in the confirmed compile batch is
|
|
23
|
+
prepared. For codegraph, enter only after all pending extract phases in the
|
|
24
|
+
confirmed module round are complete. The CLI blocks partial-batch Review.
|
|
25
|
+
- Use `context review html <collection> --open --format json` for visual review.
|
|
20
26
|
- `<collection>` is an internal production collection such as `architecture`,
|
|
21
27
|
`sop`, `decision`, or `standards`; it is not an OKF package root such as
|
|
22
28
|
`wikis`, `guides`, or `rules`.
|
|
23
29
|
- Always surface the CLI-printed `file_url`. If browser opening fails or the
|
|
24
30
|
host cannot make a path clickable, also provide `absolute_path`.
|
|
25
|
-
- Apply only the
|
|
31
|
+
- Apply only the review decision Payload copied by the user from the review UI.
|
|
26
32
|
- Do not parse `unapproved/entities.jsonl`, `.tmp`, or HTML internals with
|
|
27
33
|
scripts to synthesize decisions.
|
|
28
34
|
- If the user explicitly asks for quick or automated approval/rejection, use
|
|
29
35
|
`context review approve <candidate-id> --collection <collection>` /
|
|
30
36
|
`context review reject <candidate-id> --collection <collection>` or `--all`;
|
|
31
37
|
these commands still enforce the current scoped candidate-id gate.
|
|
38
|
+
- `context run <extract-phase-id> --auto-promote` is a separate, explicit
|
|
39
|
+
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
40
|
+
refresh deterministic close, and verify them without this gate; it never
|
|
41
|
+
applies to semantic knowledge. Package build remains an explicit later step.
|
|
42
|
+
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
43
|
+
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
44
|
+
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
32
45
|
|
|
33
46
|
<procedures>
|
|
34
47
|
|
|
@@ -37,12 +50,14 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
37
50
|
For the internal collection reported by status, run:
|
|
38
51
|
|
|
39
52
|
```bash
|
|
40
|
-
context review html <collection> --open
|
|
53
|
+
context review html <collection> --open --format json
|
|
41
54
|
```
|
|
42
55
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
Inspect the returned `opened` field. When it is `true`, tell the user the page
|
|
57
|
+
was opened. When it is `false`, do not claim it opened; report `open_error` and
|
|
58
|
+
provide `file_url` as the primary clickable link plus `absolute_path` as a
|
|
59
|
+
copyable fallback. Do not drop `--open`, and do not assume a fixed review
|
|
60
|
+
filename; review scope is collection or `--all`.
|
|
46
61
|
Do not substitute OKF package roots (`wikis`, `guides`, `rules`) for this
|
|
47
62
|
argument; review scope is the internal collection namespace.
|
|
48
63
|
|
|
@@ -54,7 +69,8 @@ must not choose these states.
|
|
|
54
69
|
### Step 2 — Wait For Payload
|
|
55
70
|
|
|
56
71
|
Ask the user to review candidates in the HTML page, open Payload, copy the
|
|
57
|
-
compact
|
|
72
|
+
compact review decision Payload, and paste it into the agent chat. Uniform
|
|
73
|
+
decisions produce one JSON line; exceptions add JSONL lines. The Payload records the
|
|
58
74
|
user's decisions, usually as a default decision plus exceptions, so it should
|
|
59
75
|
not be expanded into pretty JSON unless the user asks.
|
|
60
76
|
|
|
@@ -62,7 +78,7 @@ The user should not need to create a payload file manually. Do not continue
|
|
|
62
78
|
until the user supplies that payload.
|
|
63
79
|
|
|
64
80
|
If the user instead explicitly asks the agent to use the quick approval or
|
|
65
|
-
rejection path, do not synthesize
|
|
81
|
+
rejection path, do not synthesize a decision Payload. Run the scoped quick command with the
|
|
66
82
|
candidate id shown by review/list/status and either `--collection <collection>`
|
|
67
83
|
or `--all`.
|
|
68
84
|
|
|
@@ -85,6 +101,19 @@ commands to store this payload.
|
|
|
85
101
|
Run `context status` after apply. If it reports package output choice, return to
|
|
86
102
|
`skill-continue-workflow.md`.
|
|
87
103
|
|
|
104
|
+
If status instead reports `approved-source-ref-ambiguous` for a pre-file-aware
|
|
105
|
+
codegraph ref, explain that the user's decisions remain approved. Rerun its
|
|
106
|
+
declared extraction phase to refresh the symbol index, then run:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
context review migrate-codegraph-refs
|
|
110
|
+
context verify
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Do not reopen Review, synthesize another payload, delete approved pages, or
|
|
114
|
+
filter conflicting symbols. If the ref is already file-aware, report a
|
|
115
|
+
duplicate extract-index defect rather than running the metadata migration.
|
|
116
|
+
|
|
88
117
|
### Step 5 — Self-verify Checklist
|
|
89
118
|
|
|
90
119
|
- [ ] Every decision came from the user's copied payload. If not, stop and
|
|
@@ -13,14 +13,27 @@ tools:
|
|
|
13
13
|
Current capture discipline for document sources. The executable path is source
|
|
14
14
|
registration plus the declared capture phase flow:
|
|
15
15
|
|
|
16
|
-
- local Markdown/MDX file source: `context source add file --local <path>`
|
|
17
|
-
followed by `context run capture:file
|
|
18
|
-
- Lark/Feishu source: `context source add lark
|
|
19
|
-
`context run capture:lark
|
|
16
|
+
- local Markdown/MDX file source: `context source add file [YYYYMMDD] --module <module> --local <path>`
|
|
17
|
+
followed by `context run capture:file:YYYYMMDD/<module> --format json`;
|
|
18
|
+
- Lark/Feishu source: `context source add lark [YYYYMMDD] --module <module> ...`
|
|
19
|
+
followed by `context run capture:lark:YYYYMMDD/<module> --format json`;
|
|
20
20
|
- refresh: rerun the same declared capture phase after status or the user asks
|
|
21
21
|
for recapture.
|
|
22
22
|
|
|
23
23
|
Use only commands surfaced by the current status output or capture phase.
|
|
24
|
+
For a user-confirmed multi-document batch, `context status --format json`
|
|
25
|
+
returns every uncaptured module in `routing.command_plan`. Run the complete
|
|
26
|
+
list in order; a successful module is omitted from the next status result.
|
|
27
|
+
When the user explicitly asks to capture, ingest, fetch, read, or include exact
|
|
28
|
+
file/Lark paths or URLs, that request is the read permission for those sources;
|
|
29
|
+
do not repeat the question after registration. A mere mention, possible-source
|
|
30
|
+
discussion, or register-only request is not permission, and an explicit refusal
|
|
31
|
+
always wins.
|
|
32
|
+
Register several file/Lark/repo sources with `context source add batch [date]
|
|
33
|
+
--input <yaml|json|->`; do not launch multiple `source add` processes in
|
|
34
|
+
parallel. Repo batch items require `module`; file/Lark items may omit it and use
|
|
35
|
+
the module returned by the CLI. A write-lock error means another Context mutation is active: wait for
|
|
36
|
+
it to finish and retry rather than editing registry files.
|
|
24
37
|
|
|
25
38
|
---
|
|
26
39
|
|
|
@@ -53,8 +66,9 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
|
|
|
53
66
|
|
|
54
67
|
- One or more local `.md` / `.mdx` files or a local documentation folder to ingest →
|
|
55
68
|
register one file source with the user-confirmed boundary:
|
|
56
|
-
`context source add file --local <file-or-folder>`.
|
|
57
|
-
|
|
69
|
+
`context source add file [YYYYMMDD] --module <module> --local <file-or-folder>`.
|
|
70
|
+
The CLI returns the `YYYYMMDD/module` identity to use in project phases. More
|
|
71
|
+
than one file module may share the date. For an explicit
|
|
58
72
|
batch inside a broader folder, preserve the user's include list on source
|
|
59
73
|
registration. Default file capture handles `.md`. If the CLI reports
|
|
60
74
|
document-site files such as `.mdx`, `_meta.json`, sidebars, or docs config,
|
|
@@ -66,15 +80,17 @@ Before choosing a local Markdown capture route, honor the surrounding task conte
|
|
|
66
80
|
`__context_route_metadata.md` as mechanical route evidence; it also extracts
|
|
67
81
|
static MDX component props/children into `__context_mdx_component_text.md`
|
|
68
82
|
when components carry user-facing text. Declare
|
|
69
|
-
`captureFile({ source: source("<
|
|
70
|
-
run `context run capture:file:<
|
|
83
|
+
`captureFile({ source: source("<date>", "<module>", { type: "file" }), processor: mdxJsonDocs() })`, then
|
|
84
|
+
run `context run capture:file:<date>/<module> --format json`. If the selected MDX page
|
|
71
85
|
is empty or only mounts runtime-rendered content, tell the user that capture
|
|
72
86
|
found a document-site shell and ask for the rendered-site or data-source
|
|
73
87
|
boundary instead of inventing body text.
|
|
74
88
|
- A Lark/Feishu URL, doc token, or wiki token → register one Lark source:
|
|
75
|
-
`context source add lark --url <url>` or the
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
`context source add lark [YYYYMMDD] --module <module> --url <url>` or the
|
|
90
|
+
matching token flag. Register every requested document under the same date;
|
|
91
|
+
do not ask for `YYYYMMDD-2`. Declare
|
|
92
|
+
`captureLark({ source: source("<date>", "<module>", { type: "lark" }) })`,
|
|
93
|
+
then run `context run capture:lark:<date>/<module> --format json`.
|
|
78
94
|
- Mixed local document and Lark document batches are separate sources unless
|
|
79
95
|
the current CLI explicitly offers a combined source contract. Do not write an
|
|
80
96
|
Agent-side URL/file loop.
|
|
@@ -99,7 +115,11 @@ registration; do not read file bodies before capture permission is clear.
|
|
|
99
115
|
Report the CLI output verbatim. If the CLI reports `N sources changed`, suggest the right next step:
|
|
100
116
|
|
|
101
117
|
- Run `context status --format json` and use its `state`, `routing`, and
|
|
102
|
-
`
|
|
118
|
+
`command_plan`; if status returns `needs-capture-phase`, first perform the
|
|
119
|
+
exact `routing.configuration` edit and rerun status.
|
|
120
|
+
- While status remains `needs-capture`, execute every returned capture command
|
|
121
|
+
for the already confirmed batch before asking another naming, collection, or
|
|
122
|
+
read-permission question.
|
|
103
123
|
- If status reports `captured-ready-to-investigate`, suggest the returned
|
|
104
124
|
`context run align:<type>:<source>:<collection> --view read-plan --format json`
|
|
105
125
|
command and hand off to `skill-prose-align`.
|