AgentSkillsCN

init-harness

创建AI代理任务管理结构,包含功能待办事项列表(ai/tasks/)、TDD强制执行和进度跟踪。当设置代理-工头、初始化功能驱动开发、创建任务待办事项列表,或启用TDD模式时,请使用本指南。触发条件包括“初始化框架”、“设置功能跟踪”、“创建功能待办事项列表”、“启用严格TDD”、“初始化代理-工头”。

SKILL.md
--- frontmatter
name: init-harness
description: 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'.
allowed-tools: [Bash, Read, Glob, Grep, Write, Edit]
user-invocable: true

⚡ Init Harness

One command: agent-foreman init

Quick Start

bash
agent-foreman init

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

TDD Mode (Default: Recommended)

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 (fast)
  2. Source code exists → AI scan + auto-save ARCHITECTURE.md
  3. Empty project → generate from goal

Pre-Init (Recommended)

For existing projects:

bash
agent-foreman init --analyze    # First: understand project
agent-foreman init              # Then: create harness

Created Files

code
ai/
├── tasks/              # Task backlog (modular markdown)
│   ├── index.json      # Task index
│   └── {module}/       # Module directories
│       └── {id}.md     # Individual tasks
├── progress.log        # Session audit log
├── init.sh             # Bootstrap script
└── capabilities.json   # Detected test/lint/build
CLAUDE.md               # AI agent instructions
docs/ARCHITECTURE.md    # Auto-generated architecture doc