T-5140-harness-api-examples-docs
Status: closed/done · Impact: high · Complexity: medium
Give consumers a worked, runnable path: how to read the canonical model, add a capability/hook/MCP server, and export to every target. Document the model and the target matrix so the multi-harness control plane is discoverable.
| Location | Role today |
|---|---|
plugin/lib/services/harness/ | Model + importer + exporters exist; no consumer-facing usage examples or overview doc. |
Proposed
Section titled “Proposed”An examples/ API walkthrough (TS) exercising build → validate → export-all, plus a
conventions/docs page describing the model shape and the per-target mapping matrix.
Approach
Section titled “Approach”- Write a runnable example that builds a model and exports every target to a temp dir.
- Author a harness-model overview + target-matrix doc.
- Wire the example into tests so it can’t rot.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/lib/services/harness/examples/export-all.ts | new | Runnable API example. |
plugin/conventions/harness-model.md | new | Model + target-matrix doc. |
plugin/lib/services/harness/tests/examples.test.ts | new | Pins the example. |
Acceptance criteria
Section titled “Acceptance criteria”- A runnable example builds a model and exports all targets.
- A doc describes the model + per-target mapping.
- tsc + tests green.
Out of scope
Section titled “Out of scope”Per-host installation UX beyond what harness export already provides.