@punks/cli 3.1.2 → 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.
- package/dist/BASELINE_CHANGELOG.md +21 -0
- package/dist/CHANGELOG.md +46 -0
- package/dist/baseline/scaffold-baseline/baseline.json +4 -4
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +23 -3
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +26 -2
- package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +13 -0
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.mjs +862 -49
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +1295 -38
- package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +3 -1
- package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +20 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +3 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/SKILL.md +81 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-for-agents/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +27 -15
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/backlog-sync.md +19 -32
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +14 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/stop-conditions.md +2 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +51 -105
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +26 -57
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +41 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +15 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +3 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +21 -54
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +0 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +13 -15
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +7 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +4 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +9 -35
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/wayfinder/SKILL.md +11 -8
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +25 -73
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +54 -305
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +46 -55
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +33 -119
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +24 -14
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +53 -11
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +48 -26
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +53 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +49 -33
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +20 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/SKILL.md +14 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/LOGIC.md +57 -21
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/SKILL.md +17 -15
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/UI.md +12 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/research/prototype/UPSTREAM.md +11 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/SKILL.md +5 -12
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/TESTING.md +2 -72
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/SKILL.md +124 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/references/AUDIT.md +98 -0
- package/dist/baseline/scaffold-baseline/skills/misc/wait-what/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/misc/wait-what/SKILL.md +7 -0
- package/dist/baseline/scaffold-baseline/skills/misc/wait-what/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +31 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +5 -4
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/plan.md +6 -4
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +16 -14
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/spec.md +9 -5
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +9 -2
- package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +4 -4
- package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/prototype.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/phases/private-internal.md +3 -1
- package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/references/learning-artifacts.md +8 -1
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +24 -24
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/agents/openai.yaml +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/convergence.md +39 -0
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/frontier-lifecycle.md +22 -16
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/SKILL.md +34 -0
- package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/VERDICT-TEMPLATE.md +16 -0
- package/dist/baseline/scaffold-baseline/skills/phases/prototype-phase/agents/openai.yaml +2 -0
- package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +14 -57
- package/dist/baseline/scaffold-baseline.json +4 -4
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/hooks/format-edited-file.mjs +13 -0
- package/dist/data/scripts/sync-subagents.mjs +862 -49
- package/dist/data/subagents/manifest.mjs +3 -1
- package/dist/index.js +667 -194
- package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +4 -3
- package/dist/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +1 -1
- package/dist/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +3 -1
- package/dist/skills/agnostic/docs/writing-for-agents/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/dist/skills/agnostic/docs/writing-for-agents/SKILL.md +81 -0
- package/dist/skills/agnostic/docs/writing-for-agents/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +27 -15
- package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +19 -32
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +14 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +5 -1
- package/dist/skills/agnostic/planning/create-plan/references/stop-conditions.md +2 -1
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +51 -105
- package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +26 -57
- package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -3
- package/dist/skills/agnostic/planning/create-spec/references/readiness.md +41 -0
- package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +15 -6
- package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +3 -3
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +21 -54
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +0 -4
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +13 -15
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +7 -4
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +4 -2
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +9 -35
- package/dist/skills/agnostic/planning/wayfinder/SKILL.md +11 -8
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -3
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +25 -73
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +54 -305
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +46 -55
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +33 -119
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +24 -14
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +53 -11
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +48 -26
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +53 -12
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +49 -33
- package/dist/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +20 -0
- package/dist/skills/agnostic/research/parallel-research/SKILL.md +14 -2
- package/dist/skills/agnostic/research/prototype/LICENSE +21 -0
- package/dist/skills/agnostic/research/prototype/LOGIC.md +57 -21
- package/dist/skills/agnostic/research/prototype/SKILL.md +17 -15
- package/dist/skills/agnostic/research/prototype/UI.md +12 -5
- package/dist/skills/agnostic/research/prototype/UPSTREAM.md +11 -0
- package/dist/skills/frameworks/effect/effect/SKILL.md +5 -12
- package/dist/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
- package/dist/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
- package/dist/skills/frameworks/effect/effect/references/TESTING.md +2 -72
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
- package/dist/skills/frameworks/effect/effect-service-design/LICENSE +21 -0
- package/dist/skills/frameworks/effect/effect-service-design/SKILL.md +124 -0
- package/dist/skills/frameworks/effect/effect-service-design/references/AUDIT.md +98 -0
- package/dist/skills/misc/wait-what/LICENSE +21 -0
- package/dist/skills/misc/wait-what/SKILL.md +7 -0
- package/dist/skills/misc/wait-what/UPSTREAM.md +9 -0
- package/dist/skills/phases/delivery-phase/SKILL.md +4 -3
- package/dist/skills/phases/delivery-phase/phases/backlog.md +31 -0
- package/dist/skills/phases/delivery-phase/phases/implement.md +5 -4
- package/dist/skills/phases/delivery-phase/phases/plan.md +6 -4
- package/dist/skills/phases/delivery-phase/phases/router.md +16 -14
- package/dist/skills/phases/delivery-phase/phases/spec.md +9 -5
- package/dist/skills/phases/delivery-phase/references/artifact-state.md +9 -2
- package/dist/skills/phases/design-phase/phases/backlog.md +4 -4
- package/dist/skills/phases/design-phase/phases/prototype.md +1 -1
- package/dist/skills/phases/docs-ingest-phase/phases/private-internal.md +3 -1
- package/dist/skills/phases/docs-ingest-phase/references/learning-artifacts.md +8 -1
- package/dist/skills/phases/finder-phase/SKILL.md +24 -24
- package/dist/skills/phases/finder-phase/agents/openai.yaml +1 -1
- package/dist/skills/phases/finder-phase/references/convergence.md +39 -0
- package/dist/skills/phases/finder-phase/references/frontier-lifecycle.md +22 -16
- package/dist/skills/phases/finder-phase/references/root-routing.md +3 -2
- package/dist/skills/phases/prototype-phase/SKILL.md +34 -0
- package/dist/skills/phases/prototype-phase/VERDICT-TEMPLATE.md +16 -0
- package/dist/skills/phases/prototype-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/requirements-phase/SKILL.md +14 -57
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-great-skills/GLOSSARY.md +0 -69
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/writing-great-skills/SKILL.md +0 -61
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/backlog-sync.md +0 -49
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/discovery.md +0 -54
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/grill-phase.md +0 -42
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/questioning.md +0 -51
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/sequential.md +0 -48
- package/dist/skills/agnostic/docs/writing-great-skills/GLOSSARY.md +0 -69
- package/dist/skills/agnostic/docs/writing-great-skills/SKILL.md +0 -61
- package/dist/skills/agnostic/planning/create-spec/references/backlog-sync.md +0 -49
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +0 -54
- package/dist/skills/agnostic/planning/create-spec/references/grill-phase.md +0 -42
- package/dist/skills/agnostic/planning/create-spec/references/questioning.md +0 -51
- 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
|
-
-
|
|
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
|
-
##
|
|
49
|
+
## Provider classification
|
|
50
|
+
|
|
51
|
+
Classification examples assume explicit configuration.
|
|
43
52
|
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
+
When configured, set the classification column to `grilling`, `research`, or `prototype`.
|
|
82
101
|
|
|
83
|
-
Closure notes
|
|
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.
|
|
117
|
-
2.
|
|
118
|
-
3.
|
|
119
|
-
4.
|
|
120
|
-
5.
|
|
121
|
-
6.
|
|
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:
|
|
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
|
-
-
|
|
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
|
|
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
|
-
-
|
|
194
|
+
- source `US-###`
|
|
195
|
+
- covered `AC-###`
|
|
196
|
+
- demonstration
|
|
178
197
|
- non-goals
|
|
179
|
-
-
|
|
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.
|
|
206
|
-
3.
|
|
207
|
-
4.
|
|
208
|
-
5.
|
|
209
|
-
6.
|
|
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
|
-
-
|
|
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.
|
package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/DURABLE-REPORT.md
ADDED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
60
|
+
## Anti-patterns
|
|
26
61
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
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
|
|
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
|
|
9
|
+
A prototype is **throwaway code that answers a question**. The question decides the shape.
|
|
10
10
|
|
|
11
|
-
## Pick
|
|
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
|
|
16
|
-
- **What should this look like
|
|
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
|
|
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.
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
25
|
-
4. Skip polish
|
|
26
|
-
5. Surface the
|
|
27
|
-
6.
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
22
|
-
|
|
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,
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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.
|
package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect/references/CONFIG.md
CHANGED
|
@@ -10,18 +10,13 @@ export const dataDirectoryConfig = Config.schema(
|
|
|
10
10
|
"APP_DATA_DIR",
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
57
|
-
Client.Service,
|
|
51
|
+
Layer.unwrap(
|
|
58
52
|
Config.unwrap(config).pipe(
|
|
59
|
-
Effect.
|
|
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
|
|
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.
|