Turn a repeated correction into the earliest durable owner so the next trajectory does not re-learn it in chat.
Upstream: Turn feedback into infrastructure.
## Lesson
- **Finding:** (what failed / what the agent did wrong)
- **Repair:** (what fixed this instance)
- **Earliest owner:** type | lint | skill | doc-map | script-gate | proof | CI | ops
- **Ratchet:** (concrete check or doc link that blocks recurrence)
- **Keep / revise / drop:** after a fresh rerun (paste `freshRerun` output — [`FRESH-RERUN.md`](/docs/harness/FRESH-RERUN.html))
Scaffold: bun run harness:lesson --title="…".
Fresh-rerun is mandatory for improve-harness retain/revise/remove: run the affected claim’s freshRerun from lib/harness/proof.ts and paste the terminal output into the PR.
type — brand / path-bun / parse*bun run check:brands · tsc --project tsconfig.check.jsonlint — config/eslint/plugin-harness/ · plugin-bun/bun eslint --config eslint.bun-native.config.ts --quiet (error rules)skill — .agents/skills/<name>/SKILL.mddoc-map — lib/docs/repo-docs.ts + SSOT markdownbun run docs:map:checkscript-gate — scripts/pre-commit-harness.ts · named bun runproof — PROOF.md · FRESH-RERUN.md
Ratchet → lib/harness/proof.ts evidence + freshRerun · bun run harness:status
CI — .github/workflows/ · scripts/ci-*.tsbun run ci:core · required Harness Gates checkscript-gate)lint)--max-warnings 0 + error rulesscript-gate)affected-workspaces · tsconfig.check.jsonproof)proof:install / install:verifyscript-gate)assertStagedMatchesWorktreescript-gate)lint:bun-native:changed · HARNESS_FULL_LINTCI)ci:core · setup-factory-bun · path filtersdoc-map)docs/ · doc-map-checkdoc-map)lib/profile.md · JIT READMEsproof)FRESH-RERUN.md · PR paste of claim freshRerun · bun test tests/harness-fresh-rerun-contract.test.tstype)tsconfig.check.json include lib/docs/**/* · claim lib-docs-typecheck · bun run type-checktype)tsconfig.check.json include lib/utils/**/* · claim lib-utils-typecheck · bun run type-checktype)tsconfig.check.json include lib/core/**/* · claim lib-core-typecheck · bun run type-checktype)tsconfig.check.json include lib/security/**/* · claim lib-security-typecheck · bun run type-checkproof)spine/tenants.ts ≥2 · claim spine-multi-tenant · bun run spine:schedule:once -- --tenant=install-verifyproof)lib/harness/maintenance.ts · docs/harness/tenants/ · claim spine-maintenance-runbooks · bun run test:tenant-runbookstype)bun run check:path-bun covers lib/** + tools/** · claim path-bungit status (script-gate)reports/ · hygiene harness-regenerable-staged · bun run cleanscript-gate)/scratch/** · allowlist README.md + bun-v1.3.9-examples/** (session dumps / toc-ops / audit helpers stay local)script-gate).cache/eslint-bun-nativeops)ci:core + type-check scripts prove merge; admin-merge until billing unlocks runners (AUTHORITY.md)harness:status (ops)--show-actions-noise to unmute · local ci:core remains merge proof (README.md · AUTHORITY.md)proof) — closedlib/factory/object-store.ts createS3RegistryStore · memory store in tests · edge R2 binding (factory-registry-pages-proxy-v1)lint / proof)lib/factory/ (CLI) · claim factory-registry-pages-proxy-v1doc-map)https://bun.com/docs/... from bun tools/bun-doc-refs.ts url|suggest (canonical map)functions/ unexpected-root-dir (script-gate)ALLOWED_ROOT_DIRS includes functions · bun run hygieneops).gitmodules + ALLOWED_ROOT_DIRS includes Kalshi-bot · keep Jekyll exclude in _config.yml*.js gitignored (script-gate).gitignore !public/portal/**/*.jsdoc-map)doc-map)help / packages:list; regenerate on demandFull prose lessons: git show 4bd1e324:docs/harness/FEEDBACK.md (pre-compression).