claude-cli-advanced-starter-pack 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/OVERVIEW.md +597 -0
  3. package/README.md +439 -0
  4. package/bin/gtask.js +282 -0
  5. package/bin/postinstall.js +53 -0
  6. package/package.json +69 -0
  7. package/src/agents/phase-dev-templates.js +1011 -0
  8. package/src/agents/templates.js +668 -0
  9. package/src/analysis/checklist-parser.js +414 -0
  10. package/src/analysis/codebase.js +481 -0
  11. package/src/cli/menu.js +958 -0
  12. package/src/commands/claude-audit.js +1482 -0
  13. package/src/commands/claude-settings.js +2243 -0
  14. package/src/commands/create-agent.js +681 -0
  15. package/src/commands/create-command.js +337 -0
  16. package/src/commands/create-hook.js +262 -0
  17. package/src/commands/create-phase-dev/codebase-analyzer.js +813 -0
  18. package/src/commands/create-phase-dev/documentation-generator.js +352 -0
  19. package/src/commands/create-phase-dev/post-completion.js +404 -0
  20. package/src/commands/create-phase-dev/scale-calculator.js +344 -0
  21. package/src/commands/create-phase-dev/wizard.js +492 -0
  22. package/src/commands/create-phase-dev.js +481 -0
  23. package/src/commands/create-skill.js +313 -0
  24. package/src/commands/create.js +446 -0
  25. package/src/commands/decompose.js +392 -0
  26. package/src/commands/detect-tech-stack.js +768 -0
  27. package/src/commands/explore-mcp/claude-md-updater.js +252 -0
  28. package/src/commands/explore-mcp/mcp-installer.js +346 -0
  29. package/src/commands/explore-mcp/mcp-registry.js +438 -0
  30. package/src/commands/explore-mcp.js +638 -0
  31. package/src/commands/gtask-init.js +641 -0
  32. package/src/commands/help.js +128 -0
  33. package/src/commands/init.js +1890 -0
  34. package/src/commands/install.js +250 -0
  35. package/src/commands/list.js +116 -0
  36. package/src/commands/roadmap.js +750 -0
  37. package/src/commands/setup-wizard.js +482 -0
  38. package/src/commands/setup.js +351 -0
  39. package/src/commands/sync.js +534 -0
  40. package/src/commands/test-run.js +456 -0
  41. package/src/commands/test-setup.js +456 -0
  42. package/src/commands/validate.js +67 -0
  43. package/src/config/tech-stack.defaults.json +182 -0
  44. package/src/config/tech-stack.schema.json +502 -0
  45. package/src/github/client.js +359 -0
  46. package/src/index.js +84 -0
  47. package/src/templates/claude-command.js +244 -0
  48. package/src/templates/issue-body.js +284 -0
  49. package/src/testing/config.js +411 -0
  50. package/src/utils/template-engine.js +398 -0
  51. package/src/utils/validate-templates.js +223 -0
  52. package/src/utils.js +396 -0
  53. package/templates/commands/ccasp-setup.template.md +113 -0
  54. package/templates/commands/context-audit.template.md +97 -0
  55. package/templates/commands/create-task-list.template.md +382 -0
  56. package/templates/commands/deploy-full.template.md +261 -0
  57. package/templates/commands/github-task-start.template.md +99 -0
  58. package/templates/commands/github-update.template.md +69 -0
  59. package/templates/commands/happy-start.template.md +117 -0
  60. package/templates/commands/phase-track.template.md +142 -0
  61. package/templates/commands/tunnel-start.template.md +127 -0
  62. package/templates/commands/tunnel-stop.template.md +106 -0
  63. package/templates/hooks/context-guardian.template.js +173 -0
  64. package/templates/hooks/deployment-orchestrator.template.js +219 -0
  65. package/templates/hooks/github-progress-hook.template.js +197 -0
  66. package/templates/hooks/happy-checkpoint-manager.template.js +222 -0
  67. package/templates/hooks/phase-dev-enforcer.template.js +183 -0
@@ -0,0 +1,382 @@
1
+ ---
2
+ description: Create intelligent task list with codebase exploration and clarifying questions
3
+ type: project
4
+ complexity: medium
5
+ model: opus
6
+ argument-hint: [task or feature description]
7
+ allowed-tools:
8
+ - Read
9
+ - Grep
10
+ - Glob
11
+ - Task
12
+ - TaskCreate
13
+ - TaskUpdate
14
+ - TaskList
15
+ - AskUserQuestion
16
+ - Write
17
+ ---
18
+
19
+ # /create-task-list - Intelligent Task List Generator
20
+
21
+ **Create a comprehensive task list with codebase exploration, clarifying questions, and persistent testing instructions.**
22
+
23
+ ---
24
+
25
+ ## QUICK START
26
+
27
+ ```bash
28
+ /create-task-list fix the login page redirect bug
29
+ /create-task-list add dark mode to the settings panel
30
+ /create-task-list
31
+ ```
32
+
33
+ ---
34
+
35
+ ## PERSISTENT INSTRUCTIONS
36
+
37
+ **IMPORTANT**: Reference the persistent testing/deployment rules from `.claude/task-lists/TESTING_RULES.md`.
38
+
39
+ These rules are loaded automatically and apply to ALL task lists created by this command.
40
+
41
+ **Quick Reference** (full details in TESTING_RULES.md):
42
+ - **URLs**: {{devEnvironment.tunnel.service}} (`{{urls.tunnel.frontend}}`) or production (`{{urls.production.frontend}}`)
43
+ - **Login**: Use credentials from `{{testing.credentials.usernameEnvVar}}` / `{{testing.credentials.passwordEnvVar}}`
44
+ - **Login Selectors**: `{{testing.selectors.username}}`, `{{testing.selectors.password}}`, `{{testing.selectors.loginButton}}`
45
+ - **Backend**: {{deployment.backend.platform}} (never local dev server)
46
+ - **Deploy workflow**: Delete `/{{frontend.distDir}}` → rebuild → deploy → verify SHA
47
+ - **Task workflow**: Debug with curl → {{testing.e2e.framework}} test → commit after each task
48
+
49
+ ---
50
+
51
+ ## EXECUTION FLOW
52
+
53
+ ### Step 0: Load Persistent Rules
54
+
55
+ **FIRST ACTION**: Read `.claude/task-lists/TESTING_RULES.md` to load testing and deployment rules.
56
+
57
+ These rules govern:
58
+ - Which URLs to use ({{devEnvironment.tunnel.service}} vs {{urls.production.frontend}})
59
+ - Login credentials
60
+ - Deployment workflow (delete {{frontend.distDir}}, rebuild, verify SHA)
61
+ - Task completion workflow (curl → {{testing.e2e.framework}} → commit)
62
+
63
+ ---
64
+
65
+ ### Step 1: Capture User Prompt
66
+
67
+ ```
68
+ PROMPT: $ARGUMENTS
69
+
70
+ If no arguments provided:
71
+ → Use AskUserQuestion: "What would you like to accomplish today?"
72
+ ```
73
+
74
+ ### Step 2: Context Assessment
75
+
76
+ Evaluate the prompt for:
77
+
78
+ | Factor | Weight | Indicators |
79
+ |--------|--------|------------|
80
+ | **Specificity** | 30% | File names, function names, error messages |
81
+ | **Scope** | 25% | Single file vs multi-file, frontend vs backend |
82
+ | **Technical depth** | 25% | Stack trace, API endpoints, component names |
83
+ | **Reproducibility** | 20% | Steps to reproduce, expected vs actual behavior |
84
+
85
+ **Score Calculation**:
86
+ - **70-100%**: Sufficient context → Proceed to Step 3a
87
+ - **0-69%**: Insufficient context → Proceed to Step 3b
88
+
89
+ ---
90
+
91
+ ### Step 3a: SUFFICIENT CONTEXT PATH
92
+
93
+ Deploy **parallel exploration agents** to understand the issue:
94
+
95
+ ```
96
+ Deploy in SINGLE message (parallel execution):
97
+
98
+ Task 1: subagent_type="Explore"
99
+ prompt: "Find files related to: $ARGUMENTS. Identify:
100
+ - Primary files involved
101
+ - Related components/services
102
+ - Recent changes in git history"
103
+ description: "Explore codebase for context"
104
+
105
+ Task 2: subagent_type="Explore"
106
+ prompt: "Search for error patterns, tests, and documentation related to: $ARGUMENTS"
107
+ description: "Find tests and docs"
108
+
109
+ Task 3 (if backend-related): subagent_type="Explore"
110
+ prompt: "Find API endpoints, database models, and service files related to: $ARGUMENTS"
111
+ description: "Explore backend architecture"
112
+ ```
113
+
114
+ **Wait for all agents to complete**, then proceed to Step 4.
115
+
116
+ ---
117
+
118
+ ### Step 3b: INSUFFICIENT CONTEXT PATH
119
+
120
+ 1. **Quick codebase scan**:
121
+ ```
122
+ Deploy Task: subagent_type="Explore"
123
+ prompt: "Perform a brief codebase overview to understand the project structure
124
+ and identify areas that might relate to: $ARGUMENTS
125
+ Also review CLAUDE.md for project-specific patterns."
126
+ description: "Quick codebase scan"
127
+ ```
128
+
129
+ 2. **Ask clarifying questions** using AskUserQuestion:
130
+ - What specific behavior are you seeing?
131
+ - What is the expected behavior?
132
+ - Which area of the app is affected (Web UI, Backend API, Desktop)?
133
+ - Can you provide any error messages or screenshots?
134
+
135
+ 3. **After user provides clarity**, proceed to Step 3a with updated context.
136
+
137
+ ---
138
+
139
+ ### Step 4: Synthesize Findings & Ask Questions
140
+
141
+ Present findings in a **simple paragraph + bullet point format** (NO CODE):
142
+
143
+ ```markdown
144
+ ## Understanding
145
+
146
+ Based on my exploration, here's what I found:
147
+
148
+ **The Issue:**
149
+ [1-2 sentence summary of the problem]
150
+
151
+ **Affected Areas:**
152
+ - [Area 1]: [Brief description]
153
+ - [Area 2]: [Brief description]
154
+
155
+ **Proposed Approach:**
156
+ 1. [Step 1 - What we'll do, not how]
157
+ 2. [Step 2]
158
+ 3. [Step 3]
159
+
160
+ **Key Files:**
161
+ - `path/to/file1.ts` - [Why it's relevant]
162
+ - `path/to/file2.py` - [Why it's relevant]
163
+ ```
164
+
165
+ **MANDATORY QUESTIONS** (use AskUserQuestion with multiple questions):
166
+
167
+ **Question 1: Testing Approach**
168
+ ```
169
+ header: "Testing"
170
+ question: "Do you want to use 'Ralph Wiggum Loop' style testing? (Continuous test-fix cycle until all tests pass)"
171
+ options:
172
+ - label: "Yes - Ralph Loop (Recommended)"
173
+ description: "Automatically retry fixes until tests pass, max 10 iterations"
174
+ - label: "No - Manual Testing"
175
+ description: "I'll run tests manually after each change"
176
+ - label: "Minimal Testing"
177
+ description: "Only test at the end of all tasks"
178
+ ```
179
+
180
+ **Question 2: {{testing.e2e.framework}} Environment**
181
+ ```
182
+ header: "{{testing.e2e.framework}}"
183
+ question: "Where should {{testing.e2e.framework}} E2E tests run?"
184
+ options:
185
+ - label: "{{devEnvironment.tunnel.service}} ({{urls.tunnel.frontend}}) (Recommended)"
186
+ description: "Test against local backend via {{devEnvironment.tunnel.service}} tunnel"
187
+ - label: "{{urls.production.frontend}} (Production)"
188
+ description: "Test against production - requires deployment"
189
+ - label: "No {{testing.e2e.framework}}"
190
+ description: "Skip E2E tests, use curl/unit tests only"
191
+ ```
192
+
193
+ **Question 3: GitHub Integration**
194
+ ```
195
+ header: "GitHub"
196
+ question: "Would you like to create a tracked GitHub issue for this task list?"
197
+ options:
198
+ - label: "Yes - Create GitHub issue (Recommended)"
199
+ description: "Creates issue with codebase analysis, adds to project board, auto-updates progress"
200
+ - label: "No - Local task list only"
201
+ description: "Just use TodoWrite without GitHub tracking"
202
+ ```
203
+
204
+ **Question 4: Confirm Plan** (only if plan needs adjustment)
205
+ ```
206
+ header: "Plan"
207
+ question: "Does this approach look correct, or should I adjust?"
208
+ options:
209
+ - label: "Looks good - proceed"
210
+ description: "Create the task list and start working"
211
+ - label: "Need adjustments"
212
+ description: "I'll describe what to change"
213
+ ```
214
+
215
+ ---
216
+
217
+ ### Step 5: Create Task List
218
+
219
+ Use **TaskCreate** to build the task list with Claude's native system.
220
+
221
+ **Task List Structure**:
222
+
223
+ ```
224
+ Task 0: "Review Testing Rules" (DO NOT MARK COMPLETE)
225
+ description: "Read .claude/task-lists/TESTING_RULES.md before starting. These rules apply to all tasks."
226
+ activeForm: "Maintaining context"
227
+
228
+ Task 1: "Login via {{testing.e2e.framework}}" (ALWAYS FIRST for E2E tests)
229
+ description: |
230
+ Start {{testing.e2e.framework}} from the LOGIN PAGE. Fresh browser has no session.
231
+
232
+ **Use these EXACT selectors (from tech-stack.json):**
233
+
234
+ 1. Navigate to: {env}/login
235
+ 2. Fill username: `{{testing.selectors.username}}`
236
+ 3. Fill password: `{{testing.selectors.password}}`
237
+ 4. Click: `{{testing.selectors.loginButton}}`
238
+ 5. Wait for: `{{testing.selectors.loginSuccess}}`
239
+
240
+ This task is REQUIRED before any other {{testing.e2e.framework}} interaction.
241
+ activeForm: "Logging into application"
242
+
243
+ Task 2: "[First actual task]"
244
+ description: "[What needs to be done]"
245
+ activeForm: "[Present participle form]"
246
+
247
+ Task 2: "[Second task]"
248
+ ...
249
+
250
+ Task N-1: "Run final verification tests"
251
+ description: "Execute {{testing.e2e.framework}} E2E tests on {selected_environment} to verify all changes work"
252
+ activeForm: "Running verification tests"
253
+
254
+ Task N: "Commit all changes"
255
+ description: "Create a git commit with all changes from this session"
256
+ activeForm: "Committing changes"
257
+ ```
258
+
259
+ **IMPORTANT**:
260
+ - Task 0 with persistent instructions should NEVER be marked complete
261
+ - Each task should be atomic and independently verifiable
262
+ - Include curl testing tasks BEFORE {{testing.e2e.framework}} tasks when debugging
263
+
264
+ ---
265
+
266
+ ### Step 6: Create GitHub Issue (If Selected)
267
+
268
+ If user selected GitHub integration:
269
+
270
+ 1. **Create comprehensive issue** using `/github-create-task`:
271
+ ```bash
272
+ /github-create-task --batch-mode
273
+
274
+ Title: [Task description from user prompt]
275
+ Priority: P2-Medium
276
+ Labels: [Determined from exploration - frontend, backend, feature, bug, etc.]
277
+ QA: [Required if P0/P1, else Not Required]
278
+ Stack: [Frontend only|Backend only|Both]
279
+
280
+ ## Description
281
+
282
+ [User's original prompt]
283
+
284
+ ## Codebase Analysis
285
+
286
+ [Include findings from Step 3 exploration agents]
287
+
288
+ ## Task Checklist
289
+
290
+ [Mirror the TodoWrite tasks as checkboxes]
291
+ - [ ] Task 1: ...
292
+ - [ ] Task 2: ...
293
+ ```
294
+
295
+ 2. **Store issue number** for progress tracking:
296
+ ```json
297
+ // Write to .claude/task-lists/session-{timestamp}.json
298
+ {
299
+ "github_issue": {
300
+ "number": [ISSUE_NUM],
301
+ "url": "[ISSUE_URL]",
302
+ "created_at": "[ISO timestamp]"
303
+ }
304
+ }
305
+ ```
306
+
307
+ 3. **Install progress hook** (auto-updates GitHub issue when tasks complete):
308
+ - The hook watches for TodoWrite calls
309
+ - When a task is marked `completed`, it updates the GitHub issue:
310
+ - Checks off the corresponding checkbox
311
+ - Adds a progress comment if significant milestone
312
+ - See `.claude/hooks/tools/github-progress-hook.js`
313
+
314
+ ---
315
+
316
+ ### Step 7: Configure Ralph Loop (If Selected)
317
+
318
+ If user selected Ralph Loop testing, write configuration:
319
+
320
+ ```javascript
321
+ // Write to .claude/ralph-loop.local.md
322
+ const config = {
323
+ iteration: 1,
324
+ max_iterations: 10,
325
+ completion_promise: "all tasks complete and tests passing",
326
+ started_at: new Date().toISOString(),
327
+ task_list_id: "[current session]"
328
+ };
329
+ ```
330
+
331
+ ---
332
+
333
+ ### Step 8: Compact Session & Begin
334
+
335
+ 1. **Display task summary**:
336
+ ```
337
+ ## Task List Created
338
+
339
+ | # | Task | Status |
340
+ |---|------|--------|
341
+ | 0 | Persistent Context | (always active) |
342
+ | 1 | [Task 1 subject] | pending |
343
+ | 2 | [Task 2 subject] | pending |
344
+ ...
345
+
346
+ **Testing Mode:** [Ralph Loop / Manual / Minimal]
347
+ **Environment:** [{{devEnvironment.tunnel.service}} / {{urls.production.frontend}}]
348
+ **GitHub Issue:** [#123 (if created) | Not tracked]
349
+
350
+ Ready to begin. Starting with Task 1...
351
+ ```
352
+
353
+ 2. **Compact context** (use /compact if token usage is high)
354
+
355
+ 3. **Begin Task 1**:
356
+ - Use `TaskUpdate` to set Task 1 to `in_progress`
357
+ - Execute the task
358
+ - Use `TaskUpdate` to set Task 1 to `completed`
359
+ - Commit changes
360
+ - Move to Task 2
361
+
362
+ ---
363
+
364
+ ## ERROR HANDLING
365
+
366
+ | Situation | Action |
367
+ |-----------|--------|
368
+ | Exploration agent fails | Retry with broader search terms |
369
+ | User provides unclear answers | Ask follow-up questions with examples |
370
+ | Task creation fails | Fall back to manual task tracking |
371
+ | Ralph loop exceeds max iterations | Stop loop, summarize progress, ask user how to proceed |
372
+ | {{testing.e2e.framework}} tests fail on {{devEnvironment.tunnel.service}} | Check tunnel status, verify backend is running |
373
+ | {{testing.e2e.framework}} tests fail on production | Verify deployment completed, check SHA match |
374
+
375
+ ---
376
+
377
+ ## RELATED COMMANDS
378
+
379
+ - `/ralph` - Persistent loop execution
380
+ - `/test-{{testing.e2e.framework}}-{{devEnvironment.tunnel.service}}` - E2E testing with {{devEnvironment.tunnel.service}}
381
+ - `/github-task-start` - Start GitHub Project Board tasks
382
+ - `/create-phase-dev` - Complex multi-phase project planning
@@ -0,0 +1,261 @@
1
+ ---
2
+ description: Parallel full-stack deployment (backend + frontend)
3
+ model: haiku
4
+ ---
5
+
6
+ # /deploy-full - Full-Stack Deployment
7
+
8
+ Deploy both backend and frontend in parallel for fastest deployment.
9
+
10
+ {{#if deployment.backend.platform}}
11
+ {{#if deployment.frontend.platform}}
12
+
13
+ ## Deployment Targets
14
+
15
+ | Component | Platform | URL |
16
+ |-----------|----------|-----|
17
+ | Backend | {{deployment.backend.platform}} | {{deployment.backend.productionUrl}} |
18
+ | Frontend | {{deployment.frontend.platform}} | {{deployment.frontend.productionUrl}} |
19
+
20
+ ## Pre-deployment Checklist
21
+
22
+ ```bash
23
+ # 1. Verify clean working directory
24
+ git status
25
+
26
+ # 2. Ensure on correct branch
27
+ git branch --show-current
28
+
29
+ # 3. Run tests
30
+ {{#if testing.e2e.testCommand}}
31
+ {{testing.e2e.testCommand}}
32
+ {{else}}
33
+ npm test
34
+ {{/if}}
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Backend Deployment
40
+
41
+ {{#if (eq deployment.backend.platform "railway")}}
42
+ ### Railway
43
+
44
+ Using Railway MCP server for deployment:
45
+
46
+ ```javascript
47
+ // Trigger deployment via Railway MCP
48
+ mcp__railway-mcp-server__deployment_trigger({
49
+ projectId: "{{deployment.backend.projectId}}",
50
+ serviceId: "{{deployment.backend.serviceId}}",
51
+ environmentId: "{{deployment.backend.environmentId}}"
52
+ })
53
+ ```
54
+
55
+ Monitor deployment:
56
+ ```javascript
57
+ mcp__railway-mcp-server__deployment_logs({
58
+ projectId: "{{deployment.backend.projectId}}",
59
+ serviceId: "{{deployment.backend.serviceId}}"
60
+ })
61
+ ```
62
+ {{/if}}
63
+
64
+ {{#if (eq deployment.backend.platform "heroku")}}
65
+ ### Heroku
66
+
67
+ ```bash
68
+ # Push to Heroku
69
+ git push heroku {{versionControl.defaultBranch}}
70
+
71
+ # Check logs
72
+ heroku logs --tail
73
+ ```
74
+ {{/if}}
75
+
76
+ {{#if (eq deployment.backend.platform "render")}}
77
+ ### Render
78
+
79
+ ```bash
80
+ # Render auto-deploys from git push
81
+ git push origin {{versionControl.defaultBranch}}
82
+
83
+ # Or trigger manual deploy via API
84
+ curl -X POST "https://api.render.com/v1/services/{{deployment.backend.serviceId}}/deploys" \
85
+ -H "Authorization: Bearer $RENDER_API_KEY"
86
+ ```
87
+ {{/if}}
88
+
89
+ {{#if (eq deployment.backend.platform "fly")}}
90
+ ### Fly.io
91
+
92
+ ```bash
93
+ # Deploy to Fly
94
+ fly deploy
95
+
96
+ # Check status
97
+ fly status
98
+ ```
99
+ {{/if}}
100
+
101
+ {{#if (eq deployment.backend.platform "vercel")}}
102
+ ### Vercel (Serverless)
103
+
104
+ ```bash
105
+ vercel --prod
106
+ ```
107
+ {{/if}}
108
+
109
+ {{#if (eq deployment.backend.platform "self-hosted")}}
110
+ ### Self-Hosted
111
+
112
+ ```bash
113
+ # SSH deploy
114
+ ssh {{deployment.backend.selfHostedConfig.sshUser}}@{{deployment.backend.selfHostedConfig.sshHost}} -p {{deployment.backend.selfHostedConfig.sshPort}} \
115
+ 'cd {{deployment.backend.selfHostedConfig.appPath}} && git pull && {{deployment.backend.selfHostedConfig.deployScript}}'
116
+ ```
117
+ {{/if}}
118
+
119
+ ---
120
+
121
+ ## Frontend Deployment
122
+
123
+ {{#if (eq deployment.frontend.platform "cloudflare")}}
124
+ ### Cloudflare Pages
125
+
126
+ ```bash
127
+ # Clean and build
128
+ rm -rf {{frontend.distDir}}
129
+ {{frontend.buildCommand}}
130
+
131
+ # Deploy
132
+ npx wrangler pages deploy {{frontend.distDir}} --project-name={{deployment.frontend.projectName}}
133
+ ```
134
+ {{/if}}
135
+
136
+ {{#if (eq deployment.frontend.platform "vercel")}}
137
+ ### Vercel
138
+
139
+ ```bash
140
+ vercel --prod
141
+ ```
142
+ {{/if}}
143
+
144
+ {{#if (eq deployment.frontend.platform "netlify")}}
145
+ ### Netlify
146
+
147
+ ```bash
148
+ # Build
149
+ {{frontend.buildCommand}}
150
+
151
+ # Deploy
152
+ netlify deploy --prod --dir={{frontend.distDir}}
153
+ ```
154
+ {{/if}}
155
+
156
+ {{#if (eq deployment.frontend.platform "github-pages")}}
157
+ ### GitHub Pages
158
+
159
+ ```bash
160
+ # Build and deploy (assumes gh-pages package)
161
+ {{frontend.buildCommand}}
162
+ npm run deploy
163
+ ```
164
+ {{/if}}
165
+
166
+ {{#if (eq deployment.frontend.platform "railway")}}
167
+ ### Railway (Static)
168
+
169
+ ```bash
170
+ # Push triggers auto-deploy
171
+ git push origin {{versionControl.defaultBranch}}
172
+ ```
173
+ {{/if}}
174
+
175
+ ---
176
+
177
+ ## Verification
178
+
179
+ ### Backend Health Check
180
+
181
+ ```bash
182
+ curl {{deployment.backend.productionUrl}}{{backend.healthEndpoint}}
183
+ ```
184
+
185
+ ### Frontend Verification
186
+
187
+ 1. Open {{deployment.frontend.productionUrl}}
188
+ 2. Verify page loads correctly
189
+ 3. Check browser console for errors
190
+ 4. Test critical user flows
191
+
192
+ ### E2E Smoke Test (Optional)
193
+
194
+ ```bash
195
+ {{#if testing.e2e.testCommand}}
196
+ {{testing.e2e.testCommand}} --grep "smoke"
197
+ {{else}}
198
+ npx playwright test --grep "smoke"
199
+ {{/if}}
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Rollback Procedures
205
+
206
+ ### Backend Rollback
207
+
208
+ {{#if (eq deployment.backend.platform "railway")}}
209
+ ```javascript
210
+ // List recent deployments
211
+ mcp__railway-mcp-server__deployment_list({
212
+ projectId: "{{deployment.backend.projectId}}",
213
+ serviceId: "{{deployment.backend.serviceId}}"
214
+ })
215
+
216
+ // Redeploy previous version
217
+ mcp__railway-mcp-server__deployment_rollback({
218
+ projectId: "{{deployment.backend.projectId}}",
219
+ serviceId: "{{deployment.backend.serviceId}}",
220
+ deploymentId: "<previous-deployment-id>"
221
+ })
222
+ ```
223
+ {{else}}
224
+ ```bash
225
+ # Revert commit and redeploy
226
+ git revert HEAD
227
+ git push origin {{versionControl.defaultBranch}}
228
+ ```
229
+ {{/if}}
230
+
231
+ ### Frontend Rollback
232
+
233
+ ```bash
234
+ # Revert to previous build
235
+ git revert HEAD
236
+ {{frontend.buildCommand}}
237
+ {{deployment.frontend.deployCommand}}
238
+ ```
239
+
240
+ {{else}}
241
+
242
+ ## Frontend Deployment Not Configured
243
+
244
+ Frontend deployment platform is not configured.
245
+
246
+ Run `/menu` → Project Settings → Deployment Platforms to configure.
247
+
248
+ {{/if}}
249
+ {{else}}
250
+
251
+ ## Backend Deployment Not Configured
252
+
253
+ Backend deployment platform is not configured.
254
+
255
+ Run `/menu` → Project Settings → Deployment Platforms to configure.
256
+
257
+ {{/if}}
258
+
259
+ ---
260
+
261
+ *Generated from tech-stack.json template*