Skip to content

Commit e90c9ba

Browse files
catlog22claude
andcommitted
refactor: Optimize document passing strategy in workflow
- **concept-enhanced**: Add explicit priority for source documents - PRIMARY: role analysis.md files (complete technical details, ADRs) - SECONDARY: synthesis-specification.md (integrated requirements) - Framework: topic-framework.md (discussion context) - **task-generate**: Enhanced artifacts array with usage guidance - Add 'usage' field for each artifact type - Support dynamic role discovery - Reorder priority: synthesis (highest) → role_analysis (high) → framework (low) - **pre_analysis**: Add explicit artifact loading instructions - Note when to consult role analysis (API schemas, caching configs, design tokens) - Load system-architect, ui-designer, product-manager analyses - **implementation_approach**: Add clear priority instructions - Primary: Use synthesis-specification.md for requirements - Secondary: Refer to artifacts[] for technical details - Update logic_flow to include "Consult artifacts when needed" - **gitignore**: Add .workflow directory to ignore list 🎯 Result: Balanced strategy - 100% fidelity in analysis phase, 78% token efficiency in planning phase, hybrid approach in execution phase 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 237a286 commit e90c9ba

File tree

4 files changed

+47
-17
lines changed

4 files changed

+47
-17
lines changed

.claude/commands/workflow/tools/concept-enhanced.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ Advanced solution design and feasibility analysis engine with parallel CLI execu
130130
- Tech stack from tech_stack section
131131
- Project structure from statistics section
132132
133+
**ANALYSIS PRIORITY - Use ALL source documents from context-package assets[]**:
134+
1. PRIMARY SOURCES (Highest Priority): Individual role analysis.md files (system-architect, ui-designer, product-manager, etc.)
135+
- These contain complete technical details, design rationale, ADRs, and decision context
136+
- Extract: Technical specs, API schemas, design tokens, caching configs, performance metrics
137+
2. SYNTHESIS REFERENCE (Medium Priority): synthesis-specification.md
138+
- Use for integrated requirements and cross-role alignment
139+
- Validate decisions and identify integration points
140+
3. TOPIC FRAMEWORK (Low Priority): topic-framework.md for discussion context
141+
133142
EXPECTED:
134143
1. CURRENT STATE ANALYSIS: Existing patterns, code structure, integration points, technical debt
135144
2. SOLUTION DESIGN: Core architecture principles, system design, key design decisions with rationale

.claude/commands/workflow/tools/task-generate-agent.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,21 @@ Task(
169169
{
170170
"type": "synthesis_specification",
171171
"path": "{synthesis_spec_path}",
172-
"priority": "highest"
172+
"priority": "highest",
173+
"usage": "Primary requirement source - use for consolidated requirements and cross-role alignment"
174+
},
175+
{
176+
"type": "role_analysis",
177+
"path": "{role_analysis_path}",
178+
"priority": "high",
179+
"usage": "Technical/design/business details from specific roles. Common roles: system-architect (ADRs, APIs, caching), ui-designer (design tokens, layouts), product-manager (user stories, metrics)",
180+
"note": "Dynamically discovered - multiple role analysis files included based on brainstorming results"
181+
},
182+
{
183+
"type": "topic_framework",
184+
"path": "{topic_framework_path}",
185+
"priority": "low",
186+
"usage": "Discussion context and framework structure"
173187
}
174188
]
175189
},
@@ -203,12 +217,13 @@ Task(
203217
}
204218
],
205219
"implementation_approach": {
206-
"task_description": "Implement '[title]' following synthesis specification",
220+
"task_description": "Implement '[title]' following synthesis specification. PRIORITY: Use synthesis-specification.md as primary requirement source. When implementation needs technical details (e.g., API schemas, caching configs, design tokens), refer to artifacts[] for detailed specifications from original role analyses.",
207221
"modification_points": ["Apply requirements from synthesis"],
208222
"logic_flow": [
209223
"Load synthesis specification",
210224
"Analyze existing patterns",
211225
"Implement following specification",
226+
"Consult artifacts for technical details when needed",
212227
"Validate against acceptance criteria"
213228
]
214229
},

.claude/commands/workflow/tools/task-generate.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,22 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
8484
"source": "brainstorm_synthesis",
8585
"path": ".workflow/WFS-[session]/.brainstorming/synthesis-specification.md",
8686
"priority": "highest",
87-
"contains": "complete_integrated_specification"
87+
"usage": "Primary requirement source - use for consolidated requirements and cross-role alignment"
88+
},
89+
{
90+
"type": "role_analysis",
91+
"source": "brainstorm_roles",
92+
"path": ".workflow/WFS-[session]/.brainstorming/[role-name]/analysis.md",
93+
"priority": "high",
94+
"usage": "Technical/design/business details from specific roles. Common roles: system-architect (ADRs, APIs, caching), ui-designer (design tokens, layouts), product-manager (user stories, metrics)",
95+
"note": "Dynamically discovered - multiple role analysis files may be included based on brainstorming results"
8896
},
8997
{
9098
"type": "topic_framework",
9199
"source": "brainstorm_framework",
92100
"path": ".workflow/WFS-[session]/.brainstorming/topic-framework.md",
93-
"priority": "medium",
94-
"contains": "discussion_framework_structure"
95-
},
96-
{
97-
"type": "individual_role_analysis",
98-
"source": "brainstorm_roles",
99-
"path": ".workflow/WFS-[session]/.brainstorming/[role]/analysis.md",
100101
"priority": "low",
101-
"contains": "role_specific_analysis_fallback"
102+
"usage": "Discussion context and framework structure"
102103
}
103104
]
104105
},
@@ -115,14 +116,16 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
115116
"on_error": "skip_optional"
116117
},
117118
{
118-
"step": "load_individual_role_artifacts",
119-
"action": "Load individual role analyses as fallback",
119+
"step": "load_role_analysis_artifacts",
120+
"action": "Load role-specific analysis documents for technical details",
121+
"note": "These artifacts contain implementation details not in synthesis. Consult when needing: API schemas, caching configs, design tokens, ADRs, performance metrics.",
120122
"commands": [
121123
"bash(find .workflow/WFS-[session]/.brainstorming/ -name 'analysis.md' 2>/dev/null | head -8)",
124+
"Read(.workflow/WFS-[session]/.brainstorming/system-architect/analysis.md)",
122125
"Read(.workflow/WFS-[session]/.brainstorming/ui-designer/analysis.md)",
123-
"Read(.workflow/WFS-[session]/.brainstorming/system-architect/analysis.md)"
126+
"Read(.workflow/WFS-[session]/.brainstorming/product-manager/analysis.md)"
124127
],
125-
"output_to": "individual_artifacts",
128+
"output_to": "role_analysis_artifacts",
126129
"on_error": "skip_optional"
127130
},
128131
{
@@ -152,17 +155,19 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
152155
}
153156
],
154157
"implementation_approach": {
155-
"task_description": "Implement '[title]' following synthesis specification",
158+
"task_description": "Implement '[title]' following synthesis specification. PRIORITY: Use synthesis-specification.md as primary requirement source. When implementation needs technical details (e.g., API schemas, caching configs, design tokens), refer to artifacts[] for detailed specifications from original role analyses.",
156159
"modification_points": [
157160
"Apply consolidated requirements from synthesis-specification.md",
158161
"Follow technical guidelines from synthesis",
162+
"Consult artifacts for implementation details when needed",
159163
"Integrate with existing patterns"
160164
],
161165
"logic_flow": [
162166
"Load synthesis specification",
163167
"Extract requirements and design",
164168
"Analyze existing patterns",
165169
"Implement following specification",
170+
"Consult artifacts for technical details when needed",
166171
"Validate against acceptance criteria"
167172
]
168173
},

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ yarn-error.log*
1717
Thumbs.db
1818

1919
.env
20-
settings.local.json
20+
settings.local.json
21+
.workflow

0 commit comments

Comments
 (0)