Skip to content

Commit 847dac3

Browse files
committed
feat(harness-audit): add Symphony readiness overlay
Extend harness-audit with Symphony-oriented unattended ticket execution checks, evidence guidance, workflow templates, smoke-ticket eval references, and Go stack coverage.
1 parent 1de72a9 commit 847dac3

10 files changed

Lines changed: 931 additions & 44 deletions

File tree

‎skills/harness-audit/SKILL.md‎

Lines changed: 134 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
name: harness-audit
3-
description: Audit a repository for autonomous-agent harness readiness across cold-start docs, rules, lint, hooks, tests, PR review automation, repo skills, and garbage-collection cadence. Use for "harness audit", "agent-ready repo", "harness readiness", "make this repo agent-friendly", "harness gaps", or surgical fixes for top harness gaps.
3+
description: Audit a repository for autonomous-agent harness readiness and Symphony-style unattended ticket execution readiness across cold-start docs, rules, lint, hooks, tests, PR automation, repo skills, garbage-collection cadence, workflow contracts, evidence, observability, and smoke-ticket evals. Use for "harness audit", "agent-ready repo", "harness readiness", "make this repo agent-friendly", "Symphony readiness", "prepare this repo for Symphony", "ticket-level agent automation", or surgical fixes for top harness gaps.
44
---
55

66
# Harness Audit
77

8-
Audit a codebase against an 8-artifact framework for how well-equipped it is for autonomous AI agents to do end-to-end implementation work. Optionally apply surgical fixes for the highest-leverage gaps.
8+
Audit a codebase against a baseline 8-artifact framework for how well-equipped it is for autonomous AI agents to do end-to-end implementation work. When asked for Symphony readiness, add the unattended ticket-execution overlay: workflow contract, disposable workspace bootstrap, validation/evidence, ticket lifecycle, observability, safety, and smoke-ticket eval. Optionally apply surgical fixes for the highest-leverage gaps.
99

1010
Framework provenance: Ryan Lopopolo's "Harness Engineering" talk (OpenAI, AI Engineer London 2025). Core thesis: **code is cheap; scarce resources are human time, attention, and model context window.** Codebases that surface the right context to agents at the right time produce more shippable work per human hour.
1111

@@ -14,9 +14,49 @@ Framework provenance: Ryan Lopopolo's "Harness Engineering" talk (OpenAI, AI Eng
1414
- **Repo architecture** — structural design and repo organization. Use that for "how should this repo be laid out?"
1515
- **Adversarial review** — hunts real bugs in working or near-complete implementations. Use that for "is this code correct?"
1616
- **Cold-start doc improvement** — narrowly improves `AGENTS.md` / `CLAUDE.md`. This skill covers that plus seven more artifacts.
17-
- **Harness audit** — asks: *is this repo set up so agents can ship without a human babysitting every step?*
17+
- **This skill** — asks: *is this repo set up so agents can ship without a human babysitting every step?*
1818

19-
## The 8-artifact stack
19+
## Mode selection
20+
21+
Default mode is `audit` and is read-only.
22+
23+
Natural-language mapping:
24+
25+
- "harness audit", "agent-ready repo", "harness readiness", "make this repo agent-friendly" → `audit`
26+
- "audit and fix", "fix harness gaps" → `audit+fix`
27+
- "Symphony readiness", "prepare this repo for Symphony", "ticket-level agent automation", "unattended ticket execution" → `symphony-readiness`
28+
- "fix Symphony readiness", "prepare and fix for Symphony" → `audit+fix:symphony`
29+
- "focus on tests/pre-commit/rules/etc." → `focus:<artifact-name>`
30+
31+
Tie-breaker: default to baseline modes unless the user explicitly says Symphony, ticket-level orchestration, unattended execution, scheduler, tracker workflow, or workflow contract.
32+
33+
Accepted focus names: `cold-start-brief`, `rules-dir`, `lint-messages`, `pre-commit`, `test-suite`, `pr-review`, `repo-skills`, `gc-cadence`, `workflow-contract`, `workspace-bootstrap`, `validate-loop`, `app-validation`, `evidence-protocol`, `ticket-lifecycle`, `observability`, `safety-policy`, `smoke-ticket-eval`.
34+
35+
Numeric aliases:
36+
37+
| Alias | Focus |
38+
| --- | --- |
39+
| `focus:1` | `cold-start-brief` |
40+
| `focus:2` | `rules-dir` |
41+
| `focus:3` | `lint-messages` |
42+
| `focus:4` | `pre-commit` |
43+
| `focus:5` | `test-suite` |
44+
| `focus:6` | `pr-review` |
45+
| `focus:7` | `repo-skills` |
46+
| `focus:8` | `gc-cadence` |
47+
| `focus:symphony-1` | `workflow-contract` |
48+
| `focus:symphony-2` | `workspace-bootstrap` |
49+
| `focus:symphony-3` | `validate-loop` |
50+
| `focus:symphony-4` | `app-validation` |
51+
| `focus:symphony-5` | `evidence-protocol` |
52+
| `focus:symphony-6` | `ticket-lifecycle` |
53+
| `focus:symphony-7` | `observability` |
54+
| `focus:symphony-8` | `safety-policy` |
55+
| `focus:symphony-9` | `smoke-ticket-eval` |
56+
57+
When the user asks for readiness but also asks you to change files, prefer the matching `audit+fix` mode.
58+
59+
## Baseline: the 8-artifact stack
2060

2161
For each artifact, score `✅ Present / ⚠️ Partial / ❌ Missing` with concrete path evidence and a one-line gap.
2262

@@ -29,14 +69,32 @@ For each artifact, score `✅ Present / ⚠️ Partial / ❌ Missing` with concr
2969
7. **Repo-scoped skills/prompts** — `.agents/skills/`, `.pi/skills/`, `.claude/skills/`, `.codex/`, `.pi/prompts/`, or package-scoped resources. Prefer 5-10 deep resources over many shallow ones.
3070
8. **Garbage-collection cadence** — documented recurring loop that converts agent/PR feedback into permanent rules, lints, docs, or skills.
3171

72+
## Symphony readiness overlay
73+
74+
Use this overlay when the user mentions Symphony, ticket-level orchestration, unattended agents, or preparing repos for an agent scheduler.
75+
76+
Score the overlay separately using `references/symphony-readiness.md`:
77+
78+
1. **`WORKFLOW.md` contract** — repo-local orchestrator contract with tracker states, workspace hooks, agent settings, and ticket lifecycle prompt.
79+
2. **Disposable workspace bootstrap** — fresh clone/workspace can install dependencies, prepare services, and clean up without hidden local state.
80+
3. **One-command validate loop** — stable command for the meaningful quality gate.
81+
4. **Agent-visible app validation** — app/browser/log/test path an agent can drive and inspect.
82+
5. **Evidence protocol** — documented proof format for reproduction, validation, screenshots/videos/logs, and PR/ticket handoff.
83+
6. **Ticket/PR lifecycle skill** — repo-scoped workflow for workpad, branch, PR, review comments, human review, rework, and landing.
84+
7. **Agent-readable observability** — token-efficient CLI/API access to local logs, CI failures, browser console, metrics, or traces.
85+
8. **Safety/secrets/workspace policy** — env-backed secrets, destructive-command policy, workspace isolation, sandbox/approval posture.
86+
9. **Smoke-ticket eval** — runnable or documented tiny ticket proving unattended bootstrap → change → validate → evidence → handoff.
87+
88+
Verdict definitions are canonical in `references/symphony-readiness.md`.
89+
3290
## Workflow
3391

3492
### Phase 1 — Capture inputs
3593

36-
Inputs may be supplied after `/skill:harness-audit`.
94+
Inputs may be supplied in natural language with or without an explicit mode label.
3795

3896
- **Target repo path**: default to the current working directory when omitted.
39-
- **Mode**: `audit` default, `audit+fix`, or `focus:<artifact-name>`.
97+
- **Mode**: `audit` default, `audit+fix`, `symphony-readiness`, `audit+fix:symphony`, or `focus:<artifact-name>`.
4098
- **Stack hint**: auto-detect unless supplied.
4199

42100
Do not edit files in `audit` mode. For `audit+fix`, inspect uncommitted changes first and avoid overwriting user work.
@@ -49,39 +107,50 @@ Read whichever exist:
49107
- `Package.swift`, `*.xcodeproj`, `*.xcworkspace` → Swift.
50108
- `pyproject.toml`, `requirements.txt`, `setup.py`, `poetry.lock`, `uv.lock`, `Pipfile` → Python.
51109
- `Cargo.toml` → Rust.
52-
- `go.mod` → Go/basic generic support.
110+
- `go.mod` → Go.
111+
112+
If multiple stack markers exist, audit every major stack that has runtime/build impact. For example, a TypeScript frontend plus Python backend should use both stack references and call out cross-stack bootstrap/validation gaps.
53113

54-
Read the matching reference from `references/stack-<stack>.md`. If there is no dedicated stack reference, use `references/audit-prompt.md` plus generic judgment.
114+
Read the matching reference from `references/stack-<stack>.md`. If there is no dedicated stack reference, use `references/audit-prompt.md` plus generic judgment. For `symphony-readiness` or `audit+fix:symphony`, also read `references/symphony-readiness.md`, `references/evidence-protocol.md`, and `references/smoke-ticket-eval.md`.
55115

56116
### Phase 3 — Run the audit
57117

58118
Use `references/audit-prompt.md` as the checklist. Execute the audit directly with available Pi tools (`read`, `bash`, `rg`/`find` through shell as needed). Keep evidence path-specific.
59119

60120
Return:
61121

62-
- 8 artifact scorecards with evidence.
122+
- 8 baseline artifact scorecards with evidence.
63123
- Summary scorecard (`X/8 ✅, Y/8 ⚠️, Z/8 ❌`).
64124
- Top 3 highest-leverage gaps with effort estimate and what each unlocks.
65125
- Notable strengths.
66126
- Stack-specific observations.
67127

68-
Keep the report under about 1500 words. Do not pad.
128+
For Symphony modes, additionally return:
129+
130+
- 9-item Symphony readiness overlay scorecard.
131+
- Symphony readiness verdict: `Ready`, `Close`, or `Not ready`.
132+
- Minimum blockers before unattended orchestration.
133+
- One recommended smoke-ticket eval shape for this repo.
134+
135+
Keep the baseline report under about 1500 words. For Symphony modes, keep the combined report under about 2200 words unless the user asks for depth. Do not pad.
69136

70137
### Phase 4 — Mode-specific follow-up
71138

72139
- **`audit`**: stop after the report. Do not edit.
73-
- **`audit+fix`**: fix the top 3 gaps, or fewer if the safe scope is smaller.
74-
- **`focus:<artifact>`**: skip the full audit and handle only that artifact.
140+
- **`audit+fix`**: fix the top 3 baseline gaps, or fewer if the safe scope is smaller.
141+
- **`symphony-readiness`**: audit baseline plus Symphony overlay. Do not edit.
142+
- **`audit+fix:symphony`**: fix the smallest set of blockers that moves the repo toward unattended ticket execution. Prefer workflow contract, disposable bootstrap, validation/evidence, and smoke eval over cosmetic docs.
143+
- **`focus:<artifact>`**: read-only by default; skip the full audit and audit only that artifact. For focused edits, use the normal `audit+fix` mode and state the artifact scope in natural language, e.g. `audit+fix, focus pre-commit`.
75144

76-
Use `references/fix-patterns.md` for fix templates.
145+
Use `references/fix-patterns.md` for fix templates. For Symphony workflow seeding, use `references/workflow-template.md`. For proof requirements, use `references/evidence-protocol.md` and `references/smoke-ticket-eval.md`.
77146

78147
Fix rules:
79148

80149
- Make surgical changes only; no unrelated refactors.
81150
- Verify functionally and show output.
82151
- Do not commit or push unless the user explicitly requested commits.
83152
- Do not post to external systems unless explicitly requested.
84-
- Avoid emojis in committed files unless the repo already uses them.
153+
- Avoid emojis in committed source/config/docs unless the repo already uses them. Status emojis in audit chat reports are allowed.
85154
- Use kebab-case filenames unless the repo convention differs.
86155
- Run fixes sequentially when they touch overlapping files.
87156

@@ -102,20 +171,36 @@ Show:
102171
| Swift / iOS | `references/stack-swift.md` | SwiftLint, swift-format, `xcodebuild` wrapper, GitHub Actions macOS runner |
103172
| Python | `references/stack-python.md` | ruff, black, pre-commit, pytest |
104173
| Rust | `references/stack-rust.md` | clippy, rustfmt, cargo test, GitHub Actions |
174+
| Go | `references/stack-go.md` | gofmt, golangci-lint, go test, GitHub Actions |
105175
| Other | `references/audit-prompt.md` | Adapt the universal artifacts to the toolchain present |
106176

107-
## Fix templates
177+
Symphony readiness uses cross-stack references: `references/symphony-readiness.md`, `references/evidence-protocol.md`, and `references/smoke-ticket-eval.md`.
108178

109-
Use `references/fix-patterns.md`:
179+
## Fix templates
110180

111-
- `add-cold-start-brief`
112-
- `extract-rules-dir`
113-
- `add-rich-lint-messages`
114-
- `setup-pre-commit`
115-
- `wrap-test-runner`
116-
- `add-pr-review`
117-
- `seed-repo-skills`
118-
- `setup-gc-cadence`
181+
Use `references/fix-patterns.md`.
182+
183+
Focus/fix-template map:
184+
185+
| Focus | Fix template |
186+
| --- | --- |
187+
| `cold-start-brief` | `add-cold-start-brief` |
188+
| `rules-dir` | `extract-rules-dir` |
189+
| `lint-messages` | `add-rich-lint-messages` |
190+
| `pre-commit` | `setup-pre-commit` |
191+
| `test-suite` | `wrap-test-runner` |
192+
| `pr-review` | `add-pr-review` |
193+
| `repo-skills` | `seed-repo-skills` |
194+
| `gc-cadence` | `setup-gc-cadence` |
195+
| `workflow-contract` | `add-workflow-contract` |
196+
| `workspace-bootstrap` | `add-disposable-bootstrap` |
197+
| `validate-loop` | `add-validate-loop` |
198+
| `app-validation` | `add-app-validation` |
199+
| `evidence-protocol` | `add-evidence-protocol` |
200+
| `ticket-lifecycle` | `add-ticket-lifecycle-skill` |
201+
| `observability` | `add-observability-access` |
202+
| `safety-policy` | `add-safety-policy` |
203+
| `smoke-ticket-eval` | `add-smoke-ticket-eval` |
119204

120205
## Output format
121206

@@ -137,6 +222,31 @@ X/8 ✅, Y/8 ⚠️, Z/8 ❌
137222
2. ...
138223
3. ...
139224

225+
## Symphony readiness overlay
226+
Include only for `symphony-readiness` and `audit+fix:symphony`.
227+
228+
### 1. WORKFLOW.md contract
229+
**Status:** ✅ / ⚠️ / ❌
230+
**Evidence:** {file paths or "not found"}
231+
**Gap:** {1-2 lines}
232+
233+
[... overlay items 2-9, same format ...]
234+
235+
## Symphony readiness verdict
236+
Ready / Close / Not ready
237+
238+
## Minimum blockers before unattended orchestration
239+
1. ...
240+
2. ...
241+
3. ...
242+
243+
## Recommended smoke-ticket eval shape
244+
- Fixture: ...
245+
- Expected change: ...
246+
- Validation command: ...
247+
- Evidence required: ...
248+
- Cleanup: ...
249+
140250
## Notable strengths
141251
- ...
142252

‎skills/harness-audit/references/audit-prompt.md‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Audit Prompt Template
1+
# Audit Checklist / Delegation Prompt
22

3-
Use this as the audit checklist or as a prompt for a separate exploration agent when the host supports one. Replace the `{{...}}` placeholders before using it.
3+
Use this directly as the audit checklist. Paths in this file are relative to the skill root (`skills/harness-audit/`), not to the `references/` directory. When delegating to a separate exploration agent, first replace every `{{...}}` placeholder with concrete repo values; do not send unresolved placeholders to another agent.
4+
5+
Placeholder sources:
6+
- `{{STACK}}`, `{{PACKAGE_MANAGER}}`, `{{REPO_PATH}}`, and `{{REPO_CONTEXT}}` come from stack detection and initial repo inspection.
7+
- `{{LINT_CONFIG_PATHS}}`, `{{TEST_RUNNER}}`, and `{{STACK_SPECIFIC_BONUS_SIGNALS}}` come from the matching stack reference.
8+
- `{{LINT_CMD}}` for fix templates must be derived from package scripts, Makefile targets, or the matching stack reference; if no lint command exists, report that as the gap instead of inventing one.
49

510
---
611

@@ -61,6 +66,22 @@ Concentration check: 5-10 deep skills > 50 shallow ones. Flag sprawl.
6166
## 8. Garbage collection cadence
6267
This is hard to detect from code alone. Look for: weekly review docs, `CHANGELOG.md` with structured entries, `docs/` folder with retros/postmortems, `.github/ISSUE_TEMPLATE/` for "agent slop" or similar, `docs/decisions/` ADRs. Note any signal that PR feedback gets converted into rules/lints over time.
6368

69+
# Symphony readiness overlay
70+
71+
When the requested mode is `symphony-readiness` or `audit+fix:symphony`, also use `references/symphony-readiness.md` and score the repo on:
72+
73+
1. `WORKFLOW.md` contract
74+
2. Disposable workspace bootstrap
75+
3. One-command validate loop
76+
4. Agent-visible app validation
77+
5. Evidence protocol
78+
6. Ticket/PR lifecycle skill
79+
7. Agent-readable observability
80+
8. Safety, secrets, and workspace policy
81+
9. Smoke-ticket eval
82+
83+
This overlay answers whether an unattended ticket-level orchestrator can safely run agents in this repo. Do not treat good docs/tests as sufficient if there is no disposable bootstrap, evidence path, or smoke-ticket proof.
84+
6485
# Bonus signals to capture
6586

6687
`{{STACK_SPECIFIC_BONUS_SIGNALS}}` — read the matching `references/stack-{{STACK}}.md` for stack-specific things to look for here.
@@ -87,4 +108,15 @@ What's already well-set-up that should be preserved.
87108
## Stack-specific observations
88109
Toolchain caveats agents need to know (Swift project file conflicts, Bun gotchas, Python venv conventions, etc.).
89110

90-
Keep total report under ~1500 words. Be ruthless — gaps not present, but no padding.
111+
For Symphony modes, also include:
112+
113+
## Symphony readiness overlay
114+
9-item scorecard with evidence and gaps.
115+
116+
## Symphony readiness verdict
117+
Ready / Close / Not ready.
118+
119+
## Minimum blockers before unattended orchestration
120+
The smallest set of fixes needed before a scheduler can run agents unattended.
121+
122+
Keep baseline reports under ~1500 words. Keep Symphony reports under ~2200 words unless depth is requested. Be ruthless — gaps not present, but no padding.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Evidence Protocol
2+
3+
Use this reference when a repo needs human-reviewable proof for unattended agent work.
4+
5+
## Evidence goals
6+
7+
Evidence should answer three questions quickly:
8+
9+
1. What behavior was reproduced or inspected before the change?
10+
2. What changed?
11+
3. What proves the acceptance criteria now pass?
12+
13+
Raw logs are not enough. Agents should compress proof into a short workpad/PR section and attach durable artifacts only when they add signal.
14+
15+
## Required evidence by change type
16+
17+
| Change type | Minimum evidence |
18+
| --- | --- |
19+
| Pure docs | rendered/readback check or link check when available |
20+
| Library/API logic | targeted tests + relevant full suite/verify command |
21+
| CLI behavior | command transcript before/after |
22+
| UI behavior | screenshot or video + console error check + test command |
23+
| Runtime/perf | benchmark or trace/log query with threshold |
24+
| Bug fix | reproduction signal before fix + passing proof after fix |
25+
| Infra/CI | dry-run or CI link + failure-mode explanation |
26+
| Security/auth | negative test + positive test; never paste secrets |
27+
28+
## Workpad / PR evidence section
29+
30+
Agents should maintain a compact section like:
31+
32+
```markdown
33+
## Evidence
34+
35+
### Reproduction / baseline
36+
- `command`: outcome summary
37+
- artifact: `path-or-url`
38+
39+
### Validation
40+
- `command`: pass/fail summary
41+
- `command`: pass/fail summary
42+
43+
### UI/runtime proof
44+
- screenshot/video/log query: `path-or-url`
45+
- console/log errors checked: yes/no
46+
47+
### Known limits
48+
- ...
49+
```
50+
51+
## Artifact storage
52+
53+
Prefer durable, reviewable locations:
54+
- PR comment attachments
55+
- issue/workpad attachments
56+
- `tmp/evidence/` ignored by git for local-only proof
57+
- CI artifact uploads
58+
59+
Do not commit bulky generated evidence unless the repo already has that convention.
60+
61+
## Agent instructions to add to repo skills
62+
63+
- Capture evidence immediately after validation while context is fresh.
64+
- Quote only the useful tail/summary of long output.
65+
- Include exact commands, not paraphrases.
66+
- Include failing evidence when blocked.
67+
- Never claim UI behavior was validated without browser/app evidence.
68+
- Never claim CI is green without checking the current commit's checks.

0 commit comments

Comments
 (0)