@leeovery/claude-technical-workflows 2.1.27 → 2.1.28

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 (75) hide show
  1. package/README.md +90 -92
  2. package/agents/implementation-analysis-task-writer.md +1 -1
  3. package/agents/planning-review-integrity.md +71 -0
  4. package/agents/planning-review-traceability.md +74 -0
  5. package/package.json +1 -1
  6. package/skills/link-dependencies/SKILL.md +3 -3
  7. package/skills/migrate/scripts/migrations/002-specification-frontmatter.sh +5 -0
  8. package/skills/migrate/scripts/migrations/003-planning-frontmatter.sh +5 -0
  9. package/skills/migrate/scripts/migrations/004-sources-object-format.sh +5 -0
  10. package/skills/migrate/scripts/migrations/005-plan-external-deps-frontmatter.sh +5 -0
  11. package/skills/migrate/scripts/migrations/006-directory-restructure.sh +167 -0
  12. package/skills/migrate/scripts/migrations/007-tasks-subdirectory.sh +86 -0
  13. package/skills/start-discussion/references/handle-selection.md +8 -0
  14. package/skills/start-feature/SKILL.md +2 -2
  15. package/skills/start-implementation/SKILL.md +1 -3
  16. package/skills/start-implementation/scripts/discovery.sh +7 -7
  17. package/skills/start-planning/references/invoke-skill.md +3 -3
  18. package/skills/start-planning/scripts/discovery.sh +8 -8
  19. package/skills/start-review/references/invoke-skill.md +3 -3
  20. package/skills/start-review/scripts/discovery.sh +3 -3
  21. package/skills/start-specification/references/confirm-continue.md +3 -3
  22. package/skills/start-specification/references/confirm-create.md +3 -3
  23. package/skills/start-specification/references/confirm-refine.md +1 -1
  24. package/skills/start-specification/references/confirm-unify.md +4 -4
  25. package/skills/start-specification/references/handoffs/continue-concluded.md +3 -1
  26. package/skills/start-specification/references/handoffs/continue.md +3 -1
  27. package/skills/start-specification/references/handoffs/create-with-incorporation.md +2 -2
  28. package/skills/start-specification/references/handoffs/create.md +1 -1
  29. package/skills/start-specification/references/handoffs/unify-with-incorporation.md +3 -3
  30. package/skills/start-specification/references/handoffs/unify.md +1 -1
  31. package/skills/start-specification/scripts/discovery.sh +6 -6
  32. package/skills/status/scripts/discovery.sh +7 -7
  33. package/skills/technical-discussion/SKILL.md +46 -8
  34. package/skills/technical-implementation/SKILL.md +66 -20
  35. package/skills/technical-implementation/references/{steps/analysis-loop.md → analysis-loop.md} +1 -1
  36. package/skills/technical-implementation/references/{steps/invoke-analysis.md → invoke-analysis.md} +5 -5
  37. package/skills/technical-implementation/references/{steps/invoke-executor.md → invoke-executor.md} +5 -5
  38. package/skills/technical-implementation/references/{steps/invoke-reviewer.md → invoke-reviewer.md} +2 -2
  39. package/skills/technical-implementation/references/{steps/invoke-synthesizer.md → invoke-synthesizer.md} +3 -3
  40. package/skills/technical-implementation/references/{steps/invoke-task-writer.md → invoke-task-writer.md} +4 -4
  41. package/skills/technical-implementation/references/{steps/task-loop.md → task-loop.md} +45 -38
  42. package/skills/technical-planning/SKILL.md +64 -22
  43. package/skills/technical-planning/references/{steps/analyze-task-graph.md → analyze-task-graph.md} +33 -16
  44. package/skills/technical-planning/references/author-tasks.md +100 -0
  45. package/skills/technical-planning/references/{steps/define-phases.md → define-phases.md} +15 -9
  46. package/skills/technical-planning/references/{steps/define-tasks.md → define-tasks.md} +10 -6
  47. package/skills/technical-planning/references/invoke-review-integrity.md +36 -0
  48. package/skills/technical-planning/references/invoke-review-traceability.md +37 -0
  49. package/skills/technical-planning/references/output-formats/local-markdown/about.md +6 -4
  50. package/skills/technical-planning/references/output-formats/local-markdown/authoring.md +3 -3
  51. package/skills/technical-planning/references/output-formats/local-markdown/reading.md +3 -3
  52. package/skills/technical-planning/references/output-formats/local-markdown/updating.md +1 -1
  53. package/skills/technical-planning/references/output-formats/tick/about.md +68 -0
  54. package/skills/technical-planning/references/output-formats/tick/authoring.md +106 -0
  55. package/skills/technical-planning/references/output-formats/tick/graph.md +62 -0
  56. package/skills/technical-planning/references/output-formats/tick/reading.md +61 -0
  57. package/skills/technical-planning/references/output-formats/tick/updating.md +25 -0
  58. package/skills/technical-planning/references/output-formats.md +11 -0
  59. package/skills/technical-planning/references/{steps/plan-construction.md → plan-construction.md} +33 -9
  60. package/skills/technical-planning/references/plan-review.md +122 -0
  61. package/skills/technical-planning/references/process-review-findings.md +171 -0
  62. package/skills/technical-planning/references/{steps/resolve-dependencies.md → resolve-dependencies.md} +18 -12
  63. package/skills/technical-planning/references/review-integrity.md +127 -0
  64. package/skills/technical-planning/references/review-traceability.md +105 -0
  65. package/skills/technical-planning/references/task-design.md +1 -1
  66. package/skills/technical-planning/references/{steps/verify-source-material.md → verify-source-material.md} +3 -3
  67. package/skills/technical-research/SKILL.md +20 -4
  68. package/skills/technical-review/SKILL.md +21 -4
  69. package/skills/technical-specification/SKILL.md +34 -8
  70. package/skills/technical-specification/references/specification-guide.md +228 -56
  71. package/skills/view-plan/SKILL.md +1 -1
  72. package/skills/technical-planning/references/steps/author-tasks.md +0 -72
  73. package/skills/technical-planning/references/steps/plan-review.md +0 -94
  74. package/skills/technical-planning/references/steps/review-integrity.md +0 -222
  75. package/skills/technical-planning/references/steps/review-traceability.md +0 -200
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # 006-directory-restructure.sh
4
+ #
5
+ # Restructures specification and planning files from flat files to topic directories:
6
+ # - specification/{topic}.md → specification/{topic}/specification.md
7
+ # - planning/{topic}.md → planning/{topic}/plan.md
8
+ #
9
+ # Also moves tracking files into topic directories and strips topic prefix:
10
+ # - {topic}-review-*.md → {topic}/review-*.md
11
+ #
12
+ # Updates plan frontmatter `specification` field to use new directory paths.
13
+ #
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
+ # - report_update "filepath" "description"
18
+ # - report_skip "filepath"
19
+ #
20
+
21
+ MIGRATION_ID="006"
22
+ SPEC_DIR="docs/workflow/specification"
23
+ PLAN_DIR="docs/workflow/planning"
24
+
25
+ #
26
+ # Phase 1: Specification migration
27
+ #
28
+ if [ -d "$SPEC_DIR" ]; then
29
+ for file in "$SPEC_DIR"/*.md; do
30
+ [ -f "$file" ] || continue
31
+
32
+ name=$(basename "$file" .md)
33
+
34
+ # Skip if already a directory (already migrated)
35
+ if [ -d "$SPEC_DIR/$name" ] && [ -f "$SPEC_DIR/$name/specification.md" ]; then
36
+ new_path="$SPEC_DIR/$name/specification.md"
37
+ if ! is_migrated "$new_path" "$MIGRATION_ID"; then
38
+ record_migration "$new_path" "$MIGRATION_ID"
39
+ fi
40
+ report_skip "$new_path"
41
+ continue
42
+ fi
43
+
44
+ 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
+
50
+ # Create topic directory
51
+ mkdir -p "$SPEC_DIR/$name"
52
+
53
+ # Move the spec file
54
+ mv "$file" "$SPEC_DIR/$name/specification.md"
55
+
56
+ # Move any tracking files, stripping topic prefix
57
+ for tracking_file in "$SPEC_DIR/${name}-review-"*.md; do
58
+ [ -f "$tracking_file" ] || continue
59
+ tracking_basename=$(basename "$tracking_file")
60
+ # Strip the topic prefix: {name}-review-foo.md → review-foo.md
61
+ new_tracking_name="${tracking_basename#"${name}-"}"
62
+ mv "$tracking_file" "$SPEC_DIR/$name/$new_tracking_name"
63
+ report_update "$SPEC_DIR/$name/$new_tracking_name" "moved tracking file into topic directory"
64
+ done
65
+
66
+ record_migration "$new_path" "$MIGRATION_ID"
67
+ report_update "$new_path" "restructured to topic directory"
68
+ done
69
+ fi
70
+
71
+ #
72
+ # Phase 2: Planning migration
73
+ #
74
+ if [ -d "$PLAN_DIR" ]; then
75
+ for file in "$PLAN_DIR"/*.md; do
76
+ [ -f "$file" ] || continue
77
+
78
+ name=$(basename "$file" .md)
79
+
80
+ # Skip if already a directory with plan.md
81
+ if [ -d "$PLAN_DIR/$name" ] && [ -f "$PLAN_DIR/$name/plan.md" ]; then
82
+ new_path="$PLAN_DIR/$name/plan.md"
83
+ if ! is_migrated "$new_path" "$MIGRATION_ID"; then
84
+ record_migration "$new_path" "$MIGRATION_ID"
85
+ fi
86
+ report_skip "$new_path"
87
+ continue
88
+ fi
89
+
90
+ 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
+
96
+ # Create topic directory (may already exist for local-markdown tasks)
97
+ mkdir -p "$PLAN_DIR/$name"
98
+
99
+ # Move the plan file
100
+ mv "$file" "$PLAN_DIR/$name/plan.md"
101
+
102
+ # Move any tracking files, stripping topic prefix
103
+ for tracking_file in "$PLAN_DIR/${name}-review-"*.md; do
104
+ [ -f "$tracking_file" ] || continue
105
+ tracking_basename=$(basename "$tracking_file")
106
+ new_tracking_name="${tracking_basename#"${name}-"}"
107
+ mv "$tracking_file" "$PLAN_DIR/$name/$new_tracking_name"
108
+ report_update "$PLAN_DIR/$name/$new_tracking_name" "moved tracking file into topic directory"
109
+ done
110
+
111
+ record_migration "$new_path" "$MIGRATION_ID"
112
+ report_update "$new_path" "restructured to topic directory"
113
+ done
114
+ fi
115
+
116
+ #
117
+ # Phase 3: Update plan frontmatter specification field
118
+ #
119
+ # For each plan file (now at planning/{name}/plan.md), update
120
+ # specification: {topic}.md → specification: {topic}/specification.md
121
+ #
122
+ if [ -d "$PLAN_DIR" ]; then
123
+ for file in "$PLAN_DIR"/*/plan.md; do
124
+ [ -f "$file" ] || continue
125
+
126
+ # Extract current specification field using awk (safe frontmatter extraction)
127
+ spec_value=$(awk 'BEGIN{c=0} /^---$/{c++; if(c==2) exit; next} c==1{print}' "$file" 2>/dev/null | \
128
+ grep "^specification:" | sed 's/^specification:[[:space:]]*//' | xargs)
129
+
130
+ # Skip if empty or already updated (contains /specification.md)
131
+ [ -z "$spec_value" ] && continue
132
+ case "$spec_value" in
133
+ */specification.md) continue ;;
134
+ esac
135
+
136
+ # Only update if it matches the old {topic}.md pattern
137
+ # Extract the topic name by stripping .md
138
+ case "$spec_value" in
139
+ *.md)
140
+ topic_name="${spec_value%.md}"
141
+ # Handle both relative paths: {topic}.md and ../specification/{topic}.md
142
+ case "$spec_value" in
143
+ ../specification/*.md)
144
+ new_spec_value="../specification/${topic_name#../specification/}/specification.md"
145
+ ;;
146
+ *)
147
+ new_spec_value="${topic_name}/specification.md"
148
+ ;;
149
+ esac
150
+
151
+ # Use awk to replace the specification field in frontmatter only
152
+ awk -v old="specification: $spec_value" -v new="specification: $new_spec_value" '
153
+ BEGIN { c=0; done=0 }
154
+ /^---$/ { c++; print; next }
155
+ c==1 && !done && index($0, "specification:") == 1 {
156
+ print new
157
+ done=1
158
+ next
159
+ }
160
+ { print }
161
+ ' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
162
+
163
+ report_update "$file" "updated specification field: $spec_value → $new_spec_value"
164
+ ;;
165
+ esac
166
+ done
167
+ fi
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # 007-tasks-subdirectory.sh
4
+ #
5
+ # Moves local-markdown task files into a tasks/ subdirectory within each plan topic.
6
+ #
7
+ # Previous layout:
8
+ # planning/{topic}/
9
+ # ├── plan.md
10
+ # ├── {topic}-1-1.md
11
+ # ├── {topic}-1-2.md
12
+ # └── review-traceability-tracking-c1.md
13
+ #
14
+ # New layout:
15
+ # planning/{topic}/
16
+ # ├── plan.md
17
+ # ├── tasks/
18
+ # │ ├── {topic}-1-1.md
19
+ # │ └── {topic}-1-2.md
20
+ # └── review-traceability-tracking-c1.md
21
+ #
22
+ # Only targets files matching {topic}-*.md — won't touch plan.md or review-*-tracking-*.md.
23
+ # Skips topics with no matching task files (may not be local-markdown format).
24
+ # Idempotent: skips if tasks/ already exists and contains .md files.
25
+ #
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
+ # - report_update "filepath" "description"
30
+ # - report_skip "filepath"
31
+ #
32
+
33
+ MIGRATION_ID="007"
34
+ PLAN_DIR="docs/workflow/planning"
35
+
36
+ # Skip if no planning directory
37
+ if [ ! -d "$PLAN_DIR" ]; then
38
+ return 0
39
+ fi
40
+
41
+ for topic_dir in "$PLAN_DIR"/*/; do
42
+ [ -d "$topic_dir" ] || continue
43
+
44
+ topic=$(basename "$topic_dir")
45
+ marker="${topic_dir}plan.md"
46
+
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
+ # Skip if no plan.md exists (not a valid topic directory)
54
+ if [ ! -f "$marker" ]; then
55
+ continue
56
+ fi
57
+
58
+ # Check if task files exist in the topic directory
59
+ task_files=("$topic_dir${topic}-"*.md)
60
+ if [ ! -f "${task_files[0]}" ]; then
61
+ # No task files — format may not be local-markdown, or tasks already moved
62
+ # Check if tasks/ already has files (idempotent check)
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
70
+ continue
71
+ fi
72
+
73
+ # Create tasks/ subdirectory
74
+ mkdir -p "${topic_dir}tasks"
75
+
76
+ # Move task files
77
+ moved=0
78
+ for task_file in "${task_files[@]}"; do
79
+ [ -f "$task_file" ] || continue
80
+ mv "$task_file" "${topic_dir}tasks/"
81
+ moved=$((moved + 1))
82
+ done
83
+
84
+ record_migration "$marker" "$MIGRATION_ID"
85
+ report_update "$marker" "moved $moved task file(s) to tasks/ subdirectory"
86
+ done
@@ -15,6 +15,9 @@ User chose to start from research (e.g., "research 1", "1", "from research", or
15
15
  - Control returns to the backbone
16
16
 
17
17
  **If user just said "from research" without specifying:**
18
+
19
+ > *Output the next fenced block as a code block:*
20
+
18
21
  ```
19
22
  Which research topic would you like to discuss? (Enter a number or topic name)
20
23
  ```
@@ -30,6 +33,9 @@ User chose to continue a discussion (e.g., "continue auth-flow" or "continue dis
30
33
  - Control returns to the backbone
31
34
 
32
35
  **If user just said "continue discussion" without specifying:**
36
+
37
+ > *Output the next fenced block as a code block:*
38
+
33
39
  ```
34
40
  Which discussion would you like to continue?
35
41
  ```
@@ -42,6 +48,8 @@ User wants to start a fresh discussion. Control returns to the backbone.
42
48
 
43
49
  #### If user chose "refresh"
44
50
 
51
+ > *Output the next fenced block as a code block:*
52
+
45
53
  ```
46
54
  Refreshing analysis...
47
55
  ```
@@ -37,7 +37,7 @@ Based on the feature description, suggest a topic name for the specification fil
37
37
  ```
38
38
  Based on what you've described, I'd suggest the topic name: {suggested-topic}
39
39
 
40
- This will create: docs/workflow/specification/{suggested-topic}.md
40
+ This will create: docs/workflow/specification/{suggested-topic}/specification.md
41
41
 
42
42
  Is this name okay, or would you prefer something else?
43
43
  ```
@@ -77,6 +77,6 @@ Work from the inline context provided above.
77
77
  ## Notes
78
78
 
79
79
  - The specification skill contains instructions for synthesizing the inline context, presenting it for validation, and building the specification
80
- - Output is a standard specification file at `docs/workflow/specification/{topic}.md`
80
+ - Output is a standard specification file at `docs/workflow/specification/{topic}/specification.md`
81
81
  - From there, the user can proceed to `/start-planning` as normal
82
82
  - This path skips formal discussion documentation - use the full workflow for complex features that need debate captured
@@ -369,8 +369,6 @@ Environment setup file found: docs/workflow/environment-setup.md
369
369
 
370
370
  **If `setup_file_exists: false` or `requires_setup: unknown`:**
371
371
 
372
- Ask:
373
-
374
372
  > *Output the next fenced block as a code block:*
375
373
 
376
374
  ```
@@ -396,7 +394,7 @@ Invoke the [technical-implementation](../technical-implementation/SKILL.md) skil
396
394
  **Example handoff:**
397
395
  ```
398
396
  Implementation session for: {topic}
399
- Plan: docs/workflow/planning/{topic}.md
397
+ Plan: docs/workflow/planning/{topic}/plan.md
400
398
  Format: {format}
401
399
  Plan ID: {plan_id} (if applicable)
402
400
  Specification: {specification} (exists: {true|false})
@@ -162,10 +162,10 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
162
162
  echo " exists: true"
163
163
  echo " files:"
164
164
 
165
- for file in "$PLAN_DIR"/*.md; do
165
+ for file in "$PLAN_DIR"/*/plan.md; do
166
166
  [ -f "$file" ] || continue
167
167
 
168
- name=$(basename "$file" .md)
168
+ name=$(basename "$(dirname "$file")")
169
169
  topic=$(extract_field "$file" "topic")
170
170
  topic=${topic:-"$name"}
171
171
  status=$(extract_field "$file" "status")
@@ -175,7 +175,7 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
175
175
  format=$(extract_field "$file" "format")
176
176
  format=${format:-"MISSING"}
177
177
  specification=$(extract_field "$file" "specification")
178
- specification=${specification:-"${name}.md"}
178
+ specification=${specification:-"${name}/specification.md"}
179
179
  plan_id=$(extract_field "$file" "plan_id")
180
180
 
181
181
  # Track plan data
@@ -326,10 +326,10 @@ echo "dependency_resolution:"
326
326
  if [ "$plan_count" -gt 0 ] && [ -d "$PLAN_DIR" ]; then
327
327
  has_resolution_data=false
328
328
 
329
- for file in "$PLAN_DIR"/*.md; do
329
+ for file in "$PLAN_DIR"/*/plan.md; do
330
330
  [ -f "$file" ] || continue
331
331
 
332
- name=$(basename "$file" .md)
332
+ name=$(basename "$(dirname "$file")")
333
333
  deps_output=$(extract_external_deps "$file")
334
334
  [ -z "$deps_output" ] && continue
335
335
 
@@ -424,9 +424,9 @@ echo " plans_with_unresolved_deps: $plans_with_unresolved_deps"
424
424
  # Plans ready = concluded + all deps satisfied (no unresolved, all resolved tasks completed)
425
425
  plans_ready_count=0
426
426
  if [ "$plan_count" -gt 0 ] && [ -d "$PLAN_DIR" ]; then
427
- for file in "$PLAN_DIR"/*.md; do
427
+ for file in "$PLAN_DIR"/*/plan.md; do
428
428
  [ -f "$file" ] || continue
429
- name=$(basename "$file" .md)
429
+ name=$(basename "$(dirname "$file")")
430
430
  status=$(extract_field "$file" "status")
431
431
 
432
432
  if [ "$status" = "concluded" ]; then
@@ -11,7 +11,7 @@ Invoke the [technical-planning](../../technical-planning/SKILL.md) skill for you
11
11
  **Example handoff (fresh plan):**
12
12
  ```
13
13
  Planning session for: {topic}
14
- Specification: docs/workflow/specification/{topic}.md
14
+ Specification: docs/workflow/specification/{topic}/specification.md
15
15
  Additional context: {summary of user's answers from Step 5}
16
16
  Cross-cutting references: {list of applicable cross-cutting specs with brief summaries, or "none"}
17
17
  Recommended output format: {common_format from discovery if non-empty, otherwise "none"}
@@ -22,8 +22,8 @@ Invoke the technical-planning skill.
22
22
  **Example handoff (continue/review existing plan):**
23
23
  ```
24
24
  Planning session for: {topic}
25
- Specification: docs/workflow/specification/{topic}.md
26
- Existing plan: docs/workflow/planning/{topic}.md
25
+ Specification: docs/workflow/specification/{topic}/specification.md
26
+ Existing plan: docs/workflow/planning/{topic}/plan.md
27
27
 
28
28
  Invoke the technical-planning skill.
29
29
  ```
@@ -48,10 +48,10 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
48
48
  echo " feature:"
49
49
 
50
50
  # First pass: feature specifications
51
- for file in "$SPEC_DIR"/*.md; do
51
+ for file in "$SPEC_DIR"/*/specification.md; do
52
52
  [ -f "$file" ] || continue
53
53
 
54
- name=$(basename "$file" .md)
54
+ name=$(basename "$(dirname "$file")")
55
55
  status=$(extract_field "$file" "status")
56
56
  status=${status:-"active"}
57
57
  spec_type=$(extract_field "$file" "type")
@@ -63,9 +63,9 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
63
63
  # Check if plan exists and its status
64
64
  has_plan="false"
65
65
  plan_status=""
66
- if [ -f "$PLAN_DIR/${name}.md" ]; then
66
+ if [ -f "$PLAN_DIR/${name}/plan.md" ]; then
67
67
  has_plan="true"
68
- plan_status=$(extract_field "$PLAN_DIR/${name}.md" "status")
68
+ plan_status=$(extract_field "$PLAN_DIR/${name}/plan.md" "status")
69
69
  plan_status=${plan_status:-"unknown"}
70
70
  fi
71
71
 
@@ -93,10 +93,10 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
93
93
  echo " crosscutting:"
94
94
 
95
95
  # Second pass: cross-cutting specifications
96
- for file in "$SPEC_DIR"/*.md; do
96
+ for file in "$SPEC_DIR"/*/specification.md; do
97
97
  [ -f "$file" ] || continue
98
98
 
99
- name=$(basename "$file" .md)
99
+ name=$(basename "$(dirname "$file")")
100
100
  spec_type=$(extract_field "$file" "type")
101
101
  spec_type=${spec_type:-"feature"}
102
102
 
@@ -146,10 +146,10 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
146
146
  echo " exists: true"
147
147
  echo " files:"
148
148
 
149
- for file in "$PLAN_DIR"/*.md; do
149
+ for file in "$PLAN_DIR"/*/plan.md; do
150
150
  [ -f "$file" ] || continue
151
151
 
152
- name=$(basename "$file" .md)
152
+ name=$(basename "$(dirname "$file")")
153
153
  format=$(extract_field "$file" "format")
154
154
  format=${format:-"MISSING"}
155
155
 
@@ -12,7 +12,7 @@ Invoke the [technical-review](../../technical-review/SKILL.md) skill for your ne
12
12
  ```
13
13
  Review session for: {topic}
14
14
  Review scope: single
15
- Plan: docs/workflow/planning/{topic}.md
15
+ Plan: docs/workflow/planning/{topic}/plan.md
16
16
  Format: {format}
17
17
  Plan ID: {plan_id} (if applicable)
18
18
  Specification: {specification} (exists: {true|false})
@@ -25,8 +25,8 @@ Invoke the technical-review skill.
25
25
  Review session for: {scope description}
26
26
  Review scope: {multi | all}
27
27
  Plans:
28
- - docs/workflow/planning/{topic-1}.md (format: {format}, spec: {spec})
29
- - docs/workflow/planning/{topic-2}.md (format: {format}, spec: {spec})
28
+ - docs/workflow/planning/{topic-1}/plan.md (format: {format}, spec: {spec})
29
+ - docs/workflow/planning/{topic-2}/plan.md (format: {format}, spec: {spec})
30
30
 
31
31
  Invoke the technical-review skill.
32
32
  ```
@@ -52,10 +52,10 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
52
52
  echo " exists: true"
53
53
  echo " files:"
54
54
 
55
- for file in "$PLAN_DIR"/*.md; do
55
+ for file in "$PLAN_DIR"/*/plan.md; do
56
56
  [ -f "$file" ] || continue
57
57
 
58
- name=$(basename "$file" .md)
58
+ name=$(basename "$(dirname "$file")")
59
59
  topic=$(extract_field "$file" "topic")
60
60
  topic=${topic:-"$name"}
61
61
  status=$(extract_field "$file" "status")
@@ -65,7 +65,7 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
65
65
  format=$(extract_field "$file" "format")
66
66
  format=${format:-"MISSING"}
67
67
  specification=$(extract_field "$file" "specification")
68
- specification=${specification:-"${name}.md"}
68
+ specification=${specification:-"${name}/specification.md"}
69
69
  plan_id=$(extract_field "$file" "plan_id")
70
70
 
71
71
  # Check if linked specification exists
@@ -11,7 +11,7 @@
11
11
  ```
12
12
  Continuing specification: {Title Case Name}
13
13
 
14
- Existing: docs/workflow/specification/{kebab-case-name}.md (in-progress)
14
+ Existing: docs/workflow/specification/{kebab-case-name}/specification.md (in-progress)
15
15
 
16
16
  Sources to extract:
17
17
  • {discussion-name} (pending)
@@ -37,7 +37,7 @@ Proceed?
37
37
  ```
38
38
  Continuing specification: {Title Case Name}
39
39
 
40
- Existing: docs/workflow/specification/{kebab-case-name}.md (in-progress)
40
+ Existing: docs/workflow/specification/{kebab-case-name}/specification.md (in-progress)
41
41
 
42
42
  All sources extracted:
43
43
  • {discussion-name}
@@ -61,7 +61,7 @@ Proceed?
61
61
  ```
62
62
  Continuing specification: {Title Case Name}
63
63
 
64
- Existing: docs/workflow/specification/{kebab-case-name}.md (concluded)
64
+ Existing: docs/workflow/specification/{kebab-case-name}/specification.md (concluded)
65
65
 
66
66
  New sources to extract:
67
67
  • {discussion-name} (pending)
@@ -15,7 +15,7 @@ Sources:
15
15
  • {discussion-name}
16
16
  • {discussion-name}
17
17
 
18
- Output: docs/workflow/specification/{kebab-case-name}.md
18
+ Output: docs/workflow/specification/{kebab-case-name}/specification.md
19
19
  ```
20
20
 
21
21
  > *Output the next fenced block as markdown (not a code block):*
@@ -41,10 +41,10 @@ Sources:
41
41
  • {discussion-name} (has individual spec — will be incorporated)
42
42
  • {discussion-name}
43
43
 
44
- Output: docs/workflow/specification/{kebab-case-name}.md
44
+ Output: docs/workflow/specification/{kebab-case-name}/specification.md
45
45
 
46
46
  After completion:
47
- specification/{discussion-name}.md → marked as superseded
47
+ specification/{discussion-name}/specification.md → marked as superseded
48
48
  ```
49
49
 
50
50
  > *Output the next fenced block as markdown (not a code block):*
@@ -9,7 +9,7 @@
9
9
  ```
10
10
  Refining specification: {Title Case Name}
11
11
 
12
- Existing: docs/workflow/specification/{kebab-case-name}.md (concluded)
12
+ Existing: docs/workflow/specification/{kebab-case-name}/specification.md (concluded)
13
13
 
14
14
  All sources extracted:
15
15
  • {discussion-name}
@@ -17,10 +17,10 @@ Sources:
17
17
  ...
18
18
 
19
19
  Existing specifications to incorporate:
20
- • {spec-name}.md → will be superseded
21
- • {spec-name}.md → will be superseded
20
+ • {spec-name}/specification.md → will be superseded
21
+ • {spec-name}/specification.md → will be superseded
22
22
 
23
- Output: docs/workflow/specification/unified.md
23
+ Output: docs/workflow/specification/unified/specification.md
24
24
  ```
25
25
 
26
26
  > *Output the next fenced block as markdown (not a code block):*
@@ -45,7 +45,7 @@ Sources:
45
45
  • {discussion-name}
46
46
  ...
47
47
 
48
- Output: docs/workflow/specification/unified.md
48
+ Output: docs/workflow/specification/unified/specification.md
49
49
  ```
50
50
 
51
51
  > *Output the next fenced block as markdown (not a code block):*
@@ -4,12 +4,14 @@
4
4
 
5
5
  ---
6
6
 
7
+ Before invoking the skill, reset `finding_gate_mode` to `gated` in the specification frontmatter if present. Commit if changed: `spec({topic}): reset gate mode`
8
+
7
9
  This skill's purpose is now fulfilled. Invoke the [technical-specification](../../../technical-specification/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.
8
10
 
9
11
  ```
10
12
  Specification session for: {Title Case Name}
11
13
 
12
- Continuing existing: docs/workflow/specification/{kebab-case-name}.md (concluded)
14
+ Continuing existing: docs/workflow/specification/{kebab-case-name}/specification.md (concluded)
13
15
 
14
16
  New sources to extract:
15
17
  - docs/workflow/discussion/{new-discussion-name}.md
@@ -4,12 +4,14 @@
4
4
 
5
5
  ---
6
6
 
7
+ Before invoking the skill, reset `finding_gate_mode` to `gated` in the specification frontmatter if present. Commit if changed: `spec({topic}): reset gate mode`
8
+
7
9
  This skill's purpose is now fulfilled. Invoke the [technical-specification](../../../technical-specification/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.
8
10
 
9
11
  ```
10
12
  Specification session for: {Title Case Name}
11
13
 
12
- Continuing existing: docs/workflow/specification/{kebab-case-name}.md
14
+ Continuing existing: docs/workflow/specification/{kebab-case-name}/specification.md
13
15
 
14
16
  Sources for reference:
15
17
  - docs/workflow/discussion/{discussion-name}.md
@@ -14,9 +14,9 @@ Source discussions:
14
14
  - docs/workflow/discussion/{discussion-name}.md
15
15
 
16
16
  Existing specifications to incorporate:
17
- - docs/workflow/specification/{spec-name}.md (covers: {discussion-name} discussion)
17
+ - docs/workflow/specification/{spec-name}/specification.md (covers: {discussion-name} discussion)
18
18
 
19
- Output: docs/workflow/specification/{kebab-case-name}.md
19
+ Output: docs/workflow/specification/{kebab-case-name}/specification.md
20
20
 
21
21
  Context: This consolidates multiple sources. The existing {spec-name}.md specification should be incorporated - extract and adapt its content alongside the discussion material. The result should be a unified specification, not a simple merge.
22
22
 
@@ -13,7 +13,7 @@ Sources:
13
13
  - docs/workflow/discussion/{discussion-name}.md
14
14
  - docs/workflow/discussion/{discussion-name}.md
15
15
 
16
- Output: docs/workflow/specification/{kebab-case-name}.md
16
+ Output: docs/workflow/specification/{kebab-case-name}/specification.md
17
17
 
18
18
  ---
19
19
  Invoke the technical-specification skill.
@@ -15,10 +15,10 @@ Source discussions:
15
15
  ...
16
16
 
17
17
  Existing specifications to incorporate:
18
- - docs/workflow/specification/{spec-name}.md
19
- - docs/workflow/specification/{spec-name}.md
18
+ - docs/workflow/specification/{spec-name}/specification.md
19
+ - docs/workflow/specification/{spec-name}/specification.md
20
20
 
21
- Output: docs/workflow/specification/unified.md
21
+ Output: docs/workflow/specification/unified/specification.md
22
22
 
23
23
  Context: This consolidates all discussions into a single unified specification. The existing specifications should be incorporated - extract and adapt their content alongside the discussion material.
24
24
 
@@ -14,7 +14,7 @@ Sources:
14
14
  - docs/workflow/discussion/{discussion-name}.md
15
15
  ...
16
16
 
17
- Output: docs/workflow/specification/unified.md
17
+ Output: docs/workflow/specification/unified/specification.md
18
18
 
19
19
  ---
20
20
  Invoke the technical-specification skill.