Skip to content

T-AX3M-canonical-harness-model

Status: closed/done · Impact: high · Complexity: large

Replace the Claude-derived, skills-only model with a canonical, host-neutral model rich enough that no single target is privileged. It must represent the whole control-plane surface — capabilities (skills + commands), lifecycle hooks, MCP servers, tool permissions, shared context documents, and metadata — and validate markdown bodies with markdown-contract rather than frontmatter alone.

LocationRole today
plugin/lib/services/harness/model.tsZod model with metadata + skills + documents only; Claude frontmatter residue parked under nativeFrontmatter. No hooks/MCP/permissions/commands.

A HarnessModel whose capabilities[], hooks[], mcpServers[], permissions, documents[], and metadata are all first-class and host-neutral. Capability bodies validate through a markdown-contract contract. The model is the sole source of truth; every target projects from it.

  1. Add host-neutral schemas: Capability (kind: skill | command), Hook (event, matcher, action), McpServer (transport, command/url, args, env), Permission (allow/deny/ask rule sets).
  2. Fold the old skills/nativeFrontmatter into capabilities with typed fields; drop the Claude-specific escape hatch from the canonical shape.
  3. Add a markdown-contract contract for capability/document bodies; expose a validateHarnessModel.
  4. Update the harness model op to emit the canonical model.
LocationKindChange
plugin/lib/services/harness/model.tsmodifyEnrich to the canonical shape.
plugin/lib/services/harness/contract.tsnewmarkdown-contract body validation.
plugin/lib/services/harness/tests/model.test.tsnewSchema + contract tests.
  • HarnessModel carries capabilities, hooks, mcpServers, permissions, documents, metadata.
  • Capability/document bodies validate through markdown-contract.
  • sdlc harness model --output json emits the canonical model.
  • tsc + harness tests green.

Target exporters (own tasks) and re-authoring the corpus by hand (import bootstraps it).


← Back to Tasks