@sumrco/cli 0.1.0
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 +36 -0
- package/ai/modules/kontract/resources/configuration.rf.md +123 -0
- package/ai/modules/kontract/resources/generated-output.rf.md +179 -0
- package/ai/modules/kontract/resources/openapi-generator-lessons.rf.md +61 -0
- package/ai/modules/kontract/resources/overview.md +115 -0
- package/ai/modules/kontract/resources/performance.rf.md +90 -0
- package/ai/modules/kontract/resources/schema-reuse.rf.md +233 -0
- package/ai/modules/kontract/resources/scope-and-splitting.rf.md +147 -0
- package/ai/modules/kontract/resources/spec-layout.rf.md +69 -0
- package/ai/modules/kontract/resources/team-members/contract-author.tm.md +52 -0
- package/ai/modules/kontract/resources/workflows/contract-change.wf.md +60 -0
- package/ai/modules/kontract/sumr.module.yaml +42 -0
- package/ai/modules/mission/resources/flow-actions.rf.md +40 -0
- package/ai/modules/mission/resources/flow-config.rf.md +39 -0
- package/ai/modules/mission/resources/flow-safety-boundaries.rf.md +23 -0
- package/ai/modules/mission/resources/overview.md +69 -0
- package/ai/modules/mission/resources/stage-closeout.rf.md +21 -0
- package/ai/modules/mission/resources/stage-delivery.rf.md +36 -0
- package/ai/modules/mission/resources/stage-intake.rf.md +39 -0
- package/ai/modules/mission/resources/stage-planning.rf.md +21 -0
- package/ai/modules/mission/resources/stage-pull-request.rf.md +50 -0
- package/ai/modules/mission/resources/stage-quality.rf.md +22 -0
- package/ai/modules/mission/resources/team-members/delivery-lead.tm.md +39 -0
- package/ai/modules/mission/resources/team-members/implementer.tm.md +25 -0
- package/ai/modules/mission/resources/team-members/planner.tm.md +102 -0
- package/ai/modules/mission/resources/team-members/pr-writer.tm.md +57 -0
- package/ai/modules/mission/resources/team-members/product-owner.tm.md +37 -0
- package/ai/modules/mission/resources/team-members/quality-lead.tm.md +34 -0
- package/ai/modules/mission/resources/workflows/daily-triage.wf.md +117 -0
- package/ai/modules/mission/resources/workflows/full-delivery.wf.md +18 -0
- package/ai/modules/mission/resources/workflows/mission-cycle.wf.md +30 -0
- package/ai/modules/mission/resources/workflows/planning-only.wf.md +68 -0
- package/ai/modules/mission/resources/workflows/pr-assist.wf.md +21 -0
- package/ai/modules/mission/resources/workflows/standard-delivery.wf.md +18 -0
- package/ai/modules/mission/sumr.module.yaml +78 -0
- package/ai/modules/playbook/resources/authoring/content-structure.rf.md +148 -0
- package/ai/modules/playbook/resources/authoring/cross-referencing.rf.md +57 -0
- package/ai/modules/playbook/resources/authoring/descriptions.rf.md +71 -0
- package/ai/modules/playbook/resources/authoring/extraction.rf.md +81 -0
- package/ai/modules/playbook/resources/authoring/flows.rf.md +55 -0
- package/ai/modules/playbook/resources/authoring/folder-structure.rf.md +148 -0
- package/ai/modules/playbook/resources/authoring/frontmatter.rf.md +251 -0
- package/ai/modules/playbook/resources/authoring/markdown.rf.md +108 -0
- package/ai/modules/playbook/resources/authoring/overview.md +213 -0
- package/ai/modules/playbook/resources/team-members/playbook-technical-writer.tm.md +31 -0
- package/ai/modules/playbook/sumr.module.yaml +47 -0
- package/ai/registry.json +18 -0
- package/bin/_sumr +4 -0
- package/bin/sumr +7 -0
- package/index.js +410 -0
- package/package.json +52 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playbook-authoring
|
|
3
|
+
title: Playbook Authoring
|
|
4
|
+
description: "How to write canonical SUMR Playbook docs: frontmatter schema, references, extraction markers, and authoring checklist. Use when creating or editing agnostic Playbook Markdown."
|
|
5
|
+
tags: [authoring, docs, markdown]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- Creating a new `.md` file anywhere under `{{PLAYBOOK_PATH}}/`.
|
|
11
|
+
- Editing or restructuring existing docs.
|
|
12
|
+
- Reviewing a doc for schema or structure compliance.
|
|
13
|
+
- Deciding whether to split a long doc into main + references.
|
|
14
|
+
- Explaining workflow, lifecycle, approval, or handoff flows.
|
|
15
|
+
|
|
16
|
+
## Core Principle: Layered Docs
|
|
17
|
+
|
|
18
|
+
Keep main docs concise and high-signal. Push deep detail into `category: reference` files in the same folder.
|
|
19
|
+
|
|
20
|
+
| Size | Action |
|
|
21
|
+
|------|--------|
|
|
22
|
+
| ~60-120 lines | Ideal for a main doc |
|
|
23
|
+
| ~180 lines | Soft cap — consider splitting |
|
|
24
|
+
| 500+ lines | Hard cap — must split |
|
|
25
|
+
|
|
26
|
+
Reference files attach automatically by **folder proximity** — no linking field needed. The main doc and its references live in the same folder.
|
|
27
|
+
|
|
28
|
+
## Splitting Existing Docs
|
|
29
|
+
|
|
30
|
+
Before splitting a file, decide the owning context folder. Do not just create another peer `.md` file in a broad folder when the split content is really its own topic.
|
|
31
|
+
|
|
32
|
+
Use this flow:
|
|
33
|
+
|
|
34
|
+
1. Analyze context: identify the domain, the current folder owner, and whether the file is a main topic or supporting detail.
|
|
35
|
+
2. Choose placement:
|
|
36
|
+
- Same-folder `category: reference` when the extracted content only supports the current `overview.md`.
|
|
37
|
+
- Child folder with `overview.md` when the extracted content is a substantial standalone subtopic.
|
|
38
|
+
- Child folder with `overview.md` when the split creates two or more files for the same microconcept. The child overview is the invoker/entry point; its sibling files are references.
|
|
39
|
+
3. Split content: keep concise rules and navigation in `overview.md`; move deep examples, tables, and edge cases to references.
|
|
40
|
+
4. Check naming: kebab-case filenames, stable `name` fields, `label`/`when`/`order` for references, and no generated prefixes in source docs.
|
|
41
|
+
5. Run `sumr playbook validate --source docs`.
|
|
42
|
+
6. Run `sumr playbook sync --source docs --dry-run --json`; run normal sync only after the preview is clean.
|
|
43
|
+
|
|
44
|
+
Example: if `{{PLAYBOOK_PATH}}/standards/testing/playwright.md` is a full Playwright standard, split it into its own topic folder:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
48
|
+
├── overview.md
|
|
49
|
+
└── playwright/
|
|
50
|
+
├── overview.md
|
|
51
|
+
├── locators.md (category: reference, order: 10)
|
|
52
|
+
└── fixtures.md (category: reference, order: 20)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If the Playwright content is only supporting detail for the general testing standard, keep it beside the testing overview:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
59
|
+
├── overview.md
|
|
60
|
+
└── playwright.md (category: reference, order: 30)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If the split creates a Playwright CLI topic plus its own command catalog, promote the microconcept to a child folder:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
67
|
+
├── overview.md
|
|
68
|
+
└── playwright-cli/
|
|
69
|
+
├── overview.md (main topic: Playwright CLI)
|
|
70
|
+
└── command-catalog.md (category: reference, order: 10)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Avoid this shape when both files belong to the same microconcept:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
77
|
+
├── overview.md
|
|
78
|
+
├── playwright-cli.md
|
|
79
|
+
└── playwright-cli-command-catalog.md
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Frontmatter (All Files)
|
|
83
|
+
|
|
84
|
+
Every `.md` file under `{{PLAYBOOK_PATH}}/` must have at minimum `name`, `title`, and `description`. Always quote `description` in double quotes.
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
---
|
|
88
|
+
name: unique-kebab-identifier
|
|
89
|
+
title: Human Readable Title
|
|
90
|
+
description: "What this doc covers. Use when doing X."
|
|
91
|
+
---
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
See **Frontmatter** for the full schema, categories, and required fields per category.
|
|
95
|
+
|
|
96
|
+
## Reference Files
|
|
97
|
+
|
|
98
|
+
To make a file a reference (supporting detail for a main doc):
|
|
99
|
+
|
|
100
|
+
1. Set `category: reference`
|
|
101
|
+
2. Add `title`, `label`, `when`, `order` to frontmatter
|
|
102
|
+
3. Remove the `## When to Use` section from the body (`when` field replaces it)
|
|
103
|
+
4. Keep the file in the **same folder** as the main doc
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
---
|
|
107
|
+
category: reference
|
|
108
|
+
name: typescript-imports
|
|
109
|
+
title: Import Organization
|
|
110
|
+
description: "Biome distance-based import ordering, type imports, and #region rules."
|
|
111
|
+
label: Imports
|
|
112
|
+
when: Organizing imports, reviewing import order, adding new imports
|
|
113
|
+
order: 20
|
|
114
|
+
---
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
> [!CAUTION]
|
|
118
|
+
> Do not create a `references/` subfolder. Reference files live next to the main doc in the same directory. Do not add a `references:` frontmatter field — attachment is automatic.
|
|
119
|
+
|
|
120
|
+
## Folder Organization
|
|
121
|
+
|
|
122
|
+
Recommended top-level folders under `{{PLAYBOOK_PATH}}/`:
|
|
123
|
+
|
|
124
|
+
| Folder | Purpose |
|
|
125
|
+
|--------|---------|
|
|
126
|
+
| `architecture/` | System design and diagrams |
|
|
127
|
+
| `standards/` | Domain rules — also: `guidelines/`, `playbook/`, `handbook/`, `conventions/`, `practices/` |
|
|
128
|
+
| `team-members/` | Orchestrators and cross-domain AI agents |
|
|
129
|
+
| `workflows/` | User-invoked AI workflows |
|
|
130
|
+
| `lifecycle/` | Lifecycle automation scripts |
|
|
131
|
+
| `processes/` | Workflows and runbooks |
|
|
132
|
+
|
|
133
|
+
**Team-member placement:** Put orchestrators and generalist agents in `team-members/`. Put domain-specific workers (e.g. `backend-worker.tm.md`) inside their domain folder, beside the standards they follow.
|
|
134
|
+
|
|
135
|
+
See **Folder Structure** for naming alternatives, placement rules, and a full structure example.
|
|
136
|
+
|
|
137
|
+
## Extraction Markers
|
|
138
|
+
|
|
139
|
+
Wrap dedicated examples sections with markers so they can be consumed separately:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
<!-- extract:examples -->
|
|
143
|
+
## Examples
|
|
144
|
+
|
|
145
|
+
\`\`\`text
|
|
146
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
147
|
+
├── overview.md
|
|
148
|
+
└── playwright/
|
|
149
|
+
├── overview.md
|
|
150
|
+
├── locators.md
|
|
151
|
+
└── fixtures.md
|
|
152
|
+
\`\`\`
|
|
153
|
+
<!-- /extract:examples -->
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**When to extract:** Dedicated `## Examples` sections, sample templates, and long boilerplate blocks. Skill-folder channels remove the block from `SKILL.md`, write it to `examples.md`, and add an `## Additional resources` link.
|
|
157
|
+
|
|
158
|
+
**Keep in main doc:** Short inline snippets, file structure trees, ASCII diagrams, schema outlines that are core to the instructions.
|
|
159
|
+
|
|
160
|
+
See **Extraction** for the full code-block classification table.
|
|
161
|
+
|
|
162
|
+
## Flow Documentation
|
|
163
|
+
|
|
164
|
+
Use a compact arrow flow for simple workflows:
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
🕐 intake -> [researcher] -> 📝 draft -> ⏸ HUMAN APPROVES -> ✅ ready -> [implementer] -> review -> done
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Use Mermaid plus transition rules when the flow branches, loops, or has failure paths.
|
|
171
|
+
|
|
172
|
+
See **Flows** for arrow notation, Mermaid patterns, approval gates, and when to avoid diagrams.
|
|
173
|
+
|
|
174
|
+
## Descriptions
|
|
175
|
+
|
|
176
|
+
Write descriptions in **third person** with **what + when** and **specific key terms**. Avoid vague labels ("overview", "best practices") and meta phrasing ("this document describes...").
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
# Bad
|
|
180
|
+
description: "TypeScript conventions."
|
|
181
|
+
|
|
182
|
+
# Good
|
|
183
|
+
description: "Naming, import ordering, type discipline, and Biome rules for the SUMR CLI. Use when writing or reviewing TypeScript."
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See **Descriptions** for rules, examples, and YAML safety (when to quote).
|
|
187
|
+
|
|
188
|
+
## Placeholders
|
|
189
|
+
|
|
190
|
+
Use `{{PLAYBOOK_PATH}}` anywhere in a topic body to reference the configured Playbook source directory. At sync time the token is replaced with the first `playbook.sources` entry from `sumr.yaml` (e.g. `docs`).
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
See `{{PLAYBOOK_PATH}}/standards/backend/overview.md` for the backend rules.
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**When to use:** Any time a doc needs to reference another file in the docs tree without hard-coding the folder name. Frontmatter fields are not substituted — only the body.
|
|
197
|
+
|
|
198
|
+
## Checklist
|
|
199
|
+
|
|
200
|
+
Before committing any `.md` file under `{{PLAYBOOK_PATH}}/`:
|
|
201
|
+
|
|
202
|
+
- [ ] `name`, `title`, and `description` present
|
|
203
|
+
- [ ] `description` is in double quotes, third person, specific
|
|
204
|
+
- [ ] Main how-to docs have `## When to Use` section
|
|
205
|
+
- [ ] Reference files have `title`, `label`, `when`, `order` — and no `## When to Use` in body
|
|
206
|
+
- [ ] Dedicated examples, samples, and templates wrapped with `<!-- extract:examples -->`; no standalone examples section left unwrapped
|
|
207
|
+
- [ ] Workflow and lifecycle docs use a compact arrow flow or Mermaid diagram when state transitions matter
|
|
208
|
+
- [ ] No `references:` frontmatter field
|
|
209
|
+
- [ ] No `## References` or `## Related` sections added manually
|
|
210
|
+
- [ ] Doc is under the soft cap (~180 lines); if over, split to references
|
|
211
|
+
- [ ] `{{PLAYBOOK_PATH}}` used instead of hard-coded `docs/` or similar paths in body
|
|
212
|
+
|
|
213
|
+
See **Markdown** for formatting rules (headings, callouts, code blocks, anti-patterns).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: team-member
|
|
3
|
+
name: playbook-technical-writer
|
|
4
|
+
title: Playbook Technical Writer
|
|
5
|
+
description: "A SUMR Playbook authoring specialist. Use when drafting, reviewing, or restructuring canonical Playbook Markdown and AI resource docs."
|
|
6
|
+
|
|
7
|
+
# Codex CLI agent profile options
|
|
8
|
+
codex:
|
|
9
|
+
sandbox_mode: read-only
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Playbook Technical Writer
|
|
13
|
+
|
|
14
|
+
You are responsible for producing canonical SUMR Playbook Markdown that can be rendered into multiple AI channels.
|
|
15
|
+
|
|
16
|
+
Apply **playbook-authoring** before writing or editing Playbook docs.
|
|
17
|
+
|
|
18
|
+
## Responsibilities
|
|
19
|
+
|
|
20
|
+
- Write concise main topics with high-signal instructions.
|
|
21
|
+
- Before splitting, decide the owning context folder: same-folder references for supporting detail, child `overview.md` topic folders for standalone subtopics.
|
|
22
|
+
- If a split creates multiple files for one microconcept, promote it to a child folder. The child `overview.md` is the invoker/entry point; sibling files are references.
|
|
23
|
+
- Move deep detail into `category: reference` files beside the `overview.md` they support.
|
|
24
|
+
- Review every fenced code block before extraction. Wrap dedicated examples, samples, and templates with `<!-- extract:examples -->`; keep short core snippets, file trees, and marker syntax examples inline.
|
|
25
|
+
- Keep frontmatter complete, stable, and tool-agnostic.
|
|
26
|
+
- 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`.
|
|
27
|
+
- Avoid editing generated channel output directly.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Return the proposed Markdown content or a focused review with specific schema, structure, and wording fixes.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
apiVersion: sumr.dev/v1
|
|
2
|
+
kind: CliModule
|
|
3
|
+
metadata:
|
|
4
|
+
name: playbook
|
|
5
|
+
package: "@sumrco/cli"
|
|
6
|
+
description: Sync team standards into AI tools (Claude, Cursor, Codex, VS Code)
|
|
7
|
+
owners:
|
|
8
|
+
- team: "@sumr-org/playbook-team"
|
|
9
|
+
tags:
|
|
10
|
+
- docs
|
|
11
|
+
- authoring
|
|
12
|
+
- ai-tools
|
|
13
|
+
spec:
|
|
14
|
+
visibility: private
|
|
15
|
+
group: modules
|
|
16
|
+
targets:
|
|
17
|
+
contractVersion: ^1.0.0
|
|
18
|
+
bunVersion: ">=1.1.0"
|
|
19
|
+
commands:
|
|
20
|
+
- name: config
|
|
21
|
+
summary: Manage playbook configuration in sumr.yaml
|
|
22
|
+
visibility: private
|
|
23
|
+
- name: sync
|
|
24
|
+
summary: Render Playbook Markdown into AI tool channels
|
|
25
|
+
visibility: private
|
|
26
|
+
- name: validate
|
|
27
|
+
summary: Check Playbook docs for errors without writing files
|
|
28
|
+
visibility: private
|
|
29
|
+
- name: status
|
|
30
|
+
summary: Show Playbook status, sources, and counts
|
|
31
|
+
visibility: private
|
|
32
|
+
- name: add
|
|
33
|
+
summary: Scaffold a new Playbook doc with correct frontmatter
|
|
34
|
+
visibility: private
|
|
35
|
+
- name: clean
|
|
36
|
+
summary: Remove all rendered Playbook outputs from this repo
|
|
37
|
+
visibility: private
|
|
38
|
+
- name: authoring
|
|
39
|
+
summary: Print the canonical Playbook Markdown authoring contract
|
|
40
|
+
visibility: private
|
|
41
|
+
exports:
|
|
42
|
+
resources:
|
|
43
|
+
- ./resources
|
|
44
|
+
binaries: []
|
|
45
|
+
flags:
|
|
46
|
+
experimental: false
|
|
47
|
+
deprecated: null
|
package/ai/registry.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"variant": "public",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"label": "kontract",
|
|
7
|
+
"path": "./ai/modules/kontract/resources"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"label": "mission",
|
|
11
|
+
"path": "./ai/modules/mission/resources"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"label": "playbook",
|
|
15
|
+
"path": "./ai/modules/playbook/resources"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/bin/_sumr
ADDED