@c4a/context-cli 0.7.26 → 0.7.29
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/cli.js +59 -41
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +1 -1
- package/package.json +12 -12
- package/parserEntryWorker.js +90 -10
- package/plugins/README.md +1 -1
- package/plugins/README_CN.md +1 -1
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context-inspect-search.md +44 -9
- package/plugins/claude/skills/context-inspect-search/SKILL.md +44 -9
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context-inspect-search/SKILL.md +44 -9
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context-inspect-search.md +44 -9
- package/plugins/cursor/skills/context-inspect-search/SKILL.md +44 -9
- package/plugins/skills/context-inspect-search/SKILL.md +44 -9
- package/providers/context/graphs/indexer.yaml +4 -0
- package/providers/context/manifest.json +17 -8
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/procedures/document-code-investigation.md +45 -0
- package/providers/context/resources/procedures/repository-source-recovery.md +8 -1
- package/providers/context/skills/work-production-stage/SKILL.md +4 -0
|
@@ -25,14 +25,35 @@ Do not execute returned production actions, initialize a replacement workspace,
|
|
|
25
25
|
or install tools without existing authorization. Querying must not alter source
|
|
26
26
|
registrations, snapshots, tasks, approvals or user checkouts.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
package
|
|
35
|
-
|
|
28
|
+
Resolve `CONTEXT_QUERY_SOURCE_MODE` from the host or Bot instance configuration
|
|
29
|
+
before choosing the first retrieval path. Supported values are:
|
|
30
|
+
|
|
31
|
+
- `repo-first` (default): inspect the configured knowledge workspace and
|
|
32
|
+
authorized repository sources first. Use an available package only when the
|
|
33
|
+
repository path is unavailable or leaves a material gap.
|
|
34
|
+
- `package-first`: inspect the selected package first, then use its recorded
|
|
35
|
+
workspace or repository sources for missing, stale or disputed evidence.
|
|
36
|
+
- `dual`: inspect the package and repository paths concurrently, then reconcile
|
|
37
|
+
relevant differences before answering.
|
|
38
|
+
|
|
39
|
+
An unknown or empty value is `repo-first`; do not invent a fourth mode. The
|
|
40
|
+
mode changes retrieval order, not authorization or evidence standards. It does
|
|
41
|
+
not make a missing secondary source mandatory: continue with readable configured
|
|
42
|
+
sources and identify only gaps that affect the answer.
|
|
43
|
+
|
|
44
|
+
## Search available material according to the configured mode
|
|
45
|
+
|
|
46
|
+
Apply `CONTEXT_QUERY_SOURCE_MODE` before starting retrieval. In `repo-first`,
|
|
47
|
+
start with the configured workspace and reusable source checkouts; do not fetch
|
|
48
|
+
or install a package merely to begin the query. In `package-first`, start with
|
|
49
|
+
the selected readable package. In `dual`, start both paths concurrently. Search
|
|
50
|
+
each selected path as soon as it is readable; tool checks and authorized
|
|
51
|
+
upgrades must not block independent reading. If a configured primary path is
|
|
52
|
+
missing, continue with the readable fallback instead of stopping. If a missing
|
|
53
|
+
configured workspace is needed for further attribution, recover it into an
|
|
54
|
+
isolated directory while other selected retrieval continues. Without a
|
|
55
|
+
configured workspace, investigate available packages directly; do not request
|
|
56
|
+
or create one merely to start.
|
|
36
57
|
|
|
37
58
|
A knowledge package may be workspace build output (usually `dist/`), a global
|
|
38
59
|
installation, or an equivalent host-provided directory. Locate it from available
|
|
@@ -118,7 +139,21 @@ not prove a historical snapshot.
|
|
|
118
139
|
|
|
119
140
|
## Answer with evidence and hand off updates
|
|
120
141
|
|
|
121
|
-
|
|
142
|
+
Answer the user's question directly, keeping conditions that change the conclusion
|
|
143
|
+
beside it. For complex questions, explain the mechanism that determines the result,
|
|
144
|
+
not just the verdict and source links. Explain its practical meaning before using
|
|
145
|
+
a short code excerpt or concrete rule when that helps the reader verify or act.
|
|
146
|
+
Keep decisive evidence beside the claim it supports; separate supplementary facts
|
|
147
|
+
from the proof. State where a local rule applies rather than generalizing it to
|
|
148
|
+
the whole system, and do not infer presentation or behavior from data retrieval
|
|
149
|
+
alone without checking the controlling logic.
|
|
150
|
+
|
|
151
|
+
Adapt depth and structure to the question: keep simple answers short; use short
|
|
152
|
+
headings and, where supported, separators between major semantic sections in
|
|
153
|
+
longer answers. Do not impose a fixed outline, separate every paragraph, repeat
|
|
154
|
+
the conclusion, or remove necessary explanation just to shorten the answer.
|
|
155
|
+
Keep conditions affecting the answer prominent and supplementary reading secondary.
|
|
156
|
+
Distinguish implementation,
|
|
122
157
|
declared contracts, test assertions, runtime observations and inferences. Perform
|
|
123
158
|
bounded non-destructive validation only when useful; inspect its effects first
|
|
124
159
|
and do not run unrelated scripts, builds or tests.
|
|
@@ -36,6 +36,10 @@ nodes:
|
|
|
36
36
|
kind: action
|
|
37
37
|
reasonCode: route.production.planning-required
|
|
38
38
|
action: actions/work-production-stage.yaml
|
|
39
|
+
resources:
|
|
40
|
+
recommended:
|
|
41
|
+
- resources/procedures/document-code-investigation.md
|
|
42
|
+
- resources/procedures/repository-source-recovery.md
|
|
39
43
|
satisfiedBy:
|
|
40
44
|
- path: production.planning_complete
|
|
41
45
|
equals: true
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"schema": "agent-graph.bundle.v1",
|
|
3
3
|
"provider": {
|
|
4
4
|
"id": "c4a/context",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.29"
|
|
6
6
|
},
|
|
7
7
|
"providerManifest": "provider.yaml",
|
|
8
8
|
"graphs": [
|
|
9
9
|
{
|
|
10
10
|
"id": "indexer",
|
|
11
11
|
"path": "graphs/indexer.yaml",
|
|
12
|
-
"digest": "sha256:
|
|
12
|
+
"digest": "sha256:d52242180fbe1afea09946bb223a698f7e0637f81d619d9245acb74732f2409e"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"id": "workspace",
|
|
@@ -290,6 +290,11 @@
|
|
|
290
290
|
"path": "resources/procedures/document-capture.md",
|
|
291
291
|
"digest": "sha256:9d0d1b9187bbe540a4afffb366cd549385dbf61bfaffa96ae51de848b2dd5460"
|
|
292
292
|
},
|
|
293
|
+
{
|
|
294
|
+
"id": "procedure.document-code-investigation",
|
|
295
|
+
"path": "resources/procedures/document-code-investigation.md",
|
|
296
|
+
"digest": "sha256:eff8e54b9e1c1139c5df82a0685a365bce902dfb4a19c17e380967ee1c1762f5"
|
|
297
|
+
},
|
|
293
298
|
{
|
|
294
299
|
"id": "procedure.homogeneous-source-review",
|
|
295
300
|
"path": "resources/procedures/homogeneous-source-review.md",
|
|
@@ -343,7 +348,7 @@
|
|
|
343
348
|
{
|
|
344
349
|
"id": "procedure.repository-source-recovery",
|
|
345
350
|
"path": "resources/procedures/repository-source-recovery.md",
|
|
346
|
-
"digest": "sha256:
|
|
351
|
+
"digest": "sha256:20a8112df985a20481e914a564c64c231218c73c1630d74cd46d72987e54f714"
|
|
347
352
|
},
|
|
348
353
|
{
|
|
349
354
|
"id": "procedure.runtime-event-delivery",
|
|
@@ -562,7 +567,7 @@
|
|
|
562
567
|
},
|
|
563
568
|
{
|
|
564
569
|
"path": "graphs/indexer.yaml",
|
|
565
|
-
"digest": "sha256:
|
|
570
|
+
"digest": "sha256:d52242180fbe1afea09946bb223a698f7e0637f81d619d9245acb74732f2409e"
|
|
566
571
|
},
|
|
567
572
|
{
|
|
568
573
|
"path": "graphs/workspace.yaml",
|
|
@@ -570,7 +575,7 @@
|
|
|
570
575
|
},
|
|
571
576
|
{
|
|
572
577
|
"path": "provider.yaml",
|
|
573
|
-
"digest": "sha256:
|
|
578
|
+
"digest": "sha256:0a21f82483186c4fe1f6f450923d0d336300274fb95e2c7ee3569700ba922372"
|
|
574
579
|
},
|
|
575
580
|
{
|
|
576
581
|
"path": "resources/contracts/indexer-provider-guide.yaml",
|
|
@@ -692,6 +697,10 @@
|
|
|
692
697
|
"path": "resources/procedures/document-capture.md",
|
|
693
698
|
"digest": "sha256:9d0d1b9187bbe540a4afffb366cd549385dbf61bfaffa96ae51de848b2dd5460"
|
|
694
699
|
},
|
|
700
|
+
{
|
|
701
|
+
"path": "resources/procedures/document-code-investigation.md",
|
|
702
|
+
"digest": "sha256:eff8e54b9e1c1139c5df82a0685a365bce902dfb4a19c17e380967ee1c1762f5"
|
|
703
|
+
},
|
|
695
704
|
{
|
|
696
705
|
"path": "resources/procedures/homogeneous-source-review.md",
|
|
697
706
|
"digest": "sha256:e9746b45351f3c58f1eca90f786fa5ddef06b19024f4ba5539a0c21e0a1508da"
|
|
@@ -734,7 +743,7 @@
|
|
|
734
743
|
},
|
|
735
744
|
{
|
|
736
745
|
"path": "resources/procedures/repository-source-recovery.md",
|
|
737
|
-
"digest": "sha256:
|
|
746
|
+
"digest": "sha256:20a8112df985a20481e914a564c64c231218c73c1630d74cd46d72987e54f714"
|
|
738
747
|
},
|
|
739
748
|
{
|
|
740
749
|
"path": "resources/procedures/runtime-event-delivery.md",
|
|
@@ -862,12 +871,12 @@
|
|
|
862
871
|
},
|
|
863
872
|
{
|
|
864
873
|
"path": "skills/work-production-stage/SKILL.md",
|
|
865
|
-
"digest": "sha256:
|
|
874
|
+
"digest": "sha256:676289693df57b5887f104d751dd9c8cc73fb1c903e4df7088f110ef6147388a"
|
|
866
875
|
}
|
|
867
876
|
],
|
|
868
877
|
"graphDependencies": {
|
|
869
878
|
"indexer": [],
|
|
870
879
|
"workspace": []
|
|
871
880
|
},
|
|
872
|
-
"digest": "sha256:
|
|
881
|
+
"digest": "sha256:3e0f9fc6f81571381dced3a8d02b20624022183e924c7b99c16430c8924d624d"
|
|
873
882
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: procedure.document-code-investigation
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: text/markdown
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Assess code needs during document investigation
|
|
8
|
+
|
|
9
|
+
Register the requested document sources before preparing their article plan.
|
|
10
|
+
Continue authorized document capture even when unrelated registered repositories
|
|
11
|
+
are unavailable. Existing workspace coverage does not select the current task's
|
|
12
|
+
code dependencies.
|
|
13
|
+
|
|
14
|
+
After reading outlines, representative bodies and related approved articles,
|
|
15
|
+
group the reader topics and assess whether code investigation is needed before
|
|
16
|
+
submitting the plan and work-start report. Large collections can be investigated
|
|
17
|
+
in batches while capture continues. If the expected production plan exceeds 30
|
|
18
|
+
article tasks, explicitly perform this assessment before bulk writing. This is
|
|
19
|
+
Agent guidance, not a CLI validation threshold. Wiki nodes, documents and article
|
|
20
|
+
tasks are different counts; more than 30 document nodes calls for early batched
|
|
21
|
+
investigation, not an assumption of 30 articles or automatic repository recovery.
|
|
22
|
+
|
|
23
|
+
Code evidence is useful when the reader task requires implementation behavior,
|
|
24
|
+
call chains, interface constraints or debugging entry points, or when incomplete
|
|
25
|
+
or conflicting documents require checking code. Explicit file, symbol or API
|
|
26
|
+
references strengthen that assessment. A repository link or service name alone
|
|
27
|
+
does not establish a dependency. Keep document-supported topics independent.
|
|
28
|
+
|
|
29
|
+
Use existing plan briefs or report prose to explain which reader questions need
|
|
30
|
+
which registered modules and why; no separate assessment receipt, score or
|
|
31
|
+
required schema field is needed. If code is needed, inspect its availability with
|
|
32
|
+
`context source recovery-plan <registered-name> --format json`. Follow
|
|
33
|
+
[repository source recovery](repository-source-recovery.md), reusing applicable
|
|
34
|
+
authorization and local checkouts. Prefer the smallest sufficient registered
|
|
35
|
+
module scope. Expand to a shared physical checkout or whole repository when
|
|
36
|
+
cross-module calls, common dependencies or uncertain boundaries require it;
|
|
37
|
+
do not substitute a different remote or pinned commit.
|
|
38
|
+
|
|
39
|
+
If recovery is unavailable, continue independent document tasks. Keep questions
|
|
40
|
+
requiring unread code pending, or narrow the article to supported document
|
|
41
|
+
claims and explain its limits. Do not present inferred implementation as verified
|
|
42
|
+
code, delete configured sources, or clear a stage to bypass unavailable evidence.
|
|
43
|
+
After recovery, follow its returned preparation command and current task handles;
|
|
44
|
+
retain accepted work instead of restarting the task. Reassess code needs when
|
|
45
|
+
later reading exposes a dependency that the initial sample did not show.
|
|
@@ -17,7 +17,9 @@ remote and pinned commit, so one physical checkout can restore every module in
|
|
|
17
17
|
that group. Do not create one clone per module. Groups already marked `ready`
|
|
18
18
|
need no decision; when every group is ready, the plan has no recovery action.
|
|
19
19
|
|
|
20
|
-
For each missing physical checkout,
|
|
20
|
+
For each missing physical checkout, reuse an applicable choice and authorization
|
|
21
|
+
already supplied in the current task. If the recovery choice is unresolved, ask
|
|
22
|
+
the user to choose one option:
|
|
21
23
|
|
|
22
24
|
1. provide an existing local Git checkout;
|
|
23
25
|
2. name a bounded directory that the Agent may scan, then choose one of the
|
|
@@ -43,3 +45,8 @@ Repository sources are ready only when every selected module resolves to the
|
|
|
43
45
|
registered remote and pinned commit, every registered subpath exists, no local
|
|
44
46
|
path was overwritten, Context materialization succeeds, and the selected recovery
|
|
45
47
|
plan reports them ready.
|
|
48
|
+
|
|
49
|
+
Recovery failure does not stop unrelated document capture or independent article
|
|
50
|
+
tasks. Preserve pending code-dependent questions and follow the returned recovery
|
|
51
|
+
diagnostic. After a successful restore, follow `next_action` to refresh affected
|
|
52
|
+
production material; keep accepted articles and use the newly returned handles.
|
|
@@ -19,6 +19,10 @@ where needed to decide reader topics, source grouping and writing batches.
|
|
|
19
19
|
Indexer guidance discovers a skeleton, not a mandatory deep parse or a ledger
|
|
20
20
|
of every symbol. Declare relevant available skills and record planned uses;
|
|
21
21
|
do not collect skill hashes, versions or article ownership credentials.
|
|
22
|
+
After reading representative documents and grouping reader topics, apply
|
|
23
|
+
[document and code investigation guidance](../../resources/procedures/document-code-investigation.md)
|
|
24
|
+
before submitting the article plan. Revisit it when new implementation questions
|
|
25
|
+
appear during writing. This assessment adds no approval gate or required field.
|
|
22
26
|
Submit the plan before presenting the work-start report. Planning does not
|
|
23
27
|
authorize writing or approve the report.
|
|
24
28
|
|