create-repo-harness
Scaffold the repo-harness template —
a lean harness for agent-driven repositories: anti-bloat gates, three-layer code lookup,
pull-mode promotion, and the ./repo CLI (Python stdlib, zero dependencies).
Usage
Install once, get the short global command (codegraph-style):
npm install -g create-repo-harness
repoharness new my-project # git ready when the command returns
repoharness update # inside a project: lossless refresh
repoharness attach # add the harness to the current existing repo
Or without installing anything (one-off, always latest):
npm create repo-harness@latest my-project # scaffold
npm create repo-harness@latest . --update # lossless update inside a project
The package is a scaffolder only: it copies the embedded template and exits. Your repository never depends on npm at runtime.
What lands in your repo
AGENTS.md · ARCHITECTURE.md · repo (CLI launcher) · .harness/ (config, playbook,
ledger, schemas) · tools/INDEX.md · docs/decisions/ · src/ tests/ zones · var/
(disposable run space, gitignored).
See the scaffolded README.md for the full model.
Updating an existing harness project (lossless)
When a new template version ships, run inside your project:
npm create repo-harness@latest . --update
Driven by an ownership manifest (MANIFEST.json):
- mechanism files (
repo,src/harness_cli/, harness tests, playbooks) are refreshed silently — this is where fixes land; - advisory files you may have customized (
AGENTS.md,README.md, ...) are backed up tovar/update-backups/<ts>/before overwriting; - user state (
config.yaml,runs.log,IDENTITY.md,tools/,docs/, your code and tests) is never touched; - template doc examples are never imposed.
The applied version is recorded in .harness/VERSION; review with git status and stage.
Release (maintainers)
npm pack/npm publish may skip lifecycle scripts depending on environment — always embed explicitly:
node scripts/embed.js && npm publish