@heyai-rules/pilo-masterkit 1.2.2
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/.agent/agents/PILO_MASTER.md +77 -0
- package/.agent/agents/architect.md +211 -0
- package/.agent/agents/backend-specialist.md +263 -0
- package/.agent/agents/build-error-resolver.md +114 -0
- package/.agent/agents/chief-of-staff.md +151 -0
- package/.agent/agents/code-archaeologist.md +106 -0
- package/.agent/agents/code-reviewer.md +237 -0
- package/.agent/agents/cpp-build-resolver.md +90 -0
- package/.agent/agents/cpp-reviewer.md +72 -0
- package/.agent/agents/database-architect.md +226 -0
- package/.agent/agents/database-reviewer.md +91 -0
- package/.agent/agents/debugger.md +225 -0
- package/.agent/agents/devops-engineer.md +242 -0
- package/.agent/agents/doc-updater.md +107 -0
- package/.agent/agents/docs-lookup.md +68 -0
- package/.agent/agents/documentation-writer.md +104 -0
- package/.agent/agents/e2e-runner.md +107 -0
- package/.agent/agents/explorer-agent.md +73 -0
- package/.agent/agents/flutter-reviewer.md +243 -0
- package/.agent/agents/frontend-specialist.md +593 -0
- package/.agent/agents/game-developer.md +162 -0
- package/.agent/agents/go-build-resolver.md +94 -0
- package/.agent/agents/go-reviewer.md +76 -0
- package/.agent/agents/harness-optimizer.md +35 -0
- package/.agent/agents/java-build-resolver.md +153 -0
- package/.agent/agents/java-reviewer.md +92 -0
- package/.agent/agents/kotlin-build-resolver.md +118 -0
- package/.agent/agents/kotlin-reviewer.md +159 -0
- package/.agent/agents/loop-operator.md +36 -0
- package/.agent/agents/mobile-developer.md +377 -0
- package/.agent/agents/orchestrator.md +416 -0
- package/.agent/agents/penetration-tester.md +188 -0
- package/.agent/agents/performance-optimizer.md +187 -0
- package/.agent/agents/planner.md +212 -0
- package/.agent/agents/product-manager.md +112 -0
- package/.agent/agents/product-owner.md +95 -0
- package/.agent/agents/project-planner.md +406 -0
- package/.agent/agents/python-reviewer.md +98 -0
- package/.agent/agents/pytorch-build-resolver.md +120 -0
- package/.agent/agents/qa-automation-engineer.md +103 -0
- package/.agent/agents/refactor-cleaner.md +85 -0
- package/.agent/agents/rust-build-resolver.md +148 -0
- package/.agent/agents/rust-reviewer.md +94 -0
- package/.agent/agents/security-auditor.md +170 -0
- package/.agent/agents/security-reviewer.md +108 -0
- package/.agent/agents/seo-specialist.md +111 -0
- package/.agent/agents/tdd-guide.md +91 -0
- package/.agent/agents/test-engineer.md +158 -0
- package/.agent/agents/typescript-reviewer.md +112 -0
- package/.agent/rules/ARCHITECTURAL_BLUEPRINTS.md +62 -0
- package/.agent/rules/CODE_CRAFTSMANSHIP.md +69 -0
- package/.agent/rules/CORE_RULES.md +72 -0
- package/.agent/rules/PROJECT_MAP.md +58 -0
- package/.agent/rules/QUALITY_ASSURANCE.md +54 -0
- package/.agent/rules/SECURITY_ARMOR.md +44 -0
- package/.agent/rules/VERSION_ORCHESTRATION.md +64 -0
- package/.agent/rules/WORKFLOW_ORCHESTRATION.md +55 -0
- package/.agent/scripts/auto_preview.py +148 -0
- package/.agent/scripts/checklist.py +217 -0
- package/.agent/scripts/session_manager.py +120 -0
- package/.agent/scripts/verify_all.py +327 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/api-style.md +42 -0
- package/.agent/skills/api-patterns/auth.md +24 -0
- package/.agent/skills/api-patterns/documentation.md +26 -0
- package/.agent/skills/api-patterns/graphql.md +41 -0
- package/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/response.md +37 -0
- package/.agent/skills/api-patterns/rest.md +40 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/api-patterns/security-testing.md +122 -0
- package/.agent/skills/api-patterns/trpc.md +41 -0
- package/.agent/skills/api-patterns/versioning.md +22 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +41 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/bash-linux/SKILL.md +199 -0
- package/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/.agent/skills/brainstorming/SKILL.md +163 -0
- package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/.agent/skills/database-design/SKILL.md +52 -0
- package/.agent/skills/database-design/database-selection.md +43 -0
- package/.agent/skills/database-design/indexing.md +39 -0
- package/.agent/skills/database-design/migrations.md +48 -0
- package/.agent/skills/database-design/optimization.md +36 -0
- package/.agent/skills/database-design/orm-selection.md +30 -0
- package/.agent/skills/database-design/schema-design.md +56 -0
- package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/.agent/skills/frontend-design/SKILL.md +452 -0
- package/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/color-system.md +311 -0
- package/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/frontend-design/typography-system.md +345 -0
- package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
- package/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/mobile-design/SKILL.md +394 -0
- package/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/.agent/skills/mobile-design/platform-android.md +666 -0
- package/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/.agent/skills/nextjs-react-expert/9-cache-components.md +103 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +293 -0
- package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.agent/skills/plan-writing/SKILL.md +152 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/.agent/skills/python-patterns/SKILL.md +441 -0
- package/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/.agent/skills/rust-pro/SKILL.md +176 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/.agent/skills/server-management/SKILL.md +161 -0
- package/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +292 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.agent/tasks/lessons.md +40 -0
- package/.agent/tasks/todo.md +33 -0
- package/.agent/workflows/aside.md +164 -0
- package/.agent/workflows/brainstorm.md +113 -0
- package/.agent/workflows/build-fix.md +62 -0
- package/.agent/workflows/checkpoint.md +74 -0
- package/.agent/workflows/claw.md +51 -0
- package/.agent/workflows/code-review.md +40 -0
- package/.agent/workflows/context-budget.md +29 -0
- package/.agent/workflows/cpp-build.md +173 -0
- package/.agent/workflows/cpp-review.md +132 -0
- package/.agent/workflows/cpp-test.md +251 -0
- package/.agent/workflows/create.md +59 -0
- package/.agent/workflows/debug.md +103 -0
- package/.agent/workflows/deploy.md +176 -0
- package/.agent/workflows/devfleet.md +92 -0
- package/.agent/workflows/docs.md +31 -0
- package/.agent/workflows/e2e.md +365 -0
- package/.agent/workflows/enhance.md +63 -0
- package/.agent/workflows/eval.md +120 -0
- package/.agent/workflows/evolve.md +178 -0
- package/.agent/workflows/go-build.md +183 -0
- package/.agent/workflows/go-review.md +148 -0
- package/.agent/workflows/go-test.md +268 -0
- package/.agent/workflows/gradle-build.md +70 -0
- package/.agent/workflows/harness-audit.md +71 -0
- package/.agent/workflows/init-docs.md +46 -0
- package/.agent/workflows/instinct-export.md +66 -0
- package/.agent/workflows/instinct-import.md +114 -0
- package/.agent/workflows/instinct-status.md +59 -0
- package/.agent/workflows/kotlin-build.md +174 -0
- package/.agent/workflows/kotlin-review.md +140 -0
- package/.agent/workflows/kotlin-test.md +312 -0
- package/.agent/workflows/learn-eval.md +116 -0
- package/.agent/workflows/learn.md +70 -0
- package/.agent/workflows/loop-start.md +32 -0
- package/.agent/workflows/loop-status.md +24 -0
- package/.agent/workflows/model-route.md +26 -0
- package/.agent/workflows/multi-backend.md +158 -0
- package/.agent/workflows/multi-execute.md +315 -0
- package/.agent/workflows/multi-frontend.md +158 -0
- package/.agent/workflows/multi-plan.md +268 -0
- package/.agent/workflows/multi-workflow.md +191 -0
- package/.agent/workflows/orchestrate.md +231 -0
- package/.agent/workflows/plan.md +115 -0
- package/.agent/workflows/pm2.md +272 -0
- package/.agent/workflows/preview.md +81 -0
- package/.agent/workflows/projects.md +39 -0
- package/.agent/workflows/promote.md +41 -0
- package/.agent/workflows/prompt-optimize.md +38 -0
- package/.agent/workflows/prune.md +31 -0
- package/.agent/workflows/python-review.md +297 -0
- package/.agent/workflows/quality-gate.md +29 -0
- package/.agent/workflows/refactor-clean.md +80 -0
- package/.agent/workflows/resume-session.md +156 -0
- package/.agent/workflows/rules-distill.md +11 -0
- package/.agent/workflows/rust-build.md +187 -0
- package/.agent/workflows/rust-review.md +142 -0
- package/.agent/workflows/rust-test.md +308 -0
- package/.agent/workflows/save-session.md +275 -0
- package/.agent/workflows/sessions.md +333 -0
- package/.agent/workflows/setup-pm.md +80 -0
- package/.agent/workflows/skill-create.md +174 -0
- package/.agent/workflows/skill-health.md +54 -0
- package/.agent/workflows/status.md +86 -0
- package/.agent/workflows/tdd.md +328 -0
- package/.agent/workflows/test-coverage.md +69 -0
- package/.agent/workflows/test.md +144 -0
- package/.agent/workflows/ui-ux-pro-max.md +296 -0
- package/.agent/workflows/update-codemaps.md +72 -0
- package/.agent/workflows/update-docs.md +84 -0
- package/.agent/workflows/verify.md +59 -0
- package/LICENSE +176 -0
- package/README.md +136 -0
- package/RELEASE.md +36 -0
- package/package.json +79 -0
- package/scripts/release-check.js +55 -0
- package/src/bin/cli.js +78 -0
- package/src/lib/installer.js +140 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# Plan - Multi-Model Collaborative Planning
|
|
2
|
+
|
|
3
|
+
Multi-model collaborative planning - Context retrieval + Dual-model analysis → Generate step-by-step implementation plan.
|
|
4
|
+
|
|
5
|
+
$ARGUMENTS
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Core Protocols
|
|
10
|
+
|
|
11
|
+
- **Language Protocol**: Use **English** when interacting with tools/models, communicate with user in their language
|
|
12
|
+
- **Mandatory Parallel**: Codex/Gemini calls MUST use `run_in_background: true` (including single model calls, to avoid blocking main thread)
|
|
13
|
+
- **Code Sovereignty**: External models have **zero filesystem write access**, all modifications by Claude
|
|
14
|
+
- **Stop-Loss Mechanism**: Do not proceed to next phase until current phase output is validated
|
|
15
|
+
- **Planning Only**: This command allows reading context and writing to `.claude/plan/*` plan files, but **NEVER modify production code**
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Multi-Model Call Specification
|
|
20
|
+
|
|
21
|
+
**Call Syntax** (parallel: use `run_in_background: true`):
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Bash({
|
|
25
|
+
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}- \"$PWD\" <<'EOF'
|
|
26
|
+
ROLE_FILE: <role prompt path>
|
|
27
|
+
<TASK>
|
|
28
|
+
Requirement: <enhanced requirement>
|
|
29
|
+
Context: <retrieved project context>
|
|
30
|
+
</TASK>
|
|
31
|
+
OUTPUT: Step-by-step implementation plan with pseudo-code. DO NOT modify any files.
|
|
32
|
+
EOF",
|
|
33
|
+
run_in_background: true,
|
|
34
|
+
timeout: 3600000,
|
|
35
|
+
description: "Brief description"
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Model Parameter Notes**:
|
|
40
|
+
- `{{GEMINI_MODEL_FLAG}}`: When using `--backend gemini`, replace with `--gemini-model gemini-3-pro-preview` (note trailing space); use empty string for codex
|
|
41
|
+
|
|
42
|
+
**Role Prompts**:
|
|
43
|
+
|
|
44
|
+
| Phase | Codex | Gemini |
|
|
45
|
+
|-------|-------|--------|
|
|
46
|
+
| Analysis | `~/.claude/.ccg/prompts/codex/analyzer.md` | `~/.claude/.ccg/prompts/gemini/analyzer.md` |
|
|
47
|
+
| Planning | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/architect.md` |
|
|
48
|
+
|
|
49
|
+
**Session Reuse**: Each call returns `SESSION_ID: xxx` (typically output by wrapper), **MUST save** for subsequent `/ccg:execute` use.
|
|
50
|
+
|
|
51
|
+
**Wait for Background Tasks** (max timeout 600000ms = 10 minutes):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**IMPORTANT**:
|
|
58
|
+
- Must specify `timeout: 600000`, otherwise default 30 seconds will cause premature timeout
|
|
59
|
+
- If still incomplete after 10 minutes, continue polling with `TaskOutput`, **NEVER kill the process**
|
|
60
|
+
- If waiting is skipped due to timeout, **MUST call `AskUserQuestion` to ask user whether to continue waiting or kill task**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Execution Workflow
|
|
65
|
+
|
|
66
|
+
**Planning Task**: $ARGUMENTS
|
|
67
|
+
|
|
68
|
+
### Phase 1: Full Context Retrieval
|
|
69
|
+
|
|
70
|
+
`[Mode: Research]`
|
|
71
|
+
|
|
72
|
+
#### 1.1 Prompt Enhancement (MUST execute first)
|
|
73
|
+
|
|
74
|
+
**If ace-tool MCP is available**, call `mcp__ace-tool__enhance_prompt` tool:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
mcp__ace-tool__enhance_prompt({
|
|
78
|
+
prompt: "$ARGUMENTS",
|
|
79
|
+
conversation_history: "<last 5-10 conversation turns>",
|
|
80
|
+
project_root_path: "$PWD"
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Wait for enhanced prompt, **replace original $ARGUMENTS with enhanced result** for all subsequent phases.
|
|
85
|
+
|
|
86
|
+
**If ace-tool MCP is NOT available**: Skip this step and use the original `$ARGUMENTS` as-is for all subsequent phases.
|
|
87
|
+
|
|
88
|
+
#### 1.2 Context Retrieval
|
|
89
|
+
|
|
90
|
+
**If ace-tool MCP is available**, call `mcp__ace-tool__search_context` tool:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
mcp__ace-tool__search_context({
|
|
94
|
+
query: "<semantic query based on enhanced requirement>",
|
|
95
|
+
project_root_path: "$PWD"
|
|
96
|
+
})
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
- Build semantic query using natural language (Where/What/How)
|
|
100
|
+
- **NEVER answer based on assumptions**
|
|
101
|
+
|
|
102
|
+
**If ace-tool MCP is NOT available**, use Claude Code built-in tools as fallback:
|
|
103
|
+
1. **Glob**: Find relevant files by pattern (e.g., `Glob("**/*.ts")`, `Glob("src/**/*.py")`)
|
|
104
|
+
2. **Grep**: Search for key symbols, function names, class definitions (e.g., `Grep("className|functionName")`)
|
|
105
|
+
3. **Read**: Read the discovered files to gather complete context
|
|
106
|
+
4. **Task (Explore agent)**: For deeper exploration, use `Task` with `subagent_type: "Explore"` to search across the codebase
|
|
107
|
+
|
|
108
|
+
#### 1.3 Completeness Check
|
|
109
|
+
|
|
110
|
+
- Must obtain **complete definitions and signatures** for relevant classes, functions, variables
|
|
111
|
+
- If context insufficient, trigger **recursive retrieval**
|
|
112
|
+
- Prioritize output: entry file + line number + key symbol name; add minimal code snippets only when necessary to resolve ambiguity
|
|
113
|
+
|
|
114
|
+
#### 1.4 Requirement Alignment
|
|
115
|
+
|
|
116
|
+
- If requirements still have ambiguity, **MUST** output guiding questions for user
|
|
117
|
+
- Until requirement boundaries are clear (no omissions, no redundancy)
|
|
118
|
+
|
|
119
|
+
### Phase 2: Multi-Model Collaborative Analysis
|
|
120
|
+
|
|
121
|
+
`[Mode: Analysis]`
|
|
122
|
+
|
|
123
|
+
#### 2.1 Distribute Inputs
|
|
124
|
+
|
|
125
|
+
**Parallel call** Codex and Gemini (`run_in_background: true`):
|
|
126
|
+
|
|
127
|
+
Distribute **original requirement** (without preset opinions) to both models:
|
|
128
|
+
|
|
129
|
+
1. **Codex Backend Analysis**:
|
|
130
|
+
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/analyzer.md`
|
|
131
|
+
- Focus: Technical feasibility, architecture impact, performance considerations, potential risks
|
|
132
|
+
- OUTPUT: Multi-perspective solutions + pros/cons analysis
|
|
133
|
+
|
|
134
|
+
2. **Gemini Frontend Analysis**:
|
|
135
|
+
- ROLE_FILE: `~/.claude/.ccg/prompts/gemini/analyzer.md`
|
|
136
|
+
- Focus: UI/UX impact, user experience, visual design
|
|
137
|
+
- OUTPUT: Multi-perspective solutions + pros/cons analysis
|
|
138
|
+
|
|
139
|
+
Wait for both models' complete results with `TaskOutput`. **Save SESSION_ID** (`CODEX_SESSION` and `GEMINI_SESSION`).
|
|
140
|
+
|
|
141
|
+
#### 2.2 Cross-Validation
|
|
142
|
+
|
|
143
|
+
Integrate perspectives and iterate for optimization:
|
|
144
|
+
|
|
145
|
+
1. **Identify consensus** (strong signal)
|
|
146
|
+
2. **Identify divergence** (needs weighing)
|
|
147
|
+
3. **Complementary strengths**: Backend logic follows Codex, Frontend design follows Gemini
|
|
148
|
+
4. **Logical reasoning**: Eliminate logical gaps in solutions
|
|
149
|
+
|
|
150
|
+
#### 2.3 (Optional but Recommended) Dual-Model Plan Draft
|
|
151
|
+
|
|
152
|
+
To reduce risk of omissions in Claude's synthesized plan, can parallel have both models output "plan drafts" (still **NOT allowed** to modify files):
|
|
153
|
+
|
|
154
|
+
1. **Codex Plan Draft** (Backend authority):
|
|
155
|
+
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/architect.md`
|
|
156
|
+
- OUTPUT: Step-by-step plan + pseudo-code (focus: data flow/edge cases/error handling/test strategy)
|
|
157
|
+
|
|
158
|
+
2. **Gemini Plan Draft** (Frontend authority):
|
|
159
|
+
- ROLE_FILE: `~/.claude/.ccg/prompts/gemini/architect.md`
|
|
160
|
+
- OUTPUT: Step-by-step plan + pseudo-code (focus: information architecture/interaction/accessibility/visual consistency)
|
|
161
|
+
|
|
162
|
+
Wait for both models' complete results with `TaskOutput`, record key differences in their suggestions.
|
|
163
|
+
|
|
164
|
+
#### 2.4 Generate Implementation Plan (Claude Final Version)
|
|
165
|
+
|
|
166
|
+
Synthesize both analyses, generate **Step-by-step Implementation Plan**:
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
## Implementation Plan: <Task Name>
|
|
170
|
+
|
|
171
|
+
### Task Type
|
|
172
|
+
- [ ] Frontend (→ Gemini)
|
|
173
|
+
- [ ] Backend (→ Codex)
|
|
174
|
+
- [ ] Fullstack (→ Parallel)
|
|
175
|
+
|
|
176
|
+
### Technical Solution
|
|
177
|
+
<Optimal solution synthesized from Codex + Gemini analysis>
|
|
178
|
+
|
|
179
|
+
### Implementation Steps
|
|
180
|
+
1. <Step 1> - Expected deliverable
|
|
181
|
+
2. <Step 2> - Expected deliverable
|
|
182
|
+
...
|
|
183
|
+
|
|
184
|
+
### Key Files
|
|
185
|
+
| File | Operation | Description |
|
|
186
|
+
|------|-----------|-------------|
|
|
187
|
+
| path/to/file.ts:L10-L50 | Modify | Description |
|
|
188
|
+
|
|
189
|
+
### Risks and Mitigation
|
|
190
|
+
| Risk | Mitigation |
|
|
191
|
+
|------|------------|
|
|
192
|
+
|
|
193
|
+
### SESSION_ID (for /ccg:execute use)
|
|
194
|
+
- CODEX_SESSION: <session_id>
|
|
195
|
+
- GEMINI_SESSION: <session_id>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Phase 2 End: Plan Delivery (Not Execution)
|
|
199
|
+
|
|
200
|
+
**`/ccg:plan` responsibilities end here, MUST execute the following actions**:
|
|
201
|
+
|
|
202
|
+
1. Present complete implementation plan to user (including pseudo-code)
|
|
203
|
+
2. Save plan to `.claude/plan/<feature-name>.md` (extract feature name from requirement, e.g., `user-auth`, `payment-module`)
|
|
204
|
+
3. Output prompt in **bold text** (MUST use actual saved file path):
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
**Plan generated and saved to `.claude/plan/actual-feature-name.md`**
|
|
208
|
+
|
|
209
|
+
**Please review the plan above. You can:**
|
|
210
|
+
- **Modify plan**: Tell me what needs adjustment, I'll update the plan
|
|
211
|
+
- **Execute plan**: Copy the following command to a new session
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
/ccg:execute .claude/plan/actual-feature-name.md
|
|
215
|
+
```
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
**NOTE**: The `actual-feature-name.md` above MUST be replaced with the actual saved filename!
|
|
219
|
+
|
|
220
|
+
4. **Immediately terminate current response** (Stop here. No more tool calls.)
|
|
221
|
+
|
|
222
|
+
**ABSOLUTELY FORBIDDEN**:
|
|
223
|
+
- Ask user "Y/N" then auto-execute (execution is `/ccg:execute`'s responsibility)
|
|
224
|
+
- Any write operations to production code
|
|
225
|
+
- Automatically call `/ccg:execute` or any implementation actions
|
|
226
|
+
- Continue triggering model calls when user hasn't explicitly requested modifications
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Plan Saving
|
|
231
|
+
|
|
232
|
+
After planning completes, save plan to:
|
|
233
|
+
|
|
234
|
+
- **First planning**: `.claude/plan/<feature-name>.md`
|
|
235
|
+
- **Iteration versions**: `.claude/plan/<feature-name>-v2.md`, `.claude/plan/<feature-name>-v3.md`...
|
|
236
|
+
|
|
237
|
+
Plan file write should complete before presenting plan to user.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Plan Modification Flow
|
|
242
|
+
|
|
243
|
+
If user requests plan modifications:
|
|
244
|
+
|
|
245
|
+
1. Adjust plan content based on user feedback
|
|
246
|
+
2. Update `.claude/plan/<feature-name>.md` file
|
|
247
|
+
3. Re-present modified plan
|
|
248
|
+
4. Prompt user to review or execute again
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Next Steps
|
|
253
|
+
|
|
254
|
+
After user approves, **manually** execute:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
/ccg:execute .claude/plan/<feature-name>.md
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Key Rules
|
|
263
|
+
|
|
264
|
+
1. **Plan only, no implementation** – This command does not execute any code changes
|
|
265
|
+
2. **No Y/N prompts** – Only present plan, let user decide next steps
|
|
266
|
+
3. **Trust Rules** – Backend follows Codex, Frontend follows Gemini
|
|
267
|
+
4. External models have **zero filesystem write access**
|
|
268
|
+
5. **SESSION_ID Handoff** – Plan must include `CODEX_SESSION` / `GEMINI_SESSION` at end (for `/ccg:execute resume <SESSION_ID>` use)
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Workflow - Multi-Model Collaborative Development
|
|
2
|
+
|
|
3
|
+
Multi-model collaborative development workflow (Research → Ideation → Plan → Execute → Optimize → Review), with intelligent routing: Frontend → Gemini, Backend → Codex.
|
|
4
|
+
|
|
5
|
+
Structured development workflow with quality gates, MCP services, and multi-model collaboration.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
/workflow <task description>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
- Task to develop: $ARGUMENTS
|
|
16
|
+
- Structured 6-phase workflow with quality gates
|
|
17
|
+
- Multi-model collaboration: Codex (backend) + Gemini (frontend) + Claude (orchestration)
|
|
18
|
+
- MCP service integration (ace-tool, optional) for enhanced capabilities
|
|
19
|
+
|
|
20
|
+
## Your Role
|
|
21
|
+
|
|
22
|
+
You are the **Orchestrator**, coordinating a multi-model collaborative system (Research → Ideation → Plan → Execute → Optimize → Review). Communicate concisely and professionally for experienced developers.
|
|
23
|
+
|
|
24
|
+
**Collaborative Models**:
|
|
25
|
+
- **ace-tool MCP** (optional) – Code retrieval + Prompt enhancement
|
|
26
|
+
- **Codex** – Backend logic, algorithms, debugging (**Backend authority, trustworthy**)
|
|
27
|
+
- **Gemini** – Frontend UI/UX, visual design (**Frontend expert, backend opinions for reference only**)
|
|
28
|
+
- **Claude (self)** – Orchestration, planning, execution, delivery
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Multi-Model Call Specification
|
|
33
|
+
|
|
34
|
+
**Call syntax** (parallel: `run_in_background: true`, sequential: `false`):
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
# New session call
|
|
38
|
+
Bash({
|
|
39
|
+
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}- \"$PWD\" <<'EOF'
|
|
40
|
+
ROLE_FILE: <role prompt path>
|
|
41
|
+
<TASK>
|
|
42
|
+
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
|
|
43
|
+
Context: <project context and analysis from previous phases>
|
|
44
|
+
</TASK>
|
|
45
|
+
OUTPUT: Expected output format
|
|
46
|
+
EOF",
|
|
47
|
+
run_in_background: true,
|
|
48
|
+
timeout: 3600000,
|
|
49
|
+
description: "Brief description"
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
# Resume session call
|
|
53
|
+
Bash({
|
|
54
|
+
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"$PWD\" <<'EOF'
|
|
55
|
+
ROLE_FILE: <role prompt path>
|
|
56
|
+
<TASK>
|
|
57
|
+
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
|
|
58
|
+
Context: <project context and analysis from previous phases>
|
|
59
|
+
</TASK>
|
|
60
|
+
OUTPUT: Expected output format
|
|
61
|
+
EOF",
|
|
62
|
+
run_in_background: true,
|
|
63
|
+
timeout: 3600000,
|
|
64
|
+
description: "Brief description"
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Model Parameter Notes**:
|
|
69
|
+
- `{{GEMINI_MODEL_FLAG}}`: When using `--backend gemini`, replace with `--gemini-model gemini-3-pro-preview` (note trailing space); use empty string for codex
|
|
70
|
+
|
|
71
|
+
**Role Prompts**:
|
|
72
|
+
|
|
73
|
+
| Phase | Codex | Gemini |
|
|
74
|
+
|-------|-------|--------|
|
|
75
|
+
| Analysis | `~/.claude/.ccg/prompts/codex/analyzer.md` | `~/.claude/.ccg/prompts/gemini/analyzer.md` |
|
|
76
|
+
| Planning | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/architect.md` |
|
|
77
|
+
| Review | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
|
|
78
|
+
|
|
79
|
+
**Session Reuse**: Each call returns `SESSION_ID: xxx`, use `resume xxx` subcommand for subsequent phases (note: `resume`, not `--resume`).
|
|
80
|
+
|
|
81
|
+
**Parallel Calls**: Use `run_in_background: true` to start, wait for results with `TaskOutput`. **Must wait for all models to return before proceeding to next phase**.
|
|
82
|
+
|
|
83
|
+
**Wait for Background Tasks** (use max timeout 600000ms = 10 minutes):
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**IMPORTANT**:
|
|
90
|
+
- Must specify `timeout: 600000`, otherwise default 30 seconds will cause premature timeout.
|
|
91
|
+
- If still incomplete after 10 minutes, continue polling with `TaskOutput`, **NEVER kill the process**.
|
|
92
|
+
- If waiting is skipped due to timeout, **MUST call `AskUserQuestion` to ask user whether to continue waiting or kill task. Never kill directly.**
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Communication Guidelines
|
|
97
|
+
|
|
98
|
+
1. Start responses with mode label `[Mode: X]`, initial is `[Mode: Research]`.
|
|
99
|
+
2. Follow strict sequence: `Research → Ideation → Plan → Execute → Optimize → Review`.
|
|
100
|
+
3. Request user confirmation after each phase completion.
|
|
101
|
+
4. Force stop when score < 7 or user does not approve.
|
|
102
|
+
5. Use `AskUserQuestion` tool for user interaction when needed (e.g., confirmation/selection/approval).
|
|
103
|
+
|
|
104
|
+
## When to Use External Orchestration
|
|
105
|
+
|
|
106
|
+
Use external tmux/worktree orchestration when the work must be split across parallel workers that need isolated git state, independent terminals, or separate build/test execution. Use in-process subagents for lightweight analysis, planning, or review where the main session remains the only writer.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
node scripts/orchestrate-worktrees.js .claude/plan/workflow-e2e-test.json --execute
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Execution Workflow
|
|
115
|
+
|
|
116
|
+
**Task Description**: $ARGUMENTS
|
|
117
|
+
|
|
118
|
+
### Phase 1: Research & Analysis
|
|
119
|
+
|
|
120
|
+
`[Mode: Research]` - Understand requirements and gather context:
|
|
121
|
+
|
|
122
|
+
1. **Prompt Enhancement** (if ace-tool MCP available): Call `mcp__ace-tool__enhance_prompt`, **replace original $ARGUMENTS with enhanced result for all subsequent Codex/Gemini calls**. If unavailable, use `$ARGUMENTS` as-is.
|
|
123
|
+
2. **Context Retrieval** (if ace-tool MCP available): Call `mcp__ace-tool__search_context`. If unavailable, use built-in tools: `Glob` for file discovery, `Grep` for symbol search, `Read` for context gathering, `Task` (Explore agent) for deeper exploration.
|
|
124
|
+
3. **Requirement Completeness Score** (0-10):
|
|
125
|
+
- Goal clarity (0-3), Expected outcome (0-3), Scope boundaries (0-2), Constraints (0-2)
|
|
126
|
+
- ≥7: Continue | <7: Stop, ask clarifying questions
|
|
127
|
+
|
|
128
|
+
### Phase 2: Solution Ideation
|
|
129
|
+
|
|
130
|
+
`[Mode: Ideation]` - Multi-model parallel analysis:
|
|
131
|
+
|
|
132
|
+
**Parallel Calls** (`run_in_background: true`):
|
|
133
|
+
- Codex: Use analyzer prompt, output technical feasibility, solutions, risks
|
|
134
|
+
- Gemini: Use analyzer prompt, output UI feasibility, solutions, UX evaluation
|
|
135
|
+
|
|
136
|
+
Wait for results with `TaskOutput`. **Save SESSION_ID** (`CODEX_SESSION` and `GEMINI_SESSION`).
|
|
137
|
+
|
|
138
|
+
**Follow the `IMPORTANT` instructions in `Multi-Model Call Specification` above**
|
|
139
|
+
|
|
140
|
+
Synthesize both analyses, output solution comparison (at least 2 options), wait for user selection.
|
|
141
|
+
|
|
142
|
+
### Phase 3: Detailed Planning
|
|
143
|
+
|
|
144
|
+
`[Mode: Plan]` - Multi-model collaborative planning:
|
|
145
|
+
|
|
146
|
+
**Parallel Calls** (resume session with `resume <SESSION_ID>`):
|
|
147
|
+
- Codex: Use architect prompt + `resume $CODEX_SESSION`, output backend architecture
|
|
148
|
+
- Gemini: Use architect prompt + `resume $GEMINI_SESSION`, output frontend architecture
|
|
149
|
+
|
|
150
|
+
Wait for results with `TaskOutput`.
|
|
151
|
+
|
|
152
|
+
**Follow the `IMPORTANT` instructions in `Multi-Model Call Specification` above**
|
|
153
|
+
|
|
154
|
+
**Claude Synthesis**: Adopt Codex backend plan + Gemini frontend plan, save to `.claude/plan/task-name.md` after user approval.
|
|
155
|
+
|
|
156
|
+
### Phase 4: Implementation
|
|
157
|
+
|
|
158
|
+
`[Mode: Execute]` - Code development:
|
|
159
|
+
|
|
160
|
+
- Strictly follow approved plan
|
|
161
|
+
- Follow existing project code standards
|
|
162
|
+
- Request feedback at key milestones
|
|
163
|
+
|
|
164
|
+
### Phase 5: Code Optimization
|
|
165
|
+
|
|
166
|
+
`[Mode: Optimize]` - Multi-model parallel review:
|
|
167
|
+
|
|
168
|
+
**Parallel Calls**:
|
|
169
|
+
- Codex: Use reviewer prompt, focus on security, performance, error handling
|
|
170
|
+
- Gemini: Use reviewer prompt, focus on accessibility, design consistency
|
|
171
|
+
|
|
172
|
+
Wait for results with `TaskOutput`. Integrate review feedback, execute optimization after user confirmation.
|
|
173
|
+
|
|
174
|
+
**Follow the `IMPORTANT` instructions in `Multi-Model Call Specification` above**
|
|
175
|
+
|
|
176
|
+
### Phase 6: Quality Review
|
|
177
|
+
|
|
178
|
+
`[Mode: Review]` - Final evaluation:
|
|
179
|
+
|
|
180
|
+
- Check completion against plan
|
|
181
|
+
- Run tests to verify functionality
|
|
182
|
+
- Report issues and recommendations
|
|
183
|
+
- Request final user confirmation
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Key Rules
|
|
188
|
+
|
|
189
|
+
1. Phase sequence cannot be skipped (unless user explicitly instructs)
|
|
190
|
+
2. External models have **zero filesystem write access**, all modifications by Claude
|
|
191
|
+
3. **Force stop** when score < 7 or user does not approve
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Sequential and tmux/worktree orchestration guidance for multi-agent workflows.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Orchestrate Command
|
|
6
|
+
|
|
7
|
+
Sequential agent workflow for complex tasks.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
`/orchestrate [workflow-type] [task-description]`
|
|
12
|
+
|
|
13
|
+
## Workflow Types
|
|
14
|
+
|
|
15
|
+
### feature
|
|
16
|
+
Full feature implementation workflow:
|
|
17
|
+
```
|
|
18
|
+
planner -> tdd-guide -> code-reviewer -> security-reviewer
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### bugfix
|
|
22
|
+
Bug investigation and fix workflow:
|
|
23
|
+
```
|
|
24
|
+
planner -> tdd-guide -> code-reviewer
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### refactor
|
|
28
|
+
Safe refactoring workflow:
|
|
29
|
+
```
|
|
30
|
+
architect -> code-reviewer -> tdd-guide
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### security
|
|
34
|
+
Security-focused review:
|
|
35
|
+
```
|
|
36
|
+
security-reviewer -> code-reviewer -> architect
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Execution Pattern
|
|
40
|
+
|
|
41
|
+
For each agent in the workflow:
|
|
42
|
+
|
|
43
|
+
1. **Invoke agent** with context from previous agent
|
|
44
|
+
2. **Collect output** as structured handoff document
|
|
45
|
+
3. **Pass to next agent** in chain
|
|
46
|
+
4. **Aggregate results** into final report
|
|
47
|
+
|
|
48
|
+
## Handoff Document Format
|
|
49
|
+
|
|
50
|
+
Between agents, create handoff document:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## HANDOFF: [previous-agent] -> [next-agent]
|
|
54
|
+
|
|
55
|
+
### Context
|
|
56
|
+
[Summary of what was done]
|
|
57
|
+
|
|
58
|
+
### Findings
|
|
59
|
+
[Key discoveries or decisions]
|
|
60
|
+
|
|
61
|
+
### Files Modified
|
|
62
|
+
[List of files touched]
|
|
63
|
+
|
|
64
|
+
### Open Questions
|
|
65
|
+
[Unresolved items for next agent]
|
|
66
|
+
|
|
67
|
+
### Recommendations
|
|
68
|
+
[Suggested next steps]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Example: Feature Workflow
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/orchestrate feature "Add user authentication"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Executes:
|
|
78
|
+
|
|
79
|
+
1. **Planner Agent**
|
|
80
|
+
- Analyzes requirements
|
|
81
|
+
- Creates implementation plan
|
|
82
|
+
- Identifies dependencies
|
|
83
|
+
- Output: `HANDOFF: planner -> tdd-guide`
|
|
84
|
+
|
|
85
|
+
2. **TDD Guide Agent**
|
|
86
|
+
- Reads planner handoff
|
|
87
|
+
- Writes tests first
|
|
88
|
+
- Implements to pass tests
|
|
89
|
+
- Output: `HANDOFF: tdd-guide -> code-reviewer`
|
|
90
|
+
|
|
91
|
+
3. **Code Reviewer Agent**
|
|
92
|
+
- Reviews implementation
|
|
93
|
+
- Checks for issues
|
|
94
|
+
- Suggests improvements
|
|
95
|
+
- Output: `HANDOFF: code-reviewer -> security-reviewer`
|
|
96
|
+
|
|
97
|
+
4. **Security Reviewer Agent**
|
|
98
|
+
- Security audit
|
|
99
|
+
- Vulnerability check
|
|
100
|
+
- Final approval
|
|
101
|
+
- Output: Final Report
|
|
102
|
+
|
|
103
|
+
## Final Report Format
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
ORCHESTRATION REPORT
|
|
107
|
+
====================
|
|
108
|
+
Workflow: feature
|
|
109
|
+
Task: Add user authentication
|
|
110
|
+
Agents: planner -> tdd-guide -> code-reviewer -> security-reviewer
|
|
111
|
+
|
|
112
|
+
SUMMARY
|
|
113
|
+
-------
|
|
114
|
+
[One paragraph summary]
|
|
115
|
+
|
|
116
|
+
AGENT OUTPUTS
|
|
117
|
+
-------------
|
|
118
|
+
Planner: [summary]
|
|
119
|
+
TDD Guide: [summary]
|
|
120
|
+
Code Reviewer: [summary]
|
|
121
|
+
Security Reviewer: [summary]
|
|
122
|
+
|
|
123
|
+
FILES CHANGED
|
|
124
|
+
-------------
|
|
125
|
+
[List all files modified]
|
|
126
|
+
|
|
127
|
+
TEST RESULTS
|
|
128
|
+
------------
|
|
129
|
+
[Test pass/fail summary]
|
|
130
|
+
|
|
131
|
+
SECURITY STATUS
|
|
132
|
+
---------------
|
|
133
|
+
[Security findings]
|
|
134
|
+
|
|
135
|
+
RECOMMENDATION
|
|
136
|
+
--------------
|
|
137
|
+
[SHIP / NEEDS WORK / BLOCKED]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Parallel Execution
|
|
141
|
+
|
|
142
|
+
For independent checks, run agents in parallel:
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
### Parallel Phase
|
|
146
|
+
Run simultaneously:
|
|
147
|
+
- code-reviewer (quality)
|
|
148
|
+
- security-reviewer (security)
|
|
149
|
+
- architect (design)
|
|
150
|
+
|
|
151
|
+
### Merge Results
|
|
152
|
+
Combine outputs into single report
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
For external tmux-pane workers with separate git worktrees, use `node scripts/orchestrate-worktrees.js plan.json --execute`. The built-in orchestration pattern stays in-process; the helper is for long-running or cross-harness sessions.
|
|
156
|
+
|
|
157
|
+
When workers need to see dirty or untracked local files from the main checkout, add `seedPaths` to the plan file. ECC overlays only those selected paths into each worker worktree after `git worktree add`, which keeps the branch isolated while still exposing in-flight local scripts, plans, or docs.
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"sessionName": "workflow-e2e",
|
|
162
|
+
"seedPaths": [
|
|
163
|
+
"scripts/orchestrate-worktrees.js",
|
|
164
|
+
"scripts/lib/tmux-worktree-orchestrator.js",
|
|
165
|
+
".claude/plan/workflow-e2e-test.json"
|
|
166
|
+
],
|
|
167
|
+
"workers": [
|
|
168
|
+
{ "name": "docs", "task": "Update orchestration docs." }
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
To export a control-plane snapshot for a live tmux/worktree session, run:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
node scripts/orchestration-status.js .claude/plan/workflow-visual-proof.json
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The snapshot includes session activity, tmux pane metadata, worker states, objectives, seeded overlays, and recent handoff summaries in JSON form.
|
|
180
|
+
|
|
181
|
+
## Operator Command-Center Handoff
|
|
182
|
+
|
|
183
|
+
When the workflow spans multiple sessions, worktrees, or tmux panes, append a control-plane block to the final handoff:
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
CONTROL PLANE
|
|
187
|
+
-------------
|
|
188
|
+
Sessions:
|
|
189
|
+
- active session ID or alias
|
|
190
|
+
- branch + worktree path for each active worker
|
|
191
|
+
- tmux pane or detached session name when applicable
|
|
192
|
+
|
|
193
|
+
Diffs:
|
|
194
|
+
- git status summary
|
|
195
|
+
- git diff --stat for touched files
|
|
196
|
+
- merge/conflict risk notes
|
|
197
|
+
|
|
198
|
+
Approvals:
|
|
199
|
+
- pending user approvals
|
|
200
|
+
- blocked steps awaiting confirmation
|
|
201
|
+
|
|
202
|
+
Telemetry:
|
|
203
|
+
- last activity timestamp or idle signal
|
|
204
|
+
- estimated token or cost drift
|
|
205
|
+
- policy events raised by hooks or reviewers
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
This keeps planner, implementer, reviewer, and loop workers legible from the operator surface.
|
|
209
|
+
|
|
210
|
+
## Arguments
|
|
211
|
+
|
|
212
|
+
$ARGUMENTS:
|
|
213
|
+
- `feature <description>` - Full feature workflow
|
|
214
|
+
- `bugfix <description>` - Bug fix workflow
|
|
215
|
+
- `refactor <description>` - Refactoring workflow
|
|
216
|
+
- `security <description>` - Security review workflow
|
|
217
|
+
- `custom <agents> <description>` - Custom agent sequence
|
|
218
|
+
|
|
219
|
+
## Custom Workflow Example
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
/orchestrate custom "architect,tdd-guide,code-reviewer" "Redesign caching layer"
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Tips
|
|
226
|
+
|
|
227
|
+
1. **Start with planner** for complex features
|
|
228
|
+
2. **Always include code-reviewer** before merge
|
|
229
|
+
3. **Use security-reviewer** for auth/payment/PII
|
|
230
|
+
4. **Keep handoffs concise** - focus on what next agent needs
|
|
231
|
+
5. **Run verification** between agents if needed
|