@juancr11/sibu 0.6.0 → 0.8.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 (69) 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 +17 -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 +7 -5
  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 +14 -4
  21. package/bin/{features → modules/skill-selection-management}/stop-managing-file/handler.js +15 -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 +42 -8
  24. package/bin/{features/sync-project → modules/sync-review}/apply-action.js +5 -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 +11 -7
  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 +13 -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 +3 -1
  40. package/bin/modules/workflow-target-planning/catalog.js +252 -0
  41. package/bin/modules/workflow-target-planning/index.js +2 -0
  42. package/bin/modules/workflow-target-planning/workflow-targets.js +130 -0
  43. package/bin/shared/catalog.js +0 -253
  44. package/bin/shared/paths.js +1 -12
  45. package/bin/shared/workflow-targets.js +3 -2
  46. package/package.json +4 -2
  47. package/templates/AGENTS.md +3 -3
  48. package/templates/manifest.json +38 -27
  49. package/templates/skills/ai-implementation-plan-executor/SKILL.md +74 -70
  50. package/templates/skills/ai-implementation-planner/SKILL.md +24 -17
  51. package/templates/skills/architecture/command-pattern/SKILL.md +32 -20
  52. package/templates/skills/architecture/ddd-hexagonal/SKILL.md +14 -9
  53. package/templates/skills/deep-module-map-writer/SKILL.md +241 -0
  54. package/templates/skills/feature-brief-writer/SKILL.md +24 -24
  55. package/templates/skills/postgresql-expert/SKILL.md +72 -0
  56. package/templates/skills/product-vision-writer/SKILL.md +2 -2
  57. package/templates/skills/scrum-master-planner/SKILL.md +2 -2
  58. package/templates/skills/technical-design-writer/SKILL.md +15 -15
  59. package/templates/skills/ux-expert/SKILL.md +1 -1
  60. package/bin/features/sync-project/preview.js +0 -1
  61. package/templates/skills/product-context-map-writer/SKILL.md +0 -211
  62. /package/bin/{features/doctor-project/command.js → modules/cli-command-surface/index.js} +0 -0
  63. /package/bin/{features/init-project → modules/maintainer-release-support/generate-changelog}/command.js +0 -0
  64. /package/bin/{features/list-skills → modules/maintainer-release-support/release-workflow}/command.js +0 -0
  65. /package/bin/{features/stop-managing-file → modules/project-adoption}/command.js +0 -0
  66. /package/bin/{features/sync-project → modules/skill-selection-management/list-skills}/command.js +0 -0
  67. /package/bin/{features/use-skill → modules/skill-selection-management/stop-managing-file}/command.js +0 -0
  68. /package/bin/{features/sync-project → modules/sync-review}/action-prompt.js +0 -0
  69. /package/bin/{features/sync-project → modules/sync-review}/log-preview.js +0 -0
@@ -1,10 +1,11 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { SIBU_VERSION, MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, } from './catalog.js';
3
+ import { SIBU_VERSION } from './catalog.js';
4
+ import { MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, } from '../modules/workflow-target-planning/index.js';
4
5
  import { sha256 } from './hash.js';
5
6
  import { removeUndefinedFields } from './object.js';
6
7
  import { readExistingState } from './state.js';
7
- import { getTemplateVersion, readTemplate, readTemplateManifest, renderSkillRouting } from './templates.js';
8
+ import { getTemplateVersion, readTemplate, readTemplateManifest, renderSkillRouting } from '../modules/template-catalog-rendering/index.js';
8
9
  export function getSelectedLanguageSkillsFromState(state) {
9
10
  return SELECTABLE_LANGUAGE_SKILLS.filter((skill) => state.selectedLanguageSkills?.includes(skill.id));
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juancr11/sibu",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "CLI for setting up a local AI-augmented development workflow.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,8 +16,10 @@
16
16
  "files": [
17
17
  "bin/sibu.js",
18
18
  "bin/entrypoints/",
19
- "bin/features/",
19
+ "bin/admin/",
20
+ "bin/modules/",
20
21
  "bin/shared/",
22
+ "!bin/shared/state.js",
21
23
  "!bin/**/*.test.js",
22
24
  "!bin/echo.js",
23
25
  "templates/",
@@ -36,12 +36,12 @@ Keep responses concise by default, but spend the context needed for correctness,
36
36
 
37
37
  ## Skill routing
38
38
 
39
- For planned product/feature work, use this pipeline: product vision -> product context map -> feature brief -> technical design -> optional UX -> epics/stories -> AI implementation plan -> AI executor. Narrow code fixes and small local changes do not require the full pipeline unless product scope, context ownership, or architecture direction is unclear.
39
+ For planned product/feature work, use this pipeline: product vision -> deep module map -> feature brief -> technical design -> optional UX -> epics/stories -> AI implementation plan -> AI executor. Narrow code fixes and small local changes do not require the full pipeline unless product scope, module ownership, or architecture direction is unclear.
40
40
 
41
41
  - For any code-writing task, use `clean-code`.
42
42
  - For requests to create, revise, or clarify a product vision, product strategy narrative, product north star, positioning, product principles, product voice, target user definition, product boundaries, or success signals, use `product-vision-writer`.
43
- - For requests to create, revise, or clarify a Product Context Map, product responsibility boundaries, context ownership, or `docs/product-context-map.md`, use `product-context-map-writer`.
44
- - For requests to create, revise, or clarify a business-level feature brief after Product Context Map work, feature definition, feature scope, MVP feature boundaries, business acceptance criteria, or product-level feature rationale, use `feature-brief-writer`.
43
+ - For requests to create, revise, or clarify a Deep Module Map, deep, complexity-hiding implementation modules, module boundaries, suggested implementation modules, or `docs/deep-module-map.md`, use `deep-module-map-writer`.
44
+ - For requests to create, revise, or clarify a business-level feature brief after Deep Module Map work, feature definition, feature scope, MVP feature boundaries, business acceptance criteria, or product-level feature rationale, use `feature-brief-writer`.
45
45
  - For requests to create, revise, or clarify a technical design, implementation-oriented design doc, architecture approach, technical tradeoffs, technical risks, or implementation plan for an approved feature, use `technical-design-writer`.
46
46
  - For requests to create Epics, User Stories, Scrum planning artifacts, backlog slices, or delivery plans from an approved feature brief and technical design, use `scrum-master-planner`.
47
47
  - For requests to turn a specific User Story into an implementation checklist, coding plan, step-by-step execution plan, or baby-step plan, use `ai-implementation-planner`.
@@ -1,11 +1,11 @@
1
1
  {
2
- "templateVersion": "63",
2
+ "templateVersion": "70",
3
3
  "templates": {
4
4
  "AGENTS.md": {
5
- "version": "23",
5
+ "version": "25",
6
6
  "description": "Project-level agent instructions and Sibu maintenance guidance.",
7
7
  "changes": [
8
- "Adds Product Context Map routing and clarifies the planned feature-work pipeline without requiring it for narrow code fixes."
8
+ "Clarifies Deep Module routing as complexity-hiding implementation module planning."
9
9
  ]
10
10
  },
11
11
  ".codex/config.toml": {
@@ -38,31 +38,32 @@
38
38
  ]
39
39
  },
40
40
  "skills/product-vision-writer/SKILL.md": {
41
- "version": "6",
41
+ "version": "7",
42
42
  "description": "Mandatory product vision writer skill installed once at the shared .agents/skills workspace path.",
43
43
  "changes": [
44
- "Adds a pipeline contract that clarifies required inputs, owned output, stop conditions, and stage boundaries for product vision work."
44
+ "Updates downstream artifact wording to use Deep Module Map."
45
45
  ]
46
46
  },
47
- "skills/product-context-map-writer/SKILL.md": {
48
- "version": "3",
49
- "description": "Mandatory Product Context Map writer skill installed once at the shared .agents/skills workspace path.",
47
+ "skills/deep-module-map-writer/SKILL.md": {
48
+ "version": "2",
49
+ "description": "Mandatory Deep Module Map writer skill installed once at the shared .agents/skills workspace path.",
50
50
  "changes": [
51
- "Adds a pipeline contract that clarifies required inputs, owned output, stop conditions, and stage boundaries for Product Context Map work."
51
+ "Clarifies that Deep Modules are primarily technical design boundaries that hide substantial implementation complexity behind simple interfaces.",
52
+ "Strengthens the interview flow so agents ask focused one-at-a-time questions until module interfaces, hidden complexity, and boundaries are defensible."
52
53
  ]
53
54
  },
54
55
  "skills/feature-brief-writer/SKILL.md": {
55
- "version": "7",
56
+ "version": "8",
56
57
  "description": "Mandatory feature brief writer skill installed once at the shared .agents/skills workspace path.",
57
58
  "changes": [
58
- "Adds a pipeline contract that clarifies required inputs, owned output, stop conditions, and stage boundaries for feature brief work."
59
+ "Updates feature brief guidance to require Deep Modules from docs/deep-module-map.md."
59
60
  ]
60
61
  },
61
62
  "skills/technical-design-writer/SKILL.md": {
62
- "version": "14",
63
+ "version": "15",
63
64
  "description": "Mandatory technical design writer skill installed once at the shared .agents/skills workspace path.",
64
65
  "changes": [
65
- "Adds a pipeline contract that clarifies required inputs, owned output, stop conditions, and Product Context boundary translation for technical design work."
66
+ "Updates technical design guidance to translate selected Deep Modules into implementation boundaries."
66
67
  ]
67
68
  },
68
69
  "skills/typescript/SKILL.md": {
@@ -76,21 +77,28 @@
76
77
  "version": "1",
77
78
  "description": "Selectable Go skill installed when Go language support is selected.",
78
79
  "changes": [
79
- "Adds an optional Go skill with concise, Effective Go–style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
80
+ "Adds an optional Go skill with concise, Effective Go\u2013style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
81
+ ]
82
+ },
83
+ "skills/postgresql-expert/SKILL.md": {
84
+ "version": "1",
85
+ "description": "Selectable PostgreSQL Expert skill for practical database schema design and PostgreSQL-specific tradeoff guidance.",
86
+ "changes": [
87
+ "Adds an optional PostgreSQL Expert database skill focused on simple schema design, data integrity, migrations, access patterns, and purposeful indexing."
80
88
  ]
81
89
  },
82
90
  "skills/architecture/ddd-hexagonal/SKILL.md": {
83
- "version": "2",
91
+ "version": "4",
84
92
  "description": "Selectable back-end architecture skill for DDD and Hexagonal Architecture.",
85
93
  "changes": [
86
- "Adds Product Context compatibility so DDD + Hexagonal guidance preserves approved context ownership while structuring domain, application, and infrastructure concerns."
94
+ "Clarifies that Deep Modules hide implementation complexity behind small interfaces and are not product categories by themselves."
87
95
  ]
88
96
  },
89
97
  "skills/architecture/command-pattern/SKILL.md": {
90
- "version": "3",
98
+ "version": "5",
91
99
  "description": "Selectable architecture skill for command-oriented vertical slices using Command Pattern, Hexagonal Architecture, and DDD principles.",
92
100
  "changes": [
93
- "Adds Product Context compatibility so command-oriented vertical slices stay within or clearly under approved context ownership."
101
+ "Clarifies that Deep Modules hide implementation complexity behind small interfaces and are not product categories by themselves."
94
102
  ]
95
103
  },
96
104
  "skills/nextjs/SKILL.md": {
@@ -108,24 +116,27 @@
108
116
  ]
109
117
  },
110
118
  "skills/scrum-master-planner/SKILL.md": {
111
- "version": "6",
119
+ "version": "7",
112
120
  "description": "Mandatory Scrum planner skill for creating pragmatic Epics and User Stories from approved feature and technical design docs.",
113
121
  "changes": [
114
- "Adds a pipeline contract that clarifies required inputs, owned Epic and Story outputs, stop conditions, and stage boundaries for Scrum planning."
122
+ "Updates Scrum planning guidance to preserve Deep Module implementation boundaries from technical designs."
115
123
  ]
116
124
  },
117
125
  "skills/ai-implementation-planner/SKILL.md": {
118
- "version": "9",
126
+ "version": "11",
119
127
  "description": "Mandatory AI implementation planner skill for turning one approved User Story into small, story-local implementation step files.",
120
128
  "changes": [
121
- "Adds a pipeline contract that clarifies required inputs, owned implementation plan outputs, stop conditions, and stage boundaries for implementation planning."
129
+ "Adds a plan review gate so newly created implementation plans wait for user approval before execution.",
130
+ "Clarifies that next-story planning handoffs from the executor must stop after planning and wait for approval."
122
131
  ]
123
132
  },
124
133
  "skills/ai-implementation-plan-executor/SKILL.md": {
125
- "version": "14",
126
- "description": "Mandatory AI implementation plan executor skill for implementing existing story implementation plans one reviewed step at a time.",
134
+ "version": "16",
135
+ "description": "Mandatory AI implementation plan executor skill for implementing full story plans before story-level review and commit.",
127
136
  "changes": [
128
- "Adds a pipeline contract that clarifies required inputs, current-step outputs, stop conditions, and review-gated execution boundaries."
137
+ "Changes execution from per-step approval to full-story execution followed by one story-level review gate.",
138
+ "Marks all completed steps approved and commits once after the completed story is approved.",
139
+ "Continues Epics automatically by implementing the next planned story or planning the next unplanned story and waiting for plan approval."
129
140
  ]
130
141
  },
131
142
  "skills/ai-prompt-engineer-master/SKILL.md": {
@@ -136,10 +147,10 @@
136
147
  ]
137
148
  },
138
149
  "skills/ux-expert/SKILL.md": {
139
- "version": "5",
150
+ "version": "6",
140
151
  "description": "Selectable UX expert skill for UI-changing features, responsive design, flows, states, accessibility, and binding mockups.",
141
152
  "changes": [
142
- "Adds a pipeline contract that clarifies required inputs, owned output, stop conditions, and UI-impact boundaries for UX design work."
153
+ "Updates boundary wording to use Deep Module Maps."
143
154
  ]
144
155
  }
145
156
  }
@@ -1,45 +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
11
 
12
12
  ## Pipeline Contract
13
13
 
14
14
  ### What this skill needs
15
15
 
16
- - Exactly one User Story file or one story-local `.impl_plan/` folder.
16
+ - Exactly one User Story file or one story-local `.impl_plan/` folder to start.
17
17
  - Ordered implementation step files in that `.impl_plan/` folder.
18
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, step, or feature has UI impact.
20
- - Relevant repo files, validation output, and implementation skills needed for the current step.
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
21
 
22
22
  ### What this skill writes
23
23
 
24
- - Code, docs, tests, or other repo changes required by the current implementation step only.
25
- - Step approval metadata in the current step file only after explicit user approval.
26
- - A focused commit for each approved step.
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`.
27
28
 
28
29
  ### When this skill stops
29
30
 
30
31
  - The user does not provide or clearly identify exactly one User Story file or `.impl_plan/` folder.
31
- - The implementation plan is missing, empty, invalid, or has no ordered step files; direct the user to `ai-implementation-planner`.
32
+ - The starting implementation plan is missing, empty, invalid, or has no ordered step files; direct the user to `ai-implementation-planner`.
32
33
  - Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
33
- - The story, step, or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
34
- - The request is to create an implementation plan, change story scope, skip review gates, or perform another pipeline stage.
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.
35
38
 
36
39
  ### What this skill must not do
37
40
 
38
- - Do not create product visions, Product Context Maps, feature briefs, technical designs, UX specs, Epics, User Stories, or implementation plans.
39
- - Do not modify prior-stage artifacts except for approval metadata in the current step file.
40
- - Do not reread `docs/product-context-map.md` by default; trust `technical_design.md` for implementation boundaries.
41
- - Do not implement multiple unapproved steps in one pass or mark a step approved before explicit user approval.
42
- - Do not weaken the one-step-at-a-time execution model, user review gate, or approved-step commit behavior.
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.
43
47
 
44
48
  ## Required source context
45
49
 
@@ -63,12 +67,12 @@ docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl
63
67
  docs/features/<feature-slug>/epics/<epic-slug>/epic_brief.md
64
68
  docs/features/<feature-slug>/feature_brief.md
65
69
  docs/features/<feature-slug>/technical_design.md
66
- 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
67
71
  ```
68
72
 
69
73
  Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
70
74
 
71
- When the story, implementation plan, feature brief, or technical design includes Product Context guidance, treat it as part of the execution contract. Product Contexts answer “where does this work belong?” Approved contexts define where code work should stay.
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.
72
76
 
73
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.
74
78
 
@@ -81,13 +85,13 @@ Before the first implementation step that changes code, read and apply the imple
81
85
  - read and apply language skills when relevant, such as `typescript`
82
86
  - read and apply framework skills when relevant, such as `react` or `nextjs`
83
87
 
84
- 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.
85
89
 
86
90
  ## Context reuse rule
87
91
 
88
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.
89
93
 
90
- 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:
91
95
 
92
96
  - the next step file if it was not already read
93
97
  - files changed by previous steps when needed
@@ -98,7 +102,7 @@ Reread broad source context only when scope changes, validation fails in a way t
98
102
 
99
103
  ## Hard start rule
100
104
 
101
- 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:
102
106
 
103
107
  1. Stop.
104
108
  2. Tell the user the implementation plan is missing or invalid.
@@ -112,11 +116,11 @@ If required source context is missing:
112
116
  3. Ask the user to create or restore the missing artifact first.
113
117
  4. Do not invent implementation scope from partial context.
114
118
 
115
- ## Step execution model
119
+ ## Story execution model
116
120
 
117
- 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.
118
122
 
119
- 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.
120
124
 
121
125
  A step file is considered approved only when it contains this section:
122
126
 
@@ -129,21 +133,22 @@ A step file is considered approved only when it contains this section:
129
133
  When starting or resuming a plan:
130
134
 
131
135
  1. Read all step files in filename order.
132
- 2. Identify the first step file that is not approved.
133
- 3. Implement only that step immediately, without asking for confirmation first.
134
- 4. Run the validation named in that step when practical.
135
- 5. Report what changed, validation results, and any risks.
136
- 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.
137
142
 
138
- 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.
139
144
 
140
- ## User review gate
145
+ ## Story review gate
141
146
 
142
- 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.
143
148
 
144
- 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.
145
150
 
146
- 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:
147
152
 
148
153
  ```md
149
154
  ## Review status
@@ -153,64 +158,63 @@ When the user explicitly approves the current step, update that step file by add
153
158
  - Approved at: <ISO-8601 timestamp>
154
159
  ```
155
160
 
156
- 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`.
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`.
157
162
 
158
- 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.
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.
159
164
 
160
- 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
-
162
- 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
-
164
- 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.
165
166
 
166
167
  ## Epic continuation check
167
168
 
168
- When all step files in the current story implementation plan are approved and committed:
169
+ After the approved story implementation is committed:
169
170
 
170
171
  1. Inspect the current Epic's `stories/` folder in filename order.
171
172
  2. Identify whether there is a next User Story after the completed story.
172
- 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.
173
- 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`.
174
- 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.
175
176
 
176
- 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.
177
178
 
178
179
  ## Implementation rules
179
180
 
180
181
  Do:
181
182
 
182
183
  - preserve the source story scope and acceptance criteria
183
- - preserve approved Product Context boundaries when present
184
- - follow the current step file exactly unless it conflicts with source context
185
- - keep changes focused on the current step's `## Scope` and `## Files`
186
- - keep work inside the contexts named by the approved step and technical design
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
187
189
  - use existing project patterns and the relevant skills
188
- - run focused validation for the current step when possible
189
- - stop and ask if the step is ambiguous, missing required files, or conflicts with the technical design
190
- - stop and ask before moving work into an unrelated Product Context unless the approved step or technical design explicitly justifies it
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
191
193
 
192
194
  Do not:
193
195
 
194
- - create a missing plan from scratch
195
- - implement multiple unapproved steps in one pass
196
- - mark a step approved before the user explicitly approves it
197
- - add product scope absent from the story, Epic, feature brief, technical design, or step file
198
- - silently move work into unrelated or unapproved Product Contexts
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
199
201
  - continue past a failed validation without reporting it and asking how to proceed
200
- - 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
201
204
 
202
- ## Final response behavior after each step
205
+ ## Final response behavior
203
206
 
204
- After implementing one step, briefly report:
207
+ After implementing all unapproved steps in one story, briefly report:
205
208
 
206
- - that the step finished
207
- - if the step was validation-only and produced no code changes, say that it was just a validation step and all validations passed
208
- - current step file path
209
- - the next step file path, or that no next step remains
210
- - 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
211
215
 
212
- 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:
213
217
 
214
- - next story ready to implement
215
- - next story needs an implementation plan
216
- - 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,13 @@
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
11
 
12
12
  ## Pipeline Contract
13
13
 
@@ -30,13 +30,15 @@ Turn one approved User Story into concrete Markdown step files an AI coding agen
30
30
  - Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
31
31
  - The story or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
32
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.
33
34
 
34
35
  ### What this skill must not do
35
36
 
36
- - Do not create or update product visions, Product Context Maps, feature briefs, technical designs, UX specs, Epics, User Stories, or production code.
37
+ - Do not create or update product visions, Deep Module Maps, feature briefs, technical designs, UX specs, Epics, User Stories, or production code.
37
38
  - Do not modify prior-stage artifacts.
38
- - Do not reread `docs/product-context-map.md` by default; trust `technical_design.md` for implementation boundaries.
39
+ - Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
39
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`.
40
42
 
41
43
  ## Required input
42
44
 
@@ -62,7 +64,7 @@ docs/features/<feature-slug>/ux.md # when the story or feature has UI impact
62
64
 
63
65
  Also read `docs/product-vision.md` when product fit, target user, scope boundaries, or success signals are ambiguous.
64
66
 
65
- When the feature brief or technical design includes Product Context guidance, treat it as required planning context. Product Contexts answer “where does this work belong?” Implementation steps must preserve approved context boundaries.
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.
66
68
 
67
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.
68
70
 
@@ -132,8 +134,8 @@ Do:
132
134
  - call out dependencies, sequencing constraints, and risk checkpoints
133
135
  - include test, build, lint, or manual validation commands when known
134
136
  - include a stop-and-ask condition when the implementation would exceed the technical design
135
- - keep work inside the approved Product Contexts unless cross-context work is explicit in the source artifacts
136
- - call out cross-context ownership and coordination in the relevant step files
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
137
139
 
138
140
  Do not:
139
141
 
@@ -143,7 +145,7 @@ Do not:
143
145
  - include prerequisite reading, scope confirmation, or repository inspection as step files
144
146
  - create task noise such as “review the code” without a specific implementation or validation purpose
145
147
  - prescribe architecture that conflicts with the selected architecture skill or technical design
146
- - move work into unrelated or unapproved Product Contexts; add a stop-and-ask condition instead
148
+ - move work into unrelated or unapproved Deep Modules; add a stop-and-ask condition instead
147
149
 
148
150
  ## Workflow
149
151
 
@@ -163,12 +165,12 @@ If the story lacks testable acceptance criteria, stop and ask for the User Story
163
165
 
164
166
  ### 2. Read feature and technical context
165
167
 
166
- From the Epic and feature brief, identify delivery boundaries, user value, and approved Product Context ownership when present.
168
+ From the Epic and feature brief, identify delivery boundaries, user value, and approved Deep Module ownership when present.
167
169
 
168
170
  From the technical design, identify:
169
171
 
170
172
  - intended implementation approach
171
- - Product Context boundaries, ownership, and any explicit cross-context work
173
+ - Deep Module boundaries, ownership, and any explicit cross-module work
172
174
  - affected commands, modules, files, adapters, docs, or tests
173
175
  - known risks or unresolved decisions
174
176
  - expected validation commands or checks
@@ -219,7 +221,7 @@ Step-file requirements:
219
221
  - keep each step small enough for one AI coding pass
220
222
  - name every known file, module, command, or artifact to change or validate
221
223
  - include explicit out-of-scope boundaries in `Scope` when they prevent scope creep
222
- - preserve Product Context boundaries in `Scope`; call out cross-context work explicitly when required
224
+ - preserve Deep Module boundaries in `Scope`; call out cross-module work explicitly when required
223
225
  - include validation commands in `Done when` when known
224
226
  - ensure the full set of step files covers every acceptance criterion
225
227
 
@@ -236,16 +238,21 @@ Before finishing, verify:
236
238
  - every step file has clear done conditions
237
239
  - validation is explicit enough to prove the story is complete
238
240
  - the step files do not add scope beyond the source artifacts
239
- - the step files preserve approved Product Context boundaries and stop before unrelated context movement
241
+ - the step files preserve approved Deep Module boundaries and stop before unrelated module movement
240
242
  - architecture and code-quality steps align with the relevant skills
241
243
 
242
- ## Final response behavior
244
+ ### 6. Request plan review
243
245
 
244
- 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:
245
251
 
246
- - the implementation plan folder path
247
- - the step file paths created
248
252
  - the source User Story path
249
- - 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
250
257
 
251
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.