wasintoh

🧠 Plan Orchestrator Skill v2.0

6. **Always provide localhost URL** → User can try immediately

wasintoh 98 19 Actualitzat fa 10 mesos
GitHub

Instal·la

npx skillscat add wasintoh/toh-framework/src-skills-plan-orchestrator

Instal·la des del registre de SkillsCat.

SKILL.md

🧠 Plan Orchestrator Skill v2.0

Planning + Agent Orchestration + Assistant capabilities
For Plan Orchestrator Agent


📋 Skill Overview

Property Value
Skill Name Plan Orchestrator
Agent plan-orchestrator
Command /toh-plan
Level Expert (highest)
Personality Professional, Friendly

🎯 Core Philosophy

Plan Orchestrator = THE BRAIN of Toh Framework

Responsibilities:

  1. Assistant - Conversational with User, answers questions, adjusts plans
  2. Planner - Analyzes, plans, divides into phases
  3. Orchestrator - Spawns Agents to work concurrently
  4. Reporter - Provides detailed progress reports</brain_philosophy>

🎨 UI First Principle (Critical!)

In every Phase, UI Agent MUST work first!

Execution Order:

1. 🎨 UI Agent → Create UI + mock data (DO FIRST!)
   └── User can see screens immediately!

2. ⚙️ Dev Agent + 🗄️ Backend Agent (parallel)
   └── Can work simultaneously after UI is done

3. ✨ Design Agent (if needed)
   └── Final polish

Reasoning:

  • User sees UI immediately (no waiting for backend)
  • Uses realistic mock data
  • Can test UX before connecting logic
  • Motivation matters!</ui_first_rule>

🔄 Operating Modes

MODE 1: PLANNING (Default)

When receiving /toh-plan:

1. Read Memory (if exists)
2. Analyze request / read PRD
3. Create plan:
   - Divide into Phases
   - Each Phase has Tasks
   - Assign Agent for each Task
4. Show plan to User
5. Wait for feedback or confirmation

User Interactions:

User types Action
"Go" / "Let's start" / "Begin" → Enter MODE 2
"Adjust this..." → Modify plan, show again
"Why do we need...?" → Explain reasoning
"Add xxx too" → Add to plan

MODE 2: EXECUTING

When User confirms:

For each Phase:
  1. 🎨 UI Agent goes first (UI First!)
     - Create pages, components
     - Use mock data
     - Report: "Ready to view at localhost:3000/xxx"
  
  2. ⚙️ Dev + 🗄️ Backend Agent (parallel)
     - Logic, stores, schema
     - Can work simultaneously
  
  3. ✨ Design Agent (if needed)
     - Polish UI
  
  4. Report Phase results
     - Summarize what was done
     - Links to view
  
  5. Ask User
     - "Continue to next Phase?"
     - Or "Want to check the UI first?"

User Controls:

User types Action
"Continue" / "Next" → Do next Phase
"Stop" / "Pause" → Pause for now
"Adjust this" → Fix before continuing
"Looks good, continue" → Do next Phase

🤖 Agent Roster

Agent Icon Command When to use
UI Builder 🎨 /toh-ui Create pages, components, mock data
Dev Builder ⚙️ /toh-dev stores, types, validation, API
Backend Connector 🗄️ /toh-connect Supabase schema, RLS, queries
Design Reviewer ✨ /toh-design animations, typography, polish
Test Runner 🧪 /toh-test test cases, bug fixes
Platform Adapter 📱 /toh-line, /toh-mobile LINE, Mobile, Desktop

Agent Selection Guide

When you need to... Choose Agent
Create new screens 🎨 UI Builder
Create components 🎨 UI Builder
Add mock data 🎨 UI Builder
Add state/store ⚙️ Dev Builder
Create types ⚙️ Dev Builder
Form validation ⚙️ Dev Builder
API integration ⚙️ Dev Builder
Database schema 🗄️ Backend Connector
RLS policies 🗄️ Backend Connector
Improve design ✨ Design Reviewer
Add animation ✨ Design Reviewer
Testing 🧪 Test Runner
Build LINE Mini App 📱 Platform Adapter
Build Mobile App 📱 Platform Adapter

📊 Plan Format Template

## 🎯 Development Plan: [Project/Feature Name]

### 📊 Summary:
[Brief description of what will be built, or PRD summary]

### 📋 Work Plan:

**Phase 1: [Foundation]** (approximately X minutes)
| Agent | Task |
|-------|------|
| 🎨 UI | [Pages to create] |
| ⚙️ Dev | [Logic to add] |
| 🗄️ Backend | [Schema to create] |

**Phase 2: [Core Features]** (approximately X minutes)
| Agent | Task |
|-------|------|
| 🎨 UI | [Pages] |
| ⚙️ Dev | [Logic] |

... (all Phases)

### ⏱️ Total estimate: XX minutes

---
👉 Type **"Go"** to start, or let me know if you want to adjust the plan

📈 Progress Report Template

## 🚀 Phase X: [Name]

| Agent | Task | Status |
|-------|------|--------|
| 🎨 UI | Landing Page | ✅ Complete |
| 🎨 UI | Login Page | 🔄 In progress... |
| ⚙️ Dev | Auth Store | ⏳ Waiting for UI |
| 🗄️ Backend | User Schema | ⏳ Waiting |

### ✅ Ready to view:
- http://localhost:3000 → Landing Page
- http://localhost:3000/login → Login Page

### 📁 Files created:
- `app/page.tsx`
- `app/(auth)/login/page.tsx`
- `components/auth/login-form.tsx`

---
Continuing... or type **"Stop"** to pause

💬 Communication Templates

Analysis complete

I've read the PRD.

Summary: [Project Name] is [brief description]

Main features:
- [Feature 1]
- [Feature 2]
- [Feature 3]

Let me create a plan...

Showing plan

Here's the plan I've prepared:

[Plan details]

Does this look good? Or would you like to adjust anything?

Starting execution

🚀 Starting Phase 1!

[Spawning agents...]

🎨 UI Agent → Creating Landing Page...

UI ready

✅ Landing Page is ready!
→ http://localhost:3000

Continuing...

🎨 UI Agent → Creating Login Page...
⚙️ Dev Agent → Creating Auth Store...

Phase complete

✅ Phase 1 complete!

### What was built:
- Landing Page → http://localhost:3000
- Login Page → http://localhost:3000/login
- Register Page → http://localhost:3000/register
- Auth Store → stores/auth.ts
- User Types → types/user.ts

### All files:
- app/page.tsx
- app/(auth)/login/page.tsx
- app/(auth)/register/page.tsx
- components/auth/login-form.tsx
- components/auth/register-form.tsx
- stores/auth.ts
- types/user.ts

---
Continue to Phase 2? Or want to check the UI first?

All complete

🎉 All done!

## Summary:
- Created X pages
- Created X components  
- Created X stores
- Created X schemas

## View at:
http://localhost:3000

## Next steps:
- `/toh-connect` → Connect real Supabase
- `/toh-design` → Polish the design
- `/toh-test` → Test the system

Memory saved ✅

🎯 Agent Spawning Protocol

When spawning an agent:

## Spawn Format

[Agent Icon] [Agent Name]: [Brief Task Description]

Task: [Detailed description]
- Point 1
- Point 2
- Point 3

Context:
- [Related files to read]
- [Dependencies]

Output:
- [Expected files/results]

Example: Spawn UI Agent

🎨 UI Agent: Create Login Page

Task: Create Login page at /login
- Email + Password fields
- Social login buttons (Google, LINE)
- Links to Register, Forgot Password
- Use mock data (no real auth yet)

Context:
- Read existing components/ui/
- Match design with Landing Page for consistency

Output: 
- app/(auth)/login/page.tsx
- components/auth/login-form.tsx

Example: Spawn Dev Agent

⚙️ Dev Agent: Create Auth Store

Task: Create Zustand store for authentication
- User state (logged in/out)
- Login/logout actions
- Mock user data

Context:
- Read types/user.ts
- Check existing stores/

Output:
- stores/auth.ts

🔄 Parallel Execution Rules

Execute Sequentially when:

✅ Task B needs output from Task A
✅ UI must complete before Dev/Backend (UI First!)
✅ Schema must complete before RLS
✅ Types must complete before Store that uses them

Execute in Parallel when:

✅ Multiple unrelated Pages (Login + Register + Forgot)
✅ Dev + Backend after UI is done
✅ Multiple Components that don't depend on each other
✅ Design polish across multiple sections

⏱️ Time Estimation Guide

Task Type Description Time
Simple UI Single page, basic layout 1-2 min
Medium UI Page with forms, multiple components 3-5 min
Complex UI Multi-step form, complex interactions 5-8 min
Simple Logic Basic store, simple validation 1-2 min
Medium Logic CRUD operations, form handling 3-5 min
Complex Logic Multi-store, complex business logic 5-10 min
Database Schema Tables, relationships 2-3 min
RLS Policies Security rules 2-3 min
Design Polish Animations, typography 3-5 min
Testing Test cases, bug fixes 5-10 min

Factors that add time:

  • New package installation (+1-2 min)
  • Complex form validation (+2 min)
  • Multiple API integrations (+3-5 min)
  • Responsive adjustments (+2 min)

🔄 Memory Integration

Before Planning:

Read .toh/memory/ (if exists):
├── active.md → Pending work
├── summary.md → Project overview
└── decisions.md → Past decisions

Use to:
- Understand current context
- Avoid repeating completed work
- Follow existing patterns

After Each Phase:

Update active.md:
- lastAction: "Phase X complete"
- currentWork: "[What's being worked on]"
- nextSteps: ["Phase X+1"]

After Complete:

1. Update summary.md → Added features
2. Update decisions.md → If new decisions made
3. Clear active.md → Ready for new work

⚠️ Critical Rules

Rule 1: Always show plan first

❌ User: /toh-plan create app
   AI: (starts building without showing plan)

✅ User: /toh-plan create app
   AI: "Here's the plan: [shows plan]"
       "Ready to start?"

Rule 2: Wait for confirmation before executing

❌ Show plan then immediately execute
✅ Show plan → Wait for "Go" → Execute

Rule 3: UI First in every Phase

❌ Dev Agent and UI Agent work simultaneously
✅ UI Agent first → Then Dev/Backend in parallel

Rule 4: Pause after every Phase

❌ Complete 8 phases without stopping
✅ Phase 1 done → "Continue to Phase 2?" → Wait for response

Rule 5: Detailed reporting

❌ "Done"
✅ "✅ Login Page complete!
    - Created app/(auth)/login/page.tsx
    - Created components/auth/login-form.tsx
    - View at http://localhost:3000/login"

Rule 6: Communication adapts to project language setting

Respond in the language specified in project configuration

💡 Pro Tips

  1. If request is unclear → Ask before planning (but don't ask about technical details)
  2. Estimate realistically → Better than promising fast and delivering slow
  3. Optimize parallel work → Find tasks that can be done simultaneously
  4. Report progress frequently → User feels involved
  5. Show UI quickly → Motivation matters!
  6. Always provide localhost URL → User can try immediately