From Claude Harness
Manages end-to-end feature lifecycle from GitHub issue creation to merge using ATDD and subagents. Supports feature implementation, bug fixes, and batch processing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-harness:flow [description | feature-id] [--no-merge --plan-only --autonomous --quick --fix --team][description | feature-id] [--no-merge --plan-only --autonomous --quick --fix --team]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
The single command for all development workflows. Handles the entire feature lifecycle from creation to merge.
The single command for all development workflows. Handles the entire feature lifecycle from creation to merge.
Arguments: $ARGUMENTS
Session ID: ${CLAUDE_SESSION_ID} — session state lives in .claude-harness/sessions/${CLAUDE_SESSION_ID}/.
All workflows run through this single entry point with flags:
/claude-harness:flow "Add dark mode support" # Standard workflow
/claude-harness:flow --autonomous # Batch process all features
/claude-harness:flow --plan-only "Big refactor" # Plan only, implement later
/claude-harness:flow --team "Add user login" # ATDD with Agent Team (3 teammates)
Lifecycle: Context -> Creation -> [Subagent Delegation] -> Planning -> Implementation -> Verification -> Checkpoint -> Merge -> [Result Processing]
Context Isolation: In standard mode, Phases 3-6 run inside an isolated subagent (via the Agent tool, subagent type claude-harness:harness-implementer). The main context stays clean after feature completion -- no /clear needed between features.
ATDD Team Lifecycle (with --team): Context -> Creation (with Gherkin criteria) -> [Subagent Delegation] -> Planning -> Team Spawn -> Acceptance Tests (RED) -> Implementation (GREEN) -> Review -> Verify -> Checkpoint -> Merge
Each delegated subagent gets at most 4 implementation attempts. If it escalates, the orchestrator spawns a fresh subagent (clean context) seeded with the failure summary from the previous delegation -- up to 3 delegations per feature (12 attempts total). A fresh context with distilled failure knowledge outperforms a degraded context grinding through attempt 15.
Parse arguments:
feature-\d+: Resume existing featurefix-feature-\d+-\d+: Resume existing fix--fix <feature-id> "description": Create fix linked to featureParse options:
--no-merge: Skip merge phase (stop at checkpoint)--quick: Implement directly without planning phase--plan-only: Stop after Phase 3. Resume later with feature ID.--autonomous: Outer loop -- iterate all active features--team: Use Agent Teams for ATDD implementation (requires agentTeams.enabled in config.json)Mode validation:
--autonomous: Compatible with --no-merge, --quick, and --team. Proceed to Autonomous Wrapper.--plan-only: Proceeds through Phases 0-3 then STOPS. Incompatible with --team.--team: Compatible with --autonomous, --no-merge. Incompatible with --quick and --plan-only.Read ${CLAUDE_SKILL_DIR}/references/team-atdd.md for full Agent Teams ATDD details.
.claude-harness/config.json agentTeams section: verify enabled is true. If not: display "Enable agentTeams in config.json" and STOP.defaultTeamSize, roles, requirePlanApproval, teammateModelWhen --autonomous is set, the flow operates as a lean orchestrator loop that iterates all active features. Each feature is executed in an isolated subagent context via the Agent tool.
Read ${CLAUDE_SKILL_DIR}/references/autonomous-wrapper.md for the full autonomous orchestration phases (A.1 through A.7).
Tip: for fully unattended batches, run the session as claude --permission-mode acceptEdits -- the PermissionRequest hook then only has to arbitrate the rare dangerous operations.
Both standard and autonomous modes delegate feature implementation to the claude-harness:harness-implementer subagent via the Agent tool (fall back to general-purpose if the type is unavailable). This provides:
--team is used, the Agent Team lifecycle is fully contained within the subagentStandard mode (Phase 2.5): Single feature delegated after creation. Autonomous mode (Phase A.4): Multiple features delegated in a loop.
Set paths:
FEATURES_FILE=".claude-harness/features/active.json"MEMORY_DIR=".claude-harness/memory/"ARCHIVE_FILE=".claude-harness/features/archive.json"GitHub repo: use the cached owner/repo from the session context (injected at SessionStart). Only if absent, parse once from git remote get-url origin.
Read IN PARALLEL (single message, multiple Read calls): active.json plus the memory bundle index files ${MEMORY_DIR}/failures/index.md, ${MEMORY_DIR}/successes/index.md, ${MEMORY_DIR}/decisions/index.md, ${MEMORY_DIR}/rules/index.md (then read only the relevant concept files)
Compile working context to .claude-harness/sessions/${CLAUDE_SESSION_ID}/context.json:
{
"version": 3, "computedAt": "{ISO}", "sessionId": "${CLAUDE_SESSION_ID}",
"github": { "owner": "{owner}", "repo": "{repo}" },
"activeFeature": null,
"relevantMemory": { "recentDecisions": [], "projectPatterns": [], "avoidApproaches": [], "learnedRules": [] }
}
Display context summary: memory stats, GitHub info.
Use cached GitHub owner/repo from Phase 1.
Generate feature ID: Read active.json, find highest ID, generate next feature-XXX.
Define acceptance criteria (ATDD -- always on):
acceptanceCriteria (from PRD breakdown): use those{ "scenario", "given", "when", "then" }Create GitHub Issue via gh issue create --title "{name}" --label "feature,claude-harness,flow" --body "{Problem/Solution/Acceptance Criteria (Gherkin)/Verification}". STOP if it fails (check gh auth status).
Create and checkout branch locally: git checkout -b feature/feature-XXX (no API round-trip; the branch reaches the remote on first git push -u origin feature/feature-XXX).
Create feature entry in active.json: id, name, status "in_progress", acceptanceCriteria, github refs, verificationCommands, maxAttempts 12.
Skip this phase if --plan-only or --autonomous.
After feature creation, delegate the remaining lifecycle to an isolated subagent for clean context. Read ${CLAUDE_SKILL_DIR}/references/implementation.md for the delegation prompt format and result processing logic.
subagent_type="claude-harness:harness-implementer"RESULT: from the subagent's reply)escalated, re-delegate a fresh subagent (max 3 delegations)Note: In standard mode, this phase runs inside the delegated subagent. It only runs inline when --plan-only is set.
Uses Claude Code's native task tracking (TaskCreate/TaskUpdate) for visual progress.
Read ${CLAUDE_SKILL_DIR}/references/team-atdd.md for full team roster and ATDD spawn prompts.
Summary: Prepare team structure with tester, implementer, reviewer roles. Prepare ATDD spawn prompts for each role.
If --plan-only: display plan summary (feature ID, issue, branch) with resume command and EXIT.
Read ${CLAUDE_SKILL_DIR}/references/implementation.md for full implementation details including loop state schema, standard vs team implementation, and verification.
${MEMORY_DIR}/failures/, increment attempts, retry with a different approach (max 4 per delegation)Read ${CLAUDE_SKILL_DIR}/references/team-atdd.md for full ATDD team implementation including team creation, monitoring, shutdown gate, and cleanup.
${MEMORY_DIR}/failures/ (+ index.md line), increment attempts, retry${MEMORY_DIR}/successes/ (+ index.md line), mark loop "completed", update tasksTriggers when verification passes. Read ${CLAUDE_SKILL_DIR}/references/checkpoint.md for detailed checkpoint phases.
Summary:
.claude-harness/claude-progress.json with session summary.claude-harness/session-briefing.mdgit push -u origin {branch}), create/update PR via gh pr create / gh pr editOnly proceeds if PR approved and CI passes.
gh pr view {number} --json state,mergeable,reviewDecision,statusCheckRollupgh pr merge {number} --squash --delete-branch, close issue if not auto-closed (gh issue close {issueNumber}), update status to "passing", archive featuregit branch -d), prune refs, clear loop state/claude-harness:flow feature-XXX:
.claude-harness/sessions/.recovery/interrupted.jsonpending -> Phase 3, in_progress -> Phase 4, needs_review -> Phase 6, passing -> already completegh failures: Retry with exponential backoff. If persistent (auth, network): pause and inform user (gh auth status).| Command | Behavior |
|---|---|
/flow "Add X" | Full lifecycle with context isolation: implement -> verify -> checkpoint -> merge |
/flow feature-XXX | Resume existing feature from current phase |
/flow --no-merge "Add X" | Stop at checkpoint |
/flow --quick "Simple fix" | Skip planning, implement directly |
/flow --plan-only "Big feature" | Plan only, implement later |
/flow --fix feature-001 "Bug" | Create and complete a bug fix |
/flow --autonomous | Batch process all features |
/flow --autonomous --no-merge | Batch, stop at checkpoint |
/flow --autonomous --quick | Autonomous without planning |
/flow --team "Add X" | ATDD with Agent Team: tester + implementer + reviewer |
/flow --team --no-merge "Add X" | Team ATDD, stop at checkpoint |
/flow --team --autonomous | Teams for each feature in autonomous batch |
Flag combinations: --no-merge --plan-only (plan before implementing), --autonomous --no-merge --quick (fast batch without merge), --team --autonomous --no-merge (team ATDD batch without merge)
| Mode | Use Case |
|---|---|
Default (/flow "desc") | Standard feature development (context-isolated via subagent) |
--no-merge | Review PR before merging |
--plan-only | Complex features needing upfront design |
--quick | Simple fixes -- skips planning |
--autonomous | Batch processing feature backlog unattended |
--team | Complex features benefiting from parallel review + ATDD |
--team --autonomous | High-quality batch processing with code review |
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-agent-framework --plugin panayiotism-claude-harnessExecutes a 5-phase TDD workflow for complex features and multi-file changes, enforcing phase gates and builder!=reviewer discipline.
Orchestrates full-stack feature implementation using parallel subagents for backend, frontend, testing, and security. Coordinates architecture, code generation, test coverage, and quality verification with worktree isolation.
Autonomously implements a feature in an isolated git worktree, handling commits, review, tests, PR, feedback, and merge without user interaction. Use when a workspace agent should build or implement a feature.