@c4a/context-cli 0.5.29-beta.20 → 0.5.29-beta.22
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 +5 -3
- package/cli.js +2202 -1139
- package/package.json +1 -1
- package/plugin/commands/align.md +7 -4
- package/plugin/commands/capture.md +2 -2
- package/plugin/commands/compile.md +20 -12
- package/plugin/commands/query.md +1 -1
- package/plugin/skills/skill-align-workflow/SKILL.md +9 -6
- package/plugin/skills/skill-align-workflow/references/gates.md +17 -0
- package/plugin/skills/skill-compile-close/SKILL.md +3 -0
- package/plugin/skills/skill-compile-draft/SKILL.md +20 -18
- package/plugin/skills/skill-compile-draft/references/refresh-and-update.md +14 -14
- package/plugin/skills/skill-context-query/SKILL.md +27 -25
- package/plugin/skills/skill-semantic-reconcile/SKILL.md +5 -4
- package/plugin/skills/skill-semantic-reconcile/references/mode-semantics.md +1 -1
- package/plugin/skills/skill-semantic-reconcile/references/temporal-and-evidence.md +13 -13
- package/plugin/skills/skill-semantic-reconcile/references/user-confirmation.md +2 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ codex marketplace add context4ai/context
|
|
|
30
30
|
# Dashboard → Settings → Plugins → Import → https://github.com/context4ai/context
|
|
31
31
|
|
|
32
32
|
# Vercel-style skills (Windsurf / OpenCode / Cline / Copilot etc.):
|
|
33
|
-
npx skills add github:context4ai/context
|
|
33
|
+
npx skills add github:context4ai/context context-align
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
All four plugin paths point at the [context4ai/context](https://github.com/context4ai/context) repo (generated from this package's `plugin/` source). They are independent of the npm CLI — the CLI is a hard prerequisite the plugin commands call out to via `$PATH`.
|
|
@@ -63,6 +63,7 @@ context capture --code # refresh existing code capture config
|
|
|
63
63
|
# In Claude Code, align → compile → drop are agent-driven
|
|
64
64
|
/context:align # agent classifies raw into a Node tree; user confirms
|
|
65
65
|
/context:compile # agent writes Section-level actions for each Node; CLI renders
|
|
66
|
+
/context:query "page perf 工具有哪些?" # answer with cited Node/Section evidence (BM25 + structure, no RAG)
|
|
66
67
|
/context:drop feishu:doc:xxx --reason "obsolete"
|
|
67
68
|
/context:status
|
|
68
69
|
```
|
|
@@ -122,14 +123,15 @@ Data model: Node (`domain` / `entity` / `action`) + Section (ten kinds, mounted
|
|
|
122
123
|
| `context extract <path>` | CLI | Read-only developer/debug print of an extraction; never writes workspace files and is not part of the production Agent workflow. |
|
|
123
124
|
| `context debug <workflow\|source\|workspace\|storage\|command\|snapshot> ...` | CLI | Developer/debug-only path diagnostics. Output is storage-coupled and not a production Agent workflow input. |
|
|
124
125
|
| `context align --scan \| --finalize -` | CLI | Workflow helpers driven by the `/context:align` skill pipeline. `--scan` returns workflow payload names, scopes, digests, and `generation_policy` when workspace language is configured; agents inspect compact payload views with `context workflow show --view ... --unwrap` and semantic filters. `--unwrap` only removes the workflow metadata envelope; it does not change summary/detail behavior. Finalize by submitting an `align-structure-decision` document through stdin; the CLI resolves the current align-segments payload automatically. `--schema <name>` prints the exact align workflow input schemas. |
|
|
125
|
-
| `context compile --context <slug> --
|
|
126
|
+
| `context compile --scan-changes [--delegated] \| --context <slug> \| --source-refs <slug> \| --node-cycle <slug> --input - --accept-safe-defaults \| --draft <slug> --input - --plan --prepare \| --close` | CLI | Workflow helpers driven by the `/context:compile` skill pipeline. `--scan-changes` returns the incremental compile workset; the context entrypoint prepares durable NodeContext, generation policy, and coverage workflow payloads, then prints semantic payload handles. `--source-refs <slug>` exposes the compact citation handle list for one Node without reading the full NodeContext. `--node-cycle` is the low-friction per-node path: it validates the submitted draft, prepares reconcile, accepts mechanically safe defaults, and applies only when no semantic judgment remains (`status: applied` / `partial-applied` / `review-required`). Manual `--draft --prepare → reconcile review/apply` remains the fallback for questions and unsupported evidence. `--delegated` is a one-time, workflow-level authorization recorded on the initial scan/context/draft/node-cycle command; it lets the CLI auto-accept low-risk weak source support but never bypasses unsupported evidence, type drift, schema errors, or destructive gates. Normal handoff uses stdin and current workflow payloads; digest flags are optional stale guards, not values agents need to extract. `--save-input` is only an explicit debug scratch copy, not workspace truth. |
|
|
126
127
|
| `context mdrive <group> <verb>` | CLI | Knowledge primitive shell: node / section / edge / query / verify / glossary / workspace. Node/query results include `node_class` to distinguish concrete entities from term definitions. `context mdrive verify workspace --experimental` adds heuristic quality warnings for very thin concrete entities and terms that have grown beyond definition shape; these are warnings, not entity-count limits. `context mdrive query --stats-only` prints only workspace counts; run `context mdrive --help` for subcommands. |
|
|
127
128
|
| `context drop <source-id\|url> --plan [--save-output [file]]` / `context drop --apply-plan --reason <text> --yes` | CLI | Plans and applies source retraction through the current drop workflow. `drop --plan` stores the canonical `drop-plan` workflow payload; `--save-output` is only an optional human-readable scratch copy, not a later input. `reconcile prepare --mode drop` reads the current workflow plan, `reconcile review --decisions -` stores the ready review when semantic decisions are needed, and `drop --apply-plan` consumes the current workflow plan/review without plan or decisions files. |
|
|
128
129
|
| `context purge [--yes]` | CLI | Permanently deletes every archive under `archive/` after a summary + confirmation; active `raw/` and `knowledge/` are not modified. |
|
|
129
130
|
| `context verify` | CLI | Whole-workspace verify (schema, Section mount matrix, contains acyclicity, dropped-source references, dangling `src-N`, body ad-hoc headings, domain-inline-child, duplicate slug). |
|
|
130
131
|
| `context doctor` | CLI | Workspace diagnostics for current workflow, align output, knowledge, caches, evidence, coverage, semantic ledger, and archive state. |
|
|
131
132
|
| `context status [--format json\|table]` | CLI | Workspace overview + next-action suggestions. |
|
|
132
|
-
|
|
|
133
|
+
| `context query "<question>" [--intent <intent>] [--scope <slug>] [--tag <tag>] [--domain <slug>]` | CLI | Local knowledge query with hit/miss/select protocol. Intents: `orientation` (workspace map, supports `--tag` / `--domain` filters and a token-budgeted Slug Map + Summary), `node_lookup` (BM25 candidate Nodes from query text), `node_view` (open a known Node by slug), `section_search` (BM25 inside a chosen Node), `impact_analysis` (structural relations), `recall` (archive / reconciliation audit). Without `--intent`, the CLI infers from the flags supplied. BM25 only — no vector embeddings. |
|
|
134
|
+
| `/context:query <question>`, `/context:align`, `/context:compile`, `/context:capture`, `/context:drop`, `/context:status`, `/context:purge` | Agent | Skill-driven wrappers around the CLI. Read flows (`query`, `status`) answer directly with cited evidence; write flows (`align`, `compile`, `capture`, `drop`, `purge`) produce structured JSON/YAML per skill contract and confirm destructive steps with the user. |
|
|
133
135
|
| `/context:context <free text>` | Agent | Fuzzy router over the above. |
|
|
134
136
|
|
|
135
137
|
CLI commands that require a workspace exit with a workspace-not-found error if run outside a directory tree containing either embedded `.context/` layout or root layout; `context init` is the only command that creates one.
|