specweave 0.7.1 → 0.8.2

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.
Files changed (137) hide show
  1. package/CLAUDE.md +307 -11
  2. package/README.md +41 -3
  3. package/bin/specweave.js +0 -27
  4. package/dist/cli/commands/import-docs.d.ts +21 -0
  5. package/dist/cli/commands/import-docs.d.ts.map +1 -0
  6. package/dist/cli/commands/import-docs.js +146 -0
  7. package/dist/cli/commands/import-docs.js.map +1 -0
  8. package/dist/cli/commands/init-multiproject.d.ts +11 -0
  9. package/dist/cli/commands/init-multiproject.d.ts.map +1 -0
  10. package/dist/cli/commands/init-multiproject.js +202 -0
  11. package/dist/cli/commands/init-multiproject.js.map +1 -0
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +4 -93
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/migrate-to-multiproject.d.ts +37 -0
  16. package/dist/cli/commands/migrate-to-multiproject.d.ts.map +1 -0
  17. package/dist/cli/commands/migrate-to-multiproject.js +189 -0
  18. package/dist/cli/commands/migrate-to-multiproject.js.map +1 -0
  19. package/dist/cli/commands/migrate-to-profiles.d.ts +25 -0
  20. package/dist/cli/commands/migrate-to-profiles.d.ts.map +1 -0
  21. package/dist/cli/commands/migrate-to-profiles.js +350 -0
  22. package/dist/cli/commands/migrate-to-profiles.js.map +1 -0
  23. package/dist/cli/commands/switch-project.d.ts +13 -0
  24. package/dist/cli/commands/switch-project.d.ts.map +1 -0
  25. package/dist/cli/commands/switch-project.js +91 -0
  26. package/dist/cli/commands/switch-project.js.map +1 -0
  27. package/dist/cli/helpers/issue-tracker/index.js +4 -4
  28. package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
  29. package/dist/cli/helpers/issue-tracker/utils.d.ts +6 -3
  30. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -1
  31. package/dist/cli/helpers/issue-tracker/utils.js +9 -7
  32. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -1
  33. package/dist/core/brownfield/analyzer.d.ts +86 -0
  34. package/dist/core/brownfield/analyzer.d.ts.map +1 -0
  35. package/dist/core/brownfield/analyzer.js +365 -0
  36. package/dist/core/brownfield/analyzer.js.map +1 -0
  37. package/dist/core/brownfield/importer.d.ts +76 -0
  38. package/dist/core/brownfield/importer.d.ts.map +1 -0
  39. package/dist/core/brownfield/importer.js +287 -0
  40. package/dist/core/brownfield/importer.js.map +1 -0
  41. package/dist/core/config-manager.d.ts +47 -0
  42. package/dist/core/config-manager.d.ts.map +1 -0
  43. package/dist/core/config-manager.js +136 -0
  44. package/dist/core/config-manager.js.map +1 -0
  45. package/dist/core/project-manager.d.ts +127 -0
  46. package/dist/core/project-manager.d.ts.map +1 -0
  47. package/dist/core/project-manager.js +524 -0
  48. package/dist/core/project-manager.js.map +1 -0
  49. package/dist/core/sync/profile-manager.d.ts +72 -0
  50. package/dist/core/sync/profile-manager.d.ts.map +1 -0
  51. package/dist/core/sync/profile-manager.js +338 -0
  52. package/dist/core/sync/profile-manager.js.map +1 -0
  53. package/dist/core/sync/profile-selector.d.ts +52 -0
  54. package/dist/core/sync/profile-selector.d.ts.map +1 -0
  55. package/dist/core/sync/profile-selector.js +179 -0
  56. package/dist/core/sync/profile-selector.js.map +1 -0
  57. package/dist/core/sync/project-context.d.ts +81 -0
  58. package/dist/core/sync/project-context.d.ts.map +1 -0
  59. package/dist/core/sync/project-context.js +354 -0
  60. package/dist/core/sync/project-context.js.map +1 -0
  61. package/dist/core/sync/rate-limiter.d.ts +116 -0
  62. package/dist/core/sync/rate-limiter.d.ts.map +1 -0
  63. package/dist/core/sync/rate-limiter.js +308 -0
  64. package/dist/core/sync/rate-limiter.js.map +1 -0
  65. package/dist/core/sync/time-range-selector.d.ts +48 -0
  66. package/dist/core/sync/time-range-selector.d.ts.map +1 -0
  67. package/dist/core/sync/time-range-selector.js +224 -0
  68. package/dist/core/sync/time-range-selector.js.map +1 -0
  69. package/dist/core/types/config.d.ts +4 -0
  70. package/dist/core/types/config.d.ts.map +1 -1
  71. package/dist/core/types/config.js.map +1 -1
  72. package/dist/core/types/sync-profile.d.ts +205 -0
  73. package/dist/core/types/sync-profile.d.ts.map +1 -0
  74. package/dist/core/types/sync-profile.js +8 -0
  75. package/dist/core/types/sync-profile.js.map +1 -0
  76. package/dist/utils/project-detection.d.ts +141 -0
  77. package/dist/utils/project-detection.d.ts.map +1 -0
  78. package/dist/utils/project-detection.js +321 -0
  79. package/dist/utils/project-detection.js.map +1 -0
  80. package/package.json +2 -1
  81. package/plugins/specweave/agents/pm/AGENT.md +7 -4
  82. package/plugins/specweave/commands/specweave-abandon.md +17 -17
  83. package/plugins/specweave/commands/specweave-check-tests.md +14 -14
  84. package/plugins/specweave/commands/specweave-costs.md +1 -1
  85. package/plugins/specweave/commands/specweave-do.md +12 -12
  86. package/plugins/specweave/commands/specweave-done.md +28 -15
  87. package/plugins/specweave/commands/specweave-import-docs.md +212 -0
  88. package/plugins/specweave/commands/specweave-increment.md +10 -10
  89. package/plugins/specweave/commands/specweave-init-multiproject.md +146 -0
  90. package/plugins/specweave/commands/specweave-next.md +16 -16
  91. package/plugins/specweave/commands/specweave-pause.md +17 -17
  92. package/plugins/specweave/commands/specweave-progress.md +10 -10
  93. package/plugins/specweave/commands/specweave-qa.md +11 -11
  94. package/plugins/specweave/commands/specweave-resume.md +22 -22
  95. package/plugins/specweave/commands/specweave-status.md +18 -18
  96. package/plugins/specweave/commands/specweave-switch-project.md +168 -0
  97. package/plugins/specweave/commands/specweave-sync-docs.md +1 -1
  98. package/plugins/specweave/commands/specweave-sync-tasks.md +9 -9
  99. package/plugins/specweave/commands/specweave-tdd-cycle.md +7 -0
  100. package/plugins/specweave/commands/specweave-tdd-green.md +7 -0
  101. package/plugins/specweave/commands/specweave-tdd-red.md +7 -0
  102. package/plugins/specweave/commands/specweave-tdd-refactor.md +7 -0
  103. package/plugins/specweave/commands/specweave-translate.md +1 -1
  104. package/plugins/specweave/commands/specweave-update-scope.md +8 -8
  105. package/plugins/specweave/commands/specweave-validate.md +18 -20
  106. package/plugins/specweave/commands/specweave.md +5 -5
  107. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  108. package/plugins/specweave/skills/increment-planner/SKILL.md +40 -4
  109. package/plugins/specweave/skills/increment-quality-judge/SKILL.md +5 -5
  110. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +5 -5
  111. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  112. package/plugins/specweave-ado/commands/{close-workitem.md → specweave-ado-close-workitem.md} +1 -1
  113. package/plugins/specweave-ado/commands/{create-workitem.md → specweave-ado-create-workitem.md} +1 -1
  114. package/plugins/specweave-ado/commands/{status.md → specweave-ado-status.md} +1 -1
  115. package/plugins/specweave-ado/commands/{sync.md → specweave-ado-sync.md} +1 -1
  116. package/plugins/specweave-ado/lib/ado-client-v2.ts +547 -0
  117. package/plugins/specweave-github/commands/{close-issue.md → specweave-github-close-issue.md} +1 -1
  118. package/plugins/specweave-github/commands/{create-issue.md → specweave-github-create-issue.md} +1 -1
  119. package/plugins/specweave-github/commands/{status.md → specweave-github-status.md} +1 -1
  120. package/plugins/specweave-github/commands/{sync-tasks.md → specweave-github-sync-tasks.md} +1 -1
  121. package/plugins/specweave-github/commands/specweave-github-sync.md +568 -0
  122. package/plugins/specweave-github/lib/github-client-v2.ts +555 -0
  123. package/plugins/specweave-infrastructure/commands/{monitor-setup.md → specweave-infrastructure-monitor-setup.md} +1 -1
  124. package/plugins/specweave-infrastructure/commands/{slo-implement.md → specweave-infrastructure-slo-implement.md} +1 -1
  125. package/plugins/specweave-jira/commands/{sync.md → specweave-jira-sync.md} +1 -1
  126. package/plugins/specweave-jira/lib/jira-client-v2.ts +529 -0
  127. package/plugins/specweave-ml/commands/{ml-deploy.md → specweave-ml-deploy.md} +1 -1
  128. package/plugins/specweave-ml/commands/{ml-evaluate.md → specweave-ml-evaluate.md} +1 -1
  129. package/plugins/specweave-ml/commands/{ml-explain.md → specweave-ml-explain.md} +1 -1
  130. package/plugins/specweave-ml/commands/{ml-pipeline.md → specweave-ml-pipeline.md} +1 -1
  131. package/src/templates/AGENTS.md.template +1 -0
  132. package/src/templates/CLAUDE.md.template +1 -0
  133. package/plugins/specweave/hooks/post-increment-plugin-detect.sh +0 -142
  134. package/plugins/specweave/hooks/pre-task-plugin-detect.sh +0 -96
  135. package/plugins/specweave/skills/plugin-detector/SKILL.md +0 -324
  136. package/plugins/specweave-github/commands/sync.md +0 -443
  137. /package/plugins/specweave/{commands/README.md → COMMANDS.md} +0 -0
@@ -1,142 +0,0 @@
1
- #!/bin/bash
2
-
3
- #
4
- # Post-Increment Plugin Detection Hook (T-021)
5
- #
6
- # Runs AFTER increment completion to suggest plugins based on git diff
7
- # This is Phase 4 of the 4-phase plugin detection system
8
- #
9
- # Trigger: After `/specweave.done` completes an increment
10
- # Output: Plugin suggestions for NEXT increment
11
- #
12
-
13
- # Exit on error
14
- set -e
15
-
16
- # Get project root (assumes hook runs from project directory)
17
- PROJECT_ROOT=$(pwd)
18
-
19
- # Colors for output
20
- GREEN='\033[0;32m'
21
- YELLOW='\033[1;33m'
22
- CYAN='\033[0;36m'
23
- GRAY='\033[0;37m'
24
- MAGENTA='\033[0;35m'
25
- NC='\033[0m' # No Color
26
-
27
- # Check if SpecWeave is installed
28
- if ! command -v specweave &> /dev/null; then
29
- # Silent exit if SpecWeave not installed (development mode)
30
- exit 0
31
- fi
32
-
33
- # Check if git repository exists
34
- if [ ! -d ".git" ]; then
35
- # Not a git repo, skip detection
36
- exit 0
37
- fi
38
-
39
- # Get completed increment number (passed as argument)
40
- INCREMENT_NUM="$1"
41
-
42
- if [ -z "$INCREMENT_NUM" ]; then
43
- # No increment number provided, skip
44
- exit 0
45
- fi
46
-
47
- # Get git diff since last increment tag (or HEAD if no tags)
48
- LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~10")
49
- GIT_DIFF=$(git diff --name-only "$LAST_TAG"..HEAD 2>/dev/null || echo "")
50
-
51
- if [ -z "$GIT_DIFF" ]; then
52
- # No changes detected, skip
53
- exit 0
54
- fi
55
-
56
- # Also check package.json changes for new dependencies
57
- PACKAGE_JSON_CHANGED=false
58
- if echo "$GIT_DIFF" | grep -q "package.json"; then
59
- PACKAGE_JSON_CHANGED=true
60
- fi
61
-
62
- # Keyword-based plugin detection from file changes
63
- declare -A PLUGIN_PATTERNS=(
64
- ["specweave-github"]=".github/|github-"
65
- ["specweave-kubernetes"]="kubernetes/|k8s/|helm/|\.yaml$"
66
- ["specweave-frontend-stack"]="components/|pages/|app/|\.tsx$|\.jsx$"
67
- ["specweave-backend-stack"]="api/|server/|routes/|controllers/"
68
- ["specweave-ml-ops"]="models/|training/|\.ipynb$|\.h5$|\.pkl$"
69
- ["specweave-payment-processing"]="payments/|billing/|stripe"
70
- ["specweave-figma"]="\.figma|design/|mockups/"
71
- ["specweave-observability"]="prometheus/|grafana/|monitoring/"
72
- ["specweave-diagrams"]="diagrams/|\.mmd$|architecture/"
73
- )
74
-
75
- # Dependency-based detection (if package.json changed)
76
- declare -A DEPENDENCY_PLUGINS=(
77
- ["specweave-frontend-stack"]="react|vue|angular|next"
78
- ["specweave-backend-stack"]="express|fastapi|django|nestjs"
79
- ["specweave-payment-processing"]="stripe|paypal"
80
- ["specweave-ml-ops"]="tensorflow|pytorch|scikit-learn"
81
- ["specweave-observability"]="prometheus-client|@opentelemetry"
82
- )
83
-
84
- # Detect plugins based on file patterns
85
- SUGGESTED_PLUGINS=()
86
-
87
- # Check file patterns
88
- for plugin in "${!PLUGIN_PATTERNS[@]}"; do
89
- pattern="${PLUGIN_PATTERNS[$plugin]}"
90
-
91
- if echo "$GIT_DIFF" | grep -qi -E "$pattern"; then
92
- # Check if plugin is already enabled
93
- if ! specweave plugin list --enabled 2>/dev/null | grep -q "$plugin"; then
94
- if [[ ! " ${SUGGESTED_PLUGINS[@]} " =~ " ${plugin} " ]]; then
95
- SUGGESTED_PLUGINS+=("$plugin")
96
- fi
97
- fi
98
- fi
99
- done
100
-
101
- # Check package.json dependencies if it changed
102
- if [ "$PACKAGE_JSON_CHANGED" = true ] && [ -f "package.json" ]; then
103
- DEPENDENCIES=$(cat package.json | grep -A 100 '"dependencies"' | grep -A 100 '"devDependencies"' || echo "")
104
-
105
- for plugin in "${!DEPENDENCY_PLUGINS[@]}"; do
106
- keywords="${DEPENDENCY_PLUGINS[$plugin]}"
107
-
108
- if echo "$DEPENDENCIES" | grep -qi -E "$keywords"; then
109
- if ! specweave plugin list --enabled 2>/dev/null | grep -q "$plugin"; then
110
- if [[ ! " ${SUGGESTED_PLUGINS[@]} " =~ " ${plugin} " ]]; then
111
- SUGGESTED_PLUGINS+=("$plugin")
112
- fi
113
- fi
114
- fi
115
- done
116
- fi
117
-
118
- # Output suggestions if any found
119
- if [ ${#SUGGESTED_PLUGINS[@]} -gt 0 ]; then
120
- echo ""
121
- echo -e "${MAGENTA}══════════════════════════════════════════════════════${NC}"
122
- echo -e "${CYAN}💡 Plugin Suggestions for Next Increment${NC}"
123
- echo -e "${MAGENTA}══════════════════════════════════════════════════════${NC}"
124
- echo ""
125
- echo -e "${GRAY}Increment ${INCREMENT_NUM} introduced changes that suggest:${NC}"
126
- echo ""
127
-
128
- for plugin in "${SUGGESTED_PLUGINS[@]}"; do
129
- echo -e " ✨ ${GREEN}${plugin}${NC}"
130
- done
131
-
132
- echo ""
133
- echo -e "${YELLOW}Consider enabling these plugins for your next increment:${NC}"
134
- echo -e "${CYAN} specweave plugin enable <name>${NC}"
135
- echo ""
136
- echo -e "${GRAY}Plugins will auto-activate skills and agents for better support${NC}"
137
- echo -e "${MAGENTA}══════════════════════════════════════════════════════${NC}"
138
- echo ""
139
- fi
140
-
141
- # Always exit successfully (non-blocking)
142
- exit 0
@@ -1,96 +0,0 @@
1
- #!/bin/bash
2
-
3
- #
4
- # Pre-Task Plugin Detection Hook (T-020)
5
- #
6
- # Runs BEFORE task execution to suggest plugins based on task description
7
- # This is Phase 3 of the 4-phase plugin detection system
8
- #
9
- # Trigger: Before executing any task via `/specweave.do`
10
- # Output: Non-blocking plugin suggestions
11
- #
12
-
13
- # Exit on error
14
- set -e
15
-
16
- # Get project root (assumes hook runs from project directory)
17
- PROJECT_ROOT=$(pwd)
18
-
19
- # Colors for output
20
- GREEN='\033[0;32m'
21
- YELLOW='\033[1;33m'
22
- CYAN='\033[0;36m'
23
- GRAY='\033[0;37m'
24
- NC='\033[0m' # No Color
25
-
26
- # Check if SpecWeave is installed
27
- if ! command -v specweave &> /dev/null; then
28
- # Silent exit if SpecWeave not installed (development mode)
29
- exit 0
30
- fi
31
-
32
- # Get current task being executed (passed as argument)
33
- TASK_FILE="$1"
34
-
35
- if [ -z "$TASK_FILE" ] || [ ! -f "$TASK_FILE" ]; then
36
- # No task file provided, skip detection
37
- exit 0
38
- fi
39
-
40
- # Extract task description
41
- TASK_DESCRIPTION=$(grep -A 5 "^### T-[0-9]" "$TASK_FILE" | head -1 || echo "")
42
-
43
- if [ -z "$TASK_DESCRIPTION" ]; then
44
- # No description found, skip
45
- exit 0
46
- fi
47
-
48
- # Keyword-based plugin detection
49
- declare -A PLUGIN_KEYWORDS=(
50
- ["specweave-github"]="github|gh|issue|pull request|pr"
51
- ["specweave-kubernetes"]="kubernetes|k8s|kubectl|helm|pod|deployment"
52
- ["specweave-frontend-stack"]="react|vue|angular|nextjs|frontend|ui|component"
53
- ["specweave-backend-stack"]="express|fastapi|django|flask|nestjs|backend|api|server"
54
- ["specweave-ml-ops"]="tensorflow|pytorch|sklearn|ml|machine learning|model|training"
55
- ["specweave-payment-processing"]="stripe|paypal|payment|billing|subscription"
56
- ["specweave-figma"]="figma|design|mockup|prototype"
57
- ["specweave-jira"]="jira|atlassian|ticket"
58
- ["specweave-observability"]="prometheus|grafana|datadog|monitoring|metrics|tracing"
59
- )
60
-
61
- # Detect plugins based on keywords
62
- SUGGESTED_PLUGINS=()
63
-
64
- for plugin in "${!PLUGIN_KEYWORDS[@]}"; do
65
- keywords="${PLUGIN_KEYWORDS[$plugin]}"
66
-
67
- # Check if any keyword matches (case-insensitive)
68
- if echo "$TASK_DESCRIPTION" | grep -qi -E "$keywords"; then
69
- # Check if plugin is already enabled
70
- if ! specweave plugin list --enabled 2>/dev/null | grep -q "$plugin"; then
71
- SUGGESTED_PLUGINS+=("$plugin")
72
- fi
73
- fi
74
- done
75
-
76
- # Output suggestions if any found
77
- if [ ${#SUGGESTED_PLUGINS[@]} -gt 0 ]; then
78
- echo ""
79
- echo -e "${CYAN}💡 Plugin Detection${NC}"
80
- echo ""
81
- echo -e "${GRAY}Task mentions: ${TASK_DESCRIPTION}${NC}"
82
- echo ""
83
- echo -e "${YELLOW}Suggested plugins:${NC}"
84
-
85
- for plugin in "${SUGGESTED_PLUGINS[@]}"; do
86
- echo -e " • ${GREEN}${plugin}${NC}"
87
- done
88
-
89
- echo ""
90
- echo -e "${GRAY}This task might benefit from these plugins.${NC}"
91
- echo -e "${GRAY}Run: ${CYAN}specweave plugin enable <name>${GRAY} to install${NC}"
92
- echo ""
93
- fi
94
-
95
- # Always exit successfully (non-blocking)
96
- exit 0
@@ -1,324 +0,0 @@
1
- ---
2
- name: plugin-detector
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
- ---
5
-
6
- # SpecWeave Plugin Detector
7
-
8
- ## What I Do
9
-
10
- I detect when you need a SpecWeave plugin that isn't installed yet, and guide you through enabling it with clear, copy-pasteable commands.
11
-
12
- ## When I Activate
13
-
14
- When you mention capabilities that require specific SpecWeave plugins:
15
-
16
- ### External Integrations
17
- - **GitHub**: "sync to GitHub", "create issue", "GitHub integration", "export to GitHub" → needs `specweave-github`
18
- - **Jira**: "sync to Jira", "create Jira ticket", "Jira integration" → needs `specweave-jira`
19
- - **Azure DevOps**: "sync to ADO", "Azure DevOps", "work items" → needs `specweave-ado`
20
-
21
- ### Tech Stacks
22
- - **Kubernetes**: "deploy to K8s", "Helm chart", "kubectl", "K8s manifests" → needs `specweave-kubernetes`
23
- - **Frontend**: "React component", "Next.js", "Vue", "design system" → needs `specweave-frontend`
24
- - **Backend**: "Express API", "FastAPI", "NestJS", ".NET backend" → needs `specweave-backend`
25
-
26
- ### Domain Expertise
27
- - **ML/AI**: "train model", "MLflow", "TensorFlow", "PyTorch", "ML pipeline" → needs `specweave-ml`
28
- - **Payments**: "Stripe", "PayPal", "subscription billing", "PCI compliance" → needs `specweave-payments`
29
- - **Testing**: "Playwright tests", "E2E testing", "visual regression" → needs `specweave-testing`
30
- - **Figma**: "Figma design", "design tokens", "import from Figma" → needs `specweave-figma`
31
- - **Infrastructure**: "Hetzner", "Prometheus", "Grafana", "monitoring" → needs `specweave-infrastructure`
32
- - **Diagrams**: "C4 diagram", "architecture diagram", "Mermaid", "sequence diagram" → needs `specweave-diagrams`
33
-
34
- ## How I Help
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
-
71
- 1. **Detect missing plugin**: Check if the required plugin is installed
72
- 2. **Provide installation command**: Give exact `/plugin install` command
73
- 3. **Explain benefits**: List what the plugin provides (skills, agents, commands)
74
- 4. **Continue once enabled**: Resume your task with plugin features available
75
-
76
- ## Plugin Detection Logic
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
-
117
- I check for plugin installation by:
118
- - Looking for plugin-specific commands (e.g., `/specweave-github:sync`)
119
- - Checking if plugin files exist in `.claude/` directory
120
- - Detecting absence of expected skills/agents
121
-
122
- **If a plugin is missing**, I provide:
123
- ```
124
- 📦 Plugin Required: specweave-{name}
125
-
126
- To enable this plugin:
127
- 1. Run: /plugin install specweave-{name}@specweave
128
- 2. Restart this conversation (or continue - plugin will load)
129
-
130
- This plugin provides:
131
- ✅ {List of key features}
132
- ✅ {Specialized agents}
133
- ✅ {Slash commands}
134
-
135
- Would you like me to guide you through the installation?
136
- ```
137
-
138
- ## Example Flows
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
-
179
- ### Example 1: GitHub Integration
180
-
181
- **User**: "Let's sync this increment to GitHub Issues"
182
-
183
- **Me**:
184
- ```
185
- 📦 Plugin Required: specweave-github
186
-
187
- I notice you want GitHub integration, but the `specweave-github` plugin isn't installed yet.
188
-
189
- To enable GitHub sync features:
190
-
191
- 1. Run this command:
192
- /plugin install specweave-github@specweave
193
-
194
- 2. Once installed, you'll have access to:
195
- ✅ Bidirectional increment ↔ GitHub Issue sync
196
- ✅ Task-level progress tracking via issue comments
197
- ✅ Automatic issue creation from specs
198
- ✅ GitHub CLI integration (via `gh` command)
199
- ✅ Commands: /specweave:github:sync, /specweave:github:create-issue, /specweave:github:status
200
-
201
- Would you like me to guide you through the installation, or would you prefer to continue without GitHub sync?
202
- ```
203
-
204
- ### Example 2: Kubernetes Deployment
205
-
206
- **User**: "Deploy this to Kubernetes with Helm"
207
-
208
- **Me**:
209
- ```
210
- 📦 Plugin Required: specweave-kubernetes
211
-
212
- For Kubernetes deployment features, you'll need the `specweave-kubernetes` plugin.
213
-
214
- To enable:
215
-
216
- 1. Run: /plugin install specweave-kubernetes@specweave
217
-
218
- 2. This plugin provides:
219
- ✅ K8s manifest generation (deployments, services, configmaps)
220
- ✅ Helm chart scaffolding and templates
221
- ✅ GitOps workflow with ArgoCD/Flux
222
- ✅ Security policies and RBAC patterns
223
- ✅ Skills: k8s-manifest-generator, helm-chart-scaffolding, gitops-workflow
224
-
225
- Alternatively, I can help you create basic K8s manifests manually without the plugin. Which would you prefer?
226
- ```
227
-
228
- ### Example 3: Already Installed
229
-
230
- **User**: "Create a C4 diagram for this architecture"
231
-
232
- **Me**:
233
- ```
234
- ✅ Plugin Available: specweave-diagrams
235
-
236
- Great! The diagrams plugin is installed. I can create C4 diagrams for you.
237
-
238
- I'll use the diagrams-architect agent to:
239
- 1. Analyze your architecture from specs
240
- 2. Generate Mermaid C4 diagram code
241
- 3. Export to both .mmd and .svg formats
242
- 4. Place in .specweave/docs/internal/architecture/diagrams/
243
-
244
- Let me start by examining your architecture specifications...
245
- ```
246
-
247
- ## Available SpecWeave Plugins
248
-
249
- ### Core (Always Available)
250
- - `specweave` - Framework essentials (increment lifecycle, PM/Architect/Tech Lead agents)
251
-
252
- ### Integrations
253
- - `specweave-github` - GitHub Issues sync
254
- - `specweave-jira` - Jira integration
255
- - `specweave-ado` - Azure DevOps integration
256
-
257
- ### Tech Stacks
258
- - `specweave-frontend` - React, Next.js, Vue, design systems
259
- - `specweave-backend` - Node.js, Python, .NET APIs
260
- - `specweave-kubernetes` - K8s deployment, Helm, GitOps
261
- - `specweave-infrastructure` - Cloud infra, monitoring, Hetzner
262
-
263
- ### Domain Expertise
264
- - `specweave-ml` - ML pipelines, training, deployment
265
- - `specweave-payments` - Stripe, PayPal, PCI compliance
266
- - `specweave-testing` - Playwright E2E, visual regression
267
- - `specweave-figma` - Design system integration
268
- - `specweave-diagrams` - C4, Mermaid, architecture diagrams
269
- - `specweave-docs` - Docusaurus generation
270
-
271
- ### Utilities
272
- - `specweave-tooling` - Skill creation, routing
273
- - `specweave-cost-optimizer` - Cloud cost comparison
274
- - `specweave-alternatives` - Framework comparison
275
-
276
- ## Installation Commands Reference
277
-
278
- **Quick Install (Most Common)**:
279
- ```bash
280
- # GitHub integration
281
- /plugin install specweave-github@specweave
282
-
283
- # Frontend development
284
- /plugin install specweave-frontend@specweave
285
-
286
- # Backend APIs
287
- /plugin install specweave-backend@specweave
288
-
289
- # Kubernetes deployment
290
- /plugin install specweave-kubernetes@specweave
291
-
292
- # ML/AI workflows
293
- /plugin install specweave-ml@specweave
294
-
295
- # Architecture diagrams
296
- /plugin install specweave-diagrams@specweave
297
- ```
298
-
299
- **View All Available**:
300
- ```bash
301
- /plugin marketplace list specweave
302
- ```
303
-
304
- ## Best Practices
305
-
306
- 1. **Be Proactive**: Detect missing plugins early in the conversation
307
- 2. **Offer Alternatives**: If a plugin isn't installed, suggest manual approaches
308
- 3. **Don't Block**: Never refuse to help—offer to continue without the plugin
309
- 4. **Clear Instructions**: Always provide exact copy-pasteable commands
310
- 5. **Explain Benefits**: Help users understand why the plugin is valuable
311
-
312
- ## Integration with Other Skills
313
-
314
- This skill works alongside:
315
- - **project-kickstarter**: Suggests plugins during new project setup
316
- - **increment-planner**: Recommends plugins based on increment requirements
317
- - **specweave-detector**: Coordinates with workflow detection
318
-
319
- ## Notes
320
-
321
- - This skill is **non-blocking** - I always offer to continue without plugins
322
- - Plugins are **opt-in** - users choose what to install
323
- - Installation is **instant** - plugins activate immediately
324
- - All plugins follow **Claude Code's native plugin architecture**