MAIN ORCHESTRATOR. Use ALWAYS when starting a new task, feature, bug fix, or refactoring. Coordinates subagents for research, planning, and review. Each phase = separate subagent with file handoff to avoid compact. Results are written to docs/plans/[slug]/ as Epic → Stories → Tasks.
You are the conductor. You coordinate specialized subagents, each working in isolation and writing results to a file. This guarantees: no compact, full documentation, maximum quality at every phase.
This skill does NOT duplicate instructions.md (pilot/copilot, approval flow, stop-list).
Acuity PPM has custom business logic that often differs from common patterns. NEVER assume how business logic should work — always ask the human.
This applies to EVERY phase (Phase 1, Phase 2.5, Phase 5):
Examples:
Automatically determine the task scope, propose a mode, and wait for confirmation:
"I estimate this as 🟡 MEDIUM (bug fix, 2 layers — Rails + Hasura). OK?"
The human can agree or change the mode.
Typo fix, config change, minor CSS, add one field.
Bug fix, small feature in 1-2 layers.
Large feature across multiple layers, refactoring.
Default is MEDIUM. Escalate to FULL if the task touches 3+ layers or is obviously large.
For each task (MEDIUM/FULL) a directory is created:
docs/plans/[YYYY-MM-DD]-[slug]/
├── epic.md ← Phase 1: task description + clarifications
├── research-rails.md ← Phase 2a: rails-researcher findings
├── research-hasura.md ← Phase 2b: hasura-researcher findings
├── research-types.md ← Phase 2c: required types (typescript-deriver)
├── research-react.md ← Phase 2d: frontend plan (react-planner)
├── plan.md ← Phase 3: assembled plan (Epic → Stories → Tasks)
├── senior-review.md ← Phase 4: architect review
├── execution-log.md ← Phase 5: execution log (updated as you go)
├── checkpoint-review.md ← Phase 5 (FULL only): backend checkpoint review
├── code-review.md ← Phase 6: code review results
└── final-review.md ← Phase 7: final verification
Not all files are required — depends on mode and affected layers.
Who: You (orchestrator), no subagents. Context: Minimal — only conversation with the human.
epic.md:# Epic: [Task Name]
Date: YYYY-MM-DD
Status: 🟡 Planning
Mode: Full / Medium / Quick
## Description
[What needs to be done — in business terms]
## Business Context
[Why this is needed, what outcome is expected]
## Affected Layers
- [x] Rails backend
- [x] Hasura metadata/permissions
- [x] Frontend (React/TypeScript)
- [ ] Database migrations
## Clarifications
- [Answers to questions if any were asked]
## Constraints / Edge Cases
- [If known]
Key principle: Each subagent works in ISOLATION, reads code, writes summary to a file, and EXITS. Context is freed. The next subagent reads only files.
Execution order:
Modifying existing: New feature from scratch:
2a (rails) ──┐ PARALLEL 2a (rails) ─→ 2b (hasura) SEQUENTIAL
├─→ 2c → 2d ├─→ 2c → 2d
2b (hasura) ─┘
Call subagent: rails-researcher
Input: epic.md
What it does: Researches rails_api/ — models, controllers, services, migrations,
tests. Finds existing code to modify or use as a pattern.
Output: research-rails.md
Then: EXIT
Call subagent: hasura-researcher
Input: epic.md
What it does: Researches hasura/metadata/ — schema, relationships, permissions,
actions, functions. Understands how new changes fit into the permission model.
Output: research-hasura.md
Then: EXIT
Call subagent: typescript-deriver
Input: epic.md + research-rails.md + research-hasura.md
What it does: Based on backend research, determines which TypeScript types
need to be created or modified. Looks at existing types in the project.
Output: research-types.md
Then: EXIT
Call subagent: react-planner
Input: epic.md + research-types.md
What it does: Plans React components, hooks, queries/mutations.
Uses types from the previous phase, looks for existing patterns in code.
Output: research-react.md
Then: EXIT
IMPORTANT: If the task only affects Frontend (no Rails/Hasura) — skip 2a and 2b, but still run 2c (types) and 2d (react). Typescript-deriver in this case looks at existing API types and DB schema.
Who: You (orchestrator), no subagents. Context: epic.md + all research-*.md files.
After research, subagents may have uncovered ambiguities, alternatives, or decisions that the human should make. Always ask before Phase 3 if there is at least one question.
Typical questions after research:
Technical alternatives:
Implementation variants (business level):
Acuity specifics (when something non-standard is found):
Rules:
Who: You (orchestrator). What you read: All research-*.md files (NOT raw code — only summaries).
Create plan.md in Epic → Stories → Tasks format:
# Plan: [Name]
Date: YYYY-MM-DD
Status: 🟡 Awaiting Approval
Based on: epic.md, research-rails.md, research-hasura.md, research-types.md, research-react.md
---
## Story 1.1: [Database / Migrations]
> [1-2 sentences about what we're doing and why]
- [ ] Task 1.1.1: [Specific action]
- [ ] Task 1.1.2: [Specific action]
- [ ] Task 1.1.3: Write RSpec tests for migrations
## Story 1.2: [Rails Backend]
> [1-2 sentences]
- [ ] Task 1.2.1: [Specific action]
- [ ] Task 1.2.2: [Specific action]
- [ ] Task 1.2.3: Update Blueprinter serializer
- [ ] Task 1.2.4: Write RSpec model + request specs
## Story 1.3: [Hasura Configuration]
> [1-2 sentences]
- [ ] Task 1.3.1: [Specific action]
- [ ] Task 1.3.2: Configure permissions for `user` role
- [ ] Task 1.3.3: Verify metadata consistency
## Story 1.4: [TypeScript Types]
> [1-2 sentences]
- [ ] Task 1.4.1: Create/update types for API response
- [ ] Task 1.4.2: Create/update GraphQL query types
- [ ] Task 1.4.3: Create/update form/component prop types
## Story 1.5: [React Frontend]
> [1-2 sentences]
- [ ] Task 1.5.1: [Specific action]
- [ ] Task 1.5.2: [Specific action]
- [ ] Task 1.5.3: Handle error/loading/empty states
- [ ] Task 1.5.4: Write Jest tests
## Story 1.6: Quality Assurance
- [ ] Task 1.6.1: Run full test suite (RSpec + Jest)
- [ ] Task 1.6.2: Run quality checks (tsc, lint, prettier)
- [ ] Task 1.6.3: Code review (code-reviewer agent)
- [ ] Task 1.6.4: Final senior review (architect agent)
---
## Execution Order
Story 1.1 → 1.2 → 1.3 → 1.4 → 1.5 → 1.6
## Open Questions
- [If subagents found something unclear — here]
## Risks
- [From research files]
Rules:
Show the plan to the human and wait for approval.
Call subagent: architect
Input: epic.md + plan.md + all research-*.md
What it does:
senior-review.md
Then: EXITIf architect found issues — show to the human and update plan.md.
Who: You (orchestrator), no subagents. Why not subagents: Execution requires interaction with the human (approval, questions).
Create execution-log.md and work through Stories:
1. Re-read plan.md — where you are now
2. Execute task
3. Update plan.md — mark [x]
4. Add entry to execution-log.md:
### ✅ Task 1.2.1: [name]
**Timestamp:** HH:MM (start) → HH:MM (done) ← track both for duration
**Done:**
- [specific changes]
**Files changed:**
- `path/to/file` — [what]
**Decisions made:**
- [if chose between options]
**Open questions:**
- [if something unclear for next tasks]
When the task is fully complete (after Phase 7), append a ## Metrics section:
## Metrics
**Phase durations:**
- Phase 1 (epic): ~5 min
- Phase 2 (research): ~12 min (4 subagents)
- Phase 3 (plan assembly): ~3 min
- Phase 4 (senior plan review): ~4 min
- Phase 5 (execution): ~75 min
- Phase 6 (code review): ~6 min
- Phase 7 (final review): ~3 min
- **Total wall-clock: ~108 min**
**Scope:**
- Stories: 5/5 completed
- Tasks: 22/22 completed
- Files changed: 17 (+432 / -38)
- Layers touched: Rails, Hasura, Frontend
**Review output:**
- Critical: 0
- High: 1 (fixed before merge)
- Medium: 4 (documented, deferred)
- Low: 7 (documented)
**Subagent calls:** rails-researcher, hasura-researcher, typescript-deriver,
react-planner, architect (×2), code-reviewer
Metrics are approximate (wall-clock since start of task is enough — no need to time each subagent precisely). Purpose: identify bottlenecks across tasks over time (e.g. "research keeps taking 15+ min — consider caching repeat lookups").
In FULL mode — after completing backend stories (DB + Rails + Hasura),
before moving to frontend call code-reviewer subagent for checkpoint:
Story 1.1 (DB) → Story 1.2 (Rails) → Story 1.3 (Hasura)
↓
🔍 Backend Checkpoint (code-reviewer subagent)
→ Checks: N+1, multi-tenant, permissions, tests
→ Writes: checkpoint-review.md
→ If 🔴 Critical — fix BEFORE moving to frontend
↓
Story 1.4 (Types) → Story 1.5 (React) → Story 1.6 (QA)
↓
🔍 Full Code Review (Phase 6 — as usual)
This ensures frontend is built on verified backend. In MEDIUM mode — this step is skipped (one review at the end is sufficient).
If compact occurred:
find docs/plans -name "plan.md" -mtime -7 — find active planCall subagent: code-reviewer
Input: plan.md + execution-log.md + git diff
What it does:
code-review.md
Then: EXITIf there are 🔴 Critical — fix and run code-reviewer again.
Call subagent: architect
Input: plan.md + execution-log.md + code-review.md
What it checks:
final-review.md
Then: EXITAfter Phase 7:
Update epic.md — Status: ✅ Done
Update plan.md — Status: ✅ Done
Memory distillation (optional but recommended). Scan epic.md, plan.md, senior-review.md, code-review.md, final-review.md for non-obvious learnings worth persisting across sessions:
project memoryfeedback memoryreference memoryuser memoryDo NOT save:
If nothing clearly non-obvious emerged, skip this step entirely — noise in memory is costly.
Give the human a summary:
Task "[name]" completed.
Stories completed: N/N
Files changed: [count]
Tests: ✅ RSpec passing, ✅ Jest passing
Code review: ✅ No critical issues
Final review: ✅ Approved
Memory: [1 new entry | nothing worth saving]
Documentation: docs/plans/[slug]/
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer