@bonesofspring/ai-rules 0.2.77 → 0.2.78

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 (665) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/bin/lib/engine-scripts.js +3 -0
  4. package/docs/LOCAL-OVERLAY.md +4 -4
  5. package/docs/PRESET-CONTRIBUTION.md +9 -8
  6. package/docs/TEAM-DB.md +43 -8
  7. package/package.json +2 -1
  8. package/presets/_shared/ai-local/scripts/aggregate-agent-task-metrics.mjs +23 -0
  9. package/presets/_shared/ai-local/scripts/check-verification.mjs +275 -0
  10. package/presets/_shared/ai-local/scripts/check-write-scope.mjs +72 -18
  11. package/presets/_shared/ai-local/scripts/manifest.mjs +78 -4
  12. package/presets/_shared/ai-local/scripts/rule-improver.mjs +366 -13
  13. package/presets/_shared/ai-local/scripts/run.mjs +29 -6
  14. package/presets/_shared/ai-local/scripts/team-db-project.mjs +208 -3
  15. package/presets/_shared/ai-local/scripts/team-db-schema.mjs +76 -15
  16. package/presets/_shared/ai-local/scripts/team-db.mjs +19 -4
  17. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -4
  18. package/presets/_shared/core/agent-team/task-framing.md +1 -0
  19. package/presets/_shared/core/meta/preset-layering.md +4 -4
  20. package/presets/_shared/core/meta/preset-pr-checklist.md +2 -1
  21. package/presets/_shared/core/meta/preset-twin-sync.md +12 -5
  22. package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -1
  23. package/presets/_shared/core/quality/verification-before-completion.md +28 -4
  24. package/presets/_shared/core/review/code-review-mr.md +1 -0
  25. package/presets/_shared/core/review/receiving-code-review.md +1 -0
  26. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +313 -26
  27. package/presets/claude/android-kotlin/CLAUDE.md +1 -1
  28. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  29. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  30. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  31. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  32. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  33. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +313 -26
  34. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +1 -1
  35. package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +1 -0
  36. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +4 -4
  37. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  38. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +12 -5
  39. package/presets/claude/go/CLAUDE.md +1 -1
  40. package/presets/claude/go/agents/build-verifier.md +1 -1
  41. package/presets/claude/go/agents/code-reviewer.md +1 -1
  42. package/presets/claude/go/agents/debugger.md +1 -1
  43. package/presets/claude/go/agents/feature-developer.md +1 -1
  44. package/presets/claude/go/agents/task-analyst.md +1 -1
  45. package/presets/claude/go/hooks/chain-team-phases.sh +313 -26
  46. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +1 -1
  47. package/presets/claude/go/rules/tooling-and-review/code-review.md +1 -0
  48. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +4 -4
  49. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  50. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +12 -5
  51. package/presets/claude/ios-swift/CLAUDE.md +1 -1
  52. package/presets/claude/ios-swift/agents/build-verifier.md +4 -1
  53. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  54. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  55. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  56. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  57. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +313 -26
  58. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +1 -1
  59. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +1 -0
  60. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +4 -4
  61. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  62. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +12 -5
  63. package/presets/claude/java/CLAUDE.md +1 -1
  64. package/presets/claude/java/agents/build-verifier.md +1 -1
  65. package/presets/claude/java/agents/code-reviewer.md +1 -1
  66. package/presets/claude/java/agents/debugger.md +1 -1
  67. package/presets/claude/java/agents/feature-developer.md +1 -1
  68. package/presets/claude/java/agents/task-analyst.md +1 -1
  69. package/presets/claude/java/hooks/chain-team-phases.sh +313 -26
  70. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +1 -1
  71. package/presets/claude/java/rules/tooling-and-review/code-review.md +1 -0
  72. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +4 -4
  73. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  74. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +12 -5
  75. package/presets/claude/mcp-ts/CLAUDE.md +1 -1
  76. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  77. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  78. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  79. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +313 -26
  80. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +1 -1
  81. package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +1 -0
  82. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +4 -4
  83. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  84. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +12 -5
  85. package/presets/claude/mol/CLAUDE.md +1 -1
  86. package/presets/claude/mol/agents/build-verifier.md +4 -1
  87. package/presets/claude/mol/agents/code-reviewer.md +1 -1
  88. package/presets/claude/mol/agents/debugger.md +1 -1
  89. package/presets/claude/mol/agents/feature-developer.md +1 -1
  90. package/presets/claude/mol/agents/task-analyst.md +1 -1
  91. package/presets/claude/mol/hooks/chain-team-phases.sh +313 -26
  92. package/presets/claude/mol/rules/tooling-and-review/ai-local-overlay.md +1 -1
  93. package/presets/claude/mol/rules/tooling-and-review/code-review-mr.md +1 -0
  94. package/presets/claude/mol/rules/tooling-and-review/preset-layering.md +4 -4
  95. package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  96. package/presets/claude/mol/rules/tooling-and-review/preset-twin-sync.md +12 -5
  97. package/presets/claude/next/CLAUDE.md +1 -1
  98. package/presets/claude/next/agents/build-verifier.md +6 -1
  99. package/presets/claude/next/agents/code-reviewer.md +1 -1
  100. package/presets/claude/next/agents/debugger.md +1 -1
  101. package/presets/claude/next/agents/feature-developer.md +1 -1
  102. package/presets/claude/next/agents/task-analyst.md +1 -1
  103. package/presets/claude/next/hooks/chain-team-phases.sh +313 -26
  104. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +2 -1
  105. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +1 -0
  106. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +4 -4
  107. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  108. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +12 -5
  109. package/presets/claude/nuxt/CLAUDE.md +1 -1
  110. package/presets/claude/nuxt/agents/build-verifier.md +4 -1
  111. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  112. package/presets/claude/nuxt/agents/debugger.md +1 -1
  113. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  114. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  115. package/presets/claude/nuxt/hooks/chain-team-phases.sh +313 -26
  116. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +1 -1
  117. package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +1 -0
  118. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +4 -4
  119. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  120. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +12 -5
  121. package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
  122. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  123. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  124. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  125. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  126. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  127. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +313 -26
  128. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +1 -1
  129. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +1 -0
  130. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +4 -4
  131. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  132. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +12 -5
  133. package/presets/claude/php-laravel/CLAUDE.md +1 -1
  134. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  135. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  136. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  137. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  138. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  139. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +313 -26
  140. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +1 -1
  141. package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +1 -0
  142. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +4 -4
  143. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  144. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +12 -5
  145. package/presets/claude/svelte/CLAUDE.md +1 -1
  146. package/presets/claude/svelte/agents/build-verifier.md +4 -1
  147. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  148. package/presets/claude/svelte/agents/debugger.md +1 -1
  149. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  150. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  151. package/presets/claude/svelte/hooks/chain-team-phases.sh +313 -26
  152. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +1 -1
  153. package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +1 -0
  154. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +4 -4
  155. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  156. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +12 -5
  157. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  158. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  159. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  160. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  161. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  162. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +313 -26
  163. package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +1 -1
  164. package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +1 -0
  165. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +4 -4
  166. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -1
  167. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +12 -5
  168. package/presets/cursor/go/agents/build-verifier.md +1 -1
  169. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  170. package/presets/cursor/go/agents/debugger.md +1 -1
  171. package/presets/cursor/go/agents/feature-developer.md +1 -1
  172. package/presets/cursor/go/agents/task-analyst.md +1 -1
  173. package/presets/cursor/go/hooks/chain-team-phases.sh +313 -26
  174. package/presets/cursor/go/rules/ai-local-overlay.mdc +1 -1
  175. package/presets/cursor/go/rules/code-review-mr.mdc +1 -0
  176. package/presets/cursor/go/rules/preset-layering.mdc +4 -4
  177. package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -1
  178. package/presets/cursor/go/rules/preset-twin-sync.mdc +12 -5
  179. package/presets/cursor/ios-swift/agents/build-verifier.md +4 -1
  180. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  181. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  182. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  183. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  184. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +313 -26
  185. package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +1 -1
  186. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +1 -0
  187. package/presets/cursor/ios-swift/rules/preset-layering.mdc +4 -4
  188. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -1
  189. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +12 -5
  190. package/presets/cursor/java/agents/build-verifier.md +1 -1
  191. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  192. package/presets/cursor/java/agents/debugger.md +1 -1
  193. package/presets/cursor/java/agents/feature-developer.md +1 -1
  194. package/presets/cursor/java/agents/task-analyst.md +1 -1
  195. package/presets/cursor/java/hooks/chain-team-phases.sh +313 -26
  196. package/presets/cursor/java/rules/ai-local-overlay.mdc +1 -1
  197. package/presets/cursor/java/rules/code-review-mr.mdc +1 -0
  198. package/presets/cursor/java/rules/preset-layering.mdc +4 -4
  199. package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -1
  200. package/presets/cursor/java/rules/preset-twin-sync.mdc +12 -5
  201. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  202. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  203. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  204. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +313 -26
  205. package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +1 -1
  206. package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +1 -0
  207. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +4 -4
  208. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -1
  209. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +12 -5
  210. package/presets/cursor/mol/agents/build-verifier.md +4 -1
  211. package/presets/cursor/mol/agents/code-reviewer.md +1 -1
  212. package/presets/cursor/mol/agents/debugger.md +1 -1
  213. package/presets/cursor/mol/agents/feature-developer.md +1 -1
  214. package/presets/cursor/mol/agents/task-analyst.md +1 -1
  215. package/presets/cursor/mol/hooks/chain-team-phases.sh +313 -26
  216. package/presets/cursor/mol/rules/ai-local-overlay.mdc +1 -1
  217. package/presets/cursor/mol/rules/code-review-mr.mdc +1 -0
  218. package/presets/cursor/mol/rules/preset-layering.mdc +4 -4
  219. package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -1
  220. package/presets/cursor/mol/rules/preset-twin-sync.mdc +12 -5
  221. package/presets/cursor/next/agents/build-verifier.md +6 -1
  222. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  223. package/presets/cursor/next/agents/debugger.md +1 -1
  224. package/presets/cursor/next/agents/feature-developer.md +1 -1
  225. package/presets/cursor/next/agents/task-analyst.md +1 -1
  226. package/presets/cursor/next/hooks/chain-team-phases.sh +313 -26
  227. package/presets/cursor/next/rules/ai-local-overlay.mdc +2 -1
  228. package/presets/cursor/next/rules/code-review-mr.mdc +1 -0
  229. package/presets/cursor/next/rules/preset-layering.mdc +4 -4
  230. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -1
  231. package/presets/cursor/next/rules/preset-twin-sync.mdc +12 -5
  232. package/presets/cursor/nuxt/agents/build-verifier.md +4 -1
  233. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  234. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  235. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  236. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  237. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +313 -26
  238. package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +1 -1
  239. package/presets/cursor/nuxt/rules/code-review-mr.mdc +1 -0
  240. package/presets/cursor/nuxt/rules/preset-layering.mdc +4 -4
  241. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -1
  242. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +12 -5
  243. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  244. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  245. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  246. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  247. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  248. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +313 -26
  249. package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +1 -1
  250. package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +1 -0
  251. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +4 -4
  252. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -1
  253. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +12 -5
  254. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  255. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  256. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  257. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  258. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  259. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +313 -26
  260. package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +1 -1
  261. package/presets/cursor/php-laravel/rules/code-review-mr.mdc +1 -0
  262. package/presets/cursor/php-laravel/rules/preset-layering.mdc +4 -4
  263. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -1
  264. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +12 -5
  265. package/presets/cursor/svelte/agents/build-verifier.md +4 -1
  266. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  267. package/presets/cursor/svelte/agents/debugger.md +1 -1
  268. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  269. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  270. package/presets/cursor/svelte/hooks/chain-team-phases.sh +313 -26
  271. package/presets/cursor/svelte/rules/ai-local-overlay.mdc +1 -1
  272. package/presets/cursor/svelte/rules/code-review-mr.mdc +1 -0
  273. package/presets/cursor/svelte/rules/preset-layering.mdc +4 -4
  274. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -1
  275. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +12 -5
  276. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  277. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  278. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  279. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  280. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  281. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  282. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +313 -26
  283. package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +1 -1
  284. package/presets/mavis/android-kotlin/rules/code-review-mr.md +1 -0
  285. package/presets/mavis/android-kotlin/rules/preset-layering.md +4 -4
  286. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -1
  287. package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +12 -5
  288. package/presets/mavis/go/adapter-map.json +1 -1
  289. package/presets/mavis/go/agents/build-verifier.md +1 -1
  290. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  291. package/presets/mavis/go/agents/debugger.md +1 -1
  292. package/presets/mavis/go/agents/feature-developer.md +1 -1
  293. package/presets/mavis/go/agents/task-analyst.md +1 -1
  294. package/presets/mavis/go/hooks/chain-team-phases.sh +313 -26
  295. package/presets/mavis/go/rules/ai-local-overlay.md +1 -1
  296. package/presets/mavis/go/rules/code-review-mr.md +1 -0
  297. package/presets/mavis/go/rules/preset-layering.md +4 -4
  298. package/presets/mavis/go/rules/preset-pr-checklist.md +2 -1
  299. package/presets/mavis/go/rules/preset-twin-sync.md +12 -5
  300. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  301. package/presets/mavis/ios-swift/agents/build-verifier.md +4 -1
  302. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  303. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  304. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  305. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  306. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +313 -26
  307. package/presets/mavis/ios-swift/rules/ai-local-overlay.md +1 -1
  308. package/presets/mavis/ios-swift/rules/code-review-mr.md +1 -0
  309. package/presets/mavis/ios-swift/rules/preset-layering.md +4 -4
  310. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -1
  311. package/presets/mavis/ios-swift/rules/preset-twin-sync.md +12 -5
  312. package/presets/mavis/java/adapter-map.json +1 -1
  313. package/presets/mavis/java/agents/build-verifier.md +1 -1
  314. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  315. package/presets/mavis/java/agents/debugger.md +1 -1
  316. package/presets/mavis/java/agents/feature-developer.md +1 -1
  317. package/presets/mavis/java/agents/task-analyst.md +1 -1
  318. package/presets/mavis/java/hooks/chain-team-phases.sh +313 -26
  319. package/presets/mavis/java/rules/ai-local-overlay.md +1 -1
  320. package/presets/mavis/java/rules/code-review-mr.md +1 -0
  321. package/presets/mavis/java/rules/preset-layering.md +4 -4
  322. package/presets/mavis/java/rules/preset-pr-checklist.md +2 -1
  323. package/presets/mavis/java/rules/preset-twin-sync.md +12 -5
  324. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  325. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  326. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  327. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  328. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +313 -26
  329. package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +1 -1
  330. package/presets/mavis/mcp-ts/rules/code-review-mr.md +1 -0
  331. package/presets/mavis/mcp-ts/rules/preset-layering.md +4 -4
  332. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -1
  333. package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +12 -5
  334. package/presets/mavis/mol/adapter-map.json +1 -1
  335. package/presets/mavis/mol/agents/build-verifier.md +4 -1
  336. package/presets/mavis/mol/agents/code-reviewer.md +1 -1
  337. package/presets/mavis/mol/agents/debugger.md +1 -1
  338. package/presets/mavis/mol/agents/feature-developer.md +1 -1
  339. package/presets/mavis/mol/agents/task-analyst.md +1 -1
  340. package/presets/mavis/mol/hooks/chain-team-phases.sh +313 -26
  341. package/presets/mavis/mol/rules/ai-local-overlay.md +1 -1
  342. package/presets/mavis/mol/rules/code-review-mr.md +1 -0
  343. package/presets/mavis/mol/rules/preset-layering.md +4 -4
  344. package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -1
  345. package/presets/mavis/mol/rules/preset-twin-sync.md +12 -5
  346. package/presets/mavis/next/adapter-map.json +1 -1
  347. package/presets/mavis/next/agents/build-verifier.md +6 -1
  348. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  349. package/presets/mavis/next/agents/debugger.md +1 -1
  350. package/presets/mavis/next/agents/feature-developer.md +1 -1
  351. package/presets/mavis/next/agents/task-analyst.md +1 -1
  352. package/presets/mavis/next/hooks/chain-team-phases.sh +313 -26
  353. package/presets/mavis/next/rules/ai-local-overlay.md +2 -1
  354. package/presets/mavis/next/rules/code-review-mr.md +1 -0
  355. package/presets/mavis/next/rules/preset-layering.md +4 -4
  356. package/presets/mavis/next/rules/preset-pr-checklist.md +2 -1
  357. package/presets/mavis/next/rules/preset-twin-sync.md +12 -5
  358. package/presets/mavis/nuxt/adapter-map.json +1 -1
  359. package/presets/mavis/nuxt/agents/build-verifier.md +4 -1
  360. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  361. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  362. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  363. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  364. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +313 -26
  365. package/presets/mavis/nuxt/rules/ai-local-overlay.md +1 -1
  366. package/presets/mavis/nuxt/rules/code-review-mr.md +1 -0
  367. package/presets/mavis/nuxt/rules/preset-layering.md +4 -4
  368. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -1
  369. package/presets/mavis/nuxt/rules/preset-twin-sync.md +12 -5
  370. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  371. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  372. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  373. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  374. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  375. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  376. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +313 -26
  377. package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +1 -1
  378. package/presets/mavis/php-hexagonal/rules/code-review-mr.md +1 -0
  379. package/presets/mavis/php-hexagonal/rules/preset-layering.md +4 -4
  380. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -1
  381. package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +12 -5
  382. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  383. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  384. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  385. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  386. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  387. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  388. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +313 -26
  389. package/presets/mavis/php-laravel/rules/ai-local-overlay.md +1 -1
  390. package/presets/mavis/php-laravel/rules/code-review-mr.md +1 -0
  391. package/presets/mavis/php-laravel/rules/preset-layering.md +4 -4
  392. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -1
  393. package/presets/mavis/php-laravel/rules/preset-twin-sync.md +12 -5
  394. package/presets/mavis/svelte/adapter-map.json +1 -1
  395. package/presets/mavis/svelte/agents/build-verifier.md +4 -1
  396. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  397. package/presets/mavis/svelte/agents/debugger.md +1 -1
  398. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  399. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  400. package/presets/mavis/svelte/hooks/chain-team-phases.sh +313 -26
  401. package/presets/mavis/svelte/rules/ai-local-overlay.md +1 -1
  402. package/presets/mavis/svelte/rules/code-review-mr.md +1 -0
  403. package/presets/mavis/svelte/rules/preset-layering.md +4 -4
  404. package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -1
  405. package/presets/mavis/svelte/rules/preset-twin-sync.md +12 -5
  406. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  407. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  408. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  409. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  410. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  411. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  412. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +313 -26
  413. package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +1 -1
  414. package/presets/opencode/android-kotlin/rules/code-review-mr.md +1 -0
  415. package/presets/opencode/android-kotlin/rules/preset-layering.md +4 -4
  416. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -1
  417. package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +12 -5
  418. package/presets/opencode/go/adapter-map.json +1 -1
  419. package/presets/opencode/go/agents/build-verifier.md +1 -1
  420. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  421. package/presets/opencode/go/agents/debugger.md +1 -1
  422. package/presets/opencode/go/agents/feature-developer.md +1 -1
  423. package/presets/opencode/go/agents/task-analyst.md +1 -1
  424. package/presets/opencode/go/hooks/chain-team-phases.sh +313 -26
  425. package/presets/opencode/go/rules/ai-local-overlay.md +1 -1
  426. package/presets/opencode/go/rules/code-review-mr.md +1 -0
  427. package/presets/opencode/go/rules/preset-layering.md +4 -4
  428. package/presets/opencode/go/rules/preset-pr-checklist.md +2 -1
  429. package/presets/opencode/go/rules/preset-twin-sync.md +12 -5
  430. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  431. package/presets/opencode/ios-swift/agents/build-verifier.md +4 -1
  432. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  433. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  434. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  435. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  436. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +313 -26
  437. package/presets/opencode/ios-swift/rules/ai-local-overlay.md +1 -1
  438. package/presets/opencode/ios-swift/rules/code-review-mr.md +1 -0
  439. package/presets/opencode/ios-swift/rules/preset-layering.md +4 -4
  440. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -1
  441. package/presets/opencode/ios-swift/rules/preset-twin-sync.md +12 -5
  442. package/presets/opencode/java/adapter-map.json +1 -1
  443. package/presets/opencode/java/agents/build-verifier.md +1 -1
  444. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  445. package/presets/opencode/java/agents/debugger.md +1 -1
  446. package/presets/opencode/java/agents/feature-developer.md +1 -1
  447. package/presets/opencode/java/agents/task-analyst.md +1 -1
  448. package/presets/opencode/java/hooks/chain-team-phases.sh +313 -26
  449. package/presets/opencode/java/rules/ai-local-overlay.md +1 -1
  450. package/presets/opencode/java/rules/code-review-mr.md +1 -0
  451. package/presets/opencode/java/rules/preset-layering.md +4 -4
  452. package/presets/opencode/java/rules/preset-pr-checklist.md +2 -1
  453. package/presets/opencode/java/rules/preset-twin-sync.md +12 -5
  454. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  455. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  456. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  457. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  458. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +313 -26
  459. package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +1 -1
  460. package/presets/opencode/mcp-ts/rules/code-review-mr.md +1 -0
  461. package/presets/opencode/mcp-ts/rules/preset-layering.md +4 -4
  462. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -1
  463. package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +12 -5
  464. package/presets/opencode/mol/adapter-map.json +1 -1
  465. package/presets/opencode/mol/agents/build-verifier.md +4 -1
  466. package/presets/opencode/mol/agents/code-reviewer.md +1 -1
  467. package/presets/opencode/mol/agents/debugger.md +1 -1
  468. package/presets/opencode/mol/agents/feature-developer.md +1 -1
  469. package/presets/opencode/mol/agents/task-analyst.md +1 -1
  470. package/presets/opencode/mol/hooks/chain-team-phases.sh +313 -26
  471. package/presets/opencode/mol/rules/ai-local-overlay.md +1 -1
  472. package/presets/opencode/mol/rules/code-review-mr.md +1 -0
  473. package/presets/opencode/mol/rules/preset-layering.md +4 -4
  474. package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -1
  475. package/presets/opencode/mol/rules/preset-twin-sync.md +12 -5
  476. package/presets/opencode/next/adapter-map.json +1 -1
  477. package/presets/opencode/next/agents/build-verifier.md +6 -1
  478. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  479. package/presets/opencode/next/agents/debugger.md +1 -1
  480. package/presets/opencode/next/agents/feature-developer.md +1 -1
  481. package/presets/opencode/next/agents/task-analyst.md +1 -1
  482. package/presets/opencode/next/hooks/chain-team-phases.sh +313 -26
  483. package/presets/opencode/next/rules/ai-local-overlay.md +2 -1
  484. package/presets/opencode/next/rules/code-review-mr.md +1 -0
  485. package/presets/opencode/next/rules/preset-layering.md +4 -4
  486. package/presets/opencode/next/rules/preset-pr-checklist.md +2 -1
  487. package/presets/opencode/next/rules/preset-twin-sync.md +12 -5
  488. package/presets/opencode/nuxt/adapter-map.json +1 -1
  489. package/presets/opencode/nuxt/agents/build-verifier.md +4 -1
  490. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  491. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  492. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  493. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  494. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +313 -26
  495. package/presets/opencode/nuxt/rules/ai-local-overlay.md +1 -1
  496. package/presets/opencode/nuxt/rules/code-review-mr.md +1 -0
  497. package/presets/opencode/nuxt/rules/preset-layering.md +4 -4
  498. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -1
  499. package/presets/opencode/nuxt/rules/preset-twin-sync.md +12 -5
  500. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  501. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  502. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  503. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  504. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  505. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  506. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +313 -26
  507. package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +1 -1
  508. package/presets/opencode/php-hexagonal/rules/code-review-mr.md +1 -0
  509. package/presets/opencode/php-hexagonal/rules/preset-layering.md +4 -4
  510. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -1
  511. package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +12 -5
  512. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  513. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  514. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  515. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  516. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  517. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  518. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +313 -26
  519. package/presets/opencode/php-laravel/rules/ai-local-overlay.md +1 -1
  520. package/presets/opencode/php-laravel/rules/code-review-mr.md +1 -0
  521. package/presets/opencode/php-laravel/rules/preset-layering.md +4 -4
  522. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -1
  523. package/presets/opencode/php-laravel/rules/preset-twin-sync.md +12 -5
  524. package/presets/opencode/svelte/adapter-map.json +1 -1
  525. package/presets/opencode/svelte/agents/build-verifier.md +4 -1
  526. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  527. package/presets/opencode/svelte/agents/debugger.md +1 -1
  528. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  529. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  530. package/presets/opencode/svelte/hooks/chain-team-phases.sh +313 -26
  531. package/presets/opencode/svelte/rules/ai-local-overlay.md +1 -1
  532. package/presets/opencode/svelte/rules/code-review-mr.md +1 -0
  533. package/presets/opencode/svelte/rules/preset-layering.md +4 -4
  534. package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -1
  535. package/presets/opencode/svelte/rules/preset-twin-sync.md +12 -5
  536. package/presets/zcode/android-kotlin/adapter-map.json +1 -1
  537. package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
  538. package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
  539. package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
  540. package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
  541. package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
  542. package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +313 -26
  543. package/presets/zcode/android-kotlin/rules/ai-local-overlay.md +1 -1
  544. package/presets/zcode/android-kotlin/rules/code-review-mr.md +1 -0
  545. package/presets/zcode/android-kotlin/rules/preset-layering.md +4 -4
  546. package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -1
  547. package/presets/zcode/android-kotlin/rules/preset-twin-sync.md +12 -5
  548. package/presets/zcode/go/adapter-map.json +1 -1
  549. package/presets/zcode/go/agents/build-verifier.md +1 -1
  550. package/presets/zcode/go/agents/code-reviewer.md +1 -1
  551. package/presets/zcode/go/agents/debugger.md +1 -1
  552. package/presets/zcode/go/agents/feature-developer.md +1 -1
  553. package/presets/zcode/go/agents/task-analyst.md +1 -1
  554. package/presets/zcode/go/hooks/chain-team-phases.sh +313 -26
  555. package/presets/zcode/go/rules/ai-local-overlay.md +1 -1
  556. package/presets/zcode/go/rules/code-review-mr.md +1 -0
  557. package/presets/zcode/go/rules/preset-layering.md +4 -4
  558. package/presets/zcode/go/rules/preset-pr-checklist.md +2 -1
  559. package/presets/zcode/go/rules/preset-twin-sync.md +12 -5
  560. package/presets/zcode/ios-swift/adapter-map.json +1 -1
  561. package/presets/zcode/ios-swift/agents/build-verifier.md +4 -1
  562. package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
  563. package/presets/zcode/ios-swift/agents/debugger.md +1 -1
  564. package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
  565. package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
  566. package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +313 -26
  567. package/presets/zcode/ios-swift/rules/ai-local-overlay.md +1 -1
  568. package/presets/zcode/ios-swift/rules/code-review-mr.md +1 -0
  569. package/presets/zcode/ios-swift/rules/preset-layering.md +4 -4
  570. package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -1
  571. package/presets/zcode/ios-swift/rules/preset-twin-sync.md +12 -5
  572. package/presets/zcode/java/adapter-map.json +1 -1
  573. package/presets/zcode/java/agents/build-verifier.md +1 -1
  574. package/presets/zcode/java/agents/code-reviewer.md +1 -1
  575. package/presets/zcode/java/agents/debugger.md +1 -1
  576. package/presets/zcode/java/agents/feature-developer.md +1 -1
  577. package/presets/zcode/java/agents/task-analyst.md +1 -1
  578. package/presets/zcode/java/hooks/chain-team-phases.sh +313 -26
  579. package/presets/zcode/java/rules/ai-local-overlay.md +1 -1
  580. package/presets/zcode/java/rules/code-review-mr.md +1 -0
  581. package/presets/zcode/java/rules/preset-layering.md +4 -4
  582. package/presets/zcode/java/rules/preset-pr-checklist.md +2 -1
  583. package/presets/zcode/java/rules/preset-twin-sync.md +12 -5
  584. package/presets/zcode/mcp-ts/adapter-map.json +1 -1
  585. package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
  586. package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
  587. package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
  588. package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +313 -26
  589. package/presets/zcode/mcp-ts/rules/ai-local-overlay.md +1 -1
  590. package/presets/zcode/mcp-ts/rules/code-review-mr.md +1 -0
  591. package/presets/zcode/mcp-ts/rules/preset-layering.md +4 -4
  592. package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -1
  593. package/presets/zcode/mcp-ts/rules/preset-twin-sync.md +12 -5
  594. package/presets/zcode/mol/adapter-map.json +1 -1
  595. package/presets/zcode/mol/agents/build-verifier.md +4 -1
  596. package/presets/zcode/mol/agents/code-reviewer.md +1 -1
  597. package/presets/zcode/mol/agents/debugger.md +1 -1
  598. package/presets/zcode/mol/agents/feature-developer.md +1 -1
  599. package/presets/zcode/mol/agents/task-analyst.md +1 -1
  600. package/presets/zcode/mol/hooks/chain-team-phases.sh +313 -26
  601. package/presets/zcode/mol/rules/ai-local-overlay.md +1 -1
  602. package/presets/zcode/mol/rules/code-review-mr.md +1 -0
  603. package/presets/zcode/mol/rules/preset-layering.md +4 -4
  604. package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -1
  605. package/presets/zcode/mol/rules/preset-twin-sync.md +12 -5
  606. package/presets/zcode/next/adapter-map.json +1 -1
  607. package/presets/zcode/next/agents/build-verifier.md +6 -1
  608. package/presets/zcode/next/agents/code-reviewer.md +1 -1
  609. package/presets/zcode/next/agents/debugger.md +1 -1
  610. package/presets/zcode/next/agents/feature-developer.md +1 -1
  611. package/presets/zcode/next/agents/task-analyst.md +1 -1
  612. package/presets/zcode/next/hooks/chain-team-phases.sh +313 -26
  613. package/presets/zcode/next/rules/ai-local-overlay.md +2 -1
  614. package/presets/zcode/next/rules/code-review-mr.md +1 -0
  615. package/presets/zcode/next/rules/preset-layering.md +4 -4
  616. package/presets/zcode/next/rules/preset-pr-checklist.md +2 -1
  617. package/presets/zcode/next/rules/preset-twin-sync.md +12 -5
  618. package/presets/zcode/nuxt/adapter-map.json +1 -1
  619. package/presets/zcode/nuxt/agents/build-verifier.md +4 -1
  620. package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
  621. package/presets/zcode/nuxt/agents/debugger.md +1 -1
  622. package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
  623. package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
  624. package/presets/zcode/nuxt/hooks/chain-team-phases.sh +313 -26
  625. package/presets/zcode/nuxt/rules/ai-local-overlay.md +1 -1
  626. package/presets/zcode/nuxt/rules/code-review-mr.md +1 -0
  627. package/presets/zcode/nuxt/rules/preset-layering.md +4 -4
  628. package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -1
  629. package/presets/zcode/nuxt/rules/preset-twin-sync.md +12 -5
  630. package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
  631. package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
  632. package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
  633. package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
  634. package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
  635. package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
  636. package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +313 -26
  637. package/presets/zcode/php-hexagonal/rules/ai-local-overlay.md +1 -1
  638. package/presets/zcode/php-hexagonal/rules/code-review-mr.md +1 -0
  639. package/presets/zcode/php-hexagonal/rules/preset-layering.md +4 -4
  640. package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -1
  641. package/presets/zcode/php-hexagonal/rules/preset-twin-sync.md +12 -5
  642. package/presets/zcode/php-laravel/adapter-map.json +1 -1
  643. package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
  644. package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
  645. package/presets/zcode/php-laravel/agents/debugger.md +1 -1
  646. package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
  647. package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
  648. package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +313 -26
  649. package/presets/zcode/php-laravel/rules/ai-local-overlay.md +1 -1
  650. package/presets/zcode/php-laravel/rules/code-review-mr.md +1 -0
  651. package/presets/zcode/php-laravel/rules/preset-layering.md +4 -4
  652. package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -1
  653. package/presets/zcode/php-laravel/rules/preset-twin-sync.md +12 -5
  654. package/presets/zcode/svelte/adapter-map.json +1 -1
  655. package/presets/zcode/svelte/agents/build-verifier.md +4 -1
  656. package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
  657. package/presets/zcode/svelte/agents/debugger.md +1 -1
  658. package/presets/zcode/svelte/agents/feature-developer.md +1 -1
  659. package/presets/zcode/svelte/agents/task-analyst.md +1 -1
  660. package/presets/zcode/svelte/hooks/chain-team-phases.sh +313 -26
  661. package/presets/zcode/svelte/rules/ai-local-overlay.md +1 -1
  662. package/presets/zcode/svelte/rules/code-review-mr.md +1 -0
  663. package/presets/zcode/svelte/rules/preset-layering.md +4 -4
  664. package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -1
  665. package/presets/zcode/svelte/rules/preset-twin-sync.md +12 -5
package/CHANGELOG.md CHANGED
@@ -1,7 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.78
4
+
5
+ ### `engine` — a follow-up must name a different task
6
+
7
+ - **Validator.** `validateLedgerRows(rows, { taskSlug })` refuses a `followUp` equal to the filing task's own slug: the self-reference resolves to a real directory while closing nothing. The message names the row, the slug and the repair — create the follow-up task, or close the row as `fixed`/`rejected`. `team-db.mjs ledger-check --slug` passes `taskSlug`, and the chain hook still relays `failures[].reason` verbatim, so the text keeps one source.
8
+ - **Fixtures.** `ledger-followup-self-reference-red` pins the red for a bare slug and for `blocked-on: <slug>`, and the green for a follow-up that names another real task; `yarn test:team-db:project` is 53 checks.
9
+
10
+ ### `engine` — a multi-hour attempt is a human-wait suspect, not agent time
11
+
12
+ - **Aggregator.** `aggregate-agent-task-metrics.mjs` flags every attempt longer than `LONG_ATTEMPT_MS` (3 h) in `longAttempts`, and each task report gains `longestAttemptMs` and `longAttemptCount`. The hint carries the reading rule: an attempt stays open while the owner answers and no `human_gate` event covers that wait, so `activeMs` is an upper bound. `gateWaitMs` and `outOfBandMs` stay separate and are never added to attempt duration.
13
+ - **Fixture.** `a multi-hour attempt is flagged, not counted as agent time` pins the threshold, the per-task counters and the hint.
14
+
15
+ ### `engine` — the write-scope audit knows engine telemetry
16
+
17
+ - **Derived class.** `DERIVED_RULES` gains `engine-telemetry` for `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` (and their `.lock` files): the self-learning loop writes them between steps, so no step's `writeScopes` can own them and an implementation step stops reporting them as `outOfScope`.
18
+ - **Fixture.** `test-write-scope.mjs` asserts the `derived: engine-telemetry` label and the new `derived: 6` count.
19
+
20
+ ### `preset` — a green gate set is not an AC verdict
21
+
22
+ - **Agent contract.** `build-verifier` (Cursor source plus the hand-maintained Claude twin) reads the AC **sentences**, not only the IDs: when the shipped behaviour diverges from an AC sentence the verdict is `FAIL` with that AC named as a blocker, however green every gate is, and "acceptable and tracked elsewhere" is a question for the gate, never a PASS.
23
+ - **Framing rule.** `task-framing` gains **Oracle on real data**: when the oracle is a shipped validator over existing data, the brief states its expected output on the real corpus — the counters, not only "it passes" — and the current predicate runs before the gate, so a semantics drift surfaces at intake rather than in review.
24
+
25
+ ### `preset` — the report-header grammar is stated where it is enforced
26
+
27
+ - **Prose.** `verification-before-completion` names the anchor: nothing follows the closing `)` on the `tree:` line. A clarification such as `(+511 dirty excluding .ai.local)` obeys "opens with these two lines" and still stalls the receipt, so every qualification belongs under `## Notes`.
28
+ - **Hook.** The stall message repeats the grammar, so the repair is readable from the receipt that failed; `gate-tree-clarification-red` pins a header that matches `HEAD` and the dirty count but carries a trailing clarification, and `gate-tree-missing-red` asserts the rule literal so no adapter can drop it again.
29
+
3
30
  ## 0.2.77
4
31
 
32
+ ### `preset` + `engine` — verification evidence names its tree
33
+
34
+ - **Rule.** `verification-before-completion` gains three Gate clauses — name the tree, prove the gate can fail, re-run when the tree moved — plus the `validation-report.md` header grammar (`tree: <sha> (+N dirty)`, `run-at: <ISO>`) and the zero-input clause. `agent-artifact-contracts.md` names that header in the `validation-report.md` budget row. The rule stays requestable.
35
+ - **Hook.** Inside `validateCompletedArtifact`, a `build-verifier` receipt is rejected when `validation-report.md` is missing or headerless, when the named `HEAD` or dirty count no longer matches the worktree (the existing `gitSnapshot()`), or when the report carries an unallowlisted `checked: 0` row. Each message names the repair: re-run the named gate on the current tree, then `/task-continue <slug>`. The allowlist is data — `zeroInputAllowlist[{gate, reason, owner}]` in `.ai.local/pipeline-gates.json` — and an entry without a reason allowlists nothing.
36
+ - **Audit.** `check-verification.mjs` joins `ENGINE_SCRIPTS` (thirty entries, twenty-nine published): read-only buckets for missing tree, stale tree, and zero-input, with tasks last touched before `2026-11-01` reported as `legacy`. A scan over zero tasks prints `checked: 0` and exits 1 unless `check-verification` is allowlisted.
37
+ - **Fixtures.** `yarn test:hooks` gains ten cases: `gate-tree-missing-red`, `gate-tree-fresh-green`, `gate-tree-stale-red`, `gate-zero-input-red`, `gate-zero-input-allowlisted`, and `audit-{missing-tree,stale-tree,zero-input,legacy-precutoff,empty-root-red}`.
38
+
5
39
  ### `preset` — one stack means one document on every platform
6
40
 
7
41
  - **Entry text restored on all five platforms.** Every `REPO_AGENTS.md` regains the `## ZCode host` block (`node .zcode/hooks/list-ai-local.mjs`) and the `ai-local-overlay` closing sentence — additive only, 753 B and 227 B — and the 44 derived copies carry it byte for byte. `check-zcode-local-overlay`, `check-opencode-local-overlay` and `check-mavis-local-overlay` go from 22 / 11 / 11 findings to zero.
@@ -44,6 +78,14 @@ The `0.2.77` release gate ran phase 1 on `ddb234bf` and found five sub-checks re
44
78
  - **`hook-body-parity fixtures`.** `makeTree()` copies the whole `presets/_shared/hooks/` directory and stages the Cursor `compact-shell-output.mjs`, so a shared hook added later can no longer turn the clean-tree case into an `ENOENT`.
45
79
  - **`test-write-scope` teardown.** The seven temp-repo teardowns retry `ENOTEMPTY`/`EBUSY` (`maxRetries: 5`); no assertion changed, so a real verdict failure still surfaces as itself.
46
80
 
81
+ ### `preset` + `engine` — three hook facts stop being reconstructed by hand
82
+
83
+ - **Bootstrap hands over the advance payload.** `bootstrap` now prints the `followup_message` the advance path builds (`handoffForAgent`): the agent, the step-owned output id, the `attemptId` it just armed, and the artifact-input line. A parallel first step uses the advance path's `handoffForParallelStep` instead, so the payload names every agent it armed and every owned id. A step that declares no resolvable agent — including `agent: []` — is refused (`ok: false` + reason, nothing armed) instead of handing over an `undefined` id. One ownership clause in the template, two call sites.
84
+ - **`manifest.mjs upsert` refuses a foreign id.** When `pipeline.json`'s active step declares `artifactOutputId` / `artifactOutputIds[producer]`, an `--id` it does not name exits 2 with the expected id and the repair; `--attempt` equal to that step's active attempt is the deliberate re-bind. The scalar `artifactOutputId` binds only to the step's own agent(s), and a bound attempt resolves its own step — so the second step of a parallel wave writes its own id while the wave's first unit still cannot. An attempt armed for another agent does not authorise the producer. A missing `pipeline.json`, a step that declares no id, and a legacy producer keep the earlier behaviour.
85
+ - **The verification snapshot refreshes on every verifier receipt.** The `existsSync` early return is gone: `snapshot`, the `validation-report.md` hash and `gate.checkedAt` follow the tree the commands ran on, and the recorded `commands[]` are preserved. Report lookup is the gate's live-then-archived one, so a post-close refresh records the archived body instead of erasing the hash. The freshness warn compares the report's `tree:` header — the same `REPORT_TREE_RE` the report gate parses — so a retried verifier no longer warns `verification_stale` about the report it just wrote.
86
+ - **The write-scope baseline is saved at activation.** `activateAttempts` runs `check-write-scope --slug <slug> --step <id> --save-baseline --paths <the step's writeScopes>` when the step declares `writeScopes`, so the audit no longer skips every step as `no-baseline`; the declared surface is seeded into the baseline, so a step armed on a clean tree still attributes its own writes instead of relying on `--allow-empty` (which the hook no longer passes). The save is create-once (`wx`, a second save keeps the first file) and a failure is a stderr note, never a failed receipt. A step with no `writeScopes` keeps the shipped `no-write-scopes` skip.
87
+ - **Fixtures.** `yarn test:hooks` gains nine cases — `bootstrap-carries-output-id`, `bootstrap-carries-parallel-payload`, `bootstrap-refuses-no-id`, `manifest-rejects-foreign-id`, `manifest-wave-owns-each-step-id`, `verification-refresh-on-retry`, `verification-reads-archived-report`, `write-scope-baseline-at-activation`, `write-scope-clean-activation-baseline` — all red on the previous tree. No new always-on rule; `package.json` unchanged.
88
+
47
89
  ## 0.2.76
48
90
 
49
91
  ### `preset` — guard accounting reads every ledger generation
package/README.md CHANGED
@@ -25,7 +25,7 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
25
25
  | Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all five; ZCode loads it natively) | | | | |
26
26
  | `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
27
27
  | Template drift | **`.ai.local/.template-base.json`** (shared; one record per tree of files that hold a shipped template byte; `update` prints one drift line, `update --merge-ai-local` fast-forwards a file only when its recorded base still matches and reports the rest) | | | |
28
- | Self-learning engine | **`.ai.local/scripts/`** (shared; twenty-eight published scripts — the six self-learning engine modules, `manifest.mjs`, `dump-output.mjs`, `run-compact.mjs`, the eight `team-db*.mjs` modules, `action-signals.mjs`, `actions-report.mjs`, `check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`, `verification.mjs`, `incidents.mjs`, `processes.mjs`, `process-lease.mjs`, `rr-scheduler-start.mjs`, and `tracker-planned-drain.mjs`; existing files never overwritten. The repository-only `upstream-research.mjs` is not published) | | | |
28
+ | Self-learning engine | **`.ai.local/scripts/`** (shared; twenty-nine published scripts — the six self-learning engine modules, `manifest.mjs`, `dump-output.mjs`, `run-compact.mjs`, the eight `team-db*.mjs` modules, `action-signals.mjs`, `actions-report.mjs`, `check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`, `verification.mjs`, `check-verification.mjs`, `incidents.mjs`, `processes.mjs`, `process-lease.mjs`, `rr-scheduler-start.mjs`, and `tracker-planned-drain.mjs`; existing files never overwritten. The repository-only `upstream-research.mjs` is not published) | | | |
29
29
  | Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
30
30
 
31
31
  OpenCode also ships **`.opencode/plugins/task-status/`**, a TUI sidebar for the active `/task` run (slug, state, elapsed time, step, remaining-time estimate, soft-stop). OpenCode auto-loads it; it needs no `opencode.json` entry, is refreshed by `update`, and is a viewer only — the chain hook stays manual.
@@ -86,6 +86,9 @@ const ENGINE_SCRIPTS = [
86
86
  // Persisted verification evidence: command + exit + capped log tail bound to a
87
87
  // git snapshot, with a freshness check closure can read.
88
88
  'verification.mjs',
89
+ // Read-only audit of the reports `verification.mjs` sits beside: which ones
90
+ // name no tree, a stale tree, or a zero-input gate row. Never writes.
91
+ 'check-verification.mjs',
89
92
  // Append-only incident registry: recurrence threshold, promotion gate, advice.
90
93
  'incidents.mjs',
91
94
  ];
@@ -21,12 +21,12 @@ Put a `.ai.local/` directory in your repo. Write rules as plain markdown. The `a
21
21
 
22
22
  `init` and `update` write `.ai.local/.template-base.json` — the digest of every `.ai.local/` file that holds a shipped template byte — so `update` can tell a file you edited from a file the preset moved. Your own bytes never become a base. See [Template drift](#template-drift).
23
23
 
24
- No IDE config, no `@include`, no codegen. Same files work in Cursor, Claude Code, Mavis, and OpenCode.
24
+ No IDE config, no `@include`, no codegen. Same files work in Cursor, Claude Code, Mavis, OpenCode, and ZCode.
25
25
 
26
26
  ## How it works
27
27
 
28
- 1. `init cursor|claude|mavis|opencode --preset <stack>` (or `init multi`) installs `ai-local-overlay`. Cursor: `alwaysApply: true`. Claude: session-start (no `paths:`). Mavis/OpenCode: listed as a root-entry rule in `AGENTS.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md`.
29
- 2. On every turn the rule runs `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, or `.opencode`) with the paths that step will touch. The script prints `rules/*.md` and `conventions.md` for the ancestor chain. Do **not** load `team/**` or `rules-library/**` as rules. `team/` lives only at the **repo root** `.ai.local/team/`, not in nested package overlays.
28
+ 1. `init cursor|claude|mavis|opencode|zcode --preset <stack>` (or `init multi`) installs `ai-local-overlay`. Cursor: `alwaysApply: true`. Claude: session-start (no `paths:`). Mavis/OpenCode: listed as a root-entry rule in `AGENTS.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md`. ZCode reads the root `AGENTS.md`.
29
+ 2. On every turn the rule runs `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`, current host first) with the paths that step will touch. The script prints `rules/*.md` and `conventions.md` for the ancestor chain. Do **not** load `team/**` or `rules-library/**` as rules. `team/` lives only at the **repo root** `.ai.local/team/`, not in nested package overlays.
30
30
  3. If a local rule conflicts with a preset rule, **the local rule wins**.
31
31
  4. **Deeper wins on one chain.** The root `.ai.local` applies to every path. A nested `.ai.local` applies only under its directory. The same rule file name on that chain: the deeper file wins (`shadowed` is not read). A sibling package does not inherit the other package's overlay.
32
32
  5. When the path set grows, run the script again with the new paths. If `.ai.local/team/tasks/<slug>/` already exists, pass `--record <slug>`. The script writes `overlay-scope.json` there and appends one `.memlog.md` `event:` per newly entered overlay directory. Read files listed under `new:` before editing. Cursor and Claude also print a prefix index at session start; that index is not the apply set.
@@ -297,7 +297,7 @@ A nested overlay does not contain `team/`. If the same rule name appears on one
297
297
 
298
298
  ## Limitations
299
299
 
300
- - Cursor, Claude, Mavis, and OpenCode do **not** natively read `.ai.local/`. `list-ai-local.mjs` prints the chain; the model still reads the listed files. Cursor and Claude inject the prefix index once per session. Mavis and OpenCode have no session hook, so the rule runs the same script.
300
+ - Cursor, Claude, Mavis, OpenCode, and ZCode do **not** natively read `.ai.local/`. `list-ai-local.mjs` prints the chain; the model still reads the listed files. Cursor and Claude inject the prefix index once per session. Mavis, OpenCode, and ZCode have no session hook, so the rule runs the same script.
301
301
  - A file added under an overlay the task has already entered is picked up the next time the script runs with a path on that chain. A brand-new `.ai.local` directory is picked up the same way; it does not wait for a new session.
302
302
  - "Priority" is **contextual**, not enforced. If the model already internalized a preset rule, the local rule may not fully override it.
303
303
  - Local rules consume your context window. Keep them tight.
@@ -19,13 +19,13 @@ Every preset artifact belongs to one of these layers. Do not mix semantics acros
19
19
  | Layer | Path | What belongs here |
20
20
  |-------|------|-------------------|
21
21
  | **Core** | `presets/_shared/core/**` | Stack-agnostic prose and checklists. No Cursor/Claude frontmatter. No stack paths (`app/src/**`, `Features/**`, Playwright, `xcodebuild`). |
22
- | **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain rules, stack always-on set, stack tooling, stack examples in a delimited `## Stack notes` section. |
22
+ | **Stack** | `presets/{cursor\|claude\|mavis\|opencode\|zcode}/<stack>/` | Domain rules, stack always-on set, stack tooling, stack examples in a delimited `## Stack notes` section. |
23
23
  | **Platform** | Same stack tree | Adapter packaging: Cursor `.mdc` (`alwaysApply` / `globs`) vs Claude `.md` (`paths:`). Platform-only files (`BUGBOT.md`, `AGENTS.md`, `CLAUDE.md`, `hooks.json`). |
24
24
 
25
25
  ```text
26
26
  Core (_shared/core) → shared principles
27
27
  ↓ embed / copy + marker
28
- Stack (cursor|claude/<stack>) → domain + stack deltas
28
+ Stack (cursor/<stack>, then derived platforms) → domain + stack deltas
29
29
  ↓ frontmatter / layout
30
30
  Platform adapter → .mdc | .md + platform-only artifacts
31
31
  ```
@@ -34,7 +34,7 @@ Platform adapter → .mdc | .md + platform-only artifacts
34
34
 
35
35
  - Applies to all stacks with only example differences → **core** + stack adapters.
36
36
  - Only one installable stack (`next` / `nuxt` / `svelte` / `mol` / `ios-swift` / `android-kotlin` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (never in `_shared`).
37
- - Only Cursor or only Claude file shape → **platform** (do not duplicate semantics in the other platform).
37
+ - Only one platform's file shape → **platform** (do not duplicate semantics on the other platforms).
38
38
 
39
39
  Meta-rules for **preset authors** live in `core/meta/` and are packaged into each stack with globs limited to `packages/ai-rules/presets/**` (never `alwaysApply` / session-start in consumer installs).
40
40
 
@@ -46,7 +46,8 @@ Meta-rules for **preset authors** live in `core/meta/` and are packaged into eac
46
46
  |---------|-----|-------|
47
47
  | Preset content | `packages/ai-rules/presets/**` | **Not** repo root `.cursor/` — dogfood is a synced working copy. |
48
48
  | Per stack | `presets/cursor/<stack>/` | Cursor `.mdc` is SoT for that stack. |
49
- | Claude twins | `presets/claude/<stack>/` | Derived in the **same PR** as Cursor changes. |
49
+ | Claude twins | `presets/claude/<stack>/` | Rules derived in the **same PR**. Agents, commands, skills, `CLAUDE.md`, and `settings.json` stay hand-maintained twins. |
50
+ | Mavis, OpenCode, ZCode | `presets/<platform>/<stack>/` | Derived from Cursor in the **same PR** (`generate-mavis.mjs`, `generate-opencode.mjs`, `generate-zcode.mjs`). Never hand-edit. |
50
51
  | Shared core | `presets/_shared/core/**` | Edit core first; update all `<!-- shared-core: … -->` consumers in the same PR. |
51
52
  | Monorepo dogfood | Root `.cursor/` | Sync **from** packages on release / dogfood PR (typically `cursor/next` + author meta globs). |
52
53
 
@@ -74,7 +75,7 @@ Claude topic folders (all stacks): `architecture/`, `stack/`, `api-and-data/`, `
74
75
 
75
76
  1. Change prose under `presets/_shared/core/<area>/<stem>.md`.
76
77
  2. Find consumers: `rg 'shared-core: <path>' packages/ai-rules/presets`.
77
- 3. Update every adapter (**all adapters**: stacks × 2 platforms, when the rule is shared) in the **same PR** — see **sync modes** below.
78
+ 3. Update the Cursor adapter in the **same PR**, then regenerate Claude, Mavis, OpenCode, and ZCode — see **sync modes** below. Do not hand-edit a derived tree.
78
79
  4. Keep stack-specific content only in adapters (embed: `## Stack notes`; lineage: full stack body).
79
80
  5. Update stack `rules/README.md` core→stack mapping if stems or paths changed.
80
81
  6. Sync dogfood: `packages/ai-rules/scripts/sync-dogfood-cursor.sh` when maintaining this monorepo.
@@ -171,7 +172,7 @@ Summary:
171
172
  - [ ] Anti-hallucination: `check-anti-hallucination-coverage.mjs` passes. New skill families are registered in `SKILL_CONTRACT_CLASS` (`writer` loads the stack floor; `reader` loads the contract only). `code-review` is `writer`.
172
173
  - [ ] Structure gates: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names; `yarn release:gate` before a release (the full `bash scripts/check-preset-structure.sh` composite)
173
174
  - [ ] Twin drift: after editing a Claude `commands/**` or `skills/**` file, `node scripts/check-preset-twin-drift.mjs` passes — mirror the change in the Cursor twin (delta and divergence unchanged) or record a deliberate divergence with `--update`. A deliberate divergence that **raises** an allowance needs `--update --widen`; dropping a baseline row needs `--update --prune`. A plain `--update` refuses both.
174
- - [ ] Generated trees regenerated (`generate-mavis.mjs` + `generate-opencode.mjs`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
175
+ - [ ] Generated trees regenerated (`generate-claude.mjs` + `generate-mavis.mjs` + `generate-opencode.mjs` + `generate-zcode.mjs`, or `yarn fix:generated`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
175
176
 
176
177
  Validation: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) + the `preset-pr-checklist` rule; the full composite runs in `yarn release:gate`. CI workflows: `preset-structure.yml` (`check`, `hooks`, `ai-local-engine-tests`), `platform-smoke.yml` (3-OS smoke: `init multi`/`update`/`doctor`, platform suites, script gate), `rule-eval.yml` (opt-in next rule-eval), and `release-gate.yml` (manual `yarn release:gate` run + report artifact).
177
178
 
@@ -407,7 +408,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
407
408
 
408
409
  | Script / npm | Purpose |
409
410
  |--------------|---------|
410
- | `yarn fix:generated` | Regenerate every released generated platform and recapture the CLI goldens it owns (`cursor/next`, `claude/next`, and every Mavis/OpenCode stack). Run after changing Cursor SoT, before fail-only checks. Capture a non-`next` Cursor/Claude golden explicitly with `node scripts/capture-cli-golden.mjs <cursor|claude> <stack>`; never hand-edit one. Dogfood sync remains separate. |
411
+ | `yarn fix:generated` | Regenerate every released generated platform and recapture the CLI goldens it owns (`cursor/next`, `claude/next`, and every Mavis/OpenCode/ZCode stack). Claude's stack set is the Cursor stack directories, not the OpenCode contract. Run after changing Cursor SoT, before fail-only checks. Capture a non-`next` Cursor/Claude golden explicitly with `node scripts/capture-cli-golden.mjs <cursor|claude> <stack>`; never hand-edit one. Dogfood sync remains separate. |
411
412
  | `scripts/sync-dogfood-cursor.sh` | Copy `presets/cursor/<preset>/` → root `.cursor/` (`AI_RULES_DOGFOOD_PRESET`, default `next`). Also copies `REPO_AGENTS.md` → repo-root `AGENTS.md`. Seeds `.ai.local/team` templates; preserves `.ai.local/team/tasks/`. |
412
413
  | `scripts/check-shared-core-drift.sh` / `yarn check:shared-core-drift` | Check embed-mode adapters vs core; lists lineage consumers. **Always hard:** every `_shared/core/**` file must be classified `embed | lineage | internal` in `_lib/embed-stems.json` (unclassified → exit 1). Drift is soft by default; set `AI_RULES_DRIFT_FAIL=1` (or use `release:gate`) to exit non-zero. A stem listed in `requiredSentences` is checked in the core **and in every adapter of that stem, whatever the lineage class** — the body comparison cannot cover a platform whose adapter is not a byte-embed of the core (the Cursor family reorders, omits and adds sections), so the normative fragments of that stem are pinned separately. |
413
414
  | `scripts/check-preset-twin-map.sh` / `yarn check:preset-twin-map` | **FAIL** if Cursor `.mdc` missing from Claude mapping table, twin file missing, or orphan topic `.md` (excl. `**/README.md`). Stacks: `next`, `nuxt`, `svelte`, `mol`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`. **Rules only** — commands and skills are guarded by `check-preset-twin-drift.mjs`. |
@@ -425,7 +426,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
425
426
  | `scripts/check-preset-language-policy.sh` / `yarn check:preset-structure` | **FAIL** if the native-language policy is absent: the core `_shared/core/agent-team/language-policy.md` tokens, the `language-policy` consumer + `<!-- shared-core -->` marker, the Cursor `globs:`/`alwaysApply: false` + Claude `paths:` shape, the `## Language` setting home (with a BCP-47 marker) in `ai-local/conventions.md`, the always-on anchors (`ai-local-overlay` + `<app-core>` + `REPO_AGENTS.md` must contain `native language` and `every user message`), or the `language:` persistence token in `commands/task.md`; **refuses vacuous PASS** when the iteration set is empty. Wired into `check-preset-structure.sh` next to `goal-contract` / `prompt-persistence`; fixture `test-preset-language-policy-fixtures.mjs`. |
426
427
  | `scripts/check-preset-self-review-contract.sh` / `yarn check:preset-structure` | **FAIL** if the producer-side self-review / context-hygiene contract is absent: the core `_shared/core/quality/self-review-and-context-hygiene.md` tokens (G0 non-vacuous guard), the `<!-- shared-core: quality/self-review-and-context-hygiene.md -->` marker on `task-analyst` / `feature-developer` / `build-verifier` (×10) and on `debugger` / `code-reviewer` where present (skip-if-absent → `mcp-ts`), the `Self-review` + `re-anchor` tokens on every orchestrator rule, `Self-review` in `team/README.md` + `commands/task.md`, and leakage-free core + docs; **refuses vacuous PASS** when the iteration set is empty. Also holds two prose contracts: the canonical self-learning-loop sentence must not be followed by unsanctioned prose (an allowlist of sanctioned clauses; the tail is bounded by the carrier's **section**, not by a blank line, so prose moved one paragraph down still fails — a tail in a later `## ` section is out of scope), and every retro carrier (command, skill, rule) must state `finding_category`. Wired into `check-preset-structure.sh` next to `goal-contract`; fixture `test-preset-self-review-contract-fixtures.mjs`. |
427
428
  | `scripts/check-anti-hallucination-coverage.mjs` | **FAIL** when the shared contract, a Cursor load-line embed, a writer stack floor, or a generated Rules-to-load stem is missing. Writer roles are `implementer`, `unit-test`, `e2e`, `qa`, and `reviewer` (`code-reviewer` loads `STACK_FLOOR_STEMS` plus the contract). `/task` and the orchestrator must not name a floor stem. Does not scan consumer `app/**` and does not call Context7. Fixture `test-anti-hallucination-coverage.mjs` deletes `anti-hallucination-contract` from `next.reviewer` in memory and expects FAIL mentioning `next` and `reviewer`. Wired into `check-preset-structure.sh` immediately after `check-claude-agent-blocks.mjs`. |
428
- | `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--save-baseline] [--json]`. Baseline resolution: `--paths`, then `--base <ref>`, then the step baseline written by `--step <id> --save-baseline` (every dirty path with its content hash, so an earlier step's path is not attributed to this one and an already-dirty path the step edits still is), then `HEAD` (whole uncommitted change-set, reported with a notice). Exit `1` for an out-of-scope path on an implementation step, `0` for a reviewer/verifier step (advisory), `2` on a usage/config error, `3` (SKIP) when the pipeline predates step ids or `writeScopes` and is therefore not auditable. Fixture `test-write-scope.mjs`; wired into the build-verifier and code-reviewer prompts, never a hook. |
429
+ | `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--save-baseline] [--json]`. Baseline resolution: `--paths`, then `--base <ref>`, then the step baseline written by `--step <id> --save-baseline` (every dirty path with its content hash, plus the files its declared `writeScopes` cover — passed as `--paths` — so a step armed on a clean tree still owns its surface), then `HEAD` (whole uncommitted change-set, reported with a notice). Exit `1` for an out-of-scope path on an implementation step, `0` for a reviewer/verifier step (advisory), `2` on a usage/config error, `3` (SKIP) when the pipeline predates step ids or `writeScopes` and is therefore not auditable. Fixture `test-write-scope.mjs`; wired into the build-verifier and code-reviewer prompts, never a hook. |
429
430
  | `scripts/check-preset-structure.sh` / `yarn check:preset-structure` | Low-level orchestrator: twin-map + token-budget + leakage + shared-core drift + anti-hallucination coverage + rule-eval (**all hard**; drift via `AI_RULES_DRIFT_FAIL=1`). Invoked by `yarn release:gate` and CI; not a feature-task gate. |
430
431
  | `scripts/check-product-specs.sh` / `yarn check:product-specs` | Opt-in consumer tree check: frontmatter v1 keys + required body headings on `docs/specs/**` (bash; does **not** run JSON Schema). Ships in the npm package `files` (`scripts/`). **WARN** by default; **`--strict`** exits non-zero. |
431
432
  | `yarn check:product-specs:dogfood` | Same script against monorepo `dogfood/mcp-ts-sample`. Soft WARN inside the composite + CI step (`continue-on-error`); the release gate runs `--strict`; not a hard consumer CI gate. |
package/docs/TEAM-DB.md CHANGED
@@ -20,8 +20,8 @@ The projection is installed by `init` as eight `team-db*.mjs` modules under `.ai
20
20
  The same seeded set is `ENGINE_SCRIPTS` in `bin/lib/engine-scripts.js`: the eight `team-db*.mjs`
21
21
  modules plus the self-learning engine, `manifest.mjs`, `dump-output.mjs`,
22
22
  `check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`,
23
- `verification.mjs`, `incidents.mjs`, `tracker-planned-drain.mjs`, and the `processes.mjs` +
24
- `process-lease.mjs` process manager (twenty-five entries;
23
+ `verification.mjs`, `check-verification.mjs`, `incidents.mjs`, `tracker-planned-drain.mjs`, and the `processes.mjs` +
24
+ `process-lease.mjs` process manager (thirty entries;
25
25
  `node -e "require('./bin/lib/engine-scripts.js').ENGINE_SCRIPTS.length"` prints the shipped
26
26
  count). One further module, `upstream-research.mjs`, is declared in
27
27
  `REPO_ONLY_ENGINE_SCRIPTS`: it exists in this repository's preset source and dogfood mirror but
@@ -33,7 +33,11 @@ is excluded from the published tarball, and a consumer install skips it without
33
33
  `artifact-manifest.json`, prompts, memlogs, and review ledgers are read, never written.
34
34
  No agent writes a lifecycle field through the projection.
35
35
  - **The database is rebuildable.** Delete `team.db*` and run `sync`; the next run recreates
36
- the schema and reconverges. A schema fingerprint mismatch rebuilds automatically.
36
+ the schema and reconverges. An older database migrates in place and keeps its rows, and a
37
+ stored fingerprint that lags the DDL the migration chain produces is a stale record: it is
38
+ overwritten in place, no rebuild. A record that disagrees with a DDL the chain does not
39
+ produce is moved aside as `team.db.mismatch-<stamp>` and rebuilt. A file with no fingerprint
40
+ record is stamped with the DDL it opened with, without a comparison.
37
41
  - **Writes are isolated.** A projection or deletion failure never fails a file write or a
38
42
  receipt. The hook and `manifest.mjs` each run a bounded child (5 s, `SIGKILL`) and append
39
43
  one line to `team-db-errors.log` on failure; the confirmed task delete runs its own
@@ -367,8 +371,9 @@ reconciles it before the first fire, and `jobs reconcile` does the same on deman
367
371
  manifest and the row become `interrupted` with reason `E_ORPHANED`. `sync --rebuild` and
368
372
  `sync --vacuum` refuse with `E_SCHEDULER_RUNNING` (exit 4) while a fresh lease exists. That
369
373
  guard covers the explicit destructive flags only: a plain `init` or `sync` opens writable, and
370
- a database whose recorded schema fingerprint no longer matches is moved aside as
374
+ a database whose DDL the migration chain does not produce is moved aside as
371
375
  `team.db.mismatch-<stamp>` and rebuilt (see § Schema) even while a scheduler holds the lease.
376
+ A store whose DDL is the chain's own only has its fingerprint refreshed in place.
372
377
  Stop the scheduler before any schema upgrade; the explicit flags are a backstop, not a
373
378
  complete guard. The kill switch drains: no new claim, the in-flight child finishes inside its
374
379
  own timeout, the result is recorded, exit 0. Supervision (launchd, systemd, Task Scheduler) is
@@ -477,10 +482,14 @@ capability created after migration, with an escaped `LIKE` fallback.
477
482
  Migration `0002-scheduler` adds the scheduler's three tables — `scheduled_jobs`, `job_runs`,
478
483
  `job_run_events` — and five indexes, and moves `SCHEMA_VERSION` to 2. It is additive and
479
484
  sha256-pinned like the first one: a tampered literal aborts with `E_MIGRATION_CHECKSUM` before
480
- any DDL. A v1 database is not read forward: its recorded fingerprint no longer describes the
481
- schema, so the next open moves the file aside as `team.db.mismatch-<stamp>`, rebuilds, and
482
- reprojects from the task files — database-only rows are discarded by design, which is why the
483
- files are the source of truth. Run `sync` after an upgrade and the counters reconverge.
485
+ any DDL. A v1 database migrates in place through the chain and keeps its rows; the stored
486
+ fingerprint is a record of the DDL, so a record that lags the chain is a stale record — it is
487
+ rewritten in place and no rows move. A record that disagrees with a DDL the chain does not
488
+ produce — a table or index altered by hand — is moved aside as `team.db.mismatch-<stamp>` and
489
+ rebuilt, which is why the files stay the source of truth; under `--no-rebuild` or a read-only
490
+ open it fails as `E_SCHEMA_MISMATCH` instead. A database with no fingerprint record is stamped
491
+ with the DDL it opened with, without a comparison. Run `sync` after an upgrade and the counters
492
+ reconverge.
484
493
 
485
494
  Migration `0003-backlog` stays immutable; migration `0004-tracker` creates the tracker
486
495
  tables (`tracker_items`, `tracker_item_deps`, `tracker_queue`, `tracker_queue_events`,
@@ -525,6 +534,32 @@ gains ten columns (`intent`, `agent`, `parent_session_id`, `duration_ms`, `gap_m
525
534
  file opens and migrates in place without a row copy; a v6 file is refused by a v5 binary with
526
535
  `E_SCHEMA_NEWER`. There is no downgrade SQL: delete `team.db*` and run `sync`.
527
536
 
537
+ Migration `0008-ledger-owner` moves `SCHEMA_VERSION` to 8. It is additive: `review_ledger`
538
+ gains three nullable `TEXT` columns — `owner`, `due`, `follow_up` — so a version-7 file
539
+ migrates in place and historical rows insert `NULL`. There is no backfill and no row rewrite;
540
+ legacy is a function of the date, never of file mtime, and the header never decides it. A row is
541
+ legacy when it has no usable `at` — the one date git cannot supply — or when its `at` is before
542
+ `2026-11-22`. The header only decides a dated row: a post-cutoff row under a stale header still
543
+ fails, so a table moves to the canonical header rather than relying on width.
544
+ `ledger-check` is the single validator:
545
+ a row dated on or after `2026-11-22` whose disposition is `open`, `accepted` or `deferred`
546
+ needs an `owner` that is not one of the frozen placeholder tokens (`-`, `—`, `?`, `n/a`, `na`,
547
+ `none`, `null`, `tbd`, `tba`, `todo`, `unowned`, `unassigned`, `someone`, `anyone`, `owner`,
548
+ `team`; matching is equality after trim/quotes/one leading `@`/case, so `team-lead` passes)
549
+ and a `due` as `YYYY-MM-DD` on or after the check date (UTC); `accepted` and `deferred` also
550
+ need a `followUp` — `<slug>` or `blocked-on: <slug>`, one slug, resolving under
551
+ `<teamRoot>/tasks/`. Legacy rows are never failed and are counted in `legacyRows`; `undatedRows`
552
+ is their no-date subset. Both counters cover every parsed row, whatever its disposition — they
553
+ describe the ledger's age, not its debt. The output
554
+ carries both counters next to `checked=` / `failed=`, and `--json` adds them to the envelope.
555
+ The command
556
+ is file-only — it needs no `node:sqlite`. The chain hook spawns it on the receipt of the step
557
+ that owns the `review` artifact — `completed` and `changes_requested`, the two receipts a
558
+ review produces — and relays `failures[].reason` verbatim, so the message text lives once, in
559
+ `team-db-project.mjs`; a verifier or implementer receipt is not gated, because it may not
560
+ write a reviewer's row. A tree without the CLI or without a ledger skips the gate and says so
561
+ on stderr.
562
+
528
563
  `serve` and `schedule` keep the schema module they loaded at startup. When `team-db-schema.mjs`
529
564
  on disk is replaced by a higher `SCHEMA_VERSION`, the next request and the next idle scheduler
530
565
  tick re-import that file and open with it. A database newer than the file on disk still fails
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonesofspring/ai-rules",
3
- "version": "0.2.77",
3
+ "version": "0.2.78",
4
4
  "description": "Presets of Cursor, Claude, Mavis, OpenCode, and ZCode rules/commands for Revy Ross personal use",
5
5
  "license": "MIT",
6
6
  "author": "Revy Ross",
@@ -84,6 +84,7 @@
84
84
  "test:shared-core-drift-lineage-fixtures": "node scripts/test-shared-core-drift-lineage-fixtures.mjs",
85
85
  "test:generated-drift-fixtures": "node scripts/test-generated-drift-fixtures.mjs",
86
86
  "test:generate-claude-fixtures": "node scripts/test-generate-claude-fixtures.mjs",
87
+ "test:probe-order": "node scripts/test-probe-order.mjs",
87
88
  "test:generated-drift-claude-fixtures": "node scripts/test-generated-drift-claude-fixtures.mjs",
88
89
  "test:rule-improver": "node scripts/test-rule-improver-ledger.mjs",
89
90
  "test:guard-shell-command": "node scripts/test-guard-shell-command.mjs",
@@ -36,12 +36,16 @@ const teamRoot =
36
36
  const slugIndex = args.indexOf('--slug');
37
37
  const slugFilter = slugIndex >= 0 ? args[slugIndex + 1] ?? null : null;
38
38
  const tasksDir = path.join(teamRoot, 'tasks');
39
+ // An attempt this long almost always contains human wait (an overnight pause, a
40
+ // gate decision answered between attempts) that no gate event covers.
41
+ const LONG_ATTEMPT_MS = 3 * 60 * 60 * 1000;
39
42
  const incomplete = [];
40
43
  const attempts = [];
41
44
  const tasks = [];
42
45
  const taskReports = [];
43
46
  const gateWaits = [];
44
47
  const outOfBandDurations = [];
48
+ const longAttempts = [];
45
49
  const attributionConfidenceCounts = new Map();
46
50
  let unmatchedAttemptCount = 0;
47
51
  let duplicateTerminalAttemptCount = 0;
@@ -200,6 +204,7 @@ function collect(metrics, filePath) {
200
204
  const gateStarts = new Map();
201
205
  const terminalAttempts = new Set();
202
206
  const attemptDurations = [];
207
+ const taskLongAttempts = [];
203
208
  const hostUsage = new Map();
204
209
  const usageEventsByAttempt = new Map();
205
210
  let taskCompleted = false;
@@ -260,6 +265,16 @@ function collect(metrics, filePath) {
260
265
  (attributionConfidenceCounts.get(attributionConfidence) ?? 0) + 1,
261
266
  );
262
267
  if (Number.isFinite(event.durationMs)) attemptDurations.push(event.durationMs);
268
+ if (Number.isFinite(event.durationMs) && event.durationMs > LONG_ATTEMPT_MS) {
269
+ const longAttempt = {
270
+ slug: metrics.task.slug,
271
+ attemptId: event.attemptId,
272
+ agent: start.agent ?? 'unknown',
273
+ durationMs: event.durationMs,
274
+ };
275
+ taskLongAttempts.push(longAttempt);
276
+ longAttempts.push(longAttempt);
277
+ }
263
278
  const usage = normalizeUsage(
264
279
  hostUsage.get(event.attemptId) ??
265
280
  (event.usage && typeof event.usage === 'object' ? event.usage : null),
@@ -331,6 +346,8 @@ function collect(metrics, filePath) {
331
346
  outOfBandMs: taskOutOfBandMs,
332
347
  outOfBandCount: taskOutOfBandCount,
333
348
  attemptCount: terminalAttempts.size,
349
+ longestAttemptMs: attemptDurations.length ? Math.max(...attemptDurations) : null,
350
+ longAttemptCount: taskLongAttempts.length,
334
351
  completed: taskCompleted,
335
352
  incomplete: ledgerIncomplete,
336
353
  usage: {
@@ -463,6 +480,12 @@ process.stdout.write(
463
480
  sumDurationMs: outOfBandDurations.reduce((sum, value) => sum + value, 0),
464
481
  },
465
482
  attributionConfidence: Object.fromEntries(attributionConfidenceCounts),
483
+ longAttempts: {
484
+ thresholdMs: LONG_ATTEMPT_MS,
485
+ count: longAttempts.length,
486
+ attempts: longAttempts,
487
+ hint: 'an attempt this long may contain human wait that no human_gate event covers; read activeMs as an upper bound, not as agent time',
488
+ },
466
489
  completeness: {
467
490
  missingLedgerCount,
468
491
  malformedLedgerCount,