specweave 0.22.0 → 0.22.3
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.md +373 -13
- package/README.md +5 -5
- package/bin/specweave.js +5 -8
- package/dist/plugins/specweave-github/lib/CodeValidator.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/CodeValidator.js +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +26 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +7 -0
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-profiles.d.ts +1 -0
- package/dist/src/cli/commands/migrate-to-profiles.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate-to-profiles.js +12 -1
- package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
- package/dist/src/cli/commands/next-command.d.ts +52 -0
- package/dist/src/cli/commands/next-command.d.ts.map +1 -0
- package/dist/src/cli/commands/next-command.js +204 -0
- package/dist/src/cli/commands/next-command.js.map +1 -0
- package/dist/src/cli/commands/repair-status-desync.d.ts +69 -0
- package/dist/src/cli/commands/repair-status-desync.d.ts.map +1 -0
- package/dist/src/cli/commands/repair-status-desync.js +221 -0
- package/dist/src/cli/commands/repair-status-desync.js.map +1 -0
- package/dist/src/cli/commands/sync-specs.d.ts +16 -0
- package/dist/src/cli/commands/sync-specs.d.ts.map +1 -0
- package/dist/src/cli/commands/sync-specs.js +130 -0
- package/dist/src/cli/commands/sync-specs.js.map +1 -0
- package/dist/src/cli/commands/validate-status-sync.d.ts +52 -0
- package/dist/src/cli/commands/validate-status-sync.d.ts.map +1 -0
- package/dist/src/cli/commands/validate-status-sync.js +176 -0
- package/dist/src/cli/commands/validate-status-sync.js.map +1 -0
- package/dist/src/cli/count-tasks.d.ts +20 -0
- package/dist/src/cli/count-tasks.d.ts.map +1 -0
- package/dist/src/cli/count-tasks.js +50 -0
- package/dist/src/cli/count-tasks.js.map +1 -0
- package/dist/src/cli/update-status-line.d.ts +16 -0
- package/dist/src/cli/update-status-line.d.ts.map +1 -0
- package/dist/src/cli/update-status-line.js +44 -0
- package/dist/src/cli/update-status-line.js.map +1 -0
- package/dist/src/config/ConfigManager.d.ts.map +1 -1
- package/dist/src/config/ConfigManager.js +2 -1
- package/dist/src/config/ConfigManager.js.map +1 -1
- package/dist/src/config/types.d.ts +50 -50
- package/dist/src/core/cicd/state-manager.d.ts +8 -0
- package/dist/src/core/cicd/state-manager.d.ts.map +1 -1
- package/dist/src/core/cicd/state-manager.js +60 -15
- package/dist/src/core/cicd/state-manager.js.map +1 -1
- package/dist/src/core/cost-tracker.d.ts.map +1 -1
- package/dist/src/core/cost-tracker.js +2 -1
- package/dist/src/core/cost-tracker.js.map +1 -1
- package/dist/src/core/iac/template-engine.d.ts.map +1 -1
- package/dist/src/core/iac/template-engine.js +28 -0
- package/dist/src/core/iac/template-engine.js.map +1 -1
- package/dist/src/core/iac/template-generator.d.ts +53 -0
- package/dist/src/core/iac/template-generator.d.ts.map +1 -0
- package/dist/src/core/iac/template-generator.js +125 -0
- package/dist/src/core/iac/template-generator.js.map +1 -0
- package/dist/src/core/increment/completion-validator.d.ts +56 -0
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -0
- package/dist/src/core/increment/completion-validator.js +102 -0
- package/dist/src/core/increment/completion-validator.js.map +1 -0
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +10 -0
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/spec-frontmatter-updater.d.ts +78 -0
- package/dist/src/core/increment/spec-frontmatter-updater.d.ts.map +1 -0
- package/dist/src/core/increment/spec-frontmatter-updater.js +152 -0
- package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -0
- package/dist/src/core/increment/status-auto-transition.js +3 -3
- package/dist/src/core/increment/status-auto-transition.js.map +1 -1
- package/dist/src/core/living-docs/CodeValidator.js +1 -1
- package/dist/src/core/living-docs/CodeValidator.js.map +1 -1
- package/dist/src/core/living-docs/content-distributor.d.ts.map +1 -1
- package/dist/src/core/living-docs/content-distributor.js +11 -1
- package/dist/src/core/living-docs/content-distributor.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +166 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -0
- package/dist/src/core/living-docs/living-docs-sync.js +727 -0
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -0
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts +7 -3
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.js +40 -24
- package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
- package/dist/src/core/plugin-loader.d.ts +7 -0
- package/dist/src/core/plugin-loader.d.ts.map +1 -1
- package/dist/src/core/plugin-loader.js +18 -1
- package/dist/src/core/plugin-loader.js.map +1 -1
- package/dist/src/core/serverless/platform-data-loader.d.ts +8 -0
- package/dist/src/core/serverless/platform-data-loader.d.ts.map +1 -1
- package/dist/src/core/serverless/platform-data-loader.js +14 -0
- package/dist/src/core/serverless/platform-data-loader.js.map +1 -1
- package/dist/src/core/serverless/types.d.ts +1 -1
- package/dist/src/core/serverless/types.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-manager.d.ts +7 -2
- package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-manager.js +47 -18
- package/dist/src/core/status-line/status-line-manager.js.map +1 -1
- package/dist/src/core/status-line/status-line-updater.d.ts +67 -0
- package/dist/src/core/status-line/status-line-updater.d.ts.map +1 -0
- package/dist/src/core/status-line/status-line-updater.js +203 -0
- package/dist/src/core/status-line/status-line-updater.js.map +1 -0
- package/dist/src/core/status-line/task-counter.d.ts +69 -0
- package/dist/src/core/status-line/task-counter.d.ts.map +1 -0
- package/dist/src/core/status-line/task-counter.js +107 -0
- package/dist/src/core/status-line/task-counter.js.map +1 -0
- package/dist/src/core/status-line/types.d.ts +19 -5
- package/dist/src/core/status-line/types.d.ts.map +1 -1
- package/dist/src/core/status-line/types.js +3 -3
- package/dist/src/core/status-line/types.js.map +1 -1
- package/dist/src/core/workflow/autonomous-executor.d.ts +111 -0
- package/dist/src/core/workflow/autonomous-executor.d.ts.map +1 -0
- package/dist/src/core/workflow/autonomous-executor.js +275 -0
- package/dist/src/core/workflow/autonomous-executor.js.map +1 -0
- package/dist/src/core/workflow/backlog-scanner.d.ts +94 -0
- package/dist/src/core/workflow/backlog-scanner.d.ts.map +1 -0
- package/dist/src/core/workflow/backlog-scanner.js +170 -0
- package/dist/src/core/workflow/backlog-scanner.js.map +1 -0
- package/dist/src/core/workflow/command-invoker.d.ts +86 -0
- package/dist/src/core/workflow/command-invoker.d.ts.map +1 -0
- package/dist/src/core/workflow/command-invoker.js +131 -0
- package/dist/src/core/workflow/command-invoker.js.map +1 -0
- package/dist/src/core/workflow/cost-estimator.d.ts +120 -0
- package/dist/src/core/workflow/cost-estimator.d.ts.map +1 -0
- package/dist/src/core/workflow/cost-estimator.js +222 -0
- package/dist/src/core/workflow/cost-estimator.js.map +1 -0
- package/dist/src/core/workflow/index.d.ts +20 -0
- package/dist/src/core/workflow/index.d.ts.map +1 -0
- package/dist/src/core/workflow/index.js +24 -0
- package/dist/src/core/workflow/index.js.map +1 -0
- package/dist/src/core/workflow/state-manager.d.ts +107 -0
- package/dist/src/core/workflow/state-manager.d.ts.map +1 -0
- package/dist/src/core/workflow/state-manager.js +126 -0
- package/dist/src/core/workflow/state-manager.js.map +1 -0
- package/dist/src/core/workflow/workflow-orchestrator.d.ts +93 -0
- package/dist/src/core/workflow/workflow-orchestrator.d.ts.map +1 -0
- package/dist/src/core/workflow/workflow-orchestrator.js +195 -0
- package/dist/src/core/workflow/workflow-orchestrator.js.map +1 -0
- package/dist/src/init/architecture/types.d.ts +10 -10
- package/dist/src/metrics/dora-calculator.js +2 -2
- package/dist/src/metrics/dora-calculator.js.map +1 -1
- package/dist/src/utils/pricing-constants.d.ts +5 -2
- package/dist/src/utils/pricing-constants.d.ts.map +1 -1
- package/dist/src/utils/pricing-constants.js +3 -2
- package/dist/src/utils/pricing-constants.js.map +1 -1
- package/package.json +4 -4
- package/plugins/specweave/agents/infrastructure/AGENT.md +88 -46
- package/plugins/specweave/agents/pm/AGENT.md +58 -1
- package/plugins/specweave/commands/specweave-archive-features.md +1 -1
- package/plugins/specweave/commands/specweave-archive-increments.md +1 -1
- package/plugins/specweave/commands/specweave-check-hooks.md +5 -0
- package/plugins/specweave/commands/specweave-done.md +72 -4
- package/plugins/specweave/commands/specweave-plan.md +1 -1
- package/plugins/specweave/commands/specweave-progress.md +108 -379
- package/plugins/specweave/commands/specweave-reopen.md +30 -3
- package/plugins/specweave/commands/specweave-restore-feature.md +1 -1
- package/plugins/specweave/commands/specweave-sync-docs.md +71 -4
- package/plugins/specweave/commands/specweave-sync-specs.md +20 -48
- package/plugins/specweave/commands/specweave-update-status.md +151 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +78 -41
- package/plugins/specweave/hooks/lib/validate-spec-status.sh +163 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +38 -35
- package/plugins/specweave/hooks/validate-increment-completion.sh +113 -0
- package/plugins/specweave/lib/hooks/update-tasks-md.js +52 -9
- package/plugins/specweave/lib/hooks/update-tasks-md.ts +77 -16
- package/plugins/specweave/templates/iac/aws-lambda/defaults.json +24 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/README.md.hbs +260 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/dev.tfvars.hbs +34 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/prod.tfvars.hbs +37 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/staging.tfvars.hbs +35 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/outputs.tf.hbs +77 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/providers.tf.hbs +36 -0
- package/plugins/specweave/templates/iac/aws-lambda/templates/variables.tf.hbs +115 -0
- package/plugins/specweave/templates/iac/azure-functions/defaults.json +25 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/README.md.hbs +268 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/dev.tfvars.hbs +34 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/prod.tfvars.hbs +46 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/staging.tfvars.hbs +34 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/main.tf.hbs +225 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/outputs.tf.hbs +89 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/provider.tf.hbs +27 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/providers.tf.hbs +35 -0
- package/plugins/specweave/templates/iac/azure-functions/templates/variables.tf.hbs +124 -0
- package/plugins/specweave/templates/iac/firebase/defaults.json +29 -0
- package/plugins/specweave/templates/iac/firebase/templates/README.md.hbs +35 -0
- package/plugins/specweave/templates/iac/firebase/templates/environments/dev.tfvars.hbs +7 -0
- package/plugins/specweave/templates/iac/firebase/templates/environments/prod.tfvars.hbs +7 -0
- package/plugins/specweave/templates/iac/firebase/templates/environments/staging.tfvars.hbs +7 -0
- package/plugins/specweave/templates/iac/firebase/templates/main.tf.hbs +90 -0
- package/plugins/specweave/templates/iac/firebase/templates/outputs.tf.hbs +15 -0
- package/plugins/specweave/templates/iac/firebase/templates/providers.tf.hbs +23 -0
- package/plugins/specweave/templates/iac/firebase/templates/variables.tf.hbs +42 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/defaults.json +26 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/README.md.hbs +299 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/dev.tfvars.hbs +36 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/prod.tfvars.hbs +48 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/staging.tfvars.hbs +41 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/main.tf.hbs +192 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/outputs.tf.hbs +66 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/providers.tf.hbs +25 -0
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/variables.tf.hbs +119 -0
- package/plugins/specweave/templates/iac/supabase/defaults.json +15 -0
- package/plugins/specweave/templates/iac/supabase/templates/README.md.hbs +46 -0
- package/plugins/specweave/templates/iac/supabase/templates/main.tf.hbs +50 -0
- package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
- package/plugins/specweave-github/agents/github-manager/AGENT.md +39 -7
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +21 -0
- package/plugins/specweave-github/commands/specweave-github-create-issue.md +5 -5
- package/plugins/specweave-github/lib/CodeValidator.ts +1 -1
- package/plugins/specweave-github/lib/github-client-v2.js +29 -0
- package/plugins/specweave-github/lib/github-client-v2.ts +30 -0
- package/plugins/specweave-github/lib/task-sync.js +4 -0
- package/plugins/specweave-github/lib/task-sync.ts +7 -0
- package/src/templates/CLAUDE.md.template +31 -0
- package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts +0 -116
- package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts.map +0 -1
- package/dist/src/core/living-docs/ThreeLayerSyncManager.js +0 -356
- package/dist/src/core/living-docs/ThreeLayerSyncManager.js.map +0 -1
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -1200
|
@@ -60,24 +60,38 @@ I generate Terraform configurations for 5 serverless platforms:
|
|
|
60
60
|
|
|
61
61
|
### 2. Template Engine Integration
|
|
62
62
|
|
|
63
|
-
I use the **TerraformTemplateEngine** to render Handlebars templates:
|
|
64
|
-
|
|
65
|
-
**Template Location**: `plugins/specweave/
|
|
66
|
-
|
|
67
|
-
**
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
72
|
-
- `
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
79
|
-
- `
|
|
63
|
+
I use the **TerraformTemplateEngine** to render Handlebars templates with full serverless platform support:
|
|
64
|
+
|
|
65
|
+
**Template Location**: `plugins/specweave/templates/iac/{platform}/`
|
|
66
|
+
|
|
67
|
+
**Supported Platforms**:
|
|
68
|
+
- `aws-lambda/` - AWS Lambda + API Gateway + DynamoDB
|
|
69
|
+
- `azure-functions/` - Azure Functions + Cosmos DB
|
|
70
|
+
- `gcp-cloud-functions/` - GCP Cloud Functions + Firestore
|
|
71
|
+
- `firebase/` - Firebase Hosting + Functions + Firestore
|
|
72
|
+
- `supabase/` - Supabase (PostgreSQL + Auth + Storage)
|
|
73
|
+
|
|
74
|
+
**Template Files** (each platform has):
|
|
75
|
+
- `templates/main.tf.hbs` - Core infrastructure resources
|
|
76
|
+
- `templates/variables.tf.hbs` - Input variables with defaults
|
|
77
|
+
- `templates/outputs.tf.hbs` - Output values (URLs, ARNs, IDs)
|
|
78
|
+
- `templates/providers.tf.hbs` - Cloud provider configuration
|
|
79
|
+
- `templates/iam.tf.hbs` - IAM roles, policies, service accounts (AWS/GCP)
|
|
80
|
+
- `templates/README.md.hbs` - Deployment instructions and cost estimates
|
|
81
|
+
- `templates/environments/dev.tfvars.hbs` - Development config (free tier optimized)
|
|
82
|
+
- `templates/environments/staging.tfvars.hbs` - Staging config
|
|
83
|
+
- `templates/environments/prod.tfvars.hbs` - Production config (HA, backup)
|
|
84
|
+
- `defaults.json` - Default values for template variables
|
|
85
|
+
|
|
86
|
+
**Custom Handlebars Helpers**:
|
|
87
|
+
- `{{snakeCase name}}` - Convert to snake_case (e.g., "myFunction" → "my_function")
|
|
88
|
+
- `{{kebabCase name}}` - Convert to kebab-case (e.g., "myFunction" → "my-function")
|
|
89
|
+
- `{{tfList items}}` - Format array as Terraform list (e.g., ["a","b"] → `["a", "b"]`)
|
|
90
|
+
- `{{tfMap obj}}` - Format object as Terraform map
|
|
80
91
|
- `{{#if (eq var "value")}}...{{/if}}` - Conditional rendering
|
|
92
|
+
- `{{#each items}}...{{/each}}` - Loop over arrays
|
|
93
|
+
- `{{multiply a b}}` - Arithmetic operations
|
|
94
|
+
- `{{add a b}}` - Addition for cost calculations
|
|
81
95
|
|
|
82
96
|
### 3. Environment-Specific Configurations
|
|
83
97
|
|
|
@@ -156,37 +170,65 @@ Architect Agent: → Recommends: AWS Lambda for startup project
|
|
|
156
170
|
|
|
157
171
|
Infrastructure Agent (me):
|
|
158
172
|
1. Load Templates:
|
|
159
|
-
- Locate: plugins/specweave/
|
|
160
|
-
- Read
|
|
173
|
+
- Locate: plugins/specweave/templates/iac/aws-lambda/
|
|
174
|
+
- Read all template files:
|
|
175
|
+
* templates/main.tf.hbs
|
|
176
|
+
* templates/variables.tf.hbs
|
|
177
|
+
* templates/outputs.tf.hbs
|
|
178
|
+
* templates/providers.tf.hbs
|
|
179
|
+
* templates/iam.tf.hbs
|
|
180
|
+
* templates/README.md.hbs
|
|
181
|
+
* templates/environments/*.tfvars.hbs
|
|
161
182
|
|
|
162
183
|
2. Merge Defaults:
|
|
163
|
-
- Load: aws-lambda/
|
|
164
|
-
- Merge: defaults +
|
|
165
|
-
- Result: Complete variable set
|
|
184
|
+
- Load: defaults.json from aws-lambda/
|
|
185
|
+
- Merge: defaults + architect recommendation metadata
|
|
186
|
+
- Result: Complete variable set with all required values
|
|
166
187
|
|
|
167
188
|
3. Render Templates:
|
|
168
|
-
- Use:
|
|
169
|
-
- Render: Each .hbs file →
|
|
170
|
-
- Apply: Custom helpers (snakeCase, conditionals)
|
|
189
|
+
- Use: Handlebars template engine
|
|
190
|
+
- Render: Each .hbs file → corresponding output file
|
|
191
|
+
- Apply: Custom helpers (snakeCase, tfList, conditionals, loops)
|
|
192
|
+
- Substitute: All {{variableName}} placeholders with actual values
|
|
171
193
|
|
|
172
194
|
4. Generate Environment Configs:
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
195
|
+
- Dev environment:
|
|
196
|
+
* Render: templates/environments/dev.tfvars.hbs → dev.tfvars
|
|
197
|
+
* Optimize: Free tier settings (min resources, pay-per-request)
|
|
198
|
+
- Staging environment:
|
|
199
|
+
* Render: templates/environments/staging.tfvars.hbs → staging.tfvars
|
|
200
|
+
* Balance: Performance vs cost
|
|
201
|
+
- Production environment:
|
|
202
|
+
* Render: templates/environments/prod.tfvars.hbs → prod.tfvars
|
|
203
|
+
* Maximize: Availability, backup, multi-region
|
|
179
204
|
|
|
180
205
|
5. Write Files:
|
|
181
|
-
- Create: .infrastructure/aws-lambda/ directory
|
|
182
|
-
- Write
|
|
183
|
-
|
|
184
|
-
|
|
206
|
+
- Create: .infrastructure/aws-lambda/ directory in project root
|
|
207
|
+
- Write Terraform files:
|
|
208
|
+
* main.tf (infrastructure resources)
|
|
209
|
+
* variables.tf (input variables)
|
|
210
|
+
* outputs.tf (output values)
|
|
211
|
+
* providers.tf (AWS provider config)
|
|
212
|
+
* iam.tf (IAM roles and policies)
|
|
213
|
+
- Write documentation:
|
|
214
|
+
* README.md (deployment instructions, cost estimates, troubleshooting)
|
|
215
|
+
- Write environment configs:
|
|
216
|
+
* environments/dev.tfvars
|
|
217
|
+
* environments/staging.tfvars
|
|
218
|
+
* environments/prod.tfvars
|
|
185
219
|
|
|
186
220
|
6. Output Summary:
|
|
187
221
|
✅ Generated 9 files in .infrastructure/aws-lambda/
|
|
188
|
-
📄 Review files
|
|
189
|
-
|
|
222
|
+
📄 Review generated files:
|
|
223
|
+
- main.tf: Lambda, API Gateway, DynamoDB resources
|
|
224
|
+
- iam.tf: Least-privilege IAM roles
|
|
225
|
+
- README.md: Deployment guide with cost estimates
|
|
226
|
+
💰 Estimated cost (dev): $0/month (free tier)
|
|
227
|
+
🚀 Next steps:
|
|
228
|
+
1. Review infrastructure files
|
|
229
|
+
2. Run: terraform init
|
|
230
|
+
3. Run: terraform plan -var-file="environments/dev.tfvars"
|
|
231
|
+
4. Run: terraform apply -var-file="environments/dev.tfvars"
|
|
190
232
|
```
|
|
191
233
|
|
|
192
234
|
### Workflow 2: Multi-Environment Deployment
|
|
@@ -239,12 +281,12 @@ Infrastructure Agent:
|
|
|
239
281
|
**My Process**:
|
|
240
282
|
```
|
|
241
283
|
1. Load Templates:
|
|
242
|
-
✅ plugins/specweave/
|
|
243
|
-
✅ plugins/specweave/
|
|
244
|
-
✅ plugins/specweave/
|
|
245
|
-
✅ plugins/specweave/
|
|
246
|
-
✅ plugins/specweave/
|
|
247
|
-
✅ plugins/specweave/
|
|
284
|
+
✅ plugins/specweave/templates/iac/aws-lambda/main.tf.hbs
|
|
285
|
+
✅ plugins/specweave/templates/iac/aws-lambda/variables.tf.hbs
|
|
286
|
+
✅ plugins/specweave/templates/iac/aws-lambda/outputs.tf.hbs
|
|
287
|
+
✅ plugins/specweave/templates/iac/aws-lambda/provider.tf.hbs
|
|
288
|
+
✅ plugins/specweave/templates/iac/aws-lambda/iam.tf.hbs
|
|
289
|
+
✅ plugins/specweave/templates/iac/aws-lambda/README.md.hbs
|
|
248
290
|
|
|
249
291
|
2. Render with Variables:
|
|
250
292
|
- projectName: "my-startup-api"
|
|
@@ -362,7 +404,7 @@ import { TerraformTemplateEngine } from '@specweave/core/iac/template-engine';
|
|
|
362
404
|
|
|
363
405
|
const engine = new TerraformTemplateEngine();
|
|
364
406
|
const result = await engine.render({
|
|
365
|
-
templatePath: 'plugins/specweave/
|
|
407
|
+
templatePath: 'plugins/specweave/templates/iac/aws-lambda',
|
|
366
408
|
variables: {
|
|
367
409
|
projectName: 'my-api',
|
|
368
410
|
functionName: 'my-handler',
|
|
@@ -406,7 +448,7 @@ const platformTemplateMap = {
|
|
|
406
448
|
'supabase': 'supabase'
|
|
407
449
|
};
|
|
408
450
|
|
|
409
|
-
const templateDir = `plugins/specweave/iac
|
|
451
|
+
const templateDir = `plugins/specweave/templates/iac/${platformTemplateMap[platformId]}`;
|
|
410
452
|
```
|
|
411
453
|
|
|
412
454
|
**Required Files**:
|
|
@@ -694,7 +736,7 @@ for (const env of environments) {
|
|
|
694
736
|
**Solution**:
|
|
695
737
|
```bash
|
|
696
738
|
# Verify template exists
|
|
697
|
-
ls plugins/specweave/
|
|
739
|
+
ls plugins/specweave/templates/iac/aws-lambda/
|
|
698
740
|
|
|
699
741
|
# Check platform ID mapping
|
|
700
742
|
# Valid IDs: aws-lambda, azure-functions, gcp-cloud-functions, firebase, supabase
|
|
@@ -10,6 +10,50 @@ fallback_behavior: strict
|
|
|
10
10
|
|
|
11
11
|
# PM Agent - Product Manager AI Assistant
|
|
12
12
|
|
|
13
|
+
## ⛔ CRITICAL: Increment Folder Structure (MANDATORY)
|
|
14
|
+
|
|
15
|
+
**ALL files created by this agent MUST follow this structure**:
|
|
16
|
+
|
|
17
|
+
### Allowed Files in Increment Root
|
|
18
|
+
**ONLY these 3 files are allowed** in `.specweave/increments/####-name/`:
|
|
19
|
+
1. ✅ `spec.md` - Specification
|
|
20
|
+
2. ✅ `plan.md` - Implementation plan
|
|
21
|
+
3. ✅ `tasks.md` - Tasks with embedded tests
|
|
22
|
+
|
|
23
|
+
### ALL Other Files Go in Subfolders
|
|
24
|
+
|
|
25
|
+
**MANDATORY subfolder organization**:
|
|
26
|
+
```
|
|
27
|
+
.specweave/increments/####-name/
|
|
28
|
+
├── spec.md # ✅ ONLY core file 1
|
|
29
|
+
├── plan.md # ✅ ONLY core file 2
|
|
30
|
+
├── tasks.md # ✅ ONLY core file 3
|
|
31
|
+
├── reports/ # ✅ ALL reports here
|
|
32
|
+
│ ├── PM-VALIDATION-REPORT.md
|
|
33
|
+
│ ├── COMPLETION-SUMMARY.md
|
|
34
|
+
│ ├── SESSION-NOTES.md
|
|
35
|
+
│ └── ANALYSIS-*.md
|
|
36
|
+
├── scripts/ # ✅ ALL scripts here
|
|
37
|
+
│ └── helper-*.sh
|
|
38
|
+
└── logs/ # ✅ ALL logs here
|
|
39
|
+
└── execution.log
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**When writing ANY file**:
|
|
43
|
+
- ❌ **NEVER** write `.md` files to increment root (except spec.md, plan.md, tasks.md)
|
|
44
|
+
- ✅ **ALWAYS** write reports to `reports/` subfolder
|
|
45
|
+
- ✅ **ALWAYS** write scripts to `scripts/` subfolder
|
|
46
|
+
- ✅ **ALWAYS** write logs to `logs/` subfolder
|
|
47
|
+
|
|
48
|
+
**Example correct paths**:
|
|
49
|
+
- ✅ `.specweave/increments/0001-auth/reports/PM-VALIDATION-REPORT.md`
|
|
50
|
+
- ✅ `.specweave/increments/0001-auth/reports/COMPLETION-SUMMARY.md`
|
|
51
|
+
- ❌ `.specweave/increments/0001-auth/PM-VALIDATION-REPORT.md` (WRONG!)
|
|
52
|
+
|
|
53
|
+
**This is NON-NEGOTIABLE**. Violations will be flagged and files will be moved by maintainers.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
13
57
|
## 📚 Required Reading (LOAD FIRST)
|
|
14
58
|
|
|
15
59
|
**CRITICAL**: Before planning features or increments, read these guides:
|
|
@@ -1164,10 +1208,23 @@ When creating metadata.json, extract values from spec.md frontmatter:
|
|
|
1164
1208
|
- `priority`: Look for `priority: P1|P2|P3`
|
|
1165
1209
|
- `testMode`: Look for `test_mode: TDD|BDD|Standard` (default: "TDD")
|
|
1166
1210
|
- `coverageTarget`: Look for `coverage_target: 80|85|90|95|100` (default: 95)
|
|
1167
|
-
- `epic`:
|
|
1211
|
+
- `epic`: **CRITICAL - Format depends on increment type**:
|
|
1212
|
+
- **Greenfield** (SpecWeave-native): Leave EMPTY (auto-generated as `FS-{increment-number}` during sync)
|
|
1213
|
+
- **Brownfield** (imported from Jira/GitHub/ADO): Use `epic: FS-YY-MM-DD-name` + add `imported: true`
|
|
1168
1214
|
|
|
1169
1215
|
**DO NOT hardcode values** - always extract from spec.md when possible!
|
|
1170
1216
|
|
|
1217
|
+
**⛔ CRITICAL: Epic Field Rules**
|
|
1218
|
+
|
|
1219
|
+
When creating spec.md frontmatter:
|
|
1220
|
+
- **NEW increments** (greenfield): DO NOT add `epic:` field (leave it empty for auto-generation)
|
|
1221
|
+
- **Imported work** (brownfield): Add `epic: FS-YY-MM-DD-name` AND `imported: true`
|
|
1222
|
+
|
|
1223
|
+
**Why this matters**:
|
|
1224
|
+
- Greenfield increments use `FS-{increment-number}` format (e.g., `FS-031`, `FS-043`)
|
|
1225
|
+
- Brownfield increments use `FS-YY-MM-DD-name` format (e.g., `FS-25-11-14-jira-epic`)
|
|
1226
|
+
- Mixing formats pollutes living docs and breaks feature tracking
|
|
1227
|
+
|
|
1171
1228
|
### Code Reference (TypeScript Pseudocode)
|
|
1172
1229
|
|
|
1173
1230
|
This is what you're executing with Read/Write tools:
|
|
@@ -51,10 +51,78 @@ You are acting as the Product Manager to validate increment completion before cl
|
|
|
51
51
|
🎯 Validating readiness for closure...
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### Step 2:
|
|
54
|
+
### Step 2: Automated Completion Validation (Gate 0)
|
|
55
|
+
|
|
56
|
+
**🔥 CRITICAL: Automated validation runs BEFORE PM validation to catch obvious issues!**
|
|
57
|
+
|
|
58
|
+
**BEFORE** invoking the PM agent, run automated validation using `IncrementCompletionValidator`:
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { IncrementCompletionValidator } from '../../../src/core/increment/completion-validator.js';
|
|
62
|
+
|
|
63
|
+
// Validate increment is ready for completion
|
|
64
|
+
const validation = await IncrementCompletionValidator.validateCompletion(incrementId);
|
|
65
|
+
|
|
66
|
+
if (!validation.isValid) {
|
|
67
|
+
// BLOCK completion and show errors
|
|
68
|
+
console.error('❌ CANNOT CLOSE INCREMENT - Automated validation failed');
|
|
69
|
+
console.error('');
|
|
70
|
+
validation.errors.forEach(err => console.error(` • ${err}`));
|
|
71
|
+
console.error('');
|
|
72
|
+
console.error('Fix these issues before running /specweave:done again');
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Example validation output** (FAIL):
|
|
78
|
+
```
|
|
79
|
+
❌ CANNOT CLOSE INCREMENT - Automated validation failed
|
|
80
|
+
|
|
81
|
+
• 17 acceptance criteria still open
|
|
82
|
+
• 13 tasks still pending
|
|
83
|
+
|
|
84
|
+
Fix these issues before running /specweave:done again
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Example validation output** (PASS):
|
|
88
|
+
```
|
|
89
|
+
✅ Automated validation passed
|
|
90
|
+
• All acceptance criteria completed
|
|
91
|
+
• All tasks completed
|
|
92
|
+
|
|
93
|
+
Proceeding to PM validation...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**What Gate 0 validates**:
|
|
97
|
+
- [ ] All acceptance criteria are checked (`- [x] **AC-...`)
|
|
98
|
+
- [ ] All tasks are completed (`**Status**: [x] completed`)
|
|
99
|
+
- [ ] Required files exist (`spec.md`, `tasks.md`)
|
|
100
|
+
|
|
101
|
+
**Why Gate 0 matters**:
|
|
102
|
+
- **Prevents false completion**: Can't mark increment "completed" with open work
|
|
103
|
+
- **Fast feedback**: Fails immediately (< 1s) vs waiting for PM agent (30s+)
|
|
104
|
+
- **Data integrity**: Ensures status matches reality (no spec.md desync)
|
|
105
|
+
|
|
106
|
+
**CRITICAL**: Gate 0 is MANDATORY and CANNOT be bypassed. If validation fails, increment stays "in-progress" and command exits.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### Step 3: PM Validation (3 Gates)
|
|
55
111
|
|
|
56
112
|
**🔥 CRITICAL: PM agent MUST validate all 3 gates before allowing closure!**
|
|
57
113
|
|
|
114
|
+
**⛔ CRITICAL: PM Validation Report File Location**
|
|
115
|
+
|
|
116
|
+
When the PM agent writes the validation report, it MUST go in the `reports/` subfolder:
|
|
117
|
+
- ✅ **CORRECT**: `.specweave/increments/####-name/reports/PM-VALIDATION-REPORT.md`
|
|
118
|
+
- ❌ **WRONG**: `.specweave/increments/####-name/PM-VALIDATION-REPORT.md`
|
|
119
|
+
|
|
120
|
+
**Folder structure rules**:
|
|
121
|
+
- ONLY spec.md, plan.md, tasks.md allowed in increment root
|
|
122
|
+
- ALL reports MUST go in `reports/` subfolder
|
|
123
|
+
- ALL scripts MUST go in `scripts/` subfolder
|
|
124
|
+
- ALL logs MUST go in `logs/` subfolder
|
|
125
|
+
|
|
58
126
|
Invoke PM agent with validation task:
|
|
59
127
|
|
|
60
128
|
```
|
|
@@ -276,7 +344,7 @@ Recommendation: ❌ CANNOT close increment
|
|
|
276
344
|
• Estimated effort: 1-2 hours
|
|
277
345
|
```
|
|
278
346
|
|
|
279
|
-
### Step
|
|
347
|
+
### Step 4: PM Decision
|
|
280
348
|
|
|
281
349
|
**Based on 3-gate validation**:
|
|
282
350
|
|
|
@@ -314,7 +382,7 @@ Closing increment 0001-user-authentication...
|
|
|
314
382
|
🎉 Increment 0001 closed successfully!
|
|
315
383
|
```
|
|
316
384
|
|
|
317
|
-
### Step
|
|
385
|
+
### Step 5: Post-Closure Sync (AUTOMATIC)
|
|
318
386
|
|
|
319
387
|
**CRITICAL**: After increment closes, automatically perform these syncs:
|
|
320
388
|
|
|
@@ -639,7 +707,7 @@ Increment remains: in-progress
|
|
|
639
707
|
Try again after fixing blockers: /specweave:done 0001
|
|
640
708
|
```
|
|
641
709
|
|
|
642
|
-
### Step
|
|
710
|
+
### Step 6: Handle Incomplete Work
|
|
643
711
|
|
|
644
712
|
**If increment cannot close due to scope creep**:
|
|
645
713
|
|