@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
@@ -1,13 +1,49 @@
1
1
  ---
2
2
  name: ai-implementation-plan-executor
3
- description: Execute an existing ai-implementation-planner story implementation plan one ordered step at a time. Use when asked to implement, execute, continue, or work through a story implementation plan under docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/.
3
+ description: Execute an existing ai-implementation-planner story implementation plan from start to finish, then request story-level review before marking steps approved and committing.
4
4
  ---
5
5
 
6
6
  # AI Implementation Plan Executor
7
7
 
8
8
  ## Purpose
9
9
 
10
- Execute one existing story implementation plan, one ordered step file at a time, with human review between steps. This skill owns execution from an existing `.impl_plan/` folder; it does not create plans, change story scope, or skip review gates.
10
+ Execute one existing story implementation plan completely, one ordered step file at a time, with a single human review gate after the full story plan has been implemented. This skill owns execution from an existing `.impl_plan/` folder; it does not change story scope or skip the final story approval gate.
11
+
12
+ ## Pipeline Contract
13
+
14
+ ### What this skill needs
15
+
16
+ - Exactly one User Story file or one story-local `.impl_plan/` folder to start.
17
+ - Ordered implementation step files in that `.impl_plan/` folder.
18
+ - The story, Epic brief, feature brief, and technical design for the selected plan.
19
+ - `docs/features/<feature-slug>/ux.md` only when the story, any step, or feature has UI impact.
20
+ - Relevant repo files, validation output, and implementation skills needed for the story plan.
21
+
22
+ ### What this skill writes
23
+
24
+ - Code, docs, tests, or other repo changes required by all unapproved implementation steps in the story plan.
25
+ - Step approval metadata in every completed step file only after explicit story-level user approval.
26
+ - One focused commit for the approved story implementation.
27
+ - When continuing an Epic and the next story has no plan, story-local implementation step files created by applying `ai-implementation-planner`.
28
+
29
+ ### When this skill stops
30
+
31
+ - The user does not provide or clearly identify exactly one User Story file or `.impl_plan/` folder.
32
+ - The starting implementation plan is missing, empty, invalid, or has no ordered step files; direct the user to `ai-implementation-planner`.
33
+ - Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
34
+ - The story, any step, or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
35
+ - Validation fails and the fix is ambiguous, risky, or would exceed the approved plan.
36
+ - A step conflicts with the story, Epic, feature brief, technical design, UX spec, or approved Deep Module boundaries.
37
+ - A newly planned next story is ready for plan review and approval before execution.
38
+
39
+ ### What this skill must not do
40
+
41
+ - Do not create product visions, Deep Module Maps, feature briefs, technical designs, UX specs, Epics, or User Stories.
42
+ - Do not modify prior-stage artifacts except for approval metadata in implementation step files.
43
+ - Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
44
+ - Do not mark any step approved before explicit story-level user approval.
45
+ - Do not commit story implementation changes before explicit story-level user approval.
46
+ - Do not continue past a newly created implementation plan for the next story until the user approves that plan.
11
47
 
12
48
  ## Required source context
13
49
 
@@ -31,11 +67,13 @@ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl
31
67
  docs/features/<feature-slug>/epics/<epic-slug>/epic_brief.md
32
68
  docs/features/<feature-slug>/feature_brief.md
33
69
  docs/features/<feature-slug>/technical_design.md
34
- docs/features/<feature-slug>/ux.md # when the story, step, or feature has UI impact
70
+ docs/features/<feature-slug>/ux.md # when the story, any step, or feature has UI impact
35
71
  ```
36
72
 
37
73
  Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
38
74
 
75
+ When the story, implementation plan, feature brief, or technical design includes Deep Module guidance, treat it as part of the execution contract. Deep Modules answer “where does this implementation work belong?” Approved modules define where implementation work should stay.
76
+
39
77
  If the story, any step, or feature has UI impact and `docs/features/<feature-slug>/ux.md` is missing, stop and ask the user to create the UX spec with `ux-expert` before implementation.
40
78
 
41
79
  When `ux.md` includes mockups, treat them as binding UI goals. Implementation must preserve the mockup structure, hierarchy, visible content, dominant interactions, major visual emphasis, and breakpoint-specific layout. Do not redesign the UI during execution; implement the approved UX and stop if technical constraints require a UX revision.
@@ -47,13 +85,13 @@ Before the first implementation step that changes code, read and apply the imple
47
85
  - read and apply language skills when relevant, such as `typescript`
48
86
  - read and apply framework skills when relevant, such as `react` or `nextjs`
49
87
 
50
- Inspect existing code, tests, scripts, and docs only as needed for the current step.
88
+ Inspect existing code, tests, scripts, and docs only as needed for the story plan and current step.
51
89
 
52
90
  ## Context reuse rule
53
91
 
54
92
  At the start of a story implementation plan, read all required source context, relevant implementation skills, and all ordered step files once. Build a concise execution context summary and rely on it for the rest of the story.
55
93
 
56
- After each approved step, do not reread unchanged broad context before continuing. For the next step, inspect only:
94
+ After each completed step, do not reread unchanged broad context before continuing. For the next step, inspect only:
57
95
 
58
96
  - the next step file if it was not already read
59
97
  - files changed by previous steps when needed
@@ -64,7 +102,7 @@ Reread broad source context only when scope changes, validation fails in a way t
64
102
 
65
103
  ## Hard start rule
66
104
 
67
- If the provided User Story has no matching `.impl_plan/`, or the provided `.impl_plan/` folder is missing, empty, or has no ordered `.md` step files:
105
+ If the initial User Story has no matching `.impl_plan/`, or the initial `.impl_plan/` folder is missing, empty, or has no ordered `.md` step files:
68
106
 
69
107
  1. Stop.
70
108
  2. Tell the user the implementation plan is missing or invalid.
@@ -78,11 +116,11 @@ If required source context is missing:
78
116
  3. Ask the user to create or restore the missing artifact first.
79
117
  4. Do not invent implementation scope from partial context.
80
118
 
81
- ## Step execution model
119
+ ## Story execution model
82
120
 
83
- Work on exactly one step at a time.
121
+ Work through the full story plan in filename order, one step at a time, without asking for review or approval between steps.
84
122
 
85
- When a valid implementation plan exists, begin implementing the first unapproved step immediately. Do not ask for pre-implementation confirmation before changing code for that step. This is an explicit exception to repository-level instructions that normally require confirmation before code changes: selecting this executor skill and providing a valid plan is the user's confirmation to implement the current step.
123
+ When a valid implementation plan exists, begin implementing the first unapproved step immediately. Do not ask for pre-implementation confirmation before changing code. This is an explicit exception to repository-level instructions that normally require confirmation before code changes: selecting this executor skill and providing a valid plan is the user's confirmation to implement the full story plan.
86
124
 
87
125
  A step file is considered approved only when it contains this section:
88
126
 
@@ -95,21 +133,22 @@ A step file is considered approved only when it contains this section:
95
133
  When starting or resuming a plan:
96
134
 
97
135
  1. Read all step files in filename order.
98
- 2. Identify the first step file that is not approved.
99
- 3. Implement only that step immediately, without asking for confirmation first.
100
- 4. Run the validation named in that step when practical.
101
- 5. Report what changed, validation results, and any risks.
102
- 6. Stop and wait for explicit user confirmation before moving to the next step.
136
+ 2. Identify all step files that are not approved.
137
+ 3. Implement the unapproved steps in order, exactly one step at a time.
138
+ 4. Run the validation named in each step when practical before moving to the next step.
139
+ 5. If a step is validation-only and produces no code changes, record the validation result in the story execution summary and continue.
140
+ 6. Stop only for ambiguity, missing required files, conflicting scope, failed validation that cannot be safely fixed within the plan, or material risk.
141
+ 7. After the final unapproved step is implemented, report what changed, validation results, and any risks, then wait for explicit story-level approval.
103
142
 
104
- Do not begin the next step in the same response unless the user has already explicitly approved the current step in this turn.
143
+ Do not mark steps approved, commit changes, or move to the next story until the user explicitly approves the completed story implementation.
105
144
 
106
- ## User review gate
145
+ ## Story review gate
107
146
 
108
- After implementing a step, say that the step is ready for review and that you are waiting for confirmation before continuing.
147
+ After implementing all unapproved steps for a story, say that the full story implementation is ready for review and that you are waiting for story-level approval before marking all completed steps approved, committing, and continuing the Epic.
109
148
 
110
- If the user asks questions or requests changes, stay on the same step until those changes are complete.
149
+ If the user asks questions or requests changes, keep working within the same story until those changes are complete. If requested changes exceed the approved story plan, stop and ask whether the plan should be revised.
111
150
 
112
- When the user explicitly approves the current step, update that step file by adding or updating:
151
+ When the user explicitly approves the completed story, update every step file completed in this story by adding or updating:
113
152
 
114
153
  ```md
115
154
  ## Review status
@@ -119,60 +158,63 @@ When the user explicitly approves the current step, update that step file by add
119
158
  - Approved at: <ISO-8601 timestamp>
120
159
  ```
121
160
 
122
- Before writing the approval marker, identify the current Git user with `git config user.name`; if it is unavailable, use `git config user.email`. Use that value for `Approved by`.
123
-
124
- After writing the approval marker, commit only the changes produced by the approved step before continuing. The commit must include the step file approval marker and files intentionally changed while implementing that step. It must not include unrelated local edits, pre-existing worktree changes, or changes from other steps. Use the files tracked during step execution and a focused `git status --short` check to stage the correct paths. Do not run broad `git diff` investigations or other "what changed?" archaeology unless it is required to avoid committing unrelated changes and the user has approved that extra inspection.
125
-
126
- Use a Conventional Commits 1.0.0 message that describes the completed step. If the commit fails, stop and report the failure instead of continuing.
161
+ Before writing approval markers, identify the current Git user with `git config user.name`; if it is unavailable, use `git config user.email`. Use that value for `Approved by`.
127
162
 
128
- Then continue with the next unapproved step immediately, without asking for another pre-implementation confirmation, only after the approval marker is written and the approved step changes are committed.
163
+ After writing approval markers, commit only the changes produced by the approved story before continuing. The commit must include all step file approval markers and files intentionally changed while implementing the story. It must not include unrelated local edits or pre-existing worktree changes. Use the files tracked during story execution and a focused `git status --short` check to stage the correct paths. Do not run broad `git diff` investigations or other "what changed?" archaeology unless it is required to avoid committing unrelated changes and the user has approved that extra inspection.
129
164
 
130
- If the user asks to continue without clearly approving the current step, ask for explicit approval before marking it approved, committing, or moving on.
165
+ Use a Conventional Commits 1.0.0 message that describes the completed story. If the commit fails, stop and report the failure instead of continuing.
131
166
 
132
167
  ## Epic continuation check
133
168
 
134
- When all step files in the current story implementation plan are approved and committed:
169
+ After the approved story implementation is committed:
135
170
 
136
171
  1. Inspect the current Epic's `stories/` folder in filename order.
137
172
  2. Identify whether there is a next User Story after the completed story.
138
- 3. If a next User Story exists and its `.impl_plan/` folder exists with ordered step files, ask the user whether they want to implement that next story.
139
- 4. If a next User Story exists but its `.impl_plan/` folder is missing or empty, ask the user whether they want to plan that next story with `ai-implementation-planner`.
140
- 5. If there is no next User Story in the Epic, tell the user the Epic appears ready.
173
+ 3. If there is no next User Story in the Epic, tell the user the Epic appears ready and stop.
174
+ 4. If a next User Story exists and its `.impl_plan/` folder exists with ordered step files, immediately begin implementing that next story plan using this same story execution model.
175
+ 5. If a next User Story exists but its `.impl_plan/` folder is missing or empty, immediately create the implementation plan for that story by applying `ai-implementation-planner`, then stop and ask the user to review and approve the new plan before executing it.
141
176
 
142
- Do not automatically start planning or implementing the next story. This check is a handoff prompt after the current story is complete, not permission to continue without the user's explicit direction.
177
+ This continuation behavior is an explicit exception to the normal hard-start rule only after a story has been approved and committed. It lets the executor keep an Epic moving while still preserving the required review gate before executing a newly created plan.
143
178
 
144
179
  ## Implementation rules
145
180
 
146
181
  Do:
147
182
 
148
183
  - preserve the source story scope and acceptance criteria
149
- - follow the current step file exactly unless it conflicts with source context
150
- - keep changes focused on the current step's `## Scope` and `## Files`
184
+ - preserve approved Deep Module boundaries when present
185
+ - follow each step file exactly unless it conflicts with source context
186
+ - keep each step focused on its `## Scope` and `## Files`
187
+ - complete all unapproved steps in order before requesting story review
188
+ - keep work inside the contexts named by the approved steps and technical design
151
189
  - use existing project patterns and the relevant skills
152
- - run focused validation for the current step when possible
153
- - stop and ask if the step is ambiguous, missing required files, or conflicts with the technical design
190
+ - run focused validation for each step when possible
191
+ - stop and ask if a step is ambiguous, missing required files, or conflicts with the technical design
192
+ - stop and ask before moving work into an unrelated Deep Module unless the approved step or technical design explicitly justifies it
154
193
 
155
194
  Do not:
156
195
 
157
- - create a missing plan from scratch
158
- - implement multiple unapproved steps in one pass
159
- - mark a step approved before the user explicitly approves it
160
- - add product scope absent from the story, Epic, feature brief, technical design, or step file
196
+ - create a missing initial plan from scratch
197
+ - mark any step approved before the user explicitly approves the completed story
198
+ - commit story implementation changes before story approval
199
+ - add product scope absent from the story, Epic, feature brief, technical design, or step files
200
+ - silently move work into unrelated or unapproved Deep Modules
161
201
  - continue past a failed validation without reporting it and asking how to proceed
162
- - leave approved step changes uncommitted before moving to the next step
202
+ - leave approved story changes uncommitted before moving to the next story
203
+ - execute a newly created next-story plan before the user approves that plan
163
204
 
164
- ## Final response behavior after each step
205
+ ## Final response behavior
165
206
 
166
- After implementing one step, briefly report:
207
+ After implementing all unapproved steps in one story, briefly report:
167
208
 
168
- - that the step finished
169
- - if the step was validation-only and produced no code changes, say that it was just a validation step and all validations passed
170
- - current step file path
171
- - the next step file path, or that no next step remains
172
- - that you are waiting for user approval before marking the step approved, committing it, and continuing to the next step
209
+ - that the story implementation finished and is ready for review
210
+ - the story file path and implementation plan folder
211
+ - the steps completed
212
+ - validations run and their results
213
+ - notable risks or follow-up questions, if any
214
+ - that you are waiting for story approval before marking all completed steps approved, committing, and continuing the Epic
173
215
 
174
- After approving and committing the final step in a story implementation plan, also briefly report the Epic continuation check result:
216
+ After approving and committing a story implementation, briefly report the commit and the Epic continuation result:
175
217
 
176
- - next story ready to implement
177
- - next story needs an implementation plan
178
- - or Epic appears ready
218
+ - next story is being implemented immediately because it already has a plan
219
+ - next story was planned and is waiting for plan review and approval
220
+ - or the Epic appears ready
@@ -1,13 +1,44 @@
1
1
  ---
2
2
  name: ai-implementation-planner
3
- description: Turn one approved User Story Markdown file into LLM-sized implementation step files. Use when asked to create an implementation plan, coding checklist, step-by-step execution plan, or baby-step plan for completing a specific User Story from docs/features/<feature-slug>/epics/<epic-slug>/stories/.
3
+ description: Turn one approved User Story Markdown file into LLM-sized implementation step files, then request plan review before execution. Use when asked to create an implementation plan, coding checklist, step-by-step execution plan, or baby-step plan for completing a specific User Story from docs/features/<feature-slug>/epics/<epic-slug>/stories/.
4
4
  ---
5
5
 
6
6
  # AI Implementation Planner
7
7
 
8
8
  ## Purpose
9
9
 
10
- Turn one approved User Story into concrete Markdown step files an AI coding agent can execute safely and completely. This skill owns implementation planning for one story at a time, not product scope, technical design decisions, Scrum planning, or code implementation.
10
+ Turn one approved User Story into concrete Markdown step files an AI coding agent can execute safely and completely. This skill owns implementation planning for one story at a time, not product scope, technical design decisions, Scrum planning, or code implementation. After writing the plan, it asks for plan review and approval before any executor begins implementation.
11
+
12
+ ## Pipeline Contract
13
+
14
+ ### What this skill needs
15
+
16
+ - Exactly one User Story file at `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md`.
17
+ - The story's `epic_brief.md`.
18
+ - The feature's `feature_brief.md`.
19
+ - The feature's `technical_design.md`.
20
+ - `docs/features/<feature-slug>/ux.md` only when the story or feature has UI impact.
21
+ - Relevant repo files, tests, scripts, and implementation skills needed to make concrete step files.
22
+
23
+ ### What this skill writes
24
+
25
+ - Story-local implementation step files under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/*.md`.
26
+
27
+ ### When this skill stops
28
+
29
+ - The user does not provide or clearly identify exactly one User Story file.
30
+ - Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
31
+ - The story or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
32
+ - The request is to write production code, execute an implementation plan, create stories, or perform another pipeline stage.
33
+ - A newly created implementation plan is ready for user review and approval before execution.
34
+
35
+ ### What this skill must not do
36
+
37
+ - Do not create or update product visions, Deep Module Maps, feature briefs, technical designs, UX specs, Epics, User Stories, or production code.
38
+ - Do not modify prior-stage artifacts.
39
+ - Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
40
+ - Do not infer implementation scope from an Epic brief, feature brief, or technical design without exactly one User Story.
41
+ - Do not execute the plan after creating it, even when invoked as the next-story planning handoff from `ai-implementation-plan-executor`.
11
42
 
12
43
  ## Required input
13
44
 
@@ -33,6 +64,8 @@ docs/features/<feature-slug>/ux.md # when the story or feature has UI impact
33
64
 
34
65
  Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
35
66
 
67
+ When the feature brief or technical design includes Deep Module guidance, treat it as required planning context. Deep Modules answer “where does this implementation work belong?” Implementation steps must preserve approved module boundaries.
68
+
36
69
  If the story or feature has UI impact and `docs/features/<feature-slug>/ux.md` is missing, stop and ask the user to create the UX spec with `ux-expert` before implementation planning.
37
70
 
38
71
  When `ux.md` includes mockups, treat them as binding UI goals. Implementation steps must preserve the mockup structure, hierarchy, visible content, dominant interactions, major visual emphasis, and breakpoint-specific layout. Do not redesign the UI in the implementation plan; plan code steps that implement the approved UX and stop if technical constraints require a UX revision.
@@ -101,6 +134,8 @@ Do:
101
134
  - call out dependencies, sequencing constraints, and risk checkpoints
102
135
  - include test, build, lint, or manual validation commands when known
103
136
  - include a stop-and-ask condition when the implementation would exceed the technical design
137
+ - keep work inside the approved Deep Modules unless cross-module work is explicit in the source artifacts
138
+ - call out cross-module ownership and coordination in the relevant step files
104
139
 
105
140
  Do not:
106
141
 
@@ -110,6 +145,7 @@ Do not:
110
145
  - include prerequisite reading, scope confirmation, or repository inspection as step files
111
146
  - create task noise such as “review the code” without a specific implementation or validation purpose
112
147
  - prescribe architecture that conflicts with the selected architecture skill or technical design
148
+ - move work into unrelated or unapproved Deep Modules; add a stop-and-ask condition instead
113
149
 
114
150
  ## Workflow
115
151
 
@@ -129,11 +165,12 @@ If the story lacks testable acceptance criteria, stop and ask for the User Story
129
165
 
130
166
  ### 2. Read feature and technical context
131
167
 
132
- From the Epic and feature brief, identify delivery boundaries and user value.
168
+ From the Epic and feature brief, identify delivery boundaries, user value, and approved Deep Module ownership when present.
133
169
 
134
170
  From the technical design, identify:
135
171
 
136
172
  - intended implementation approach
173
+ - Deep Module boundaries, ownership, and any explicit cross-module work
137
174
  - affected commands, modules, files, adapters, docs, or tests
138
175
  - known risks or unresolved decisions
139
176
  - expected validation commands or checks
@@ -184,6 +221,7 @@ Step-file requirements:
184
221
  - keep each step small enough for one AI coding pass
185
222
  - name every known file, module, command, or artifact to change or validate
186
223
  - include explicit out-of-scope boundaries in `Scope` when they prevent scope creep
224
+ - preserve Deep Module boundaries in `Scope`; call out cross-module work explicitly when required
187
225
  - include validation commands in `Done when` when known
188
226
  - ensure the full set of step files covers every acceptance criterion
189
227
 
@@ -200,15 +238,21 @@ Before finishing, verify:
200
238
  - every step file has clear done conditions
201
239
  - validation is explicit enough to prove the story is complete
202
240
  - the step files do not add scope beyond the source artifacts
241
+ - the step files preserve approved Deep Module boundaries and stop before unrelated module movement
203
242
  - architecture and code-quality steps align with the relevant skills
204
243
 
205
- ## Final response behavior
244
+ ### 6. Request plan review
206
245
 
207
- After writing the files, final-answer with only:
246
+ After writing and quality-checking the implementation step files, stop and ask the user to review and approve the plan before execution. Do not start implementation in the same turn.
247
+
248
+ When this skill is invoked as the next-story planning handoff from `ai-implementation-plan-executor`, the same gate applies: create the plan, summarize it, and wait for explicit approval before the executor starts changing code for that story.
249
+
250
+ The final planning response must briefly include:
208
251
 
209
- - the implementation plan folder path
210
- - the step file paths created
211
252
  - the source User Story path
212
- - any risks or stop conditions captured in the step files
253
+ - the implementation plan folder path
254
+ - the ordered step files created
255
+ - any assumptions, risks, or validation commands worth reviewing
256
+ - that execution should wait until the user approves the plan
213
257
 
214
258
  Do not paste step-file bodies, excerpts, outlines, task text, done conditions, or section summaries. Only include generated step files when the user explicitly asks for inline review in the current request.
@@ -10,6 +10,18 @@ Use this skill to design and implement software features as independent, end-to-
10
10
 
11
11
  ---
12
12
 
13
+ ## Deep Module Compatibility
14
+
15
+ Deep Modules answer “where does this implementation work belong?” Command Pattern guidance answers “how is that work structured as command-oriented vertical slices inside the selected module?”
16
+
17
+ When `docs/deep-module-map.md`, a feature brief, or a technical design names Deep Modules, place each vertical slice inside the relevant Deep Module. The feature-local Command, Handler, Port, Adapter, and Result guidance still applies inside that module boundary.
18
+
19
+ Do not invent new Deep Modules during design or implementation. If work does not fit the approved modules, stop and route the decision back to the `deep-module-map-writer` workflow.
20
+
21
+ Do not treat shallow technical buckets such as `utils`, `api`, `db`, or `services` as Deep Modules. A Deep Module should expose a small, stable interface while hiding meaningful implementation complexity; product alignment can help explain why work changes together, but product category alone does not make a module deep.
22
+
23
+ ---
24
+
13
25
  ## 1. The Component Contract
14
26
  Every feature is defined by four distinct roles. This separation ensures that the "Core" logic remains pure and testable.
15
27
 
@@ -27,20 +39,30 @@ Organize by Capability (what the system does) rather than Technical Layer (what
27
39
 
28
40
  ```text
29
41
  /src
30
- ├── /entrypoints # Driving Adapters (The "Edges")
31
- │ └── /cli # Parses flags/args -> creates Command -> calls Handler
32
- ├── /features # THE HEXAGON (Domain & Application Logic)
33
- │ └── /feature-name # e.g., "archive-project"
34
- ├── command # The Input DTO
35
- ├── handler # The Orchestration logic
36
- ├── ports # Interfaces required by the handler
37
- └── result # The Output DTO/Contract
38
- ├── /shared # Universal logic only
39
- ├── /domain # Global Entities (e.g., "User", "Project")
40
- └── /errors # Global error definitions
41
- └── /infrastructure # Driven Adapters (Implementation Details)
42
- ├── /persistence # DB implementations of feature Ports
43
- └── /clients # External API implementations of feature Ports
42
+ ├── /entrypoints # Driving Adapters (The "Edges")
43
+ │ └── /cli # Parses flags/args -> creates Command -> calls Handler
44
+ ├── /modules # Deep Modules from docs/deep-module-map.md
45
+ │ └── /module-slug # e.g., "workflow-adoption"
46
+ └── /feature-slice # e.g., "archive-project"
47
+ ├── command # The Input DTO
48
+ ├── handler # The Orchestration logic
49
+ ├── ports # Interfaces required by the handler
50
+ │ └── result # The Output DTO/Contract
51
+ ├── /shared # Universal logic only
52
+ ├── /domain # Global Entities (e.g., "User", "Project")
53
+ └── /errors # Global error definitions
54
+ └── /infrastructure # Driven Adapters (Implementation Details)
55
+ ├── /persistence # DB implementations of feature Ports
56
+ └── /clients # External API implementations of feature Ports
57
+ ```
58
+
59
+ Default slice paths:
60
+
61
+ ```text
62
+ /src/modules/<module-slug>/<feature-slice>/command
63
+ /src/modules/<module-slug>/<feature-slice>/handler
64
+ /src/modules/<module-slug>/<feature-slice>/ports
65
+ /src/modules/<module-slug>/<feature-slice>/result
44
66
  ```
45
67
 
46
68
  ---
@@ -48,7 +70,7 @@ Organize by Capability (what the system does) rather than Technical Layer (what
48
70
  ## 3. Operational Rules for Implementation
49
71
 
50
72
  ### Rule 1: Feature Isolation
51
- A feature folder must never import from another feature folder. If two features need the same logic, that logic must be promoted to the /shared directory.
73
+ A feature-slice folder must never import from another feature-slice folder. If two slices need the same logic, that logic must be promoted to the owning Deep Module or to /shared when it is truly universal.
52
74
 
53
75
  ### Rule 2: Dependency Inversion
54
76
  The Handler must never instantiate a database, a file system, or a network client. It must receive its dependencies (via Ports) through its constructor or initialization.
@@ -73,5 +95,5 @@ Entrypoints (CLI/API) are responsible for Syntactic Validation (is the input the
73
95
  ## 5. Constraint Checklist for Agent Reviews
74
96
  - [ ] Zero Leakage: Does the Handler contain CLI-specific code (like fmt.Printf or flags)?
75
97
  - [ ] Interface-Driven: Does the Handler depend on a concrete Database class or an Interface (Port)?
76
- - [ ] Folder Integrity: Does the feature folder contain the Command, Handler, and Ports?
98
+ - [ ] Folder Integrity: Does the Deep Module feature-slice folder contain the Command, Handler, and Ports?
77
99
  - [ ] Dependency Direction: Does the infrastructure layer depend on the feature ports, and not the other way around?
@@ -27,6 +27,18 @@ This skill is backend-focused. It does not cover frontend component architecture
27
27
 
28
28
  If a simpler structure preserves clear boundaries, prefer the simpler structure.
29
29
 
30
+ ## Deep Module compatibility
31
+
32
+ Deep Modules answer “where does this implementation work belong?” DDD + Hexagonal answers “how is that module structured internally?”
33
+
34
+ When `docs/deep-module-map.md`, a feature brief, or a technical design names Deep Modules, treat each selected Deep Module as the default top-level implementation boundary before choosing domain/application/infra placement. Prefer placing domain concepts, use cases, ports, and adapters under the selected module's ownership. If work crosses modules, name the owning module for each part and keep dependencies explicit.
35
+
36
+ A Deep Module may contain `domain`, `application`, and `infra`/adapter concerns, but it is not automatically a DDD Bounded Context, service, package, database boundary, or team boundary. Projects that already use DDD Bounded Contexts may align a Bounded Context one-to-one with a Deep Module when that preserves the model and language.
37
+
38
+ Do not invent new Deep Modules during design or implementation. If work does not fit the approved modules, stop and route the decision back to the `deep-module-map-writer` workflow.
39
+
40
+ Do not treat shallow technical buckets such as `utils`, `api`, `db`, or `services` as Deep Modules. A Deep Module should expose a small, stable interface while hiding meaningful implementation complexity; product alignment can help explain why work changes together, but product category alone does not make a module deep.
41
+
30
42
  ## The layers
31
43
 
32
44
  ### Domain
@@ -120,10 +132,13 @@ Do not create an entity or value object when:
120
132
 
121
133
  Use this default mapping when the project does not already have a clearer convention:
122
134
 
123
- - `<feature-or-domain>/domain/**` → domain concepts and rules
124
- - `<feature-or-domain>/application/**` use cases and application orchestration
125
- - `<feature-or-domain>/infra/**` technical implementations and external integrations
126
- - entrypoints such as routes, jobs, or handlers → thin driving adapters that call application behavior
135
+ ```text
136
+ /src/modules/<module-slug>/domain/** # Domain concepts and rules
137
+ /src/modules/<module-slug>/application/** # Use cases and application orchestration
138
+ /src/modules/<module-slug>/infra/** # Technical implementations and external integrations
139
+ ```
140
+
141
+ Entrypoints such as routes, jobs, or handlers should remain thin driving adapters that call application behavior inside the selected Deep Module.
127
142
 
128
143
  ## Ports and adapters
129
144