@juancr11/sibu 0.5.3 → 0.7.0

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 (67) hide show
  1. package/bin/admin/changelog.js +155 -0
  2. package/bin/admin/release.js +217 -0
  3. package/bin/entrypoints/cli/create-program.js +1 -1
  4. package/bin/entrypoints/cli/execute-command.js +6 -6
  5. package/bin/modules/interactive-guidance/index.js +1 -0
  6. package/bin/{shared → modules/interactive-guidance}/prompts.js +1 -1
  7. package/bin/modules/maintainer-release-support/generate-changelog/changelog-format.js +213 -0
  8. package/bin/modules/maintainer-release-support/generate-changelog/changelog-writer.js +91 -0
  9. package/bin/modules/maintainer-release-support/generate-changelog/git-history.js +93 -0
  10. package/bin/modules/maintainer-release-support/generate-changelog/handler.js +167 -0
  11. package/bin/modules/maintainer-release-support/generate-changelog/semver.js +40 -0
  12. package/bin/modules/maintainer-release-support/index.js +2 -0
  13. package/bin/modules/maintainer-release-support/release-workflow/git-release.js +114 -0
  14. package/bin/modules/maintainer-release-support/release-workflow/handler.js +369 -0
  15. package/bin/modules/maintainer-release-support/release-workflow/package-json.js +181 -0
  16. package/bin/modules/maintainer-release-support/release-workflow/release-plan.js +87 -0
  17. package/bin/{features/init-project → modules/project-adoption}/handler.js +3 -3
  18. package/bin/modules/project-adoption/index.js +1 -0
  19. package/bin/modules/skill-selection-management/index.js +3 -0
  20. package/bin/{features → modules/skill-selection-management}/list-skills/handler.js +4 -4
  21. package/bin/{features → modules/skill-selection-management}/stop-managing-file/handler.js +9 -8
  22. package/bin/modules/skill-selection-management/use-skill/command.js +1 -0
  23. package/bin/{features → modules/skill-selection-management}/use-skill/handler.js +7 -6
  24. package/bin/{features/sync-project → modules/sync-review}/apply-action.js +3 -3
  25. package/bin/modules/sync-review/command.js +1 -0
  26. package/bin/{features/sync-project → modules/sync-review}/handler.js +4 -4
  27. package/bin/modules/sync-review/index.js +5 -0
  28. package/bin/{shared → modules/sync-review}/sync-preview.js +4 -4
  29. package/bin/modules/template-catalog-rendering/index.js +1 -0
  30. package/bin/modules/template-catalog-rendering/templates.js +60 -0
  31. package/bin/modules/version-advisory/index.js +1 -0
  32. package/bin/{shared → modules/version-advisory}/npm-version.js +29 -2
  33. package/bin/modules/workflow-health-diagnosis/command.js +1 -0
  34. package/bin/{features/doctor-project → modules/workflow-health-diagnosis}/handler.js +8 -7
  35. package/bin/modules/workflow-health-diagnosis/index.js +1 -0
  36. package/bin/modules/workflow-mutation-readiness/index.js +1 -0
  37. package/bin/{shared → modules/workflow-mutation-readiness}/workflow-mutation-readiness.js +3 -3
  38. package/bin/modules/workflow-state-registry/index.js +1 -0
  39. package/bin/{shared → modules/workflow-state-registry}/state.js +1 -1
  40. package/bin/modules/workflow-target-planning/catalog.js +233 -0
  41. package/bin/modules/workflow-target-planning/index.js +2 -0
  42. package/bin/modules/workflow-target-planning/workflow-targets.js +125 -0
  43. package/bin/shared/catalog.js +0 -244
  44. package/bin/shared/paths.js +1 -12
  45. package/bin/shared/workflow-targets.js +3 -2
  46. package/package.json +5 -3
  47. package/templates/AGENTS.md +4 -1
  48. package/templates/manifest.json +33 -22
  49. package/templates/skills/ai-implementation-plan-executor/SKILL.md +93 -51
  50. package/templates/skills/ai-implementation-planner/SKILL.md +52 -8
  51. package/templates/skills/architecture/command-pattern/SKILL.md +38 -16
  52. package/templates/skills/architecture/ddd-hexagonal/SKILL.md +19 -4
  53. package/templates/skills/deep-module-map-writer/SKILL.md +241 -0
  54. package/templates/skills/feature-brief-writer/SKILL.md +86 -13
  55. package/templates/skills/product-vision-writer/SKILL.md +25 -0
  56. package/templates/skills/scrum-master-planner/SKILL.md +29 -0
  57. package/templates/skills/technical-design-writer/SKILL.md +48 -5
  58. package/templates/skills/ux-expert/SKILL.md +28 -0
  59. package/bin/features/sync-project/preview.js +0 -1
  60. /package/bin/{features/doctor-project/command.js → modules/cli-command-surface/index.js} +0 -0
  61. /package/bin/{features/init-project → modules/maintainer-release-support/generate-changelog}/command.js +0 -0
  62. /package/bin/{features/list-skills → modules/maintainer-release-support/release-workflow}/command.js +0 -0
  63. /package/bin/{features/stop-managing-file → modules/project-adoption}/command.js +0 -0
  64. /package/bin/{features/sync-project → modules/skill-selection-management/list-skills}/command.js +0 -0
  65. /package/bin/{features/use-skill → modules/skill-selection-management/stop-managing-file}/command.js +0 -0
  66. /package/bin/{features/sync-project → modules/sync-review}/action-prompt.js +0 -0
  67. /package/bin/{features/sync-project → modules/sync-review}/log-preview.js +0 -0
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: deep-module-map-writer
3
+ description: Create or update docs/deep-module-map.md as a map of deep, complexity-hiding implementation modules before feature brief work.
4
+ ---
5
+
6
+ # Deep Module Map Writer
7
+
8
+ ## Purpose
9
+
10
+ Create or update `docs/deep-module-map.md`, a technical design map of deep implementation modules that downstream technical designs, feature briefs, and implementation plans use to decide where code work belongs.
11
+
12
+ A Deep Module is primarily a technical design concept from software architecture: a module with a small, simple interface and a larger, more complex implementation hidden behind it. In this artifact, Deep Modules may align with product responsibilities, but their depth comes from technical abstraction and complexity hiding, not from being a product category, command, folder, service, or team boundary.
13
+
14
+ This skill owns the Deep Module Map only. It does not own feature briefs, technical designs, user stories, implementation plans, production code, or the internal architecture used inside each module.
15
+
16
+ ## Pipeline Contract
17
+
18
+ ### What this skill needs
19
+
20
+ - `docs/product-vision.md`.
21
+ - Existing `docs/deep-module-map.md` when revising the map.
22
+ - Enough user interview context to identify candidate technical modules, the simple interface each module should expose to the rest of the app, the complexity each module should hide, boundaries, scenarios, relationships, and cross-module rules.
23
+
24
+ ### What this skill writes
25
+
26
+ - `docs/deep-module-map.md`.
27
+
28
+ ### When this skill stops
29
+
30
+ - `docs/product-vision.md` is missing; tell the user to create it first with `product-vision-writer`.
31
+ - The request belongs to another pipeline stage, such as feature brief, technical design, UX design, Scrum planning, implementation planning, or implementation execution.
32
+ - User answers are still too vague to defend module depth, interfaces, hidden complexity, or boundaries; ask one focused question instead of drafting.
33
+
34
+ ### What this skill must not do
35
+
36
+ - Do not create feature briefs, technical designs, UX specs, Epics, User Stories, implementation plans, or production code.
37
+ - Do not choose a specific internal architecture, service split, database model, framework, or team ownership structure.
38
+ - Do not ask for or require a final confirmation summary before writing once enough Deep Module Map information is available.
39
+ - Do not invent Deep Modules without grounding them in the product vision, current system behavior, and user interview.
40
+ - Do not treat a command, screen, helper, folder, data object, or technical layer as a Deep Module merely because it exists.
41
+
42
+ ## What a Deep Module is
43
+
44
+ A Deep Module is a module whose interface is much simpler than its implementation.
45
+
46
+ Use this mental model:
47
+
48
+ ```txt
49
+ Deep Module = small/simple interface + substantial hidden implementation complexity
50
+ Shallow Module = interface nearly as complex as the implementation it hides
51
+ ```
52
+
53
+ A module can be a function, class, package, subsystem, CLI workflow, or top-level code area. Size alone does not make a module deep. A large module can be shallow if callers must understand many details to use it, and a small module can be deep if it creates useful semantic distance between caller intent and implementation details.
54
+
55
+ For this map, identify deep modules that are useful as durable technical implementation boundaries. Product responsibilities can help discover them, but the module is only valid if it hides meaningful technical complexity behind a simpler interface. A good entry should answer:
56
+
57
+ ```txt
58
+ What simple capability should the rest of the app be able to rely on, and what messy details should be hidden behind that capability?
59
+ ```
60
+
61
+ A Deep Module is not automatically:
62
+
63
+ - a one-off feature
64
+ - a screen
65
+ - a command
66
+ - a workflow step
67
+ - a generic technical bucket such as `utils`, `api`, `db`, `shared`, or `services`
68
+ - a technical layer
69
+ - a required DDD Bounded Context
70
+ - a required service, package, database, or team boundary
71
+
72
+ Good Deep Modules:
73
+
74
+ - expose a small, stable interface to callers or neighboring modules
75
+ - hide complex decisions, orchestration, data handling, validation, or edge cases
76
+ - reduce how much other code must know
77
+ - have clear semantic distance between the module name/interface and the internal work it performs
78
+ - are stable enough to absorb related changes over time
79
+ - are broad enough to own meaningful behavior and narrow enough that boundaries are defensible
80
+
81
+ Use these tests:
82
+
83
+ - If callers can say what they want without knowing how it is done, the module may be deep.
84
+ - If the module hides several details that would otherwise leak into many callers, it may be deep.
85
+ - If using the module requires understanding almost the same steps as implementing it, it is probably shallow.
86
+ - If it only renames one obvious operation, it is probably shallow unless the name adds important semantic meaning for callers.
87
+ - If it describes one command, page, database object, helper folder, or implementation mechanism, it is probably too small or too technical for this map.
88
+ - If it only says "user control," "quality," "security," or another value that applies everywhere, it is probably a cross-module rule instead of a module.
89
+ - If two candidates cannot explain what interface and hidden complexity they own differently, merge or rename them.
90
+ - If future feature work would routinely ask "does this code belong here or there?", keep clarifying the boundary.
91
+
92
+ ## Required source of truth
93
+
94
+ Before doing any Deep Module Map work, read:
95
+
96
+ ```txt
97
+ docs/product-vision.md
98
+ ```
99
+
100
+ Use the product vision as the source of truth for purpose, audience, positioning, principles, boundaries, trust expectations, and success signals.
101
+
102
+ ## Hard start rule
103
+
104
+ Do not create or update a Deep Module Map if `docs/product-vision.md` is missing.
105
+
106
+ If the product vision is missing:
107
+
108
+ 1. Stop.
109
+ 2. Tell the user that a Deep Module Map requires `docs/product-vision.md`.
110
+ 3. Instruct the user to create the product vision first with `product-vision-writer`.
111
+ 4. Do not draft, infer, or save a module map until the product vision exists.
112
+
113
+ ## Output location
114
+
115
+ Write the map to:
116
+
117
+ ```txt
118
+ docs/deep-module-map.md
119
+ ```
120
+
121
+ This file is user-owned product and implementation-boundary content created or updated by this skill. It is not a Sibu-managed workflow template.
122
+
123
+ ## Interview posture
124
+
125
+ Be deliberately interrogative before writing.
126
+
127
+ - Ask one focused question at a time.
128
+ - Ask as many one-at-a-time questions as needed to understand the app well enough to defend the map.
129
+ - Do not rush to draft after a single answer unless the answer already makes interfaces, hidden complexity, boundaries, scenarios, and relationships clear.
130
+ - Treat "enough context" as: candidate modules, suggested slugs, simple external interfaces, hidden implementation complexity, responsibilities, exclusions, scenarios, relationships, and cross-module rules are clear enough to defend.
131
+ - Do not ask the user to name the Deep Modules up front. Most users do not know what the modules should be yet.
132
+ - Extract modules by asking about caller intent, complexity that should be hidden, product jobs, decisions, promises, lifecycle moments, confusing boundaries, and where code should stay coherent over time.
133
+ - Teach briefly as needed. If the user seems unsure, explain that a Deep Module hides a lot of implementation behind a simple interface, then ask the next question.
134
+ - Do not create modules from vague labels without confirming what interface they expose and what complexity they hide.
135
+ - If the conversation stalls, propose one concise assumption for the next unresolved point and ask the user to confirm or correct it.
136
+
137
+ ## Interview method
138
+
139
+ Derive candidate modules from answers. Do not make the user design the map from scratch.
140
+
141
+ Prefer questions like:
142
+
143
+ - "What should the rest of the app be able to ask this area to do in one simple phrase?"
144
+ - "What messy details should callers not need to know?"
145
+ - "If this were a good abstraction, what would its small public interface look like conceptually?"
146
+ - "What steps, checks, edge cases, or policies would be hidden behind that interface?"
147
+ - "Where are callers currently forced to know too much?"
148
+ - "What behavior changes for the same product reason and should stay together?"
149
+ - "What decisions should this module own, and which decisions should it not own?"
150
+ - "Where do you expect future implementation work to create boundary confusion?"
151
+ - "Is this a deep module, or is it just a command/helper/folder that exposes nearly as much complexity as it hides?"
152
+ - "If this behavior changed, what other modules would need to know?"
153
+ - "What module slug would be clear in code without forcing a specific architecture?"
154
+
155
+ Avoid questions like:
156
+
157
+ - "What bounded contexts should we use?"
158
+ - "What services should exist?"
159
+ - "What database boundaries should exist?"
160
+ - "What layers should this module have?"
161
+ - "What framework structure do you want?"
162
+
163
+ When a user gives a feature, command, screen, template, or technical mechanism, translate it into the possible deep abstraction it suggests and ask the user to confirm or correct the interface and hidden complexity.
164
+
165
+ Example:
166
+
167
+ ```txt
168
+ User: "sibu doctor checks for drift."
169
+ Assistant: "That sounds like it may belong to a workflow health module. Its simple interface could be 'check workflow health,' while it hides state loading, manifest comparison, file hashing, missing-file detection, and update advice. Is that the right abstraction, or does it leak too much into sync/adoption?"
170
+ ```
171
+
172
+ Ask enough follow-up to fill these fields for each module:
173
+
174
+ - Module name
175
+ - Suggested module slug
176
+ - Simple interface / outside promise
177
+ - Hidden complexity
178
+ - Owns
179
+ - Does not own
180
+ - Key scenarios
181
+ - Related modules
182
+ - Boundary notes
183
+
184
+ Also identify cross-module rules, especially values and policies that apply everywhere, such as user ownership, safety, transparency, local customization, quality, validation, and read-only vs mutating behavior.
185
+
186
+ ## Deep Module principles
187
+
188
+ Deep Modules should be:
189
+
190
+ - complexity-hiding abstractions with simple external interfaces
191
+ - deep enough that callers do not need to understand internal orchestration, edge cases, or policies
192
+ - technical design boundaries first, with product alignment used only where it helps explain why code changes together
193
+ - durable enough to absorb related technical and product changes over time
194
+ - named in language useful across technical design, implementation planning, feature briefs, and code organization
195
+ - flexible internally so different projects can use layered, DDD, Hexagonal, command-oriented, MVC, functional, or other architectures inside them
196
+
197
+ Avoid shallow modules based on one feature, screen, command, workflow step, database table, generic helper folder, technical layer, or thin wrapper around an obvious operation.
198
+
199
+ ## Workflow
200
+
201
+ 1. Read `docs/product-vision.md`.
202
+ 2. Read existing `docs/deep-module-map.md` if it exists.
203
+ 3. Ask one focused question at a time until the module direction is clear.
204
+ 4. Keep asking focused follow-up questions until the simple interface and hidden complexity of each candidate module are defensible.
205
+ 5. Write or update `docs/deep-module-map.md` once enough context is available.
206
+
207
+ ## Recommended map structure
208
+
209
+ ```md
210
+ # Deep Module Map
211
+
212
+ ## Purpose
213
+ <How this map guides technical design, feature briefs, and implementation boundaries.>
214
+
215
+ ## Modules
216
+
217
+ ### <Module Name>
218
+ - Suggested module slug:
219
+ - Simple interface / outside promise:
220
+ - Hidden complexity:
221
+ - Owns:
222
+ - Does not own:
223
+ - Key scenarios:
224
+ - Related modules:
225
+ - Boundary notes:
226
+
227
+ ## Cross-Module Rules
228
+ - <Rules for work that spans modules or needs a new module.>
229
+ ```
230
+
231
+ Adapt the structure when useful, but keep the map concise and module-focused. Do not omit the simple interface/outside promise or hidden complexity fields unless the user explicitly asks for another format.
232
+
233
+ ## Final response behavior
234
+
235
+ After writing the file, final-answer with only the path created or updated:
236
+
237
+ ```txt
238
+ docs/deep-module-map.md
239
+ ```
240
+
241
+ Do not paste the map body, excerpt, outline, or section summaries unless the user explicitly asks for inline review in the current request.
@@ -11,21 +11,52 @@ Create concise feature briefs that explain what a feature is, why it matters, wh
11
11
 
12
12
  This skill owns the product/business shape of a feature. It does not own UI interaction design, technical architecture, implementation plans, data models, APIs, or task breakdowns.
13
13
 
14
+ ## Pipeline Contract
15
+
16
+ ### What this skill needs
17
+
18
+ - `docs/product-vision.md`.
19
+ - `docs/deep-module-map.md`.
20
+ - Enough user-provided feature intent to define the feature problem, target user/scenario, business goal, MVP boundary, out-of-scope boundary, success signals, constraints, and Deep Module fit.
21
+
22
+ ### What this skill writes
23
+
24
+ - `docs/features/<feature-slug>/feature_brief.md`.
25
+ - The containing `docs/features/<feature-slug>/` directory when needed.
26
+
27
+ ### When this skill stops
28
+
29
+ - `docs/product-vision.md` is missing; tell the user to create it first with `product-vision-writer`.
30
+ - `docs/deep-module-map.md` is missing; tell the user to create it first with `deep-module-map-writer`.
31
+ - The feature appears to require a new or changed Deep Module; direct the user back to `deep-module-map-writer`.
32
+ - The request belongs to another pipeline stage, such as technical design, UX design, Scrum planning, implementation planning, or implementation execution.
33
+ - Current-stage feature intent is unclear; ask one focused question at a time until enough information is available.
34
+
35
+ ### What this skill must not do
36
+
37
+ - Do not create or update Deep Module Maps, technical designs, UX specs, Epics, User Stories, implementation plans, or production code.
38
+ - Do not invent Deep Modules or use modules that are absent from `docs/deep-module-map.md`.
39
+ - Do not require a final confirmation summary before writing once enough feature brief context is available.
40
+ - Do not duplicate or rewrite the product vision; apply only the relevant implications to the feature.
41
+
14
42
  ## Required source of truth
15
43
 
16
44
  Before doing any feature-brief work, read:
17
45
 
18
46
  ```txt
19
47
  docs/product-vision.md
48
+ docs/deep-module-map.md
20
49
  ```
21
50
 
22
51
  Use the product vision as the source of truth for the product's purpose, audience, positioning, principles, voice, boundaries, trust expectations, and success signals.
23
52
 
53
+ Use the Deep Module Map as the source of truth for where feature work belongs. Deep Modules answer “where does this work belong?” Do not invent Deep Modules in a feature brief.
54
+
24
55
  Do not duplicate or rewrite the product vision inside the feature brief. Apply it to the specific feature being defined.
25
56
 
26
57
  ## Hard start rule
27
58
 
28
- Do not start a feature brief if `docs/product-vision.md` is missing.
59
+ Do not start a feature brief if `docs/product-vision.md` or `docs/deep-module-map.md` is missing.
29
60
 
30
61
  If the product vision is missing:
31
62
 
@@ -34,6 +65,13 @@ If the product vision is missing:
34
65
  3. Instruct the user to create the product vision first with the `product-vision-writer` skill.
35
66
  4. Do not draft, infer, or save a feature brief until the product vision exists.
36
67
 
68
+ If the Deep Module Map is missing:
69
+
70
+ 1. Stop.
71
+ 2. Tell the user that a feature brief requires `docs/deep-module-map.md`.
72
+ 3. Instruct the user to create the map first with the `deep-module-map-writer` skill.
73
+ 4. Do not draft, infer, or save a feature brief until the map exists.
74
+
37
75
  ## Use this skill for
38
76
 
39
77
  - defining a new feature at the business/product level
@@ -56,9 +94,21 @@ Use a short kebab-case feature slug that matches the feature name. Keep all arti
56
94
 
57
95
  Do not write the brief to technical design, UX, user story, implementation plan, or backlog files unless the user explicitly asks for a separate artifact after the feature brief exists.
58
96
 
97
+ ## Interview posture
98
+
99
+ Be deliberately interrogative before drafting. The feature brief should reflect the user's intent, not the assistant's assumptions.
100
+
101
+ - Ask one focused question at a time.
102
+ - Keep asking until you have complete practical understanding and explicit user alignment.
103
+ - Prefer follow-up questions over filling gaps with plausible invention.
104
+ - Treat "100% understanding" as: feature intent, target user, scenario, user problem, business goal, MVP boundary, out-of-scope boundary, success signals, and known constraints are all clear enough to defend in the brief.
105
+ - Treat "enough context" as: feature intent, target user/scenario, desired outcome, MVP boundary, out-of-scope boundary, success signals, constraints, and Deep Module fit are clear enough to defend in the brief.
106
+ - If the user gives a partial answer, acknowledge the useful part and ask the next most important unresolved question.
107
+ - Do not ask a large questionnaire all at once.
108
+
59
109
  ## Workflow
60
110
 
61
- ### 1. Read the product vision
111
+ ### 1. Read the product vision and Deep Module Map
62
112
 
63
113
  Read `docs/product-vision.md` first and identify:
64
114
 
@@ -72,25 +122,40 @@ Read `docs/product-vision.md` first and identify:
72
122
 
73
123
  Use these as constraints for the feature brief.
74
124
 
75
- ### 2. Clarify vague feature intent before drafting
125
+ Then read `docs/deep-module-map.md` and identify which existing Deep Modules may own the requested feature. A feature brief must name one or more existing Deep Modules.
76
126
 
77
- Do not draft a feature brief from a vague request.
127
+ If no existing Deep Module fits:
128
+
129
+ 1. Stop before drafting.
130
+ 2. Tell the user the feature appears to require a Deep Module Map update.
131
+ 3. Provide this suggested prompt, adapted to the user's feature:
132
+
133
+ ```txt
134
+ Use deep-module-map-writer to update docs/deep-module-map.md for this feature: <feature summary>. Decide whether it belongs in an existing Deep Module or requires a new/changed module, then update the map only after confirming the responsibility boundary with me.
135
+ ```
136
+
137
+ 4. Do not draft, infer, or save a feature brief until the map is updated.
138
+
139
+ ### 2. Clarify feature intent before drafting
140
+
141
+ Do not draft a feature brief from a vague or merely plausible request.
78
142
 
79
143
  A request is too vague when the user gives only a broad area, product milestone, theme, or label such as "define the MVP," "write the onboarding feature," "make a sync feature," or "I want analytics" without enough detail to know what the user actually means.
80
144
 
81
- When feature intent is vague:
145
+ When feature intent is vague or incomplete:
82
146
 
83
147
  1. Stop before drafting.
84
148
  2. Explain briefly that the feature direction needs clarification before a responsible brief can be written.
85
149
  3. Ask one focused discovery question.
86
150
  4. Wait for the user's answer.
87
151
  5. Continue asking one question at a time until there is enough context to write a useful, product-vision-aligned brief.
152
+ 6. Draft once the missing information is clear enough to produce the feature brief.
88
153
 
89
154
  Do not ask the user to answer a large questionnaire all at once. Keep the interview conversational and focused.
90
155
 
91
156
  ### 3. Gather the minimum required feature context
92
157
 
93
- Ask only for missing information that materially affects the brief. Use as few questions as possible, one at a time when underdefined. Clarify:
158
+ Ask every question needed to remove material ambiguity, but only one at a time. Clarify:
94
159
 
95
160
  - what feature or capability the user wants
96
161
  - what the user means by broad labels such as MVP, onboarding, sync, analytics, or automation
@@ -102,7 +167,9 @@ Ask only for missing information that materially affects the brief. Use as few q
102
167
  - what should stay out of scope
103
168
  - known constraints, risks, or open decisions
104
169
 
105
- Draft only once feature intent, target user/scenario, desired outcome, and rough MVP boundary are clear enough to avoid invention.
170
+ Draft only once feature intent, target user/scenario, desired outcome, MVP boundary, out-of-scope boundary, success signals, constraints, and Deep Module fit are clear enough to avoid invention.
171
+
172
+ If the conversation stalls, offer a concise default assumption for the next unresolved point and ask the user to confirm or correct it before proceeding.
106
173
 
107
174
  ### 4. Write a business-level brief
108
175
 
@@ -119,6 +186,9 @@ Recommended structure:
119
186
  ## Product Vision Fit
120
187
  <How this feature supports the product vision, principles, audience, or positioning.>
121
188
 
189
+ ## Deep Module
190
+ <One or more existing Deep Modules from docs/deep-module-map.md that own this feature, with a brief fit rationale.>
191
+
122
192
  ## User / Customer Problem
123
193
  <The user need, pain, desire, or opportunity this feature addresses.>
124
194
 
@@ -181,6 +251,7 @@ If the file already exists, read it first. Treat the request as a revision when
181
251
  Aim for writing that is:
182
252
 
183
253
  - loyal to the required product vision
254
+ - explicit about which existing Deep Modules own the feature
184
255
  - specific to the user's feature
185
256
  - grounded in the product vision
186
257
  - concise
@@ -194,6 +265,7 @@ Avoid:
194
265
  - vague benefits without user or business grounding
195
266
  - feature lists without rationale
196
267
  - drafting from vague feature labels without discovery
268
+ - inventing new Deep Modules instead of stopping for a map update
197
269
  - inventing certainty where the product vision or user input is unresolved
198
270
 
199
271
  ## Decision rule
@@ -201,12 +273,13 @@ Avoid:
201
273
  When shaping a feature brief, prefer:
202
274
 
203
275
  1. alignment with `docs/product-vision.md`
204
- 2. clear user value
205
- 3. clear business or product outcome
206
- 4. simple MVP scope
207
- 5. honest boundaries and tradeoffs
208
- 6. measurable success signals
209
- 7. non-technical acceptance criteria
276
+ 2. fit with existing Deep Modules from `docs/deep-module-map.md`
277
+ 3. clear user value
278
+ 4. clear business or product outcome
279
+ 5. simple MVP scope
280
+ 6. honest boundaries and tradeoffs
281
+ 7. measurable success signals
282
+ 8. non-technical acceptance criteria
210
283
 
211
284
  ## Final response behavior
212
285
 
@@ -11,6 +11,31 @@ Help write product vision documents that make a product feel clear, intentional,
11
11
 
12
12
  Default output path: `docs/product-vision.md`.
13
13
 
14
+ ## Pipeline Contract
15
+
16
+ ### What this skill needs
17
+
18
+ - Enough user-provided product discovery to define or revise a product vision.
19
+ - No upstream pipeline artifact is required.
20
+ - If an existing `docs/product-vision.md` is being revised, read it first.
21
+
22
+ ### What this skill writes
23
+
24
+ - `docs/product-vision.md` by default.
25
+ - A different path only when the user explicitly requests one.
26
+
27
+ ### When this skill stops
28
+
29
+ - The user's intent is too unclear to ask a useful discovery question.
30
+ - Writing would overwrite an existing vision when the user appears to want a separate new vision.
31
+ - The request is for a downstream artifact such as a Deep Module Map, feature brief, technical design, UX spec, stories, implementation plan, or implementation work.
32
+
33
+ ### What this skill must not do
34
+
35
+ - Do not create Deep Module Maps, feature briefs, technical designs, UX specs, Epics, User Stories, implementation plans, or production code.
36
+ - Do not require a final confirmation summary before writing once enough product vision context is available.
37
+ - Do not pretend unresolved strategy questions are settled; ask a focused question or document a clear assumption.
38
+
14
39
  ## Workflow
15
40
 
16
41
  ### 1. Start with discovery, not drafting
@@ -11,6 +11,35 @@ Turn an approved feature brief and technical design into the smallest useful Scr
11
11
 
12
12
  This skill owns delivery planning artifacts. It does not own product vision, feature definition, technical design, code implementation, or project-management tool automation.
13
13
 
14
+ ## Pipeline Contract
15
+
16
+ ### What this skill needs
17
+
18
+ - `docs/features/<feature-slug>/feature_brief.md`.
19
+ - `docs/features/<feature-slug>/technical_design.md`.
20
+ - `docs/features/<feature-slug>/ux.md` only when the feature has UI impact.
21
+ - Enough source-artifact detail to create delivery slices without inventing product scope or implementation boundaries.
22
+
23
+ ### What this skill writes
24
+
25
+ - `docs/features/<feature-slug>/epics/<epic-slug>/epic_brief.md`.
26
+ - `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<user-story-slug>.md`.
27
+ - Supporting Epic and Story directories under the same feature tree when needed.
28
+
29
+ ### When this skill stops
30
+
31
+ - The feature brief or technical design is missing; direct the user to the owning prior stage.
32
+ - The feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
33
+ - A prior artifact is obviously incomplete or invalid in a way its owning stage should repair.
34
+ - The request belongs to another pipeline stage, such as product definition, technical design, UX design, implementation planning, or implementation execution.
35
+
36
+ ### What this skill must not do
37
+
38
+ - Do not create or update product visions, Deep Module Maps, feature briefs, technical designs, UX specs, implementation plans, or production code.
39
+ - Do not modify prior-stage artifacts.
40
+ - Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
41
+ - Do not add product scope or architecture decisions absent from the feature brief and technical design.
42
+
14
43
  ## Required inputs
15
44
 
16
45
  Before planning, read:
@@ -7,16 +7,48 @@ description: Use this skill to turn an approved feature brief into a concise, im
7
7
 
8
8
  Write the smallest useful technical design doc for an approved feature: enough for a human to understand the implementation direction and a later coding agent to know what to do next. Avoid filler, generic engineering advice, and restating other skills.
9
9
 
10
+ ## Pipeline Contract
11
+
12
+ ### What this skill needs
13
+
14
+ - A Markdown feature brief at `docs/features/<feature-slug>/feature_brief.md`.
15
+ - `docs/deep-module-map.md`.
16
+ - The feature brief's `## Deep Module` section naming one or more existing Deep Modules.
17
+ - Relevant existing repo files and flows needed to make implementation direction concrete.
18
+ - `docs/features/<feature-slug>/ux.md` only when the feature has UI impact.
19
+ - Relevant implementation guidance skills such as `clean-code`, selected architecture skills, language skills, or framework skills.
20
+
21
+ ### What this skill writes
22
+
23
+ - `docs/features/<feature-slug>/technical_design.md`.
24
+
25
+ ### When this skill stops
26
+
27
+ - The feature brief is missing or the user only has a vague feature idea; direct the user to `feature-brief-writer`.
28
+ - `docs/deep-module-map.md` is missing; direct the user to `deep-module-map-writer`.
29
+ - The feature brief does not name existing Deep Modules, or the selected modules are missing, ambiguous, or inconsistent with the map.
30
+ - The feature has UI impact and `docs/features/<feature-slug>/ux.md` is missing; direct the user to `ux-expert`.
31
+ - The request belongs to another pipeline stage, such as feature definition, UX design, Scrum planning, implementation planning, or implementation execution.
32
+
33
+ ### What this skill must not do
34
+
35
+ - Do not create or update product visions, Deep Module Maps, feature briefs, UX specs, Epics, User Stories, implementation plans, or production code.
36
+ - Do not invent new Deep Modules or move work into unselected modules.
37
+ - Do not redesign binding UX mockups.
38
+ - Do not duplicate architecture, language, framework, or clean-code skill guidance.
39
+ - Do not require a final confirmation summary before writing once enough technical design context is available.
40
+
10
41
  ## Grounding
11
42
 
12
43
  Before writing, read:
13
44
 
14
45
  1. `docs/product-vision.md`
15
- 2. the feature brief
16
- 3. `docs/features/<feature-slug>/ux.md` when the feature has UI impact
17
- 4. `clean-code`
18
- 5. any selected architecture, language, or framework skills that apply
19
- 6. relevant existing repo files and flows
46
+ 2. `docs/deep-module-map.md`
47
+ 3. the feature brief, including its `## Deep Module` section
48
+ 4. `docs/features/<feature-slug>/ux.md` when the feature has UI impact
49
+ 5. `clean-code`
50
+ 6. any selected architecture, language, or framework skills that apply
51
+ 7. relevant existing repo files and flows
20
52
 
21
53
  Apply those inputs. Do not summarize them back into the technical design unless a specific implication changes the implementation.
22
54
 
@@ -24,6 +56,10 @@ Apply those inputs. Do not summarize them back into the technical design unless
24
56
 
25
57
  Require a Markdown feature brief. If the user only has a vague idea, route to `feature-brief-writer` first.
26
58
 
59
+ Require `docs/deep-module-map.md`. If it is missing, stop and ask the user to create it with `deep-module-map-writer` first. Do not infer or invent Deep Modules.
60
+
61
+ Require the feature brief to name one or more existing Deep Modules. Preserve those selected modules in the technical design; if they appear missing, ambiguous, or inconsistent with the map, stop and ask the user to update the feature brief or Deep Module Map first.
62
+
27
63
  If the feature has UI impact, require `docs/features/<feature-slug>/ux.md`. If it is missing, stop and ask the user to create the UX spec with `ux-expert` first.
28
64
 
29
65
  ## UX binding rule
@@ -34,6 +70,8 @@ For UI-related features, `ux.md` is source context, not inspiration. If `ux.md`
34
70
 
35
71
  Translate product intent into implementation direction.
36
72
 
73
+ Deep Modules answer “where does this implementation work belong?” Architecture guidance answers “how is that module structured internally?” Translate the feature brief's selected Deep Modules into implementation boundaries appropriate for the selected architecture. Capture those boundaries in the technical design so downstream Scrum planning, implementation planning, and execution can trust the technical design instead of rereading the Deep Module Map by default.
74
+
37
75
  Prefer:
38
76
 
39
77
  - concise decisions over long explanation
@@ -41,6 +79,7 @@ Prefer:
41
79
  - current codebase patterns over speculative redesigns
42
80
  - explicit open questions over risky assumptions
43
81
  - delegation to the right skills instead of duplicating their guidance
82
+ - preserving the feature brief's selected Deep Modules
44
83
 
45
84
  Avoid:
46
85
 
@@ -48,6 +87,7 @@ Avoid:
48
87
  - product scope expansion
49
88
  - user stories, tickets, or delivery plans
50
89
  - invented CLI/database/API concepts that the feature brief did not ask for
90
+ - inventing new Deep Modules or moving work into unselected modules
51
91
  - large template sections that say “none” without adding value
52
92
 
53
93
  ## Delegation rule
@@ -88,6 +128,7 @@ Use this structure as a starting point. Delete sections that do not add value.
88
128
 
89
129
  ## Inputs
90
130
  - Product vision: <path>
131
+ - Deep Module Map: <path>
91
132
  - Feature brief: <path>
92
133
  - Delegated skills: <skills later implementation should apply>
93
134
 
@@ -100,6 +141,8 @@ Use this structure as a starting point. Delete sections that do not add value.
100
141
  ## Proposed Design
101
142
  <Concrete implementation decisions. Include command flows, file/module impact, state changes, and integration boundaries when relevant.>
102
143
 
144
+ <Explain how the selected Deep Modules translate into architecture, module, command, file, or implementation boundaries when that affects downstream work.>
145
+
103
146
  ## Validation
104
147
  <Focused test/build/manual checks.>
105
148
 
@@ -7,6 +7,34 @@ description: Use this skill for UX/UI design after product definition when a fea
7
7
 
8
8
  Act as a senior UX/UI designer. Turn an approved product artifact into usable, expressive, phone-first, implementation-ready UI direction. Do not include code, file paths, architecture, or framework-specific guidance.
9
9
 
10
+ ## Pipeline Contract
11
+
12
+ ### What this skill needs
13
+
14
+ - `docs/product-vision.md`.
15
+ - A product artifact such as `docs/features/<feature-slug>/feature_brief.md` that defines goals, scope, and acceptance criteria.
16
+ - Confirmation from the request or source artifact that the feature has UI impact.
17
+ - Enough user or product context to design affected surfaces, flows, responsive layouts, states, accessibility requirements, and binding mockups.
18
+
19
+ ### What this skill writes
20
+
21
+ - `docs/features/<feature-slug>/ux.md`.
22
+
23
+ ### When this skill stops
24
+
25
+ - The user only has a product idea; direct the user to `feature-brief-writer` first.
26
+ - `docs/product-vision.md` is missing; direct the user to `product-vision-writer` first.
27
+ - The product artifact is missing, unclear, or lacks goals, scope, and acceptance criteria.
28
+ - The feature or request has no UI impact; say so and do not invent UI work.
29
+ - The request belongs to another pipeline stage, such as product definition, technical design, Scrum planning, implementation planning, or implementation execution.
30
+
31
+ ### What this skill must not do
32
+
33
+ - Do not create or update product visions, Deep Module Maps, feature briefs, technical designs, Epics, User Stories, implementation plans, or production code.
34
+ - Do not make architecture, framework, API, data model, or file-path decisions.
35
+ - Do not treat UX work as optional for UI-changing features; concrete mockups are required.
36
+ - Do not require a final confirmation summary before writing once enough UX context is available.
37
+
10
38
  ## Required grounding
11
39
 
12
40
  Read `docs/product-vision.md` and apply only relevant implications: target user, principles, voice, boundaries, trust expectations, success signal. Do not restate the full vision.
@@ -1 +0,0 @@
1
- export { getSyncPreviews, isActionableSyncPreview, shouldAskForSyncAction } from '../../shared/sync-preview.js';