@c4a/context-cli 0.6.0-beta.6 → 0.6.0-beta.8
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 -5
- package/cli.js +15062 -13079
- package/package.json +2 -2
- package/plugin/README.md +8 -0
- package/plugin/README_CN.md +6 -0
- package/plugin/skills/skill-continue-workflow/SKILL.md +43 -3
- package/plugin/skills/skill-package-output/SKILL.md +16 -3
- package/plugin/skills/skill-prose-align/SKILL.md +29 -33
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugin/skills/skill-prose-compile/SKILL.md +29 -28
- package/plugin/skills/skill-review-gate/SKILL.md +17 -3
- package/plugin/skills/skill-source-scope/SKILL.md +10 -3
- package/plugins/README.md +8 -0
- package/plugins/README_CN.md +6 -0
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +43 -3
- package/plugins/claude/skills/skill-package-output/SKILL.md +16 -3
- package/plugins/claude/skills/skill-prose-align/SKILL.md +29 -33
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +29 -28
- package/plugins/claude/skills/skill-review-gate/SKILL.md +17 -3
- package/plugins/claude/skills/skill-source-scope/SKILL.md +10 -3
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +43 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-package-output.md +16 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +29 -33
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +29 -28
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +17 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +10 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +43 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-package-output.md +16 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +29 -33
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +29 -28
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +17 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +10 -3
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +43 -3
- package/plugins/cursor/skills/skill-package-output/SKILL.md +16 -3
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +29 -33
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +29 -28
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +17 -3
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +10 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +43 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-package-output.md +16 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +29 -33
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +29 -28
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +17 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +10 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +43 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-package-output.md +16 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning/references/gates.md +6 -12
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +16 -10
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +29 -33
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +29 -28
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +17 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +10 -3
- package/scripts/postinstall.mjs +68 -129
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ stable protocol text and are not translated.
|
|
|
19
19
|
## Global Plugin + Project Workspace
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
# Install
|
|
23
|
-
|
|
22
|
+
# Install the CLI and refresh available global agent commands/skills.
|
|
23
|
+
npm install -g @c4a/context-cli
|
|
24
24
|
|
|
25
25
|
# Create a standalone context project.
|
|
26
26
|
context init context
|
|
@@ -30,6 +30,11 @@ bun install
|
|
|
30
30
|
/context:continue
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
Global installation runs `context plugin install` automatically for the
|
|
34
|
+
available Claude and Codex CLIs. Plugin refresh is best-effort and does not
|
|
35
|
+
make the CLI installation fail; rerun `context plugin install` manually after
|
|
36
|
+
installing an agent CLI. Set `CONTEXT_CLI_SKIP_PLUGIN_INSTALL=1` to opt out.
|
|
37
|
+
|
|
33
38
|
The global plugin calls `context ...` from the current project root.
|
|
34
39
|
Agent commands follow CLI `next:` hints: they execute safe mechanical steps and
|
|
35
40
|
stop at `Human gate:` / placeholder next steps, source registration, source scope
|
|
@@ -110,6 +115,11 @@ Runtime scratch lives under `.tmp/context-runtime/` and is ignored. It may conta
|
|
|
110
115
|
The project-local workflow is status-driven. Register sources, declare phases in
|
|
111
116
|
`src/index.ts`, then let `context status` and phase views route each gate:
|
|
112
117
|
|
|
118
|
+
Building a package completes the currently active structure snapshots, not the
|
|
119
|
+
workspace forever. Additional captured documents remain in
|
|
120
|
+
`pendingStructureTargets` until their own declared align/compile/review route is
|
|
121
|
+
completed; they can be added without creating a new workspace.
|
|
122
|
+
|
|
113
123
|
| Gate | Current surface |
|
|
114
124
|
|---|---|
|
|
115
125
|
| Source setup | `context source add repo/file/lark`, `context source ensure`, and project source declarations. |
|
|
@@ -136,22 +146,23 @@ For project workflows, `context` is a semantic service. Agents should call the C
|
|
|
136
146
|
| `context plugin path` | CLI | Print the bundled plugin marketplace root. Installed packages normally use `dist/plugins`; source checkouts use the same path after build. |
|
|
137
147
|
| `context plugin install [--agent claude\|codex\|all] [--dry-run]` | CLI | Install or refresh the bundled plugin marketplace globally for Claude and/or Codex. It replaces existing `context` marketplace entries and Codex cache owned by this package before reinstalling. |
|
|
138
148
|
| `context plugin status [--agent claude\|codex\|all]` | CLI | Inspect bundled plugin path and agent CLI availability. |
|
|
139
|
-
| `context init [project-dir] [--name <name>] [--dev]` | CLI | Create a project-local context workspace. Defaults to `context/`; use `.` to initialize the current directory. Use `--dev` for local checkout testing before `@c4a/context` is published. |
|
|
149
|
+
| `context init [project-dir] [--name <name>] [--dev]` | CLI | Create a project-local context workspace. Defaults to `context/`; use `.` to initialize the current directory. Use `--dev` for local checkout or prepared-pack testing before the matching `@c4a/context` version is published. |
|
|
140
150
|
| `context source add repo <name> --local <repo-or-subdir> [--remote <url>] [--ref <sha>]` | CLI | Register a repo source and pin it to a commit. Local paths may point at a monorepo subdirectory; the CLI stores the git root plus subpath, and materializes the source view to the subdirectory. Remote and ref are inferred from local origin / HEAD when omitted. Short SHAs are resolved to full commits when the local repo is available. |
|
|
141
151
|
| `context source ensure [name]` | CLI | Validate and materialize local source symlinks. Missing remotes only produce hints; the CLI does not clone or checkout automatically. |
|
|
142
152
|
| `context source add batch [date] --input <file|->` | CLI | Register multiple repo, file, or Lark modules under one project write lock from YAML/JSON input. Repo modules are explicit; file/Lark modules may be derived when omitted. |
|
|
143
153
|
| `context source list|get <name>` | CLI | Inspect the repo source registry and readiness metadata. |
|
|
144
154
|
| `context source inspect [name]` | CLI | Detect module/package boundaries in registered repo sources without extraction. Use this before extracting monorepo roots; it prints package names, paths, versions when available, and suggested source registration commands. |
|
|
145
155
|
| `context run --list` | CLI | List phases declared by `src/index.ts`. |
|
|
146
|
-
| `context run <phase-id> [--dry-run] [--auto-promote]` | CLI | Inspect or run one declared phase. Extract dry-run separates discovered, AST-analyzed, skipped, symbol, and relation counts. Missing/empty entries fail with `NO_ENTRY_DETECTED`; TypeScript aliases come from tsconfig/jsconfig `baseUrl` and `paths`. Codegraph defaults to first-run full Review and later delta-only Review; `--auto-promote` applies deterministic codegraph deltas, refreshes deterministic close when needed, then verifies. Existing package outputs become stale and remain an explicit downstream build step. |
|
|
156
|
+
| `context run <phase-id> [--dry-run] [--auto-promote] [--managed]` | CLI | Inspect or run one declared phase. Extract dry-run separates discovered, AST-analyzed, skipped, symbol, and relation counts. Missing/empty entries fail with `NO_ENTRY_DETECTED`; TypeScript aliases come from tsconfig/jsconfig `baseUrl` and `paths`. Codegraph defaults to first-run full Review and later delta-only Review; `--auto-promote` applies deterministic codegraph deltas, refreshes deterministic close when needed, then verifies. `--managed` is current-conversation authority propagated by an Agent, never project policy. Existing package outputs become stale and remain an explicit downstream build step. |
|
|
147
157
|
| `context review html [collection] [--open]` | CLI | Render the local self-contained HTML review surface under `.tmp/context-runtime/review/`, emit a clickable `file://` URL, and optionally open it with the system browser. |
|
|
148
158
|
| `context review list [collection]` | CLI | List draft candidates for CLI-oriented review. |
|
|
149
159
|
| `context review apply <payload-file>` | CLI | Apply copied review decisions; approved entities materialize to `knowledge/`, rejected entities remain in `unapproved/entities.jsonl`. |
|
|
150
160
|
| `context review approve|reject <candidate-id> --collection <collection>` / `--all` | CLI | Scoped quick marking for a single draft candidate when the user explicitly authorizes an automated or quick path. |
|
|
161
|
+
| `context review approve-all [collection] --managed` / `--all --managed` | CLI | Atomically approve the current validated Review scope under explicit current-conversation fully managed authority. The flag is required and no policy is persisted. |
|
|
151
162
|
| `context review migrate-codegraph-refs` | CLI | Upgrade legacy approved codegraph refs to `src-N#symbol:<file>:<symbol>:<kind>@<digest>`, remove redundant `code_origin`, and verify. Rerun declared codegraph extraction first; this metadata migration does not repeat Review. |
|
|
152
163
|
| `context build` | CLI | Build declared project packages from approved knowledge into `dist/<package-name>/`. |
|
|
153
164
|
| `context verify [--format table\|json]` | CLI | Validate the project skeleton, registry, unapproved ledger, approved Markdown, source refs, and package outputs. |
|
|
154
|
-
| `context status [--format json\|table]` | CLI | Workspace overview + a canonical `next:` hint. Agent plugins expose this workflow as `/context:continue`; do not add or call `context continue`. |
|
|
165
|
+
| `context status [--managed] [--format json\|table]` | CLI | Workspace overview + a canonical `next:` hint. `--managed` resolves eligible human gates only for the explicitly authorized current conversation; source permission, external operations, validation, and verification remain enforced. Agent plugins expose this workflow as `/context:continue`; do not add or call `context continue`. |
|
|
155
166
|
|
|
156
167
|
Commands that require a project exit with a workspace-not-found error if run outside a directory tree containing a `package.json` `context.project=true` / `context.entry` marker. `context init` is the command that creates one.
|
|
157
168
|
|