Skip to content

feat(harness): manifest-driven compile-harness deploy engine (ENGINE-001)#172

Merged
mlorentedev merged 3 commits into
mainfrom
feat/engine-001-deploy-core
May 30, 2026
Merged

feat(harness): manifest-driven compile-harness deploy engine (ENGINE-001)#172
mlorentedev merged 3 commits into
mainfrom
feat/engine-001-deploy-core

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

What

Engine core of the HARNESS-001 epic (#162): a manifest-driven deploy engine that compiles enforced vault patterns into marker-delimited "Overrides of Harness Defaults" blocks inside the agent instruction files (AGENTS.md, ai/claude/CLAUDE.md), guarded by an offline drift check.

Closes the #156 regression class: a rule enforced in agent files had no vault source of truth, so a harness default (e.g. Co-Authored-By on commits) could silently win at runtime. Now every enforced rule has a vault source, a committed source-of-record (harness/enforced/<id>.md), and a --check that runs with no vault present.

How

  • scripts/compile-harness.sh
    • --refresh (needs the vault): extracts each manifest section by anchor → writes harness/enforced/<id>.md → injects one marker-delimited region per target, ordered by the manifest, carrying a sha256 prefix + SSOT pointer. Asserts per-file line caps.
    • --check (offline): renders from the committed records and diffs each target's managed region; non-zero exit on any drift. No vault access.
  • harness/manifest.json + harness/enforced/: three rules (no-attribution, english-only, no-phase-references) mapped to AGENTS.md + ai/claude/CLAUDE.md.
  • scripts/healthcheck.sh: check_harness assertion calling --check (offline, runs on a vault-less machine).
  • setup-linux.sh: runs --refresh during deploy; committed blocks are the fallback when the vault is absent.
  • ai/claude/CLAUDE.md line cap raised 80 → 100 to fit the generated block (justified inline in tests/opencode.bats).

Verification

  • bats tests/compile-harness.bats → 12/12 green (AC1–AC7 + help/unknown-arg + healthcheck/setup wiring).
  • shellcheck scripts/compile-harness.sh clean; bash -n + zsh -n pass.
  • --check reports no drift on the real repo; --refresh against the vault is idempotent (byte-identical re-run).
  • specs/ENGINE-001-deploy-engine-core/features.json: 7 features, one executable verification per AC.

Scope

Spec: specs/ENGINE-001-deploy-engine-core/. Out of scope, sequenced in the umbrella (#162): Windows compile-harness.ps1 + Pester, agents beyond Claude/AGENTS, and the rule-discovery consumers.

…001)

Compile enforced vault patterns into marker-delimited override blocks in
AGENTS.md and ai/claude/CLAUDE.md, guarded by an offline drift check. Rules
enforced in agent instruction files now have a vault source of truth, a
committed source-of-record, and a verification that runs with no vault
present (#156 regression class).

- scripts/compile-harness.sh: --refresh (vault section -> harness/enforced/
  <id>.md -> injected marker region, with per-file line caps) and --check
  (offline render + diff against each target, no vault access)
- harness/manifest.json + harness/enforced/: three rules (no-attribution,
  english-only, no-phase-references) mapped to AGENTS.md + ai/claude/CLAUDE.md
- scripts/healthcheck.sh: check_harness assertion (offline)
- setup-linux.sh: runs --refresh during deploy; committed blocks are the
  fallback when the vault is absent
- ai/claude/CLAUDE.md line cap raised 80 -> 100 to fit the generated block
- tests/compile-harness.bats: 12 tests covering AC1-AC7

Spec: specs/ENGINE-001-deploy-engine-core/ (HARNESS-001 epic, #162).
@mlorentedev mlorentedev merged commit 76d0028 into main May 30, 2026
6 checks passed
@mlorentedev mlorentedev deleted the feat/engine-001-deploy-core branch May 30, 2026 00:52
mlorentedev added a commit that referenced this pull request May 30, 2026
ENGINE-001 (engine core of HARNESS-001) shipped via #172. Move specs/ENGINE-001-deploy-engine-core -> specs/archive/ and set proposal status: archived. The HARNESS-001 umbrella spec stays in specs/ (epic #162 still open).
mlorentedev added a commit that referenced this pull request May 30, 2026
ENGINE-001 (engine core of HARNESS-001) shipped via #172. Move specs/ENGINE-001-deploy-engine-core -> specs/archive/ and set proposal status: archived. The HARNESS-001 umbrella spec stays in specs/ (epic #162 still open).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant