agentleFS
DamonZSDamonZS/Claude-Codex-Pro-Tool/skills/harness-engineering/SKILL.md

harness-engineering

Skill15 starsChanged 3 months agoMITView on GitHub

Use when a coding task needs spec-first planning, acceptance criteria, verification evidence, AI agent workflow design, sub-agent coordination, disciplined project delivery, or project workflow initialization.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use self-improvement-loops, bdi-mental-states and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • DVwebBiz11Skill

    self-improvement-loops

    This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.

    Also in 4 projects that use this

  • Downey6689Skill

    bdi-mental-states

    Transforms external RDF context into BDI mental states. Invoke when modeling beliefs, desires, and intentions.

    Also in 5 projects that use this

  • Downey6689Skill

    hosted-agents

    Guidance for hosted/sandboxed agents. Invoke when running background agents in isolated VMs or multi-client setups.

    Also in 5 projects that use this

  • DVwebBiz11Skill

    long-horizon-prompting

    This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.

    Also in 4 projects that use this

  • AbdelrhmanAlquranSkill

    latent-briefing

    This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context", "latent briefing", "reduce worker tokens", "cross-agent memory without summarization", or discusses Attention Matching compaction, recursive language models with workers, or token explosion in hierarchical agents.

    Also in 4 projects that use this

  • abdullah1854Skill

    context-degradation

    Also in 5 projects that use this

  • +2 more from Downey6689

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 20 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 20

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat every non-trivial task as a controlled engineering loop:

    line 10
  2. Distinctive:

    Verify with real evidence.

    line 16
  3. Distinctive:

    Do not claim completion without verification evidence.

    line 19
  4. Distinctive:

    When the user invokes this skill in a project and asks to initialize, bootstrap, or set up Harness Engineering:

    line 23
  5. Distinctive:

    Do not overwrite an existing AGENTS.md unless the user explicitly asks for overwrite.

    line 31
  6. Very specific:

    Prefer running scripts/init_harness.py <project-root> for deterministic initialization.

    line 32
  7. Distinctive:

    After initialization, verify the four files exist and report the generated paths.

    line 33
  8. Very specific:

    If the script is unavailable, use references/initialization.md to create the same baseline manually.

    line 35
  9. Distinctive:

    Use the lightest process that protects the task:

    line 39
  10. Distinctive:

    When uncertain, classify upward.

    line 48
  11. Distinctive:

    Read in this order when present:

    line 54
  12. Distinctive:

    If project docs conflict, follow the higher-priority project rule and state the conflict.

    line 63
  13. Distinctive:

    If a non-trivial task lacks a spec or acceptance criteria:

    line 67
  14. Distinctive:

    Create or update a spec before implementation.

    line 69
  15. Distinctive:

    Create or update matching acceptance criteria before delivery.

    line 70
  16. Distinctive:

    Keep both scoped to the current task.

    line 71
  17. Very specific:

    Use references/templates.md for templates.

    line 73
  18. Distinctive:

    Before code changes, summarize:

    line 77
  19. Distinctive:

    Run the narrowest real verification that proves the acceptance criteria.

    line 91
  20. Distinctive:

    Never invent test, build, run, screenshot, or log results.

    line 93
  21. Distinctive:

    Test Agent: verifies against acceptance criteria.

    line 112
  22. Distinctive:

    Do not let the same role silently redefine the target, implement it, and judge completion.

    line 115
  23. Distinctive:

    Read only what is needed:

    line 119

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Harness Engineering

Core Rule

Treat every non-trivial task as a controlled engineering loop:

  1. Read project context.
  2. Define or locate the spec.
  3. Define or locate acceptance criteria.
  4. Implement the smallest necessary change.
  5. Verify with real evidence.
  6. Report against the acceptance criteria.

Do not claim completion without verification evidence.

Initialization Mode

When the user invokes this skill in a project and asks to initialize, bootstrap, or set up Harness Engineering:

  1. Inspect the target project root.
  2. Generate the Harness Engineering baseline documents:
    • AGENTS.md
    • docs/harness-engineering-theory.md
    • spec/harness-engineering-baseline.md
    • acceptance/harness-engineering-baseline.md
  3. Do not overwrite an existing AGENTS.md unless the user explicitly asks for overwrite.
  4. Prefer running scripts/init_harness.py <project-root> for deterministic initialization.
  5. After initialization, verify the four files exist and report the generated paths.

If the script is unavailable, use references/initialization.md to create the same baseline manually.

Decision Guide

Use the lightest process that protects the task:

Task typeExamplesRequired workflow
Microrun a command, explain code, typo fixUse existing context, verify if claiming a result
Normallocal bug fix, small UI copy changeSummarize scope and run targeted verification
Importantpage, API, module, cross-file behaviorCreate/read spec/*.md and acceptance/*.md first
High riskauth, secrets, deletion, installer, release, migrationFull spec, acceptance, rollback/risk notes, stronger verification

When uncertain, classify upward.

Required Workflow

1. Gather Context

Read in this order when present:

  • AGENTS.md
  • README.md
  • Relevant docs/
  • Relevant spec/*.md
  • Matching acceptance/*.md
  • Related source, config, and tests

If project docs conflict, follow the higher-priority project rule and state the conflict.

2. Fill Missing Harness

If a non-trivial task lacks a spec or acceptance criteria:

  • Create or update a spec before implementation.
  • Create or update matching acceptance criteria before delivery.
  • Keep both scoped to the current task.

Use references/templates.md for templates.

3. Summarize Before Implementing

Before code changes, summarize:

  • Current goal.
  • Files likely to change.
  • Files or behaviors that must not change.
  • Acceptance criteria.
  • Key risks.

4. Implement Narrowly

Make the smallest change that satisfies the spec. Avoid unrelated refactors, dependency changes, production config changes, and cleanup outside scope.

5. Verify

Run the narrowest real verification that proves the acceptance criteria. Broaden verification for shared, security-sensitive, release, migration, or user-visible behavior.

Never invent test, build, run, screenshot, or log results.

6. Report

Final response must include:

  1. Task conclusion.
  2. Files changed and why.
  3. Verification commands/results.
  4. Acceptance criteria mapping.
  5. Remaining risks or follow-up.

Sub-Agent Use

For complex work, split roles:

  • Spec Agent: produces spec/*.md.
  • Acceptance Agent: produces acceptance/*.md.
  • Implementation Agent: changes code/config/tests.
  • Test Agent: verifies against acceptance criteria.
  • Review Agent: checks drift, omissions, quality, and risk.

Do not let the same role silently redefine the target, implement it, and judge completion.

References

Read only what is needed:

  • references/theory.md: deeper theory, task layering, failure modes, and metrics.
  • references/initialization.md: project initialization behavior and generated baseline expectations.
  • references/templates.md: spec, acceptance, task summary, and final report templates.
  • references/checklists.md: quick checklists for creation, implementation, verification, and review.

Common Mistakes

MistakeCorrection
Coding before the spec is clearStop and write/update the spec
Acceptance says "works correctly"Replace with observable pass/fail criteria
Reporting "done" after reading codeRun verification or state why it cannot run
Expanding scope during implementationMove extra ideas to follow-up
Treating failed verification as a footnoteFix it or report it as unresolved risk

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.