@leeovery/claude-technical-workflows 2.1.33 → 2.1.35
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/README.md +14 -5
- package/agents/implementation-analysis-task-writer.md +3 -2
- package/agents/planning-task-author.md +46 -16
- package/agents/review-findings-synthesizer.md +108 -0
- package/agents/review-task-verifier.md +4 -3
- package/package.json +1 -1
- package/skills/begin-implementation/SKILL.md +5 -1
- package/skills/begin-planning/SKILL.md +5 -1
- package/skills/migrate/SKILL.md +2 -1
- package/skills/migrate/scripts/migrate.sh +31 -28
- package/skills/migrate/scripts/migrations/001-discussion-frontmatter.sh +1 -15
- package/skills/migrate/scripts/migrations/002-specification-frontmatter.sh +0 -14
- package/skills/migrate/scripts/migrations/003-planning-frontmatter.sh +0 -14
- package/skills/migrate/scripts/migrations/004-sources-object-format.sh +0 -12
- package/skills/migrate/scripts/migrations/005-plan-external-deps-frontmatter.sh +0 -12
- package/skills/migrate/scripts/migrations/006-directory-restructure.sh +2 -22
- package/skills/migrate/scripts/migrations/007-tasks-subdirectory.sh +1 -17
- package/skills/migrate/scripts/migrations/008-review-directory-structure.sh +96 -0
- package/skills/migrate/scripts/migrations/009-review-per-plan-storage.sh +117 -0
- package/skills/migrate/scripts/migrations/010-gitignore-sessions.sh +67 -0
- package/skills/start-discussion/SKILL.md +1 -1
- package/skills/start-discussion/references/handle-selection.md +1 -1
- package/skills/start-discussion/references/research-analysis.md +3 -3
- package/skills/start-discussion/scripts/discovery.sh +1 -1
- package/skills/start-review/SKILL.md +48 -16
- package/skills/start-review/references/display-plans.md +11 -3
- package/skills/start-review/references/invoke-skill.md +41 -13
- package/skills/start-review/references/select-plans.md +31 -2
- package/skills/start-review/scripts/discovery.sh +89 -0
- package/skills/start-specification/SKILL.md +1 -1
- package/skills/start-specification/references/analysis-flow.md +2 -2
- package/skills/start-specification/references/display-analyze.md +1 -1
- package/skills/start-specification/references/display-groupings.md +3 -3
- package/skills/start-specification/references/display-specs-menu.md +1 -1
- package/skills/start-specification/scripts/discovery.sh +1 -1
- package/skills/technical-implementation/references/invoke-task-writer.md +1 -0
- package/skills/technical-planning/SKILL.md +4 -3
- package/skills/technical-planning/references/author-tasks.md +119 -35
- package/skills/technical-planning/references/output-formats/tick/about.md +3 -2
- package/skills/technical-planning/references/output-formats/tick/graph.md +2 -0
- package/skills/technical-planning/references/output-formats/tick/reading.md +2 -0
- package/skills/technical-planning/references/plan-construction.md +11 -15
- package/skills/technical-planning/references/review-integrity.md +1 -1
- package/skills/technical-review/SKILL.md +10 -34
- package/skills/technical-review/references/invoke-review-synthesizer.md +64 -0
- package/skills/technical-review/references/invoke-review-task-writer.md +44 -0
- package/skills/technical-review/references/invoke-task-verifiers.md +7 -6
- package/skills/technical-review/references/produce-review.md +25 -0
- package/skills/technical-review/references/review-actions-loop.md +295 -0
- package/skills/technical-review/references/template.md +1 -21
- package/agents/review-product-assessor.md +0 -112
- package/skills/technical-review/references/invoke-product-assessor.md +0 -57
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
# - "- ~~{topic}: {description}~~ → satisfied externally" → state: satisfied_externally
|
|
31
31
|
#
|
|
32
32
|
# This script is sourced by migrate.sh and has access to:
|
|
33
|
-
# - is_migrated "filepath" "migration_id"
|
|
34
|
-
# - record_migration "filepath" "migration_id"
|
|
35
33
|
# - report_update "filepath" "description"
|
|
36
34
|
# - report_skip "filepath"
|
|
37
35
|
#
|
|
@@ -122,15 +120,8 @@ for file in "$PLAN_DIR"/*.md; do
|
|
|
122
120
|
*-review-*|*-tracking*) continue ;;
|
|
123
121
|
esac
|
|
124
122
|
|
|
125
|
-
# Check if already migrated via tracking
|
|
126
|
-
if is_migrated "$file" "$MIGRATION_ID"; then
|
|
127
|
-
report_skip "$file"
|
|
128
|
-
continue
|
|
129
|
-
fi
|
|
130
|
-
|
|
131
123
|
# Check if file has YAML frontmatter
|
|
132
124
|
if ! head -1 "$file" 2>/dev/null | grep -q "^---$"; then
|
|
133
|
-
record_migration "$file" "$MIGRATION_ID"
|
|
134
125
|
report_skip "$file"
|
|
135
126
|
continue
|
|
136
127
|
fi
|
|
@@ -138,7 +129,6 @@ for file in "$PLAN_DIR"/*.md; do
|
|
|
138
129
|
# Check if external_dependencies already exists in frontmatter
|
|
139
130
|
frontmatter=$(extract_frontmatter_005 "$file")
|
|
140
131
|
if echo "$frontmatter" | grep -q "^external_dependencies:"; then
|
|
141
|
-
record_migration "$file" "$MIGRATION_ID"
|
|
142
132
|
report_skip "$file"
|
|
143
133
|
continue
|
|
144
134
|
fi
|
|
@@ -226,8 +216,6 @@ ${new_deps_block}"
|
|
|
226
216
|
echo "$new_body"
|
|
227
217
|
} > "$file"
|
|
228
218
|
|
|
229
|
-
record_migration "$file" "$MIGRATION_ID"
|
|
230
|
-
|
|
231
219
|
if $has_deps; then
|
|
232
220
|
report_update "$file" "migrated external dependencies to frontmatter"
|
|
233
221
|
else
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
# Updates plan frontmatter `specification` field to use new directory paths.
|
|
13
13
|
#
|
|
14
14
|
# This script is sourced by migrate.sh and has access to:
|
|
15
|
-
# - is_migrated "filepath" "migration_id"
|
|
16
|
-
# - record_migration "filepath" "migration_id"
|
|
17
15
|
# - report_update "filepath" "description"
|
|
18
16
|
# - report_skip "filepath"
|
|
19
17
|
#
|
|
@@ -33,19 +31,11 @@ if [ -d "$SPEC_DIR" ]; then
|
|
|
33
31
|
|
|
34
32
|
# Skip if already a directory (already migrated)
|
|
35
33
|
if [ -d "$SPEC_DIR/$name" ] && [ -f "$SPEC_DIR/$name/specification.md" ]; then
|
|
36
|
-
|
|
37
|
-
if ! is_migrated "$new_path" "$MIGRATION_ID"; then
|
|
38
|
-
record_migration "$new_path" "$MIGRATION_ID"
|
|
39
|
-
fi
|
|
40
|
-
report_skip "$new_path"
|
|
34
|
+
report_skip "$SPEC_DIR/$name/specification.md"
|
|
41
35
|
continue
|
|
42
36
|
fi
|
|
43
37
|
|
|
44
38
|
new_path="$SPEC_DIR/$name/specification.md"
|
|
45
|
-
if is_migrated "$new_path" "$MIGRATION_ID"; then
|
|
46
|
-
report_skip "$new_path"
|
|
47
|
-
continue
|
|
48
|
-
fi
|
|
49
39
|
|
|
50
40
|
# Create topic directory
|
|
51
41
|
mkdir -p "$SPEC_DIR/$name"
|
|
@@ -63,7 +53,6 @@ if [ -d "$SPEC_DIR" ]; then
|
|
|
63
53
|
report_update "$SPEC_DIR/$name/$new_tracking_name" "moved tracking file into topic directory"
|
|
64
54
|
done
|
|
65
55
|
|
|
66
|
-
record_migration "$new_path" "$MIGRATION_ID"
|
|
67
56
|
report_update "$new_path" "restructured to topic directory"
|
|
68
57
|
done
|
|
69
58
|
fi
|
|
@@ -79,19 +68,11 @@ if [ -d "$PLAN_DIR" ]; then
|
|
|
79
68
|
|
|
80
69
|
# Skip if already a directory with plan.md
|
|
81
70
|
if [ -d "$PLAN_DIR/$name" ] && [ -f "$PLAN_DIR/$name/plan.md" ]; then
|
|
82
|
-
|
|
83
|
-
if ! is_migrated "$new_path" "$MIGRATION_ID"; then
|
|
84
|
-
record_migration "$new_path" "$MIGRATION_ID"
|
|
85
|
-
fi
|
|
86
|
-
report_skip "$new_path"
|
|
71
|
+
report_skip "$PLAN_DIR/$name/plan.md"
|
|
87
72
|
continue
|
|
88
73
|
fi
|
|
89
74
|
|
|
90
75
|
new_path="$PLAN_DIR/$name/plan.md"
|
|
91
|
-
if is_migrated "$new_path" "$MIGRATION_ID"; then
|
|
92
|
-
report_skip "$new_path"
|
|
93
|
-
continue
|
|
94
|
-
fi
|
|
95
76
|
|
|
96
77
|
# Create topic directory (may already exist for local-markdown tasks)
|
|
97
78
|
mkdir -p "$PLAN_DIR/$name"
|
|
@@ -108,7 +89,6 @@ if [ -d "$PLAN_DIR" ]; then
|
|
|
108
89
|
report_update "$PLAN_DIR/$name/$new_tracking_name" "moved tracking file into topic directory"
|
|
109
90
|
done
|
|
110
91
|
|
|
111
|
-
record_migration "$new_path" "$MIGRATION_ID"
|
|
112
92
|
report_update "$new_path" "restructured to topic directory"
|
|
113
93
|
done
|
|
114
94
|
fi
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
# Idempotent: skips if tasks/ already exists and contains .md files.
|
|
25
25
|
#
|
|
26
26
|
# This script is sourced by migrate.sh and has access to:
|
|
27
|
-
# - is_migrated "filepath" "migration_id"
|
|
28
|
-
# - record_migration "filepath" "migration_id"
|
|
29
27
|
# - report_update "filepath" "description"
|
|
30
28
|
# - report_skip "filepath"
|
|
31
29
|
#
|
|
@@ -44,12 +42,6 @@ for topic_dir in "$PLAN_DIR"/*/; do
|
|
|
44
42
|
topic=$(basename "$topic_dir")
|
|
45
43
|
marker="${topic_dir}plan.md"
|
|
46
44
|
|
|
47
|
-
# Use plan.md as the migration tracking key
|
|
48
|
-
if is_migrated "$marker" "$MIGRATION_ID"; then
|
|
49
|
-
report_skip "$marker"
|
|
50
|
-
continue
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
45
|
# Skip if no plan.md exists (not a valid topic directory)
|
|
54
46
|
if [ ! -f "$marker" ]; then
|
|
55
47
|
continue
|
|
@@ -59,14 +51,7 @@ for topic_dir in "$PLAN_DIR"/*/; do
|
|
|
59
51
|
task_files=("$topic_dir${topic}-"*.md)
|
|
60
52
|
if [ ! -f "${task_files[0]}" ]; then
|
|
61
53
|
# No task files — format may not be local-markdown, or tasks already moved
|
|
62
|
-
|
|
63
|
-
if [ -d "${topic_dir}tasks" ] && ls -1 "${topic_dir}tasks/"*.md >/dev/null 2>&1; then
|
|
64
|
-
record_migration "$marker" "$MIGRATION_ID"
|
|
65
|
-
report_skip "$marker"
|
|
66
|
-
else
|
|
67
|
-
record_migration "$marker" "$MIGRATION_ID"
|
|
68
|
-
report_skip "$marker"
|
|
69
|
-
fi
|
|
54
|
+
report_skip "$marker"
|
|
70
55
|
continue
|
|
71
56
|
fi
|
|
72
57
|
|
|
@@ -81,6 +66,5 @@ for topic_dir in "$PLAN_DIR"/*/; do
|
|
|
81
66
|
moved=$((moved + 1))
|
|
82
67
|
done
|
|
83
68
|
|
|
84
|
-
record_migration "$marker" "$MIGRATION_ID"
|
|
85
69
|
report_update "$marker" "moved $moved task file(s) to tasks/ subdirectory"
|
|
86
70
|
done
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 008-review-directory-structure.sh
|
|
4
|
+
#
|
|
5
|
+
# Moves existing flat review files into a versioned r1/ directory structure.
|
|
6
|
+
#
|
|
7
|
+
# Previous layout:
|
|
8
|
+
# review/
|
|
9
|
+
# ├── tick-core.md # Summary at root
|
|
10
|
+
# ├── tick-core/ # QA files + product assessment
|
|
11
|
+
# │ ├── qa-task-1.md
|
|
12
|
+
# │ └── product-assessment.md
|
|
13
|
+
# ├── doctor-installation-migration.md # Multi-plan summary
|
|
14
|
+
# ├── installation/ # Per-plan QA (ambiguous)
|
|
15
|
+
# │ └── qa-task-1.md
|
|
16
|
+
#
|
|
17
|
+
# New layout:
|
|
18
|
+
# review/
|
|
19
|
+
# ├── tick-core/
|
|
20
|
+
# │ └── r1/
|
|
21
|
+
# │ ├── review.md
|
|
22
|
+
# │ ├── qa-task-1.md
|
|
23
|
+
# │ └── product-assessment.md
|
|
24
|
+
# ├── doctor-installation-migration/
|
|
25
|
+
# │ └── r1/
|
|
26
|
+
# │ ├── review.md
|
|
27
|
+
# │ ├── product-assessment.md
|
|
28
|
+
# │ └── installation/
|
|
29
|
+
# │ └── qa-task-1.md
|
|
30
|
+
#
|
|
31
|
+
# Idempotent: skips if r1/ already exists.
|
|
32
|
+
#
|
|
33
|
+
# This script is sourced by migrate.sh and has access to:
|
|
34
|
+
# - report_update "filepath" "description"
|
|
35
|
+
# - report_skip "filepath"
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
MIGRATION_ID="008"
|
|
39
|
+
REVIEW_DIR="docs/workflow/review"
|
|
40
|
+
|
|
41
|
+
# Skip if no review directory
|
|
42
|
+
if [ ! -d "$REVIEW_DIR" ]; then
|
|
43
|
+
return 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
for review_file in "$REVIEW_DIR"/*.md; do
|
|
47
|
+
[ -f "$review_file" ] || continue
|
|
48
|
+
|
|
49
|
+
scope=$(basename "$review_file" .md)
|
|
50
|
+
scope_dir="$REVIEW_DIR/$scope"
|
|
51
|
+
r1_dir="$scope_dir/r1"
|
|
52
|
+
|
|
53
|
+
# Skip if r1/ already exists (idempotent)
|
|
54
|
+
if [ -d "$r1_dir" ]; then
|
|
55
|
+
report_skip "$review_file"
|
|
56
|
+
continue
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Create r1/ directory
|
|
60
|
+
mkdir -p "$r1_dir"
|
|
61
|
+
|
|
62
|
+
# Move the summary file to r1/review.md
|
|
63
|
+
mv "$review_file" "$r1_dir/review.md"
|
|
64
|
+
moved=1
|
|
65
|
+
|
|
66
|
+
# If a matching directory exists, move its contents into r1/
|
|
67
|
+
if [ -d "$scope_dir" ]; then
|
|
68
|
+
# Move qa-task-*.md files
|
|
69
|
+
for qa_file in "$scope_dir"/qa-task-*.md; do
|
|
70
|
+
[ -f "$qa_file" ] || continue
|
|
71
|
+
mv "$qa_file" "$r1_dir/"
|
|
72
|
+
moved=$((moved + 1))
|
|
73
|
+
done
|
|
74
|
+
|
|
75
|
+
# Move product-assessment.md
|
|
76
|
+
if [ -f "$scope_dir/product-assessment.md" ]; then
|
|
77
|
+
mv "$scope_dir/product-assessment.md" "$r1_dir/"
|
|
78
|
+
moved=$((moved + 1))
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Move per-plan QA subdirectories (multi-plan reviews)
|
|
82
|
+
for subdir in "$scope_dir"/*/; do
|
|
83
|
+
[ -d "$subdir" ] || continue
|
|
84
|
+
subdir_name=$(basename "$subdir")
|
|
85
|
+
# Skip the r1 directory we just created
|
|
86
|
+
[ "$subdir_name" = "r1" ] && continue
|
|
87
|
+
# Only move directories that contain qa-task files
|
|
88
|
+
if ls -1 "$subdir"/qa-task-*.md >/dev/null 2>&1; then
|
|
89
|
+
mv "$subdir" "$r1_dir/"
|
|
90
|
+
moved=$((moved + 1))
|
|
91
|
+
fi
|
|
92
|
+
done
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
report_update "$r1_dir/review.md" "migrated to r1/ structure ($moved items)"
|
|
96
|
+
done
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 009-review-per-plan-storage.sh
|
|
4
|
+
#
|
|
5
|
+
# Restructures review directories to per-plan storage.
|
|
6
|
+
#
|
|
7
|
+
# Handles three patterns:
|
|
8
|
+
#
|
|
9
|
+
# 1. Product assessment files inside review versions — deleted (feature removed)
|
|
10
|
+
#
|
|
11
|
+
# 2. Multi-plan review with per-plan QA subdirectories:
|
|
12
|
+
# review/{scope}/r{N}/{plan}/qa-task-*.md → review/{plan}/r{N}/qa-task-*.md
|
|
13
|
+
#
|
|
14
|
+
# 3. Orphaned per-plan directories at review root (no r{N}/ structure):
|
|
15
|
+
# review/{topic}/qa-task-*.md → review/{topic}/r1/qa-task-*.md
|
|
16
|
+
#
|
|
17
|
+
# Idempotent: skips directories that already have proper r{N}/ structure.
|
|
18
|
+
#
|
|
19
|
+
# This script is sourced by migrate.sh and has access to:
|
|
20
|
+
# - report_update "filepath" "description"
|
|
21
|
+
# - report_skip "filepath"
|
|
22
|
+
#
|
|
23
|
+
|
|
24
|
+
MIGRATION_ID="009"
|
|
25
|
+
REVIEW_DIR="docs/workflow/review"
|
|
26
|
+
|
|
27
|
+
# Skip if no review directory
|
|
28
|
+
if [ ! -d "$REVIEW_DIR" ]; then
|
|
29
|
+
return 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Phase 1: Delete product-assessment.md files (feature removed)
|
|
34
|
+
#
|
|
35
|
+
for rdir in "$REVIEW_DIR"/*/r*/; do
|
|
36
|
+
[ -d "$rdir" ] || continue
|
|
37
|
+
pa_file="${rdir}product-assessment.md"
|
|
38
|
+
[ -f "$pa_file" ] || continue
|
|
39
|
+
rm "$pa_file"
|
|
40
|
+
report_update "$pa_file" "removed product assessment (feature removed)"
|
|
41
|
+
done
|
|
42
|
+
|
|
43
|
+
#
|
|
44
|
+
# Phase 2: Move per-plan QA subdirectories from multi-plan reviews
|
|
45
|
+
#
|
|
46
|
+
# Detect multi-plan reviews: r{N}/ directories that contain subdirectories
|
|
47
|
+
# with qa-task-*.md files (not just qa-task files at the r{N} level)
|
|
48
|
+
#
|
|
49
|
+
for scope_dir in "$REVIEW_DIR"/*/; do
|
|
50
|
+
[ -d "$scope_dir" ] || continue
|
|
51
|
+
scope=$(basename "$scope_dir")
|
|
52
|
+
|
|
53
|
+
for rdir in "$scope_dir"r*/; do
|
|
54
|
+
[ -d "$rdir" ] || continue
|
|
55
|
+
rnum=${rdir##*r}
|
|
56
|
+
rnum=${rnum%/}
|
|
57
|
+
|
|
58
|
+
# Look for per-plan subdirectories containing qa-task files
|
|
59
|
+
for plan_subdir in "$rdir"*/; do
|
|
60
|
+
[ -d "$plan_subdir" ] || continue
|
|
61
|
+
plan_name=$(basename "$plan_subdir")
|
|
62
|
+
|
|
63
|
+
# Only process directories that have qa-task files
|
|
64
|
+
ls -1 "$plan_subdir"/qa-task-*.md >/dev/null 2>&1 || continue
|
|
65
|
+
|
|
66
|
+
# Create destination: review/{plan}/r{N}/
|
|
67
|
+
dest_dir="$REVIEW_DIR/$plan_name/r${rnum}"
|
|
68
|
+
mkdir -p "$dest_dir"
|
|
69
|
+
|
|
70
|
+
# Move QA files
|
|
71
|
+
moved=0
|
|
72
|
+
for qa_file in "$plan_subdir"/qa-task-*.md; do
|
|
73
|
+
[ -f "$qa_file" ] || continue
|
|
74
|
+
mv "$qa_file" "$dest_dir/"
|
|
75
|
+
moved=$((moved + 1))
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
# Remove empty source directory
|
|
79
|
+
rmdir "$plan_subdir" 2>/dev/null || true
|
|
80
|
+
|
|
81
|
+
if [ "$moved" -gt 0 ]; then
|
|
82
|
+
report_update "$dest_dir" "moved $moved QA files from multi-plan review $scope/r${rnum}"
|
|
83
|
+
fi
|
|
84
|
+
done
|
|
85
|
+
done
|
|
86
|
+
done
|
|
87
|
+
|
|
88
|
+
#
|
|
89
|
+
# Phase 3: Fix orphaned per-plan directories (QA files at root, no r{N}/)
|
|
90
|
+
#
|
|
91
|
+
# Pattern: review/{topic}/qa-task-*.md (no r1/ directory)
|
|
92
|
+
#
|
|
93
|
+
for topic_dir in "$REVIEW_DIR"/*/; do
|
|
94
|
+
[ -d "$topic_dir" ] || continue
|
|
95
|
+
topic=$(basename "$topic_dir")
|
|
96
|
+
|
|
97
|
+
# Skip if r1/ already exists with content
|
|
98
|
+
if [ -d "${topic_dir}r1" ]; then
|
|
99
|
+
continue
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Check for QA files directly in the topic directory
|
|
103
|
+
ls -1 "$topic_dir"/qa-task-*.md >/dev/null 2>&1 || continue
|
|
104
|
+
|
|
105
|
+
# Create r1/ and move QA files
|
|
106
|
+
mkdir -p "${topic_dir}r1"
|
|
107
|
+
moved=0
|
|
108
|
+
for qa_file in "${topic_dir}"qa-task-*.md; do
|
|
109
|
+
[ -f "$qa_file" ] || continue
|
|
110
|
+
mv "$qa_file" "${topic_dir}r1/"
|
|
111
|
+
moved=$((moved + 1))
|
|
112
|
+
done
|
|
113
|
+
|
|
114
|
+
if [ "$moved" -gt 0 ]; then
|
|
115
|
+
report_update "${topic_dir}r1" "moved $moved orphaned QA files into r1/"
|
|
116
|
+
fi
|
|
117
|
+
done
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 010-cache-state-restructure.sh
|
|
4
|
+
#
|
|
5
|
+
# Restructures docs/workflow/.cache/ → .state/ + .cache/:
|
|
6
|
+
# - .state/ = committed persistent workflow state (analysis files)
|
|
7
|
+
# - .cache/ = gitignored ephemeral runtime data (sessions)
|
|
8
|
+
#
|
|
9
|
+
# Steps:
|
|
10
|
+
# 1. Move analysis files from .cache/ → .state/ (if they exist)
|
|
11
|
+
# 2. Clean up orphaned .cache/migrations / .cache/migrations.log
|
|
12
|
+
# 3. Add docs/workflow/.cache/ to .gitignore
|
|
13
|
+
# 4. Remove old docs/workflow/.cache/sessions/ entry from .gitignore
|
|
14
|
+
#
|
|
15
|
+
# Idempotent: safe to run multiple times.
|
|
16
|
+
#
|
|
17
|
+
# This script is sourced by migrate.sh and has access to:
|
|
18
|
+
# - report_update "filepath" "description"
|
|
19
|
+
# - report_skip "filepath"
|
|
20
|
+
|
|
21
|
+
STATE_DIR="docs/workflow/.state"
|
|
22
|
+
CACHE_DIR="docs/workflow/.cache"
|
|
23
|
+
GITIGNORE=".gitignore"
|
|
24
|
+
NEW_ENTRY="docs/workflow/.cache/"
|
|
25
|
+
OLD_ENTRY="docs/workflow/.cache/sessions/"
|
|
26
|
+
|
|
27
|
+
# --- Step 1: Move analysis files from .cache/ to .state/ ---
|
|
28
|
+
|
|
29
|
+
ANALYSIS_FILES=(
|
|
30
|
+
"discussion-consolidation-analysis.md"
|
|
31
|
+
"research-analysis.md"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
for file in "${ANALYSIS_FILES[@]}"; do
|
|
35
|
+
if [ -f "$CACHE_DIR/$file" ]; then
|
|
36
|
+
mkdir -p "$STATE_DIR"
|
|
37
|
+
mv "$CACHE_DIR/$file" "$STATE_DIR/$file"
|
|
38
|
+
report_update "$STATE_DIR/$file" "moved from .cache/"
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
# --- Step 2: Clean up orphaned migration tracking in .cache/ ---
|
|
43
|
+
|
|
44
|
+
for old_file in "$CACHE_DIR/migrations" "$CACHE_DIR/migrations.log"; do
|
|
45
|
+
if [ -f "$old_file" ]; then
|
|
46
|
+
rm "$old_file"
|
|
47
|
+
report_update "$old_file" "removed orphaned tracking file"
|
|
48
|
+
fi
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
# --- Step 3: Add docs/workflow/.cache/ to .gitignore ---
|
|
52
|
+
|
|
53
|
+
if [ -f "$GITIGNORE" ] && grep -qxF "$NEW_ENTRY" "$GITIGNORE"; then
|
|
54
|
+
report_skip "$GITIGNORE"
|
|
55
|
+
else
|
|
56
|
+
echo "$NEW_ENTRY" >> "$GITIGNORE"
|
|
57
|
+
report_update "$GITIGNORE" "added .cache/ to gitignore"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# --- Step 4: Remove old sessions/ entry from .gitignore (now redundant) ---
|
|
61
|
+
|
|
62
|
+
if [ -f "$GITIGNORE" ] && grep -qF "$OLD_ENTRY" "$GITIGNORE"; then
|
|
63
|
+
# Remove the old entry (and its comment if present)
|
|
64
|
+
grep -vF "$OLD_ENTRY" "$GITIGNORE" > "${GITIGNORE}.tmp"
|
|
65
|
+
mv "${GITIGNORE}.tmp" "$GITIGNORE"
|
|
66
|
+
report_update "$GITIGNORE" "removed redundant sessions/ entry"
|
|
67
|
+
fi
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: start-discussion
|
|
3
3
|
description: "Start a technical discussion. Discovers research and existing discussions, offers multiple entry paths, and invokes the technical-discussion skill."
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
allowed-tools: Bash(.claude/skills/start-discussion/scripts/discovery.sh), Bash(mkdir -p docs/workflow/.
|
|
5
|
+
allowed-tools: Bash(.claude/skills/start-discussion/scripts/discovery.sh), Bash(mkdir -p docs/workflow/.state), Bash(rm docs/workflow/.state/research-analysis.md), Bash(.claude/hooks/workflows/write-session-state.sh)
|
|
6
6
|
hooks:
|
|
7
7
|
PreToolUse:
|
|
8
8
|
- hooks:
|
|
@@ -14,7 +14,7 @@ Use `cache.status` from discovery to determine the approach:
|
|
|
14
14
|
Using cached research analysis (unchanged since {cache.generated})
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Load the topics from `docs/workflow/.
|
|
17
|
+
Load the topics from `docs/workflow/.state/research-analysis.md` and proceed.
|
|
18
18
|
|
|
19
19
|
#### If cache.status is "stale" or "none"
|
|
20
20
|
|
|
@@ -40,10 +40,10 @@ Read each research file and extract key themes and potential discussion topics.
|
|
|
40
40
|
|
|
41
41
|
Ensure the cache directory exists:
|
|
42
42
|
```bash
|
|
43
|
-
mkdir -p docs/workflow/.
|
|
43
|
+
mkdir -p docs/workflow/.state
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Create/update `docs/workflow/.
|
|
46
|
+
Create/update `docs/workflow/.state/research-analysis.md`:
|
|
47
47
|
|
|
48
48
|
```markdown
|
|
49
49
|
---
|
|
@@ -10,7 +10,7 @@ set -eo pipefail
|
|
|
10
10
|
|
|
11
11
|
RESEARCH_DIR="docs/workflow/research"
|
|
12
12
|
DISCUSSION_DIR="docs/workflow/discussion"
|
|
13
|
-
CACHE_FILE="docs/workflow/.
|
|
13
|
+
CACHE_FILE="docs/workflow/.state/research-analysis.md"
|
|
14
14
|
|
|
15
15
|
# Helper: Extract a frontmatter field value from a file
|
|
16
16
|
# Usage: extract_field <file> <field_name>
|
|
@@ -77,10 +77,16 @@ Parse the discovery output to understand:
|
|
|
77
77
|
- `files` - list of plans with: name, topic, status, date, format, specification, specification_exists, plan_id (if present)
|
|
78
78
|
- `count` - total number of plans
|
|
79
79
|
|
|
80
|
+
**From `reviews` section:**
|
|
81
|
+
- `exists` - whether any reviews exist
|
|
82
|
+
- `entries` - list of reviews with: scope, type, plans, versions, latest_version, latest_verdict, latest_path, has_synthesis
|
|
83
|
+
|
|
80
84
|
**From `state` section:**
|
|
81
85
|
- `scenario` - one of: `"no_plans"`, `"single_plan"`, `"multiple_plans"`
|
|
82
86
|
- `implemented_count` - plans with implementation_status != "none"
|
|
83
87
|
- `completed_count` - plans with implementation_status == "completed"
|
|
88
|
+
- `reviewed_plan_count` - plans that have been reviewed
|
|
89
|
+
- `all_reviewed` - whether all implemented plans have reviews
|
|
84
90
|
|
|
85
91
|
**IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state - the script provides everything needed.
|
|
86
92
|
|
|
@@ -110,9 +116,50 @@ to build it.
|
|
|
110
116
|
|
|
111
117
|
**STOP.** Do not proceed — terminal condition.
|
|
112
118
|
|
|
119
|
+
#### If all_reviewed is true
|
|
120
|
+
|
|
121
|
+
All implemented plans have been reviewed.
|
|
122
|
+
|
|
123
|
+
> *Output the next fenced block as a code block:*
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Review Overview
|
|
127
|
+
|
|
128
|
+
All {N} implemented plans have been reviewed.
|
|
129
|
+
|
|
130
|
+
1. {topic:(titlecase)}
|
|
131
|
+
└─ Review: r{N} ({verdict})
|
|
132
|
+
└─ Synthesis: @if(has_synthesis) completed @else pending @endif
|
|
133
|
+
|
|
134
|
+
2. ...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
> *Output the next fenced block as markdown (not a code block):*
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
· · · · · · · · · · · ·
|
|
141
|
+
All plans have been reviewed.
|
|
142
|
+
|
|
143
|
+
- **`a`/`analysis`** — Synthesize findings from existing reviews into tasks
|
|
144
|
+
- **`r`/`re-review`** — Re-review a plan (creates new review version)
|
|
145
|
+
|
|
146
|
+
Select an option:
|
|
147
|
+
· · · · · · · · · · · ·
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**STOP.** Wait for user response.
|
|
151
|
+
|
|
152
|
+
#### If analysis
|
|
153
|
+
|
|
154
|
+
→ Proceed to **Step 4** with scope set to "analysis".
|
|
155
|
+
|
|
156
|
+
#### If re-review
|
|
157
|
+
|
|
158
|
+
→ Proceed to **Step 3**, incrementing the review version for the selected plan.
|
|
159
|
+
|
|
113
160
|
#### If scenario is "single_plan" or "multiple_plans"
|
|
114
161
|
|
|
115
|
-
Plans exist.
|
|
162
|
+
Plans exist (some may have reviews, some may not).
|
|
116
163
|
|
|
117
164
|
→ Proceed to **Step 3** to present options.
|
|
118
165
|
|
|
@@ -136,19 +183,4 @@ Load **[select-plans.md](references/select-plans.md)** and follow its instructio
|
|
|
136
183
|
|
|
137
184
|
## Step 5: Invoke the Skill
|
|
138
185
|
|
|
139
|
-
Before invoking the processing skill, save a session bookmark.
|
|
140
|
-
|
|
141
|
-
> *Output the next fenced block as a code block:*
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
Saving session state so Claude can pick up where it left off if the conversation is compacted.
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
.claude/hooks/workflows/write-session-state.sh \
|
|
149
|
-
"{topic}" \
|
|
150
|
-
"skills/technical-review/SKILL.md" \
|
|
151
|
-
"docs/workflow/review/{topic}.md"
|
|
152
|
-
```
|
|
153
|
-
|
|
154
186
|
Load **[invoke-skill.md](references/invoke-skill.md)** and follow its instructions as written.
|
|
@@ -21,6 +21,7 @@ Review Overview
|
|
|
21
21
|
└─ Plan: concluded ({format})
|
|
22
22
|
└─ Implementation: {impl_status:[completed|in-progress]}
|
|
23
23
|
└─ Spec: {spec:[exists|missing]}
|
|
24
|
+
└─ Review: @if(has_review) r{N} ({verdict}) @else (none) @endif
|
|
24
25
|
|
|
25
26
|
2. ...
|
|
26
27
|
```
|
|
@@ -54,6 +55,10 @@ Key:
|
|
|
54
55
|
Implementation status:
|
|
55
56
|
completed — all tasks implemented
|
|
56
57
|
in-progress — implementation still ongoing
|
|
58
|
+
|
|
59
|
+
Review status:
|
|
60
|
+
r{N} — review version number
|
|
61
|
+
(none) — not yet reviewed
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
**Then route based on what's reviewable:**
|
|
@@ -90,11 +95,14 @@ Scope: single
|
|
|
90
95
|
|
|
91
96
|
```
|
|
92
97
|
· · · · · · · · · · · ·
|
|
93
|
-
What
|
|
98
|
+
What would you like to do?
|
|
94
99
|
|
|
95
100
|
- **`s`/`single`** — Review one plan's implementation
|
|
96
|
-
- **`m`/`multi`** — Review selected plans
|
|
97
|
-
- **`a`/`all`** — Review all implemented plans
|
|
101
|
+
- **`m`/`multi`** — Review selected plans
|
|
102
|
+
- **`a`/`all`** — Review all implemented plans
|
|
103
|
+
@if(has_any_review) - **`analysis`** — Synthesize findings from existing reviews into tasks @endif
|
|
104
|
+
|
|
105
|
+
Select an option:
|
|
98
106
|
· · · · · · · · · · · ·
|
|
99
107
|
```
|
|
100
108
|
|
|
@@ -6,27 +6,55 @@
|
|
|
6
6
|
|
|
7
7
|
After completing the steps above, this skill's purpose is fulfilled.
|
|
8
8
|
|
|
9
|
+
## Save Session Bookmark
|
|
10
|
+
|
|
11
|
+
> *Output the next fenced block as a code block:*
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Saving session state so Claude can pick up where it left off if the conversation is compacted.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
.claude/hooks/workflows/write-session-state.sh \
|
|
19
|
+
"{topic}" \
|
|
20
|
+
"skills/technical-review/SKILL.md" \
|
|
21
|
+
"docs/workflow/review/{scope}/r{N}/review.md"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Invoke the Skill
|
|
27
|
+
|
|
9
28
|
Invoke the [technical-review](../../technical-review/SKILL.md) skill for your next instructions. Do not act on the gathered information until the skill is loaded - it contains the instructions for how to proceed.
|
|
10
29
|
|
|
11
|
-
|
|
30
|
+
Each plan is reviewed independently. When multiple plans are selected, pass all plans in the handoff — the orchestrator will loop through them one at a time.
|
|
31
|
+
|
|
32
|
+
**Example handoff:**
|
|
12
33
|
```
|
|
13
|
-
Review session
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
34
|
+
Review session
|
|
35
|
+
Plans to review:
|
|
36
|
+
- topic: {topic-1}
|
|
37
|
+
plan: docs/workflow/planning/{topic-1}/plan.md
|
|
38
|
+
format: {format}
|
|
39
|
+
plan_id: {plan_id} (if applicable)
|
|
40
|
+
specification: {specification} (exists: {true|false})
|
|
41
|
+
review_version: r{N}
|
|
42
|
+
- topic: {topic-2}
|
|
43
|
+
plan: docs/workflow/planning/{topic-2}/plan.md
|
|
44
|
+
format: {format}
|
|
45
|
+
specification: {specification} (exists: {true|false})
|
|
46
|
+
review_version: r{N}
|
|
19
47
|
|
|
20
48
|
Invoke the technical-review skill.
|
|
21
49
|
```
|
|
22
50
|
|
|
23
|
-
**Example handoff (
|
|
51
|
+
**Example handoff (analysis-only):**
|
|
24
52
|
```
|
|
25
|
-
|
|
26
|
-
Review
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
53
|
+
Analysis session for: {topic}
|
|
54
|
+
Review mode: analysis-only
|
|
55
|
+
Review path: docs/workflow/review/{topic}/r{N}/
|
|
56
|
+
Format: {format}
|
|
57
|
+
Specification: {spec path}
|
|
30
58
|
|
|
31
59
|
Invoke the technical-review skill.
|
|
32
60
|
```
|