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
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: increment-quality-judge-v2
|
|
3
|
+
description: Enhanced AI-powered quality assessment with RISK SCORING (BMAD pattern) and quality gate decisions. Evaluates specifications, plans, and tests for clarity, testability, completeness, feasibility, maintainability, edge cases, and RISKS. Provides PASS/CONCERNS/FAIL decisions. Activates for validate quality, quality check, assess spec, evaluate increment, spec review, quality score, risk assessment, qa check, quality gate, /qa command.
|
|
4
|
+
allowed-tools: Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Increment Quality Judge v2.0
|
|
8
|
+
|
|
9
|
+
Risk Assessment + Quality Gate Decisions
|
|
10
|
+
|
|
11
|
+
AI-powered quality assessment with BMAD-pattern risk scoring and formal quality gate decisions (PASS/CONCERNS/FAIL).
|
|
12
|
+
|
|
13
|
+
## What's New in v2.0
|
|
14
|
+
|
|
15
|
+
1. **Risk Assessment Dimension** - Probability × Impact scoring (0-10 scale, BMAD pattern)
|
|
16
|
+
2. **Quality Gate Decisions** - Formal PASS/CONCERNS/FAIL with thresholds
|
|
17
|
+
3. **NFR Checking** - Non-functional requirements (performance, security, scalability)
|
|
18
|
+
4. **Enhanced Output** - Blockers, concerns, recommendations with actionable mitigations
|
|
19
|
+
5. **7 Dimensions** - Added "Risk" to the existing 6 dimensions
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
Provide comprehensive quality assessment that goes beyond structural validation to evaluate:
|
|
24
|
+
- ✅ Specification quality (6 dimensions)
|
|
25
|
+
- ✅ **Risk levels (BMAD P×I scoring)** - NEW!
|
|
26
|
+
- ✅ **Quality gate readiness (PASS/CONCERNS/FAIL)** - NEW!
|
|
27
|
+
|
|
28
|
+
## When to Use
|
|
29
|
+
|
|
30
|
+
**Auto-activates for**:
|
|
31
|
+
- `/qa {increment-id}` command
|
|
32
|
+
- `/qa {increment-id} --pre` (pre-implementation check)
|
|
33
|
+
- `/qa {increment-id} --gate` (quality gate check)
|
|
34
|
+
- Natural language: "assess quality of increment 0001"
|
|
35
|
+
|
|
36
|
+
**Keywords**:
|
|
37
|
+
- validate quality, quality check, assess spec
|
|
38
|
+
- evaluate increment, spec review, quality score
|
|
39
|
+
- risk assessment, qa check, quality gate
|
|
40
|
+
- PASS/CONCERNS/FAIL
|
|
41
|
+
|
|
42
|
+
## Evaluation Dimensions (7 total, was 6)
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
dimensions:
|
|
46
|
+
clarity:
|
|
47
|
+
weight: 0.18 # was 0.20
|
|
48
|
+
criteria:
|
|
49
|
+
- "Is the problem statement clear?"
|
|
50
|
+
- "Are objectives well-defined?"
|
|
51
|
+
- "Is terminology consistent?"
|
|
52
|
+
|
|
53
|
+
testability:
|
|
54
|
+
weight: 0.22 # was 0.25
|
|
55
|
+
criteria:
|
|
56
|
+
- "Are acceptance criteria testable?"
|
|
57
|
+
- "Can success be measured objectively?"
|
|
58
|
+
- "Are edge cases identifiable?"
|
|
59
|
+
|
|
60
|
+
completeness:
|
|
61
|
+
weight: 0.18 # was 0.20
|
|
62
|
+
criteria:
|
|
63
|
+
- "Are all requirements addressed?"
|
|
64
|
+
- "Is error handling specified?"
|
|
65
|
+
- "Are non-functional requirements included?"
|
|
66
|
+
|
|
67
|
+
feasibility:
|
|
68
|
+
weight: 0.13 # was 0.15
|
|
69
|
+
criteria:
|
|
70
|
+
- "Is the architecture scalable?"
|
|
71
|
+
- "Are technical constraints realistic?"
|
|
72
|
+
- "Is timeline achievable?"
|
|
73
|
+
|
|
74
|
+
maintainability:
|
|
75
|
+
weight: 0.09 # was 0.10
|
|
76
|
+
criteria:
|
|
77
|
+
- "Is design modular?"
|
|
78
|
+
- "Are extension points identified?"
|
|
79
|
+
- "Is technical debt addressed?"
|
|
80
|
+
|
|
81
|
+
edge_cases:
|
|
82
|
+
weight: 0.09 # was 0.10
|
|
83
|
+
criteria:
|
|
84
|
+
- "Are failure scenarios covered?"
|
|
85
|
+
- "Are performance limits specified?"
|
|
86
|
+
- "Are security considerations included?"
|
|
87
|
+
|
|
88
|
+
# NEW: Risk Assessment (BMAD pattern)
|
|
89
|
+
risk:
|
|
90
|
+
weight: 0.11 # NEW!
|
|
91
|
+
criteria:
|
|
92
|
+
- "Are security risks identified and mitigated?"
|
|
93
|
+
- "Are technical risks (scalability, performance) addressed?"
|
|
94
|
+
- "Are implementation risks (complexity, dependencies) managed?"
|
|
95
|
+
- "Are operational risks (monitoring, support) considered?"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Risk Assessment (BMAD Pattern) - NEW!
|
|
99
|
+
|
|
100
|
+
### Risk Scoring Formula
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Risk Score = Probability × Impact
|
|
104
|
+
|
|
105
|
+
Probability (0.0-1.0):
|
|
106
|
+
- 0.0-0.3: Low (unlikely to occur)
|
|
107
|
+
- 0.4-0.6: Medium (may occur)
|
|
108
|
+
- 0.7-1.0: High (likely to occur)
|
|
109
|
+
|
|
110
|
+
Impact (1-10):
|
|
111
|
+
- 1-3: Minor (cosmetic, no user impact)
|
|
112
|
+
- 4-6: Moderate (some impact, workaround exists)
|
|
113
|
+
- 7-9: Major (significant impact, no workaround)
|
|
114
|
+
- 10: Critical (system failure, data loss, security breach)
|
|
115
|
+
|
|
116
|
+
Final Score (0.0-10.0):
|
|
117
|
+
- 9.0-10.0: CRITICAL risk (FAIL quality gate)
|
|
118
|
+
- 6.0-8.9: HIGH risk (CONCERNS quality gate)
|
|
119
|
+
- 3.0-5.9: MEDIUM risk (PASS with monitoring)
|
|
120
|
+
- 0.0-2.9: LOW risk (PASS)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Risk Categories
|
|
124
|
+
|
|
125
|
+
1. **Security Risks**
|
|
126
|
+
- OWASP Top 10 vulnerabilities
|
|
127
|
+
- Data exposure, authentication, authorization
|
|
128
|
+
- Cryptographic failures
|
|
129
|
+
|
|
130
|
+
2. **Technical Risks**
|
|
131
|
+
- Architecture complexity, scalability bottlenecks
|
|
132
|
+
- Performance issues, technical debt
|
|
133
|
+
|
|
134
|
+
3. **Implementation Risks**
|
|
135
|
+
- Tight timeline, external dependencies
|
|
136
|
+
- Technical complexity
|
|
137
|
+
|
|
138
|
+
4. **Operational Risks**
|
|
139
|
+
- Lack of monitoring, difficult to maintain
|
|
140
|
+
- Poor documentation
|
|
141
|
+
|
|
142
|
+
### Risk Assessment Prompt
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
You are evaluating SOFTWARE RISKS for an increment using BMAD's Probability × Impact scoring.
|
|
146
|
+
|
|
147
|
+
Read increment files:
|
|
148
|
+
- .specweave/increments/{id}/spec.md
|
|
149
|
+
- .specweave/increments/{id}/plan.md
|
|
150
|
+
|
|
151
|
+
For EACH risk you identify:
|
|
152
|
+
|
|
153
|
+
1. **Calculate PROBABILITY** (0.0-1.0)
|
|
154
|
+
- Based on spec clarity, past experience, complexity
|
|
155
|
+
- Low: 0.2, Medium: 0.5, High: 0.8
|
|
156
|
+
|
|
157
|
+
2. **Calculate IMPACT** (1-10)
|
|
158
|
+
- 10 = Critical (security breach, data loss, system failure)
|
|
159
|
+
- 7-9 = Major (significant user impact, no workaround)
|
|
160
|
+
- 4-6 = Moderate (some impact, workaround exists)
|
|
161
|
+
- 1-3 = Minor (cosmetic, no user impact)
|
|
162
|
+
|
|
163
|
+
3. **Calculate RISK SCORE** = Probability × Impact
|
|
164
|
+
|
|
165
|
+
4. **Provide MITIGATION** strategy
|
|
166
|
+
|
|
167
|
+
5. **Link to ACCEPTANCE CRITERIA** (if applicable)
|
|
168
|
+
|
|
169
|
+
Output format (JSON):
|
|
170
|
+
{
|
|
171
|
+
"risks": [
|
|
172
|
+
{
|
|
173
|
+
"id": "RISK-001",
|
|
174
|
+
"category": "security",
|
|
175
|
+
"title": "Password storage not specified",
|
|
176
|
+
"description": "Spec doesn't mention password hashing algorithm",
|
|
177
|
+
"probability": 0.9,
|
|
178
|
+
"impact": 10,
|
|
179
|
+
"score": 9.0,
|
|
180
|
+
"severity": "CRITICAL",
|
|
181
|
+
"mitigation": "Use bcrypt or Argon2, never plain text",
|
|
182
|
+
"location": "spec.md, Authentication section",
|
|
183
|
+
"acceptance_criteria": "AC-US1-01"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"overall_risk_score": 7.5,
|
|
187
|
+
"dimension_score": 0.35
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Quality Gate Decisions - NEW!
|
|
192
|
+
|
|
193
|
+
### Decision Logic
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
enum QualityGateDecision {
|
|
197
|
+
PASS = "PASS", // Ready for production
|
|
198
|
+
CONCERNS = "CONCERNS", // Issues found, should address
|
|
199
|
+
FAIL = "FAIL" // Blockers, must fix
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
Thresholds (BMAD pattern):
|
|
203
|
+
|
|
204
|
+
FAIL if any:
|
|
205
|
+
- Risk score ≥ 9.0 (CRITICAL)
|
|
206
|
+
- Test coverage < 60%
|
|
207
|
+
- Spec quality < 50
|
|
208
|
+
- Critical security vulnerabilities ≥ 1
|
|
209
|
+
|
|
210
|
+
CONCERNS if any:
|
|
211
|
+
- Risk score 6.0-8.9 (HIGH)
|
|
212
|
+
- Test coverage < 80%
|
|
213
|
+
- Spec quality < 70
|
|
214
|
+
- High security vulnerabilities ≥ 1
|
|
215
|
+
|
|
216
|
+
PASS otherwise
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Output Example
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
223
|
+
QA ASSESSMENT: Increment 0008-user-authentication
|
|
224
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
225
|
+
|
|
226
|
+
Overall Score: 82/100 (GOOD) ✓
|
|
227
|
+
|
|
228
|
+
Dimension Scores:
|
|
229
|
+
Clarity: 90/100 ✓✓
|
|
230
|
+
Testability: 75/100 ⚠️
|
|
231
|
+
Completeness: 88/100 ✓
|
|
232
|
+
Feasibility: 85/100 ✓
|
|
233
|
+
Maintainability: 80/100 ✓
|
|
234
|
+
Edge Cases: 70/100 ⚠️
|
|
235
|
+
Risk Assessment: 65/100 ⚠️ (7.2/10 risk score)
|
|
236
|
+
|
|
237
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
238
|
+
RISKS IDENTIFIED (3)
|
|
239
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
240
|
+
|
|
241
|
+
🔴 RISK-001: CRITICAL (9.0/10)
|
|
242
|
+
Category: Security
|
|
243
|
+
Title: Password storage implementation
|
|
244
|
+
Description: Spec doesn't specify password hashing
|
|
245
|
+
Probability: 0.9 (High) × Impact: 10 (Critical)
|
|
246
|
+
Location: spec.md, Authentication section
|
|
247
|
+
Mitigation: Use bcrypt/Argon2, never plain text
|
|
248
|
+
AC: AC-US1-01
|
|
249
|
+
|
|
250
|
+
🟡 RISK-002: HIGH (6.0/10)
|
|
251
|
+
Category: Security
|
|
252
|
+
Title: Rate limiting not specified
|
|
253
|
+
Description: No brute-force protection mentioned
|
|
254
|
+
Probability: 0.6 (Medium) × Impact: 10 (Critical)
|
|
255
|
+
Location: spec.md, Security section
|
|
256
|
+
Mitigation: Add 5 failed attempts → 15 min lockout
|
|
257
|
+
AC: AC-US1-03
|
|
258
|
+
|
|
259
|
+
🟢 RISK-003: LOW (2.4/10)
|
|
260
|
+
Category: Technical
|
|
261
|
+
Title: Session storage scalability
|
|
262
|
+
Description: Plan uses in-memory sessions
|
|
263
|
+
Probability: 0.4 (Medium) × Impact: 6 (Moderate)
|
|
264
|
+
Location: plan.md, Architecture section
|
|
265
|
+
Mitigation: Use Redis for session store
|
|
266
|
+
|
|
267
|
+
Overall Risk Score: 7.2/10 (MEDIUM-HIGH)
|
|
268
|
+
|
|
269
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
270
|
+
QUALITY GATE DECISION
|
|
271
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
272
|
+
|
|
273
|
+
🟡 CONCERNS (Not Ready for Production)
|
|
274
|
+
|
|
275
|
+
Blockers (MUST FIX):
|
|
276
|
+
1. 🔴 CRITICAL RISK: Password storage (Risk ≥9)
|
|
277
|
+
→ Add task: "Implement bcrypt password hashing"
|
|
278
|
+
|
|
279
|
+
Concerns (SHOULD FIX):
|
|
280
|
+
2. 🟡 HIGH RISK: Rate limiting not specified (Risk ≥6)
|
|
281
|
+
→ Update spec.md: Add rate limiting section
|
|
282
|
+
→ Add E2E test for rate limiting
|
|
283
|
+
|
|
284
|
+
3. ⚠️ Testability: 75/100 (target: 80+)
|
|
285
|
+
→ Make acceptance criteria more measurable
|
|
286
|
+
|
|
287
|
+
Recommendations (NICE TO FIX):
|
|
288
|
+
4. Edge cases: 70/100
|
|
289
|
+
→ Add error handling scenarios
|
|
290
|
+
5. Session scalability
|
|
291
|
+
→ Consider Redis for session store
|
|
292
|
+
|
|
293
|
+
Decision: Address 1 blocker before proceeding
|
|
294
|
+
|
|
295
|
+
Would you like to:
|
|
296
|
+
[E] Export blockers to tasks.md
|
|
297
|
+
[U] Update spec.md with fixes (experimental)
|
|
298
|
+
[C] Continue without changes
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Workflow Integration
|
|
302
|
+
|
|
303
|
+
### Quick Mode (Default)
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
User: /qa 0001
|
|
307
|
+
|
|
308
|
+
Step 1: Rule-based validation (120 checks) - FREE, FAST
|
|
309
|
+
├── If FAILED → Stop, show errors
|
|
310
|
+
└── If PASSED → Continue
|
|
311
|
+
|
|
312
|
+
Step 2: AI Quality Assessment (Quick)
|
|
313
|
+
├── Spec quality (6 dimensions)
|
|
314
|
+
├── Risk assessment (BMAD P×I)
|
|
315
|
+
└── Quality gate decision (PASS/CONCERNS/FAIL)
|
|
316
|
+
|
|
317
|
+
Output: Enhanced report with risks and gate decision
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Pre-Implementation Mode
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
User: /qa 0001 --pre
|
|
324
|
+
|
|
325
|
+
Checks:
|
|
326
|
+
✅ Spec quality (clarity, testability, completeness)
|
|
327
|
+
✅ Risk assessment (identify issues early)
|
|
328
|
+
✅ Architecture review (plan.md soundness)
|
|
329
|
+
✅ Test strategy (test plan in tasks.md)
|
|
330
|
+
|
|
331
|
+
Gate decision before implementation starts
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Quality Gate Mode
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
User: /qa 0001 --gate
|
|
338
|
+
|
|
339
|
+
Comprehensive checks:
|
|
340
|
+
✅ All pre-implementation checks
|
|
341
|
+
✅ Test coverage (AC-ID coverage, gaps)
|
|
342
|
+
✅ E2E test coverage
|
|
343
|
+
✅ Documentation completeness
|
|
344
|
+
|
|
345
|
+
Final gate decision before closing increment
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Enhanced Scoring Algorithm
|
|
349
|
+
|
|
350
|
+
### Step 1: Dimension Evaluation (7 dimensions)
|
|
351
|
+
|
|
352
|
+
For each dimension (including NEW risk dimension), use Chain-of-Thought prompting:
|
|
353
|
+
|
|
354
|
+
```markdown
|
|
355
|
+
<thinking>
|
|
356
|
+
1. Read spec.md thoroughly
|
|
357
|
+
2. For risk dimension specifically:
|
|
358
|
+
- Identify all risks (security, technical, implementation, operational)
|
|
359
|
+
- For each risk: calculate P, I, Score
|
|
360
|
+
- Group by category
|
|
361
|
+
- Calculate overall risk score
|
|
362
|
+
3. For other dimensions: evaluate criteria as before
|
|
363
|
+
4. Score 0.00-1.00
|
|
364
|
+
5. Identify issues
|
|
365
|
+
6. Provide suggestions
|
|
366
|
+
</thinking>
|
|
367
|
+
|
|
368
|
+
Score: 0.XX
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Step 2: Weighted Overall Score (NEW weights)
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
overall_score =
|
|
375
|
+
(clarity * 0.18) +
|
|
376
|
+
(testability * 0.22) +
|
|
377
|
+
(completeness * 0.18) +
|
|
378
|
+
(feasibility * 0.13) +
|
|
379
|
+
(maintainability * 0.09) +
|
|
380
|
+
(edge_cases * 0.09) +
|
|
381
|
+
(risk * 0.11) // NEW!
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Step 3: Quality Gate Decision
|
|
385
|
+
|
|
386
|
+
```typescript
|
|
387
|
+
gate_decision = decide({
|
|
388
|
+
spec_quality: overall_score,
|
|
389
|
+
risk_score: risk_assessment.overall_risk_score,
|
|
390
|
+
test_coverage: test_coverage.percentage, // if available
|
|
391
|
+
security_audit: security_audit // if available
|
|
392
|
+
})
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## Token Usage
|
|
396
|
+
|
|
397
|
+
**Estimated per increment** (Quick mode):
|
|
398
|
+
- Small spec (<100 lines): ~2,500 tokens (~$0.025)
|
|
399
|
+
- Medium spec (100-250 lines): ~3,500 tokens (~$0.035)
|
|
400
|
+
- Large spec (>250 lines): ~5,000 tokens (~$0.050)
|
|
401
|
+
|
|
402
|
+
**Cost increase from v1.0**: +25% (added risk assessment dimension)
|
|
403
|
+
|
|
404
|
+
**Optimization**:
|
|
405
|
+
- Only evaluate spec.md + plan.md for risks
|
|
406
|
+
- Cache risk patterns for 5 min
|
|
407
|
+
- Skip risk assessment if spec < 50 lines (too small to assess)
|
|
408
|
+
|
|
409
|
+
## Configuration
|
|
410
|
+
|
|
411
|
+
```json
|
|
412
|
+
{
|
|
413
|
+
"qa": {
|
|
414
|
+
"qualityGateThresholds": {
|
|
415
|
+
"fail": {
|
|
416
|
+
"riskScore": 9.0,
|
|
417
|
+
"testCoverage": 60,
|
|
418
|
+
"specQuality": 50,
|
|
419
|
+
"criticalVulnerabilities": 1
|
|
420
|
+
},
|
|
421
|
+
"concerns": {
|
|
422
|
+
"riskScore": 6.0,
|
|
423
|
+
"testCoverage": 80,
|
|
424
|
+
"specQuality": 70,
|
|
425
|
+
"highVulnerabilities": 1
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"dimensions": {
|
|
429
|
+
"risk": {
|
|
430
|
+
"enabled": true,
|
|
431
|
+
"weight": 0.11
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Migration from v1.0
|
|
439
|
+
|
|
440
|
+
**v1.0 (6 dimensions)**:
|
|
441
|
+
- Clarity, Testability, Completeness, Feasibility, Maintainability, Edge Cases
|
|
442
|
+
|
|
443
|
+
**v2.0 (7 dimensions, NEW: Risk)**:
|
|
444
|
+
- All v1.0 dimensions + Risk Assessment
|
|
445
|
+
- Weights adjusted to accommodate new dimension
|
|
446
|
+
- Quality gate decisions added
|
|
447
|
+
- BMAD risk scoring added
|
|
448
|
+
|
|
449
|
+
**Backward Compatibility**:
|
|
450
|
+
- v1.0 skills still work (auto-upgrade to v2.0 if risk assessment enabled)
|
|
451
|
+
- Existing scores rescaled to new weights automatically
|
|
452
|
+
- Can disable risk assessment in config to revert to v1.0 behavior
|
|
453
|
+
|
|
454
|
+
## Best Practices
|
|
455
|
+
|
|
456
|
+
1. **Run early and often**: Use `--pre` mode before implementation
|
|
457
|
+
2. **Fix blockers immediately**: Don't proceed if FAIL
|
|
458
|
+
3. **Address concerns before release**: CONCERNS = should fix
|
|
459
|
+
4. **Use risk scores to prioritize**: Fix CRITICAL risks first
|
|
460
|
+
5. **Export to tasks.md**: Convert blockers/concerns to actionable tasks
|
|
461
|
+
|
|
462
|
+
## Limitations
|
|
463
|
+
|
|
464
|
+
**What quality-judge v2.0 CAN'T do**:
|
|
465
|
+
- ❌ Understand domain-specific compliance (HIPAA, PCI-DSS)
|
|
466
|
+
- ❌ Verify technical feasibility with actual codebase
|
|
467
|
+
- ❌ Replace human expertise and security audits
|
|
468
|
+
- ❌ Predict actual probability without historical data
|
|
469
|
+
|
|
470
|
+
**What quality-judge v2.0 CAN do**:
|
|
471
|
+
- ✅ Catch vague or ambiguous language
|
|
472
|
+
- ✅ Identify missing security considerations (OWASP-based)
|
|
473
|
+
- ✅ Spot untestable acceptance criteria
|
|
474
|
+
- ✅ Suggest industry best practices
|
|
475
|
+
- ✅ Flag missing edge cases
|
|
476
|
+
- ✅ **Assess risks systematically (BMAD pattern)** - NEW!
|
|
477
|
+
- ✅ **Provide formal quality gate decisions** - NEW!
|
|
478
|
+
|
|
479
|
+
## Summary
|
|
480
|
+
|
|
481
|
+
**increment-quality-judge v2.0** adds comprehensive risk assessment and quality gate decisions:
|
|
482
|
+
|
|
483
|
+
✅ **Risk assessment** (BMAD P×I scoring, 0-10 scale)
|
|
484
|
+
✅ **Quality gate decisions** (PASS/CONCERNS/FAIL with thresholds)
|
|
485
|
+
✅ **7 dimensions** (added "Risk" to existing 6)
|
|
486
|
+
✅ **NFR checking** (performance, security, scalability)
|
|
487
|
+
✅ **Enhanced output** (blockers, concerns, recommendations)
|
|
488
|
+
✅ **Chain-of-thought** (LLM-as-Judge 2025 best practices)
|
|
489
|
+
✅ **Backward compatible** (can disable risk assessment)
|
|
490
|
+
|
|
491
|
+
**Use it when**: You want comprehensive quality assessment with risk scoring and formal gate decisions before implementation or release.
|
|
492
|
+
|
|
493
|
+
**Skip it when**: Quick iteration, tight token budget, or simple features where rule-based validation suffices.
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
**Version**: 2.0.0
|
|
498
|
+
**Since**: v0.8.0
|
|
499
|
+
**Related**: /qa command, QAOrchestrator agent (v0.9.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plugin-detector
|
|
3
|
-
description: Detects when SpecWeave plugins are needed
|
|
3
|
+
description: Detects when SpecWeave plugins are needed based on tech stack mentions. Activates for frontend (Next.js, React, Vue), backend (.NET, Node.js, Python), infrastructure (Docker, K8s), external tools (GitHub, JIRA), payments (Stripe), ML (TensorFlow), testing (Playwright), and design (Figma).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SpecWeave Plugin Detector
|
|
@@ -33,6 +33,41 @@ When you mention capabilities that require specific SpecWeave plugins:
|
|
|
33
33
|
|
|
34
34
|
## How I Help
|
|
35
35
|
|
|
36
|
+
### Mode 1: Passive Tech Stack Detection (NEW!)
|
|
37
|
+
|
|
38
|
+
When users mention tech stacks in ANY question (not just increments), I automatically:
|
|
39
|
+
|
|
40
|
+
1. **Scan project structure** using `src/utils/plugin-detection.ts`:
|
|
41
|
+
- Check package.json dependencies
|
|
42
|
+
- Detect .NET (*.csproj), Python (requirements.txt), etc.
|
|
43
|
+
- Find Docker, Kubernetes, infrastructure files
|
|
44
|
+
- Identify framework-specific patterns
|
|
45
|
+
|
|
46
|
+
2. **Detect missing plugins**:
|
|
47
|
+
- Compare detected tech stack vs installed plugins
|
|
48
|
+
- Group by confidence (high/medium/low)
|
|
49
|
+
|
|
50
|
+
3. **Suggest proactively** (non-blocking):
|
|
51
|
+
```
|
|
52
|
+
🔌 Plugin Recommendations
|
|
53
|
+
|
|
54
|
+
Based on your tech stack (Next.js + .NET + Docker), these plugins would help:
|
|
55
|
+
|
|
56
|
+
Recommended (high confidence):
|
|
57
|
+
• specweave-frontend - Next.js, React support
|
|
58
|
+
• specweave-backend - .NET 8 API patterns
|
|
59
|
+
• specweave-infrastructure - Docker, PostgreSQL
|
|
60
|
+
|
|
61
|
+
Install: /plugin install specweave-frontend@specweave
|
|
62
|
+
(or continue without - you can add later)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
4. **Continue with user's request**: Don't block workflow!
|
|
66
|
+
|
|
67
|
+
### Mode 2: Explicit Feature Requests (Original)
|
|
68
|
+
|
|
69
|
+
When users explicitly request plugin features:
|
|
70
|
+
|
|
36
71
|
1. **Detect missing plugin**: Check if the required plugin is installed
|
|
37
72
|
2. **Provide installation command**: Give exact `/plugin install` command
|
|
38
73
|
3. **Explain benefits**: List what the plugin provides (skills, agents, commands)
|
|
@@ -40,6 +75,45 @@ When you mention capabilities that require specific SpecWeave plugins:
|
|
|
40
75
|
|
|
41
76
|
## Plugin Detection Logic
|
|
42
77
|
|
|
78
|
+
### Automatic Scanning (NEW!)
|
|
79
|
+
|
|
80
|
+
Use the plugin detection utility to scan project structure:
|
|
81
|
+
|
|
82
|
+
**Step 1: Scan project** (TypeScript example, adapt to Claude's capabilities):
|
|
83
|
+
```typescript
|
|
84
|
+
import { scanProjectStructure, detectPlugins } from '../../../../../src/utils/plugin-detection';
|
|
85
|
+
|
|
86
|
+
// Scan current directory
|
|
87
|
+
const cwd = process.cwd();
|
|
88
|
+
const signals = await scanProjectStructure(cwd);
|
|
89
|
+
const detected = detectPlugins(signals);
|
|
90
|
+
|
|
91
|
+
// Group by confidence
|
|
92
|
+
const highConfidence = detected.filter(p => p.confidence === 'high');
|
|
93
|
+
const mediumConfidence = detected.filter(p => p.confidence === 'medium');
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Step 2: Check installed plugins**:
|
|
97
|
+
```bash
|
|
98
|
+
# Use Claude's plugin list
|
|
99
|
+
/plugin list --installed
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Step 3: Find missing plugins**:
|
|
103
|
+
- Compare detected plugins vs installed
|
|
104
|
+
- Only suggest high/medium confidence
|
|
105
|
+
- Skip if already installed
|
|
106
|
+
|
|
107
|
+
**Step 4: Format suggestions**:
|
|
108
|
+
```typescript
|
|
109
|
+
import { formatDetectedPlugins, generateInstallCommands } from '../../../../../src/utils/plugin-detection';
|
|
110
|
+
|
|
111
|
+
const output = formatDetectedPlugins(detected);
|
|
112
|
+
const commands = generateInstallCommands(detected);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Manual Detection (Original)
|
|
116
|
+
|
|
43
117
|
I check for plugin installation by:
|
|
44
118
|
- Looking for plugin-specific commands (e.g., `/specweave-github:sync`)
|
|
45
119
|
- Checking if plugin files exist in `.claude/` directory
|
|
@@ -63,6 +137,45 @@ Would you like me to guide you through the installation?
|
|
|
63
137
|
|
|
64
138
|
## Example Flows
|
|
65
139
|
|
|
140
|
+
### Example 0: Passive Tech Stack Detection (NEW!)
|
|
141
|
+
|
|
142
|
+
**User**: "Design a spec-driven blueprint for a simple task-tracking web app. Tech stack: Next.js + .NET 8 (Web API) + PostgreSQL + Prisma ORM."
|
|
143
|
+
|
|
144
|
+
**Me (plugin-detector activates automatically)**:
|
|
145
|
+
```
|
|
146
|
+
🔍 Scanning your project for tech stack...
|
|
147
|
+
|
|
148
|
+
📦 Plugin Recommendations
|
|
149
|
+
|
|
150
|
+
Based on your tech stack (Next.js + .NET 8 + PostgreSQL + Docker), these plugins would help:
|
|
151
|
+
|
|
152
|
+
Recommended (high confidence):
|
|
153
|
+
• specweave-frontend - Next.js + React patterns, component architecture
|
|
154
|
+
Signals: Next.js mentioned
|
|
155
|
+
Install: /plugin install specweave-frontend@specweave
|
|
156
|
+
|
|
157
|
+
• specweave-backend - .NET 8 Web API patterns, Entity Framework, REST APIs
|
|
158
|
+
Signals: .NET 8 Web API mentioned
|
|
159
|
+
Install: /plugin install specweave-backend@specweave
|
|
160
|
+
|
|
161
|
+
• specweave-infrastructure - Docker Compose, PostgreSQL schema, container orchestration
|
|
162
|
+
Signals: PostgreSQL, Docker mentioned (if docker-compose.yml exists)
|
|
163
|
+
Install: /plugin install specweave-infrastructure@specweave
|
|
164
|
+
|
|
165
|
+
💡 Quick install all:
|
|
166
|
+
/plugin install specweave-frontend@specweave
|
|
167
|
+
/plugin install specweave-backend@specweave
|
|
168
|
+
/plugin install specweave-infrastructure@specweave
|
|
169
|
+
|
|
170
|
+
📖 Or I can continue with the core plugin only (you can add plugins later)
|
|
171
|
+
|
|
172
|
+
Would you like to:
|
|
173
|
+
1️⃣ Install these plugins now (recommended for better architecture patterns)
|
|
174
|
+
2️⃣ Continue without plugins (I'll do my best with core plugin only)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
*User installs plugins, then I continue with their task using plugin-specific knowledge*
|
|
178
|
+
|
|
66
179
|
### Example 1: GitHub Integration
|
|
67
180
|
|
|
68
181
|
**User**: "Let's sync this increment to GitHub Issues"
|