Feature development with multi-session harness for large features
Multi-session harness for building large features that don't fit in one context window. Automatically detects state and runs planning, implementation, or review phases. Creates granular work items with verification commands to ensure incremental progress.
/plugin marketplace add chuggies510/feature-dev-harnessed/plugin install feature-dev-harnessed@feature-dev-harnessedOptional feature descriptionYou are helping a developer implement a new feature using a multi-session harness pattern. This enables completing large features that don't fit in a single context window.
This command detects state from the filesystem and executes the appropriate phase:
.feature-dev/active/feature_list.json: Run planning phases (1-4), then create artifactsfeature_list.json with pending items: Run one implementation cycleBefore doing anything else, detect current state:
.feature-dev/active/feature_list.json exists.feature-dev/active/claude-progress.txt exists, check if it contains "Feature complete"State determination:
.feature-dev/active/feature_list.json does NOT exist → Execute Planning Sessionfeature_list.json exists AND has items with status "pending" → Execute Implementation Sessionfeature_list.json exists AND all items have status "pass" AND claude-progress.txt does NOT contain "Feature complete" → Execute Review Sessionclaude-progress.txt contains "Feature complete" → Execute Complete StateArtifact location: All feature development artifacts are stored in .feature-dev/active/ during development. On completion, they are archived to .feature-dev/completed/{version}-{feature}/.
Execute this section when feature_list.json does NOT exist.
Goal: Understand what needs to be built
Initial request: $ARGUMENTS
Actions:
Goal: Understand relevant existing code and patterns at both high and low levels
Actions:
Launch 3 code-explorer agents in parallel (reduce to 2 only if clearly unnecessary). Each agent should:
Example agent prompts:
Once the agents return, please read all files identified by agents to build deep understanding
Detect project version (for version tracking):
pyproject.toml, package.json, VERSION, setup.py, Cargo.toml, .claude/VERSIONPresent comprehensive summary of findings and patterns discovered, including:
Goal: Fill in gaps and resolve all ambiguities before designing
CRITICAL: This is one of the most important phases. DO NOT SKIP.
Actions:
If the user says "whatever you think is best", provide your recommendation and get explicit confirmation.
Goal: Design multiple implementation approaches with different trade-offs
Actions:
Goal: Convert approved architecture into multi-session execution artifacts
DO NOT START WITHOUT USER APPROVAL OF ARCHITECTURE AND VERSION
Actions:
.feature-dev/active/ directory if it doesn't exist.feature-dev/active/feature_list.json with the following structure:
{
"feature": "descriptive name of the feature",
"created": "YYYY-MM-DD",
"current_version": "version detected in Phase 2 (e.g., 3.1.1)",
"target_version": "user-approved version from Phase 4 (e.g., 3.2.0)",
"version_files": [
"pyproject.toml",
".claude/VERSION"
],
"architecture": "brief description of chosen approach from phase 4",
"init_script": "optional - path to startup script (e.g., ./init.sh)",
"items": [
{
"id": "001",
"description": "what this item accomplishes, session-sized scope",
"verification": "shell command that returns exit code 0 on success",
"status": "pending",
"session_completed": null
}
]
}
npx playwright test tests/csv-export.spec.ts or python -m pytest tests/test_e2e.pyinit.sh with:
chmod +x init.sh.feature-dev/active/claude-progress.txt with initial entry:
Feature: [feature name]
Version: [current_version] → [target_version]
Created: [date]
Session 1 ([date]):
Planning session. Ran phases 1-4.
Architecture chosen: [approach description]
Created feature_list.json with [N] items.
Next: [first item id] ([first item description])
plan: create feature_list.json for [feature-name] (v[target_version])Planning session ends. Run this command again to start implementation.
Execute this section when .feature-dev/active/feature_list.json exists AND has items with status "pending".
Actions:
.feature-dev/active/feature_list.json to understand items and their status.feature-dev/active/claude-progress.txt to understand context and previous workclaude-progress.txtinit_script is defined in feature_list.json, run it to start the development environment
Goal: Verify previously completed work still passes, fix any regressions
Prerequisite: Init script (if defined) must have completed successfully in Step 1.
Actions:
.feature-dev/active/feature_list.json with status "pass":
interactive_verification → run interactive verification using tmux-cli (see Step 5)Actions:
feature_list.json with status "pending"Goal: Implement the selected item
Actions:
feature_list.json to recall the architecture approachGoal: Confirm the implementation works
Actions:
interactive_verification object → Interactive verification (uses tmux-cli)
tmux-cli launch "zsh"tmux-cli send --text="cd [project_path]" --pane=[id]tmux-cli send --text="[launch command]" --pane=[id]tmux-cli wait_idle --pane=[id]inputs: tmux-cli send --text="[input]" --pane=[id]tmux-cli capture --pane=[id]expect appear in captured outputtmux-cli kill --pane=[id]Goal: Record progress in artifacts
Actions:
.feature-dev/active/feature_list.json:
.feature-dev/active/claude-progress.txt:
Session [N] ([date]):
Completed: [id] ([description])
Verification: PASS - [brief result description]
Smoke tests: [previous items' results, or "N/A" for first implementation session]
Next: [next pending item id and description, or "All items complete. Ready for code review."]
feat: implement [id] - [brief description]Goal: Ensure codebase is in good state
Actions:
Implementation session ends.
Execute this section when .feature-dev/active/feature_list.json exists AND all items have status "pass" AND .feature-dev/active/claude-progress.txt does NOT contain "Feature complete".
Actions:
.feature-dev/active/feature_list.json have status "pass"Goal: Ensure code is simple, DRY, elegant, easy to read, and functionally correct
Actions:
Goal: Document what was accomplished, bump version, and archive artifacts
Actions:
Mark all todos complete
Summarize:
Bump version in all version files:
target_version and version_files from .feature-dev/active/feature_list.jsonversion_files, update version string to target_version:
pyproject.toml: Update version = "X.Y.Z" linepackage.json: Update "version": "X.Y.Z" fieldVERSION or .claude/VERSION: Replace entire content with versionsetup.py: Update version="X.Y.Z" in setup() callUpdate CHANGELOG.md:
## [target_version] - YYYY-MM-DD
### Added/Changed/Fixed
- [feature description]
- [list key items completed]
Architecture: [approach from feature_list.json]
Append to .feature-dev/active/claude-progress.txt:
Session [N] ([date]):
Code review completed.
Issues found: [count]
[List issues and resolutions if any]
Version bumped: [current_version] → [target_version]
Feature complete.
Archive feature artifacts:
.feature-dev/completed/[target_version]-[feature-slug]/ directory.feature-dev/active/feature_list.json to archive.feature-dev/active/claude-progress.txt to archive.feature-dev/active/init.sh to archive (if exists).feature-dev/active/ directory (now empty)Ask user: "Ready to commit final state? Proceed?"
If approved:
.feature-dev/completed/feat: complete [feature-name] v[target_version]git tag v[target_version]"Feature development complete.
Execute this section when .feature-dev/active/claude-progress.txt contains "Feature complete" OR when .feature-dev/active/ is empty but .feature-dev/completed/ has entries.
Actions:
.feature-dev/completed/Most Recent Feature: [name]
Version: [target_version]
Status: ARCHIVED
Location: .feature-dev/completed/[version]-[feature]/
.feature-dev/completed/ contents).feature-dev/
├── active/ # Current feature in progress
│ ├── feature_list.json # Machine-readable work items
│ ├── claude-progress.txt # Human-readable session log
│ └── init.sh # Optional startup script
└── completed/ # Archived completed features
├── v3.2.0-csv-export/
│ ├── feature_list.json
│ └── claude-progress.txt
└── v4.0.0-launcher-rewrite/
├── feature_list.json
└── claude-progress.txt
.feature-dev/active/ is gitignored (work in progress).feature-dev/completed/ is committed (documentation of completed features)Location: .feature-dev/active/feature_list.json
{
"feature": "string - descriptive name of the feature",
"created": "string - ISO date (YYYY-MM-DD)",
"current_version": "string - version detected at start (e.g., 3.1.1)",
"target_version": "string - user-approved target version (e.g., 3.2.0)",
"version_files": ["array - files containing version (e.g., pyproject.toml, .claude/VERSION)"],
"architecture": "string - brief description of chosen approach",
"init_script": "string (optional) - path to startup script (e.g., ./init.sh)",
"items": [
{
"id": "string - sequential identifier (001, 002, etc.)",
"description": "string - what this item accomplishes",
"verification": "string - shell command returning exit code 0 on success",
"interactive_verification": {
"launch": "string (optional) - command to start interactive app",
"inputs": ["array (optional) - strings to send in order"],
"expect": ["array (optional) - patterns that must appear in output"]
},
"status": "string - 'pending' or 'pass'",
"session_completed": "number or null"
}
]
}
Rules:
id, description, verification, current_version, target_version, version_files are IMMUTABLE after creationstatus and session_completed may be modified during implementationVerification types:
python3 -m pytest tests/)manual: followed by instructions (e.g., manual: Run the app, verify the menu looks correct)
interactive_verification object for terminal apps that need real TTY
launch: Command to start the interactive app (e.g., python3 script.py)inputs: Array of strings to send in order (e.g., ["q"] to quit)expect: Array of patterns that must appear in output (e.g., ["MENU", "QUIT"])tmux-cli launch → tmux-cli send for each input → tmux-cli capture → check expect patterns| File | Pattern | Example |
|---|---|---|
pyproject.toml | version = "X.Y.Z" | Python (Poetry, uv) |
package.json | "version": "X.Y.Z" | JavaScript/Node |
VERSION | X.Y.Z or vX.Y.Z | Language-agnostic |
.claude/VERSION | vX.Y.Z | Claude Code projects |
setup.py | version="X.Y.Z" | Python (setuptools) |
Cargo.toml | version = "X.Y.Z" | Rust |
Location: .feature-dev/active/claude-progress.txt
Plain text, human-readable, append-only. Each session entry includes:
The phrase "Feature complete" in this file indicates the feature is done and triggers archival.
/feature-devGuided feature development with codebase understanding and architecture focus
/feature-devGuided feature development with codebase understanding and architecture focus
/feature-devGuided feature development with codebase understanding and architecture focus