@c4a/context-cli 0.5.29-beta.17 → 0.5.29-beta.20

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.
Files changed (26) hide show
  1. package/README.md +3 -3
  2. package/cli.js +5039 -2615
  3. package/package.json +1 -1
  4. package/plugin/README.md +4 -3
  5. package/plugin/README_CN.md +4 -3
  6. package/plugin/commands/align.md +40 -4
  7. package/plugin/commands/capture.md +17 -1
  8. package/plugin/commands/compile.md +17 -12
  9. package/plugin/commands/query.md +1 -0
  10. package/plugin/skills/skill-align-workflow/SKILL.md +42 -9
  11. package/plugin/skills/skill-align-workflow/references/gates.md +85 -45
  12. package/plugin/skills/skill-compile-close/SKILL.md +3 -4
  13. package/plugin/skills/skill-compile-draft/SKILL.md +106 -305
  14. package/plugin/skills/skill-compile-draft/references/action-domain-gates.md +34 -0
  15. package/plugin/skills/skill-compile-draft/references/notes.md +34 -0
  16. package/plugin/skills/skill-compile-draft/references/refresh-and-update.md +71 -0
  17. package/plugin/skills/skill-compile-draft/references/structural-challenges.md +76 -0
  18. package/plugin/skills/skill-compile-judge/SKILL.md +106 -0
  19. package/plugin/skills/skill-context-query/SKILL.md +137 -92
  20. package/plugin/skills/skill-drop/SKILL.md +2 -3
  21. package/plugin/skills/skill-semantic-reconcile/SKILL.md +67 -183
  22. package/plugin/skills/skill-semantic-reconcile/references/leakage-and-ownership.md +31 -0
  23. package/plugin/skills/skill-semantic-reconcile/references/mode-semantics.md +41 -0
  24. package/plugin/skills/skill-semantic-reconcile/references/scope-review-and-omit.md +60 -0
  25. package/plugin/skills/skill-semantic-reconcile/references/temporal-and-evidence.md +66 -0
  26. package/plugin/skills/skill-semantic-reconcile/references/user-confirmation.md +69 -0
package/README.md CHANGED
@@ -121,10 +121,10 @@ Data model: Node (`domain` / `entity` / `action`) + Section (ten kinds, mounted
121
121
  | `context capture <url \| ./path.md [./more.md...] \| --stdin \| --inbox \| --refresh \| --code [path]>` | CLI | Ingest external documents or code into the source registry. Feishu URLs use `lark-cli`; local `.md` files can be captured one at a time, as variadic paths, or as newline-separated paths from stdin. `--code` snapshots TypeScript packages/symbols/edges through the code aspect. For Agent interaction, run `context capture --code <path> --plan --format json` first, show only package name / module path / version, then capture with repeated `--module <path>`. After capture, continue with source ids and semantic handles, not storage paths. |
122
122
  | `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
123
  | `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
- | `context align --scan \| --finalize - --digest <segments-digest>` | 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 with the matching segments digest. `--schema <name>` prints the exact align workflow input schemas. |
125
- | `context compile --context <slug> --format json \| --node-cycle <slug> --input - --accept-safe-defaults \| --draft <slug> --input - --plan --prepare \| --close` | CLI | Workflow helpers driven by the `/context:compile` skill pipeline. The context entrypoint prepares durable NodeContext, generation policy, and coverage workflow payloads, then prints semantic payload handles; agents read citation handles through compact `workflow show` views. `--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. Manual `--draft --prepare → reconcile review/apply` remains the fallback for questions and unsupported evidence. Normal handoff uses stdin plus workflow payload digests; `--save-input` is only an explicit debug scratch copy, not workspace truth. |
124
+ | `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> --format json \| --node-cycle <slug> --input - --accept-safe-defaults \| --draft <slug> --input - --plan --prepare \| --close` | CLI | Workflow helpers driven by the `/context:compile` skill pipeline. The context entrypoint prepares durable NodeContext, generation policy, and coverage workflow payloads, then prints semantic payload handles; agents read citation handles through compact `workflow show` views. `--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. Manual `--draft --prepare → reconcile review/apply` remains the fallback for questions and unsupported evidence. 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
126
  | `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
- | `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 and returns a digest; `--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 --prepare-digest <digest>` stores the ready review when semantic decisions are needed, and `drop --apply-plan` consumes the current workflow plan/review without plan or decisions files. |
127
+ | `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
128
  | `context purge [--yes]` | CLI | Permanently deletes every archive under `archive/` after a summary + confirmation; active `raw/` and `knowledge/` are not modified. |
129
129
  | `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
130
  | `context doctor` | CLI | Workspace diagnostics for current workflow, align output, knowledge, caches, evidence, coverage, semantic ledger, and archive state. |