agent-foreman

Long Task Harness providing external memory, feature-driven workflow, and clean agent handoffs

View on GitHub
Author Lukin
Namespace @mylukin/agent-foreman-plugins
Category general
Version 0.2.1
Stars 243
Downloads 3
self.md verified
Table of content

Long Task Harness providing external memory, feature-driven workflow, and clean agent handoffs

Installation

npx claude-plugins install @mylukin/agent-foreman-plugins/agent-foreman

Contents

Folders: agents, commands, skills

Included Skills

This plugin includes 5 skill definitions:

feature-next

Implements a single task following the next → implement → check → done workflow with TDD support. Use when working on one specific task, implementing a single feature from the backlog, or following TDD red-green-refactor cycle. Triggers on ’next task’, ’next feature’, ‘implement feature’, ‘work on feature’, ‘single task mode’, ‘what should I work on’.

View skill definition

Task Next

One command: agent-foreman next

⚠️ STRICT WORKFLOW - NO IMPROVISATION

You MUST follow this exact sequence. Do NOT skip or reorder steps.

next → implement → check → done
❌ FORBIDDEN✅ REQUIRED
Skip check stepRun agent-foreman check before done
Go straight to implementationRun agent-foreman next first
Invent extra stepsUse only the 4 steps above

⛔ CLI-ONLY ENFORCEMENT

NEVER bypass CLI for workflow decisions:

❌ FORBIDDEN✅ REQUIRED
Read ai/tasks/index.json to select taskUse agent-foreman next
Read index.json to check statusUse agent-foreman status
Read index.json for TDD modeCheck CLI output for !!! TDD ENFORCEMENT ACTIVE !!!
Edit task files to change statusUse agent-foreman done/fail

Allowed: Reading task .md files for acceptance criteria AFTER running agent-foreman next.


Quick Start

agent-foreman next           # Auto-select next priority
agent-foreman next auth.login  # Specific task

Workflow

next → implement → check → done
agent-foreman next              # 1. Get task + acceptance criteria
# ... implement the task ...    # 2. Write code
agent-foreman check <id>        # 3. Verify implementation
agent-foreman done <id>         # 4. Mark complete + commit

Check TDD Mode First

Look for “!!! TDD ENFORCEMENT ACTIVE !!!” in `agen

…(truncated)

feature-run

Executes unattended batch processing of all pending tasks with autonomous decision-making. Use when running all tasks automatically, batch processing without supervision, completing entire feature backlog, or working on a specific task by ID. Triggers on ‘run all tasks’, ‘complete all features’, ‘batch processing’, ‘unattended mode’, ‘auto-complete tasks’, ‘run feature’.

View skill definition

Task Run

Mode: Work on all tasks or a specific one

⚠️ STRICT WORKFLOW - NO IMPROVISATION

You MUST follow this exact sequence for EVERY task. Do NOT skip or reorder steps.

next → implement → check → done
❌ FORBIDDEN✅ REQUIRED
Skip check stepRun agent-foreman check before done
Go straight to implementationRun agent-foreman next first
Invent extra stepsUse only the 4 steps above
Reorder the workflowExecute in exact sequence

⛔ CLI-ONLY ENFORCEMENT

NEVER bypass CLI for workflow decisions:

❌ FORBIDDEN✅ REQUIRED
Read ai/tasks/index.json to select taskUse agent-foreman next
Read index.json to check statusUse agent-foreman status
Read task files to check statusUse CLI commands
Edit task files to change statusUse agent-foreman done/fail

This applies to ALL iterations in the loop.


UNATTENDED MODE (when no task_id provided)

Mode Detection

If task_id provided (e.g., feature-run auth.login):

If no task_id (e.g., feature-run):


Single Task Mode

When task_id is provided:

# STEP 1: Delegate to implementer agent
Task(
  subagent_

...(truncated)

</details>

### foreman-spec

> Multi-role requirement analysis and task breakdown workflow using 4 specialized AI agents (PM, UX, Tech, QA). Each agent conducts web research before analysis to gather industry best practices, case studies, and current trends. Supports Quick Mode (parallel, ~3 min, one Q&A session) and Deep Mode (serial, ~8 min, Q&A after EACH agent so answers inform subsequent analysis). Triggers on 'foreman-spec', 'spec feature', 'break down requirement', 'define tasks', 'spec this'.

<details>
<summary>View skill definition</summary>

# Spec Workflow (V8 - Research-Enhanced)

Multi-role requirement analysis using 4 specialized AI agents, each equipped with web research capabilities.

## Overview

Transform a high-level requirement into fine-grained, implementable tasks through multi-perspective analysis.

**Key Feature: Research-First Approach**

Each agent conducts web research BEFORE analysis to:
- Gather industry best practices and standards
- Find case studies and competitor implementations
- Discover current trends and proven patterns
- Ground recommendations in real-world data

**Agents** (all equipped with WebSearch):
- agent-foreman:pm (Product Manager) - Clarifies WHAT and WHY, researches market/industry
- agent-foreman:ux (UX/UI Designer) - Designs HOW users interact, researches UX patterns
- agent-foreman:tech (Technical Architect) - Architects HOW to build, researches frameworks/security
- agent-foreman:qa (QA Manager) - Plans HOW to verify, researches testing strategies

**Modes**:
- Quick Mode (parallel) - ~3-4 min, includes research, one combined Q&A session at the end
- Deep Mode (serial) - ~8-10 min, comprehensive research, Q&A after EACH agent (4 sessions, each answer informs subsequent agents)

---

## Phase 0: Mode Selection

Before any analysis, detect project state and ask user to choose mode.

### Step 1: Scan Codebase

Use Glob to detect project state:

Check if ai/tasks/ exists → EXISTING_PROJECT Check if package.json or pyproject.toml exists → EXISTING_PROJECT Otherwise → NEW_

…(truncated)

init-harness

Creates AI agent task management structure with feature backlog (ai/tasks/), TDD enforcement, and progress tracking. Use when setting up agent-foreman, initializing feature-driven development, creating task backlog, or enabling TDD mode. Triggers on ‘init harness’, ‘setup feature tracking’, ‘create feature backlog’, ’enable strict TDD’, ‘initialize agent-foreman’.

View skill definition

⚡ Init Harness

One command: agent-foreman init

Quick Start

agent-foreman init

Creates: ai/tasks/, ai/progress.log, ai/init.sh, CLAUDE.md

During init, you’ll be prompted for TDD mode. Recommended is the default (tests suggested but not required).

User SaysTDD ModeEffect
“strict TDD” / “require tests”strictTests REQUIRED - check/done fail without tests
“recommended” / “optional tests” / (default)recommendedTests suggested but not enforced
“disable TDD” / “no TDD”disabledNo TDD guidance

The prompt auto-skips after 10 seconds with recommended mode.

Modes

ModeCommandEffect
Merge (default)agent-foreman initKeep existing + add new features
Freshagent-foreman init --mode newReplace all features
Previewagent-foreman init --mode scanShow without changes

Task Types

TypeCommandUse Case
Code (default)agent-foreman initSoftware development
Opsagent-foreman init --task-type opsOperational tasks, runbooks
Dataagent-foreman init --task-type dataETL, data pipelines
Infraagent-foreman init --task-type infraInfrastructure provisioning
Manualagent-foreman init --task-type manualManual-only verification

Auto-Detection

  1. ARCHITECTURE.md exists → use it (f

…(truncated)

project-analyze

Scans codebases to generate architecture documentation (ARCHITECTURE.md). Use when joining an existing project, understanding codebase structure, exploring project architecture, or preparing for agent-foreman init. Triggers on ‘analyze project’, ‘understand codebase’, ’explore architecture’, ‘scan project structure’, ‘survey project’.

View skill definition

🔍 Project Analyze

One command: agent-foreman init --analyze

Quick Start

agent-foreman init --analyze

Output: docs/ARCHITECTURE.md

Options

FlagEffect
--analyze-output ./path/FILE.mdCustom output path
--verboseShow detailed progress

Use When

Skip When

Read-Only

No code changes. No commits. Safe to run anytime.

Source

View on GitHub

Tags: general long-taskharnessfeature-drivenagent-memoryhandoffai-agentclaude-code