harness-initializer
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:
- Read and understand the application specification from Archon
- Generate feature tasks in Archon based on the spec
- Set up the project structure and development environment
- 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:
SetupDatabaseAuthenticationCore APIFrontendIntegrationTestingDocumentation
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
- NEVER skip task generation - Every feature in the spec needs a task
- NEVER create overly broad tasks - 30 min to 4 hours max
- ALWAYS include acceptance criteria - Tasks must be testable
- ALWAYS order by dependencies - Foundation before features
- ALWAYS update Archon - Session notes and META task
- ALWAYS commit to git - Clean state for next session
- 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:
- Document the error
- Create a "Fix Environment" task with high priority
- Update session notes with the blocker
- 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
More from housegarofalo/claude-code-base
mqtt-iot
Configure MQTT brokers (Mosquitto, EMQX) for IoT messaging, device communication, and smart home integration. Manage topics, QoS levels, authentication, and bridging. Use when setting up IoT messaging, smart home communication, or device-to-cloud connectivity. (project)
22devops-engineer-agent
Infrastructure and DevOps specialist. Manages Docker, Kubernetes, CI/CD pipelines, and cloud deployments. Expert in GitHub Actions, Azure DevOps, Terraform, and container orchestration. Use for deployment automation, infrastructure setup, or CI/CD optimization.
6postgresql
Design, optimize, and manage PostgreSQL databases. Covers indexing, pgvector for AI embeddings, JSON operations, full-text search, and query optimization. Use when working with PostgreSQL, database design, or building data-intensive applications.
6home-assistant
Ultimate Home Assistant skill - complete administration, wireless protocols (Zigbee/ZHA/Z2M, Z-Wave JS, Thread, Matter), ESPHome device building, advanced troubleshooting, performance optimization, security hardening, custom integration development, and professional dashboard design. Covers configuration, REST API, automation debugging, database optimization, SSL/TLS, Jinja2 templating, and HACS custom cards. Use for any HA task.
6testing
Comprehensive testing skill covering unit, integration, and E2E testing with pytest, Jest, Cypress, and Playwright. Use for writing tests, improving coverage, debugging test failures, and setting up testing infrastructure.
5react-typescript
Build modern React applications with TypeScript. Covers React 18+ patterns, hooks, component architecture, state management (Zustand, Redux Toolkit), server components, and best practices. Use for React development, TypeScript integration, component design, and frontend architecture.
5