harness-initializer

Installation
SKILL.md

Harness Initializer Skill

Initialize a new autonomous development harness project. This skill runs in the first session to read the application specification, generate feature tasks, and set up the project foundation.

Triggers

Use this skill when:

  • Starting a new harness project
  • Initializing autonomous development environment
  • Generating tasks from application specification
  • Setting up multi-session development project
  • Keywords: harness init, initialize harness, setup harness, first session, generate tasks, project initialization

Core Mission

This is Session 1 of a multi-session autonomous development project. You must:

  1. Read and understand the application specification from Archon
  2. Generate feature tasks in Archon based on the spec
  3. Set up the project structure and development environment
  4. Create clean handoff for the coding agent that will continue

Step-by-Step Protocol

STEP 1: Get Your Bearings

# 1. Check working directory
pwd

# 2. List existing files
ls -la

# 3. Read harness configuration
cat .harness/config.json

Extract the archon_project_id from the config file.

STEP 2: Query Archon for Project Context

# Get project details
project = find_projects(project_id="<PROJECT_ID>")

# Get harness configuration document
config_doc = find_documents(
    project_id="<PROJECT_ID>",
    document_type="guide",
    query="Harness Configuration"
)

# Get application specification document
spec_doc = find_documents(
    project_id="<PROJECT_ID>",
    document_type="spec",
    query="Application Specification"
)

# Get session notes document
notes_doc = find_documents(
    project_id="<PROJECT_ID>",
    document_type="note",
    query="Session Notes"
)

STEP 3: Analyze Application Specification

Read the application specification thoroughly. Identify:

  • Core Features: What are the main capabilities?
  • User Flows: How do users interact with the system?
  • Data Models: What entities and relationships exist?
  • Technical Requirements: Authentication, API design, etc.
  • Dependencies: What features depend on others?

STEP 4: Generate Feature Tasks in Archon

Based on the specification, create detailed tasks in Archon. Follow these guidelines:

Task Granularity

Each task should represent 30 minutes to 4 hours of work.

Task Structure

manage_task("create",
    project_id="<PROJECT_ID>",
    title="[Clear, specific feature title]",
    description="""## Feature Description
[What this feature does]

## Requirements
- Requirement 1
- Requirement 2
- Requirement 3

## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3

## Test Steps
1. Step to verify feature works
2. Step to verify edge cases
3. Step to verify error handling

## Dependencies
- Depends on: [Other task IDs if any]

## Notes
[Any additional context]""",
    status="todo",
    task_order=[PRIORITY 1-100],
    feature="[Feature Group]",
    assignee="Coding Agent"
)

Priority Guidelines (task_order)

Priority Range Feature Type Examples
95-100 Meta/Setup Environment, dependencies
85-94 Foundation Database schema, core models
75-84 Authentication Login, registration, sessions
65-74 Core API Main business logic
55-64 Secondary API Supporting features
45-54 Frontend Core Main UI components
35-44 Frontend Secondary Additional UI
25-34 Integration Third-party services
15-24 Testing Test suites, coverage
5-14 Documentation API docs, README
1-4 Polish Error handling, edge cases

Feature Groupings

Use the feature field to group related tasks:

  • Setup
  • Database
  • Authentication
  • Core API
  • Frontend
  • Integration
  • Testing
  • Documentation

STEP 5: Set Up Project Structure

Based on the harness configuration, create the appropriate project structure:

For Node.js/TypeScript:

src/
├── components/    # UI components (if frontend)
├── api/           # API routes
├── services/      # Business logic
├── models/        # Data models
├── utils/         # Utilities
├── types/         # TypeScript types
└── db/            # Database (migrations, seeds)
tests/
├── unit/
├── integration/
└── e2e/
docs/

For Python:

src/
├── api/           # API routes
├── services/      # Business logic
├── models/        # Data models
├── utils/         # Utilities
└── db/            # Database
tests/
├── unit/
├── integration/
└── e2e/
docs/

STEP 6: Initialize Development Environment

Run the init.sh script and verify it works:

chmod +x init.sh
./init.sh

Or for Windows:

.\init.ps1

Fix any issues that arise during initialization.

STEP 7: Initialize Git Repository

# Initialize if not already done
git init

# Create .gitignore if not exists
cat > .gitignore << 'EOF'
node_modules/
.env
.env.local
*.pyc
__pycache__/
.pytest_cache/
dist/
build/
.harness/local/
.DS_Store
*.log
EOF

# Make initial commit
git add .
git commit -m "Initial harness setup

- Created project structure
- Initialized development environment
- Generated [X] feature tasks in Archon
- Ready for coding agent

Harness Version: 1.0
Archon Project: <PROJECT_ID>"

STEP 8: Update Session Notes in Archon

manage_document("update",
    project_id="<PROJECT_ID>",
    document_id="<SESSION_NOTES_DOC_ID>",
    content={
        "sessions": [
            {
                "session_number": 1,
                "agent": "harness-initializer",
                "date": "<TIMESTAMP>",
                "status": "completed",
                "completed": [
                    "Read and analyzed application specification",
                    "Generated [X] feature tasks in Archon",
                    "Created project directory structure",
                    "Initialized git repository",
                    "Environment setup complete"
                ],
                "blockers": [],
                "notes": [
                    "All tasks ordered by priority",
                    "Ready for coding agent to begin"
                ]
            }
        ],
        "current_focus": "Ready for first feature implementation",
        "blockers": [],
        "next_steps": [
            "Start with highest priority TODO task",
            "Implement one feature at a time",
            "Run tests after each feature"
        ],
        "decisions": [
            # Any decisions made during initialization
        ]
    }
)

STEP 9: Update META Task

manage_task("update",
    task_id="<META_TASK_ID>",
    description="""## Current Session Status
- Session: 1 (Initialization)
- Agent: harness-initializer
- Status: Complete

## Session Summary
- Generated [X] feature tasks from specification
- Project structure created
- Environment initialized
- Git repository ready

## Next Session
- Agent: harness-coder
- Start with: [Highest priority task title]
- Task ID: [TASK_ID]

## Quick Stats
- Total Tasks: [X]
- Completed: 0
- In Progress: 0
- Remaining: [X]

---
Last Updated: <TIMESTAMP>"""
)

STEP 10: Mark Initialization Task Complete

manage_task("update",
    task_id="<INIT_TASK_ID>",
    status="done"
)

Output Summary

Before ending, display:

## Initialization Complete

### Tasks Generated
- **Total Features**: [X]
- **High Priority (75+)**: [Y]
- **Medium Priority (25-74)**: [Z]
- **Low Priority (1-24)**: [W]

### Feature Groups
| Group | Task Count |
|-------|------------|
| Setup | X |
| Database | X |
| Authentication | X |
| Core API | X |
| Frontend | X |
| Testing | X |
| Documentation | X |

### Project Structure
[Show created directories]

### Git Status
- Initial commit created
- [X] files tracked

### Archon Updates
- Session Notes updated
- META task updated
- Initialization task marked done

---

## Ready for Coding Agent

Use the harness-coder skill to start the first coding session.

First task: **[Task Title]** (Priority: [X])

Critical Rules

  1. NEVER skip task generation - Every feature in the spec needs a task
  2. NEVER create overly broad tasks - 30 min to 4 hours max
  3. ALWAYS include acceptance criteria - Tasks must be testable
  4. ALWAYS order by dependencies - Foundation before features
  5. ALWAYS update Archon - Session notes and META task
  6. ALWAYS commit to git - Clean state for next session
  7. ALWAYS verify environment works - Run init.sh successfully

Handling Issues

If spec is unclear:

Create tasks for what you understand, and create a "Clarification Needed" task with questions for the user.

If environment fails to initialize:

  1. Document the error
  2. Create a "Fix Environment" task with high priority
  3. Update session notes with the blocker
  4. Still commit what you have

If Archon is slow:

  • Batch task creation where possible
  • Log progress to console
  • Continue even if some operations are slow
Related skills

More from housegarofalo/claude-code-base

Installs
4
GitHub Stars
2
First Seen
Mar 15, 2026