Skip to content

Self-host: a self-adapter + fixture target so the template can iterate on itself #11

Description

@robercano

Context

The template is designed to drive a target project via the adapter (gates.json + CLAUDE.md). To improve the harness using the harness, the orchestrator repo must become its own target — the classic bootstrap / chicken-and-egg.

Two things make it tractable:

  1. Worktree isolation already breaks the immediate cycle. Implementers edit candidate .claude/ files on a branch in a worktree, while the driving session keeps using the definitions it loaded at session start. The engine is never mutated mid-loop.
  2. Self-hosting promotion. Harness vN drives the change that produces vN+1; you then restart the session to adopt vN+1 (like a compiler compiling its successor). Agent-definition / settings.json / hook changes only take effect on a fresh session — so they need a smoke test that launches a sub-session in the candidate worktree rather than trusting the running one.

Suggestion

Ship a self-adapter so the repo dogfoods itself:

  • Its own gates.json over the harness artifacts:
    • lint: shellcheck .claude/scripts/*.sh + eslint/node --check on .claude/workflows/*.js + markdownlint on docs/;
    • build/typecheck: JSON-schema-validate gates.json, parse-check settings.json;
    • test: a smoke harness that runs feature-fanout.js against a tiny checked-in fixture target repo (under examples/) and asserts a scope→implement→review loop produces a green PR — validating the harness end-to-end without infinite regress (it operates on the fixture, not on itself).
  • Optionally a pinned known-good engine copy (tag/submodule) used to launch the driving session, kept separate from the template being edited, so a broken candidate can't brick the driver mid-loop.

This both proves the template on a non-JS-product repo and gives every harness change a real gate.

Tracks the "can the orchestrator iterate on itself?" question — the bootstrap path for self-hosting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmodule:harnessOrchestrator machinery under .claude

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions