maestro-flow 0.3.42 → 0.3.44

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 (172) hide show
  1. package/.claude/commands/learn-decompose.md +10 -15
  2. package/.claude/commands/learn-follow.md +11 -16
  3. package/.claude/commands/learn-investigate.md +18 -22
  4. package/.claude/commands/learn-retro.md +23 -26
  5. package/.claude/commands/learn-second-opinion.md +11 -16
  6. package/.claude/commands/maestro-analyze.md +8 -0
  7. package/.claude/commands/maestro-brainstorm.md +8 -0
  8. package/.claude/commands/maestro-execute.md +11 -3
  9. package/.claude/commands/maestro-learn.md +4 -4
  10. package/.claude/commands/maestro-milestone-complete.md +6 -6
  11. package/.claude/commands/maestro-plan.md +8 -0
  12. package/.claude/commands/maestro-ralph-execute.md +52 -80
  13. package/.claude/commands/maestro-ralph.md +2 -2
  14. package/.claude/commands/maestro-tools-execute.md +117 -0
  15. package/.claude/commands/maestro-tools-register.md +137 -0
  16. package/.claude/commands/maestro-ui-codify.md +67 -0
  17. package/.claude/commands/manage-harvest.md +1 -1
  18. package/.claude/commands/manage-learn.md +5 -7
  19. package/.claude/commands/manage-wiki.md +1 -1
  20. package/.claude/commands/quality-auto-test.md +1 -1
  21. package/.claude/commands/quality-debug.md +8 -0
  22. package/.claude/commands/quality-retrospective.md +4 -5
  23. package/.claude/commands/quality-review.md +8 -0
  24. package/.claude/commands/spec-add.md +25 -4
  25. package/.claude/commands/spec-load.md +26 -6
  26. package/.claude/commands/spec-setup.md +2 -2
  27. package/.claude/commands/wiki-connect.md +1 -1
  28. package/.claude/commands/wiki-digest.md +5 -6
  29. package/.claude/skills/codify-to-knowhow/SKILL.md +167 -0
  30. package/.claude/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  31. package/.claude/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  32. package/.claude/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  33. package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  34. package/.codex/skills/codify-to-knowhow/SKILL.md +427 -0
  35. package/.codex/skills/learn-decompose/SKILL.md +8 -8
  36. package/.codex/skills/learn-follow/SKILL.md +6 -6
  37. package/.codex/skills/learn-investigate/SKILL.md +4 -4
  38. package/.codex/skills/learn-retro/SKILL.md +7 -7
  39. package/.codex/skills/learn-second-opinion/SKILL.md +6 -6
  40. package/.codex/skills/maestro-analyze/SKILL.md +491 -491
  41. package/.codex/skills/maestro-collab/SKILL.md +1 -1
  42. package/.codex/skills/maestro-learn/SKILL.md +1 -1
  43. package/.codex/skills/maestro-milestone-complete/SKILL.md +122 -122
  44. package/.codex/skills/maestro-plan/SKILL.md +485 -485
  45. package/.codex/skills/maestro-tools-execute/SKILL.md +105 -0
  46. package/.codex/skills/maestro-tools-register/SKILL.md +144 -0
  47. package/.codex/skills/maestro-ui-codify/SKILL.md +398 -0
  48. package/.codex/skills/maestro-verify/SKILL.md +486 -486
  49. package/.codex/skills/manage-harvest/SKILL.md +3 -3
  50. package/.codex/skills/manage-issue-discover/SKILL.md +431 -431
  51. package/.codex/skills/manage-learn/SKILL.md +13 -13
  52. package/.codex/skills/manage-wiki/SKILL.md +1 -1
  53. package/.codex/skills/quality-auto-test/SKILL.md +553 -553
  54. package/.codex/skills/quality-refactor/SKILL.md +151 -151
  55. package/.codex/skills/quality-retrospective/SKILL.md +6 -6
  56. package/.codex/skills/spec-add/SKILL.md +17 -4
  57. package/.codex/skills/spec-load/SKILL.md +24 -28
  58. package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
  59. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  60. package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
  61. package/.codex/skills/team-testing/roles/executor/role.md +1 -1
  62. package/.codex/skills/team-testing/roles/generator/role.md +1 -1
  63. package/.codex/skills/wiki-connect/SKILL.md +5 -5
  64. package/.codex/skills/wiki-digest/SKILL.md +8 -8
  65. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -2
  66. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  67. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
  68. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  69. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -1
  70. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  71. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +2 -2
  72. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  73. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.d.ts +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js +1 -1
  75. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +2 -2
  77. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +7 -3
  79. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +47 -15
  80. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  81. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
  82. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +1 -2
  84. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +3 -52
  85. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
  86. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +67 -21
  87. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  88. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -1
  89. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +1 -11
  90. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  91. package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +7 -4
  92. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +27 -12
  93. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  94. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +10 -2
  95. package/dashboard/dist-server/src/tools/spec-entry-parser.js +46 -12
  96. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  97. package/dashboard/dist-server/src/tools/spec-loader.d.ts +6 -2
  98. package/dashboard/dist-server/src/tools/spec-loader.js +119 -23
  99. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  100. package/dist/src/commands/knowhow.d.ts.map +1 -1
  101. package/dist/src/commands/knowhow.js +21 -2
  102. package/dist/src/commands/knowhow.js.map +1 -1
  103. package/dist/src/commands/spec.d.ts +1 -1
  104. package/dist/src/commands/spec.d.ts.map +1 -1
  105. package/dist/src/commands/spec.js +78 -4
  106. package/dist/src/commands/spec.js.map +1 -1
  107. package/dist/src/commands/wiki.d.ts.map +1 -1
  108. package/dist/src/commands/wiki.js +51 -3
  109. package/dist/src/commands/wiki.js.map +1 -1
  110. package/dist/src/hooks/keyword-spec-injector.js +1 -1
  111. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  112. package/dist/src/hooks/plugins/spec-injection-plugin.js +11 -11
  113. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  114. package/dist/src/hooks/spec-injector.d.ts +1 -0
  115. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  116. package/dist/src/hooks/spec-injector.js +55 -22
  117. package/dist/src/hooks/spec-injector.js.map +1 -1
  118. package/dist/src/hooks/wiki-role-loader.d.ts +18 -0
  119. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -0
  120. package/dist/src/hooks/wiki-role-loader.js +43 -0
  121. package/dist/src/hooks/wiki-role-loader.js.map +1 -0
  122. package/dist/src/tools/spec-entry-parser.d.ts +10 -2
  123. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  124. package/dist/src/tools/spec-entry-parser.js +46 -12
  125. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  126. package/dist/src/tools/spec-init.d.ts.map +1 -1
  127. package/dist/src/tools/spec-init.js +19 -0
  128. package/dist/src/tools/spec-init.js.map +1 -1
  129. package/dist/src/tools/spec-loader.d.ts +6 -2
  130. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  131. package/dist/src/tools/spec-loader.js +119 -23
  132. package/dist/src/tools/spec-loader.js.map +1 -1
  133. package/dist/src/tools/spec-writer.d.ts +6 -1
  134. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  135. package/dist/src/tools/spec-writer.js +29 -2
  136. package/dist/src/tools/spec-writer.js.map +1 -1
  137. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  138. package/dist/src/tools/store-knowhow.js +56 -27
  139. package/dist/src/tools/store-knowhow.js.map +1 -1
  140. package/package.json +1 -1
  141. package/workflows/analyze.md +2 -2
  142. package/workflows/auto-test.md +2 -2
  143. package/workflows/brainstorm.md +1 -1
  144. package/workflows/codebase-rebuild.md +1 -1
  145. package/workflows/codebase-refresh.md +1 -1
  146. package/workflows/debug.md +1 -1
  147. package/workflows/execute.md +3 -3
  148. package/workflows/harvest.md +13 -13
  149. package/workflows/integration-test.md +2 -2
  150. package/workflows/issue-discover.md +1 -1
  151. package/workflows/knowhow.md +72 -11
  152. package/workflows/learn.md +70 -58
  153. package/workflows/map.md +1 -1
  154. package/workflows/milestone-complete.md +2 -2
  155. package/workflows/plan.md +1 -1
  156. package/workflows/quick.md +1 -1
  157. package/workflows/refactor.md +1 -1
  158. package/workflows/retrospective.md +51 -57
  159. package/workflows/review.md +1 -1
  160. package/workflows/roadmap-common.md +1 -1
  161. package/workflows/specs-add.md +11 -2
  162. package/workflows/specs-load.md +17 -15
  163. package/workflows/test-gen.md +1 -1
  164. package/workflows/tools-spec.md +98 -0
  165. package/workflows/ui-codify-extract.md +373 -0
  166. package/workflows/ui-codify-knowhow.md +258 -0
  167. package/workflows/ui-codify-package.md +161 -0
  168. package/workflows/ui-codify.md +225 -0
  169. package/workflows/verify.md +1 -1
  170. package/workflows/wiki-connect.md +7 -7
  171. package/workflows/wiki-digest.md +13 -13
  172. package/workflows/wiki-manage.md +1 -1
@@ -0,0 +1,161 @@
1
+ # UI Codify: Phase 3 — Reference Package Generation
2
+
3
+ 将提取结果转换为可分享的参考包,包含交互式预览页面。
4
+
5
+ ## Prerequisites
6
+
7
+ 来自前序 Phase 的变量:
8
+ - `temp_dir` — 临时工作区,包含提取结果
9
+ - `package_dir` — 目标包目录
10
+ - `package_name` — 包名
11
+
12
+ ## Step 3.1: Copy Token Files
13
+
14
+ ```bash
15
+ echo "[Phase 3] Preparing component data from extraction"
16
+
17
+ # 1. Copy layout templates (required)
18
+ cp "${temp_dir}/layout-extraction/layout-templates.json" "${package_dir}/layout-templates.json"
19
+
20
+ if [ ! -f "${package_dir}/layout-templates.json" ]; then
21
+ echo "ERROR: Failed to copy layout templates"
22
+ exit 1
23
+ fi
24
+
25
+ component_count=$(jq -r '.layout_templates | length // 0' "${package_dir}/layout-templates.json" 2>/dev/null || echo 0)
26
+ echo " Layout templates copied (${component_count} components)"
27
+
28
+ # 2. Copy design tokens (required)
29
+ cp "${temp_dir}/style-extraction/style-1/design-tokens.json" "${package_dir}/design-tokens.json"
30
+
31
+ if [ ! -f "${package_dir}/design-tokens.json" ]; then
32
+ echo "ERROR: Failed to copy design tokens"
33
+ exit 1
34
+ fi
35
+ echo " Design tokens copied"
36
+
37
+ # 3. Copy animation tokens (optional)
38
+ if [ -f "${temp_dir}/animation-extraction/animation-tokens.json" ]; then
39
+ cp "${temp_dir}/animation-extraction/animation-tokens.json" "${package_dir}/animation-tokens.json"
40
+ echo " Animation tokens copied"
41
+ else
42
+ echo " W001: Animation tokens not found (optional, continuing)"
43
+ fi
44
+
45
+ echo "[Phase 3] Token files prepared"
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Step 3.2: Preview Generation (Agent)
51
+
52
+ **Agent Task**:
53
+
54
+ ```javascript
55
+ Agent(ui-design-agent): `
56
+ [PREVIEW_SHOWCASE_GENERATION]
57
+ Generate interactive multi-component showcase panel for reference package
58
+
59
+ PACKAGE_DIR: ${package_dir} | PACKAGE_NAME: ${package_name}
60
+
61
+ ## Input Files (MUST READ ALL)
62
+
63
+ 1. ${package_dir}/layout-templates.json (component layout patterns - REQUIRED)
64
+ 2. ${package_dir}/design-tokens.json (design tokens - REQUIRED)
65
+ 3. ${package_dir}/animation-tokens.json (optional, if exists)
66
+
67
+ ## Generation Agent
68
+
69
+ Create interactive showcase with these sections:
70
+
71
+ ### Section 1: Colors
72
+ - Display all color categories as color swatches
73
+ - Show hex/rgb values
74
+ - Group by: brand, semantic, surface, text, border
75
+
76
+ ### Section 2: Typography
77
+ - Display typography scale (font sizes, weights)
78
+ - Show typography combinations if available
79
+ - Include font family examples
80
+ - **Display usage recommendations** (from design-tokens.json _metadata.usage_recommendations.typography):
81
+ * Common sizes table (small_text, body_text, heading)
82
+ * Common combinations with use cases
83
+
84
+ ### Section 3: Components
85
+ - Render all components from layout-templates.json (use layout_templates field)
86
+ - **Universal Components**: Display reusable multi-component showcases (buttons, inputs, cards, etc.)
87
+ * **Display usage_guide** (from layout-templates.json):
88
+ - Common sizes table with dimensions and use cases
89
+ - Variant recommendations (when to use primary/secondary/etc)
90
+ - Usage context list (typical scenarios)
91
+ - Accessibility tips checklist
92
+ - **Specialized Components**: Display module-specific components from code (feature-specific layouts, custom widgets)
93
+ - Display all variants side-by-side
94
+ - Show DOM structure with proper styling
95
+ - Include usage code snippets in <details> tags
96
+ - Clearly label component types (universal vs specialized)
97
+
98
+ ### Section 4: Spacing & Layout
99
+ - Visual spacing scale
100
+ - Border radius examples
101
+ - Shadow depth examples
102
+ - **Display spacing recommendations** (from design-tokens.json _metadata.usage_recommendations.spacing):
103
+ * Size guide table (tight/normal/loose categories)
104
+ * Common patterns with use cases and pixel values
105
+
106
+ ### Section 5: Animations (if available)
107
+ - Animation duration examples
108
+ - Easing function demonstrations
109
+
110
+ ## Output Requirements
111
+
112
+ Generate 2 files:
113
+ 1. ${package_dir}/preview.html
114
+ 2. ${package_dir}/preview.css
115
+
116
+ ### preview.html Structure:
117
+ - Complete standalone HTML file
118
+ - Responsive design with mobile-first approach
119
+ - Sticky navigation for sections
120
+ - Interactive component demonstrations
121
+ - Code snippets in collapsible <details> elements
122
+ - Footer with package metadata
123
+
124
+ ### preview.css Structure:
125
+ - CSS Custom Properties from design-tokens.json
126
+ - Typography combination classes
127
+ - Component classes from layout-templates.json
128
+ - Preview page layout styles
129
+ - Interactive demo styles
130
+
131
+ ## Critical Requirements
132
+ - ✅ Read ALL input files (layout-templates.json, design-tokens.json, animation-tokens.json if exists)
133
+ - ✅ Generate complete, interactive showcase HTML
134
+ - ✅ All CSS uses var() references to design tokens
135
+ - ✅ Display ALL components from layout-templates.json
136
+ - ✅ **Separate universal components from specialized components** in the showcase
137
+ - ✅ Display component DOM structures with proper styling
138
+ - ✅ Include usage code snippets
139
+ - ✅ Label each component type clearly (Universal / Specialized)
140
+ - ✅ **Display usage recommendations** when available:
141
+ - Typography: common_sizes, common_combinations (from _metadata.usage_recommendations)
142
+ - Components: usage_guide for universal components (from layout-templates)
143
+ - Spacing: size_guide, common_patterns (from _metadata.usage_recommendations)
144
+ - ✅ Gracefully handle missing usage data (display sections only if data exists)
145
+ - ✅ Use Write() to save both files:
146
+ - ${package_dir}/preview.html
147
+ - ${package_dir}/preview.css
148
+ - ❌ NO external research or MCP calls
149
+ `
150
+ ```
151
+
152
+ ## Output Structure
153
+
154
+ ```
155
+ ${package_dir}/
156
+ ├── layout-templates.json # Layout templates (copied from extraction)
157
+ ├── design-tokens.json # Design tokens (copied from extraction)
158
+ ├── animation-tokens.json # Animation tokens (optional)
159
+ ├── preview.html # Interactive showcase (NEW)
160
+ └── preview.css # Showcase styling (NEW)
161
+ ```
@@ -0,0 +1,225 @@
1
+ # UI Codify: Main Workflow
2
+
3
+ 从源代码提取设计系统,生成参考包,固化为知识资产。
4
+
5
+ ## Architecture
6
+
7
+ ```
8
+ Phase 1 (inline) Phase 2 (deferred) Phase 3 (deferred) Phase 4 (deferred)
9
+ Validate & 3 Parallel Agents Reference Package Knowhow Assets
10
+ Setup ┌─ Style Agent Copy tokens + Manifest +
11
+ ├─ Parse args ├─ Animation Agent Generate preview codify-to-knowhow
12
+ ├─ Validate source └─ Layout Agent (preview.html/css) + cleanup
13
+ ├─ Package name ↓ ↓ ↓
14
+ └─ Workspace design-tokens.json preview.html knowhow-manifest.json
15
+ animation-tokens.json preview.css → knowhow files
16
+ layout-templates.json → spec entries
17
+ ```
18
+
19
+ ## Data Flow
20
+
21
+ ```
22
+ Input: source_path, package_name, output_dir, overwrite
23
+
24
+ Phase 1 → source_path, package_name, output_dir, temp_dir, package_dir
25
+
26
+ Phase 2 → design-tokens.json, animation-tokens.json, layout-templates.json
27
+ ↓ (written to temp_dir)
28
+ Phase 3 → preview.html, preview.css, token files copied to package_dir
29
+
30
+ Phase 4 → knowhow-manifest.json → codify-to-knowhow → knowhow + specs
31
+
32
+ Completion report
33
+ ```
34
+
35
+ ## TodoWrite Pattern
36
+
37
+ ```json
38
+ [
39
+ {"content": "Phase 1: 参数验证与工作区准备", "status": "in_progress"},
40
+ {"content": "Phase 2: 并行 Agent 提取 (Style + Animation + Layout)", "status": "pending"},
41
+ {"content": "Phase 3: 参考包生成 (preview.html + preview.css)", "status": "pending"},
42
+ {"content": "Phase 4: 知识资产固化 (manifest + codify-to-knowhow)", "status": "pending"}
43
+ ]
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Phase 1: Parameter Validation & Workspace Setup (Inline)
49
+
50
+ ### Step 1.1: Parse Arguments
51
+
52
+ 从 `$ARGUMENTS` 中解析:
53
+
54
+ - `source_path` (positional, required) — 源代码目录
55
+ - `--package-name <name>` — 包名(可选,默认从源目录自动生成)
56
+ - `--output-dir <path>` — 输出目录(默认 `.workflow/reference_style`)
57
+ - `--overwrite` — 允许覆盖已存在的包目录
58
+
59
+ ```bash
60
+ # 验证 source_path 存在
61
+ if [ -z "$source_path" ]; then
62
+ echo "E001: Source path argument required"
63
+ echo "USAGE: /maestro-ui-codify <source-path> [--package-name <name>] [--output-dir <path>] [--overwrite]"
64
+ exit 1
65
+ fi
66
+
67
+ if [ ! -d "$source_path" ]; then
68
+ echo "E002: Source path not found or not a directory: $source_path"
69
+ exit 1
70
+ fi
71
+
72
+ source_path=$(cd "$source_path" && pwd)
73
+ echo "Source: $source_path"
74
+ ```
75
+
76
+ ### Step 1.2: Resolve Package Name
77
+
78
+ ```bash
79
+ # 自动生成包名: 目录名转 kebab-case,附加日期
80
+ if [ -z "$package_name" ]; then
81
+ dir_name=$(basename "$source_path")
82
+ package_name=$(echo "$dir_name" | tr '[:upper:]' '[:lower:]' | tr ' _' '-' | sed 's/[^a-z0-9-]//g')
83
+ package_name="${package_name}-style"
84
+ fi
85
+
86
+ # 验证包名格式
87
+ if ! [[ "$package_name" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
88
+ echo "ERROR: Invalid package name '$package_name'. Use lowercase, alphanumeric, hyphens only."
89
+ exit 1
90
+ fi
91
+
92
+ echo "Package name: $package_name"
93
+ ```
94
+
95
+ ### Step 1.3: Setup Directories
96
+
97
+ ```bash
98
+ output_dir="${output_dir:-.workflow/reference_style}"
99
+ package_dir="${output_dir}/${package_name}"
100
+
101
+ # 覆盖保护
102
+ if [ -d "$package_dir" ] && [ "$(ls -A "$package_dir" 2>/dev/null)" ]; then
103
+ if [ "$overwrite" != "true" ]; then
104
+ echo "E003: Package directory exists: $package_dir"
105
+ echo "HINT: Use --overwrite to replace, or choose a different --package-name"
106
+ exit 1
107
+ fi
108
+ echo "INFO: Overwriting existing package '$package_name'"
109
+ fi
110
+
111
+ # 创建临时工作区
112
+ timestamp=$(date +%Y%m%d%H%M%S)
113
+ temp_dir=".workflow/codify-temp-${timestamp}"
114
+ mkdir -p "$temp_dir/style-extraction/style-1"
115
+ mkdir -p "$temp_dir/animation-extraction"
116
+ mkdir -p "$temp_dir/layout-extraction"
117
+ mkdir -p "$temp_dir/.intermediates/import-analysis"
118
+ mkdir -p "$package_dir"
119
+
120
+ echo "[Phase 1] Setup complete"
121
+ echo " Source: $source_path"
122
+ echo " Package: $package_name"
123
+ echo " Temp workspace: $temp_dir"
124
+ echo " Output: $package_dir"
125
+ ```
126
+
127
+ **TodoWrite**: Mark Phase 1 completed, Phase 2 in_progress.
128
+
129
+ ---
130
+
131
+ ## Phase 2: Parallel Agent Extraction (Deferred)
132
+
133
+ **Read** `@~/.maestro/workflows/ui-codify-extract.md` then execute.
134
+
135
+ Variables available to Phase 2:
136
+ - `source_path` — absolute path to source directory
137
+ - `temp_dir` — temporary workspace path (e.g. `.workflow/codify-temp-20260510143022`)
138
+
139
+ Phase 2 writes:
140
+ - `${temp_dir}/style-extraction/style-1/design-tokens.json`
141
+ - `${temp_dir}/animation-extraction/animation-tokens.json`
142
+ - `${temp_dir}/layout-extraction/layout-templates.json`
143
+
144
+ **TodoWrite**: Mark Phase 2 completed, Phase 3 in_progress.
145
+
146
+ ---
147
+
148
+ ## Phase 3: Reference Package Generation (Deferred)
149
+
150
+ **Read** `@~/.maestro/workflows/ui-codify-package.md` then execute.
151
+
152
+ Variables available to Phase 3:
153
+ - `temp_dir` — temporary workspace with extraction results
154
+ - `package_dir` — target package directory
155
+ - `package_name` — package name
156
+
157
+ Phase 3 writes:
158
+ - `${package_dir}/design-tokens.json`
159
+ - `${package_dir}/layout-templates.json`
160
+ - `${package_dir}/animation-tokens.json` (if available)
161
+ - `${package_dir}/preview.html`
162
+ - `${package_dir}/preview.css`
163
+
164
+ **TodoWrite**: Mark Phase 3 completed, Phase 4 in_progress.
165
+
166
+ ---
167
+
168
+ ## Phase 4: Knowledge Asset Generation (Deferred)
169
+
170
+ **Read** `@~/.maestro/workflows/ui-codify-knowhow.md` then execute.
171
+
172
+ Variables available to Phase 4:
173
+ - `package_dir` — package directory with all token files
174
+ - `package_name` — package name (used as slug)
175
+ - `temp_dir` — temporary workspace (to clean up)
176
+
177
+ Phase 4 writes:
178
+ - `${package_dir}/knowhow-manifest.json`
179
+ - Then calls `/codify-to-knowhow ${package_dir}` via Skill tool
180
+
181
+ **TodoWrite**: Mark Phase 4 completed (all tasks done).
182
+
183
+ ---
184
+
185
+ ## Error Handling
186
+
187
+ | Phase | Error | Recovery |
188
+ |-------|-------|----------|
189
+ | 1 | E001: Missing source path | Report usage, exit |
190
+ | 1 | E002: Source not found | Report path, exit |
191
+ | 1 | E003: Package exists | Suggest --overwrite, exit |
192
+ | 2 | Agent failure | Report which agent failed, continue with partial results |
193
+ | 2 | No files discovered | Report empty discovery, exit |
194
+ | 3 | Token copy failed | Report missing file, exit |
195
+ | 3 | Preview generation failed | Report error, continue (preview is non-critical) |
196
+ | 4 | Manifest build failed | Report error, package still usable without knowhow |
197
+ | 4 | codify-to-knowhow failed | Report error, manifest remains for manual retry |
198
+
199
+ ## Completion Message
200
+
201
+ ```
202
+ UI Design System Codified!
203
+
204
+ Package: {package_name}
205
+ Location: {package_dir}
206
+
207
+ Files:
208
+ design-tokens.json Design tokens (colors, typography, spacing)
209
+ layout-templates.json Component patterns ({universal_count} universal, {specialized_count} specialized)
210
+ animation-tokens.json Animation tokens {if exists else "(not found)"}
211
+ preview.html Interactive showcase
212
+ preview.css Showcase styling
213
+ knowhow-manifest.json Knowledge asset manifest
214
+
215
+ Knowledge Assets:
216
+ Knowhow: AST-{package_name}-tokens, AST-{package_name}-components{, DCS-{package_name}-decisions}
217
+ Specs: {spec_count} entries (coding + arch)
218
+
219
+ Open preview:
220
+ file://{absolute_path}/preview.html
221
+
222
+ Next steps:
223
+ maestro wiki list --role implement # Browse by role
224
+ maestro spec load --keyword {package_name} # Load related specs
225
+ ```
@@ -42,7 +42,7 @@ Milestone mode creates output dir: .workflow/scratch/verify-{milestone_slug}-{da
42
42
  ## V0: Load Project Specs
43
43
 
44
44
  ```
45
- specs_content = maestro spec load --category quality
45
+ specs_content = maestro spec load --role review
46
46
  ```
47
47
 
48
48
  Pass specs_content to verifier agent as quality standards context.
@@ -28,7 +28,7 @@ Knowledge graph link discovery and health improvement. Analyzes the unified wiki
28
28
 
29
29
  | Flag | Effect |
30
30
  |------|--------|
31
- | `--scope <type>` | Limit to wiki type: spec, knowhow, note, lesson, issue. Default: all |
31
+ | `--scope <type>` | Limit to wiki type: spec, knowhow, note, issue. Default: all |
32
32
  | `--min-similarity N` | Minimum similarity score 0.0-1.0 (default: 0.3) |
33
33
  | `--fix` | Auto-apply top suggestions via `maestro wiki update` |
34
34
  | `--max N` | Maximum suggestions to generate (default: 20) |
@@ -68,7 +68,7 @@ For connected pairs A → B and B → C:
68
68
 
69
69
  ### 2d. Type Bridge
70
70
  Detect entries of different types referencing the same concept:
71
- - e.g., `spec-auth` and `lesson-auth-gotcha` — same domain, different perspectives
71
+ - e.g., `spec-auth` and `knowhow-auth-gotcha` — same domain, different perspectives
72
72
  - Use tag overlap + title keyword match to detect shared concepts
73
73
  - Only suggest if entries are currently unlinked
74
74
 
@@ -99,7 +99,7 @@ Baseline health: 72/100 | Orphans: 8 | Broken links: 3
99
99
  # Score Source → Target Reason
100
100
  1 0.85 memory-auth-flow → spec-auth tag overlap (auth, security) + type bridge
101
101
  2 0.71 note-cache-pattern → spec-performance title BM25 match + type bridge
102
- 3 0.65 lesson-retry-fix → spec-error-handling tag overlap (error, retry)
102
+ 3 0.65 knowhow-retry-fix → spec-error-handling tag overlap (error, retry)
103
103
  ...
104
104
 
105
105
  Projected health after fix: 81/100 (+9)
@@ -120,14 +120,14 @@ After all updates: re-run `maestro wiki health`, report applied/skipped counts a
120
120
 
121
121
  ## Stage 6: Persist & Report
122
122
 
123
- 1. Write `.workflow/learning/wiki-connections-{YYYY-MM-DD}.md`:
123
+ 1. Write `.workflow/knowhow/KNW-wiki-connections-{YYYY-MM-DD}.md`:
124
124
  - Baseline vs final health scores
125
125
  - All suggestions (applied and unapplied) with scores
126
126
  - Orphan rescue results
127
127
  - Graph structure observations (hub concentration, type distribution)
128
128
 
129
- 2. Append graph insights to `.workflow/learning/lessons.jsonl`:
130
- - `source: "wiki-connect"`, `category: "technique"`
129
+ 2. Append graph insights as `<spec-entry>` to `.workflow/specs/learnings.md`:
130
+ - `source="wiki-connect"`, `category="technique"`
131
131
  - e.g., "Auth entries poorly cross-referenced", "Memory entries have highest orphan rate"
132
132
 
133
133
  3. Display summary:
@@ -135,7 +135,7 @@ After all updates: re-run `maestro wiki health`, report applied/skipped counts a
135
135
  == Wiki Connect Complete ==
136
136
  Suggestions: {total} ({applied} applied, {skipped} skipped)
137
137
  Health: {baseline} → {new} ({delta})
138
- Report: .workflow/learning/wiki-connections-{date}.md
138
+ Report: .workflow/knowhow/KNW-wiki-connections-{date}.md
139
139
  ```
140
140
 
141
141
  ---
@@ -13,7 +13,7 @@ Unlike `maestro wiki list` which shows raw entries, this workflow synthesizes an
13
13
  - `.workflow/` initialized
14
14
  - Wiki entries exist (at least 5 for meaningful clustering)
15
15
  - `maestro wiki` CLI available
16
- - `.workflow/learning/lessons.jsonl` exists (optional, for cross-reference)
16
+ - `.workflow/specs/learnings.md` exists (optional, for cross-reference)
17
17
 
18
18
  ---
19
19
 
@@ -32,7 +32,7 @@ Unlike `maestro wiki list` which shows raw entries, this workflow synthesizes an
32
32
  |------|--------|
33
33
  | `<topic>` | Search wiki for matching entries via BM25 |
34
34
  | `--recent N` | Entries updated within last N days |
35
- | `--type <type>` | Filter by wiki type: spec, knowhow, note, lesson, issue |
35
+ | `--type <type>` | Filter by wiki type: spec, knowhow, note, issue |
36
36
  | `--format brief\|full` | `brief` = compact (default), `full` = detailed per-entry |
37
37
  | `--create-issues` | Auto-create knowledge-gap issues in `issues.jsonl` |
38
38
 
@@ -82,18 +82,18 @@ Top 3-5 most important entries by:
82
82
  - **Broken links**: `[[references]]` that don't resolve within the theme
83
83
  - **Orphans**: entries in this theme with no connections
84
84
  - **TODO markers**: entries with `?`, "TODO", "TBD" in title or body
85
- - **Missing perspectives**: theme has specs but no lessons? Issues but no decisions?
85
+ - **Missing perspectives**: theme has specs but no knowhow? Issues but no decisions?
86
86
 
87
87
  ### Health Score
88
88
  Per-theme health adapted from wiki health formula (entries, connectivity, completeness).
89
89
 
90
90
  ---
91
91
 
92
- ## Stage 4: Cross-Reference with Lessons
92
+ ## Stage 4: Cross-Reference with Knowhow Insights
93
93
 
94
- Search `.workflow/learning/lessons.jsonl` for keyword matches against each theme. Flag **unlinked insights** -- lessons matching a theme but not referenced by any wiki entry in that theme.
94
+ Search via `maestro wiki search` or parse `.workflow/specs/learnings.md` for keyword matches against each theme. Flag **unlinked insights** learning entries matching a theme but not referenced by any wiki entry in that theme.
95
95
 
96
- If `lessons.jsonl` not found, skip with W002 warning.
96
+ If `learnings.md` not found, skip with W002 warning.
97
97
 
98
98
  ---
99
99
 
@@ -104,8 +104,8 @@ Build a type × theme matrix showing knowledge density:
104
104
  ```
105
105
  Theme 1 Theme 2 Theme 3 Theme 4 Theme 5
106
106
  spec ███░░ ░░░░░ █████ ██░░░ ░░░░░
107
- memory ░░░░░ ████░ ██░░░ ░░░░░ ███░░
108
- lesson █░░░░ ██░░░ ████░ █░░░░ ░░░░░
107
+ knowhow ░░░░░ ████░ ██░░░ ░░░░░ ███░░
108
+ note █░░░░ ██░░░ ████░ █░░░░ ░░░░░
109
109
  issue ██░░░ ░░░░░ █░░░░ ███░░ ░░░░░
110
110
 
111
111
  Legend: █ = entries exist, ░ = sparse/missing
@@ -117,7 +117,7 @@ Empty cells = knowledge gaps. Each gap becomes a candidate for Stage 7.
117
117
 
118
118
  ## Stage 6: Write Digest
119
119
 
120
- Produce `.workflow/learning/digest-{slug}-{YYYY-MM-DD}.md`:
120
+ Produce `.workflow/knowhow/KNW-digest-{slug}-{YYYY-MM-DD}.md`:
121
121
 
122
122
  ```markdown
123
123
  # Knowledge Digest: {scope description}
@@ -140,10 +140,10 @@ Produce `.workflow/learning/digest-{slug}-{YYYY-MM-DD}.md`:
140
140
  ## Knowledge Gaps
141
141
  | Gap | Theme | Type Missing | Suggested Action |
142
142
  |-----|-------|-------------|-----------------|
143
- | No lessons for auth patterns | Security | lesson | /learn-decompose src/auth/ |
143
+ | No knowhow for auth patterns | Security | knowhow | /learn-decompose src/auth/ |
144
144
 
145
145
  ## Unlinked Insights
146
- {lessons.jsonl entries not connected to wiki graph}
146
+ {knowhow entries not connected to wiki graph}
147
147
 
148
148
  ## Recommended Actions
149
149
  1. {action}: {reason}
@@ -160,8 +160,8 @@ For each knowledge gap from Stage 5: dedup against `.workflow/issues/issues.json
160
160
 
161
161
  ## Stage 8: Persist
162
162
 
163
- 1. Write digest file to `.workflow/learning/`
164
- 2. Append meta-insights to `.workflow/learning/lessons.jsonl` (`source: "wiki-digest"`, `category: "technique"`)
163
+ 1. Write digest file to `.workflow/knowhow/`
164
+ 2. Append meta-insights as `<spec-entry>` to `.workflow/specs/learnings.md` (`source="wiki-digest"`, `category="technique"`)
165
165
  3. Display summary: scope, entry count, theme count, gap count, created issues (if applicable), report path.
166
166
 
167
167
  ---
@@ -28,7 +28,7 @@ Complements `wiki-connect.md` (link discovery) and `wiki-digest.md` (synthesis)
28
28
 
29
29
  | Flag | Effect |
30
30
  |------|--------|
31
- | `--type <type>` | Filter: spec, knowhow, note, lesson, issue |
31
+ | `--type <type>` | Filter: spec, knowhow, note, issue |
32
32
  | `--fix` | Auto-fix issues during cleanup |
33
33
  | `--json` | JSON output |
34
34