specweave 0.23.18 → 0.24.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/marketplace.json +93 -49
- package/CLAUDE.md +137 -4
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
- package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
- package/dist/src/cli/helpers/smart-filter.js +265 -0
- package/dist/src/cli/helpers/smart-filter.js.map +1 -0
- package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
- package/dist/src/core/qa/quality-gate-decider.js +2 -2
- package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
- package/dist/src/core/qa/risk-calculator.d.ts +2 -2
- package/dist/src/core/qa/risk-calculator.js +2 -2
- package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
- package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
- package/dist/src/core/validators/ac-presence-validator.js +149 -0
- package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.js +267 -0
- package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
- package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
- package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
- package/dist/src/integrations/jira/filter-processor.js +207 -0
- package/dist/src/integrations/jira/filter-processor.js.map +1 -0
- package/dist/src/integrations/jira/jira-client.d.ts +13 -0
- package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-client.js +33 -0
- package/dist/src/integrations/jira/jira-client.js.map +1 -1
- package/dist/src/utils/ac-embedder.d.ts +63 -0
- package/dist/src/utils/ac-embedder.d.ts.map +1 -0
- package/dist/src/utils/ac-embedder.js +217 -0
- package/dist/src/utils/ac-embedder.js.map +1 -0
- package/dist/src/utils/env-manager.d.ts +86 -0
- package/dist/src/utils/env-manager.d.ts.map +1 -0
- package/dist/src/utils/env-manager.js +188 -0
- package/dist/src/utils/env-manager.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
- package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
- package/plugins/specweave/commands/specweave-do.md +37 -0
- package/plugins/specweave/commands/specweave-done.md +159 -0
- package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
- package/plugins/specweave/commands/specweave-next.md +148 -3
- package/plugins/specweave/commands/specweave-qa.md +2 -2
- package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
- package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
- package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
- package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
- package/plugins/specweave-backend/commands/crud-generate.md +109 -0
- package/plugins/specweave-backend/commands/migration-generate.md +139 -0
- package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
- package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
- package/plugins/specweave-confluent/commands/schema-register.md +123 -0
- package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-core/commands/architecture-review.md +288 -0
- package/plugins/specweave-core/commands/code-review.md +213 -0
- package/plugins/specweave-core/commands/refactor-plan.md +249 -0
- package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
- package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
- package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
- package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
- package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
- package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
- package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
- package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-docs/commands/docs-generate.md +441 -0
- package/plugins/specweave-docs/commands/docs-init.md +334 -0
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
- package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
- package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-figma/commands/figma-import.md +690 -0
- package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
- package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
- package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
- package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
- package/plugins/specweave-frontend/commands/component-generate.md +510 -0
- package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
- package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
- package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
- package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
- package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
- package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/commands/import-projects.js +183 -0
- package/plugins/specweave-jira/commands/import-projects.md +97 -0
- package/plugins/specweave-jira/commands/import-projects.ts +288 -0
- package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
- package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
- package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
- package/plugins/specweave-mobile/commands/build-config.md +256 -0
- package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +13 -12
- package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
- package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
- package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
- package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
- package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
- package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
- package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
- package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
- package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
- package/plugins/specweave-testing/commands/test-coverage.md +979 -0
- package/plugins/specweave-testing/commands/test-generate.md +1156 -0
- package/plugins/specweave-testing/commands/test-init.md +409 -0
- package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
- package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
- package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
- package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-ui/commands/ui-automate.md +199 -0
- package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
- package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
- package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
- package/plugins/specweave/commands/check-hooks.md +0 -257
- package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
- package/plugins/specweave-plugin-dev/skills/plugin-expert/SKILL.md +0 -1231
- /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Pre-Increment-Start Hook
|
|
4
|
+
#
|
|
5
|
+
# Validates increment readiness before allowing `/specweave:do` to start work.
|
|
6
|
+
#
|
|
7
|
+
# **Critical Checks**:
|
|
8
|
+
# 1. spec.md contains Acceptance Criteria
|
|
9
|
+
# 2. AC count matches metadata.json
|
|
10
|
+
# 3. No duplicate task files (tasks.md, tasks-detailed.md)
|
|
11
|
+
# 4. Increment structure is valid
|
|
12
|
+
#
|
|
13
|
+
# **Triggered by**: /specweave:do command (before starting implementation)
|
|
14
|
+
#
|
|
15
|
+
# **Exit codes**:
|
|
16
|
+
# - 0: Validation passed, safe to start
|
|
17
|
+
# - 1: Validation failed, BLOCK start
|
|
18
|
+
#
|
|
19
|
+
# **See**: ADR-0062 (AC Embedding Architecture)
|
|
20
|
+
#
|
|
21
|
+
|
|
22
|
+
set -euo pipefail
|
|
23
|
+
|
|
24
|
+
# Get increment path from environment or argument
|
|
25
|
+
INCREMENT_PATH="${1:-}"
|
|
26
|
+
|
|
27
|
+
if [ -z "$INCREMENT_PATH" ]; then
|
|
28
|
+
echo "❌ Error: INCREMENT_PATH not provided"
|
|
29
|
+
echo "Usage: $0 <increment-path>"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
if [ ! -d "$INCREMENT_PATH" ]; then
|
|
34
|
+
echo "❌ Error: Increment path not found: $INCREMENT_PATH"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
39
|
+
echo "PRE-START VALIDATION: $(basename "$INCREMENT_PATH")"
|
|
40
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
41
|
+
echo ""
|
|
42
|
+
|
|
43
|
+
VALIDATION_PASSED=true
|
|
44
|
+
|
|
45
|
+
# Check 1: spec.md exists
|
|
46
|
+
if [ ! -f "$INCREMENT_PATH/spec.md" ]; then
|
|
47
|
+
echo "❌ CRITICAL: spec.md not found"
|
|
48
|
+
VALIDATION_PASSED=false
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# Check 2: Acceptance Criteria section exists
|
|
52
|
+
if [ -f "$INCREMENT_PATH/spec.md" ]; then
|
|
53
|
+
if ! grep -q "## Acceptance Criteria" "$INCREMENT_PATH/spec.md"; then
|
|
54
|
+
echo "❌ CRITICAL: spec.md missing '## Acceptance Criteria' section"
|
|
55
|
+
echo ""
|
|
56
|
+
echo " spec.md MUST contain inline Acceptance Criteria for AC sync to work."
|
|
57
|
+
echo " Even when using 'structure: user-stories', ACs must be embedded in spec.md."
|
|
58
|
+
echo ""
|
|
59
|
+
echo " 💡 SUGGESTED FIX:"
|
|
60
|
+
echo " Run: /specweave:embed-acs $(basename "$INCREMENT_PATH")"
|
|
61
|
+
echo ""
|
|
62
|
+
VALIDATION_PASSED=false
|
|
63
|
+
fi
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Check 3: Count ACs in spec.md
|
|
67
|
+
AC_COUNT=0
|
|
68
|
+
if [ -f "$INCREMENT_PATH/spec.md" ]; then
|
|
69
|
+
AC_COUNT=$(grep -cE "^- \[[x ]\] \*\*AC-US[0-9]+-[0-9]+\*\*:" "$INCREMENT_PATH/spec.md" || true)
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
if [ "$AC_COUNT" -eq 0 ]; then
|
|
73
|
+
echo "❌ CRITICAL: spec.md contains 0 Acceptance Criteria"
|
|
74
|
+
echo ""
|
|
75
|
+
echo " Cannot start increment with no ACs defined."
|
|
76
|
+
echo ""
|
|
77
|
+
echo " 💡 SUGGESTED FIX:"
|
|
78
|
+
echo " 1. Add ACs manually to spec.md, OR"
|
|
79
|
+
echo " 2. Run: /specweave:embed-acs $(basename "$INCREMENT_PATH") (auto-embed from living docs)"
|
|
80
|
+
echo ""
|
|
81
|
+
VALIDATION_PASSED=false
|
|
82
|
+
else
|
|
83
|
+
echo "✅ Acceptance Criteria: $AC_COUNT ACs found in spec.md"
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Check 4: Validate AC count matches metadata.json
|
|
87
|
+
if [ -f "$INCREMENT_PATH/metadata.json" ]; then
|
|
88
|
+
EXPECTED_AC_COUNT=$(jq -r '.total_acs // 0' "$INCREMENT_PATH/metadata.json")
|
|
89
|
+
|
|
90
|
+
if [ "$EXPECTED_AC_COUNT" -ne "$AC_COUNT" ]; then
|
|
91
|
+
echo "⚠️ WARNING: AC count mismatch"
|
|
92
|
+
echo " spec.md: $AC_COUNT ACs"
|
|
93
|
+
echo " metadata.json: $EXPECTED_AC_COUNT ACs"
|
|
94
|
+
echo ""
|
|
95
|
+
echo " This may cause status line desyncs."
|
|
96
|
+
echo ""
|
|
97
|
+
# Don't block, just warn (metadata.json may be stale)
|
|
98
|
+
else
|
|
99
|
+
echo "✅ AC Count: Matches metadata.json ($EXPECTED_AC_COUNT ACs)"
|
|
100
|
+
fi
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Check 5: No duplicate task files
|
|
104
|
+
TASK_FILES=$(find "$INCREMENT_PATH" -maxdepth 1 -name "tasks*.md" -type f | wc -l)
|
|
105
|
+
if [ "$TASK_FILES" -gt 1 ]; then
|
|
106
|
+
echo "❌ CRITICAL: Multiple task files detected (MUST be only ONE tasks.md)"
|
|
107
|
+
find "$INCREMENT_PATH" -maxdepth 1 -name "tasks*.md" -type f -exec basename {} \;
|
|
108
|
+
echo ""
|
|
109
|
+
echo " 💡 SUGGESTED FIX:"
|
|
110
|
+
echo " Keep tasks.md, move others to reports/ directory"
|
|
111
|
+
echo ""
|
|
112
|
+
VALIDATION_PASSED=false
|
|
113
|
+
else
|
|
114
|
+
echo "✅ Structure: Single tasks.md file (no duplicates)"
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# Check 6: Validate frontmatter for 'structure: user-stories' pattern
|
|
118
|
+
if [ -f "$INCREMENT_PATH/spec.md" ]; then
|
|
119
|
+
if grep -q "structure: user-stories" "$INCREMENT_PATH/spec.md"; then
|
|
120
|
+
if [ "$AC_COUNT" -eq 0 ]; then
|
|
121
|
+
echo ""
|
|
122
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
123
|
+
echo "🚨 CRITICAL ARCHITECTURE VIOLATION"
|
|
124
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
125
|
+
echo ""
|
|
126
|
+
echo "spec.md uses 'structure: user-stories' but contains NO inline ACs."
|
|
127
|
+
echo ""
|
|
128
|
+
echo "**Why this is critical**:"
|
|
129
|
+
echo " - AC sync hooks expect ACs in spec.md (not living docs)"
|
|
130
|
+
echo " - Without inline ACs, status line will show 0% completion"
|
|
131
|
+
echo " - Tasks-to-AC traceability will be broken"
|
|
132
|
+
echo ""
|
|
133
|
+
echo "**Architecture requirement (ADR-0062)**:"
|
|
134
|
+
echo " spec.md is ALWAYS the source of truth for ACs,"
|
|
135
|
+
echo " even when living docs exist as documentation layer."
|
|
136
|
+
echo ""
|
|
137
|
+
echo "**IMMEDIATE ACTION REQUIRED**:"
|
|
138
|
+
echo " Run: /specweave:embed-acs $(basename "$INCREMENT_PATH")"
|
|
139
|
+
echo ""
|
|
140
|
+
echo "This will auto-embed ACs from living docs into spec.md."
|
|
141
|
+
echo ""
|
|
142
|
+
VALIDATION_PASSED=false
|
|
143
|
+
else
|
|
144
|
+
echo "✅ Living Docs Structure: ACs properly embedded in spec.md"
|
|
145
|
+
fi
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
echo ""
|
|
150
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
151
|
+
|
|
152
|
+
if [ "$VALIDATION_PASSED" = true ]; then
|
|
153
|
+
echo "✅ PRE-START VALIDATION: PASSED"
|
|
154
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
155
|
+
echo ""
|
|
156
|
+
echo "Increment is ready to start. Proceeding with /specweave:do..."
|
|
157
|
+
exit 0
|
|
158
|
+
else
|
|
159
|
+
echo "❌ PRE-START VALIDATION: FAILED"
|
|
160
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
161
|
+
echo ""
|
|
162
|
+
echo "Cannot start increment due to validation failures above."
|
|
163
|
+
echo ""
|
|
164
|
+
echo "Fix the issues and try again, or run validation manually:"
|
|
165
|
+
echo " /specweave:validate $(basename "$INCREMENT_PATH")"
|
|
166
|
+
echo ""
|
|
167
|
+
exit 1
|
|
168
|
+
fi
|
|
@@ -113,7 +113,7 @@ Step 4: Execute → Follow the increment planning workflow
|
|
|
113
113
|
|
|
114
114
|
#### increment-quality-judge-v2
|
|
115
115
|
|
|
116
|
-
**Description**: Enhanced AI-powered quality assessment with RISK SCORING (
|
|
116
|
+
**Description**: Enhanced AI-powered quality assessment with RISK SCORING (Probability × Impact method) 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, /specweave:qa command.
|
|
117
117
|
|
|
118
118
|
**Activates for**: validate quality, quality check, assess spec, evaluate increment, spec review, quality score, risk assessment, qa check, quality gate
|
|
119
119
|
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specweave-ado:import-projects
|
|
3
|
+
description: Import additional Azure DevOps projects post-init with area path mapping, filtering, and dry-run preview
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Import Azure DevOps Projects Command
|
|
7
|
+
|
|
8
|
+
You are an Azure DevOps project import expert. Help users add additional ADO projects to their SpecWeave workspace after initial setup.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
This command allows users to import additional Azure DevOps projects **after** initial SpecWeave setup (`specweave init`), with area path mapping, filtering, and dry-run preview.
|
|
13
|
+
|
|
14
|
+
**Use Cases**:
|
|
15
|
+
- Adding new ADO projects to existing workspace
|
|
16
|
+
- Importing projects from different organizations
|
|
17
|
+
- Selective import with area path granularity
|
|
18
|
+
- Multi-project organization (Backend, Frontend, Mobile, Infrastructure)
|
|
19
|
+
|
|
20
|
+
## Command Syntax
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Basic import (interactive)
|
|
24
|
+
/specweave-ado:import-projects
|
|
25
|
+
|
|
26
|
+
# With area path granularity
|
|
27
|
+
/specweave-ado:import-projects --granularity two-level
|
|
28
|
+
|
|
29
|
+
# Dry-run (preview)
|
|
30
|
+
/specweave-ado:import-projects --dry-run
|
|
31
|
+
|
|
32
|
+
# Resume interrupted import
|
|
33
|
+
/specweave-ado:import-projects --resume
|
|
34
|
+
|
|
35
|
+
# Combined
|
|
36
|
+
/specweave-ado:import-projects --granularity top-level --dry-run
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Your Task
|
|
40
|
+
|
|
41
|
+
When the user runs this command:
|
|
42
|
+
|
|
43
|
+
### Step 1: Validate Prerequisites
|
|
44
|
+
```typescript
|
|
45
|
+
import { readEnvFile, parseEnvFile } from '../../../src/utils/env-file.js';
|
|
46
|
+
|
|
47
|
+
// 1. Check if ADO credentials exist
|
|
48
|
+
const envContent = readEnvFile(process.cwd());
|
|
49
|
+
const parsed = parseEnvFile(envContent);
|
|
50
|
+
|
|
51
|
+
if (!parsed.AZURE_DEVOPS_PAT || !parsed.AZURE_DEVOPS_ORG) {
|
|
52
|
+
console.log('❌ Missing Azure DevOps credentials. Run `specweave init` first.');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 2. Get existing configuration
|
|
57
|
+
const org = parsed.AZURE_DEVOPS_ORG;
|
|
58
|
+
const existingProject = parsed.AZURE_DEVOPS_PROJECT;
|
|
59
|
+
|
|
60
|
+
console.log(`\n📋 Organization: ${org}`);
|
|
61
|
+
console.log(` Current project: ${existingProject || 'None'}\n`);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 2: Fetch Available Projects
|
|
65
|
+
```typescript
|
|
66
|
+
import { getProjectCount } from '../../../src/cli/helpers/project-count-fetcher.js';
|
|
67
|
+
import { AsyncProjectLoader } from '../../../src/cli/helpers/async-project-loader.js';
|
|
68
|
+
|
|
69
|
+
// Count check (< 1 second)
|
|
70
|
+
const countResult = await getProjectCount({
|
|
71
|
+
provider: 'ado',
|
|
72
|
+
credentials: {
|
|
73
|
+
organization: org,
|
|
74
|
+
pat: parsed.AZURE_DEVOPS_PAT
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
console.log(`✓ Found ${countResult.accessible} accessible project(s)`);
|
|
79
|
+
|
|
80
|
+
// Fetch all projects (with smart pagination)
|
|
81
|
+
const loader = new AsyncProjectLoader(
|
|
82
|
+
{
|
|
83
|
+
organization: org,
|
|
84
|
+
pat: parsed.AZURE_DEVOPS_PAT
|
|
85
|
+
},
|
|
86
|
+
'ado',
|
|
87
|
+
{
|
|
88
|
+
batchSize: 50,
|
|
89
|
+
updateFrequency: 5,
|
|
90
|
+
showEta: true
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const result = await loader.fetchAllProjects(countResult.accessible);
|
|
95
|
+
const allProjects = result.projects;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 3: Area Path Mapping (Multi-Project Organization)
|
|
99
|
+
```typescript
|
|
100
|
+
import { AreaPathMapper } from '../../../src/integrations/ado/area-path-mapper.js';
|
|
101
|
+
|
|
102
|
+
const { selectedProject } = await inquirer.prompt([{
|
|
103
|
+
type: 'list',
|
|
104
|
+
name: 'selectedProject',
|
|
105
|
+
message: 'Select ADO project to import area paths from:',
|
|
106
|
+
choices: allProjects.map(p => ({ name: p.name, value: p.name }))
|
|
107
|
+
}]);
|
|
108
|
+
|
|
109
|
+
const mapper = new AreaPathMapper({
|
|
110
|
+
credentials: { organization: org, pat: parsed.AZURE_DEVOPS_PAT },
|
|
111
|
+
project: selectedProject
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Fetch area path tree
|
|
115
|
+
const areaPathTree = await mapper.fetchAreaPaths();
|
|
116
|
+
|
|
117
|
+
// Get granularity suggestion
|
|
118
|
+
const suggestion = mapper.suggestGranularity(areaPathTree);
|
|
119
|
+
console.log(`\n💡 Suggestion: ${suggestion.suggested}`);
|
|
120
|
+
console.log(` ${suggestion.reasoning}\n`);
|
|
121
|
+
|
|
122
|
+
// Prompt for granularity (if not provided via CLI)
|
|
123
|
+
const granularity = args.granularity || await mapper.promptAreaPathGranularity(areaPathTree);
|
|
124
|
+
|
|
125
|
+
// Flatten area paths with selected granularity
|
|
126
|
+
const areaPaths = mapper.flattenAreaPaths(areaPathTree, granularity);
|
|
127
|
+
|
|
128
|
+
console.log(`\n📊 ${areaPaths.length} project(s) will be created from area paths:\n`);
|
|
129
|
+
areaPaths.forEach(ap => {
|
|
130
|
+
const projectId = mapper.mapToProjectId(ap.path);
|
|
131
|
+
console.log(` ✨ ${ap.path} → ${projectId}`);
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 4: Dry-Run or Execute
|
|
136
|
+
```typescript
|
|
137
|
+
if (args.dryRun) {
|
|
138
|
+
console.log('\n🔎 DRY RUN: No changes will be made.\n');
|
|
139
|
+
console.log('The following projects would be configured:');
|
|
140
|
+
areaPaths.forEach(ap => {
|
|
141
|
+
const projectId = mapper.mapToProjectId(ap.path);
|
|
142
|
+
console.log(` ✨ ${projectId} (${ap.path})`);
|
|
143
|
+
});
|
|
144
|
+
console.log(`\nTotal: ${areaPaths.length} projects would be configured\n`);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Confirm import
|
|
149
|
+
const { confirmed } = await inquirer.prompt([{
|
|
150
|
+
type: 'confirm',
|
|
151
|
+
name: 'confirmed',
|
|
152
|
+
message: `Configure ${areaPaths.length} project(s) from area paths?`,
|
|
153
|
+
default: true
|
|
154
|
+
}]);
|
|
155
|
+
|
|
156
|
+
if (!confirmed) {
|
|
157
|
+
console.log('⏭️ Import cancelled.');
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Step 5: Update Configuration
|
|
163
|
+
```typescript
|
|
164
|
+
import { getConfigManager } from '../../../src/core/config/index.js';
|
|
165
|
+
|
|
166
|
+
const configManager = getConfigManager(process.cwd());
|
|
167
|
+
|
|
168
|
+
// Build area path configuration
|
|
169
|
+
const areaPathConfig: Record<string, string[]> = {};
|
|
170
|
+
|
|
171
|
+
for (const ap of areaPaths) {
|
|
172
|
+
const projectId = mapper.mapToProjectId(ap.path);
|
|
173
|
+
areaPathConfig[projectId] = [ap.path];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Update configuration
|
|
177
|
+
await configManager.update({
|
|
178
|
+
issueTracker: {
|
|
179
|
+
provider: 'ado',
|
|
180
|
+
ado: {
|
|
181
|
+
organization: org,
|
|
182
|
+
project: selectedProject,
|
|
183
|
+
areaPathMapping: areaPathConfig,
|
|
184
|
+
granularity
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// Update .env file
|
|
190
|
+
import { updateEnvFile } from '../../../src/utils/env-manager.js';
|
|
191
|
+
|
|
192
|
+
await updateEnvFile('AZURE_DEVOPS_PROJECT', selectedProject);
|
|
193
|
+
|
|
194
|
+
// Write area paths to .env (comma-separated)
|
|
195
|
+
const areaPathList = areaPaths.map(ap => ap.path).join(',');
|
|
196
|
+
await updateEnvFile('AZURE_DEVOPS_AREA_PATHS', areaPathList);
|
|
197
|
+
|
|
198
|
+
console.log('\n✅ Projects configured successfully!\n');
|
|
199
|
+
console.log(`Organization: ${org}`);
|
|
200
|
+
console.log(`Project: ${selectedProject}`);
|
|
201
|
+
console.log(`Granularity: ${granularity}`);
|
|
202
|
+
console.log(`\nArea paths configured:\n ${areaPathList.split(',').join('\n ')}\n`);
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Step 6: Resume Support
|
|
206
|
+
```typescript
|
|
207
|
+
if (args.resume) {
|
|
208
|
+
const { CacheManager } = await import('../../../src/core/cache/cache-manager.js');
|
|
209
|
+
const cacheManager = new CacheManager(process.cwd());
|
|
210
|
+
|
|
211
|
+
const importState = await cacheManager.get('ado-import-state');
|
|
212
|
+
|
|
213
|
+
if (!importState) {
|
|
214
|
+
console.log('⚠️ No import state found. Use without --resume to start fresh.');
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
console.log(`\n📂 Resuming from: ${importState.lastAreaPath} (${importState.completed}/${importState.total})`);
|
|
219
|
+
|
|
220
|
+
// Skip already-processed area paths
|
|
221
|
+
const remainingPaths = areaPaths.filter(ap => !importState.processed.includes(ap.path));
|
|
222
|
+
|
|
223
|
+
// Continue import with remaining paths
|
|
224
|
+
// (use same logic as Step 5)
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Examples
|
|
229
|
+
|
|
230
|
+
### Example 1: Basic Import with Area Paths
|
|
231
|
+
**User**: `/specweave-ado:import-projects`
|
|
232
|
+
|
|
233
|
+
**Output**:
|
|
234
|
+
```
|
|
235
|
+
📋 Organization: mycompany
|
|
236
|
+
Current project: Platform
|
|
237
|
+
|
|
238
|
+
✓ Found 5 accessible project(s)
|
|
239
|
+
|
|
240
|
+
Select ADO project to import area paths from:
|
|
241
|
+
> Platform
|
|
242
|
+
|
|
243
|
+
💡 Suggestion: two-level
|
|
244
|
+
Balanced hierarchy (8 two-level areas). Recommended granularity.
|
|
245
|
+
|
|
246
|
+
Select area path granularity for project organization:
|
|
247
|
+
> Two-level (8 projects) - e.g., Backend-API, Backend-Database
|
|
248
|
+
|
|
249
|
+
📊 8 project(s) will be created from area paths:
|
|
250
|
+
|
|
251
|
+
✨ Platform/Backend/API → backend-api
|
|
252
|
+
✨ Platform/Backend/Database → backend-database
|
|
253
|
+
✨ Platform/Frontend/Web → frontend-web
|
|
254
|
+
✨ Platform/Frontend/Admin → frontend-admin
|
|
255
|
+
✨ Platform/Mobile/iOS → mobile-ios
|
|
256
|
+
✨ Platform/Mobile/Android → mobile-android
|
|
257
|
+
✨ Platform/Infrastructure/Cloud → infrastructure-cloud
|
|
258
|
+
✨ Platform/Infrastructure/Network → infrastructure-network
|
|
259
|
+
|
|
260
|
+
Configure 8 project(s) from area paths? (Y/n)
|
|
261
|
+
|
|
262
|
+
✅ Projects configured successfully!
|
|
263
|
+
|
|
264
|
+
Organization: mycompany
|
|
265
|
+
Project: Platform
|
|
266
|
+
Granularity: two-level
|
|
267
|
+
|
|
268
|
+
Area paths configured:
|
|
269
|
+
Platform/Backend/API
|
|
270
|
+
Platform/Backend/Database
|
|
271
|
+
Platform/Frontend/Web
|
|
272
|
+
Platform/Frontend/Admin
|
|
273
|
+
Platform/Mobile/iOS
|
|
274
|
+
Platform/Mobile/Android
|
|
275
|
+
Platform/Infrastructure/Cloud
|
|
276
|
+
Platform/Infrastructure/Network
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Example 2: Top-Level Only
|
|
280
|
+
**User**: `/specweave-ado:import-projects --granularity top-level`
|
|
281
|
+
|
|
282
|
+
**Output**:
|
|
283
|
+
```
|
|
284
|
+
Select area path granularity: top-level (forced via CLI)
|
|
285
|
+
|
|
286
|
+
📊 3 project(s) will be created from area paths:
|
|
287
|
+
|
|
288
|
+
✨ Platform/Backend → backend
|
|
289
|
+
✨ Platform/Frontend → frontend
|
|
290
|
+
✨ Platform/Mobile → mobile
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Example 3: Dry-Run
|
|
294
|
+
**User**: `/specweave-ado:import-projects --dry-run`
|
|
295
|
+
|
|
296
|
+
**Output**:
|
|
297
|
+
```
|
|
298
|
+
🔎 DRY RUN: No changes will be made.
|
|
299
|
+
|
|
300
|
+
The following projects would be configured:
|
|
301
|
+
✨ backend-api (Platform/Backend/API)
|
|
302
|
+
✨ backend-database (Platform/Backend/Database)
|
|
303
|
+
✨ frontend-web (Platform/Frontend/Web)
|
|
304
|
+
|
|
305
|
+
Total: 8 projects would be configured
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Important Notes
|
|
309
|
+
|
|
310
|
+
- **Multi-Project Organization**: Uses area paths to create logical project separation
|
|
311
|
+
- **Granularity Control**: Top-level, two-level, or full-tree based on hierarchy complexity
|
|
312
|
+
- **Atomic Updates**: Uses temp file + rename to prevent corruption
|
|
313
|
+
- **Progress Tracking**: Shows progress bar for large hierarchies (> 50 area paths)
|
|
314
|
+
- **Resume Support**: Interrupted imports can be resumed with `--resume`
|
|
315
|
+
|
|
316
|
+
## Related Commands
|
|
317
|
+
|
|
318
|
+
- `/specweave:init` - Initial SpecWeave setup
|
|
319
|
+
- `/specweave-ado:sync` - Sync increments with ADO work items
|
|
320
|
+
- `/specweave-ado:refresh-cache` - Clear cached ADO data
|
|
321
|
+
|
|
322
|
+
## Error Handling
|
|
323
|
+
|
|
324
|
+
- **Missing Credentials**: Prompt user to run `specweave init` first
|
|
325
|
+
- **API Errors**: Show clear error message with suggestion
|
|
326
|
+
- **No Area Paths**: Fallback to single-project mode
|
|
327
|
+
- **Permission Errors**: Check ADO PAT scopes
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
**Multi-Project Excellence**: This command enables sophisticated multi-project organization in Azure DevOps using area paths, perfect for large teams with complex hierarchies.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "specweave-alternatives",
|
|
3
|
+
"version": "0.24.0",
|
|
4
|
+
"description": "Technology stack alternatives analysis using BMAD method - Best, Most Appropriate, Design decisions for architecture choices",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Anton Abyzov",
|
|
7
|
+
"email": "anton.abyzov@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"hooks": {}
|
|
10
|
+
}
|