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.
- package/.claude/commands/learn-decompose.md +10 -15
- package/.claude/commands/learn-follow.md +11 -16
- package/.claude/commands/learn-investigate.md +18 -22
- package/.claude/commands/learn-retro.md +23 -26
- package/.claude/commands/learn-second-opinion.md +11 -16
- package/.claude/commands/maestro-analyze.md +8 -0
- package/.claude/commands/maestro-brainstorm.md +8 -0
- package/.claude/commands/maestro-execute.md +11 -3
- package/.claude/commands/maestro-learn.md +4 -4
- package/.claude/commands/maestro-milestone-complete.md +6 -6
- package/.claude/commands/maestro-plan.md +8 -0
- package/.claude/commands/maestro-ralph-execute.md +52 -80
- package/.claude/commands/maestro-ralph.md +2 -2
- package/.claude/commands/maestro-tools-execute.md +117 -0
- package/.claude/commands/maestro-tools-register.md +137 -0
- package/.claude/commands/maestro-ui-codify.md +67 -0
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-learn.md +5 -7
- package/.claude/commands/manage-wiki.md +1 -1
- package/.claude/commands/quality-auto-test.md +1 -1
- package/.claude/commands/quality-debug.md +8 -0
- package/.claude/commands/quality-retrospective.md +4 -5
- package/.claude/commands/quality-review.md +8 -0
- package/.claude/commands/spec-add.md +25 -4
- package/.claude/commands/spec-load.md +26 -6
- package/.claude/commands/spec-setup.md +2 -2
- package/.claude/commands/wiki-connect.md +1 -1
- package/.claude/commands/wiki-digest.md +5 -6
- package/.claude/skills/codify-to-knowhow/SKILL.md +167 -0
- package/.claude/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.claude/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.claude/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.codex/skills/codify-to-knowhow/SKILL.md +427 -0
- package/.codex/skills/learn-decompose/SKILL.md +8 -8
- package/.codex/skills/learn-follow/SKILL.md +6 -6
- package/.codex/skills/learn-investigate/SKILL.md +4 -4
- package/.codex/skills/learn-retro/SKILL.md +7 -7
- package/.codex/skills/learn-second-opinion/SKILL.md +6 -6
- package/.codex/skills/maestro-analyze/SKILL.md +491 -491
- package/.codex/skills/maestro-collab/SKILL.md +1 -1
- package/.codex/skills/maestro-learn/SKILL.md +1 -1
- package/.codex/skills/maestro-milestone-complete/SKILL.md +122 -122
- package/.codex/skills/maestro-plan/SKILL.md +485 -485
- package/.codex/skills/maestro-tools-execute/SKILL.md +105 -0
- package/.codex/skills/maestro-tools-register/SKILL.md +144 -0
- package/.codex/skills/maestro-ui-codify/SKILL.md +398 -0
- package/.codex/skills/maestro-verify/SKILL.md +486 -486
- package/.codex/skills/manage-harvest/SKILL.md +3 -3
- package/.codex/skills/manage-issue-discover/SKILL.md +431 -431
- package/.codex/skills/manage-learn/SKILL.md +13 -13
- package/.codex/skills/manage-wiki/SKILL.md +1 -1
- package/.codex/skills/quality-auto-test/SKILL.md +553 -553
- package/.codex/skills/quality-refactor/SKILL.md +151 -151
- package/.codex/skills/quality-retrospective/SKILL.md +6 -6
- package/.codex/skills/spec-add/SKILL.md +17 -4
- package/.codex/skills/spec-load/SKILL.md +24 -28
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
- package/.codex/skills/team-testing/roles/executor/role.md +1 -1
- package/.codex/skills/team-testing/roles/generator/role.md +1 -1
- package/.codex/skills/wiki-connect/SKILL.md +5 -5
- package/.codex/skills/wiki-digest/SKILL.md +8 -8
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -2
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +7 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +47 -15
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +1 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +3 -52
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +67 -21
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +1 -11
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +7 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +27 -12
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +10 -2
- package/dashboard/dist-server/src/tools/spec-entry-parser.js +46 -12
- package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-loader.d.ts +6 -2
- package/dashboard/dist-server/src/tools/spec-loader.js +119 -23
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dist/src/commands/knowhow.d.ts.map +1 -1
- package/dist/src/commands/knowhow.js +21 -2
- package/dist/src/commands/knowhow.js.map +1 -1
- package/dist/src/commands/spec.d.ts +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +78 -4
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +51 -3
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +1 -1
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +11 -11
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +55 -22
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/wiki-role-loader.d.ts +18 -0
- package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -0
- package/dist/src/hooks/wiki-role-loader.js +43 -0
- package/dist/src/hooks/wiki-role-loader.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +10 -2
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +46 -12
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +19 -0
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +6 -2
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +119 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-writer.d.ts +6 -1
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +29 -2
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +56 -27
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/package.json +1 -1
- package/workflows/analyze.md +2 -2
- package/workflows/auto-test.md +2 -2
- package/workflows/brainstorm.md +1 -1
- package/workflows/codebase-rebuild.md +1 -1
- package/workflows/codebase-refresh.md +1 -1
- package/workflows/debug.md +1 -1
- package/workflows/execute.md +3 -3
- package/workflows/harvest.md +13 -13
- package/workflows/integration-test.md +2 -2
- package/workflows/issue-discover.md +1 -1
- package/workflows/knowhow.md +72 -11
- package/workflows/learn.md +70 -58
- package/workflows/map.md +1 -1
- package/workflows/milestone-complete.md +2 -2
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +1 -1
- package/workflows/refactor.md +1 -1
- package/workflows/retrospective.md +51 -57
- package/workflows/review.md +1 -1
- package/workflows/roadmap-common.md +1 -1
- package/workflows/specs-add.md +11 -2
- package/workflows/specs-load.md +17 -15
- package/workflows/test-gen.md +1 -1
- package/workflows/tools-spec.md +98 -0
- package/workflows/ui-codify-extract.md +373 -0
- package/workflows/ui-codify-knowhow.md +258 -0
- package/workflows/ui-codify-package.md +161 -0
- package/workflows/ui-codify.md +225 -0
- package/workflows/verify.md +1 -1
- package/workflows/wiki-connect.md +7 -7
- package/workflows/wiki-digest.md +13 -13
- 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
|
+
```
|
package/workflows/verify.md
CHANGED
|
@@ -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 --
|
|
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,
|
|
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 `
|
|
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
|
|
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/
|
|
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/
|
|
130
|
-
- `source
|
|
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/
|
|
138
|
+
Report: .workflow/knowhow/KNW-wiki-connections-{date}.md
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
---
|
package/workflows/wiki-digest.md
CHANGED
|
@@ -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/
|
|
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,
|
|
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
|
|
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
|
|
92
|
+
## Stage 4: Cross-Reference with Knowhow Insights
|
|
93
93
|
|
|
94
|
-
Search `.workflow/
|
|
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 `
|
|
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
|
-
|
|
108
|
-
|
|
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/
|
|
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
|
|
143
|
+
| No knowhow for auth patterns | Security | knowhow | /learn-decompose src/auth/ |
|
|
144
144
|
|
|
145
145
|
## Unlinked Insights
|
|
146
|
-
{
|
|
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/
|
|
164
|
-
2. Append meta-insights to `.workflow/
|
|
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
|
---
|
package/workflows/wiki-manage.md
CHANGED
|
@@ -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,
|
|
31
|
+
| `--type <type>` | Filter: spec, knowhow, note, issue |
|
|
32
32
|
| `--fix` | Auto-fix issues during cleanup |
|
|
33
33
|
| `--json` | JSON output |
|
|
34
34
|
|