@atlashub/smartstack-cli 1.13.2 → 1.14.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 (210) 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 +1 -1
  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 +1001 -352
  12. package/.documentation/ralph-loop.html +1 -1
  13. package/.documentation/test-web.html +1 -1
  14. package/README.md +88 -20
  15. package/dist/index.js +276 -85
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/code-reviewer.md +163 -0
  19. package/templates/agents/efcore/db-deploy.md +25 -7
  20. package/templates/agents/efcore/db-reset.md +31 -10
  21. package/templates/agents/efcore/db-status.md +22 -5
  22. package/templates/agents/efcore/migration.md +69 -19
  23. package/templates/agents/gitflow/cleanup.md +8 -1
  24. package/templates/agents/gitflow/commit.md +7 -5
  25. package/templates/agents/gitflow/finish.md +6 -4
  26. package/templates/agents/gitflow/pr.md +8 -1
  27. package/templates/agents/gitflow/start.md +1 -1
  28. package/templates/commands/check-version.md +267 -0
  29. package/templates/commands/efcore/_shared.md +30 -1
  30. package/templates/commands/efcore/db-reset.md +18 -6
  31. package/templates/commands/gitflow/OPTIMIZATIONS.md +206 -0
  32. package/templates/commands/refactor.md +164 -0
  33. package/templates/project/DependencyInjection.Application.cs.template +25 -0
  34. package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
  35. package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
  36. package/templates/project/ExampleEntity.cs.template +116 -0
  37. package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
  38. package/templates/project/ExampleService.cs.template +146 -0
  39. package/templates/project/ExtensionsDbContext.cs.template +41 -0
  40. package/templates/project/IExtensionsDbContext.cs.template +22 -0
  41. package/templates/project/Program.cs.template +47 -0
  42. package/templates/project/README.md +79 -0
  43. package/templates/ralph/README.md +10 -8
  44. package/templates/ralph/ralph.config.yaml +2 -2
  45. package/templates/skills/_shared.md +44 -44
  46. package/templates/skills/ai-prompt/SKILL.md +55 -55
  47. package/templates/skills/apex/SKILL.md +235 -0
  48. package/templates/skills/apex/steps/step-00-init.md +203 -0
  49. package/templates/skills/apex/steps/step-01-analyze.md +210 -0
  50. package/templates/skills/apex/steps/step-02-plan.md +217 -0
  51. package/templates/skills/apex/steps/step-03-execute.md +178 -0
  52. package/templates/skills/apex/steps/step-04-validate.md +217 -0
  53. package/templates/skills/apex/steps/step-05-examine.md +207 -0
  54. package/templates/skills/apex/steps/step-06-resolve.md +181 -0
  55. package/templates/skills/apex/steps/step-07-tests.md +206 -0
  56. package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
  57. package/templates/skills/apex/templates/00-context.md +46 -0
  58. package/templates/skills/apex/templates/01-analyze.md +63 -0
  59. package/templates/skills/apex/templates/02-plan.md +63 -0
  60. package/templates/skills/apex/templates/03-execute.md +34 -0
  61. package/templates/skills/apex/templates/04-validate.md +61 -0
  62. package/templates/skills/apex/templates/05-examine.md +58 -0
  63. package/templates/skills/apex/templates/06-resolve.md +39 -0
  64. package/templates/skills/apex/templates/07-tests.md +56 -0
  65. package/templates/skills/apex/templates/08-run-tests.md +41 -0
  66. package/templates/skills/apex/templates/README.md +69 -0
  67. package/templates/skills/application/SKILL.md +50 -50
  68. package/templates/skills/application/templates-backend.md +25 -25
  69. package/templates/skills/application/templates-frontend.md +43 -43
  70. package/templates/skills/application/templates-i18n.md +29 -29
  71. package/templates/skills/application/templates-seed.md +77 -77
  72. package/templates/skills/business-analyse/SKILL.md +223 -0
  73. package/templates/skills/business-analyse/_shared.md +258 -0
  74. package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
  75. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
  76. package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
  77. package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
  78. package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
  79. package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
  80. package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
  81. package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
  82. package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
  83. package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
  84. package/templates/skills/business-analyse/questionnaire.md +177 -177
  85. package/templates/skills/business-analyse/react/components.md +340 -0
  86. package/templates/skills/business-analyse/react/i18n-template.md +245 -0
  87. package/templates/skills/business-analyse/react/schema.md +151 -0
  88. package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
  89. package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
  90. package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
  91. package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
  92. package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
  93. package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
  94. package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
  95. package/templates/skills/business-analyse/templates/00-context.md +105 -0
  96. package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
  97. package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
  98. package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
  99. package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
  100. package/templates/skills/business-analyse/templates-frd.md +217 -217
  101. package/templates/skills/business-analyse/templates-react.md +26 -26
  102. package/templates/skills/controller/SKILL.md +141 -92
  103. package/templates/skills/controller/postman-templates.md +15 -15
  104. package/templates/skills/controller/steps/step-00-init.md +191 -0
  105. package/templates/skills/controller/steps/step-01-analyze.md +146 -0
  106. package/templates/skills/controller/steps/step-02-plan.md +176 -0
  107. package/templates/skills/controller/steps/step-03-generate.md +219 -0
  108. package/templates/skills/controller/steps/step-04-perms.md +219 -0
  109. package/templates/skills/controller/steps/step-05-validate.md +107 -0
  110. package/templates/skills/controller/templates.md +77 -77
  111. package/templates/skills/documentation/SKILL.md +79 -79
  112. package/templates/skills/feature-full/SKILL.md +38 -38
  113. package/templates/skills/gitflow/SKILL.md +277 -0
  114. package/templates/{commands → skills}/gitflow/_shared.md +20 -20
  115. package/templates/skills/gitflow/phases/abort.md +173 -0
  116. package/templates/skills/gitflow/phases/cleanup.md +226 -0
  117. package/templates/skills/gitflow/phases/status.md +178 -0
  118. package/templates/skills/gitflow/steps/step-commit.md +255 -0
  119. package/templates/skills/gitflow/steps/step-finish.md +255 -0
  120. package/templates/skills/gitflow/steps/step-init.md +209 -0
  121. package/templates/skills/gitflow/steps/step-merge.md +225 -0
  122. package/templates/skills/gitflow/steps/step-plan.md +208 -0
  123. package/templates/skills/gitflow/steps/step-pr.md +235 -0
  124. package/templates/skills/gitflow/steps/step-start.md +234 -0
  125. package/templates/skills/gitflow/steps/step-sync.md +200 -0
  126. package/templates/skills/gitflow/templates/config.json +53 -0
  127. package/templates/skills/notification/SKILL.md +51 -51
  128. package/templates/skills/ralph-loop/SKILL.md +228 -0
  129. package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
  130. package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
  131. package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
  132. package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
  133. package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
  134. package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
  135. package/templates/skills/review-code/SKILL.md +219 -0
  136. package/templates/skills/review-code/references/clean-code-principles.md +140 -0
  137. package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
  138. package/templates/skills/review-code/references/feedback-patterns.md +149 -0
  139. package/templates/skills/review-code/references/security-checklist.md +127 -0
  140. package/templates/skills/ui-components/SKILL.md +54 -54
  141. package/templates/skills/workflow/SKILL.md +46 -46
  142. package/templates/commands/ai-prompt.md +0 -315
  143. package/templates/commands/apex/1-analyze.md +0 -100
  144. package/templates/commands/apex/2-plan.md +0 -145
  145. package/templates/commands/apex/3-execute.md +0 -171
  146. package/templates/commands/apex/4-examine.md +0 -116
  147. package/templates/commands/apex/5-tasks.md +0 -209
  148. package/templates/commands/apex.md +0 -76
  149. package/templates/commands/application/create.md +0 -362
  150. package/templates/commands/application/templates-backend.md +0 -463
  151. package/templates/commands/application/templates-frontend.md +0 -517
  152. package/templates/commands/application/templates-i18n.md +0 -478
  153. package/templates/commands/application/templates-seed.md +0 -362
  154. package/templates/commands/application.md +0 -303
  155. package/templates/commands/business-analyse/0-orchestrate.md +0 -156
  156. package/templates/commands/business-analyse/1-init.md +0 -99
  157. package/templates/commands/business-analyse/2-discover.md +0 -143
  158. package/templates/commands/business-analyse/3-analyse.md +0 -106
  159. package/templates/commands/business-analyse/4-specify.md +0 -133
  160. package/templates/commands/business-analyse/5-validate.md +0 -132
  161. package/templates/commands/business-analyse/6-handoff.md +0 -157
  162. package/templates/commands/business-analyse/7-doc-html.md +0 -103
  163. package/templates/commands/business-analyse/_shared.md +0 -176
  164. package/templates/commands/business-analyse/bug.md +0 -118
  165. package/templates/commands/business-analyse/change-request.md +0 -144
  166. package/templates/commands/business-analyse/hotfix.md +0 -116
  167. package/templates/commands/business-analyse.md +0 -121
  168. package/templates/commands/controller/create.md +0 -216
  169. package/templates/commands/controller/postman-templates.md +0 -528
  170. package/templates/commands/controller/templates.md +0 -600
  171. package/templates/commands/controller.md +0 -337
  172. package/templates/commands/create/agent.md +0 -138
  173. package/templates/commands/create/command.md +0 -166
  174. package/templates/commands/create/hook.md +0 -234
  175. package/templates/commands/create/plugin.md +0 -329
  176. package/templates/commands/create/project.md +0 -508
  177. package/templates/commands/create/skill.md +0 -199
  178. package/templates/commands/create.md +0 -220
  179. package/templates/commands/documentation/module.md +0 -202
  180. package/templates/commands/documentation/templates.md +0 -432
  181. package/templates/commands/documentation.md +0 -190
  182. package/templates/commands/epct.md +0 -69
  183. package/templates/commands/explain.md +0 -186
  184. package/templates/commands/feature-full.md +0 -267
  185. package/templates/commands/gitflow/1-init.md +0 -188
  186. package/templates/commands/gitflow/10-start.md +0 -190
  187. package/templates/commands/gitflow/11-finish.md +0 -382
  188. package/templates/commands/gitflow/12-cleanup.md +0 -103
  189. package/templates/commands/gitflow/13-sync.md +0 -216
  190. package/templates/commands/gitflow/14-rebase.md +0 -251
  191. package/templates/commands/gitflow/2-status.md +0 -122
  192. package/templates/commands/gitflow/3-commit.md +0 -209
  193. package/templates/commands/gitflow/4-plan.md +0 -174
  194. package/templates/commands/gitflow/5-exec.md +0 -202
  195. package/templates/commands/gitflow/6-abort.md +0 -121
  196. package/templates/commands/gitflow/7-pull-request.md +0 -176
  197. package/templates/commands/gitflow/8-review.md +0 -113
  198. package/templates/commands/gitflow/9-merge.md +0 -157
  199. package/templates/commands/gitflow.md +0 -128
  200. package/templates/commands/implement.md +0 -663
  201. package/templates/commands/init.md +0 -567
  202. package/templates/commands/mcp-integration.md +0 -330
  203. package/templates/commands/notification.md +0 -129
  204. package/templates/commands/oneshot.md +0 -57
  205. package/templates/commands/quickstart.md +0 -154
  206. package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
  207. package/templates/commands/ralph-loop/help.md +0 -126
  208. package/templates/commands/ralph-loop/ralph-loop.md +0 -120
  209. package/templates/commands/review.md +0 -106
  210. package/templates/commands/workflow.md +0 -193
@@ -1,126 +0,0 @@
1
- ---
2
- description: "Explain Ralph Loop plugin and available commands"
3
- ---
4
-
5
- # Ralph Loop Plugin Help
6
-
7
- Please explain the following to the user:
8
-
9
- ## What is Ralph Loop?
10
-
11
- Ralph Loop implements the Ralph Wiggum technique - an iterative development methodology based on continuous AI loops, pioneered by Geoffrey Huntley.
12
-
13
- **Core concept:**
14
- ```bash
15
- while :; do
16
- cat PROMPT.md | claude-code --continue
17
- done
18
- ```
19
-
20
- The same prompt is fed to Claude repeatedly. The "self-referential" aspect comes from Claude seeing its own previous work in the files and git history, not from feeding output back as input.
21
-
22
- **Each iteration:**
23
- 1. Claude receives the SAME prompt
24
- 2. Works on the task, modifying files
25
- 3. Tries to exit
26
- 4. Stop hook intercepts and feeds the same prompt again
27
- 5. Claude sees its previous work in the files
28
- 6. Iteratively improves until completion
29
-
30
- The technique is described as "deterministically bad in an undeterministic world" - failures are predictable, enabling systematic improvement through prompt tuning.
31
-
32
- ## Available Commands
33
-
34
- ### /ralph-loop <PROMPT> [OPTIONS]
35
-
36
- Start a Ralph loop in your current session.
37
-
38
- **Usage:**
39
- ```
40
- /ralph-loop "Refactor the cache layer" --max-iterations 20
41
- /ralph-loop "Add tests" --completion-promise "TESTS COMPLETE"
42
- ```
43
-
44
- **Options:**
45
- - `--max-iterations <n>` - Max iterations before auto-stop
46
- - `--completion-promise <text>` - Promise phrase to signal completion
47
-
48
- **How it works:**
49
- 1. Creates `.claude/.ralph-loop.local.md` state file
50
- 2. You work on the task
51
- 3. When you try to exit, stop hook intercepts
52
- 4. Same prompt fed back
53
- 5. You see your previous work
54
- 6. Continues until promise detected or max iterations
55
-
56
- ---
57
-
58
- ### /cancel-ralph
59
-
60
- Cancel an active Ralph loop (removes the loop state file).
61
-
62
- **Usage:**
63
- ```
64
- /cancel-ralph
65
- ```
66
-
67
- **How it works:**
68
- - Checks for active loop state file
69
- - Removes `.claude/.ralph-loop.local.md`
70
- - Reports cancellation with iteration count
71
-
72
- ---
73
-
74
- ## Key Concepts
75
-
76
- ### Completion Promises
77
-
78
- To signal completion, Claude must output a `<promise>` tag:
79
-
80
- ```
81
- <promise>TASK COMPLETE</promise>
82
- ```
83
-
84
- The stop hook looks for this specific tag. Without it (or `--max-iterations`), Ralph runs infinitely.
85
-
86
- ### Self-Reference Mechanism
87
-
88
- The "loop" doesn't mean Claude talks to itself. It means:
89
- - Same prompt repeated
90
- - Claude's work persists in files
91
- - Each iteration sees previous attempts
92
- - Builds incrementally toward goal
93
-
94
- ## Example
95
-
96
- ### Interactive Bug Fix
97
-
98
- ```
99
- /ralph-loop "Fix the token refresh logic in auth.ts. Output <promise>FIXED</promise> when all tests pass." --completion-promise "FIXED" --max-iterations 10
100
- ```
101
-
102
- You'll see Ralph:
103
- - Attempt fixes
104
- - Run tests
105
- - See failures
106
- - Iterate on solution
107
- - In your current session
108
-
109
- ## When to Use Ralph
110
-
111
- **Good for:**
112
- - Well-defined tasks with clear success criteria
113
- - Tasks requiring iteration and refinement
114
- - Iterative development with self-correction
115
- - Greenfield projects
116
-
117
- **Not good for:**
118
- - Tasks requiring human judgment or design decisions
119
- - One-shot operations
120
- - Tasks with unclear success criteria
121
- - Debugging production issues (use targeted debugging instead)
122
-
123
- ## Learn More
124
-
125
- - Original technique: https://ghuntley.com/ralph/
126
- - Ralph Orchestrator: https://github.com/mikeyobrien/ralph-orchestrator
@@ -1,120 +0,0 @@
1
- ---
2
- description: "Start Ralph Loop in current session"
3
- argument-hint: "PROMPT [--max-iterations N] [--completion-promise TEXT]"
4
- allowed-tools: ["Bash(${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh:*)"]
5
- hide-from-slash-command-tool: "true"
6
- ---
7
-
8
- # Ralph Loop Command
9
-
10
- Execute the setup script to initialize the Ralph loop:
11
-
12
- ```!
13
- "${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS
14
- ```
15
-
16
- ---
17
-
18
- ## RALPH WEEGUND - AUTOMATED DEVELOPMENT LOOP
19
-
20
- You are now operating in **Ralph Weegund** mode - an iterative AI development loop for SmartStack projects.
21
-
22
- ### MANDATORY MCP VALIDATION
23
-
24
- **BEFORE STARTING ANY WORK**, you MUST verify MCP servers are available:
25
-
26
- 1. **Check context7 MCP**: Use `mcp__plugin_context7_context7__resolve-library-id` to verify connectivity
27
- 2. **Check smartstack MCP**: Use `mcp__smartstack__validate_conventions` with a simple check
28
-
29
- **IF ANY MCP SERVER IS UNAVAILABLE:**
30
- - DO NOT proceed with the task
31
- - Log the failure to `.ralph/logs/`
32
- - Output a clear error message explaining which MCP is down
33
- - Suggest running `smartstack check-mcp` to diagnose
34
-
35
- ### STRICT MCP USAGE REQUIREMENTS
36
-
37
- Throughout your work, you MUST:
38
-
39
- 1. **Use SmartStack MCP for all validations**:
40
- - `mcp__smartstack__validate_conventions` - Before any commit
41
- - `mcp__smartstack__check_migrations` - Before any EF Core changes
42
- - `mcp__smartstack__scaffold_extension` - For code generation
43
- - `mcp__smartstack__api_docs` - For API documentation
44
-
45
- 2. **Use Context7 MCP for documentation**:
46
- - `mcp__plugin_context7_context7__resolve-library-id` - Find library docs
47
- - `mcp__plugin_context7_context7__query-docs` - Query specific documentation
48
-
49
- 3. **Track all MCP calls** by logging them mentally for the final report
50
-
51
- ### LOGGING PROTOCOL
52
-
53
- For each significant action, maintain an internal log:
54
- - MCP tool calls (which tool, parameters, success/failure)
55
- - Files created/modified
56
- - Validations performed
57
- - Errors encountered
58
-
59
- ### ITERATION BEHAVIOR
60
-
61
- When you try to exit, the Ralph loop will feed the SAME PROMPT back to you for the next iteration. You'll see your previous work in files and git history, allowing you to iterate and improve.
62
-
63
- **CRITICAL RULE**: If a completion promise is set, you may ONLY output it when the statement is completely and unequivocally TRUE. Do not output false promises to escape the loop, even if you think you're stuck or should exit for other reasons. The loop is designed to continue until genuine completion.
64
-
65
- ### COMPLETION REPORT
66
-
67
- When the task is GENUINELY COMPLETE, generate a feature report in `.ralph/reports/`:
68
-
69
- ```markdown
70
- # Feature Report: [Feature Name]
71
-
72
- ## Summary
73
- - **Date**: YYYY-MM-DD HH:MM
74
- - **Duration**: X iterations
75
- - **Status**: COMPLETE
76
-
77
- ## MCP Usage Statistics
78
- | Tool | Calls | Success | Failures |
79
- |------|-------|---------|----------|
80
- | validate_conventions | X | X | 0 |
81
- | check_migrations | X | X | 0 |
82
- | scaffold_extension | X | X | 0 |
83
- | context7 query-docs | X | X | 0 |
84
-
85
- ## Files Created
86
- - path/to/file1.cs
87
- - path/to/file2.tsx
88
-
89
- ## Files Modified
90
- - path/to/existing1.cs
91
- - path/to/existing2.ts
92
-
93
- ## Validations Performed
94
- - [ ] SmartStack conventions validated
95
- - [ ] EF Core migrations checked
96
- - [ ] No conflicts detected
97
-
98
- ## Notes
99
- Any relevant observations about the implementation.
100
- ```
101
-
102
- ### ERROR HANDLING
103
-
104
- If you encounter an error:
105
- 1. Log the error details
106
- 2. Attempt recovery if possible
107
- 3. If MCP server fails mid-task:
108
- - Save current progress
109
- - Log the MCP failure
110
- - DO NOT continue without MCP
111
- - Request manual intervention
112
-
113
- ### COMMANDS AVAILABLE
114
-
115
- - `/ralph-loop:cancel-ralph` - Cancel the current loop
116
- - `/ralph-loop:help` - Show Ralph Loop documentation
117
-
118
- ---
119
-
120
- **NOW PROCEED WITH THE TASK**, ensuring you follow all MCP validation and logging requirements above.
@@ -1,106 +0,0 @@
1
- ---
2
- description: Quick code review - review current PR changes and output directly
3
- allowed-tools: Bash(npm :*), Bash(git :*), Bash(gh :*), Read, Grep, Glob
4
- ---
5
-
6
- You are a code review specialist. Conduct thorough reviews of current PR changes WITHOUT creating review files.
7
-
8
- **You need to ULTRA THINK at every step.**
9
-
10
- ## Workflow
11
-
12
- 1. **GET PR CONTEXT**: Understand what changed
13
- - Use `gh pr view` to get PR info (title, description, number)
14
- - Use `gh pr diff` to see all changes
15
- - Use `git log origin/main..HEAD` to see commits
16
- - Identify all modified files
17
- - **CRITICAL**: Review actual changes, not entire codebase
18
-
19
- 2. **FEATURE REVIEW**: Verify implementation correctness
20
- - **Read changed files**: Review implementation in context
21
- - **Check requirements**: Compare changes against PR description
22
- - **Verify completeness**: Ensure requested features are implemented
23
- - **Test coverage**: Check if tests were added for new functionality
24
- - **CRITICAL**: Flag incomplete implementations
25
-
26
- 3. **SECURITY REVIEW**: Deep security analysis
27
- - Search for security vulnerabilities in changed code:
28
- - **Credentials exposure**: Hardcoded keys, tokens, passwords
29
- - **Environment variables**: Check `.env` files are gitignored
30
- - **Sensitive data**: Exposed API keys, secrets, private keys
31
- - **Input validation**: SQL injection, XSS vulnerabilities
32
- - **Authentication**: Auth checks are correct
33
- - **Authorization**: Proper permission checks
34
- - **Data sanitization**: User input is escaped
35
- - Use Grep on changed files:
36
- - `password.*=.*['"]` (hardcoded passwords)
37
- - `api[_-]?key.*=.*['"]` (hardcoded API keys)
38
- - `secret.*=.*['"]` (hardcoded secrets)
39
- - `token.*=.*['"]` (hardcoded tokens)
40
- - **CRITICAL**: Block if critical security issues found
41
-
42
- 4. **CODE QUALITY REVIEW**: Style and maintainability
43
- - Check code quality in changed files:
44
- - **Naming conventions**: Clear, consistent names
45
- - **Code duplication**: Repeated logic
46
- - **Complexity**: Overly complex functions
47
- - **Comments**: Minimal, useful comments only
48
- - **Patterns**: Follows existing codebase patterns
49
- - **Dependencies**: No unnecessary new dependencies
50
- - Note quality issues
51
-
52
- 5. **AUTOMATED CHECKS**: Linting and build verification
53
- - **Check `package.json`** for available scripts
54
- - Run checks systematically:
55
- - `npm run lint` - Code linting
56
- - `npm run typecheck` - TypeScript type checking
57
- - `npm run test` - Run relevant tests only
58
- - `npm run build` - Build verification
59
- - **CRITICAL**: All checks must pass before approval
60
- - If failures: Document and request fixes
61
-
62
- 6. **FINAL VERDICT**: Output review summary
63
- - Compile all findings into summary
64
- - Rate implementation quality (1-10)
65
- - **Decision options**:
66
- - **✅ APPROVED**: All checks pass, ready to merge
67
- - **🔧 NEEDS FIXES**: Minor issues, list required changes
68
- - **🚫 BLOCKED**: Critical issues, cannot proceed
69
- - **NO FILE CREATION**: Output everything directly to chat
70
-
71
- ## Security Search Patterns
72
-
73
- ```bash
74
- # Hardcoded secrets
75
- gh pr diff | grep -iE "(password|api[_-]?key|secret|token)\s*=\s*['\"]"
76
-
77
- # Check .env is gitignored
78
- cat .gitignore | grep -E "^\.env"
79
-
80
- # Look for .env in PR
81
- gh pr diff | grep -E "\.env"
82
- ```
83
-
84
- ## Code Quality Anti-patterns
85
-
86
- - Large functions (>50 lines)
87
- - Deep nesting (>3 levels)
88
- - Magic numbers/strings
89
- - Commented-out code
90
-
91
- ## Execution Rules
92
-
93
- - **ULTRA THINK** at each review phase
94
- - **NEVER skip security checks** - they are mandatory
95
- - **Focus on changed code** - don't review entire codebase
96
- - **Block on critical issues** - don't proceed if unsafe
97
- - **Stay objective** - report facts, not opinions
98
- - **NO FILE CREATION**: Output all results directly to chat
99
-
100
- ## Priority
101
-
102
- Security > Correctness > Quality > Speed. Never compromise on security.
103
-
104
- ---
105
-
106
- User: $ARGUMENTS
@@ -1,193 +0,0 @@
1
- # /workflow - Gestion Workflows SmartStack
2
-
3
- > **Synergie Skill/Commande:**
4
- > - **Skill** (`templates/skills/workflow/`) → Invocation automatique par Claude
5
- > - **Commande** (`/workflow`) → Invocation manuelle par l'utilisateur
6
-
7
- ---
8
-
9
- ## ARGUMENTS
10
-
11
- ```
12
- /workflow <action> [options]
13
- ```
14
-
15
- | Action | Description |
16
- |--------|-------------|
17
- | `create` | Creer un nouveau workflow complet |
18
- | `trigger` | Ajouter un nouveau trigger |
19
- | `step` | Ajouter un step a un workflow existant |
20
- | `template` | Creer un email template |
21
-
22
- ---
23
-
24
- ## WORKFLOW
25
-
26
- ### /workflow create
27
-
28
- Cree un workflow complet avec trigger et steps.
29
-
30
- **Questions:**
31
- 1. Code du workflow ? (kebab-case)
32
- 2. Nom descriptif ?
33
- 3. Quel trigger ? (existant ou nouveau)
34
- 4. Quels steps ? (Email, Wait, Condition, Webhook)
35
- 5. Systeme ? (oui/non)
36
- 6. Priorite ? (1-100, defaut 10)
37
-
38
- **Actions:**
39
- 1. Creer/utiliser le trigger
40
- 2. Ajouter le workflow dans WorkflowConfiguration.cs seed
41
- 3. Ajouter les steps dans WorkflowStepConfiguration.cs seed
42
- 4. Creer les email templates si necessaire
43
- 5. Creer migration EF Core
44
-
45
- ### /workflow trigger
46
-
47
- Ajoute un nouveau trigger.
48
-
49
- **Questions:**
50
- 1. Code du trigger ? (format: entity.event)
51
- 2. Nom descriptif ?
52
- 3. Variables disponibles ?
53
-
54
- **Actions:**
55
- 1. Ajouter dans WorkflowTriggerConfiguration.cs seed
56
- 2. Creer migration EF Core
57
-
58
- ### /workflow step
59
-
60
- Ajoute un step a un workflow existant.
61
-
62
- **Questions:**
63
- 1. Quel workflow ?
64
- 2. Type de step ? (SendEmail, Wait, Condition, Webhook)
65
- 3. Configuration specifique selon le type
66
-
67
- **Actions:**
68
- 1. Ajouter dans WorkflowStepConfiguration.cs seed
69
- 2. Mettre a jour l'ordre des steps
70
- 3. Creer migration EF Core
71
-
72
- ### /workflow template
73
-
74
- Cree un email template.
75
-
76
- **Questions:**
77
- 1. Code du template ?
78
- 2. Nom ?
79
- 3. Categorie ? (Transactional, Marketing, System)
80
- 4. Langues ? (fr, en, it, de)
81
-
82
- **Actions:**
83
- 1. Ajouter dans EmailTemplateConfiguration.cs seed
84
- 2. Ajouter les translations
85
- 3. Creer migration EF Core
86
-
87
- ---
88
-
89
- ## TEMPLATES
90
-
91
- ### Template Trigger Seed
92
-
93
- ```csharp
94
- new
95
- {
96
- Id = Guid.Parse("$TRIGGER_GUID"),
97
- Code = "$ENTITY.$EVENT",
98
- Name = "$NAME",
99
- Description = "$DESCRIPTION",
100
- TriggerType = "$TRIGGER_TYPE",
101
- AvailableVariablesJson = JsonSerializer.Serialize(new[]
102
- {
103
- new { Name = "entityId", Type = "Guid", Description = "Entity ID" },
104
- new { Name = "entityName", Type = "string", Description = "Entity name" },
105
- new { Name = "userEmail", Type = "string", Description = "User email" },
106
- }),
107
- IsActive = true,
108
- CreatedAt = seedDate
109
- },
110
- ```
111
-
112
- ### Template Workflow Seed
113
-
114
- ```csharp
115
- new
116
- {
117
- Id = Guid.Parse("$WORKFLOW_GUID"),
118
- Code = "$CODE",
119
- Name = "$NAME",
120
- Description = "$DESCRIPTION",
121
- TriggerId = Guid.Parse("$TRIGGER_GUID"),
122
- ApplicationId = (Guid?)null,
123
- IsActive = true,
124
- IsSystem = $IS_SYSTEM,
125
- Priority = $PRIORITY,
126
- CreatedAt = seedDate
127
- },
128
- ```
129
-
130
- ### Template Step Seed (Email)
131
-
132
- ```csharp
133
- new
134
- {
135
- Id = Guid.Parse("$STEP_GUID"),
136
- WorkflowId = Guid.Parse("$WORKFLOW_GUID"),
137
- Name = "$NAME",
138
- StepType = WorkflowStepType.SendEmail,
139
- StepOrder = $ORDER,
140
- EmailTemplateId = Guid.Parse("$TEMPLATE_GUID"),
141
- IsActive = true,
142
- CreatedAt = seedDate
143
- },
144
- ```
145
-
146
- ### Template Step Seed (Wait)
147
-
148
- ```csharp
149
- new
150
- {
151
- Id = Guid.Parse("$STEP_GUID"),
152
- WorkflowId = Guid.Parse("$WORKFLOW_GUID"),
153
- Name = "$NAME",
154
- StepType = WorkflowStepType.Wait,
155
- StepOrder = $ORDER,
156
- DelayMinutes = $DELAY_MINUTES,
157
- IsActive = true,
158
- CreatedAt = seedDate
159
- },
160
- ```
161
-
162
- ### Template Declenchement
163
-
164
- ```csharp
165
- await _workflowService.TriggerAsync(
166
- "$TRIGGER_CODE",
167
- new Dictionary<string, object>
168
- {
169
- ["entityId"] = entity.Id,
170
- ["entityName"] = entity.Name,
171
- ["userEmail"] = _currentUser.Email
172
- },
173
- language: "fr",
174
- cancellationToken: ct);
175
- ```
176
-
177
- ---
178
-
179
- ## FICHIERS CLES
180
-
181
- | Fichier | Role |
182
- |---------|------|
183
- | `Domain/Communications/Workflow.cs` | Entite workflow |
184
- | `Domain/Communications/WorkflowStep.cs` | Entite step |
185
- | `Domain/Communications/WorkflowTrigger.cs` | Entite trigger |
186
- | `Infrastructure/.../WorkflowConfiguration.cs` | Seed workflows |
187
- | `Infrastructure/.../WorkflowTriggerConfiguration.cs` | Seed triggers |
188
- | `Infrastructure/.../WorkflowStepConfiguration.cs` | Seed steps |
189
- | `Infrastructure/Services/Workflow/WorkflowExecutionService.cs` | Execution |
190
-
191
- ---
192
-
193
- User: $ARGUMENTS