@c4a/context-cli 0.7.17 → 0.7.23
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 +16 -2
- package/README.zh-CN.md +16 -2
- package/cli.js +58612 -58073
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +1 -1
- package/package.json +12 -12
- package/plugins/README.md +5 -4
- package/plugins/README_CN.md +4 -2
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context-inspect-search.md +141 -170
- package/plugins/claude/commands/context.md +77 -6
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +77 -6
- package/plugins/codex/skills/context-inspect-search/SKILL.md +141 -170
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context-inspect-search.md +141 -170
- package/plugins/cursor/commands/c4a-context.md +77 -6
- package/plugins/skills/context/SKILL.md +77 -6
- package/plugins/skills/context-inspect-search/SKILL.md +141 -170
- package/providers/context/codes.yaml +1 -1
- package/providers/context/graphs/indexer.yaml +11 -7
- package/providers/context/graphs/workspace.yaml +5 -0
- package/providers/context/manifest.json +34 -34
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/manuals/guides/knowledge-updates.md +5 -1
- package/providers/context/resources/manuals/guides/workspace-prepare.md +9 -0
- package/providers/context/resources/manuals/guides/workspace-restore.md +5 -1
- package/providers/context/resources/procedures/approved-revision.md +20 -0
- package/providers/context/resources/procedures/knowledge-review.md +11 -4
- package/providers/context/resources/procedures/knowledge-updates.md +5 -1
- package/providers/context/resources/procedures/package-output.md +4 -0
- package/providers/context/resources/procedures/production-requirements.md +5 -3
- package/providers/context/resources/procedures/source-boundary.md +15 -5
- package/providers/context/resources/procedures/source-capture-detailed.md +17 -0
- package/providers/context/resources/procedures/work-start-report.md +19 -6
- package/providers/context/resources/procedures/workspace-prepare.md +9 -0
- package/providers/context/resources/procedures/workspace-restore.md +5 -1
- package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +7 -2
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +3 -2
- package/providers/context/skills/work-production-stage/SKILL.md +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local runtime and Agent integration for traceable knowledge production",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@c4a/agent-graph": "0.3.0",
|
|
27
|
-
"@c4a/context": "0.7.
|
|
28
|
-
"@c4a/extract": "0.7.
|
|
29
|
-
"@c4a/extract-contract": "0.7.
|
|
30
|
-
"@c4a/extract-go": "0.7.
|
|
31
|
-
"@c4a/extract-mdx": "0.7.
|
|
32
|
-
"@c4a/extract-proto": "0.7.
|
|
33
|
-
"@c4a/extract-rush": "0.7.
|
|
34
|
-
"@c4a/extract-sql": "0.7.
|
|
35
|
-
"@c4a/extract-style": "0.7.
|
|
36
|
-
"@c4a/extract-thrift": "0.7.
|
|
37
|
-
"@c4a/extract-ts": "0.7.
|
|
27
|
+
"@c4a/context": "0.7.23",
|
|
28
|
+
"@c4a/extract": "0.7.23",
|
|
29
|
+
"@c4a/extract-contract": "0.7.23",
|
|
30
|
+
"@c4a/extract-go": "0.7.23",
|
|
31
|
+
"@c4a/extract-mdx": "0.7.23",
|
|
32
|
+
"@c4a/extract-proto": "0.7.23",
|
|
33
|
+
"@c4a/extract-rush": "0.7.23",
|
|
34
|
+
"@c4a/extract-sql": "0.7.23",
|
|
35
|
+
"@c4a/extract-style": "0.7.23",
|
|
36
|
+
"@c4a/extract-thrift": "0.7.23",
|
|
37
|
+
"@c4a/extract-ts": "0.7.23",
|
|
38
38
|
"@mermaid-js/layout-elk": "0.2.0",
|
|
39
39
|
"commander": "^11.0.0",
|
|
40
40
|
"fast-xml-parser": "^5.10.1",
|
package/plugins/README.md
CHANGED
|
@@ -31,9 +31,10 @@ Context workflow and Indexer Provider lifecycle.
|
|
|
31
31
|
## Query and attribute workspace knowledge
|
|
32
32
|
|
|
33
33
|
Explicitly invoke `/c4a:context-inspect-search` (Cursor: `/c4a-context-inspect-search`)
|
|
34
|
-
or the `context-inspect-search` Skill. It
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
or the `context-inspect-search` Skill. It can start from a readable local, global or host-provided knowledge package and its query Skill without a local workspace. Without output, it
|
|
35
|
+
queries approved `knowledge` directly; a package build requires prior authorization for that workspace write.
|
|
36
|
+
Read-only investigation and bounded non-destructive checks need no further approval. For code attribution, it
|
|
37
|
+
retrieves the registered revision and checks relevant differences against current code without asking the user to select a version.
|
|
38
|
+
It traces package pages through the build inventory to approved originals and registered sources, without resetting production. Accepted suggestions hand off to `context`.
|
|
38
39
|
Codex disables implicit invocation through Skill policy; Claude commands disable
|
|
39
40
|
model invocation. Other hosts must honor the explicit-only instructions.
|
package/plugins/README_CN.md
CHANGED
|
@@ -27,8 +27,10 @@ Skills 只能通过完成校验的 Context Indexer Provider 生命周期激活
|
|
|
27
27
|
## 查询知识与来源归因
|
|
28
28
|
|
|
29
29
|
主动调用 `/c4a:context-inspect-search`(Cursor:`/c4a-context-inspect-search`),
|
|
30
|
-
或指定 `context-inspect-search`
|
|
31
|
-
|
|
30
|
+
或指定 `context-inspect-search` 技能。无需本地工作区即可检索本地、全局或宿主提供的知识包,优先使用包内查询技能;没有产物但有工作区时,
|
|
31
|
+
直接查询已批准的 `knowledge`,构建产物需事先获得写入工作区的授权。只读探索及有边界的
|
|
32
|
+
非破坏性检查无需再次确认。代码归因自动取得登记版本,并核对相关文件与当前代码的差异,
|
|
33
|
+
无需用户选择版本。通过构建清单关联批准原稿
|
|
32
34
|
并追溯登记来源,不清理工作区、不为查询推进无关生产任务。证据充分时可建议更新,用户采纳后交给
|
|
33
35
|
`context` 的当前流程。Codex 配置禁止隐式调用,Claude 命令配置禁止模型自动调用;
|
|
34
36
|
其他宿主依赖显式触发指引,不承诺其支持相同的自动调用控制。
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.23
|
|
@@ -1,177 +1,148 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Use only when the user explicitly invokes context-inspect-search to query
|
|
2
|
+
description: "Use only when the user explicitly invokes context-inspect-search to query available Context knowledge packages or approved workspace knowledge and trace answers to their identified sources. A local workspace is optional. Do not auto-start for ordinary coding, planning, debugging, or an active Context production workflow."
|
|
3
3
|
argument-hint: "[project-dir or user intent]"
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Context Inspect Search
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
For documents, notes and sessions, read
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
This is a local formatting step, not retrieval or validation. Do not probe URLs,
|
|
150
|
-
make HTTP/HEAD requests, open a browser, inspect a deployment platform, or check
|
|
151
|
-
remote versions to add links. Never build, publish or update metadata for this
|
|
152
|
-
purpose. If the map, URL or matching page is absent or malformed, keep the local
|
|
153
|
-
citation and continue silently. A configured URL does not prove that the site
|
|
154
|
-
contains the current local revision; do not claim online verification.
|
|
155
|
-
|
|
156
|
-
## Suggest improvements and hand off
|
|
157
|
-
|
|
158
|
-
When evidence supports a correction or worthwhile addition, briefly describe:
|
|
159
|
-
|
|
160
|
-
- the affected page or missing topic and the reader's actual problem;
|
|
161
|
-
- the supporting source location/version and what it establishes;
|
|
162
|
-
- whether to revise an existing page, adjust discoverability, add a topic, or
|
|
163
|
-
obtain missing material first;
|
|
164
|
-
- the bounded pages/sources involved and any uncertainty.
|
|
165
|
-
|
|
166
|
-
Check the existing scope and neighboring pages before recommending new content.
|
|
167
|
-
Do not create a page solely because a search missed it, and do not propose
|
|
168
|
-
unsupported claims as a knowledge update. With insufficient raw evidence, give
|
|
169
|
-
an actionable material request instead of forcing an update.
|
|
170
|
-
|
|
171
|
-
A suggestion is not authorization to write. Only when the user accepts the
|
|
172
|
-
update, hand the question, evidence, proposed change and scope to the installed
|
|
173
|
-
`context` production Skill in the same workspace. Read its fresh Route; it owns
|
|
174
|
-
candidate repair, approved-page revision and scheduling around active work.
|
|
175
|
-
Do not clear state, reuse an earlier revision, directly edit knowledge, or build
|
|
176
|
-
a second update workflow. If the production Skill/CLI is unavailable, provide
|
|
177
|
-
the handoff information and state that no update has started.
|
|
9
|
+
## Entry and boundaries
|
|
10
|
+
|
|
11
|
+
Use on explicit invocation and related follow-up questions; use the conversation
|
|
12
|
+
language. The invocation authorizes read-only investigation of the selected
|
|
13
|
+
knowledge packages, available workspace and identified sources within that scope,
|
|
14
|
+
including isolated source retrieval and bounded non-destructive checks. The Skill
|
|
15
|
+
can run from a global installation with host-provided packages and no workspace.
|
|
16
|
+
Resolve scope from the request, conversation and configuration before asking.
|
|
17
|
+
Continue through non-blocking issues; ask only for missing access, genuinely
|
|
18
|
+
unresolved scope or effects outside existing authorization.
|
|
19
|
+
|
|
20
|
+
Start from the supplied package locations or workspace configuration. If a
|
|
21
|
+
workspace exists, read its `AGENTS.md` and relevant configuration;
|
|
22
|
+
`context entry [project-dir] --format json` may help locate instructions.
|
|
23
|
+
Neither a workspace nor a working Context CLI is required for package retrieval;
|
|
24
|
+
do not call entry in an arbitrary directory just to satisfy a prerequisite.
|
|
25
|
+
Do not execute returned production actions, initialize a replacement workspace,
|
|
26
|
+
or install tools without existing authorization. Querying must not alter source
|
|
27
|
+
registrations, snapshots, tasks, approvals or user checkouts.
|
|
28
|
+
|
|
29
|
+
## Search available material concurrently
|
|
30
|
+
|
|
31
|
+
Check relevant knowledge packages, the workspace and reusable source checkouts
|
|
32
|
+
in parallel. Search each as soon as it is readable; tool checks and authorized
|
|
33
|
+
upgrades must not block independent reading. If a missing configured workspace
|
|
34
|
+
is needed for further attribution, recover it into an isolated directory while
|
|
35
|
+
package retrieval continues. Without a configured workspace, investigate the
|
|
36
|
+
available packages directly; do not request or create one merely to start.
|
|
37
|
+
|
|
38
|
+
A knowledge package may be workspace build output (usually `dist/`), a global
|
|
39
|
+
installation, or an equivalent host-provided directory. Locate it from available
|
|
40
|
+
configuration or installation metadata rather than assuming a fixed path.
|
|
41
|
+
Select packages relevant to the question. Follow their bundled query Skill when
|
|
42
|
+
present; otherwise search readable indexes and pages. Missing Skills or build
|
|
43
|
+
inventories do not block retrieval or justify rebuilding. If a needed package is
|
|
44
|
+
missing, use the host's configured, authorized package retrieval mechanism while
|
|
45
|
+
other reading continues. Only check or prepare tools needed for the next actual
|
|
46
|
+
operation; installation failure does not block independent local retrieval.
|
|
47
|
+
|
|
48
|
+
For gaps or latest-content questions, also search approved knowledge when a workspace is available:
|
|
49
|
+
use `knowledge/structure.yaml` and relevant `knowledge/` paths, trying business
|
|
50
|
+
terms, symbols and synonyms, then read matching sections in context. Delivered
|
|
51
|
+
content may lag approved knowledge; they are not independent corroboration.
|
|
52
|
+
Candidates and temporary reports are not approved pages. A search miss does not
|
|
53
|
+
prove a capability is absent. Do not build merely to answer a query; a separately
|
|
54
|
+
authorized build must follow its own workflow without advancing unrelated work.
|
|
55
|
+
|
|
56
|
+
When package or approved knowledge leaves a gap, directly trace relevant sources
|
|
57
|
+
without asking whether to deepen the query. Use available document, code-search
|
|
58
|
+
or extraction tools within the authorized scope, recording source identity and
|
|
59
|
+
version. Prepare sources while continuing other reading.
|
|
60
|
+
One failed source blocks only dependent claims. Answer when evidence is
|
|
61
|
+
sufficient, without completing unnecessary preparation.
|
|
62
|
+
|
|
63
|
+
## Trace and retrieve only relevant sources
|
|
64
|
+
|
|
65
|
+
Without a workspace, use explicit source references in the package, its metadata
|
|
66
|
+
or user configuration to identify relevant documents or repository paths and
|
|
67
|
+
commits. Read or retrieve those sources directly within scope; the workspace
|
|
68
|
+
registry is not a mandatory intermediate step. If the source identity or version
|
|
69
|
+
cannot be established, retain package-grounded findings and qualify attribution;
|
|
70
|
+
do not invent a repository or equate current source with the package's baseline.
|
|
71
|
+
|
|
72
|
+
When a workspace and `context-build-inventory.json` are available, map a delivered page's
|
|
73
|
+
`dist_path` through `approved_knowledge.files` to its `approved_path`, relative
|
|
74
|
+
to the workspace's `knowledge/` root. Follow the approved page's associations in
|
|
75
|
+
`knowledge/structure.yaml` and `sources/*/index.yaml`. Without a reliable mapping,
|
|
76
|
+
continue package retrieval and follow explicit source references where available.
|
|
77
|
+
Do not guess originals from similar filenames or claim attribution without
|
|
78
|
+
checking the referenced material.
|
|
79
|
+
|
|
80
|
+
Use the repository and recorded commit identified by the package or workspace
|
|
81
|
+
as the source baseline.
|
|
82
|
+
Reuse existing checkouts only after checking remote, commit, module coverage
|
|
83
|
+
and local changes; do not reset them or change their sparse configuration.
|
|
84
|
+
Missing code goes into a reusable query-owned path such as
|
|
85
|
+
`.tmp/context-inspect/<host>/<repository-path>/<commit>/`, separate from user
|
|
86
|
+
checkouts and production-managed sources. Use safe, credential-free path
|
|
87
|
+
components and the full commit. Verify identity before reuse; never overwrite
|
|
88
|
+
a mismatched directory. Deduplicate recovery and use one writer per checkout;
|
|
89
|
+
that writer may append sparse paths without resetting existing files.
|
|
90
|
+
|
|
91
|
+
Default to lightweight retrieval and sparse checkout:
|
|
92
|
+
|
|
93
|
+
- Use shallow history (`--depth=1`) and deferred contents (`--filter=blob:none`)
|
|
94
|
+
where supported, with a complete partial-clone setup and named promisor remote.
|
|
95
|
+
Configure the sparse scope before checkout and verify the resulting commit.
|
|
96
|
+
- Start from known module paths. If unclear, inspect
|
|
97
|
+
`git ls-tree -r --name-only <commit>` for candidates, then read code to confirm
|
|
98
|
+
their relevance. Expand along imports, calls and service routes as needed;
|
|
99
|
+
deepen history only when needed. A sparse search miss is not a whole-repository miss.
|
|
100
|
+
- Read ready modules while other recovery proceeds. Allow sufficient command
|
|
101
|
+
time (for example 300 seconds or more), but investigate confirmed stalls
|
|
102
|
+
without waiting for timeout; silence alone is not a stall. If unsupported or
|
|
103
|
+
unsuccessful, try caches, commit-specific file retrieval or bounded shallow
|
|
104
|
+
retrieval; use a full clone only when necessary. Do not retry blindly or
|
|
105
|
+
silently substitute the default branch for an unavailable recorded commit.
|
|
106
|
+
|
|
107
|
+
Query retrieval never runs `context source restore`, `task prepare` or production
|
|
108
|
+
capture/recovery actions. Production recovery gates do not block this independent
|
|
109
|
+
inspection. Preserve unavailable-evidence gaps rather than changing production
|
|
110
|
+
state to get past them.
|
|
111
|
+
|
|
112
|
+
Compare relevant baseline files with current code when accessible, including
|
|
113
|
+
relevant local changes. Use actual diffs to assess impact; current code is not a
|
|
114
|
+
substitute for the baseline. Mention a missing comparison only when it limits
|
|
115
|
+
the answer. For documents, notes and sessions, read saved bodies and necessary
|
|
116
|
+
attachments; fetch missing accessible material within scope. A summary is not a
|
|
117
|
+
full transcript, an unread link is not evidence, and current remote content does
|
|
118
|
+
not prove a historical snapshot.
|
|
119
|
+
|
|
120
|
+
## Answer with evidence and hand off updates
|
|
121
|
+
|
|
122
|
+
Lead with the conclusion and a concise evidence chain. Distinguish implementation,
|
|
123
|
+
declared contracts, test assertions, runtime observations and inferences. Perform
|
|
124
|
+
bounded non-destructive validation only when useful; inspect its effects first
|
|
125
|
+
and do not run unrelated scripts, builds or tests.
|
|
126
|
+
|
|
127
|
+
Link material actually read: source files at the inspected commit, knowledge
|
|
128
|
+
website articles and original documents. If no reliable clickable link exists,
|
|
129
|
+
give checkable local paths, symbols and short supporting excerpts with the
|
|
130
|
+
limitation. Do not dump internal reasoning, runtime identifiers or routine
|
|
131
|
+
version comparisons. Explain only differences affecting the answer; hashes may
|
|
132
|
+
appear in source URLs without requiring a separate version audit in the prose.
|
|
133
|
+
|
|
134
|
+
For website links, use `context-site-map.json` from the selected package or
|
|
135
|
+
sibling website output. Match `pages[].package_path` or `approved_path`, and
|
|
136
|
+
resolve `site_path` against `site_url` without prepending `base` again. Cite only
|
|
137
|
+
matched pages, deduplicate links and do not invent anchors. If mapping is absent
|
|
138
|
+
or invalid, retain local citations. Do not build, publish or probe remote sites
|
|
139
|
+
just to format citations; a local map is not proof of the current online content.
|
|
140
|
+
|
|
141
|
+
Suggest a knowledge update only with supporting evidence: identify the affected
|
|
142
|
+
page or gap, proposed change and bounded source scope. Check neighboring content
|
|
143
|
+
before proposing a new page. Only after user acceptance, hand the evidence and
|
|
144
|
+
scope to the installed `context` production Skill in the selected workspace and
|
|
145
|
+
its fresh Route. If no target workspace is known, resolve it at that handoff,
|
|
146
|
+
not as a prerequisite to answering. Do not edit approved knowledge, clear state
|
|
147
|
+
or reuse an earlier revision. If that entry
|
|
148
|
+
is unavailable, provide the handoff and state that no update has started.
|
|
@@ -99,13 +99,16 @@ settings. Reuse explicit answers and defaults; ask only for unresolved items.
|
|
|
99
99
|
|
|
100
100
|
Use focused dialogue, not additional source reading, until every required start
|
|
101
101
|
condition is resolved. Then write and present the complete work-start report
|
|
102
|
-
supplied by the source-boundary Route
|
|
102
|
+
supplied by the source-boundary Route. Apply the confirmation policy below: a
|
|
103
|
+
specific earlier user request can approve an unchanged, bounded scope; otherwise
|
|
104
|
+
wait for feedback when confirmation is required. Do not
|
|
103
105
|
present an unresolved draft as the report that authorizes production. The report
|
|
104
106
|
or checklist is task guidance, not a source unless the user explicitly asks to
|
|
105
107
|
ingest it. Before the complete report has been presented, do not write a
|
|
106
108
|
source-registration payload, start capture or extraction, configure Indexers,
|
|
107
109
|
or begin knowledge writing. A
|
|
108
|
-
managed-mode choice does not waive this first reading opportunity. After
|
|
110
|
+
managed-mode choice does not waive this first reading opportunity. After the
|
|
111
|
+
applicable scope decision,
|
|
109
112
|
use the exact current Route and include its work-start report reference in the
|
|
110
113
|
source batch payload. Existing workspace updates follow their current update Route
|
|
111
114
|
and do not recreate this first-task intake unless they start a new production task.
|
|
@@ -145,7 +148,9 @@ Follow the returned `next_action.command`:
|
|
|
145
148
|
|
|
146
149
|
- `enter-workspace` and `evaluate-workflow` are read-only.
|
|
147
150
|
- `initialize-workspace` may run immediately if the user requested initialization;
|
|
148
|
-
otherwise confirm the target.
|
|
151
|
+
otherwise confirm the target. For `context.gate.workspace_initialize_nonempty`,
|
|
152
|
+
reuse the user's explicit target choice; ask if the nonempty target was not
|
|
153
|
+
clearly selected.
|
|
149
154
|
- After initialization, execute its exact setup command, enter the project root,
|
|
150
155
|
read the generated `AGENTS.md`, then run the entry again.
|
|
151
156
|
|
|
@@ -162,6 +167,50 @@ Reuse an explicit review/managed choice across capture and continuation. Neither
|
|
|
162
167
|
mode settles unclear purpose, missing permissions or non-delegatable decisions.
|
|
163
168
|
Status, discussion and save-only requests need no production-mode question.
|
|
164
169
|
|
|
170
|
+
## Confirmation policy
|
|
171
|
+
|
|
172
|
+
The `context.gate.*` IDs below are stable Agent policy switches, not CLI flags or
|
|
173
|
+
workflow authority IDs. Keep the existing Route gate ID, command and payload
|
|
174
|
+
unchanged. An instance-specific Bot may override a switch; precedence is Bot >
|
|
175
|
+
fully managed > ordinary. Reuse a decision already made for the same scope.
|
|
176
|
+
|
|
177
|
+
| Policy ID | Ordinary default | Fully managed default | Existing Route gate, if any |
|
|
178
|
+
| --- | --- | --- | --- |
|
|
179
|
+
| `context.gate.production_entry` | Ask only if intent is unclear. | Same. | Context entry |
|
|
180
|
+
| `context.gate.workspace_initialize_nonempty` | Proceed if the user already selected this target; otherwise ask before initializing a nonempty directory. | Same. | Context entry `init-target-nonempty` |
|
|
181
|
+
| `context.gate.work_start_scope` | Present the report; ask only if the scope is complex **and** affects more than five new or revised articles. A matching request for 1–3 documents or one MR-triggered note needs no repeat question. | Same. | `production-work-start-report`, `indexer-semantic-structure-review` |
|
|
182
|
+
| `context.gate.source_boundary` | Use the user's selected source scope; ask only for missing boundaries. | Same. | `source-boundary` |
|
|
183
|
+
| `context.gate.source_read` | A user-supplied source authorizes reading it for the requested task; do not ask again. | Same. | `source-read-permission` |
|
|
184
|
+
| `context.gate.repository_clone` | Ask before cloning a missing repository. Other authorized recovery needs no repeat question. | Restore within the selected scope without asking. | Repository restore authority |
|
|
185
|
+
| `context.gate.indexer_extra_action` | Ask only if the operation blocks the requested result and no authorized alternative works. | Resolve eligible operations without asking. | Indexer authorization Routes |
|
|
186
|
+
| `context.gate.image_handling` | Ask once when the task has more than 30 distinct images and no prior handling choice. | Same. | Work-start report |
|
|
187
|
+
| `context.gate.top_level_directory` | Confirm the concrete structure. | Same. | Knowledge map guidance |
|
|
188
|
+
| `context.gate.knowledge_review` | Ask for a decision on the current HTML report. | Delegate when the Route permits. | `knowledge-review` |
|
|
189
|
+
| `context.gate.deletion_scope` | A user-approved deletion of exact sources or approved pages needs no second question after the CLI preview; ask only before deleting additional objects outside that scope. | Same. | Source remove / article retirement preview |
|
|
190
|
+
| `context.gate.force_review_approval` | If the user explicitly says `强制批准` after the report is inaccessible, execute the current force-approval Route without another question. | Same. | `knowledge-review` recovery |
|
|
191
|
+
| `context.gate.package_output` | Ask. | Choose within the requested delivery scope. | `package-output` |
|
|
192
|
+
| `context.gate.package_template` | Ask. | Choose within the requested delivery scope. | `package-template-review` |
|
|
193
|
+
| `context.gate.git_delivery` | Ask before commit, push or MR. | Same. | Host Git delivery |
|
|
194
|
+
| `context.gate.publication` | Ask before publishing. | Same. | Distribution tool |
|
|
195
|
+
| `context.gate.remote_target_create` | Ask before creating a remote target. | Same. | Distribution tool |
|
|
196
|
+
| `context.gate.workspace_reset_restore` | An explicit clear or historical restore request needs no second confirmation when target and losses are clear; clarify either if ambiguous. | Same. | Workspace prepare/restore |
|
|
197
|
+
| `context.gate.exceptional_recovery` | Ask only for a P0 blocker that prevents action and affects the requested result. | Same. | Current recovery Route |
|
|
198
|
+
|
|
199
|
+
`context.gate.work_start_scope` and `context.gate.knowledge_review` are separate
|
|
200
|
+
decisions; the latter uses the HTML report. Follow the current Route's payload and
|
|
201
|
+
revision. If a Route requires a human decision despite this policy, stop at that
|
|
202
|
+
Gate and report the mismatch instead of fabricating approval. For extra Indexer
|
|
203
|
+
operations that are not blocking, skip the optional operation rather than
|
|
204
|
+
granting its authority implicitly. Fully managed mode does not authorize
|
|
205
|
+
modifying source code or bypassing a non-delegatable Gate.
|
|
206
|
+
|
|
207
|
+
If an instance sets `context.gate.knowledge_review: ask` while using fully
|
|
208
|
+
managed mode, do not start a `--managed --until blocked-or-complete` loop that
|
|
209
|
+
could cross Review. At Review, evaluate without managed review authority and
|
|
210
|
+
follow the ordinary HTML report and user-decision Route. Force approval remains
|
|
211
|
+
available only after the user's exact Route-required reply; the override itself
|
|
212
|
+
never authorizes it.
|
|
213
|
+
|
|
165
214
|
Enable debug only when requested: use `entry --debug` for initialization or
|
|
166
215
|
`context debug enable` in an existing workspace. It records diagnostics under
|
|
167
216
|
`.tmp/context-runtime/debug/`; it grants no authority and is not source evidence.
|
|
@@ -174,6 +223,20 @@ npm install -g @c4a/context-cli@latest
|
|
|
174
223
|
context plugin install
|
|
175
224
|
```
|
|
176
225
|
|
|
226
|
+
For authorized local installation, `--local <path>` requires explicit `--agent`:
|
|
227
|
+
- `claude`, `cursor`, `codex`: path is the repository root; install into its
|
|
228
|
+
`.claude`, `.cursor`, `.agents` directory respectively, without host detection.
|
|
229
|
+
- `all`: install all three host layouts.
|
|
230
|
+
- `auto-detect`: select existing host directories in that repository only,
|
|
231
|
+
never PATH or desktop applications; if none exist, use `.agents/skills`.
|
|
232
|
+
- `standalone`: write all skills directly to `<path>/skills`, without commands.
|
|
233
|
+
All combinations support `--dry-run`. Bare `--local` is rejected. Older explicit
|
|
234
|
+
host installs took a host directory; now pass the repository root to avoid
|
|
235
|
+
nesting. Check CLI help for support before using these options on older versions.
|
|
236
|
+
Local entries have no plugin namespace and do not change global configuration.
|
|
237
|
+
Preserve customized files on conflict; refresh the host after installation.
|
|
238
|
+
Existing usable entries need no reinstall. Global installation is unchanged.
|
|
239
|
+
|
|
177
240
|
Stop with that recovery. Do not run an installation preflight or auto-install;
|
|
178
241
|
a normal Context `not found` diagnostic does not mean the executable is missing.
|
|
179
242
|
|
|
@@ -227,8 +290,9 @@ clear runtime state to force a transition. Explicit historical restoration may
|
|
|
227
290
|
restore exact Git-saved workspace files after the preparation guide has ended
|
|
228
291
|
old task state; it is not an alternative content-writing path. Do not infer sources, extraction
|
|
229
292
|
scope, review decisions or package choices from surrounding files. Operations on
|
|
230
|
-
source repositories
|
|
231
|
-
|
|
293
|
+
source repositories stay within the selected source scope. Ask before cloning in
|
|
294
|
+
ordinary mode. Do not modify source code or run destructive recovery outside the
|
|
295
|
+
user's authorization.
|
|
232
296
|
|
|
233
297
|
## Follow the current Route
|
|
234
298
|
|
|
@@ -240,7 +304,8 @@ explicit grant.
|
|
|
240
304
|
|
|
241
305
|
After continuation is authorized or the new target is registered, both modes
|
|
242
306
|
may use `context run --until blocked-or-complete` for consecutive mechanical
|
|
243
|
-
steps. With explicit managed authorization
|
|
307
|
+
steps. With explicit managed authorization and no instance-specific Review
|
|
308
|
+
override:
|
|
244
309
|
|
|
245
310
|
```bash
|
|
246
311
|
context run --managed --until blocked-or-complete --format json
|
|
@@ -290,6 +355,12 @@ Mechanical blockers follow the returned repair/recovery action; advisory
|
|
|
290
355
|
warnings do not independently require rewriting content. Migration also uses
|
|
291
356
|
its returned command, not manual path renames.
|
|
292
357
|
|
|
358
|
+
For Lark capture, use the available `lark-cli` without a session-wide version
|
|
359
|
+
precheck. Only when the Context command reports a missing or incompatible CLI,
|
|
360
|
+
follow its private-install recovery. Keep `CONTEXT_LARK_CLI_BIN` pointing to that
|
|
361
|
+
private executable on subsequent Context commands that access Lark; do not
|
|
362
|
+
upgrade or replace the host's global `lark-cli`.
|
|
363
|
+
|
|
293
364
|
**Continue.** Read `next_route.file` for the full Route after a compact receipt;
|
|
294
365
|
`result_file` is for full diagnostics. Otherwise use the returned workspace
|
|
295
366
|
Route (`next`, `continuation.next` or `workflow.current`). Do not call status
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c4a",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.23",
|
|
4
4
|
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
|
|
5
5
|
"author": { "name": "c4a" },
|
|
6
6
|
"homepage": "https://github.com/context4ai/c4a",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"skills": "./skills/",
|
|
11
11
|
"interface": {
|
|
12
12
|
"displayName": "C4A Context",
|
|
13
|
-
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.
|
|
13
|
+
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.23",
|
|
14
14
|
"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.",
|
|
15
15
|
"developerName": "c4a",
|
|
16
16
|
"category": "Productivity",
|