harness-agent-research
A self-improving agent governance framework for Claude Code. Scaffold it into any repository to get a disciplined, self-correcting agent workflow:
- Meta-skills (
/meta-scope-guard,/meta-anti-patterns,/meta-learn,/meta-commit,/meta-self-audit,/meta-evolve,/meta-critique,/meta-red-team, …) that make the agent scope-aware, mistake-avoiding, and self-reflecting. - Hooks that structurally enforce governance — hard-block edits before scope is declared, block session end without reflection, enforce memory budgets — not just docs the agent can ignore.
- A memory hierarchy (
MEMORY.mdroot index → sub-indexes → topic files) with byte budgets and an always-load composition law, keeping cross-session knowledge principle- centric instead of bloating context. - An anti-pattern system (P1–P12 operational principles + an append-only incident log) the agent extends every time it's corrected.
It ships only the reusable core — no domain-specific skills or content. You add your project's skills, rules, and memory on top.
Install
pip install harness-agent-research
Use
From your project root:
harness-agent-research init # scaffold AGENTS.md + .claude/ + .agent/
harness-agent-research link # once per machine: link memory for Claude Code
(har is a short alias for harness-agent-research.)
Then commit and open the project in Claude Code — the governance hooks activate automatically.
git add AGENTS.md .claude .agent && git commit -m "feat: add agent governance framework"
What gets scaffolded
your-project/
├── AGENTS.md # canonical conventions (Claude reads via .claude/CLAUDE.md; Codex natively)
├── .claude/
│ ├── CLAUDE.md # thin @../AGENTS.md import stub
│ ├── settings.json # hook wiring + permission split (non-destructive allow / catastrophic deny)
│ └── {commands,hooks,memory,rules,scripts} -> ../.agent/* (symlinks, created by `init`)
└── .agent/ # the editable home (NOT a Claude Code protected path)
├── commands/ # 14 meta-skills + poe-call + README
├── hooks/ # 6 governance hooks + lib.sh
├── scripts/ # poe_query.py (optional external-LLM helper)
├── rules/structure.md # path-scoped codebase reference (fill in)
└── memory/ # MEMORY.md, indexes, anti-patterns/, ops/, workstreams/, …
Why the .agent/ + .claude/-symlink split: .claude/ is a Claude Code protected
path (edits there always prompt the user), so the editable surface lives in .agent/ and
.claude/ holds only the two files Claude Code reads directly (CLAUDE.md, settings.json)
plus symlinks into .agent/. The symlinks are created by init at scaffold time — they are
not stored in the wheel (so packaging is free of the "symlinks don't survive a wheel"
problem). See .agent/memory/ops/governance-system-reference.md.
After scaffolding
- Fill in AGENTS.md (Project Overview) and
.agent/rules/structure.md(package map). - (Optional) export
POE_API_KEY(or put it in.env) to enable/poe-callsecond opinions in/meta-critiqueand/meta-red-team; otherwise delete.agent/scripts/poe_query.py+.agent/commands/poe-call.md— both skills degrade gracefully to self-critique. - Add your own skills via
/meta-propose-skill; record work via/track-workstream.
Notes
- Excluded by design: GPU/domain profiling skills, a shared-resource scheduler, and the autonomous-work playbook that depended on them. This is the pure meta core.
initnever clobbers an existingAGENTS.md(it writesAGENTS.framework.mdfor you to merge) and refuses to overwrite an existing.agent/without--force.
Develop / publish
pip install -e ".[dev]"
python -m build # sdist + wheel
python -m twine check dist/* # verify metadata
python -m twine upload dist/* # publish to PyPI
Replace chless in pyproject.toml and AGENTS.md before publishing.
License
MIT — see LICENSE.
Metadata
Release files for harness-agent-research 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| harness_agent_research-0.1.0.tar.gz | 87.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| harness_agent_research-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 197.0 kB
Release files / harness_agent_research-0.1.0.tar.gz
| Download URL | harness_agent_research-0.1.0.tar.gz |
|---|---|
| Size | 87.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28b31abc1529b178e8570262f745a41de45c29a3be8e4d478928dba4c218f98a
|
|
BLAKE2b-256 checksum How to use checksums |
210958c508c190c7166c51f0ea88384aee6648514c2f94fd4e3c7af344055b64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / harness_agent_research-0.1.0-py3-none-any.whl
| Download URL | harness_agent_research-0.1.0-py3-none-any.whl |
|---|---|
| Size | 109.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9111f746614219af4fc51565552647b008be5604df937805213c07727f4056eb
|
|
BLAKE2b-256 checksum How to use checksums |
cbc8b6e2e01204da449a4f6b75c5f4054f66f8e1f5f599a698aee1644b429094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for harness-agent-research 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.