specweave 1.0.263 → 1.0.264
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.md +31 -27
- package/dist/src/cli/commands/docs.js +4 -4
- package/dist/src/cli/commands/docs.js.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.d.ts +14 -6
- package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.js +504 -126
- package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.js +92 -48
- package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
- package/dist/src/utils/docs-preview/index.d.ts +2 -1
- package/dist/src/utils/docs-preview/index.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/index.js +2 -1
- package/dist/src/utils/docs-preview/index.js.map +1 -1
- package/dist/src/utils/docs-preview/project-detector.d.ts +16 -0
- package/dist/src/utils/docs-preview/project-detector.d.ts.map +1 -0
- package/dist/src/utils/docs-preview/project-detector.js +215 -0
- package/dist/src/utils/docs-preview/project-detector.js.map +1 -0
- package/dist/src/utils/docs-preview/types.d.ts +26 -0
- package/dist/src/utils/docs-preview/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/scripts/progress.js +148 -50
- package/plugins/specweave/scripts/read-progress.sh +128 -52
- package/plugins/specweave/scripts/rebuild-dashboard-cache.sh +23 -17
- package/plugins/specweave/skills/progress/SKILL.md +7 -21
|
@@ -151,12 +151,30 @@ for increment_dir in "$INCREMENTS_DIR"/[0-9]*/; do
|
|
|
151
151
|
completed_acs="${completed_acs:-0}"
|
|
152
152
|
fi
|
|
153
153
|
|
|
154
|
-
#
|
|
154
|
+
# Collect file mtimes for stale detection and lastActivity
|
|
155
|
+
meta_mtime=0
|
|
156
|
+
tasks_mtime=0
|
|
157
|
+
spec_mtime=0
|
|
158
|
+
if [[ "$(uname)" == "Darwin" ]]; then
|
|
159
|
+
[[ -f "$metadata_file" ]] && meta_mtime=$(stat -f "%m" "$metadata_file" 2>/dev/null || echo "0")
|
|
160
|
+
[[ -f "$tasks_file" ]] && tasks_mtime=$(stat -f "%m" "$tasks_file" 2>/dev/null || echo "0")
|
|
161
|
+
[[ -f "$spec_file" ]] && spec_mtime=$(stat -f "%m" "$spec_file" 2>/dev/null || echo "0")
|
|
162
|
+
else
|
|
163
|
+
[[ -f "$metadata_file" ]] && meta_mtime=$(stat -c "%Y" "$metadata_file" 2>/dev/null || echo "0")
|
|
164
|
+
[[ -f "$tasks_file" ]] && tasks_mtime=$(stat -c "%Y" "$tasks_file" 2>/dev/null || echo "0")
|
|
165
|
+
[[ -f "$spec_file" ]] && spec_mtime=$(stat -c "%Y" "$spec_file" 2>/dev/null || echo "0")
|
|
166
|
+
fi
|
|
167
|
+
|
|
168
|
+
# Derive lastActivity from MAX of all file mtimes (not just metadata.json)
|
|
169
|
+
max_mtime="$meta_mtime"
|
|
170
|
+
[[ "$tasks_mtime" -gt "$max_mtime" ]] && max_mtime="$tasks_mtime"
|
|
171
|
+
[[ "$spec_mtime" -gt "$max_mtime" ]] && max_mtime="$spec_mtime"
|
|
172
|
+
|
|
155
173
|
last_activity=""
|
|
156
174
|
if [[ "$(uname)" == "Darwin" ]]; then
|
|
157
|
-
last_activity=$(
|
|
175
|
+
last_activity=$(date -u -r "$max_mtime" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || echo "")
|
|
158
176
|
else
|
|
159
|
-
last_activity=$(
|
|
177
|
+
last_activity=$(date -u -d "@$max_mtime" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || echo "")
|
|
160
178
|
fi
|
|
161
179
|
|
|
162
180
|
# Build increment JSON
|
|
@@ -172,6 +190,7 @@ for increment_dir in "$INCREMENTS_DIR"/[0-9]*/; do
|
|
|
172
190
|
--argjson completed_acs "$completed_acs" \
|
|
173
191
|
--arg created_at "$created_at" \
|
|
174
192
|
--arg last_activity "$last_activity" \
|
|
193
|
+
--argjson last_activity_epoch "$max_mtime" \
|
|
175
194
|
--argjson user_stories "$user_stories" \
|
|
176
195
|
'{
|
|
177
196
|
status: $status,
|
|
@@ -183,26 +202,13 @@ for increment_dir in "$INCREMENTS_DIR"/[0-9]*/; do
|
|
|
183
202
|
acs: { total: $total_acs, completed: $completed_acs },
|
|
184
203
|
createdAt: $created_at,
|
|
185
204
|
lastActivity: $last_activity,
|
|
205
|
+
lastActivityEpoch: $last_activity_epoch,
|
|
186
206
|
userStories: $user_stories
|
|
187
207
|
}')
|
|
188
208
|
|
|
189
209
|
# Add to increments object
|
|
190
210
|
increments_json=$(echo "$increments_json" | jq --arg id "$increment_id" --argjson inc "$increment_json" '.[$id] = $inc')
|
|
191
211
|
|
|
192
|
-
# Collect mtimes for stale detection
|
|
193
|
-
meta_mtime=0
|
|
194
|
-
tasks_mtime=0
|
|
195
|
-
spec_mtime=0
|
|
196
|
-
if [[ "$(uname)" == "Darwin" ]]; then
|
|
197
|
-
[[ -f "$metadata_file" ]] && meta_mtime=$(stat -f "%m" "$metadata_file" 2>/dev/null || echo "0")
|
|
198
|
-
[[ -f "$tasks_file" ]] && tasks_mtime=$(stat -f "%m" "$tasks_file" 2>/dev/null || echo "0")
|
|
199
|
-
[[ -f "$spec_file" ]] && spec_mtime=$(stat -f "%m" "$spec_file" 2>/dev/null || echo "0")
|
|
200
|
-
else
|
|
201
|
-
[[ -f "$metadata_file" ]] && meta_mtime=$(stat -c "%Y" "$metadata_file" 2>/dev/null || echo "0")
|
|
202
|
-
[[ -f "$tasks_file" ]] && tasks_mtime=$(stat -c "%Y" "$tasks_file" 2>/dev/null || echo "0")
|
|
203
|
-
[[ -f "$spec_file" ]] && spec_mtime=$(stat -c "%Y" "$spec_file" 2>/dev/null || echo "0")
|
|
204
|
-
fi
|
|
205
|
-
|
|
206
212
|
mtimes_json=$(echo "$mtimes_json" | jq --arg id "$increment_id" \
|
|
207
213
|
--argjson meta "$meta_mtime" \
|
|
208
214
|
--argjson tasks "$tasks_mtime" \
|
|
@@ -9,18 +9,16 @@ argument-hint: "[incrementId]"
|
|
|
9
9
|
|
|
10
10
|
!`s="progress"; for d in .specweave/skill-memories .claude/skill-memories "$HOME/.claude/skill-memories"; do p="$d/$s.md"; [ -f "$p" ] && awk '/^## Learnings$/{ok=1;next}/^## /{ok=0}ok' "$p" && break; done 2>/dev/null; true`
|
|
11
11
|
|
|
12
|
-
Shows detailed progress information for active increments including:
|
|
13
|
-
- **Task completion** with progress bars
|
|
14
|
-
- **Acceptance Criteria (AC)** completion percentages
|
|
15
|
-
- **Priority** indicators (P0/P1/P2)
|
|
16
|
-
- **Type** badges (feature/bug/hotfix/refactor)
|
|
17
|
-
- **Status** grouping (ready for review → active → paused)
|
|
18
|
-
|
|
19
12
|
## Hook Execution (Default)
|
|
20
13
|
|
|
21
14
|
This command is intercepted by the **UserPromptSubmit hook** for instant execution (<10ms). The hook reads from `.specweave/state/dashboard.json` cache.
|
|
22
15
|
|
|
23
|
-
**
|
|
16
|
+
**CRITICAL**: The hook output in `<system-reminder>` is ALREADY FORMATTED for the user. You MUST:
|
|
17
|
+
1. Present the hook output VERBATIM — copy it exactly as-is
|
|
18
|
+
2. Do NOT reformat into a markdown table
|
|
19
|
+
3. Do NOT re-summarize or paraphrase the data
|
|
20
|
+
4. Do NOT add interpretation unless the user asks a follow-up question
|
|
21
|
+
5. If the user asks "what should I work on next?" THEN add recommendations
|
|
24
22
|
|
|
25
23
|
## CLI Fallback
|
|
26
24
|
|
|
@@ -30,24 +28,12 @@ If hook output isn't displayed (rare), execute:
|
|
|
30
28
|
specweave status --verbose
|
|
31
29
|
```
|
|
32
30
|
|
|
33
|
-
Note: The CLI command is `specweave status` (with `progress` as an alias).
|
|
34
|
-
|
|
35
31
|
## Arguments
|
|
36
32
|
|
|
37
33
|
- `/sw:progress` - Show all active increments
|
|
38
34
|
- `/sw:progress 0042` - Show specific increment details (partial ID match supported)
|
|
39
35
|
|
|
40
|
-
## Data Shown
|
|
41
|
-
|
|
42
|
-
| Field | Description |
|
|
43
|
-
|-------|-------------|
|
|
44
|
-
| Tasks | `X/Y (Z%)` with progress bar |
|
|
45
|
-
| ACs | `A/B (C%)` acceptance criteria completion |
|
|
46
|
-
| Priority | P0 (critical), P1 (high), P2 (normal) |
|
|
47
|
-
| Type | feature, bug, hotfix, refactor, experiment |
|
|
48
|
-
| Status | ready_for_review, active, planning, paused |
|
|
49
|
-
|
|
50
36
|
## Related Commands
|
|
51
37
|
|
|
52
|
-
- `/sw:status` - Macro view (all increments grouped by status)
|
|
53
38
|
- `/sw:done <id>` - Close increment after review
|
|
39
|
+
- `/sw:increment` - Start new work
|