@punks/cli 3.1.10 → 3.1.12
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/dist/BASELINE_CHANGELOG.md +61 -0
- package/dist/CHANGELOG.md +57 -0
- package/dist/data/subagents/manifest.mjs +11 -6
- package/dist/index.js +28 -28
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +5 -0
- package/dist/skills/agnostic/docs/writing-beats/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-beats/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-fragments/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-fragments/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-shape/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-shape/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/SKILL.md +24 -42
- package/dist/skills/agnostic/frontend/frontend-domain-structure/agents/openai.yaml +1 -1
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/react/structure.md +51 -78
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/structure.md +89 -212
- package/dist/skills/agnostic/generic/handoff/LICENSE +21 -0
- package/dist/skills/agnostic/generic/handoff/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +1 -1
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +19 -7
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +19 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +27 -10
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +6 -2
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +22 -6
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +12 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +10 -2
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +10 -1
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +2 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +11 -2
- package/dist/skills/agnostic/quality/codebase-design/LICENSE +21 -0
- package/dist/skills/agnostic/quality/codebase-design/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/review/LICENSE +21 -0
- package/dist/skills/agnostic/quality/review/SKILL.md +16 -11
- package/dist/skills/agnostic/quality/review/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/tdd/LICENSE +21 -0
- package/dist/skills/agnostic/quality/tdd/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/LICENSE +21 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/UPSTREAM.md +11 -0
- package/dist/skills/frameworks/effect/effect/SKILL.md +5 -12
- package/dist/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
- package/dist/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
- package/dist/skills/frameworks/effect/effect/references/TESTING.md +2 -72
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/SKILL.md +199 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/UPSTREAM.md +31 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/agents/openai.yaml +4 -0
- package/dist/skills/languages/python/python-backend-structure/SKILL.md +91 -0
- package/dist/skills/languages/python/python-backend-structure/agents/openai.yaml +4 -0
- package/dist/skills/languages/python/python-design-patterns/SKILL.md +93 -69
- package/dist/skills/languages/python/python-project-structure/SKILL.md +4 -247
- package/dist/skills/phases/delivery-phase/SKILL.md +13 -4
- package/dist/skills/phases/delivery-phase/phases/closeout.md +3 -0
- package/dist/skills/phases/delivery-phase/phases/debug.md +8 -1
- package/dist/skills/phases/delivery-phase/phases/implement.md +11 -2
- package/dist/skills/phases/delivery-phase/phases/review.md +50 -29
- package/dist/skills/phases/delivery-phase/phases/router.md +56 -36
- package/dist/skills/phases/delivery-phase/references/artifact-state.md +8 -2
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +60 -10
- package/dist/skills/phases/finder-phase/references/root-routing.md +6 -1
- package/dist/skills/phases/prototype-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +622 -0
- package/dist/skills/phases/review-phase/SKILL.md +11 -42
- package/dist/skills/phases/review-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/phases/prepare-review.md +105 -0
- package/dist/skills/phases/review-phase/phases/retain-report.md +113 -0
- package/dist/skills/phases/review-phase/phases/return-route.md +95 -0
- package/dist/skills/phases/review-phase/phases/router.md +78 -0
- package/dist/skills/phases/review-phase/phases/run-review.md +128 -0
- package/dist/skills/phases/review-phase/references/durable-report.md +153 -0
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +138 -0
- package/dist/skills/phases/review-phase/references/state-graph.md +69 -0
- package/dist/skills/phases/review-phase/references/targets.md +156 -0
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +819 -0
- package/package.json +56 -2
- package/dist/skills/phases/review-phase/REFERENCE.md +0 -147
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Goal
|
|
4
4
|
|
|
5
|
-
Organize frontend code
|
|
5
|
+
Organize frontend code around stable responsibility owners. Frameworks choose entrypoint names and
|
|
6
|
+
rendering mechanics; the ownership and dependency rules here stay the same.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
A common shape is:
|
|
8
9
|
|
|
9
10
|
```text
|
|
10
11
|
src/
|
|
@@ -13,245 +14,121 @@ src/
|
|
|
13
14
|
modules/
|
|
14
15
|
```
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
- **Framework composition** owns routes, screens, layouts, navigation shells, loading and error
|
|
18
|
+
boundaries, metadata, and application assembly.
|
|
19
|
+
- **Features** own coherent user-facing capabilities and workflows.
|
|
20
|
+
- **Modules** own reusable app-local capabilities, integrations, foundations, and app-wide wiring.
|
|
21
|
+
- **Shared libraries** own domains or primitives whose reuse boundary genuinely spans applications or
|
|
22
|
+
surfaces.
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- `features/*`
|
|
21
|
-
Domain containers for user-visible product logic and page- or screen-facing slices.
|
|
22
|
-
- `modules/*`
|
|
23
|
-
Domain containers for reusable app-local support building blocks, integrations, and root-level dependencies reused by multiple features.
|
|
24
|
-
- shared libraries
|
|
25
|
-
Cross-app or cross-surface domains, primitives, tokens, utilities, and presentation helpers.
|
|
24
|
+
These labels may differ between projects. Preserve the responsibilities rather than imposing the
|
|
25
|
+
example names.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Invariant Owner Classifier
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Start with the **invariant owner**: the smallest stable domain responsible for the behavior, its rules,
|
|
30
|
+
and the changes that must remain coherent. A route name, visual region, file type, or reuse count alone
|
|
31
|
+
does not establish ownership.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
Classify in this order:
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
1. Framework-mandated lifecycle or composition belongs to the framework composition layer.
|
|
36
|
+
2. A user-facing capability with its own workflow, policy, state transitions, or language belongs to a
|
|
37
|
+
feature domain.
|
|
38
|
+
3. An app-local capability serving several features, without owning a user-facing workflow, belongs to
|
|
39
|
+
a module domain.
|
|
40
|
+
4. A capability or primitive with real consumers across application or surface boundaries belongs to a
|
|
41
|
+
shared library or package.
|
|
42
|
+
5. A detail with no independent invariant stays with its current owner.
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
Prefer the deepest honest owner. Move code upward only when the broader owner truly governs it.
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
## Domain-Worthiness Classifier
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
Before creating a feature, module, package, or nested domain, **scan the siblings**. Look for the same
|
|
49
|
+
invariant owner, product language, workflow, change cadence, and consumers. Extend or rename an existing
|
|
50
|
+
owner when it already covers the responsibility.
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
A new domain is worthy when it gives a coherent responsibility a stable name and at least one real
|
|
53
|
+
boundary, such as independent policy, lifecycle, state, workflow, consumer contract, or reuse scope.
|
|
54
|
+
Several tightly related files may form one worthy domain; one substantial public boundary may also be
|
|
55
|
+
enough. File count is not the classifier.
|
|
42
56
|
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
- resistance to feature leakage across the app
|
|
57
|
+
Keep implementation with its current owner when the proposed split is only navigational. In particular,
|
|
58
|
+
reject a cosmetic micro-feature or micro-module named after a panel, button, page fragment, file type, or
|
|
59
|
+
temporary layout. Keep a one-file folder folded into its owner until that folder expresses a deliberate
|
|
60
|
+
public or semantic boundary. This prevents directory depth from masquerading as architecture.
|
|
48
61
|
|
|
49
|
-
##
|
|
62
|
+
## Layer Responsibilities
|
|
50
63
|
|
|
51
|
-
|
|
64
|
+
### Framework Composition
|
|
52
65
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Put it in a feature domain under `features/*`.
|
|
57
|
-
3. Is this reusable inside the app but not itself a page- or screen-facing product slice?
|
|
58
|
-
Put it in a module domain under `modules/*`.
|
|
59
|
-
4. Is this generic enough to reuse across apps, packages, or surfaces?
|
|
60
|
-
Put it in a shared library or shared package.
|
|
66
|
+
Keep entrypoints thin: translate framework lifecycle into domain calls, assemble higher-level pieces,
|
|
67
|
+
and map domain results to framework output. Product policy, long workflows, reusable product sections,
|
|
68
|
+
and scattered client setup belong to their invariant owners.
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
### Features
|
|
63
71
|
|
|
64
|
-
|
|
72
|
+
A feature owns a coherent user-visible capability: its workflow, policy, state, data interaction,
|
|
73
|
+
presentation, and feature-local helpers. Examples include authentication, checkout, account settings,
|
|
74
|
+
or a dashboard capability when each name identifies real product behavior.
|
|
65
75
|
|
|
66
|
-
###
|
|
76
|
+
### Modules
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- route files
|
|
73
|
-
- screen entrypoint files
|
|
74
|
-
- layouts and navigation shells
|
|
75
|
-
- loading, error, empty, and not-found boundaries
|
|
76
|
-
- route or screen metadata
|
|
77
|
-
- tiny composition wrappers
|
|
78
|
-
|
|
79
|
-
Bad fits:
|
|
80
|
-
|
|
81
|
-
- domain logic
|
|
82
|
-
- long form flows
|
|
83
|
-
- reusable product sections
|
|
84
|
-
- app client setup scattered across many entrypoints
|
|
85
|
-
- business state orchestration
|
|
86
|
-
|
|
87
|
-
The entrypoint should mostly assemble higher-level pieces.
|
|
88
|
-
|
|
89
|
-
### `features/*`
|
|
90
|
-
|
|
91
|
-
Use features for meaningful user-facing domains.
|
|
92
|
-
|
|
93
|
-
Good fits:
|
|
94
|
-
|
|
95
|
-
- authentication screens and flows
|
|
96
|
-
- dashboard sections
|
|
97
|
-
- account settings areas
|
|
98
|
-
- navigation experiences
|
|
99
|
-
- user-facing forms and workflows
|
|
100
|
-
- domain-specific business state and orchestration
|
|
101
|
-
|
|
102
|
-
A feature domain may contain local UI, state, data access, config, helpers, and sub-sections.
|
|
103
|
-
|
|
104
|
-
Do not create a feature for every tiny component. A feature should represent a coherent user-facing capability.
|
|
105
|
-
|
|
106
|
-
### `modules/*`
|
|
107
|
-
|
|
108
|
-
Use modules for reusable app-local support domains.
|
|
109
|
-
|
|
110
|
-
Good fits:
|
|
111
|
-
|
|
112
|
-
- auth client setup
|
|
113
|
-
- API client wiring
|
|
114
|
-
- providers
|
|
115
|
-
- routes or navigation configuration
|
|
116
|
-
- metadata helpers
|
|
117
|
-
- form foundations reused across several features
|
|
118
|
-
- domain service adapters used by many features
|
|
119
|
-
- UI library domains
|
|
120
|
-
- framework integration layers
|
|
121
|
-
- root-level dependencies shared by several features
|
|
122
|
-
|
|
123
|
-
Modules are reusable inside the app, but they are not page-facing product slices.
|
|
124
|
-
|
|
125
|
-
A `modules/ui` domain is valid when it is effectively the app's local UI library: primitives, brand-styled abstractions, UI behavior, and UI-specific logic reused across many features.
|
|
78
|
+
A module owns an app-local capability reused by multiple features: client setup, application providers,
|
|
79
|
+
navigation configuration, form foundations, service adapters, metadata mechanics, or an app-local UI
|
|
80
|
+
system. Modules support product flows without owning those flows.
|
|
126
81
|
|
|
127
82
|
### Shared Libraries
|
|
128
83
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
- shared domain abstractions
|
|
134
|
-
- UI primitives
|
|
135
|
-
- design tokens
|
|
136
|
-
- framework-neutral helpers
|
|
137
|
-
- icons
|
|
138
|
-
- styling foundations
|
|
139
|
-
- generic presentation helpers
|
|
140
|
-
|
|
141
|
-
Bad fits:
|
|
142
|
-
|
|
143
|
-
- page sections
|
|
144
|
-
- product workflows
|
|
145
|
-
- app-specific domain widgets
|
|
146
|
-
- route- or screen-specific logic
|
|
147
|
-
|
|
148
|
-
If the code is only reusable within one app, keep it inside that app, usually in `modules/*`.
|
|
149
|
-
|
|
150
|
-
In a monorepo, shared packages should still be domain-based internally.
|
|
151
|
-
|
|
152
|
-
Good package patterns:
|
|
153
|
-
|
|
154
|
-
- a package that is itself one coherent shared domain
|
|
155
|
-
- a package with a small number of clearly separated internal domains
|
|
156
|
-
|
|
157
|
-
Examples:
|
|
158
|
-
|
|
159
|
-
- `<shared-ui-root>/src/primitives/*`
|
|
160
|
-
- `<shared-ui-root>/src/brand/*`
|
|
161
|
-
- `<auth-package-root>/src/client/*`
|
|
162
|
-
- `<auth-package-root>/src/server/*`
|
|
163
|
-
- `<forms-package-root>/src/fields/*`
|
|
164
|
-
|
|
165
|
-
Bad package patterns:
|
|
166
|
-
|
|
167
|
-
- a giant `<shared-ui-root>/src/components` folder holding unrelated concerns
|
|
168
|
-
- `<shared-foundation-root>/src/utils` growing without domain ownership
|
|
169
|
-
- a single package collecting every reusable concern just because it is shared
|
|
170
|
-
|
|
171
|
-
If a package contains several unrelated concerns, split the package or introduce internal domain folders.
|
|
172
|
-
|
|
173
|
-
## Import Boundaries
|
|
174
|
-
|
|
175
|
-
Keep dependencies flowing downward.
|
|
176
|
-
|
|
177
|
-
- framework composition layer may import:
|
|
178
|
-
- `features/*`
|
|
179
|
-
- `modules/*`
|
|
180
|
-
- bootstrapping helpers
|
|
181
|
-
- `features/*` may import:
|
|
182
|
-
- sibling files in the same feature
|
|
183
|
-
- `modules/*`
|
|
184
|
-
- shared libraries
|
|
185
|
-
- `modules/*` may import:
|
|
186
|
-
- sibling files in the same module
|
|
187
|
-
- shared libraries
|
|
188
|
-
- external libraries
|
|
189
|
-
- shared packages may import:
|
|
190
|
-
- sibling files inside the same package domain
|
|
191
|
-
- lower-level shared utilities inside that package
|
|
192
|
-
- external libraries
|
|
193
|
-
|
|
194
|
-
Avoid these inversions:
|
|
195
|
-
|
|
196
|
-
- `modules/*` importing `features/*`
|
|
197
|
-
- shared libraries importing app-local code
|
|
198
|
-
- one shared package domain importing unrelated package domains without a clear boundary
|
|
199
|
-
- framework entrypoints importing many low-level helpers instead of a feature-level entrypoint
|
|
200
|
-
|
|
201
|
-
## Refactoring Guide
|
|
202
|
-
|
|
203
|
-
When migrating from flat buckets like `components`, `hooks`, `lib`, and `utils`:
|
|
204
|
-
|
|
205
|
-
- move framework-facing composition into the framework composition layer
|
|
206
|
-
- group page- or screen-facing workflows under domain folders in `features/*`
|
|
207
|
-
- group reusable app-local support code under domain folders in `modules/*`
|
|
208
|
-
- move only truly shared code into shared libraries or shared packages
|
|
209
|
-
|
|
210
|
-
Name folders by domain or responsibility, not by file type.
|
|
84
|
+
A shared library owns code reused across application or surface boundaries: domain abstractions, design
|
|
85
|
+
tokens, primitives, framework-neutral helpers, or a coherent presentation system. Keep app-specific
|
|
86
|
+
widgets and workflows with the app that owns them. Inside a shared package, apply the same
|
|
87
|
+
domain-worthiness test; shared code is still organized by responsibility.
|
|
211
88
|
|
|
212
|
-
|
|
89
|
+
## Recursive Semantic Internals
|
|
213
90
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- `modules/providers`
|
|
219
|
-
- `modules/api`
|
|
220
|
-
- `modules/ui`
|
|
91
|
+
The ownership rule is recursive at every directory and package depth. Within a feature, module, or
|
|
92
|
+
shared package, group semantic subdomains before adding technical folders. Introduce local folders such
|
|
93
|
+
as `state/`, `api/`, `models/`, or `presentation/` only when several related internals benefit from that
|
|
94
|
+
secondary grouping.
|
|
221
95
|
|
|
222
|
-
|
|
96
|
+
For example, a billing feature may contain semantic `invoices/` and `payment-methods/` subdomains. Each
|
|
97
|
+
subdomain follows the same invariant-owner, sibling-scan, public-boundary, and acyclic-dependency rules.
|
|
98
|
+
A flat technical bucket remains a poor substitute for semantic ownership even when nested.
|
|
223
99
|
|
|
224
|
-
|
|
225
|
-
- `<shared-ui-root>/src/brand`
|
|
226
|
-
- `<auth-package-root>/src/client`
|
|
227
|
-
- `<auth-package-root>/src/server`
|
|
228
|
-
- `<table-package-root>/src/hooks`
|
|
100
|
+
## Public Entrypoints and Dependencies
|
|
229
101
|
|
|
230
|
-
|
|
102
|
+
Give every cross-domain dependency a **deliberate public entrypoint**. Export only the contracts,
|
|
103
|
+
views, operations, and types the domain intentionally offers. Imports within a domain may reach its
|
|
104
|
+
private internals; consumers use its public entrypoint.
|
|
231
105
|
|
|
232
|
-
-
|
|
233
|
-
- `features/auth/state`
|
|
234
|
-
- `features/auth/api`
|
|
235
|
-
- `modules/auth/config`
|
|
236
|
-
- `modules/api/lib`
|
|
237
|
-
- `<auth-package-root>/src/client`
|
|
238
|
-
- `<shared-ui-root>/src/brand/components`
|
|
106
|
+
Keep the graph one-way and acyclic:
|
|
239
107
|
|
|
240
|
-
|
|
108
|
+
- framework composition imports feature and module entrypoints;
|
|
109
|
+
- features import modules and shared-library entrypoints;
|
|
110
|
+
- modules import shared-library entrypoints and external libraries;
|
|
111
|
+
- shared libraries remain independent of app-local code;
|
|
112
|
+
- cross-domain deep imports and cycles are rejected;
|
|
113
|
+
- lazy loading, re-export chains, and path aliases preserve these boundaries rather than conceal cycles.
|
|
241
114
|
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
|
|
115
|
+
Peer-feature imports are highly discouraged. Permit one only when the dependency is justified as a real
|
|
116
|
+
one-way, acyclic relationship and it passes through the imported feature's public entrypoint. When both
|
|
117
|
+
features own part of the contract, move the common invariant to the nearest honest module or shared
|
|
118
|
+
domain. A reverse import or deep import invalidates the exception.
|
|
246
119
|
|
|
247
|
-
|
|
120
|
+
## Migration and Review
|
|
248
121
|
|
|
249
|
-
|
|
122
|
+
When migrating flat `views`, `state`, `lib`, or `utils` buckets:
|
|
250
123
|
|
|
251
|
-
|
|
124
|
+
1. Inventory behavior and identify each invariant owner.
|
|
125
|
+
2. Scan existing sibling domains before proposing new ones.
|
|
126
|
+
3. Move framework composition, feature behavior, app-local capabilities, and application- or
|
|
127
|
+
surface-spanning code to their honest owners.
|
|
128
|
+
4. Create public entrypoints and update consumers before making internals private.
|
|
129
|
+
5. Repeat the classifier recursively inside each changed domain.
|
|
130
|
+
6. Validate changed behavior and dependency direction with the narrowest checks the project already
|
|
131
|
+
supports.
|
|
252
132
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
- Is reusable app-local logic living in a module instead of scattered buckets?
|
|
256
|
-
- Is truly shared code kept out of app-local layers?
|
|
257
|
-
- Are shared packages internally domain-based instead of flat dumping grounds?
|
|
133
|
+
The review is complete when every changed responsibility has one honest owner, every new domain passes
|
|
134
|
+
the worthiness classifier, and every affected cross-domain edge is public, one-way, and acyclic.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matt Pocock
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Upstream provenance
|
|
2
|
+
|
|
3
|
+
Adapted from [`mattpocock/skills`](https://github.com/mattpocock/skills/tree/221ffca96736afefdc08ca7cf0b3965e9ea83f41/skills/productivity/handoff) at commit:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
221ffca96736afefdc08ca7cf0b3965e9ea83f41
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The adjacent `LICENSE` is the upstream MIT license retained with this skill.
|
|
10
|
+
|
|
11
|
+
Devpunks keeps the compact redacted continuation handoff and adapts the surrounding repository conventions.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- MUST use `$tdd`
|
|
10
10
|
- MUST use `$codebase-design`
|
|
11
11
|
- `opensrc` provides source context for installed or external packages
|
|
12
|
-
- scoped `AGENTS.md` files provide per-path skill requirements through `
|
|
12
|
+
- scoped `AGENTS.md` files provide per-path skill requirements through `Skill | What / when` tables; select exact trigger matches and open each selected skill's complete `SKILL.md`
|
|
13
13
|
|
|
14
14
|
## Graph map
|
|
15
15
|
|
|
@@ -34,16 +34,25 @@ Create a plan first. Never implement code in this skill.
|
|
|
34
34
|
4. Update a running decision ledger after every response set, processing each answer individually so the user never has to reconstruct state from memory.
|
|
35
35
|
5. After a whole response set is processed, emit any synthesis checkpoint required by `references/grill-ambiguity.md`.
|
|
36
36
|
6. After `$grilling` completes, continue to plan synthesis; backlog eligibility
|
|
37
|
-
remains step
|
|
37
|
+
remains step 13.
|
|
38
38
|
7. If readonly discovery has independent code paths, specs, backlog items, external docs, or hypotheses, read and use `$parallel-research` before final task synthesis.
|
|
39
39
|
8. Research with `opensrc path <package>` or `opensrc path <owner>/<repo>` plus primary-source web docs when current behavior matters.
|
|
40
|
-
9. Locate scoped `AGENTS.md` files for every planned task path
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
9. Locate scoped `AGENTS.md` files for every planned task path. Read each
|
|
41
|
+
applicable `Skill | What / when` table, select rows whose exact `What / when`
|
|
42
|
+
triggers match the task, and open each selected skill's complete `SKILL.md`
|
|
43
|
+
before finalizing task design.
|
|
44
|
+
10. For every implementation task, convert applicable scoped or named skill
|
|
45
|
+
obligations into `implementation_skill_guidance`; preserve `assigned_skills`
|
|
46
|
+
as planning provenance.
|
|
47
|
+
11. Read `references/planner-task-graph.md` and run `$swarm-planner` to produce the swarm graph and `Tn` task contract.
|
|
48
|
+
12. Read `references/tdd-shaping.md` and run `$tdd` to attach RED/GREEN targets to each `Tn` task.
|
|
49
|
+
13. Read `references/backlog-sync.md`. Sync backlog at epic/story level only when
|
|
44
50
|
backlog sync is eligible and in scope; otherwise record an explicit skip
|
|
45
51
|
reason and continue plan completion.
|
|
46
|
-
|
|
52
|
+
14. Before writing `PLAN.md`, invoke `$wait-what` on the complete plan. Proceed
|
|
53
|
+
only when its language contract passes without changing the resolved
|
|
54
|
+
decision ledger.
|
|
55
|
+
15. Read `references/stop-conditions.md` and stop exactly there.
|
|
47
56
|
|
|
48
57
|
## Workflows
|
|
49
58
|
|
|
@@ -56,13 +65,16 @@ Create a plan first. Never implement code in this skill.
|
|
|
56
65
|
5. Scan relevant routed learning artifacts before task synthesis when prior bug knowledge, domain behavior, or project conventions could affect the plan.
|
|
57
66
|
6. Resolve each task's scoped guidance from root `AGENTS.md` down to the nearest `AGENTS.md` for its `location`.
|
|
58
67
|
7. Use each task's required skill guidance while shaping its scope, dependencies, validation, RED target, and review mode; do not merely list skills after the plan is written.
|
|
59
|
-
8. Assign each task the
|
|
68
|
+
8. Assign each task the deduplicated union of skills whose exact `What / when`
|
|
69
|
+
triggers match in every touched scope, merging all touched scopes for
|
|
70
|
+
cross-directory tasks.
|
|
60
71
|
9. Build plan-derived worker waves: place every currently unblocked task with
|
|
61
72
|
a disjoint write scope in the same wave. Use a one-task wave only when
|
|
62
73
|
dependencies or ownership leave one task unblocked.
|
|
63
74
|
10. Normalize every task with stable ids, `depends_on`, `location`,
|
|
64
75
|
`owned_paths`, `wave_boundary`, `description`, `validation`, `status`, `log`,
|
|
65
76
|
`files edited/created`, owning-story backlog references, `assigned_skills`,
|
|
77
|
+
`implementation_skill_guidance`,
|
|
66
78
|
`tdd_status`, `tdd_target`, RED/GREEN commands, evidence fields,
|
|
67
79
|
`codebase_design_notes`, `review_mode`, `runtime_validation`,
|
|
68
80
|
`runtime_target`, `runtime_evidence`, and `runtime_cleanup`.
|
|
@@ -46,6 +46,7 @@ Every task must include:
|
|
|
46
46
|
- `backlog_item_url`
|
|
47
47
|
- `relation_mode`
|
|
48
48
|
- `assigned_skills`
|
|
49
|
+
- `implementation_skill_guidance`
|
|
49
50
|
- `tdd_status`
|
|
50
51
|
- `tdd_target`
|
|
51
52
|
- `red_command`
|
|
@@ -75,6 +76,19 @@ Do not create a new backlog item only because a task boundary exists in the plan
|
|
|
75
76
|
|
|
76
77
|
`assigned_skills` must list the skills used to shape the task during planning, not only skills expected during implementation. Skill guidance should be reflected in the task's boundary, validation, `tdd_target`, `codebase_design_notes`, and `review_mode`.
|
|
77
78
|
|
|
79
|
+
`implementation_skill_guidance` is the executor contract for the task. Assess
|
|
80
|
+
every `assigned_skills` item for implementation applicability. Every
|
|
81
|
+
implementation-applicable `assigned_skills` item maps to exactly one guidance
|
|
82
|
+
entry; omit planning-only items. Each entry carries the exact skill identity and
|
|
83
|
+
concise applicable behavior:
|
|
84
|
+
|
|
85
|
+
- `skill`: exact skill identity
|
|
86
|
+
- `applicable_behavior`: concise behavior the executor must follow while
|
|
87
|
+
implementing this task
|
|
88
|
+
|
|
89
|
+
Deduplicate by skill within one task. Do not replace `assigned_skills`; it
|
|
90
|
+
remains planning provenance.
|
|
91
|
+
|
|
78
92
|
For behavior-changing code tasks, `tdd_status` must be `required` and the task must include concrete RED/GREEN commands before implementation starts. For docs-only, formatting-only, generated-code-only, config-only, scaffold/bookkeeping-only, or truly non-testable tasks, record `tdd_status: not_applicable` or `not_testable` with an explicit `reason_not_testable`.
|
|
79
93
|
|
|
80
94
|
`red_evidence` and `green_evidence` are execution fields. They should be present but blank when the plan is created, then filled by `implement-spec` before the task is marked complete.
|
|
@@ -109,6 +123,11 @@ Use `not_applicable` for the other runtime fields when `runtime_validation: not_
|
|
|
109
123
|
- **backlog_item_url**: https://linear.app/workspace/issue/CP-128/example-story
|
|
110
124
|
- **relation_mode**: native | body-links
|
|
111
125
|
- **assigned_skills**: [`effect`, `tdd`]
|
|
126
|
+
- **implementation_skill_guidance**:
|
|
127
|
+
- **skill**: `effect`
|
|
128
|
+
**applicable_behavior**: Model the boundary with typed effects and preserve typed failure channels.
|
|
129
|
+
- **skill**: `tdd`
|
|
130
|
+
**applicable_behavior**: Capture the named public-result RED before implementation and preserve its GREEN evidence.
|
|
112
131
|
- **tdd_status**: required
|
|
113
132
|
- **tdd_target**: First failing public behavior to implement.
|
|
114
133
|
- **red_command**: Exact command expected to fail before implementation.
|
|
@@ -16,14 +16,27 @@ Before finalizing task boundaries:
|
|
|
16
16
|
|
|
17
17
|
1. List every concrete `location` each task may touch.
|
|
18
18
|
2. For each location, inspect the `AGENTS.md` chain from repo root to the nearest scoped file.
|
|
19
|
-
3.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`assigned_skills
|
|
19
|
+
3. Read every applicable `Skill | What / when` table and select only rows whose
|
|
20
|
+
exact `What / when` trigger matches the task.
|
|
21
|
+
4. Verify each selected skill exists in `.agents/skills/` or an installed skill
|
|
22
|
+
source visible to the agent.
|
|
23
|
+
5. Open each selected skill's complete `SKILL.md` before finalizing the task's
|
|
24
|
+
boundary, validation, RED target, and review mode.
|
|
25
|
+
6. Add the merged, deduplicated union from every touched scope to the task as
|
|
26
|
+
`assigned_skills`.
|
|
27
|
+
7. For every implementation-applicable item, add exactly one
|
|
28
|
+
`implementation_skill_guidance` entry with the exact skill identity and its
|
|
29
|
+
concise applicable behavior. Planning-only items remain provenance without a
|
|
30
|
+
guidance entry.
|
|
31
|
+
|
|
32
|
+
If a task spans multiple scopes, include all selected skills from all touched
|
|
33
|
+
scopes. If a matching row names a missing skill, keep the task planned but
|
|
34
|
+
record the missing skill in risks and unresolved questions.
|
|
35
|
+
|
|
36
|
+
`assigned_skills` remains planning provenance;
|
|
37
|
+
`implementation_skill_guidance` is the executor handoff. Do not design the task
|
|
38
|
+
first and attach skills afterward. Use guidance to decide the task slice,
|
|
39
|
+
dependency, validation, and test target.
|
|
27
40
|
|
|
28
41
|
## Planner behavior
|
|
29
42
|
|
|
@@ -37,10 +50,14 @@ Preserve `$swarm-planner` behavior:
|
|
|
37
50
|
- validations per task
|
|
38
51
|
- parallel execution waves
|
|
39
52
|
- risks and mitigations
|
|
40
|
-
- explicit `assigned_skills` per task from scoped `
|
|
53
|
+
- explicit `assigned_skills` per task from exact scoped `What / when` trigger
|
|
54
|
+
matches, with task design shaped by those skills
|
|
55
|
+
- complete one-to-one `implementation_skill_guidance` for every
|
|
56
|
+
implementation-applicable assigned skill
|
|
41
57
|
- a final `plan-reviewer` subagent review for missing deps, missing
|
|
42
58
|
`owned_paths`, missing `wave_boundary`, ordering issues, edge cases, invalid
|
|
43
59
|
parallelism, unsafe write overlap, missing RED targets, missing validation,
|
|
44
|
-
missing `assigned_skills`,
|
|
60
|
+
missing `assigned_skills`, missing or duplicate implementation guidance, and
|
|
61
|
+
holes before yielding
|
|
45
62
|
|
|
46
63
|
Do not stop between ambiguity reduction and swarm graph construction unless a true blocking ambiguity remains.
|
|
@@ -34,8 +34,12 @@ implementation tasks.
|
|
|
34
34
|
1. Resolve the target spec folder by checking, in order: `apps/wiki/content/docs/project/specs/<domain>/<spec>/`, legacy `apps/wiki/specs/<domain>/<spec>/`, then `docs/specs/<domain>/<spec>/`.
|
|
35
35
|
2. Read `references/lifecycle.md` and follow the shared execution contract exactly.
|
|
36
36
|
3. Read `references/parallel.md`, parse the plan graph, and build the first unblocked wave.
|
|
37
|
-
4. Launch scoped workers for the current wave using
|
|
38
|
-
|
|
37
|
+
4. Launch scoped workers for the current wave using
|
|
38
|
+
`references/parallel-worker-brief.md`. Forward every guidance item unchanged,
|
|
39
|
+
preserving its `implementation_skill_guidance` skill and behavior fields.
|
|
40
|
+
5. After each validated wave, update `PLAN.md`, `IMPLEMENTATION-NOTES.md`, and
|
|
41
|
+
spec-linked tech debt before advancing. Require exactly one skill-application
|
|
42
|
+
evidence record per guidance entry.
|
|
39
43
|
6. Use `$codebase-design` vocabulary while reviewing each worker change: interface, seam, adapter, depth, leverage, locality, and test surface.
|
|
40
44
|
7. Resolve implementation debt as soon as it appears. Do not leave "later" work, TODOs, temporary compromises, or vague follow-up debt.
|
|
41
45
|
8. If a debt item needs a product/scope decision outside the active goal, stop and run a very small `$requirements-phase` clarification before continuing.
|
package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Summary
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
-
|
|
6
6
|
|
|
7
7
|
## Deviations From the Plan
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
-
|
|
10
10
|
|
|
11
11
|
## Surprises and Decisions
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
-
|
|
14
14
|
|
|
15
15
|
## Sanity Checks
|
|
16
16
|
|
|
@@ -18,6 +18,22 @@
|
|
|
18
18
|
|------|--------|-------|
|
|
19
19
|
| | | |
|
|
20
20
|
|
|
21
|
+
## Skill Application Evidence
|
|
22
|
+
|
|
23
|
+
Use exactly one row per `implementation_skill_guidance` entry. Allowed status:
|
|
24
|
+
`loaded | applied | not_applicable`. A `not_applicable` row must state why and
|
|
25
|
+
where the guidance was assessed.
|
|
26
|
+
|
|
27
|
+
- `loaded`: instructions were read and assessed; the how/where pointer names the
|
|
28
|
+
resulting implementation decision.
|
|
29
|
+
- `applied`: the named behavior shaped changed artifacts; point to that evidence.
|
|
30
|
+
- `not_applicable`: actual task scope made the behavior inapplicable; record why
|
|
31
|
+
and the assessment location.
|
|
32
|
+
|
|
33
|
+
| Task | Skill | Status | How/where | Not-applicable reason and assessment location |
|
|
34
|
+
|------|-------|--------|-----------|-----------------------------------------------|
|
|
35
|
+
| | | | | |
|
|
36
|
+
|
|
21
37
|
## UI Evidence Links
|
|
22
38
|
|
|
23
39
|
| Surface | Viewport | Before | After | Notes |
|
|
@@ -50,15 +66,15 @@
|
|
|
50
66
|
|
|
51
67
|
## Pre-existing Issues
|
|
52
68
|
|
|
53
|
-
-
|
|
69
|
+
-
|
|
54
70
|
|
|
55
71
|
## Out of Scope Observations
|
|
56
72
|
|
|
57
|
-
-
|
|
73
|
+
-
|
|
58
74
|
|
|
59
75
|
## Remaining Work
|
|
60
76
|
|
|
61
|
-
-
|
|
77
|
+
-
|
|
62
78
|
|
|
63
79
|
## Steering
|
|
64
80
|
|