@sumrco/cli 0.4.5 → 0.4.7

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 (37) hide show
  1. package/ARTIFACT-MANIFEST.json +3 -3
  2. package/THIRD_PARTY_NOTICES.md +231 -9
  3. package/ai/modules/kontract/resources/authoring/configuration.rf.md +37 -0
  4. package/ai/modules/kontract/resources/authoring/contract-copy.rf.md +92 -0
  5. package/ai/modules/kontract/resources/authoring/design-profile/overview.md +2 -1
  6. package/ai/modules/kontract/resources/authoring/overview.md +10 -7
  7. package/ai/modules/kontract/resources/authoring/spec-layout.rf.md +6 -27
  8. package/ai/modules/kontract/resources/authoring/team-members/spec-author.tm.md +15 -14
  9. package/ai/modules/kontract/resources/authoring/workflows/spec-change.cmd.md +29 -21
  10. package/ai/modules/kontract/resources/generated-output.rf.md +60 -0
  11. package/ai/modules/kontract/resources/overview.md +10 -9
  12. package/ai/modules/kontract/sumr.module.yaml +1 -1
  13. package/ai/modules/mission/resources/flow-actions.rf.md +1 -0
  14. package/ai/modules/mission/resources/flow-config.rf.md +1 -0
  15. package/ai/modules/mission/resources/flow-safety-boundaries.rf.md +1 -0
  16. package/ai/modules/mission/resources/overview.md +3 -1
  17. package/ai/modules/mission/resources/stage-closeout.rf.md +1 -0
  18. package/ai/modules/mission/resources/stage-delivery.rf.md +1 -0
  19. package/ai/modules/mission/resources/stage-intake.rf.md +1 -0
  20. package/ai/modules/mission/resources/stage-planning.rf.md +1 -0
  21. package/ai/modules/mission/resources/stage-pull-request.rf.md +1 -0
  22. package/ai/modules/mission/resources/stage-quality.rf.md +1 -0
  23. package/ai/modules/mission/resources/workflows/pr-assist.cmd.md +2 -1
  24. package/ai/modules/mission/sumr.module.yaml +1 -1
  25. package/ai/modules/playbook/resources/authoring/cross-referencing.rf.md +11 -8
  26. package/ai/modules/playbook/resources/authoring/descriptions.rf.md +3 -3
  27. package/ai/modules/playbook/resources/authoring/folder-structure.rf.md +2 -2
  28. package/ai/modules/playbook/resources/authoring/frontmatter.rf.md +73 -33
  29. package/ai/modules/playbook/resources/authoring/lifecycle-hooks.rf.md +1 -1
  30. package/ai/modules/playbook/resources/authoring/markdown.rf.md +2 -1
  31. package/ai/modules/playbook/resources/authoring/overview.md +14 -6
  32. package/ai/modules/playbook/resources/team-members/technical-writer.tm.md +1 -1
  33. package/ai/modules/playbook/sumr.module.yaml +1 -4
  34. package/bin/sumr +6 -1
  35. package/index.js +2060 -2000
  36. package/package.json +2 -2
  37. package/sbom.cdx.json +1156 -123
@@ -1,4 +1,5 @@
1
1
  ---
2
+ category: how-to:concept
2
3
  name: authoring
3
4
  title: Playbook Authoring
4
5
  description: "How to write canonical SUMR Playbook docs: frontmatter schema, references, extraction markers, and authoring checklist. Use when creating or editing Markdown docs, technical docs, AI docs, agent skills, specs, runbooks, or Playbook sources."
@@ -58,7 +59,7 @@ lifecycle automation must originate in canonical Playbook sources under
58
59
 
59
60
  - Edit topics/references for reusable guidance.
60
61
  - Edit `team-member` docs for delegated role behavior.
61
- - Edit `command` or `workflow` docs for invoked flows and orchestration.
62
+ - Edit `command` docs for user-invoked flows and `workflow` docs for multi-agent orchestration.
62
63
  - Edit `lifecycle` docs for automatic tool/session behavior.
63
64
  - If a renderer cannot express the source correctly, fix the customer-agnostic
64
65
  renderer and regenerate; never patch its output.
@@ -121,12 +122,19 @@ Avoid this shape when both files belong to the same microconcept:
121
122
  └── playwright-cli-command-catalog.md
122
123
  ```
123
124
 
124
- ## Frontmatter (All Files)
125
+ ## Frontmatter (Renderable Topics)
125
126
 
126
- Every `.md` file under `{{PLAYBOOK_PATH}}/` must have at minimum `name`, `title`, and `description`. Always quote `description` in double quotes.
127
+ A renderable Topic must include `category`, `name`, `title`, and `description`. Always quote `description` in double quotes.
128
+
129
+ Markdown without complete Topic identity remains a Document. A Document that
130
+ supplies `name`, `title`, and `description` but omits or declares an invalid
131
+ `category` fails closed before status reporting, validation completion, AI
132
+ Channel rendering, or pruning. Correct canonical source frontmatter directly;
133
+ Playbook does not infer or rewrite categories.
127
134
 
128
135
  ```yaml
129
136
  ---
137
+ category: how-to:concept
130
138
  name: unique-kebab-identifier
131
139
  title: Human Readable Title
132
140
  description: "What this doc covers. Use when doing X."
@@ -168,7 +176,7 @@ Recommended top-level folders under `{{PLAYBOOK_PATH}}/`:
168
176
  | `architecture/` | System design and diagrams |
169
177
  | `standards/` | Domain rules — also: `guidelines/`, `playbook/`, `handbook/`, `conventions/`, `practices/` |
170
178
  | `team-members/` | Orchestrators and cross-domain AI agents |
171
- | `workflows/` | User-invoked AI workflows |
179
+ | `workflows/` | Multi-agent orchestration workflows |
172
180
  | `lifecycle/` | Lifecycle automation scripts |
173
181
  | `processes/` | Workflows and runbooks |
174
182
 
@@ -259,9 +267,9 @@ See `{{PLAYBOOK_PATH}}/standards/backend/overview.md` for the backend rules.
259
267
 
260
268
  ## Checklist
261
269
 
262
- Before committing any `.md` file under `{{PLAYBOOK_PATH}}/`:
270
+ Before committing a renderable Topic under `{{PLAYBOOK_PATH}}/`:
263
271
 
264
- - [ ] `name`, `title`, and `description` present
272
+ - [ ] Explicit allowed `category`, plus `name`, `title`, and `description`, present
265
273
  - [ ] `description` is in double quotes, third person, specific
266
274
  - [ ] Main how-to docs have `## When to Use` section
267
275
  - [ ] Reference files have `title`, `label`, `when`, `order` — and no `## When to Use` in body
@@ -26,7 +26,7 @@ Apply **authoring** before writing or editing Playbook docs.
26
26
  would clarify the decision boundary. Give both sides a one-line why and keep the pair inside one
27
27
  extracted examples block.
28
28
  - Keep frontmatter complete, stable, and tool-agnostic.
29
- - Use `category: team-member`, `workflow`, or `lifecycle` only when the doc represents an AI resource rather than a normal skill/topic. Treat `hook` as a legacy alias for `lifecycle`.
29
+ - Use `category: team-member`, `workflow`, or `lifecycle` only when the doc represents an AI resource rather than a normal skill/topic. Treat `hook` as a compatibility alias for `lifecycle`.
30
30
  - When the user asks for hooks, automatic AI checks, session start/stop behavior, pre/post tool guards, quality closeout, or similar AI-tool automation, propose a `category: lifecycle` doc in `{{PLAYBOOK_PATH}}/lifecycle/` before any tool-native hook edits.
31
31
  - Explain that Claude/Codex hook files are generated AI Channel output; the Playbook lifecycle doc is the source of truth.
32
32
  - Avoid editing generated channel output directly.
@@ -34,9 +34,6 @@ spec:
34
34
  - name: authoring
35
35
  summary: Print the canonical Playbook Markdown authoring contract
36
36
  visibility: public
37
- - name: migrate
38
- summary: Move command-era category workflow docs to command and .wf.md to .cmd.md
39
- visibility: public
40
37
  exports:
41
38
  aiResources:
42
39
  activation:
@@ -51,6 +48,6 @@ spec:
51
48
  experimental: false
52
49
  group: modules
53
50
  targets:
54
- bunVersion: ">=1.1.0"
51
+ bunVersion: ">=1.4.0"
55
52
  contractVersion: ^1.0.0
56
53
  visibility: public
package/bin/sumr CHANGED
@@ -2,7 +2,12 @@
2
2
 
3
3
  # `bun run` prepends the consumer's node_modules/.bin to PATH. Resolve this
4
4
  # package's sibling CLI so an older project-pinned `_sumr_cli` cannot take over.
5
- _sumr_wrapper_path="${BASH_SOURCE[0]}"
5
+ # Resolve the sourced file using the caller shell's native path metadata.
6
+ if [ -n "${ZSH_VERSION:-}" ]; then
7
+ _sumr_wrapper_path="${(%):-%x}"
8
+ else
9
+ _sumr_wrapper_path="${BASH_SOURCE[0]}"
10
+ fi
6
11
  while [ -L "$_sumr_wrapper_path" ]; do
7
12
  _sumr_wrapper_dir="$(cd -P "$(dirname "$_sumr_wrapper_path")" >/dev/null 2>&1 && pwd)"
8
13
  _sumr_wrapper_path="$(readlink "$_sumr_wrapper_path")"