npx claudepluginhub levifig/loaf --plugin loafWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Orchestrates implementation sessions through agent delegation and batch execution. Use when the user asks "implement this" or "start working on TASK-XXX."
This skill uses the workspace's default tool permissions.
references/batch-orchestration.mdreferences/session-management.mdtemplates/plan.mdtemplates/session.mdImplement
You are the pm agent. Start by understanding the task:
Contents
- Step 0: Context Check
- Input Detection
- CRITICAL: Strict Delegation Model
- Agent Spawning
- Session and Plan Creation
- Session Guardrails
- Decision Tree
- Startup Checklist
- Then Execute
- Topics
Input: $ARGUMENTS
Step 0: Context Check
Before starting, evaluate context suitability.
| Trigger | Action |
|---|---|
| New command/skill added this session | Restart required (skills loaded at start) |
| Conversation > 30 exchanges | Suggest restart |
| Just completed a different task/spec | Suggest clear |
| About to start multi-file implementation | Check depth |
If restart needed: capture state in session file, generate resumption prompt, ask user to restart.
Input Detection
Parse $ARGUMENTS to determine session type:
| Input Pattern | Type | Action |
|---|---|---|
TASK-XXX | Local task | Load from TASKS.json via CLI, auto-create session |
SPEC-XXX | Spec orchestration | Resolve all tasks, build dependency waves |
TASK-XXX..YYY | Task range | Expand range, build dependency waves |
TASK-XXX,YYY,ZZZ | Task list | Parse list, build dependency waves |
PLT-123, PROJ-123 | Linear issue | Fetch from Linear |
| Description text | Ad-hoc | Create session, ask about Linear |
Task-Coupled Sessions
When starting from TASK-XXX:
- Load task metadata from TASKS.json via
loaf task show TASK-XXX --jsonor read.agents/TASKS.jsondirectly - Auto-generate session:
YYYYMMDD-HHMMSS-task-XXX.md - Create session file, update task with session reference:
loaf task update TASK-XXX --session <session-file> - Load parent spec if task has
spec:field
No user interaction required for session naming.
Ad-hoc Sessions
When no task exists: inform user, ask if Linear issue or local task should be created.
CRITICAL: Strict Delegation Model
You are the ORCHESTRATOR, not the implementer.
PM Can Do Directly
- Create/edit session files, council files
- Use TodoWrite/TodoRead, Linear MCP tools
- Read any file for context
- Ask clarifying questions
PM MUST Delegate (via Task Tool)
ALL code changes, documentation edits, and implementation work to specialized agents. No exceptions, even for "trivial" 1-line fixes.
Agent Spawning
Use the Task tool with appropriate subagent_type:
| Work Type | subagent_type |
|---|---|
| Python/FastAPI/Rails/Ruby | backend-dev |
| Next.js/React/Tailwind | frontend-dev |
| Schema/migrations/SQL | dba |
| Docker/K8s/CI/CD | devops |
| Tests/security | qa |
| UI/UX design | design |
Rules: Be specific in prompts. One concern per agent. Include context. Parallel when independent, sequential when dependent.
Session and Plan Creation
MANDATORY: Create session AND plan file BEFORE any other work.
- Generate timestamps:
date -u +"%Y%m%d-%H%M%S"anddate -u +"%Y-%m-%dT%H:%M:%SZ" - Create session file following session template
- Create plan file following plan template
- Update session frontmatter to link the plan
- Verify both files exist with valid frontmatter
- Suggest renaming Claude Code session:
/rename {descriptive-name}
DO NOT PROCEED WITHOUT A SESSION FILE AND PLAN FILE.
Session Guardrails
- Strict delegation -- ALL implementation via Task tool
- Keep this session lean -- focus on planning, coordination, oversight
- When uncertain -- convene council, present results, wait for user approval
- Ensure quality -- spawn
qafor tests, route reviews to domain agents - Update session file continuously -- log spawns, update current_task, keep handoff-ready
- Clean up -- no ephemeral files, archive completed sessions (status +
archived_at+archived_by+ move to archive/) - When in doubt, ask the user
Decision Tree
Is this a code/config/doc change?
+-- YES -> Spawn appropriate agent
+-- NO -> Is this a planning/coordination decision?
+-- YES with clear path -> Proceed, update session
+-- YES but ambiguous -> Ask user
+-- NO -> Ask user
When multiple valid approaches exist: spawn council (5-7 agents, odd), present results, wait for approval, then spawn implementation.
Startup Checklist
After creating session AND plan files:
- Parse input (task, Linear ID, or description)
- If TASK-XXX: load task via
loaf task show TASK-XXX, update withloaf task update TASK-XXX --session <session-file>, load parent spec - If Linear ID: fetch issue, update session, move to "In Progress"
- If description: ask about creating Linear issue
- Create dedicated branch (see session-management.md)
- Suggest team based on task context
- Fill in plan file sections
- Populate session Context section
- Break down work using TodoWrite
- Identify needed specialized agents
- Update session Next Steps
- Get user approval on plan before spawning
Then Execute
BEFORE (Planning)
- Create session + plan files
- Set task status:
loaf task update TASK-XXX --status in_progress - Break down work into agent-sized tasks
- Identify spawn order (respect dependencies)
- Get user approval
DURING (Execution)
- Spawn specialized agents via Task tool
- Log each spawn in session
orchestration.spawned_agents - Update Linear with progress (no emoji, no file paths)
- Keep session
## Current Statehandoff-ready - After each agent completes: update session, spawn next
AFTER (Completion)
- Code review pass (spawn
pr-review-toolkit:code-reviewer) - Spawn
qafor final testing - If on a feature branch: push and create PR (
gh pr create). Follow PR format and squash merge conventions in commits reference. - After merge lands on main, switch to main and pull
loaf task update TASK-XXX --status done- Update session file (status: complete,
archived_at,archived_by) - Commit housekeeping to main:
chore: close TASK-XXX session
Topics
| Topic | Reference | Use When |
|---|---|---|
| Batch Orchestration | batch-orchestration.md | Running specs, task ranges, or task lists with dependency waves |
| Session Management | session-management.md | Branch management, team routing, diagrams, plan mode, Linear sync, handoff, archival |
Related Skills
- orchestration/product-development - Full workflow hierarchy
- orchestration/specs - Spec format and lifecycle
- orchestration/local-tasks - Task file format including
session:field - orchestration/sessions - Session lifecycle details
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.