opencode-skills-collection 3.0.46 → 3.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +15 -1
- package/bundled-skills/2slides-ppt-generator/SKILL.md +1 -1
- package/bundled-skills/2slides-ppt-generator/scripts/create_pdf_slides.py +2 -1
- package/bundled-skills/2slides-ppt-generator/scripts/generate_narration.py +2 -1
- package/bundled-skills/2slides-ppt-generator/scripts/generate_slides.py +13 -7
- package/bundled-skills/accint-solve/SKILL.md +205 -0
- package/bundled-skills/android-cli/SKILL.md +239 -0
- package/bundled-skills/android-cli/references/interact.md +83 -0
- package/bundled-skills/android-cli/references/journeys.md +105 -0
- package/bundled-skills/android-dev/references/hybrid.md +7 -4
- package/bundled-skills/android-dev/references/react-native.md +5 -2
- package/bundled-skills/atlas-contract/SKILL.md +4 -4
- package/bundled-skills/atlas-ledger/SKILL.md +10 -7
- package/bundled-skills/bun-development/SKILL.md +1 -1
- package/bundled-skills/cloud-penetration-testing/SKILL.md +1 -1
- package/bundled-skills/codebase-to-wordpress-converter/SKILL.md +1 -0
- package/bundled-skills/codex-fable5/SKILL.md +154 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +4 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/dos-verify-done-claims/SKILL.md +173 -0
- package/bundled-skills/ecl-harness-engineer/LICENSE +21 -0
- package/bundled-skills/ecl-harness-engineer/SKILL.md +714 -0
- package/bundled-skills/ecl-harness-engineer/agents/analyzer.md +119 -0
- package/bundled-skills/ecl-harness-engineer/agents/auditor.md +212 -0
- package/bundled-skills/ecl-harness-engineer/agents/creator-config.md +343 -0
- package/bundled-skills/ecl-harness-engineer/agents/creator-docs.md +201 -0
- package/bundled-skills/ecl-harness-engineer/agents/creator-linters.md +123 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/adapter-schema.md +204 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/generic.md +156 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/go.md +212 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/java.md +205 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/python.md +225 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/rust.md +220 -0
- package/bundled-skills/ecl-harness-engineer/references/adapters/typescript.md +245 -0
- package/bundled-skills/ecl-harness-engineer/references/architecture-diagrams.md +420 -0
- package/bundled-skills/ecl-harness-engineer/references/audit-templates.md +649 -0
- package/bundled-skills/ecl-harness-engineer/references/capability-registry.md +485 -0
- package/bundled-skills/ecl-harness-engineer/references/darwin-eval-prompts.md +373 -0
- package/bundled-skills/ecl-harness-engineer/references/documentation-templates.md +741 -0
- package/bundled-skills/ecl-harness-engineer/references/durability-patterns.md +423 -0
- package/bundled-skills/ecl-harness-engineer/references/ecl-harness.md +1431 -0
- package/bundled-skills/ecl-harness-engineer/references/environment-config-guide.md +534 -0
- package/bundled-skills/ecl-harness-engineer/references/environment-detection-guide.md +751 -0
- package/bundled-skills/ecl-harness-engineer/references/eval-templates.md +377 -0
- package/bundled-skills/ecl-harness-engineer/references/gc-templates.md +798 -0
- package/bundled-skills/ecl-harness-engineer/references/greenfield-templates.md +1385 -0
- package/bundled-skills/ecl-harness-engineer/references/linter-templates.md +448 -0
- package/bundled-skills/ecl-harness-engineer/references/observability-templates.md +315 -0
- package/bundled-skills/efficient-web-research/SKILL.md +320 -0
- package/bundled-skills/environment-setup-guide/SKILL.md +2 -2
- package/bundled-skills/evolution/SKILL.md +1 -1
- package/bundled-skills/gitops-workflow/SKILL.md +1 -1
- package/bundled-skills/linkerd-patterns/SKILL.md +1 -1
- package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package-lock.json +504 -1317
- package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package.json +2 -2
- package/bundled-skills/lovable-cleanup/SKILL.md +416 -0
- package/bundled-skills/monopoly/SKILL.md +397 -0
- package/bundled-skills/monopoly/patterns/SKILL.md +331 -0
- package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +174 -0
- package/bundled-skills/monopoly/security-checklist/SKILL.md +69 -0
- package/bundled-skills/monopoly/tech-matrix/SKILL.md +268 -0
- package/bundled-skills/pagespeed-enhancer/SKILL.md +579 -0
- package/bundled-skills/polis-protocol/SKILL.md +6 -3
- package/bundled-skills/sharp-coder/SKILL.md +131 -0
- package/bundled-skills/unship/SKILL.md +11 -5
- package/bundled-skills/uv-package-manager/resources/implementation-playbook.md +1 -1
- package/bundled-skills/varlock/SKILL.md +2 -2
- package/package.json +1 -1
- package/skills_index.json +314 -4
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
# Audit Templates
|
|
2
|
+
|
|
3
|
+
Templates for auditing and improving existing harness infrastructure.
|
|
4
|
+
|
|
5
|
+
Advanced profile note: eval and observability sections in this reference apply only when the
|
|
6
|
+
project explicitly enables advanced agent-platform capabilities. Core ECL harness audits should
|
|
7
|
+
not fail or lose score just because `harness/eval`, `harness/trace`, `harness/memory`,
|
|
8
|
+
`harness/checkpoints`, or `harness/metrics` are absent.
|
|
9
|
+
|
|
10
|
+
## Audit Checklist
|
|
11
|
+
|
|
12
|
+
### Documentation Audit (25%)
|
|
13
|
+
|
|
14
|
+
| Item | Check | Score |
|
|
15
|
+
|------|-------|-------|
|
|
16
|
+
| AGENTS.md exists | `test -f AGENTS.md` | 0/10 |
|
|
17
|
+
| AGENTS.md is ~100 lines (not monolithic) | `wc -l AGENTS.md` should be 80-120 | 0/10 |
|
|
18
|
+
| docs/ARCHITECTURE.md exists | `test -f docs/ARCHITECTURE.md` | 0/10 |
|
|
19
|
+
| Architecture matches reality | Compare layer hierarchy to `go list ./...` | 0/20 |
|
|
20
|
+
| docs/DEVELOPMENT.md exists | `test -f docs/DEVELOPMENT.md` | 0/10 |
|
|
21
|
+
| Build commands in DEVELOPMENT.md work | Run them and check | 0/10 |
|
|
22
|
+
| docs/QUALITY.md exists | `test -f docs/QUALITY.md` | 0/10 |
|
|
23
|
+
| Design docs cover major components | Check docs/design-docs/ | 0/10 |
|
|
24
|
+
| Reference docs are complete | Check docs/references/ | 0/10 |
|
|
25
|
+
|
|
26
|
+
**Total: /100 → Scale to 25%**
|
|
27
|
+
|
|
28
|
+
### Linter Audit (20%)
|
|
29
|
+
|
|
30
|
+
| Item | Check | Score |
|
|
31
|
+
|------|-------|-------|
|
|
32
|
+
| scripts/lint-deps.go exists | `test -f scripts/lint-deps.go` | 0/15 |
|
|
33
|
+
| Layer map covers all packages | Compare to `go list ./...` | 0/20 |
|
|
34
|
+
| Introducing violation fails lint | Add bad import, run lint | 0/15 |
|
|
35
|
+
| scripts/lint-quality.go exists | `test -f scripts/lint-quality.go` | 0/15 |
|
|
36
|
+
| Quality rules match QUALITY.md | Compare documented rules to linter | 0/10 |
|
|
37
|
+
| Makefile has lint-arch target | `grep lint-arch Makefile` | 0/10 |
|
|
38
|
+
| `make lint-arch` passes | Run it | 0/15 |
|
|
39
|
+
|
|
40
|
+
**Total: /100 → Scale to 20%**
|
|
41
|
+
|
|
42
|
+
### Observability Audit (15%)
|
|
43
|
+
|
|
44
|
+
| Item | Check | Score |
|
|
45
|
+
|------|-------|-------|
|
|
46
|
+
| harness/trace/ exists | `test -d harness/trace` | 0/25 |
|
|
47
|
+
| Trace format covers all tool types | Check ToolTrace struct | 0/25 |
|
|
48
|
+
| harness/selftest/ exists | `test -d harness/selftest` | 0/25 |
|
|
49
|
+
| Observability hook registered | Check hook wiring | 0/25 |
|
|
50
|
+
|
|
51
|
+
**Total: /100 → Scale to 15%**
|
|
52
|
+
|
|
53
|
+
### Eval Audit (20%)
|
|
54
|
+
|
|
55
|
+
| Item | Check | Score |
|
|
56
|
+
|------|-------|-------|
|
|
57
|
+
| harness/eval/framework.go exists | `test -f harness/eval/framework.go` | 0/10 |
|
|
58
|
+
| harness/eval/runner.go exists | `test -f harness/eval/runner.go` | 0/10 |
|
|
59
|
+
| harness/eval/scorer.go exists | `test -f harness/eval/scorer.go` | 0/10 |
|
|
60
|
+
| harness/eval/reporter.go exists | `test -f harness/eval/reporter.go` | 0/10 |
|
|
61
|
+
| file_ops/ has 5+ tasks | Count JSON files | 0/10 |
|
|
62
|
+
| code_gen/ has 5+ tasks | Count JSON files | 0/10 |
|
|
63
|
+
| debugging/ has 5+ tasks | Count JSON files | 0/10 |
|
|
64
|
+
| refactoring/ has 5+ tasks | Count JSON files | 0/10 |
|
|
65
|
+
| Tasks cover new features | Manual review | 0/10 |
|
|
66
|
+
| All tasks still work | Run evals | 0/10 |
|
|
67
|
+
|
|
68
|
+
**Total: /100 → Scale to 20%**
|
|
69
|
+
|
|
70
|
+
### Quality Automation Audit (10%)
|
|
71
|
+
|
|
72
|
+
| Item | Check | Score |
|
|
73
|
+
|------|-------|-------|
|
|
74
|
+
| harness/quality/score.go exists | `test -f harness/quality/score.go` | 0/25 |
|
|
75
|
+
| Quality score calculation works | Run it | 0/25 |
|
|
76
|
+
| harness/cleanup/tasks.go exists | `test -f harness/cleanup/tasks.go` | 0/25 |
|
|
77
|
+
| Cleanup tasks find real issues | Run dry-run | 0/25 |
|
|
78
|
+
|
|
79
|
+
**Total: /100 → Scale to 10%**
|
|
80
|
+
|
|
81
|
+
### Integration Audit (10%)
|
|
82
|
+
|
|
83
|
+
| Item | Check | Score |
|
|
84
|
+
|------|-------|-------|
|
|
85
|
+
| `go build ./...` passes | Run it | 0/40 |
|
|
86
|
+
| `make lint-arch` passes | Run it | 0/30 |
|
|
87
|
+
| CI runs harness checks | Check CI config | 0/30 |
|
|
88
|
+
|
|
89
|
+
**Total: /100 → Scale to 10%**
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Scoring Rubric
|
|
94
|
+
|
|
95
|
+
### How to Score Each Item
|
|
96
|
+
|
|
97
|
+
- **Binary items** (exists/doesn't): 0 or full points
|
|
98
|
+
- **Quality items** (matches reality): Partial credit based on accuracy
|
|
99
|
+
- 100%: Exact match
|
|
100
|
+
- 75%: Minor discrepancies (1-2 items)
|
|
101
|
+
- 50%: Moderate discrepancies (3-5 items)
|
|
102
|
+
- 25%: Major discrepancies but structure is right
|
|
103
|
+
- 0%: Completely wrong or missing
|
|
104
|
+
|
|
105
|
+
### Calculating Overall Score
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Overall = (Doc × 0.25) + (Linter × 0.20) + (Obs × 0.15) + (Eval × 0.20) + (Quality × 0.10) + (Integration × 0.10)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Score Interpretation
|
|
112
|
+
|
|
113
|
+
| Score | Status | Action |
|
|
114
|
+
|-------|--------|--------|
|
|
115
|
+
| 0-20% | Critical | Use Create Mode — build from scratch |
|
|
116
|
+
| 21-40% | Poor | Major gaps — extensive improvement needed |
|
|
117
|
+
| 41-60% | Fair | Multiple gaps — targeted improvement |
|
|
118
|
+
| 61-80% | Good | Minor gaps — polish and expand |
|
|
119
|
+
| 81-100% | Excellent | Maintenance mode — keep current |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Gap Analysis Templates
|
|
124
|
+
|
|
125
|
+
### Documentation Drift Report
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Documentation Drift Analysis
|
|
129
|
+
|
|
130
|
+
### ARCHITECTURE.md Layer Hierarchy
|
|
131
|
+
|
|
132
|
+
**Documented Layers:**
|
|
133
|
+
```
|
|
134
|
+
[Copy from ARCHITECTURE.md]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Actual Package Structure:**
|
|
138
|
+
```bash
|
|
139
|
+
go list ./... | grep -v vendor
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Discrepancies:**
|
|
143
|
+
| Documented | Actual | Issue |
|
|
144
|
+
|------------|--------|-------|
|
|
145
|
+
| core/types | core/types | ✓ Match |
|
|
146
|
+
| core/agent | core/agent | ✓ Match |
|
|
147
|
+
| - | core/newpkg | Missing from docs |
|
|
148
|
+
|
|
149
|
+
### Tool Catalog
|
|
150
|
+
|
|
151
|
+
**Documented Tools:** [count]
|
|
152
|
+
**Actual Tools:** [count]
|
|
153
|
+
|
|
154
|
+
**Missing from docs:**
|
|
155
|
+
- ToolA (added in commit abc123)
|
|
156
|
+
- ToolB (added in commit def456)
|
|
157
|
+
|
|
158
|
+
### Error Codes
|
|
159
|
+
|
|
160
|
+
**Documented Codes:** [count]
|
|
161
|
+
**Actual Codes:** [count]
|
|
162
|
+
|
|
163
|
+
**Missing from docs:**
|
|
164
|
+
- 300105 NotFoundError (added in PR #123)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Linter Gap Report
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
## Linter Gap Analysis
|
|
171
|
+
|
|
172
|
+
### Layer Map Coverage
|
|
173
|
+
|
|
174
|
+
**Packages in layer map:** [count]
|
|
175
|
+
**Packages in codebase:** [count]
|
|
176
|
+
|
|
177
|
+
**Missing from layer map:**
|
|
178
|
+
| Package | Suggested Layer | Reason |
|
|
179
|
+
|---------|-----------------|--------|
|
|
180
|
+
| core/newpkg | Layer 2 | Depends only on core/types |
|
|
181
|
+
| api/v2 | Layer 4 | New API version |
|
|
182
|
+
|
|
183
|
+
### Violation Test Results
|
|
184
|
+
|
|
185
|
+
| Test | Expected | Actual | Status |
|
|
186
|
+
|------|----------|--------|--------|
|
|
187
|
+
| Bad import in core/types | Fail | Fail | ✓ Pass |
|
|
188
|
+
| Bad import in core/agent | Fail | Fail | ✓ Pass |
|
|
189
|
+
| Bad import in api/v2 | Fail | Pass | ✗ Gap |
|
|
190
|
+
|
|
191
|
+
### Quality Rules Coverage
|
|
192
|
+
|
|
193
|
+
**Rules in QUALITY.md:** [count]
|
|
194
|
+
**Rules in lint-quality.go:** [count]
|
|
195
|
+
|
|
196
|
+
**Missing enforcement:**
|
|
197
|
+
- Rule 5: "No hardcoded timeouts" — not checked by linter
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Eval Coverage Report
|
|
201
|
+
|
|
202
|
+
```markdown
|
|
203
|
+
## Eval Coverage Analysis
|
|
204
|
+
|
|
205
|
+
### Tasks per Category
|
|
206
|
+
|
|
207
|
+
| Category | Count | Target | Status |
|
|
208
|
+
|----------|-------|--------|--------|
|
|
209
|
+
| file_ops | 3 | 5+ | ✗ Below target |
|
|
210
|
+
| code_gen | 2 | 5+ | ✗ Below target |
|
|
211
|
+
| debugging | 5 | 5+ | ✓ Meets target |
|
|
212
|
+
| refactoring | 4 | 5+ | ✗ Below target |
|
|
213
|
+
|
|
214
|
+
### Feature Coverage
|
|
215
|
+
|
|
216
|
+
| Feature | Has Eval | Priority |
|
|
217
|
+
|---------|----------|----------|
|
|
218
|
+
| File write | ✓ | - |
|
|
219
|
+
| File read | ✓ | - |
|
|
220
|
+
| JSON parsing | ✗ | P1 |
|
|
221
|
+
| Error handling | ✓ | - |
|
|
222
|
+
| New auth module | ✗ | P0 |
|
|
223
|
+
|
|
224
|
+
### Task Health
|
|
225
|
+
|
|
226
|
+
| Task ID | Status | Issue |
|
|
227
|
+
|---------|--------|-------|
|
|
228
|
+
| file_ops_001 | ✓ Works | - |
|
|
229
|
+
| code_gen_001 | ✗ Broken | Uses removed API |
|
|
230
|
+
| debug_001 | ✓ Works | - |
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Improvement Plan Template
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
## Harness Improvement Plan
|
|
239
|
+
|
|
240
|
+
**Project:** [Name]
|
|
241
|
+
**Audit Date:** YYYY-MM-DD
|
|
242
|
+
**Audit Score:** XX%
|
|
243
|
+
**Target Score:** 80%+
|
|
244
|
+
|
|
245
|
+
### Priority Gaps
|
|
246
|
+
|
|
247
|
+
#### P0 — Critical (Fix Immediately)
|
|
248
|
+
1. [Gap description]
|
|
249
|
+
- Impact: [Why this matters]
|
|
250
|
+
- Fix: [Specific action]
|
|
251
|
+
- Effort: [Hours estimate]
|
|
252
|
+
|
|
253
|
+
#### P1 — High (Fix This Sprint)
|
|
254
|
+
1. [Gap description]
|
|
255
|
+
- Impact: [Why this matters]
|
|
256
|
+
- Fix: [Specific action]
|
|
257
|
+
- Effort: [Hours estimate]
|
|
258
|
+
|
|
259
|
+
#### P2 — Medium (Fix Next Sprint)
|
|
260
|
+
1. [Gap description]
|
|
261
|
+
- Impact: [Why this matters]
|
|
262
|
+
- Fix: [Specific action]
|
|
263
|
+
- Effort: [Hours estimate]
|
|
264
|
+
|
|
265
|
+
#### P3 — Low (Backlog)
|
|
266
|
+
1. [Gap description]
|
|
267
|
+
- Impact: [Why this matters]
|
|
268
|
+
- Fix: [Specific action]
|
|
269
|
+
- Effort: [Hours estimate]
|
|
270
|
+
|
|
271
|
+
### Improvement Timeline
|
|
272
|
+
|
|
273
|
+
| Week | Focus | Expected Score |
|
|
274
|
+
|------|-------|----------------|
|
|
275
|
+
| 1 | P0 gaps | 45% → 55% |
|
|
276
|
+
| 2 | P1 gaps | 55% → 70% |
|
|
277
|
+
| 3 | P2 gaps | 70% → 80% |
|
|
278
|
+
| 4 | P3 gaps + polish | 80% → 85% |
|
|
279
|
+
|
|
280
|
+
### Success Metrics
|
|
281
|
+
|
|
282
|
+
- [ ] Audit score ≥ 80%
|
|
283
|
+
- [ ] No P0 or P1 gaps remaining
|
|
284
|
+
- [ ] `make lint-arch` passes
|
|
285
|
+
- [ ] All eval categories have 5+ tasks
|
|
286
|
+
- [ ] Quality score trend is positive
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Before/After Comparison Template
|
|
292
|
+
|
|
293
|
+
```markdown
|
|
294
|
+
## Improvement Results
|
|
295
|
+
|
|
296
|
+
**Project:** [Name]
|
|
297
|
+
**Improvement Period:** YYYY-MM-DD to YYYY-MM-DD
|
|
298
|
+
|
|
299
|
+
### Score Comparison
|
|
300
|
+
|
|
301
|
+
| Dimension | Before | After | Delta |
|
|
302
|
+
|-----------|--------|-------|-------|
|
|
303
|
+
| Documentation | XX% | XX% | +XX% |
|
|
304
|
+
| Linters | XX% | XX% | +XX% |
|
|
305
|
+
| Observability | XX% | XX% | +XX% |
|
|
306
|
+
| Evals | XX% | XX% | +XX% |
|
|
307
|
+
| Quality | XX% | XX% | +XX% |
|
|
308
|
+
| Integration | XX% | XX% | +XX% |
|
|
309
|
+
| **Overall** | **XX%** | **XX%** | **+XX%** |
|
|
310
|
+
|
|
311
|
+
### Changes Made
|
|
312
|
+
|
|
313
|
+
#### Documentation
|
|
314
|
+
- Updated ARCHITECTURE.md with [changes]
|
|
315
|
+
- Created design doc for [component]
|
|
316
|
+
- Added [N] entries to tool catalog
|
|
317
|
+
|
|
318
|
+
#### Linters
|
|
319
|
+
- Added [N] packages to layer map
|
|
320
|
+
- Created new linter for [pattern]
|
|
321
|
+
- Fixed [N] false positives
|
|
322
|
+
|
|
323
|
+
#### Evals
|
|
324
|
+
- Added [N] new eval tasks
|
|
325
|
+
- Removed [N] obsolete tasks
|
|
326
|
+
- Updated [N] broken tasks
|
|
327
|
+
|
|
328
|
+
#### Quality
|
|
329
|
+
- Added cleanup task for [pattern]
|
|
330
|
+
- Updated quality score weights
|
|
331
|
+
- Fixed [N] golden principle violations
|
|
332
|
+
|
|
333
|
+
### Remaining Gaps
|
|
334
|
+
|
|
335
|
+
[List any P2/P3 items not yet addressed]
|
|
336
|
+
|
|
337
|
+
### Recommendations
|
|
338
|
+
|
|
339
|
+
[Next steps for maintaining/improving harness]
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Automated Audit Script
|
|
345
|
+
|
|
346
|
+
```go
|
|
347
|
+
// scripts/audit-harness.go
|
|
348
|
+
//
|
|
349
|
+
// Automated harness audit. Run: go run scripts/audit-harness.go
|
|
350
|
+
//
|
|
351
|
+
// Outputs JSON with scores per dimension.
|
|
352
|
+
package main
|
|
353
|
+
|
|
354
|
+
import (
|
|
355
|
+
"encoding/json"
|
|
356
|
+
"fmt"
|
|
357
|
+
"os"
|
|
358
|
+
"path/filepath"
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
type AuditResult struct {
|
|
362
|
+
Dimension string `json:"dimension"`
|
|
363
|
+
Score float64 `json:"score"`
|
|
364
|
+
MaxScore float64 `json:"max_score"`
|
|
365
|
+
Percent float64 `json:"percent"`
|
|
366
|
+
Items []AuditItem `json:"items"`
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
type AuditItem struct {
|
|
370
|
+
Name string `json:"name"`
|
|
371
|
+
Score float64 `json:"score"`
|
|
372
|
+
Max float64 `json:"max"`
|
|
373
|
+
Notes string `json:"notes,omitempty"`
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
func main() {
|
|
377
|
+
results := []AuditResult{
|
|
378
|
+
auditDocumentation(),
|
|
379
|
+
auditLinters(),
|
|
380
|
+
auditObservability(),
|
|
381
|
+
auditEvals(),
|
|
382
|
+
auditQuality(),
|
|
383
|
+
auditIntegration(),
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Calculate overall
|
|
387
|
+
weights := map[string]float64{
|
|
388
|
+
"Documentation": 0.25,
|
|
389
|
+
"Linters": 0.20,
|
|
390
|
+
"Observability": 0.15,
|
|
391
|
+
"Evals": 0.20,
|
|
392
|
+
"Quality": 0.10,
|
|
393
|
+
"Integration": 0.10,
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
var overall float64
|
|
397
|
+
for _, r := range results {
|
|
398
|
+
overall += r.Percent * weights[r.Dimension]
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Output
|
|
402
|
+
output := map[string]interface{}{
|
|
403
|
+
"results": results,
|
|
404
|
+
"overall": overall,
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
data, _ := json.MarshalIndent(output, "", " ")
|
|
408
|
+
fmt.Println(string(data))
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
func auditDocumentation() AuditResult {
|
|
412
|
+
r := AuditResult{Dimension: "Documentation", MaxScore: 100}
|
|
413
|
+
|
|
414
|
+
// Check files exist
|
|
415
|
+
files := map[string]float64{
|
|
416
|
+
"AGENTS.md": 10,
|
|
417
|
+
"docs/ARCHITECTURE.md": 10,
|
|
418
|
+
"docs/DEVELOPMENT.md": 10,
|
|
419
|
+
"docs/QUALITY.md": 10,
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
for file, points := range files {
|
|
423
|
+
if _, err := os.Stat(file); err == nil {
|
|
424
|
+
r.Score += points
|
|
425
|
+
r.Items = append(r.Items, AuditItem{Name: file, Score: points, Max: points})
|
|
426
|
+
} else {
|
|
427
|
+
r.Items = append(r.Items, AuditItem{Name: file, Score: 0, Max: points, Notes: "missing"})
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Check docs/design-docs/ has files (not just the index)
|
|
432
|
+
if matches, _ := filepath.Glob("docs/design-docs/*.md"); len(matches) > 0 {
|
|
433
|
+
// Exclude index.md from count
|
|
434
|
+
actualDocs := 0
|
|
435
|
+
for _, m := range matches {
|
|
436
|
+
if !strings.HasSuffix(m, "index.md") {
|
|
437
|
+
actualDocs++
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
score := min(float64(actualDocs)*5, 20)
|
|
441
|
+
r.Score += score
|
|
442
|
+
r.Items = append(r.Items, AuditItem{Name: "docs/design-docs/", Score: score, Max: 20, Notes: fmt.Sprintf("%d design docs (excluding index)", actualDocs)})
|
|
443
|
+
} else {
|
|
444
|
+
r.Items = append(r.Items, AuditItem{Name: "docs/design-docs/", Score: 0, Max: 20, Notes: "empty or missing"})
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// Check docs/references/ has files
|
|
448
|
+
if matches, _ := filepath.Glob("docs/references/*.md"); len(matches) > 0 {
|
|
449
|
+
score := min(float64(len(matches))*5, 20)
|
|
450
|
+
r.Score += score
|
|
451
|
+
r.Items = append(r.Items, AuditItem{Name: "docs/references/", Score: score, Max: 20, Notes: fmt.Sprintf("%d files", len(matches))})
|
|
452
|
+
} else {
|
|
453
|
+
r.Items = append(r.Items, AuditItem{Name: "docs/references/", Score: 0, Max: 20, Notes: "empty or missing"})
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// Remaining 20 points for AGENTS.md line count
|
|
457
|
+
if data, err := os.ReadFile("AGENTS.md"); err == nil {
|
|
458
|
+
lines := len(strings.Split(string(data), "\n"))
|
|
459
|
+
if lines >= 80 && lines <= 150 {
|
|
460
|
+
r.Score += 20
|
|
461
|
+
r.Items = append(r.Items, AuditItem{Name: "AGENTS.md size", Score: 20, Max: 20, Notes: fmt.Sprintf("%d lines", lines)})
|
|
462
|
+
} else if lines < 80 {
|
|
463
|
+
r.Items = append(r.Items, AuditItem{Name: "AGENTS.md size", Score: 10, Max: 20, Notes: fmt.Sprintf("%d lines (too short)", lines)})
|
|
464
|
+
r.Score += 10
|
|
465
|
+
} else {
|
|
466
|
+
r.Items = append(r.Items, AuditItem{Name: "AGENTS.md size", Score: 5, Max: 20, Notes: fmt.Sprintf("%d lines (too long, should be map)", lines)})
|
|
467
|
+
r.Score += 5
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
472
|
+
return r
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
func auditLinters() AuditResult {
|
|
476
|
+
r := AuditResult{Dimension: "Linters", MaxScore: 100}
|
|
477
|
+
|
|
478
|
+
linters := []string{"scripts/lint-deps.go", "scripts/lint-quality.go"}
|
|
479
|
+
for _, l := range linters {
|
|
480
|
+
if _, err := os.Stat(l); err == nil {
|
|
481
|
+
r.Score += 25
|
|
482
|
+
r.Items = append(r.Items, AuditItem{Name: l, Score: 25, Max: 25})
|
|
483
|
+
} else {
|
|
484
|
+
r.Items = append(r.Items, AuditItem{Name: l, Score: 0, Max: 25, Notes: "missing"})
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// Check Makefile
|
|
489
|
+
if data, err := os.ReadFile("Makefile"); err == nil {
|
|
490
|
+
if strings.Contains(string(data), "lint-arch") {
|
|
491
|
+
r.Score += 25
|
|
492
|
+
r.Items = append(r.Items, AuditItem{Name: "Makefile lint-arch", Score: 25, Max: 25})
|
|
493
|
+
} else {
|
|
494
|
+
r.Items = append(r.Items, AuditItem{Name: "Makefile lint-arch", Score: 0, Max: 25, Notes: "target missing"})
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// Remaining 25 for additional linters
|
|
499
|
+
if matches, _ := filepath.Glob("scripts/lint-*.go"); len(matches) > 2 {
|
|
500
|
+
r.Score += 25
|
|
501
|
+
r.Items = append(r.Items, AuditItem{Name: "additional linters", Score: 25, Max: 25, Notes: fmt.Sprintf("%d total", len(matches))})
|
|
502
|
+
} else {
|
|
503
|
+
r.Items = append(r.Items, AuditItem{Name: "additional linters", Score: 0, Max: 25, Notes: "only core linters"})
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
507
|
+
return r
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
func auditObservability() AuditResult {
|
|
511
|
+
r := AuditResult{Dimension: "Observability", MaxScore: 100}
|
|
512
|
+
|
|
513
|
+
dirs := map[string]float64{
|
|
514
|
+
"harness/trace": 35,
|
|
515
|
+
"harness/selftest": 35,
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
for dir, points := range dirs {
|
|
519
|
+
if info, err := os.Stat(dir); err == nil && info.IsDir() {
|
|
520
|
+
r.Score += points
|
|
521
|
+
r.Items = append(r.Items, AuditItem{Name: dir, Score: points, Max: points})
|
|
522
|
+
} else {
|
|
523
|
+
r.Items = append(r.Items, AuditItem{Name: dir, Score: 0, Max: points, Notes: "missing"})
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Check for observability hook
|
|
528
|
+
if matches, _ := filepath.Glob("**/observability*.go"); len(matches) > 0 {
|
|
529
|
+
r.Score += 30
|
|
530
|
+
r.Items = append(r.Items, AuditItem{Name: "observability hook", Score: 30, Max: 30})
|
|
531
|
+
} else {
|
|
532
|
+
r.Items = append(r.Items, AuditItem{Name: "observability hook", Score: 0, Max: 30, Notes: "not found"})
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
536
|
+
return r
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
func auditEvals() AuditResult {
|
|
540
|
+
r := AuditResult{Dimension: "Evals", MaxScore: 100}
|
|
541
|
+
|
|
542
|
+
// Framework files (40 points)
|
|
543
|
+
files := []string{
|
|
544
|
+
"harness/eval/framework.go",
|
|
545
|
+
"harness/eval/runner.go",
|
|
546
|
+
"harness/eval/scorer.go",
|
|
547
|
+
"harness/eval/reporter.go",
|
|
548
|
+
}
|
|
549
|
+
for _, f := range files {
|
|
550
|
+
if _, err := os.Stat(f); err == nil {
|
|
551
|
+
r.Score += 10
|
|
552
|
+
r.Items = append(r.Items, AuditItem{Name: f, Score: 10, Max: 10})
|
|
553
|
+
} else {
|
|
554
|
+
r.Items = append(r.Items, AuditItem{Name: f, Score: 0, Max: 10, Notes: "missing"})
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// Dataset categories (60 points, 15 each)
|
|
559
|
+
categories := []string{"file_ops", "code_gen", "debugging", "refactoring"}
|
|
560
|
+
for _, cat := range categories {
|
|
561
|
+
pattern := fmt.Sprintf("harness/eval/datasets/%s/*.json", cat)
|
|
562
|
+
matches, _ := filepath.Glob(pattern)
|
|
563
|
+
if len(matches) >= 5 {
|
|
564
|
+
r.Score += 15
|
|
565
|
+
r.Items = append(r.Items, AuditItem{Name: cat, Score: 15, Max: 15, Notes: fmt.Sprintf("%d tasks", len(matches))})
|
|
566
|
+
} else if len(matches) > 0 {
|
|
567
|
+
score := float64(len(matches)) * 3
|
|
568
|
+
r.Score += score
|
|
569
|
+
r.Items = append(r.Items, AuditItem{Name: cat, Score: score, Max: 15, Notes: fmt.Sprintf("%d tasks (need 5+)", len(matches))})
|
|
570
|
+
} else {
|
|
571
|
+
r.Items = append(r.Items, AuditItem{Name: cat, Score: 0, Max: 15, Notes: "no tasks"})
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
576
|
+
return r
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
func auditQuality() AuditResult {
|
|
580
|
+
r := AuditResult{Dimension: "Quality", MaxScore: 100}
|
|
581
|
+
|
|
582
|
+
items := map[string]float64{
|
|
583
|
+
"harness/quality/score.go": 35,
|
|
584
|
+
"harness/cleanup/tasks.go": 35,
|
|
585
|
+
"docs/QUALITY.md": 30,
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
for item, points := range items {
|
|
589
|
+
if _, err := os.Stat(item); err == nil {
|
|
590
|
+
r.Score += points
|
|
591
|
+
r.Items = append(r.Items, AuditItem{Name: item, Score: points, Max: points})
|
|
592
|
+
} else {
|
|
593
|
+
r.Items = append(r.Items, AuditItem{Name: item, Score: 0, Max: points, Notes: "missing"})
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
598
|
+
return r
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
func auditIntegration() AuditResult {
|
|
602
|
+
r := AuditResult{Dimension: "Integration", MaxScore: 100}
|
|
603
|
+
|
|
604
|
+
// Check go.mod exists (build will work)
|
|
605
|
+
if _, err := os.Stat("go.mod"); err == nil {
|
|
606
|
+
r.Score += 40
|
|
607
|
+
r.Items = append(r.Items, AuditItem{Name: "go.mod", Score: 40, Max: 40})
|
|
608
|
+
} else {
|
|
609
|
+
r.Items = append(r.Items, AuditItem{Name: "go.mod", Score: 0, Max: 40, Notes: "missing"})
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// Check Makefile exists
|
|
613
|
+
if _, err := os.Stat("Makefile"); err == nil {
|
|
614
|
+
r.Score += 30
|
|
615
|
+
r.Items = append(r.Items, AuditItem{Name: "Makefile", Score: 30, Max: 30})
|
|
616
|
+
} else {
|
|
617
|
+
r.Items = append(r.Items, AuditItem{Name: "Makefile", Score: 0, Max: 30, Notes: "missing"})
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// Check for CI config
|
|
621
|
+
ciConfigs := []string{".github/workflows", ".gitlab-ci.yml", "Jenkinsfile", ".circleci"}
|
|
622
|
+
found := false
|
|
623
|
+
for _, ci := range ciConfigs {
|
|
624
|
+
if _, err := os.Stat(ci); err == nil {
|
|
625
|
+
found = true
|
|
626
|
+
r.Score += 30
|
|
627
|
+
r.Items = append(r.Items, AuditItem{Name: "CI config", Score: 30, Max: 30, Notes: ci})
|
|
628
|
+
break
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if !found {
|
|
632
|
+
r.Items = append(r.Items, AuditItem{Name: "CI config", Score: 0, Max: 30, Notes: "not found"})
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
r.Percent = (r.Score / r.MaxScore) * 100
|
|
636
|
+
return r
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
func min(a, b float64) float64 {
|
|
640
|
+
if a < b {
|
|
641
|
+
return a
|
|
642
|
+
}
|
|
643
|
+
return b
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
import "strings"
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
Note: The script above has a deliberate syntax issue (import at the end) — move the `import "strings"` to the import block at the top when using.
|