|
| 1 | +# AI Engineering Harness |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This repository provides a configuration harness for AI coding agents. It contains reusable agents, commands, skills, and workflows that are symlinked to `~/.config/opencode/` via GNU Stow. The harness implements a structured "context engineering" workflow for AI-assisted development. |
| 6 | + |
| 7 | +**Primary Purpose**: Standardize AI agent tooling with battle-tested prompts, agents, and workflows across multiple projects. |
| 8 | + |
| 9 | +## Repository Structure |
| 10 | + |
| 11 | +``` |
| 12 | +ai-engineering-harness/ |
| 13 | +├── opencode/ # OpenCode configuration (symlinked to ~/.config/opencode/) |
| 14 | +│ ├── agents/ # Specialized sub-agents for Task tool |
| 15 | +│ │ ├── codebase-analyzer.md |
| 16 | +│ │ ├── codebase-locator.md |
| 17 | +│ │ ├── codebase-pattern-finder.md |
| 18 | +│ │ ├── thoughts-analyzer.md |
| 19 | +│ │ ├── thoughts-locator.md |
| 20 | +│ │ └── web-search-researcher.md |
| 21 | +│ ├── commands/ # Custom slash commands |
| 22 | +│ │ ├── commit.md |
| 23 | +│ │ ├── create_plan.md |
| 24 | +│ │ ├── debug.md |
| 25 | +│ │ ├── implement_plan.md |
| 26 | +│ │ ├── research_codebase.md |
| 27 | +│ │ └── validate_plan.md |
| 28 | +│ ├── skills/ # Auto-triggered behaviors |
| 29 | +│ │ ├── experimental-pr-workflow/ |
| 30 | +│ │ ├── git-commit-helper/ |
| 31 | +│ │ ├── init-harness/ |
| 32 | +│ │ └── pr-description-generator/ |
| 33 | +│ └── opencode.json # MCP server configuration |
| 34 | +├── thoughts/ # Context engineering artifacts |
| 35 | +│ ├── shared/ # Team-wide documents |
| 36 | +│ │ ├── tickets/ # Feature requests, bug reports |
| 37 | +│ │ ├── plans/ # Implementation plans |
| 38 | +│ │ └── research/ # Research documents |
| 39 | +│ └── global/ # Cross-repository concerns |
| 40 | +├── setup.sh # GNU Stow installation script |
| 41 | +├── README.md # User documentation |
| 42 | +└── LICENSE # Apache 2.0 |
| 43 | +``` |
| 44 | + |
| 45 | +## Key Components |
| 46 | + |
| 47 | +### Agents (`opencode/agents/`) |
| 48 | + |
| 49 | +Specialized sub-agents invoked via the Task tool: |
| 50 | + |
| 51 | +| Agent | Purpose | |
| 52 | +|-------|---------| |
| 53 | +| `codebase-analyzer` | Analyzes implementation details, traces data flow, explains how code works | |
| 54 | +| `codebase-locator` | Finds files and directories relevant to features or tasks | |
| 55 | +| `codebase-pattern-finder` | Discovers similar implementations and usage patterns | |
| 56 | +| `thoughts-analyzer` | Extracts insights from research documents in thoughts/ | |
| 57 | +| `thoughts-locator` | Discovers documents in thoughts/ directories | |
| 58 | +| `web-search-researcher` | Researches information from web sources | |
| 59 | + |
| 60 | +### Commands (`opencode/commands/`) |
| 61 | + |
| 62 | +Custom slash commands for workflows: |
| 63 | + |
| 64 | +| Command | Purpose | |
| 65 | +|---------|---------| |
| 66 | +| `/create_plan` | Create detailed implementation plans from tickets | |
| 67 | +| `/implement_plan` | Execute approved plans phase by phase | |
| 68 | +| `/validate_plan` | Verify implementation against plan specifications | |
| 69 | +| `/research_codebase` | Conduct comprehensive codebase research | |
| 70 | +| `/commit` | Create well-structured git commits | |
| 71 | +| `/debug` | Investigate issues during manual testing | |
| 72 | + |
| 73 | +### Skills (`opencode/skills/`) |
| 74 | + |
| 75 | +Auto-triggered behaviors based on context: |
| 76 | + |
| 77 | +| Skill | Trigger | |
| 78 | +|-------|---------| |
| 79 | +| `init-harness` | `/init-harness` command | |
| 80 | +| `git-commit-helper` | User says "commit" or similar | |
| 81 | +| `pr-description-generator` | Creating pull requests | |
| 82 | +| `experimental-pr-workflow` | Formalizing experimental work | |
| 83 | + |
| 84 | +## Context Engineering Workflow |
| 85 | + |
| 86 | +The harness implements a structured workflow: |
| 87 | + |
| 88 | +``` |
| 89 | +Ticket → /create_plan → /implement_plan → /validate_plan → /commit |
| 90 | +``` |
| 91 | + |
| 92 | +1. **Create a Ticket** in `thoughts/shared/tickets/` using the template |
| 93 | +2. **Generate a Plan** with `/create_plan thoughts/shared/tickets/PROJ-001.md` |
| 94 | +3. **Implement** with `/implement_plan thoughts/shared/plans/feature.md` |
| 95 | +4. **Validate** with `/validate_plan` |
| 96 | +5. **Commit** with `/commit` |
| 97 | + |
| 98 | +## Installation |
| 99 | + |
| 100 | +Uses GNU Stow for symlink management: |
| 101 | + |
| 102 | +```bash |
| 103 | +./setup.sh # Install (symlink to ~/.config/opencode/) |
| 104 | +./setup.sh --dry-run # Preview changes |
| 105 | +./setup.sh --restow # Update after changes |
| 106 | +./setup.sh --delete # Remove symlinks |
| 107 | +``` |
| 108 | + |
| 109 | +## Key Patterns |
| 110 | + |
| 111 | +### Ticket-Driven Development |
| 112 | + |
| 113 | +All work starts with a ticket in `thoughts/shared/tickets/`. The ticket template at `thoughts/shared/tickets/ticket-template.md` provides structure for: |
| 114 | +- Problem statement |
| 115 | +- Requirements and acceptance criteria |
| 116 | +- Technical notes and affected components |
| 117 | + |
| 118 | +### Plan Files |
| 119 | + |
| 120 | +Plans in `thoughts/shared/plans/` contain: |
| 121 | +- Phased implementation steps |
| 122 | +- Success criteria (automated and manual) |
| 123 | +- Checkboxes that are updated during implementation |
| 124 | + |
| 125 | +### Agent-Based Research |
| 126 | + |
| 127 | +The codebase agents (`codebase-locator`, `codebase-analyzer`, `codebase-pattern-finder`) are designed to be spawned from commands like `/create_plan` for comprehensive research before planning. |
| 128 | + |
| 129 | +## Open Tickets |
| 130 | + |
| 131 | +Active development tracked in `thoughts/shared/tickets/`: |
| 132 | +- HARNESS-001: Add Claude Code support |
| 133 | +- HARNESS-002: Add Cursor support |
| 134 | +- HARNESS-003: Expand MCP server configurations |
| 135 | +- HARNESS-004: Create comprehensive documentation |
| 136 | + |
| 137 | +## Configuration |
| 138 | + |
| 139 | +### MCP Servers (`opencode/opencode.json`) |
| 140 | + |
| 141 | +Currently configured (disabled by default): |
| 142 | +- `kubernetes` - Kubernetes MCP server for cluster management |
0 commit comments