@c4a/context-cli 0.6.2 → 0.6.3
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 +30 -3
- package/README.zh-CN.md +29 -3
- package/cli.js +23732 -20136
- package/docs/context-debug-event-v1.schema.json +29 -0
- package/docs/context-debug-replay-v1.schema.json +33 -0
- package/docs/debug-tracing.md +86 -0
- package/docs/quickstart.md +1 -1
- package/package.json +7 -4
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/continue.md +19 -14
- package/plugins/claude/commands/init.md +3 -1
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/SKILL.md +19 -14
- package/plugins/codex/skills/init/SKILL.md +2 -0
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/context-continue.md +19 -14
- package/plugins/cursor/commands/context-init.md +3 -1
- package/plugins/skills/context-continue/SKILL.md +19 -14
- package/plugins/skills/context-init/SKILL.md +2 -0
- package/providers/context/actions/inspect-repository-recovery.yaml +6 -0
- package/providers/context/actions/reconcile-review-identities.yaml +5 -0
- package/providers/context/actions/repair-verification.yaml +3 -3
- package/providers/context/actions/restore-repository-sources.yaml +7 -0
- package/providers/context/codes.yaml +2 -1
- package/providers/context/graphs/workspace.yaml +49 -7
- package/providers/context/manifest.json +94 -31
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/dialogue/repository-source-recovery.md +23 -0
- package/providers/context/resources/manuals/guides/lark-resources.md +121 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +8 -0
- package/providers/context/resources/manuals/reference/project-api.md +43 -7
- package/providers/context/resources/procedures/close-and-build.md +5 -3
- package/providers/context/resources/procedures/document-capture.md +5 -1
- package/providers/context/resources/procedures/knowledge-review.md +10 -0
- package/providers/context/resources/procedures/repository-source-recovery.md +43 -0
- package/providers/context/resources/procedures/source-capture-detailed.md +13 -0
- package/providers/context/resources/procedures/verify-and-repair.md +12 -0
- package/providers/context/resources/views/source-boundary.yaml +6 -0
- package/providers/context/schemas/repository-source-recovery.schema.json +40 -0
- package/providers/context/actions/ensure-repository-sources.yaml +0 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://context4.ai/schemas/context-debug-event-v1.schema.json",
|
|
4
|
+
"title": "Context debug event v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "trace_id", "sequence", "at", "kind", "data"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "context.debug.event.v1" },
|
|
10
|
+
"trace_id": { "type": "string", "minLength": 1 },
|
|
11
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
12
|
+
"at": { "type": "string", "format": "date-time" },
|
|
13
|
+
"kind": {
|
|
14
|
+
"enum": [
|
|
15
|
+
"debug.enabled",
|
|
16
|
+
"debug.disabled",
|
|
17
|
+
"cli.invoked",
|
|
18
|
+
"cli.completed",
|
|
19
|
+
"agent-graph.evaluated",
|
|
20
|
+
"workflow.action-started",
|
|
21
|
+
"workflow.action-completed",
|
|
22
|
+
"workflow.stopped"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"invocation_id": { "type": "string", "minLength": 1 },
|
|
26
|
+
"parent_invocation_id": { "type": "string", "minLength": 1 },
|
|
27
|
+
"data": { "type": "object" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://context4.ai/schemas/context-debug-replay-v1.schema.json",
|
|
4
|
+
"title": "Context debug replay v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "generated_at", "events", "transitions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "context.debug.replay.v1" },
|
|
10
|
+
"generated_at": { "type": "string", "format": "date-time" },
|
|
11
|
+
"trace_id": { "type": "string" },
|
|
12
|
+
"events": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "./context-debug-event-v1.schema.json" }
|
|
15
|
+
},
|
|
16
|
+
"transitions": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["sequence", "at", "current"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
24
|
+
"at": { "type": "string", "format": "date-time" },
|
|
25
|
+
"invocation_id": { "type": "string" },
|
|
26
|
+
"previous": { "type": "object" },
|
|
27
|
+
"current": { "type": "object" },
|
|
28
|
+
"selected_route": { "type": "object" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Workspace debug tracing
|
|
2
|
+
|
|
3
|
+
Context debug tracing is an explicit, workspace-local observation mode. It is
|
|
4
|
+
disabled by default. It does not change Agent Graph facts, route selection,
|
|
5
|
+
human gates, command eligibility, lifecycle writes, or command exit status.
|
|
6
|
+
|
|
7
|
+
Enable it while initializing a workspace:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
context init context --debug
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or enable it later:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
context debug enable
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Both forms set `package.json` `context.debug` to `true`. Disabling tracing
|
|
20
|
+
removes that property but keeps the existing trace for inspection:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
context debug disable
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Files
|
|
27
|
+
|
|
28
|
+
Tracing writes only below the ignored workspace `.tmp` directory:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
.tmp/context-runtime/debug/
|
|
32
|
+
├── events.jsonl
|
|
33
|
+
├── state.json
|
|
34
|
+
└── replay.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- `events.jsonl` is the append-only source of truth. Each line conforms to
|
|
38
|
+
[`context.debug.event.v1`](./context-debug-event-v1.schema.json).
|
|
39
|
+
- `state.json` owns the trace id, monotonic sequence, and last observed graph
|
|
40
|
+
state. It is recorder state, not workflow state.
|
|
41
|
+
- `replay.json` is a disposable projection produced by `context debug export`
|
|
42
|
+
and conforms to [`context.debug.replay.v1`](./context-debug-replay-v1.schema.json).
|
|
43
|
+
|
|
44
|
+
No command stdout, source body, knowledge page, or resource body is copied into
|
|
45
|
+
the trace. Sensitive option values are redacted. Command receipts contain only
|
|
46
|
+
status, duration, byte counts, and hashes already available to the managed
|
|
47
|
+
runner.
|
|
48
|
+
|
|
49
|
+
## Event model
|
|
50
|
+
|
|
51
|
+
The event stream records:
|
|
52
|
+
|
|
53
|
+
- CLI invocation and completion, including parent invocation identity for
|
|
54
|
+
managed child commands;
|
|
55
|
+
- Agent Graph evaluation revision, status, selected route, alternatives, and
|
|
56
|
+
whether the observable graph position changed;
|
|
57
|
+
- managed workflow action start and completion with deterministic receipts;
|
|
58
|
+
- the reason and graph position at which a managed loop stopped.
|
|
59
|
+
|
|
60
|
+
`trace_id` groups the workspace-local debug history, `sequence` defines replay order,
|
|
61
|
+
`invocation_id` groups work performed by one CLI process, and
|
|
62
|
+
`parent_invocation_id` connects managed child commands to their runner. A UI
|
|
63
|
+
can animate `agent-graph.evaluated` events whose `data.transition.changed` is
|
|
64
|
+
true, then associate intervening command and action events by sequence and
|
|
65
|
+
invocation identity.
|
|
66
|
+
|
|
67
|
+
## Inspect and export
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
context debug status --format json
|
|
71
|
+
context debug export --format json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Status returns configuration, event counts, and relative trace paths. Export
|
|
75
|
+
mechanically derives a replay document containing the complete event stream and
|
|
76
|
+
its changed graph transitions. A custom export path must remain below the
|
|
77
|
+
workspace `.tmp` directory:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
context debug export --output .tmp/analysis/replay.json --format json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Recorder failures are intentionally non-fatal. They can make a trace
|
|
84
|
+
incomplete, but they cannot alter the command being observed. Consumers should
|
|
85
|
+
therefore validate monotonic `sequence` values before presenting a replay as
|
|
86
|
+
complete.
|
package/docs/quickstart.md
CHANGED
|
@@ -75,7 +75,7 @@ The CLI performs mechanical work such as source registration, capture,
|
|
|
75
75
|
validation, review application, verify, close, and build. The agent performs
|
|
76
76
|
semantic judgment only when the workflow asks for it.
|
|
77
77
|
|
|
78
|
-
When the user explicitly requests fully managed operation, the Agent
|
|
78
|
+
When the user explicitly requests fully managed operation, the Agent starts with
|
|
79
79
|
`context run --managed --until blocked-or-complete --format json` to collapse
|
|
80
80
|
consecutive deterministic routes. The CLI re-evaluates every revision and
|
|
81
81
|
stops before semantic reads, configuration, missing authority, diagnostics, or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local CLI for capturing, compiling, and governing knowledge workspaces",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
"claude-code",
|
|
17
17
|
"claude-plugin"
|
|
18
18
|
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
19
22
|
"bin": {
|
|
20
|
-
"context": "cli.js"
|
|
23
|
+
"context": "dist/cli.js"
|
|
21
24
|
},
|
|
22
25
|
"dependencies": {
|
|
23
|
-
"@c4a/agent-graph": "0.2.
|
|
24
|
-
"@c4a/context": "0.6.
|
|
26
|
+
"@c4a/agent-graph": "0.2.4",
|
|
27
|
+
"@c4a/context": "0.6.3",
|
|
25
28
|
"commander": "^11.0.0",
|
|
26
29
|
"fast-xml-parser": "^5.10.1",
|
|
27
30
|
"handlebars": "^4.7.8",
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.3
|
|
@@ -7,31 +7,36 @@ allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
|
7
7
|
## Your Task
|
|
8
8
|
|
|
9
9
|
Use this as the conversational entry for an existing Context workspace. There
|
|
10
|
-
is no `context continue` CLI primitive.
|
|
10
|
+
is no `context continue` CLI primitive. Without explicit fully managed
|
|
11
|
+
authority, start with:
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
14
|
context status --format json
|
|
14
15
|
```
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
ends or the user revokes it.
|
|
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
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
25
|
-
return here from the initialized workspace.
|
|
26
|
-
|
|
27
|
-
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
28
|
-
mechanical routes:
|
|
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:
|
|
29
24
|
|
|
30
25
|
```bash
|
|
31
26
|
context run --managed --until blocked-or-complete --format json
|
|
32
27
|
```
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
Never persist or reuse that authority in another conversation. While the
|
|
30
|
+
request remains active, use `--managed` for every resumed status evaluation;
|
|
31
|
+
stop using it when the conversation ends or the user revokes it.
|
|
32
|
+
|
|
33
|
+
If the user is starting a new workspace or a new batch from a raw repository
|
|
34
|
+
root, do not run `context status` first. Use the public Context init entry or
|
|
35
|
+
`context init` to create the workspace, complete the init setup command, then
|
|
36
|
+
return here from the initialized workspace.
|
|
37
|
+
|
|
38
|
+
The managed loop is the default entry for an explicitly managed conversation,
|
|
39
|
+
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
35
40
|
non-managed authority in this conversation. This loop executes only one
|
|
36
41
|
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
37
42
|
before read-only interpretation, project configuration, unresolved authority,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN]"
|
|
3
|
+
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
|
|
4
4
|
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,6 +18,8 @@ Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
|
18
18
|
value controls generated workspace instructions and starter templates. Never
|
|
19
19
|
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
20
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.
|
|
21
23
|
|
|
22
24
|
If init reports `init-target-nonempty`, explain that existing files would share
|
|
23
25
|
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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.
|
|
21
|
+
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.3",
|
|
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",
|
|
@@ -19,31 +19,36 @@ Public Context entry for agents that expose skills instead of slash commands.
|
|
|
19
19
|
## Workflow
|
|
20
20
|
|
|
21
21
|
Use this as the conversational entry for an existing Context workspace. There
|
|
22
|
-
is no `context continue` CLI primitive.
|
|
22
|
+
is no `context continue` CLI primitive. Without explicit fully managed
|
|
23
|
+
authority, start with:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
26
|
context status --format json
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ends or the user revokes it.
|
|
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
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
37
|
-
return here from the initialized workspace.
|
|
38
|
-
|
|
39
|
-
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
40
|
-
mechanical routes:
|
|
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:
|
|
41
36
|
|
|
42
37
|
```bash
|
|
43
38
|
context run --managed --until blocked-or-complete --format json
|
|
44
39
|
```
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
Never persist or reuse that authority in another conversation. While the
|
|
42
|
+
request remains active, use `--managed` for every resumed status evaluation;
|
|
43
|
+
stop using it when the conversation ends or the user revokes it.
|
|
44
|
+
|
|
45
|
+
If the user is starting a new workspace or a new batch from a raw repository
|
|
46
|
+
root, do not run `context status` first. Use the public Context init entry or
|
|
47
|
+
`context init` to create the workspace, complete the init setup command, then
|
|
48
|
+
return here from the initialized workspace.
|
|
49
|
+
|
|
50
|
+
The managed loop is the default entry for an explicitly managed conversation,
|
|
51
|
+
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
47
52
|
non-managed authority in this conversation. This loop executes only one
|
|
48
53
|
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
49
54
|
before read-only interpretation, project configuration, unresolved authority,
|
|
@@ -30,6 +30,8 @@ Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
|
30
30
|
value controls generated workspace instructions and starter templates. Never
|
|
31
31
|
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
32
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.
|
|
33
35
|
|
|
34
36
|
If init reports `init-target-nonempty`, explain that existing files would share
|
|
35
37
|
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
@@ -11,31 +11,36 @@ Continue the Context workflow from the current workspace state.
|
|
|
11
11
|
## Workflow
|
|
12
12
|
|
|
13
13
|
Use this as the conversational entry for an existing Context workspace. There
|
|
14
|
-
is no `context continue` CLI primitive.
|
|
14
|
+
is no `context continue` CLI primitive. Without explicit fully managed
|
|
15
|
+
authority, start with:
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
18
|
context status --format json
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ends or the user revokes it.
|
|
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
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
29
|
-
return here from the initialized workspace.
|
|
30
|
-
|
|
31
|
-
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
32
|
-
mechanical routes:
|
|
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:
|
|
33
28
|
|
|
34
29
|
```bash
|
|
35
30
|
context run --managed --until blocked-or-complete --format json
|
|
36
31
|
```
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
Never persist or reuse that authority in another conversation. While the
|
|
34
|
+
request remains active, use `--managed` for every resumed status evaluation;
|
|
35
|
+
stop using it when the conversation ends or the user revokes it.
|
|
36
|
+
|
|
37
|
+
If the user is starting a new workspace or a new batch from a raw repository
|
|
38
|
+
root, do not run `context status` first. Use the public Context init entry or
|
|
39
|
+
`context init` to create the workspace, complete the init setup command, then
|
|
40
|
+
return here from the initialized workspace.
|
|
41
|
+
|
|
42
|
+
The managed loop is the default entry for an explicitly managed conversation,
|
|
43
|
+
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
39
44
|
non-managed authority in this conversation. This loop executes only one
|
|
40
45
|
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
41
46
|
before read-only interpretation, project configuration, unresolved authority,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Initialize a Context knowledge workspace."
|
|
3
|
-
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN]"
|
|
3
|
+
argument-hint: "[project-dir] [--name <name>] [--language en|zh-CN] [--debug]"
|
|
4
4
|
allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -22,6 +22,8 @@ Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
|
22
22
|
value controls generated workspace instructions and starter templates. Never
|
|
23
23
|
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
24
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.
|
|
25
27
|
|
|
26
28
|
If init reports `init-target-nonempty`, explain that existing files would share
|
|
27
29
|
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
@@ -19,31 +19,36 @@ Public Context entry for agents that expose skills instead of slash commands.
|
|
|
19
19
|
## Workflow
|
|
20
20
|
|
|
21
21
|
Use this as the conversational entry for an existing Context workspace. There
|
|
22
|
-
is no `context continue` CLI primitive.
|
|
22
|
+
is no `context continue` CLI primitive. Without explicit fully managed
|
|
23
|
+
authority, start with:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
26
|
context status --format json
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ends or the user revokes it.
|
|
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
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`context init` to create the workspace, complete the init setup command, then
|
|
37
|
-
return here from the initialized workspace.
|
|
38
|
-
|
|
39
|
-
For an explicitly managed conversation, the CLI can collapse consecutive
|
|
40
|
-
mechanical routes:
|
|
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:
|
|
41
36
|
|
|
42
37
|
```bash
|
|
43
38
|
context run --managed --until blocked-or-complete --format json
|
|
44
39
|
```
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
Never persist or reuse that authority in another conversation. While the
|
|
42
|
+
request remains active, use `--managed` for every resumed status evaluation;
|
|
43
|
+
stop using it when the conversation ends or the user revokes it.
|
|
44
|
+
|
|
45
|
+
If the user is starting a new workspace or a new batch from a raw repository
|
|
46
|
+
root, do not run `context status` first. Use the public Context init entry or
|
|
47
|
+
`context init` to create the workspace, complete the init setup command, then
|
|
48
|
+
return here from the initialized workspace.
|
|
49
|
+
|
|
50
|
+
The managed loop is the default entry for an explicitly managed conversation,
|
|
51
|
+
not an optional optimization. Pass an additional `--authority` only when the user explicitly granted that
|
|
47
52
|
non-managed authority in this conversation. This loop executes only one
|
|
48
53
|
revision-bound command at a time and re-evaluates after every receipt. It stops
|
|
49
54
|
before read-only interpretation, project configuration, unresolved authority,
|
|
@@ -30,6 +30,8 @@ Chinese conversation and `en` for an English conversation. This explicit CLI
|
|
|
30
30
|
value controls generated workspace instructions and starter templates. Never
|
|
31
31
|
substitute `.` when `project-dir` was omitted; the default is `context/`. Use
|
|
32
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.
|
|
33
35
|
|
|
34
36
|
If init reports `init-target-nonempty`, explain that existing files would share
|
|
35
37
|
the workspace root. Run the returned `--allow-nonempty` command only after
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
schema: agent-graph.action.v1
|
|
2
|
+
id: restore-repository-sources
|
|
3
|
+
description: Restore registered repository sources from user-confirmed local paths or explicit clones.
|
|
4
|
+
runner: command
|
|
5
|
+
effect: external
|
|
6
|
+
command: context source restore --input - --format json
|
|
7
|
+
inputSchema: schemas/repository-source-recovery.schema.json
|
|
@@ -18,7 +18,7 @@ codes:
|
|
|
18
18
|
- { code: route.evidence.decision-required, kind: route-reason, summary: A source-evidence change needs an explicit maintenance decision., document: resources/procedures/evidence-maintenance.md }
|
|
19
19
|
- { code: route.evidence.maintenance-required, kind: route-reason, summary: Apply the selected evidence-maintenance action., document: resources/procedures/evidence-maintenance.md }
|
|
20
20
|
- { code: route.source.boundary-required, kind: route-reason, summary: No knowledge source boundary has been registered., document: resources/procedures/source-boundary.md }
|
|
21
|
-
- { code: route.source.repository-not-ready, kind: route-reason, summary: A registered repository source
|
|
21
|
+
- { code: route.source.repository-not-ready, kind: route-reason, summary: A registered repository checkout or local source link must be restored., document: resources/procedures/repository-source-recovery.md }
|
|
22
22
|
- { code: route.capture.configuration-required, kind: route-reason, summary: Registered document sources are missing capture declarations., document: resources/procedures/project-configuration.md }
|
|
23
23
|
- { code: route.capture.permission-required, kind: route-reason, summary: External document capture requires source-read permission., document: resources/procedures/document-capture.md }
|
|
24
24
|
- { code: route.capture.pending-target, kind: route-reason, summary: Capture the next declared document target., document: resources/procedures/document-capture.md }
|
|
@@ -31,6 +31,7 @@ codes:
|
|
|
31
31
|
- { code: route.structure.confirmation-required, kind: route-reason, summary: A staged structure is waiting for confirmation., document: resources/procedures/prose-align.md }
|
|
32
32
|
- { code: route.structure.confirm, kind: route-reason, summary: Persist the confirmed structure slot., document: resources/procedures/prose-align.md }
|
|
33
33
|
- { code: route.compile.pending-target, kind: route-reason, summary: Compile the next planned source-bound knowledge view., document: resources/procedures/prose-compile.md }
|
|
34
|
+
- { code: route.review.identity-conflict, kind: route-reason, summary: Preserve approved ViewRef and path identity before Review., document: resources/procedures/knowledge-review.md }
|
|
34
35
|
- { code: route.review.decision-required, kind: route-reason, summary: The complete current candidate batch needs one review decision set., document: resources/procedures/knowledge-review.md }
|
|
35
36
|
- { code: route.review.apply-managed, kind: route-reason, summary: Apply the current candidate batch under explicit session-managed authority., document: resources/procedures/knowledge-review.md }
|
|
36
37
|
- { code: route.close.projection-stale, kind: route-reason, summary: Rebuild the deterministic approved structure projection., document: resources/procedures/close-and-build.md }
|