specweave 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL.md +848 -0
- package/LICENSE +21 -0
- package/README.md +675 -0
- package/SPECWEAVE.md +665 -0
- package/bin/install-agents.sh +57 -0
- package/bin/install-all.sh +49 -0
- package/bin/install-commands.sh +56 -0
- package/bin/install-skills.sh +57 -0
- package/bin/specweave.js +81 -0
- package/dist/adapters/adapter-base.d.ts +50 -0
- package/dist/adapters/adapter-base.d.ts.map +1 -0
- package/dist/adapters/adapter-base.js +146 -0
- package/dist/adapters/adapter-base.js.map +1 -0
- package/dist/adapters/adapter-interface.d.ts +108 -0
- package/dist/adapters/adapter-interface.d.ts.map +1 -0
- package/dist/adapters/adapter-interface.js +9 -0
- package/dist/adapters/adapter-interface.js.map +1 -0
- package/dist/adapters/claude/adapter.d.ts +54 -0
- package/dist/adapters/claude/adapter.d.ts.map +1 -0
- package/dist/adapters/claude/adapter.js +184 -0
- package/dist/adapters/claude/adapter.js.map +1 -0
- package/dist/adapters/copilot/adapter.d.ts +42 -0
- package/dist/adapters/copilot/adapter.d.ts.map +1 -0
- package/dist/adapters/copilot/adapter.js +239 -0
- package/dist/adapters/copilot/adapter.js.map +1 -0
- package/dist/adapters/cursor/adapter.d.ts +42 -0
- package/dist/adapters/cursor/adapter.d.ts.map +1 -0
- package/dist/adapters/cursor/adapter.js +297 -0
- package/dist/adapters/cursor/adapter.js.map +1 -0
- package/dist/adapters/generic/adapter.d.ts +40 -0
- package/dist/adapters/generic/adapter.d.ts.map +1 -0
- package/dist/adapters/generic/adapter.js +155 -0
- package/dist/adapters/generic/adapter.js.map +1 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +247 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/install.d.ts +7 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +160 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/list.d.ts +6 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +154 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/package.json +90 -0
- package/src/adapters/README.md +312 -0
- package/src/adapters/adapter-base.ts +146 -0
- package/src/adapters/adapter-interface.ts +120 -0
- package/src/adapters/claude/README.md +241 -0
- package/src/adapters/claude/adapter.ts +157 -0
- package/src/adapters/copilot/.github/copilot/instructions.md +376 -0
- package/src/adapters/copilot/README.md +200 -0
- package/src/adapters/copilot/adapter.ts +210 -0
- package/src/adapters/cursor/.cursor/context/docs-context.md +62 -0
- package/src/adapters/cursor/.cursor/context/increments-context.md +71 -0
- package/src/adapters/cursor/.cursor/context/strategy-context.md +73 -0
- package/src/adapters/cursor/.cursor/context/tests-context.md +89 -0
- package/src/adapters/cursor/.cursorrules +325 -0
- package/src/adapters/cursor/README.md +243 -0
- package/src/adapters/cursor/adapter.ts +268 -0
- package/src/adapters/generic/README.md +277 -0
- package/src/adapters/generic/SPECWEAVE-MANUAL.md +676 -0
- package/src/adapters/generic/adapter.ts +159 -0
- package/src/adapters/registry.yaml +126 -0
- package/src/agents/architect/AGENT.md +416 -0
- package/src/agents/devops/AGENT.md +1738 -0
- package/src/agents/docs-writer/AGENT.md +239 -0
- package/src/agents/performance/AGENT.md +228 -0
- package/src/agents/pm/AGENT.md +751 -0
- package/src/agents/qa-lead/AGENT.md +150 -0
- package/src/agents/security/AGENT.md +179 -0
- package/src/agents/sre/AGENT.md +582 -0
- package/src/agents/sre/modules/backend-diagnostics.md +481 -0
- package/src/agents/sre/modules/database-diagnostics.md +509 -0
- package/src/agents/sre/modules/infrastructure.md +561 -0
- package/src/agents/sre/modules/monitoring.md +439 -0
- package/src/agents/sre/modules/security-incidents.md +421 -0
- package/src/agents/sre/modules/ui-diagnostics.md +302 -0
- package/src/agents/sre/playbooks/01-high-cpu-usage.md +204 -0
- package/src/agents/sre/playbooks/02-database-deadlock.md +241 -0
- package/src/agents/sre/playbooks/03-memory-leak.md +252 -0
- package/src/agents/sre/playbooks/04-slow-api-response.md +269 -0
- package/src/agents/sre/playbooks/05-ddos-attack.md +293 -0
- package/src/agents/sre/playbooks/06-disk-full.md +314 -0
- package/src/agents/sre/playbooks/07-service-down.md +333 -0
- package/src/agents/sre/playbooks/08-data-corruption.md +337 -0
- package/src/agents/sre/playbooks/09-cascade-failure.md +430 -0
- package/src/agents/sre/playbooks/10-rate-limit-exceeded.md +464 -0
- package/src/agents/sre/scripts/health-check.sh +230 -0
- package/src/agents/sre/scripts/log-analyzer.py +213 -0
- package/src/agents/sre/scripts/metrics-collector.sh +294 -0
- package/src/agents/sre/scripts/trace-analyzer.js +257 -0
- package/src/agents/sre/templates/incident-report.md +249 -0
- package/src/agents/sre/templates/mitigation-plan.md +375 -0
- package/src/agents/sre/templates/post-mortem.md +418 -0
- package/src/agents/sre/templates/runbook-template.md +412 -0
- package/src/agents/tech-lead/AGENT.md +263 -0
- package/src/commands/add-tasks.md +176 -0
- package/src/commands/close-increment.md +347 -0
- package/src/commands/create-increment.md +223 -0
- package/src/commands/create-project.md +528 -0
- package/src/commands/generate-docs.md +623 -0
- package/src/commands/list-increments.md +180 -0
- package/src/commands/review-docs.md +331 -0
- package/src/commands/start-increment.md +139 -0
- package/src/commands/sync-github.md +115 -0
- package/src/commands/validate-increment.md +800 -0
- package/src/hooks/README.md +252 -0
- package/src/hooks/docs-changed.sh +59 -0
- package/src/hooks/human-input-required.sh +55 -0
- package/src/hooks/post-task-completion.sh +57 -0
- package/src/hooks/pre-implementation.sh +47 -0
- package/src/skills/ado-sync/README.md +449 -0
- package/src/skills/ado-sync/SKILL.md +245 -0
- package/src/skills/ado-sync/test-cases/test-1.yaml +9 -0
- package/src/skills/ado-sync/test-cases/test-2.yaml +8 -0
- package/src/skills/ado-sync/test-cases/test-3.yaml +9 -0
- package/src/skills/bmad-method-expert/SKILL.md +628 -0
- package/src/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
- package/src/skills/bmad-method-expert/scripts/check-setup.js +208 -0
- package/src/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
- package/src/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
- package/src/skills/bmad-method-expert/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/bmad-method-expert/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/bmad-method-expert/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/brownfield-analyzer/SKILL.md +523 -0
- package/src/skills/brownfield-analyzer/test-cases/test-1-basic-analysis.yaml +48 -0
- package/src/skills/brownfield-analyzer/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/brownfield-analyzer/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/brownfield-onboarder/SKILL.md +625 -0
- package/src/skills/brownfield-onboarder/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/brownfield-onboarder/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/brownfield-onboarder/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/calendar-system/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/calendar-system/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/calendar-system/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/context-loader/SKILL.md +734 -0
- package/src/skills/context-loader/test-cases/test-1-basic-loading.yaml +39 -0
- package/src/skills/context-loader/test-cases/test-2-token-budget-exceeded.yaml +44 -0
- package/src/skills/context-loader/test-cases/test-3-section-anchors.yaml +45 -0
- package/src/skills/context-optimizer/SKILL.md +618 -0
- package/src/skills/context-optimizer/test-cases/test-1-bug-fix-narrow.yaml +97 -0
- package/src/skills/context-optimizer/test-cases/test-2-feature-focused.yaml +109 -0
- package/src/skills/context-optimizer/test-cases/test-3-architecture-broad.yaml +98 -0
- package/src/skills/cost-optimizer/SKILL.md +190 -0
- package/src/skills/cost-optimizer/test-cases/test-1-basic-comparison.yaml +75 -0
- package/src/skills/cost-optimizer/test-cases/test-2-budget-constraint.yaml +52 -0
- package/src/skills/cost-optimizer/test-cases/test-3-scale-requirement.yaml +63 -0
- package/src/skills/cost-optimizer/test-results/README.md +46 -0
- package/src/skills/design-system-architect/SKILL.md +107 -0
- package/src/skills/design-system-architect/test-cases/test-1-token-structure.yaml +23 -0
- package/src/skills/design-system-architect/test-cases/test-2-component-hierarchy.yaml +24 -0
- package/src/skills/design-system-architect/test-cases/test-3-accessibility-checklist.yaml +23 -0
- package/src/skills/diagrams-architect/SKILL.md +763 -0
- package/src/skills/diagrams-generator/SKILL.md +25 -0
- package/src/skills/diagrams-generator/test-cases/test-1.yaml +9 -0
- package/src/skills/diagrams-generator/test-cases/test-2.yaml +9 -0
- package/src/skills/diagrams-generator/test-cases/test-3.yaml +8 -0
- package/src/skills/docs-updater/README.md +48 -0
- package/src/skills/docs-updater/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/docs-updater/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/docs-updater/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/dotnet-backend/SKILL.md +250 -0
- package/src/skills/e2e-playwright/README.md +506 -0
- package/src/skills/e2e-playwright/SKILL.md +457 -0
- package/src/skills/e2e-playwright/execute.js +373 -0
- package/src/skills/e2e-playwright/lib/utils.js +514 -0
- package/src/skills/e2e-playwright/package.json +33 -0
- package/src/skills/e2e-playwright/test-cases/TC-001-basic-navigation.yaml +54 -0
- package/src/skills/e2e-playwright/test-cases/TC-002-form-interaction.yaml +64 -0
- package/src/skills/e2e-playwright/test-cases/TC-003-specweave-integration.yaml +74 -0
- package/src/skills/e2e-playwright/test-cases/TC-004-accessibility-check.yaml +98 -0
- package/src/skills/figma-designer/SKILL.md +149 -0
- package/src/skills/figma-implementer/SKILL.md +148 -0
- package/src/skills/figma-mcp-connector/SKILL.md +136 -0
- package/src/skills/figma-mcp-connector/test-cases/test-1-read-file-desktop.yaml +22 -0
- package/src/skills/figma-mcp-connector/test-cases/test-2-read-file-framelink.yaml +21 -0
- package/src/skills/figma-mcp-connector/test-cases/test-3-error-handling.yaml +18 -0
- package/src/skills/figma-to-code/SKILL.md +128 -0
- package/src/skills/figma-to-code/test-cases/test-1-token-generation.yaml +29 -0
- package/src/skills/figma-to-code/test-cases/test-2-component-generation.yaml +27 -0
- package/src/skills/figma-to-code/test-cases/test-3-typescript-generation.yaml +28 -0
- package/src/skills/frontend/SKILL.md +177 -0
- package/src/skills/github-sync/SKILL.md +252 -0
- package/src/skills/github-sync/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/github-sync/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/github-sync/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/hetzner-provisioner/README.md +308 -0
- package/src/skills/hetzner-provisioner/SKILL.md +251 -0
- package/src/skills/hetzner-provisioner/test-cases/test-1-basic-provision.yaml +71 -0
- package/src/skills/hetzner-provisioner/test-cases/test-2-postgres-provision.yaml +85 -0
- package/src/skills/hetzner-provisioner/test-cases/test-3-ssl-config.yaml +126 -0
- package/src/skills/hetzner-provisioner/test-results/README.md +259 -0
- package/src/skills/increment-planner/SKILL.md +889 -0
- package/src/skills/increment-planner/scripts/feature-utils.js +250 -0
- package/src/skills/increment-planner/test-cases/test-1-basic-feature.yaml +27 -0
- package/src/skills/increment-planner/test-cases/test-2-complex-feature.yaml +30 -0
- package/src/skills/increment-planner/test-cases/test-3-auto-numbering.yaml +24 -0
- package/src/skills/increment-quality-judge/SKILL.md +566 -0
- package/src/skills/increment-quality-judge/test-cases/test-1-good-spec.yaml +95 -0
- package/src/skills/increment-quality-judge/test-cases/test-2-poor-spec.yaml +108 -0
- package/src/skills/increment-quality-judge/test-cases/test-3-export-suggestions.yaml +87 -0
- package/src/skills/jira-sync/README.md +328 -0
- package/src/skills/jira-sync/SKILL.md +209 -0
- package/src/skills/jira-sync/test-cases/test-1.yaml +9 -0
- package/src/skills/jira-sync/test-cases/test-2.yaml +9 -0
- package/src/skills/jira-sync/test-cases/test-3.yaml +10 -0
- package/src/skills/nextjs/SKILL.md +176 -0
- package/src/skills/nodejs-backend/SKILL.md +181 -0
- package/src/skills/notification-system/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/notification-system/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/notification-system/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/python-backend/SKILL.md +226 -0
- package/src/skills/role-orchestrator/README.md +197 -0
- package/src/skills/role-orchestrator/SKILL.md +1184 -0
- package/src/skills/role-orchestrator/test-cases/test-1-simple-product.yaml +98 -0
- package/src/skills/role-orchestrator/test-cases/test-2-quality-gate-failure.yaml +73 -0
- package/src/skills/role-orchestrator/test-cases/test-3-security-workflow.yaml +121 -0
- package/src/skills/role-orchestrator/test-cases/test-4-parallel-execution.yaml +145 -0
- package/src/skills/role-orchestrator/test-cases/test-5-feedback-loops.yaml +149 -0
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +209 -0
- package/src/skills/skill-creator/scripts/init_skill.py +303 -0
- package/src/skills/skill-creator/scripts/package_skill.py +110 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/src/skills/skill-creator/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/skill-creator/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/skill-creator/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/skill-router/SKILL.md +497 -0
- package/src/skills/skill-router/test-cases/test-1-basic-routing.yaml +33 -0
- package/src/skills/skill-router/test-cases/test-2-ambiguous-request.yaml +42 -0
- package/src/skills/skill-router/test-cases/test-3-nested-orchestration.yaml +50 -0
- package/src/skills/spec-driven-brainstorming/README.md +264 -0
- package/src/skills/spec-driven-brainstorming/SKILL.md +439 -0
- package/src/skills/spec-driven-brainstorming/test-cases/TC-001-simple-idea-to-design.yaml +148 -0
- package/src/skills/spec-driven-brainstorming/test-cases/TC-002-complex-ultrathink-design.yaml +190 -0
- package/src/skills/spec-driven-brainstorming/test-cases/TC-003-unclear-requirements-socratic.yaml +233 -0
- package/src/skills/spec-driven-debugging/README.md +479 -0
- package/src/skills/spec-driven-debugging/SKILL.md +652 -0
- package/src/skills/spec-driven-debugging/test-cases/TC-001-simple-auth-bug.yaml +212 -0
- package/src/skills/spec-driven-debugging/test-cases/TC-002-race-condition-ultrathink.yaml +461 -0
- package/src/skills/spec-driven-debugging/test-cases/TC-003-brownfield-missing-spec.yaml +366 -0
- package/src/skills/spec-kit-expert/SKILL.md +1012 -0
- package/src/skills/spec-kit-expert/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/spec-kit-expert/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/spec-kit-expert/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/specweave-ado-mapper/SKILL.md +501 -0
- package/src/skills/specweave-detector/SKILL.md +420 -0
- package/src/skills/specweave-detector/test-cases/test-1-basic-detection.yaml +37 -0
- package/src/skills/specweave-detector/test-cases/test-2-missing-config.yaml +37 -0
- package/src/skills/specweave-detector/test-cases/test-3-non-specweave-project.yaml +34 -0
- package/src/skills/specweave-jira-mapper/SKILL.md +500 -0
- package/src/skills/stripe-integrator/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/stripe-integrator/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/stripe-integrator/test-cases/test-3-placeholder.yaml +12 -0
- package/src/skills/task-builder/README.md +90 -0
- package/src/skills/task-builder/test-cases/test-1-placeholder.yaml +12 -0
- package/src/skills/task-builder/test-cases/test-2-placeholder.yaml +12 -0
- package/src/skills/task-builder/test-cases/test-3-placeholder.yaml +12 -0
- package/src/templates/.env.example +144 -0
- package/src/templates/.gitignore.template +81 -0
- package/src/templates/CLAUDE.md.template +383 -0
- package/src/templates/README.md.template +240 -0
- package/src/templates/config.yaml +333 -0
- package/src/templates/docs/README.md +124 -0
- package/src/templates/docs/adr-template.md +118 -0
- package/src/templates/docs/hld-template.md +220 -0
- package/src/templates/docs/lld-template.md +580 -0
- package/src/templates/docs/prd-template.md +132 -0
- package/src/templates/docs/rfc-template.md +229 -0
- package/src/templates/docs/runbook-template.md +298 -0
- package/src/templates/environments/minimal/.env.production +16 -0
- package/src/templates/environments/minimal/README.md +54 -0
- package/src/templates/environments/minimal/deploy-production.yml +52 -0
- package/src/templates/environments/progressive/.env.qa +28 -0
- package/src/templates/environments/progressive/README.md +129 -0
- package/src/templates/environments/progressive/deploy-production.yml +93 -0
- package/src/templates/environments/progressive/deploy-qa.yml +62 -0
- package/src/templates/environments/progressive/deploy-staging.yml +67 -0
- package/src/templates/environments/standard/.env.development +20 -0
- package/src/templates/environments/standard/.env.production +30 -0
- package/src/templates/environments/standard/.env.staging +23 -0
- package/src/templates/environments/standard/README.md +97 -0
- package/src/templates/environments/standard/deploy-production.yml +68 -0
- package/src/templates/environments/standard/deploy-staging.yml +61 -0
- package/src/templates/environments/standard/docker-compose.yml +43 -0
- package/src/templates/increment-metadata-template.yaml +138 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic Adapter
|
|
3
|
+
*
|
|
4
|
+
* Manual workflow adapter that works with ANY AI tool.
|
|
5
|
+
* Provides step-by-step instructions for using SpecWeave without tool-specific features.
|
|
6
|
+
*
|
|
7
|
+
* This adapter ensures 100% compatibility - works with ChatGPT web, Claude web,
|
|
8
|
+
* Gemini, or literally ANY AI that can read markdown and follow instructions.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
import * as fs from 'fs-extra';
|
|
13
|
+
import { AdapterBase } from '../adapter-base';
|
|
14
|
+
import { AdapterOptions, AdapterFile } from '../adapter-interface';
|
|
15
|
+
|
|
16
|
+
export class GenericAdapter extends AdapterBase {
|
|
17
|
+
name = 'generic';
|
|
18
|
+
description = 'Generic adapter - Manual workflow for ANY AI tool (ChatGPT, Gemini, etc.)';
|
|
19
|
+
automationLevel = 'manual' as const;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Detect if generic adapter should be used
|
|
23
|
+
*
|
|
24
|
+
* This adapter is the universal fallback - always returns true
|
|
25
|
+
* since it works with literally any AI tool.
|
|
26
|
+
*/
|
|
27
|
+
async detect(): Promise<boolean> {
|
|
28
|
+
// Generic adapter works with ANY tool - always available
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get files to install for Generic adapter
|
|
34
|
+
*/
|
|
35
|
+
getFiles(): AdapterFile[] {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
sourcePath: 'SPECWEAVE-MANUAL.md',
|
|
39
|
+
targetPath: 'SPECWEAVE-MANUAL.md',
|
|
40
|
+
description: 'Complete manual workflow guide for ANY AI tool'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
sourcePath: 'README.md',
|
|
44
|
+
targetPath: '.specweave/adapters/generic/README.md',
|
|
45
|
+
description: 'Generic adapter documentation'
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Install Generic adapter
|
|
52
|
+
*/
|
|
53
|
+
async install(options: AdapterOptions): Promise<void> {
|
|
54
|
+
console.log('\n📦 Installing Generic Adapter (Manual Workflow)\n');
|
|
55
|
+
|
|
56
|
+
// Generic adapter is simple - just copy manual guide
|
|
57
|
+
await super.install(options);
|
|
58
|
+
|
|
59
|
+
console.log('\n✨ Generic adapter installed!');
|
|
60
|
+
console.log('\n📋 Files created:');
|
|
61
|
+
console.log(' - SPECWEAVE-MANUAL.md (complete manual workflow guide)');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Post-installation instructions
|
|
66
|
+
*/
|
|
67
|
+
async postInstall(options: AdapterOptions): Promise<void> {
|
|
68
|
+
console.log(this.getInstructions());
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get usage instructions for Generic adapter
|
|
73
|
+
*/
|
|
74
|
+
getInstructions(): string {
|
|
75
|
+
return `
|
|
76
|
+
================================================================
|
|
77
|
+
Generic Adapter - Manual Workflow
|
|
78
|
+
================================================================
|
|
79
|
+
|
|
80
|
+
Your project is now configured for ANY AI tool!
|
|
81
|
+
|
|
82
|
+
WHAT THIS PROVIDES:
|
|
83
|
+
|
|
84
|
+
- SPECWEAVE-MANUAL.md (Complete Manual Guide)
|
|
85
|
+
- Step-by-step instructions for creating increments
|
|
86
|
+
- Templates you can copy-paste to any AI
|
|
87
|
+
- Workflow guidance (no tool dependencies)
|
|
88
|
+
- Works with LITERALLY any AI
|
|
89
|
+
|
|
90
|
+
- 100% Compatibility
|
|
91
|
+
- ChatGPT (web), Claude (web), Gemini
|
|
92
|
+
- Any AI that can read text
|
|
93
|
+
|
|
94
|
+
UNDERSTANDING "MANUAL":
|
|
95
|
+
|
|
96
|
+
Manual = You Orchestrate, AI Executes
|
|
97
|
+
|
|
98
|
+
Example workflow:
|
|
99
|
+
1. You read SPECWEAVE-MANUAL.md (Step 1: Create Folder)
|
|
100
|
+
2. You run: mkdir -p .specweave/increments/0001-auth
|
|
101
|
+
3. You read Step 2: Create spec.md
|
|
102
|
+
4. You copy template from manual, paste to AI (ChatGPT)
|
|
103
|
+
5. AI generates spec.md content
|
|
104
|
+
6. You copy AI's response, save to spec.md file
|
|
105
|
+
7. Repeat for plan.md, tasks.md, etc.
|
|
106
|
+
|
|
107
|
+
Manual does not mean harder - just means YOU control each step (no automation).
|
|
108
|
+
Benefit: Works with ANY AI tool!
|
|
109
|
+
|
|
110
|
+
COMPARISON:
|
|
111
|
+
|
|
112
|
+
Claude Code (Full): "create increment" -> Done in 30 seconds (auto)
|
|
113
|
+
Cursor (Semi): "create increment" -> Done in 5 minutes (.cursorrules)
|
|
114
|
+
Copilot (Basic): Create files manually, Copilot suggests content
|
|
115
|
+
Generic (Manual): Follow SPECWEAVE-MANUAL.md step-by-step (30-60 min)
|
|
116
|
+
|
|
117
|
+
Trade-off: Speed vs Compatibility
|
|
118
|
+
- Claude Code: Fast, but only works with Claude Code
|
|
119
|
+
- Generic: Slower, but works with EVERY AI tool!
|
|
120
|
+
|
|
121
|
+
WHEN TO USE:
|
|
122
|
+
|
|
123
|
+
Use Generic adapter if:
|
|
124
|
+
- You use ChatGPT web, Claude web, Gemini, or other AI
|
|
125
|
+
- You don't have access to Claude Code or Cursor
|
|
126
|
+
- You want maximum compatibility (works with ANYTHING)
|
|
127
|
+
- Simple projects where automation isn't critical
|
|
128
|
+
|
|
129
|
+
Consider alternatives if:
|
|
130
|
+
- You want automation -> Use Claude Code (full) or Cursor (semi)
|
|
131
|
+
- You have file system access -> Use Copilot at minimum
|
|
132
|
+
- Large projects -> Manual workflow becomes tedious
|
|
133
|
+
|
|
134
|
+
QUICK START:
|
|
135
|
+
|
|
136
|
+
1. Open SPECWEAVE-MANUAL.md
|
|
137
|
+
Read the complete manual workflow guide
|
|
138
|
+
|
|
139
|
+
2. Follow step-by-step for your first feature
|
|
140
|
+
- Step 1: Create increment folder
|
|
141
|
+
- Step 2: Create spec.md (copy template, paste to AI, save)
|
|
142
|
+
- Step 3: Create plan.md (copy template, paste to AI, save)
|
|
143
|
+
- Step 4: Create tasks.md (copy template, paste to AI, save)
|
|
144
|
+
|
|
145
|
+
3. Use any AI tool you prefer
|
|
146
|
+
ChatGPT, Claude web, Gemini, Perplexity, etc.
|
|
147
|
+
|
|
148
|
+
DOCUMENTATION:
|
|
149
|
+
|
|
150
|
+
- SPECWEAVE-MANUAL.md: Complete step-by-step guide (READ THIS FIRST!)
|
|
151
|
+
- SPECWEAVE.md: Complete technical documentation
|
|
152
|
+
- .specweave/docs/: Project documentation
|
|
153
|
+
|
|
154
|
+
You're ready to build with SpecWeave using ANY AI tool!
|
|
155
|
+
|
|
156
|
+
Remember: Generic = Manual = Copy-paste workflow, but 100% compatible!
|
|
157
|
+
`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
# SpecWeave Adapter Registry
|
|
3
|
+
#
|
|
4
|
+
# Lists all available adapters for multi-tool support.
|
|
5
|
+
# CLI reads this file to show available adapters.
|
|
6
|
+
|
|
7
|
+
version: 1
|
|
8
|
+
last_updated: 2025-10-27
|
|
9
|
+
|
|
10
|
+
adapters:
|
|
11
|
+
- name: claude
|
|
12
|
+
description: "Claude Code adapter - Full automation with skills, agents, hooks"
|
|
13
|
+
automation_level: full
|
|
14
|
+
status: active
|
|
15
|
+
directory: claude
|
|
16
|
+
features:
|
|
17
|
+
- Skills auto-activate (specweave-detector, skill-router, etc.)
|
|
18
|
+
- Agents coordinate (PM, Architect, DevOps, QA, Security)
|
|
19
|
+
- Hooks auto-update docs (post-task-completion, etc.)
|
|
20
|
+
- Slash commands (/create-increment, /review-docs, etc.)
|
|
21
|
+
- Best experience, most features
|
|
22
|
+
requirements:
|
|
23
|
+
- Claude Code CLI installed
|
|
24
|
+
- Node.js >= 18.0.0
|
|
25
|
+
market_share: 10%
|
|
26
|
+
priority: P1
|
|
27
|
+
|
|
28
|
+
- name: cursor
|
|
29
|
+
description: "Cursor adapter - Semi-automation with .cursorrules and @ shortcuts"
|
|
30
|
+
automation_level: semi
|
|
31
|
+
status: active
|
|
32
|
+
directory: cursor
|
|
33
|
+
features:
|
|
34
|
+
- .cursorrules with SpecWeave workflow instructions
|
|
35
|
+
- @ context shortcuts (@increments, @docs, @strategy)
|
|
36
|
+
- Composer multi-file editing support
|
|
37
|
+
- Good experience, semi-automated
|
|
38
|
+
requirements:
|
|
39
|
+
- Cursor editor installed
|
|
40
|
+
- Node.js >= 18.0.0
|
|
41
|
+
market_share: 30%
|
|
42
|
+
priority: P1
|
|
43
|
+
|
|
44
|
+
- name: copilot
|
|
45
|
+
description: "GitHub Copilot adapter - Basic automation with workspace instructions"
|
|
46
|
+
automation_level: basic
|
|
47
|
+
status: active
|
|
48
|
+
directory: copilot
|
|
49
|
+
features:
|
|
50
|
+
- .github/copilot/instructions.md workspace guidance
|
|
51
|
+
- Copilot reads context manifests for suggestions
|
|
52
|
+
- Works with built-in Copilot features only
|
|
53
|
+
- Decent experience, basic automation
|
|
54
|
+
requirements:
|
|
55
|
+
- GitHub Copilot extension (VS Code)
|
|
56
|
+
- Node.js >= 18.0.0
|
|
57
|
+
market_share: 40%
|
|
58
|
+
priority: P1
|
|
59
|
+
|
|
60
|
+
- name: generic
|
|
61
|
+
description: "Generic adapter - Manual workflow for ANY AI tool (ChatGPT, Gemini, etc.)"
|
|
62
|
+
automation_level: manual
|
|
63
|
+
status: active
|
|
64
|
+
directory: generic
|
|
65
|
+
features:
|
|
66
|
+
- SPECWEAVE.md with step-by-step manual instructions
|
|
67
|
+
- Works with ANY AI (ChatGPT, Gemini, Claude web, etc.)
|
|
68
|
+
- No automation, user guides AI through workflow
|
|
69
|
+
- Basic experience, maximum compatibility (100%)
|
|
70
|
+
requirements:
|
|
71
|
+
- Node.js >= 18.0.0 (for CLI init only)
|
|
72
|
+
- Any AI tool (web or local)
|
|
73
|
+
market_share: 20%
|
|
74
|
+
priority: P1
|
|
75
|
+
|
|
76
|
+
# Future adapters (P2/P3)
|
|
77
|
+
future_adapters:
|
|
78
|
+
- name: windsurf
|
|
79
|
+
description: "Windsurf adapter (if requested by community)"
|
|
80
|
+
automation_level: semi
|
|
81
|
+
status: planned
|
|
82
|
+
priority: P2
|
|
83
|
+
|
|
84
|
+
- name: gemini
|
|
85
|
+
description: "Google Gemini adapter (if requested by community)"
|
|
86
|
+
automation_level: basic
|
|
87
|
+
status: planned
|
|
88
|
+
priority: P3
|
|
89
|
+
|
|
90
|
+
# Adapter capabilities comparison
|
|
91
|
+
capabilities:
|
|
92
|
+
skills:
|
|
93
|
+
claude: full
|
|
94
|
+
cursor: partial
|
|
95
|
+
copilot: none
|
|
96
|
+
generic: none
|
|
97
|
+
|
|
98
|
+
agents:
|
|
99
|
+
claude: full
|
|
100
|
+
cursor: manual
|
|
101
|
+
copilot: manual
|
|
102
|
+
generic: manual
|
|
103
|
+
|
|
104
|
+
hooks:
|
|
105
|
+
claude: full
|
|
106
|
+
cursor: none
|
|
107
|
+
copilot: none
|
|
108
|
+
generic: none
|
|
109
|
+
|
|
110
|
+
slash_commands:
|
|
111
|
+
claude: native
|
|
112
|
+
cursor: via_cursorrules
|
|
113
|
+
copilot: via_instructions
|
|
114
|
+
generic: via_markdown_guide
|
|
115
|
+
|
|
116
|
+
context_manifests:
|
|
117
|
+
claude: auto_load
|
|
118
|
+
cursor: manual_reference
|
|
119
|
+
copilot: manual_reference
|
|
120
|
+
generic: manual_copy_paste
|
|
121
|
+
|
|
122
|
+
# Target market coverage
|
|
123
|
+
market_coverage:
|
|
124
|
+
claude_only: 10%
|
|
125
|
+
with_all_adapters: 100%
|
|
126
|
+
goal: "Make SpecWeave accessible to ALL developers"
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: System Architect and technical design expert. Creates system architecture, technical specifications, Architecture Decision Records (ADRs), component designs, API contracts, data models, and deployment architectures. Handles design patterns, scalability planning, technology stack decisions, microservices architecture, event-driven systems, CQRS, domain-driven design. Activates for: architecture, system design, technical design, ADR, architecture decision record, design patterns, microservices, API design, data model, database schema, scalability, performance architecture, technology stack, tech stack selection, distributed systems, event-driven, CQRS, DDD, domain model, component architecture, integration patterns, CAP theorem, consistency, availability, partition tolerance.
|
|
4
|
+
tools: Read, Write, Edit
|
|
5
|
+
model: claude-sonnet-4-5-20250929
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Architect Agent - System Architecture & Technical Design Expert
|
|
9
|
+
|
|
10
|
+
You are an expert System Architect with 15+ years of experience designing scalable, maintainable systems across multiple domains (SaaS, e-commerce, fintech, healthcare).
|
|
11
|
+
|
|
12
|
+
## Your Expertise
|
|
13
|
+
|
|
14
|
+
### 1. System Architecture Design
|
|
15
|
+
- Monolithic, microservices, serverless architectures
|
|
16
|
+
- Event-driven architectures (Kafka, RabbitMQ, EventBridge)
|
|
17
|
+
- CQRS (Command Query Responsibility Segregation)
|
|
18
|
+
- Domain-Driven Design (DDD)
|
|
19
|
+
- Hexagonal/Clean/Onion architecture patterns
|
|
20
|
+
- API-first design (REST, GraphQL, gRPC)
|
|
21
|
+
|
|
22
|
+
### 2. Scalability & Performance Architecture
|
|
23
|
+
- Horizontal vs vertical scaling strategies
|
|
24
|
+
- Caching layers (Redis, Memcached, CDN)
|
|
25
|
+
- Load balancing (ALB, NLB, client-side)
|
|
26
|
+
- Database scaling (read replicas, sharding, partitioning)
|
|
27
|
+
- Async processing (queues, workers, background jobs)
|
|
28
|
+
- Rate limiting and throttling
|
|
29
|
+
|
|
30
|
+
### 3. Data Architecture
|
|
31
|
+
- SQL vs NoSQL selection criteria
|
|
32
|
+
- Relational database design (normalization, indexing)
|
|
33
|
+
- NoSQL patterns (document, key-value, graph, column-family)
|
|
34
|
+
- Data consistency models (strong, eventual, causal)
|
|
35
|
+
- Data replication and synchronization
|
|
36
|
+
- Schema evolution and migrations
|
|
37
|
+
|
|
38
|
+
### 4. Integration Patterns
|
|
39
|
+
- API gateway patterns
|
|
40
|
+
- Service mesh (Istio, Linkerd)
|
|
41
|
+
- Event sourcing and event streaming
|
|
42
|
+
- Saga pattern for distributed transactions
|
|
43
|
+
- Circuit breaker and retry patterns
|
|
44
|
+
- Outbox pattern for reliable messaging
|
|
45
|
+
|
|
46
|
+
### 5. Technology Stack Selection
|
|
47
|
+
- Language selection criteria (Go, Node.js, Python, Java, .NET)
|
|
48
|
+
- Framework evaluation (performance, community, maturity)
|
|
49
|
+
- Cloud provider selection (AWS, Azure, GCP)
|
|
50
|
+
- Database selection (PostgreSQL, MySQL, MongoDB, DynamoDB)
|
|
51
|
+
- Infrastructure patterns (IaC, containers, serverless)
|
|
52
|
+
|
|
53
|
+
### 6. Architecture Decision Records (ADRs)
|
|
54
|
+
- Document architectural decisions with context and rationale
|
|
55
|
+
- Capture alternatives considered
|
|
56
|
+
- Document consequences and trade-offs
|
|
57
|
+
- Create maintainable decision history
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## ⚠️ CRITICAL: Two-Output Behavior (Living Documentation)
|
|
62
|
+
|
|
63
|
+
**MANDATORY**: As Architect Agent, you create **TWO TYPES** of documentation for EVERY increment:
|
|
64
|
+
|
|
65
|
+
### Output 1: Living Architecture Docs (Source of Truth) ✅
|
|
66
|
+
|
|
67
|
+
**Location**: `.specweave/docs/internal/architecture/`
|
|
68
|
+
|
|
69
|
+
**Purpose**: Complete, comprehensive technical design that grows with the project
|
|
70
|
+
|
|
71
|
+
**Files to Create**:
|
|
72
|
+
```
|
|
73
|
+
.specweave/docs/internal/architecture/
|
|
74
|
+
├── system-design.md # Overall system architecture (C4 Level 1-2)
|
|
75
|
+
├── adr/ # Architecture Decision Records
|
|
76
|
+
│ ├── ####-websocket-vs-polling.md
|
|
77
|
+
│ ├── ####-database-choice.md
|
|
78
|
+
│ └── ####-deployment-platform.md
|
|
79
|
+
├── rfc/ # Request for Comments (design proposals)
|
|
80
|
+
│ └── ####-data-normalization-format.md
|
|
81
|
+
├── api-contracts/ # API specifications
|
|
82
|
+
│ ├── rest-api.yaml # OpenAPI spec
|
|
83
|
+
│ └── graphql-schema.graphql
|
|
84
|
+
├── data-models/ # Data architecture
|
|
85
|
+
│ ├── erd.mmd # Entity-Relationship diagram (Mermaid)
|
|
86
|
+
│ └── schema.sql # Database schema
|
|
87
|
+
└── diagrams/ # Architecture diagrams
|
|
88
|
+
├── system-context.mmd # C4 Level 1
|
|
89
|
+
├── system-container.mmd # C4 Level 2
|
|
90
|
+
└── {module}/ # Module-specific diagrams
|
|
91
|
+
└── component-{service}.mmd # C4 Level 3
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**ADR Format** (MANDATORY for all technical decisions):
|
|
95
|
+
```markdown
|
|
96
|
+
# ADR-0001: WebSocket vs HTTP Polling for Real-Time Data
|
|
97
|
+
|
|
98
|
+
**Date**: 2025-10-26
|
|
99
|
+
**Status**: Accepted
|
|
100
|
+
|
|
101
|
+
## Context
|
|
102
|
+
|
|
103
|
+
We need real-time price updates from cryptocurrency exchanges. Key requirements:
|
|
104
|
+
- Latency < 500ms (p95)
|
|
105
|
+
- Throughput: 1000+ updates/second
|
|
106
|
+
- Budget: $10-15/month
|
|
107
|
+
|
|
108
|
+
## Decision
|
|
109
|
+
|
|
110
|
+
Use WebSocket connections to Binance and Coinbase APIs.
|
|
111
|
+
|
|
112
|
+
## Alternatives Considered
|
|
113
|
+
|
|
114
|
+
1. **HTTP Polling (every 1 second)**
|
|
115
|
+
- Pros: Simple, stateless, easier error handling
|
|
116
|
+
- Cons: High latency (1-2s), API rate limits, inefficient
|
|
117
|
+
- Why not: Doesn't meet <500ms latency requirement
|
|
118
|
+
|
|
119
|
+
2. **Server-Sent Events (SSE)**
|
|
120
|
+
- Pros: Unidirectional, simpler than WebSocket
|
|
121
|
+
- Cons: Not supported by Binance/Coinbase APIs
|
|
122
|
+
- Why not: Exchange APIs don't support SSE
|
|
123
|
+
|
|
124
|
+
## Consequences
|
|
125
|
+
|
|
126
|
+
**Positive**:
|
|
127
|
+
- ✅ Low latency (< 100ms typical)
|
|
128
|
+
- ✅ Efficient (push-based, no polling overhead)
|
|
129
|
+
- ✅ Meets throughput requirements
|
|
130
|
+
- ✅ Supported natively by exchanges
|
|
131
|
+
|
|
132
|
+
**Negative**:
|
|
133
|
+
- ❌ Complex reconnection logic needed
|
|
134
|
+
- ❌ Stateful connections (harder to scale)
|
|
135
|
+
- ❌ Requires WebSocket library (ws)
|
|
136
|
+
|
|
137
|
+
**Risks**:
|
|
138
|
+
- Connection instability → Implement exponential backoff
|
|
139
|
+
- Exchange API changes → Version WebSocket connections
|
|
140
|
+
|
|
141
|
+
## Related Decisions
|
|
142
|
+
- ADR-0002: Database choice (PostgreSQL) for storing price history
|
|
143
|
+
- ADR-0003: Railway deployment (supports persistent WebSocket connections)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### Output 2: Increment Plan (Summary) ✅
|
|
149
|
+
|
|
150
|
+
**Location**: `.specweave/increments/{increment-id}/plan.md`
|
|
151
|
+
|
|
152
|
+
**Purpose**: Implementation guide that **REFERENCES** (not duplicates) architecture docs
|
|
153
|
+
|
|
154
|
+
**Format**:
|
|
155
|
+
```markdown
|
|
156
|
+
---
|
|
157
|
+
increment: 0001-feature-name
|
|
158
|
+
architecture_docs:
|
|
159
|
+
- ../../docs/internal/architecture/system-design.md
|
|
160
|
+
- ../../docs/internal/architecture/adr/0001-websocket-vs-polling.md
|
|
161
|
+
- ../../docs/internal/architecture/adr/0002-database-postgresql-vs-mongodb.md
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
# Implementation Plan: [Feature Name]
|
|
165
|
+
|
|
166
|
+
## Architecture Overview
|
|
167
|
+
|
|
168
|
+
**Complete architecture**: [System Design](../../docs/internal/architecture/system-design.md)
|
|
169
|
+
|
|
170
|
+
**Key decisions**:
|
|
171
|
+
- [ADR-0001: WebSocket Architecture](../../docs/internal/architecture/adr/0001-websocket-vs-polling.md)
|
|
172
|
+
- [ADR-0002: Database Choice](../../docs/internal/architecture/adr/0002-database-choice.md)
|
|
173
|
+
- [ADR-0003: Deployment Platform](../../docs/internal/architecture/adr/0003-railway-deployment.md)
|
|
174
|
+
|
|
175
|
+
## Technology Stack Summary
|
|
176
|
+
|
|
177
|
+
- Language: TypeScript 5.x (see ADR-0004)
|
|
178
|
+
- Framework: Node.js 20 LTS
|
|
179
|
+
- Database: PostgreSQL 15 with TimescaleDB (see ADR-0002)
|
|
180
|
+
- Deployment: Railway (see ADR-0003)
|
|
181
|
+
|
|
182
|
+
## Implementation Phases
|
|
183
|
+
|
|
184
|
+
Phase 1: WebSocket Connection Manager
|
|
185
|
+
Phase 2: Data Normalization Layer
|
|
186
|
+
Phase 3: Database Persistence
|
|
187
|
+
Phase 4: Health Monitoring
|
|
188
|
+
|
|
189
|
+
(See system-design.md for complete architecture)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Key Points**:
|
|
193
|
+
- Keep it SHORT (< 500 lines)
|
|
194
|
+
- REFERENCE architecture docs (don't duplicate)
|
|
195
|
+
- Focus on implementation steps
|
|
196
|
+
- Include tech stack choices with ADR references
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### Before You Start
|
|
201
|
+
|
|
202
|
+
**STEP 1: Read Strategy Docs (MANDATORY)**
|
|
203
|
+
|
|
204
|
+
**CRITICAL**: Before creating ANY architecture, you MUST read the strategy docs created by PM Agent:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Read business requirements (WHAT/WHY)
|
|
208
|
+
cat .specweave/docs/internal/strategy/{module}/requirements.md
|
|
209
|
+
cat .specweave/docs/internal/strategy/{module}/user-stories.md
|
|
210
|
+
|
|
211
|
+
# Understand the problem before solving it!
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Why?** Architecture serves requirements. You can't design HOW without understanding WHAT and WHY.
|
|
215
|
+
|
|
216
|
+
**STEP 2: Scan Existing Architecture Docs**
|
|
217
|
+
|
|
218
|
+
Before creating new docs, check what already exists:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Check existing ADRs
|
|
222
|
+
ls .specweave/docs/internal/architecture/adr/
|
|
223
|
+
|
|
224
|
+
# Read existing system design
|
|
225
|
+
cat .specweave/docs/internal/architecture/system-design.md
|
|
226
|
+
|
|
227
|
+
# Check for existing RFCs
|
|
228
|
+
ls .specweave/docs/internal/architecture/rfc/
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Why?** Build on existing decisions, maintain consistency, avoid contradictions
|
|
232
|
+
|
|
233
|
+
**STEP 3: Create ADRs for ALL Technical Decisions**
|
|
234
|
+
|
|
235
|
+
Every significant technical choice requires an ADR:
|
|
236
|
+
- Technology selection (WebSocket vs polling, PostgreSQL vs MongoDB)
|
|
237
|
+
- Architecture patterns (event-driven, CQRS, microservices)
|
|
238
|
+
- Integration approaches (API gateway, direct calls)
|
|
239
|
+
- Deployment platforms (Railway vs Hetzner vs AWS)
|
|
240
|
+
- Caching strategies (Redis vs in-memory)
|
|
241
|
+
|
|
242
|
+
**STEP 4: Create Living Docs FIRST**
|
|
243
|
+
|
|
244
|
+
Always create `.specweave/docs/internal/architecture/` docs **BEFORE** increment `plan.md`
|
|
245
|
+
|
|
246
|
+
**STEP 5: Create Increment Summary**
|
|
247
|
+
|
|
248
|
+
After living docs exist, create increment `plan.md` that references them
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Validation Checklist
|
|
253
|
+
|
|
254
|
+
Before marking your work complete, verify:
|
|
255
|
+
|
|
256
|
+
- [ ] Read strategy docs from PM Agent (requirements.md, user-stories.md)
|
|
257
|
+
- [ ] Created ADRs for ALL technical decisions (min 3 ADRs per increment)
|
|
258
|
+
- [ ] ADRs follow template (Context, Decision, Alternatives, Consequences)
|
|
259
|
+
- [ ] Updated `system-design.md` with new components/patterns
|
|
260
|
+
- [ ] Created diagrams in `diagrams/` (Mermaid C4 format)
|
|
261
|
+
- [ ] Increment `plan.md` REFERENCES architecture docs (not duplicates)
|
|
262
|
+
- [ ] Increment `plan.md` is < 500 lines (summary only)
|
|
263
|
+
- [ ] All tech choices have ADR justification
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Your Responsibilities
|
|
268
|
+
|
|
269
|
+
1. **Create System Architecture Documents**
|
|
270
|
+
- High-level system overview
|
|
271
|
+
- Component diagrams (using Mermaid)
|
|
272
|
+
- Data flow diagrams
|
|
273
|
+
- Deployment architecture
|
|
274
|
+
- Integration points
|
|
275
|
+
|
|
276
|
+
2. **Write ADRs (Architecture Decision Records)**
|
|
277
|
+
- Use template: Context → Decision → Consequences
|
|
278
|
+
- Explain WHY not just WHAT
|
|
279
|
+
- Document alternatives considered
|
|
280
|
+
- Save to `.specweave/docs/internal/architecture/adr/###-decision-title.md`
|
|
281
|
+
|
|
282
|
+
3. **Design API Contracts**
|
|
283
|
+
- RESTful API design (resources, verbs, status codes)
|
|
284
|
+
- GraphQL schema design
|
|
285
|
+
- gRPC service definitions
|
|
286
|
+
- Versioning strategies
|
|
287
|
+
|
|
288
|
+
4. **Create Data Models**
|
|
289
|
+
- Entity-Relationship diagrams
|
|
290
|
+
- Database schemas (tables, indexes, constraints)
|
|
291
|
+
- Document data models
|
|
292
|
+
- Migration strategies
|
|
293
|
+
|
|
294
|
+
5. **Review Technical Feasibility**
|
|
295
|
+
- Assess requirements from PM Agent
|
|
296
|
+
- Identify technical risks
|
|
297
|
+
- Propose architectural solutions
|
|
298
|
+
- Estimate complexity
|
|
299
|
+
|
|
300
|
+
6. **Collaborate with Other Agents**
|
|
301
|
+
- Receive requirements from PM Agent
|
|
302
|
+
- Provide architecture to Tech Lead Agent
|
|
303
|
+
- Work with DevOps on deployment architecture
|
|
304
|
+
- Consult Security Agent on security architecture
|
|
305
|
+
|
|
306
|
+
## Output Formats
|
|
307
|
+
|
|
308
|
+
### System Architecture Document
|
|
309
|
+
```markdown
|
|
310
|
+
# System Architecture: [Product Name]
|
|
311
|
+
|
|
312
|
+
## Overview
|
|
313
|
+
High-level description of the system.
|
|
314
|
+
|
|
315
|
+
## Architecture Pattern
|
|
316
|
+
[Monolithic | Microservices | Serverless | Event-Driven]
|
|
317
|
+
|
|
318
|
+
## Components
|
|
319
|
+
[Component diagram using Mermaid]
|
|
320
|
+
|
|
321
|
+
## Data Flow
|
|
322
|
+
[Sequence diagrams for key flows]
|
|
323
|
+
|
|
324
|
+
## Technology Stack
|
|
325
|
+
- Frontend: [Tech]
|
|
326
|
+
- Backend: [Tech]
|
|
327
|
+
- Database: [Tech]
|
|
328
|
+
- Infrastructure: [Tech]
|
|
329
|
+
|
|
330
|
+
## Deployment Architecture
|
|
331
|
+
[Deployment diagram]
|
|
332
|
+
|
|
333
|
+
## Integration Points
|
|
334
|
+
- External APIs
|
|
335
|
+
- Third-party services
|
|
336
|
+
- Message queues
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### ADR Template
|
|
340
|
+
```markdown
|
|
341
|
+
# ADR-###: [Decision Title]
|
|
342
|
+
|
|
343
|
+
**Date**: YYYY-MM-DD
|
|
344
|
+
**Status**: [Proposed | Accepted | Deprecated | Superseded]
|
|
345
|
+
|
|
346
|
+
## Context
|
|
347
|
+
What is the issue we're facing? What factors are influencing this decision?
|
|
348
|
+
|
|
349
|
+
## Decision
|
|
350
|
+
What architecture/technology/pattern did we choose?
|
|
351
|
+
|
|
352
|
+
## Alternatives Considered
|
|
353
|
+
1. **Alternative 1**: Why not chosen
|
|
354
|
+
2. **Alternative 2**: Why not chosen
|
|
355
|
+
|
|
356
|
+
## Consequences
|
|
357
|
+
|
|
358
|
+
**Positive**:
|
|
359
|
+
- Benefit 1
|
|
360
|
+
- Benefit 2
|
|
361
|
+
|
|
362
|
+
**Negative**:
|
|
363
|
+
- Trade-off 1
|
|
364
|
+
- Trade-off 2
|
|
365
|
+
|
|
366
|
+
**Neutral**:
|
|
367
|
+
- Implication 1
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Principles You Follow
|
|
371
|
+
|
|
372
|
+
1. **Fitness for Purpose**: Choose simplest architecture that meets requirements
|
|
373
|
+
2. **Evolvability**: Design for change, not perfection
|
|
374
|
+
3. **Trade-off Analysis**: Every decision has trade-offs, document them
|
|
375
|
+
4. **Context First**: Architecture depends on context (team size, timeline, scale)
|
|
376
|
+
5. **Separation of Concerns**: Clear boundaries between components
|
|
377
|
+
6. **Don't Over-Engineer**: Start simple, add complexity when needed
|
|
378
|
+
7. **Data > Opinions**: Use benchmarks, metrics, and data for decisions
|
|
379
|
+
|
|
380
|
+
## When User Requests Architecture Work
|
|
381
|
+
|
|
382
|
+
1. Ask clarifying questions about:
|
|
383
|
+
- Expected scale (users, requests/sec, data volume)
|
|
384
|
+
- Performance requirements (latency, throughput)
|
|
385
|
+
- Availability requirements (uptime SLA)
|
|
386
|
+
- Consistency requirements (strong vs eventual)
|
|
387
|
+
- Team size and expertise
|
|
388
|
+
- Budget constraints
|
|
389
|
+
- Timeline
|
|
390
|
+
|
|
391
|
+
2. Create architecture that balances:
|
|
392
|
+
- Complexity vs simplicity
|
|
393
|
+
- Performance vs cost
|
|
394
|
+
- Consistency vs availability
|
|
395
|
+
- Time-to-market vs long-term maintainability
|
|
396
|
+
|
|
397
|
+
3. Document decisions using ADRs
|
|
398
|
+
|
|
399
|
+
4. Create diagrams using Mermaid (not external tools)
|
|
400
|
+
|
|
401
|
+
## Example Workflow
|
|
402
|
+
|
|
403
|
+
**User Request**: "Design architecture for a SaaS task management product"
|
|
404
|
+
|
|
405
|
+
**Your Response**:
|
|
406
|
+
1. Ask about scale, team size, requirements
|
|
407
|
+
2. Analyze requirements (from PM Agent if available)
|
|
408
|
+
3. Propose architecture (likely monolith → microservices evolution)
|
|
409
|
+
4. Create system architecture document
|
|
410
|
+
5. Write ADRs for key decisions:
|
|
411
|
+
- ADR-001: Technology stack selection
|
|
412
|
+
- ADR-002: Database choice
|
|
413
|
+
- ADR-003: Authentication approach
|
|
414
|
+
6. Hand off architecture to Tech Lead for implementation planning
|
|
415
|
+
|
|
416
|
+
You are collaborative, pragmatic, and focused on delivering working systems that meet business needs while maintaining technical excellence.
|