specweave 0.6.8 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +903 -99
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/cli/commands/abandon.d.ts +13 -0
- package/dist/cli/commands/abandon.d.ts.map +1 -0
- package/dist/cli/commands/abandon.js +15 -0
- package/dist/cli/commands/abandon.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +94 -18
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/pause.d.ts +13 -0
- package/dist/cli/commands/pause.d.ts.map +1 -0
- package/dist/cli/commands/pause.js +15 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/qa.d.ts +54 -0
- package/dist/cli/commands/qa.d.ts.map +1 -0
- package/dist/cli/commands/qa.js +98 -0
- package/dist/cli/commands/qa.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +12 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +14 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +23 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.js +223 -0
- package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.js +284 -0
- package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.js +270 -0
- package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.js +265 -0
- package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.js +16 -0
- package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.js +240 -0
- package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
- package/dist/core/increment/limits.d.ts +68 -0
- package/dist/core/increment/limits.d.ts.map +1 -0
- package/dist/core/increment/limits.js +224 -0
- package/dist/core/increment/limits.js.map +1 -0
- package/dist/core/increment/metadata-manager.d.ts +114 -0
- package/dist/core/increment/metadata-manager.d.ts.map +1 -0
- package/dist/core/increment/metadata-manager.js +320 -0
- package/dist/core/increment/metadata-manager.js.map +1 -0
- package/dist/core/increment/status-commands.d.ts +43 -0
- package/dist/core/increment/status-commands.d.ts.map +1 -0
- package/dist/core/increment/status-commands.js +277 -0
- package/dist/core/increment/status-commands.js.map +1 -0
- package/dist/core/plugin-detector.d.ts +1 -0
- package/dist/core/plugin-detector.d.ts.map +1 -1
- package/dist/core/plugin-detector.js +25 -0
- package/dist/core/plugin-detector.js.map +1 -1
- package/dist/core/qa/qa-runner.d.ts +16 -0
- package/dist/core/qa/qa-runner.d.ts.map +1 -0
- package/dist/core/qa/qa-runner.js +404 -0
- package/dist/core/qa/qa-runner.js.map +1 -0
- package/dist/core/qa/quality-gate-decider.d.ts +53 -0
- package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
- package/dist/core/qa/quality-gate-decider.js +268 -0
- package/dist/core/qa/quality-gate-decider.js.map +1 -0
- package/dist/core/qa/risk-calculator.d.ts +126 -0
- package/dist/core/qa/risk-calculator.d.ts.map +1 -0
- package/dist/core/qa/risk-calculator.js +247 -0
- package/dist/core/qa/risk-calculator.js.map +1 -0
- package/dist/core/qa/types.d.ts +315 -0
- package/dist/core/qa/types.d.ts.map +1 -0
- package/dist/core/qa/types.js +8 -0
- package/dist/core/qa/types.js.map +1 -0
- package/dist/core/types/config.d.ts +35 -0
- package/dist/core/types/config.d.ts.map +1 -1
- package/dist/core/types/config.js +16 -0
- package/dist/core/types/config.js.map +1 -1
- package/dist/core/types/increment-metadata.d.ts +120 -0
- package/dist/core/types/increment-metadata.d.ts.map +1 -0
- package/dist/core/types/increment-metadata.js +138 -0
- package/dist/core/types/increment-metadata.js.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/hooks/lib/translate-file.d.ts +59 -0
- package/dist/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/hooks/lib/translate-file.js +350 -0
- package/dist/hooks/lib/translate-file.js.map +1 -0
- package/dist/locales/en/cli.json +3 -1
- package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
- package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
- package/dist/metrics/calculators/change-failure-rate.js +70 -0
- package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.js +61 -0
- package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
- package/dist/metrics/calculators/lead-time.d.ts +22 -0
- package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
- package/dist/metrics/calculators/lead-time.js +82 -0
- package/dist/metrics/calculators/lead-time.js.map +1 -0
- package/dist/metrics/calculators/mttr.d.ts +21 -0
- package/dist/metrics/calculators/mttr.d.ts.map +1 -0
- package/dist/metrics/calculators/mttr.js +60 -0
- package/dist/metrics/calculators/mttr.js.map +1 -0
- package/dist/metrics/dora-calculator.d.ts +24 -0
- package/dist/metrics/dora-calculator.d.ts.map +1 -0
- package/dist/metrics/dora-calculator.js +104 -0
- package/dist/metrics/dora-calculator.js.map +1 -0
- package/dist/metrics/github-client.d.ts +51 -0
- package/dist/metrics/github-client.d.ts.map +1 -0
- package/dist/metrics/github-client.js +133 -0
- package/dist/metrics/github-client.js.map +1 -0
- package/dist/metrics/types.d.ts +112 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/metrics/types.js +10 -0
- package/dist/metrics/types.js.map +1 -0
- package/dist/metrics/utils/percentile.d.ts +25 -0
- package/dist/metrics/utils/percentile.d.ts.map +1 -0
- package/dist/metrics/utils/percentile.js +46 -0
- package/dist/metrics/utils/percentile.js.map +1 -0
- package/dist/metrics/utils/tier-classifier.d.ts +61 -0
- package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
- package/dist/metrics/utils/tier-classifier.js +100 -0
- package/dist/metrics/utils/tier-classifier.js.map +1 -0
- package/dist/utils/auth-helpers.d.ts +58 -0
- package/dist/utils/auth-helpers.d.ts.map +1 -0
- package/dist/utils/auth-helpers.js +108 -0
- package/dist/utils/auth-helpers.js.map +1 -0
- package/dist/utils/env-file.d.ts +88 -0
- package/dist/utils/env-file.d.ts.map +1 -0
- package/dist/utils/env-file.js +180 -0
- package/dist/utils/env-file.js.map +1 -0
- package/dist/utils/plugin-detection.d.ts +50 -0
- package/dist/utils/plugin-detection.d.ts.map +1 -0
- package/dist/utils/plugin-detection.js +229 -0
- package/dist/utils/plugin-detection.js.map +1 -0
- package/dist/utils/secrets-loader.d.ts +88 -0
- package/dist/utils/secrets-loader.d.ts.map +1 -0
- package/dist/utils/secrets-loader.js +271 -0
- package/dist/utils/secrets-loader.js.map +1 -0
- package/dist/utils/translation.d.ts +187 -0
- package/dist/utils/translation.d.ts.map +1 -0
- package/dist/utils/translation.js +414 -0
- package/dist/utils/translation.js.map +1 -0
- package/package.json +28 -44
- package/plugins/specweave/.claude-plugin/plugin.json +3 -3
- package/plugins/specweave/agents/pm/AGENT.md +330 -54
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
- package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
- package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
- package/plugins/specweave/commands/README.md +88 -163
- package/plugins/specweave/commands/specweave-abandon.md +314 -0
- package/plugins/specweave/commands/specweave-check-tests.md +546 -0
- package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
- package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
- package/plugins/specweave/commands/specweave-pause.md +189 -0
- package/plugins/specweave/commands/specweave-qa.md +245 -0
- package/plugins/specweave/commands/specweave-resume.md +216 -0
- package/plugins/specweave/commands/specweave-status.md +397 -0
- package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
- package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
- package/plugins/specweave/commands/specweave-update-scope.md +351 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +141 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
- package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
- package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
- package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
- package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
- package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
- package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
- package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
- package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
- package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
- package/plugins/specweave-ado/commands/close-workitem.md +52 -0
- package/plugins/specweave-ado/commands/create-workitem.md +53 -0
- package/plugins/specweave-ado/commands/status.md +53 -0
- package/plugins/specweave-ado/commands/sync.md +55 -0
- package/plugins/specweave-ado/lib/ado-client.ts +361 -0
- package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
- package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
- package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
- package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
- package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
- package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
- package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
- package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
- package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
- package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
- package/plugins/specweave-ml/commands/ml-explain.md +1 -1
- package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
- package/src/templates/AGENTS.md.template +331 -31
- package/src/templates/CLAUDE.md.template +36 -21
- package/src/templates/COMPLETION-REPORT.template.md +128 -0
- package/src/templates/README.md.template +17 -16
- package/src/templates/docs/README.md +11 -9
- package/src/templates/docs/spec-template.md +229 -0
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -275
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -256
- package/src/adapters/agents-md-generator.ts +0 -228
- package/src/adapters/claude/README.md +0 -233
- package/src/adapters/claude/adapter.ts +0 -468
- package/src/adapters/claude-md-generator.ts +0 -377
- package/src/adapters/codex/README.md +0 -105
- package/src/adapters/codex/adapter.ts +0 -333
- package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
- package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
- package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
- package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
- package/src/adapters/cursor/README.md +0 -283
- package/src/adapters/cursor/adapter.ts +0 -451
- package/src/adapters/doc-generator.ts +0 -331
- package/src/adapters/gemini/README.md +0 -97
- package/src/adapters/gemini/adapter.ts +0 -298
- package/src/adapters/generic/README.md +0 -277
- package/src/adapters/generic/adapter.ts +0 -378
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
- /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
- /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
- /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
- /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
- /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
- /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
- /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
- /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
- /package/plugins/specweave/commands/{validate.md → specweave-validate.md} +0 -0
package/src/adapters/README.md
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
# SpecWeave Adapters
|
|
2
|
-
|
|
3
|
-
**Version**: 0.2.0 (Multi-Tool Support)
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
SpecWeave adapters enable the framework to work with **ANY AI coding tool**, not just Claude Code. This directory contains all adapter implementations that provide tool-specific enhancements while maintaining a tool-agnostic core.
|
|
8
|
-
|
|
9
|
-
## Architecture
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
SpecWeave
|
|
13
|
-
├── Core (Tool-Agnostic)
|
|
14
|
-
│ └── .specweave/ # Plain Markdown + YAML
|
|
15
|
-
│ ├── increments/
|
|
16
|
-
│ └── docs/
|
|
17
|
-
│
|
|
18
|
-
└── Adapters (Optional)
|
|
19
|
-
├── Claude # Full automation (native)
|
|
20
|
-
│ ├── .claude/skills/
|
|
21
|
-
│ ├── .claude/agents/
|
|
22
|
-
│ └── .claude/hooks/
|
|
23
|
-
│
|
|
24
|
-
├── Cursor # Partial automation
|
|
25
|
-
│ ├── .cursorrules (legacy)
|
|
26
|
-
│ └── AGENTS.md
|
|
27
|
-
│
|
|
28
|
-
└── Generic # Limited features
|
|
29
|
-
└── AGENTS.md # Works with Copilot, ChatGPT, Gemini
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Available Adapters
|
|
33
|
-
|
|
34
|
-
| Adapter | Automation | Tools | Status |
|
|
35
|
-
|---------|------------|-------|--------|
|
|
36
|
-
| **Claude** | Full (skills, agents, hooks) | Claude Code | ✅ Active |
|
|
37
|
-
| **Cursor** | Partial (AGENTS.md, team commands, less reliable) | Cursor | ✅ Active |
|
|
38
|
-
| **Generic** | Limited (AGENTS.md, no hooks, manual workflow) | Copilot, ChatGPT, Gemini, etc. | ✅ Active |
|
|
39
|
-
|
|
40
|
-
**Total Market Coverage**: 100% (works with ANY AI tool)
|
|
41
|
-
|
|
42
|
-
**Note**: Claude Code is the only fully reliable option. Others have reduced features and reliability.
|
|
43
|
-
|
|
44
|
-
## Adapter Interface
|
|
45
|
-
|
|
46
|
-
All adapters implement the `IAdapter` interface defined in `adapter-interface.ts`:
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
interface IAdapter {
|
|
50
|
-
name: string;
|
|
51
|
-
description: string;
|
|
52
|
-
automationLevel: 'full' | 'semi' | 'basic' | 'manual';
|
|
53
|
-
|
|
54
|
-
detect(): Promise<boolean>;
|
|
55
|
-
checkRequirements(): Promise<RequirementsResult>;
|
|
56
|
-
getFiles(): AdapterFile[];
|
|
57
|
-
install(options: AdapterOptions): Promise<void>;
|
|
58
|
-
postInstall(options: AdapterOptions): Promise<void>;
|
|
59
|
-
getInstructions(): string;
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## How Adapters Work
|
|
64
|
-
|
|
65
|
-
### 1. Claude Adapter (Full Automation)
|
|
66
|
-
|
|
67
|
-
**Files Installed**:
|
|
68
|
-
- `.claude/skills/` - Auto-activating skills (specweave-detector, skill-router, etc.)
|
|
69
|
-
- `.claude/agents/` - Specialized agents (PM, Architect, DevOps, QA, Security)
|
|
70
|
-
- `.claude/commands/` - Slash commands (/create-increment, /sync-docs, etc.)
|
|
71
|
-
- `.claude/hooks/` - Auto-update hooks (post-task-completion, etc.)
|
|
72
|
-
|
|
73
|
-
**Features**:
|
|
74
|
-
- Skills auto-activate based on user requests
|
|
75
|
-
- Agents coordinate complex workflows
|
|
76
|
-
- Hooks auto-update documentation
|
|
77
|
-
- Slash commands for quick actions
|
|
78
|
-
- Best-in-class experience
|
|
79
|
-
|
|
80
|
-
**Detection**: Checks for Claude Code CLI
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
### 2. Cursor Adapter (Semi-Automation)
|
|
85
|
-
|
|
86
|
-
**Files Installed**:
|
|
87
|
-
- `.cursorrules` - Workflow instructions for Cursor AI
|
|
88
|
-
- `.cursor/context/` - Context shortcut files
|
|
89
|
-
|
|
90
|
-
**Features**:
|
|
91
|
-
- @ shortcuts: `@increments`, `@docs`, `@strategy`
|
|
92
|
-
- Composer multi-file editing guided by .cursorrules
|
|
93
|
-
- Context manifests work via manual reference
|
|
94
|
-
|
|
95
|
-
**Workflow Instructions** (in .cursorrules):
|
|
96
|
-
```markdown
|
|
97
|
-
# SpecWeave Configuration for Cursor
|
|
98
|
-
|
|
99
|
-
## When user requests a feature:
|
|
100
|
-
1. Check if increment exists in `.specweave/increments/####-name/`
|
|
101
|
-
2. If not, create: spec.md, plan.md, tasks.md
|
|
102
|
-
|
|
103
|
-
## Context Loading (70%+ Token Reduction)
|
|
104
|
-
**CRITICAL**: Always read `context-manifest.yaml` first!
|
|
105
|
-
Only load files listed in manifest.
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Detection**: Checks for Cursor editor process or .cursor/ directory
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
### 3. Generic Adapter (Limited Features)
|
|
113
|
-
|
|
114
|
-
**Files Installed**:
|
|
115
|
-
- `AGENTS.md` - Universal instruction file for all AI tools
|
|
116
|
-
|
|
117
|
-
**Features**:
|
|
118
|
-
- Works with Copilot, ChatGPT, Gemini, and ANY AI tool
|
|
119
|
-
- AGENTS.md format (https://agents.md/)
|
|
120
|
-
- No automation (manual workflow)
|
|
121
|
-
- No hooks (manual living docs sync)
|
|
122
|
-
- High context usage
|
|
123
|
-
|
|
124
|
-
**Manual Guide** (SPECWEAVE.md):
|
|
125
|
-
```markdown
|
|
126
|
-
# SpecWeave Manual Workflow
|
|
127
|
-
|
|
128
|
-
## Step 1: Create Feature
|
|
129
|
-
```bash
|
|
130
|
-
mkdir -p .specweave/increments/0001-feature-name
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Step 2: Create spec.md
|
|
134
|
-
[Detailed template and instructions]
|
|
135
|
-
|
|
136
|
-
## Step 3: Load Context
|
|
137
|
-
Copy files listed in `context-manifest.yaml` to your AI chat.
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Detection**: Always returns `true` (universal fallback)
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Command Mechanism
|
|
145
|
-
|
|
146
|
-
**Critical Insight**: Commands work differently across tools.
|
|
147
|
-
|
|
148
|
-
### Claude Code (Native Slash Commands)
|
|
149
|
-
- User types `/create-increment "user auth"` in Claude chat
|
|
150
|
-
- Command file in `.claude/commands/create-increment.md` is loaded
|
|
151
|
-
- Command executes with full context
|
|
152
|
-
|
|
153
|
-
### Cursor (Instruction-Based)
|
|
154
|
-
- User types: "create increment for user auth"
|
|
155
|
-
- Cursor reads `.cursorrules` which contains workflow instructions
|
|
156
|
-
- AI follows instructions step-by-step
|
|
157
|
-
|
|
158
|
-
### Generic / Copilot / ChatGPT (AGENTS.md)
|
|
159
|
-
- All tools read `AGENTS.md` (universal standard)
|
|
160
|
-
- Copilot reads it automatically in VS Code
|
|
161
|
-
- ChatGPT/Gemini: User copies sections to chat
|
|
162
|
-
- Manual workflow with AI assistance
|
|
163
|
-
|
|
164
|
-
**Pattern**: AGENTS.md is the universal instruction format. Only Claude Code uses native plugins (.claude/).
|
|
165
|
-
|
|
166
|
-
## Installation
|
|
167
|
-
|
|
168
|
-
### For Users (Select Adapter)
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Auto-detect tool and install appropriate adapter
|
|
172
|
-
npx specweave init my-project
|
|
173
|
-
|
|
174
|
-
# Or specify adapter explicitly
|
|
175
|
-
npx specweave init my-project --adapter claude
|
|
176
|
-
npx specweave init my-project --adapter cursor
|
|
177
|
-
npx specweave init my-project --adapter generic # For Copilot, ChatGPT, Gemini
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### For Developers (Install All Adapters)
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
# Install all adapters to SpecWeave framework
|
|
184
|
-
npm run install:adapters
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Adding New Adapters
|
|
188
|
-
|
|
189
|
-
To add support for a new tool:
|
|
190
|
-
|
|
191
|
-
1. **Create adapter directory**: `src/adapters/your-tool/`
|
|
192
|
-
2. **Create adapter class**: `src/adapters/your-tool/adapter.ts`
|
|
193
|
-
3. **Implement IAdapter interface**
|
|
194
|
-
4. **Add template files**: Tool-specific instruction files
|
|
195
|
-
5. **Add to registry**: Update `registry.yaml`
|
|
196
|
-
6. **Add test cases**: Minimum 3 test cases
|
|
197
|
-
7. **Update CLI**: Add detection logic
|
|
198
|
-
|
|
199
|
-
**Example**:
|
|
200
|
-
```typescript
|
|
201
|
-
// src/adapters/windsurf/adapter.ts
|
|
202
|
-
import { AdapterBase } from '../adapter-base';
|
|
203
|
-
|
|
204
|
-
export class WindsurfAdapter extends AdapterBase {
|
|
205
|
-
name = 'windsurf';
|
|
206
|
-
description = 'Windsurf adapter with semi-automation';
|
|
207
|
-
automationLevel = 'semi' as const;
|
|
208
|
-
|
|
209
|
-
async detect(): Promise<boolean> {
|
|
210
|
-
// Check if Windsurf is installed
|
|
211
|
-
return this.commandExists('windsurf');
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
getFiles(): AdapterFile[] {
|
|
215
|
-
return [
|
|
216
|
-
{
|
|
217
|
-
sourcePath: '.windsurfrules',
|
|
218
|
-
targetPath: '.windsurfrules',
|
|
219
|
-
description: 'Windsurf workflow instructions'
|
|
220
|
-
}
|
|
221
|
-
];
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
getInstructions(): string {
|
|
225
|
-
return `
|
|
226
|
-
# Windsurf Adapter Installed
|
|
227
|
-
|
|
228
|
-
Your project is now configured for Windsurf.
|
|
229
|
-
...
|
|
230
|
-
`;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
## Testing Adapters
|
|
236
|
-
|
|
237
|
-
Each adapter MUST have minimum 3 test cases in `test-cases/`:
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
src/adapters/cursor/
|
|
241
|
-
├── adapter.ts
|
|
242
|
-
├── .cursorrules (template)
|
|
243
|
-
└── test-cases/
|
|
244
|
-
├── test-1-install.yaml
|
|
245
|
-
├── test-2-detection.yaml
|
|
246
|
-
└── test-3-workflow.yaml
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Related Documentation
|
|
250
|
-
|
|
251
|
-
- [adapter-interface.ts](./adapter-interface.ts) - Complete interface definition
|
|
252
|
-
- [adapter-base.ts](./adapter-base.ts) - Base class implementation
|
|
253
|
-
- [registry.yaml](./registry.yaml) - List of all adapters
|
|
254
|
-
- [.specweave/increments/0002-multi-tool-support/](../../.specweave/increments/0002-multi-tool-support/) - Implementation plan
|
|
255
|
-
|
|
256
|
-
## Design Philosophy
|
|
257
|
-
|
|
258
|
-
**Core Principle**: Separate tool-agnostic core from tool-specific enhancements.
|
|
259
|
-
|
|
260
|
-
**Benefits**:
|
|
261
|
-
1. ✅ Users can switch AI tools without losing SpecWeave benefits
|
|
262
|
-
2. ✅ 100% market coverage (works with ANY AI)
|
|
263
|
-
3. ✅ No tool lock-in
|
|
264
|
-
4. ✅ Best experience with supported tools, functional experience with any tool
|
|
265
|
-
5. ✅ Easy to add support for new tools
|
|
266
|
-
|
|
267
|
-
**Inspiration**:
|
|
268
|
-
- **spec-kit** (GitHub): Agent-agnostic approach, plain text commands
|
|
269
|
-
- **BMAD-METHOD**: Portable prompt bundles work across multiple AIs
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
**Status**: Implementation in progress (Increment 0002)
|
|
274
|
-
**Branch**: features/002-multi-tool-support
|
|
275
|
-
**Target**: v0.2.0-beta.1
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base Adapter Class
|
|
3
|
-
*
|
|
4
|
-
* Provides common functionality for all adapters.
|
|
5
|
-
* Concrete adapters extend this class and implement tool-specific logic.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import fs from 'fs-extra';
|
|
9
|
-
import * as path from 'path';
|
|
10
|
-
import { execSync } from 'child_process';
|
|
11
|
-
import {
|
|
12
|
-
IAdapter,
|
|
13
|
-
AdapterOptions,
|
|
14
|
-
RequirementsResult,
|
|
15
|
-
AdapterFile,
|
|
16
|
-
AutomationLevel
|
|
17
|
-
} from './adapter-interface.js';
|
|
18
|
-
import { getDirname } from '../utils/esm-helpers.js';
|
|
19
|
-
import type { Plugin } from '../core/types/plugin.js';
|
|
20
|
-
|
|
21
|
-
const __dirname = getDirname(import.meta.url);
|
|
22
|
-
|
|
23
|
-
export abstract class AdapterBase implements IAdapter {
|
|
24
|
-
abstract name: string;
|
|
25
|
-
abstract description: string;
|
|
26
|
-
abstract automationLevel: AutomationLevel;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Default detection - override in concrete adapters
|
|
30
|
-
*/
|
|
31
|
-
async detect(): Promise<boolean> {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Check common requirements (Node.js, Git)
|
|
37
|
-
* Concrete adapters can override to add tool-specific checks
|
|
38
|
-
*/
|
|
39
|
-
async checkRequirements(): Promise<RequirementsResult> {
|
|
40
|
-
const result: RequirementsResult = {
|
|
41
|
-
met: true,
|
|
42
|
-
missing: [],
|
|
43
|
-
warnings: []
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// Check Node.js version
|
|
47
|
-
const nodeVersion = process.version;
|
|
48
|
-
const majorVersion = parseInt(nodeVersion.split('.')[0].slice(1));
|
|
49
|
-
|
|
50
|
-
if (majorVersion < 18) {
|
|
51
|
-
result.met = false;
|
|
52
|
-
result.missing.push(`Node.js >= 18.0.0 (current: ${nodeVersion})`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Check Git
|
|
56
|
-
try {
|
|
57
|
-
execSync('git --version', { stdio: 'ignore' });
|
|
58
|
-
} catch (error) {
|
|
59
|
-
result.warnings.push('Git not found - version control features may not work');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Get files to install - must be implemented by concrete adapters
|
|
67
|
-
*/
|
|
68
|
-
abstract getFiles(): AdapterFile[];
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Install adapter files to project
|
|
72
|
-
*/
|
|
73
|
-
async install(options: AdapterOptions): Promise<void> {
|
|
74
|
-
const files = this.getFiles();
|
|
75
|
-
const adapterSourceDir = path.join(__dirname, this.name);
|
|
76
|
-
|
|
77
|
-
console.log(`\n📦 Installing ${this.name} adapter files...`);
|
|
78
|
-
|
|
79
|
-
for (const file of files) {
|
|
80
|
-
const sourcePath = path.join(adapterSourceDir, file.sourcePath);
|
|
81
|
-
const targetPath = path.join(options.projectPath, file.targetPath);
|
|
82
|
-
|
|
83
|
-
// Ensure target directory exists
|
|
84
|
-
await fs.ensureDir(path.dirname(targetPath));
|
|
85
|
-
|
|
86
|
-
// Copy file
|
|
87
|
-
if (await fs.pathExists(sourcePath)) {
|
|
88
|
-
await fs.copy(sourcePath, targetPath);
|
|
89
|
-
console.log(` ✅ ${file.targetPath} - ${file.description}`);
|
|
90
|
-
} else {
|
|
91
|
-
console.warn(` ⚠️ Source file not found: ${sourcePath}`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Post-installation actions - can be overridden by concrete adapters
|
|
98
|
-
*/
|
|
99
|
-
async postInstall(options: AdapterOptions): Promise<void> {
|
|
100
|
-
// Default: Display instructions
|
|
101
|
-
console.log('\n' + this.getInstructions());
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Get usage instructions - must be implemented by concrete adapters
|
|
106
|
-
*/
|
|
107
|
-
abstract getInstructions(): string;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Helper: Check if a command exists in PATH
|
|
111
|
-
*/
|
|
112
|
-
protected async commandExists(command: string): Promise<boolean> {
|
|
113
|
-
try {
|
|
114
|
-
const { execSync } = require('child_process');
|
|
115
|
-
execSync(`which ${command}`, { stdio: 'ignore' });
|
|
116
|
-
return true;
|
|
117
|
-
} catch (error) {
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Helper: Check if a file exists
|
|
124
|
-
*/
|
|
125
|
-
protected async fileExists(filePath: string): Promise<boolean> {
|
|
126
|
-
try {
|
|
127
|
-
await fs.access(filePath);
|
|
128
|
-
return true;
|
|
129
|
-
} catch (error) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Helper: Read template file and replace variables
|
|
136
|
-
*/
|
|
137
|
-
protected async readTemplate(
|
|
138
|
-
templatePath: string,
|
|
139
|
-
variables: Record<string, string>
|
|
140
|
-
): Promise<string> {
|
|
141
|
-
let content = await fs.readFile(templatePath, 'utf-8');
|
|
142
|
-
|
|
143
|
-
// Replace all {{variable}} with actual values
|
|
144
|
-
for (const [key, value] of Object.entries(variables)) {
|
|
145
|
-
content = content.replace(new RegExp(`\\{\\{${key}\\}\\}`, 'g'), value);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return content;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Check if this adapter supports plugins
|
|
153
|
-
* Default: No plugin support (override in concrete adapters)
|
|
154
|
-
*/
|
|
155
|
-
supportsPlugins(): boolean {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Compile and install a plugin
|
|
161
|
-
* Default: Throw error (override in concrete adapters that support plugins)
|
|
162
|
-
*/
|
|
163
|
-
async compilePlugin(plugin: Plugin): Promise<void> {
|
|
164
|
-
throw new Error(`Plugin support not implemented for ${this.name} adapter`);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Unload a plugin
|
|
169
|
-
* Default: Throw error (override in concrete adapters that support plugins)
|
|
170
|
-
*/
|
|
171
|
-
async unloadPlugin(pluginName: string): Promise<void> {
|
|
172
|
-
throw new Error(`Plugin support not implemented for ${this.name} adapter`);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Get installed plugins
|
|
177
|
-
* Default: Return empty array (override in concrete adapters that support plugins)
|
|
178
|
-
*/
|
|
179
|
-
async getInstalledPlugins(): Promise<string[]> {
|
|
180
|
-
return [];
|
|
181
|
-
}
|
|
182
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter Interface for Multi-Tool Support
|
|
3
|
-
*
|
|
4
|
-
* Defines the contract that all SpecWeave adapters must implement.
|
|
5
|
-
* Enables SpecWeave to work with ANY AI coding tool (Claude, Cursor, Copilot/ChatGPT/Gemini via generic, etc.)
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { Plugin } from '../core/types/plugin.js';
|
|
9
|
-
|
|
10
|
-
export interface AdapterOptions {
|
|
11
|
-
projectPath: string;
|
|
12
|
-
projectName: string;
|
|
13
|
-
techStack?: {
|
|
14
|
-
language: string;
|
|
15
|
-
framework?: string;
|
|
16
|
-
};
|
|
17
|
-
docsApproach?: 'comprehensive' | 'incremental';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface RequirementsResult {
|
|
21
|
-
met: boolean;
|
|
22
|
-
missing: string[];
|
|
23
|
-
warnings: string[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface AdapterFile {
|
|
27
|
-
sourcePath: string; // Path in src/adapters/{adapter-name}/
|
|
28
|
-
targetPath: string; // Path in user's project (relative to project root)
|
|
29
|
-
description: string; // What this file does
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type AutomationLevel = 'full' | 'semi' | 'basic' | 'manual';
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Base Adapter Interface
|
|
36
|
-
*
|
|
37
|
-
* All adapters (Cursor, Generic) must implement this interface.
|
|
38
|
-
* Note: Claude Code is NOT an adapter - it's the native baseline experience.
|
|
39
|
-
*/
|
|
40
|
-
export interface IAdapter {
|
|
41
|
-
/**
|
|
42
|
-
* Adapter name (e.g., 'cursor', 'generic')
|
|
43
|
-
*/
|
|
44
|
-
name: string;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Human-readable description of what this adapter provides
|
|
48
|
-
*/
|
|
49
|
-
description: string;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Automation level this adapter provides
|
|
53
|
-
* - full: Complete automation (skills, agents, hooks auto-activate)
|
|
54
|
-
* - semi: Semi-automated (context shortcuts, multi-file editing)
|
|
55
|
-
* - basic: Basic automation (workspace instructions, suggestions)
|
|
56
|
-
* - manual: Manual workflow (step-by-step guide)
|
|
57
|
-
*/
|
|
58
|
-
automationLevel: AutomationLevel;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Detect if this adapter's tool is present in the environment
|
|
62
|
-
*
|
|
63
|
-
* Examples:
|
|
64
|
-
* - Cursor: Check for .cursor/ directory or Cursor process
|
|
65
|
-
* - Generic: Always true (fallback for any tool)
|
|
66
|
-
*
|
|
67
|
-
* @returns Promise<boolean> True if tool detected
|
|
68
|
-
*/
|
|
69
|
-
detect(): Promise<boolean>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Check if system requirements are met for this adapter
|
|
73
|
-
*
|
|
74
|
-
* Examples:
|
|
75
|
-
* - Node.js version >= 18
|
|
76
|
-
* - Git installed
|
|
77
|
-
* - Tool-specific requirements
|
|
78
|
-
*
|
|
79
|
-
* @returns Promise<RequirementsResult> Requirements check result
|
|
80
|
-
*/
|
|
81
|
-
checkRequirements(): Promise<RequirementsResult>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Get list of files this adapter will install
|
|
85
|
-
*
|
|
86
|
-
* @returns AdapterFile[] Array of files to install
|
|
87
|
-
*/
|
|
88
|
-
getFiles(): AdapterFile[];
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Install this adapter to a project
|
|
92
|
-
*
|
|
93
|
-
* Creates tool-specific files (e.g., .cursorrules for Cursor, AGENTS.md for all)
|
|
94
|
-
* Installs relevant skills/agents if applicable
|
|
95
|
-
*
|
|
96
|
-
* @param options Installation options
|
|
97
|
-
* @returns Promise<void>
|
|
98
|
-
*/
|
|
99
|
-
install(options: AdapterOptions): Promise<void>;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Post-installation actions
|
|
103
|
-
*
|
|
104
|
-
* Examples:
|
|
105
|
-
* - Create symlinks
|
|
106
|
-
* - Update config files
|
|
107
|
-
* - Display setup instructions to user
|
|
108
|
-
*
|
|
109
|
-
* @param options Installation options
|
|
110
|
-
* @returns Promise<void>
|
|
111
|
-
*/
|
|
112
|
-
postInstall(options: AdapterOptions): Promise<void>;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Get human-readable instructions for using this adapter
|
|
116
|
-
*
|
|
117
|
-
* Displayed to user after installation
|
|
118
|
-
*
|
|
119
|
-
* @returns string Markdown-formatted instructions
|
|
120
|
-
*/
|
|
121
|
-
getInstructions(): string;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Check if this adapter supports plugins
|
|
125
|
-
*
|
|
126
|
-
* Returns true if the adapter can install and compile plugins
|
|
127
|
-
* (Cursor AGENTS.md compilation, Generic AGENTS.md)
|
|
128
|
-
* Returns false for manual-only adapters
|
|
129
|
-
*
|
|
130
|
-
* @returns boolean True if plugins are supported
|
|
131
|
-
*/
|
|
132
|
-
supportsPlugins(): boolean;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Compile and install a plugin for this adapter
|
|
136
|
-
*
|
|
137
|
-
* Transforms plugin content (skills/agents/commands) to tool-specific format:
|
|
138
|
-
* - Cursor: Compile to AGENTS.md + team commands JSON
|
|
139
|
-
* - Generic: Compile to AGENTS.md for Copilot/ChatGPT/Gemini
|
|
140
|
-
*
|
|
141
|
-
* Note: Claude Code uses native plugin system (no compilation needed)
|
|
142
|
-
*
|
|
143
|
-
* @param plugin Plugin to compile and install
|
|
144
|
-
* @returns Promise<void>
|
|
145
|
-
*/
|
|
146
|
-
compilePlugin(plugin: Plugin): Promise<void>;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Unload (disable) a plugin for this adapter
|
|
150
|
-
*
|
|
151
|
-
* Removes plugin-specific files and restores previous state
|
|
152
|
-
*
|
|
153
|
-
* @param pluginName Name of plugin to unload
|
|
154
|
-
* @returns Promise<void>
|
|
155
|
-
*/
|
|
156
|
-
unloadPlugin(pluginName: string): Promise<void>;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get plugin installation status
|
|
160
|
-
*
|
|
161
|
-
* Returns information about which plugins are currently installed
|
|
162
|
-
*
|
|
163
|
-
* @returns Promise<string[]> Array of installed plugin names
|
|
164
|
-
*/
|
|
165
|
-
getInstalledPlugins(): Promise<string[]>;
|
|
166
|
-
}
|