specweave 0.6.7 ā 0.7.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/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +920 -107
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/adapters/adapter-interface.d.ts +11 -11
- package/dist/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/adapters/adapter-interface.js +1 -1
- package/dist/adapters/adapter-loader.d.ts +1 -2
- package/dist/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/adapters/adapter-loader.js +3 -6
- package/dist/adapters/adapter-loader.js.map +1 -1
- package/dist/adapters/agents-md-generator.d.ts +3 -3
- package/dist/adapters/agents-md-generator.js +3 -3
- package/dist/adapters/generic/adapter.d.ts +2 -2
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +28 -9
- package/dist/adapters/generic/adapter.js.map +1 -1
- 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 +141 -40
- 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 +37 -2
- 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 -5
- package/plugins/specweave/commands/{done.md ā specweave-done.md} +2 -0
- 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/{validate.md ā specweave-validate.md} +2 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/docs-changed.sh +23 -3
- package/plugins/specweave/hooks/human-input-required.sh +23 -3
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +161 -1
- package/plugins/specweave/hooks/pre-implementation.sh +23 -3
- 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 +652 -1
- 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/dist/adapters/copilot/adapter.d.ts +0 -86
- package/dist/adapters/copilot/adapter.d.ts.map +0 -1
- package/dist/adapters/copilot/adapter.js +0 -396
- package/dist/adapters/copilot/adapter.js.map +0 -1
- package/plugins/.specweave/logs/hooks-debug.log +0 -24
- package/plugins/.specweave/logs/last-hook-fire +0 -1
- package/plugins/.specweave/logs/last-todowrite-time +0 -1
- package/plugins/.specweave/logs/tasks.log +0 -6
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -311
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -259
- 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/copilot/README.md +0 -240
- package/src/adapters/copilot/adapter.ts +0 -444
- 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 -359
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md ā specweave-costs.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
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# /list-increments - View All Increments
|
|
2
|
-
|
|
3
|
-
**Command**: `/list-increments [options]`
|
|
4
|
-
|
|
5
|
-
**Purpose**: View all increments with status, completion, and WIP tracking
|
|
6
|
-
|
|
7
|
-
**Framework**: Framework-agnostic (works with all tech stacks)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
/list-increments # All increments
|
|
15
|
-
/list-increments --status in-progress # Filter by status
|
|
16
|
-
/list-increments --priority P1 # Filter by priority
|
|
17
|
-
/list-increments --verbose # Include task details
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Arguments
|
|
21
|
-
|
|
22
|
-
- `--status` (optional): Filter by status (backlog, planned, in-progress, completed, closed)
|
|
23
|
-
- `--priority` (optional): Filter by priority (P1, P2, P3)
|
|
24
|
-
- `--verbose` (optional): Show task breakdown
|
|
25
|
-
- `--wip-only` (optional): Show only in-progress increments
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Output
|
|
30
|
-
|
|
31
|
-
### Default View
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
š SpecWeave Increments Overview
|
|
35
|
-
|
|
36
|
-
WIP Status: 2/2 (at limit) ā ļø
|
|
37
|
-
|
|
38
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
39
|
-
|
|
40
|
-
Status: in-progress (2)
|
|
41
|
-
|
|
42
|
-
āāā 001-core-framework [P1]
|
|
43
|
-
ā āāā Progress: 88% (44/50 tasks)
|
|
44
|
-
ā āāā Started: 2025-02-01 (8 months ago)
|
|
45
|
-
ā āāā P1: 100% (30/30) ā
|
|
46
|
-
ā āāā P2: 80% (12/15) - 3 remaining
|
|
47
|
-
ā āāā P3: 40% (2/5) - 3 remaining
|
|
48
|
-
ā āāā Ready to close (all P1 complete)
|
|
49
|
-
ā
|
|
50
|
-
āāā 003-jira-integration [P1]
|
|
51
|
-
āāā Progress: 40% (8/20 tasks)
|
|
52
|
-
āāā Started: 2025-09-15 (1 month ago)
|
|
53
|
-
āāā P1: 50% (5/10) ā³
|
|
54
|
-
āāā P2: 30% (3/10)
|
|
55
|
-
āāā In progress
|
|
56
|
-
|
|
57
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
58
|
-
|
|
59
|
-
Status: planned (3)
|
|
60
|
-
|
|
61
|
-
āāā 002-enhancements [P2] - Ready to start
|
|
62
|
-
ā āāā 15 tasks (transferred from 001)
|
|
63
|
-
ā
|
|
64
|
-
āāā 004-github-sync [P2] - Ready to start
|
|
65
|
-
ā āāā 18 tasks
|
|
66
|
-
ā
|
|
67
|
-
āāā 005-cost-optimizer-v2 [P3] - Ready to start
|
|
68
|
-
āāā 10 tasks
|
|
69
|
-
|
|
70
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
71
|
-
|
|
72
|
-
Status: backlog (10 ideas)
|
|
73
|
-
|
|
74
|
-
āāā Design system improvements
|
|
75
|
-
āāā Performance optimizations
|
|
76
|
-
āāā Mobile app support
|
|
77
|
-
āāā Advanced analytics
|
|
78
|
-
āāā ... (6 more)
|
|
79
|
-
|
|
80
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
81
|
-
|
|
82
|
-
Status: closed (1)
|
|
83
|
-
|
|
84
|
-
āāā 000-project-setup [P1]
|
|
85
|
-
āāā Closed: 2025-01-15
|
|
86
|
-
āāā Completion: 100% (10/10 tasks)
|
|
87
|
-
āāā Duration: 2 weeks
|
|
88
|
-
|
|
89
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
90
|
-
|
|
91
|
-
ā ļø Action needed:
|
|
92
|
-
ā WIP limit reached (2/2)
|
|
93
|
-
ā Close 001-core-framework to free WIP slot (88% complete, ready)
|
|
94
|
-
ā Run: /close-increment 001
|
|
95
|
-
|
|
96
|
-
Next steps:
|
|
97
|
-
1. Close 001 to free WIP slot
|
|
98
|
-
2. Start 002-enhancements
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Verbose View
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
/list-increments --verbose --status in-progress
|
|
105
|
-
|
|
106
|
-
š In-Progress Increments (Verbose)
|
|
107
|
-
|
|
108
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
109
|
-
|
|
110
|
-
001-core-framework [P1]
|
|
111
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
112
|
-
|
|
113
|
-
Title: SpecWeave Core Framework
|
|
114
|
-
Status: in-progress
|
|
115
|
-
Priority: P1
|
|
116
|
-
Started: 2025-02-01 (8 months ago)
|
|
117
|
-
Progress: 88% (44/50 tasks)
|
|
118
|
-
WIP Slot: 1
|
|
119
|
-
|
|
120
|
-
Task Breakdown:
|
|
121
|
-
P1 (Critical): 100% (30/30) ā
|
|
122
|
-
ā
T001-T030: All complete
|
|
123
|
-
|
|
124
|
-
P2 (Important): 80% (12/15)
|
|
125
|
-
ā
T031-T042: Complete
|
|
126
|
-
ā³ T043: In progress
|
|
127
|
-
ā T044-T045: Not started
|
|
128
|
-
|
|
129
|
-
P3 (Nice-to-have): 40% (2/5)
|
|
130
|
-
ā
T046-T047: Complete
|
|
131
|
-
ā T048-T050: Not started
|
|
132
|
-
|
|
133
|
-
Dependencies: None
|
|
134
|
-
Dependent increments: 002-enhancements, 004-github-sync
|
|
135
|
-
|
|
136
|
-
Ready to close: YES (all P1 complete)
|
|
137
|
-
Leftover tasks: 6 (3 P2, 3 P3)
|
|
138
|
-
|
|
139
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Filtered Views
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# Only P1 increments
|
|
146
|
-
/list-increments --priority P1
|
|
147
|
-
|
|
148
|
-
š P1 (Critical) Increments
|
|
149
|
-
|
|
150
|
-
in-progress (2):
|
|
151
|
-
- 001-core-framework: 88% complete
|
|
152
|
-
- 003-jira-integration: 40% complete
|
|
153
|
-
|
|
154
|
-
planned (0): None
|
|
155
|
-
|
|
156
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
157
|
-
|
|
158
|
-
# Only WIP increments
|
|
159
|
-
/list-increments --wip-only
|
|
160
|
-
|
|
161
|
-
š WIP Increments (2/2 - at limit)
|
|
162
|
-
|
|
163
|
-
001-core-framework [P1]: 88% ā Ready to close
|
|
164
|
-
003-jira-integration [P1]: 40% ā In progress
|
|
165
|
-
|
|
166
|
-
ā ļø At WIP limit - close 001 to start new work
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Related Documentation
|
|
172
|
-
|
|
173
|
-
- [CLAUDE.md](../../CLAUDE.md#increment-lifecycle-management) - Lifecycle guide
|
|
174
|
-
- [.specweave/increments/README.md](../../.specweave/increments/README.md) - Increments overview
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
**Command Type**: Status reporting
|
|
179
|
-
**Framework Support**: All
|
|
180
|
-
**Output**: Summary of all increments with actionable recommendations
|
package/src/adapters/README.md
DELETED
|
@@ -1,311 +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
|
|
20
|
-
ā āāā .claude/skills/
|
|
21
|
-
ā āāā .claude/agents/
|
|
22
|
-
ā āāā .claude/hooks/
|
|
23
|
-
ā
|
|
24
|
-
āāā Cursor # Semi-automation
|
|
25
|
-
ā āāā .cursorrules
|
|
26
|
-
ā
|
|
27
|
-
āāā Copilot # Basic automation
|
|
28
|
-
ā āāā .github/copilot/instructions.md
|
|
29
|
-
ā
|
|
30
|
-
āāā Generic # Manual workflow
|
|
31
|
-
āāā SPECWEAVE.md
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Available Adapters
|
|
35
|
-
|
|
36
|
-
| Adapter | Automation | Market Share | Status |
|
|
37
|
-
|---------|------------|--------------|--------|
|
|
38
|
-
| **Claude** | Full (skills, agents, hooks) | 10% | ā
Active |
|
|
39
|
-
| **Cursor** | Semi (.cursorrules, @ shortcuts) | 30% | ā
Active |
|
|
40
|
-
| **Copilot** | Basic (workspace instructions) | 40% | ā
Active |
|
|
41
|
-
| **Generic** | Manual (step-by-step guide) | 20% (other tools) | ā
Active |
|
|
42
|
-
|
|
43
|
-
**Total Market Coverage**: 100% (works with ANY AI tool)
|
|
44
|
-
|
|
45
|
-
## Adapter Interface
|
|
46
|
-
|
|
47
|
-
All adapters implement the `IAdapter` interface defined in `adapter-interface.ts`:
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
interface IAdapter {
|
|
51
|
-
name: string;
|
|
52
|
-
description: string;
|
|
53
|
-
automationLevel: 'full' | 'semi' | 'basic' | 'manual';
|
|
54
|
-
|
|
55
|
-
detect(): Promise<boolean>;
|
|
56
|
-
checkRequirements(): Promise<RequirementsResult>;
|
|
57
|
-
getFiles(): AdapterFile[];
|
|
58
|
-
install(options: AdapterOptions): Promise<void>;
|
|
59
|
-
postInstall(options: AdapterOptions): Promise<void>;
|
|
60
|
-
getInstructions(): string;
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## How Adapters Work
|
|
65
|
-
|
|
66
|
-
### 1. Claude Adapter (Full Automation)
|
|
67
|
-
|
|
68
|
-
**Files Installed**:
|
|
69
|
-
- `.claude/skills/` - Auto-activating skills (specweave-detector, skill-router, etc.)
|
|
70
|
-
- `.claude/agents/` - Specialized agents (PM, Architect, DevOps, QA, Security)
|
|
71
|
-
- `.claude/commands/` - Slash commands (/create-increment, /sync-docs, etc.)
|
|
72
|
-
- `.claude/hooks/` - Auto-update hooks (post-task-completion, etc.)
|
|
73
|
-
|
|
74
|
-
**Features**:
|
|
75
|
-
- Skills auto-activate based on user requests
|
|
76
|
-
- Agents coordinate complex workflows
|
|
77
|
-
- Hooks auto-update documentation
|
|
78
|
-
- Slash commands for quick actions
|
|
79
|
-
- Best-in-class experience
|
|
80
|
-
|
|
81
|
-
**Detection**: Checks for Claude Code CLI
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
### 2. Cursor Adapter (Semi-Automation)
|
|
86
|
-
|
|
87
|
-
**Files Installed**:
|
|
88
|
-
- `.cursorrules` - Workflow instructions for Cursor AI
|
|
89
|
-
- `.cursor/context/` - Context shortcut files
|
|
90
|
-
|
|
91
|
-
**Features**:
|
|
92
|
-
- @ shortcuts: `@increments`, `@docs`, `@strategy`
|
|
93
|
-
- Composer multi-file editing guided by .cursorrules
|
|
94
|
-
- Context manifests work via manual reference
|
|
95
|
-
|
|
96
|
-
**Workflow Instructions** (in .cursorrules):
|
|
97
|
-
```markdown
|
|
98
|
-
# SpecWeave Configuration for Cursor
|
|
99
|
-
|
|
100
|
-
## When user requests a feature:
|
|
101
|
-
1. Check if increment exists in `.specweave/increments/####-name/`
|
|
102
|
-
2. If not, create: spec.md, plan.md, tasks.md
|
|
103
|
-
|
|
104
|
-
## Context Loading (70%+ Token Reduction)
|
|
105
|
-
**CRITICAL**: Always read `context-manifest.yaml` first!
|
|
106
|
-
Only load files listed in manifest.
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**Detection**: Checks for Cursor editor process or .cursor/ directory
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
### 3. Copilot Adapter (Basic Automation)
|
|
114
|
-
|
|
115
|
-
**Files Installed**:
|
|
116
|
-
- `.github/copilot/instructions.md` - Workspace instructions for Copilot
|
|
117
|
-
|
|
118
|
-
**Features**:
|
|
119
|
-
- Workspace-level guidance read by Copilot
|
|
120
|
-
- Context manifests referenced in instructions
|
|
121
|
-
- Suggestions based on SpecWeave structure
|
|
122
|
-
|
|
123
|
-
**Instruction File** (.github/copilot/instructions.md):
|
|
124
|
-
```markdown
|
|
125
|
-
# SpecWeave Workspace Instructions
|
|
126
|
-
|
|
127
|
-
## Project Overview
|
|
128
|
-
This project uses SpecWeave for spec-driven development.
|
|
129
|
-
|
|
130
|
-
## Workflow: Creating Features
|
|
131
|
-
1. Create increment folder: `.specweave/increments/####-short-name/`
|
|
132
|
-
2. Create spec.md (WHAT and WHY)
|
|
133
|
-
3. Create plan.md (HOW)
|
|
134
|
-
4. Create tasks.md (Implementation)
|
|
135
|
-
|
|
136
|
-
## Context Loading (CRITICAL)
|
|
137
|
-
Always read context-manifest.yaml first!
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Detection**: Checks for GitHub Copilot extension in VS Code
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
### 4. Generic Adapter (Manual Workflow)
|
|
145
|
-
|
|
146
|
-
**Files Installed**:
|
|
147
|
-
- `SPECWEAVE.md` - Complete step-by-step manual guide
|
|
148
|
-
|
|
149
|
-
**Features**:
|
|
150
|
-
- Works with ANY AI tool (ChatGPT web, Claude web, Gemini, etc.)
|
|
151
|
-
- Clear manual workflow
|
|
152
|
-
- Copy-paste instructions
|
|
153
|
-
- 100% compatibility (no tool dependencies)
|
|
154
|
-
|
|
155
|
-
**Manual Guide** (SPECWEAVE.md):
|
|
156
|
-
```markdown
|
|
157
|
-
# SpecWeave Manual Workflow
|
|
158
|
-
|
|
159
|
-
## Step 1: Create Feature
|
|
160
|
-
```bash
|
|
161
|
-
mkdir -p .specweave/increments/0001-feature-name
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Step 2: Create spec.md
|
|
165
|
-
[Detailed template and instructions]
|
|
166
|
-
|
|
167
|
-
## Step 3: Load Context
|
|
168
|
-
Copy files listed in `context-manifest.yaml` to your AI chat.
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Detection**: Always returns `true` (universal fallback)
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Command Mechanism
|
|
176
|
-
|
|
177
|
-
**Critical Insight**: Commands work differently across tools.
|
|
178
|
-
|
|
179
|
-
### Claude Code (Native Slash Commands)
|
|
180
|
-
- User types `/create-increment "user auth"` in Claude chat
|
|
181
|
-
- Command file in `.claude/commands/create-increment.md` is loaded
|
|
182
|
-
- Command executes with full context
|
|
183
|
-
|
|
184
|
-
### Cursor (Instruction-Based)
|
|
185
|
-
- User types: "create increment for user auth"
|
|
186
|
-
- Cursor reads `.cursorrules` which contains workflow instructions
|
|
187
|
-
- AI follows instructions step-by-step
|
|
188
|
-
|
|
189
|
-
### GitHub Copilot (Instruction Files)
|
|
190
|
-
- User types: "create increment for user auth"
|
|
191
|
-
- Copilot reads `.github/copilot/instructions.md`
|
|
192
|
-
- AI follows workspace instructions
|
|
193
|
-
|
|
194
|
-
### Generic (Manual Copy-Paste)
|
|
195
|
-
- User reads `SPECWEAVE.md`
|
|
196
|
-
- User copies relevant sections to AI chat
|
|
197
|
-
- User guides AI through workflow manually
|
|
198
|
-
|
|
199
|
-
**Pattern**: Each adapter uses **instruction files** appropriate to the tool's capabilities.
|
|
200
|
-
|
|
201
|
-
## Installation
|
|
202
|
-
|
|
203
|
-
### For Users (Select Adapter)
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
# Auto-detect tool and install appropriate adapter
|
|
207
|
-
npx specweave init my-project
|
|
208
|
-
|
|
209
|
-
# Or specify adapter explicitly
|
|
210
|
-
npx specweave init my-project --adapter claude
|
|
211
|
-
npx specweave init my-project --adapter cursor
|
|
212
|
-
npx specweave init my-project --adapter copilot
|
|
213
|
-
npx specweave init my-project --adapter generic
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### For Developers (Install All Adapters)
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
# Install all adapters to SpecWeave framework
|
|
220
|
-
npm run install:adapters
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## Adding New Adapters
|
|
224
|
-
|
|
225
|
-
To add support for a new tool:
|
|
226
|
-
|
|
227
|
-
1. **Create adapter directory**: `src/adapters/your-tool/`
|
|
228
|
-
2. **Create adapter class**: `src/adapters/your-tool/adapter.ts`
|
|
229
|
-
3. **Implement IAdapter interface**
|
|
230
|
-
4. **Add template files**: Tool-specific instruction files
|
|
231
|
-
5. **Add to registry**: Update `registry.yaml`
|
|
232
|
-
6. **Add test cases**: Minimum 3 test cases
|
|
233
|
-
7. **Update CLI**: Add detection logic
|
|
234
|
-
|
|
235
|
-
**Example**:
|
|
236
|
-
```typescript
|
|
237
|
-
// src/adapters/windsurf/adapter.ts
|
|
238
|
-
import { AdapterBase } from '../adapter-base';
|
|
239
|
-
|
|
240
|
-
export class WindsurfAdapter extends AdapterBase {
|
|
241
|
-
name = 'windsurf';
|
|
242
|
-
description = 'Windsurf adapter with semi-automation';
|
|
243
|
-
automationLevel = 'semi' as const;
|
|
244
|
-
|
|
245
|
-
async detect(): Promise<boolean> {
|
|
246
|
-
// Check if Windsurf is installed
|
|
247
|
-
return this.commandExists('windsurf');
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
getFiles(): AdapterFile[] {
|
|
251
|
-
return [
|
|
252
|
-
{
|
|
253
|
-
sourcePath: '.windsurfrules',
|
|
254
|
-
targetPath: '.windsurfrules',
|
|
255
|
-
description: 'Windsurf workflow instructions'
|
|
256
|
-
}
|
|
257
|
-
];
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
getInstructions(): string {
|
|
261
|
-
return `
|
|
262
|
-
# Windsurf Adapter Installed
|
|
263
|
-
|
|
264
|
-
Your project is now configured for Windsurf.
|
|
265
|
-
...
|
|
266
|
-
`;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
## Testing Adapters
|
|
272
|
-
|
|
273
|
-
Each adapter MUST have minimum 3 test cases in `test-cases/`:
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
src/adapters/cursor/
|
|
277
|
-
āāā adapter.ts
|
|
278
|
-
āāā .cursorrules (template)
|
|
279
|
-
āāā test-cases/
|
|
280
|
-
āāā test-1-install.yaml
|
|
281
|
-
āāā test-2-detection.yaml
|
|
282
|
-
āāā test-3-workflow.yaml
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
## Related Documentation
|
|
286
|
-
|
|
287
|
-
- [adapter-interface.ts](./adapter-interface.ts) - Complete interface definition
|
|
288
|
-
- [adapter-base.ts](./adapter-base.ts) - Base class implementation
|
|
289
|
-
- [registry.yaml](./registry.yaml) - List of all adapters
|
|
290
|
-
- [.specweave/increments/0002-multi-tool-support/](../../.specweave/increments/0002-multi-tool-support/) - Implementation plan
|
|
291
|
-
|
|
292
|
-
## Design Philosophy
|
|
293
|
-
|
|
294
|
-
**Core Principle**: Separate tool-agnostic core from tool-specific enhancements.
|
|
295
|
-
|
|
296
|
-
**Benefits**:
|
|
297
|
-
1. ā
Users can switch AI tools without losing SpecWeave benefits
|
|
298
|
-
2. ā
100% market coverage (works with ANY AI)
|
|
299
|
-
3. ā
No tool lock-in
|
|
300
|
-
4. ā
Best experience with supported tools, functional experience with any tool
|
|
301
|
-
5. ā
Easy to add support for new tools
|
|
302
|
-
|
|
303
|
-
**Inspiration**:
|
|
304
|
-
- **spec-kit** (GitHub): Agent-agnostic approach, plain text commands
|
|
305
|
-
- **BMAD-METHOD**: Portable prompt bundles work across multiple AIs
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
**Status**: Implementation in progress (Increment 0002)
|
|
310
|
-
**Branch**: features/002-multi-tool-support
|
|
311
|
-
**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
|
-
}
|