@c4a/context-cli 0.6.1-beta.3 → 0.6.1-beta.5

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 (43) hide show
  1. package/README.md +22 -9
  2. package/README.zh-CN.md +12 -8
  3. package/cli.js +76339 -69108
  4. package/docs/quickstart.md +7 -0
  5. package/package.json +4 -3
  6. package/plugins/README.md +7 -2
  7. package/plugins/README_CN.md +7 -2
  8. package/plugins/VERSION +1 -1
  9. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  10. package/plugins/claude/commands/continue.md +17 -3
  11. package/plugins/claude/commands/init.md +7 -4
  12. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  13. package/plugins/codex/skills/continue/SKILL.md +17 -3
  14. package/plugins/codex/skills/init/SKILL.md +6 -3
  15. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  16. package/plugins/cursor/commands/context-continue.md +17 -3
  17. package/plugins/cursor/commands/context-init.md +7 -4
  18. package/plugins/skills/context-continue/SKILL.md +17 -3
  19. package/plugins/skills/context-init/SKILL.md +6 -3
  20. package/providers/context/actions/accept-package-templates.yaml +5 -0
  21. package/providers/context/actions/align-next.yaml +1 -0
  22. package/providers/context/codes.yaml +2 -0
  23. package/providers/context/graphs/workspace.yaml +26 -1
  24. package/providers/context/manifest.json +67 -40
  25. package/providers/context/provider.yaml +1 -1
  26. package/providers/context/resources/diagnostics/projection-stale.md +13 -0
  27. package/providers/context/resources/dialogue/document-classification.md +2 -1
  28. package/providers/context/resources/dialogue/package-output.md +5 -7
  29. package/providers/context/resources/manuals/guides/package-outputs.md +40 -37
  30. package/providers/context/resources/manuals/reference/package-templates.md +36 -48
  31. package/providers/context/resources/manuals/reference/project-api.md +139 -17
  32. package/providers/context/resources/manuals/reference/template-variables.md +12 -11
  33. package/providers/context/resources/procedures/close-and-build.md +3 -1
  34. package/providers/context/resources/procedures/code-extraction.md +22 -2
  35. package/providers/context/resources/procedures/document-capture.md +14 -0
  36. package/providers/context/resources/procedures/document-classification.md +3 -0
  37. package/providers/context/resources/procedures/package-output.md +17 -11
  38. package/providers/context/resources/procedures/prose-align.md +45 -0
  39. package/providers/context/resources/procedures/source-boundary.md +6 -0
  40. package/providers/context/resources/procedures/source-capture-detailed.md +10 -0
  41. package/providers/context/resources/semantic/align/candidate-resolution.md +4 -2
  42. package/providers/context/resources/semantic/align/structure-planning.md +8 -5
  43. package/providers/context/schemas/prose-structure-batch.schema.json +35 -0
@@ -51,6 +51,16 @@ user's language. Never hand-write captured source snapshots: the
51
51
  CLI owns normalisation (NFC, BOM strip, line endings) and the `content_hash`
52
52
  contract, so any manual edit breaks idempotency.
53
53
 
54
+ Lark capture obtains the structured XML representation and produces two
55
+ separate artifacts: XML audit evidence and a deterministic readable Markdown
56
+ projection. Do not treat raw XML as Markdown and do not rewrite it yourself.
57
+ Inspect the returned fidelity status and diagnostics. Warnings describe an
58
+ explicitly skipped empty block; errors mean non-empty evidence or a resource
59
+ locator could not be preserved and the workflow must not proceed to Align,
60
+ Compile, or Review. The CLI, not the plugin, parses the document. The plugin
61
+ only displays the structured counts and diagnostics returned by the current
62
+ source resource.
63
+
54
64
  ### Code capture diagnostics
55
65
 
56
66
  Do not run hand-written dependency preflight commands before code extraction or
@@ -45,8 +45,10 @@ Known anomaly kinds:
45
45
  Use stable `node_ref`, `view_ref`, and `section_ref` values from the current
46
46
  `context.structure.v1` payload for in-payload references. A NodeRef should be
47
47
  safe, lower-case, and path-shaped, such as `entity/rspack` or
48
- `domain/build-tooling`. `slug` and `path` are derived fields in the current
49
- flow; do not invent alternate reference aliases.
48
+ `domain/build-tooling`. `slug` is the required stable filename choice for a
49
+ View. `path` is derived from collection, optional containment, and slug; omit
50
+ it or use the exact CLI-derived value. Do not invent alternate reference
51
+ aliases.
50
52
 
51
53
  When an edge or section points at knowledge:
52
54
 
@@ -117,10 +117,13 @@ After source evidence identifies a candidate title or stable ref, run:
117
117
  context run align:<type>:<source>:<collection> --view existing-knowledge --query <title-or-stable-ref> --format json
118
118
  ```
119
119
 
120
- Use the returned pagination command when present. Exact title, NodeRef, ViewRef,
121
- or tag hits should usually reuse the existing Node instead of creating a
122
- duplicate candidate. The lookup is deterministic identity discovery; the Agent
123
- still decides whether the source evidence describes the same concept.
120
+ Use the returned pagination command when present. Exact title, NodeRef, or
121
+ ViewRef hits should usually reuse the existing Node instead of creating a
122
+ duplicate candidate. The lookup returns only the best title/NodeRef/ViewRef
123
+ identity tier. Shared tag matches are summarized separately and never require
124
+ walking the related subgraph merely to determine whether a root identity
125
+ exists. The lookup is deterministic identity discovery; the Agent still
126
+ decides whether the source evidence describes the same concept.
124
127
 
125
128
  When a code projection Node already represents the object, reuse its slug for prose evidence and plan only prose-owned Sections for the current source evidence.
126
129
 
@@ -324,6 +327,6 @@ editing CLI-managed files.
324
327
  - [ ] Node classification used the semantic gates in `structure-planning/references/gates.md`. If not, return to **Step 4**.
325
328
  - [ ] URL/reference ownership followed CLI diagnostics, not static prompt rules. If not, return to **Step 5**.
326
329
  - [ ] The requested align payload passed `context run align:<type>:<source>:<collection> --validate --input - --format json` before stage. If not, return to **Step 6**.
327
- - [ ] No `sources/`, `unapproved/`, `knowledge/`, `dist/`, `.tmp`, host tool-results, or CLI-managed files were read or written with generic tools. If violated, restart from **Step 1**.
330
+ - [ ] No `sources/`, `knowledge/`, `dist/`, `.tmp`, host tool-results, or CLI-managed files were read or written with generic tools. If violated, restart from **Step 1**.
328
331
 
329
332
  </procedures>
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "context.prose.structure-batch.v1",
4
+ "title": "Context prose structure batch",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "items"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "context.prose.structure-batch.v1"
11
+ },
12
+ "items": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "maxItems": 100,
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["phase_id", "input"],
20
+ "properties": {
21
+ "phase_id": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "One declared phase.align.prose id from the current pending structure targets."
25
+ },
26
+ "input": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "Project-relative or absolute YAML/JSON context.structure.v1 payload path for this target."
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }