Production-grade software project development skill for OpenClaw. WBS hash attestation, auto context injection, session recovery, parallel task pointers, and...
---
name: SPM
version: 3.0.0
description: Production-grade software project development skill for OpenClaw. WBS hash attestation, auto context injection, session recovery, parallel task pointers, and Minimal Mode. Use when starting new projects, implementing complex features, or executing multi-step development tasks that require structured end-to-end management.
metadata:
openclaw:
emoji: "๐"
requires:
anyBins: ["node", "npm", "git"]
allowed-tools: ["read", "write", "edit", "exec", "process", "sessions_spawn", "sessions_yield", "subagents", "cron", "memory_search", "memory_get", "browser"]
---
# SPM โ Super Project Manager
## Overview
SPM is a comprehensive skill for software project development in OpenClaw. It integrates:
- **Superpowers** (13 workflows): Design brainstorming, implementation planning, TDD, subagent-driven development, code review, systematic debugging, git worktrees, and more
- **PM enhancements**: Soul-searching protocol, assumption documentation, safe sandbox (/freeze & /guard), three-tier quality gates, project scaffolding, deployment pipeline
- **WBS Executor**: Structured task ledger with exit criteria, evidence tracking, heartbeat logging, interruption recovery, delivery summary
**Core Philosophy:** SPM is an orchestrator, not a monolith. Each phase triggers the right workflow. The WBS task ledger is the single source of truth for tracking โ now protected by hash attestation and auto-injected into context.
### ๐ v3.0 New Features
| Feature | Description | Priority |
|---------|-------------|----------|
| **WBS Hash Attestation** | SHA-256 integrity protection; tampered ledgers auto-detected | ๐ Security |
| **Hook Auto-Injection** | Active tasks auto-injected into context before every tool call | ๐ค Automation |
| **Session Recovery** | Auto-generated recovery reports from heartbeat logs | ๐ Resilience |
| **Parallel Task Pointers** | `.active_ledger` symlink + `switch-ledger.sh` for multi-task isolation | ๐ Multi-task |
| **SPM Minimal Mode** | 5-rule lightweight mode for <10 task projects | ๐ Quick Start |
| **Template/Script Separation** | Clear distinction: user-project files vs skill internals | ๐ UX |
## When to Use
- Starting a new software project from scratch
- Implementing complex multi-file features
- Any task that spans multiple steps or sessions
- Work that requires quality gates, code review, or TDD
**When NOT to use:**
- Single-line fixes or typo corrections
- Quick one-file changes with obvious scope
- Pure brainstorming without execution intent
## Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SPM ORCHESTRATOR โ
โ SKILL.md โ Detects task type โ Routes to correct phase โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ REQUIREMENT โ โ PLANNING โ โ EXECUTION โ
โ โโโโโโโโโโโโโ โ โ โโโโโโโโโโ โ โ โโโโโโโโโโโโ โ
โ โข Brainstormingโ โ โข Write Plan โ โ โข Git Worktree โ
โ โข Soul-Search โ โ โข WBS Ledger โ โ โข TDD Cycle โ
โ โข Design Doc โ โ โข Review Plan โ โ โข Subagent Dev โ
โ โข Assumptions โ โ โข Dependenciesโ โ โข Parallel Tasks โ
โโโโโโโโโฌโโโโโโโโ โโโโโโโโโฌโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ QUALITY โ โ DELIVERY โ โ TRACKING (ALL) โ
โ โโโโโโโโโโโโโ โ โ โโโโโโโโโโ โ โ โโโโโโโโโโโโโโ โ
โ โข Verification โ โ โข Finish Brch โ โ โข WBS Ledger โ
โ โข Code Review โ โ โข Deploy (opt)โ โ โข Heartbeat Log โ
โ โข 3-Tier Gates โ โ โข Delivery โ โ โข State Tracking โ
โ โข Debugging โ โ โข Cleanup โ โ โข Recovery โ
โโโโโโโโโฌโโโโโโโโ โโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SUBAGENT DISPATCH โ
โ โโโโโโโโโโโโโโโโโโโโโ โ
โ Impl. Subagent โ
โ Spec Reviewer โ
โ Code Quality Reviewer โ
โ Parallel Subagents โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## The Complete Lifecycle
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHASE 1: REQUIREMENT PHASE 2: PLANNING โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โBrainstorm โโ โDesign Doc โโโManualโโโถ โWBS Plan โ โ
โ โ(็ต้ญๆท้ฎ) โ โ(ๆ็กฎๅ่ฎพ) โ Review โ(ไปปๅกๅ่งฃ)โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโฌโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ
โ PHASE 3: EXECUTION (Automated after Manual Start) โ โ
โ โผ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โWorktree โโ โSubagent โโ โParallel โโ โTDD + Commit โ โ
โ โSetup โ โTask Exec โ โSubagents โ โVerify โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โ PHASE 4: QUALITY PHASE 5: DELIVERY โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โVerify Gate โโ โCode Review โโ โFinish Branch โ โ โ
โ โ(3-Tier) โ โ(3-Stage) โ โDeploy (opt) โ โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ
โ โ DELIVERY SUMMARY + WBS CLOSEOUT โโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TRACKING LAYER (Runs Throughout All Phases) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ WBS Ledger โ โ Heartbeat โ โ State Tracking โ โ
โ โ (Single SOT) โ โ (10 min) โ โ (project-state.json) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## Core Artifact: WBS Task Ledger
The WBS task ledger is the **single source of truth** for the entire project. Every phase creates its artifacts AND updates the ledger.
**Ledger location:** `docs/spm/ledger.md`
**Minimal ledger template:**
```markdown
# WBS Task Ledger โ [Project Name]
## Task Summary
- Assignment: [one-line]
- Outcome: [what working software looks like]
- Success criteria: [how we verify]
## WBS
| ID | Work Package | Dependencies | Context Brief | Exit Criteria | Evidence | Status |
|----|-------------|---------|---------------|---------------|----------|--------|
| 1 | Setup scaffold | - | Cold-start: init project structure, install deps | Init script runs, tests pass | npm test output | done |
| 1.1| Install deps | 1 | Cold-start: after scaffold ready, npm install all packages | All deps installed | npm ls | done |
| 2 | Core feature A | 1 | Cold-start: after scaffold, implement API in src/routes/ | API returns correct data | curl output | todo |
## Mutation Log
| Time | Mutation Type | Affected IDs | Reason | New IDs |
|------|--------------|-------------|--------|---------|
| | split / insert / skip / reorder / abandon | | | |
## Active State
- Current item:
- Last completed:
- Last checkpoint:
- Resume from here:
## Heartbeat Log
| Time | Active | Completed | Evidence | Resume point |
|------|--------|-----------|----------|-------------|
| HH:MM | Task 2 | Task 1 | build passes | Task 2 subagent |
## Delivery Summary
[Final output mapping back to original assignment]
```
**Allowed statuses:** `todo`, `doing`, `done`, `blocked`, `skipped`
**Rule:** No item marked `done` without evidence (file diff, test output, command result).
---
## Workflow by Phase
### Phase 1: Requirement (Manual โ User Review Required)
**Trigger:** User says "build X", "start project", "implement feature"
**๐ ๅค้จ่ตๆบๅๆ (optional):** ๅฆๆ้กน็ฎ้่ฆๅ้ดๅค้จไปฃ็ /ๆ่ฝ/ๆนๆก๏ผๅ
่ตฐ `workflows/external-research.md` โ ็ปๆๅๅฏนๆฏ โ ่พๅบ้็บณๆธ
ๅ โ ๅ่ฟๅ
ฅๆ ๅ้ๆฑๆต็จใ
**Sub-flow: Soul-Searching Protocol**
1. Before any design work, throw back **3 lethal probing questions** about scope/purpose/constraints
2. Surface assumptions explicitly: "I'm assuming X โ correct me now or I'll proceed"
**Sub-flow: Brainstorming (see workflows/brainstorming.md)**
1. Explore project context
2. Ask clarifying questions (one at a time)
3. Propose 2-3 approaches with trade-offs
4. Present design in sections, user approves per section
5. Write design doc to `docs/spm/specs/`
6. Spec self-review (placeholder scan, consistency, scope)
7. User reviews written spec
**Outputs:**
- `docs/spm/specs/YYYY-MM-DD-xxx-design.md`
- Updated WBS ledger: "Spec phase complete"
**Phase Gate:** User must approve spec before proceeding.
---
### Phase 2: Planning (Manual โ User Review Required)
**Sub-flow: Implementation Plan (see workflows/writing-plans.md)**
1. Decompose spec into bite-sized tasks (2-5 min per step)
2. Write **Context Brief** for each task โ self-contained cold-start context
3. Assign **Model Tier** to each task (fast/standard/strong)
4. Map file structure: which files created/modified
5. Create WBS ledger with all tasks (IDs, context brief, dependencies, exit criteria)
6. Self-review plan (spec coverage, placeholder scan, Context Brief audit)
7. **๐ Adversarial Plan Review** โ dispatch reviewer subagent against 5-dimension checklist before showing to user (see subagents/plan-reviewer-prompt.md)
**Outputs:**
- `docs/spm/plans/YYYY-MM-DD-xxx-plan.md`
- Updated WBS ledger with all task rows + context briefs + model tiers
- `docs/spm/reviews/YYYY-MM-DD-plan-review.md` โ adversarial review report
**Phase Gate:** User reviews plan + review report, chooses execution mode:
- **Subagent-Driven** (recommended) โ each task dispatched to fresh subagent
- **Inline Execution** โ execute in current session
---
### Phase 3: Execution (Automated)
**Sub-flow: Git Worktree Setup (see workflows/using-git-worktrees.md)**
1. Create isolated worktree
2. Verify gitignore
3. Run project setup
4. Verify clean test baseline
**Sub-flow: Task Execution**
- For **Subagent-Driven**: see `workflows/subagent-driven-development.md`
- Each subagent receives **cold-start Context Brief** + **model tier routing** (fastโstep35, standardโSensenovaDeepSeek, strongโDeepSeekV4Pro โ ไธ provider ้็ฆป้ฟๅ
้็้ๅถ)
- BLOCKED tasks trigger mutation protocol (see references/plan-mutation.md)
- For **Inline**: see `workflows/executing-plans.md`
- For **Parallel Tasks**: see `workflows/dispatching-parallel-agents.md`
**Mandatory: WBS Binding**
Every subagent task MUST update the WBS ledger:
- Before dispatch: set status to `doing`
- On completion: set status to `done` + attach evidence
- On block: set status to `blocked` + describe blocker โ trigger mutation protocol
**Sub-flow: TDD (see workflows/test-driven-development.md)**
Each implementation slice follows RED โ Verify RED โ GREEN โ Verify GREEN โ REFACTOR โ Commit
- **๐ RED validation accepts compile-time RED** (test references non-existent API โ compile failure counts as valid RED)
**Heartbeat: Every 10 minutes**
Update the heartbeat log in the WBS ledger.
---
### Phase 4: Quality (Automated)
**Sub-flow: Verification Gate (see workflows/verification-before-completion.md)**
Iron Law: NO completion claims without fresh verification evidence.
- **๐ Eval Delta**: ๆฏไธชไปปๅกๅฎๆๅๅฟ
้กปๅ baseline vs current ๅฏนๆฏ๏ผๆต่ฏๆฐใ่ฆ็็ใๅๅฝๆฃๆฅ๏ผ
- **๐ Standardized Report**: ไฝฟ็จ `templates/verification-report.md` ๆจกๆฟ๏ผ7 ้ถๆฎต้กบๅบ้ช่ฏ๏ผ่พๅบ YES/NO ็ฝๆ ผ
**Sub-flow: Three-Stage Code Review (see workflows/code-review.md)**
1. **Stage 1: Spec Compliance** โ Code matches spec exactly (no YAGNI)
2. **Stage 2: Engineering Quality** โ Tests, security, clean code
3. **Stage 3: Final Review** โ Full suite pass, integration verified
**Sub-flow: Three-Tier Quality Gates (see workflows/quality-gates.md)**
- **Always do:** Run tests, follow naming, validate inputs
- **Ask first:** DB changes, new deps, CI changes
- **Never do:** Commit secrets, skip review for complex changes
**Sub-flow: Systematic Debugging** (if tests fail) โ see `workflows/systematic-debugging.md`
4-phase root cause tracing: Error Capture โ Hypothesis โ Evidence โ Fix & Verify
**Outputs:**
- Code review report
- Quality gate results (passed/failed per check)
- Updated WBS ledger (tasks moved to done with evidence)
---
### Phase 5: Delivery (Manual Decision)
**Sub-flow: Finish Branch (see workflows/finishing-a-development-branch.md)**
1. Verify all tests pass
2. Determine base branch
3. Present 4 options: Merge / PR / Keep / Discard
4. Execute choice + cleanup worktree
**Sub-flow: Deploy (Optional โ see workflows/shipping-and-launch.md)**
If deploying: release plan โ rollback plan โ monitoring โ deploy โ verify
**Sub-flow: Delivery Summary**
Write WBS ledger's Delivery Summary section:
- Completed work mapped to original assignment
- Evidence package (test results, file diffs, command outputs)
- Remaining blockers/skipped items
- Residual risks
- Final handoff note
---
## Subagent Strategy
### Task Dispatch (Single)
```
For each task from WBS ledger:
1. Read task (ID, description, acceptance criteria)
2. Update WBS: status=doing
3. Dispatch implementer subagent
โ FULL task text + file context (not "read the file")
4. Implementer completes โ reports DONE/DONE_WITH_CONCERNS/BLOCKED
5. Update WBS: attach evidence, status=done (or blocked)
```
### Task Dispatch (Parallel - Independent Tasks)
```
For parallel-eligible tasks from WBS ledger:
1. Identify tasks with NO inter-dependencies
2. For each: update WBS (status=doing)
3. Dispatch ALL implementer subagents simultaneously
4. Wait for ALL to return
5. For each completed: update WBS (status=done + evidence)
6. For any blocked: update WBS (status=blocked + reason)
7. Verify no conflicts between parallel results
```
**Parallel eligibility:** Tasks that touch DIFFERENT files/subsystems with no shared state.
### Review Dispatch
```
After implementation:
1. Dispatch spec compliance reviewer
2. Issues found? โ Dispatch implementer to fix โ Re-review
3. Dispatch code quality reviewer
4. Issues found? โ Dispatch implementer to fix โ Re-review
5. All clear? โ Mark task complete
```
### Prompt Templates
See `subagents/` directory for full prompts:
- `subagents/implementer-prompt.md`
- `subagents/spec-reviewer-prompt.md`
- `subagents/quality-reviewer-prompt.md`
### Browser Automation
SPM integrates **agent-browser** as the recommended browser automation tool. When tasks involve web testing, data extraction, or UI automation, the orchestrator can dispatch browser-enabled subagents.
#### Supported Actions
- `navigate` / `go_back` / `refresh` โ Page navigation
- `click` / `type` / `select_option` / `hover` โ Element interaction
- `screenshot` / `wait_for` / `scroll` โ Page operations
- `get_attribute` / `get_text` / `evaluate` โ Data extraction
- `tabs` / `switch_tab` / `close_tab` โ Tab management
- `console_messages` / `network_requests` โ Debug monitoring
#### Usage Pattern
```
Task: "Test the login flow on example.com"
โ SPM creates WBS task with browser steps
โ Subagent dispatched with browser tool enabled
โ Subagent executes sequence: navigate โ type credentials โ click submit โ verify success
โ Evidence: screenshot + console output attached to WBS
```
Browser automation tasks follow the same TDD and evidence requirements as code tasks.
---
## Quality Gates
### Three-Tier System
**Always Do:**
- Run test suite before any commit
- Follow project naming conventions
- Validate all inputs (security baseline)
- Perform code style checks
- Keep documentation in sync
**Ask First:**
- Database schema changes
- Adding new dependencies
- Modifying CI/CD configuration
- Breaking API contracts
- Changing performance-critical paths
**Never Do:**
- Commit secrets or credentials
- Edit vendor directories
- Remove failing tests without approval
- Skip code review for complex changes
- Bypass security checks
### Iron Laws
**Law 1: No code without approved design.** Spec must be written AND user-approved before any implementation.
**Law 2: No production code without a failing test first.** TDD Iron Law โ if you wrote code before test, delete it and start over.
**Law 3: No completion claims without fresh verification evidence.** Run the exact verification command this turn. Show output. THEN claim.
**Law 4: No fixes without root cause investigation.** Symptom fixes are failure. Complete Phase 1-3 of Systematic Debugging before any fix.
**Law 5: No WBS `done` without evidence.** File diffs, test output, command results โ something verifiable.
---
## Quality Enhancements (Optional but Recommended)
To further strengthen delivery confidence, SPM supports optional **Checkpoint** and **Checklist** systems. These are inspired by professional engineering practices and can be adopted incrementally.
See `docs/quality-enhancements.md` for complete documentation.
**Quick enable:**
```bash
cd your-spm-project
bash skills/spm/scripts/setup-checkpoints.sh
```
This installs:
- Checkpoint templates (`CHECKPOINTS/`) for hard phase stops
- Checklist templates (`CHECKLISTS/`) for self-review
- Automation scripts (`scripts/checkpoint.sh`, `scripts/verify_checklists.py`)
- npm scripts: `npm run checkpoint`, `npm run verify:code`, `npm run verify:deploy`
After setup, each phase can generate a checkpoint report (`./scripts/checkpoint.sh phase-1`) and tasks can be verified against the appropriate checklist before marking `done`.
---
## Instruction Priority
1. **User's explicit instructions** (AGENTS.md, direct commands) โ highest
2. **SPM skill rules** (Iron Laws, workflows) โ default process
3. **Default system prompt** โ lowest
If user says "skip TDD" or "skip review", follow the user. Iron Laws are defaults, not overrides.
---
## Project Structure
```
openclaw-spm/
โโโ SKILL.md # SPM ็ผๆๅจ (14 workflows)
โโโ skills/ # ๐ ๅญๆ่ฝ (SPM ่ชๅจๅ็ฐ)
โ โโโ spm-frontend/ # ๅ็ซฏไปฃ็ ่ง่
โ โ โโโ SKILL.md
โ โโโ spm-design-system/ # ่ง่ง่ฎพ่ฎก่ง่
โ โโโ SKILL.md
โโโ workflows/ # 14 ไธชๅทฅไฝๆต
โโโ references/ # ๅ่ๆไปถ
โโโ subagents/ # ๅญไปฃ็ prompt ๆจกๆฟ
โโโ schemas/ # JSON Schema
โโโ templates/ # ๆๆกฃๆจกๆฟ
โโโ scripts/ # ่ชๅจๅ่ๆฌ
โโโ examples/ # ๅฎๆด็คบไพ้กน็ฎ
โโโ config/ # SPM ้
็ฝฎ
โโโ docs/ # ่ฎพ่ฎกๆๆกฃ
```
---
## Integration with OpenClaw
Enable SPM in `~/.openclaw/openclaw.json`:
```json
{
"skills": {
"entries": {
"SPM": {
"enabled": true,
"config": {
"heartbeat_interval": "10m",
"auto_checkpoint": true,
"quality_gates_enabled": true,
"wbs_ledger_path": "docs/spm/ledger.md",
"parallel_subagents": true,
"deployment_enabled": false
}
}
}
}
}
```
---
## Quick Start
```
1. User: "Build a user authentication system"
2. SPM triggers brainstorming โ 3 soul-searching questions
3. Design doc written โ user approves
4. Plan written โ WBS ledger created โ user reviews
5. User: "Go" โ automated execution begins
6. Worktree setup โ Subagent dispatch (with WBS binding)
7. Each task: TDD โ commit โ review โ ledger update
8. Parallel tasks if independent (WBS tracks each)
9. All tasks done โ Quality gate โ Finish branch
10. Delivery summary written to ledger
```
---
## See Also
- `workflows/` โ Detailed workflow docs for each phase (14 workflows)
- `workflows/external-research.md` โ **๐ ๅค้จ่ตๆบๅๆ**๏ผ็ปๆๅๅฏนๆฏ + ้็บณๆธ
ๅ
- `references/` โ Templates, best practices, recovery patterns
- `references/TASK-EXECUTION.md` โ **ๆง่กๅไปปๅกๅๅฟ
่ฏป็ๅไธๅ
ฅๅฃ**๏ผๅๅนถ TDD + Gate Function + WBS ๆดๆฐ่งๅ + ๅฎๅทฅ่ชๆฃ๏ผ
- `references/plan-mutation.md` โ **๐ ่ฎกๅ็ชๅๅ่ฎฎ**๏ผsplit / insert / skip / reorder / abandon ๆไฝ่ง่
- `schemas/` โ JSON schemas for project state, ledger, quality gates
- `subagents/` โ Subagent dispatch prompt templates (implementer, spec reviewer, quality reviewer, plan reviewer)
- `scripts/` โ Automation scripts (init, quality check, auto-execute)
- `templates/` โ PRD, plan, review checklist templates
- `docs/quality-enhancements.md` โ **Checkpoint, Checklist, Contract, E2E, Config-as-Code**
- `docs/skill-selection-matrix.md` โ Design rationale document
---
## ๅ้ถๆฎตๆไปถ่ฏปๅๆๅ
ไธๅ้ถๆฎต่ฏปไธๅ็ๆไปถ๏ผ้ฟๅ
็ฒ็ฎๅ
จ่ฏปๆตช่ดน tokenใ
| ้ถๆฎต | ๅฟ
่ฏป๏ผๆฏๆฌก้ฝ็๏ผ | ไธๆฌกๆง็ๅฎ / ๆ้ๆฅ |
|------|-----------------|-------------------|
| Phase 0 ๅค้จ็ ็ฉถ | `workflows/external-research.md` | โ |
| Phase 1 ้ๆฑ | `workflows/brainstorming.md` | `templates/prd-template.md` |
| Phase 2 ่งๅ | `workflows/writing-plans.md` + `references/task-ledger-template.md` | `schemas/task-ledger.schema.json` |
| Phase 3 ๆง่ก๏ผๆฏไปปๅก๏ผ | **`references/TASK-EXECUTION.md`** ๅไธๅ
ฅๅฃ | `workflows/test-driven-development.md`๏ผๅกๅฃณๆถ๏ผ |
| Phase 3 ๅญไปฃ็่ฐๅบฆ | `workflows/subagent-driven-development.md` + `subagents/implementer-prompt.md` | `subagents/spec-reviewer-prompt.md` + `subagents/quality-reviewer-prompt.md` |
| Phase 3 ๅนถ่ก | `workflows/dispatching-parallel-agents.md` | โ |
| Phase 4 ่ดจ้ | `workflows/verification-before-completion.md` + `workflows/code-review.md` | `workflows/quality-gates.md` + `CHECKLISTS/CODE-COMPLETION.md` |
| Phase 4 ่ฐ่ฏ | `workflows/systematic-debugging.md` | โ |
| Phase 5 ไบคไป | `workflows/finishing-a-development-branch.md` | `workflows/shipping-and-launch.md` + `CHECKLISTS/DEPLOYMENT-READINESS.md` |
| ๅ
จๅฑ่ฟฝ่ธช | `schemas/project-state.schema.json` | `references/recovery-patterns.md`๏ผไธญๆญๆขๅคๆถ๏ผ |
| Git Worktree | `workflows/using-git-worktrees.md` | โ |
> **ๅ
ณ้ฎ**๏ผPhase 3 ๆง่กๅไปปๅกๆถ๏ผ`references/TASK-EXECUTION.md` ๆฏๅฏไธๅฟ
่ฏปโโๅฎๅๅนถไบ TDD ้ๅพ + Gate Function + WBS ๆดๆฐ่งๅ + ๅฎๅทฅ่ชๆฃๆธ
ๅใไธ่ฆๅ่ทณ่ฝฌๅคไธชๆไปถใ
---
## ๐ v3.0 Scripts Reference
| Script | Purpose | When to Use |
|--------|---------|-------------|
| `scripts/init-spm.sh` | Initialize SPM project structure | New project setup |
| `scripts/attest-wbs.sh` | Generate SHA-256 hash of WBS Ledger | After each WBS update |
| `scripts/verify-wbs.sh` | Verify WBS Ledger integrity | Before trusting WBS content |
| `scripts/inject-wbs-context.py` | Inject active tasks into agent context | Hook: PreToolUse |
| `scripts/session-recovery.py` | Generate session recovery report | After interruption, returning to project |
| `scripts/switch-ledger.sh <name>` | Switch between multiple WBS ledgers | Multi-task parallel work |
### Hook Configuration (Recommended)
Add to `openclaw.json` SPM plugin config to auto-inject WBS state:
```json
{
"hooks": {
"preToolUse": {
"command": "python3 scripts/inject-wbs-context.py",
"maxChars": 1500
}
}
}
```
**Integrity check** before injection:
```json
{
"hooks": {
"preToolUse": {
"command": "bash scripts/verify-wbs.sh && python3 scripts/inject-wbs-context.py",
"maxChars": 1500
}
}
}
```
---
## ๐ SPM Modes
### Full Mode (Default)
5-phase lifecycle, 13 workflows, 3-tier quality gates, subagent dispatch, TDD.
### Minimal Mode
5 rules for <10 task projects. See `docs/spm-minimal-mode.md`.
Switch: `/spm:mode minimal` or `/spm:mode full`
---
## ๐ Project Structure (v3.0)
```
spm/
โโโ SKILL.md โ Skill definition (do not copy)
โโโ UPGRADE.md โ Version migration guide
โโโ scripts/ โ
User runs or auto-triggers
โ โโโ init-spm.sh
โ โโโ attest-wbs.sh
โ โโโ verify-wbs.sh
โ โโโ inject-wbs-context.py
โ โโโ session-recovery.py
โ โโโ switch-ledger.sh
โโโ templates/ โ
User copies to project
โ โโโ wbs-ledger.md โ docs/spm/ledger.md
โ โโโ design-doc.md โ docs/spm/specs/
โ โโโ plan-doc.md โ docs/spm/plans/
โ โโโ checkpoint.md โ docs/spm/checkpoints/
โโโ workflows/ โ Agent reference
โโโ subagents/ โ Agent reference
โโโ references/ โ Agent reference
โโโ CHECKLISTS/ โ Quality assurance
```
don't have the plugin yet? install it then click "run inline in claude" again.