create-claude-webapp 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.
- package/.husky/pre-commit +1 -0
- package/.husky/pre-push +3 -0
- package/.madgerc +14 -0
- package/.tsprunerc +11 -0
- package/CLAUDE.md +102 -0
- package/LICENSE +21 -0
- package/README.md +322 -0
- package/bin/create-project.js +87 -0
- package/biome.json +51 -0
- package/docs/guides/en/quickstart.md +109 -0
- package/docs/guides/en/rule-editing-guide.md +264 -0
- package/docs/guides/en/use-cases.md +308 -0
- package/package.json +99 -0
- package/scripts/check-unused-exports.js +69 -0
- package/scripts/cleanup-test-processes.sh +32 -0
- package/scripts/post-setup.js +110 -0
- package/scripts/setup-project.js +150 -0
- package/scripts/show-coverage.js +74 -0
- package/src/index.ts +11 -0
- package/templates/.gitignore.template +52 -0
- package/tsconfig.json +50 -0
- package/vitest.config.mjs +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.husky/pre-push
ADDED
package/.madgerc
ADDED
package/.tsprunerc
ADDED
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Claude Code Development Rules
|
|
2
|
+
|
|
3
|
+
Core rules for maximizing AI execution accuracy. All instructions must follow this file.
|
|
4
|
+
|
|
5
|
+
## šØ Most Important Principle: Research OK, Implementation STOP
|
|
6
|
+
|
|
7
|
+
**User approval is mandatory before using any Edit/Write/MultiEdit tools**
|
|
8
|
+
|
|
9
|
+
Reason: To prevent implementations that differ from user intent and ensure correct direction
|
|
10
|
+
|
|
11
|
+
## Mandatory Execution Process
|
|
12
|
+
|
|
13
|
+
### Execution Flow (Required Steps)
|
|
14
|
+
1. **Task decomposition with TodoWrite** ā Cannot proceed to implementation without it
|
|
15
|
+
Reason: To structure tasks and enable progress tracking
|
|
16
|
+
2. **Execute rule-advisor** ā Understand task essence and select appropriate rules
|
|
17
|
+
Reason: To select appropriate rules and understand task essence
|
|
18
|
+
3. **Use Edit/Write/MultiEdit** ā User approval is mandatory
|
|
19
|
+
Reason: Practicing the most important principle (Research OK, Implementation STOP)
|
|
20
|
+
4. **Execute implementation** ā Cannot complete with quality check errors
|
|
21
|
+
Reason: To ensure high-quality code
|
|
22
|
+
5. **Count file changes** ā Auto-stop when threshold exceeded
|
|
23
|
+
Reason: To get confirmation before impact becomes too large
|
|
24
|
+
|
|
25
|
+
### TodoWrite and Metacognition Integration
|
|
26
|
+
**Execution Rules**:
|
|
27
|
+
- When `pending ā in_progress`: rule-advisor output is mandatory
|
|
28
|
+
- **After rule-advisor execution**: Always update TodoWrite in the following format
|
|
29
|
+
1. Add metaCognitiveGuidance.firstStep as the first task in Todo
|
|
30
|
+
2. Record metaCognitiveGuidance.taskEssence as the completion criteria for each task
|
|
31
|
+
3. Record warningPatterns as checkpoints during execution
|
|
32
|
+
- Using Edit tools without TodoWrite: Stop as rule violation
|
|
33
|
+
- When updating task status: Recording implementation details is mandatory (no blanks)
|
|
34
|
+
|
|
35
|
+
### Execution Prerequisites
|
|
36
|
+
1. **rule-advisor agent execution (invoke using Task tool)** ā JSON response must exist
|
|
37
|
+
2. **TodoWrite task** ā in_progress status must exist
|
|
38
|
+
3. **User approval record** ā Explicit approval before Edit/Write
|
|
39
|
+
4. **Quality check results** ā Cannot complete with errors > 0
|
|
40
|
+
|
|
41
|
+
### Required Alternative Patterns
|
|
42
|
+
- **Instead of any type** ā Use unknown type with type guards
|
|
43
|
+
Reason: To ensure type safety and prevent runtime errors
|
|
44
|
+
- **When using Edit** ā Always precede with TodoWrite for task management
|
|
45
|
+
Reason: To enable progress tracking and quality assurance
|
|
46
|
+
- **When using Edit/Write/MultiEdit** ā Obtain user approval before execution
|
|
47
|
+
Reason: To comply with the most important principle (Research OK, Implementation STOP)
|
|
48
|
+
- **When declaring completion** ā Confirm zero quality check errors before declaration
|
|
49
|
+
Reason: To merge only complete code
|
|
50
|
+
|
|
51
|
+
## Metacognitive Execution (Mandatory at Task Start)
|
|
52
|
+
|
|
53
|
+
### Metacognition with Information from rule-advisor
|
|
54
|
+
1. **Understand taskEssence (task essence)**
|
|
55
|
+
- Distinguish between surface work and fundamental purpose
|
|
56
|
+
- Judge "quick fix" vs "proper solution"
|
|
57
|
+
|
|
58
|
+
2. **Confirm selectedSkills (applicable skills)**
|
|
59
|
+
- Judge if selected skills are appropriate
|
|
60
|
+
- Load necessary sections
|
|
61
|
+
|
|
62
|
+
3. **Recognize metaCognitiveGuidance.pastFailures (past failures)**
|
|
63
|
+
- Be careful not to repeat same failures
|
|
64
|
+
- Be conscious of suggested workarounds
|
|
65
|
+
|
|
66
|
+
4. **Execute metaCognitiveGuidance.firstStep (initial action)**
|
|
67
|
+
- Start with recommended tools
|
|
68
|
+
- Proceed systematically
|
|
69
|
+
|
|
70
|
+
## Claude Behavior Control (Failure Prevention)
|
|
71
|
+
|
|
72
|
+
### Auto-stop Triggers (Must Stop)
|
|
73
|
+
- **Detecting 5+ file changes**: Stop immediately, report impact to user
|
|
74
|
+
Reason: Large changes require advance planning and review
|
|
75
|
+
- **Same error occurs 3 times**: Root cause analysis mandatory
|
|
76
|
+
Reason: Need root solution, not symptomatic treatment
|
|
77
|
+
- **Detecting excessive unknown type usage**: Reconsider type guard design
|
|
78
|
+
Reason: High possibility of type safety design issues
|
|
79
|
+
- **After editing 3 files**: Force TodoWrite update (cannot use next Edit tool without update)
|
|
80
|
+
Reason: Need to confirm progress and direction
|
|
81
|
+
|
|
82
|
+
### Handling Error-fixing Impulse
|
|
83
|
+
1. Error discovered ā **Pause**
|
|
84
|
+
2. Re-execute rule-advisor
|
|
85
|
+
3. Root cause analysis (repeat "why" 5 times to identify true cause)
|
|
86
|
+
4. Present action plan
|
|
87
|
+
5. Fix after user approval
|
|
88
|
+
|
|
89
|
+
### Escalation Criteria (User Confirmation Required)
|
|
90
|
+
- Architecture changes (adding new layers, changing responsibilities)
|
|
91
|
+
- Adding external dependencies (npm packages, external APIs)
|
|
92
|
+
- Breaking changes (changing existing APIs, data structures)
|
|
93
|
+
- Multiple implementation methods with unclear superiority
|
|
94
|
+
|
|
95
|
+
### Preventing Rule Ignoring When Focused
|
|
96
|
+
**Measurable Forced Stop Criteria**:
|
|
97
|
+
- **2nd consecutive error fix**: Automatically trigger rule-advisor re-execution
|
|
98
|
+
- **5 Edit tool uses**: Force impact report creation
|
|
99
|
+
- **3 edits to same file**: Force stop for refactoring consideration
|
|
100
|
+
|
|
101
|
+
### Temporary File Creation Rules
|
|
102
|
+
Use `tmp/` directory for work files. Delete upon completion.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Shinsuke Kagawa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# AI Coding Project Boilerplate š¤
|
|
2
|
+
|
|
3
|
+
*Read this in other languages: [ę„ę¬čŖ](README.ja.md)*
|
|
4
|
+
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](https://claude.ai/code)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://github.com/svenmalvik/claude-boilerplate-4-web/pulls)
|
|
10
|
+
|
|
11
|
+
ā” **This boilerplate is for developers who want to:**
|
|
12
|
+
- Build **production-ready TypeScript projects** faster with AI
|
|
13
|
+
- Avoid **context exhaustion** in long AI coding sessions
|
|
14
|
+
- Standardize team workflows with **specialized AI agents**
|
|
15
|
+
|
|
16
|
+
## š Table of Contents
|
|
17
|
+
1. [Quick Start (3 Steps)](#-quick-start-3-steps)
|
|
18
|
+
2. [Why Sub Agents?](#-why-sub-agents)
|
|
19
|
+
3. [Skills System](#-skills-system)
|
|
20
|
+
4. [Real Projects & Results](#-real-world-results)
|
|
21
|
+
5. [Documentation & Guides](#-documentation--guides)
|
|
22
|
+
6. [Slash Commands](#-slash-commands)
|
|
23
|
+
7. [Development Workflow](#-claude-code-workflow)
|
|
24
|
+
8. [Project Structure](#-project-structure)
|
|
25
|
+
9. [Package Manager Configuration](#-package-manager-configuration)
|
|
26
|
+
10. [Multilingual Support](#-multilingual-support)
|
|
27
|
+
11. [FAQ](#-faq)
|
|
28
|
+
|
|
29
|
+
## ā” Quick Start (3 Steps)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 1. Create your project (30 seconds)
|
|
33
|
+
npx create-ai-project my-project
|
|
34
|
+
|
|
35
|
+
# 2. Install dependencies (automatic)
|
|
36
|
+
cd my-project && npm install
|
|
37
|
+
|
|
38
|
+
# 3. Launch Claude Code and configure
|
|
39
|
+
claude # Launch Claude Code
|
|
40
|
+
/project-inject # Configure project context
|
|
41
|
+
/implement <your feature> # Start building!
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> š” **First time?** Check the [Quick Start Guide](docs/guides/en/quickstart.md) for detailed setup instructions
|
|
45
|
+
|
|
46
|
+
## š Why Sub Agents?
|
|
47
|
+
|
|
48
|
+
**Traditional AI coding struggles with:**
|
|
49
|
+
- ā Losing context in long sessions
|
|
50
|
+
- ā Declining code quality over time
|
|
51
|
+
- ā Frequent session restarts for large tasks
|
|
52
|
+
|
|
53
|
+
**Sub agents solve this by:**
|
|
54
|
+
- ā
Splitting work into specialized roles (design, implementation, review)
|
|
55
|
+
- ā
Keeping context fresh and quality consistent
|
|
56
|
+
- ā
Handling large projects without degradation
|
|
57
|
+
|
|
58
|
+
Each agent focuses on one thing and does it well. No context exhaustion, no quality drop.
|
|
59
|
+
|
|
60
|
+
š [Learn more about Sub Agents (Anthropic docs)](https://docs.anthropic.com/en/docs/claude-code/sub-agents)
|
|
61
|
+
|
|
62
|
+
## šØ Skills System
|
|
63
|
+
|
|
64
|
+
This boilerplate provides the principles used in agentic implementation workflows as skills, making them available for reference in everyday tasks as needed.
|
|
65
|
+
|
|
66
|
+
### Applied Skills
|
|
67
|
+
|
|
68
|
+
| Skill | Purpose |
|
|
69
|
+
|-------|---------|
|
|
70
|
+
| `coding-standards` | Universal coding principles, anti-patterns, debugging |
|
|
71
|
+
| `typescript-rules` | TypeScript type safety, async patterns, refactoring |
|
|
72
|
+
| `typescript-testing` | Vitest, TDD, coverage requirements |
|
|
73
|
+
| `documentation-criteria` | PRD, ADR, Design Doc standards |
|
|
74
|
+
| `technical-spec` | Architecture, environment, build commands |
|
|
75
|
+
| `implementation-approach` | Strategy patterns, task decomposition |
|
|
76
|
+
| `integration-e2e-testing` | Integration/E2E test design, ROI-based selection |
|
|
77
|
+
| `project-context` | Project-specific configuration (customizable) |
|
|
78
|
+
| `supabase` | Database design, RLS policies, type generation |
|
|
79
|
+
| `supabase-edge-functions` | Edge Functions with Deno runtime |
|
|
80
|
+
| `supabase-local` | Local development, CLI, migrations |
|
|
81
|
+
| `supabase-testing` | Testing Supabase with Vitest |
|
|
82
|
+
| `stack-auth` | Authentication flows, MCP server integration |
|
|
83
|
+
| `vercel-deployment` | Vercel config, environment variables |
|
|
84
|
+
| `vercel-edge` | Edge runtime, middleware patterns |
|
|
85
|
+
| `fullstack-integration` | Cross-service integration patterns |
|
|
86
|
+
| `subagents-orchestration-guide` | Subagent coordination and distribution |
|
|
87
|
+
| `task-analyzer` | Task essence analysis, skill selection |
|
|
88
|
+
| `interview` | Technical interview & spec generation |
|
|
89
|
+
|
|
90
|
+
**Frontend-specific skills** are also available under `frontend/` (e.g., `frontend/typescript-rules`).
|
|
91
|
+
|
|
92
|
+
š [Learn how Skills work (Claude Code docs)](https://code.claude.com/docs/en/skills)
|
|
93
|
+
|
|
94
|
+
## šÆ Real-World Results
|
|
95
|
+
|
|
96
|
+
### ā±ļø Time Comparison
|
|
97
|
+
- **Without this boilerplate**: ~1 week for setup + infrastructure
|
|
98
|
+
- **With this boilerplate**: ~2 days to production-ready application
|
|
99
|
+
|
|
100
|
+
## š Documentation & Guides
|
|
101
|
+
|
|
102
|
+
- **[Quick Start Guide](docs/guides/en/quickstart.md)** - Get running in 5 minutes
|
|
103
|
+
- **[Use Cases & Commands](docs/guides/en/use-cases.md)** - Daily workflow reference
|
|
104
|
+
- **[Rule Editing Guide](docs/guides/en/rule-editing-guide.md)** - Customize for your project
|
|
105
|
+
|
|
106
|
+
## š Slash Commands
|
|
107
|
+
|
|
108
|
+
Essential commands for Claude Code:
|
|
109
|
+
|
|
110
|
+
| Command | Purpose | When to Use |
|
|
111
|
+
|---------|---------|-------------|
|
|
112
|
+
| `/implement` | End-to-end feature development | New features (Backend) |
|
|
113
|
+
| `/task` | Single task with rule precision | Bug fixes, small changes |
|
|
114
|
+
| `/design` | Create design docs only | Architecture planning (Backend) |
|
|
115
|
+
| `/plan` | Create work plan from design | After design approval (Backend) |
|
|
116
|
+
| `/build` | Execute from existing plan | Resume work (Backend) |
|
|
117
|
+
| `/review` | Check code compliance | Post-implementation (Backend) |
|
|
118
|
+
| `/front-design` | Create frontend design docs | React/Vite architecture planning |
|
|
119
|
+
| `/front-plan` | Create frontend work plan | After frontend design approval |
|
|
120
|
+
| `/front-build` | Execute frontend implementation | React component development |
|
|
121
|
+
| `/front-review` | Check frontend code compliance | Post-implementation (Frontend) |
|
|
122
|
+
| `/diagnose` | Root cause analysis workflow | Debugging, troubleshooting |
|
|
123
|
+
| `/reverse-engineer` | Generate PRD/Design Docs from code | Legacy system documentation (Backend) |
|
|
124
|
+
| `/front-reverse-design` | Generate frontend Design Docs | Existing frontend code documentation |
|
|
125
|
+
| `/add-integration-tests` | Add integration/E2E tests | When Design Doc exists but tests missing |
|
|
126
|
+
| `/setup-supabase` | Initialize Supabase in project | New project with Supabase |
|
|
127
|
+
| `/setup-vercel` | Initialize Vercel configuration | Deploying to Vercel |
|
|
128
|
+
| `/setup-auth` | Initialize Stack-auth integration | Adding authentication |
|
|
129
|
+
| `/deploy` | Orchestrate full deployment | Production deployment |
|
|
130
|
+
| `/db-migrate` | Create/run database migrations | Schema changes |
|
|
131
|
+
| `/local-dev` | Start local development environment | Local development |
|
|
132
|
+
| `/refine-skill` | Implement skill change requests | Customizing skills |
|
|
133
|
+
| `/sync-skills` | Synchronize skill metadata | After skill edits |
|
|
134
|
+
|
|
135
|
+
[Full command reference ā](docs/guides/en/use-cases.md)
|
|
136
|
+
|
|
137
|
+
## š¤ Claude Code Workflow
|
|
138
|
+
|
|
139
|
+
```mermaid
|
|
140
|
+
graph LR
|
|
141
|
+
A[Requirements] --> B[Scale Detection]
|
|
142
|
+
B -->|Small| C[Direct Implementation]
|
|
143
|
+
B -->|Medium| D[Design ā Implementation]
|
|
144
|
+
B -->|Large| E[PRD ā Design ā Implementation]
|
|
145
|
+
|
|
146
|
+
C --> F[Quality Check ā Commit]
|
|
147
|
+
D --> F
|
|
148
|
+
E --> F
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Reverse Engineering Workflow
|
|
152
|
+
|
|
153
|
+
Generate PRD and Design Docs from existing code:
|
|
154
|
+
|
|
155
|
+
```mermaid
|
|
156
|
+
graph TB
|
|
157
|
+
subgraph Phase1[Phase 1: PRD Generation]
|
|
158
|
+
CMD["/reverse-engineer"] --> SD1[scope-discoverer]
|
|
159
|
+
SD1 --> PRD[prd-creator]
|
|
160
|
+
PRD --> CV1[code-verifier]
|
|
161
|
+
CV1 --> DR1[document-reviewer]
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
subgraph Phase2[Phase 2: Design Doc Generation]
|
|
165
|
+
SD2[scope-discoverer] --> DD[technical-designer]
|
|
166
|
+
DD --> CV2[code-verifier]
|
|
167
|
+
CV2 --> DR2[document-reviewer]
|
|
168
|
+
DR2 --> DONE[Complete]
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
DR1 --> |All PRDs Approved| SD2
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### How It Works
|
|
175
|
+
|
|
176
|
+
1. **Requirement Analysis**: `/implement` command analyzes task scale
|
|
177
|
+
2. **Document Generation**: Creates necessary docs (PRD, Design Doc, Work Plan)
|
|
178
|
+
3. **Task Execution**: Specialized agents handle each phase
|
|
179
|
+
4. **Quality Assurance**: Automatic testing, type checking, and fixes
|
|
180
|
+
5. **Commit & Continue**: Clean commits for each completed task
|
|
181
|
+
|
|
182
|
+
## š Project Structure
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
claude-boilerplate-4-web/
|
|
186
|
+
āāā .claude/ # AI agent configurations
|
|
187
|
+
ā āāā agents/ # Specialized sub-agent definitions
|
|
188
|
+
ā āāā commands/ # Slash command definitions
|
|
189
|
+
ā āāā skills/ # Skills for automatic context loading
|
|
190
|
+
ā āāā coding-standards/ # Universal coding principles
|
|
191
|
+
ā āāā typescript-rules/ # TypeScript type safety
|
|
192
|
+
ā āāā typescript-testing/ # Vitest, TDD standards
|
|
193
|
+
ā āāā documentation-criteria/ # PRD, ADR, Design Doc standards
|
|
194
|
+
ā āāā technical-spec/ # Architecture, build commands
|
|
195
|
+
ā āāā implementation-approach/# Strategy patterns
|
|
196
|
+
ā āāā integration-e2e-testing/# E2E test design
|
|
197
|
+
ā āāā project-context/ # Project-specific config
|
|
198
|
+
ā āāā supabase/ # Supabase database design
|
|
199
|
+
ā āāā supabase-edge-functions/# Edge Functions (Deno)
|
|
200
|
+
ā āāā supabase-local/ # Local development
|
|
201
|
+
ā āāā supabase-testing/ # Testing Supabase
|
|
202
|
+
ā āāā stack-auth/ # Authentication flows
|
|
203
|
+
ā āāā vercel-deployment/ # Vercel config
|
|
204
|
+
ā āāā vercel-edge/ # Edge runtime
|
|
205
|
+
ā āāā fullstack-integration/ # Cross-service patterns
|
|
206
|
+
ā āāā subagents-orchestration-guide/
|
|
207
|
+
ā āāā task-analyzer/ # Task analysis
|
|
208
|
+
ā āāā interview/ # Technical interviews
|
|
209
|
+
ā āāā frontend/ # Frontend-specific skills
|
|
210
|
+
āāā docs/
|
|
211
|
+
ā āāā guides/ # User documentation
|
|
212
|
+
ā āāā adr/ # Architecture decisions
|
|
213
|
+
ā āāā design/ # Design documents
|
|
214
|
+
ā āāā prd/ # Product requirements
|
|
215
|
+
āāā src/ # Your source code
|
|
216
|
+
āāā scripts/ # Utility scripts
|
|
217
|
+
āāā CLAUDE.md # Claude Code configuration
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## š§ Package Manager Configuration
|
|
221
|
+
|
|
222
|
+
This boilerplate uses npm by default, but you can switch to your preferred package manager like bun or pnpm.
|
|
223
|
+
|
|
224
|
+
There are two environment-dependent settings in `package.json`:
|
|
225
|
+
|
|
226
|
+
- **`packageManager`**: The package manager and version to use
|
|
227
|
+
- **`scripts`**: The execution commands for each script
|
|
228
|
+
|
|
229
|
+
When you change these, Claude Code will recognize them and execute with the appropriate commands.
|
|
230
|
+
|
|
231
|
+
### Switching to bun
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"packageManager": "bun@1.3.3",
|
|
236
|
+
"scripts": {
|
|
237
|
+
"build": "bun run tsc && tsc-alias",
|
|
238
|
+
"dev": "bun run src/index.ts",
|
|
239
|
+
"test": "bun test",
|
|
240
|
+
"check": "bunx @biomejs/biome check src",
|
|
241
|
+
"check:all": "bun run check && bun run lint && bun run format:check && bun run check:unused && bun run check:deps && bun run build && bun test"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The above are representative examples. The following scripts are referenced in rules and sub-agent definitions. Update them as needed:
|
|
247
|
+
|
|
248
|
+
`build`, `build:frontend`, `dev`, `preview`, `type-check`, `test`, `test:coverage`, `test:coverage:fresh`, `test:safe`, `cleanup:processes`, `check`, `check:fix`, `check:code`, `check:unused`, `check:deps`, `check:all`, `format`, `format:check`, `lint`, `lint:fix`
|
|
249
|
+
|
|
250
|
+
## š Multilingual Support
|
|
251
|
+
|
|
252
|
+
Full support for English and Japanese:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
npm run lang:en # Switch to English
|
|
256
|
+
npm run lang:ja # Switch to Japanese
|
|
257
|
+
npm run lang:status # Check current language
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Automatically updates all configurations, rules, and agent definitions.
|
|
261
|
+
|
|
262
|
+
## š¤ FAQ
|
|
263
|
+
|
|
264
|
+
**Q: How do sub agents work?**
|
|
265
|
+
A: Just use `/implement` or `/task`. The right agents activate automatically.
|
|
266
|
+
|
|
267
|
+
**Q: What if there are errors?**
|
|
268
|
+
A: quality-fixer auto-fixes most issues. If not, it provides clear instructions.
|
|
269
|
+
|
|
270
|
+
**Q: Can I customize for my project?**
|
|
271
|
+
A: Yes! Run `/project-inject` to configure project-specific context.
|
|
272
|
+
|
|
273
|
+
**Q: What's the typical workflow?**
|
|
274
|
+
A: `/project-inject` (once) ā `/implement` (features) ā auto quality checks ā commit
|
|
275
|
+
|
|
276
|
+
**Q: How is this different from Copilot/Cursor?**
|
|
277
|
+
A: Those help write code. This manages entire development lifecycle with specialized agents.
|
|
278
|
+
|
|
279
|
+
## š¤ Complete Sub Agents Roster
|
|
280
|
+
|
|
281
|
+
| Agent | Specialization | Activation |
|
|
282
|
+
|-------|---------------|------------|
|
|
283
|
+
| **requirement-analyzer** | Scale assessment | Start of `/implement` |
|
|
284
|
+
| **prd-creator** | PRD and business requirements | Large features |
|
|
285
|
+
| **technical-designer** | Design documentation | Medium/large features |
|
|
286
|
+
| **technical-designer-frontend** | Frontend design docs | React architecture planning |
|
|
287
|
+
| **document-reviewer** | Document quality check | After document creation |
|
|
288
|
+
| **design-sync** | Design Doc consistency | After Design Doc creation |
|
|
289
|
+
| **acceptance-test-generator** | Test skeleton from ACs | After design approval |
|
|
290
|
+
| **work-planner** | Task breakdown | After design approval |
|
|
291
|
+
| **task-decomposer** | Single-commit task splitting | After work plan creation |
|
|
292
|
+
| **rule-advisor** | Optimal ruleset selection | Before any implementation |
|
|
293
|
+
| **task-executor** | Backend implementation | During build phase |
|
|
294
|
+
| **task-executor-frontend** | React implementation | Frontend build phase |
|
|
295
|
+
| **quality-fixer** | Backend automated fixes | On any quality issue |
|
|
296
|
+
| **quality-fixer-frontend** | Frontend automated fixes | On React quality issues |
|
|
297
|
+
| **code-reviewer** | Compliance check | `/review` command |
|
|
298
|
+
| **integration-test-reviewer** | Test implementation quality | After test implementation |
|
|
299
|
+
| **investigator** | Problem investigation | `/diagnose` Step 1 |
|
|
300
|
+
| **verifier** | Investigation verification | `/diagnose` Step 3 |
|
|
301
|
+
| **solver** | Solution derivation | `/diagnose` Step 4 |
|
|
302
|
+
| **scope-discoverer** | PRD/Design Doc scope discovery | `/reverse-engineer` Step 1 |
|
|
303
|
+
| **code-verifier** | Document-code consistency | `/reverse-engineer` verification |
|
|
304
|
+
| **supabase-migration-generator** | Type-safe migrations | `/db-migrate` command |
|
|
305
|
+
| **rls-policy-designer** | Row Level Security design | Supabase security setup |
|
|
306
|
+
| **auth-flow-designer** | Stack-auth flows | `/setup-auth` command |
|
|
307
|
+
| **deployment-executor** | Vercel deployments | `/deploy` command |
|
|
308
|
+
| **environment-validator** | Env config validation | Before deployment |
|
|
309
|
+
|
|
310
|
+
[Full agent list ā](.claude/agents/)
|
|
311
|
+
|
|
312
|
+
## š License
|
|
313
|
+
|
|
314
|
+
MIT License - Free to use, modify, and distribute
|
|
315
|
+
|
|
316
|
+
## šÆ About This Project
|
|
317
|
+
|
|
318
|
+
The AI Coding Project Boilerplate is engineered to maximize AI coding productivity while maintaining human-level code quality. By leveraging specialized sub agents and context engineering, it enables teams to build production-ready TypeScript applications at unprecedented speed.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
Happy Coding with Claude Code! š¤āØ
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
// Parse command line arguments
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
|
|
10
|
+
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
11
|
+
console.log(`
|
|
12
|
+
š AI Coding Project Boilerplate
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
npx create-ai-project <project-name> [options]
|
|
16
|
+
npm init ai-project <project-name> [options]
|
|
17
|
+
|
|
18
|
+
Options:
|
|
19
|
+
--lang=<language> Set the project language (ja or en, default: en)
|
|
20
|
+
--help, -h Show this help message
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
npx create-ai-project my-project
|
|
24
|
+
npx create-ai-project my-project --lang=ja
|
|
25
|
+
npm init ai-project my-project --lang=ja
|
|
26
|
+
`);
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const projectName = args[0];
|
|
31
|
+
const options = args.slice(1);
|
|
32
|
+
|
|
33
|
+
// Parse language option
|
|
34
|
+
let language = 'en'; // default
|
|
35
|
+
for (const opt of options) {
|
|
36
|
+
if (opt.startsWith('--lang=')) {
|
|
37
|
+
language = opt.split('=')[1];
|
|
38
|
+
if (!['ja', 'en'].includes(language)) {
|
|
39
|
+
console.error(`ā Invalid language: ${language}. Supported languages are: ja, en`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Validate project name
|
|
46
|
+
const validNamePattern = /^[a-z0-9-._]+$/;
|
|
47
|
+
if (!validNamePattern.test(projectName)) {
|
|
48
|
+
console.error(`ā Invalid project name: ${projectName}`);
|
|
49
|
+
console.error(' Project name must contain only lowercase letters, numbers, hyphens, dots, and underscores.');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Check if directory already exists
|
|
54
|
+
const projectPath = path.resolve(process.cwd(), projectName);
|
|
55
|
+
if (fs.existsSync(projectPath)) {
|
|
56
|
+
console.error(`ā Directory already exists: ${projectPath}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
console.log(`\nš Creating new AI coding project: ${projectName}`);
|
|
61
|
+
console.log(`š Location: ${projectPath}`);
|
|
62
|
+
console.log(`š Language: ${language}\n`);
|
|
63
|
+
|
|
64
|
+
// Run setup script
|
|
65
|
+
const setupScript = path.join(__dirname, '..', 'scripts', 'setup-project.js');
|
|
66
|
+
const setupProcess = spawn('node', [setupScript, projectName, language], {
|
|
67
|
+
stdio: 'inherit',
|
|
68
|
+
cwd: process.cwd() // ē¾åØć®ä½ę„ćć£ć¬ćÆććŖć使ēØ
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
setupProcess.on('close', (code) => {
|
|
72
|
+
if (code !== 0) {
|
|
73
|
+
console.error(`\nā Setup failed with exit code ${code}`);
|
|
74
|
+
process.exit(code);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`\nā
Project created successfully!`);
|
|
78
|
+
console.log(`\nš Next steps:`);
|
|
79
|
+
console.log(` cd ${projectName}`);
|
|
80
|
+
console.log(` npm install`);
|
|
81
|
+
console.log(` npm run dev\n`);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
setupProcess.on('error', (err) => {
|
|
85
|
+
console.error(`\nā Failed to execute setup script: ${err.message}`);
|
|
86
|
+
process.exit(1);
|
|
87
|
+
});
|
package/biome.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
|
3
|
+
"organizeImports": {
|
|
4
|
+
"enabled": true
|
|
5
|
+
},
|
|
6
|
+
"formatter": {
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"formatWithErrors": false,
|
|
9
|
+
"indentStyle": "space",
|
|
10
|
+
"indentWidth": 2,
|
|
11
|
+
"lineWidth": 100
|
|
12
|
+
},
|
|
13
|
+
"linter": {
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"rules": {
|
|
16
|
+
"recommended": true,
|
|
17
|
+
"style": {
|
|
18
|
+
"noNonNullAssertion": "off"
|
|
19
|
+
},
|
|
20
|
+
"suspicious": {
|
|
21
|
+
"noExplicitAny": "warn"
|
|
22
|
+
},
|
|
23
|
+
"complexity": {
|
|
24
|
+
"useLiteralKeys": "off"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"overrides": [
|
|
29
|
+
{
|
|
30
|
+
"include": ["**/__tests__/**/*.ts", "**/*.test.ts", "**/*.spec.ts"],
|
|
31
|
+
"linter": {
|
|
32
|
+
"rules": {
|
|
33
|
+
"suspicious": {
|
|
34
|
+
"noExplicitAny": "off"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"javascript": {
|
|
41
|
+
"formatter": {
|
|
42
|
+
"semicolons": "asNeeded",
|
|
43
|
+
"quoteStyle": "single",
|
|
44
|
+
"trailingCommas": "es5"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"files": {
|
|
48
|
+
"include": ["src/**/*.ts", "src/**/*.js"],
|
|
49
|
+
"ignore": ["node_modules/**", "dist/**"]
|
|
50
|
+
}
|
|
51
|
+
}
|