specweave 0.1.0 → 0.1.2
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 +18 -8
- package/SPECWEAVE.md +2 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +37 -53
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/utils/auto-install.d.ts +44 -0
- package/dist/utils/auto-install.d.ts.map +1 -0
- package/dist/utils/auto-install.js +277 -0
- package/dist/utils/auto-install.js.map +1 -0
- package/package.json +1 -1
- package/src/agents/diagrams-architect/AGENT.md +380 -0
- package/src/agents/diagrams-architect/templates/c4-component-template.mmd +45 -0
- package/src/agents/diagrams-architect/templates/c4-container-template.mmd +48 -0
- package/src/agents/diagrams-architect/templates/c4-context-template.mmd +29 -0
- package/src/agents/diagrams-architect/templates/deployment-template.mmd +77 -0
- package/src/agents/diagrams-architect/templates/er-diagram-template.mmd +64 -0
- package/src/agents/diagrams-architect/templates/sequence-template.mmd +55 -0
- package/src/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +131 -0
- package/src/agents/diagrams-architect/test-cases/test-2-sequence.yaml +150 -0
- package/src/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +182 -0
- package/src/skills/diagrams-architect/test-cases/test-1-c4-context.yaml +13 -0
- package/src/skills/diagrams-architect/test-cases/test-2-sequence-diagram.yaml +13 -0
- package/src/skills/diagrams-architect/test-cases/test-3-er-diagram.yaml +13 -0
- package/src/skills/diagrams-generator/SKILL.md +213 -13
- package/src/skills/dotnet-backend/test-cases/test-1-rest-api.yaml +14 -0
- package/src/skills/dotnet-backend/test-cases/test-2-authentication.yaml +13 -0
- package/src/skills/dotnet-backend/test-cases/test-3-minimal-api.yaml +13 -0
- package/src/skills/figma-designer/test-cases/test-1-design-system.yaml +13 -0
- package/src/skills/figma-designer/test-cases/test-2-component-library.yaml +13 -0
- package/src/skills/figma-designer/test-cases/test-3-responsive-layout.yaml +13 -0
- package/src/skills/figma-implementer/test-cases/test-1-design-to-react.yaml +13 -0
- package/src/skills/figma-implementer/test-cases/test-2-storybook.yaml +13 -0
- package/src/skills/figma-implementer/test-cases/test-3-design-tokens.yaml +13 -0
- package/src/skills/frontend/test-cases/test-1-react-component.yaml +13 -0
- package/src/skills/frontend/test-cases/test-2-form-validation.yaml +13 -0
- package/src/skills/frontend/test-cases/test-3-state-management.yaml +13 -0
- package/src/skills/nextjs/test-cases/test-1-app-router.yaml +13 -0
- package/src/skills/nextjs/test-cases/test-2-server-actions.yaml +13 -0
- package/src/skills/nextjs/test-cases/test-3-api-routes.yaml +13 -0
- package/src/skills/nodejs-backend/test-cases/test-1-express-api.yaml +13 -0
- package/src/skills/nodejs-backend/test-cases/test-2-prisma-orm.yaml +13 -0
- package/src/skills/nodejs-backend/test-cases/test-3-authentication.yaml +13 -0
- package/src/skills/python-backend/test-cases/test-1-fastapi-crud.yaml +13 -0
- package/src/skills/python-backend/test-cases/test-2-sqlalchemy.yaml +13 -0
- package/src/skills/python-backend/test-cases/test-3-authentication.yaml +13 -0
- package/src/skills/specweave-ado-mapper/test-cases/test-1-export-to-ado.yaml +13 -0
- package/src/skills/specweave-ado-mapper/test-cases/test-2-import-from-ado.yaml +13 -0
- package/src/skills/specweave-ado-mapper/test-cases/test-3-bidirectional-sync.yaml +13 -0
- package/src/skills/specweave-detector/SKILL.md +146 -0
- package/src/skills/specweave-jira-mapper/test-cases/test-1-export-to-jira.yaml +13 -0
- package/src/skills/specweave-jira-mapper/test-cases/test-2-import-from-jira.yaml +13 -0
- package/src/skills/specweave-jira-mapper/test-cases/test-3-sync-status.yaml +13 -0
- package/src/templates/config.yaml +18 -0
|
@@ -1,25 +1,225 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: diagrams-generator
|
|
3
|
-
description: Generate Mermaid diagrams following C4 conventions. Activates for create diagram, system diagram, architecture diagram, C4 diagram, sequence diagram, ER diagram, data model. Coordinates with diagrams-architect agent.
|
|
3
|
+
description: Generate Mermaid diagrams following C4 conventions. Activates for create diagram, draw diagram, visualize, system diagram, architecture diagram, C4 diagram, context diagram, container diagram, component diagram, sequence diagram, ER diagram, entity relationship, data model, deployment diagram. Coordinates with diagrams-architect agent.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Diagrams Generator Skill
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Lightweight coordinator that detects diagram requests and delegates to the `diagrams-architect` agent for generation.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Your Role
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
You are a **coordinator**, not a diagram generator. Your job is to:
|
|
14
|
+
1. **Detect** when user wants a diagram
|
|
15
|
+
2. **Identify** diagram type and scope
|
|
16
|
+
3. **Load context** (if available)
|
|
17
|
+
4. **Invoke** diagrams-architect agent
|
|
18
|
+
5. **Save** diagram to correct location
|
|
19
|
+
6. **Confirm** completion to user
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
**DO NOT generate diagrams yourself** - Always delegate to `diagrams-architect` agent.
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
**C4 Component** (LLD): "Create component diagram for Auth Service"
|
|
22
|
-
**Sequence**: "Create login flow diagram"
|
|
23
|
-
**ER Diagram**: "Create data model for auth module"
|
|
23
|
+
## Activation Keywords
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
This skill activates when user mentions:
|
|
26
|
+
- **General**: "create diagram", "draw diagram", "visualize", "generate diagram"
|
|
27
|
+
- **C4 Model**: "C4 diagram", "context diagram", "container diagram", "component diagram"
|
|
28
|
+
- **Flows**: "sequence diagram", "flow diagram", "interaction diagram"
|
|
29
|
+
- **Data**: "ER diagram", "entity relationship", "data model", "database schema"
|
|
30
|
+
- **Infrastructure**: "deployment diagram", "architecture diagram", "infrastructure diagram"
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
### Step 1: Detect Diagram Type
|
|
35
|
+
|
|
36
|
+
Analyze user's request to determine:
|
|
37
|
+
|
|
38
|
+
**C4 Context (Level 1)**: System boundaries, external actors
|
|
39
|
+
- Keywords: "context", "system", "boundaries", "external"
|
|
40
|
+
- Example: "Create C4 context diagram for authentication"
|
|
41
|
+
|
|
42
|
+
**C4 Container (Level 2)**: Services, applications, databases
|
|
43
|
+
- Keywords: "container", "services", "applications", "microservices"
|
|
44
|
+
- Example: "Create container diagram showing our services"
|
|
45
|
+
|
|
46
|
+
**C4 Component (Level 3)**: Internal module structure
|
|
47
|
+
- Keywords: "component", "internal", "module", "service internals"
|
|
48
|
+
- Example: "Create component diagram for Auth Service"
|
|
49
|
+
|
|
50
|
+
**Sequence**: Interaction flows
|
|
51
|
+
- Keywords: "sequence", "flow", "interaction", "steps", "process"
|
|
52
|
+
- Example: "Create login flow diagram"
|
|
53
|
+
|
|
54
|
+
**ER Diagram**: Data models
|
|
55
|
+
- Keywords: "ER", "entity", "relationship", "data model", "schema"
|
|
56
|
+
- Example: "Create data model for users and sessions"
|
|
57
|
+
|
|
58
|
+
**Deployment**: Infrastructure
|
|
59
|
+
- Keywords: "deployment", "infrastructure", "hosting", "cloud"
|
|
60
|
+
- Example: "Create deployment diagram for production"
|
|
61
|
+
|
|
62
|
+
### Step 2: Load Context (Optional)
|
|
63
|
+
|
|
64
|
+
If relevant specifications exist, load them:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// For authentication diagram:
|
|
68
|
+
const spec = await Read('.specweave/docs/internal/strategy/auth/spec.md');
|
|
69
|
+
const architecture = await Read('.specweave/docs/internal/architecture/auth-design.md');
|
|
70
|
+
|
|
71
|
+
// Pass to agent as context
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 3: Invoke diagrams-architect Agent
|
|
75
|
+
|
|
76
|
+
Delegate to agent via Task tool:
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const result = await Task({
|
|
80
|
+
subagent_type: "diagrams-architect",
|
|
81
|
+
prompt: `Create ${diagramType} diagram for ${scope}
|
|
82
|
+
|
|
83
|
+
Context:
|
|
84
|
+
${loadedContext}
|
|
85
|
+
|
|
86
|
+
Requirements:
|
|
87
|
+
- Follow SpecWeave C4 conventions
|
|
88
|
+
- Use correct file naming
|
|
89
|
+
- Include validation instructions`,
|
|
90
|
+
description: `Generate ${diagramType} diagram`
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 4: Save Diagram
|
|
95
|
+
|
|
96
|
+
The agent returns diagram content. Save to correct location:
|
|
97
|
+
|
|
98
|
+
**C4 Context/Container**: `.specweave/docs/internal/architecture/diagrams/`
|
|
99
|
+
**C4 Component**: `.specweave/docs/internal/architecture/diagrams/{module}/`
|
|
100
|
+
**Sequence**: `.specweave/docs/internal/architecture/diagrams/{module}/flows/`
|
|
101
|
+
**ER Diagram**: `.specweave/docs/internal/architecture/diagrams/{module}/data-model.mmd`
|
|
102
|
+
**Deployment**: `.specweave/docs/internal/operations/diagrams/deployment-{env}.mmd`
|
|
103
|
+
|
|
104
|
+
### Step 5: Confirm to User
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
✅ Diagram created: {path}
|
|
108
|
+
📋 Please verify rendering in VS Code with Mermaid Preview extension
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Examples
|
|
112
|
+
|
|
113
|
+
### Example 1: C4 Context Diagram
|
|
114
|
+
|
|
115
|
+
**User**: "Create C4 context diagram for authentication"
|
|
116
|
+
|
|
117
|
+
**You**:
|
|
118
|
+
1. Detect: C4 Context (Level 1)
|
|
119
|
+
2. Load context: Read auth spec if exists
|
|
120
|
+
3. Invoke agent:
|
|
121
|
+
```typescript
|
|
122
|
+
await Task({
|
|
123
|
+
subagent_type: "diagrams-architect",
|
|
124
|
+
prompt: "Create C4 context diagram for authentication system. Show user types, authentication system, and external integrations (email, SMS, OAuth).",
|
|
125
|
+
description: "Generate C4 Level 1 diagram"
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
4. Agent returns diagram content
|
|
129
|
+
5. Save to `.specweave/docs/internal/architecture/diagrams/auth-context.mmd`
|
|
130
|
+
6. Confirm: "✅ Diagram created: .specweave/docs/internal/architecture/diagrams/auth-context.mmd"
|
|
131
|
+
|
|
132
|
+
### Example 2: Sequence Diagram
|
|
133
|
+
|
|
134
|
+
**User**: "Create login flow diagram"
|
|
135
|
+
|
|
136
|
+
**You**:
|
|
137
|
+
1. Detect: Sequence diagram
|
|
138
|
+
2. Load context: Read login spec/flow docs if exist
|
|
139
|
+
3. Invoke agent:
|
|
140
|
+
```typescript
|
|
141
|
+
await Task({
|
|
142
|
+
subagent_type: "diagrams-architect",
|
|
143
|
+
prompt: "Create sequence diagram for login flow. Show: User → Browser → AuthService → Database → SessionStore. Include success and failure paths.",
|
|
144
|
+
description: "Generate sequence diagram"
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
4. Agent returns diagram
|
|
148
|
+
5. Save to `.specweave/docs/internal/architecture/diagrams/auth/flows/login-flow.mmd`
|
|
149
|
+
6. Confirm completion
|
|
150
|
+
|
|
151
|
+
### Example 3: ER Diagram
|
|
152
|
+
|
|
153
|
+
**User**: "Create data model for users and sessions"
|
|
154
|
+
|
|
155
|
+
**You**:
|
|
156
|
+
1. Detect: ER diagram
|
|
157
|
+
2. Load context: Read database schema docs if exist
|
|
158
|
+
3. Invoke agent:
|
|
159
|
+
```typescript
|
|
160
|
+
await Task({
|
|
161
|
+
subagent_type: "diagrams-architect",
|
|
162
|
+
prompt: "Create ER diagram for authentication data model. Entities: USER, SESSION, REFRESH_TOKEN, PASSWORD_RESET. Show relationships and key fields.",
|
|
163
|
+
description: "Generate ER diagram"
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
4. Agent returns diagram
|
|
167
|
+
5. Save to `.specweave/docs/internal/architecture/diagrams/auth/data-model.mmd`
|
|
168
|
+
6. Confirm completion
|
|
169
|
+
|
|
170
|
+
## Validation
|
|
171
|
+
|
|
172
|
+
After saving diagram, ALWAYS tell user to validate:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
✅ Diagram created: {path}
|
|
176
|
+
|
|
177
|
+
📋 VALIDATION REQUIRED:
|
|
178
|
+
1. Open the file in VS Code
|
|
179
|
+
2. Install Mermaid Preview extension if needed
|
|
180
|
+
3. Verify diagram renders correctly
|
|
181
|
+
4. Report any syntax errors
|
|
182
|
+
|
|
183
|
+
If diagram fails to render, I will regenerate with fixes.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## File Naming Conventions
|
|
187
|
+
|
|
188
|
+
**C4 Context**: `{system-name}-context.mmd` or `system-context.mmd`
|
|
189
|
+
**C4 Container**: `{system-name}-container.mmd` or `system-container.mmd`
|
|
190
|
+
**C4 Component**: `component-{service-name}.mmd`
|
|
191
|
+
**Sequence**: `{flow-name}-flow.mmd` or `{flow-name}.sequence.mmd`
|
|
192
|
+
**ER Diagram**: `data-model.mmd` or `{module}-data-model.mmd`
|
|
193
|
+
**Deployment**: `deployment-{environment}.mmd`
|
|
194
|
+
|
|
195
|
+
## Error Handling
|
|
196
|
+
|
|
197
|
+
**If diagram type is unclear**:
|
|
198
|
+
- Ask user for clarification
|
|
199
|
+
- Example: "Do you want a C4 context diagram (system level) or container diagram (service level)?"
|
|
200
|
+
|
|
201
|
+
**If context is insufficient**:
|
|
202
|
+
- Ask user for key entities/components
|
|
203
|
+
- Example: "What are the main external systems that integrate with your authentication?"
|
|
204
|
+
|
|
205
|
+
**If agent returns error**:
|
|
206
|
+
- Report error to user
|
|
207
|
+
- Suggest corrections
|
|
208
|
+
- Retry with adjusted prompt
|
|
209
|
+
|
|
210
|
+
## Test Cases
|
|
211
|
+
|
|
212
|
+
See `test-cases/` directory:
|
|
213
|
+
- `test-1.yaml` - Diagram type detection
|
|
214
|
+
- `test-2.yaml` - Agent coordination
|
|
215
|
+
- `test-3.yaml` - File placement and naming
|
|
216
|
+
|
|
217
|
+
## Integration
|
|
218
|
+
|
|
219
|
+
**Invoked by**: User request (auto-activation via description keywords)
|
|
220
|
+
**Invokes**: `diagrams-architect` agent (via Task tool)
|
|
221
|
+
**Output**: Mermaid diagram files in correct locations
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
**Remember**: You are a coordinator. Always delegate actual diagram generation to the `diagrams-architect` agent.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: "Create ASP.NET Core REST API"
|
|
2
|
+
description: "Test creating a REST API controller with Entity Framework"
|
|
3
|
+
user_input: "Create a REST API for managing products with CRUD operations"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Generates ASP.NET Core controller with appropriate attributes
|
|
6
|
+
- Includes Entity Framework DbContext integration
|
|
7
|
+
- Implements CRUD endpoints (GET, POST, PUT, DELETE)
|
|
8
|
+
- Includes async/await pattern
|
|
9
|
+
- Adds proper HTTP status codes
|
|
10
|
+
validation:
|
|
11
|
+
- Uses [ApiController] and [Route] attributes
|
|
12
|
+
- Controller inherits from ControllerBase
|
|
13
|
+
- Methods use async Task<ActionResult> pattern
|
|
14
|
+
- Includes dependency injection for DbContext
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement JWT Authentication"
|
|
2
|
+
description: "Test implementing JWT authentication in ASP.NET Core"
|
|
3
|
+
user_input: "Add JWT token-based authentication to my API"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Configures JWT authentication in Program.cs/Startup.cs
|
|
6
|
+
- Creates login endpoint that generates JWT tokens
|
|
7
|
+
- Includes claims-based authorization
|
|
8
|
+
- Protects endpoints with [Authorize] attribute
|
|
9
|
+
validation:
|
|
10
|
+
- Uses Microsoft.AspNetCore.Authentication.JwtBearer
|
|
11
|
+
- Configures token validation parameters
|
|
12
|
+
- Generates tokens with claims
|
|
13
|
+
- Implements token refresh logic
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create Minimal API"
|
|
2
|
+
description: "Test creating .NET 6+ minimal API endpoints"
|
|
3
|
+
user_input: "Create a minimal API for user management"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Uses app.MapGet/MapPost/MapPut/MapDelete
|
|
6
|
+
- Implements endpoints in Program.cs
|
|
7
|
+
- Includes route parameters and query strings
|
|
8
|
+
- Uses dependency injection
|
|
9
|
+
validation:
|
|
10
|
+
- No controller classes needed
|
|
11
|
+
- Uses lambda expressions for endpoints
|
|
12
|
+
- Implements proper HTTP verbs
|
|
13
|
+
- Includes validation and error handling
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create Design System Foundation"
|
|
2
|
+
description: "Test creating design tokens and base components in Figma"
|
|
3
|
+
user_input: "Create a design system with color palette, typography, and spacing"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Defines color tokens (primary, secondary, neutral, semantic)
|
|
6
|
+
- Sets up typography scale (headings, body, captions)
|
|
7
|
+
- Creates spacing tokens (4px, 8px, 16px, etc.)
|
|
8
|
+
- Organizes tokens in Figma variables
|
|
9
|
+
validation:
|
|
10
|
+
- Uses Figma variables for colors
|
|
11
|
+
- Defines text styles for typography
|
|
12
|
+
- Creates spacing components
|
|
13
|
+
- Follows naming conventions (color/primary/500)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Build Component Library"
|
|
2
|
+
description: "Test creating reusable UI components using atomic design"
|
|
3
|
+
user_input: "Create a button component library with all variants"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates button component with variants (primary, secondary, ghost)
|
|
6
|
+
- Implements states (default, hover, active, disabled)
|
|
7
|
+
- Uses auto-layout for responsive sizing
|
|
8
|
+
- Includes icon support
|
|
9
|
+
validation:
|
|
10
|
+
- Component uses variants
|
|
11
|
+
- States implemented as component properties
|
|
12
|
+
- Uses auto-layout
|
|
13
|
+
- Properly linked to design tokens
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Design Responsive Layout"
|
|
2
|
+
description: "Test creating responsive layouts with constraints"
|
|
3
|
+
user_input: "Design a responsive dashboard layout for desktop and mobile"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates frames for different breakpoints (mobile, tablet, desktop)
|
|
6
|
+
- Uses auto-layout for flexible content
|
|
7
|
+
- Implements proper constraints
|
|
8
|
+
- Shows responsive behavior
|
|
9
|
+
validation:
|
|
10
|
+
- Multiple frames for breakpoints
|
|
11
|
+
- Auto-layout on parent containers
|
|
12
|
+
- Constraints set appropriately
|
|
13
|
+
- Components adapt to different widths
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Convert Figma Design to React Component"
|
|
2
|
+
description: "Test converting a Figma component to production React code"
|
|
3
|
+
user_input: "Convert this Figma button component to React with TypeScript"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Extracts design tokens (colors, spacing, typography)
|
|
6
|
+
- Generates React component with proper props
|
|
7
|
+
- Implements all variants from Figma
|
|
8
|
+
- Includes Tailwind CSS or CSS modules
|
|
9
|
+
validation:
|
|
10
|
+
- Component matches Figma design pixel-perfect
|
|
11
|
+
- Props match Figma variants
|
|
12
|
+
- Uses design tokens correctly
|
|
13
|
+
- Includes TypeScript interfaces
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create Storybook Stories for Figma Components"
|
|
2
|
+
description: "Test generating Storybook stories from Figma components"
|
|
3
|
+
user_input: "Create Storybook stories for my button component from Figma"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Generates .stories.tsx file
|
|
6
|
+
- Creates stories for each variant
|
|
7
|
+
- Includes controls for interactive props
|
|
8
|
+
- Matches Figma design exactly
|
|
9
|
+
validation:
|
|
10
|
+
- Stories show all variants
|
|
11
|
+
- Controls allow testing different states
|
|
12
|
+
- Visual regression tests possible
|
|
13
|
+
- Documentation includes usage examples
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Extract and Implement Design Tokens"
|
|
2
|
+
description: "Test extracting design tokens from Figma and generating code"
|
|
3
|
+
user_input: "Extract all design tokens from this Figma file"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Extracts colors, typography, spacing, shadows, borders
|
|
6
|
+
- Generates token files (JSON, CSS variables, or TypeScript)
|
|
7
|
+
- Creates Tailwind config if needed
|
|
8
|
+
- Maintains consistency with Figma
|
|
9
|
+
validation:
|
|
10
|
+
- All token categories extracted
|
|
11
|
+
- Proper naming conventions
|
|
12
|
+
- Values match Figma exactly
|
|
13
|
+
- Tokens are importable and usable
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create React Component with Hooks"
|
|
2
|
+
description: "Test creating a React component using hooks"
|
|
3
|
+
user_input: "Create a user profile component with state management"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Generates functional component with TypeScript
|
|
6
|
+
- Uses useState for local state
|
|
7
|
+
- Uses useEffect for side effects
|
|
8
|
+
- Implements proper prop types
|
|
9
|
+
validation:
|
|
10
|
+
- Uses React.FC or function component syntax
|
|
11
|
+
- Includes TypeScript interfaces for props
|
|
12
|
+
- Implements useState hook
|
|
13
|
+
- Includes proper cleanup in useEffect
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement Form with Validation"
|
|
2
|
+
description: "Test creating a form with validation using React Hook Form"
|
|
3
|
+
user_input: "Create a registration form with validation"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Uses react-hook-form for form management
|
|
6
|
+
- Implements Zod schema validation
|
|
7
|
+
- Includes error message display
|
|
8
|
+
- Handles form submission
|
|
9
|
+
validation:
|
|
10
|
+
- Uses useForm hook
|
|
11
|
+
- Implements Zod schema with zodResolver
|
|
12
|
+
- Shows validation errors
|
|
13
|
+
- Includes submit handler
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement Global State Management"
|
|
2
|
+
description: "Test setting up Zustand for global state"
|
|
3
|
+
user_input: "Add global state management for user authentication"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates Zustand store
|
|
6
|
+
- Implements actions and selectors
|
|
7
|
+
- Uses TypeScript for type safety
|
|
8
|
+
- Includes persistence if needed
|
|
9
|
+
validation:
|
|
10
|
+
- Uses create from zustand
|
|
11
|
+
- Implements store interface
|
|
12
|
+
- Exports custom hooks
|
|
13
|
+
- Includes proper typing
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create Next.js App Router Page"
|
|
2
|
+
description: "Test creating a page using Next.js 14+ App Router"
|
|
3
|
+
user_input: "Create a products listing page using App Router"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates app/products/page.tsx
|
|
6
|
+
- Uses Server Components by default
|
|
7
|
+
- Implements async data fetching
|
|
8
|
+
- Includes proper metadata export
|
|
9
|
+
validation:
|
|
10
|
+
- File located in app directory
|
|
11
|
+
- Uses default export function
|
|
12
|
+
- Implements async component if needed
|
|
13
|
+
- Exports metadata object
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement Server Actions"
|
|
2
|
+
description: "Test creating server actions for form handling"
|
|
3
|
+
user_input: "Create a contact form using server actions"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates server action with 'use server' directive
|
|
6
|
+
- Implements form submission handler
|
|
7
|
+
- Uses FormData for input
|
|
8
|
+
- Includes validation with Zod
|
|
9
|
+
validation:
|
|
10
|
+
- Uses 'use server' at top of action file
|
|
11
|
+
- Accepts FormData parameter
|
|
12
|
+
- Returns appropriate response
|
|
13
|
+
- Implements revalidatePath or redirect
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create API Route Handler"
|
|
2
|
+
description: "Test creating API routes in App Router"
|
|
3
|
+
user_input: "Create an API endpoint for fetching user data"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates app/api/users/route.ts
|
|
6
|
+
- Implements GET, POST handlers
|
|
7
|
+
- Uses NextRequest and NextResponse
|
|
8
|
+
- Includes error handling
|
|
9
|
+
validation:
|
|
10
|
+
- File named route.ts in app/api directory
|
|
11
|
+
- Exports GET, POST functions
|
|
12
|
+
- Uses NextResponse.json() for responses
|
|
13
|
+
- Implements proper status codes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create Express.js REST API"
|
|
2
|
+
description: "Test creating Express REST API with TypeScript"
|
|
3
|
+
user_input: "Create an Express API for managing tasks with CRUD operations"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Generates Express router with TypeScript
|
|
6
|
+
- Implements CRUD endpoints
|
|
7
|
+
- Includes middleware (validation, error handling)
|
|
8
|
+
- Uses async/await with proper error handling
|
|
9
|
+
validation:
|
|
10
|
+
- Uses express.Router()
|
|
11
|
+
- Implements GET, POST, PUT, DELETE routes
|
|
12
|
+
- Includes request validation (Zod or class-validator)
|
|
13
|
+
- Has centralized error handling middleware
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement Prisma ORM Integration"
|
|
2
|
+
description: "Test setting up Prisma with PostgreSQL"
|
|
3
|
+
user_input: "Add Prisma ORM to my Node.js project for user management"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates Prisma schema with User model
|
|
6
|
+
- Generates Prisma Client
|
|
7
|
+
- Implements database queries using Prisma
|
|
8
|
+
- Includes migrations setup
|
|
9
|
+
validation:
|
|
10
|
+
- Has schema.prisma file
|
|
11
|
+
- Uses @prisma/client
|
|
12
|
+
- Implements proper typing
|
|
13
|
+
- Includes seed scripts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement JWT Authentication"
|
|
2
|
+
description: "Test adding JWT authentication to Express API"
|
|
3
|
+
user_input: "Add JWT authentication and authorization to my API"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates login/register endpoints
|
|
6
|
+
- Generates and validates JWT tokens
|
|
7
|
+
- Implements auth middleware
|
|
8
|
+
- Includes password hashing (bcrypt)
|
|
9
|
+
validation:
|
|
10
|
+
- Uses jsonwebtoken package
|
|
11
|
+
- Implements bcrypt for password hashing
|
|
12
|
+
- Creates authentication middleware
|
|
13
|
+
- Protects routes with middleware
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Create FastAPI CRUD API"
|
|
2
|
+
description: "Test creating FastAPI REST API with Pydantic models"
|
|
3
|
+
user_input: "Create a FastAPI application for managing products"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Generates FastAPI app with CRUD endpoints
|
|
6
|
+
- Uses Pydantic models for validation
|
|
7
|
+
- Implements async route handlers
|
|
8
|
+
- Includes automatic OpenAPI documentation
|
|
9
|
+
validation:
|
|
10
|
+
- Uses FastAPI() instance
|
|
11
|
+
- Implements @app.get, @app.post, @app.put, @app.delete decorators
|
|
12
|
+
- Uses Pydantic BaseModel for schemas
|
|
13
|
+
- Includes type hints and async def
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement SQLAlchemy ORM"
|
|
2
|
+
description: "Test integrating SQLAlchemy with FastAPI"
|
|
3
|
+
user_input: "Add SQLAlchemy database integration to my FastAPI project"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates SQLAlchemy models
|
|
6
|
+
- Sets up database session management
|
|
7
|
+
- Implements dependency injection for db session
|
|
8
|
+
- Includes Alembic migrations
|
|
9
|
+
validation:
|
|
10
|
+
- Uses SQLAlchemy declarative_base
|
|
11
|
+
- Implements database.py with engine and SessionLocal
|
|
12
|
+
- Uses Depends() for dependency injection
|
|
13
|
+
- Includes migration scripts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Implement OAuth2 JWT Authentication"
|
|
2
|
+
description: "Test adding OAuth2 JWT authentication to FastAPI"
|
|
3
|
+
user_input: "Add OAuth2 password bearer authentication to my API"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates OAuth2PasswordBearer dependency
|
|
6
|
+
- Implements JWT token generation and validation
|
|
7
|
+
- Uses passlib for password hashing
|
|
8
|
+
- Protects routes with Depends(get_current_user)
|
|
9
|
+
validation:
|
|
10
|
+
- Uses fastapi.security.OAuth2PasswordBearer
|
|
11
|
+
- Implements python-jose for JWT
|
|
12
|
+
- Uses passlib[bcrypt] for password hashing
|
|
13
|
+
- Includes login endpoint with OAuth2PasswordRequestForm
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Export SpecWeave Increment to Azure DevOps"
|
|
2
|
+
description: "Test exporting a SpecWeave increment to ADO Epic/Features/Stories"
|
|
3
|
+
user_input: "Export increment 0001-user-auth to Azure DevOps"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates Epic from increment spec
|
|
6
|
+
- Creates Features from main sections
|
|
7
|
+
- Creates User Stories from tasks
|
|
8
|
+
- Maps test cases to Test Cases in ADO
|
|
9
|
+
validation:
|
|
10
|
+
- Epic title matches increment name
|
|
11
|
+
- Features map to spec sections
|
|
12
|
+
- User Stories have acceptance criteria
|
|
13
|
+
- Work item IDs stored in SpecWeave
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Import Azure DevOps Epic to SpecWeave"
|
|
2
|
+
description: "Test importing ADO Epic as a SpecWeave increment"
|
|
3
|
+
user_input: "Import ADO Epic #12345 into SpecWeave"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates increment folder with ADO Epic name
|
|
6
|
+
- Generates spec.md from Epic description
|
|
7
|
+
- Converts Features to sections in spec
|
|
8
|
+
- Creates tasks.md from User Stories
|
|
9
|
+
validation:
|
|
10
|
+
- Increment follows SpecWeave structure
|
|
11
|
+
- spec.md has proper sections
|
|
12
|
+
- tasks.md includes all stories
|
|
13
|
+
- ADO references preserved
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Bidirectional Sync with Conflict Resolution"
|
|
2
|
+
description: "Test syncing changes between SpecWeave and ADO"
|
|
3
|
+
user_input: "Sync increment 0002-payment with ADO, handle conflicts"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Detects changes in both systems
|
|
6
|
+
- Shows conflicts for manual resolution
|
|
7
|
+
- Syncs approved changes bidirectionally
|
|
8
|
+
- Maintains traceability
|
|
9
|
+
validation:
|
|
10
|
+
- Conflict detection works
|
|
11
|
+
- User can choose resolution strategy
|
|
12
|
+
- Sync maintains data integrity
|
|
13
|
+
- Audit log of sync operations
|