Skip to main content

Unified AI agent engineering scaffold for teams

Project description

Harness Scaffold

CI License: MIT Python Ruff Checked with mypy

Unified AI agent engineering scaffold for teams.

Harness gives your team a single engineering process that works across every AI coding agent — Claude Code and Codex CLI by default, with Cursor / Copilot / Gemini extensible via the adapter registry. Instead of each agent inventing its own workflow, harness provides tool-neutral playbooks, a single deterministic verify script, and a Spec-Driven Development cycle, with thin adapter layers that translate them into each agent's native surface.

Why Harness?

AI coding agents are powerful but inconsistent. Different agents have different conventions, different context files, different ways of running commands. Teams end up with:

  • Fragmented workflows — one process for Claude Code, another for Codex
  • No shared quality bar — agents skip tests, ignore conventions, produce inconsistent output
  • Lost context — decisions aren't recorded, specs aren't tracked, handoffs are lossy

Harness solves this with a one brain, many frontends architecture:

┌──────────────────────────────────────────────────┐
│              .harness/ (the brain)               │
│  playbooks · scripts · registry · knowledge      │
├──────────────────────┬───────────────────────────┤
│      Claude          │        Codex              │
│      /hx-*           │        /hx-*              │
└──────────────────────┴───────────────────────────┘
  (Cursor / Copilot / Gemini extensible via registry)

Core Concepts

  • Playbooks — Tool-neutral step-by-step procedures for every engineering phase (14 commands from constitution to doctor)
  • Spec-Driven Development (SDD) — Per-change artifacts live at specs/<NNN>-<slug>/ (spec-kit flat convention)
  • Knowledge base — Diátaxis + C4 + arc42 + BIZBOK + Tech Radar hybrid: 7 fixed docs + how-to/ recipes + ADRs, all under .harness/knowledge/
  • Flow levels — Scale ceremony to task size: quick (4 commands) → standard (7) → full (10+) → epic (multi-change)
  • Verify as invariant — A single verify.sh script is invoked by editor hooks, pre-commit, and GitLab CI — so no two sensors can disagree about whether the build is green
  • Adapters — Thin translation layers that map harness commands into each agent's native format (slash commands, rules, instructions)

Quick Start

# Install (PyPI — distribution name is harness-scaffold; import + CLI stay `harness`)
pip install harness-scaffold
# or with uv
uv tool install harness-scaffold

# Or install directly from GitHub (works before any PyPI release)
pip install git+https://github.com/Onebyte1943/harness-scaffold.git
# or
uv tool install git+https://github.com/Onebyte1943/harness-scaffold.git

# Initialize in your project
cd your-project
harness init --agent claude

# Check setup
harness doctor

This generates the design-v3 footprint:

your-project/
├── .harness/                    # Brain (tool-neutral)
│   ├── config.toml
│   ├── registry.toml
│   ├── playbooks/               # 14 workflow playbooks
│   ├── scripts/sh/              # Single-source-of-truth verify
│   ├── memory/                  # L-RULE (constitution lives here)
│   ├── knowledge/               # 7 docs + how-to/ + adr/
│   ├── principle-packs/         # Seed principles for /hx-constitution
│   ├── evals/                   # Regression samples for /hx-doctor
│   └── templates/               # Project-local template overrides
├── AGENTS.md                    # Shared agent contract (T13)
├── CLAUDE.md                    # Claude Code entry point (imports @AGENTS.md)
├── .claude/commands/            # /hx-* slash commands for Claude
├── .codex/commands/             # /hx-* slash commands for Codex
├── .gitlab-ci.yml               # MR pipeline (verify + review) + scheduled drift
├── .pre-commit-config.yaml      # Same verify.sh, pre-commit
├── .agent/                      # Cross-session progress log
└── specs/                       # Per-change artifacts (lazy)

See docs/quick-start.md for the full walkthrough.

The Workflow

Harness implements a four-phase engineering lifecycle:

Phase Commands Purpose
W0 Bootstrap constitution, baseline One-time project setup
W1 Change nextproposeclarifydesignplantasksanalyzeimplementverify SDD cycle per change
W2 Review & Archive review, archive Quality gate, post-merge knowledge refresh
W3 Steer doctor Self-check the harness itself

/hx-next is the router — call it any time you're unsure what command (and flow level) is appropriate from current state.

Each command maps to a playbook in .harness/playbooks/ and is invoked through the agent's native surface (e.g., /hx-verify in Claude Code or Codex).

Multi-Agent Support

# Initialize with multiple agents (defaults bundled)
harness init --agent claude --agent codex

# Add another agent later (Cursor / Copilot / Gemini extensible via registry)
harness init --agent codex

Each agent gets its own adapter layer while sharing the same brain. The registry tracks each agent's capabilities and provides graceful degradation paths. Cursor, Copilot and Gemini remain in the registry so a team can extend coverage without code changes — they are not promoted as the default bundle.

Documentation

  • Quick Start — Get up and running in 5 minutes
  • Use Cases — Real-world scenarios and workflows
  • Advanced Usage — Presets, flow levels, customization, narrative language switch

Output language

Generated playbooks, AGENTS.md, CLAUDE.md, and the principle pack ship in two narrative languages — Chinese (zh, default) and English (en) — selected at init time via --output-lang:

harness init --agent claude              # 中文 narrative (default)
harness init --agent claude --output-lang en   # English narrative

Structural items always stay English regardless of the flag — section headings (## Purpose, ## Steps, …), YAML frontmatter keys, Provenance blocks (label + 3 content lines), ⟨…⟩ placeholders, {{ jinja_var }} template variables, /hx-* command names, stable IDs (REQ-NNN, DEC-NNN, …), tags ([enforceable], [inferential], [P]), proper nouns (C4, arc42, BIZBOK, MADR, Diátaxis, …), and code blocks. Agents pattern-match on these — switching them would break playbook parsing. See Advanced Usage → Output Language for the full translation contract.

Requirements

  • Python >= 3.10
  • Git (recommended)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harness_scaffold-0.2.1.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harness_scaffold-0.2.1-py3-none-any.whl (86.5 kB view details)

Uploaded Python 3

File details

Details for the file harness_scaffold-0.2.1.tar.gz.

File metadata

  • Download URL: harness_scaffold-0.2.1.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for harness_scaffold-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9c1b0bee6c75a2f51e17742631815ec957282a0fa47a5bbbb19ee4cab31bca17
MD5 03788bf7a41593ea4b3448df53fc1f27
BLAKE2b-256 92ac48f80db281cededad5a9507f60db2984a728b068b51b1da7e7a2e03df04d

See more details on using hashes here.

Provenance

The following attestation bundles were made for harness_scaffold-0.2.1.tar.gz:

Publisher: release.yml on Onebyte1943/harness-scaffold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file harness_scaffold-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for harness_scaffold-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dea112578f31d4102d20bad7fec462f3c9f67f71df2b747eda3b734bc796b7b6
MD5 c332ff1079f1c8b726369bf78efe94bd
BLAKE2b-256 db60074fe502faf6f15d43f145a2bb28c00b70534123e8efa10dccb6ddfef26d

See more details on using hashes here.

Provenance

The following attestation bundles were made for harness_scaffold-0.2.1-py3-none-any.whl:

Publisher: release.yml on Onebyte1943/harness-scaffold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page