specweave 0.28.5 → 0.28.6

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 (44) hide show
  1. package/README.md +6 -6
  2. package/dist/src/core/living-docs/living-docs-sync.d.ts +17 -2
  3. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  4. package/dist/src/core/living-docs/living-docs-sync.js +24 -4
  5. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  6. package/dist/src/core/repo-structure/prompt-consolidator.js +6 -6
  7. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  8. package/dist/src/sync/frontmatter-updater.d.ts +8 -0
  9. package/dist/src/sync/frontmatter-updater.d.ts.map +1 -1
  10. package/dist/src/sync/frontmatter-updater.js +27 -2
  11. package/dist/src/sync/frontmatter-updater.js.map +1 -1
  12. package/dist/src/sync/sync-coordinator.d.ts +1 -0
  13. package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
  14. package/dist/src/sync/sync-coordinator.js +6 -3
  15. package/dist/src/sync/sync-coordinator.js.map +1 -1
  16. package/package.json +1 -1
  17. package/plugins/specweave/commands/specweave-sync-specs.md +14 -5
  18. package/plugins/specweave/commands/specweave-workflow.md +483 -0
  19. package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
  20. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  21. package/plugins/specweave-jira/skills/jira-sync/SKILL.md +4 -4
  22. package/plugins/specweave-jira/skills/specweave-jira-mapper/SKILL.md +3 -3
  23. package/plugins/specweave/hooks/docs-changed.sh.backup +0 -79
  24. package/plugins/specweave/hooks/human-input-required.sh.backup +0 -75
  25. package/plugins/specweave/hooks/post-first-increment.sh.backup +0 -61
  26. package/plugins/specweave/hooks/post-increment-change.sh.backup +0 -98
  27. package/plugins/specweave/hooks/post-increment-completion.sh.backup +0 -231
  28. package/plugins/specweave/hooks/post-increment-planning.sh.backup +0 -1048
  29. package/plugins/specweave/hooks/post-increment-status-change.sh.backup +0 -147
  30. package/plugins/specweave/hooks/post-spec-update.sh.backup +0 -158
  31. package/plugins/specweave/hooks/post-user-story-complete.sh.backup +0 -179
  32. package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +0 -83
  33. package/plugins/specweave/hooks/pre-implementation.sh.backup +0 -67
  34. package/plugins/specweave/hooks/pre-task-completion.sh.backup +0 -194
  35. package/plugins/specweave/hooks/pre-tool-use.sh.backup +0 -133
  36. package/plugins/specweave/hooks/user-prompt-submit.sh.backup +0 -386
  37. package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +0 -353
  38. package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +0 -172
  39. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
  40. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +0 -1104
  41. package/plugins/specweave-github/hooks/post-task-completion.sh.backup +0 -258
  42. package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +0 -172
  43. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -1017
  44. package/plugins/specweave-release/hooks/post-task-completion.sh.backup +0 -110
@@ -1,110 +0,0 @@
1
- #!/bin/bash
2
- # Post-Increment-Completion Hook - DORA Metrics Tracking
3
- #
4
- # Fires after: /specweave:done completes
5
- # Purpose: Automatically track DORA metrics and update living docs dashboard
6
- #
7
- # Integration: plugins/specweave-release/hooks/hooks.json
8
-
9
- set -euo pipefail
10
-
11
- # Constants
12
- SPECWEAVE_ROOT="${SPECWEAVE_ROOT:-$(pwd)}"
13
- METRICS_DIR="${SPECWEAVE_ROOT}/.specweave/metrics"
14
- HISTORY_FILE="${METRICS_DIR}/dora-history.jsonl"
15
- DASHBOARD_FILE="${SPECWEAVE_ROOT}/.specweave/docs/internal/delivery/dora-dashboard.md"
16
- DORA_CALCULATOR="${SPECWEAVE_ROOT}/dist/src/metrics/dora-calculator.js"
17
- LATEST_FILE="${METRICS_DIR}/dora-latest.json"
18
-
19
- # Logging
20
- LOG_FILE="${SPECWEAVE_ROOT}/.specweave/logs/dora-tracking.log"
21
- mkdir -p "$(dirname "$LOG_FILE")"
22
-
23
- log() {
24
- echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" | tee -a "$LOG_FILE"
25
- }
26
-
27
- log "đŸŽ¯ Post-Increment-Completion Hook Triggered"
28
-
29
- # Check if DORA calculator exists
30
- if [[ ! -f "$DORA_CALCULATOR" ]]; then
31
- log "âš ī¸ DORA calculator not found at $DORA_CALCULATOR"
32
- log " Run: npm run build"
33
- exit 0 # Non-blocking
34
- fi
35
-
36
- # Check if GitHub token is available
37
- if [[ -z "${GITHUB_TOKEN:-}" ]]; then
38
- log "âš ī¸ GITHUB_TOKEN not set. DORA metrics require GitHub API access."
39
- log " Set GITHUB_TOKEN in environment or .env file"
40
- exit 0 # Non-blocking
41
- fi
42
-
43
- # Step 1: Calculate DORA metrics
44
- log "📊 Calculating DORA metrics..."
45
- if ! node "$DORA_CALCULATOR"; then
46
- log "❌ Failed to calculate DORA metrics"
47
- exit 0 # Non-blocking
48
- fi
49
-
50
- # Step 2: Append to history (JSONL format)
51
- log "💾 Appending metrics to history..."
52
- mkdir -p "$METRICS_DIR"
53
-
54
- if [[ -f "$LATEST_FILE" ]]; then
55
- cat "$LATEST_FILE" >> "$HISTORY_FILE"
56
- log " ✓ Appended to $HISTORY_FILE"
57
- else
58
- log "âš ī¸ Latest metrics file not found: $LATEST_FILE"
59
- fi
60
-
61
- # Step 3: Update living docs dashboard
62
- log "📝 Updating DORA dashboard..."
63
- DASHBOARD_GENERATOR="${SPECWEAVE_ROOT}/dist/plugins/specweave-release/lib/dashboard-generator.js"
64
-
65
- if [[ -f "$DASHBOARD_GENERATOR" ]]; then
66
- if node "$DASHBOARD_GENERATOR"; then
67
- log " ✓ Dashboard updated: $DASHBOARD_FILE"
68
- else
69
- log "âš ī¸ Failed to update dashboard"
70
- fi
71
- else
72
- log "âš ī¸ Dashboard generator not found: $DASHBOARD_GENERATOR"
73
- log " Manual dashboard update required"
74
- fi
75
-
76
- # Step 4: Check for degradation (optional)
77
- log "🔍 Checking for metric degradation..."
78
-
79
- # Calculate 30-day average and compare with current
80
- # (This would be implemented in a TypeScript utility)
81
- # For now, we'll just log a reminder
82
- log " â„šī¸ Degradation detection: Manual review recommended"
83
- log " See: $DASHBOARD_FILE for trends"
84
-
85
- # Step 5: Update main DORA metrics doc
86
- DORA_METRICS_DOC="${SPECWEAVE_ROOT}/.specweave/docs/internal/delivery/dora-metrics.md"
87
- if [[ -f "$DORA_METRICS_DOC" && -f "$LATEST_FILE" ]]; then
88
- log "📄 Updating dora-metrics.md with latest values..."
89
-
90
- # Extract current values from latest metrics
91
- # (This is a simplified version - production would use jq for proper parsing)
92
- TIMESTAMP=$(date '+%Y-%m-%d %H:%M UTC')
93
-
94
- # Update "Last Calculated" timestamp
95
- if command -v sed &> /dev/null; then
96
- sed -i.bak "s/Last Calculated: .*/Last Calculated: $TIMESTAMP/" "$DORA_METRICS_DOC" 2>/dev/null || true
97
- rm -f "${DORA_METRICS_DOC}.bak" 2>/dev/null || true
98
- log " ✓ Updated timestamp in dora-metrics.md"
99
- fi
100
- fi
101
-
102
- log "✅ DORA metrics tracking complete!"
103
- log ""
104
- log "📊 Next steps:"
105
- log " 1. Review dashboard: $DASHBOARD_FILE"
106
- log " 2. Check trends: Are metrics improving?"
107
- log " 3. Take action: Address any degradation"
108
- log ""
109
-
110
- exit 0