@leeovery/claude-technical-workflows 2.1.42 → 2.2.1
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 +10 -9
- package/hooks/workflows/compact-recovery.sh +3 -23
- package/hooks/workflows/write-session-state.sh +2 -26
- package/package.json +1 -1
- package/skills/link-dependencies/SKILL.md +0 -1
- package/skills/migrate/SKILL.md +0 -1
- package/skills/migrate/scripts/migrations/013-discussion-work-type.sh +76 -0
- package/skills/migrate/scripts/migrations/014-specification-work-type.sh +76 -0
- package/skills/migrate/scripts/migrations/015-plan-work-type.sh +76 -0
- package/skills/start-bugfix/SKILL.md +80 -0
- package/skills/start-bugfix/references/gather-bug-context.md +75 -0
- package/skills/start-bugfix/references/invoke-investigation.md +46 -0
- package/skills/start-bugfix/references/topic-name-check.md +59 -0
- package/skills/start-discussion/SKILL.md +51 -46
- package/skills/start-discussion/references/gather-context.md +54 -10
- package/skills/start-discussion/references/handle-selection.md +14 -4
- package/skills/start-discussion/references/invoke-skill.md +71 -3
- package/skills/start-discussion/references/research-analysis.md +2 -0
- package/skills/start-discussion/references/route-scenario.md +39 -0
- package/skills/start-discussion/references/validate-topic.md +46 -0
- package/skills/start-discussion/scripts/discovery.sh +3 -0
- package/skills/start-feature/SKILL.md +28 -84
- package/skills/start-feature/references/invoke-discussion.md +8 -4
- package/skills/start-feature/references/invoke-research.md +29 -0
- package/skills/start-feature/references/invoke-skill.md +35 -0
- package/skills/start-feature/references/research-gating.md +65 -0
- package/skills/start-feature/references/topic-name-check.md +61 -0
- package/skills/start-implementation/SKILL.md +35 -289
- package/skills/start-implementation/references/check-dependencies.md +65 -0
- package/skills/start-implementation/references/display-plans.md +159 -0
- package/skills/start-implementation/references/environment-check.md +45 -0
- package/skills/start-implementation/references/invoke-skill.md +42 -0
- package/skills/start-implementation/references/route-scenario.md +32 -0
- package/skills/start-implementation/references/validate-plan.md +45 -0
- package/skills/start-implementation/scripts/discovery.sh +3 -0
- package/skills/start-investigation/SKILL.md +145 -0
- package/skills/start-investigation/references/gather-context-fresh.md +72 -0
- package/skills/start-investigation/references/gather-context.md +31 -0
- package/skills/start-investigation/references/invoke-skill.md +54 -0
- package/skills/start-investigation/references/route-scenario.md +69 -0
- package/skills/start-investigation/references/validate-investigation.md +46 -0
- package/skills/start-investigation/scripts/discovery.sh +92 -0
- package/skills/start-planning/SKILL.md +32 -72
- package/skills/start-planning/references/cross-cutting-context.md +5 -5
- package/skills/start-planning/references/invoke-skill.md +27 -4
- package/skills/start-planning/references/route-plan-state.md +30 -0
- package/skills/start-planning/references/route-scenario.md +38 -0
- package/skills/start-planning/references/validate-spec.md +47 -0
- package/skills/start-planning/scripts/discovery.sh +7 -0
- package/skills/start-research/SKILL.md +17 -6
- package/skills/start-research/references/invoke-skill.md +3 -0
- package/skills/start-review/SKILL.md +32 -60
- package/skills/start-review/references/determine-review-version.md +24 -0
- package/skills/start-review/references/display-plans.md +2 -2
- package/skills/start-review/references/route-scenario.md +74 -0
- package/skills/start-review/references/select-plans.md +8 -6
- package/skills/start-review/references/validate-artifacts.md +63 -0
- package/skills/start-review/scripts/discovery.sh +3 -0
- package/skills/start-specification/SKILL.md +44 -20
- package/skills/start-specification/references/check-existing-spec.md +57 -0
- package/skills/start-specification/references/check-prerequisites.md +15 -0
- package/skills/start-specification/references/handoffs/continue-concluded.md +3 -0
- package/skills/start-specification/references/handoffs/continue.md +3 -0
- package/skills/start-specification/references/handoffs/create-with-incorporation.md +3 -0
- package/skills/start-specification/references/handoffs/create.md +3 -0
- package/skills/start-specification/references/handoffs/unify-with-incorporation.md +3 -0
- package/skills/start-specification/references/handoffs/unify.md +3 -0
- package/skills/start-specification/references/invoke-skill-bridge.md +74 -0
- package/skills/start-specification/references/route-scenario.md +23 -0
- package/skills/start-specification/references/validate-source.md +91 -0
- package/skills/start-specification/scripts/discovery.sh +6 -0
- package/skills/status/SKILL.md +6 -3
- package/skills/status/scripts/discovery.sh +9 -0
- package/skills/technical-discussion/SKILL.md +15 -4
- package/skills/technical-discussion/references/template.md +9 -1
- package/skills/technical-implementation/SKILL.md +24 -1
- package/skills/technical-implementation/references/analysis-loop.md +4 -4
- package/skills/technical-implementation/references/task-loop.md +2 -2
- package/skills/technical-investigation/SKILL.md +239 -0
- package/skills/technical-investigation/references/analysis-patterns.md +181 -0
- package/skills/technical-investigation/references/symptom-gathering.md +164 -0
- package/skills/technical-investigation/references/template.md +164 -0
- package/skills/technical-planning/SKILL.md +24 -1
- package/skills/technical-planning/references/author-tasks.md +16 -16
- package/skills/technical-planning/references/define-tasks.md +2 -2
- package/skills/technical-planning/references/plan-construction.md +11 -30
- package/skills/technical-planning/references/plan-review.md +3 -3
- package/skills/technical-research/SKILL.md +38 -2
- package/skills/technical-review/SKILL.md +1 -2
- package/skills/technical-review/references/review-actions-loop.md +43 -1
- package/skills/technical-specification/SKILL.md +1 -2
- package/skills/technical-specification/references/spec-completion.md +34 -6
- package/skills/technical-specification/references/spec-construction.md +1 -1
- package/skills/technical-specification/references/spec-review.md +5 -5
- package/skills/view-plan/SKILL.md +0 -1
- package/skills/workflow-bridge/SKILL.md +82 -0
- package/skills/workflow-bridge/references/bugfix-continuation.md +59 -0
- package/skills/workflow-bridge/references/feature-continuation.md +60 -0
- package/skills/workflow-bridge/references/greenfield-continuation.md +224 -0
- package/skills/workflow-bridge/scripts/discovery.sh +512 -0
- package/skills/workflow-start/SKILL.md +97 -0
- package/skills/workflow-start/references/bugfix-routing.md +117 -0
- package/skills/workflow-start/references/feature-routing.md +117 -0
- package/skills/workflow-start/references/greenfield-routing.md +140 -0
- package/skills/workflow-start/references/work-type-selection.md +83 -0
- package/skills/workflow-start/scripts/discovery.sh +577 -0
- package/skills/begin-implementation/SKILL.md +0 -162
- package/skills/begin-planning/SKILL.md +0 -92
- package/skills/begin-review/SKILL.md +0 -90
- package/skills/continue-feature/SKILL.md +0 -186
- package/skills/continue-feature/references/detect-phase.md +0 -99
- package/skills/continue-feature/references/invoke-implementation.md +0 -43
- package/skills/continue-feature/references/invoke-planning.md +0 -43
- package/skills/continue-feature/references/invoke-review.md +0 -43
- package/skills/continue-feature/references/invoke-specification.md +0 -55
- package/skills/continue-feature/references/phase-bridge.md +0 -57
- package/skills/continue-feature/scripts/discovery.sh +0 -233
- package/skills/start-feature/references/phase-bridge.md +0 -37
package/README.md
CHANGED
|
@@ -134,7 +134,7 @@ Discussion ──▶ Specification ──▶ Planning ──▶ Implementation
|
|
|
134
134
|
|
|
135
135
|
**How it works:** After each phase completes, a plan mode bridge clears context and advances to the next phase automatically. You approve each transition with "clear context and continue" — this keeps each phase in a clean context window.
|
|
136
136
|
|
|
137
|
-
If a session is interrupted, run `/
|
|
137
|
+
If a session is interrupted, run `/workflow-start` to pick up where you left off. It discovers artifact state and routes to the next phase.
|
|
138
138
|
|
|
139
139
|
### Under the Hood
|
|
140
140
|
|
|
@@ -233,29 +233,30 @@ skills/
|
|
|
233
233
|
├── # Processing skills (model-invocable)
|
|
234
234
|
├── technical-research/ # Explore and validate ideas
|
|
235
235
|
├── technical-discussion/ # Document discussions
|
|
236
|
+
├── technical-investigation/ # Investigate bugs (bugfix pipeline)
|
|
236
237
|
├── technical-specification/ # Build validated specifications
|
|
237
238
|
├── technical-planning/ # Create implementation plans
|
|
238
239
|
├── technical-implementation/ # Execute via TDD
|
|
239
240
|
├── technical-review/ # Validate against artefacts
|
|
240
241
|
│
|
|
242
|
+
├── # Unified entry points
|
|
243
|
+
├── workflow-start/ # Discovers state, routes by work type
|
|
244
|
+
├── workflow-bridge/ # Pipeline continuation — next phase routing
|
|
245
|
+
│
|
|
241
246
|
├── # Entry-point skills (user-invocable)
|
|
242
247
|
├── migrate/ # Keep workflow files in sync with system design
|
|
243
248
|
├── start-feature/ # Pipeline: discussion → spec → plan → impl → review
|
|
244
|
-
├──
|
|
249
|
+
├── start-bugfix/ # Pipeline: investigation → spec → plan → impl → review
|
|
245
250
|
├── link-dependencies/ # Standalone: wire cross-topic deps
|
|
246
251
|
├── start-research/ # Begin research
|
|
247
252
|
├── start-discussion/ # Begin discussions
|
|
253
|
+
├── start-investigation/ # Begin investigation (bugfix)
|
|
248
254
|
├── start-specification/ # Begin specification
|
|
249
255
|
├── start-planning/ # Begin planning
|
|
250
256
|
├── start-implementation/ # Begin implementation
|
|
251
257
|
├── start-review/ # Begin review
|
|
252
258
|
├── status/ # Show workflow status
|
|
253
|
-
|
|
254
|
-
│
|
|
255
|
-
├── # Bridge skills (model-invocable — pipeline pre-flight)
|
|
256
|
-
├── begin-planning/ # Pre-flight for planning in pipeline
|
|
257
|
-
├── begin-implementation/ # Pre-flight for implementation in pipeline
|
|
258
|
-
└── begin-review/ # Pre-flight for review in pipeline
|
|
259
|
+
└── view-plan/ # View plan tasks
|
|
259
260
|
|
|
260
261
|
agents/
|
|
261
262
|
├── review-task-verifier.md # Verifies single task implementation for review
|
|
@@ -322,7 +323,7 @@ Independent skills that gather inputs flexibly (inline context, files, or prompt
|
|
|
322
323
|
| Skill | Description |
|
|
323
324
|
|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
324
325
|
| [**/start-feature**](skills/start-feature/) | Start a new feature through the full pipeline. Gathers context, creates a discussion, then bridges through specification → planning → implementation → review. |
|
|
325
|
-
| [**/
|
|
326
|
+
| [**/start-bugfix**](skills/start-bugfix/) | Start a bugfix through the pipeline. Gathers bug context, creates an investigation, then bridges through specification → planning → implementation → review. |
|
|
326
327
|
| [**/link-dependencies**](skills/link-dependencies/) | Link external dependencies across topics. Scans plans and wires up unresolved cross-topic dependencies. |
|
|
327
328
|
|
|
328
329
|
### Creating Custom Skills
|
|
@@ -32,18 +32,6 @@ topic=$(grep '^topic:' "$SESSION_FILE" | awk '{print $2}')
|
|
|
32
32
|
skill=$(grep '^skill:' "$SESSION_FILE" | awk '{print $2}')
|
|
33
33
|
artifact=$(grep '^artifact:' "$SESSION_FILE" | awk '{print $2}')
|
|
34
34
|
|
|
35
|
-
# Check for pipeline section
|
|
36
|
-
has_pipeline=false
|
|
37
|
-
if grep -q '^pipeline:' "$SESSION_FILE"; then
|
|
38
|
-
has_pipeline=true
|
|
39
|
-
# Extract after_conclude content (indented block after "after_conclude: |")
|
|
40
|
-
pipeline_content=$(awk '
|
|
41
|
-
/^ after_conclude:/ { capture=1; next }
|
|
42
|
-
capture && /^[^ ]/ { exit }
|
|
43
|
-
capture && /^ / { sub(/^ /, ""); print }
|
|
44
|
-
' "$SESSION_FILE")
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
35
|
# Build additionalContext
|
|
48
36
|
context="CONTEXT COMPACTION — SESSION RECOVERY
|
|
49
37
|
|
|
@@ -59,18 +47,10 @@ Skill: ${skill}
|
|
|
59
47
|
3. Re-read the artifact: ${artifact}
|
|
60
48
|
4. Continue working until the skill reaches its natural conclusion
|
|
61
49
|
|
|
62
|
-
The files on disk are authoritative — not the conversation summary.
|
|
63
|
-
|
|
64
|
-
if [ "$has_pipeline" = true ] && [ -n "$pipeline_content" ]; then
|
|
65
|
-
context="${context}
|
|
50
|
+
The files on disk are authoritative — not the conversation summary.
|
|
66
51
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
${pipeline_content}
|
|
70
|
-
|
|
71
|
-
Do NOT enter plan mode or invoke continue-feature until the current
|
|
72
|
-
phase is complete. Finish the current phase first."
|
|
73
|
-
fi
|
|
52
|
+
When the processing skill concludes, it will invoke workflow-bridge automatically
|
|
53
|
+
if the artifact has a work_type set. Do not manually handle pipeline continuation."
|
|
74
54
|
|
|
75
55
|
# Escape context for JSON output
|
|
76
56
|
json_context=$(printf '%s' "$context" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n')
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# compaction recovery.
|
|
7
7
|
#
|
|
8
8
|
# Usage:
|
|
9
|
-
# write-session-state.sh "<topic>" "<skill-path>" "<artifact-path>"
|
|
9
|
+
# write-session-state.sh "<topic>" "<skill-path>" "<artifact-path>"
|
|
10
10
|
#
|
|
11
11
|
# Requires CLAUDE_SESSION_ID in environment (set by session-env.sh).
|
|
12
12
|
#
|
|
@@ -26,41 +26,17 @@ fi
|
|
|
26
26
|
topic="$1"
|
|
27
27
|
skill="$2"
|
|
28
28
|
artifact="$3"
|
|
29
|
-
pipeline_content=""
|
|
30
|
-
|
|
31
|
-
# Parse optional --pipeline flag
|
|
32
|
-
shift 3 || true
|
|
33
|
-
while [ $# -gt 0 ]; do
|
|
34
|
-
case "$1" in
|
|
35
|
-
--pipeline)
|
|
36
|
-
pipeline_content="$2"
|
|
37
|
-
shift 2
|
|
38
|
-
;;
|
|
39
|
-
*)
|
|
40
|
-
shift
|
|
41
|
-
;;
|
|
42
|
-
esac
|
|
43
|
-
done
|
|
44
29
|
|
|
45
30
|
SESSIONS_DIR="$PROJECT_DIR/.workflows/.cache/sessions"
|
|
46
31
|
mkdir -p "$SESSIONS_DIR"
|
|
47
32
|
|
|
48
33
|
SESSION_FILE="$SESSIONS_DIR/${CLAUDE_SESSION_ID}.yaml"
|
|
49
34
|
|
|
50
|
-
# Write
|
|
35
|
+
# Write session state
|
|
51
36
|
cat > "$SESSION_FILE" <<EOF
|
|
52
37
|
topic: ${topic}
|
|
53
38
|
skill: ${skill}
|
|
54
39
|
artifact: ${artifact}
|
|
55
40
|
EOF
|
|
56
41
|
|
|
57
|
-
# Append pipeline section if provided
|
|
58
|
-
if [ -n "$pipeline_content" ]; then
|
|
59
|
-
cat >> "$SESSION_FILE" <<EOF
|
|
60
|
-
pipeline:
|
|
61
|
-
after_conclude: |
|
|
62
|
-
$(echo "$pipeline_content" | sed 's/^/ /')
|
|
63
|
-
EOF
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
42
|
exit 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: link-dependencies
|
|
3
|
-
description: "Scan all plans and wire up cross-topic dependencies. Finds unresolved external dependencies, matches them to tasks in other plans, and updates both the plan index and output format."
|
|
4
3
|
disable-model-invocation: true
|
|
5
4
|
hooks:
|
|
6
5
|
PreToolUse:
|
package/skills/migrate/SKILL.md
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 013-discussion-work-type.sh
|
|
4
|
+
#
|
|
5
|
+
# Adds work_type: greenfield to discussion documents that don't have the field.
|
|
6
|
+
#
|
|
7
|
+
# Existing discussions without work_type are assumed to be greenfield work.
|
|
8
|
+
# New discussions will have work_type set by the skill that creates them.
|
|
9
|
+
#
|
|
10
|
+
# This script is sourced by migrate.sh and has access to:
|
|
11
|
+
# - report_update "filepath" "description"
|
|
12
|
+
# - report_skip "filepath"
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
MIGRATION_ID="013"
|
|
16
|
+
DISC_DIR=".workflows/discussion"
|
|
17
|
+
|
|
18
|
+
# Skip if no discussion directory
|
|
19
|
+
if [ ! -d "$DISC_DIR" ]; then
|
|
20
|
+
return 0
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Helper: Extract frontmatter safely (between first pair of --- delimiters)
|
|
24
|
+
extract_frontmatter() {
|
|
25
|
+
local file="$1"
|
|
26
|
+
awk 'BEGIN{c=0} /^---$/{c++; if(c==2) exit; next} c==1{print}' "$file" 2>/dev/null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Helper: Extract content after frontmatter (preserving all body ---)
|
|
30
|
+
extract_content() {
|
|
31
|
+
local file="$1"
|
|
32
|
+
awk '/^---$/ && c<2 {c++; next} c>=2 {print}' "$file" 2>/dev/null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Process each discussion file
|
|
36
|
+
for file in "$DISC_DIR"/*.md; do
|
|
37
|
+
[ -f "$file" ] || continue
|
|
38
|
+
|
|
39
|
+
# Check if file has YAML frontmatter
|
|
40
|
+
if ! head -1 "$file" 2>/dev/null | grep -q "^---$"; then
|
|
41
|
+
report_skip "$file"
|
|
42
|
+
continue
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Check if work_type already exists
|
|
46
|
+
frontmatter=$(extract_frontmatter "$file")
|
|
47
|
+
if echo "$frontmatter" | grep -q "^work_type:"; then
|
|
48
|
+
report_skip "$file"
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Add work_type: greenfield after status field
|
|
53
|
+
content=$(extract_content "$file")
|
|
54
|
+
|
|
55
|
+
# Build new frontmatter with work_type after status
|
|
56
|
+
new_frontmatter=$(echo "$frontmatter" | awk '
|
|
57
|
+
/^status:/ { print; print "work_type: greenfield"; next }
|
|
58
|
+
{ print }
|
|
59
|
+
')
|
|
60
|
+
|
|
61
|
+
# If status wasn't found, add work_type at the end
|
|
62
|
+
if ! echo "$new_frontmatter" | grep -q "^work_type:"; then
|
|
63
|
+
new_frontmatter="$frontmatter
|
|
64
|
+
work_type: greenfield"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Write updated file
|
|
68
|
+
{
|
|
69
|
+
echo "---"
|
|
70
|
+
echo "$new_frontmatter"
|
|
71
|
+
echo "---"
|
|
72
|
+
echo "$content"
|
|
73
|
+
} > "$file"
|
|
74
|
+
|
|
75
|
+
report_update "$file" "added work_type: greenfield"
|
|
76
|
+
done
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 014-specification-work-type.sh
|
|
4
|
+
#
|
|
5
|
+
# Adds work_type: greenfield to specification documents that don't have the field.
|
|
6
|
+
#
|
|
7
|
+
# Existing specifications without work_type are assumed to be greenfield work.
|
|
8
|
+
# New specifications will have work_type set by the skill that creates them.
|
|
9
|
+
#
|
|
10
|
+
# This script is sourced by migrate.sh and has access to:
|
|
11
|
+
# - report_update "filepath" "description"
|
|
12
|
+
# - report_skip "filepath"
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
MIGRATION_ID="014"
|
|
16
|
+
SPEC_DIR=".workflows/specification"
|
|
17
|
+
|
|
18
|
+
# Skip if no specification directory
|
|
19
|
+
if [ ! -d "$SPEC_DIR" ]; then
|
|
20
|
+
return 0
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Helper: Extract frontmatter safely (between first pair of --- delimiters)
|
|
24
|
+
extract_frontmatter() {
|
|
25
|
+
local file="$1"
|
|
26
|
+
awk 'BEGIN{c=0} /^---$/{c++; if(c==2) exit; next} c==1{print}' "$file" 2>/dev/null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Helper: Extract content after frontmatter (preserving all body ---)
|
|
30
|
+
extract_content() {
|
|
31
|
+
local file="$1"
|
|
32
|
+
awk '/^---$/ && c<2 {c++; next} c>=2 {print}' "$file" 2>/dev/null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Process each specification file
|
|
36
|
+
for file in "$SPEC_DIR"/*/specification.md; do
|
|
37
|
+
[ -f "$file" ] || continue
|
|
38
|
+
|
|
39
|
+
# Check if file has YAML frontmatter
|
|
40
|
+
if ! head -1 "$file" 2>/dev/null | grep -q "^---$"; then
|
|
41
|
+
report_skip "$file"
|
|
42
|
+
continue
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Check if work_type already exists
|
|
46
|
+
frontmatter=$(extract_frontmatter "$file")
|
|
47
|
+
if echo "$frontmatter" | grep -q "^work_type:"; then
|
|
48
|
+
report_skip "$file"
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Add work_type: greenfield after type field
|
|
53
|
+
content=$(extract_content "$file")
|
|
54
|
+
|
|
55
|
+
# Build new frontmatter with work_type after type
|
|
56
|
+
new_frontmatter=$(echo "$frontmatter" | awk '
|
|
57
|
+
/^type:/ { print; print "work_type: greenfield"; next }
|
|
58
|
+
{ print }
|
|
59
|
+
')
|
|
60
|
+
|
|
61
|
+
# If type wasn't found, add work_type at the end
|
|
62
|
+
if ! echo "$new_frontmatter" | grep -q "^work_type:"; then
|
|
63
|
+
new_frontmatter="$frontmatter
|
|
64
|
+
work_type: greenfield"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Write updated file
|
|
68
|
+
{
|
|
69
|
+
echo "---"
|
|
70
|
+
echo "$new_frontmatter"
|
|
71
|
+
echo "---"
|
|
72
|
+
echo "$content"
|
|
73
|
+
} > "$file"
|
|
74
|
+
|
|
75
|
+
report_update "$file" "added work_type: greenfield"
|
|
76
|
+
done
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# 015-plan-work-type.sh
|
|
4
|
+
#
|
|
5
|
+
# Adds work_type: greenfield to plan documents that don't have the field.
|
|
6
|
+
#
|
|
7
|
+
# Existing plans without work_type are assumed to be greenfield work.
|
|
8
|
+
# New plans will have work_type set by the skill that creates them.
|
|
9
|
+
#
|
|
10
|
+
# This script is sourced by migrate.sh and has access to:
|
|
11
|
+
# - report_update "filepath" "description"
|
|
12
|
+
# - report_skip "filepath"
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
MIGRATION_ID="015"
|
|
16
|
+
PLAN_DIR=".workflows/planning"
|
|
17
|
+
|
|
18
|
+
# Skip if no planning directory
|
|
19
|
+
if [ ! -d "$PLAN_DIR" ]; then
|
|
20
|
+
return 0
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Helper: Extract frontmatter safely (between first pair of --- delimiters)
|
|
24
|
+
extract_frontmatter() {
|
|
25
|
+
local file="$1"
|
|
26
|
+
awk 'BEGIN{c=0} /^---$/{c++; if(c==2) exit; next} c==1{print}' "$file" 2>/dev/null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Helper: Extract content after frontmatter (preserving all body ---)
|
|
30
|
+
extract_content() {
|
|
31
|
+
local file="$1"
|
|
32
|
+
awk '/^---$/ && c<2 {c++; next} c>=2 {print}' "$file" 2>/dev/null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Process each plan file
|
|
36
|
+
for file in "$PLAN_DIR"/*/plan.md; do
|
|
37
|
+
[ -f "$file" ] || continue
|
|
38
|
+
|
|
39
|
+
# Check if file has YAML frontmatter
|
|
40
|
+
if ! head -1 "$file" 2>/dev/null | grep -q "^---$"; then
|
|
41
|
+
report_skip "$file"
|
|
42
|
+
continue
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Check if work_type already exists
|
|
46
|
+
frontmatter=$(extract_frontmatter "$file")
|
|
47
|
+
if echo "$frontmatter" | grep -q "^work_type:"; then
|
|
48
|
+
report_skip "$file"
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Add work_type: greenfield after status field
|
|
53
|
+
content=$(extract_content "$file")
|
|
54
|
+
|
|
55
|
+
# Build new frontmatter with work_type after status
|
|
56
|
+
new_frontmatter=$(echo "$frontmatter" | awk '
|
|
57
|
+
/^status:/ { print; print "work_type: greenfield"; next }
|
|
58
|
+
{ print }
|
|
59
|
+
')
|
|
60
|
+
|
|
61
|
+
# If status wasn't found, add work_type at the end
|
|
62
|
+
if ! echo "$new_frontmatter" | grep -q "^work_type:"; then
|
|
63
|
+
new_frontmatter="$frontmatter
|
|
64
|
+
work_type: greenfield"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Write updated file
|
|
68
|
+
{
|
|
69
|
+
echo "---"
|
|
70
|
+
echo "$new_frontmatter"
|
|
71
|
+
echo "---"
|
|
72
|
+
echo "$content"
|
|
73
|
+
} > "$file"
|
|
74
|
+
|
|
75
|
+
report_update "$file" "added work_type: greenfield"
|
|
76
|
+
done
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start-bugfix
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: Bash(ls .workflows/investigation/), Bash(.claude/hooks/workflows/write-session-state.sh)
|
|
5
|
+
hooks:
|
|
6
|
+
PreToolUse:
|
|
7
|
+
- hooks:
|
|
8
|
+
- type: command
|
|
9
|
+
command: "$CLAUDE_PROJECT_DIR/.claude/hooks/workflows/system-check.sh"
|
|
10
|
+
once: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Start a new bugfix and route it through the pipeline: Investigation → Specification → Planning → Implementation → Review.
|
|
14
|
+
|
|
15
|
+
> **ZERO OUTPUT RULE**: Do not narrate your processing. Produce no output until a step or reference file explicitly specifies display content. No "proceeding with...", no discovery summaries, no routing decisions, no transition text. Your first output must be content explicitly called for by the instructions.
|
|
16
|
+
|
|
17
|
+
## Instructions
|
|
18
|
+
|
|
19
|
+
Follow these steps EXACTLY as written. Do not skip steps or combine them.
|
|
20
|
+
|
|
21
|
+
**CRITICAL**: This guidance is mandatory.
|
|
22
|
+
|
|
23
|
+
- After each user interaction, STOP and wait for their response before proceeding
|
|
24
|
+
- Never assume or anticipate user choices
|
|
25
|
+
- Even if the user's initial prompt seems to answer a question, still confirm with them at the appropriate step
|
|
26
|
+
- Complete each step fully before moving to the next
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Resuming After Context Refresh
|
|
31
|
+
|
|
32
|
+
Context refresh (compaction) summarizes the conversation, losing procedural detail. When you detect a context refresh has occurred — the conversation feels abruptly shorter, you lack memory of recent steps, or a summary precedes this message — follow this recovery protocol:
|
|
33
|
+
|
|
34
|
+
1. **Re-read this skill file completely.** Do not rely on your summary of it.
|
|
35
|
+
2. **Identify the topic.** Check conversation history for the topic name. If unknown, check `.workflows/investigation/` for recently modified directories via `git log --oneline -5`.
|
|
36
|
+
3. **Determine current step from artifacts:**
|
|
37
|
+
- No investigation file exists → resume at **Step 1**
|
|
38
|
+
- Investigation exists with `status: in-progress` → resume at **Step 3** (re-invoke technical-investigation)
|
|
39
|
+
- Investigation exists with `status: concluded` → already handled by processing skill's bridge invocation
|
|
40
|
+
4. **Announce your position** to the user before continuing: what step you believe you're at, what's been completed, and what comes next. Wait for confirmation.
|
|
41
|
+
|
|
42
|
+
Do not guess at progress or continue from memory. The files on disk and git history are authoritative — your recollection is not.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 0: Run Migrations
|
|
47
|
+
|
|
48
|
+
**This step is mandatory. You must complete it before proceeding.**
|
|
49
|
+
|
|
50
|
+
Invoke the `/migrate` skill and assess its output.
|
|
51
|
+
|
|
52
|
+
#### If files were updated
|
|
53
|
+
|
|
54
|
+
**STOP.** Wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding.
|
|
55
|
+
|
|
56
|
+
#### If no updates needed
|
|
57
|
+
|
|
58
|
+
→ Proceed to **Step 1**.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Step 1: Gather Bug Context
|
|
63
|
+
|
|
64
|
+
Load **[gather-bug-context.md](references/gather-bug-context.md)** and follow its instructions.
|
|
65
|
+
|
|
66
|
+
→ Proceed to **Step 2**.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Step 2: Topic Name and Conflict Check
|
|
71
|
+
|
|
72
|
+
Load **[topic-name-check.md](references/topic-name-check.md)** and follow its instructions.
|
|
73
|
+
|
|
74
|
+
→ Proceed to **Step 3**.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Step 3: Invoke Investigation
|
|
79
|
+
|
|
80
|
+
Load **[invoke-investigation.md](references/invoke-investigation.md)** and follow its instructions.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Gather Bug Context
|
|
2
|
+
|
|
3
|
+
*Reference for **[start-bugfix](../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Gather context about the bug through a structured interview. Ask questions one at a time with STOP gates between each.
|
|
8
|
+
|
|
9
|
+
**Note**: If the user has already provided context in their initial message, acknowledge what they've shared and skip questions that are already answered. Only ask what's missing.
|
|
10
|
+
|
|
11
|
+
## Question 1: What's broken?
|
|
12
|
+
|
|
13
|
+
> *Output the next fenced block as a code block:*
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Starting new bugfix investigation.
|
|
17
|
+
|
|
18
|
+
What's broken?
|
|
19
|
+
|
|
20
|
+
- Expected behavior vs actual behavior
|
|
21
|
+
- Error messages, if any
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**STOP.** Wait for user response.
|
|
25
|
+
|
|
26
|
+
## Question 2: How does it manifest?
|
|
27
|
+
|
|
28
|
+
> *Output the next fenced block as a code block:*
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
How is the bug manifesting?
|
|
32
|
+
|
|
33
|
+
- Where does it surface? (UI, API, logs, data)
|
|
34
|
+
- How often? (always, intermittent, specific conditions)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**STOP.** Wait for user response.
|
|
38
|
+
|
|
39
|
+
## Question 3: Reproduction
|
|
40
|
+
|
|
41
|
+
> *Output the next fenced block as a code block:*
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Can you reproduce it?
|
|
45
|
+
|
|
46
|
+
- Steps to trigger the bug
|
|
47
|
+
- Environment or conditions where it occurs
|
|
48
|
+
(Or "unknown" if not yet reproducible)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**STOP.** Wait for user response.
|
|
52
|
+
|
|
53
|
+
## Question 4: Hypotheses
|
|
54
|
+
|
|
55
|
+
> *Output the next fenced block as a code block:*
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Any initial hypotheses about the cause?
|
|
59
|
+
|
|
60
|
+
- Suspected area of code or component
|
|
61
|
+
- Recent changes that might be related
|
|
62
|
+
(Or "none" if no suspicion yet)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**STOP.** Wait for user response.
|
|
66
|
+
|
|
67
|
+
## Compile Context
|
|
68
|
+
|
|
69
|
+
After gathering answers, compile the bug context into a structured summary that will be passed to the investigation skill. Do not output the summary — it will be used in the next step.
|
|
70
|
+
|
|
71
|
+
The compiled context should capture:
|
|
72
|
+
- **Problem**: Expected vs actual behavior
|
|
73
|
+
- **Manifestation**: How and where the bug surfaces
|
|
74
|
+
- **Reproduction**: Steps to trigger, if known
|
|
75
|
+
- **Initial hypothesis**: User's suspicion about cause
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Invoke Investigation
|
|
2
|
+
|
|
3
|
+
*Reference for **[start-bugfix](../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Save a session bookmark for compaction recovery, then invoke the processing skill.
|
|
8
|
+
|
|
9
|
+
> *Output the next fenced block as a code block:*
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Saving session state for compaction recovery.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
.claude/hooks/workflows/write-session-state.sh \
|
|
17
|
+
"{topic}" \
|
|
18
|
+
"skills/technical-investigation/SKILL.md" \
|
|
19
|
+
".workflows/investigation/{topic}/investigation.md"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Handoff
|
|
23
|
+
|
|
24
|
+
Invoke the [technical-investigation](../../technical-investigation/SKILL.md) skill:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Investigation session for: {topic}
|
|
28
|
+
Work type: bugfix
|
|
29
|
+
Initial bug context:
|
|
30
|
+
- Problem: {problem description from gather-bug-context}
|
|
31
|
+
- Manifestation: {how it surfaces}
|
|
32
|
+
- Reproduction: {steps if provided, otherwise "unknown"}
|
|
33
|
+
- Initial hypothesis: {user's suspicion if any}
|
|
34
|
+
|
|
35
|
+
Create investigation file: .workflows/investigation/{topic}/investigation.md
|
|
36
|
+
|
|
37
|
+
The investigation frontmatter should include:
|
|
38
|
+
- topic: {topic}
|
|
39
|
+
- status: in-progress
|
|
40
|
+
- work_type: bugfix
|
|
41
|
+
- date: {today}
|
|
42
|
+
|
|
43
|
+
Invoke the technical-investigation skill.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
When the investigation concludes, the processing skill will detect `work_type: bugfix` in the artifact and invoke workflow-bridge automatically.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Topic Name and Conflict Check
|
|
2
|
+
|
|
3
|
+
*Reference for **[start-bugfix](../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Based on the bug description, suggest a topic name:
|
|
8
|
+
|
|
9
|
+
> *Output the next fenced block as a code block:*
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Suggested topic name: {suggested-topic:(kebabcase)}
|
|
13
|
+
|
|
14
|
+
This will create: .workflows/investigation/{suggested-topic}/investigation.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> *Output the next fenced block as markdown (not a code block):*
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
· · · · · · · · · · · ·
|
|
21
|
+
Is this name okay?
|
|
22
|
+
|
|
23
|
+
- **`y`/`yes`** — Use this name
|
|
24
|
+
- **`s`/`something else`** — Suggest a different name
|
|
25
|
+
· · · · · · · · · · · ·
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**STOP.** Wait for user response.
|
|
29
|
+
|
|
30
|
+
Once the topic name is confirmed, check for naming conflicts:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ls .workflows/investigation/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### If an investigation with the same name exists
|
|
37
|
+
|
|
38
|
+
> *Output the next fenced block as markdown (not a code block):*
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
· · · · · · · · · · · ·
|
|
42
|
+
An investigation named "{topic}" already exists.
|
|
43
|
+
|
|
44
|
+
- **`r`/`resume`** — Resume the existing investigation
|
|
45
|
+
- **`n`/`new`** — Choose a different name
|
|
46
|
+
· · · · · · · · · · · ·
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**STOP.** Wait for user response.
|
|
50
|
+
|
|
51
|
+
#### If resuming
|
|
52
|
+
|
|
53
|
+
Check the investigation status. If in-progress:
|
|
54
|
+
|
|
55
|
+
→ Return to **[the skill](../SKILL.md)** for **Step 3**.
|
|
56
|
+
|
|
57
|
+
#### If no conflict
|
|
58
|
+
|
|
59
|
+
→ Return to **[the skill](../SKILL.md)**.
|