ai-sprint-kit 1.1.5 → 1.1.7

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # AI Sprint Kit
2
2
 
3
+ [English](./README.md) | [ภาษาไทย](./README-th.md)
4
+
3
5
  [![npm version](https://img.shields.io/npm/v/ai-sprint-kit.svg)](https://www.npmjs.com/package/ai-sprint-kit)
4
6
  [![License: PolyForm Noncommercial](https://img.shields.io/badge/License-PolyForm%20Noncommercial-blue.svg)](https://polyformproject.org/licenses/noncommercial/1.0.0/)
5
7
  [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
@@ -118,6 +120,18 @@ ai-sprint init
118
120
  --no-scan # Skip codebase scanning
119
121
  ```
120
122
 
123
+ ### Updating
124
+
125
+ To update to the latest version:
126
+
127
+ ```bash
128
+ # Re-run init to update templates
129
+ npx ai-sprint-kit@latest init --force
130
+
131
+ # Or update globally installed version
132
+ npm update -g ai-sprint-kit
133
+ ```
134
+
121
135
  ---
122
136
 
123
137
  ## Project Structure After Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sprint-kit",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "CLI installer for autonomous coding agent framework - security-first, production-grade Claude Code setup",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "code-generation",
22
22
  "ai-sprint"
23
23
  ],
24
- "author": "Apiasak Pungpapong",
24
+ "author": "Apipoj Piasak <https://data-espresso.com>",
25
25
  "license": "PolyForm-Noncommercial-1.0.0",
26
26
  "repository": {
27
27
  "type": "git",
@@ -3,83 +3,148 @@ description: Automatic full development cycle (plan → code → test → review
3
3
  argument-hint: [feature description]
4
4
  ---
5
5
 
6
- ## Command: /auto
6
+ **ULTRATHINK** - Execute complete autonomous development workflow.
7
7
 
8
- Execute complete autonomous development workflow from planning to deployment-ready code.
8
+ **Objective:** $ARGUMENTS
9
9
 
10
- ## Usage
10
+ ## MANDATORY Workflow Execution
11
+
12
+ **CRITICAL:** You MUST execute each phase in order. Do NOT skip to coding.
13
+
14
+ ---
15
+
16
+ ### Phase 1: Planning (MANDATORY - Execute First)
17
+
18
+ **⚠️ STOP! Before ANY code, execute `/plan` command:**
11
19
 
12
20
  ```
13
- /auto "implement user authentication"
14
- /auto "add payment processing with Stripe"
15
- /auto "create REST API for products"
21
+ /plan "$ARGUMENTS"
16
22
  ```
17
23
 
18
- ## Workflow
24
+ The `/plan` command will:
25
+ 1. Research best practices and approaches
26
+ 2. Ask clarifying questions if needed
27
+ 3. Create implementation plan with architecture
28
+ 4. Save plan to `ai_context/plans/`
19
29
 
20
- ### 1. Plan
21
- - Research approaches
22
- - Create implementation plan
23
- - Define architecture
30
+ **Validation Gate:** Plan MUST exist before proceeding.
31
+ - Check: `ai_context/plans/` has new plan directory
32
+ - If NO plan exists → STOP and run `/plan` first
24
33
 
25
- ### 2. Implement
26
- - Generate production code
27
- - Follow security best practices
28
- - Handle errors properly
34
+ ---
29
35
 
30
- ### 3. Test
31
- - Generate unit tests
32
- - Generate integration tests
33
- - Ensure >80% coverage
36
+ ### Phase 2: Implementation
34
37
 
35
- ### 4. Review
36
- - Code quality analysis
37
- - Best practices check
38
- - Refactoring suggestions
38
+ Only after plan exists, execute:
39
+ ```
40
+ /code "implement the plan at ai_context/plans/{plan-path}"
41
+ ```
39
42
 
40
- ### 5. Security Scan
41
- - SAST scanning
42
- - Secret detection
43
- - Dependency check
43
+ **Requirements:**
44
+ - Follow the plan phases step by step
45
+ - Generate production-quality code
46
+ - Follow security best practices (OWASP Top 10)
47
+ - Handle errors properly (no silent failures)
44
48
 
45
- ### 6. Documentation
46
- - Update README
47
- - Generate API docs
48
- - Add code comments
49
+ ---
49
50
 
50
- ## Human-in-the-Loop Gates
51
+ ### Phase 3: Testing
51
52
 
52
- You will be asked to approve:
53
- - Deployment actions
54
- - Infrastructure changes
55
- - Security vulnerability fixes
53
+ After implementation, execute:
54
+ ```
55
+ /test
56
+ ```
56
57
 
57
- ## Output
58
+ **Requirements:**
59
+ - Generate unit tests for business logic
60
+ - Generate integration tests for APIs
61
+ - Ensure >80% code coverage
62
+ - All tests must pass
58
63
 
59
- Complete, deployment-ready feature:
60
- - Implemented code
61
- - Passing tests (>80% coverage)
62
- - ✅ Security validated
63
- - ✅ Code reviewed
64
- - ✅ Documented
64
+ **Validation Gate:** Tests must pass before proceeding.
65
+ - If tests fail → Fix issues → Rerun `/test`
66
+ - Do NOT proceed with failing tests
65
67
 
66
- ## Success Criteria
68
+ ---
69
+
70
+ ### Phase 4: Code Review
71
+
72
+ After tests pass, execute:
73
+ ```
74
+ /review
75
+ ```
76
+
77
+ **Requirements:**
78
+ - Code quality analysis (YAGNI, KISS, DRY)
79
+ - Best practices verification
80
+ - No critical issues allowed
67
81
 
68
- - All tests pass
69
- - No critical security issues
70
- - Code review approved
71
- - Documentation updated
82
+ **Validation Gate:** Review must pass.
83
+ - If critical issues → Fix → Rerun `/review`
72
84
 
73
- ## Estimated Time
85
+ ---
86
+
87
+ ### Phase 5: Security Scan
88
+
89
+ After review passes, execute:
90
+ ```
91
+ /secure
92
+ ```
93
+
94
+ **Requirements:**
95
+ - SAST scanning for vulnerabilities
96
+ - Secret detection (no hardcoded credentials)
97
+ - Dependency vulnerability check
74
98
 
75
- - Simple features: 5-15 minutes
76
- - Medium features: 15-45 minutes
77
- - Complex features: 45+ minutes
99
+ **Validation Gate:** No high/critical security issues.
100
+ - If issues found → Fix → Rerun `/secure`
78
101
 
79
- ## Next Steps
102
+ ---
103
+
104
+ ### Phase 6: Documentation
105
+
106
+ After security passes, execute:
107
+ ```
108
+ /docs
109
+ ```
110
+
111
+ **Requirements:**
112
+ - Update relevant documentation
113
+ - Add code comments where needed
114
+ - Generate API docs if applicable
115
+
116
+ ---
117
+
118
+ ## Human-in-the-Loop Gates
119
+
120
+ Pause and ask for approval before:
121
+ - Deployment actions
122
+ - Infrastructure changes
123
+ - Critical security vulnerability fixes
124
+ - Database schema migrations
125
+
126
+ ## Success Criteria
80
127
 
81
- After /auto completion:
82
- 1. Review generated code
83
- 2. Test manually if needed
84
- 3. Commit and push
85
- 4. Deploy (with /deploy if needed)
128
+ All gates must pass:
129
+ - Plan created and approved
130
+ - Code implemented per plan
131
+ - Tests passing (>80% coverage)
132
+ - Code review approved
133
+ - ✅ Security scan clean
134
+ - ✅ Documentation updated
135
+
136
+ ## Final Report
137
+
138
+ After all phases complete, provide summary:
139
+ 1. What was implemented
140
+ 2. Test coverage achieved
141
+ 3. Security scan results
142
+ 4. Files created/modified
143
+ 5. Next steps (commit, deploy)
144
+
145
+ ## REMEMBER
146
+
147
+ - **Phase 1 is MANDATORY** - Always run `/plan` first
148
+ - **No skipping** - Execute each phase in order
149
+ - **Validation gates** - Do not proceed if a gate fails
150
+ - **Fix and retry** - If any phase fails, fix issues and rerun
@@ -1,32 +1,47 @@
1
1
  ---
2
2
  description: Generate or refactor code with best practices and security
3
- argument-hint: [what to build or refactor]
3
+ argument-hint: [plan-path or task description]
4
4
  ---
5
5
 
6
- ## Command: /code
6
+ **THINK HARDER** - Follow plan or implement with security-first approach.
7
7
 
8
- Generate production-grade code or refactor existing code following best practices, security guidelines, and design patterns.
8
+ **Objective:** $ARGUMENTS
9
9
 
10
- ## Usage
10
+ ## Workflow
11
11
 
12
- ```
13
- /code "implement user authentication with JWT"
14
- /code "refactor the payment service to use async/await"
15
- /code "add input validation to all API endpoints"
16
- /code "optimize database queries in user service"
17
- ```
12
+ ### Step 0: Check for Plan (IMPORTANT)
18
13
 
19
- ## Workflow
14
+ **If argument contains a plan path (e.g., `ai_context/plans/...`):**
15
+ 1. Read the plan: `plan.md` and `phase-*.md` files
16
+ 2. Follow implementation phases in order
17
+ 3. Mark phases complete as you progress
18
+
19
+ **If no plan exists:**
20
+ - Ask: "No plan found. Run `/plan` first or proceed with direct implementation?"
21
+ - If direct implementation requested, continue to Step 1
22
+
23
+ ---
24
+
25
+ ### Step 1: Understand Requirements
20
26
 
21
- ### 1. Understand Requirements
27
+ - Read plan phases if available
22
28
  - Clarify what needs to be built or refactored
23
29
  - Ask questions if requirements unclear
24
30
  - Identify affected files and components
25
31
 
26
- ### 2. Delegate to Implementer Agent
27
- - Spawn implementer agent with detailed instructions
28
- - Agent follows security-first principles
29
- - Implements with proper error handling
32
+ ---
33
+
34
+ ### Step 2: Delegate to Implementer Agent
35
+
36
+ ```
37
+ Task(subagent_type="implementer", prompt="Implement: $ARGUMENTS. Follow security-first principles, YAGNI/KISS/DRY. Handle errors properly.", description="Implement code")
38
+ ```
39
+
40
+ Agent responsibilities:
41
+ - Follow plan phases if provided
42
+ - Security-first implementation
43
+ - Proper error handling
44
+ - Type safety
30
45
 
31
46
  ### 3. Code Generation
32
47
  - Generate clean, maintainable code
@@ -3,6 +3,10 @@ description: Investigate and fix bugs with root cause analysis
3
3
  argument-hint: [bug description or error message]
4
4
  ---
5
5
 
6
+ **THINK HARDER** - Systematic root cause analysis requires careful investigation.
7
+
8
+ **Objective:** $ARGUMENTS
9
+
6
10
  ## Command: /debug
7
11
 
8
12
  Systematically investigate bugs, perform root cause analysis, and provide fixes with regression tests.
@@ -3,55 +3,134 @@ description: Create comprehensive implementation plan with research and architec
3
3
  argument-hint: [feature or task description]
4
4
  ---
5
5
 
6
- ## Command: /plan
6
+ **ULTRATHINK** - Deep thinking mode for comprehensive planning.
7
7
 
8
- Create a detailed implementation plan for the given feature or task.
8
+ **Objective:** $ARGUMENTS
9
9
 
10
- ## Usage
10
+ ## MANDATORY Workflow
11
+
12
+ **CRITICAL:** Follow these steps in order. Do NOT skip research.
13
+
14
+ ---
15
+
16
+ ### Step 1: Context & Memory
17
+
18
+ ```bash
19
+ # Get current timestamp (DO NOT guess dates)
20
+ date "+%y%m%d-%H%M"
21
+ ```
22
+
23
+ Check memory for past lessons:
24
+ - Read `ai_context/memory/learning.md` for mistakes to avoid
25
+ - Read `ai_context/memory/decisions.md` for past architectural decisions
26
+
27
+ ---
28
+
29
+ ### Step 2: Clarification
30
+
31
+ Use `AskUserQuestion` tool if requirements are unclear:
32
+ - Technical constraints?
33
+ - Performance requirements?
34
+ - Security considerations?
35
+ - Integration points?
36
+
37
+ ---
38
+
39
+ ### Step 3: Research (MANDATORY)
40
+
41
+ **⚠️ Do NOT skip research. Use researcher agent:**
11
42
 
12
43
  ```
13
- /plan "implement user authentication with OAuth2"
14
- /plan "add real-time notifications"
15
- /plan "refactor database layer for PostgreSQL"
44
+ Task(subagent_type="researcher", prompt="Research best practices and approaches for: $ARGUMENTS. Find: 1) Common patterns 2) Security considerations 3) Potential pitfalls 4) Recommended libraries/tools. Limit to 5 sources.", description="Research task requirements")
16
45
  ```
17
46
 
18
- ## Workflow
47
+ Research must cover:
48
+ - Industry best practices
49
+ - Security considerations (OWASP if applicable)
50
+ - Common implementation patterns
51
+ - Potential risks and mitigation
19
52
 
20
- 1. **Get timestamp** - `date "+%y%m%d-%H%M"` (DO NOT guess dates)
21
- 2. **Check memory** - Read `ai_context/memory/learning.md` for past lessons
22
- 3. **Understand** the requirement
23
- 4. **Ask** clarifying questions if needed
24
- 5. **Delegate** to planner agent
25
- 6. **Research** best practices and approaches
26
- 7. **Create** comprehensive plan in `ai_context/plans/` directory
27
- 8. **Update memory** - Record decisions in `ai_context/memory/decisions.md`
53
+ ---
28
54
 
29
- ## Plan Contents
55
+ ### Step 4: Architecture Planning
30
56
 
31
- - **Overview** - Summary with phases
32
- - **Architecture** - Technical decisions
33
- - **Phases** - Step-by-step implementation
34
- - **Risks** - Potential issues and mitigation
35
- - **Security** - Security considerations
36
- - **Success Criteria** - Definition of done
57
+ Use planner agent with research results:
37
58
 
38
- ## Output
59
+ ```
60
+ Task(subagent_type="planner", prompt="Create implementation plan for: $ARGUMENTS. Use research findings. Include: architecture, phases, risks, security, success criteria.", description="Create implementation plan")
61
+ ```
39
62
 
40
- Plan created at: `ai_context/plans/YYMMDD-HHMM-feature-name/`
41
- - `plan.md` - Main overview
42
- - `phase-*.md` - Detailed phases
63
+ ---
43
64
 
44
- ## Memory Integration
65
+ ### Step 5: Create Plan Files
45
66
 
46
- Before planning:
47
- - Check `ai_context/memory/learning.md` for past mistakes to avoid
67
+ Create plan directory: `ai_context/plans/YYMMDD-HHMM-feature-name/`
48
68
 
49
- After planning:
50
- - Update `ai_context/memory/decisions.md` with key decisions
69
+ **Required files:**
70
+
71
+ 1. **plan.md** - Overview (keep under 80 lines)
72
+ ```yaml
73
+ ---
74
+ title: "Feature name"
75
+ status: pending
76
+ created: YYYY-MM-DD
77
+ ---
78
+ ```
79
+ - Summary
80
+ - Phase list with links
81
+ - Success criteria
82
+
83
+ 2. **phase-XX-name.md** - Detailed phases
84
+ - Requirements
85
+ - Architecture decisions
86
+ - Implementation steps
87
+ - Security considerations
88
+ - Success criteria
89
+
90
+ 3. **research/researcher-report.md** - Research findings
91
+
92
+ ---
93
+
94
+ ### Step 6: Update Memory
95
+
96
+ After plan creation:
97
+ - Add key decisions to `ai_context/memory/decisions.md`
98
+ - Note any lessons learned
99
+
100
+ ---
101
+
102
+ ## Plan Contents
103
+
104
+ Every plan must include:
105
+ - **Overview** - What we're building and why
106
+ - **Architecture** - Technical decisions with rationale
107
+ - **Phases** - Step-by-step implementation (ordered)
108
+ - **Risks** - Potential issues and mitigation strategies
109
+ - **Security** - Security considerations and requirements
110
+ - **Success Criteria** - Definition of done
111
+
112
+ ## Output
113
+
114
+ Plan directory structure:
115
+ ```
116
+ ai_context/plans/YYMMDD-HHMM-feature-name/
117
+ ├── plan.md # Overview
118
+ ├── phase-01-*.md # Phase details
119
+ ├── phase-02-*.md
120
+ └── research/
121
+ └── researcher-report.md
122
+ ```
51
123
 
52
124
  ## Next Steps
53
125
 
54
126
  After plan creation:
55
- 1. Review plan
56
- 2. Approve or request changes
57
- 3. Execute with `/code` or `/auto`
127
+ 1. Review plan with user
128
+ 2. Get approval or make adjustments
129
+ 3. Execute with `/code {plan-path}` or continue `/auto`
130
+
131
+ ## REMEMBER
132
+
133
+ - **ULTRATHINK** - Take time to think deeply about architecture
134
+ - **Research FIRST** - Always research before planning
135
+ - **No shortcuts** - Complete all steps in order
136
+ - **Memory matters** - Check past lessons, record new decisions
@@ -3,6 +3,10 @@ description: Comprehensive code quality review and best practices analysis
3
3
  argument-hint: [optional: specific file or directory to review]
4
4
  ---
5
5
 
6
+ **THINK HARDER** - Thorough code review requires careful security and quality analysis.
7
+
8
+ **Objective:** $ARGUMENTS
9
+
6
10
  ## Command: /review
7
11
 
8
12
  Perform comprehensive code quality review focusing on security, maintainability, performance, and best practices.