create-claude-webapp 1.0.0 → 1.0.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/.claude/agents/acceptance-test-generator.md +256 -0
- package/.claude/agents/auth-flow-designer.md +93 -0
- package/.claude/agents/code-reviewer.md +193 -0
- package/.claude/agents/code-verifier.md +194 -0
- package/.claude/agents/deployment-executor.md +90 -0
- package/.claude/agents/design-sync.md +226 -0
- package/.claude/agents/document-reviewer.md +304 -0
- package/.claude/agents/environment-validator.md +100 -0
- package/.claude/agents/integration-test-reviewer.md +196 -0
- package/.claude/agents/investigator.md +162 -0
- package/.claude/agents/prd-creator.md +220 -0
- package/.claude/agents/quality-fixer-frontend.md +323 -0
- package/.claude/agents/quality-fixer.md +280 -0
- package/.claude/agents/requirement-analyzer.md +149 -0
- package/.claude/agents/rls-policy-designer.md +86 -0
- package/.claude/agents/rule-advisor.md +123 -0
- package/.claude/agents/scope-discoverer.md +231 -0
- package/.claude/agents/solver.md +173 -0
- package/.claude/agents/supabase-migration-generator.md +85 -0
- package/.claude/agents/task-decomposer.md +246 -0
- package/.claude/agents/task-executor-frontend.md +264 -0
- package/.claude/agents/task-executor.md +261 -0
- package/.claude/agents/technical-designer-frontend.md +444 -0
- package/.claude/agents/technical-designer.md +370 -0
- package/.claude/agents/verifier.md +193 -0
- package/.claude/agents/work-planner.md +211 -0
- package/.claude/commands/add-integration-tests.md +116 -0
- package/.claude/commands/build.md +77 -0
- package/.claude/commands/db-migrate.md +96 -0
- package/.claude/commands/deploy.md +95 -0
- package/.claude/commands/design.md +75 -0
- package/.claude/commands/diagnose.md +202 -0
- package/.claude/commands/front-build.md +116 -0
- package/.claude/commands/front-design.md +61 -0
- package/.claude/commands/front-plan.md +53 -0
- package/.claude/commands/front-reverse-design.md +183 -0
- package/.claude/commands/front-review.md +89 -0
- package/.claude/commands/implement.md +80 -0
- package/.claude/commands/local-dev.md +94 -0
- package/.claude/commands/plan.md +61 -0
- package/.claude/commands/project-inject.md +76 -0
- package/.claude/commands/refine-skill.md +207 -0
- package/.claude/commands/reverse-engineer.md +301 -0
- package/.claude/commands/review.md +88 -0
- package/.claude/commands/setup-auth.md +68 -0
- package/.claude/commands/setup-supabase.md +66 -0
- package/.claude/commands/setup-vercel.md +71 -0
- package/.claude/commands/sync-skills.md +116 -0
- package/.claude/commands/task.md +13 -0
- package/.claude/skills/coding-standards/SKILL.md +246 -0
- package/.claude/skills/documentation-criteria/SKILL.md +184 -0
- package/.claude/skills/documentation-criteria/references/adr-template.md +64 -0
- package/.claude/skills/documentation-criteria/references/design-template.md +263 -0
- package/.claude/skills/documentation-criteria/references/plan-template.md +130 -0
- package/.claude/skills/documentation-criteria/references/prd-template.md +109 -0
- package/.claude/skills/documentation-criteria/references/task-template.md +38 -0
- package/.claude/skills/frontend/technical-spec/SKILL.md +147 -0
- package/.claude/skills/frontend/typescript-rules/SKILL.md +136 -0
- package/.claude/skills/frontend/typescript-testing/SKILL.md +129 -0
- package/.claude/skills/fullstack-integration/SKILL.md +466 -0
- package/.claude/skills/implementation-approach/SKILL.md +141 -0
- package/.claude/skills/integration-e2e-testing/SKILL.md +146 -0
- package/.claude/skills/interview/SKILL.md +345 -0
- package/.claude/skills/project-context/SKILL.md +53 -0
- package/.claude/skills/stack-auth/SKILL.md +519 -0
- package/.claude/skills/subagents-orchestration-guide/SKILL.md +218 -0
- package/.claude/skills/supabase/SKILL.md +289 -0
- package/.claude/skills/supabase-edge-functions/SKILL.md +386 -0
- package/.claude/skills/supabase-local/SKILL.md +328 -0
- package/.claude/skills/supabase-testing/SKILL.md +513 -0
- package/.claude/skills/task-analyzer/SKILL.md +131 -0
- package/.claude/skills/task-analyzer/references/skills-index.yaml +375 -0
- package/.claude/skills/technical-spec/SKILL.md +86 -0
- package/.claude/skills/typescript-rules/SKILL.md +121 -0
- package/.claude/skills/typescript-testing/SKILL.md +155 -0
- package/.claude/skills/vercel-deployment/SKILL.md +355 -0
- package/.claude/skills/vercel-edge/SKILL.md +407 -0
- package/README.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integration-e2e-testing
|
|
3
|
+
description: Designs integration and E2E tests with mock boundaries and behavior verification rules. Use when writing E2E or integration tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Integration Test & E2E Test Design/Implementation Rules
|
|
7
|
+
|
|
8
|
+
## Test Types and Limits
|
|
9
|
+
|
|
10
|
+
| Type | Purpose | File Format | Limit |
|
|
11
|
+
|------|---------|-------------|-------|
|
|
12
|
+
| Integration Test | Component interaction verification | `*.int.test.ts` | 3 per feature |
|
|
13
|
+
| E2E Test | Critical user journey verification | `*.e2e.test.ts` | 1-2 per feature |
|
|
14
|
+
|
|
15
|
+
**Critical User Journey**: Features with revenue impact, legal requirements, or daily use by majority of users
|
|
16
|
+
|
|
17
|
+
## Behavior-First Principle
|
|
18
|
+
|
|
19
|
+
### Observability Check (All YES = Include)
|
|
20
|
+
|
|
21
|
+
| Check | Question | If NO |
|
|
22
|
+
|-------|----------|-------|
|
|
23
|
+
| Observable | Can user observe the result? | Exclude |
|
|
24
|
+
| System Context | Does it require integration of multiple components? | Exclude |
|
|
25
|
+
| Automatable | Can it run stably in CI environment? | Exclude |
|
|
26
|
+
|
|
27
|
+
### Include/Exclude Criteria
|
|
28
|
+
|
|
29
|
+
**Include**: Business logic accuracy, data integrity, user-visible features, error handling
|
|
30
|
+
**Exclude**: External live connections, performance metrics, implementation details, UI layout
|
|
31
|
+
|
|
32
|
+
## Skeleton Specification
|
|
33
|
+
|
|
34
|
+
### Required Comment Format
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
// AC: "[Acceptance criteria original text]"
|
|
38
|
+
// ROI: [0-100] | Business Value: [0-10] | Frequency: [0-10]
|
|
39
|
+
// Behavior: [Trigger] -> [Process] -> [Observable Result]
|
|
40
|
+
// @category: core-functionality | integration | edge-case | ux | e2e
|
|
41
|
+
// @dependency: none | [component name] | full-system
|
|
42
|
+
// @complexity: low | medium | high
|
|
43
|
+
it.todo('[AC number]: [Test name]')
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Property Annotations
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// Property: `[Verification expression]`
|
|
50
|
+
// fast-check: fc.property(fc.[arbitrary], (input) => [invariant])
|
|
51
|
+
it.todo('[AC number]-property: [Invariant description]')
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### ROI Calculation
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
ROI = (Business Value x Frequency + Legal Requirement x 10 + Defect Detection) / Total Cost
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
| Type | Total Cost | E2E Generation Condition |
|
|
61
|
+
|------|------------|-------------------------|
|
|
62
|
+
| Integration | 11 | - |
|
|
63
|
+
| E2E | 38 | ROI > 50 |
|
|
64
|
+
|
|
65
|
+
## Implementation Rules
|
|
66
|
+
|
|
67
|
+
### Property-Based Test Implementation
|
|
68
|
+
|
|
69
|
+
When Property annotation exists, fast-check library is required:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import fc from 'fast-check'
|
|
73
|
+
|
|
74
|
+
it('AC2-property: Model name is always gemini-3-pro-image-preview', () => {
|
|
75
|
+
fc.assert(
|
|
76
|
+
fc.property(fc.string(), (prompt) => {
|
|
77
|
+
const result = client.generate(prompt)
|
|
78
|
+
return result.model === 'gemini-3-pro-image-preview'
|
|
79
|
+
})
|
|
80
|
+
)
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Requirements**:
|
|
85
|
+
- Write in `fc.assert(fc.property(...))` format
|
|
86
|
+
- Reflect skeleton's `// fast-check:` comment directly in implementation
|
|
87
|
+
- When failure case discovered, add as concrete unit test (regression prevention)
|
|
88
|
+
|
|
89
|
+
### Behavior Verification Implementation
|
|
90
|
+
|
|
91
|
+
**Behavior Description Verification Levels**:
|
|
92
|
+
|
|
93
|
+
| Step Type | Verification Target | Example |
|
|
94
|
+
|-----------|--------------------| --------|
|
|
95
|
+
| Trigger | Reproduce in Arrange | API failure -> mockResolvedValue({ ok: false }) |
|
|
96
|
+
| Process | Intermediate state or call | Function call, state change |
|
|
97
|
+
| Observable Result | Final output value | Return value, error message, log output |
|
|
98
|
+
|
|
99
|
+
**Pass Criteria**: Pass if "observable result" is verified as **return value or mock call argument** of test target
|
|
100
|
+
|
|
101
|
+
### Verification Item Determination Rules
|
|
102
|
+
|
|
103
|
+
| Skeleton State | Verification Item Determination Method |
|
|
104
|
+
|----------------|---------------------------------------|
|
|
105
|
+
| `// Verification items:` listed | Implement all listed items with expect |
|
|
106
|
+
| No `// Verification items:` | Derive from "observable result" in "Behavior" description |
|
|
107
|
+
| Both present | Prioritize verification items, use behavior as supplement |
|
|
108
|
+
|
|
109
|
+
### Integration Test Mock Boundaries
|
|
110
|
+
|
|
111
|
+
| Judgment Criteria | Mock | Actual |
|
|
112
|
+
|-------------------|------|--------|
|
|
113
|
+
| Part of test target? | No -> Can mock | Yes -> Actual required |
|
|
114
|
+
| Is call verification target of test? | No -> Can mock | Yes -> Actual or verifiable mock |
|
|
115
|
+
| External network communication? | Yes -> Mock required | No -> Actual recommended |
|
|
116
|
+
|
|
117
|
+
**Judgment Flow**:
|
|
118
|
+
1. External API (HTTP communication) -> Mock required
|
|
119
|
+
2. Component interaction under test -> Actual required
|
|
120
|
+
3. Log output verification needed -> Use verifiable mock (vi.fn())
|
|
121
|
+
4. Log output verification not needed -> Actual or ignore
|
|
122
|
+
|
|
123
|
+
### E2E Test Execution Conditions
|
|
124
|
+
|
|
125
|
+
- Execute only after all components are implemented
|
|
126
|
+
- Do not use mocks (`@dependency: full-system`)
|
|
127
|
+
|
|
128
|
+
## Review Criteria
|
|
129
|
+
|
|
130
|
+
### Skeleton and Implementation Consistency
|
|
131
|
+
|
|
132
|
+
| Check | Failure Condition |
|
|
133
|
+
|-------|-------------------|
|
|
134
|
+
| Property Verification | Property annotation exists but fast-check not used |
|
|
135
|
+
| Behavior Verification | No expect for "observable result" |
|
|
136
|
+
| Verification Item Coverage | Listed verification items not included in expect |
|
|
137
|
+
| Mock Boundary | Internal components mocked in integration test |
|
|
138
|
+
|
|
139
|
+
### Implementation Quality
|
|
140
|
+
|
|
141
|
+
| Check | Failure Condition |
|
|
142
|
+
|-------|-------------------|
|
|
143
|
+
| AAA Structure | Arrange/Act/Assert separation unclear |
|
|
144
|
+
| Independence | State sharing between tests, execution order dependency |
|
|
145
|
+
| Reproducibility | Depends on date/random, results vary |
|
|
146
|
+
| Readability | Test name and verification content don't match |
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: interview
|
|
3
|
+
description: This skill should be used when the user asks to be "interviewed", runs "/interview", says "interview me about...", or requests a structured discovery process for requirements gathering. Conducts an in-depth technical interview and generates a comprehensive specification document.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Interview Command
|
|
7
|
+
|
|
8
|
+
Conduct an in-depth technical interview with the user about a feature, project, or system they want to build. Use the AskUserQuestion tool to systematically gather requirements, understand tradeoffs, and explore technical decisions. Continue until you have complete understanding, then write a comprehensive specification.
|
|
9
|
+
|
|
10
|
+
# Goal
|
|
11
|
+
|
|
12
|
+
Through iterative questioning, extract a complete picture of:
|
|
13
|
+
- Technical implementation details and architecture
|
|
14
|
+
- UI/UX requirements and user flows
|
|
15
|
+
- Edge cases, constraints, and concerns
|
|
16
|
+
- Performance, scalability, and security considerations
|
|
17
|
+
- Tradeoffs between different approaches
|
|
18
|
+
- Dependencies, integrations, and infrastructure needs
|
|
19
|
+
|
|
20
|
+
# Instructions for Claude
|
|
21
|
+
|
|
22
|
+
## Interview Process
|
|
23
|
+
|
|
24
|
+
You MUST use the AskUserQuestion tool throughout this process. Never make assumptions - always ask.
|
|
25
|
+
|
|
26
|
+
### Phase 1: Problem Space (2-4 rounds)
|
|
27
|
+
|
|
28
|
+
**Round 1 - Core Problem**
|
|
29
|
+
- What specific problem or need does this solve?
|
|
30
|
+
- Who are the users and what are their pain points?
|
|
31
|
+
- What currently exists (if anything) and why is it insufficient?
|
|
32
|
+
- What does success look like?
|
|
33
|
+
|
|
34
|
+
**Round 2 - Scope and Constraints**
|
|
35
|
+
- What are the hard constraints (budget, timeline, tech stack, compliance)?
|
|
36
|
+
- What's in scope vs out of scope for the initial version?
|
|
37
|
+
- What are the dependencies on other systems or teams?
|
|
38
|
+
- What are the non-negotiable requirements?
|
|
39
|
+
|
|
40
|
+
**Round 3 - User Experience**
|
|
41
|
+
- How should users interact with this (UI, API, CLI, etc.)?
|
|
42
|
+
- What's the primary user journey from start to finish?
|
|
43
|
+
- What should happen in error/edge cases from a user perspective?
|
|
44
|
+
- What are the accessibility and internationalization requirements?
|
|
45
|
+
|
|
46
|
+
**Round 4 - Scale and Performance**
|
|
47
|
+
- What are the expected usage patterns (users, requests, data volume)?
|
|
48
|
+
- What are the performance requirements (latency, throughput)?
|
|
49
|
+
- How should the system handle load spikes or failures?
|
|
50
|
+
- What are the data retention and backup requirements?
|
|
51
|
+
|
|
52
|
+
### Phase 2: Solution Space (2-4 rounds)
|
|
53
|
+
|
|
54
|
+
**Round 5 - Technical Approach**
|
|
55
|
+
- What's the high-level architecture (monolith, microservices, serverless)?
|
|
56
|
+
- What are the key components and how do they communicate?
|
|
57
|
+
- What tech stack is preferred or required (languages, frameworks)?
|
|
58
|
+
- What hosting/infrastructure is planned (cloud provider, on-prem)?
|
|
59
|
+
|
|
60
|
+
**Round 6 - Data and State**
|
|
61
|
+
- What data needs to be stored and for how long?
|
|
62
|
+
- What's the data model and relationships?
|
|
63
|
+
- What database technology fits best (SQL, NoSQL, graph, etc.)?
|
|
64
|
+
- How should data be validated, transformed, and migrated?
|
|
65
|
+
|
|
66
|
+
**Round 7 - Integration Points**
|
|
67
|
+
- What external systems need to be integrated?
|
|
68
|
+
- What APIs or SDKs need to be consumed or provided?
|
|
69
|
+
- What authentication/authorization mechanism is needed?
|
|
70
|
+
- What third-party services are required (payment, email, etc.)?
|
|
71
|
+
|
|
72
|
+
**Round 8 - Operations and Security**
|
|
73
|
+
- How will the system be monitored and debugged?
|
|
74
|
+
- What logging, metrics, and alerting are needed?
|
|
75
|
+
- What are the security requirements (encryption, compliance, audit)?
|
|
76
|
+
- How will deployments and rollbacks work?
|
|
77
|
+
|
|
78
|
+
### Phase 3: Tradeoffs and Decisions (2-3 rounds)
|
|
79
|
+
|
|
80
|
+
**Round 9 - Architecture Tradeoffs**
|
|
81
|
+
Ask about specific tradeoffs relevant to their answers:
|
|
82
|
+
- Consistency vs availability vs partition tolerance
|
|
83
|
+
- Complexity vs time-to-market
|
|
84
|
+
- Cost vs performance
|
|
85
|
+
- Build vs buy for key components
|
|
86
|
+
- Flexibility vs simplicity
|
|
87
|
+
|
|
88
|
+
**Round 10 - Risk Assessment**
|
|
89
|
+
- What are the biggest technical risks?
|
|
90
|
+
- What could go wrong at scale?
|
|
91
|
+
- What happens if a dependency fails?
|
|
92
|
+
- What's the disaster recovery plan?
|
|
93
|
+
|
|
94
|
+
**Round 11 - Future Considerations**
|
|
95
|
+
- What features are planned for future phases?
|
|
96
|
+
- How might requirements change in 6-12 months?
|
|
97
|
+
- What should be designed for extensibility?
|
|
98
|
+
- What technical debt is acceptable in v1?
|
|
99
|
+
|
|
100
|
+
## Interview Guidelines
|
|
101
|
+
|
|
102
|
+
1. **Ask non-obvious questions**: Don't ask basic questions like "what color should the button be?" Ask about implications, edge cases, and hidden complexity.
|
|
103
|
+
|
|
104
|
+
2. **Build on previous answers**: Reference their earlier responses to go deeper. For example: "You mentioned using microservices - how will you handle distributed transactions?"
|
|
105
|
+
|
|
106
|
+
3. **Explore tradeoffs**: Present 2-4 specific options with pros/cons and ask them to choose and explain why.
|
|
107
|
+
|
|
108
|
+
4. **Challenge assumptions**: If they suggest something that might have issues, ask probing questions to ensure they've thought it through.
|
|
109
|
+
|
|
110
|
+
5. **Use the AskUserQuestion tool properly**:
|
|
111
|
+
- Ask 1-4 related questions per round
|
|
112
|
+
- Provide clear, concise options when appropriate
|
|
113
|
+
- Use multiSelect when multiple answers make sense
|
|
114
|
+
- Make headers short (e.g., "Auth method", "Database", "Approach")
|
|
115
|
+
|
|
116
|
+
6. **Iterate until complete**: Don't rush. If answers are vague, ask follow-up questions. If you discover new areas to explore, add rounds.
|
|
117
|
+
|
|
118
|
+
7. **Adapt to the project**: Adjust phases and questions based on what they're building. A CLI tool needs different questions than a web app.
|
|
119
|
+
|
|
120
|
+
## After Interview: Write Specification
|
|
121
|
+
|
|
122
|
+
Once you have thorough answers (typically 10-15 rounds), synthesize everything into a comprehensive specification document.
|
|
123
|
+
|
|
124
|
+
### Specification Structure
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
# [Project Name] - Technical Specification
|
|
128
|
+
|
|
129
|
+
## 1. Executive Summary
|
|
130
|
+
- Problem statement
|
|
131
|
+
- Proposed solution (1-2 paragraphs)
|
|
132
|
+
- Key success metrics
|
|
133
|
+
|
|
134
|
+
## 2. Requirements
|
|
135
|
+
|
|
136
|
+
### 2.1 Functional Requirements
|
|
137
|
+
- Core features and capabilities
|
|
138
|
+
- User stories or use cases
|
|
139
|
+
- Acceptance criteria
|
|
140
|
+
|
|
141
|
+
### 2.2 Non-Functional Requirements
|
|
142
|
+
- Performance targets (latency, throughput, etc.)
|
|
143
|
+
- Scalability requirements
|
|
144
|
+
- Security and compliance requirements
|
|
145
|
+
- Availability and reliability targets
|
|
146
|
+
|
|
147
|
+
### 2.3 Constraints
|
|
148
|
+
- Technical constraints
|
|
149
|
+
- Business constraints
|
|
150
|
+
- Timeline and resource constraints
|
|
151
|
+
|
|
152
|
+
## 3. User Experience
|
|
153
|
+
|
|
154
|
+
### 3.1 User Personas
|
|
155
|
+
- Primary and secondary users
|
|
156
|
+
- User goals and pain points
|
|
157
|
+
|
|
158
|
+
### 3.2 User Flows
|
|
159
|
+
- Primary user journeys (step-by-step)
|
|
160
|
+
- Error handling flows
|
|
161
|
+
- Edge case scenarios
|
|
162
|
+
|
|
163
|
+
### 3.3 Interface Design
|
|
164
|
+
- UI/UX principles and guidelines
|
|
165
|
+
- Key screens or interactions (if applicable)
|
|
166
|
+
- API design (if applicable)
|
|
167
|
+
|
|
168
|
+
## 4. Technical Architecture
|
|
169
|
+
|
|
170
|
+
### 4.1 System Overview
|
|
171
|
+
- High-level architecture diagram (textual description)
|
|
172
|
+
- Component breakdown
|
|
173
|
+
- Communication patterns
|
|
174
|
+
|
|
175
|
+
### 4.2 Technology Stack
|
|
176
|
+
- Languages and frameworks
|
|
177
|
+
- Databases and storage
|
|
178
|
+
- Infrastructure and hosting
|
|
179
|
+
- Third-party services
|
|
180
|
+
|
|
181
|
+
### 4.3 Data Model
|
|
182
|
+
- Core entities and relationships
|
|
183
|
+
- Database schema design
|
|
184
|
+
- Data flow and transformations
|
|
185
|
+
|
|
186
|
+
### 4.4 API Design
|
|
187
|
+
- Endpoint specifications
|
|
188
|
+
- Request/response formats
|
|
189
|
+
- Authentication and authorization
|
|
190
|
+
|
|
191
|
+
## 5. Integration Points
|
|
192
|
+
|
|
193
|
+
### 5.1 External Systems
|
|
194
|
+
- Third-party APIs and services
|
|
195
|
+
- Internal system dependencies
|
|
196
|
+
- Webhooks and callbacks
|
|
197
|
+
|
|
198
|
+
### 5.2 Authentication & Authorization
|
|
199
|
+
- Auth mechanism (OAuth, JWT, etc.)
|
|
200
|
+
- Permission model
|
|
201
|
+
- Session management
|
|
202
|
+
|
|
203
|
+
## 6. Operations
|
|
204
|
+
|
|
205
|
+
### 6.1 Deployment Strategy
|
|
206
|
+
- Deployment pipeline
|
|
207
|
+
- Environment configuration
|
|
208
|
+
- Rollback procedures
|
|
209
|
+
|
|
210
|
+
### 6.2 Monitoring & Observability
|
|
211
|
+
- Logging strategy
|
|
212
|
+
- Metrics and dashboards
|
|
213
|
+
- Alerting rules
|
|
214
|
+
|
|
215
|
+
### 6.3 Security
|
|
216
|
+
- Threat model
|
|
217
|
+
- Security controls
|
|
218
|
+
- Compliance requirements
|
|
219
|
+
- Data privacy measures
|
|
220
|
+
|
|
221
|
+
## 7. Implementation Plan
|
|
222
|
+
|
|
223
|
+
### 7.1 Phases
|
|
224
|
+
- MVP/Phase 1 features
|
|
225
|
+
- Future phases
|
|
226
|
+
|
|
227
|
+
### 7.2 Dependencies
|
|
228
|
+
- External dependencies
|
|
229
|
+
- Prerequisite work
|
|
230
|
+
|
|
231
|
+
### 7.3 Risks & Mitigations
|
|
232
|
+
- Technical risks and mitigation strategies
|
|
233
|
+
- Open questions and assumptions
|
|
234
|
+
|
|
235
|
+
## 8. Tradeoffs & Decisions
|
|
236
|
+
|
|
237
|
+
### 8.1 Architecture Decisions
|
|
238
|
+
- Key decisions made and rationale
|
|
239
|
+
- Alternatives considered
|
|
240
|
+
|
|
241
|
+
### 8.2 Technical Debt
|
|
242
|
+
- Acceptable shortcuts in v1
|
|
243
|
+
- Plans to address debt later
|
|
244
|
+
|
|
245
|
+
## 9. Success Criteria
|
|
246
|
+
|
|
247
|
+
### 9.1 Launch Criteria
|
|
248
|
+
- Required functionality
|
|
249
|
+
- Performance benchmarks
|
|
250
|
+
- Security checklist
|
|
251
|
+
|
|
252
|
+
### 9.2 Metrics
|
|
253
|
+
- KPIs to track
|
|
254
|
+
- Success thresholds
|
|
255
|
+
|
|
256
|
+
## 10. Open Questions
|
|
257
|
+
|
|
258
|
+
- Remaining unknowns
|
|
259
|
+
- Items requiring further discussion
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Specification Guidelines
|
|
263
|
+
|
|
264
|
+
1. **Be specific**: Include concrete numbers, technologies, and decisions
|
|
265
|
+
2. **Reference the interview**: Quote or reference their answers where relevant
|
|
266
|
+
3. **Flag uncertainties**: If something is still unclear, call it out explicitly
|
|
267
|
+
4. **Include diagrams**: Describe architecture, data flow, and user flows in text
|
|
268
|
+
5. **Make it actionable**: The spec should be detailed enough to start implementation
|
|
269
|
+
6. **Highlight risks**: Be honest about challenges and unknowns
|
|
270
|
+
|
|
271
|
+
## Example Interview Round
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
<AskUserQuestion>
|
|
275
|
+
{
|
|
276
|
+
"questions": [
|
|
277
|
+
{
|
|
278
|
+
"question": "How should the system handle authentication and user sessions?",
|
|
279
|
+
"header": "Auth method",
|
|
280
|
+
"multiSelect": false,
|
|
281
|
+
"options": [
|
|
282
|
+
{
|
|
283
|
+
"label": "JWT tokens with refresh mechanism",
|
|
284
|
+
"description": "Stateless auth, good for distributed systems, requires token refresh logic"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"label": "Session-based with Redis",
|
|
288
|
+
"description": "Server-side state, easier revocation, requires session store"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"label": "OAuth 2.0 / OIDC with external provider",
|
|
292
|
+
"description": "Delegate to Google/Auth0, requires third-party dependency"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"label": "API keys for service accounts",
|
|
296
|
+
"description": "Simple for machine-to-machine, not suitable for end users"
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"question": "What should happen when a user's session expires while they're working?",
|
|
302
|
+
"header": "Session expiry",
|
|
303
|
+
"multiSelect": false,
|
|
304
|
+
"options": [
|
|
305
|
+
{
|
|
306
|
+
"label": "Silent refresh in background",
|
|
307
|
+
"description": "Best UX but more complex, requires refresh token mechanism"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"label": "Show modal and require re-login",
|
|
311
|
+
"description": "Simple but disruptive, may lose user work"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"label": "Save work and redirect to login",
|
|
315
|
+
"description": "Preserve state, requires draft/autosave functionality"
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
</AskUserQuestion>
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## When to Stop
|
|
325
|
+
|
|
326
|
+
Continue interviewing until:
|
|
327
|
+
1. You understand the complete user journey
|
|
328
|
+
2. You know the technical architecture and all major components
|
|
329
|
+
3. You've explored key tradeoffs and decisions
|
|
330
|
+
4. You understand edge cases and error scenarios
|
|
331
|
+
5. You have clarity on scope, constraints, and timeline
|
|
332
|
+
6. The user has no more important considerations to add
|
|
333
|
+
|
|
334
|
+
Typically this takes 10-15 rounds of questions (30-60 total questions).
|
|
335
|
+
|
|
336
|
+
## Notes
|
|
337
|
+
|
|
338
|
+
- **Always use AskUserQuestion tool**: This is not optional. The entire interview MUST use this tool.
|
|
339
|
+
- **Don't rush**: Depth is more important than speed
|
|
340
|
+
- **Stay curious**: If something seems simple, probe deeper
|
|
341
|
+
- **Be thorough**: Better to over-ask than under-specify
|
|
342
|
+
- **Think like a staff engineer**: Consider scalability, security, maintainability, operations
|
|
343
|
+
- **Customize per project**: A mobile app needs different questions than a batch processing system
|
|
344
|
+
|
|
345
|
+
After completing the interview and writing the spec, ask the user if they'd like to refine any section or proceed with implementation planning.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-context
|
|
3
|
+
description: Provides project-specific tech stack, architecture, and implementation rules. Use when checking project structure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project Context
|
|
7
|
+
|
|
8
|
+
## Basic Configuration
|
|
9
|
+
|
|
10
|
+
### Project Nature
|
|
11
|
+
- **Project Type**: Claude Code-specific TypeScript project template
|
|
12
|
+
- **Usage Scope**: Configurable according to project requirements
|
|
13
|
+
- **Implementation Policy**: LLM-driven implementation, quality-focused, strict YAGNI principle adherence
|
|
14
|
+
|
|
15
|
+
### Technology Stack
|
|
16
|
+
- **Foundation Technologies**: TypeScript, Node.js
|
|
17
|
+
- **Test Framework**: Vitest
|
|
18
|
+
- **Quality Management**: Biome, TypeScript strict mode
|
|
19
|
+
- **Database**: Supabase (PostgreSQL with RLS)
|
|
20
|
+
- **Deployment**: Vercel
|
|
21
|
+
- **Authentication**: Stack-auth (MCP: https://mcp.stack-auth.com/)
|
|
22
|
+
|
|
23
|
+
## Implementation Principles
|
|
24
|
+
|
|
25
|
+
### Implementation Policy Characteristics
|
|
26
|
+
- **LLM-Driven Implementation**: Claude Code functions as the primary implementer
|
|
27
|
+
- **Quality-First Culture**: Prioritize quality over speed
|
|
28
|
+
- **YAGNI Principle**: Don't implement until necessary
|
|
29
|
+
- **Systematic Design**: Design process through ADR/Design Doc/work plans
|
|
30
|
+
|
|
31
|
+
## User Interaction
|
|
32
|
+
|
|
33
|
+
When gathering project information or clarifying requirements from the user:
|
|
34
|
+
- **Always use the AskUserQuestion tool** to present questions with predefined options
|
|
35
|
+
- Structure questions with clear, concise options for the user to select
|
|
36
|
+
- Use multiSelect when multiple answers are valid
|
|
37
|
+
- Provide helpful descriptions for each option to guide the user's decision
|
|
38
|
+
|
|
39
|
+
## Customization Guide
|
|
40
|
+
|
|
41
|
+
When using this template for new projects:
|
|
42
|
+
|
|
43
|
+
1. **Add Project-Specific Information**
|
|
44
|
+
- Target user characteristics
|
|
45
|
+
- Business requirements and constraints
|
|
46
|
+
- Technical constraint conditions
|
|
47
|
+
|
|
48
|
+
2. **Architecture Selection**
|
|
49
|
+
- Select appropriate patterns from architecture skills
|
|
50
|
+
|
|
51
|
+
3. **Environment Configuration**
|
|
52
|
+
- Implement environment variable management methods suitable for the project
|
|
53
|
+
- Add project-specific configuration files
|