@c4a/context-cli 0.6.0-beta.5 → 0.6.0-beta.6
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 +12 -2
- package/cli.js +3498 -2057
- package/package.json +2 -2
- package/plugin/skills/skill-continue-workflow/SKILL.md +22 -2
- package/plugin/skills/skill-prose-align/SKILL.md +25 -9
- package/plugin/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugin/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugin/skills/skill-review-gate/SKILL.md +33 -10
- package/plugin/skills/skill-source-scope/SKILL.md +165 -105
- package/plugin/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/skill-continue-workflow/SKILL.md +22 -2
- package/plugins/claude/skills/skill-prose-align/SKILL.md +25 -9
- package/plugins/claude/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/claude/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugins/claude/skills/skill-review-gate/SKILL.md +33 -10
- package/plugins/claude/skills/skill-source-scope/SKILL.md +165 -105
- package/plugins/claude/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-continue-workflow.md +22 -2
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/codex/skills/continue/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/codex/skills/continue/references/internal-procedures/skill-review-gate.md +33 -10
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/skills/continue/references/internal-procedures/skill-source-scope.md +165 -105
- package/plugins/codex/skills/init/references/internal-procedures/skill-continue-workflow.md +22 -2
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/codex/skills/init/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/codex/skills/init/references/internal-procedures/skill-review-gate.md +33 -10
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/codex/skills/init/references/internal-procedures/skill-source-scope.md +165 -105
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/skill-continue-workflow/SKILL.md +22 -2
- package/plugins/cursor/skills/skill-prose-align/SKILL.md +25 -9
- package/plugins/cursor/skills/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/cursor/skills/skill-prose-compile/SKILL.md +17 -5
- package/plugins/cursor/skills/skill-review-gate/SKILL.md +33 -10
- package/plugins/cursor/skills/skill-source-scope/SKILL.md +165 -105
- package/plugins/cursor/skills/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-continue/references/internal-procedures/skill-continue-workflow.md +22 -2
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/skills/context-continue/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/skills/context-continue/references/internal-procedures/skill-review-gate.md +33 -10
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-continue/references/internal-procedures/skill-source-scope.md +165 -105
- package/plugins/skills/context-init/references/internal-procedures/skill-continue-workflow.md +22 -2
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align/references/internal-procedures/structure-planning.md +5 -3
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-align.md +25 -9
- package/plugins/skills/context-init/references/internal-procedures/skill-prose-compile.md +17 -5
- package/plugins/skills/context-init/references/internal-procedures/skill-review-gate.md +33 -10
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope/references/capture-source.md +32 -12
- package/plugins/skills/context-init/references/internal-procedures/skill-source-scope.md +165 -105
package/README.md
CHANGED
|
@@ -55,7 +55,9 @@ node_modules/@c4a/context/templates/package-templates/
|
|
|
55
55
|
Agents should read these files instead of probing `node_modules/@c4a/context/dist`
|
|
56
56
|
with temporary scripts.
|
|
57
57
|
|
|
58
|
-
For
|
|
58
|
+
For the complete source, link, plugin, and npm-mode development workflow, see
|
|
59
|
+
the workspace [DEVELOPMENT.md](../../DEVELOPMENT.md). CLI plugin-specific notes
|
|
60
|
+
remain in this package's [DEVELOPMENT.md](./DEVELOPMENT.md).
|
|
59
61
|
|
|
60
62
|
## Project-local quick tour
|
|
61
63
|
|
|
@@ -137,20 +139,28 @@ For project workflows, `context` is a semantic service. Agents should call the C
|
|
|
137
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. |
|
|
138
140
|
| `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. |
|
|
139
141
|
| `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
|
+
| `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. |
|
|
140
143
|
| `context source list|get <name>` | CLI | Inspect the repo source registry and readiness metadata. |
|
|
141
144
|
| `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. |
|
|
142
145
|
| `context run --list` | CLI | List phases declared by `src/index.ts`. |
|
|
143
|
-
| `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`
|
|
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. |
|
|
144
147
|
| `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. |
|
|
145
148
|
| `context review list [collection]` | CLI | List draft candidates for CLI-oriented review. |
|
|
146
149
|
| `context review apply <payload-file>` | CLI | Apply copied review decisions; approved entities materialize to `knowledge/`, rejected entities remain in `unapproved/entities.jsonl`. |
|
|
147
150
|
| `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. |
|
|
151
|
+
| `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. |
|
|
148
152
|
| `context build` | CLI | Build declared project packages from approved knowledge into `dist/<package-name>/`. |
|
|
149
153
|
| `context verify [--format table\|json]` | CLI | Validate the project skeleton, registry, unapproved ledger, approved Markdown, source refs, and package outputs. |
|
|
150
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`. |
|
|
151
155
|
|
|
152
156
|
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.
|
|
153
157
|
|
|
158
|
+
For a beta.5 project that reports `approved-source-ref-ambiguous`, upgrade in
|
|
159
|
+
this order: rerun each declared codegraph extraction phase to create the current
|
|
160
|
+
file-aware symbol index, run `context review migrate-codegraph-refs`, then run
|
|
161
|
+
`context verify`. The migration preserves approved content and review decisions;
|
|
162
|
+
it changes only code evidence identity and removes the old `code_origin` copy.
|
|
163
|
+
|
|
154
164
|
## Development
|
|
155
165
|
|
|
156
166
|
Source lives at [`packages/context-cli/`](./src) in this workspace.
|