@sumrco/cli 0.4.5 β 0.4.6
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/ARTIFACT-MANIFEST.json +3 -3
- package/THIRD_PARTY_NOTICES.md +221 -5
- package/ai/modules/kontract/resources/authoring/configuration.rf.md +37 -0
- package/ai/modules/kontract/resources/authoring/contract-copy.rf.md +92 -0
- package/ai/modules/kontract/resources/authoring/design-profile/overview.md +2 -1
- package/ai/modules/kontract/resources/authoring/overview.md +10 -7
- package/ai/modules/kontract/resources/authoring/spec-layout.rf.md +6 -27
- package/ai/modules/kontract/resources/authoring/team-members/spec-author.tm.md +15 -14
- package/ai/modules/kontract/resources/authoring/workflows/spec-change.cmd.md +29 -21
- package/ai/modules/kontract/resources/generated-output.rf.md +60 -0
- package/ai/modules/kontract/resources/overview.md +10 -9
- package/ai/modules/kontract/sumr.module.yaml +1 -1
- package/ai/modules/mission/resources/flow-actions.rf.md +1 -0
- package/ai/modules/mission/resources/flow-config.rf.md +1 -0
- package/ai/modules/mission/resources/flow-safety-boundaries.rf.md +1 -0
- package/ai/modules/mission/resources/overview.md +1 -0
- package/ai/modules/mission/resources/stage-closeout.rf.md +1 -0
- package/ai/modules/mission/resources/stage-delivery.rf.md +1 -0
- package/ai/modules/mission/resources/stage-intake.rf.md +1 -0
- package/ai/modules/mission/resources/stage-planning.rf.md +1 -0
- package/ai/modules/mission/resources/stage-pull-request.rf.md +1 -0
- package/ai/modules/mission/resources/stage-quality.rf.md +1 -0
- package/ai/modules/mission/sumr.module.yaml +1 -1
- package/ai/modules/playbook/resources/authoring/cross-referencing.rf.md +11 -8
- package/ai/modules/playbook/resources/authoring/descriptions.rf.md +3 -3
- package/ai/modules/playbook/resources/authoring/folder-structure.rf.md +2 -2
- package/ai/modules/playbook/resources/authoring/frontmatter.rf.md +73 -33
- package/ai/modules/playbook/resources/authoring/lifecycle-hooks.rf.md +1 -1
- package/ai/modules/playbook/resources/authoring/markdown.rf.md +2 -1
- package/ai/modules/playbook/resources/authoring/overview.md +14 -6
- package/ai/modules/playbook/resources/team-members/technical-writer.tm.md +1 -1
- package/ai/modules/playbook/sumr.module.yaml +1 -4
- package/bin/sumr +6 -1
- package/index.js +2059 -2000
- package/package.json +2 -2
- package/sbom.cdx.json +1106 -101
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
category: command
|
|
3
3
|
name: spec-change
|
|
4
4
|
title: Spec Change
|
|
5
|
-
description: "Guides an AI agent through safely changing
|
|
5
|
+
description: "Guides an AI agent through safely changing API or async schema source and regenerating Kontract contracts. Use when an API or messaging surface changes and generated contracts must follow."
|
|
6
6
|
modelTier: coding
|
|
7
7
|
access: write
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Spec Change
|
|
11
11
|
|
|
12
|
-
Use this workflow whenever an API surface changes (new endpoint,
|
|
13
|
-
field, or breaking change) and the generated contracts must follow.
|
|
12
|
+
Use this workflow whenever an API or messaging surface changes (new endpoint,
|
|
13
|
+
message, field, or breaking change) and the generated contracts must follow.
|
|
14
14
|
|
|
15
15
|
## Flow
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
π read authoring guidance -> edit
|
|
18
|
+
π read authoring guidance -> edit source YAML -> refactor -> copy review -> validate -> generate -> review diff -> βΈ HUMAN APPROVES -> commit
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Steps
|
|
@@ -23,35 +23,43 @@ field, or breaking change) and the generated contracts must follow.
|
|
|
23
23
|
1. **Read the authoring guidance** under `resources/authoring/`. Confirm the
|
|
24
24
|
configured source input, current `kontract.guidance.profile`, selected
|
|
25
25
|
schema layout style, protocol scenario (API-only, async-only, or both
|
|
26
|
-
with shared components), and whether
|
|
26
|
+
with shared components), Contract Copy rules, and whether
|
|
27
27
|
the user asked for a guidance-only profile change or an actual schema/output
|
|
28
28
|
namespace migration.
|
|
29
|
-
2. **Edit
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
2. **Edit source YAML** under the selected source's configured
|
|
30
|
+
`kontract.sources[].input` (`*.api.yml`, `*.api.yaml`, `*.async.yml`, or
|
|
31
|
+
`*.async.yaml`). Before adding new schemas, scan for existing shared
|
|
32
|
+
components. Reuse shared components via `$ref`; never duplicate schemas.
|
|
32
33
|
3. **Review the written spec** before validation. Check new or changed
|
|
33
|
-
`*.api.yml
|
|
34
|
+
`*.api.yml`, `*.api.yaml`, `*.async.yml`, or `*.async.yaml` files against
|
|
35
|
+
Kontract best practices:
|
|
34
36
|
stable component names, no inline operation payload schemas, correct `$ref`
|
|
35
|
-
paths, selected profile style,
|
|
36
|
-
descriptions where behavior needs context, reusable shared components,
|
|
37
|
+
paths, selected profile style, Contract Copy compliance, reusable shared components,
|
|
37
38
|
documented size thresholds, clear product ownership, and no duplicated
|
|
38
39
|
product concepts.
|
|
39
40
|
4. **Refactor repeated shapes first**. If the change repeats envelope fields,
|
|
40
41
|
pagination metadata, error bodies, ID/date params, regex scalar constraints,
|
|
41
42
|
schedules, or config objects, extract a shared component and reference it.
|
|
42
|
-
5. **
|
|
43
|
+
5. **Review changed contract copy**. Send public or developer-facing titles,
|
|
44
|
+
summaries, descriptions, parameters, responses, schemas, and messages
|
|
45
|
+
through the repository's copywriter role. When that role is unavailable,
|
|
46
|
+
apply Contract Copy and the repository's general microcopy guidance
|
|
47
|
+
directly. Require a concise operation summary; keep a description only when
|
|
48
|
+
it adds information. Repeat this review after any later refactor that changes
|
|
49
|
+
contract text.
|
|
50
|
+
6. **Validate**: `sumr kontract validate` (scope with `--source` if large).
|
|
43
51
|
Fix every reported error before continuing.
|
|
44
|
-
|
|
52
|
+
7. **Generate**: `sumr kontract generate`. Unchanged specs are skipped.
|
|
45
53
|
Scope large repos with `--source`, `--target`, or `--specific`.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
8. **Review generated diffs** under every selected target's configured output.
|
|
55
|
+
Inspect the artifacts promised by each configured generator, including
|
|
56
|
+
generated contract copy and metadata, and watch for unintended removals. If
|
|
57
|
+
the diff introduces many near-identical files, return to the source YAML and
|
|
58
|
+
look for a shared component.
|
|
59
|
+
9. **Do not edit generated files** to "fix" the diff β change the spec and
|
|
52
60
|
regenerate instead.
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
10. **Commit** the spec change and the regenerated output together so they
|
|
62
|
+
never drift.
|
|
55
63
|
|
|
56
64
|
## Transition rules
|
|
57
65
|
|
|
@@ -108,6 +108,66 @@ export * from './swagger';
|
|
|
108
108
|
Do not flatten-import everything blindly when DTO/model/Zod symbols collide.
|
|
109
109
|
Use the namespace exports or import from the leaf folder.
|
|
110
110
|
|
|
111
|
+
## Effect schema target β one direct file per component
|
|
112
|
+
|
|
113
|
+
The standalone `typescript-effect` target emits this service shape:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
contracts/recipes/
|
|
117
|
+
index.ts
|
|
118
|
+
schemas/
|
|
119
|
+
index.ts
|
|
120
|
+
recipe.schema.ts
|
|
121
|
+
recipe-status.schema.ts
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Each leaf can be imported directly, through the `schemas` barrel shown below,
|
|
125
|
+
or through the service barrel's `schemas` namespace:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import * as Schema from 'effect/Schema';
|
|
129
|
+
import {
|
|
130
|
+
RecipeInputSchema,
|
|
131
|
+
RecipeOutputSchema,
|
|
132
|
+
RecipeSchema,
|
|
133
|
+
type Recipe,
|
|
134
|
+
type RecipeEncoded,
|
|
135
|
+
type RecipeInput,
|
|
136
|
+
type RecipeInputEncoded,
|
|
137
|
+
} from './contracts/recipes/schemas';
|
|
138
|
+
|
|
139
|
+
const input: RecipeInput = Schema.decodeUnknownSync(RecipeInputSchema)(unknownValue);
|
|
140
|
+
const encoded: RecipeInputEncoded = Schema.encodeSync(RecipeInputSchema)(input);
|
|
141
|
+
const output: Recipe = Schema.decodeUnknownSync(RecipeOutputSchema)(unknownResponse);
|
|
142
|
+
const wire: RecipeEncoded = Schema.encodeSync(RecipeSchema)(output);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`${Name}InputSchema` excludes `readOnly` properties and
|
|
146
|
+
`${Name}OutputSchema` excludes `writeOnly` properties. `${Name}Schema` and
|
|
147
|
+
`${Name}` are output aliases. These directional names exist only when the
|
|
148
|
+
component's input and output differ. Symmetric components expose only
|
|
149
|
+
`${Name}Schema`, `${Name}`, and `${Name}Encoded`. Recursive component graphs
|
|
150
|
+
use cycle-safe declarations in either form.
|
|
151
|
+
|
|
152
|
+
Omitted `additionalProperties` preserves undeclared values as `unknown` because
|
|
153
|
+
OpenAPI admits them by default. `additionalProperties: false` installs a
|
|
154
|
+
schema-local excess-property error. A map-only typed `additionalProperties`
|
|
155
|
+
schema emits `Schema.Record`. Named fields plus a typed catch-all currently
|
|
156
|
+
fail before any file is written rather than widening or misvalidating the
|
|
157
|
+
contract. Named fields plus `additionalProperties: true` retain undeclared
|
|
158
|
+
values as `unknown`.
|
|
159
|
+
|
|
160
|
+
Fixed tuples, nested nullable values, schema defaults, and deprecation metadata
|
|
161
|
+
are preserved. Open-ended tuples, null-only schemas, and constraints without an
|
|
162
|
+
exact Effect Schema mapping fail before output is written.
|
|
163
|
+
`anyOf` accepts any matching branch; `oneOf` adds an exactly-one-match
|
|
164
|
+
refinement so overlapping branches do not silently acquire `anyOf` semantics.
|
|
165
|
+
|
|
166
|
+
The target preserves wire strings for dates, date-times, money, and unknown
|
|
167
|
+
formats. It does not generate a transport client or silently transform wire
|
|
168
|
+
values. Consumers install `effect` directly; Zod, NestJS, Angular, React, and
|
|
169
|
+
other frameworks are absent from this output.
|
|
170
|
+
|
|
111
171
|
## Zod contract β one file per API schema `components/schemas` entry
|
|
112
172
|
|
|
113
173
|
```typescript
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
category: how-to:concept
|
|
2
3
|
name: usage
|
|
3
4
|
title: Kontract Usage
|
|
4
5
|
description: "How to use the Kontract module in the SUMR CLI to review, validate, and generate API and microservice contracts from API and async schemas. Use when adding, changing, reviewing, validating, or generating API contracts, validation schemas, DTOs, SDK models, message subjects, or microservice message contracts."
|
|
@@ -212,15 +213,15 @@ Roadmap and future generator ideas live in `docs/internal/generator-roadmap.md`;
|
|
|
212
213
|
dependency and invoke `node_modules/.bin` / `Bun.resolveSync` instead.
|
|
213
214
|
- Treat everything under the generated `contracts/` output as read-only.
|
|
214
215
|
- Keep specs the single source of truth; do not hand-write Zod/DTOs that Kontract owns.
|
|
215
|
-
- After writing or updating any `*.api.yml
|
|
216
|
-
schema for duplicated concepts before
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
- After writing or updating any `*.api.yml`, `*.api.yaml`, `*.async.yml`, or
|
|
217
|
+
`*.async.yaml` file, review the schema for duplicated concepts before
|
|
218
|
+
generation.
|
|
219
|
+
- Follow the Contract Copy reference for API and async schema text. Every
|
|
220
|
+
operation must have a concise `summary`; keep `description` only when it adds
|
|
221
|
+
information, and route public or developer-facing copy through the
|
|
222
|
+
repository's copywriter role before generation. When that role is
|
|
223
|
+
unavailable, apply Contract Copy and the repository's general microcopy
|
|
224
|
+
guidance directly.
|
|
224
225
|
- Design specs for reuse: shared parameters, scalar constraints, error responses,
|
|
225
226
|
response envelope fragments, pagination metadata, repeated nested value
|
|
226
227
|
objects, and common config objects belong in shared components referenced
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
category: how-to:concept
|
|
2
3
|
name: workflow
|
|
3
4
|
title: Mission Workflow
|
|
4
5
|
description: "Mission-based AI work orchestration for SUMR CLI. Use when a user mentions missions, work items, issues, tickets, tasks, work item IDs, issue keys, worktrees, planning, implementation, review, validation, PRs, blockers, handoffs, or closing AI-assisted work."
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
category: reference
|
|
3
3
|
name: authoring-cross-referencing
|
|
4
4
|
title: Cross-Referencing
|
|
5
|
-
description: "How to
|
|
5
|
+
description: "How to use safe source-relative links and stable prose references between SUMR Playbook Documents."
|
|
6
6
|
label: Cross-Refs
|
|
7
7
|
when: Referencing another topic from within content, choosing how to link to a related doc
|
|
8
8
|
order: 60
|
|
@@ -10,30 +10,33 @@ order: 60
|
|
|
10
10
|
|
|
11
11
|
# Cross-Referencing
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Use Contained Source-Relative Links
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Use a source-relative Markdown link when readers need functional navigation to
|
|
16
|
+
another generated Topic, attached reference Document, or heading. Playbook
|
|
17
|
+
validates the source target and rewrites it to the final AI Channel artifact.
|
|
18
|
+
Dangling, escaping, or channel-unmapped links fail validation before rendering.
|
|
16
19
|
|
|
17
20
|
```markdown
|
|
18
|
-
#
|
|
21
|
+
# Good β contained links are validated and rewritten
|
|
19
22
|
See [Frontmatter](frontmatter.rf.md) for the schema.
|
|
20
|
-
Follow [TypeScript](typescript.md) rules.
|
|
23
|
+
Follow [TypeScript](typescript.md#core-rules) rules.
|
|
21
24
|
|
|
22
|
-
# Good β reference
|
|
25
|
+
# Good β stable prose reference when no navigation is needed
|
|
23
26
|
See **Frontmatter** for the schema.
|
|
24
27
|
Follow the **typescript** conventions.
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
## How to Reference
|
|
28
31
|
|
|
29
|
-
**Referencing a main
|
|
32
|
+
**Referencing a main Topic without a link** β use its `name` field in bold:
|
|
30
33
|
|
|
31
34
|
```markdown
|
|
32
35
|
Follow the rules in **typescript**.
|
|
33
36
|
See **patterns** for the renderer pipeline.
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
**Referencing a reference
|
|
39
|
+
**Referencing a reference Document without a link** β use its `label` field in bold (the label is the short column name visible in the generated reference table):
|
|
37
40
|
|
|
38
41
|
```markdown
|
|
39
42
|
See **Extraction** for the code-block classification table.
|
|
@@ -34,10 +34,10 @@ Descriptions containing `: `, `#`, `[`, `]`, or `{{` **must** be wrapped in doub
|
|
|
34
34
|
|
|
35
35
|
```yaml
|
|
36
36
|
# Bad β unquoted colon causes YAML parse error
|
|
37
|
-
description: Config schema:
|
|
37
|
+
description: Config schema: version validation and deprecation codes.
|
|
38
38
|
|
|
39
39
|
# Good
|
|
40
|
-
description: "Config schema:
|
|
40
|
+
description: "Config schema: version validation and deprecation codes. Use when changing config fields."
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Always quote descriptions. It is the safest default and causes no harm.
|
|
@@ -66,6 +66,6 @@ description: "Naming, import ordering, type discipline, and Biome rules. Use whe
|
|
|
66
66
|
description: "Biome distance-based import ordering, type imports, and #region rules."
|
|
67
67
|
|
|
68
68
|
# Config doc
|
|
69
|
-
description: "Config schema:
|
|
69
|
+
description: "Config schema: version validation, compatibility rules, and deprecation codes. Use when changing config fields."
|
|
70
70
|
```
|
|
71
71
|
<!-- /extract:examples -->
|
|
@@ -19,7 +19,7 @@ Start with these root folders under `{{PLAYBOOK_PATH}}/` and add more as the cod
|
|
|
19
19
|
| `architecture/` | System design, diagrams, ADRs, infrastructure topology |
|
|
20
20
|
| `standards/` | Domain-specific technical rules (backend, frontend, securityβ¦) |
|
|
21
21
|
| `team-members/` | Orchestrators and cross-domain AI agents |
|
|
22
|
-
| `workflows/` |
|
|
22
|
+
| `workflows/` | Multi-agent orchestration workflows (`.wf.md` files), such as issue triage or UI review |
|
|
23
23
|
| `lifecycle/` | Lifecycle automation scripts (`.lc.md` files) that guard or enrich AI sessions |
|
|
24
24
|
| `processes/` | Workflows, release checklists, incident runbooks, repeatable procedures |
|
|
25
25
|
|
|
@@ -50,7 +50,7 @@ When a user asks for hooks or automatic AI-tool behavior, create a lifecycle sou
|
|
|
50
50
|
βββ team-members/ β orchestrators and cross-domain agents
|
|
51
51
|
β βββ orchestrator.tm.md
|
|
52
52
|
β βββ code-audit-runner.tm.md
|
|
53
|
-
βββ workflows/ β
|
|
53
|
+
βββ workflows/ β multi-agent orchestration workflows
|
|
54
54
|
β βββ ui-review.wf.md
|
|
55
55
|
βββ lifecycle/ β optional lifecycle automations
|
|
56
56
|
βββ session-start.lc.md
|
|
@@ -10,34 +10,48 @@ order: 10
|
|
|
10
10
|
|
|
11
11
|
# Frontmatter Schema
|
|
12
12
|
|
|
13
|
-
## Required Fields (
|
|
13
|
+
## Required Fields (Renderable Topics)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
A renderable Playbook Topic requires these fields:
|
|
16
16
|
|
|
17
17
|
| Field | Rule |
|
|
18
18
|
|-------|------|
|
|
19
|
+
| `category` | Explicit allowed topic kind; use `how-to:concept` for standard concept/how-to docs |
|
|
19
20
|
| `name` | Unique kebab-case identifier across all docs |
|
|
20
21
|
| `title` | Human-readable display name |
|
|
21
22
|
| `description` | Third-person, what + when, specific key terms. Always in double quotes. |
|
|
22
23
|
|
|
23
24
|
```yaml
|
|
24
25
|
---
|
|
26
|
+
category: how-to:concept
|
|
25
27
|
name: testing
|
|
26
28
|
title: Testing Guidelines
|
|
27
29
|
description: "Test isolation rules, temp dir pattern, and integration test approach for the SUMR CLI."
|
|
28
30
|
---
|
|
29
31
|
```
|
|
30
32
|
|
|
33
|
+
Set `category` to an allowed value to make Markdown a Topic. Markdown without
|
|
34
|
+
complete Topic identity remains a Document. A Document that supplies `name`,
|
|
35
|
+
`title`, and `description` but omits or declares an invalid `category` fails
|
|
36
|
+
closed before status reporting, validation completion, AI Channel rendering,
|
|
37
|
+
or pruning. Correct the canonical source frontmatter directly; Playbook does
|
|
38
|
+
not infer or rewrite categories.
|
|
39
|
+
|
|
31
40
|
## Categories
|
|
32
41
|
|
|
33
42
|
| Value | Purpose | Required extra fields | AI output |
|
|
34
43
|
|-------|---------|----------------------|-----------|
|
|
35
|
-
|
|
|
36
|
-
| `
|
|
44
|
+
| `how-to:concept` | Standard concept or general how-to doc | β | Skill file |
|
|
45
|
+
| `topic` | General Playbook entry | β | Skill file |
|
|
46
|
+
| `how-to` | Procedural guide | β | Skill file |
|
|
47
|
+
| `reference` | Supporting detail for a main doc | `label`, `when`, `order` | Skill file (attached) |
|
|
48
|
+
| `role` | Recurring role or profile guidance | β | Skill file |
|
|
37
49
|
| `team-member` | Tool-agnostic delegated role | β | Native agent/subagent profiles |
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
50
|
+
| `command` | User-invoked AI command | β | Native command surface |
|
|
51
|
+
| `workflow` | Multi-agent orchestration workflow | fenced JS workflow script | Native orchestration surface |
|
|
52
|
+
| `lifecycle` | Lifecycle automation script | `event`, `target` | Hook script + channel binding |
|
|
53
|
+
| `hook` | Compatibility alias for `lifecycle` | `event`, `target` | Hook script + channel binding |
|
|
54
|
+
| `index` | Navigation/index Topic used for cross-references | β | Not generated |
|
|
41
55
|
|
|
42
56
|
### Optional Fields for Any Category
|
|
43
57
|
|
|
@@ -49,7 +63,7 @@ description: "Test isolation rules, temp dir pattern, and integration test appro
|
|
|
49
63
|
| `access` | `read-only \| write \| full` | Permission posture. Channels translate it into their sandbox, tool, or permission model. |
|
|
50
64
|
| `tools` | `string[]` | Agnostic capability tokens (`read`, `edit`, `shell`, `web`, `todo`, `task`). Channels translate them into native tool names or permission keys. |
|
|
51
65
|
| `nicknames` | `string[]` | Friendly display names for spawned team-member instances. Codex renders this as `nickname_candidates`; other channels ignore it until they expose an equivalent. |
|
|
52
|
-
| `channels` | object |
|
|
66
|
+
| `channels` | object | Compatibility per-channel overrides. Prefer top-level native channel blocks in new docs. |
|
|
53
67
|
| `target` | string | Output filename override (basename only, extension inferred) |
|
|
54
68
|
|
|
55
69
|
### Agent Model + Tools Axes
|
|
@@ -64,7 +78,7 @@ tools: [read, web] # read | edit | shell | web | todo | task β channel-na
|
|
|
64
78
|
nicknames: [Atlas, Delta, Echo] # friendly spawned-instance labels when supported
|
|
65
79
|
```
|
|
66
80
|
|
|
67
|
-
`modelTier`
|
|
81
|
+
Playbook maps `modelTier` to these Claude aliases by default:
|
|
68
82
|
|
|
69
83
|
| Tier | Claude |
|
|
70
84
|
|------|--------|
|
|
@@ -72,10 +86,27 @@ nicknames: [Atlas, Delta, Echo] # friendly spawned-instance labels when supporte
|
|
|
72
86
|
| `coding` | `sonnet` |
|
|
73
87
|
| `fast` | `haiku` |
|
|
74
88
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
Override model tiers for a Project without changing canonical Topics:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
playbook:
|
|
93
|
+
models:
|
|
94
|
+
claude:
|
|
95
|
+
reasoning: claude-fable-5
|
|
96
|
+
coding: opus
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Run `sumr playbook config` for the interactive editor, or configure the same
|
|
100
|
+
values non-interactively:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
sumr playbook config --model claude.reasoning=claude-fable-5,claude.coding=opus
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Model IDs remain AI Channel-native strings. Playbook supplies no default model
|
|
107
|
+
mapping for other AI Channels, so configure the tiers that their generated
|
|
108
|
+
profiles require. Codex still derives `model_reasoning_effort` from `effort`
|
|
109
|
+
(or `modelTier`) and `sandbox_mode` from `access`.
|
|
79
110
|
|
|
80
111
|
`tools` is transformed per channel, not copied as Claude names:
|
|
81
112
|
|
|
@@ -87,8 +118,10 @@ or a native block. Codex still derives `model_reasoning_effort` from `effort` (o
|
|
|
87
118
|
| OpenCode | `permission:` object with keys such as `read`, `grep`, `edit`, `bash`, `webfetch` |
|
|
88
119
|
| Codex | no tool allowlist; `access` maps to `sandbox_mode` |
|
|
89
120
|
|
|
90
|
-
Resolution precedence
|
|
91
|
-
β the `SUMR_MODEL_*`
|
|
121
|
+
Resolution precedence, highest first: a native AI Channel block in the Topic
|
|
122
|
+
(for example, `codex.model`) β the `SUMR_MODEL_*` environment override β
|
|
123
|
+
`playbook.models.<channel>.<tier>` in Project configuration β the AI Channel
|
|
124
|
+
adapter default, when one exists.
|
|
92
125
|
|
|
93
126
|
## Native Channel Props
|
|
94
127
|
|
|
@@ -116,10 +149,6 @@ claude:
|
|
|
116
149
|
mode: subagent
|
|
117
150
|
skills: [typescript, security]
|
|
118
151
|
|
|
119
|
-
# Cursor project rule options
|
|
120
|
-
cursor:
|
|
121
|
-
globs: [src/**/*.ts, tests/**/*.ts]
|
|
122
|
-
|
|
123
152
|
# GitHub Copilot custom agent options
|
|
124
153
|
copilot:
|
|
125
154
|
tools: read
|
|
@@ -135,7 +164,7 @@ opencode:
|
|
|
135
164
|
---
|
|
136
165
|
```
|
|
137
166
|
|
|
138
|
-
`channels:` remains supported as a
|
|
167
|
+
`channels:` remains supported as a compatibility alias. If both shapes set the same channel property, the top-level channel block wins.
|
|
139
168
|
|
|
140
169
|
Claude `skills` entries are references to authored Playbook topic names. Use the
|
|
141
170
|
complete `name` value from each skill topicβnever a shortened alias and never a
|
|
@@ -184,10 +213,11 @@ Use these as naming and writing guidance, not as a required `roleType` field:
|
|
|
184
213
|
|
|
185
214
|
## Reference File Fields
|
|
186
215
|
|
|
187
|
-
All
|
|
216
|
+
All seven fields are mandatory for `category: reference` files:
|
|
188
217
|
|
|
189
218
|
| Field | Purpose | Example |
|
|
190
219
|
|-------|---------|---------|
|
|
220
|
+
| `category` | Reference topic kind | `reference` |
|
|
191
221
|
| `name` | Unique identifier | `typescript-imports` |
|
|
192
222
|
| `description` | What it covers | `"Biome import ordering, type imports, #region rules."` |
|
|
193
223
|
| `title` | Display name | `Import Organization` |
|
|
@@ -219,9 +249,9 @@ Use action phrases (present-participle -ing verbs) describing what the reader is
|
|
|
219
249
|
|
|
220
250
|
## Workflow File Fields
|
|
221
251
|
|
|
222
|
-
For `category: workflow` files, no extra frontmatter is required. Use `target`
|
|
223
|
-
|
|
224
|
-
|
|
252
|
+
For `category: workflow` files, no extra frontmatter is required. Use `target`
|
|
253
|
+
to control the JavaScript output file name when needed. The Document must also
|
|
254
|
+
contain a fenced JavaScript orchestration that exports `meta`.
|
|
225
255
|
|
|
226
256
|
```yaml
|
|
227
257
|
---
|
|
@@ -229,26 +259,36 @@ category: workflow
|
|
|
229
259
|
name: ui-review
|
|
230
260
|
title: UI Review
|
|
231
261
|
description: "Runs browser UI review and reports pass/fail evidence."
|
|
232
|
-
target: ui-review.
|
|
233
|
-
|
|
234
|
-
# Claude Code slash command options
|
|
235
|
-
claude:
|
|
236
|
-
model: opus
|
|
237
|
-
argument-hint: "[headed] [filename-filter]"
|
|
262
|
+
target: ui-review.js
|
|
238
263
|
---
|
|
239
264
|
```
|
|
240
265
|
|
|
266
|
+
```js
|
|
267
|
+
export const meta = {
|
|
268
|
+
name: 'ui-review',
|
|
269
|
+
description: 'Runs browser UI review and reports pass/fail evidence.',
|
|
270
|
+
phases: [{ title: 'Review' }],
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
phase('Review');
|
|
274
|
+
return agent('Review the UI and report evidence.');
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
User-invoked prompts use `category: command` in a `.cmd.md` Document; they are
|
|
278
|
+
not workflows.
|
|
279
|
+
|
|
241
280
|
## Lifecycle File Fields
|
|
242
281
|
|
|
243
282
|
Create a lifecycle doc when the user asks for hooks, AI session automation, startup context, stop/closeout quality checks, pre-tool policy checks, post-tool formatters, or automated guardrails in Claude/Codex/Cursor/Copilot/Gemini/OpenCode.
|
|
244
283
|
|
|
245
284
|
Canonical source belongs in `{{PLAYBOOK_PATH}}/lifecycle/<name>.lc.md` for repo-wide behavior. Use tool-native hook files only as generated output.
|
|
246
285
|
|
|
247
|
-
For `category: lifecycle` files,
|
|
286
|
+
For `category: lifecycle` files, two additional fields are required:
|
|
248
287
|
|
|
249
288
|
| Field | Purpose | Example values |
|
|
250
289
|
|-------|---------|---------------|
|
|
251
290
|
| `event` | Lifecycle event that triggers this automation | `SessionStart`, `PreToolUse`, `PostToolUse`, `Stop` |
|
|
291
|
+
| `target` | Filesystem-safe output basename, including the script extension | `code_quality_closeout.py`, `session_start.sh` |
|
|
252
292
|
|
|
253
293
|
Optional fields for lifecycle automations:
|
|
254
294
|
|
|
@@ -271,7 +311,7 @@ target: code_quality_closeout.py
|
|
|
271
311
|
---
|
|
272
312
|
```
|
|
273
313
|
|
|
274
|
-
The body must contain a code-fenced script block (Python, Bash, or JS). The fence language determines the interpreter. Existing `category: hook` and `.hk.md` files still work as
|
|
314
|
+
The body must contain a code-fenced script block (Python, Bash, or JS). The fence language determines the interpreter. Existing `category: hook` and `.hk.md` files still work as compatibility aliases.
|
|
275
315
|
|
|
276
316
|
After authoring a lifecycle doc, run `sumr playbook validate --source docs`, then `sumr playbook sync --source docs --dry-run --json`, then normal sync once the preview shows only expected generated hook outputs.
|
|
277
317
|
|
|
@@ -287,7 +327,7 @@ tags: [typescript, biome, conventions]
|
|
|
287
327
|
|
|
288
328
|
When reviewing a `category: reference` file, verify all of the following:
|
|
289
329
|
|
|
290
|
-
1. All
|
|
330
|
+
1. All seven required fields present: `category`, `name`, `description`, `title`, `label`, `when`, `order`
|
|
291
331
|
2. No `## When to Use` section in the body β the `when` frontmatter field replaces it
|
|
292
332
|
3. No `references:` field in frontmatter
|
|
293
333
|
4. `when` field uses action phrases, not bare keywords
|
|
@@ -22,7 +22,7 @@ User asks for hook/automation
|
|
|
22
22
|
|
|
23
23
|
- Say **lifecycle automation** in canonical Playbook docs.
|
|
24
24
|
- Treat **hook** as the generated AI Channel mechanism.
|
|
25
|
-
- `category: hook` and `.hk.md` are
|
|
25
|
+
- `category: hook` and `.hk.md` are compatibility aliases; use `category: lifecycle`
|
|
26
26
|
and `.lc.md` for new docs.
|
|
27
27
|
|
|
28
28
|
## Placement
|
|
@@ -108,7 +108,8 @@ A checklist is more reliable than the same steps buried in a paragraph.
|
|
|
108
108
|
## Links
|
|
109
109
|
|
|
110
110
|
- Descriptive link text β never `"click here"` or `"here"`
|
|
111
|
-
-
|
|
111
|
+
- Use contained source-relative Markdown links when navigation must remain functional in generated AI Channel outputs. Playbook rewrites links to generated Topics, attached reference Documents, extracted sections, and headings; dangling or unmapped links fail validation.
|
|
112
|
+
- When navigation is unnecessary, reference a main Topic by **name** or a reference Document by **label** in bold. See **Cross-Refs**.
|
|
112
113
|
|
|
113
114
|
## Anti-Pattern Quick Reference
|
|
114
115
|
|