@c4a/context-cli 0.6.8 → 0.6.10
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 +156 -220
- package/README.zh-CN.md +120 -160
- package/cli.js +265 -58
- package/docs/quickstart.md +57 -70
- package/docs/quickstart.zh-CN.md +79 -0
- package/package.json +4 -4
- package/plugins/.agents/plugins/marketplace.json +1 -1
- package/plugins/.claude-plugin/marketplace.json +2 -2
- package/plugins/.cursor-plugin/marketplace.json +2 -2
- package/plugins/README.md +79 -66
- package/plugins/README_CN.md +62 -57
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +3 -3
- package/plugins/claude/commands/context.md +121 -0
- package/plugins/codex/.codex-plugin/plugin.json +4 -4
- package/plugins/codex/skills/context/SKILL.md +133 -0
- package/plugins/cursor/.cursor-plugin/plugin.json +3 -3
- package/plugins/cursor/README.md +2 -2
- package/plugins/cursor/commands/c4a-context.md +125 -0
- package/plugins/skills/c4a-context/SKILL.md +133 -0
- package/providers/context/graphs/workspace.yaml +40 -1
- package/providers/context/manifest.json +27 -9
- package/providers/context/provider.yaml +2 -2
- package/providers/context/resources/dialogue/workflow-mode-after-capture.md +22 -0
- package/providers/context/resources/dialogue/workflow-mode-after-creation.md +25 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +1 -1
- package/providers/context/resources/manuals/reference/package-templates.md +1 -1
- package/plugins/claude/commands/continue.md +0 -109
- package/plugins/claude/commands/init.md +0 -36
- package/plugins/codex/skills/continue/SKILL.md +0 -121
- package/plugins/codex/skills/init/SKILL.md +0 -48
- package/plugins/cursor/commands/context-continue.md +0 -113
- package/plugins/cursor/commands/context-init.md +0 -40
- package/plugins/skills/context-continue/SKILL.md +0 -121
- package/plugins/skills/context-init/SKILL.md +0 -48
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"schema": "agent-graph.bundle.v1",
|
|
3
3
|
"provider": {
|
|
4
4
|
"id": "c4a/context",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.10"
|
|
6
6
|
},
|
|
7
7
|
"providerManifest": "provider.yaml",
|
|
8
8
|
"graphs": [
|
|
9
9
|
{
|
|
10
10
|
"id": "workspace",
|
|
11
11
|
"path": "graphs/workspace.yaml",
|
|
12
|
-
"digest": "sha256:
|
|
12
|
+
"digest": "sha256:cfc421a1bb645eac298883f59137e363d36d3c053a6e658324533eafaafea6c7"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"actions": [
|
|
@@ -168,12 +168,12 @@
|
|
|
168
168
|
{
|
|
169
169
|
"id": "context.sdk.package-outputs",
|
|
170
170
|
"path": "resources/manuals/guides/package-outputs.md",
|
|
171
|
-
"digest": "sha256:
|
|
171
|
+
"digest": "sha256:dd3df4cb96de157a559218341c87220582467791fb343d8d3c69a3198f2bead0"
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"id": "context.sdk.package-templates",
|
|
175
175
|
"path": "resources/manuals/reference/package-templates.md",
|
|
176
|
-
"digest": "sha256:
|
|
176
|
+
"digest": "sha256:e4052794b74c240c0de85d3ba89ba44144fd282426f478359b2defa4d0c6217b"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"id": "context.sdk.project-api",
|
|
@@ -300,6 +300,16 @@
|
|
|
300
300
|
"path": "resources/dialogue/structure-confirmation.md",
|
|
301
301
|
"digest": "sha256:4f9667860bb555c2cf236237c5a21644b7a2b249a452337d83087fa4c389dc2d"
|
|
302
302
|
},
|
|
303
|
+
{
|
|
304
|
+
"id": "dialogue.workflow-mode-after-capture",
|
|
305
|
+
"path": "resources/dialogue/workflow-mode-after-capture.md",
|
|
306
|
+
"digest": "sha256:62541da2fe8d69fe2369bad2a402ef0e8c791960ac139dfe9bb86cc3ca29180b"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"id": "dialogue.workflow-mode-after-creation",
|
|
310
|
+
"path": "resources/dialogue/workflow-mode-after-creation.md",
|
|
311
|
+
"digest": "sha256:92de8c4f7deec35148ee3e47c7b6eea8b814d1cc7610113b5b81751ba50da2d2"
|
|
312
|
+
},
|
|
303
313
|
{
|
|
304
314
|
"id": "manual.reference.code-extractors",
|
|
305
315
|
"path": "resources/manuals/reference/code-extractors.md",
|
|
@@ -518,11 +528,11 @@
|
|
|
518
528
|
},
|
|
519
529
|
{
|
|
520
530
|
"path": "graphs/workspace.yaml",
|
|
521
|
-
"digest": "sha256:
|
|
531
|
+
"digest": "sha256:cfc421a1bb645eac298883f59137e363d36d3c053a6e658324533eafaafea6c7"
|
|
522
532
|
},
|
|
523
533
|
{
|
|
524
534
|
"path": "provider.yaml",
|
|
525
|
-
"digest": "sha256:
|
|
535
|
+
"digest": "sha256:b6c55d046c66dbd0047ddc0632ef707107938a15ca51e196ebc0f7a2164bba06"
|
|
526
536
|
},
|
|
527
537
|
{
|
|
528
538
|
"path": "resources/diagnostics/projection-stale.md",
|
|
@@ -576,13 +586,21 @@
|
|
|
576
586
|
"path": "resources/dialogue/structure-confirmation.md",
|
|
577
587
|
"digest": "sha256:4f9667860bb555c2cf236237c5a21644b7a2b249a452337d83087fa4c389dc2d"
|
|
578
588
|
},
|
|
589
|
+
{
|
|
590
|
+
"path": "resources/dialogue/workflow-mode-after-capture.md",
|
|
591
|
+
"digest": "sha256:62541da2fe8d69fe2369bad2a402ef0e8c791960ac139dfe9bb86cc3ca29180b"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"path": "resources/dialogue/workflow-mode-after-creation.md",
|
|
595
|
+
"digest": "sha256:92de8c4f7deec35148ee3e47c7b6eea8b814d1cc7610113b5b81751ba50da2d2"
|
|
596
|
+
},
|
|
579
597
|
{
|
|
580
598
|
"path": "resources/manuals/guides/lark-resources.md",
|
|
581
599
|
"digest": "sha256:a179bb8bf7d8185bb6f3033ef692dd15fa5b702c91525e7c272d3025d3bb7c52"
|
|
582
600
|
},
|
|
583
601
|
{
|
|
584
602
|
"path": "resources/manuals/guides/package-outputs.md",
|
|
585
|
-
"digest": "sha256:
|
|
603
|
+
"digest": "sha256:dd3df4cb96de157a559218341c87220582467791fb343d8d3c69a3198f2bead0"
|
|
586
604
|
},
|
|
587
605
|
{
|
|
588
606
|
"path": "resources/manuals/reference/code-extractors.md",
|
|
@@ -590,7 +608,7 @@
|
|
|
590
608
|
},
|
|
591
609
|
{
|
|
592
610
|
"path": "resources/manuals/reference/package-templates.md",
|
|
593
|
-
"digest": "sha256:
|
|
611
|
+
"digest": "sha256:e4052794b74c240c0de85d3ba89ba44144fd282426f478359b2defa4d0c6217b"
|
|
594
612
|
},
|
|
595
613
|
{
|
|
596
614
|
"path": "resources/manuals/reference/project-api.md",
|
|
@@ -732,5 +750,5 @@
|
|
|
732
750
|
"graphDependencies": {
|
|
733
751
|
"workspace": []
|
|
734
752
|
},
|
|
735
|
-
"digest": "sha256:
|
|
753
|
+
"digest": "sha256:2c6cbd3232c59b44604ff53555aa227f35a9a59f067fa65b47808e79af3adce7"
|
|
736
754
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
schema: agent-graph.provider.v1
|
|
2
2
|
id: c4a/context
|
|
3
|
-
version: 0.6.
|
|
3
|
+
version: 0.6.10
|
|
4
4
|
name: Context workflow
|
|
5
5
|
description: Internal work contract for Context knowledge workspaces.
|
|
6
6
|
graphs:
|
|
@@ -8,5 +8,5 @@ graphs:
|
|
|
8
8
|
catalogs:
|
|
9
9
|
codes: codes.yaml
|
|
10
10
|
compatibility:
|
|
11
|
-
agentGraph: ^0.2.
|
|
11
|
+
agentGraph: ^0.2.6
|
|
12
12
|
node: ">=20"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: dialogue.workflow-mode-after-capture
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow mode after source capture
|
|
8
|
+
|
|
9
|
+
When source capture has completed and the conversation is still using ordinary
|
|
10
|
+
review mode, remind the user in their current conversation language that the
|
|
11
|
+
remaining workflow will pause at review decisions and provide HTML reports for
|
|
12
|
+
inspection. The current product estimate is that ordinary review makes the
|
|
13
|
+
overall workflow about 40% slower, with the exact difference depending on scope
|
|
14
|
+
and user response time.
|
|
15
|
+
|
|
16
|
+
Offer fully managed operation for the rest of the current conversation. Explain
|
|
17
|
+
that it skips delegatable content-review surfaces and is faster, but reduces the
|
|
18
|
+
user's ability to control or adjust intermediate content. It does not bypass
|
|
19
|
+
source boundaries, external permissions, hard validation, evidence checks,
|
|
20
|
+
verification failures, or other non-delegatable safety boundaries. Do not ask
|
|
21
|
+
again when fully managed authority is already active, and never persist the
|
|
22
|
+
choice in project files.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: dialogue.workflow-mode-after-creation
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow mode after workspace creation
|
|
8
|
+
|
|
9
|
+
After the workspace is created, briefly explain the two execution modes in the
|
|
10
|
+
user's current conversation language unless they already selected fully managed
|
|
11
|
+
operation in this conversation.
|
|
12
|
+
|
|
13
|
+
- Ordinary review mode is the default. Context pauses at review decisions and
|
|
14
|
+
provides HTML reports for the user to inspect. The current product estimate is
|
|
15
|
+
that these review rounds make the overall workflow about 40% slower, with the
|
|
16
|
+
exact difference depending on workspace size and user response time.
|
|
17
|
+
- Fully managed mode skips delegatable content-review surfaces and continues
|
|
18
|
+
with the same revision-bound resolution Actions. It is faster, but gives the
|
|
19
|
+
user fewer opportunities to control or adjust intermediate content.
|
|
20
|
+
|
|
21
|
+
Make clear that fully managed mode does not bypass source boundaries, external
|
|
22
|
+
permissions, hard validation, evidence checks, verification failures, or other
|
|
23
|
+
non-delegatable safety boundaries. Ask whether the user wants to keep the
|
|
24
|
+
default ordinary review mode or authorize fully managed operation for the
|
|
25
|
+
current conversation. Do not persist the choice in project files.
|
|
@@ -122,7 +122,7 @@ metadata, how many codegraph views were selected, and how many package-visible
|
|
|
122
122
|
edges were emitted. An empty edge list is therefore explicit evidence of a
|
|
123
123
|
coverage state, not permission to invent a dependency.
|
|
124
124
|
|
|
125
|
-
The generated `wikis/` directory is the default OKF root and follows the
|
|
125
|
+
The generated `wikis/` directory is the default OKF root and follows the Context OKF
|
|
126
126
|
Profile. Internal production collections are mapped into package OKF roots such
|
|
127
127
|
as `wikis/`, `guides/`, `rules/`, or `feats/`; when selected, `context build`
|
|
128
128
|
copies them into the package and generates root-aware directory indexes for them
|
|
@@ -327,7 +327,7 @@ Approved Markdown under `knowledge/` is the production source of truth:
|
|
|
327
327
|
- Context production metadata such as `sources`, `node_type`, `visibility`,
|
|
328
328
|
`code_symbols`, relationship records, and `candidate_fingerprint` also lives
|
|
329
329
|
at the top level;
|
|
330
|
-
- do not nest
|
|
330
|
+
- do not nest Context production metadata under `context`; fields such as
|
|
331
331
|
`context.sources` and `context.code_symbols` are not part of the 0.6 profile;
|
|
332
332
|
- section provenance lives in `<!-- context:section ... source_ref="..." -->`
|
|
333
333
|
comments;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Inspect the Context workspace, decide the next useful action, and proceed."
|
|
3
|
-
argument-hint: "[user intent]"
|
|
4
|
-
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Your Task
|
|
8
|
-
|
|
9
|
-
Use this as the conversational entry for an existing Context workspace. There
|
|
10
|
-
is no `context continue` CLI primitive. Without explicit fully managed
|
|
11
|
-
authority, start with:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
context status --format json
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
If the user explicitly asks to enable debugging, first run
|
|
18
|
-
`context debug enable`. It sets `package.json` `context.debug=true` and records
|
|
19
|
-
subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
|
|
20
|
-
Do not enable it proactively; tracing is not workflow authority or evidence.
|
|
21
|
-
|
|
22
|
-
When the user explicitly requests fully managed operation in this conversation,
|
|
23
|
-
start with the managed loop instead of a manual status/action cycle:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
context run --managed --until blocked-or-complete --format json
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
That explicit managed authority is also the user's explicit authorization for a
|
|
30
|
-
current `route.logs.delivery-pending` action, but only through the installed
|
|
31
|
-
package's fixed runtime-event sink. This route can appear only after a build
|
|
32
|
-
completed and its accumulated outbox batch failed to send. Initialization,
|
|
33
|
-
workspace-activity, and close delivery failures stay silent and must never
|
|
34
|
-
request host escalation by themselves. Do not ask for endpoint-specific
|
|
35
|
-
consent again or stop merely because delivery uses an external telemetry
|
|
36
|
-
endpoint.
|
|
37
|
-
When this route appears, read its required delivery procedure, run
|
|
38
|
-
`context logs plan --format json`, and use the returned outbox path, event
|
|
39
|
-
summary, HTTP destination, method, and data policy in the Agent-host network
|
|
40
|
-
approval request, including both proxy and upstream destinations when present.
|
|
41
|
-
Changes to the batch's event count, event-kind mix, or property-key mix are
|
|
42
|
-
audit details, not a new consent boundary, while the returned destination,
|
|
43
|
-
input schema, and data policy remain the same. The batch may include queued
|
|
44
|
-
initialization, activity, or close events in addition to the build event; do
|
|
45
|
-
not ask the user again because that allowlisted payload composition changed.
|
|
46
|
-
Immediately execute only the returned `flush_command` as a top-level Agent-host
|
|
47
|
-
action and request host network escalation in that tool invocation; never add
|
|
48
|
-
an arbitrary payload or destination option. A host approval prompt is an
|
|
49
|
-
execution boundary, not a new conversational user decision. Stop only when the
|
|
50
|
-
host denies that request, the host-network execution still fails, or the plan
|
|
51
|
-
has no resolved HTTP destination.
|
|
52
|
-
|
|
53
|
-
Never persist or reuse that authority in another conversation. While the
|
|
54
|
-
request remains active, use `--managed` for every resumed status evaluation;
|
|
55
|
-
stop using it when the conversation ends or the user revokes it.
|
|
56
|
-
|
|
57
|
-
If the user is starting a new workspace or a new batch from a raw repository
|
|
58
|
-
root, do not run `context status` first. Use the public Context init entry or
|
|
59
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
60
|
-
return here from the initialized workspace.
|
|
61
|
-
|
|
62
|
-
The managed loop is the default entry for an explicitly managed conversation,
|
|
63
|
-
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
64
|
-
non-managed authority in this conversation. This loop executes only one
|
|
65
|
-
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
66
|
-
before read-only interpretation, project configuration, unresolved authority,
|
|
67
|
-
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
68
|
-
`workflow.current`; do not derive a command from earlier steps.
|
|
69
|
-
|
|
70
|
-
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
71
|
-
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
72
|
-
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
73
|
-
|
|
74
|
-
Treat `workflow.current` as the current-step authority:
|
|
75
|
-
|
|
76
|
-
1. Read every `resources.required` item whose `read_state` is
|
|
77
|
-
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
78
|
-
execute that command and read the returned file. Keep read receipts only in
|
|
79
|
-
the current conversation and pass the merged receipt set back with
|
|
80
|
-
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
81
|
-
matching dynamic Route revision then returns `read_state: current`.
|
|
82
|
-
Materializing a resource is not a read: use the returned
|
|
83
|
-
`after_read_receipts` only after reading the complete returned file. A
|
|
84
|
-
`context.source-body/*` resource is the complete captured Markdown body;
|
|
85
|
-
source indexes and heading metadata never replace it. The exact
|
|
86
|
-
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
87
|
-
continue from that response without an additional status call.
|
|
88
|
-
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
89
|
-
Skill or Schema is read only when performing that pre-decision inspection;
|
|
90
|
-
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
91
|
-
the Gate. Neither replaces ordinary `resources.required`.
|
|
92
|
-
3. Execute only `commands` returned by the Route, preserving revision and
|
|
93
|
-
authority flags exactly. A command marked `after-human-confirmation` must
|
|
94
|
-
wait for the current Gate decision. Run a command whose
|
|
95
|
-
`execution.target` is `agent-host` as a top-level host action with the
|
|
96
|
-
host's external and credential access, not inside a restricted child
|
|
97
|
-
sandbox. Request host approval when required; never weaken credential
|
|
98
|
-
storage as a workaround.
|
|
99
|
-
4. If `configuration` is present, edit only the named project file using the
|
|
100
|
-
selected resources as its contract.
|
|
101
|
-
5. After every action or configuration change, run status again. The managed
|
|
102
|
-
`--until` loop performs this re-evaluation internally. A phase-local
|
|
103
|
-
`next_action` can continue that operation but never replaces the workspace
|
|
104
|
-
Route.
|
|
105
|
-
|
|
106
|
-
Do not infer repo sources, extraction scope, review decisions, or package output
|
|
107
|
-
choices from surrounding files. Do not call source-repo operations such as
|
|
108
|
-
clone, checkout, reset, fetch, install, build, or test without explicit user
|
|
109
|
-
approval.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
|
|
4
|
-
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Your Task
|
|
8
|
-
|
|
9
|
-
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
10
|
-
step, then hand control to the current workflow route.
|
|
11
|
-
|
|
12
|
-
Use the user's language for conversation. Keep command and payload tokens
|
|
13
|
-
unchanged.
|
|
14
|
-
|
|
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.
|
|
21
|
-
Add `--debug` only when the user explicitly asks to trace this workspace. Debug
|
|
22
|
-
mode is otherwise off by default.
|
|
23
|
-
|
|
24
|
-
If init reports `init-target-nonempty`, explain that existing files would share
|
|
25
|
-
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
26
|
-
explicit confirmation.
|
|
27
|
-
|
|
28
|
-
Execute the returned setup command, enter the project root, and read its
|
|
29
|
-
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
30
|
-
`--managed` only for fully managed operation explicitly authorized in this
|
|
31
|
-
conversation. Treat `workflow.current` as authoritative: read its required
|
|
32
|
-
resources, execute only exact commands, honor unresolved human gates, and
|
|
33
|
-
reevaluate status after each action.
|
|
34
|
-
|
|
35
|
-
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
36
|
-
monorepo.
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: continue
|
|
3
|
-
description: >
|
|
4
|
-
Inspect the Context workspace, decide the next useful action, and proceed. Use the local `context` CLI for workspace writes.
|
|
5
|
-
tools:
|
|
6
|
-
- Bash
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Continue
|
|
10
|
-
|
|
11
|
-
Public Context entry for agents that expose skills instead of slash commands.
|
|
12
|
-
|
|
13
|
-
- Public entry: `continue`
|
|
14
|
-
- Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
|
|
15
|
-
- CLI primitive prefix: `context ...`
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
Use this as the conversational entry for an existing Context workspace. There
|
|
22
|
-
is no `context continue` CLI primitive. Without explicit fully managed
|
|
23
|
-
authority, start with:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
context status --format json
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
If the user explicitly asks to enable debugging, first run
|
|
30
|
-
`context debug enable`. It sets `package.json` `context.debug=true` and records
|
|
31
|
-
subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
|
|
32
|
-
Do not enable it proactively; tracing is not workflow authority or evidence.
|
|
33
|
-
|
|
34
|
-
When the user explicitly requests fully managed operation in this conversation,
|
|
35
|
-
start with the managed loop instead of a manual status/action cycle:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
context run --managed --until blocked-or-complete --format json
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
That explicit managed authority is also the user's explicit authorization for a
|
|
42
|
-
current `route.logs.delivery-pending` action, but only through the installed
|
|
43
|
-
package's fixed runtime-event sink. This route can appear only after a build
|
|
44
|
-
completed and its accumulated outbox batch failed to send. Initialization,
|
|
45
|
-
workspace-activity, and close delivery failures stay silent and must never
|
|
46
|
-
request host escalation by themselves. Do not ask for endpoint-specific
|
|
47
|
-
consent again or stop merely because delivery uses an external telemetry
|
|
48
|
-
endpoint.
|
|
49
|
-
When this route appears, read its required delivery procedure, run
|
|
50
|
-
`context logs plan --format json`, and use the returned outbox path, event
|
|
51
|
-
summary, HTTP destination, method, and data policy in the Agent-host network
|
|
52
|
-
approval request, including both proxy and upstream destinations when present.
|
|
53
|
-
Changes to the batch's event count, event-kind mix, or property-key mix are
|
|
54
|
-
audit details, not a new consent boundary, while the returned destination,
|
|
55
|
-
input schema, and data policy remain the same. The batch may include queued
|
|
56
|
-
initialization, activity, or close events in addition to the build event; do
|
|
57
|
-
not ask the user again because that allowlisted payload composition changed.
|
|
58
|
-
Immediately execute only the returned `flush_command` as a top-level Agent-host
|
|
59
|
-
action and request host network escalation in that tool invocation; never add
|
|
60
|
-
an arbitrary payload or destination option. A host approval prompt is an
|
|
61
|
-
execution boundary, not a new conversational user decision. Stop only when the
|
|
62
|
-
host denies that request, the host-network execution still fails, or the plan
|
|
63
|
-
has no resolved HTTP destination.
|
|
64
|
-
|
|
65
|
-
Never persist or reuse that authority in another conversation. While the
|
|
66
|
-
request remains active, use `--managed` for every resumed status evaluation;
|
|
67
|
-
stop using it when the conversation ends or the user revokes it.
|
|
68
|
-
|
|
69
|
-
If the user is starting a new workspace or a new batch from a raw repository
|
|
70
|
-
root, do not run `context status` first. Use the public Context init entry or
|
|
71
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
72
|
-
return here from the initialized workspace.
|
|
73
|
-
|
|
74
|
-
The managed loop is the default entry for an explicitly managed conversation,
|
|
75
|
-
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
76
|
-
non-managed authority in this conversation. This loop executes only one
|
|
77
|
-
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
78
|
-
before read-only interpretation, project configuration, unresolved authority,
|
|
79
|
-
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
80
|
-
`workflow.current`; do not derive a command from earlier steps.
|
|
81
|
-
|
|
82
|
-
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
83
|
-
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
84
|
-
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
85
|
-
|
|
86
|
-
Treat `workflow.current` as the current-step authority:
|
|
87
|
-
|
|
88
|
-
1. Read every `resources.required` item whose `read_state` is
|
|
89
|
-
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
90
|
-
execute that command and read the returned file. Keep read receipts only in
|
|
91
|
-
the current conversation and pass the merged receipt set back with
|
|
92
|
-
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
93
|
-
matching dynamic Route revision then returns `read_state: current`.
|
|
94
|
-
Materializing a resource is not a read: use the returned
|
|
95
|
-
`after_read_receipts` only after reading the complete returned file. A
|
|
96
|
-
`context.source-body/*` resource is the complete captured Markdown body;
|
|
97
|
-
source indexes and heading metadata never replace it. The exact
|
|
98
|
-
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
99
|
-
continue from that response without an additional status call.
|
|
100
|
-
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
101
|
-
Skill or Schema is read only when performing that pre-decision inspection;
|
|
102
|
-
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
103
|
-
the Gate. Neither replaces ordinary `resources.required`.
|
|
104
|
-
3. Execute only `commands` returned by the Route, preserving revision and
|
|
105
|
-
authority flags exactly. A command marked `after-human-confirmation` must
|
|
106
|
-
wait for the current Gate decision. Run a command whose
|
|
107
|
-
`execution.target` is `agent-host` as a top-level host action with the
|
|
108
|
-
host's external and credential access, not inside a restricted child
|
|
109
|
-
sandbox. Request host approval when required; never weaken credential
|
|
110
|
-
storage as a workaround.
|
|
111
|
-
4. If `configuration` is present, edit only the named project file using the
|
|
112
|
-
selected resources as its contract.
|
|
113
|
-
5. After every action or configuration change, run status again. The managed
|
|
114
|
-
`--until` loop performs this re-evaluation internally. A phase-local
|
|
115
|
-
`next_action` can continue that operation but never replaces the workspace
|
|
116
|
-
Route.
|
|
117
|
-
|
|
118
|
-
Do not infer repo sources, extraction scope, review decisions, or package output
|
|
119
|
-
choices from surrounding files. Do not call source-repo operations such as
|
|
120
|
-
clone, checkout, reset, fetch, install, build, or test without explicit user
|
|
121
|
-
approval.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init
|
|
3
|
-
description: >
|
|
4
|
-
Initialize a Context knowledge workspace. Use the local `context` CLI for workspace writes.
|
|
5
|
-
tools:
|
|
6
|
-
- Bash
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Init
|
|
10
|
-
|
|
11
|
-
Public Context entry for agents that expose skills instead of slash commands.
|
|
12
|
-
|
|
13
|
-
- Public entry: `init`
|
|
14
|
-
- Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
|
|
15
|
-
- CLI primitive prefix: `context ...`
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
22
|
-
step, then hand control to the current workflow route.
|
|
23
|
-
|
|
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
|
-
Add `--debug` only when the user explicitly asks to trace this workspace. Debug
|
|
34
|
-
mode is otherwise off by default.
|
|
35
|
-
|
|
36
|
-
If init reports `init-target-nonempty`, explain that existing files would share
|
|
37
|
-
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
38
|
-
explicit confirmation.
|
|
39
|
-
|
|
40
|
-
Execute the returned setup command, enter the project root, and read its
|
|
41
|
-
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
42
|
-
`--managed` only for fully managed operation explicitly authorized in this
|
|
43
|
-
conversation. Treat `workflow.current` as authoritative: read its required
|
|
44
|
-
resources, execute only exact commands, honor unresolved human gates, and
|
|
45
|
-
reevaluate status after each action.
|
|
46
|
-
|
|
47
|
-
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
48
|
-
monorepo.
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Inspect the Context workspace, decide the next useful action, and proceed."
|
|
3
|
-
argument-hint: "[user intent]"
|
|
4
|
-
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Continue the Context workflow from the current workspace state.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Workflow
|
|
12
|
-
|
|
13
|
-
Use this as the conversational entry for an existing Context workspace. There
|
|
14
|
-
is no `context continue` CLI primitive. Without explicit fully managed
|
|
15
|
-
authority, start with:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
context status --format json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
If the user explicitly asks to enable debugging, first run
|
|
22
|
-
`context debug enable`. It sets `package.json` `context.debug=true` and records
|
|
23
|
-
subsequent CLI and Agent Graph events only below `.tmp/context-runtime/debug/`.
|
|
24
|
-
Do not enable it proactively; tracing is not workflow authority or evidence.
|
|
25
|
-
|
|
26
|
-
When the user explicitly requests fully managed operation in this conversation,
|
|
27
|
-
start with the managed loop instead of a manual status/action cycle:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
context run --managed --until blocked-or-complete --format json
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
That explicit managed authority is also the user's explicit authorization for a
|
|
34
|
-
current `route.logs.delivery-pending` action, but only through the installed
|
|
35
|
-
package's fixed runtime-event sink. This route can appear only after a build
|
|
36
|
-
completed and its accumulated outbox batch failed to send. Initialization,
|
|
37
|
-
workspace-activity, and close delivery failures stay silent and must never
|
|
38
|
-
request host escalation by themselves. Do not ask for endpoint-specific
|
|
39
|
-
consent again or stop merely because delivery uses an external telemetry
|
|
40
|
-
endpoint.
|
|
41
|
-
When this route appears, read its required delivery procedure, run
|
|
42
|
-
`context logs plan --format json`, and use the returned outbox path, event
|
|
43
|
-
summary, HTTP destination, method, and data policy in the Agent-host network
|
|
44
|
-
approval request, including both proxy and upstream destinations when present.
|
|
45
|
-
Changes to the batch's event count, event-kind mix, or property-key mix are
|
|
46
|
-
audit details, not a new consent boundary, while the returned destination,
|
|
47
|
-
input schema, and data policy remain the same. The batch may include queued
|
|
48
|
-
initialization, activity, or close events in addition to the build event; do
|
|
49
|
-
not ask the user again because that allowlisted payload composition changed.
|
|
50
|
-
Immediately execute only the returned `flush_command` as a top-level Agent-host
|
|
51
|
-
action and request host network escalation in that tool invocation; never add
|
|
52
|
-
an arbitrary payload or destination option. A host approval prompt is an
|
|
53
|
-
execution boundary, not a new conversational user decision. Stop only when the
|
|
54
|
-
host denies that request, the host-network execution still fails, or the plan
|
|
55
|
-
has no resolved HTTP destination.
|
|
56
|
-
|
|
57
|
-
Never persist or reuse that authority in another conversation. While the
|
|
58
|
-
request remains active, use `--managed` for every resumed status evaluation;
|
|
59
|
-
stop using it when the conversation ends or the user revokes it.
|
|
60
|
-
|
|
61
|
-
If the user is starting a new workspace or a new batch from a raw repository
|
|
62
|
-
root, do not run `context status` first. Use the public Context init entry or
|
|
63
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
64
|
-
return here from the initialized workspace.
|
|
65
|
-
|
|
66
|
-
The managed loop is the default entry for an explicitly managed conversation,
|
|
67
|
-
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
68
|
-
non-managed authority in this conversation. This loop executes only one
|
|
69
|
-
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
70
|
-
before read-only interpretation, project configuration, unresolved authority,
|
|
71
|
-
diagnostics, or a non-unique command plan. On stop, resume from the returned
|
|
72
|
-
`workflow.current`; do not derive a command from earlier steps.
|
|
73
|
-
|
|
74
|
-
Language policy: explain, ask, confirm, and summarize in the user's current
|
|
75
|
-
conversation language. Keep CLI commands, flags, paths, ids, status enum values,
|
|
76
|
-
JSONL payload keys, `source_ref` values, and copied CLI output tokens unchanged.
|
|
77
|
-
|
|
78
|
-
Treat `workflow.current` as the current-step authority:
|
|
79
|
-
|
|
80
|
-
1. Read every `resources.required` item whose `read_state` is
|
|
81
|
-
`read-required`. Read a `path` directly; for a resource with `command`,
|
|
82
|
-
execute that command and read the returned file. Keep read receipts only in
|
|
83
|
-
the current conversation and pass the merged receipt set back with
|
|
84
|
-
`context status --resource-receipts @<file>`; an unchanged static digest or
|
|
85
|
-
matching dynamic Route revision then returns `read_state: current`.
|
|
86
|
-
Materializing a resource is not a read: use the returned
|
|
87
|
-
`after_read_receipts` only after reading the complete returned file. A
|
|
88
|
-
`context.source-body/*` resource is the complete captured Markdown body;
|
|
89
|
-
source indexes and heading metadata never replace it. The exact
|
|
90
|
-
`resources.after_read.command` returns the re-evaluated `workflow.current`;
|
|
91
|
-
continue from that response without an additional status call.
|
|
92
|
-
2. At a Gate, keep conditional context phase-local. An `inspection_action`
|
|
93
|
-
Skill or Schema is read only when performing that pre-decision inspection;
|
|
94
|
-
a `resolution_action` Skill or Schema is read only after the user confirms
|
|
95
|
-
the Gate. Neither replaces ordinary `resources.required`.
|
|
96
|
-
3. Execute only `commands` returned by the Route, preserving revision and
|
|
97
|
-
authority flags exactly. A command marked `after-human-confirmation` must
|
|
98
|
-
wait for the current Gate decision. Run a command whose
|
|
99
|
-
`execution.target` is `agent-host` as a top-level host action with the
|
|
100
|
-
host's external and credential access, not inside a restricted child
|
|
101
|
-
sandbox. Request host approval when required; never weaken credential
|
|
102
|
-
storage as a workaround.
|
|
103
|
-
4. If `configuration` is present, edit only the named project file using the
|
|
104
|
-
selected resources as its contract.
|
|
105
|
-
5. After every action or configuration change, run status again. The managed
|
|
106
|
-
`--until` loop performs this re-evaluation internally. A phase-local
|
|
107
|
-
`next_action` can continue that operation but never replaces the workspace
|
|
108
|
-
Route.
|
|
109
|
-
|
|
110
|
-
Do not infer repo sources, extraction scope, review decisions, or package output
|
|
111
|
-
choices from surrounding files. Do not call source-repo operations such as
|
|
112
|
-
clone, checkout, reset, fetch, install, build, or test without explicit user
|
|
113
|
-
approval.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
|
|
4
|
-
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Initialize a Context knowledge workspace.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Workflow
|
|
12
|
-
|
|
13
|
-
Initialize a Context workspace with the global CLI, complete the returned setup
|
|
14
|
-
step, then hand control to the current workflow route.
|
|
15
|
-
|
|
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
|
-
Add `--debug` only when the user explicitly asks to trace this workspace. Debug
|
|
26
|
-
mode is otherwise off by default.
|
|
27
|
-
|
|
28
|
-
If init reports `init-target-nonempty`, explain that existing files would share
|
|
29
|
-
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
30
|
-
explicit confirmation.
|
|
31
|
-
|
|
32
|
-
Execute the returned setup command, enter the project root, and read its
|
|
33
|
-
generated `AGENTS.md`. Then run `context status --format json`, adding
|
|
34
|
-
`--managed` only for fully managed operation explicitly authorized in this
|
|
35
|
-
conversation. Treat `workflow.current` as authoritative: read its required
|
|
36
|
-
resources, execute only exact commands, honor unresolved human gates, and
|
|
37
|
-
reevaluate status after each action.
|
|
38
|
-
|
|
39
|
-
Do not add extra project-local agent setup or infer sources from the surrounding
|
|
40
|
-
monorepo.
|