Skip to content

Commit 724123c

Browse files
committed
Improve harness-creator skill
1 parent 14024c6 commit 724123c

16 files changed

Lines changed: 1044 additions & 969 deletions

skills/README-CN.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
面向 AI 编程智能体的生产级 harness 工程技能。帮助创建、评估和改进 agent harness 文件(AGENTS.md、功能清单、验证工作流、会话连续性机制)。
2323

24-
- **5 个参考模式**:记忆持久化、上下文工程、工具注册、多智能体协调、生命周期与引导
25-
- **模板**:AGENTS.md、feature-list.json、init.sh、progress.md
26-
- **5 个内置评估测试用例**
27-
- **双语支持**:English + 中文
24+
- **7 个参考模式**:记忆持久化、技能运行时、上下文工程、工具注册、多智能体协调、生命周期与引导、陷阱
25+
- **模板**:AGENTS.md/CLAUDE.md、feature-list.json、init.sh、progress.md、session-handoff.md
26+
- **脚本**:脚手架生成、校验、HTML 评估报告、结构化 benchmark
27+
- **10 个内置评估测试用例**
2828

2929
详见 [harness-creator/README.md](harness-creator/README.md)
3030

@@ -49,10 +49,12 @@ skills/
4949
├── README-VI.md # 越南文说明
5050
├── README-DE.md # 德文说明
5151
└── harness-creator/ # Harness 工程技能
52-
├── SKILL.md # 主技能定义(双语)
52+
├── SKILL.md # 主技能定义
5353
├── SKILL.md.en # 英文版
5454
├── README.md # 详细文档
5555
├── metadata.json # 技能元数据与触发词
56+
├── agents/ # 技能 UI 元数据
57+
├── scripts/ # 脚手架、校验和 benchmark 辅助脚本
5658
├── evals/ # 测试用例
5759
├── templates/ # 脚手架模板
5860
└── references/ # 深入的模式参考文档
@@ -75,7 +77,8 @@ skills/
7577
- 无后门、隐藏 URL 或编码载荷
7678
- 无数据泄露或硬编码凭证
7779
- 无命令注入漏洞
78-
- `init.sh` 仅运行标准 npm 生命周期命令
80+
- 脚本仅使用 Node.js 内置模块
81+
- 生成的 `init.sh` 运行检测到的项目验证命令
7982

8083
## 许可证
8184

skills/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ This directory contains reusable AI agent skills for the Learn Harness Engineeri
2121

2222
Production harness engineering skill for AI coding agents. Helps create, assess, and improve agent harness files (AGENTS.md, feature lists, verification workflows, session continuity mechanisms).
2323

24-
- **5 reference patterns**: Memory Persistence, Context Engineering, Tool Registry, Multi-Agent Coordination, Lifecycle & Bootstrap
25-
- **Templates**: AGENTS.md, feature-list.json, init.sh, progress.md
26-
- **5 built-in eval test cases**
27-
- **Bilingual**: English + 中文
24+
- **7 reference patterns**: Memory Persistence, Skill Runtime, Context Engineering, Tool Registry, Multi-Agent Coordination, Lifecycle & Bootstrap, Gotchas
25+
- **Templates**: AGENTS.md/CLAUDE.md, feature-list.json, init.sh, progress.md, session-handoff.md
26+
- **Scripts**: scaffold, validate, render HTML assessment, run structural benchmark
27+
- **10 built-in eval test cases**
2828

2929
See [harness-creator/README.md](harness-creator/README.md) for full documentation.
3030

@@ -49,10 +49,12 @@ skills/
4949
├── README-VI.md # Vietnamese version
5050
├── README-DE.md # German version
5151
└── harness-creator/ # Harness engineering skill
52-
├── SKILL.md # Main skill definition (bilingual)
52+
├── SKILL.md # Main skill definition
5353
├── SKILL.md.en # English-only version
5454
├── README.md # Detailed documentation
5555
├── metadata.json # Skill metadata & triggers
56+
├── agents/ # Skill UI metadata
57+
├── scripts/ # Scaffold, validate, benchmark helpers
5658
├── evals/ # Test cases
5759
├── templates/ # Scaffold templates
5860
└── references/ # Deep-dive pattern docs
@@ -75,7 +77,8 @@ All files in this directory have been audited for security:
7577
- No backdoors, hidden URLs, or encoded payloads
7678
- No data exfiltration or hardcoded credentials
7779
- No command injection vulnerabilities
78-
- `init.sh` runs only standard npm lifecycle commands
80+
- Scripts use only Node.js built-in modules
81+
- Generated `init.sh` runs detected project verification commands
7982

8083
## License
8184

skills/harness-creator/README.md

Lines changed: 55 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -1,206 +1,83 @@
1-
<p align="center">
2-
<a href="../README.md"><img alt="English" src="https://img.shields.io/badge/English-d9d9d9"></a>
3-
<a href="../README-CN.md"><img alt="简体中文" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
4-
<a href="../README-ZH-TW.md"><img alt="繁體中文" src="https://img.shields.io/badge/繁體中文-d9d9d9"></a>
5-
<a href="../README-JA.md"><img alt="日本語" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
6-
<a href="../README-ES.md"><img alt="Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
7-
<a href="../README-FR.md"><img alt="Français" src="https://img.shields.io/badge/Français-d9d9d9"></a>
8-
<a href="../README-KO.md"><img alt="한국어" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
9-
<a href="../README-AR.md"><img alt="العربية" src="https://img.shields.io/badge/العربية-d9d9d9"></a>
10-
<a href="../README-VI.md"><img alt="Tiếng_Việt" src="https://img.shields.io/badge/Tiếng_Việt-d9d9d9"></a>
11-
<a href="../README-DE.md"><img alt="Deutsch" src="https://img.shields.io/badge/Deutsch-d9d9d9"></a>
12-
</p>
1+
# harness-creator
132

14-
# harness-creator Skill
3+
A compact skill for building and auditing harnesses around AI coding agents.
154

16-
Production harness engineering skill for AI coding agents, distilled from Learn Harness Engineering course and industry best practices.
5+
It helps a repository provide five things agents need: instructions, state, verification, scope boundaries, and lifecycle handoff.
176

18-
## Installation
7+
## Install
198

209
```bash
2110
npx skills add walkinglabs/learn-harness-engineering --skill harness-creator
2211
```
2312

24-
Or manually copy the `skills/harness-creator/` directory to your skill path.
13+
Or copy `skills/harness-creator/` into your skill path.
2514

26-
## What This Skill Does
15+
## Use
2716

28-
This skill helps you:
29-
- **Create harnesses from scratch** — AGENTS.md, feature lists, verification workflows
30-
- **Improve existing harnesses** — Five-subsystem assessment with prioritized improvements
31-
- **Design session continuity** — Memory persistence, progress tracking, handoff procedures
32-
- **Benchmark effectiveness** — Before/after comparison with quantitative metrics
33-
- **Apply production patterns** — Memory, context engineering, tool safety, multi-agent coordination
34-
35-
## Core Framework: Five Subsystems
36-
37-
Every harness consists of five subsystems:
38-
39-
1. **Instructions** — AGENTS.md as routing layer, progressive disclosure via docs/ hierarchy
40-
2. **State** — feature_list.json, progress.md, session handoff files
41-
3. **Verification** — Explicit commands that agent MUST run before claiming done
42-
4. **Scope** — One-feature-at-a-time policy, clear definition of done
43-
5. **Lifecycle** — init.sh, clean-state checklists, session continuity mechanisms
44-
45-
## Reference Patterns
46-
47-
This skill includes 6 deep-dive reference documents:
48-
49-
| Pattern | When to Use |
50-
|---------|-------------|
51-
| [Memory Persistence](references/memory-persistence-pattern.md) | Agent forgets between sessions, need persistent project knowledge |
52-
| [Context Engineering](references/context-engineering-pattern.md) | Context budget management, JIT loading, delegation isolation |
53-
| [Tool Registry](references/tool-registry-pattern.md) | Tool safety, concurrency control, permission pipelines |
54-
| [Multi-Agent Coordination](references/multi-agent-pattern.md) | Parallelism, specialization, researcher→implementer workflows |
55-
| [Lifecycle & Bootstrap](references/lifecycle-bootstrap-pattern.md) | Hooks, background tasks, initialization sequences |
56-
| [Gotchas](references/gotchas.md) | 15 non-obvious failure modes with fixes |
57-
58-
## Usage Examples
59-
60-
### Create Minimal Harness
61-
62-
```
63-
User: "I need to set up AGENTS.md for my TypeScript project"
64-
65-
Skill will:
66-
1. Ask about project context (stack, size, agent tool)
67-
2. Generate AGENTS.md with startup workflow and working rules
68-
3. Create feature_list.json template with placeholder features
69-
4. Create init.sh with verification commands
70-
5. Explain how to use each file
71-
```
72-
73-
### Assess Existing Harness
74-
75-
```
76-
User: "My agent still breaks things even with AGENTS.md"
77-
78-
Skill will:
79-
1. Request current AGENTS.md content
80-
2. Score each of 5 subsystems (1-5 scale)
81-
3. Identify the lowest-scoring subsystem as the highest-priority improvement area
82-
4. Provide prioritized improvement plan with concrete steps
83-
```
84-
85-
### Design Session Continuity
86-
87-
```
88-
User: "Agent forgets everything between sessions"
89-
90-
Skill will:
91-
1. Explain memory layers (instruction vs auto-memory)
92-
2. Design progress.md template for session tracking
93-
3. Create session-handoff.md structure
94-
4. Implement two-step save invariant (topic file → index)
17+
```bash
18+
node skills/harness-creator/scripts/create-harness.mjs --target /path/to/project
19+
node skills/harness-creator/scripts/validate-harness.mjs --target /path/to/project
20+
node skills/harness-creator/scripts/run-benchmark.mjs --target /path/to/project --html /path/to/report.html
9521
```
9622

97-
## When to Trigger
23+
The scripts use only Node.js built-in modules. They can be run after copying the skill directory into another repository.
9824

99-
This skill triggers on:
100-
- "Create AGENTS.md / CLAUDE.md"
101-
- "Improve agent reliability"
102-
- "Agent forgets between sessions"
103-
- "Multi-session continuity needed"
104-
- "Benchmark harness effectiveness"
105-
- "Design verification workflow"
106-
- "Memory persistence patterns"
107-
- "Context engineering for agents"
25+
## What It Creates
10826

109-
## When NOT to Use
27+
- `AGENTS.md` or `CLAUDE.md`
28+
- `feature_list.json`
29+
- `progress.md`
30+
- `init.sh`
31+
- `session-handoff.md`
11032

111-
This skill does NOT cover:
112-
- Prompt engineering or system prompt design
113-
- Model selection or fine-tuning
114-
- Generic software architecture
115-
- LLM API integration basics
33+
`create-harness.mjs` detects common project types and package managers. It supports Node/npm/pnpm/yarn/bun, Python, Go, Rust, Maven, Gradle, and .NET at a basic verification-command level.
11634

117-
## Templates Included
35+
## What It Checks
11836

119-
- `templates/agents.md` — AGENTS.md scaffold with working rules
120-
- `templates/feature-list.json` — JSON Schema + example
121-
- `templates/init.sh` — Standard initialization script
122-
- `templates/progress.md` — Session progress log template
123-
- `templates/session-handoff.md` — Handoff structure
37+
`validate-harness.mjs` scores the five harness subsystems:
12438

125-
## Evaluation Framework
39+
1. Instructions
40+
2. State
41+
3. Verification
42+
4. Scope
43+
5. Lifecycle
12644

127-
5 test cases in `evals/evals.json`:
128-
1. **Minimal Harness Creation** — Full setup from scratch
129-
2. **Session Continuity Setup** — Memory and handoff design
130-
3. **Harness Assessment** — Five-subsystem scoring
131-
4. **Verification Workflow Design** — Force agent to verify before done
132-
5. **Memory Taxonomy Design** — What to save vs skip
45+
The score is structural. It tells you whether the harness is present and coherent; it does not replace real before/after agent-session testing.
13346

134-
Run evaluation with skill-creator framework for quantitative benchmarks.
47+
## Status
13548

136-
## Compatibility
49+
- [x] Minimal harness scaffolding
50+
- [x] Five-subsystem validation
51+
- [x] HTML assessment report
52+
- [x] Structural benchmark report
53+
- [x] 10 eval cases
54+
- [x] Generic verification detection for common stacks
55+
- [ ] Optional real before/after agent-session replay
13756

138-
- **Agents**: Claude Code, Codex, Cursor, Windsurf, generic
139-
- **License**: MIT
140-
- **Languages**: English / 中文 (bilingual support in SKILL.md)
57+
## Files
14158

142-
## 兼容性
143-
144-
- **代理工具**: Claude Code, Codex, Cursor, Windsurf, generic
145-
- **许可证**: MIT
146-
- **语言**: 英文 / 中文 (SKILL.md 中双语支持)
147-
148-
## Project Structure
149-
150-
```
59+
```text
15160
harness-creator/
152-
├── SKILL.md # Main skill definition
153-
├── metadata.json # Skill metadata, triggers, compatibility
154-
├── evals/
155-
│ └── evals.json # 5 test cases with expectations
61+
├── SKILL.md
62+
├── metadata.json
63+
├── agents/openai.yaml
64+
├── scripts/
65+
│ ├── create-harness.mjs
66+
│ ├── validate-harness.mjs
67+
│ ├── render-assessment-html.mjs
68+
│ ├── run-benchmark.mjs
69+
│ └── lib/harness-utils.mjs
15670
├── templates/
157-
│ ├── agents.md # AGENTS.md template
158-
│ ├── feature-list.json # Feature tracker template
159-
│ ├── init.sh # Initialization script
160-
│ └── progress.md # Session progress template
161-
└── references/
162-
├── memory-persistence-pattern.md
163-
├── context-engineering-pattern.md
164-
├── tool-registry-pattern.md
165-
├── multi-agent-pattern.md
166-
├── lifecycle-bootstrap-pattern.md
167-
└── gotchas.md # 15 failure modes
71+
│ ├── agents.md
72+
│ ├── feature-list.json
73+
│ ├── feature-list.schema.json
74+
│ ├── init.sh
75+
│ ├── progress.md
76+
│ └── session-handoff.md
77+
├── references/
78+
└── evals/evals.json
16879
```
16980

170-
## Development Roadmap
171-
172-
- [x] Chinese translation in SKILL.md (bilingual support added)
173-
- [ ] Python scripts for automated harness generation
174-
- [ ] HTML viewer for harness assessment results
175-
- [ ] Expanded eval set (10+ test cases)
176-
- [ ] Integration with skill-creator benchmark framework
177-
- [ ] Full Chinese localization (harness-creator-zh directory)
178-
179-
## 开发路线图
180-
181-
- [x] SKILL.md 中文翻译(已添加双语支持)
182-
- [ ] Harness 自动生成 Python 脚本
183-
- [ ] Harness 评估结果 HTML 查看器
184-
- [ ] 扩展测试用例(10+ 个)
185-
- [ ] 集成 skill-creator 基准测试框架
186-
- [ ] 完整中文本地化(harness-creator-zh 目录)
187-
188-
## Contributing
189-
190-
Issues and PRs welcome. Key areas for contribution:
191-
- Additional reference patterns (skill runtime, hook lifecycle, etc.)
192-
- More eval test cases covering edge cases
193-
- Script automation for common harness tasks
194-
- Case studies from production deployments
195-
196-
## License
197-
198-
MIT — See LICENSE file for details.
199-
200-
## Acknowledgments
81+
## Boundaries
20182

202-
This skill synthesizes:
203-
- Learn Harness Engineering course framework
204-
- OpenAI Harness Engineering principles
205-
- Anthropic effective harnesses research
206-
- Agentic Harness Patterns skill (pattern extraction methodology)
83+
This skill is for harness engineering, not model selection, prompt tuning alone, or app architecture. Keep project-specific facts in the target repository.

0 commit comments

Comments
 (0)