2026-02-17 09:13:23 -08:00
|
|
|
# Plam2Code Quick Reference
|
2025-12-23 15:42:35 -08:00
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
2026-02-22 12:54:33 -08:00
|
|
|
| Step | Command | Input | Output |
|
|
|
|
|
| ------ | ------------------------------- | --------------- | ----------------------------------- |
|
2026-02-17 09:13:23 -08:00
|
|
|
| Init | /plan2code---init | None | AGENTS.md file |
|
|
|
|
|
| Update | /plan2code---init-update | AGENTS.md | Updated AGENTS.md |
|
|
|
|
|
| 0 | /plan2code---quick-task | Requirements | Conversational plan |
|
|
|
|
|
| 1 | /plan2code-1--plan | Requirements | PLAN-CONVERSATION-<date>.md + PLAN-DRAFT-<date>.md |
|
|
|
|
|
| 1b | /plan2code-1b--revise-plan | Specs + changes | Updated specs |
|
|
|
|
|
| 2 | /plan2code-2--document | PLAN-DRAFT.md | overview.md + Phase files |
|
|
|
|
|
| 3 | /plan2code-3--implement | overview.md | Implemented code |
|
|
|
|
|
| 4 | /plan2code-4--finalize | overview.md | Archived specs |
|
2025-12-23 15:42:35 -08:00
|
|
|
|
|
|
|
|
## File Structure
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
specs/
|
|
|
|
|
└── <feature-name>/
|
2026-02-17 09:13:23 -08:00
|
|
|
├── PLAN-DRAFT-<date>.md # From Step 1 (verified plan)
|
|
|
|
|
├── PLAN-CONVERSATION-<date>.md # From Step 1 (conversation log)
|
|
|
|
|
├── overview.md # From Step 2
|
|
|
|
|
└── phase-X.md # From Step 2
|
2025-12-23 15:42:35 -08:00
|
|
|
|
2026-02-17 09:13:23 -08:00
|
|
|
specs--completed/ # After Step 4
|
|
|
|
|
└── <feature-name>/ # Archived specs
|
2025-12-23 15:42:35 -08:00
|
|
|
```
|
|
|
|
|
|
2026-02-17 09:13:23 -08:00
|
|
|
Note: `<date>` uses YYYYMMDD format (e.g., `20250204`)
|
|
|
|
|
|
2025-12-23 15:42:35 -08:00
|
|
|
## Key Rules
|
|
|
|
|
|
|
|
|
|
- Start NEW conversation for each step (and each implementation phase)
|
2026-01-27 12:11:00 -08:00
|
|
|
- ONE phase per conversation (but parallel phases can run in separate instances)
|
2025-12-23 15:42:35 -08:00
|
|
|
- Reply "approved" to complete phases
|
|
|
|
|
- 90% confidence required before planning completes
|
|
|
|
|
- Never look in `specs--completed/` (it's archived specs)
|
|
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
## Phase Status
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
| Checkbox | Status | Meaning |
|
|
|
|
|
|----------|--------|---------|
|
|
|
|
|
| `[ ]` | Pending | Not started |
|
|
|
|
|
| `[/]` | In Progress | Agent working (or paused) |
|
|
|
|
|
| `[x]` | Complete | Approved |
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
## Parallel Execution
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
When phases have no file conflicts or dependencies, they can run simultaneously:
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
1. Documentation Mode auto-detects parallel-eligible phases
|
|
|
|
|
2. Implementation Mode shows selection UI with status for each phase
|
|
|
|
|
3. Run multiple `/plan2code-3--implement` instances on different phases
|
|
|
|
|
4. `[/]` status shows which phases are actively being worked on
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2025-12-23 15:42:35 -08:00
|
|
|
## Quick Troubleshooting
|
|
|
|
|
|
2026-02-17 09:13:23 -08:00
|
|
|
| Issue | Solution |
|
2026-01-27 12:11:00 -08:00
|
|
|
| ---------------------- | ------------------------------------------------- |
|
2026-02-17 09:13:23 -08:00
|
|
|
| Lost context mid-phase | Attach spec files, say "resume from Task X.Y" |
|
|
|
|
|
| Wrong phase started | Say "abort", start correct phase |
|
2026-02-22 12:54:33 -08:00
|
|
|
| Need to change plan | Use `/plan2code-1b--revise-plan` |
|
2026-02-17 09:13:23 -08:00
|
|
|
| Multiple spec folders | Specify which: "Continue with specs/user-auth/" |
|
2026-02-22 12:54:33 -08:00
|
|
|
| Need AGENTS.md file | Use `/plan2code---init` to generate one |
|
|
|
|
|
| Update AGENTS.md | Use `/plan2code---init-update` after sessions |
|
2026-01-27 12:11:00 -08:00
|
|
|
| Run phases in parallel | Check Parallel Execution Groups in overview.md |
|
2025-12-23 15:42:35 -08:00
|
|
|
|
|
|
|
|
## Workflow Decision
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
New to a project?
|
|
|
|
|
└── /plan2code---init → Generate AGENTS.md for project-specific guidance
|
|
|
|
|
|
|
|
|
|
Learned something during a session?
|
|
|
|
|
└── /plan2code---init-update → Add learnings to AGENTS.md
|
|
|
|
|
|
|
|
|
|
Is it a quick, small task?
|
|
|
|
|
├── Yes → /plan2code---quick-task (standalone)
|
|
|
|
|
└── No → /plan2code-1--plan (full workflow)
|
|
|
|
|
├── /plan2code-2--document
|
|
|
|
|
├── /plan2code-3--implement (repeat per phase)
|
2026-01-27 12:11:00 -08:00
|
|
|
│ └── OR: plan2code-loop (autonomous alternative)
|
2025-12-23 15:42:35 -08:00
|
|
|
└── /plan2code-4--finalize
|
|
|
|
|
|
|
|
|
|
Need to revise mid-implementation?
|
|
|
|
|
└── /plan2code-1b--revise-plan
|
|
|
|
|
```
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
## Autonomous Loop (Alternative)
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
The `plan2code-loop` CLI is an **alternative** to Step 3, not a replacement.
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
| Approach | Use When |
|
|
|
|
|
|----------|----------|
|
|
|
|
|
| `/plan2code-3--implement` | You want interactive control per phase |
|
|
|
|
|
| `plan2code-loop` | You want hands-off autonomous execution |
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
```bash
|
|
|
|
|
plan2code-loop # Fully interactive - auto-detects specs, prompts for options
|
|
|
|
|
```
|
2026-02-03 20:32:18 -08:00
|
|
|
|
2026-02-17 09:13:23 -08:00
|
|
|
### Loop Modes
|
|
|
|
|
|
|
|
|
|
| Mode | Description |
|
|
|
|
|
|------|-------------|
|
|
|
|
|
| **One task per loop** (default) | One task per agent invocation. Node handles git commits. |
|
|
|
|
|
| **One phase per loop** | All tasks in a phase per invocation. LLM handles git commits. Best for smart models with larger context. |
|
|
|
|
|
|
2026-01-27 12:11:00 -08:00
|
|
|
Session state stored per-spec in `specs/<feature>/.plan2code-loop/`
|