From granary
Coordinates multi-project initiative planning across services and repositories. Collects context, defines boundaries, analyzes dependencies, and spawns sub-agents for detailed plans.
How this skill is triggered — by the user, by Claude, or both
Slash command
/granary:initiative-plannerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when work naturally spans multiple projects or services. **Do NOT use for single-feature work**—use `/granary:plan-work` instead.
Use this skill when work naturally spans multiple projects or services. Do NOT use for single-feature work—use /granary:plan-work instead.
Your role: High-level architecture, separation of concerns, dependency analysis, and spawning sub-agents for project planning. You do NOT plan individual project tasks yourself—you coordinate and synthesize.
You are a high-level coordinator. Your job is to:
You do NOT:
Use initiatives when:
Do NOT use initiatives when:
This is your most important step. Before creating an initiative, gather broad context to inform the entire planning process. You are building the foundation that sub-agents will rely on.
# Search granary for related existing work
granary search "feature keywords"
granary initiatives # Check existing initiatives
granary projects # See all projects
Research the codebase at a high level:
# Example: understand existing architecture
ls -la src/
grep -r "mod " src/lib.rs
cat README.md
Use web search and documentation lookup to understand:
This external research provides valuable context that sub-agents will benefit from when planning their projects.
Before proceeding, document:
| Situation | Action |
|---|---|
| Work fits in one project | Use /granary:plan-work instead |
| Related initiative exists | Add projects to existing initiative |
| Work spans 2+ distinct projects with dependencies | Create new initiative |
granary initiatives create "Initiative Name" \
--description "High-level goal spanning multiple projects"
Example:
granary initiatives create "User Authentication System" \
--description "Implement auth across API, web app, and mobile app with shared token service"
Break the initiative into logical projects. Each project should:
Think carefully about:
Example breakdown:
Initiative: User Authentication System
├── Project: Auth Token Service (shared backend) — no deps, can start first
├── Project: API Auth Integration — depends on token service
├── Project: Web App Login — depends on API auth
└── Project: Mobile App Login — depends on API auth (parallel with Web App)
# Create each project with clear descriptions for sub-agents
granary projects create "Auth Token Service" \
--description "JWT token generation and validation service"
# Output: auth-token-service-abc1
granary projects create "API Auth Integration" \
--description "Add authentication middleware to API endpoints"
# Output: api-auth-integration-def2
# Add projects to initiative
granary initiative <initiative-id> add-project auth-token-service-abc1
granary initiative <initiative-id> add-project api-auth-integration-def2
This is critical. Review each project pair and ask:
# API Auth depends on Token Service being complete
granary project api-auth-integration-def2 deps add auth-token-service-abc1
# Web App depends on API Auth
granary project web-app-login-ghi3 deps add api-auth-integration-def2
Key principle: A project is blocked until ALL its dependency projects have ALL tasks done.
Before spawning sub-agents, verify the structure makes sense:
# View the initiative dependency graph
granary initiative <initiative-id> graph
# View as mermaid diagram (paste into GitHub/VSCode)
granary initiative <initiative-id> graph --format mermaid
# Check overall status
granary initiative <initiative-id> summary
Review the graph for:
Do NOT plan project tasks yourself. Spawn sub-agents to handle detailed project planning. Each sub-agent focuses deeply on one project while you maintain the high-level view.
# Get all projects in the initiative
granary initiative <initiative-id> projects
# Identify which projects are unblocked (no project dependencies)
granary initiative <initiative-id> graph
Critical: Use the largest context model available (e.g., claude-opus-4-5-20250101 or opus) for sub-agents. These planning tasks benefit from deep reasoning and extensive context windows.
For each unblocked project, spawn a sub-agent using the Task tool:
Use Task tool with:
prompt: [see template below]
subagent_type: "general-purpose"
model: "claude-opus-4-5-20250101" # Use largest available context model
run_in_background: true # Spawn in parallel when multiple projects are unblocked
Provide each sub-agent with:
/granary:plan-workExample prompt:
Use /granary:plan-work to plan the project `auth-token-service-abc1`.
## Context
This project is part of the "User Authentication System" initiative.
Goal: Implement JWT token generation and validation service.
## High-Level Context from Initiative Planning
- The API will consume tokens via middleware (future project: api-auth-integration)
- Token format should be JWT with RS256 signing
- Existing auth patterns found in src/middleware/ use Bearer tokens
- Reference: https://jwt.io/introduction for JWT best practices
## Your Task
1. Research the project scope thoroughly
2. Create detailed tasks with file paths, implementation details, and acceptance criteria
3. Set up task dependencies within the project
## Required Report Back
When planning is complete, summarize:
1. **Tasks created** - List of tasks with brief descriptions
2. **Cross-project interfaces** - What APIs, types, or contracts does this project expose that other projects will depend on?
3. **Cross-project dependencies identified** - Did you discover dependencies on other initiative projects not yet captured?
4. **Risks or blockers** - Any concerns that affect the broader initiative
Spawn sub-agents for all unblocked projects simultaneously:
# If projects A, B, C have no project dependencies, spawn all three at once:
Use Task tool (all in ONE message):
1. prompt: [Project A planning prompt]
model: "claude-opus-4-5-20250101"
run_in_background: true
2. prompt: [Project B planning prompt]
model: "claude-opus-4-5-20250101"
run_in_background: true
3. prompt: [Project C planning prompt]
model: "claude-opus-4-5-20250101"
run_in_background: true
After sub-agents complete, review their reports for:
# Update dependencies if sub-agents identified new ones
granary project <project-B> deps add <project-A>
# Verify updated structure
granary initiative <initiative-id> graph --format mermaid
Once all projects have been planned by sub-agents, the initiative is ready for /granary:orchestrate:
# Verify all projects have tasks
granary initiative <initiative-id> summary
# Get the next actionable task across the entire initiative
granary initiative <initiative-id> next
# Get ALL unblocked tasks (for parallel execution)
granary initiative <initiative-id> next --all
# 1. Research the codebase (understand existing architecture)
# 2. Create initiative
granary initiatives create "Payment Processing" \
--description "Add payment support: Stripe integration, checkout flow, order management"
# 3. Design separation of concerns and create projects
granary projects create "Stripe Service" --description "Stripe API integration wrapper"
granary projects create "Checkout API" --description "Checkout endpoints and cart management"
granary projects create "Checkout UI" --description "Frontend checkout flow"
granary projects create "Order Service" --description "Order persistence and status tracking"
# 4. Add to initiative
granary initiative payment-processing-xyz1 add-project stripe-service-abc1
granary initiative payment-processing-xyz1 add-project checkout-api-def2
granary initiative payment-processing-xyz1 add-project checkout-ui-ghi3
granary initiative payment-processing-xyz1 add-project order-service-jkl4
# 5. Analyze dependencies and set them up
granary project checkout-api-def2 deps add stripe-service-abc1
granary project checkout-ui-ghi3 deps add checkout-api-def2
granary project order-service-jkl4 deps add checkout-api-def2
# 6. Verify structure
granary initiative payment-processing-xyz1 graph --format mermaid
# 7. Spawn sub-agents to plan unblocked projects
# stripe-service-abc1 is unblocked -> spawn agent with /granary:plan-work
# 8. Once planned, check readiness
granary initiative payment-processing-xyz1 summary
Your output: A well-structured initiative with projects and dependencies. Sub-agents handle detailed task planning within each project and report back cross-project dependencies they discover.
Key principle: You are a high-level coordinator. Gather broad context, design the structure, delegate deep planning to sub-agents, then synthesize their findings.
npx claudepluginhub speakeasy-api/granaryThis skill should be used when the user asks to "start a new project", "greenfield project", "tech debt campaign", "incident response", "feature development", "which preset", "initialize metis", "set up project", or needs guidance on project setup, choosing presets, and applying patterns for different work types.
Analyzes project work, builds mental models, decomposes into stacked task graphs with backends and difficulty ratings, and gets approval before execution. For multi-task projects needing planning.