Skip to content

Commit 4dbd62d

Browse files
authored
Merge pull request #1 from StLeoX/main
feat: Add harness-creator skill for harness creation
2 parents 01024a9 + 6b59d87 commit 4dbd62d

33 files changed

Lines changed: 7959 additions & 0 deletions
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# harness-creator Skill
2+
3+
Production harness engineering skill for AI coding agents, distilled from Learn Harness Engineering course and industry best practices.
4+
5+
## Installation
6+
7+
```bash
8+
npx skills add github:harness-creator
9+
```
10+
11+
Or manually copy the `.opencode/skills/harness-creator/` directory to your skill path.
12+
13+
## What This Skill Does
14+
15+
This skill helps you:
16+
- **Create harnesses from scratch** — AGENTS.md, feature lists, verification workflows
17+
- **Improve existing harnesses** — Five-subsystem assessment with prioritized improvements
18+
- **Design session continuity** — Memory persistence, progress tracking, handoff procedures
19+
- **Benchmark effectiveness** — Before/after comparison with quantitative metrics
20+
- **Apply production patterns** — Memory, context engineering, tool safety, multi-agent coordination
21+
22+
## Core Framework: Five Subsystems
23+
24+
Every harness consists of five subsystems:
25+
26+
1. **Instructions** — AGENTS.md as routing layer, progressive disclosure via docs/ hierarchy
27+
2. **State** — feature_list.json, progress.md, session handoff files
28+
3. **Verification** — Explicit commands that agent MUST run before claiming done
29+
4. **Scope** — One-feature-at-a-time policy, clear definition of done
30+
5. **Lifecycle** — init.sh, clean-state checklists, session continuity mechanisms
31+
32+
## Reference Patterns
33+
34+
This skill includes 6 deep-dive reference documents:
35+
36+
| Pattern | When to Use |
37+
|---------|-------------|
38+
| [Memory Persistence](references/memory-persistence-pattern.md) | Agent forgets between sessions, need persistent project knowledge |
39+
| [Context Engineering](references/context-engineering-pattern.md) | Context budget management, JIT loading, delegation isolation |
40+
| [Tool Registry](references/tool-registry-pattern.md) | Tool safety, concurrency control, permission pipelines |
41+
| [Multi-Agent Coordination](references/multi-agent-pattern.md) | Parallelism, specialization, researcher→implementer workflows |
42+
| [Lifecycle & Bootstrap](references/lifecycle-bootstrap-pattern.md) | Hooks, background tasks, initialization sequences |
43+
| [Gotchas](references/gotchas.md) | 15 non-obvious failure modes with fixes |
44+
45+
## Usage Examples
46+
47+
### Create Minimal Harness
48+
49+
```
50+
User: "I need to set up AGENTS.md for my TypeScript project"
51+
52+
Skill will:
53+
1. Ask about project context (stack, size, agent tool)
54+
2. Generate AGENTS.md with startup workflow and working rules
55+
3. Create feature_list.json template with placeholder features
56+
4. Create init.sh with verification commands
57+
5. Explain how to use each file
58+
```
59+
60+
### Assess Existing Harness
61+
62+
```
63+
User: "My agent still breaks things even with AGENTS.md"
64+
65+
Skill will:
66+
1. Request current AGENTS.md content
67+
2. Score each of 5 subsystems (1-5 scale)
68+
3. Identify lowest-scoring subsystem as bottleneck
69+
4. Provide prioritized improvement plan with concrete steps
70+
```
71+
72+
### Design Session Continuity
73+
74+
```
75+
User: "Agent forgets everything between sessions"
76+
77+
Skill will:
78+
1. Explain memory layers (instruction vs auto-memory)
79+
2. Design progress.md template for session tracking
80+
3. Create session-handoff.md structure
81+
4. Implement two-step save invariant (topic file → index)
82+
```
83+
84+
## When to Trigger
85+
86+
This skill triggers on:
87+
- "Create AGENTS.md / CLAUDE.md"
88+
- "Improve agent reliability"
89+
- "Agent forgets between sessions"
90+
- "Multi-session continuity needed"
91+
- "Benchmark harness effectiveness"
92+
- "Design verification workflow"
93+
- "Memory persistence patterns"
94+
- "Context engineering for agents"
95+
96+
## When NOT to Use
97+
98+
This skill does NOT cover:
99+
- Prompt engineering or system prompt design
100+
- Model selection or fine-tuning
101+
- Generic software architecture
102+
- LLM API integration basics
103+
104+
## Templates Included
105+
106+
- `templates/agents.md` — AGENTS.md scaffold with working rules
107+
- `templates/feature-list.json` — JSON Schema + example
108+
- `templates/init.sh` — Standard initialization script
109+
- `templates/progress.md` — Session progress log template
110+
- `templates/session-handoff.md` — Handoff structure
111+
112+
## EvaluationFramework
113+
114+
5 test cases in `evals/evals.json`:
115+
1. **Minimal Harness Creation** — Full setup from scratch
116+
2. **Session Continuity Setup** — Memory and handoff design
117+
3. **Harness Assessment** — Five-subsystem scoring
118+
4. **Verification Workflow Design** — Force agent to verify before done
119+
5. **Memory Taxonomy Design** — What to save vs skip
120+
121+
Run evaluation with skill-creator framework for quantitative benchmarks.
122+
123+
## Compatibility
124+
125+
- **Agents**: Claude Code, Codex, Cursor, Windsurf, generic
126+
- **License**: MIT
127+
- **Languages**: English / 中文 (bilingual support in SKILL.md)
128+
129+
## 兼容性
130+
131+
- **代理工具**: Claude Code, Codex, Cursor, Windsurf, generic
132+
- **许可证**: MIT
133+
- **语言**: 英文 / 中文 (SKILL.md 中双语支持)
134+
135+
## Project Structure
136+
137+
```
138+
harness-creator/
139+
├── SKILL.md # Main skill definition
140+
├── metadata.json # Skill metadata, triggers, compatibility
141+
├── evals/
142+
│ └── evals.json # 5 test cases with expectations
143+
├── templates/
144+
│ ├── agents.md # AGENTS.md template
145+
│ ├── feature-list.json # Feature tracker template
146+
│ ├── init.sh # Initialization script
147+
│ └── progress.md # Session progress template
148+
└── references/
149+
├── memory-persistence-pattern.md
150+
├── context-engineering-pattern.md
151+
├── tool-registry-pattern.md
152+
├── multi-agent-pattern.md
153+
├── lifecycle-bootstrap-pattern.md
154+
└── gotchas.md # 15 failure modes
155+
```
156+
157+
## Development Roadmap
158+
159+
- [x] Chinese translation in SKILL.md (bilingual support added)
160+
- [ ] Python scripts for automated harness generation
161+
- [ ] HTML viewer for harness assessment results
162+
- [ ] Expanded eval set (10+ test cases)
163+
- [ ] Integration with skill-creator benchmark framework
164+
- [ ] Full Chinese localization (harness-creator-zh directory)
165+
166+
## 开发路线图
167+
168+
- [x] SKILL.md 中文翻译(已添加双语支持)
169+
- [ ] Harness 自动生成 Python 脚本
170+
- [ ] Harness 评估结果 HTML 查看器
171+
- [ ] 扩展测试用例(10+ 个)
172+
- [ ] 集成 skill-creator 基准测试框架
173+
- [ ] 完整中文本地化(harness-creator-zh 目录)
174+
175+
## Contributing
176+
177+
Issues and PRs welcome. Key areas for contribution:
178+
- Additional reference patterns (skill runtime, hook lifecycle, etc.)
179+
- More eval test cases covering edge cases
180+
- Script automation for common harness tasks
181+
- Case studies from production deployments
182+
183+
## License
184+
185+
MIT — See LICENSE file for details.
186+
187+
## Acknowledgments
188+
189+
This skill synthesizes:
190+
- Learn Harness Engineering course framework
191+
- OpenAI Harness Engineering principles
192+
- Anthropic effective harnesses research
193+
- Agentic Harness Patterns skill (pattern extraction methodology)

0 commit comments

Comments
 (0)