@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,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: daily-triage
|
|
4
|
+
title: Daily Mission Triage
|
|
5
|
+
description: "Builds a daily SUMR Mission triage queue from configured trackers, open Mission state, or provided work items, then stops before approval or implementation."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Daily Mission Triage
|
|
9
|
+
|
|
10
|
+
Use this workflow for a daily planning run that prepares reviewable Mission plans without starting delivery.
|
|
11
|
+
|
|
12
|
+
This is a triage workflow, not an implementation workflow. It helps teams decide what is ready for human review, approval, splitting, assignment, or later implementation.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
The caller may provide:
|
|
17
|
+
|
|
18
|
+
- A list of issue keys, tracker IDs, URLs, or custom work item labels.
|
|
19
|
+
- Query output from a repo-specific tracker discovery script.
|
|
20
|
+
- A configured tracker filter, such as bugs, incidents, customer requests, Todo, In Progress, or unplanned work.
|
|
21
|
+
- No issue list, in which case inspect current Mission state with `sumr mission next` and `sumr mission list --all`.
|
|
22
|
+
|
|
23
|
+
## Triage Goals
|
|
24
|
+
|
|
25
|
+
Build a daily queue that answers:
|
|
26
|
+
|
|
27
|
+
- Which missions need a plan?
|
|
28
|
+
- Which draft plans are waiting for approval?
|
|
29
|
+
- Which approved plans are ready for claim or dispatch?
|
|
30
|
+
- Which missions are blocked, stale, duplicated, or already in progress?
|
|
31
|
+
- Which tracker items should get a new draft Mission plan today?
|
|
32
|
+
|
|
33
|
+
## Planning-Only Prompt
|
|
34
|
+
|
|
35
|
+
For each selected work item that needs a draft plan, use this prompt shape:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Run SUMR Mission planning only for {{issueOrWorkItem}}.
|
|
39
|
+
|
|
40
|
+
Create or update the Mission, read full tracker context including description,
|
|
41
|
+
comments, todos/checklists, linked docs, and images/screenshots, inspect relevant
|
|
42
|
+
code paths read-only, write a draft implementation plan, register the plan
|
|
43
|
+
without --approve, then stop.
|
|
44
|
+
|
|
45
|
+
Do not approve the plan.
|
|
46
|
+
Do not claim the mission.
|
|
47
|
+
Do not implement.
|
|
48
|
+
Do not create a worktree.
|
|
49
|
+
Do not edit application code.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use the `sumr-mission-planner` agent when the channel supports custom agents.
|
|
53
|
+
|
|
54
|
+
## Steps
|
|
55
|
+
|
|
56
|
+
1. Load existing Mission state:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
sumr mission next --all
|
|
60
|
+
sumr mission list --all
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. Collect candidate work items from the caller, the repo-specific tracker query, or the configured tracker.
|
|
64
|
+
3. Normalize every candidate to a Mission issue key.
|
|
65
|
+
4. Skip candidates that already have an approved plan, claim, implementation report, review report, validation report, or close-ready state.
|
|
66
|
+
5. For each selected candidate, check current state:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
sumr mission status <issueKey>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
6. Read tracker context before planning: description/body, acceptance criteria,
|
|
73
|
+
todos/checklists, comments/discussion, linked docs, and images/screenshots or
|
|
74
|
+
other attachments.
|
|
75
|
+
7. If no mission exists, create one from tracker context:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
sumr mission start --tracker <tracker> --issue <issue> --name "<title>"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
8. Run one planning agent per selected work item. Do not combine unrelated items into one plan.
|
|
82
|
+
9. Register the draft plan without approval:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
sumr mission plan <issueKey> --from <draft-plan-file>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
10. Verify the stop state:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
sumr mission status <issueKey>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The next action should be plan approval, not claim or implementation.
|
|
95
|
+
|
|
96
|
+
## Output
|
|
97
|
+
|
|
98
|
+
Return a concise daily triage queue:
|
|
99
|
+
|
|
100
|
+
- Issue key and title.
|
|
101
|
+
- Tracker source and current tracker state when available.
|
|
102
|
+
- Mission status and next action.
|
|
103
|
+
- Draft plan path when one was created.
|
|
104
|
+
- Affected areas.
|
|
105
|
+
- Open questions or blockers.
|
|
106
|
+
- Risk level.
|
|
107
|
+
- Recommended delivery shape after approval: current checkout, sequential work, optional parallel workstreams, or no action.
|
|
108
|
+
|
|
109
|
+
## Rules
|
|
110
|
+
|
|
111
|
+
- Do not pass `--approve` during daily triage.
|
|
112
|
+
- Do not run `sumr mission claim`.
|
|
113
|
+
- Do not spawn implementation agents from this workflow.
|
|
114
|
+
- Do not create worktrees during triage.
|
|
115
|
+
- Do not mutate external trackers, labels, assignees, project status, pull requests, deployments, or external systems without explicit approval.
|
|
116
|
+
- If the tracker query is unavailable or lacks permissions, report that clearly and continue from existing Mission state.
|
|
117
|
+
- If a work item is ambiguous or blocked by missing product context, create the draft plan with open questions and leave the Mission waiting for approval.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: full-delivery
|
|
4
|
+
title: Full Mission Delivery
|
|
5
|
+
description: "Runs the richer Mission flow with issue sync, research, plan approval, branch check, delivery, quality, PR assist, and closeout."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Full Mission Delivery
|
|
9
|
+
|
|
10
|
+
Use this workflow when the task is broad, risky, or benefits from explicit research and quality gates.
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
issue.sync -> context.research -> plan.create -> plan.approve(human) -> branch.check(ask) -> work.claim -> implementation.report -> review.report -> validation.report -> quality.gate -> pr.prepare(ask) -> pr.create(human) -> mission.close
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Do not collapse research, plan approval, PR creation, or closeout unless the user explicitly approves.
|
|
17
|
+
|
|
18
|
+
ARGUMENTS: $ARGUMENTS
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: cycle
|
|
4
|
+
title: Mission Cycle
|
|
5
|
+
description: "Guides an AI agent through the configured Mission flow, next action, planning, implementation, validation, PR assist, handoff, and closeout."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mission Cycle
|
|
9
|
+
|
|
10
|
+
Use this workflow when the user gives an issue key, tracker ID, mission ID, or asks to resume AI-assisted work.
|
|
11
|
+
|
|
12
|
+
## Configured Flow
|
|
13
|
+
|
|
14
|
+
This repo uses `{{MISSION_FLOW_PRESET}}`.
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
{{MISSION_FLOW_TEXT}}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. Confirm Mission is initialized. If not, run `sumr mission init`.
|
|
23
|
+
2. Identify or create the mission with `sumr mission start`.
|
|
24
|
+
3. Run `sumr mission status <key>` or `sumr mission next`.
|
|
25
|
+
4. Follow the returned next action and stop at `human` or `ask` gates.
|
|
26
|
+
5. Use Mission reports for implementation, review, validation, quality, and handoff evidence.
|
|
27
|
+
6. Use `sumr mission pr <key> --preview` before asking to create a PR.
|
|
28
|
+
7. Never push, create PRs, mutate trackers, merge, or deploy without explicit approval.
|
|
29
|
+
|
|
30
|
+
ARGUMENTS: $ARGUMENTS
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: planning-only
|
|
4
|
+
title: Mission Planning Only
|
|
5
|
+
description: "Creates SUMR Mission draft plans for one or more work items, then stops before approval, claim, worktree creation, or implementation."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mission Planning Only
|
|
9
|
+
|
|
10
|
+
Use this workflow when a user or automation wants reviewable Mission plans without implementation.
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
The caller provides one or more issue keys, tracker IDs, URLs, or custom work item labels.
|
|
15
|
+
|
|
16
|
+
## Planning-Only Prompt
|
|
17
|
+
|
|
18
|
+
For each work item, use this prompt shape:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Run SUMR Mission planning only for {{issueOrWorkItem}}.
|
|
22
|
+
|
|
23
|
+
Create or update the Mission, read full tracker context including description,
|
|
24
|
+
comments, todos/checklists, linked docs, and images/screenshots, inspect relevant
|
|
25
|
+
code paths read-only, write a draft implementation plan, register the plan
|
|
26
|
+
without --approve, then stop.
|
|
27
|
+
|
|
28
|
+
Do not approve the plan.
|
|
29
|
+
Do not claim the mission.
|
|
30
|
+
Do not implement.
|
|
31
|
+
Do not create a worktree.
|
|
32
|
+
Do not edit application code.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use the `sumr-mission-planner` agent when the channel supports custom agents.
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
1. Normalize each work item to a Mission issue key.
|
|
40
|
+
2. Run one planner per work item. Do not combine multiple unrelated items into one Mission plan.
|
|
41
|
+
3. Check existing state with `sumr mission status <issueKey>` before creating or updating a plan.
|
|
42
|
+
4. Read tracker context before planning: description/body, acceptance criteria,
|
|
43
|
+
todos/checklists, comments/discussion, linked docs, and images/screenshots or
|
|
44
|
+
other attachments.
|
|
45
|
+
5. If no mission exists, create one from tracker context:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
sumr mission start --tracker <tracker> --issue <issue> --name "<title>"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
6. Write a draft plan and register it without approval:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sumr mission plan <issueKey> --from <draft-plan-file>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
7. Verify `sumr mission status <issueKey>` shows a plan pending approval.
|
|
58
|
+
8. Return a planning queue grouped by issue key.
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
|
|
62
|
+
- Do not pass `--approve` during planning-only runs.
|
|
63
|
+
- Do not run `sumr mission claim`.
|
|
64
|
+
- Do not spawn implementation agents from this workflow.
|
|
65
|
+
- Do not create worktrees during planning.
|
|
66
|
+
- Do not mutate external trackers, labels, assignees, project status, PRs, deployments, or external systems without explicit approval.
|
|
67
|
+
- If a mission already has an approved plan, claim, implementation report, or validation report, skip planning and report the existing state instead of overwriting it.
|
|
68
|
+
- If the issue is ambiguous or blocked by missing product context, create the draft plan with open questions and leave the Mission waiting for approval.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: pr-assist
|
|
4
|
+
title: Mission PR Assist
|
|
5
|
+
description: "Prepares a scoped PR preview from Mission artifacts, issue context, verification evidence, and repo PR conventions."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mission PR Assist
|
|
9
|
+
|
|
10
|
+
Use this workflow after implementation and validation evidence exists.
|
|
11
|
+
|
|
12
|
+
1. Run `sumr mission status <key>`.
|
|
13
|
+
2. Confirm the current branch is not protected.
|
|
14
|
+
3. Run `sumr mission pr <key> --preview`.
|
|
15
|
+
4. Review the generated PR body for scope drift, local-only paths, raw commit logs, and raw diff stats.
|
|
16
|
+
5. Remove or split unrelated dependency, audit, tooling, infrastructure, or cleanup changes unless they are required for the issue.
|
|
17
|
+
6. Ask before `--create-draft` or `--create`.
|
|
18
|
+
|
|
19
|
+
Never merge or mutate issue/project state.
|
|
20
|
+
|
|
21
|
+
ARGUMENTS: $ARGUMENTS
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: workflow
|
|
3
|
+
name: standard-delivery
|
|
4
|
+
title: Standard Mission Delivery
|
|
5
|
+
description: "Runs the default practical Mission flow from issue intake through plan approval, implementation evidence, validation, quality gate, and PR preview."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Standard Mission Delivery
|
|
9
|
+
|
|
10
|
+
Use this workflow for normal issue delivery.
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
issue.sync -> context.research(skipped) -> plan.create -> plan.approve(human) -> branch.check(ask) -> work.claim -> implementation.report -> review.report -> validation.report -> quality.gate -> pr.prepare(ask) -> pr.create(human)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Stop for human approval before implementation and before PR creation.
|
|
17
|
+
|
|
18
|
+
ARGUMENTS: $ARGUMENTS
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
apiVersion: sumr.dev/v1
|
|
2
|
+
kind: CliModule
|
|
3
|
+
metadata:
|
|
4
|
+
name: mission
|
|
5
|
+
package: "@sumrco/cli"
|
|
6
|
+
description: File-backed execution state for AI-assisted work
|
|
7
|
+
owners:
|
|
8
|
+
- team: "@sumr-org/mission-team"
|
|
9
|
+
tags:
|
|
10
|
+
- ai-workflow
|
|
11
|
+
- state
|
|
12
|
+
- cache
|
|
13
|
+
spec:
|
|
14
|
+
visibility: public
|
|
15
|
+
group: modules
|
|
16
|
+
targets:
|
|
17
|
+
contractVersion: ^1.0.0
|
|
18
|
+
bunVersion: ">=1.1.0"
|
|
19
|
+
commands:
|
|
20
|
+
- name: init
|
|
21
|
+
summary: Initialize Mission state for the current repository or global workspace
|
|
22
|
+
visibility: public
|
|
23
|
+
- name: start
|
|
24
|
+
summary: Start or resume a mission
|
|
25
|
+
visibility: public
|
|
26
|
+
- name: status
|
|
27
|
+
summary: Show mission status and next action
|
|
28
|
+
visibility: public
|
|
29
|
+
- name: next
|
|
30
|
+
summary: Show the next mission action
|
|
31
|
+
visibility: public
|
|
32
|
+
- name: list
|
|
33
|
+
summary: List missions
|
|
34
|
+
visibility: public
|
|
35
|
+
- name: plan
|
|
36
|
+
summary: Create or register a mission plan
|
|
37
|
+
visibility: public
|
|
38
|
+
- name: approve
|
|
39
|
+
summary: Approve the current mission plan for implementation
|
|
40
|
+
visibility: public
|
|
41
|
+
- name: claim
|
|
42
|
+
summary: Claim a mission for implementation
|
|
43
|
+
visibility: public
|
|
44
|
+
- name: report
|
|
45
|
+
summary: Create a mission report
|
|
46
|
+
visibility: public
|
|
47
|
+
- name: block
|
|
48
|
+
summary: Mark a mission as blocked
|
|
49
|
+
visibility: public
|
|
50
|
+
- name: unblock
|
|
51
|
+
summary: Clear a mission blocker
|
|
52
|
+
visibility: public
|
|
53
|
+
- name: close
|
|
54
|
+
summary: Close a completed mission
|
|
55
|
+
visibility: public
|
|
56
|
+
- name: clean
|
|
57
|
+
summary: Remove expired closed mission cache
|
|
58
|
+
visibility: public
|
|
59
|
+
- name: flow
|
|
60
|
+
summary: Inspect and configure Mission flow presets
|
|
61
|
+
visibility: public
|
|
62
|
+
- name: pr
|
|
63
|
+
summary: Prepare or create a pull request from Mission evidence
|
|
64
|
+
visibility: public
|
|
65
|
+
exports:
|
|
66
|
+
resources: []
|
|
67
|
+
binaries: []
|
|
68
|
+
aiResources:
|
|
69
|
+
module: mission
|
|
70
|
+
roots:
|
|
71
|
+
- ./resources
|
|
72
|
+
activation:
|
|
73
|
+
mode: command
|
|
74
|
+
initCommand: mission init
|
|
75
|
+
key: mission
|
|
76
|
+
flags:
|
|
77
|
+
experimental: false
|
|
78
|
+
deprecated: null
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: reference
|
|
3
|
+
name: playbook-authoring-structure
|
|
4
|
+
title: Content Structure
|
|
5
|
+
description: "Body templates for canonical Playbook topics and reference files, with required sections and structure rules."
|
|
6
|
+
label: Structure
|
|
7
|
+
when: Creating a new how-to doc, creating a new reference file, checking required body sections, deciding how to structure a new doc
|
|
8
|
+
order: 50
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Content Structure
|
|
12
|
+
|
|
13
|
+
## Main How-To Doc
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
---
|
|
17
|
+
name: my-topic
|
|
18
|
+
description: "What this covers. Use when doing X."
|
|
19
|
+
tags: [optional, tags]
|
|
20
|
+
---
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# Topic Title
|
|
25
|
+
|
|
26
|
+
Brief intro — one or two sentences. Optional.
|
|
27
|
+
|
|
28
|
+
## When to Use
|
|
29
|
+
|
|
30
|
+
- Bullet conditions describing when this doc is relevant
|
|
31
|
+
- Be specific about the action or context
|
|
32
|
+
|
|
33
|
+
## Core Rules / Overview
|
|
34
|
+
|
|
35
|
+
High-level rules or overview. Keep concise.
|
|
36
|
+
Push deep details to reference files in the same folder.
|
|
37
|
+
|
|
38
|
+
## Key Section
|
|
39
|
+
|
|
40
|
+
Main content. Code snippets inline for short examples.
|
|
41
|
+
|
|
42
|
+
<!-- extract:examples -->
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
\`\`\`ts
|
|
46
|
+
const stateByTransition = {
|
|
47
|
+
draft: ['review'],
|
|
48
|
+
review: ['approved', 'changes-requested'],
|
|
49
|
+
} as const;
|
|
50
|
+
\`\`\`
|
|
51
|
+
<!-- /extract:examples -->
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Rules:
|
|
55
|
+
- `## When to Use` is required in every main doc.
|
|
56
|
+
- Keep the main doc under ~180 lines. If it goes over, move deep sections to `category: reference` files.
|
|
57
|
+
- Do not add a `## References` or `## Related` section manually — the playbook sync generates the reference table automatically.
|
|
58
|
+
|
|
59
|
+
## Reference File
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
---
|
|
63
|
+
category: reference
|
|
64
|
+
name: my-topic-detail
|
|
65
|
+
title: Detail Section Title
|
|
66
|
+
description: "What this reference covers (specific, no meta phrasing)."
|
|
67
|
+
label: Detail
|
|
68
|
+
when: Doing X, reviewing Y, adding Z
|
|
69
|
+
order: 10
|
|
70
|
+
---
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
# Detail Section Title
|
|
75
|
+
|
|
76
|
+
## Section A
|
|
77
|
+
|
|
78
|
+
Content...
|
|
79
|
+
|
|
80
|
+
## Section B
|
|
81
|
+
|
|
82
|
+
Content...
|
|
83
|
+
|
|
84
|
+
<!-- extract:examples -->
|
|
85
|
+
## Examples
|
|
86
|
+
|
|
87
|
+
\`\`\`ts
|
|
88
|
+
const requiredReferenceFields = ['label', 'when', 'order'] as const;
|
|
89
|
+
\`\`\`
|
|
90
|
+
<!-- /extract:examples -->
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Rules:
|
|
94
|
+
- No `## When to Use` in the body — `when` frontmatter replaces it.
|
|
95
|
+
- No `references:` frontmatter field.
|
|
96
|
+
- Keep the file in the **same folder** as the main doc it supports.
|
|
97
|
+
- `order` uses integers with gaps (10, 20, 30…) to allow future inserts.
|
|
98
|
+
|
|
99
|
+
## Splitting an Existing File
|
|
100
|
+
|
|
101
|
+
Before moving text, decide whether the current folder is the right context owner.
|
|
102
|
+
|
|
103
|
+
Use this linear flow:
|
|
104
|
+
|
|
105
|
+
1. Analyze context: read the current folder, `overview.md`, sibling docs, and generated output expectations.
|
|
106
|
+
2. Choose placement:
|
|
107
|
+
- Same-folder reference when the extracted content supports the current `overview.md`.
|
|
108
|
+
- New child folder when the extracted content deserves its own main topic and references.
|
|
109
|
+
- New child folder when the split produces multiple files for one microconcept. The child `overview.md` is the invoker/entry point; the other files become references.
|
|
110
|
+
3. Split: keep the entry point short; move deep examples, edge cases, long tables, and checklists into references.
|
|
111
|
+
4. Check rules: one `overview.md` per topic folder, no manual `references/` folder, no `references:` frontmatter, reference files have `label`, `when`, and `order`.
|
|
112
|
+
5. Validate: run `sumr playbook validate --source docs`.
|
|
113
|
+
6. Preview: run `sumr playbook sync --source docs --dry-run --json` and inspect warnings before normal sync.
|
|
114
|
+
|
|
115
|
+
Do not create several overview-like peers in a broad folder. For example, if `standards/testing/playwright.md` becomes a standalone topic, create `standards/testing/playwright/overview.md` and put Playwright references beside it.
|
|
116
|
+
|
|
117
|
+
Example: if `standards/testing/playwright-cli.md` is split into command usage plus a command catalog, do not leave both files in `standards/testing/`. Use the child topic folder:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
{{PLAYBOOK_PATH}}/standards/testing/
|
|
121
|
+
├── overview.md
|
|
122
|
+
└── playwright-cli/
|
|
123
|
+
├── overview.md ← main topic and invoker
|
|
124
|
+
└── command-catalog.md ← category: reference
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The parent testing overview should route to the child topic at a high level. The detailed Playwright CLI references belong beside the child `overview.md`, not beside the parent testing overview.
|
|
128
|
+
|
|
129
|
+
## Folder Structure Pattern
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
{{PLAYBOOK_PATH}}/
|
|
133
|
+
└── my-topic/
|
|
134
|
+
├── overview.md ← main how-to doc (entry point)
|
|
135
|
+
├── detail-a.md ← category: reference, order: 10
|
|
136
|
+
├── detail-b.md ← category: reference, order: 20
|
|
137
|
+
└── detail-c.md ← category: reference, order: 30
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Each folder has **one** `overview.md` as the entry point. All `category: reference` files live alongside it. Do not nest references further.
|
|
141
|
+
|
|
142
|
+
## When to Restructure
|
|
143
|
+
|
|
144
|
+
If a folder is missing an `overview.md` or has multiple unrelated how-to files:
|
|
145
|
+
|
|
146
|
+
1. Create `overview.md` as the main doc summarising the domain.
|
|
147
|
+
2. Convert the sub-topic files to `category: reference` with `title`, `label`, `when`, `order`.
|
|
148
|
+
3. If a file is actually about a different domain, move it to the appropriate folder instead.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: reference
|
|
3
|
+
name: playbook-authoring-cross-referencing
|
|
4
|
+
title: Cross-Referencing
|
|
5
|
+
description: "How to reference other topics within SUMR docs: use name for main topics, label for references. Never use file paths."
|
|
6
|
+
label: Cross-Refs
|
|
7
|
+
when: Referencing another topic from within content, choosing how to link to a related doc
|
|
8
|
+
order: 60
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Cross-Referencing
|
|
12
|
+
|
|
13
|
+
## Never Use File Paths
|
|
14
|
+
|
|
15
|
+
Do not link to other docs by file path. Files are moved and renamed by generators — paths are not stable identifiers.
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# Bad — file paths break after generation
|
|
19
|
+
See [Frontmatter](frontmatter.rf.md) for the schema.
|
|
20
|
+
Follow [TypeScript](typescript.md) rules.
|
|
21
|
+
|
|
22
|
+
# Good — reference by name or label
|
|
23
|
+
See **Frontmatter** for the schema.
|
|
24
|
+
Follow the **typescript** conventions.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## How to Reference
|
|
28
|
+
|
|
29
|
+
**Referencing a main topic** — use its `name` field in bold:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
Follow the rules in **typescript**.
|
|
33
|
+
See **patterns** for the renderer pipeline.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Referencing a reference file** — use its `label` field in bold (the label is the short column name visible in the generated reference table):
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
See **Extraction** for the code-block classification table.
|
|
40
|
+
Follow the rules in **Descriptions** when writing description fields.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The difference: `name` is lowercase kebab (`typescript`, `patterns`). `label` is the display name used in the reference table (`Extraction`, `Descriptions`, `Command Router`).
|
|
44
|
+
|
|
45
|
+
## Action Words
|
|
46
|
+
|
|
47
|
+
| Word | When to use | Example |
|
|
48
|
+
|------|-------------|---------|
|
|
49
|
+
| **Follow** | The reader must obey the rules there | `Follow the rules in **Descriptions**.` |
|
|
50
|
+
| **See** | For more detail, informational reference | `See **Extraction** for marker syntax.` |
|
|
51
|
+
| **Use** | Use that topic when doing X | `Use **patterns** when adding a renderer.` |
|
|
52
|
+
|
|
53
|
+
## What Not to Add
|
|
54
|
+
|
|
55
|
+
- No `## References` section — the generator builds the reference table automatically from `category: reference` files in the same folder.
|
|
56
|
+
- No `## Related` sections.
|
|
57
|
+
- No summary lists: "For X see **ref**; for Y see **ref**." — inline contextual references are fine; summary lists are not.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: reference
|
|
3
|
+
name: playbook-authoring-descriptions
|
|
4
|
+
title: Writing Descriptions
|
|
5
|
+
description: "Rules for writing effective frontmatter descriptions — third person, what-plus-when, specific key terms, length, and YAML safety."
|
|
6
|
+
label: Descriptions
|
|
7
|
+
when: Writing or reviewing a description field, fixing vague or meta descriptions, checking YAML quoting
|
|
8
|
+
order: 30
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Writing Descriptions
|
|
12
|
+
|
|
13
|
+
Descriptions are how AI tools discover and select the right doc. A good description states **what the doc contains** and **when to use it**, in **third person**, with **specific key terms**.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
1. **Third person only.** The description is injected into context; first or second person breaks discovery.
|
|
18
|
+
- Good: `"Atomic write helpers, managed block markers, and pruning logic for SUMR renderers."`
|
|
19
|
+
- Bad: `"This document describes..."` / `"I help you..."` / `"Use this to..."`
|
|
20
|
+
|
|
21
|
+
2. **What + when.** Include what the doc covers and when it is relevant.
|
|
22
|
+
- Good: `"Test isolation rules, temp dir pattern, and integration test approach. Use when writing CLI tests."`
|
|
23
|
+
- Bad: `"Testing guidelines."` — too vague, no trigger
|
|
24
|
+
|
|
25
|
+
3. **Specific key terms.** So the AI can match the user's query. Avoid restating the filename.
|
|
26
|
+
- Good: `"Naming, import ordering, type discipline, and Biome rules for the SUMR CLI."`
|
|
27
|
+
- Bad: `"TypeScript overview."` / `"TypeScript."`
|
|
28
|
+
|
|
29
|
+
4. **Avoid:** Meta phrasing (`"this document..."`, `"the following guide..."`), vague standalone labels (`"overview"`, `"best practices"`), first/second person, empty filler.
|
|
30
|
+
|
|
31
|
+
## YAML Safety
|
|
32
|
+
|
|
33
|
+
Descriptions containing `: `, `#`, `[`, `]`, or `{{` **must** be wrapped in double quotes:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
# Bad — unquoted colon causes YAML parse error
|
|
37
|
+
description: Config schema: migrations and deprecation codes.
|
|
38
|
+
|
|
39
|
+
# Good
|
|
40
|
+
description: "Config schema: migrations and deprecation codes. Use when changing config fields."
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Always quote descriptions. It is the safest default and causes no harm.
|
|
44
|
+
|
|
45
|
+
## Length
|
|
46
|
+
|
|
47
|
+
Aim for under 80 characters. Clarity over strict length — two short sentences are fine when one trigger phrase isn't enough.
|
|
48
|
+
|
|
49
|
+
<!-- extract:examples -->
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
| Type | Bad | Good |
|
|
53
|
+
|------|-----|------|
|
|
54
|
+
| How-to | `"TypeScript conventions."` | `"Naming, import ordering, type discipline, and Biome rules. Use when writing or reviewing TypeScript."` |
|
|
55
|
+
| Reference | `"Import rules."` | `"Biome distance-based import ordering, type imports, and #region rules."` |
|
|
56
|
+
| How-to | `"Testing guidelines."` | `"Test isolation rules, temp dir pattern, and integration test approach for the SUMR CLI."` |
|
|
57
|
+
| How-to | `"Authoring docs."` | `"Frontmatter schema, reference files, extraction markers, and checklist. Use when creating or editing {{PLAYBOOK_PATH}}/."` |
|
|
58
|
+
|
|
59
|
+
### Full YAML examples
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
# How-to doc
|
|
63
|
+
description: "Naming, import ordering, type discipline, and Biome rules. Use when writing or reviewing TypeScript."
|
|
64
|
+
|
|
65
|
+
# Reference file
|
|
66
|
+
description: "Biome distance-based import ordering, type imports, and #region rules."
|
|
67
|
+
|
|
68
|
+
# Config doc
|
|
69
|
+
description: "Config schema: versioning, migration registry, deprecation codes. Use when changing config fields."
|
|
70
|
+
```
|
|
71
|
+
<!-- /extract:examples -->
|