@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.
- package/.documentation/agents.html +1 -1
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +1 -1
- package/.documentation/cli-commands.html +3 -3
- package/.documentation/commands.html +1 -1
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +231 -236
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +1 -1
- package/.documentation/init.html +3 -3
- package/.documentation/installation.html +1075 -351
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/README.md +88 -20
- package/config/default-config.json +10 -1
- package/dist/index.js +276 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/code-reviewer.md +163 -0
- package/templates/agents/efcore/db-deploy.md +25 -7
- package/templates/agents/efcore/db-reset.md +31 -10
- package/templates/agents/efcore/db-status.md +22 -5
- package/templates/agents/efcore/migration.md +70 -20
- package/templates/agents/gitflow/cleanup.md +8 -1
- package/templates/agents/gitflow/commit.md +7 -5
- package/templates/agents/gitflow/finish.md +6 -4
- package/templates/agents/gitflow/pr.md +8 -1
- package/templates/agents/gitflow/start.md +1 -1
- package/templates/commands/check-version.md +267 -0
- package/templates/commands/efcore/_shared.md +31 -2
- package/templates/commands/efcore/db-reset.md +18 -6
- package/templates/commands/efcore/migration.md +1 -1
- package/templates/commands/efcore/rebase-snapshot.md +1 -1
- package/templates/commands/efcore/squash.md +1 -0
- package/templates/commands/refactor.md +164 -0
- package/templates/project/DependencyInjection.Application.cs.template +25 -0
- package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
- package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
- package/templates/project/ExampleEntity.cs.template +116 -0
- package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
- package/templates/project/ExampleService.cs.template +146 -0
- package/templates/project/ExtensionsDbContext.cs.template +41 -0
- package/templates/project/IExtensionsDbContext.cs.template +22 -0
- package/templates/project/Program.cs.template +47 -0
- package/templates/project/README.md +79 -0
- package/templates/ralph/README.md +10 -8
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/_shared.md +44 -44
- package/templates/skills/ai-prompt/SKILL.md +55 -55
- package/templates/skills/apex/SKILL.md +235 -0
- package/templates/skills/apex/steps/step-00-init.md +203 -0
- package/templates/skills/apex/steps/step-01-analyze.md +210 -0
- package/templates/skills/apex/steps/step-02-plan.md +217 -0
- package/templates/skills/apex/steps/step-03-execute.md +178 -0
- package/templates/skills/apex/steps/step-04-validate.md +217 -0
- package/templates/skills/apex/steps/step-05-examine.md +207 -0
- package/templates/skills/apex/steps/step-06-resolve.md +181 -0
- package/templates/skills/apex/steps/step-07-tests.md +206 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
- package/templates/skills/apex/templates/00-context.md +46 -0
- package/templates/skills/apex/templates/01-analyze.md +63 -0
- package/templates/skills/apex/templates/02-plan.md +63 -0
- package/templates/skills/apex/templates/03-execute.md +34 -0
- package/templates/skills/apex/templates/04-validate.md +61 -0
- package/templates/skills/apex/templates/05-examine.md +58 -0
- package/templates/skills/apex/templates/06-resolve.md +39 -0
- package/templates/skills/apex/templates/07-tests.md +56 -0
- package/templates/skills/apex/templates/08-run-tests.md +41 -0
- package/templates/skills/apex/templates/README.md +69 -0
- package/templates/skills/application/SKILL.md +50 -50
- package/templates/skills/application/templates-backend.md +25 -25
- package/templates/skills/application/templates-frontend.md +43 -43
- package/templates/skills/application/templates-i18n.md +29 -29
- package/templates/skills/application/templates-seed.md +77 -77
- package/templates/skills/business-analyse/SKILL.md +223 -0
- package/templates/skills/business-analyse/_shared.md +258 -0
- package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
- package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
- package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
- package/templates/skills/business-analyse/questionnaire.md +177 -177
- package/templates/skills/business-analyse/react/components.md +340 -0
- package/templates/skills/business-analyse/react/i18n-template.md +245 -0
- package/templates/skills/business-analyse/react/schema.md +151 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
- package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
- package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
- package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
- package/templates/skills/business-analyse/templates/00-context.md +105 -0
- package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
- package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
- package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
- package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
- package/templates/skills/business-analyse/templates-frd.md +217 -217
- package/templates/skills/business-analyse/templates-react.md +26 -26
- package/templates/skills/controller/SKILL.md +141 -92
- package/templates/skills/controller/postman-templates.md +15 -15
- package/templates/skills/controller/steps/step-00-init.md +191 -0
- package/templates/skills/controller/steps/step-01-analyze.md +146 -0
- package/templates/skills/controller/steps/step-02-plan.md +176 -0
- package/templates/skills/controller/steps/step-03-generate.md +219 -0
- package/templates/skills/controller/steps/step-04-perms.md +219 -0
- package/templates/skills/controller/steps/step-05-validate.md +107 -0
- package/templates/skills/controller/templates.md +77 -77
- package/templates/skills/documentation/SKILL.md +79 -79
- package/templates/skills/feature-full/SKILL.md +38 -38
- package/templates/skills/gitflow/SKILL.md +277 -0
- package/templates/{commands → skills}/gitflow/_shared.md +20 -20
- package/templates/skills/gitflow/phases/abort.md +173 -0
- package/templates/skills/gitflow/phases/cleanup.md +226 -0
- package/templates/skills/gitflow/phases/status.md +178 -0
- package/templates/skills/gitflow/steps/step-commit.md +255 -0
- package/templates/skills/gitflow/steps/step-finish.md +255 -0
- package/templates/skills/gitflow/steps/step-init.md +209 -0
- package/templates/skills/gitflow/steps/step-merge.md +225 -0
- package/templates/skills/gitflow/steps/step-plan.md +208 -0
- package/templates/skills/gitflow/steps/step-pr.md +235 -0
- package/templates/skills/gitflow/steps/step-start.md +334 -0
- package/templates/skills/gitflow/steps/step-sync.md +200 -0
- package/templates/skills/gitflow/templates/config.json +53 -0
- package/templates/skills/notification/SKILL.md +51 -51
- package/templates/skills/ralph-loop/SKILL.md +228 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
- package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
- package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
- package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
- package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
- package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
- package/templates/skills/review-code/SKILL.md +219 -0
- package/templates/skills/review-code/references/clean-code-principles.md +140 -0
- package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
- package/templates/skills/review-code/references/feedback-patterns.md +149 -0
- package/templates/skills/review-code/references/security-checklist.md +127 -0
- package/templates/skills/ui-components/SKILL.md +54 -54
- package/templates/skills/workflow/SKILL.md +46 -46
- package/templates/commands/ai-prompt.md +0 -315
- package/templates/commands/apex/1-analyze.md +0 -100
- package/templates/commands/apex/2-plan.md +0 -145
- package/templates/commands/apex/3-execute.md +0 -171
- package/templates/commands/apex/4-examine.md +0 -116
- package/templates/commands/apex/5-tasks.md +0 -209
- package/templates/commands/apex.md +0 -76
- package/templates/commands/application/create.md +0 -362
- package/templates/commands/application/templates-backend.md +0 -463
- package/templates/commands/application/templates-frontend.md +0 -517
- package/templates/commands/application/templates-i18n.md +0 -478
- package/templates/commands/application/templates-seed.md +0 -362
- package/templates/commands/application.md +0 -303
- package/templates/commands/business-analyse/0-orchestrate.md +0 -156
- package/templates/commands/business-analyse/1-init.md +0 -99
- package/templates/commands/business-analyse/2-discover.md +0 -143
- package/templates/commands/business-analyse/3-analyse.md +0 -106
- package/templates/commands/business-analyse/4-specify.md +0 -133
- package/templates/commands/business-analyse/5-validate.md +0 -132
- package/templates/commands/business-analyse/6-handoff.md +0 -157
- package/templates/commands/business-analyse/7-doc-html.md +0 -103
- package/templates/commands/business-analyse/_shared.md +0 -176
- package/templates/commands/business-analyse/bug.md +0 -118
- package/templates/commands/business-analyse/change-request.md +0 -144
- package/templates/commands/business-analyse/hotfix.md +0 -116
- package/templates/commands/business-analyse.md +0 -121
- package/templates/commands/controller/create.md +0 -216
- package/templates/commands/controller/postman-templates.md +0 -528
- package/templates/commands/controller/templates.md +0 -600
- package/templates/commands/controller.md +0 -337
- package/templates/commands/create/agent.md +0 -138
- package/templates/commands/create/command.md +0 -166
- package/templates/commands/create/hook.md +0 -234
- package/templates/commands/create/plugin.md +0 -329
- package/templates/commands/create/project.md +0 -508
- package/templates/commands/create/skill.md +0 -199
- package/templates/commands/create.md +0 -220
- package/templates/commands/documentation/module.md +0 -202
- package/templates/commands/documentation/templates.md +0 -432
- package/templates/commands/documentation.md +0 -190
- package/templates/commands/epct.md +0 -69
- package/templates/commands/explain.md +0 -186
- package/templates/commands/feature-full.md +0 -267
- package/templates/commands/gitflow/1-init.md +0 -188
- package/templates/commands/gitflow/10-start.md +0 -190
- package/templates/commands/gitflow/11-finish.md +0 -382
- package/templates/commands/gitflow/12-cleanup.md +0 -103
- package/templates/commands/gitflow/13-sync.md +0 -216
- package/templates/commands/gitflow/14-rebase.md +0 -251
- package/templates/commands/gitflow/2-status.md +0 -122
- package/templates/commands/gitflow/3-commit.md +0 -209
- package/templates/commands/gitflow/4-plan.md +0 -174
- package/templates/commands/gitflow/5-exec.md +0 -202
- package/templates/commands/gitflow/6-abort.md +0 -121
- package/templates/commands/gitflow/7-pull-request.md +0 -176
- package/templates/commands/gitflow/8-review.md +0 -113
- package/templates/commands/gitflow/9-merge.md +0 -157
- package/templates/commands/gitflow.md +0 -128
- package/templates/commands/implement.md +0 -663
- package/templates/commands/init.md +0 -567
- package/templates/commands/mcp-integration.md +0 -330
- package/templates/commands/notification.md +0 -129
- package/templates/commands/oneshot.md +0 -57
- package/templates/commands/quickstart.md +0 -154
- package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
- package/templates/commands/ralph-loop/help.md +0 -126
- package/templates/commands/ralph-loop/ralph-loop.md +0 -120
- package/templates/commands/review.md +0 -106
- package/templates/commands/workflow.md +0 -193
- package/templates/gitflow/config.json +0 -138
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Planning phase - create detailed implementation strategy from analysis
|
|
3
|
-
argument-hint: <task-folder-path>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a strategic planning specialist. Transform analysis findings into executable implementation plans.
|
|
7
|
-
|
|
8
|
-
**You need to ULTRA THINK about the complete implementation strategy.**
|
|
9
|
-
|
|
10
|
-
> **INSTRUCTION CLAUDE:** The `AskUserQuestion({...})` blocks are instructions to use the `AskUserQuestion` tool **interactively**. You MUST execute the tool with these parameters to get the user's response BEFORE continuing.
|
|
11
|
-
|
|
12
|
-
## Workflow
|
|
13
|
-
|
|
14
|
-
1. **VALIDATE INPUT**: Verify task folder exists
|
|
15
|
-
- Check that `.claude/tasks/<task-folder>/` exists
|
|
16
|
-
- Verify `analyze.md` file is present
|
|
17
|
-
- **CRITICAL**: If missing, instruct user to run:
|
|
18
|
-
```
|
|
19
|
-
/apex:analyze
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
2. **READ ANALYSIS**: Load all context
|
|
23
|
-
- Read `.claude/tasks/<task-folder>/analyze.md` completely
|
|
24
|
-
- Review all codebase findings
|
|
25
|
-
- Note patterns and conventions discovered
|
|
26
|
-
- Identify files to modify and examples to follow
|
|
27
|
-
|
|
28
|
-
3. **ULTRA THINK PLANNING**: Design comprehensive strategy
|
|
29
|
-
- **CRITICAL**: Think through ENTIRE implementation before writing
|
|
30
|
-
- Consider all edge cases and dependencies
|
|
31
|
-
- Plan file changes in logical dependency order
|
|
32
|
-
- Identify test requirements
|
|
33
|
-
- Plan documentation updates if needed
|
|
34
|
-
|
|
35
|
-
4. **ASK FOR CLARITY**: Resolve ambiguities
|
|
36
|
-
- **STOP**: If anything is unclear about requirements
|
|
37
|
-
- Use AskUserQuestion for:
|
|
38
|
-
- Multiple valid approaches
|
|
39
|
-
- Unclear technical choices
|
|
40
|
-
- Scope boundaries
|
|
41
|
-
- Architecture decisions
|
|
42
|
-
- **NEVER ASSUME**: Always clarify before planning
|
|
43
|
-
|
|
44
|
-
5. **CREATE DETAILED PLAN**: Write file-by-file implementation guide
|
|
45
|
-
- **Structure**: Group by file, NOT by feature
|
|
46
|
-
- **Format**: Action-oriented, no code snippets
|
|
47
|
-
- **Specificity**: Exact changes needed in each file
|
|
48
|
-
- Include:
|
|
49
|
-
- Core functionality changes (file by file)
|
|
50
|
-
- Test files to create/modify
|
|
51
|
-
- Documentation to update
|
|
52
|
-
- Configuration changes
|
|
53
|
-
- Migration steps if needed
|
|
54
|
-
|
|
55
|
-
6. **SAVE PLAN**: Write to `plan.md`
|
|
56
|
-
- Save to `.claude/tasks/<task-folder>/plan.md`
|
|
57
|
-
- **Structure**:
|
|
58
|
-
```markdown
|
|
59
|
-
# Implementation Plan: [Task Name]
|
|
60
|
-
|
|
61
|
-
## Overview
|
|
62
|
-
[High-level strategy and approach]
|
|
63
|
-
|
|
64
|
-
## Dependencies
|
|
65
|
-
[Files/systems that must be done first]
|
|
66
|
-
|
|
67
|
-
## File Changes
|
|
68
|
-
|
|
69
|
-
### `path/to/file1.ts`
|
|
70
|
-
- Action 1: What to change and why
|
|
71
|
-
- Action 2: Specific modification needed
|
|
72
|
-
- Consider: Edge cases or important context
|
|
73
|
-
|
|
74
|
-
### `path/to/file2.ts`
|
|
75
|
-
- Action: What needs to change
|
|
76
|
-
- Pattern: Follow example from `other/file.ts:123`
|
|
77
|
-
|
|
78
|
-
## Testing Strategy
|
|
79
|
-
- Tests to create: `path/to/test.spec.ts`
|
|
80
|
-
- Tests to update: `path/to/existing.test.ts`
|
|
81
|
-
- Manual verification steps
|
|
82
|
-
|
|
83
|
-
## Documentation
|
|
84
|
-
- Update: `README.md` section X
|
|
85
|
-
- Add: New docs for feature Y
|
|
86
|
-
|
|
87
|
-
## Rollout Considerations
|
|
88
|
-
[Migration steps, feature flags, breaking changes]
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
7. **VERIFY COMPLETENESS**: Check plan quality
|
|
92
|
-
- **All files identified**: Nothing missing
|
|
93
|
-
- **Logical order**: Dependencies handled
|
|
94
|
-
- **Clear actions**: No ambiguous steps
|
|
95
|
-
- **Test coverage**: All paths tested
|
|
96
|
-
- **In scope**: No scope creep
|
|
97
|
-
|
|
98
|
-
8. **REPORT**: Summarize to user
|
|
99
|
-
- Confirm plan created
|
|
100
|
-
- Highlight key implementation steps
|
|
101
|
-
- Note any risks or complexity
|
|
102
|
-
- Suggest next step: Run one of these commands:
|
|
103
|
-
- To divide plan into tasks:
|
|
104
|
-
```
|
|
105
|
-
/apex:tasks <task-folder>
|
|
106
|
-
```
|
|
107
|
-
- To execute plan directly:
|
|
108
|
-
```
|
|
109
|
-
/apex:execute <task-folder>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Plan Quality Guidelines
|
|
113
|
-
|
|
114
|
-
### Good Plan Entry
|
|
115
|
-
```markdown
|
|
116
|
-
### `src/auth/middleware.ts`
|
|
117
|
-
- Add validateToken function that checks JWT expiration
|
|
118
|
-
- Extract token from Authorization header (follow pattern in `src/api/auth.ts:45`)
|
|
119
|
-
- Return 401 if token invalid or expired
|
|
120
|
-
- Consider: Handle both Bearer and custom token formats
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Bad Plan Entry
|
|
124
|
-
```markdown
|
|
125
|
-
### `src/auth/middleware.ts`
|
|
126
|
-
- Add authentication
|
|
127
|
-
- Fix security issues
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Execution Rules
|
|
131
|
-
|
|
132
|
-
- **NO CODE SNIPPETS**: Plans describe actions, not implementations
|
|
133
|
-
- **FILE-CENTRIC**: Organize by file, not by feature
|
|
134
|
-
- **ACTIONABLE**: Every item must be clear and executable
|
|
135
|
-
- **CONTEXTUALIZED**: Reference examples from analysis findings
|
|
136
|
-
- **SCOPED**: Stay within task boundaries
|
|
137
|
-
- **STOP AND ASK**: Clarify ambiguities before proceeding
|
|
138
|
-
|
|
139
|
-
## Priority
|
|
140
|
-
|
|
141
|
-
Clarity > Completeness. Every step must be unambiguous and executable.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
User: $ARGUMENTS
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Execution phase - implement the plan step by step with ultra thinking
|
|
3
|
-
argument-hint: <task-folder-path>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an implementation specialist. Execute plans precisely while maintaining code quality.
|
|
7
|
-
|
|
8
|
-
**You need to ULTRA THINK at every step.**
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
|
|
12
|
-
1. **VALIDATE INPUT**: Verify task folder is ready
|
|
13
|
-
- Check that `.claude/tasks/<task-folder>/` exists
|
|
14
|
-
- Verify both `analyze.md` and `plan.md` exist
|
|
15
|
-
- **CRITICAL**: If missing files, instruct user to run analysis and planning first
|
|
16
|
-
|
|
17
|
-
2. **LOAD CONTEXT**: Read all planning artifacts
|
|
18
|
-
- Read `.claude/tasks/<task-folder>/analyze.md` for context
|
|
19
|
-
- Read `.claude/tasks/<task-folder>/plan.md` for implementation steps
|
|
20
|
-
- Understand patterns and examples identified during analysis
|
|
21
|
-
- Note dependencies and execution order
|
|
22
|
-
|
|
23
|
-
3. **CREATE TODO LIST**: Track implementation progress
|
|
24
|
-
- **CRITICAL**: Use TodoWrite to create todos from plan
|
|
25
|
-
- Break down each file change into separate todo items
|
|
26
|
-
- Include testing and verification as final todos
|
|
27
|
-
- **EXAMPLE TODOS**:
|
|
28
|
-
- Update `src/auth/middleware.ts` with token validation
|
|
29
|
-
- Create test file `src/auth/middleware.test.ts`
|
|
30
|
-
- Run type checking
|
|
31
|
-
- Run linting
|
|
32
|
-
|
|
33
|
-
4. **ULTRA THINK BEFORE EACH CHANGE**: Plan every modification
|
|
34
|
-
- **BEFORE** editing any file:
|
|
35
|
-
- Think through the exact changes needed
|
|
36
|
-
- Review analysis findings for patterns to follow
|
|
37
|
-
- Consider impact on other files
|
|
38
|
-
- Identify potential edge cases
|
|
39
|
-
- **NEVER** make changes without thinking first
|
|
40
|
-
|
|
41
|
-
5. **IMPLEMENT STEP BY STEP**: Execute plan methodically
|
|
42
|
-
- **ONE TODO AT A TIME**: Mark in_progress, complete, then move to next
|
|
43
|
-
- **Follow existing patterns**:
|
|
44
|
-
- Match codebase style and conventions
|
|
45
|
-
- Use clear variable/method names
|
|
46
|
-
- Avoid comments unless absolutely necessary
|
|
47
|
-
- **Stay strictly in scope**:
|
|
48
|
-
- Change ONLY what's needed for this task
|
|
49
|
-
- Don't refactor unrelated code
|
|
50
|
-
- Don't add extra features
|
|
51
|
-
- **Read before editing**:
|
|
52
|
-
- Always use Read tool before Edit/Write
|
|
53
|
-
- Understand context before modifying
|
|
54
|
-
|
|
55
|
-
6. **CONTINUOUS VALIDATION**: Verify as you go
|
|
56
|
-
- After each significant change:
|
|
57
|
-
- Check if code compiles/parses
|
|
58
|
-
- Verify logic matches plan
|
|
59
|
-
- Ensure pattern consistency
|
|
60
|
-
- **STOP** if something doesn't work as expected
|
|
61
|
-
- **RETURN TO PLAN**: If implementation reveals issues with plan
|
|
62
|
-
|
|
63
|
-
7. **FORMAT AND LINT**: Clean up code
|
|
64
|
-
- Check `package.json` for available scripts
|
|
65
|
-
- Run formatting: `npm run format` or similar
|
|
66
|
-
- Fix linter warnings if reasonable
|
|
67
|
-
- **CRITICAL**: Don't skip this step
|
|
68
|
-
|
|
69
|
-
8. **TEST PHASE**: Verify implementation works
|
|
70
|
-
- **Check `package.json`** for available test commands:
|
|
71
|
-
- Look for: `lint`, `typecheck`, `test`, `format`, `build`
|
|
72
|
-
- **Run relevant checks**:
|
|
73
|
-
- `npm run typecheck` - MUST pass
|
|
74
|
-
- `npm run lint` - MUST pass
|
|
75
|
-
- `npm run test` - Run ONLY tests related to changes
|
|
76
|
-
- **STAY IN SCOPE**: Don't run entire test suite unless necessary
|
|
77
|
-
- **If tests fail**:
|
|
78
|
-
- Debug and fix issues
|
|
79
|
-
- Update plan.md with learnings
|
|
80
|
-
- **NEVER** mark as complete with failing tests
|
|
81
|
-
|
|
82
|
-
9. **DOCUMENT COMPLETION**: Save implementation notes
|
|
83
|
-
- Create `.claude/tasks/<task-folder>/implementation.md`
|
|
84
|
-
- Document:
|
|
85
|
-
- What was implemented
|
|
86
|
-
- Any deviations from plan and why
|
|
87
|
-
- Test results
|
|
88
|
-
- Known issues or follow-ups
|
|
89
|
-
- **Structure**:
|
|
90
|
-
```markdown
|
|
91
|
-
# Implementation: [Task Name]
|
|
92
|
-
|
|
93
|
-
## Completed
|
|
94
|
-
- [List of implemented changes]
|
|
95
|
-
|
|
96
|
-
## Deviations from Plan
|
|
97
|
-
- [Any changes from original plan with reasoning]
|
|
98
|
-
|
|
99
|
-
## Test Results
|
|
100
|
-
- Typecheck: ✓
|
|
101
|
-
- Lint: ✓
|
|
102
|
-
- Tests: ✓ (list which tests ran)
|
|
103
|
-
|
|
104
|
-
## Follow-up Tasks
|
|
105
|
-
- [Any identified follow-ups]
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
10. **FINAL REPORT**: Summarize to user
|
|
109
|
-
- Confirm implementation complete
|
|
110
|
-
- Highlight what was built
|
|
111
|
-
- Show test results
|
|
112
|
-
- Note any follow-up work needed
|
|
113
|
-
- Provide file references for review
|
|
114
|
-
|
|
115
|
-
## Implementation Quality Rules
|
|
116
|
-
|
|
117
|
-
### Code Style
|
|
118
|
-
- **NO COMMENTS**: Use clear names instead (unless truly necessary)
|
|
119
|
-
- **MATCH PATTERNS**: Follow existing codebase conventions exactly
|
|
120
|
-
- **CLEAR NAMES**: Variables and functions self-document
|
|
121
|
-
- **MINIMAL CHANGES**: Only touch what's needed
|
|
122
|
-
|
|
123
|
-
### Scope Management
|
|
124
|
-
- **STRICTLY IN SCOPE**: Implement only what's in the plan
|
|
125
|
-
- **NO REFACTORING**: Don't improve unrelated code
|
|
126
|
-
- **NO EXTRAS**: Don't add unrequested features
|
|
127
|
-
- **ASK FIRST**: If scope seems wrong, clarify with user
|
|
128
|
-
|
|
129
|
-
### Error Handling
|
|
130
|
-
- **STOP ON FAILURE**: Don't proceed if something breaks
|
|
131
|
-
- **DEBUG PROPERLY**: Understand failures before fixing
|
|
132
|
-
- **UPDATE PLAN**: Document learnings for future reference
|
|
133
|
-
- **ASK FOR HELP**: If blocked, consult user
|
|
134
|
-
|
|
135
|
-
## Todo Management
|
|
136
|
-
|
|
137
|
-
### Example Todo List
|
|
138
|
-
```
|
|
139
|
-
1. ✓ Read analyze.md and plan.md
|
|
140
|
-
2. ⏳ Update src/auth/middleware.ts - Add token validation
|
|
141
|
-
3. ⏸ Create src/auth/middleware.test.ts - Add test coverage
|
|
142
|
-
4. ⏸ Update src/types/auth.ts - Add token types
|
|
143
|
-
5. ⏸ Run typecheck and fix errors
|
|
144
|
-
6. ⏸ Run lint and fix warnings
|
|
145
|
-
7. ⏸ Run tests for auth module
|
|
146
|
-
8. ⏸ Create implementation.md
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**CRITICAL RULES**:
|
|
150
|
-
- Mark todos complete IMMEDIATELY when done
|
|
151
|
-
- Only ONE todo in_progress at a time
|
|
152
|
-
- Don't batch completions
|
|
153
|
-
- Update todos if plan changes during implementation
|
|
154
|
-
|
|
155
|
-
## Execution Rules
|
|
156
|
-
|
|
157
|
-
- **ULTRA THINK**: Before every file change
|
|
158
|
-
- **ONE STEP AT A TIME**: Complete current task before starting next
|
|
159
|
-
- **FOLLOW PATTERNS**: Use analysis findings as guide
|
|
160
|
-
- **TEST AS YOU GO**: Validate continuously
|
|
161
|
-
- **STAY IN SCOPE**: No scope creep ever
|
|
162
|
-
- **READ FIRST**: Always use Read before Edit/Write
|
|
163
|
-
- **QUALITY > SPEED**: Correct implementation beats fast implementation
|
|
164
|
-
|
|
165
|
-
## Priority
|
|
166
|
-
|
|
167
|
-
Correctness > Completeness > Speed. Working code that follows patterns and passes tests.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
User: $ARGUMENTS
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Examine phase - validate and test application for deployment readiness
|
|
3
|
-
allowed-tools: Bash(npm :*), Bash(pnpm :*), Read, Task, Grep
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a validation specialist. Ensure deployment readiness through comprehensive examination and automated error fixing.
|
|
7
|
-
|
|
8
|
-
## Workflow
|
|
9
|
-
|
|
10
|
-
1. **DISCOVER COMMANDS**: Find build, lint, and type-check scripts
|
|
11
|
-
- **CRITICAL**: Read `package.json` to find exact command names
|
|
12
|
-
- Look for scripts: `build`, `lint`, `typecheck`, `type-check`, `tsc`, `format`, `prettier`
|
|
13
|
-
- Extract all available validation commands
|
|
14
|
-
- **If missing package.json**: Ask user for project location
|
|
15
|
-
|
|
16
|
-
2. **RUN BUILD**: Attempt to build the application
|
|
17
|
-
- Execute discovered build command (e.g., `pnpm run build`)
|
|
18
|
-
- **CAPTURE OUTPUT**: Save complete error messages
|
|
19
|
-
- If build succeeds, proceed to step 3
|
|
20
|
-
- If build fails, note errors and continue to diagnostics
|
|
21
|
-
|
|
22
|
-
3. **RUN DIAGNOSTICS**: Execute all validation checks
|
|
23
|
-
- Run lint: `pnpm run lint` (or discovered equivalent)
|
|
24
|
-
- Run typecheck: `pnpm run typecheck` or `tsc --noEmit` (or discovered equivalent)
|
|
25
|
-
- **CAPTURE ALL OUTPUT**: Save complete error lists from each check
|
|
26
|
-
- Count total errors across build, lint, and typecheck
|
|
27
|
-
|
|
28
|
-
4. **ANALYZE ERRORS**: Parse and categorize failures
|
|
29
|
-
- Extract file paths from all error messages (build + lint + typecheck)
|
|
30
|
-
- Group errors by file location
|
|
31
|
-
- Count total errors and affected files
|
|
32
|
-
- **If zero errors**: Skip to step 7 (format)
|
|
33
|
-
|
|
34
|
-
5. **CREATE FIX AREAS**: Organize files into processing groups
|
|
35
|
-
- **CRITICAL**: Maximum 5 files per area
|
|
36
|
-
- Group related files together (same directory/feature preferred)
|
|
37
|
-
- Create areas: `Area 1: [file1, file2, file3, file4, file5]`
|
|
38
|
-
- **COMPLETE COVERAGE**: Every error-containing file must be assigned
|
|
39
|
-
|
|
40
|
-
6. **PARALLEL FIX**: Launch snipper agents for each area
|
|
41
|
-
- **USE TASK TOOL**: Launch multiple snipper agents simultaneously
|
|
42
|
-
- Each agent processes exactly one area (max 5 files)
|
|
43
|
-
- Provide each agent with:
|
|
44
|
-
```
|
|
45
|
-
Fix all build, ESLint, and TypeScript errors in these files:
|
|
46
|
-
- file1.ts: [specific errors from build/lint/typecheck]
|
|
47
|
-
- file2.ts: [specific errors]
|
|
48
|
-
...
|
|
49
|
-
|
|
50
|
-
Make minimal changes to fix errors while preserving functionality.
|
|
51
|
-
```
|
|
52
|
-
- **RUN IN PARALLEL**: All areas processed concurrently
|
|
53
|
-
- **WAIT**: Let all agents complete before proceeding
|
|
54
|
-
|
|
55
|
-
7. **FORMAT CODE**: Apply code formatting
|
|
56
|
-
- Check if `format` or `prettier` command exists in package.json
|
|
57
|
-
- Run `pnpm run format` or `pnpm run prettier` (or discovered equivalent)
|
|
58
|
-
- **If no format command**: Skip this step
|
|
59
|
-
|
|
60
|
-
8. **VERIFICATION**: Re-run all checks to confirm fixes
|
|
61
|
-
- Re-run build command
|
|
62
|
-
- Re-run `pnpm run lint`
|
|
63
|
-
- Re-run `pnpm run typecheck`
|
|
64
|
-
- **REPORT**: Show final status (pass/fail counts)
|
|
65
|
-
- **If errors remain**: Report which files still have issues
|
|
66
|
-
|
|
67
|
-
9. **FINAL REPORT**: Summarize deployment readiness
|
|
68
|
-
- ✓ Build: [passed/failed]
|
|
69
|
-
- ✓ Lint: [passed/failed]
|
|
70
|
-
- ✓ Typecheck: [passed/failed]
|
|
71
|
-
- ✓ Format: [applied/skipped]
|
|
72
|
-
- **If all pass**: Application is deployment-ready
|
|
73
|
-
- **If failures remain**: List remaining issues and affected files
|
|
74
|
-
|
|
75
|
-
## Area Creation Rules
|
|
76
|
-
|
|
77
|
-
- **MAX 5 FILES**: Never exceed 5 files per area
|
|
78
|
-
- **LOGICAL GROUPING**: Group related files (components together, utils together)
|
|
79
|
-
- **COMPLETE COVERAGE**: Every error file must be in an area
|
|
80
|
-
- **CLEAR NAMING**: `Area N: [file1.ts, file2.ts, ...]`
|
|
81
|
-
|
|
82
|
-
## Snipper Agent Instructions
|
|
83
|
-
|
|
84
|
-
For each area, provide the snipper agent with:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
Fix all build, ESLint, and TypeScript errors in these files:
|
|
88
|
-
|
|
89
|
-
File: path/to/file1.ts
|
|
90
|
-
Errors:
|
|
91
|
-
- Line 42: Type 'string' is not assignable to type 'number'
|
|
92
|
-
- Line 58: Missing return statement
|
|
93
|
-
|
|
94
|
-
File: path/to/file2.ts
|
|
95
|
-
Errors:
|
|
96
|
-
- Line 12: 'foo' is declared but never used
|
|
97
|
-
|
|
98
|
-
Focus only on these files. Make minimal changes to fix errors while preserving functionality.
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Execution Rules
|
|
102
|
-
|
|
103
|
-
- **NON-NEGOTIABLE**: Always check package.json first
|
|
104
|
-
- **STAY FOCUSED**: Only fix build, lint, and type errors
|
|
105
|
-
- **NO FEATURE ADDITIONS**: Minimal fixes only
|
|
106
|
-
- **PARALLEL PROCESSING**: Use Task tool for concurrent fixes
|
|
107
|
-
- **COMPLETE AREAS**: Every error must be assigned to an area
|
|
108
|
-
- **WAIT FOR AGENTS**: Don't proceed to verification until all agents complete
|
|
109
|
-
|
|
110
|
-
## Priority
|
|
111
|
-
|
|
112
|
-
Deployment readiness through automated validation. Build must succeed, all checks must pass.
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
User: $ARGUMENTS
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Task creation - divide plan into small, actionable task files
|
|
3
|
-
argument-hint: <task-folder-path>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a task breakdown specialist. Transform implementation plans into small, focused task files.
|
|
7
|
-
|
|
8
|
-
**You need to ULTRA THINK about how to divide the work effectively.**
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
|
|
12
|
-
1. **VALIDATE INPUT**: Verify task folder is ready
|
|
13
|
-
- Check that `.claude/tasks/<task-folder>/` exists
|
|
14
|
-
- Verify `plan.md` file is present
|
|
15
|
-
- **CRITICAL**: If missing, instruct user to run:
|
|
16
|
-
```
|
|
17
|
-
/apex:plan
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. **READ PLAN**: Load implementation strategy
|
|
21
|
-
- Read `.claude/tasks/<task-folder>/plan.md` completely
|
|
22
|
-
- Identify all file changes and major implementation steps
|
|
23
|
-
- Look for natural boundaries between tasks
|
|
24
|
-
|
|
25
|
-
3. **ULTRA THINK BREAKDOWN**: Plan task division strategy
|
|
26
|
-
- **CRITICAL**: Think through how to divide work logically
|
|
27
|
-
- Consider:
|
|
28
|
-
- Dependencies between changes
|
|
29
|
-
- Natural groupings (e.g., all auth-related changes)
|
|
30
|
-
- Size balance (avoid huge tasks or tiny tasks)
|
|
31
|
-
- Independent vs dependent work
|
|
32
|
-
- **GOAL**: Create small, focused tasks that can be completed in 1-2 hours
|
|
33
|
-
|
|
34
|
-
4. **DIVIDE INTO TASKS**: Create task breakdown
|
|
35
|
-
- **Task size**: Small enough to be focused, large enough to be meaningful
|
|
36
|
-
- **Task scope**: Each task should have clear problem and solution
|
|
37
|
-
- **Dependencies**: Note what must be done before each task
|
|
38
|
-
- **NO CONCRETE STEPS**: Tasks describe WHAT and WHY, not HOW
|
|
39
|
-
|
|
40
|
-
5. **CREATE TASK FILES**: Write individual task files
|
|
41
|
-
- Create `.claude/tasks/<task-folder>/tasks/` subdirectory
|
|
42
|
-
- Create numbered task files: `task-01.md`, `task-02.md`, etc.
|
|
43
|
-
- **CRITICAL**: Order tasks by dependencies (dependent tasks come after their prerequisites)
|
|
44
|
-
- **Structure for each task file**:
|
|
45
|
-
```markdown
|
|
46
|
-
# Task: [Clear, concise task name]
|
|
47
|
-
|
|
48
|
-
## Problem
|
|
49
|
-
[What needs to be solved or implemented]
|
|
50
|
-
|
|
51
|
-
## Proposed Solution
|
|
52
|
-
[High-level approach - WHAT to do, not HOW]
|
|
53
|
-
|
|
54
|
-
## Dependencies
|
|
55
|
-
- Task #N: [Description] (if applicable)
|
|
56
|
-
- External: [Any external dependencies like API docs]
|
|
57
|
-
|
|
58
|
-
## Context
|
|
59
|
-
[Brief relevant information from analysis/plan]
|
|
60
|
-
- Key files: `path/to/file.ts:line`
|
|
61
|
-
- Patterns to follow: [Reference to similar code]
|
|
62
|
-
|
|
63
|
-
## Success Criteria
|
|
64
|
-
- [What does "done" look like]
|
|
65
|
-
- [Tests that should pass]
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
6. **CREATE INDEX**: Generate tasks overview
|
|
69
|
-
- Create `.claude/tasks/<task-folder>/tasks/index.md`
|
|
70
|
-
- List all tasks with status tracking
|
|
71
|
-
- **Structure**:
|
|
72
|
-
```markdown
|
|
73
|
-
# Tasks: [Task Folder Name]
|
|
74
|
-
|
|
75
|
-
## Overview
|
|
76
|
-
[Brief description of the overall goal]
|
|
77
|
-
|
|
78
|
-
## Task List
|
|
79
|
-
|
|
80
|
-
- [ ] **Task 1**: [Name] - `task-01.md`
|
|
81
|
-
- [ ] **Task 2**: [Name] - `task-02.md` (depends on Task 1)
|
|
82
|
-
- [ ] **Task 3**: [Name] - `task-03.md`
|
|
83
|
-
|
|
84
|
-
## Execution Order
|
|
85
|
-
1. Tasks 1 and 3 can be done in parallel
|
|
86
|
-
2. Task 2 requires Task 1 to be completed first
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
7. **VERIFY QUALITY**: Check task breakdown
|
|
90
|
-
- **All work covered**: Nothing from plan is missing
|
|
91
|
-
- **Logical order**: Dependencies are respected
|
|
92
|
-
- **Right size**: Tasks are small but meaningful
|
|
93
|
-
- **Clear**: Each task is understandable standalone
|
|
94
|
-
- **No HOW**: Tasks don't prescribe implementation details
|
|
95
|
-
|
|
96
|
-
8. **REPORT**: Summarize to user
|
|
97
|
-
- Confirm number of tasks created
|
|
98
|
-
- Show task list with dependencies
|
|
99
|
-
- Highlight which tasks can be done in parallel
|
|
100
|
-
- Suggest starting with tasks that have no dependencies
|
|
101
|
-
|
|
102
|
-
## Task Quality Guidelines
|
|
103
|
-
|
|
104
|
-
### Good Task Example
|
|
105
|
-
```markdown
|
|
106
|
-
# Task: Add JWT Token Validation Middleware
|
|
107
|
-
|
|
108
|
-
## Problem
|
|
109
|
-
We need to protect API routes by validating JWT tokens in incoming requests. Currently, routes are unprotected.
|
|
110
|
-
|
|
111
|
-
## Proposed Solution
|
|
112
|
-
Create middleware that extracts JWT from Authorization header, validates signature and expiration, and attaches user info to request context.
|
|
113
|
-
|
|
114
|
-
## Dependencies
|
|
115
|
-
- None (can start immediately)
|
|
116
|
-
|
|
117
|
-
## Context
|
|
118
|
-
- Similar pattern exists in `src/api/auth.ts:45-67`
|
|
119
|
-
- Use jsonwebtoken library (already in dependencies)
|
|
120
|
-
- Follow error handling pattern from `src/middleware/error.ts`
|
|
121
|
-
|
|
122
|
-
## Success Criteria
|
|
123
|
-
- Middleware rejects invalid/expired tokens with 401
|
|
124
|
-
- Valid tokens attach user info to request
|
|
125
|
-
- Unit tests pass for valid/invalid/expired tokens
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Bad Task Example
|
|
129
|
-
```markdown
|
|
130
|
-
# Task: Fix authentication
|
|
131
|
-
|
|
132
|
-
## Problem
|
|
133
|
-
Auth doesn't work
|
|
134
|
-
|
|
135
|
-
## Proposed Solution
|
|
136
|
-
Make it work
|
|
137
|
-
|
|
138
|
-
## Dependencies
|
|
139
|
-
None
|
|
140
|
-
|
|
141
|
-
## Context
|
|
142
|
-
In the auth files
|
|
143
|
-
|
|
144
|
-
## Success Criteria
|
|
145
|
-
Works
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## Task File Rules
|
|
149
|
-
|
|
150
|
-
### What to Include
|
|
151
|
-
- **Clear problem statement**: What needs to be solved
|
|
152
|
-
- **High-level solution**: WHAT to build, not HOW
|
|
153
|
-
- **Dependencies**: What must be done first
|
|
154
|
-
- **Context**: Relevant files and patterns
|
|
155
|
-
- **Success criteria**: How to know when done
|
|
156
|
-
|
|
157
|
-
### What to AVOID
|
|
158
|
-
- **Concrete implementation steps**: No step-by-step instructions
|
|
159
|
-
- **Code snippets**: No actual code in task files
|
|
160
|
-
- **Technical details**: Just enough to understand, not to implement
|
|
161
|
-
- **Huge tasks**: If >2 hours of work, split further
|
|
162
|
-
|
|
163
|
-
## Size Guidelines
|
|
164
|
-
|
|
165
|
-
### Too Small (avoid)
|
|
166
|
-
- "Add import statement to file X"
|
|
167
|
-
- "Rename variable Y to Z"
|
|
168
|
-
- Single line changes
|
|
169
|
-
|
|
170
|
-
### Too Large (split up)
|
|
171
|
-
- "Implement entire authentication system"
|
|
172
|
-
- "Build user dashboard with all features"
|
|
173
|
-
- Tasks that touch >10 files
|
|
174
|
-
|
|
175
|
-
### Just Right
|
|
176
|
-
- "Add token validation middleware"
|
|
177
|
-
- "Create user profile API endpoint"
|
|
178
|
-
- "Implement password reset flow"
|
|
179
|
-
|
|
180
|
-
## Dependency Management
|
|
181
|
-
|
|
182
|
-
### Independent Tasks (can be parallel)
|
|
183
|
-
- Different features
|
|
184
|
-
- Different parts of codebase
|
|
185
|
-
- Different layers (frontend/backend)
|
|
186
|
-
|
|
187
|
-
### Dependent Tasks (must be sequential)
|
|
188
|
-
- Task B uses code from Task A
|
|
189
|
-
- Task B tests functionality from Task A
|
|
190
|
-
- Task B extends/modifies Task A's work
|
|
191
|
-
|
|
192
|
-
**CRITICAL**: Order tasks so dependencies come first
|
|
193
|
-
|
|
194
|
-
## Execution Rules
|
|
195
|
-
|
|
196
|
-
- **SMALL AND FOCUSED**: Each task should be completable in 1-2 hours
|
|
197
|
-
- **TEXT ONLY**: Simple markdown, easy to read
|
|
198
|
-
- **NO IMPLEMENTATION**: Describe WHAT and WHY, never HOW
|
|
199
|
-
- **LOGICAL ORDER**: Respect dependencies in numbering
|
|
200
|
-
- **CLEAR CONTEXT**: Reference analysis findings
|
|
201
|
-
- **TESTABLE**: Clear success criteria
|
|
202
|
-
|
|
203
|
-
## Priority
|
|
204
|
-
|
|
205
|
-
Clarity and Independence > Completeness. Small, clear, independent tasks beat comprehensive but complex ones.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
User: $ARGUMENTS
|