@punks/cli 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/BASELINE_CHANGELOG.md +21 -0
  2. package/dist/CHANGELOG.md +40 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +4 -4
  4. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +23 -3
  5. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +26 -2
  6. package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +3 -1
  7. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +20 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +4 -3
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +1 -1
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +3 -1
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/LICENSE +21 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/SKILL-MECHANICS.md +22 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/SKILL.md +81 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/UPSTREAM.md +9 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +27 -15
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/backlog-sync.md +19 -32
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +14 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +5 -1
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/stop-conditions.md +2 -1
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +51 -105
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +26 -57
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -3
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +41 -0
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +15 -6
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +3 -3
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +21 -54
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +0 -4
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +13 -15
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +7 -4
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +4 -2
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +9 -35
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/wayfinder/SKILL.md +11 -8
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -3
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +25 -73
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +54 -305
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +46 -55
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +33 -119
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +24 -14
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +53 -11
  40. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +48 -26
  41. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +53 -12
  42. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +49 -33
  43. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +20 -0
  44. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/SKILL.md +14 -2
  45. package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/LICENSE +21 -0
  46. package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/LOGIC.md +57 -21
  47. package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/SKILL.md +17 -15
  48. package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/UI.md +12 -5
  49. package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/UPSTREAM.md +11 -0
  50. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/SKILL.md +5 -12
  51. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
  52. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
  53. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/TESTING.md +2 -72
  54. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
  55. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
  56. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
  57. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/LICENSE +21 -0
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/SKILL.md +124 -0
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/references/AUDIT.md +98 -0
  60. package/dist/baseline/scaffold-baseline/skills/misc/wait-what/LICENSE +21 -0
  61. package/dist/baseline/scaffold-baseline/skills/misc/wait-what/SKILL.md +7 -0
  62. package/dist/baseline/scaffold-baseline/skills/misc/wait-what/UPSTREAM.md +9 -0
  63. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +4 -3
  64. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +31 -0
  65. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +5 -4
  66. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/plan.md +6 -4
  67. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +16 -14
  68. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/spec.md +9 -5
  69. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +9 -2
  70. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +4 -4
  71. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/prototype.md +1 -1
  72. package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/phases/private-internal.md +3 -1
  73. package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/references/learning-artifacts.md +8 -1
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +24 -24
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/agents/openai.yaml +1 -1
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/convergence.md +39 -0
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/frontier-lifecycle.md +22 -16
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +3 -2
  79. package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/SKILL.md +34 -0
  80. package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/VERDICT-TEMPLATE.md +16 -0
  81. package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/agents/openai.yaml +2 -0
  82. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +14 -57
  83. package/dist/baseline/scaffold-baseline.json +4 -4
  84. package/dist/baseline/scaffold-baseline.tgz +0 -0
  85. package/dist/data/subagents/manifest.mjs +3 -1
  86. package/dist/index.js +148 -185
  87. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +4 -3
  88. package/dist/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +1 -1
  89. package/dist/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +3 -1
  90. package/dist/skills/agnostic/docs/writing-for-agents/LICENSE +21 -0
  91. package/dist/skills/agnostic/docs/writing-for-agents/SKILL-MECHANICS.md +22 -0
  92. package/dist/skills/agnostic/docs/writing-for-agents/SKILL.md +81 -0
  93. package/dist/skills/agnostic/docs/writing-for-agents/UPSTREAM.md +9 -0
  94. package/dist/skills/agnostic/planning/create-plan/SKILL.md +27 -15
  95. package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +19 -32
  96. package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +14 -0
  97. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +5 -1
  98. package/dist/skills/agnostic/planning/create-plan/references/stop-conditions.md +2 -1
  99. package/dist/skills/agnostic/planning/create-spec/SKILL.md +51 -105
  100. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +26 -57
  101. package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -3
  102. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +41 -0
  103. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +15 -6
  104. package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +3 -3
  105. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +21 -54
  106. package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +0 -4
  107. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +13 -15
  108. package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +7 -4
  109. package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +4 -2
  110. package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +9 -35
  111. package/dist/skills/agnostic/planning/wayfinder/SKILL.md +11 -8
  112. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -3
  113. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +25 -73
  114. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +54 -305
  115. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +46 -55
  116. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +33 -119
  117. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +24 -14
  118. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +53 -11
  119. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +48 -26
  120. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +53 -12
  121. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +49 -33
  122. package/dist/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +20 -0
  123. package/dist/skills/agnostic/research/parallel-research/SKILL.md +14 -2
  124. package/dist/skills/agnostic/research/prototype/LICENSE +21 -0
  125. package/dist/skills/agnostic/research/prototype/LOGIC.md +57 -21
  126. package/dist/skills/agnostic/research/prototype/SKILL.md +17 -15
  127. package/dist/skills/agnostic/research/prototype/UI.md +12 -5
  128. package/dist/skills/agnostic/research/prototype/UPSTREAM.md +11 -0
  129. package/dist/skills/frameworks/effect/effect/SKILL.md +5 -12
  130. package/dist/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
  131. package/dist/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
  132. package/dist/skills/frameworks/effect/effect/references/TESTING.md +2 -72
  133. package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
  134. package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
  135. package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
  136. package/dist/skills/frameworks/effect/effect-service-design/LICENSE +21 -0
  137. package/dist/skills/frameworks/effect/effect-service-design/SKILL.md +124 -0
  138. package/dist/skills/frameworks/effect/effect-service-design/references/AUDIT.md +98 -0
  139. package/dist/skills/misc/wait-what/LICENSE +21 -0
  140. package/dist/skills/misc/wait-what/SKILL.md +7 -0
  141. package/dist/skills/misc/wait-what/UPSTREAM.md +9 -0
  142. package/dist/skills/phases/delivery-phase/SKILL.md +4 -3
  143. package/dist/skills/phases/delivery-phase/phases/backlog.md +31 -0
  144. package/dist/skills/phases/delivery-phase/phases/implement.md +5 -4
  145. package/dist/skills/phases/delivery-phase/phases/plan.md +6 -4
  146. package/dist/skills/phases/delivery-phase/phases/router.md +16 -14
  147. package/dist/skills/phases/delivery-phase/phases/spec.md +9 -5
  148. package/dist/skills/phases/delivery-phase/references/artifact-state.md +9 -2
  149. package/dist/skills/phases/design-phase/phases/backlog.md +4 -4
  150. package/dist/skills/phases/design-phase/phases/prototype.md +1 -1
  151. package/dist/skills/phases/docs-ingest-phase/phases/private-internal.md +3 -1
  152. package/dist/skills/phases/docs-ingest-phase/references/learning-artifacts.md +8 -1
  153. package/dist/skills/phases/finder-phase/SKILL.md +24 -24
  154. package/dist/skills/phases/finder-phase/agents/openai.yaml +1 -1
  155. package/dist/skills/phases/finder-phase/references/convergence.md +39 -0
  156. package/dist/skills/phases/finder-phase/references/frontier-lifecycle.md +22 -16
  157. package/dist/skills/phases/finder-phase/references/root-routing.md +3 -2
  158. package/dist/skills/phases/prototype-phase/SKILL.md +34 -0
  159. package/dist/skills/phases/prototype-phase/VERDICT-TEMPLATE.md +16 -0
  160. package/dist/skills/phases/prototype-phase/agents/openai.yaml +2 -0
  161. package/dist/skills/phases/requirements-phase/SKILL.md +14 -57
  162. package/dist/tsconfig.tsbuildinfo +1 -1
  163. package/package.json +1 -1
  164. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-great-skills/GLOSSARY.md +0 -69
  165. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-great-skills/SKILL.md +0 -61
  166. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/backlog-sync.md +0 -49
  167. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/discovery.md +0 -54
  168. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/grill-phase.md +0 -42
  169. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/questioning.md +0 -51
  170. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/sequential.md +0 -48
  171. package/dist/skills/agnostic/docs/writing-great-skills/GLOSSARY.md +0 -69
  172. package/dist/skills/agnostic/docs/writing-great-skills/SKILL.md +0 -61
  173. package/dist/skills/agnostic/planning/create-spec/references/backlog-sync.md +0 -49
  174. package/dist/skills/agnostic/planning/create-spec/references/discovery.md +0 -54
  175. package/dist/skills/agnostic/planning/create-spec/references/grill-phase.md +0 -42
  176. package/dist/skills/agnostic/planning/create-spec/references/questioning.md +0 -51
  177. package/dist/skills/agnostic/planning/implement-spec/references/sequential.md +0 -48
@@ -1,42 +1,10 @@
1
- # Services, Layers, And Modules
1
+ # Module Surfaces, Scoped Work, And Operation Helpers
2
2
 
3
- Use this when defining service tags, module surfaces, layer implementations, runtime wiring, typed errors, or `Effect.fn` operation boundaries.
3
+ Use this for the local module namespace convention, scoped long-lived work, whole-function `Effect.fn` transforms, and operation error helpers. Use `$effect-service-design` for service qualification, service module construction, Layer composition, requirement propagation, test Layers, and audits.
4
4
 
5
5
  ## Module Surface
6
6
 
7
- One opinionated application-module style uses file-local role names and one canonical ES module namespace projection. Follow the existing codebase's module style when it has one; this convention is not required by Effect.
8
-
9
- ```ts
10
- export interface Interface {
11
- readonly get: (id: UserId) => Effect.Effect<User, NotFound | PersistenceError>
12
- }
13
-
14
- export class Service extends Context.Service<Service, Interface>()(
15
- "@app/UserRepo",
16
- ) {}
17
-
18
- export const layer = Layer.effect(
19
- Service,
20
- Effect.gen(function* () {
21
- const sql = yield* SqlClient.SqlClient
22
-
23
- const get = Effect.fn("UserRepo.get")(function* (id: UserId) {
24
- // ...
25
- })
26
-
27
- return Service.of({ get })
28
- }),
29
- )
30
-
31
- export class NotFound extends Schema.TaggedErrorClass<NotFound>()(
32
- "UserRepo.NotFound",
33
- { id: UserId },
34
- ) {}
35
-
36
- export * as UserRepo from "./user-repo.js"
37
- ```
38
-
39
- Consumers use the module namespace.
7
+ One opinionated application-module style uses file-local role names and one canonical ES module namespace projection. Follow the existing codebase's module style when it has one; this convention is not required by Effect. Consumers use the module namespace.
40
8
 
41
9
  ```ts
42
10
  import { UserRepo } from "./user-repo.js"
@@ -66,25 +34,6 @@ Guidance:
66
34
  - The resulting `UserRepo.UserRepo === UserRepo` self-reference is unusual. Use this pattern only where the runtime and toolchain support it; otherwise use named exports or a separate barrel.
67
35
  - Export only intentional surface; keep local schemas, row codecs, helpers, and implementation details unexported.
68
36
  - Do not introduce TypeScript `namespace` declarations for organization.
69
- - Use a named service class such as `class UserRepo extends Context.Service...` when an external library or existing codebase does not use module namespace style.
70
-
71
- ## Layer Constructors
72
-
73
- Choose the layer constructor that matches the thing produced.
74
-
75
- ```ts
76
- Layer.succeed(Service, impl) // already-built service
77
- Layer.sync(Service, () => impl) // lazy synchronous service
78
- Layer.effect(Service, makeEffect) // effectful service acquisition
79
- ```
80
-
81
- Guidance:
82
-
83
- - Default real implementations to `Layer.effect(Service, Effect.gen(...))`.
84
- - Use `Layer.effectContext(...)` when one acquisition intentionally supplies multiple services, especially first-class test stubs or one client backing several service tags.
85
- - Use `Layer.unwrap(...)` when config or runtime discovery chooses/builds the layer.
86
- - Use `Layer.fresh(...)` or `Effect.provide(layer, { local: true })` only when a test or operation needs isolated acquisition.
87
- - Use `Context.Reference` rarely, only for ambient/defaultable runtime references where a safe default is real.
88
37
 
89
38
  ## Long-Lived Work
90
39
 
@@ -109,15 +58,6 @@ Guidance:
109
58
  - Do not run forever work inline during layer acquisition.
110
59
  - Do not expose public `start` methods unless the domain explicitly needs manual lifecycle control.
111
60
 
112
- ## Runtime Wiring
113
-
114
- - Use `Layer.provide(...)` to hide an implementation dependency.
115
- - Use `Layer.provideMerge(...)` only when the dependency should remain exposed for downstream consumers.
116
- - Use `Layer.mergeAll(...)` for independent exposed layers.
117
- - Prefer flat, topologically sorted runtime layer values with named subgraphs.
118
- - Avoid using `provideMerge` as a blind make-it-compile tool.
119
- - Avoid hiding important authority or lifecycle dependencies behind broad invisible provisioning.
120
-
121
61
  ## Effect.fn
122
62
 
123
63
  Use extra `Effect.fn(...)` arguments for wrappers that apply to the whole function call. Each transform receives `(effect, ...originalArgs)`.
@@ -1,27 +1,17 @@
1
1
  # Testing
2
2
 
3
- Use this when writing Effect tests, tests involving time, retry, schedules, concurrency, workers, services, fakes, or config.
3
+ Use this when writing Effect tests involving time, retry, schedules, concurrency, workers, or config. Use `$effect-service-design` for service test substitutes and reusable test Layers.
4
4
 
5
5
  ## Defaults
6
6
 
7
7
  - Use `it.effect` by default.
8
8
  - Use `it.live` only when real time or live runtime services are the behavior under test.
9
- - Use test layers and `ConfigProvider` rather than global mutation.
9
+ - Use `ConfigProvider` rather than global mutation for configuration tests.
10
10
  - Use `TestClock.setTime` / `TestClock.adjust` for sleeps, schedules, retries, leases, and timeouts.
11
11
  - Fork sleeping effects before advancing `TestClock`.
12
12
  - Avoid arbitrary `Effect.sleep(...)` in tests; it usually makes tests slow and flaky.
13
13
  - Assert typed failures, rollback, interruption, finalization, retry bounds, idempotency, concurrency laws, and malformed persistence where relevant.
14
14
 
15
- ```ts
16
- it.effect("finds a user", () =>
17
- Effect.gen(function* () {
18
- const users = yield* UserRepo.Service
19
- const result = yield* users.find(UserId.make("u1"))
20
- expect(Option.isSome(result)).toBe(true)
21
- }).pipe(Effect.provide(UserRepo.testLayer)),
22
- )
23
- ```
24
-
25
15
  ## Synchronization Instead Of Sleeps
26
16
 
27
17
  - Use `Deferred` for one-shot readiness/completion signals.
@@ -53,66 +43,6 @@ it.effect("publishes exactly once", () =>
53
43
  )
54
44
  ```
55
45
 
56
- ## First-Class App Test Stubs
57
-
58
- Use `TestInterface extends Interface`, `TestService`, and `testLayer` for reusable/stateful fakes.
59
-
60
- ```ts
61
- export interface Interface {
62
- readonly send: (message: Message) => Effect.Effect<void, SendError>
63
- }
64
-
65
- export class Service extends Context.Service<Service, Interface>()(
66
- "@app/Notifier",
67
- ) {}
68
-
69
- export interface TestInterface extends Interface {
70
- readonly sentMessages: () => Effect.Effect<ReadonlyArray<Message>>
71
- readonly failNextSend: (error: SendError) => Effect.Effect<void>
72
- }
73
-
74
- export class TestService extends Context.Service<TestService, TestInterface>()(
75
- "@app/Notifier/Test",
76
- ) {}
77
-
78
- export const testLayer = Layer.effectContext(
79
- Effect.gen(function* () {
80
- const sent = yield* Ref.make<ReadonlyArray<Message>>([])
81
- const nextFailure = yield* Ref.make<Option.Option<SendError>>(Option.none())
82
-
83
- const service = TestService.of({
84
- send: Effect.fn("Notifier.Test.send")(function* (message) {
85
- const failure = yield* Ref.getAndSet(nextFailure, Option.none())
86
- if (Option.isSome(failure)) return yield* Effect.fail(failure.value)
87
- yield* Ref.update(sent, (messages) => [...messages, message])
88
- }),
89
- sentMessages: Effect.fn("Notifier.Test.sentMessages")(function* () {
90
- return yield* Ref.get(sent)
91
- }),
92
- failNextSend: Effect.fn("Notifier.Test.failNextSend")(function* (error) {
93
- yield* Ref.set(nextFailure, Option.some(error))
94
- }),
95
- })
96
-
97
- return Context.empty().pipe(
98
- Context.add(Service, service),
99
- Context.add(TestService, service),
100
- )
101
- }),
102
- )
103
- ```
104
-
105
- Guidance:
106
-
107
- - The same object should back both the real `Service` tag and `TestService` tag.
108
- - Production code depends only on the real service tag.
109
- - Tests use `TestService` for control and inspection.
110
- - Use function-valued service members, including zero-argument operations, so `Effect.fn` fits naturally.
111
- - Use `Layer.succeed` for complete dead-simple static test implementations.
112
- - Use `Layer.mock` only for tiny local partial mocks where omitted members should fail loudly if used.
113
-
114
46
  ## Config In Tests
115
47
 
116
48
  Use `ConfigProvider.layer(ConfigProvider.fromUnknown(...))` when the test should exercise Config decoding.
117
-
118
- Use `Layer.succeed(AppConfiguration.Service, config)` when the app wraps decoded config in its own service and the test does not need to exercise env decoding.
@@ -2,17 +2,16 @@
2
2
  name: effect-backend-structure
3
3
  description: |
4
4
  Apply Effect-specific backend structure on top of backend-domain-structure.
5
- Use when creating or changing Effect services, layers, actions, repositories,
6
- transport adapters, DB integrations, test layers, or backend boilerplate in any
7
- Effect backend root. Enforces visible Effect requirements, layer-provided
8
- implementations, effect-solutions plus opensrc source lookup, and @effect/vitest
9
- testing conventions.
5
+ Use when creating or changing Effect actions, repositories, transport adapters,
6
+ DB integrations, test placement, or backend boilerplate in any Effect backend
7
+ root. Enforces actions-own-orchestration, integration dependency direction,
8
+ effect-solutions plus opensrc source lookup, and @effect/vitest conventions.
10
9
  compatibility: Requires Effect v4. Examples are reviewed against the version documented in this repository.
11
10
  ---
12
11
 
13
12
  # Effect Backend Structure
14
13
 
15
- Use this skill with `$backend-domain-structure` and `$effect` for Effect backend code. `$effect` owns Effect v4 API guidance.
14
+ Use this skill with `$backend-domain-structure` and `$effect` for Effect backend code. `$effect` owns Effect v4 API guidance. Use `$effect-service-design` for service qualification, service modules, Layers, requirements, test substitutes, and service audits.
16
15
 
17
16
  The agnostic skill owns the layer model:
18
17
 
@@ -21,24 +20,23 @@ The agnostic skill owns the layer model:
21
20
  - `features/*`
22
21
  - shared libraries and packages
23
22
 
24
- This skill adds Effect-specific services, layers, dependency visibility, source lookup, and testing rules.
23
+ This skill adds Effect-specific backend topology, action ownership, source lookup, and test placement rules.
25
24
 
26
25
  ## Workflow
27
26
 
28
27
  1. Identify the backend root from the current repo; do not assume a monorepo path.
29
28
  2. Read the nearest relevant `AGENTS.md` files.
30
- 3. Read `$backend-domain-structure`, `$effect`, and `references/layout.md`.
29
+ 3. Read `$backend-domain-structure`, `$effect`, `$effect-service-design` when services or Layers are in scope, and `references/layout.md`.
31
30
  4. Run the relevant `effect-solutions` guides before coding.
32
31
  5. Check local `opensrc` Effect sources when docs are vague or an API surface is unfamiliar.
33
32
  6. Place code using the agnostic backend layers plus the Effect rules below.
34
33
  7. Keep transport thin and run business logic through Effects.
35
- 8. Add or update colocated `@effect/vitest` tests with test layers for unit coverage and live layers for integration coverage.
34
+ 8. Add or update colocated `@effect/vitest` tests for unit and integration coverage.
36
35
 
37
36
  ## Required Source Lookup
38
37
 
39
38
  Always consult `effect-solutions` first. Use the smallest relevant set:
40
39
 
41
- - `effect-solutions show services-and-layers`
42
40
  - `effect-solutions show config`
43
41
  - `effect-solutions show data-modeling`
44
42
  - `effect-solutions show error-handling`
@@ -51,20 +49,9 @@ Use `opensrc` next when the guide is not enough:
51
49
 
52
50
  For non-Effect libraries, run `opensrc path <package>` or `opensrc path owner/repo`.
53
51
 
54
- ## Services and Layers
55
-
56
- - Define business services, repositories, and reusable capability interfaces with `Context.Service`.
57
- - Build implementations with layers and return values through `Service.of(...)`.
58
- - Let actions consume services/repositories through Effect accessors or `yield* Service`.
59
- - Keep action requirements visible until a feature, app, runner, or test layer provides them.
60
- - Compose feature dependencies in `features/<domain>/layer.ts` or the local equivalent.
61
- - Compose cross-feature and infrastructure dependencies in `platform/`.
62
- - Use `Layer.mergeAll` for same-level composition and shallow `Layer.provide` / `Layer.provideMerge` for wiring levels together.
63
- - Avoid `Effect.provide` inside actions, services, repositories, and transport adapters except at the final runner/test boundary.
64
-
65
52
  ## Effect Coding Rules
66
53
 
67
- - Use `Effect.fn("Domain.action")` for actions and service methods.
54
+ - Use `Effect.fn("Domain.action")` for actions.
68
55
  - Use `Schema.TaggedError` for domain failures.
69
56
  - Use branded IDs and Effect Schema for domain models.
70
57
  - Use `Config.*` instead of reading `process.env` inside Effect code.
@@ -75,19 +62,15 @@ For non-Effect libraries, run `opensrc path <package>` or `opensrc path owner/re
75
62
 
76
63
  - Keep tests inside the owning feature or module.
77
64
  - Use `@effect/vitest`.
78
- - Unit tests provide fake leaf services/repos via test layers.
79
- - Integration tests use live layers and public action or transport boundaries.
80
- - Expose assertions through test-state tags in `tests/support`.
81
- - Do not add test-only methods to production services.
82
- - Do not use module mocks for Effect services; provide a replacement `Layer`.
65
+ - Unit tests cover action and guard behavior.
66
+ - Integration tests use public action or transport boundaries.
67
+ - Apply `$effect-service-design` when tests replace or control a service.
83
68
 
84
69
  ## Output Checklist
85
70
 
86
71
  - `$backend-domain-structure` was applied
87
72
  - relevant `effect-solutions` guides were checked
88
73
  - `opensrc` sources were checked when needed
89
- - dependencies stay visible as Effect requirements or service dependencies
90
- - implementations are supplied by layers, not hidden imports or module mocks
91
74
  - code landed in the correct backend layer
92
75
  - actions own orchestration
93
76
  - services are only reusable mechanics
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Effect Backend Structure"
3
3
  short_description: "Effect backend architecture"
4
- default_prompt: "Use $backend-domain-structure alongside $effect-backend-structure to shape or bootstrap Effect backend code in any backend root; first apply agnostic backend layers, then apply Effect-specific services, layers, and testing rules."
4
+ default_prompt: "Use $backend-domain-structure alongside $effect-backend-structure to shape Effect backend topology and action boundaries; add $effect-service-design when services or Layers are in scope."
@@ -34,14 +34,14 @@ Dependency direction:
34
34
  - features may depend on other features only when the domain relationship is explicit and stable
35
35
  - integrations do not import features
36
36
 
37
- Layer ownership:
37
+ Composition file placement:
38
38
 
39
- - `platform/effect/app.ts` or local equivalent composes the app-wide live layer and provides infrastructure once
40
- - `platform/effect/request.ts` or local equivalent builds request-scoped services and runtime context only
41
- - `features/<domain>/layer.ts` composes that domain's action/repository/service requirements
42
- - `features/<domain>/tests/support/layer.ts` provides fake leaf layers and test-state tags for unit tests
39
+ - `platform/effect/app.ts` or local equivalent is the app-wide composition root
40
+ - `platform/effect/request.ts` or local equivalent owns request-scoped runtime context
41
+ - `features/<domain>/layer.ts` is the domain composition root
42
+ - `features/<domain>/tests/support/` owns feature-local reusable test support
43
43
 
44
- Keep dependency requirements visible until one of these layer files provides them. Do not import live implementations directly inside actions, services, repositories, or transport adapters.
44
+ Do not import live implementations directly inside actions, services, repositories, or transport adapters.
45
45
 
46
46
  Test layout:
47
47
 
@@ -59,10 +59,10 @@ Test layout:
59
59
  Testing split:
60
60
 
61
61
  - `tests/support`
62
- fake leaf layers plus state tags for assertions
62
+ feature-local reusable test support
63
63
  - `tests/unit`
64
- action and guard behavior on fake layers
64
+ action and guard behavior
65
65
  - `tests/integration`
66
- live router/app behavior on real layers
66
+ live router/app behavior
67
67
 
68
68
  Do not recreate a package-root `tests/` folder unless the current repo already requires that convention.
@@ -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,124 @@
1
+ ---
2
+ name: effect-service-design
3
+ description: Design Effect services. Use when designing a new Effect service module or auditing an existing codebase for service, Layer, and composition improvements.
4
+ ---
5
+
6
+ # Effect Service Design
7
+
8
+ Treat a service as an **authority seam**: a cohesive capability whose requirements should propagate through Effect context. An **Effect service module** owns the service contract, construction, production Layer, and any honest reusable test implementation that belong to the same capability.
9
+
10
+ ## 1. Establish the local rules
11
+
12
+ Read the nearest `AGENTS.md`, architecture docs, coding standards, project Effect guidance, pinned Effect version/source, and relevant vendored examples. Prefer current project-compatible patterns over remembered APIs.
13
+
14
+ **Complete when:** the governing files and pinned source examples have been read and recorded for use in later decisions.
15
+
16
+ ## 2. Select the branch
17
+
18
+ - **Design branch:** for a new service or a focused redesign, bound the capability, trace one caller-visible operation to every effect, then continue below.
19
+ - **Audit branch:** for a codebase, package, feature slice, or diff, read and follow [`references/AUDIT.md`](references/AUDIT.md), applying the rules below to every candidate it finds.
20
+
21
+ **Complete when:** one branch is selected, its scope is bounded, and the caller-visible operations in scope are named.
22
+
23
+ ## 3. Apply the service test
24
+
25
+ A real service owns at least one meaningful capability:
26
+
27
+ - authority over persistence, credentials, external I/O, runtime resources, configuration, time, randomness, or lifecycle;
28
+ - state or behavior with real production and test/runtime variation;
29
+ - enough implementation complexity that deleting the module would spread complexity into callers.
30
+
31
+ Prefer an existing Effect service such as `Clock`, `Crypto`, `Random`, `Config`, `HttpClient`, `FileSystem`, or `Path` before defining an application service.
32
+
33
+ Keep these as values or pure modules:
34
+
35
+ - parsed domain inputs and per-call request data;
36
+ - deterministic calculations, projections, parsers, and constructors;
37
+ - options that select policy for one call;
38
+ - framework values confined to their adapter;
39
+ - wrappers that only rename or forward another service.
40
+
41
+ A test-only desire to inject a value is not enough. The seam must represent real ownership or variability in production.
42
+
43
+ **Complete when:** the deletion test and the existing-service/adapter audit both support either “service” or “value,” and the rejected alternative is stated plainly.
44
+
45
+ ## 4. Place the authority seam
46
+
47
+ - Domain modules stay pure.
48
+ - A concrete adapter owns its technology-specific `make` and `layer`.
49
+ - Composition roots select and provide concrete Layers. They do not become reusable policy modules.
50
+ - Runtime bindings are yielded in the composition root or owning adapter, then hidden behind application/domain types.
51
+
52
+ Yield stable dependencies while building the Layer and close over them in service methods. Yield request-, fiber-, or operation-scoped context inside the method that uses it. Let requirements propagate until the module that truthfully chooses an implementation provides them.
53
+
54
+ Passing an external library's constructor options remains correct after the owning adapter has yielded the relevant runtime capability. React props, request values, domain inputs, and framework constructors are not Effect dependency injection.
55
+
56
+ **Complete when:** dependencies point inward, raw technology types stop at adapters, and no inner caller chooses a concrete implementation it does not own.
57
+
58
+ ## 5. Shape the Effect service module
59
+
60
+ Follow the project's established equivalent of this shape:
61
+
62
+ ```ts
63
+ export interface Interface {
64
+ readonly operation: (input: Input) => Effect.Effect<Output, OperationError>
65
+ }
66
+
67
+ export class Service extends Context.Service<Service, Interface>()(
68
+ "@app/Capability",
69
+ ) {}
70
+
71
+ export const make: Effect.Effect<
72
+ Service["Service"],
73
+ never,
74
+ Dependency.Service
75
+ > = Effect.gen(function* () {
76
+ const dependency = yield* Dependency.Service
77
+
78
+ const operation = Effect.fn("Capability.operation")(function* (input: Input) {
79
+ return yield* dependency.operation(input)
80
+ })
81
+
82
+ return Service.of({ operation })
83
+ })
84
+
85
+ export const layerWithoutDependencies = Layer.effect(Service, make)
86
+
87
+ export const layer = layerWithoutDependencies.pipe(
88
+ Layer.provide([Dependency.layer]),
89
+ )
90
+
91
+ export const layerTest = Layer.succeed(
92
+ Service,
93
+ Service.of({
94
+ operation: (_input) => Effect.succeed(testOutput),
95
+ }),
96
+ )
97
+ ```
98
+
99
+ `layerWithoutDependencies` preserves the service's requirements for composition. `layer` is the ready production assembly and provides the concrete dependency Layers. `layerTest` illustrates a complete static substitute; export it only when that behavior is reusable and honest. Use `layerMemory` instead when an in-memory implementation faithfully preserves the observable contract.
100
+
101
+ Use `Layer.succeed` for an already-built value, `Layer.sync` for lazy synchronous construction, and `Layer.effect` for effectful acquisition. Preserve an established compatible naming convention when renaming would add churn without clarity.
102
+
103
+ Keep interfaces narrow and domain-shaped. Use named `Effect.fn` methods, typed expected errors, and yielded dependencies. Add options, methods, services, and combinators only when each hides enough complexity to earn its place.
104
+
105
+ **Complete when:** the tag, interface, `make`, dependency-preserving Layer, production `layer`, errors, methods, and test strategy have one clear owner, and every exported symbol is required by a caller.
106
+
107
+ ## 6. Choose test Layers honestly
108
+
109
+ - Use `Layer.succeed` for a complete static implementation.
110
+ - Add `layerTest` plus a test-control service when reusable state, failure injection, or observation is part of a real seam.
111
+ - Name a Layer `layerMemory` only when it faithfully implements the service's observable contract in memory.
112
+ - Prefer a real local substitute when persistence, transactions, serialization, or protocol behavior matters.
113
+ - Keep a tiny one-off fake in its test when promoting it would create production surface solely for that test.
114
+
115
+ Tests cross the same service interface as production callers. When a reusable control service exists, back its production tag and test-control tag with the same object. Partial objects with “unused” methods that die are focused test fixtures, not reusable in-memory adapters.
116
+
117
+ **Complete when:** each test implementation is complete for its advertised name, tests observe outcomes through the public interface, and no new seam exists only to support mocking.
118
+
119
+ ## 7. Finish the selected branch
120
+
121
+ - **Design branch:** record the service-or-value decision and its evidence. When implementation is requested, create or refactor the module, update composition roots and tests, and run the repository's required checks.
122
+ - **Audit branch:** produce prioritized findings with file/line or symbol evidence, target module shapes, composition and test impact, and explicit “keep” decisions.
123
+
124
+ **Complete when:** the designed capability has an explicit disposition and validated implementation when requested, or every audit inventory row has a disposition; validation passes or every failure is reported.
@@ -0,0 +1,98 @@
1
+ # Codebase audit branch
2
+
3
+ Use this branch for an entire codebase, package, feature slice, or diff.
4
+
5
+ ## 1. Build the inventory
6
+
7
+ Enumerate source and test files, then find:
8
+
9
+ - every `Context.Service`, tag, `Layer`, `make`, `provide`, and `provideService`;
10
+ - service-shaped interfaces/classes with effectful methods;
11
+ - parameter, property, constructor, callback, options-bag, and Layer injection;
12
+ - direct access to time, randomness, cryptography, IDs, configuration, HTTP, persistence, registries, renderers, filesystem, runtime bindings, and mutable globals;
13
+ - test fakes, in-memory implementations, module mocks, and hand-built `Layer.succeed` values.
14
+
15
+ For each service record:
16
+
17
+ | Field | Question |
18
+ | --- | --- |
19
+ | Owner | Which module owns the capability's meaning? |
20
+ | Contract | Where are the interface and tag? |
21
+ | Constructor | Does `make` yield every dependency? |
22
+ | Production | Which module owns the concrete `layer`? |
23
+ | Tests | Is there an honest reusable test/local implementation? |
24
+ | Consumers | Are capabilities yielded or drilled? |
25
+ | Requirements | Do Effect requirements propagate to the composition root? |
26
+ | Verdict | Keep, deepen, relocate, merge, remove, or create? |
27
+
28
+ **Complete when:** every discovered service/tag and Layer appears exactly once in the inventory.
29
+
30
+ ## 2. Trace requirements
31
+
32
+ For each service and service-shaped constructor:
33
+
34
+ 1. Trace one public operation to every effect.
35
+ 2. Mark where each dependency first appears.
36
+ 3. Mark where it is yielded, passed as a value, captured from a property, or concretely provided.
37
+ 4. Verify the module providing a Layer truthfully owns that implementation choice.
38
+ 5. Check pinned source for framework/runtime services before recommending a wrapper.
39
+
40
+ Pay special attention to:
41
+
42
+ - a service yielded once and then passed through several functions;
43
+ - a `Layer` accepted as a function argument;
44
+ - dependency bags and constructors in Effect-native code;
45
+ - plain service values passed into handler builders;
46
+ - local `Effect.provide` calls that erase requirements below the composition root;
47
+ - global Clock, crypto, random, environment, fetch, database, registry, or binding access;
48
+ - a service contract, `make`, production Layer, and test Layer scattered across unrelated modules.
49
+
50
+ **Complete when:** every capability in the inventory has an unbroken path from use to the composition root or a documented value boundary.
51
+
52
+ ## 3. Classify each candidate
53
+
54
+ Apply the service test from `SKILL.md`, then classify dependencies:
55
+
56
+ - **built-in Effect capability** — yield it directly;
57
+ - **technology adapter** — implement the port in the adapter module;
58
+ - **request/domain value** — keep it explicit;
59
+ - **framework boundary** — isolate its required constructor/property API in the adapter or root;
60
+ - **pass-through abstraction** — remove or fold into its owner.
61
+
62
+ Use the deletion test. Confirm an existing module cannot own the behavior before proposing a new one. Prefer merging duplicated capabilities over introducing a generic registry or dependency bag.
63
+
64
+ **Complete when:** every candidate has one classification and concrete evidence; no finding rests only on stylistic preference.
65
+
66
+ ## 4. Audit test implementations
67
+
68
+ For each service, inspect how tests replace or control it:
69
+
70
+ - static complete value → local or colocated `Layer.succeed`;
71
+ - reusable state/control → first-class test service and `layerTest`;
72
+ - faithful in-memory semantics → `layerMemory`;
73
+ - persistence/protocol semantics → real local adapter;
74
+ - narrow one-off behavior → fixture local to the test.
75
+
76
+ Compare the fake's advertised contract with its implementation. A partial fake can remain local, but it cannot be recommended as a general in-memory Layer.
77
+
78
+ **Complete when:** every production service has an intentional test strategy or an explicit reason no substitute is needed.
79
+
80
+ ## 5. Report only actionable findings
81
+
82
+ Prioritize by correctness and requirement visibility:
83
+
84
+ - **P0** — hidden authority, direct unsafe runtime access, broken or duplicated capability, wrong Layer ownership;
85
+ - **P1** — repeated dependency drilling, missing dependency-preserving or production Layer, scattered service module;
86
+ - **P2** — naming or colocation cleanup that should ride with a nearby refactor.
87
+
88
+ For each finding include:
89
+
90
+ 1. evidence with file/line or symbol references;
91
+ 2. why the current shape hides requirements or creates caller burden;
92
+ 3. the smallest target Effect service module shape, including `layerWithoutDependencies`, assembled `layer`, and any honest reusable test Layer;
93
+ 4. the composition-root and test impact;
94
+ 5. what should remain unchanged.
95
+
96
+ Include a final “keep” section covering explicit values, pure functions, framework boundaries, correctly separated ports/adapters, and request-scoped services.
97
+
98
+ **Complete when:** every inventory row has a disposition, every recommendation names its owner and target shape, and speculative abstractions have been removed from the report.
@@ -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,7 @@
1
+ ---
2
+ name: wait-what
3
+ description: Stop. That last message did not land — re-pitch it.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Wait — I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `CONTEXT.md`.
@@ -0,0 +1,9 @@
1
+ # Upstream provenance
2
+
3
+ Imported unchanged from [`mattpocock/skills`](https://github.com/mattpocock/skills/tree/2ffb184ffbb752faa664c0b204f3c9241b1428e9/skills/productivity/wait-what) at v1.2.0 commit:
4
+
5
+ ```text
6
+ 2ffb184ffbb752faa664c0b204f3c9241b1428e9
7
+ ```
8
+
9
+ The adjacent `LICENSE` is the upstream MIT license retained with this skill.
@@ -22,13 +22,14 @@ Completion of one phase does not imply loading the rest of the chain.
22
22
 
23
23
  - **Full delivery:** user asks to deliver a bounded goal end to end.
24
24
  - **Resume:** user returns after manual spec, plan, implementation, review, debugging, or docs work.
25
- - **HITL checkpoint:** user wants one phase handled, then a stop for discussion or approval.
25
+ - **HITL checkpoint:** user explicitly wants one phase handled, then a manual stop.
26
26
  - **Closeout:** user asks to finish evidence, docs, stack, tracker, or PR state after the work is already done.
27
27
 
28
28
  ## Phase Files
29
29
 
30
30
  - [phases/router.md](phases/router.md): choose the next phase from artifacts and evidence.
31
- - [phases/spec.md](phases/spec.md): create or repair the reviewed spec.
31
+ - [phases/spec.md](phases/spec.md): create or repair the agent-ready spec.
32
+ - [phases/backlog.md](phases/backlog.md): verify or project the agent-ready spec into delivery backlog items.
32
33
  - [phases/plan.md](phases/plan.md): create or repair the execution-ready plan.
33
34
  - [phases/implement.md](phases/implement.md): execute the accepted plan.
34
35
  - [phases/review.md](phases/review.md): run mandatory review and classify findings.
@@ -41,7 +42,7 @@ Completion of one phase does not imply loading the rest of the chain.
41
42
  - Do not read phase files other than `router.md` until the router selects them.
42
43
  - Do not activate child skills at delivery start.
43
44
  - Reuse fresh matching artifacts before loading creation skills.
44
- - A phase may delegate to `create-spec`, `create-plan`, `implement-spec`, `review-phase`, `debugging-phase`, `docs-ingest-phase`, or `stack` only from its own phase file.
45
+ - A phase may delegate to `create-spec`, `write-backlog`, `create-plan`, `implement-spec`, `review-phase`, `debugging-phase`, `docs-ingest-phase`, or `stack` only from its own phase file.
45
46
  - After a phase completes, write enough state for future resume. See [references/phase-handoff.md](references/phase-handoff.md).
46
47
 
47
48
  ## Stop Conditions