mirror of
https://github.com/harivansh-afk/claude-code-vertical.git
synced 2026-04-15 17:00:58 +00:00
skills
This commit is contained in:
parent
087b195b4c
commit
ae037f7bec
24 changed files with 15692 additions and 0 deletions
120
commands/build.md
Normal file
120
commands/build.md
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
---
|
||||
description: Execute a plan by launching orchestrator and weavers in tmux. Creates PRs for each spec.
|
||||
argument-hint: <plan-id> [spec-names...]
|
||||
---
|
||||
|
||||
# /build Command
|
||||
|
||||
Execute a plan. Launches orchestrator in tmux, which spawns weavers for each spec.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/build plan-20260119-1430
|
||||
/build plan-20260119-1430 01-schema 02-backend
|
||||
```
|
||||
|
||||
## What Happens
|
||||
|
||||
1. Read plan from `.claude/vertical/plans/<plan-id>/`
|
||||
2. Launch orchestrator in tmux: `vertical-<plan-id>-orch`
|
||||
3. Orchestrator reads specs, selects skills, spawns weavers
|
||||
4. Each weaver runs in tmux: `vertical-<plan-id>-w-01`, etc.
|
||||
5. Weavers build, verify, create PRs
|
||||
6. Results written to `.claude/vertical/plans/<plan-id>/run/`
|
||||
|
||||
## Execution Flow
|
||||
|
||||
```
|
||||
/build plan-20260119-1430
|
||||
|
|
||||
+-> Orchestrator (tmux: vertical-plan-20260119-1430-orch)
|
||||
|
|
||||
+-> Weaver 01 (tmux: vertical-plan-20260119-1430-w-01)
|
||||
| |
|
||||
| +-> Verifier (subagent)
|
||||
| +-> PR #42
|
||||
|
|
||||
+-> Weaver 02 (tmux: vertical-plan-20260119-1430-w-02)
|
||||
| |
|
||||
| +-> Verifier (subagent)
|
||||
| +-> PR #43
|
||||
|
|
||||
+-> Summary written to run/summary.md
|
||||
```
|
||||
|
||||
## Parallelization
|
||||
|
||||
- Independent specs (all with `pr.base: main`) run in parallel
|
||||
- Dependent specs (with `pr.base: <other-branch>`) wait for dependencies
|
||||
|
||||
## Monitoring
|
||||
|
||||
Check status while running:
|
||||
|
||||
```
|
||||
/status plan-20260119-1430
|
||||
```
|
||||
|
||||
Or directly:
|
||||
|
||||
```bash
|
||||
# List tmux sessions
|
||||
tmux list-sessions | grep vertical
|
||||
|
||||
# Attach to orchestrator
|
||||
tmux attach -t vertical-plan-20260119-1430-orch
|
||||
|
||||
# Attach to a weaver
|
||||
tmux attach -t vertical-plan-20260119-1430-w-01
|
||||
|
||||
# Capture weaver output
|
||||
tmux capture-pane -t vertical-plan-20260119-1430-w-01 -p
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
When complete, find results at:
|
||||
|
||||
- `.claude/vertical/plans/<plan-id>/run/state.json` - Overall status
|
||||
- `.claude/vertical/plans/<plan-id>/run/summary.md` - Human-readable summary
|
||||
- `.claude/vertical/plans/<plan-id>/run/weavers/w-*.json` - Per-weaver status
|
||||
|
||||
## Debugging Failures
|
||||
|
||||
If a weaver fails, you can resume its session:
|
||||
|
||||
```bash
|
||||
# Get session ID from weaver status
|
||||
cat .claude/vertical/plans/<plan-id>/run/weavers/w-01.json | jq -r .session_id
|
||||
|
||||
# Resume
|
||||
claude --resume <session-id>
|
||||
```
|
||||
|
||||
Or attach to the tmux session if still running:
|
||||
|
||||
```bash
|
||||
tmux attach -t vertical-<plan-id>-w-01
|
||||
```
|
||||
|
||||
## Killing a Build
|
||||
|
||||
```bash
|
||||
# Kill all sessions for a plan
|
||||
source lib/tmux.sh
|
||||
vertical_kill_plan plan-20260119-1430
|
||||
|
||||
# Or kill everything
|
||||
vertical_kill_all
|
||||
```
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
This command:
|
||||
1. Loads orchestrator skill
|
||||
2. Generates orchestrator prompt with plan context
|
||||
3. Spawns tmux session with `claude -p "<prompt>" --dangerously-skip-permissions --model opus`
|
||||
4. Returns immediately (orchestrator runs in background)
|
||||
|
||||
The orchestrator handles everything from there.
|
||||
82
commands/plan.md
Normal file
82
commands/plan.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
description: Start an interactive planning session. Design specs through Q&A, then hand off to build.
|
||||
argument-hint: [description]
|
||||
---
|
||||
|
||||
# /plan Command
|
||||
|
||||
Start a planning session. You become the planner agent.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/plan
|
||||
/plan Add user authentication with OAuth
|
||||
```
|
||||
|
||||
## What Happens
|
||||
|
||||
1. Load the planner skill from `skills/planner/SKILL.md`
|
||||
2. Generate a plan ID: `plan-YYYYMMDD-HHMMSS`
|
||||
3. Create plan directory: `.claude/vertical/plans/<plan-id>/`
|
||||
4. Enter interactive planning mode
|
||||
|
||||
## Planning Flow
|
||||
|
||||
1. **Understand** - Ask questions until the task is crystal clear
|
||||
2. **Research** - Explore the codebase, find patterns
|
||||
3. **Design** - Break into specs (each = one PR)
|
||||
4. **Write** - Create spec files in `specs/` directory
|
||||
5. **Hand off** - Tell user to run `/build <plan-id>`
|
||||
|
||||
## Spec Output
|
||||
|
||||
Specs go to: `.claude/vertical/plans/<plan-id>/specs/`
|
||||
|
||||
```
|
||||
01-schema.yaml
|
||||
02-backend.yaml
|
||||
03-frontend.yaml
|
||||
```
|
||||
|
||||
## Transitioning to Build
|
||||
|
||||
When specs are ready:
|
||||
|
||||
```
|
||||
Specs ready. To execute:
|
||||
|
||||
/build <plan-id>
|
||||
|
||||
To execute specific specs:
|
||||
|
||||
/build <plan-id> 01-schema 02-backend
|
||||
|
||||
To check status:
|
||||
|
||||
/status <plan-id>
|
||||
```
|
||||
|
||||
## Multiple Planning Sessions
|
||||
|
||||
You can run multiple planning sessions in parallel:
|
||||
|
||||
```
|
||||
# Terminal 1
|
||||
/plan Add authentication
|
||||
|
||||
# Terminal 2
|
||||
/plan Add payment processing
|
||||
```
|
||||
|
||||
Each gets its own plan-id and can be built independently.
|
||||
|
||||
## Resuming
|
||||
|
||||
Planning sessions are Claude Code sessions. Resume with:
|
||||
|
||||
```
|
||||
claude --resume <session-id>
|
||||
```
|
||||
|
||||
The session ID is saved in `.claude/vertical/plans/<plan-id>/meta.json`.
|
||||
113
commands/status.md
Normal file
113
commands/status.md
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
description: Check status of plans and weavers. Shows tmux sessions, weaver progress, and PRs.
|
||||
argument-hint: [plan-id]
|
||||
---
|
||||
|
||||
# /status Command
|
||||
|
||||
Check the status of plans and weavers.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/status # All plans
|
||||
/status plan-20260119-1430 # Specific plan
|
||||
```
|
||||
|
||||
## Output
|
||||
|
||||
### All Plans
|
||||
|
||||
```
|
||||
=== Active Tmux Sessions ===
|
||||
vertical-plan-20260119-1430-orch
|
||||
vertical-plan-20260119-1430-w-01
|
||||
vertical-plan-20260119-1430-w-02
|
||||
vertical-plan-20260119-1445-orch
|
||||
|
||||
=== Plan Status ===
|
||||
plan-20260119-1430: running
|
||||
plan-20260119-1445: running
|
||||
plan-20260119-1400: complete
|
||||
```
|
||||
|
||||
### Specific Plan
|
||||
|
||||
```
|
||||
=== Plan: plan-20260119-1430 ===
|
||||
Status: running
|
||||
Started: 2026-01-19T14:35:00Z
|
||||
|
||||
=== Specs ===
|
||||
01-schema.yaml
|
||||
02-backend.yaml
|
||||
03-frontend.yaml
|
||||
|
||||
=== Weavers ===
|
||||
w-01 complete 01-schema.yaml https://github.com/owner/repo/pull/42
|
||||
w-02 verifying 02-backend.yaml -
|
||||
w-03 waiting 03-frontend.yaml -
|
||||
|
||||
=== Tmux Sessions ===
|
||||
vertical-plan-20260119-1430-orch running
|
||||
vertical-plan-20260119-1430-w-01 done
|
||||
vertical-plan-20260119-1430-w-02 running
|
||||
```
|
||||
|
||||
## Weaver Statuses
|
||||
|
||||
| Status | Meaning |
|
||||
|--------|---------|
|
||||
| waiting | Waiting for dependency |
|
||||
| building | Implementing the spec |
|
||||
| verifying | Running verification checks |
|
||||
| fixing | Fixing verification failures |
|
||||
| complete | PR created successfully |
|
||||
| failed | Failed after max iterations |
|
||||
| blocked | Dependency failed |
|
||||
|
||||
## Quick Commands
|
||||
|
||||
```bash
|
||||
# Source helpers
|
||||
source lib/tmux.sh
|
||||
|
||||
# List all sessions
|
||||
vertical_list_sessions
|
||||
|
||||
# Status for all plans
|
||||
vertical_status
|
||||
|
||||
# Weaver status for a plan
|
||||
vertical_weaver_status plan-20260119-1430
|
||||
|
||||
# Capture recent output from a weaver
|
||||
vertical_capture_output vertical-plan-20260119-1430-w-01
|
||||
|
||||
# Attach to a session
|
||||
vertical_attach vertical-plan-20260119-1430-w-01
|
||||
```
|
||||
|
||||
## Reading Results
|
||||
|
||||
After completion:
|
||||
|
||||
```bash
|
||||
# Summary
|
||||
cat .claude/vertical/plans/plan-20260119-1430/run/summary.md
|
||||
|
||||
# State
|
||||
cat .claude/vertical/plans/plan-20260119-1430/run/state.json | jq
|
||||
|
||||
# Specific weaver
|
||||
cat .claude/vertical/plans/plan-20260119-1430/run/weavers/w-01.json | jq
|
||||
```
|
||||
|
||||
## PRs Created
|
||||
|
||||
When weavers complete, PRs are listed in:
|
||||
- The summary.md file
|
||||
- Each weaver's status JSON (`pr` field)
|
||||
- The overall state.json (`weavers.<id>.pr`)
|
||||
|
||||
Merge order is indicated in summary.md for stacked PRs.
|
||||
Loading…
Add table
Add a link
Reference in a new issue