mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
feat: Add coordinator commands and role specifications for UI design team
- Implemented the 'monitor' command for coordinator role to handle monitoring events, task completion, and pipeline management. - Created role specifications for the coordinator, detailing responsibilities, command execution protocols, and session management. - Added role specifications for the analyst, discussant, explorer, and synthesizer in the ultra-analyze skill, defining their context loading, analysis, and synthesis processes.
This commit is contained in:
@@ -384,7 +384,8 @@ AskUserQuestion({
|
||||
| +-- <hash>.md # Cached exploration results
|
||||
+-- wisdom/
|
||||
| +-- patterns.md # Discovered patterns and conventions
|
||||
| +-- shared-memory.json # Cross-role structured data
|
||||
| +-- .msg/messages.jsonl # Team message bus
|
||||
| +-- .msg/meta.json # Session metadata
|
||||
+-- discussions/
|
||||
| +-- DISCUSS-OPT.md # Strategy discussion record
|
||||
| +-- DISCUSS-REVIEW.md # Review discussion record
|
||||
|
||||
@@ -17,7 +17,7 @@ Run benchmarks comparing before/after optimization metrics. Validate that improv
|
||||
|-------|--------|----------|
|
||||
| Baseline metrics | <session>/artifacts/baseline-metrics.json (shared) | Yes |
|
||||
| Optimization plan / detail | Varies by mode (see below) | Yes |
|
||||
| shared-memory.json | <session>/wisdom/shared-memory.json | Yes |
|
||||
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
||||
|
||||
1. Extract session path from task description
|
||||
2. **Detect branch/pipeline context** from task description:
|
||||
@@ -37,7 +37,7 @@ Run benchmarks comparing before/after optimization metrics. Validate that improv
|
||||
- Fan-out branch: Read `<session>/artifacts/branches/B{NN}/optimization-detail.md` -- only this branch's criteria
|
||||
- Independent: Read `<session>/artifacts/pipelines/{P}/optimization-plan.md`
|
||||
|
||||
5. Load shared-memory.json for project type and optimization scope
|
||||
5. Load .msg/meta.json for project type and optimization scope
|
||||
6. Detect available benchmark tools from project:
|
||||
|
||||
| Signal | Benchmark Tool | Method |
|
||||
@@ -101,7 +101,7 @@ Compare against baseline and plan criteria:
|
||||
- Independent: `<session>/artifacts/pipelines/{P}/benchmark-results.json`
|
||||
- Content: Per-metric: name, baseline value, current value, improvement %, verdict; Overall verdict: PASS / WARN / FAIL; Regression details (if any)
|
||||
|
||||
2. Update `<session>/wisdom/shared-memory.json` under scoped namespace:
|
||||
2. Update `<session>/.msg/meta.json` under scoped namespace:
|
||||
- Single: merge `{ "benchmarker": { verdict, improvements, regressions } }`
|
||||
- Fan-out: merge `{ "benchmarker.B{NN}": { verdict, improvements, regressions } }`
|
||||
- Independent: merge `{ "benchmarker.{P}": { verdict, improvements, regressions } }`
|
||||
|
||||
@@ -28,7 +28,7 @@ Implement optimization changes following the strategy plan. For FIX tasks, apply
|
||||
| Branch optimization detail | <session>/artifacts/branches/B{NN}/optimization-detail.md | Yes (IMPL with branch) |
|
||||
| Pipeline optimization plan | <session>/artifacts/pipelines/{P}/optimization-plan.md | Yes (IMPL with pipeline) |
|
||||
| Review/bench feedback | From task description | Yes (FIX) |
|
||||
| shared-memory.json | <session>/wisdom/shared-memory.json | Yes |
|
||||
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
||||
| Wisdom files | <session>/wisdom/patterns.md | No |
|
||||
| Context accumulator | From prior IMPL/FIX tasks | Yes (inner loop) |
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Profile application performance to identify CPU, memory, I/O, network, and rende
|
||||
|-------|--------|----------|
|
||||
| Task description | From task subject/description | Yes |
|
||||
| Session path | Extracted from task description | Yes |
|
||||
| shared-memory.json | <session>/wisdom/shared-memory.json | No |
|
||||
| .msg/meta.json | <session>/.msg/meta.json | No |
|
||||
|
||||
1. Extract session path and target scope from task description
|
||||
2. Detect project type by scanning for framework markers:
|
||||
@@ -69,5 +69,5 @@ Execute profiling based on detected project type:
|
||||
- Evidence summary per bottleneck
|
||||
- Detected project type and profiling methods used
|
||||
|
||||
3. Update `<session>/wisdom/shared-memory.json` under `profiler` namespace:
|
||||
3. Update `<session>/.msg/meta.json` under `profiler` namespace:
|
||||
- Read existing -> merge `{ "profiler": { project_type, bottleneck_count, top_bottleneck, scope } }` -> write back
|
||||
|
||||
@@ -21,7 +21,7 @@ Review optimization code changes for correctness, side effects, regression risks
|
||||
| Optimization code changes | From IMPL task artifacts / git diff | Yes |
|
||||
| Optimization plan / detail | Varies by mode (see below) | Yes |
|
||||
| Benchmark results | Varies by mode (see below) | No |
|
||||
| shared-memory.json | <session>/wisdom/shared-memory.json | Yes |
|
||||
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
||||
|
||||
1. Extract session path from task description
|
||||
2. **Detect branch/pipeline context** from task description:
|
||||
@@ -37,7 +37,7 @@ Review optimization code changes for correctness, side effects, regression risks
|
||||
- Fan-out branch: Read `<session>/artifacts/branches/B{NN}/optimization-detail.md`
|
||||
- Independent: Read `<session>/artifacts/pipelines/{P}/optimization-plan.md`
|
||||
|
||||
4. Load shared-memory.json for scoped optimizer namespace:
|
||||
4. Load .msg/meta.json for scoped optimizer namespace:
|
||||
- Single: `optimizer` namespace
|
||||
- Fan-out: `optimizer.B{NN}` namespace
|
||||
- Independent: `optimizer.{P}` namespace
|
||||
@@ -83,7 +83,7 @@ Classify overall verdict based on findings:
|
||||
- Independent: `<session>/artifacts/pipelines/{P}/review-report.md`
|
||||
- Content: Per-dimension findings with severity, file:line, description; Overall verdict with rationale; Specific fix instructions for REVISE/REJECT verdicts
|
||||
|
||||
2. Update `<session>/wisdom/shared-memory.json` under scoped namespace:
|
||||
2. Update `<session>/.msg/meta.json` under scoped namespace:
|
||||
- Single: merge `{ "reviewer": { verdict, finding_count, critical_count, dimensions_reviewed } }`
|
||||
- Fan-out: merge `{ "reviewer.B{NN}": { verdict, finding_count, critical_count, dimensions_reviewed } }`
|
||||
- Independent: merge `{ "reviewer.{P}": { verdict, finding_count, critical_count, dimensions_reviewed } }`
|
||||
|
||||
@@ -18,13 +18,13 @@ Analyze bottleneck reports and baseline metrics to design a prioritized optimiza
|
||||
|-------|--------|----------|
|
||||
| Bottleneck report | <session>/artifacts/bottleneck-report.md | Yes |
|
||||
| Baseline metrics | <session>/artifacts/baseline-metrics.json | Yes |
|
||||
| shared-memory.json | <session>/wisdom/shared-memory.json | Yes |
|
||||
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
||||
| Wisdom files | <session>/wisdom/patterns.md | No |
|
||||
|
||||
1. Extract session path from task description
|
||||
2. Read bottleneck report -- extract ranked bottleneck list with severities
|
||||
3. Read baseline metrics -- extract current performance numbers
|
||||
4. Load shared-memory.json for profiler findings (project_type, scope)
|
||||
4. Load .msg/meta.json for profiler findings (project_type, scope)
|
||||
5. Assess overall optimization complexity:
|
||||
|
||||
| Bottleneck Count | Severity Mix | Complexity |
|
||||
@@ -88,7 +88,7 @@ Define measurable success criteria per optimization (target metric value or impr
|
||||
- Each optimization must be **non-overlapping** in target files (no two OPT-IDs modify the same file unless explicitly noted with conflict resolution)
|
||||
- Implementation guidance must be self-contained -- a branch optimizer should be able to work from a single OPT block without reading others
|
||||
|
||||
2. Update `<session>/wisdom/shared-memory.json` under `strategist` namespace:
|
||||
2. Update `<session>/.msg/meta.json` under `strategist` namespace:
|
||||
- Read existing -> merge -> write back:
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ CONTEXT:
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: <branch-id or 'none'>
|
||||
- Upstream artifacts: <artifact-1>, <artifact-2>
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: <deliverable path> + <quality criteria>
|
||||
CONSTRAINTS: <scope limits, focus areas>
|
||||
---
|
||||
@@ -77,7 +77,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: none
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: <session>/artifacts/baseline-metrics.json + <session>/artifacts/bottleneck-report.md | Quantified metrics with evidence
|
||||
CONSTRAINTS: Focus on <optimization-scope> | Profile before any changes
|
||||
---
|
||||
@@ -101,7 +101,7 @@ CONTEXT:
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: none
|
||||
- Upstream artifacts: baseline-metrics.json, bottleneck-report.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: <session>/artifacts/optimization-plan.md | Priority-ordered with improvement targets, discrete OPT-IDs
|
||||
CONSTRAINTS: Focus on highest-impact optimizations | Risk assessment required | Non-overlapping file targets per OPT-ID
|
||||
---
|
||||
@@ -125,7 +125,7 @@ CONTEXT:
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: none
|
||||
- Upstream artifacts: optimization-plan.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: Modified source files + validation passing | Optimizations applied without regressions
|
||||
CONSTRAINTS: Preserve existing behavior | Minimal changes per optimization | Follow code conventions
|
||||
---
|
||||
@@ -149,7 +149,7 @@ CONTEXT:
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: none
|
||||
- Upstream artifacts: baseline-metrics.json, optimization-plan.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: <session>/artifacts/benchmark-results.json | Per-metric comparison with verdicts
|
||||
CONSTRAINTS: Must compare against baseline | Flag any regressions
|
||||
---
|
||||
@@ -173,7 +173,7 @@ CONTEXT:
|
||||
- Scope: <optimization-scope>
|
||||
- Branch: none
|
||||
- Upstream artifacts: optimization-plan.md, benchmark-results.json (if available)
|
||||
- Shared memory: <session>/wisdom/shared-memory.json
|
||||
- Shared memory: <session>/.msg/meta.json
|
||||
EXPECTED: <session>/artifacts/review-report.md | Per-dimension findings with severity
|
||||
CONSTRAINTS: Focus on optimization changes only | Provide specific file:line references
|
||||
---
|
||||
@@ -233,7 +233,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Scope: optimize rendering
|
||||
- Pipeline: A
|
||||
- Shared memory: <session>/wisdom/shared-memory.json (namespace: profiler.A)
|
||||
- Shared memory: <session>/.msg/meta.json (namespace: profiler.A)
|
||||
EXPECTED: <session>/artifacts/pipelines/A/baseline-metrics.json + bottleneck-report.md
|
||||
CONSTRAINTS: Focus on rendering scope
|
||||
---
|
||||
@@ -252,7 +252,7 @@ PipelineId: A",
|
||||
**Procedure**:
|
||||
|
||||
1. Read `<session>/artifacts/optimization-plan.md` to count OPT-IDs
|
||||
2. Read `shared-memory.json` -> `strategist.optimization_count`
|
||||
2. Read `.msg/meta.json` -> `strategist.optimization_count`
|
||||
3. **Auto mode decision**:
|
||||
|
||||
| Optimization Count | Decision |
|
||||
@@ -289,7 +289,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Branch: B{NN}
|
||||
- Upstream artifacts: branches/B{NN}/optimization-detail.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json (namespace: optimizer.B{NN})
|
||||
- Shared memory: <session>/.msg/meta.json (namespace: optimizer.B{NN})
|
||||
EXPECTED: Modified source files for OPT-{NNN} only
|
||||
CONSTRAINTS: Only implement this branch's optimization | Do not touch files outside OPT-{NNN} scope
|
||||
---
|
||||
@@ -310,7 +310,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Branch: B{NN}
|
||||
- Upstream artifacts: baseline-metrics.json, branches/B{NN}/optimization-detail.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json (namespace: benchmarker.B{NN})
|
||||
- Shared memory: <session>/.msg/meta.json (namespace: benchmarker.B{NN})
|
||||
EXPECTED: <session>/artifacts/branches/B{NN}/benchmark-results.json
|
||||
CONSTRAINTS: Only benchmark this branch's metrics
|
||||
---
|
||||
@@ -331,7 +331,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Branch: B{NN}
|
||||
- Upstream artifacts: branches/B{NN}/optimization-detail.md
|
||||
- Shared memory: <session>/wisdom/shared-memory.json (namespace: reviewer.B{NN})
|
||||
- Shared memory: <session>/.msg/meta.json (namespace: reviewer.B{NN})
|
||||
EXPECTED: <session>/artifacts/branches/B{NN}/review-report.md
|
||||
CONSTRAINTS: Only review this branch's changes
|
||||
---
|
||||
|
||||
@@ -166,7 +166,7 @@ CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Branch: B{NN}
|
||||
- Upstream artifacts: branches/B{NN}/review-report.md, branches/B{NN}/benchmark-results.json
|
||||
- Shared memory: <session>/wisdom/shared-memory.json (namespace: optimizer.B{NN})
|
||||
- Shared memory: <session>/.msg/meta.json (namespace: optimizer.B{NN})
|
||||
EXPECTED: Fixed source files for B{NN} only
|
||||
CONSTRAINTS: Targeted fixes only | Do not touch other branches
|
||||
---
|
||||
|
||||
@@ -69,7 +69,7 @@ For callback/check/resume/complete: load `commands/monitor.md` and execute match
|
||||
### Router Implementation
|
||||
|
||||
1. **Load session context** (if exists):
|
||||
- Scan `.workflow/.team/PERF-OPT-*/team-session.json` for active/paused sessions
|
||||
- Scan `.workflow/.team/PERF-OPT-*/.msg/meta.json` for active/paused sessions
|
||||
- If found, extract session folder path, status, and `parallel_mode`
|
||||
|
||||
2. **Parse $ARGUMENTS** for detection keywords:
|
||||
@@ -186,10 +186,10 @@ Bash("mkdir -p .workflow/<session-id>/artifacts/pipelines/A .workflow/<session-i
|
||||
- `independent_targets`: populated for independent mode (e.g., ["optimize rendering", "optimize API"])
|
||||
- `fix_cycles`: populated per-branch/pipeline as fix cycles occur
|
||||
|
||||
3. Initialize shared-memory.json:
|
||||
3. Initialize .msg/meta.json:
|
||||
|
||||
```
|
||||
Write("<session>/wisdom/shared-memory.json", { "session_id": "<session-id>", "requirement": "<requirement>", "parallel_mode": "<mode>" })
|
||||
Write("<session>/.msg/meta.json", { "session_id": "<session-id>", "requirement": "<requirement>", "parallel_mode": "<mode>" })
|
||||
```
|
||||
|
||||
4. Create team:
|
||||
|
||||
Reference in New Issue
Block a user