@atlashub/smartstack-cli 1.13.2 → 1.14.1

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 (214) hide show
  1. package/.documentation/agents.html +1 -1
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +1 -1
  4. package/.documentation/cli-commands.html +3 -3
  5. package/.documentation/commands.html +1 -1
  6. package/.documentation/efcore.html +1 -1
  7. package/.documentation/gitflow.html +231 -236
  8. package/.documentation/hooks.html +1 -1
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +3 -3
  11. package/.documentation/installation.html +1075 -351
  12. package/.documentation/ralph-loop.html +1 -1
  13. package/.documentation/test-web.html +1 -1
  14. package/README.md +88 -20
  15. package/config/default-config.json +10 -1
  16. package/dist/index.js +276 -85
  17. package/dist/index.js.map +1 -1
  18. package/package.json +1 -1
  19. package/templates/agents/code-reviewer.md +163 -0
  20. package/templates/agents/efcore/db-deploy.md +25 -7
  21. package/templates/agents/efcore/db-reset.md +31 -10
  22. package/templates/agents/efcore/db-status.md +22 -5
  23. package/templates/agents/efcore/migration.md +70 -20
  24. package/templates/agents/gitflow/cleanup.md +8 -1
  25. package/templates/agents/gitflow/commit.md +7 -5
  26. package/templates/agents/gitflow/finish.md +6 -4
  27. package/templates/agents/gitflow/pr.md +8 -1
  28. package/templates/agents/gitflow/start.md +1 -1
  29. package/templates/commands/check-version.md +267 -0
  30. package/templates/commands/efcore/_shared.md +31 -2
  31. package/templates/commands/efcore/db-reset.md +18 -6
  32. package/templates/commands/efcore/migration.md +1 -1
  33. package/templates/commands/efcore/rebase-snapshot.md +1 -1
  34. package/templates/commands/efcore/squash.md +1 -0
  35. package/templates/commands/refactor.md +164 -0
  36. package/templates/project/DependencyInjection.Application.cs.template +25 -0
  37. package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
  38. package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
  39. package/templates/project/ExampleEntity.cs.template +116 -0
  40. package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
  41. package/templates/project/ExampleService.cs.template +146 -0
  42. package/templates/project/ExtensionsDbContext.cs.template +41 -0
  43. package/templates/project/IExtensionsDbContext.cs.template +22 -0
  44. package/templates/project/Program.cs.template +47 -0
  45. package/templates/project/README.md +79 -0
  46. package/templates/ralph/README.md +10 -8
  47. package/templates/ralph/ralph.config.yaml +2 -2
  48. package/templates/skills/_shared.md +44 -44
  49. package/templates/skills/ai-prompt/SKILL.md +55 -55
  50. package/templates/skills/apex/SKILL.md +235 -0
  51. package/templates/skills/apex/steps/step-00-init.md +203 -0
  52. package/templates/skills/apex/steps/step-01-analyze.md +210 -0
  53. package/templates/skills/apex/steps/step-02-plan.md +217 -0
  54. package/templates/skills/apex/steps/step-03-execute.md +178 -0
  55. package/templates/skills/apex/steps/step-04-validate.md +217 -0
  56. package/templates/skills/apex/steps/step-05-examine.md +207 -0
  57. package/templates/skills/apex/steps/step-06-resolve.md +181 -0
  58. package/templates/skills/apex/steps/step-07-tests.md +206 -0
  59. package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
  60. package/templates/skills/apex/templates/00-context.md +46 -0
  61. package/templates/skills/apex/templates/01-analyze.md +63 -0
  62. package/templates/skills/apex/templates/02-plan.md +63 -0
  63. package/templates/skills/apex/templates/03-execute.md +34 -0
  64. package/templates/skills/apex/templates/04-validate.md +61 -0
  65. package/templates/skills/apex/templates/05-examine.md +58 -0
  66. package/templates/skills/apex/templates/06-resolve.md +39 -0
  67. package/templates/skills/apex/templates/07-tests.md +56 -0
  68. package/templates/skills/apex/templates/08-run-tests.md +41 -0
  69. package/templates/skills/apex/templates/README.md +69 -0
  70. package/templates/skills/application/SKILL.md +50 -50
  71. package/templates/skills/application/templates-backend.md +25 -25
  72. package/templates/skills/application/templates-frontend.md +43 -43
  73. package/templates/skills/application/templates-i18n.md +29 -29
  74. package/templates/skills/application/templates-seed.md +77 -77
  75. package/templates/skills/business-analyse/SKILL.md +223 -0
  76. package/templates/skills/business-analyse/_shared.md +258 -0
  77. package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
  78. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
  79. package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
  80. package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
  81. package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
  82. package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
  83. package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
  84. package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
  85. package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
  86. package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
  87. package/templates/skills/business-analyse/questionnaire.md +177 -177
  88. package/templates/skills/business-analyse/react/components.md +340 -0
  89. package/templates/skills/business-analyse/react/i18n-template.md +245 -0
  90. package/templates/skills/business-analyse/react/schema.md +151 -0
  91. package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
  92. package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
  93. package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
  94. package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
  95. package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
  96. package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
  97. package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
  98. package/templates/skills/business-analyse/templates/00-context.md +105 -0
  99. package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
  100. package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
  101. package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
  102. package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
  103. package/templates/skills/business-analyse/templates-frd.md +217 -217
  104. package/templates/skills/business-analyse/templates-react.md +26 -26
  105. package/templates/skills/controller/SKILL.md +141 -92
  106. package/templates/skills/controller/postman-templates.md +15 -15
  107. package/templates/skills/controller/steps/step-00-init.md +191 -0
  108. package/templates/skills/controller/steps/step-01-analyze.md +146 -0
  109. package/templates/skills/controller/steps/step-02-plan.md +176 -0
  110. package/templates/skills/controller/steps/step-03-generate.md +219 -0
  111. package/templates/skills/controller/steps/step-04-perms.md +219 -0
  112. package/templates/skills/controller/steps/step-05-validate.md +107 -0
  113. package/templates/skills/controller/templates.md +77 -77
  114. package/templates/skills/documentation/SKILL.md +79 -79
  115. package/templates/skills/feature-full/SKILL.md +38 -38
  116. package/templates/skills/gitflow/SKILL.md +277 -0
  117. package/templates/{commands → skills}/gitflow/_shared.md +20 -20
  118. package/templates/skills/gitflow/phases/abort.md +173 -0
  119. package/templates/skills/gitflow/phases/cleanup.md +226 -0
  120. package/templates/skills/gitflow/phases/status.md +178 -0
  121. package/templates/skills/gitflow/steps/step-commit.md +255 -0
  122. package/templates/skills/gitflow/steps/step-finish.md +255 -0
  123. package/templates/skills/gitflow/steps/step-init.md +209 -0
  124. package/templates/skills/gitflow/steps/step-merge.md +225 -0
  125. package/templates/skills/gitflow/steps/step-plan.md +208 -0
  126. package/templates/skills/gitflow/steps/step-pr.md +235 -0
  127. package/templates/skills/gitflow/steps/step-start.md +334 -0
  128. package/templates/skills/gitflow/steps/step-sync.md +200 -0
  129. package/templates/skills/gitflow/templates/config.json +53 -0
  130. package/templates/skills/notification/SKILL.md +51 -51
  131. package/templates/skills/ralph-loop/SKILL.md +228 -0
  132. package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
  133. package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
  134. package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
  135. package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
  136. package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
  137. package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
  138. package/templates/skills/review-code/SKILL.md +219 -0
  139. package/templates/skills/review-code/references/clean-code-principles.md +140 -0
  140. package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
  141. package/templates/skills/review-code/references/feedback-patterns.md +149 -0
  142. package/templates/skills/review-code/references/security-checklist.md +127 -0
  143. package/templates/skills/ui-components/SKILL.md +54 -54
  144. package/templates/skills/workflow/SKILL.md +46 -46
  145. package/templates/commands/ai-prompt.md +0 -315
  146. package/templates/commands/apex/1-analyze.md +0 -100
  147. package/templates/commands/apex/2-plan.md +0 -145
  148. package/templates/commands/apex/3-execute.md +0 -171
  149. package/templates/commands/apex/4-examine.md +0 -116
  150. package/templates/commands/apex/5-tasks.md +0 -209
  151. package/templates/commands/apex.md +0 -76
  152. package/templates/commands/application/create.md +0 -362
  153. package/templates/commands/application/templates-backend.md +0 -463
  154. package/templates/commands/application/templates-frontend.md +0 -517
  155. package/templates/commands/application/templates-i18n.md +0 -478
  156. package/templates/commands/application/templates-seed.md +0 -362
  157. package/templates/commands/application.md +0 -303
  158. package/templates/commands/business-analyse/0-orchestrate.md +0 -156
  159. package/templates/commands/business-analyse/1-init.md +0 -99
  160. package/templates/commands/business-analyse/2-discover.md +0 -143
  161. package/templates/commands/business-analyse/3-analyse.md +0 -106
  162. package/templates/commands/business-analyse/4-specify.md +0 -133
  163. package/templates/commands/business-analyse/5-validate.md +0 -132
  164. package/templates/commands/business-analyse/6-handoff.md +0 -157
  165. package/templates/commands/business-analyse/7-doc-html.md +0 -103
  166. package/templates/commands/business-analyse/_shared.md +0 -176
  167. package/templates/commands/business-analyse/bug.md +0 -118
  168. package/templates/commands/business-analyse/change-request.md +0 -144
  169. package/templates/commands/business-analyse/hotfix.md +0 -116
  170. package/templates/commands/business-analyse.md +0 -121
  171. package/templates/commands/controller/create.md +0 -216
  172. package/templates/commands/controller/postman-templates.md +0 -528
  173. package/templates/commands/controller/templates.md +0 -600
  174. package/templates/commands/controller.md +0 -337
  175. package/templates/commands/create/agent.md +0 -138
  176. package/templates/commands/create/command.md +0 -166
  177. package/templates/commands/create/hook.md +0 -234
  178. package/templates/commands/create/plugin.md +0 -329
  179. package/templates/commands/create/project.md +0 -508
  180. package/templates/commands/create/skill.md +0 -199
  181. package/templates/commands/create.md +0 -220
  182. package/templates/commands/documentation/module.md +0 -202
  183. package/templates/commands/documentation/templates.md +0 -432
  184. package/templates/commands/documentation.md +0 -190
  185. package/templates/commands/epct.md +0 -69
  186. package/templates/commands/explain.md +0 -186
  187. package/templates/commands/feature-full.md +0 -267
  188. package/templates/commands/gitflow/1-init.md +0 -188
  189. package/templates/commands/gitflow/10-start.md +0 -190
  190. package/templates/commands/gitflow/11-finish.md +0 -382
  191. package/templates/commands/gitflow/12-cleanup.md +0 -103
  192. package/templates/commands/gitflow/13-sync.md +0 -216
  193. package/templates/commands/gitflow/14-rebase.md +0 -251
  194. package/templates/commands/gitflow/2-status.md +0 -122
  195. package/templates/commands/gitflow/3-commit.md +0 -209
  196. package/templates/commands/gitflow/4-plan.md +0 -174
  197. package/templates/commands/gitflow/5-exec.md +0 -202
  198. package/templates/commands/gitflow/6-abort.md +0 -121
  199. package/templates/commands/gitflow/7-pull-request.md +0 -176
  200. package/templates/commands/gitflow/8-review.md +0 -113
  201. package/templates/commands/gitflow/9-merge.md +0 -157
  202. package/templates/commands/gitflow.md +0 -128
  203. package/templates/commands/implement.md +0 -663
  204. package/templates/commands/init.md +0 -567
  205. package/templates/commands/mcp-integration.md +0 -330
  206. package/templates/commands/notification.md +0 -129
  207. package/templates/commands/oneshot.md +0 -57
  208. package/templates/commands/quickstart.md +0 -154
  209. package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
  210. package/templates/commands/ralph-loop/help.md +0 -126
  211. package/templates/commands/ralph-loop/ralph-loop.md +0 -120
  212. package/templates/commands/review.md +0 -106
  213. package/templates/commands/workflow.md +0 -193
  214. package/templates/gitflow/config.json +0 -138
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: step-init
3
+ description: Initialize GitFlow configuration and branches
4
+ next_step: null
5
+ ---
6
+
7
+ # Step: INIT - Initialize GitFlow
8
+
9
+ ## YOUR TASK:
10
+
11
+ Set up GitFlow configuration, create main/develop branches, and configure worktree structure.
12
+
13
+ **ULTRA THINK before creating configuration.**
14
+
15
+ ---
16
+
17
+ ## EXECUTION SEQUENCE:
18
+
19
+ ### 1. Detect Environment
20
+
21
+ ```bash
22
+ # Check if already initialized
23
+ [ -f ".claude/gitflow/config.json" ] && {
24
+ echo "GitFlow already initialized"
25
+ # Show current config and ask to reinitialize
26
+ }
27
+
28
+ # Detect git provider
29
+ REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "")
30
+ if [[ "$REMOTE_URL" == *"github.com"* ]]; then
31
+ GIT_PROVIDER="github"
32
+ elif [[ "$REMOTE_URL" == *"dev.azure.com"* ]]; then
33
+ GIT_PROVIDER="azuredevops"
34
+ else
35
+ GIT_PROVIDER="unknown"
36
+ fi
37
+
38
+ # Detect existing branches
39
+ HAS_MAIN=$(git branch -r --list "origin/main" | wc -l)
40
+ HAS_DEVELOP=$(git branch -r --list "origin/develop" | wc -l)
41
+ ```
42
+
43
+ ### 2. Configuration Questions
44
+
45
+ ```yaml
46
+ AskUserQuestion:
47
+ - header: "Mode"
48
+ question: "How do you want to set up GitFlow?"
49
+ options:
50
+ - label: "Quick Setup (Recommended)"
51
+ description: "Auto-detect settings, create branches"
52
+ - label: "Custom Setup"
53
+ description: "Configure each option manually"
54
+ - label: "Existing Config"
55
+ description: "Use existing .claude/gitflow/config.json"
56
+
57
+ - header: "Worktrees"
58
+ question: "How should worktrees be organized?"
59
+ options:
60
+ - label: "Organized (Recommended)"
61
+ description: "../features/, ../releases/, ../hotfixes/"
62
+ - label: "Adjacent"
63
+ description: "../worktrees/{type}/"
64
+ - label: "Disabled"
65
+ description: "No worktrees, use git checkout"
66
+ ```
67
+
68
+ ### 3. Create Branches (if needed)
69
+
70
+ ```bash
71
+ # Ensure we have main
72
+ [ "$HAS_MAIN" -eq 0 ] && {
73
+ git checkout -b main
74
+ git push -u origin main
75
+ }
76
+
77
+ # Ensure we have develop
78
+ [ "$HAS_DEVELOP" -eq 0 ] && {
79
+ git checkout main
80
+ git checkout -b develop
81
+ git push -u origin develop
82
+ }
83
+ ```
84
+
85
+ ### 4. Create Directory Structure
86
+
87
+ ```bash
88
+ mkdir -p .claude/gitflow/{plans,logs,cache,backup}
89
+
90
+ # Create worktree directories if mode != disabled
91
+ case "$WORKTREE_MODE" in
92
+ organized)
93
+ mkdir -p ../features ../releases ../hotfixes
94
+ ;;
95
+ adjacent)
96
+ mkdir -p ../worktrees/{features,releases,hotfixes}
97
+ ;;
98
+ esac
99
+ ```
100
+
101
+ ### 5. Create Configuration
102
+
103
+ **Write `.claude/gitflow/config.json`:**
104
+
105
+ ```json
106
+ {
107
+ "version": "2.0.0",
108
+ "repository": {
109
+ "name": "{repo_name}",
110
+ "defaultBranch": "main",
111
+ "remoteUrl": "{remote_url}"
112
+ },
113
+ "git": {
114
+ "provider": "{github|azuredevops}",
115
+ "branches": {
116
+ "main": "main",
117
+ "develop": "develop"
118
+ },
119
+ "prefixes": {
120
+ "feature": "feature/",
121
+ "release": "release/",
122
+ "hotfix": "hotfix/"
123
+ }
124
+ },
125
+ "worktrees": {
126
+ "enabled": true,
127
+ "mode": "{organized|adjacent|disabled}",
128
+ "structure": {
129
+ "features": "../features",
130
+ "releases": "../releases",
131
+ "hotfixes": "../hotfixes"
132
+ }
133
+ },
134
+ "versioning": {
135
+ "strategy": "semver",
136
+ "current": "{X.Y.Z}",
137
+ "tagPrefix": "v",
138
+ "sources": ["csproj", "package.json", "VERSION"]
139
+ },
140
+ "efcore": {
141
+ "enabled": true,
142
+ "validateOnCommit": true,
143
+ "blockDestructive": true,
144
+ "migrationNaming": "{context}_v{version}_{sequence}_{Description}"
145
+ },
146
+ "workflow": {
147
+ "push": {
148
+ "afterCommit": "worktree"
149
+ },
150
+ "pr": {
151
+ "autoLabels": true,
152
+ "requireReview": true
153
+ }
154
+ },
155
+ "language": {
156
+ "code": "en"
157
+ }
158
+ }
159
+ ```
160
+
161
+ ### 6. Detect Version
162
+
163
+ ```bash
164
+ # Priority: csproj > Directory.Build.props > package.json > VERSION > tag
165
+ VERSION=$(grep -oP '<Version>\K[^<]+' *.csproj 2>/dev/null | head -1)
166
+ [ -z "$VERSION" ] && VERSION=$(grep -oP '<Version>\K[^<]+' Directory.Build.props 2>/dev/null)
167
+ [ -z "$VERSION" ] && VERSION=$(grep -oP '"version":\s*"\K[^"]+' package.json 2>/dev/null)
168
+ [ -z "$VERSION" ] && VERSION=$(cat VERSION 2>/dev/null)
169
+ [ -z "$VERSION" ] && VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')
170
+ [ -z "$VERSION" ] && VERSION="0.1.0"
171
+ ```
172
+
173
+ ### 7. Summary
174
+
175
+ ```
176
+ ╔══════════════════════════════════════════════════════════════════╗
177
+ ║ GITFLOW INITIALIZED ║
178
+ ╠══════════════════════════════════════════════════════════════════╣
179
+ ║ Repository: {repo_name} ║
180
+ ║ Provider: {github|azuredevops} ║
181
+ ║ Version: {X.Y.Z} ║
182
+ ╠══════════════════════════════════════════════════════════════════╣
183
+ ║ Branches: ║
184
+ ║ - main: ✅ Ready ║
185
+ ║ - develop: ✅ Ready ║
186
+ ╠══════════════════════════════════════════════════════════════════╣
187
+ ║ Worktrees: {mode} ║
188
+ ║ - ../features/ (for feature branches) ║
189
+ ║ - ../releases/ (for release branches) ║
190
+ ║ - ../hotfixes/ (for hotfix branches) ║
191
+ ╠══════════════════════════════════════════════════════════════════╣
192
+ ║ Config: .claude/gitflow/config.json ║
193
+ ╠══════════════════════════════════════════════════════════════════╣
194
+ ║ NEXT: /gitflow start feature <name> ║
195
+ ╚══════════════════════════════════════════════════════════════════╝
196
+ ```
197
+
198
+ ---
199
+
200
+ ## SUCCESS CRITERIA:
201
+
202
+ - Configuration file created
203
+ - main and develop branches exist
204
+ - Worktree directories created (if enabled)
205
+ - Version detected and stored
206
+
207
+ ## NEXT STEP:
208
+
209
+ Init is standalone. User can now run `/gitflow start feature <name>`.
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: step-merge
3
+ description: Review checklist and merge PR
4
+ next_step: steps/step-finish.md
5
+ ---
6
+
7
+ # Step: MERGE - Review and Merge PR
8
+
9
+ ## YOUR TASK:
10
+
11
+ Run through review checklist and merge the pull request with appropriate strategy.
12
+
13
+ **ULTRA THINK about merge safety.**
14
+
15
+ ---
16
+
17
+ ## EXECUTION SEQUENCE:
18
+
19
+ ### 1. Load PR Context
20
+
21
+ ```bash
22
+ CURRENT=$(git rev-parse --abbrev-ref HEAD)
23
+ GIT_PROVIDER=$(grep -oP '"provider":\s*"\K[^"]+' .claude/gitflow/config.json 2>/dev/null || echo "github")
24
+
25
+ # Get PR number
26
+ if [ "$GIT_PROVIDER" = "github" ]; then
27
+ PR_NUMBER=$(gh pr list --head "$CURRENT" --json number --jq '.[0].number')
28
+ PR_STATUS=$(gh pr view $PR_NUMBER --json state,mergeable,reviews --jq '.')
29
+ elif [ "$GIT_PROVIDER" = "azuredevops" ]; then
30
+ PR_NUMBER=$(az repos pr list --source-branch "$CURRENT" --query "[0].pullRequestId" -o tsv)
31
+ PR_STATUS=$(az repos pr show --id $PR_NUMBER --query "{status:status,mergeStatus:mergeStatus}")
32
+ fi
33
+
34
+ [ -z "$PR_NUMBER" ] && {
35
+ echo "❌ No PR found for branch $CURRENT"
36
+ echo "→ Run /gitflow pr first"
37
+ STOP
38
+ }
39
+ ```
40
+
41
+ ### 2. Display Review Checklist
42
+
43
+ ```
44
+ ╔══════════════════════════════════════════════════════════════════╗
45
+ ║ PR REVIEW CHECKLIST ║
46
+ ╠══════════════════════════════════════════════════════════════════╣
47
+ ║ PR #${PR_NUMBER}: ${PR_TITLE} ║
48
+ ╠══════════════════════════════════════════════════════════════════╣
49
+
50
+ ## Code Quality
51
+ - [ ] Code follows project conventions
52
+ - [ ] No unnecessary complexity
53
+ - [ ] No code duplication
54
+ - [ ] Variable/function names are clear
55
+
56
+ ## Security
57
+ - [ ] No hardcoded secrets
58
+ - [ ] Input validation present
59
+ - [ ] Authentication/authorization correct
60
+ - [ ] No SQL injection risks
61
+
62
+ ## Testing
63
+ - [ ] Unit tests added/updated
64
+ - [ ] Integration tests pass
65
+ - [ ] Manual testing completed
66
+
67
+ ## EF Core (if applicable)
68
+ - [ ] Migration files complete (3 files)
69
+ - [ ] No destructive operations (or confirmed)
70
+ - [ ] Snapshot synced with base
71
+
72
+ ## Documentation
73
+ - [ ] Code comments where needed
74
+ - [ ] API docs updated (if applicable)
75
+ - [ ] README updated (if applicable)
76
+
77
+ ╚══════════════════════════════════════════════════════════════════╝
78
+ ```
79
+
80
+ ### 3. Check CI Status
81
+
82
+ ```bash
83
+ if [ "$GIT_PROVIDER" = "github" ]; then
84
+ CI_STATUS=$(gh pr checks $PR_NUMBER --json state --jq '.[].state' | sort -u)
85
+
86
+ [[ "$CI_STATUS" == *"FAILURE"* ]] && {
87
+ echo "❌ CI checks failing"
88
+ gh pr checks $PR_NUMBER
89
+
90
+ if [ "$auto_mode" != true ]; then
91
+ AskUserQuestion:
92
+ header: "CI"
93
+ question: "CI checks are failing. Continue anyway?"
94
+ options:
95
+ - label: "Wait for fix"
96
+ - label: "Merge anyway (not recommended)"
97
+ fi
98
+ }
99
+ fi
100
+ ```
101
+
102
+ ### 4. Check Review Status
103
+
104
+ ```bash
105
+ if [ "$GIT_PROVIDER" = "github" ]; then
106
+ REVIEWS=$(gh pr view $PR_NUMBER --json reviews --jq '.reviews | map(select(.state == "APPROVED")) | length')
107
+ REQUIRED_REVIEWS=$(gh api repos/:owner/:repo --jq '.default_branch_protection.required_pull_request_reviews.required_approving_review_count // 0')
108
+
109
+ [ "$REVIEWS" -lt "$REQUIRED_REVIEWS" ] && {
110
+ echo "⚠️ Needs $REQUIRED_REVIEWS approvals, has $REVIEWS"
111
+ }
112
+ fi
113
+ ```
114
+
115
+ ### 5. Determine Merge Strategy
116
+
117
+ ```bash
118
+ BRANCH_TYPE=$(echo $CURRENT | cut -d'/' -f1)
119
+
120
+ case "$BRANCH_TYPE" in
121
+ feature)
122
+ MERGE_STRATEGY="squash"
123
+ DELETE_BRANCH=true
124
+ ;;
125
+ release|hotfix)
126
+ MERGE_STRATEGY="merge"
127
+ DELETE_BRANCH=true
128
+ MERGE_BACK="develop"
129
+ ;;
130
+ esac
131
+ ```
132
+
133
+ ### 6. Final Confirmation
134
+
135
+ ```yaml
136
+ AskUserQuestion:
137
+ header: "Merge"
138
+ question: "Ready to merge PR #$PR_NUMBER?"
139
+ options:
140
+ - label: "Yes, merge now"
141
+ description: "Strategy: $MERGE_STRATEGY, Delete branch: $DELETE_BRANCH"
142
+ - label: "No, wait"
143
+ description: "Cancel merge"
144
+ ```
145
+
146
+ ### 7. Execute Merge
147
+
148
+ **GitHub:**
149
+ ```bash
150
+ case "$MERGE_STRATEGY" in
151
+ squash)
152
+ gh pr merge $PR_NUMBER --squash --delete-branch
153
+ ;;
154
+ merge)
155
+ gh pr merge $PR_NUMBER --merge --delete-branch
156
+ ;;
157
+ esac
158
+ ```
159
+
160
+ **Azure DevOps:**
161
+ ```bash
162
+ case "$MERGE_STRATEGY" in
163
+ squash)
164
+ az repos pr update --id $PR_NUMBER --status completed --squash true --delete-source-branch true
165
+ ;;
166
+ merge)
167
+ az repos pr update --id $PR_NUMBER --status completed --squash false --delete-source-branch true
168
+ ;;
169
+ esac
170
+ ```
171
+
172
+ ### 8. Verify Merge
173
+
174
+ ```bash
175
+ git fetch origin
176
+ MERGED=$(git branch -r --merged origin/$TARGET_BRANCH | grep "$CURRENT" | wc -l)
177
+
178
+ [ "$MERGED" -eq 0 ] && {
179
+ echo "⚠️ Merge verification failed"
180
+ # Check if PR is actually merged
181
+ }
182
+ ```
183
+
184
+ ### 9. Summary
185
+
186
+ ```
187
+ ╔══════════════════════════════════════════════════════════════════╗
188
+ ║ PR MERGED ║
189
+ ╠══════════════════════════════════════════════════════════════════╣
190
+ ║ PR: #{PR_NUMBER} ║
191
+ ║ Strategy: {MERGE_STRATEGY} ║
192
+ ║ Target: {TARGET_BRANCH} ║
193
+ ╠══════════════════════════════════════════════════════════════════╣
194
+ ║ Branch: {deleted | kept} ║
195
+ {if MERGE_BACK}
196
+ ║ Merge back: {MERGE_BACK} pending ║
197
+ {endif}
198
+ ╠══════════════════════════════════════════════════════════════════╣
199
+ ║ NEXT: /gitflow finish ║
200
+ ╚══════════════════════════════════════════════════════════════════╝
201
+ ```
202
+
203
+ ---
204
+
205
+ ## ERROR HANDLING:
206
+
207
+ | Error | Solution |
208
+ |-------|----------|
209
+ | CI failing | Wait for fix or force merge |
210
+ | No reviews | Request review or bypass |
211
+ | Merge conflicts | Rebase and retry |
212
+ | Branch protection | Request admin merge |
213
+
214
+ ---
215
+
216
+ ## SUCCESS CRITERIA:
217
+
218
+ - Review checklist completed
219
+ - CI checks passing (or bypassed)
220
+ - PR merged with correct strategy
221
+ - Source branch deleted
222
+
223
+ ## NEXT STEP:
224
+
225
+ Proceed to `/gitflow finish` (automatically or manually).
@@ -0,0 +1,208 @@
1
+ ---
2
+ name: step-plan
3
+ description: Generate integration plan with EF Core analysis
4
+ next_step: null
5
+ ---
6
+
7
+ # Step: PLAN - Integration Strategy
8
+
9
+ ## YOUR TASK:
10
+
11
+ Analyze branch state, detect migration conflicts, and generate a detailed integration plan.
12
+
13
+ **ULTRA THINK about merge strategy and migration handling.**
14
+
15
+ ---
16
+
17
+ ## EXECUTION SEQUENCE:
18
+
19
+ ### 1. Analyze Branch Context
20
+
21
+ ```bash
22
+ CURRENT=$(git rev-parse --abbrev-ref HEAD)
23
+ git fetch origin --quiet
24
+
25
+ # Determine target based on branch type
26
+ case "$CURRENT" in
27
+ feature/*)
28
+ BASE_BRANCH="develop"
29
+ MERGE_STRATEGY="squash"
30
+ ;;
31
+ release/*)
32
+ BASE_BRANCH="main"
33
+ MERGE_STRATEGY="merge"
34
+ MERGE_BACK="develop"
35
+ ;;
36
+ hotfix/*)
37
+ BASE_BRANCH="main"
38
+ MERGE_STRATEGY="merge"
39
+ MERGE_BACK="develop"
40
+ ;;
41
+ esac
42
+
43
+ # Get commits
44
+ COMMITS=$(git rev-list --count origin/$BASE_BRANCH..HEAD)
45
+ COMMIT_LIST=$(git log --oneline origin/$BASE_BRANCH..HEAD)
46
+ ```
47
+
48
+ ### 2. Analyze EF Core Migrations
49
+
50
+ ```bash
51
+ # Find migration files in branch
52
+ BRANCH_MIGRATIONS=$(git diff --name-only origin/$BASE_BRANCH...HEAD | grep "Migrations/")
53
+
54
+ # Find migrations in base branch
55
+ BASE_MIGRATIONS=$(git ls-tree -r --name-only origin/$BASE_BRANCH | grep "Migrations/")
56
+
57
+ # Check for snapshot divergence
58
+ SNAPSHOT_BRANCH=$(git show HEAD:$(find . -name "*ModelSnapshot.cs" -path "*/Migrations/*" | head -1) 2>/dev/null | md5sum)
59
+ SNAPSHOT_BASE=$(git show origin/$BASE_BRANCH:$(find . -name "*ModelSnapshot.cs" -path "*/Migrations/*" | head -1) 2>/dev/null | md5sum)
60
+
61
+ SNAPSHOT_DIVERGED=$([ "$SNAPSHOT_BRANCH" != "$SNAPSHOT_BASE" ] && echo "true" || echo "false")
62
+ ```
63
+
64
+ ### 3. Detect Conflicts
65
+
66
+ **Migration conflicts:**
67
+ ```bash
68
+ if [ "$SNAPSHOT_DIVERGED" = "true" ]; then
69
+ echo "⚠️ ModelSnapshot has diverged from $BASE_BRANCH"
70
+
71
+ # Check if base has new migrations we don't have
72
+ NEW_BASE_MIGRATIONS=$(git diff --name-only HEAD...origin/$BASE_BRANCH | grep "Migrations/" | grep -v "ModelSnapshot")
73
+
74
+ [ -n "$NEW_BASE_MIGRATIONS" ] && {
75
+ CONFLICT_TYPE="migration"
76
+ CONFLICT_RESOLUTION="rebase-snapshot"
77
+ }
78
+ fi
79
+ ```
80
+
81
+ **Code conflicts:**
82
+ ```bash
83
+ # Dry-run merge to detect conflicts
84
+ git merge-tree $(git merge-base HEAD origin/$BASE_BRANCH) HEAD origin/$BASE_BRANCH > /tmp/merge-tree 2>&1
85
+ CODE_CONFLICTS=$(grep -c "<<<<<<" /tmp/merge-tree || echo "0")
86
+ ```
87
+
88
+ ### 4. Determine Integration Strategy
89
+
90
+ | Scenario | Strategy |
91
+ |----------|----------|
92
+ | No conflicts | Direct merge |
93
+ | Code conflicts only | Rebase + resolve |
94
+ | Migration conflicts | `/efcore:rebase-snapshot` first |
95
+ | Both | Migration first, then code |
96
+
97
+ ### 5. Generate Plan Document
98
+
99
+ **Write to `.claude/gitflow/plans/{branch-name}_{date}.md`:**
100
+
101
+ ```markdown
102
+ # Integration Plan: {CURRENT} → {BASE_BRANCH}
103
+
104
+ **Generated:** {timestamp}
105
+ **Status:** PENDING
106
+
107
+ ## Summary
108
+
109
+ | Field | Value |
110
+ |-------|-------|
111
+ | Source | {CURRENT} |
112
+ | Target | {BASE_BRANCH} |
113
+ | Commits | {COMMITS} |
114
+ | Strategy | {MERGE_STRATEGY} |
115
+ | Merge Back | {MERGE_BACK or "N/A"} |
116
+
117
+ ## Commits to Integrate
118
+
119
+ {COMMIT_LIST}
120
+
121
+ ## EF Core Analysis
122
+
123
+ | Check | Status |
124
+ |-------|--------|
125
+ | Branch migrations | {count} |
126
+ | Base migrations | {count} |
127
+ | Snapshot diverged | {yes/no} |
128
+ | Conflict type | {none/migration/code/both} |
129
+
130
+ ## Pre-Integration Steps
131
+
132
+ {if migration conflict}
133
+ 1. [ ] Run `/efcore:rebase-snapshot`
134
+ 2. [ ] Verify migration generates same schema
135
+ 3. [ ] Run `/gitflow sync`
136
+ {endif}
137
+
138
+ {if code conflict}
139
+ 1. [ ] Run `/gitflow sync` (includes rebase)
140
+ 2. [ ] Resolve conflicts manually
141
+ 3. [ ] Verify build passes
142
+ {endif}
143
+
144
+ ## Integration Steps
145
+
146
+ 1. [ ] Create PR: `/gitflow pr`
147
+ 2. [ ] Review and approve
148
+ 3. [ ] Merge: `/gitflow merge`
149
+ {if release or hotfix}
150
+ 4. [ ] Merge back to develop
151
+ 5. [ ] Create tag: v{VERSION}
152
+ {endif}
153
+ 6. [ ] Cleanup: `/gitflow finish`
154
+
155
+ ## Post-Integration
156
+
157
+ - [ ] Verify CI/CD passes
158
+ - [ ] Verify migrations applied
159
+ - [ ] Delete source branch
160
+ - [ ] Remove worktree
161
+ ```
162
+
163
+ ### 6. Display Plan Summary
164
+
165
+ ```
166
+ ╔══════════════════════════════════════════════════════════════════╗
167
+ ║ INTEGRATION PLAN ║
168
+ ╠══════════════════════════════════════════════════════════════════╣
169
+ ║ {CURRENT} → {BASE_BRANCH} ║
170
+ ╠══════════════════════════════════════════════════════════════════╣
171
+ ║ Commits: {COMMITS} ║
172
+ ║ Strategy: {MERGE_STRATEGY} ║
173
+ ║ Migrations: {migration_status} ║
174
+ ║ Conflicts: {conflict_status} ║
175
+ ╠══════════════════════════════════════════════════════════════════╣
176
+ {if conflicts}
177
+ ║ ⚠️ PRE-REQUISITES: ║
178
+ ║ {list of required steps} ║
179
+ ╠══════════════════════════════════════════════════════════════════╣
180
+ {endif}
181
+ ║ Plan saved: .claude/gitflow/plans/{filename} ║
182
+ ╠══════════════════════════════════════════════════════════════════╣
183
+ ║ NEXT: {/efcore:rebase-snapshot | /gitflow pr} ║
184
+ ╚══════════════════════════════════════════════════════════════════╝
185
+ ```
186
+
187
+ ---
188
+
189
+ ## BLOCKING CONDITIONS:
190
+
191
+ - **Migration conflict** → Must run `/efcore:rebase-snapshot` first
192
+ - **Destructive migrations** → Require explicit confirmation
193
+ - **Build failure** → Fix before proceeding
194
+
195
+ ---
196
+
197
+ ## SUCCESS CRITERIA:
198
+
199
+ - Branch context analyzed
200
+ - Migration status determined
201
+ - Conflicts identified
202
+ - Plan document generated
203
+ - Clear next steps provided
204
+
205
+ ## NEXT STEP:
206
+
207
+ - If conflicts: Resolve per plan
208
+ - If clean: `/gitflow pr`