specweave 0.1.0 → 0.1.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/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
|
@@ -24,11 +24,157 @@ Act as the "factory of agents" that:
|
|
|
24
24
|
if (fileExists('.specweave/config.yaml')) {
|
|
25
25
|
activateSpecWeaveMode();
|
|
26
26
|
loadConfiguration();
|
|
27
|
+
|
|
28
|
+
// AUTO-INSTALL MISSING COMPONENTS (NEW!)
|
|
29
|
+
await autoInstallComponents(userPrompt);
|
|
30
|
+
|
|
27
31
|
parseUserIntent();
|
|
28
32
|
routeToSkills();
|
|
29
33
|
}
|
|
30
34
|
```
|
|
31
35
|
|
|
36
|
+
## Just-In-Time Component Installation (CRITICAL!)
|
|
37
|
+
|
|
38
|
+
**SpecWeave uses intelligent auto-installation** - components are installed on-demand based on user intent.
|
|
39
|
+
|
|
40
|
+
### How It Works
|
|
41
|
+
|
|
42
|
+
1. **User makes a request** (e.g., "Create Next.js authentication")
|
|
43
|
+
2. **Analyze user intent** - Extract keywords (Next.js, authentication)
|
|
44
|
+
3. **Map to required components**:
|
|
45
|
+
- "Next.js" → nextjs skill, nodejs-backend skill
|
|
46
|
+
- "authentication" → security agent
|
|
47
|
+
- "Create" → pm agent, architect agent
|
|
48
|
+
4. **Check if components installed** in `.claude/skills/` and `.claude/agents/`
|
|
49
|
+
5. **Auto-install missing components** from npm package (`node_modules/specweave/src/`)
|
|
50
|
+
6. **Proceed with routing** - now all needed components are available
|
|
51
|
+
|
|
52
|
+
### Keyword → Component Mapping
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// From src/utils/auto-install.ts
|
|
56
|
+
const COMPONENT_MAPPING = {
|
|
57
|
+
// Framework detection
|
|
58
|
+
'next.js': { skills: ['nextjs', 'nodejs-backend'], agents: [] },
|
|
59
|
+
'react': { skills: ['frontend'], agents: [] },
|
|
60
|
+
'fastapi': { skills: ['python-backend'], agents: [] },
|
|
61
|
+
'django': { skills: ['python-backend'], agents: [] },
|
|
62
|
+
'.net': { skills: ['dotnet-backend'], agents: [] },
|
|
63
|
+
|
|
64
|
+
// Feature detection
|
|
65
|
+
'authentication': { skills: ['nodejs-backend'], agents: ['security'] },
|
|
66
|
+
'auth': { skills: [], agents: ['security'] },
|
|
67
|
+
'oauth': { skills: [], agents: ['security'] },
|
|
68
|
+
'payment': { skills: ['stripe-integrator'], agents: ['security'] },
|
|
69
|
+
'stripe': { skills: ['stripe-integrator'], agents: ['security'] },
|
|
70
|
+
|
|
71
|
+
// Infrastructure detection
|
|
72
|
+
'deploy': { skills: [], agents: ['devops'] },
|
|
73
|
+
'hetzner': { skills: ['hetzner-provisioner'], agents: ['devops'] },
|
|
74
|
+
'aws': { skills: [], agents: ['devops'] },
|
|
75
|
+
|
|
76
|
+
// Testing detection
|
|
77
|
+
'test': { skills: [], agents: ['qa-lead'] },
|
|
78
|
+
'e2e': { skills: ['e2e-playwright'], agents: ['qa-lead'] },
|
|
79
|
+
'playwright': { skills: ['e2e-playwright'], agents: ['qa-lead'] },
|
|
80
|
+
|
|
81
|
+
// Design detection
|
|
82
|
+
'figma': { skills: ['figma-implementer', 'figma-designer'], agents: [] },
|
|
83
|
+
'design system': { skills: ['design-system-architect'], agents: [] },
|
|
84
|
+
|
|
85
|
+
// Integration detection
|
|
86
|
+
'jira': { skills: ['jira-sync'], agents: [] },
|
|
87
|
+
'github': { skills: ['github-sync'], agents: [] },
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// Always include strategic agents for new features
|
|
91
|
+
if (prompt.includes('create') || prompt.includes('build')) {
|
|
92
|
+
agents.push('pm', 'architect');
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Example User Experience
|
|
97
|
+
|
|
98
|
+
**Example 1: Next.js Authentication**
|
|
99
|
+
```
|
|
100
|
+
User: "Create Next.js authentication with OAuth"
|
|
101
|
+
|
|
102
|
+
🔷 SpecWeave Active
|
|
103
|
+
|
|
104
|
+
📦 Installing required components...
|
|
105
|
+
✅ Installed nextjs skill
|
|
106
|
+
✅ Installed nodejs-backend skill
|
|
107
|
+
✅ Installed security agent
|
|
108
|
+
✅ Installed pm agent
|
|
109
|
+
✅ Installed architect agent
|
|
110
|
+
|
|
111
|
+
🚀 Creating increment 0001-nextjs-authentication...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Example 2: Already Installed**
|
|
115
|
+
```
|
|
116
|
+
User: "Add another Next.js feature"
|
|
117
|
+
|
|
118
|
+
🔷 SpecWeave Active
|
|
119
|
+
(Components already installed, proceeding...)
|
|
120
|
+
|
|
121
|
+
🚀 Creating increment 0002-next-feature...
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Example 3: Python FastAPI**
|
|
125
|
+
```
|
|
126
|
+
User: "Create FastAPI backend with PostgreSQL"
|
|
127
|
+
|
|
128
|
+
🔷 SpecWeave Active
|
|
129
|
+
|
|
130
|
+
📦 Installing required components...
|
|
131
|
+
✅ Installed python-backend skill
|
|
132
|
+
✅ Installed pm agent
|
|
133
|
+
✅ Installed architect agent
|
|
134
|
+
|
|
135
|
+
🚀 Creating increment 0001-fastapi-backend...
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Configuration
|
|
139
|
+
|
|
140
|
+
Auto-install can be disabled in `.specweave/config.yaml`:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
# .specweave/config.yaml
|
|
144
|
+
auto_install: true # Default: enabled
|
|
145
|
+
|
|
146
|
+
# Tracked installed components (auto-updated)
|
|
147
|
+
installed_components:
|
|
148
|
+
skills:
|
|
149
|
+
- nextjs
|
|
150
|
+
- nodejs-backend
|
|
151
|
+
- security
|
|
152
|
+
agents:
|
|
153
|
+
- pm
|
|
154
|
+
- architect
|
|
155
|
+
- security
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Set `auto_install: false` to require manual installation (advanced users only).
|
|
159
|
+
|
|
160
|
+
### Installation Process
|
|
161
|
+
|
|
162
|
+
When auto-installing:
|
|
163
|
+
|
|
164
|
+
1. **Find npm package**: Locate `node_modules/specweave/`
|
|
165
|
+
2. **Copy component**: `src/skills/nextjs/` → `.claude/skills/nextjs/`
|
|
166
|
+
3. **Verify**: Check component has SKILL.md or AGENT.md
|
|
167
|
+
4. **Update config**: Add to `installed_components` list
|
|
168
|
+
5. **Continue routing**: Component now available for use
|
|
169
|
+
|
|
170
|
+
### Benefits
|
|
171
|
+
|
|
172
|
+
- ✅ **Zero manual installation** - users never run `specweave install`
|
|
173
|
+
- ✅ **Just-in-time** - only install what's actually needed
|
|
174
|
+
- ✅ **Automatic** - completely transparent to users
|
|
175
|
+
- ✅ **Intelligent** - understands intent from natural language
|
|
176
|
+
- ✅ **Efficient** - unused components never installed
|
|
177
|
+
|
|
32
178
|
## Auto-Activation
|
|
33
179
|
|
|
34
180
|
**Key Feature**: This skill uses Claude Code's `proactive: true` feature to load automatically.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Export SpecWeave Increment to JIRA"
|
|
2
|
+
description: "Test exporting a SpecWeave increment to JIRA Epic/Stories/Subtasks"
|
|
3
|
+
user_input: "Export increment 0003-dashboard to JIRA"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates JIRA Epic from increment spec
|
|
6
|
+
- Creates Stories from main sections
|
|
7
|
+
- Creates Subtasks from tasks
|
|
8
|
+
- Maps test cases to JIRA Test issues
|
|
9
|
+
validation:
|
|
10
|
+
- Epic summary matches increment name
|
|
11
|
+
- Stories have proper descriptions
|
|
12
|
+
- Subtasks linked to Stories
|
|
13
|
+
- JIRA keys stored in SpecWeave
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Import JIRA Epic to SpecWeave"
|
|
2
|
+
description: "Test importing JIRA Epic as a SpecWeave increment"
|
|
3
|
+
user_input: "Import JIRA Epic PROJ-123 into SpecWeave"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Creates increment folder from Epic key
|
|
6
|
+
- Generates spec.md from Epic description
|
|
7
|
+
- Converts Stories to spec sections
|
|
8
|
+
- Creates tasks.md from Subtasks
|
|
9
|
+
validation:
|
|
10
|
+
- Increment follows naming convention
|
|
11
|
+
- spec.md includes Epic details
|
|
12
|
+
- tasks.md has all subtasks
|
|
13
|
+
- JIRA links preserved
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: "Sync Status Updates Between Systems"
|
|
2
|
+
description: "Test syncing task status between SpecWeave and JIRA"
|
|
3
|
+
user_input: "Sync status updates for increment 0004-notifications"
|
|
4
|
+
expected_behavior:
|
|
5
|
+
- Detects status changes in SpecWeave (tasks.md)
|
|
6
|
+
- Updates JIRA issue status accordingly
|
|
7
|
+
- Syncs JIRA status back to SpecWeave
|
|
8
|
+
- Handles workflow state mapping
|
|
9
|
+
validation:
|
|
10
|
+
- Status mapping works correctly
|
|
11
|
+
- Bidirectional sync maintains consistency
|
|
12
|
+
- Workflow transitions respected
|
|
13
|
+
- Sync logs available
|
|
@@ -330,4 +330,22 @@ skills:
|
|
|
330
330
|
- jira-sync # If integrations.jira.enabled
|
|
331
331
|
- ado-sync # If integrations.ado.enabled
|
|
332
332
|
|
|
333
|
+
# Component auto-installation (CRITICAL!)
|
|
334
|
+
# SpecWeave intelligently installs components based on user intent
|
|
335
|
+
auto_install: true # Enable just-in-time installation (recommended)
|
|
336
|
+
|
|
337
|
+
# NPM package location for auto-installation
|
|
338
|
+
npm_package_path: "node_modules/specweave" # Auto-detected
|
|
339
|
+
|
|
340
|
+
# Installed components (auto-updated as components are installed)
|
|
341
|
+
installed_components:
|
|
342
|
+
skills: [] # Auto-populated: [nextjs, nodejs-backend, security, ...]
|
|
343
|
+
agents: [] # Auto-populated: [pm, architect, devops, ...]
|
|
344
|
+
|
|
345
|
+
# Installation mode
|
|
346
|
+
install_mode: "on-demand" # on-demand (default), all-upfront, or manual
|
|
347
|
+
# on-demand: Install components as needed based on user requests
|
|
348
|
+
# all-upfront: Install all components at init (not recommended)
|
|
349
|
+
# manual: Disable auto-install (advanced users only)
|
|
350
|
+
|
|
333
351
|
---
|