@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
@@ -5,6 +5,10 @@ Connector source:
5
5
  - monday.com MCP tools exposed through `@monday-com`
6
6
  - Dependency column API: [developer.monday.com/api-reference/reference/dependency](https://developer.monday.com/api-reference/reference/dependency)
7
7
 
8
+ ## Preflight before creation
9
+
10
+ Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify every milestone, and prove the configured hierarchy, classification, and dependency representation is representable in monday.com. A failed preflight writes nothing.
11
+
8
12
  ## Intent
9
13
 
10
14
  Use monday.com boards, groups, items, subitems, and dependency columns together.
@@ -21,16 +25,19 @@ Canonical mapping:
21
25
 
22
26
  Do not flatten epics and stories into sibling items when subitems are available.
23
27
 
28
+ ## Update existing decision tickets
29
+
30
+ Use `@monday-com.change_item_column_values` for claim, release, and resolve after reading the item's configured people/status columns and rejecting a conflicting claim. Resolution sets the configured terminal status and writes the immutable resolution pointer to the configured long-text/update surface. Return the updated item id and board URL to Finder.
31
+
24
32
  ## Required bootstrap
25
33
 
26
34
  Resolve the target board before creating backlog items.
27
35
 
28
36
  Before creating or updating items on a board, inspect board metadata with the connector's board info tool so column IDs, column types, status labels, subitem support, and dependency columns are known. Do not invent column IDs.
29
37
 
30
- Expected board shape:
38
+ Expected board shape, subject to explicit board configuration:
31
39
 
32
- - dedicated Status or Dropdown column named `Kind`
33
- - `Kind` labels/options: `fog`, `grilling`, `research`, `prototype`, `epic`, `story`
40
+ - optional configured Status or Dropdown classification column, which may be named `Kind`
34
41
  - one board group per capability module
35
42
  - parent items for epics/capabilities
36
43
  - subitems for stories
@@ -39,9 +46,13 @@ Expected board shape:
39
46
 
40
47
  If the target group for a capability module is missing, create it before creating concrete items.
41
48
 
42
- ## Kind storage
49
+ ## Provider classification
50
+
51
+ Classification examples assume explicit configuration.
43
52
 
44
- Canonical `kind` storage is a dedicated Status or Dropdown column named `Kind`.
53
+ Inspect configured provider metadata before choosing a representation. An adapter-specific Status or Dropdown column named `Kind` may represent the direct backlog concepts.
54
+
55
+ Only when explicitly configured to use that column, resolve its id and matching label. If it is absent, record a setup blocker; do not create classification columns or labels by default.
45
56
 
46
57
  Allowed values:
47
58
 
@@ -54,6 +65,14 @@ Allowed values:
54
65
 
55
66
  Keep workflow state in a separate Status column. Do not overload status labels such as `Working` or `Done` as kind.
56
67
 
68
+ Fallback order:
69
+
70
+ 1. configured Status or Dropdown column
71
+ 2. existing native category/tag column that exactly preserves the direct concept
72
+ 3. stable title prefix such as `[story]`
73
+
74
+ If board policy permits none of these, fail preflight. Do not create columns or labels implicitly.
75
+
57
76
  ## Create a fog item
58
77
 
59
78
  Create fog as a first-class backlog item at the root/backlog group. Do not create child tickets under fog.
@@ -72,15 +91,15 @@ Tool:
72
91
  }
73
92
  ```
74
93
 
75
- Use the actual `Kind` column ID from board metadata in place of `kind`.
94
+ When classification is explicitly configured, use its actual column ID from board metadata in place of `kind`; otherwise use the fallback above.
76
95
 
77
96
  ## Create grilling, research, or prototype items
78
97
 
79
98
  Create each learning item as a first-class parent item in the matching capability group.
80
99
 
81
- Set the `Kind` column to `grilling`, `research`, or `prototype`.
100
+ When configured, set the classification column to `grilling`, `research`, or `prototype`.
82
101
 
83
- Closure notes must name the answer, accepted direction, artifacts or evidence, and created or updated epics/stories.
102
+ Closure notes record the answer or verdict, evidence, observations, open decisions, and resolution pointer for Wayfinder. They do not authorize delivery.
84
103
 
85
104
  ## Capability grouping
86
105
 
@@ -113,15 +132,12 @@ Use stable capability names. Do not create implementation-phase groups such as b
113
132
 
114
133
  Use a separate Status or Dropdown column named `Execution milestone` for `M1`, `M2`, and later dependency-derived waves. The exact column ID comes from board metadata.
115
134
 
116
- 1. Inspect both parent-item and subitem board metadata. Confirm the `Execution milestone` and dependency columns exist wherever selected work will live.
117
- 2. Before creating dependency values, prove every required blocker edge is representable by monday.com's same-board dependency constraint. If an edge crosses parent-item and subitem storage, stop with a provider setup blocker; do not replace it with prose or derive milestones from an incomplete graph.
118
- 3. Create selected concrete non-fog items/subitems in capability groups without an execution-milestone value.
119
- 4. Populate the dependency column so each blocked item references all prerequisite item IDs.
120
- 5. Stop on a missing dependency target or cycle; monday.com's API does not enforce cycle detection for clients.
121
- 6. Assign dependency-free items to `M1`.
122
- 7. Assign every other item to `M(1 + max(milestone number of each dependency))`.
123
- 8. Set exactly one `Execution milestone` value on every selected milestone-eligible item.
124
- 9. Verify every dependency points to an item in a strictly earlier milestone.
135
+ 1. Inspect both parent-item and subitem board metadata.
136
+ 2. In memory, resolve the complete selected graph and reject missing targets, self-edges, or cycles.
137
+ 3. Prove every edge is representable by monday.com's same-board dependency constraint. If an edge crosses unsupported storage, stop before creation.
138
+ 4. Derive dependency-free items as `M1`; derive every other item as `M(1 + max(milestone number of each dependency))`.
139
+ 5. Verify every dependency points to a strictly earlier milestone and that all required configured columns exist.
140
+ 6. Only after preflight passes, create items, map planned keys to provider ids, populate dependencies, and set exactly one verified milestone value per eligible item.
125
141
 
126
142
  Items from different capability groups can share one execution milestone. Group membership, parent/subitem hierarchy, and current milestone value never create dependency edges. Recompute milestone values whenever the dependency column changes.
127
143
 
@@ -138,7 +154,7 @@ Tool:
138
154
  "boardId": 123456789,
139
155
  "groupId": "topics",
140
156
  "name": "Submission lifecycle management",
141
- "columnValues": "{\"long_text\":\"Outcome: ...\\n\\nScope: ...\\n\\nCross-story constraints: ...\",\"kind\":{\"label\":\"epic\"}}"
157
+ "columnValues": "{\"long_text\":\"Outcome: ...\\n\\nScope: ...\\n\\nCross-story constraints: ...\\n\\nImmutable spec: <blob-url>\",\"kind\":{\"label\":\"epic\"}}"
142
158
  }
143
159
  }
144
160
  ```
@@ -149,7 +165,8 @@ Epic body ownership:
149
165
  - scope
150
166
  - cross-story constraints
151
167
  - child story list
152
- - links to source grill/status artifacts when relevant
168
+ - immutable spec link
169
+ - accepted artifact links when relevant
153
170
 
154
171
  Keep `columnValues` limited to known board columns from board metadata.
155
172
 
@@ -166,7 +183,7 @@ Tool:
166
183
  "boardId": 123456789,
167
184
  "parentItemId": 987654321,
168
185
  "name": "Lead reassigns ownership to another reviewer",
169
- "columnValues": "{\"long_text\":\"Outcome: ...\\n\\nAcceptance signals: ...\\n\\nNon-goals: ...\",\"kind\":{\"label\":\"story\"}}"
186
+ "columnValues": "{\"long_text\":\"Outcome: ...\\n\\nSource stories: US-001\\n\\nAcceptance criteria: AC-001\\n\\nDemonstration: ...\\n\\nAccepted artifacts: ...\",\"kind\":{\"label\":\"story\"}}"
170
187
  }
171
188
  }
172
189
  ```
@@ -174,9 +191,12 @@ Tool:
174
191
  Story body ownership:
175
192
 
176
193
  - outcome
177
- - acceptance signals
194
+ - source `US-###`
195
+ - covered `AC-###`
196
+ - demonstration
178
197
  - non-goals
179
- - links
198
+ - immutable spec link
199
+ - accepted artifact links
180
200
 
181
201
  If a board does not support subitems, stop and ask whether to add subitem support or use a different monday.com board. Do not silently degrade into flat story items.
182
202
 
@@ -201,20 +221,16 @@ Tool:
201
221
 
202
222
  ## Minimal creation order
203
223
 
204
- 1. Resolve board ID.
205
- 2. Inspect board metadata.
206
- 3. Resolve or create the `Kind` Status or Dropdown column and allowed values.
207
- 4. Resolve or create groups for capability modules.
208
- 5. Resolve or create the `Execution milestone` Status or Dropdown column.
209
- 6. Create root fog items when needed.
210
- 7. Create selected concrete non-fog parent items and story subitems in their capability groups without milestone values.
211
- 8. Set known board columns for kind/capability/epic metadata when available.
212
- 9. Add dependency-column values for real blockers.
213
- 10. Derive and set `Execution milestone` values from the complete dependency graph.
224
+ 1. Resolve board ID and inspect board metadata.
225
+ 2. Resolve only explicitly configured classification plus required capability, hierarchy, milestone, and dependency representations.
226
+ 3. Complete the in-memory hierarchy, graph, milestone, and representability preflight.
227
+ 4. Only after preflight passes, create required groups, items, and subitems.
228
+ 5. Set only explicitly configured classification metadata.
229
+ 6. Map planned keys to provider ids, add dependency values, and set already-derived milestones.
214
230
 
215
231
  ## Notes
216
232
 
217
233
  - monday.com column IDs and label names are board-specific. Always inspect the board before emitting final create payloads.
218
234
  - Groups are the primary capability-module container. The separate `Execution milestone` column stores chronology.
219
- - The `Kind` column is canonical for fog, grilling, research, prototype, epic, and story. Labels or other columns may mirror it, but workflow state remains separate.
235
+ - A configured `Kind` column may represent fog, grilling, research, prototype, epic, and story for this board; it is not a shared cross-provider requirement. Keep workflow state separate.
220
236
  - Keep product backlog content in item/subitem bodies. Do not put plan tasks, file paths, validation commands, or implementation handoffs in monday.com backlog records.
@@ -0,0 +1,20 @@
1
+ # Durable Report
2
+
3
+ Use this optional mode when research must remain reusable beyond the response.
4
+ Ordinary audits remain response-only.
5
+
6
+ ## Contract
7
+
8
+ 1. Create `research/<slug>` from the accepted base.
9
+ 2. Discover the repository's research-report convention. If none exists, use
10
+ the narrowest fitting project-docs path and state it.
11
+ 3. Run 2-4 readonly lanes. Lanes never write the report.
12
+ 4. After synthesis, the coordinator or one designated consolidator writes one
13
+ Markdown report. There is exactly one writer and one consolidated report.
14
+ 5. Cite the primary source for every retained factual claim. Separate facts,
15
+ inferences, conflicts, and unresolved product decisions.
16
+ 6. Commit the report, then push or explicitly retain `research/<slug>` through a durable repository-approved mechanism.
17
+ 7. Verify the retained ref contains the report commit before returning the immutable commit SHA and path.
18
+
19
+ The report may close factual uncertainty. It must not silently choose product
20
+ direction or impersonate a human decision-maker.
@@ -12,7 +12,18 @@ Use this skill only for readonly workflows. Goal: widen coverage fast, keep prom
12
12
  1. Confirm the task is readonly.
13
13
  2. Confirm the work can be split into independent questions or areas.
14
14
  3. Keep the immediate blocking step local. Delegate only sidecar work that can run in parallel.
15
- 4. Skip this skill for code writing, patching, rebases, commits, or tightly coupled debugging that needs one continuous thread.
15
+ 4. Skip this skill for source or code mutation, patching, rebases, unrelated
16
+ writes, or tightly coupled debugging that needs one continuous thread. The
17
+ one retained durable-report commit allowed below does not trigger this skip.
18
+ 5. Default to response-only output. Use the optional durable mode only when the
19
+ user or calling phase needs reusable primary evidence; then read
20
+ [DURABLE-REPORT.md](DURABLE-REPORT.md).
21
+ Research lanes remain readonly. Only the coordinator or one designated
22
+ consolidator may write and commit exactly one report after synthesis.
23
+ The writer must push or explicitly retain `research/<slug>`, verify the retained ref contains the report commit, and do so before returning the immutable SHA and path.
24
+ Finder child resolution always selects durable mode because reconciliation
25
+ requires immutable evidence. Standalone audits remain response-only unless
26
+ their caller explicitly requests reusable evidence.
16
27
 
17
28
  ## Split Cleanly
18
29
 
@@ -41,7 +52,7 @@ Use this skill only for readonly workflows. Goal: widen coverage fast, keep prom
41
52
 
42
53
  - Compare outputs against the repo, docs, or other primary artifacts.
43
54
  - Resolve disagreements with evidence, not majority vote.
44
- - Follow important claims back to their owning source before relying on them.
55
+ - Follow every retained factual claim back to its primary source.
45
56
  - Extract the few facts that matter, then decide locally.
46
57
  - Close agents that are no longer needed.
47
58
 
@@ -69,3 +80,4 @@ Return:
69
80
  - conflicts or uncertainty
70
81
  - the synthesized conclusion
71
82
  - the next local action
83
+ - durable report immutable SHA, path, and verified retention reference, when durable mode was selected
@@ -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.
@@ -1,31 +1,67 @@
1
1
  # Logic Prototype
2
2
 
3
- Use this branch when the question is about business logic, state transitions, or data shape.
3
+ A single, self-contained HTML file — a **shareable demo** — that lets anyone drive a state model by clicking buttons. Use this when the question is about **business logic, state transitions, or data shape** — the kind of thing that looks reasonable on paper but only feels wrong once you push it through real cases.
4
+
5
+ Because it's one file with nothing to install, you can hand it to a non-developer — a designer, a PM, a domain expert — and let them feel the model for themselves. So it speaks their language, not the code's.
6
+
7
+ ## When this is the right shape
8
+
9
+ - "I'm not sure if this state machine handles the edge case where X then Y."
10
+ - "Does this data model actually let me represent the case where..."
11
+ - "I want to feel out what the API should look like before writing it."
12
+ - Anything where someone wants to **press buttons and watch state change**.
13
+
14
+ If the question is "what should this look like" — wrong branch. Use [UI.md](UI.md).
4
15
 
5
16
  ## Process
6
17
 
7
- 1. State the question in the prototype location. Name the state model and the question being tested.
8
- 2. Use the host project's language and tooling. Do not add a new runtime just for the prototype.
9
- 3. Isolate the logic behind a small pure interface that could be lifted into real code later.
10
- 4. Build the smallest terminal UI that exposes current state and available actions.
11
- 5. Re-render the full state after every action. Keep the frame small enough to fit on one screen.
12
- 6. Add one existing task-runner command to start it.
13
- 7. Hand the command to the user so they can drive it.
14
- 8. Capture the answer before deleting or absorbing the prototype.
18
+ ### 1. State the question
19
+
20
+ Before writing code, write down what state model and what question you're prototyping. One paragraph, at the top of the demo (in a visible intro, not just a comment). A logic prototype that answers the wrong question is pure waste — make the question explicit so it can be checked later, whether the user is watching now or returning to it AFK.
21
+
22
+ ### 2. Isolate the logic in a portable module
23
+
24
+ Put the actual logic — the bit that's answering the question — in a single `<script>` block written as a small, pure module that could be lifted out and dropped into the real codebase later. The page around it is throwaway; this module isn't.
25
+
26
+ The right shape depends on the question:
27
+
28
+ - **A pure reducer** — `(state, action) => state`. Good when actions are discrete events and state is a single value.
29
+ - **A state machine** — explicit states and transitions. Good when "which actions are even legal right now" is part of the question.
30
+ - **A small set of pure functions** over a plain data type. Good when there's no implicit current state — just transformations.
31
+ - **A class or module with a clear method surface** when the logic genuinely owns ongoing internal state.
32
+
33
+ Pick whichever shape best fits the question being asked, *not* whichever is easiest to wire to a page. Keep it pure: no DOM, no `document`, no button handlers reaching inside it. The page calls into it; nothing flows the other direction. This is what makes the prototype useful past its own lifetime: once the question's answered, the validated reducer / machine / function set lifts into the real module on its own.
34
+
35
+ ### 3. Build the shareable HTML file
36
+
37
+ One file, plain HTML/CSS/JS — no framework, no bundler, no server, everything inline so it opens by double-click and survives being emailed around. Anyone should be able to run it by opening it.
38
+
39
+ Write it for a non-developer. Every label is in **domain language**, not code — buttons and state read like the business, not the reducer. Explain in plain words what's happening.
40
+
41
+ Lay it out with a clean hierarchy, top to bottom:
42
+
43
+ 1. **Title and one-line explanation** of what this demo lets you explore (the question from step 1).
44
+ 2. **Current state** — the full relevant state, rendered as a readable panel (labelled fields, not a raw JSON dump), re-rendered after every click so the change is visible. Where it helps a non-developer follow, call out what just changed.
45
+ 3. **Free-play buttons** — one button per action, always available, so anyone can poke at the model in any order. Each click dispatches its action and re-renders the state.
46
+ 4. **Guided walkthroughs** — a set of **scenarios**, one per tab. Each tab holds a short plain-language description of the scenario — the situation it sets up and what to watch for — and underneath it, the ordered **buttons to press** for that scenario. Each step is a real button: clicking it performs that action and moves to the next step. Starting a walkthrough resets to a known initial state so the scenario runs the same way every time.
47
+
48
+ Choose scenarios that demonstrate the awkward cases — the happy path, a tricky edge case, an attempt at something that should be illegal — the ones hard to reason about on paper.
49
+
50
+ Keep it beautiful but restrained: clean typography, generous spacing, one accent colour. No animations, no gimmicks — nothing that competes with the state and the buttons.
51
+
52
+ ### 4. Hand it over
15
53
 
16
- ## Portable Logic Shapes
54
+ Send them the file, or open it for them. They'll click through the walkthroughs and free-play whenever they get to it; the interesting moments are when they say "wait, that shouldn't be possible" or "huh, I assumed X would be different" — those are the bugs in the _idea_, which is the whole point. If they want new actions or a new scenario, add them. Prototypes evolve.
17
55
 
18
- - Pure reducer: `(state, action) => state`.
19
- - State machine: explicit states and transitions.
20
- - Pure functions over plain data.
21
- - Small class or module with a clear method surface when the logic owns internal state.
56
+ ### 5. Capture the answer and the prototype
22
57
 
23
- Keep terminal code outside the portable logic.
58
+ Once the prototype has answered its question, capture the answer, then capture the prototype the way the [SKILL](SKILL.md) describes. The logic-specific mapping: the validated reducer / machine / function set lifts into the real module (the decision, absorbed); the HTML shell rides along to the throwaway branch that keeps the prototype as a primary source — and being one self-contained file, it stays trivially re-runnable there.
24
59
 
25
- ## Anti-Patterns
60
+ ## Anti-patterns
26
61
 
27
- - Adding tests.
28
- - Wiring to the real database unless persistence is the question.
29
- - Generalizing for future cases.
30
- - Mixing prompts, terminal escape codes, or `console.log` control flow into the portable logic.
31
- - Shipping the terminal shell into production.
62
+ - **Don't add tests.** A prototype that needs tests is no longer a prototype.
63
+ - **Don't wire it to the real database.** Use in-memory state unless the question is specifically about persistence.
64
+ - **Don't generalise.** No "what if we wanted to support X later." The prototype answers one question.
65
+ - **Don't blur the logic and the page together.** If the pure module references the DOM, `document`, or button handlers, it's no longer liftable. Keep the page as a thin shell over a pure module.
66
+ - **Don't reach for a framework, bundler, or server.** One file the recipient double-clicks; a React app or a dev server defeats "shareable".
67
+ - **Don't ship the HTML shell into production.** The page is optimised for being clicked through by hand. The logic module behind it is the bit worth keeping.
@@ -1,31 +1,33 @@
1
1
  ---
2
2
  name: prototype
3
- description: Build a throwaway prototype to answer a design question: a terminal app for logic or state, or several UI variations on one route.
3
+ description: Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Prototype
8
8
 
9
- A prototype is throwaway code that answers a question. The question decides the shape.
9
+ A prototype is **throwaway code that answers a question**. The question decides the shape.
10
10
 
11
- ## Pick A Branch
11
+ ## Pick a branch
12
12
 
13
- Identify which question is being answered from the user's prompt, surrounding code, or by asking if the user is around:
13
+ Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around:
14
14
 
15
- - **Does this logic or state model feel right?** Read [LOGIC.md](LOGIC.md). Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
16
- - **What should this look like?** Read [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
15
+ - **"Does this logic / state model feel right?"** → [LOGIC.md](LOGIC.md). Build a single shareable HTML file — free-play buttons plus tabbed guided walkthroughs — that pushes the state machine through cases that are hard to reason about on paper, and that a non-developer can drive.
16
+ - **"What should this look like?"** → [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
17
17
 
18
- The two branches produce different artifacts. If the question is genuinely ambiguous and the user is not reachable, default to whichever branch better matches the surrounding code: backend module means logic; page or component means UI. State the assumption at the top of the prototype.
18
+ The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.
19
19
 
20
- ## Rules
20
+ ## Rules that apply to both
21
21
 
22
- 1. Mark it as throwaway from day one. Locate the prototype near the module or page it explores, and name it so a reader can see it is not production.
23
- 2. Provide one command to run. Use the project's existing task runner.
24
- 3. Use in-memory state by default. If persistence is the question, use a scratch DB or local file clearly named as prototype data.
25
- 4. Skip polish. No tests, no production abstractions, and no error handling beyond what makes the prototype runnable.
26
- 5. Surface the relevant state after every action or variant switch.
27
- 6. Delete or absorb the prototype when it has answered the question.
22
+ 1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
23
+ 2. **Trivial to run.** A UI prototype starts from one command in the project's task runner — `pnpm <name>`, `python <path>`, `bun <path>`, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it.
24
+ 3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
25
+ 4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.
26
+ 5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
27
+ 6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source** on a throwaway branch named `prototype/<slug>`, out of main. Commit the runnable artifact before requesting a verdict; prototype code is never merged into production unchanged.
28
+ 7. **Retain it remotely.** Push `prototype/<slug>` to the configured remote, or use an explicit durable retention mechanism when remote branches are forbidden. Verify the remote ref contains the evidence commit before returning the immutable commit SHA and path.
29
+ 8. **Leave a context pointer.** Link the retained branch or ref from the implementation issue. Capture the answer — the verdict and the question it settled — in the issue or a commit. The main branch keeps only the validated decision.
28
30
 
29
31
  ## Done
30
32
 
31
- Capture the answer somewhere durable, along with the question it answered. If the user is around, capture it in conversation. If not, leave a `NOTES.md` next to the prototype so the verdict can be filled in before deletion.
33
+ Return the run instruction, branch, immutable commit SHA, artifact path, remote retention reference, and the question still awaiting a human verdict. A caller such as `prototype-phase` owns accept, iterate, or reject and records `PROTOTYPE-VERDICT.md` beside the artifact on the throwaway branch.
@@ -15,15 +15,22 @@ Prefer sub-shape A.
15
15
 
16
16
  1. State the question and variant count. Default to three variants and cap at five.
17
17
  2. Generate radically different variants. They should differ in layout, information hierarchy, and primary affordance, not only color or copy.
18
- 3. Wire variants through a single route switcher keyed by `?variant=`.
19
- 4. Build a floating bottom-center switcher with previous and next arrows, current variant label, URL updates, and left/right keyboard shortcuts.
18
+ 3. Wire variants through a single route switcher keyed by `?variant=`. The URL
19
+ is shareable and the selected variant survives reload.
20
+ 4. Build a floating bottom-center switcher with previous and next arrows,
21
+ current variant label, URL updates, and left/right keyboard shortcuts. Ignore
22
+ shortcuts while focus is in `input`, `textarea`, `select`, or
23
+ `[contenteditable]`.
20
24
  5. Hide the switcher from production builds.
21
- 6. Share the URL and variant keys with the user.
22
- 7. Capture the winning direction, then delete losing variants and the switcher or promote the winner into real code.
25
+ 6. Stub mutations at the UI boundary. Never write production data from a
26
+ prototype variant.
27
+ 7. Share the URL and variant keys with the user.
28
+ 8. Capture the winning direction. Promotion means rewriting the accepted design
29
+ as production code; never merge prototype variants unchanged.
23
30
 
24
31
  ## Anti-Patterns
25
32
 
26
33
  - Variants that differ only in color or copy.
27
34
  - Sharing so much layout code that variants cannot disagree structurally.
28
- - Wiring variants to real mutations.
35
+ - Wiring variants to real mutations instead of stubbed mutations.
29
36
  - Promoting prototype code directly to production without rewriting it properly.
@@ -0,0 +1,11 @@
1
+ # Upstream provenance
2
+
3
+ Adapted from [`mattpocock/skills`](https://github.com/mattpocock/skills/tree/2ffb184ffbb752faa664c0b204f3c9241b1428e9/skills/engineering/prototype) 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.
10
+
11
+ Devpunks keeps the upstream single-file HTML logic demo and adds the local `prototype/<slug>` branch, remote-retention verification, immutable-SHA handoff, and `prototype-phase` verdict contract.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: effect
3
3
  description: |
4
- Opinionated guide for building production TypeScript applications with Effect v4. Use when implementing Effect workflows, services, layers, schemas, configuration, schedules, caches, streams, HTTP clients, or tests.
4
+ Opinionated guide for building production TypeScript applications with Effect v4 outside service design. Use when implementing Effect workflows, schemas, configuration, schedules, caches, streams, HTTP clients, Effect Atom, observability, scoped background work, or deterministic tests. Use effect-service-design alongside it for Effect services and Layers.
5
5
  license: MIT
6
6
  compatibility: Requires Effect v4. Examples are reviewed against the version documented in this repository.
7
7
  ---
@@ -23,13 +23,14 @@ Check these before guessing:
23
23
  Read only the branch references that match the task.
24
24
 
25
25
  - Data models, schemas, brands, variants, optional keys, or decoders: read `references/SCHEMA.md`.
26
- - Services, module surfaces, layers, runtime wiring, errors, `Effect.fn`, or test services: read `references/SERVICES_LAYERS.md`.
26
+ - Service qualification, contracts, construction, Layers, requirement propagation, test substitutes, or service audits: use `$effect-service-design`.
27
+ - Module namespace surfaces, scoped long-lived work, whole-function `Effect.fn` transforms, or operation error helpers: read `references/SERVICES_LAYERS.md`.
27
28
  - Runtime config, env variables, `ConfigProvider`, or `layerConfig`: read `references/CONFIG.md`.
28
29
  - Retry, repeat, polling, backoff, jitter, rate-limit-aware policies, or pass loops: read `references/SCHEDULING.md`.
29
30
  - Memoization, per-key TTL caches, deduplicating concurrent lookups, or request batching: read `references/CACHING.md`.
30
31
  - Streams, event sources, async iterables, queues/pubsubs, pagination, backpressure, or stream consumers: read `references/STREAMS.md`.
31
32
  - Outgoing HTTP calls, Effect HttpClient, status handling, or HTTP rate limiting: read `references/HTTP_CLIENTS.md`.
32
- - Effect tests, time, sleeps, concurrency synchronization, or fakes: read `references/TESTING.md`.
33
+ - Effect tests, time, sleeps, or concurrency synchronization: read `references/TESTING.md`.
33
34
  - Effect-Atom data fetching, mutations, or React server state: read `references/EFFECT_ATOM.md`.
34
35
  - Effect logging, tracing, spans, or observability: read `references/OBSERVABILITY.md`.
35
36
 
@@ -38,17 +39,14 @@ If a task spans several branches, read all matching files before editing.
38
39
  ## Core Defaults
39
40
 
40
41
  - Compose workflows with `Effect.gen(function* () { ... })`.
41
- - Define public service methods and non-trivial internal service methods with `Effect.fn("Domain.operation")`.
42
42
  - Use `Effect.fnUntraced` only for internal helpers where stack-frame/span metadata is intentionally unnecessary.
43
- - Prefer `Context.Service` for application services when the codebase has not standardized on another current service-tag style.
44
- - Build real service implementations with `Layer.effect(Service, Effect.gen(...))` and return `Service.of({ ... })`.
45
43
  - Model records with `Schema.Struct(...)` plus a same-name `interface`.
46
44
  - Model typed Effect errors with `Schema.TaggedErrorClass`.
47
45
  - Read runtime config through `Config`, not direct `process.env` access in application logic.
48
46
  - Use `Schedule` for retry, repeat, polling, pacing, and backoff policies.
49
47
  - Use `Stream` for effectful sources that emit many values over time and need pull, backpressure, interruption, or transformation.
50
48
  - Prefer Effect HTTP client modules for outgoing HTTP in Effect applications when their typed errors, layers, and client transforms are useful.
51
- - Prefer Effect-aware tests, explicit layers, and deterministic synchronization over sleeps.
49
+ - Prefer Effect-aware tests and deterministic synchronization over sleeps.
52
50
  - Prefer decoders and `schema.makeEffect(...)` at untrusted boundaries; reserve throwing `schema.make(...)` for trusted construction, and never use casts to skip validation.
53
51
 
54
52
  ## Quick Selection Guide
@@ -61,8 +59,6 @@ If a task spans several branches, read all matching files before editing.
61
59
  - External/custom discriminator such as `type`: `Schema.Struct({ type: Schema.tag("variant"), ... })` plus `Schema.toTaggedUnion("type")` when union helpers are needed.
62
60
  - Expected typed failure: `Schema.TaggedErrorClass`.
63
61
  - Unknown boundary payload: `Schema.decodeUnknownEffect(...)`.
64
- - Service boundary: `Context.Service<Service, Interface>()(...)` plus `Layer.effect(...)` plus `Service.of(...)`.
65
- - Public or non-trivial internal service method: `Effect.fn("Domain.operation")`.
66
62
  - Runtime configuration: `Config` recipes read in layers; override with `ConfigProvider` in tests.
67
63
  - Event source: `Stream` consumed with `Stream.runForEach(...)` and forked with `Effect.forkScoped` in the owning layer.
68
64
  - Queue-backed event source: `Queue` for the producer boundary, `Stream.fromQueue(...)` for consumers.
@@ -80,7 +76,6 @@ If a task spans several branches, read all matching files before editing.
80
76
  ## Boundary Rules
81
77
 
82
78
  - Keep HTTP handlers thin: decode input, read context, call services, map typed errors to transport responses.
83
- - Keep business rules in services or domain functions, not transport handlers.
84
79
  - Wrap HTTP clients, SDKs, CLIs, and external integrations in named effects at adapter boundaries.
85
80
  - Decode persisted rows with Schema or SQL-specific helpers when values are not trivially trusted.
86
81
  - Keep provider/network calls outside authoritative database transactions.
@@ -94,7 +89,5 @@ If a task spans several branches, read all matching files before editing.
94
89
  - Do not introduce `Schema.Class` or `Schema.TaggedClass` as default app data-modeling patterns.
95
90
  - Do not hand-roll `_tag` error classes when `Schema.TaggedErrorClass` fits.
96
91
  - Do not use cause-level recovery when typed-error recovery is enough.
97
- - Do not use `Layer.mergeAll(...)` or `provideMerge(...)` as blind make-it-compile tools.
98
- - Do not hide required application authority, credentials, persistence, transports, or external services behind `Context.Reference` defaults.
99
92
  - Do not add arbitrary `Effect.sleep(...)` to tests when a deterministic synchronization primitive is available.
100
93
  - Do not hand-roll Map/TTL/prune caches or in-flight dedupe when `effect/Cache` fits.
@@ -10,18 +10,13 @@ export const dataDirectoryConfig = Config.schema(
10
10
  "APP_DATA_DIR",
11
11
  )
12
12
 
13
- export const layerFromEnvironment = Layer.effect(
14
- Configuration.Service,
15
- Effect.gen(function* () {
16
- const apiKey = yield* Config.redacted("API_KEY")
17
- const optionalModel = yield* Config.option(Config.string("MODEL"))
18
- const enabled = yield* Config.boolean("FEATURE_ENABLED").pipe(
19
- Config.withDefault(false),
20
- )
21
-
22
- return Configuration.Service.of({ apiKey, optionalModel, enabled })
23
- }),
24
- )
13
+ export const appConfig = Config.all({
14
+ apiKey: Config.redacted("API_KEY"),
15
+ optionalModel: Config.option(Config.string("MODEL")),
16
+ enabled: Config.boolean("FEATURE_ENABLED").pipe(
17
+ Config.withDefault(false),
18
+ ),
19
+ })
25
20
  ```
26
21
 
27
22
  ## Config Recipes
@@ -53,15 +48,11 @@ Library-style layers often expose both concrete `layer(options)` and config-back
53
48
  export const layerConfig = (
54
49
  config: Config.Wrap<ClientOptions>,
55
50
  ) =>
56
- Layer.effect(
57
- Client.Service,
51
+ Layer.unwrap(
58
52
  Config.unwrap(config).pipe(
59
- Effect.flatMap(makeClient),
60
- Effect.map((client) => Client.Service.of(client)),
53
+ Effect.map(layer),
61
54
  ),
62
55
  )
63
56
  ```
64
57
 
65
- Use this pattern when a service naturally supports runtime config while still allowing tests to pass concrete values.
66
-
67
- Use `Layer.succeed(AppConfiguration.Service, testConfig)` when the app already wraps environment config in an application service and the test does not need to exercise Config decoding itself.
58
+ Use this pattern when a Layer naturally supports runtime config while still allowing callers to pass concrete values.