@c4a/context-cli 0.6.1-beta.2 → 0.6.1-beta.4
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 +20 -9
- package/README.zh-CN.md +10 -8
- package/cli.js +66051 -62866
- package/docs/quickstart.md +13 -0
- package/package.json +3 -3
- package/plugins/README.md +18 -2
- package/plugins/README_CN.md +16 -2
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/continue.md +33 -4
- package/plugins/claude/commands/init.md +21 -17
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/SKILL.md +33 -4
- package/plugins/codex/skills/init/SKILL.md +23 -19
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/context-continue.md +33 -4
- package/plugins/cursor/commands/context-init.md +24 -20
- package/plugins/skills/context-continue/SKILL.md +33 -4
- package/plugins/skills/context-init/SKILL.md +23 -19
- package/providers/context/actions/accept-package-templates.yaml +5 -0
- package/providers/context/actions/align-next.yaml +1 -1
- package/providers/context/actions/apply-managed-review.yaml +0 -1
- package/providers/context/actions/apply-structure-confirmation.yaml +0 -1
- package/providers/context/actions/capture-next.yaml +0 -1
- package/providers/context/actions/compile-next.yaml +0 -1
- package/providers/context/actions/configure-code-extraction.yaml +0 -1
- package/providers/context/actions/configure-document-capture.yaml +0 -1
- package/providers/context/actions/configure-package-output.yaml +0 -1
- package/providers/context/actions/configure-prose-lifecycle.yaml +0 -1
- package/providers/context/actions/ensure-repository-sources.yaml +1 -1
- package/providers/context/actions/extract-next.yaml +0 -1
- package/providers/context/actions/repair-project-entry.yaml +0 -1
- package/providers/context/actions/repair-workspace-state.yaml +0 -1
- package/providers/context/codes.yaml +2 -0
- package/providers/context/graphs/workspace.yaml +26 -1
- package/providers/context/manifest.json +95 -68
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/diagnostics/projection-stale.md +13 -0
- package/providers/context/resources/dialogue/document-classification.md +2 -1
- package/providers/context/resources/dialogue/package-output.md +5 -7
- package/providers/context/resources/manuals/guides/package-outputs.md +40 -37
- package/providers/context/resources/manuals/reference/package-templates.md +36 -48
- package/providers/context/resources/manuals/reference/project-api.md +95 -12
- package/providers/context/resources/manuals/reference/template-variables.md +12 -11
- package/providers/context/resources/procedures/close-and-build.md +3 -2
- package/providers/context/resources/procedures/code-extraction.md +16 -2
- package/providers/context/resources/procedures/document-capture.md +14 -0
- package/providers/context/resources/procedures/document-classification.md +3 -1
- package/providers/context/resources/procedures/evidence-maintenance.md +0 -1
- package/providers/context/resources/procedures/knowledge-review.md +0 -1
- package/providers/context/resources/procedures/package-output.md +17 -11
- package/providers/context/resources/procedures/project-configuration.md +0 -1
- package/providers/context/resources/procedures/prose-align.md +45 -0
- package/providers/context/resources/procedures/verify-and-repair.md +0 -1
- package/providers/context/resources/semantic/align/candidate-resolution.md +4 -2
- package/providers/context/resources/semantic/align/structure-planning.md +24 -8
- package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
package/docs/quickstart.md
CHANGED
|
@@ -31,6 +31,13 @@ Create a standalone workspace:
|
|
|
31
31
|
context init context
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
Choose the generated workspace and starter-template language explicitly when
|
|
35
|
+
needed; the CLI does not infer it from terminal locale or conversation text:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
context init context --language zh-CN
|
|
39
|
+
```
|
|
40
|
+
|
|
34
41
|
Then enter it and install dependencies:
|
|
35
42
|
|
|
36
43
|
```bash
|
|
@@ -68,6 +75,12 @@ The CLI performs mechanical work such as source registration, capture,
|
|
|
68
75
|
validation, review application, verify, close, and build. The agent performs
|
|
69
76
|
semantic judgment only when the workflow asks for it.
|
|
70
77
|
|
|
78
|
+
When the user explicitly requests fully managed operation, the Agent may use
|
|
79
|
+
`context run --managed --until blocked-or-complete --format json` to collapse
|
|
80
|
+
consecutive deterministic routes. The CLI re-evaluates every revision and
|
|
81
|
+
stops before semantic reads, configuration, missing authority, diagnostics, or
|
|
82
|
+
multiple commands.
|
|
83
|
+
|
|
71
84
|
## 4. Manual Orientation
|
|
72
85
|
|
|
73
86
|
When operating without an agent plugin, start with:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.6.1-beta.
|
|
3
|
+
"version": "0.6.1-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local CLI for capturing, compiling, and governing knowledge workspaces",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"context": "cli.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@c4a/agent-graph": "0.2.
|
|
24
|
-
"@c4a/context": "0.6.1-beta.
|
|
23
|
+
"@c4a/agent-graph": "0.2.3",
|
|
24
|
+
"@c4a/context": "0.6.1-beta.4",
|
|
25
25
|
"commander": "^11.0.0",
|
|
26
26
|
"handlebars": "^4.7.8",
|
|
27
27
|
"ink": "^5.0.0",
|
package/plugins/README.md
CHANGED
|
@@ -40,8 +40,13 @@ context status --format json
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
`workflow.current` is the current-step authority. The Agent reads every required
|
|
43
|
-
resource
|
|
44
|
-
flags, and reevaluates status after each
|
|
43
|
+
resource marked `read_state: read-required`, executes only returned commands,
|
|
44
|
+
preserves revision and authority flags, and reevaluates status after each
|
|
45
|
+
action. Current-conversation read receipts may be passed back through
|
|
46
|
+
`context status --resource-receipts @<file>` so unchanged resources are marked
|
|
47
|
+
`current`. A dynamic materialization becomes a receipt only after the Agent
|
|
48
|
+
reads the complete returned file. `context.source-body/*` resources are source
|
|
49
|
+
text; source indexes and heading metadata never replace the body. Long procedures and semantic
|
|
45
50
|
judgment rules are published in the Context workflow bundle and loaded only
|
|
46
51
|
when the current route or operation selects them.
|
|
47
52
|
|
|
@@ -68,6 +73,17 @@ That session authority is not stored. It cannot choose source boundaries,
|
|
|
68
73
|
authorize unread external content, perform external repository operations, or
|
|
69
74
|
bypass validation and verification.
|
|
70
75
|
|
|
76
|
+
After the initial managed status, consecutive deterministic routes can be
|
|
77
|
+
collapsed with:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
context run --managed --until blocked-or-complete --format json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The loop stops before any route that needs Agent interpretation, configuration,
|
|
84
|
+
additional authority, or diagnostic repair, and returns the current workflow
|
|
85
|
+
route for normal progressive loading.
|
|
86
|
+
|
|
71
87
|
## Workspace and SDK
|
|
72
88
|
|
|
73
89
|
Run the plugin from the initialized Context project root. Project declarations
|
package/plugins/README_CN.md
CHANGED
|
@@ -38,8 +38,13 @@ Continuation 从以下命令开始:
|
|
|
38
38
|
context status --format json
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
`workflow.current` 是当前步骤的权威协议。Agent
|
|
42
|
-
|
|
41
|
+
`workflow.current` 是当前步骤的权威协议。Agent 读取所有标记为
|
|
42
|
+
`read_state: read-required` 的 required 资源,只执行返回的命令,完整保留
|
|
43
|
+
revision 与 authority 参数,并在每次动作后重新求值。当前会话可通过
|
|
44
|
+
`context status --resource-receipts @<file>` 回传读取回执,使未变化资源标记为
|
|
45
|
+
`current`。动态资源的 materialize 结果只有在 Agent 完整读取返回文件后才可作为
|
|
46
|
+
回执;`context.source-body/*` 是必须阅读的正文,source-index 和标题元数据不能
|
|
47
|
+
替代正文。
|
|
43
48
|
长篇流程与语义判断规则发布在 Context workflow bundle 中,仅在当前路线或操作
|
|
44
49
|
选中时加载。
|
|
45
50
|
|
|
@@ -62,6 +67,15 @@ context status --managed --format json
|
|
|
62
67
|
该会话权限不会持久化,也不能选择来源边界、授权尚未允许读取的外部内容、执行
|
|
63
68
|
外部仓库操作,或绕过校验与验证。
|
|
64
69
|
|
|
70
|
+
首次读取托管状态后,可用下面的命令合并连续的确定性步骤:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
context run --managed --until blocked-or-complete --format json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
遇到需要 Agent 判断、配置修改、额外权限、诊断修复或多条命令的路线时,循环会
|
|
77
|
+
立即停止,并返回当前 `workflow.current` 供 Agent 按需加载上下文。
|
|
78
|
+
|
|
65
79
|
## 工作区与 SDK
|
|
66
80
|
|
|
67
81
|
Plugin 应在初始化后的 Context 项目根目录运行。`src/index.ts` 保存项目声明;
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.1-beta.
|
|
1
|
+
0.6.1-beta.4
|
|
@@ -24,24 +24,53 @@ root, do not run `context status` first. Use the public Context init entry or
|
|
|
24
24
|
`context init` to create the workspace, complete the init setup command, then
|
|
25
25
|
return here from the initialized workspace.
|
|
26
26
|
|
|
27
|
+
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
28
|
+
mechanical routes:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
context run --managed --until blocked-or-complete --format json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Pass an additional `--authority` only when the user explicitly granted that
|
|
35
|
+
non-managed authority in this conversation. This loop executes only one
|
|
36
|
+
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
37
|
+
before read-only interpretation, project configuration, unresolved authority,
|
|
38
|
+
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
39
|
+
`workflow.current`; do not derive a command from earlier steps.
|
|
40
|
+
|
|
27
41
|
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
28
42
|
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
29
43
|
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
30
44
|
|
|
31
45
|
Treat `workflow.current` as the current-step authority:
|
|
32
46
|
|
|
33
|
-
1. Read every `resources.required` item
|
|
34
|
-
|
|
47
|
+
1. Read every `resources.required` item whose `read_state` is
|
|
48
|
+
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
49
|
+
execute that command and read the returned file. Keep read receipts only in
|
|
50
|
+
the current conversation and pass the merged receipt set back with
|
|
51
|
+
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
52
|
+
matching dynamic Route revision then returns `read_state: current`.
|
|
53
|
+
Materializing a resource is not a read: use the returned
|
|
54
|
+
`after_read_receipts` only after reading the complete returned file. A
|
|
55
|
+
`context.source-body/*` resource is the complete captured Markdown body;
|
|
56
|
+
source indexes and heading metadata never replace it. The exact
|
|
57
|
+
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
58
|
+
continue from that response without an additional status call.
|
|
35
59
|
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
36
60
|
Skill or Schema is read only when performing that pre-decision inspection;
|
|
37
61
|
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
38
62
|
the Gate. Neither replaces ordinary `resources.required`.
|
|
39
63
|
3. Execute only `commands` returned by the Route, preserving revision and
|
|
40
64
|
authority flags exactly. A command marked `after-human-confirmation` must
|
|
41
|
-
wait for the current Gate decision.
|
|
65
|
+
wait for the current Gate decision. Run a command whose
|
|
66
|
+
`execution.target` is `agent-host` as a top-level host action with the
|
|
67
|
+
host's external and credential access, not inside a restricted child
|
|
68
|
+
sandbox. Request host approval when required; never weaken credential
|
|
69
|
+
storage as a workaround.
|
|
42
70
|
4. If `configuration` is present, edit only the named project file using the
|
|
43
71
|
selected resources as its contract.
|
|
44
|
-
5. After every action or configuration change, run status again.
|
|
72
|
+
5. After every action or configuration change, run status again. The managed
|
|
73
|
+
`--until` loop performs this re-evaluation internally. A phase-local
|
|
45
74
|
`next_action` can continue that operation but never replaces the workspace
|
|
46
75
|
Route.
|
|
47
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>]"
|
|
3
|
+
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN]"
|
|
4
4
|
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,22 +9,26 @@ allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
|
9
9
|
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
10
10
|
step, then hand control to the current workflow route.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
enum values, payload keys, and copied CLI output tokens unchanged.
|
|
12
|
+
Use the user's language for conversation. Keep command and payload tokens
|
|
13
|
+
unchanged.
|
|
15
14
|
|
|
16
|
-
Run `context init [project-dir] [--name <name>]
|
|
17
|
-
user
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Run `context init [project-dir] [--name <name>] --language <language>`. Use the
|
|
16
|
+
user's explicit language choice when present; otherwise pass `zh-CN` for a
|
|
17
|
+
Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
18
|
+
value controls generated workspace instructions and starter templates. Never
|
|
19
|
+
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
20
|
+
`--dev` only for an explicitly requested local-link test.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
status evaluation; never persist it into another conversation. Treat
|
|
25
|
-
`workflow.current` as the current-step authority: read every required resource,
|
|
26
|
-
execute only its exact commands, stop before any unresolved command marked
|
|
27
|
-
`after-human-confirmation`, and rerun status after each action.
|
|
22
|
+
If init reports `init-target-nonempty`, explain that existing files would share
|
|
23
|
+
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
24
|
+
explicit confirmation.
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
Execute the returned setup command, enter the project root, and read its
|
|
27
|
+
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
28
|
+
`--managed` only for fully managed operation explicitly authorized in this
|
|
29
|
+
conversation. Treat `workflow.current` as authoritative: read its required
|
|
30
|
+
resources, execute only exact commands, honor unresolved human gates, and
|
|
31
|
+
reevaluate status after each action.
|
|
32
|
+
|
|
33
|
+
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
34
|
+
monorepo.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context",
|
|
3
|
-
"version": "0.6.1-beta.
|
|
3
|
+
"version": "0.6.1-beta.4",
|
|
4
4
|
"description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "c4a"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"skills": "./skills/",
|
|
19
19
|
"interface": {
|
|
20
20
|
"displayName": "C4A Context",
|
|
21
|
-
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.1-beta.
|
|
21
|
+
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.1-beta.4",
|
|
22
22
|
"longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
|
|
23
23
|
"developerName": "c4a",
|
|
24
24
|
"category": "Productivity",
|
|
@@ -36,24 +36,53 @@ root, do not run `context status` first. Use the public Context init entry or
|
|
|
36
36
|
`context init` to create the workspace, complete the init setup command, then
|
|
37
37
|
return here from the initialized workspace.
|
|
38
38
|
|
|
39
|
+
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
40
|
+
mechanical routes:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
context run --managed --until blocked-or-complete --format json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Pass an additional `--authority` only when the user explicitly granted that
|
|
47
|
+
non-managed authority in this conversation. This loop executes only one
|
|
48
|
+
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
49
|
+
before read-only interpretation, project configuration, unresolved authority,
|
|
50
|
+
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
51
|
+
`workflow.current`; do not derive a command from earlier steps.
|
|
52
|
+
|
|
39
53
|
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
40
54
|
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
41
55
|
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
42
56
|
|
|
43
57
|
Treat `workflow.current` as the current-step authority:
|
|
44
58
|
|
|
45
|
-
1. Read every `resources.required` item
|
|
46
|
-
|
|
59
|
+
1. Read every `resources.required` item whose `read_state` is
|
|
60
|
+
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
61
|
+
execute that command and read the returned file. Keep read receipts only in
|
|
62
|
+
the current conversation and pass the merged receipt set back with
|
|
63
|
+
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
64
|
+
matching dynamic Route revision then returns `read_state: current`.
|
|
65
|
+
Materializing a resource is not a read: use the returned
|
|
66
|
+
`after_read_receipts` only after reading the complete returned file. A
|
|
67
|
+
`context.source-body/*` resource is the complete captured Markdown body;
|
|
68
|
+
source indexes and heading metadata never replace it. The exact
|
|
69
|
+
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
70
|
+
continue from that response without an additional status call.
|
|
47
71
|
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
48
72
|
Skill or Schema is read only when performing that pre-decision inspection;
|
|
49
73
|
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
50
74
|
the Gate. Neither replaces ordinary `resources.required`.
|
|
51
75
|
3. Execute only `commands` returned by the Route, preserving revision and
|
|
52
76
|
authority flags exactly. A command marked `after-human-confirmation` must
|
|
53
|
-
wait for the current Gate decision.
|
|
77
|
+
wait for the current Gate decision. Run a command whose
|
|
78
|
+
`execution.target` is `agent-host` as a top-level host action with the
|
|
79
|
+
host's external and credential access, not inside a restricted child
|
|
80
|
+
sandbox. Request host approval when required; never weaken credential
|
|
81
|
+
storage as a workaround.
|
|
54
82
|
4. If `configuration` is present, edit only the named project file using the
|
|
55
83
|
selected resources as its contract.
|
|
56
|
-
5. After every action or configuration change, run status again.
|
|
84
|
+
5. After every action or configuration change, run status again. The managed
|
|
85
|
+
`--until` loop performs this re-evaluation internally. A phase-local
|
|
57
86
|
`next_action` can continue that operation but never replaces the workspace
|
|
58
87
|
Route.
|
|
59
88
|
|
|
@@ -21,22 +21,26 @@ Public Context entry for agents that expose skills instead of slash commands.
|
|
|
21
21
|
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
22
22
|
step, then hand control to the current workflow route.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
Use the user's language for conversation. Keep command and payload tokens
|
|
25
|
+
unchanged.
|
|
26
|
+
|
|
27
|
+
Run `context init [project-dir] [--name <name>] --language <language>`. Use the
|
|
28
|
+
user's explicit language choice when present; otherwise pass `zh-CN` for a
|
|
29
|
+
Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
30
|
+
value controls generated workspace instructions and starter templates. Never
|
|
31
|
+
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
32
|
+
`--dev` only for an explicitly requested local-link test.
|
|
33
|
+
|
|
34
|
+
If init reports `init-target-nonempty`, explain that existing files would share
|
|
35
|
+
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
36
|
+
explicit confirmation.
|
|
37
|
+
|
|
38
|
+
Execute the returned setup command, enter the project root, and read its
|
|
39
|
+
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
40
|
+
`--managed` only for fully managed operation explicitly authorized in this
|
|
41
|
+
conversation. Treat `workflow.current` as authoritative: read its required
|
|
42
|
+
resources, execute only exact commands, honor unresolved human gates, and
|
|
43
|
+
reevaluate status after each action.
|
|
44
|
+
|
|
45
|
+
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
46
|
+
monorepo.
|
|
@@ -28,24 +28,53 @@ root, do not run `context status` first. Use the public Context init entry or
|
|
|
28
28
|
`context init` to create the workspace, complete the init setup command, then
|
|
29
29
|
return here from the initialized workspace.
|
|
30
30
|
|
|
31
|
+
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
32
|
+
mechanical routes:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
context run --managed --until blocked-or-complete --format json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Pass an additional `--authority` only when the user explicitly granted that
|
|
39
|
+
non-managed authority in this conversation. This loop executes only one
|
|
40
|
+
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
41
|
+
before read-only interpretation, project configuration, unresolved authority,
|
|
42
|
+
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
43
|
+
`workflow.current`; do not derive a command from earlier steps.
|
|
44
|
+
|
|
31
45
|
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
32
46
|
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
33
47
|
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
34
48
|
|
|
35
49
|
Treat `workflow.current` as the current-step authority:
|
|
36
50
|
|
|
37
|
-
1. Read every `resources.required` item
|
|
38
|
-
|
|
51
|
+
1. Read every `resources.required` item whose `read_state` is
|
|
52
|
+
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
53
|
+
execute that command and read the returned file. Keep read receipts only in
|
|
54
|
+
the current conversation and pass the merged receipt set back with
|
|
55
|
+
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
56
|
+
matching dynamic Route revision then returns `read_state: current`.
|
|
57
|
+
Materializing a resource is not a read: use the returned
|
|
58
|
+
`after_read_receipts` only after reading the complete returned file. A
|
|
59
|
+
`context.source-body/*` resource is the complete captured Markdown body;
|
|
60
|
+
source indexes and heading metadata never replace it. The exact
|
|
61
|
+
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
62
|
+
continue from that response without an additional status call.
|
|
39
63
|
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
40
64
|
Skill or Schema is read only when performing that pre-decision inspection;
|
|
41
65
|
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
42
66
|
the Gate. Neither replaces ordinary `resources.required`.
|
|
43
67
|
3. Execute only `commands` returned by the Route, preserving revision and
|
|
44
68
|
authority flags exactly. A command marked `after-human-confirmation` must
|
|
45
|
-
wait for the current Gate decision.
|
|
69
|
+
wait for the current Gate decision. Run a command whose
|
|
70
|
+
`execution.target` is `agent-host` as a top-level host action with the
|
|
71
|
+
host's external and credential access, not inside a restricted child
|
|
72
|
+
sandbox. Request host approval when required; never weaken credential
|
|
73
|
+
storage as a workaround.
|
|
46
74
|
4. If `configuration` is present, edit only the named project file using the
|
|
47
75
|
selected resources as its contract.
|
|
48
|
-
5. After every action or configuration change, run status again.
|
|
76
|
+
5. After every action or configuration change, run status again. The managed
|
|
77
|
+
`--until` loop performs this re-evaluation internally. A phase-local
|
|
49
78
|
`next_action` can continue that operation but never replaces the workspace
|
|
50
79
|
Route.
|
|
51
80
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>]"
|
|
3
|
+
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN]"
|
|
4
4
|
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,22 +13,26 @@ Initialize a Context knowledge workspace.
|
|
|
13
13
|
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
14
14
|
step, then hand control to the current workflow route.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
Use the user's language for conversation. Keep command and payload tokens
|
|
17
|
+
unchanged.
|
|
18
|
+
|
|
19
|
+
Run `context init [project-dir] [--name <name>] --language <language>`. Use the
|
|
20
|
+
user's explicit language choice when present; otherwise pass `zh-CN` for a
|
|
21
|
+
Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
22
|
+
value controls generated workspace instructions and starter templates. Never
|
|
23
|
+
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
24
|
+
`--dev` only for an explicitly requested local-link test.
|
|
25
|
+
|
|
26
|
+
If init reports `init-target-nonempty`, explain that existing files would share
|
|
27
|
+
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
28
|
+
explicit confirmation.
|
|
29
|
+
|
|
30
|
+
Execute the returned setup command, enter the project root, and read its
|
|
31
|
+
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
32
|
+
`--managed` only for fully managed operation explicitly authorized in this
|
|
33
|
+
conversation. Treat `workflow.current` as authoritative: read its required
|
|
34
|
+
resources, execute only exact commands, honor unresolved human gates, and
|
|
35
|
+
reevaluate status after each action.
|
|
36
|
+
|
|
37
|
+
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
38
|
+
monorepo.
|
|
@@ -36,24 +36,53 @@ root, do not run `context status` first. Use the public Context init entry or
|
|
|
36
36
|
`context init` to create the workspace, complete the init setup command, then
|
|
37
37
|
return here from the initialized workspace.
|
|
38
38
|
|
|
39
|
+
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
40
|
+
mechanical routes:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
context run --managed --until blocked-or-complete --format json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Pass an additional `--authority` only when the user explicitly granted that
|
|
47
|
+
non-managed authority in this conversation. This loop executes only one
|
|
48
|
+
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
49
|
+
before read-only interpretation, project configuration, unresolved authority,
|
|
50
|
+
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
51
|
+
`workflow.current`; do not derive a command from earlier steps.
|
|
52
|
+
|
|
39
53
|
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
40
54
|
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
41
55
|
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
42
56
|
|
|
43
57
|
Treat `workflow.current` as the current-step authority:
|
|
44
58
|
|
|
45
|
-
1. Read every `resources.required` item
|
|
46
|
-
|
|
59
|
+
1. Read every `resources.required` item whose `read_state` is
|
|
60
|
+
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
61
|
+
execute that command and read the returned file. Keep read receipts only in
|
|
62
|
+
the current conversation and pass the merged receipt set back with
|
|
63
|
+
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
64
|
+
matching dynamic Route revision then returns `read_state: current`.
|
|
65
|
+
Materializing a resource is not a read: use the returned
|
|
66
|
+
`after_read_receipts` only after reading the complete returned file. A
|
|
67
|
+
`context.source-body/*` resource is the complete captured Markdown body;
|
|
68
|
+
source indexes and heading metadata never replace it. The exact
|
|
69
|
+
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
70
|
+
continue from that response without an additional status call.
|
|
47
71
|
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
48
72
|
Skill or Schema is read only when performing that pre-decision inspection;
|
|
49
73
|
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
50
74
|
the Gate. Neither replaces ordinary `resources.required`.
|
|
51
75
|
3. Execute only `commands` returned by the Route, preserving revision and
|
|
52
76
|
authority flags exactly. A command marked `after-human-confirmation` must
|
|
53
|
-
wait for the current Gate decision.
|
|
77
|
+
wait for the current Gate decision. Run a command whose
|
|
78
|
+
`execution.target` is `agent-host` as a top-level host action with the
|
|
79
|
+
host's external and credential access, not inside a restricted child
|
|
80
|
+
sandbox. Request host approval when required; never weaken credential
|
|
81
|
+
storage as a workaround.
|
|
54
82
|
4. If `configuration` is present, edit only the named project file using the
|
|
55
83
|
selected resources as its contract.
|
|
56
|
-
5. After every action or configuration change, run status again.
|
|
84
|
+
5. After every action or configuration change, run status again. The managed
|
|
85
|
+
`--until` loop performs this re-evaluation internally. A phase-local
|
|
57
86
|
`next_action` can continue that operation but never replaces the workspace
|
|
58
87
|
Route.
|
|
59
88
|
|
|
@@ -21,22 +21,26 @@ Public Context entry for agents that expose skills instead of slash commands.
|
|
|
21
21
|
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
22
22
|
step, then hand control to the current workflow route.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
Use the user's language for conversation. Keep command and payload tokens
|
|
25
|
+
unchanged.
|
|
26
|
+
|
|
27
|
+
Run `context init [project-dir] [--name <name>] --language <language>`. Use the
|
|
28
|
+
user's explicit language choice when present; otherwise pass `zh-CN` for a
|
|
29
|
+
Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
30
|
+
value controls generated workspace instructions and starter templates. Never
|
|
31
|
+
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
32
|
+
`--dev` only for an explicitly requested local-link test.
|
|
33
|
+
|
|
34
|
+
If init reports `init-target-nonempty`, explain that existing files would share
|
|
35
|
+
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
36
|
+
explicit confirmation.
|
|
37
|
+
|
|
38
|
+
Execute the returned setup command, enter the project root, and read its
|
|
39
|
+
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
40
|
+
`--managed` only for fully managed operation explicitly authorized in this
|
|
41
|
+
conversation. Treat `workflow.current` as authoritative: read its required
|
|
42
|
+
resources, execute only exact commands, honor unresolved human gates, and
|
|
43
|
+
reevaluate status after each action.
|
|
44
|
+
|
|
45
|
+
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
46
|
+
monorepo.
|