repo-harness 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/AGENTS.md +11 -3
  2. package/CLAUDE.md +11 -3
  3. package/README.es.md +16 -604
  4. package/README.fr.md +16 -601
  5. package/README.ja.md +16 -600
  6. package/README.md +62 -133
  7. package/README.zh-CN.md +16 -542
  8. package/SKILL.md +0 -1
  9. package/agents/engineers/profiles/verification-evals-checks.json +0 -1
  10. package/agents/engineers/profiles/workflow-engine-contract-assets.json +0 -1
  11. package/agents/engineers/sops/verification-evals-checks.md +1 -1
  12. package/agents/engineers/sops/workflow-engine-contract-assets.md +1 -1
  13. package/agents/fleet/gatekeeper.md +3 -1
  14. package/assets/reference-configs/agentic-development-flow.md +33 -2
  15. package/assets/reference-configs/external-tooling.md +37 -28
  16. package/assets/reference-configs/global-working-rules.md +1 -0
  17. package/assets/reference-configs/harness-overview.md +12 -19
  18. package/assets/reference-configs/heartbeat-triage.md +2 -0
  19. package/assets/reference-configs/hook-operations.md +20 -5
  20. package/assets/reference-configs/issue-pipeline.md +61 -0
  21. package/assets/reference-configs/release-deploy.md +4 -4
  22. package/assets/reference-configs/sprint-contracts.md +25 -1
  23. package/assets/skill-commands/manifest.json +1 -1
  24. package/assets/skill-commands/repo-harness-architecture/references/worker.md +1 -1
  25. package/assets/skill-commands/repo-harness-check/SKILL.md +3 -0
  26. package/assets/skill-commands/repo-harness-check/references/architecture-evidence.md +1 -1
  27. package/assets/skill-commands/repo-harness-check/references/review-comment-triage.md +65 -0
  28. package/assets/skill-version.json +2 -2
  29. package/assets/skills/repo-harness-cross-review/references/generic-review.md +4 -2
  30. package/assets/skills/repo-harness-product/SKILL.md +12 -3
  31. package/assets/skills/repo-harness-product/references/goal.md +57 -32
  32. package/assets/skills/repo-harness-product/references/prd.md +7 -4
  33. package/assets/skills/repo-harness-product/references/sprint.md +31 -47
  34. package/assets/skills/repo-harness-test/references/authoring.md +3 -3
  35. package/assets/skills/repo-harness-test/references/running.md +9 -9
  36. package/assets/templates/helpers/capability-resolver.ts +88 -332
  37. package/assets/templates/runtime.gitignore +1 -0
  38. package/assets/workflow-contract.v1.json +5 -11
  39. package/dist/hook-entry.js +4477 -7202
  40. package/dist/operator-ui/assets/ArchitectureWorkspace-DYg_H3WQ.js +1 -0
  41. package/dist/operator-ui/assets/{index-jrycyCyb.js → index-aOt5ob6i.js} +1 -1
  42. package/dist/operator-ui/index.html +1 -1
  43. package/package.json +6 -8
  44. package/references/pm-boundary.md +33 -59
  45. package/scripts/capability-resolver.ts +21 -84
  46. package/scripts/check-ci.sh +7 -4
  47. package/scripts/check-state-boundaries.ts +0 -3
  48. package/scripts/check-tarball-install-smoke.sh +6 -7
  49. package/scripts/ci-edge-audit.ts +54 -15
  50. package/scripts/ci-path-consumers.ts +91 -16
  51. package/scripts/codex-handoff-resume.sh +2 -3
  52. package/scripts/contract-worktree.sh +1 -1
  53. package/scripts/decision-trail.ts +157 -0
  54. package/scripts/init-project.sh +4 -3
  55. package/scripts/lib/path-values.ts +57 -8
  56. package/scripts/lib/project-init-lib.sh +15 -106
  57. package/scripts/recovery-view-cli.ts +1 -2
  58. package/scripts/replay-ci-coverage.ts +63 -23
  59. package/scripts/run-skill-evals.ts +1 -1
  60. package/scripts/select-ci-coverage.ts +26 -9
  61. package/scripts/select-test-suite.ts +1 -1
  62. package/scripts/sprint-backlog.sh +21 -907
  63. package/scripts/sync-helper-sources.ts +5 -46
  64. package/scripts/test-file-durations.json +1 -39
  65. package/scripts/workflow-contract.ts +1 -1
  66. package/src/cli/commands/brain.ts +165 -2
  67. package/src/cli/commands/capability-context.ts +36 -30
  68. package/src/cli/commands/catch-up.ts +45 -0
  69. package/src/cli/commands/doctor.ts +4 -3
  70. package/src/cli/commands/fleet.ts +0 -86
  71. package/src/cli/commands/mcp.ts +2 -13
  72. package/src/cli/commands/run.ts +14 -5
  73. package/src/cli/commands/sprint.ts +6 -150
  74. package/src/cli/hook/board-slice-context.ts +1 -5
  75. package/src/cli/hook/handler-contract.ts +2 -0
  76. package/src/cli/hook/handler-registry.ts +5 -10
  77. package/src/cli/hook/hook-protocol.ts +8 -4
  78. package/src/cli/hook/mutation-guard.ts +15 -11
  79. package/src/cli/hook/return-channel.ts +24 -7
  80. package/src/cli/hook/route-registry.ts +3 -5
  81. package/src/cli/hook/runtime.ts +1 -0
  82. package/src/cli/hook/session-context-budget.ts +2 -0
  83. package/src/cli/hook/session-context.ts +8 -10
  84. package/src/cli/hook/standing-orders-context.ts +38 -0
  85. package/src/cli/hook/stop-handler.ts +13 -10
  86. package/src/cli/hook/subagent-context.ts +4 -13
  87. package/src/cli/index.ts +2 -14
  88. package/src/cli/installer/install-profile.ts +1 -1
  89. package/src/cli/mcp/auth.ts +0 -6
  90. package/src/cli/mcp/fleet-tools.ts +4 -88
  91. package/src/cli/mcp/instructions.ts +1 -9
  92. package/src/cli/mcp/oauth.ts +3 -22
  93. package/src/cli/mcp/policy.ts +2 -16
  94. package/src/cli/mcp/server.ts +4 -25
  95. package/src/cli/mcp/setup.ts +10 -17
  96. package/src/cli/mcp/state-tools.ts +0 -10
  97. package/src/cli/mcp/tools.ts +1 -11
  98. package/src/cli/mcp/transports/http.ts +15 -58
  99. package/src/cli/mcp/transports/stdio.ts +0 -5
  100. package/src/cli/mcp/types.ts +1 -1
  101. package/src/core/adoption/standard-plan.ts +8 -3
  102. package/src/core/architecture/module-view.ts +3 -15
  103. package/src/core/architecture/projection.ts +54 -1
  104. package/src/core/capabilities/registry.ts +66 -249
  105. package/src/core/dev-activity/brief.ts +95 -0
  106. package/src/core/dev-activity/decode.ts +5 -5
  107. package/src/core/dev-activity/projection.ts +3 -17
  108. package/src/core/dev-activity/types.ts +3 -6
  109. package/src/core/engineers/agent-runtime-effect.ts +5 -22
  110. package/src/core/engineers/engineering-overlay.ts +8 -32
  111. package/src/core/engineers/principal-claim.ts +1 -123
  112. package/src/core/engineers/profile-binding.ts +4 -9
  113. package/src/core/engineers/scheduling.ts +0 -24
  114. package/src/core/evidence/checkpoint.ts +100 -3
  115. package/src/core/fleet/task-offer.ts +0 -28
  116. package/src/core/fleet/task-reply.ts +0 -21
  117. package/src/core/operator/architecture.ts +6 -6
  118. package/src/core/operator/organization-snapshot.ts +8 -12
  119. package/src/core/operator/repository-snapshot.ts +0 -2
  120. package/src/core/state/coordination-identity.ts +2 -103
  121. package/src/core/state/project-board.ts +4 -24
  122. package/src/core/state/project-continuation-envelope.ts +6 -115
  123. package/src/core/state/project-effective-state.ts +3 -183
  124. package/src/core/state/project-state-snapshot.ts +2 -1
  125. package/src/core/state/types.ts +5 -44
  126. package/src/core/upgrade/legacy-inventory.ts +3 -3
  127. package/src/effects/architecture/archctx-provider.ts +120 -54
  128. package/src/effects/architecture/model-reader.ts +75 -120
  129. package/src/effects/capabilities/archcontext-owners.ts +45 -5
  130. package/src/effects/dev-activity/collector.ts +4 -52
  131. package/src/effects/engineers/agent-runtime-effect-store.ts +4 -34
  132. package/src/effects/engineers/binding-store.ts +3 -390
  133. package/src/effects/engineers/claim-actor-store.ts +2 -78
  134. package/src/effects/engineers/dependency-authority.ts +5 -6
  135. package/src/effects/engineers/engineering-overlay.ts +6 -21
  136. package/src/effects/engineers/profile-store.ts +11 -23
  137. package/src/effects/engineers/scheduling.ts +6 -223
  138. package/src/effects/evidence/checkpoint-store.ts +34 -15
  139. package/src/effects/evidence/recovery-materializer.ts +19 -1
  140. package/src/effects/fleet/acquire.ts +7 -787
  141. package/src/effects/fleet/task-inbox.ts +46 -378
  142. package/src/effects/locking/exclusive-directory-lock.ts +0 -20
  143. package/src/effects/operator/docs-graph.ts +33 -18
  144. package/src/effects/operator/repository-snapshot-worker.ts +0 -4
  145. package/src/effects/operator/repository-snapshot.ts +6 -15
  146. package/src/effects/operator/server.ts +9 -15
  147. package/src/effects/process-group-launcher.ts +7 -1
  148. package/src/effects/refactor/recommendations.ts +1 -1
  149. package/src/effects/review/diff-fingerprint.ts +1 -1
  150. package/src/effects/state/coordination-claim-token.ts +3 -205
  151. package/src/effects/state/coordination-lease-store.ts +3 -51
  152. package/src/effects/state/coordination-sprint.ts +4 -399
  153. package/src/effects/state/coordination-worktree-topology.ts +1 -8
  154. package/src/effects/state/owed-capabilities.ts +9 -0
  155. package/src/effects/state/resolve-continuation-envelope.ts +0 -8
  156. package/src/effects/state/resolve-effective-state.ts +40 -231
  157. package/src/operator-web/App.tsx +10 -19
  158. package/src/operator-web/Board.tsx +1 -2
  159. package/src/operator-web/ModuleGraph.tsx +5 -5
  160. package/src/operator-web/OrganizationSummary.tsx +0 -34
  161. package/src/operator-web/RepositoryWorkspace.tsx +1 -4
  162. package/src/operator-web/dev-activity.ts +0 -1
  163. package/src/operator-web/fixture.ts +1 -13
  164. package/src/operator-web/fixtures/dev-activity.ts +2 -5
  165. package/src/operator-web/fleet-api.ts +3 -7
  166. package/src/operator-web/i18n.ts +0 -32
  167. package/src/operator-web/types.ts +2 -7
  168. package/assets/hermes/README.md +0 -88
  169. package/assets/hermes/repo-harness-pm/__init__.py +0 -81
  170. package/assets/hermes/repo-harness-pm/plugin.yaml +0 -9
  171. package/assets/hermes/setup.py +0 -154
  172. package/assets/hermes/test_adapter.py +0 -63
  173. package/assets/hermes/verify.py +0 -116
  174. package/assets/initializer-question-pack.v4.json +0 -556
  175. package/assets/initializer-question-pack.v4.schema.json +0 -169
  176. package/assets/partials/01-header.partial.md +0 -10
  177. package/assets/partials/02-iron-rules.partial.md +0 -30
  178. package/assets/partials/03-philosophy.partial.md +0 -53
  179. package/assets/partials/04-project-structure.partial.md +0 -56
  180. package/assets/partials/05-workflow.partial.md +0 -79
  181. package/assets/partials/06-cloudflare.partial.md +0 -20
  182. package/assets/partials/07-footer.partial.md +0 -38
  183. package/assets/partials/08-orchestration.partial.md +0 -54
  184. package/assets/partials/09-compact-instructions.partial.md +0 -11
  185. package/assets/partials/_assembly-order.md +0 -40
  186. package/assets/partials-agents/01-header.partial.md +0 -8
  187. package/assets/partials-agents/02-operating-mode.partial.md +0 -43
  188. package/assets/partials-agents/03-orchestration.partial.md +0 -47
  189. package/assets/partials-agents/04-task-protocol.partial.md +0 -67
  190. package/assets/partials-agents/05-coding-constraints.partial.md +0 -20
  191. package/assets/partials-agents/06-quality-safety.partial.md +0 -24
  192. package/assets/partials-agents/07-cloudflare.partial.md +0 -9
  193. package/assets/partials-agents/08-deep-docs.partial.md +0 -32
  194. package/assets/templates/helpers/acceptance-receipt.ts +0 -1994
  195. package/assets/templates/helpers/archive-workflow.sh +0 -938
  196. package/assets/templates/helpers/capability-config.ts +0 -367
  197. package/assets/templates/helpers/capture-plan.sh +0 -29
  198. package/assets/templates/helpers/change-assessment.ts +0 -241
  199. package/assets/templates/helpers/check-agent-tooling.sh +0 -2159
  200. package/assets/templates/helpers/check-brain-manifest.sh +0 -244
  201. package/assets/templates/helpers/check-context-files.sh +0 -50
  202. package/assets/templates/helpers/check-deploy-sql-order.sh +0 -393
  203. package/assets/templates/helpers/check-skill-version.ts +0 -185
  204. package/assets/templates/helpers/check-task-sync.sh +0 -24
  205. package/assets/templates/helpers/check-task-workflow.sh +0 -25
  206. package/assets/templates/helpers/classify-historical-plans.ts +0 -254
  207. package/assets/templates/helpers/codex-handoff-resume.sh +0 -66
  208. package/assets/templates/helpers/contract-run.ts +0 -1010
  209. package/assets/templates/helpers/contract-worktree-runtime.ts +0 -118
  210. package/assets/templates/helpers/contract-worktree.sh +0 -2142
  211. package/assets/templates/helpers/cutover-closure.ts +0 -196
  212. package/assets/templates/helpers/ensure-task-workflow.sh +0 -11
  213. package/assets/templates/helpers/evidence-gc.ts +0 -283
  214. package/assets/templates/helpers/factor-lab-check.sh +0 -77
  215. package/assets/templates/helpers/factor-lab-new.sh +0 -100
  216. package/assets/templates/helpers/factor-lab-promote.sh +0 -90
  217. package/assets/templates/helpers/factor-lab-reject.sh +0 -72
  218. package/assets/templates/helpers/harness-trace-grade.sh +0 -153
  219. package/assets/templates/helpers/heartbeat-triage.sh +0 -337
  220. package/assets/templates/helpers/inspect-project-state.ts +0 -290
  221. package/assets/templates/helpers/install-agent-fleet.sh +0 -370
  222. package/assets/templates/helpers/maintenance-triage.sh +0 -167
  223. package/assets/templates/helpers/merge-gate.ts +0 -306
  224. package/assets/templates/helpers/migrate-verification-plan.ts +0 -221
  225. package/assets/templates/helpers/new-plan.sh +0 -192
  226. package/assets/templates/helpers/new-spec.sh +0 -50
  227. package/assets/templates/helpers/new-sprint.sh +0 -50
  228. package/assets/templates/helpers/plan-to-todo.sh +0 -17
  229. package/assets/templates/helpers/prepare-codex-handoff.sh +0 -58
  230. package/assets/templates/helpers/prepare-handoff.sh +0 -57
  231. package/assets/templates/helpers/recovery-view-cli.ts +0 -121
  232. package/assets/templates/helpers/refresh-current-status.sh +0 -548
  233. package/assets/templates/helpers/run-bounded-verifier-command.ts +0 -243
  234. package/assets/templates/helpers/runtime-evidence-receipt.ts +0 -60
  235. package/assets/templates/helpers/select-agent-context-blocks.sh +0 -141
  236. package/assets/templates/helpers/ship-worktrees.sh +0 -1448
  237. package/assets/templates/helpers/sprint-backlog.sh +0 -1238
  238. package/assets/templates/helpers/summarize-failures.sh +0 -93
  239. package/assets/templates/helpers/switch-plan.sh +0 -150
  240. package/assets/templates/helpers/sync-brain-docs.sh +0 -381
  241. package/assets/templates/helpers/validate-harness-profile-benchmark.ts +0 -39
  242. package/assets/templates/helpers/verification-plan.ts +0 -99
  243. package/assets/templates/helpers/verify-contract.sh +0 -40
  244. package/assets/templates/helpers/verify-sprint.sh +0 -40
  245. package/assets/templates/helpers/workflow-contract.ts +0 -304
  246. package/assets/templates/helpers/workstream-sync.sh +0 -300
  247. package/assets/templates/helpers/worktree-merge-lib.sh +0 -106
  248. package/dist/operator-ui/assets/ArchitectureWorkspace-CR9FiYz3.js +0 -1
  249. package/references/dot-pm-control.md +0 -140
  250. package/references/pm-operations.md +0 -131
  251. package/scripts/assemble-template.ts +0 -1146
  252. package/scripts/check-brain-manifest.sh +0 -244
  253. package/scripts/contract-run.ts +0 -1010
  254. package/scripts/initializer-question-pack.ts +0 -177
  255. package/scripts/me2b-runtime-admission-canary.ts +0 -376
  256. package/scripts/new-sprint.sh +0 -50
  257. package/scripts/sync-brain-docs.sh +0 -381
  258. package/src/cli/commands/delegation.ts +0 -228
  259. package/src/cli/commands/engineer.ts +0 -831
  260. package/src/cli/commands/interface-change.ts +0 -139
  261. package/src/cli/commands/pm.ts +0 -35
  262. package/src/cli/commands/verified-context.ts +0 -141
  263. package/src/cli/hook/task-inbox-handler.ts +0 -96
  264. package/src/cli/mcp/engineer-tools.ts +0 -789
  265. package/src/cli/mcp/pm-server.ts +0 -168
  266. package/src/core/engineers/delegation.ts +0 -755
  267. package/src/core/engineers/interface-change.ts +0 -578
  268. package/src/core/engineers/module-message.ts +0 -522
  269. package/src/core/engineers/task-freeze.ts +0 -235
  270. package/src/core/engineers/verified-context.ts +0 -722
  271. package/src/core/engineers/work-demand.ts +0 -393
  272. package/src/core/operator/decision-inventory.ts +0 -96
  273. package/src/core/pm/protocol.ts +0 -96
  274. package/src/core/state/sprint-schema-migration.ts +0 -249
  275. package/src/core/workflow/artifact-requirement-policy.ts +0 -182
  276. package/src/core/workflow/operation-readiness.ts +0 -289
  277. package/src/effects/engineers/acquire.ts +0 -222
  278. package/src/effects/engineers/bound-task-rotation.ts +0 -30
  279. package/src/effects/engineers/delegated-run-store.ts +0 -996
  280. package/src/effects/engineers/interface-change-store.ts +0 -487
  281. package/src/effects/engineers/module-inbox.ts +0 -770
  282. package/src/effects/engineers/principal-store.ts +0 -170
  283. package/src/effects/engineers/principal.ts +0 -76
  284. package/src/effects/engineers/scheduling-acquire-next.ts +0 -506
  285. package/src/effects/engineers/scheduling-acquire.ts +0 -181
  286. package/src/effects/engineers/task-freeze-store.ts +0 -429
  287. package/src/effects/engineers/task-inbox.ts +0 -65
  288. package/src/effects/engineers/verified-context-store.ts +0 -580
  289. package/src/effects/engineers/work-demand-materialization.ts +0 -62
  290. package/src/effects/engineers/work-demand-store.ts +0 -114
  291. package/src/effects/pm/host.ts +0 -48
  292. package/src/effects/pm/operations.ts +0 -209
  293. package/src/effects/state/sprint-schema-migration.ts +0 -469
package/AGENTS.md CHANGED
@@ -6,21 +6,20 @@
6
6
  - Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome.
7
7
  - Read `tasks/lessons.md` at session start and apply its active lessons. Current repo state and evidence override a lesson.
8
8
  - Finish the main task first. Fix a small problem found on the way directly. For a large problem, open a GitHub issue before you work on it.
9
- - Write output text (docs, PR descriptions, commit messages, reports) in ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, approved-dictionary words; write Chinese output the same way, with short sentences and one idea per sentence.
10
9
  - Ordinary tasks use the PR description: goal, scope, changes, verification, risk and rollback. No mandatory plan/contract/review/notes chain; notes are only for non-obvious decisions.
11
10
  - Keep four hard boundaries: main publication, deletion, credentials/permissions, and release/production operations.
12
11
  - Only when the current task explicitly authorizes main publication may a model squash-merge after automated checks pass and GitHub has no outstanding change requests or unresolved review threads; an explicit no-merge instruction always wins. Push/tag still require task authorization; credentials/permissions, other deletion and release/production retain their separate approval boundaries. Record authorized publication, the provider-confirmed merge SHA and parent SHA, `git revert <squash-commit>`, and the daily report. Do not create rollback tags.
13
12
  - Default worktrees are at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`). Commit or push before a reboot or a tmp cleanup.
14
13
  - Closeout and sweep remove only merged, clean and unowned worktrees. To keep one, give it an unmerged commit, keep it dirty, or mark or lease it. Details: [agentic-development-flow](docs/reference-configs/agentic-development-flow.md).
15
14
  - Automatically delete only merged, clean worktrees/branches; ask the user for every other deletion. Credentials/permissions (including confirmation bypass) and release/production operations require user approval.
16
- - Use gatekeeper/cross-model review for large changes, security/permissions, or unresolved model uncertainty; ordinary steps record diagnostics without approval loops.
15
+ - Select independent review by the diff's [Review by risk](docs/reference-configs/agentic-development-flow.md#review-by-risk) tier: none for low, one fresh-context review for medium, gatekeeper plus cross-model review for high; ordinary steps record diagnostics without approval loops.
17
16
  - When you delegate, investigate first, then split work by write ownership. Give each parallel writer its own worktree from a clean source. Implementation sub-agents edit only their scope. They do not run build, typecheck or tests. They commit early in their own worktree and return early. In a shared checkout they do not commit; the parent commits. Evidence roles run the named check that is their task and do not commit. The parent agent owns task management, conflict resolution, build, typecheck, tests and integration. After integration, the parent removes each sub-agent worktree and branch whose commits are in the task branch and whose checkout is clean. It also removes the intermediate build output and temporary files that the work created. Other deletion still needs the user.
18
17
  - Model division and cross-model dispatch/review follow [Herdr Dispatch](docs/reference-configs/herdr-notify.md#herdr-dispatch).
19
18
  - GitHub operations (PRs, reviews, merges, labels, releases, comments) go only through the gh/git CLI or the GitHub API. Never use simulated browser clicks on github.com: the account can be banned.
20
19
  - When one PR changes both test assertions and implementation code, run one read-only review focused on tests bent to fit a bug (on-demand, not a restored gate; dispatch per the herdr guide).
21
20
  - `.archcontext/model/` owns architecture boundaries; read `docs/architecture/` on demand and update only real responsibility changes. Architecture diagnostics do not block work or author nested agent instructions.
22
21
  - When a branch changes a capability's responsibility, entrypoints, relations or flows, run `repo-harness architecture-projection check --json` before review and follow `repo-harness-architecture` (`assets/skill-commands/repo-harness-architecture/references/worker.md`).
23
- - Preserve `agents/fleet/`, release checklists and downstream `assets/templates` / `assets/partials*`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract.
22
+ - Preserve `agents/fleet/`, release checklists and downstream `assets/templates`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract.
24
23
  - `_ops/` is ignored private operations state: never commit or agent-edit it. `_ref/` is an ignored reference cache; cite influential revisions. Follow deploy SQL policy, otherwise use ascending 4-digit files under `deploy/sql/`.
25
24
 
26
25
  ## GitHub Issue Claims
@@ -65,6 +64,15 @@
65
64
  - On resume, verify the live checkout and source artifacts before reusing a result; `tasks/current.md` is an optional local read model.
66
65
  - Preserve dirty work and other workers' edits; hand back an ownership conflict instead of discarding their changes.
67
66
 
67
+ ## Writing
68
+ - Write output text (docs, PR descriptions, commit messages, reports, research notes) in ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, approved-dictionary words. Write Chinese output the same way.
69
+ - Prefer high information density: evidence first, mechanisms and business effect explained, complex reasoning allowed, no explanatory repetition. Lead with the main finding, key number or key mechanism. State known facts and supported conclusions directly, without lead-ins such as "note that", "this shows to some extent" or "it must be stressed". Put the evidence grade in the wording, not in a separate caveat.
70
+ - Give time, subject, action, size and source in one sentence. Keep only the qualifiers that change the fact, the statistics or the inference. Keep text that explains a cause or mechanism, separates confounded causes, or builds a new classification.
71
+ - Delete: comments on your own process or work; a second explanation of a fact that already states its source, scope and meaning; "do not read this as" warnings; repeated disclaimers; step-by-step tutorials and hypothetical teaching examples; prose that repeats a comparison table; repeated summaries and claims about the importance of the result.
72
+ - A conclusion must add a cause, mechanism, constraint, testable prediction or business effect. A restatement of earlier facts is not a conclusion.
73
+ - Prefer real companies, products, contracts, prices and user behavior as examples. Use a table for multi-object or multi-metric comparison. Split sections by question; drop introductions, transitions and summaries that exist only for completeness.
74
+ - Paragraph deletion test: if removing a paragraph leaves the reader's understanding of facts, numbers, mechanism, cause, conditions and conclusion unchanged, remove it. Check first the paragraphs that start with "this shows", "note that", "therefore", "however" or "it must be stressed".
75
+
68
76
  ## Codex
69
77
  - Own backend implementation and testing; Claude owns frontend implementation and interaction, and the parent coordinates scope and integration.
70
78
  - User-level `~/.codex/hooks.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `repo-harness run <helper>`.
package/CLAUDE.md CHANGED
@@ -6,21 +6,20 @@
6
6
  - Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome.
7
7
  - Read `tasks/lessons.md` at session start and apply its active lessons. Current repo state and evidence override a lesson.
8
8
  - Finish the main task first. Fix a small problem found on the way directly. For a large problem, open a GitHub issue before you work on it.
9
- - Write output text (docs, PR descriptions, commit messages, reports) in ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, approved-dictionary words; write Chinese output the same way, with short sentences and one idea per sentence.
10
9
  - Ordinary tasks use the PR description: goal, scope, changes, verification, risk and rollback. No mandatory plan/contract/review/notes chain; notes are only for non-obvious decisions.
11
10
  - Keep four hard boundaries: main publication, deletion, credentials/permissions, and release/production operations.
12
11
  - Only when the current task explicitly authorizes main publication may a model squash-merge after automated checks pass and GitHub has no outstanding change requests or unresolved review threads; an explicit no-merge instruction always wins. Push/tag still require task authorization; credentials/permissions, other deletion and release/production retain their separate approval boundaries. Record authorized publication, the provider-confirmed merge SHA and parent SHA, `git revert <squash-commit>`, and the daily report. Do not create rollback tags.
13
12
  - Default worktrees are at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`). Commit or push before a reboot or a tmp cleanup.
14
13
  - Closeout and sweep remove only merged, clean and unowned worktrees. To keep one, give it an unmerged commit, keep it dirty, or mark or lease it. Details: [agentic-development-flow](docs/reference-configs/agentic-development-flow.md).
15
14
  - Automatically delete only merged, clean worktrees/branches; ask the user for every other deletion. Credentials/permissions (including confirmation bypass) and release/production operations require user approval.
16
- - Use gatekeeper/cross-model review for large changes, security/permissions, or unresolved model uncertainty; ordinary steps record diagnostics without approval loops.
15
+ - Select independent review by the diff's [Review by risk](docs/reference-configs/agentic-development-flow.md#review-by-risk) tier: none for low, one fresh-context review for medium, gatekeeper plus cross-model review for high; ordinary steps record diagnostics without approval loops.
17
16
  - When you delegate, investigate first, then split work by write ownership. Give each parallel writer its own worktree from a clean source. Implementation sub-agents edit only their scope. They do not run build, typecheck or tests. They commit early in their own worktree and return early. In a shared checkout they do not commit; the parent commits. Evidence roles run the named check that is their task and do not commit. The parent agent owns task management, conflict resolution, build, typecheck, tests and integration. After integration, the parent removes each sub-agent worktree and branch whose commits are in the task branch and whose checkout is clean. It also removes the intermediate build output and temporary files that the work created. Other deletion still needs the user.
18
17
  - Model division and cross-model dispatch/review follow [Herdr Dispatch](docs/reference-configs/herdr-notify.md#herdr-dispatch).
19
18
  - GitHub operations (PRs, reviews, merges, labels, releases, comments) go only through the gh/git CLI or the GitHub API. Never use simulated browser clicks on github.com: the account can be banned.
20
19
  - When one PR changes both test assertions and implementation code, run one read-only review focused on tests bent to fit a bug (on-demand, not a restored gate; dispatch per the herdr guide).
21
20
  - `.archcontext/model/` owns architecture boundaries; read `docs/architecture/` on demand and update only real responsibility changes. Architecture diagnostics do not block work or author nested agent instructions.
22
21
  - When a branch changes a capability's responsibility, entrypoints, relations or flows, run `repo-harness architecture-projection check --json` before review and follow `repo-harness-architecture` (`assets/skill-commands/repo-harness-architecture/references/worker.md`).
23
- - Preserve `agents/fleet/`, release checklists and downstream `assets/templates` / `assets/partials*`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract.
22
+ - Preserve `agents/fleet/`, release checklists and downstream `assets/templates`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract.
24
23
  - `_ops/` is ignored private operations state: never commit or agent-edit it. `_ref/` is an ignored reference cache; cite influential revisions. Follow deploy SQL policy, otherwise use ascending 4-digit files under `deploy/sql/`.
25
24
 
26
25
  ## GitHub Issue Claims
@@ -65,6 +64,15 @@
65
64
  - On resume, verify the live checkout and source artifacts before reusing a result; `tasks/current.md` is an optional local read model.
66
65
  - Preserve dirty work and other workers' edits; hand back an ownership conflict instead of discarding their changes.
67
66
 
67
+ ## Writing
68
+ - Write output text (docs, PR descriptions, commit messages, reports, research notes) in ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, approved-dictionary words. Write Chinese output the same way.
69
+ - Prefer high information density: evidence first, mechanisms and business effect explained, complex reasoning allowed, no explanatory repetition. Lead with the main finding, key number or key mechanism. State known facts and supported conclusions directly, without lead-ins such as "note that", "this shows to some extent" or "it must be stressed". Put the evidence grade in the wording, not in a separate caveat.
70
+ - Give time, subject, action, size and source in one sentence. Keep only the qualifiers that change the fact, the statistics or the inference. Keep text that explains a cause or mechanism, separates confounded causes, or builds a new classification.
71
+ - Delete: comments on your own process or work; a second explanation of a fact that already states its source, scope and meaning; "do not read this as" warnings; repeated disclaimers; step-by-step tutorials and hypothetical teaching examples; prose that repeats a comparison table; repeated summaries and claims about the importance of the result.
72
+ - A conclusion must add a cause, mechanism, constraint, testable prediction or business effect. A restatement of earlier facts is not a conclusion.
73
+ - Prefer real companies, products, contracts, prices and user behavior as examples. Use a table for multi-object or multi-metric comparison. Split sections by question; drop introductions, transitions and summaries that exist only for completeness.
74
+ - Paragraph deletion test: if removing a paragraph leaves the reader's understanding of facts, numbers, mechanism, cause, conditions and conclusion unchanged, remove it. Check first the paragraphs that start with "this shows", "note that", "therefore", "however" or "it must be stressed".
75
+
68
76
  ## Claude Code
69
77
  - Own frontend implementation and interaction; Codex owns backend implementation and testing, and the parent coordinates scope and integration.
70
78
  - Use Claude Code's available tools within granted permissions; changes to tool grants, hooks or confirmation bypass require approval of the exact change.