@c4a/context-cli 0.6.0-beta.8 → 0.6.1
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/LICENSE +21 -0
- package/README.md +129 -137
- package/cli.js +1573 -3320
- package/package.json +18 -3
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/skill-review-gate/SKILL.md +0 -3
- package/plugins/claude/skills/skill-source-scope/SKILL.md +0 -6
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +0 -3
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +0 -6
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +0 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +0 -6
- package/plugin/.claude-plugin/plugin.json.template +0 -16
- package/plugin/.codex-plugin/plugin.json.template +0 -38
- package/plugin/.cursor-plugin/plugin.json.template +0 -29
- package/plugin/README.md +0 -158
- package/plugin/README_CN.md +0 -142
- package/plugin/assets/icon.svg +0 -3
- package/plugin/assets/logo.svg +0 -3
- package/plugin/assets/workflow-en.png +0 -0
- package/plugin/assets/workflow.png +0 -0
- package/plugin/commands/continue.md +0 -34
- package/plugin/commands/init.md +0 -21
- package/plugin/skills/skill-continue-workflow/SKILL.md +0 -235
- package/plugin/skills/skill-init-workspace/SKILL.md +0 -74
- package/plugin/skills/skill-package-output/SKILL.md +0 -180
- package/plugin/skills/skill-prose-align/SKILL.md +0 -322
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/candidate-resolution.md +0 -91
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/density-profile.md +0 -30
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +0 -263
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +0 -282
- package/plugin/skills/skill-prose-compile/SKILL.md +0 -287
- package/plugin/skills/skill-prose-compile/references/internal-procedures/close-gate.md +0 -132
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/action-domain-gates.md +0 -52
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/notes.md +0 -48
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/refresh-and-update.md +0 -85
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions/references/structural-challenges.md +0 -73
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-actions.md +0 -413
- package/plugin/skills/skill-prose-compile/references/internal-procedures/compile-judgment.md +0 -123
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/disposition-semantics.md +0 -81
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/leakage-and-ownership.md +0 -55
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/scope-review-and-omit.md +0 -93
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/temporal-and-evidence.md +0 -79
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment/references/user-confirmation.md +0 -111
- package/plugin/skills/skill-prose-compile/references/internal-procedures/semantic-judgment.md +0 -194
- package/plugin/skills/skill-review-gate/SKILL.md +0 -141
- package/plugin/skills/skill-source-scope/SKILL.md +0 -531
- package/plugin/skills/skill-source-scope/references/capture-source.md +0 -201
- package/plugins/assets/icon.svg +0 -3
- package/plugins/assets/workflow-en.png +0 -0
- package/plugins/assets/workflow.png +0 -0
- package/plugins/codex/assets/workflow-en.png +0 -0
- package/plugins/codex/assets/workflow.png +0 -0
- package/plugins/cursor/assets/icon.svg +0 -3
- package/plugins/cursor/assets/workflow-en.png +0 -0
- package/plugins/cursor/assets/workflow.png +0 -0
- package/scripts/build-plugin.ts +0 -658
package/package.json
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c4a/context-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"description": "Local CLI for capturing, compiling, and governing knowledge workspaces",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/context4ai/context.git",
|
|
10
|
+
"directory": "packages/context-cli"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"cli",
|
|
14
|
+
"knowledge",
|
|
15
|
+
"context",
|
|
16
|
+
"claude-code",
|
|
17
|
+
"claude-plugin"
|
|
18
|
+
],
|
|
5
19
|
"bin": {
|
|
6
|
-
"context": "
|
|
20
|
+
"context": "cli.js"
|
|
7
21
|
},
|
|
8
22
|
"dependencies": {
|
|
9
|
-
"@c4a/context": "0.6.
|
|
23
|
+
"@c4a/context": "0.6.1",
|
|
10
24
|
"commander": "^11.0.0",
|
|
11
25
|
"handlebars": "^4.7.8",
|
|
12
26
|
"ink": "^5.0.0",
|
|
@@ -19,6 +33,7 @@
|
|
|
19
33
|
"remark-stringify": "^11.0.0",
|
|
20
34
|
"typescript": "^5.5.4",
|
|
21
35
|
"unified": "^11.0.5",
|
|
36
|
+
"web-tree-sitter": "^0.20.8",
|
|
22
37
|
"yaml": "^2.5.1"
|
|
23
38
|
},
|
|
24
39
|
"main": "./cli.js",
|
package/plugins/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.1
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
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.1",
|
|
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",
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md
CHANGED
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -44,9 +44,6 @@ Run the human review gate. The user decides approval or rejection.
|
|
|
44
44
|
codegraph-only CI/CD policy. It may apply code add/update/remove deltas and
|
|
45
45
|
refresh deterministic close, and verify them without this gate; it never
|
|
46
46
|
applies to semantic knowledge. Package build remains an explicit later step.
|
|
47
|
-
- `approved-source-ref-ambiguous` on beta.5 approved codegraph pages is an
|
|
48
|
-
evidence migration, not a new review decision. Rerun the declared codegraph
|
|
49
|
-
extraction, then run `context review migrate-codegraph-refs` and verify.
|
|
50
47
|
|
|
51
48
|
<procedures>
|
|
52
49
|
|
|
@@ -508,12 +508,6 @@ needed, and verifies the result. Read `autoPromotion.close` and
|
|
|
508
508
|
failure. Run `context build` separately when the pipeline publishes packages.
|
|
509
509
|
Never use `--auto-promote` for prose or semantic collections.
|
|
510
510
|
|
|
511
|
-
If an upgraded workspace reports `approved-source-ref-ambiguous` for pre-file-aware
|
|
512
|
-
beta.5 codegraph refs, preserve the existing approval decisions. Rerun the
|
|
513
|
-
declared codegraph extraction phase to produce the current file-aware symbol
|
|
514
|
-
index, then run `context review migrate-codegraph-refs` and `context verify`.
|
|
515
|
-
Tell the user this is evidence metadata migration and does not reopen Review.
|
|
516
|
-
|
|
517
511
|
If the preview reports modules outside the confirmed source boundary, do not
|
|
518
512
|
run extraction. Ask the user to choose the corrected source boundary.
|
|
519
513
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "context",
|
|
3
|
-
"description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
|
|
4
|
-
"version": "__VERSION__",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "c4a"
|
|
7
|
-
},
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"context",
|
|
11
|
-
"knowledge-base",
|
|
12
|
-
"wiki",
|
|
13
|
-
"claude-plugin",
|
|
14
|
-
"c4a"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "context",
|
|
3
|
-
"version": "__VERSION__",
|
|
4
|
-
"description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "c4a"
|
|
7
|
-
},
|
|
8
|
-
"homepage": "https://github.com/context4ai/c4a",
|
|
9
|
-
"repository": "https://github.com/context4ai/c4a/tree/main/packages/context-cli",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"context",
|
|
13
|
-
"knowledge-base",
|
|
14
|
-
"codex-plugin",
|
|
15
|
-
"agent-skills",
|
|
16
|
-
"c4a"
|
|
17
|
-
],
|
|
18
|
-
"skills": "./skills/",
|
|
19
|
-
"interface": {
|
|
20
|
-
"displayName": "C4A Context",
|
|
21
|
-
"shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv__VERSION__",
|
|
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
|
-
"developerName": "c4a",
|
|
24
|
-
"category": "Productivity",
|
|
25
|
-
"brandColor": "#ef6f2e",
|
|
26
|
-
"composerIcon": "./assets/icon.svg",
|
|
27
|
-
"logo": "./assets/logo.svg",
|
|
28
|
-
"capabilities": [
|
|
29
|
-
"Read",
|
|
30
|
-
"Write"
|
|
31
|
-
],
|
|
32
|
-
"websiteURL": "https://github.com/context4ai/c4a",
|
|
33
|
-
"defaultPrompt": [
|
|
34
|
-
"Continue my Context workspace with the next useful step.",
|
|
35
|
-
"Inspect my Context workspace and proceed safely."
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "context",
|
|
3
|
-
"displayName": "C4A Context",
|
|
4
|
-
"version": "__VERSION__",
|
|
5
|
-
"description": "Maintain a project-local knowledge workspace through init and next-step agent guidance.",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "Context4AI",
|
|
8
|
-
"email": "support@context4ai.dev"
|
|
9
|
-
},
|
|
10
|
-
"homepage": "https://github.com/context4ai/c4a",
|
|
11
|
-
"repository": "https://github.com/context4ai/c4a",
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"logo": "assets/logo.svg",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"context",
|
|
16
|
-
"knowledge",
|
|
17
|
-
"citations",
|
|
18
|
-
"agent-skills"
|
|
19
|
-
],
|
|
20
|
-
"category": "developer-tools",
|
|
21
|
-
"tags": [
|
|
22
|
-
"knowledge",
|
|
23
|
-
"documentation",
|
|
24
|
-
"agent-skills",
|
|
25
|
-
"citations"
|
|
26
|
-
],
|
|
27
|
-
"commands": "./commands/",
|
|
28
|
-
"skills": "./skills/"
|
|
29
|
-
}
|
package/plugin/README.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Context Plugin
|
|
2
|
-
|
|
3
|
-
> [中文版本](./README_CN.md)
|
|
4
|
-
|
|
5
|
-
<p align="center"><img src="./assets/logo.svg" alt="C4A Context" width="180"/></p>
|
|
6
|
-
|
|
7
|
-
Context provides agent commands for maintaining a project-local knowledge workspace. The plugin is installed globally for the agent, while each workspace keeps its own sources, pending review state, approved knowledge, and build output. Public agent entrypoints are intentionally small: initialize once, then use next-step guidance.
|
|
8
|
-
|
|
9
|
-
Agent dialogue should follow the user's current conversation language. CLI
|
|
10
|
-
commands, flags, ids, status values, JSONL keys, and `source_ref` tokens are
|
|
11
|
-
protocol text and stay unchanged.
|
|
12
|
-
|
|
13
|
-
## Install
|
|
14
|
-
|
|
15
|
-
Install the CLI first:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm i -g @c4a/context-cli
|
|
19
|
-
# or
|
|
20
|
-
bun add -g @c4a/context-cli
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Then install the bundled plugin marketplace globally:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
context plugin install
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The installer resolves the plugin marketplace from the installed CLI package. Published packages use `dist/plugins`; source checkouts use the same generated tree after `bun run --filter @c4a/context-cli build`. For Codex, it materializes the bundled plugin into `~/.codex/plugins/cache/c4a/context/local/`, matching Codex's local-plugin cache convention.
|
|
30
|
-
|
|
31
|
-
For a dry run:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
context plugin install --dry-run
|
|
35
|
-
context plugin path
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Workflow
|
|
39
|
-
|
|
40
|
-
Run commands from the context project root.
|
|
41
|
-
|
|
42
|
-
1. Initialize a workspace:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
context init context
|
|
46
|
-
cd context
|
|
47
|
-
bun install
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
2. Continue through the installed agent entry:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
<host-specific Context continuation command or skill>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The continuation entry first runs `context status`, then follows CLI diagnostics. It
|
|
57
|
-
executes safe mechanical `next:` steps instead of only reporting them, and stops
|
|
58
|
-
at `Human gate:` / placeholder next steps, source registration, source scope
|
|
59
|
-
selection, review, package output choice, or source-repo operations that require
|
|
60
|
-
user approval. It must not infer repo sources or extraction scope from the
|
|
61
|
-
surrounding monorepo.
|
|
62
|
-
It uses lower-level CLI primitives only when the workspace state requires them:
|
|
63
|
-
|
|
64
|
-
- `context source ...`
|
|
65
|
-
- `context run ...`
|
|
66
|
-
- `context review ...`
|
|
67
|
-
- `context close`
|
|
68
|
-
- `context build`
|
|
69
|
-
- `context verify`
|
|
70
|
-
|
|
71
|
-
When the user explicitly requests fully managed operation in the current
|
|
72
|
-
conversation, continuation uses `context status --managed --format json` and
|
|
73
|
-
follows its managed commands. Eligible classification, extraction-scope,
|
|
74
|
-
structure-confirmation, Review, and package-output gates proceed automatically;
|
|
75
|
-
source boundaries, unread source permission, external operations, and
|
|
76
|
-
validation failures remain gated. No managed policy is written to the project,
|
|
77
|
-
and a new conversation returns to ordinary gates.
|
|
78
|
-
|
|
79
|
-
## SDK Manual For Agents
|
|
80
|
-
|
|
81
|
-
After `bun install`, the project has a local SDK manual under:
|
|
82
|
-
|
|
83
|
-
```text
|
|
84
|
-
node_modules/@c4a/context/docs/
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Recommended files:
|
|
88
|
-
|
|
89
|
-
- `node_modules/@c4a/context/docs/guides/agent-dialogue.md`
|
|
90
|
-
- `node_modules/@c4a/context/docs/guides/agent-guide.md`
|
|
91
|
-
- `node_modules/@c4a/context/docs/reference/project-api.md`
|
|
92
|
-
- `node_modules/@c4a/context/docs/reference/package-templates.md`
|
|
93
|
-
|
|
94
|
-
Template examples are installed at:
|
|
95
|
-
|
|
96
|
-
```text
|
|
97
|
-
node_modules/@c4a/context/templates/package-templates/
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Agents should read these files instead of probing `node_modules/@c4a/context/dist`
|
|
101
|
-
with ad-hoc scripts.
|
|
102
|
-
|
|
103
|
-
## Workspace Shape
|
|
104
|
-
|
|
105
|
-
Committed project state lives in:
|
|
106
|
-
|
|
107
|
-
- `src/` — project flow and custom code;
|
|
108
|
-
- `sources/repo/index.yaml`, `sources/file/index.yaml`, and
|
|
109
|
-
`sources/lark/index.yaml` — source registries;
|
|
110
|
-
- `unapproved/entities.jsonl` — draft/rejected/deprecated metadata;
|
|
111
|
-
- `unapproved/structure.yaml` — unconfirmed or confirmed prose structure draft;
|
|
112
|
-
- `knowledge/` — approved Markdown;
|
|
113
|
-
- `knowledge/structure.yaml` — closed structure/edge projection derived from
|
|
114
|
-
approved knowledge;
|
|
115
|
-
- `dist/` — built packages;
|
|
116
|
-
- `README.md`, `AGENTS.md`, `package.json`.
|
|
117
|
-
|
|
118
|
-
Runtime scratch lives in `.tmp/context-runtime/` and is ignored.
|
|
119
|
-
|
|
120
|
-
## Agent Entry Points
|
|
121
|
-
|
|
122
|
-
The global plugin exposes only the user-facing Context commands for the current workspace:
|
|
123
|
-
|
|
124
|
-
- `init`
|
|
125
|
-
- `continue`
|
|
126
|
-
|
|
127
|
-
The CLI still provides lower-level primitives, but they are not public slash
|
|
128
|
-
commands. The continuation entry chooses them based on CLI output and user intent.
|
|
129
|
-
|
|
130
|
-
Current source registration, document capture discipline, structure planning,
|
|
131
|
-
node classification, reading density, candidate resolution, edge gates,
|
|
132
|
-
source-bound section drafting, refresh/update judgment, semantic conflict
|
|
133
|
-
judgment, and close guidance live in internal procedures under
|
|
134
|
-
`skill-source-scope`, `skill-prose-align`, and `skill-prose-compile`.
|
|
135
|
-
|
|
136
|
-
Package-time querying is generated into each built package as the
|
|
137
|
-
`knowledge-query` skill. Package output decisions live in `skill-package-output`.
|
|
138
|
-
The current workflow does not expose source deletion, purge, or retraction
|
|
139
|
-
commands. If a user asks for that kind of lifecycle change, stop and explain
|
|
140
|
-
that the current plugin has no approved gate for it; do not recreate
|
|
141
|
-
file-mutating operations outside the current workflow.
|
|
142
|
-
|
|
143
|
-
Agents should follow the current status route and internal procedures. Do not
|
|
144
|
-
call or reconstruct command shapes or payload protocols that are absent from the
|
|
145
|
-
current CLI/schema views.
|
|
146
|
-
|
|
147
|
-
The CLI performs mechanical work only. It does not clone, checkout, reset, fetch, or call an LLM silently. When source repos are missing or at the wrong commit, it reports diagnostics and expects the agent to ask the user before running external repo operations.
|
|
148
|
-
|
|
149
|
-
## Current Workflow Surface
|
|
150
|
-
|
|
151
|
-
This plugin exposes the current workflow through `init` and `continue`.
|
|
152
|
-
`continue` starts from `context status`, follows the status route, and delegates
|
|
153
|
-
to current source/capture phases, prose align evidence views, source-bound prose
|
|
154
|
-
compile, review, close, verify/build/status guidance, OKF indexes, generated
|
|
155
|
-
knowledge-query skills, and declared project phase previews.
|
|
156
|
-
|
|
157
|
-
Agents must not simulate lifecycle or retraction work by deleting workspace
|
|
158
|
-
files. Source deletion, purge, and retraction are not current plugin operations.
|
package/plugin/README_CN.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Context Plugin
|
|
2
|
-
|
|
3
|
-
> [English version](./README.md)
|
|
4
|
-
|
|
5
|
-
<p align="center"><img src="./assets/logo.svg" alt="C4A Context" width="180"/></p>
|
|
6
|
-
|
|
7
|
-
Context 提供面向 Agent 的知识工作区命令。Plugin 安装到全局 Agent 环境;每个知识工作区只保存自己的源声明、待审状态、已批准知识和构建产物。公开入口刻意收口:初始化一次,之后通过 next-step guidance 推进。
|
|
8
|
-
|
|
9
|
-
Agent 与用户对话时应使用当前对话语言;CLI 命令、参数、id、状态枚举、JSONL key 和 `source_ref` 属于协议文本,保持英文或原样。
|
|
10
|
-
|
|
11
|
-
## 安装
|
|
12
|
-
|
|
13
|
-
先安装 CLI:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm i -g @c4a/context-cli
|
|
17
|
-
# 或
|
|
18
|
-
bun add -g @c4a/context-cli
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
再把随 CLI 包发布的 plugin marketplace 安装到全局:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
context plugin install
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
安装器会从当前 CLI 包动态解析 marketplace 目录。发布包使用 `dist/plugins`;源码 checkout 在执行 `bun run --filter @c4a/context-cli build` 后也使用同样的生成目录。对 Codex,安装器会把随包生成的插件复制到 `~/.codex/plugins/cache/c4a/context/local/`,符合 Codex 本地插件的 cache 约定。
|
|
28
|
-
|
|
29
|
-
只查看将执行的操作:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
context plugin install --dry-run
|
|
33
|
-
context plugin path
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 工作流
|
|
37
|
-
|
|
38
|
-
在 context 项目根目录执行命令。
|
|
39
|
-
|
|
40
|
-
1. 初始化工作区:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
context init context
|
|
44
|
-
cd context
|
|
45
|
-
bun install
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
2. 通过已安装的 Agent 入口继续推进:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
<当前宿主暴露的 Context continuation command 或 skill>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Continuation 入口会先运行 `context status`,然后跟随 CLI 诊断。安全的机械 `next:` 步骤会直接执行,不会只把命令复述给用户;遇到 `Human gate:`、带占位符的 next、source 注册、source 范围选择、审阅、package 输出选择或需要用户授权的 source repo 操作才会停下来确认。它不能根据周边 monorepo 自行推断 repo source 或提取范围,只在工作区状态需要时调用底层 CLI 能力:
|
|
55
|
-
|
|
56
|
-
- `context source ...`
|
|
57
|
-
- `context run ...`
|
|
58
|
-
- `context review ...`
|
|
59
|
-
- `context close`
|
|
60
|
-
- `context build`
|
|
61
|
-
- `context verify`
|
|
62
|
-
|
|
63
|
-
如果用户在当前对话明确要求“全托管”,Continuation 会改用 `context status
|
|
64
|
-
--managed --format json` 并持续跟随其命令。分类、提取范围、结构确认、审阅和
|
|
65
|
-
package 输出门禁可自动完成;来源边界、尚未授权的文档读取、外部仓库/系统操作和
|
|
66
|
-
校验失败仍会停下。该授权不会写入 `defineProject` 或工作区,新对话默认恢复普通
|
|
67
|
-
人工门禁。
|
|
68
|
-
|
|
69
|
-
## Agent 可读的 SDK 手册
|
|
70
|
-
|
|
71
|
-
执行 `bun install` 后,项目内会有 SDK 手册:
|
|
72
|
-
|
|
73
|
-
```text
|
|
74
|
-
node_modules/@c4a/context/docs/
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
推荐先读:
|
|
78
|
-
|
|
79
|
-
- `node_modules/@c4a/context/docs/guides/agent-dialogue.md`
|
|
80
|
-
- `node_modules/@c4a/context/docs/guides/agent-guide.md`
|
|
81
|
-
- `node_modules/@c4a/context/docs/reference/project-api.md`
|
|
82
|
-
- `node_modules/@c4a/context/docs/reference/package-templates.md`
|
|
83
|
-
|
|
84
|
-
模板示例在:
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
node_modules/@c4a/context/templates/package-templates/
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Agent 应读取这些文件,不要通过临时脚本反查 `node_modules/@c4a/context/dist`
|
|
91
|
-
来猜 SDK API。
|
|
92
|
-
|
|
93
|
-
## 工作区形态
|
|
94
|
-
|
|
95
|
-
需要提交的项目状态在:
|
|
96
|
-
|
|
97
|
-
- `src/`:项目流程和定制代码;
|
|
98
|
-
- `sources/repo/index.yaml`、`sources/file/index.yaml`、`sources/lark/index.yaml`:源 registry;
|
|
99
|
-
- `unapproved/entities.jsonl`:draft/rejected/deprecated 元信息;
|
|
100
|
-
- `unapproved/structure.yaml`:未确认或已确认的文档结构草稿;
|
|
101
|
-
- `knowledge/`:approved Markdown;
|
|
102
|
-
- `knowledge/structure.yaml`:由 approved knowledge 派生的结构与关系投影;
|
|
103
|
-
- `dist/`:构建产物;
|
|
104
|
-
- `README.md`、`AGENTS.md`、`package.json`。
|
|
105
|
-
|
|
106
|
-
运行缓存放在 `.tmp/context-runtime/`,并被忽略。
|
|
107
|
-
|
|
108
|
-
## Agent 入口
|
|
109
|
-
|
|
110
|
-
全局 plugin 只暴露面向用户的 Context 命令:
|
|
111
|
-
|
|
112
|
-
- `init`
|
|
113
|
-
- `continue`
|
|
114
|
-
|
|
115
|
-
CLI 仍保留底层能力,但它们不是公开 slash command。Continuation 入口根据 CLI 输出和用户意图选择要调用的底层命令。
|
|
116
|
-
|
|
117
|
-
当前 source 注册、文档 capture 纪律、structure planning、Node 分类、阅读密度、
|
|
118
|
-
候选处理、edge gates、source-bound section drafting、refresh/update 判断、
|
|
119
|
-
语义冲突判断和 close 指引都在 `skill-source-scope`、`skill-prose-align`、
|
|
120
|
-
`skill-prose-compile` 下面的内部 procedure。
|
|
121
|
-
|
|
122
|
-
包内查询能力在构建包时生成到 `knowledge-query` skill。package 输出决策在
|
|
123
|
-
`skill-package-output`。当前工作流不暴露 source 删除、purge 或撤回命令。
|
|
124
|
-
如果用户要求这类生命周期变更,先停下来说明当前 plugin 没有已批准门禁;
|
|
125
|
-
Agent 不得在当前工作流之外重建文件变更类操作。
|
|
126
|
-
|
|
127
|
-
Agent 应按当前 status route 和内部 procedure 推进。不要调用或重建当前
|
|
128
|
-
CLI/schema views 没有暴露的命令形态或 payload 协议。
|
|
129
|
-
|
|
130
|
-
CLI 只做机械操作。它不会静默 clone、checkout、reset、fetch,也不会调用 LLM。源仓库缺失或 commit 不匹配时,CLI 只返回诊断;Agent 需要先征询用户,再决定是否执行外部 repo 操作。
|
|
131
|
-
|
|
132
|
-
## 当前工作流入口
|
|
133
|
-
|
|
134
|
-
本 plugin 只暴露当前工作流入口: `init` 和 `continue`。`continue` 从
|
|
135
|
-
`context status` 开始,按 status route 分发到 source/capture phase、prose
|
|
136
|
-
align evidence views、source-bound prose compile、review、close、
|
|
137
|
-
verify/build/status guidance、OKF indexes、生成包里的 knowledge-query skill,
|
|
138
|
-
以及已声明 project phase 的只读预览。
|
|
139
|
-
|
|
140
|
-
Agent 不得通过直接删除 `sources/`、`knowledge/`、`unapproved/`、`dist/`
|
|
141
|
-
或 `.tmp` 来模拟生命周期或撤回操作。source 删除、purge 和撤回不是当前
|
|
142
|
-
plugin 操作。
|
package/plugin/assets/icon.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 758 296" fill="none">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M647.569 0.78043C613.4 3.48518 581.318 15.3269 533.021 43.0605C527.45 46.2597 498.781 61.8832 490.42 67.9156C464.4 83.1281 440.36 99.9754 407.462 125.999C399.965 131.93 392.626 137.658 391.153 138.729C389.68 139.8 382.798 145.128 375.858 150.569C368.919 156.01 358.504 163.98 352.714 168.281L343.516 175.006L348.516 179.006C351.553 181.229 358.164 187.09 362.516 190.006L370.516 196.006L379.016 190.006C384.498 185.597 392.279 178.726 395.782 175.811C399.285 172.896 411.776 162.857 414.201 160.847C416.626 158.838 420.318 155.949 427.144 150.29C445.631 134.963 481.502 112.007 494.26 102.533C581.313 47.1925 633.705 27.2029 682.312 46.6436C688.772 50.1275 692.158 52.8781 699.014 60.2106C706.594 68.3166 708.17 70.6632 712.305 79.9992C717.792 92.3865 720.263 102.609 721.288 117.182C723.104 142.96 716.794 171.243 703.236 198.108C693.06 218.269 684.3 229.708 671.088 242.211C628.153 272.315 597.665 274.481 543.801 261.017C510.873 246.43 487.481 230.006 448.016 193.506C444.204 190.241 440.144 186.014 439.516 186.006C438.281 185.991 399.991 214.634 399.516 216.006C399.235 216.815 404.057 219.412 409.016 222.506C410.702 223.559 412.975 225.335 416.516 227.006C433.391 238.059 468.991 255.632 482.516 262.006C485.929 263.614 490.402 264.707 492.545 265.749C509.884 274.195 533.276 282.099 555.644 287.07C564.55 289.049 601.674 289.814 609.103 288.171C612.031 287.523 616.387 286.554 618.782 286.017C633.747 282.66 656.745 272.897 670.289 264.153C708.746 239.325 740.493 194.104 753.016 146.317C764.533 102.359 755.681 60.2459 728.902 31.5909C712.119 13.6333 693.371 4.36271 667.389 1.17066C661.613 0.461953 656.637 -0.0628543 656.33 0.00607299C656.023 0.0750003 652.081 0.42386 647.569 0.78043ZM122.268 6.91848C100.692 8.62683 75.6783 17.7423 58.0176 30.3336C30.2119 50.158 12.2534 76.5887 3.92103 109.95C0.744084 122.668 -0.943192 149.281 0.550004 163.097C6.34545 216.709 38.9366 261.239 87.8925 282.436C108.528 291.37 128.098 295.45 152.658 295.937C173.489 296.35 191.779 294.037 213.531 288.238C254.082 277.427 282.658 266.098 328.68 231.976C341.818 222.235 344.259 221.314 342.05 219.506C337.696 215.941 316.951 199.525 316.016 199.506C315.451 199.495 312.641 202.192 307.128 205.872C245.084 247.275 198.239 258.453 151.476 252.979C138.261 251.432 123.184 247.836 114.645 244.194C82.5503 230.506 61.7452 207.016 52.8018 174.371C50.4952 165.952 50.3622 164.208 50.7059 146.886C51.0496 129.561 51.2517 127.827 53.8915 119.499C58.217 105.86 62.5516 96.3835 68.4271 87.7254C96.678 46.0924 144.857 34.898 199.322 57.3119C205.245 59.7489 221.144 67.3217 224.619 69.361C245.505 81.6138 248.559 83.5927 268.609 97.8683C286.178 110.375 299.632 125.4 316.016 139.031C330.379 150.982 332.229 144.373 335.6 144.44C337.306 142.561 337.353 141.225 335.571 139.031C334.554 137.779 334.892 138.21 331.041 133.458C307.893 104.899 285.92 82.0366 264.533 63.4627C232.185 35.3673 200.085 17.5822 168.343 10.1701C158.514 7.87465 132.964 6.07147 122.268 6.91848Z" fill="#ef6f2e"/>
|
|
3
|
-
</svg>
|
package/plugin/assets/logo.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 758 296" fill="none">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M647.569 0.78043C613.4 3.48518 581.318 15.3269 533.021 43.0605C527.45 46.2597 498.781 61.8832 490.42 67.9156C464.4 83.1281 440.36 99.9754 407.462 125.999C399.965 131.93 392.626 137.658 391.153 138.729C389.68 139.8 382.798 145.128 375.858 150.569C368.919 156.01 358.504 163.98 352.714 168.281L343.516 175.006L348.516 179.006C351.553 181.229 358.164 187.09 362.516 190.006L370.516 196.006L379.016 190.006C384.498 185.597 392.279 178.726 395.782 175.811C399.285 172.896 411.776 162.857 414.201 160.847C416.626 158.838 420.318 155.949 427.144 150.29C445.631 134.963 481.502 112.007 494.26 102.533C581.313 47.1925 633.705 27.2029 682.312 46.6436C688.772 50.1275 692.158 52.8781 699.014 60.2106C706.594 68.3166 708.17 70.6632 712.305 79.9992C717.792 92.3865 720.263 102.609 721.288 117.182C723.104 142.96 716.794 171.243 703.236 198.108C693.06 218.269 684.3 229.708 671.088 242.211C628.153 272.315 597.665 274.481 543.801 261.017C510.873 246.43 487.481 230.006 448.016 193.506C444.204 190.241 440.144 186.014 439.516 186.006C438.281 185.991 399.991 214.634 399.516 216.006C399.235 216.815 404.057 219.412 409.016 222.506C410.702 223.559 412.975 225.335 416.516 227.006C433.391 238.059 468.991 255.632 482.516 262.006C485.929 263.614 490.402 264.707 492.545 265.749C509.884 274.195 533.276 282.099 555.644 287.07C564.55 289.049 601.674 289.814 609.103 288.171C612.031 287.523 616.387 286.554 618.782 286.017C633.747 282.66 656.745 272.897 670.289 264.153C708.746 239.325 740.493 194.104 753.016 146.317C764.533 102.359 755.681 60.2459 728.902 31.5909C712.119 13.6333 693.371 4.36271 667.389 1.17066C661.613 0.461953 656.637 -0.0628543 656.33 0.00607299C656.023 0.0750003 652.081 0.42386 647.569 0.78043ZM122.268 6.91848C100.692 8.62683 75.6783 17.7423 58.0176 30.3336C30.2119 50.158 12.2534 76.5887 3.92103 109.95C0.744084 122.668 -0.943192 149.281 0.550004 163.097C6.34545 216.709 38.9366 261.239 87.8925 282.436C108.528 291.37 128.098 295.45 152.658 295.937C173.489 296.35 191.779 294.037 213.531 288.238C254.082 277.427 282.658 266.098 328.68 231.976C341.818 222.235 344.259 221.314 342.05 219.506C337.696 215.941 316.951 199.525 316.016 199.506C315.451 199.495 312.641 202.192 307.128 205.872C245.084 247.275 198.239 258.453 151.476 252.979C138.261 251.432 123.184 247.836 114.645 244.194C82.5503 230.506 61.7452 207.016 52.8018 174.371C50.4952 165.952 50.3622 164.208 50.7059 146.886C51.0496 129.561 51.2517 127.827 53.8915 119.499C58.217 105.86 62.5516 96.3835 68.4271 87.7254C96.678 46.0924 144.857 34.898 199.322 57.3119C205.245 59.7489 221.144 67.3217 224.619 69.361C245.505 81.6138 248.559 83.5927 268.609 97.8683C286.178 110.375 299.632 125.4 316.016 139.031C330.379 150.982 332.229 144.373 335.6 144.44C337.306 142.561 337.353 141.225 335.571 139.031C334.554 137.779 334.892 138.21 331.041 133.458C307.893 104.899 285.92 82.0366 264.533 63.4627C232.185 35.3673 200.085 17.5822 168.343 10.1701C158.514 7.87465 132.964 6.07147 122.268 6.91848Z" fill="#ef6f2e"/>
|
|
3
|
-
</svg>
|
|
Binary file
|
|
Binary file
|