@chankov/agent-fleet 2.0.7 → 2.0.8

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 (619) hide show
  1. package/{hermes → .pi/agent-fleet/hermes}/README.md +7 -7
  2. package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/activity.py +2 -2
  3. package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/coms_registry.py +2 -2
  4. package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/coms_send.py +1 -1
  5. package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/watch.py +2 -2
  6. package/{hermes → .pi/agent-fleet/hermes}/skills/hub-conductor/SKILL.md +1 -1
  7. package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/SKILL.md +3 -3
  8. package/{hooks → .pi/agent-fleet/hooks}/coms-stop-hook.mjs +2 -2
  9. package/{scripts → .pi/agent-fleet/scripts}/claude-code-preflight.ts +1 -1
  10. package/{scripts → .pi/agent-fleet/scripts}/coms-claude-bridge.ts +6 -6
  11. package/{scripts → .pi/agent-fleet/scripts}/coms-cli.ts +1 -1
  12. package/{scripts → .pi/agent-fleet/scripts}/coms-hermes-bridge.ts +1 -1
  13. package/{scripts → .pi/agent-fleet/scripts}/fleet-codex-read.py +5 -3
  14. package/{scripts → .pi/agent-fleet/scripts}/fleet.ts +1 -1
  15. package/{scripts → .pi/agent-fleet/scripts}/flow.ts +1 -1
  16. package/{scripts → .pi/agent-fleet/scripts}/lib/claude-bridge-core.ts +2 -2
  17. package/{scripts → .pi/agent-fleet/scripts}/lib/coms-envelope.ts +1 -1
  18. package/{scripts → .pi/agent-fleet/scripts}/lib/fleet-codex-transport.ts +1 -1
  19. package/{scripts → .pi/agent-fleet/scripts}/lib/herdr-layout.ts +3 -3
  20. package/{scripts → .pi/agent-fleet/scripts}/lib/hermes-bridge-core.ts +1 -1
  21. package/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  22. package/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  23. package/{scripts → .pi/agent-fleet/scripts}/lib/hermes-monitor-model.ts +1 -1
  24. package/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  25. package/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  26. package/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  27. package/{scripts → .pi/agent-fleet/scripts}/lib/monitor-env.ts +1 -1
  28. package/{scripts → .pi/agent-fleet/scripts}/lib/peer-launch.ts +3 -3
  29. package/{scripts → .pi/agent-fleet/scripts}/lib/persona-banner.ts +1 -1
  30. package/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  31. package/{scripts → .pi/agent-fleet/scripts}/lib/runtime-dependencies.js +1 -1
  32. package/{scripts → .pi/agent-fleet/scripts}/lib/spawn-stagger.ts +1 -1
  33. package/{scripts → .pi/agent-fleet/scripts}/lib/team-project.ts +1 -1
  34. package/{scripts → .pi/agent-fleet/scripts}/lib/team-snapshot.ts +2 -2
  35. package/{scripts → .pi/agent-fleet/scripts}/peer-banner.ts +5 -4
  36. package/{scripts → .pi/agent-fleet/scripts}/peer-launch.ts +7 -9
  37. package/{scripts → .pi/agent-fleet/scripts}/team-snapshot.ts +5 -5
  38. package/{scripts → .pi/agent-fleet/scripts}/team-up.ts +6 -6
  39. package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/agent-phase.ts +3 -3
  40. package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/envelopes.ts +1 -1
  41. package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/model-profile.ts +1 -1
  42. package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/personas.ts +2 -2
  43. package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/trace.ts +1 -1
  44. package/.pi/agents/peers.yaml +3 -1
  45. package/.pi/harnesses/agent-hub/README.md +1 -1
  46. package/.pi/harnesses/agent-hub/config/agents.ts +5 -1
  47. package/.pi/harnesses/agent-hub/debate-command.ts +1 -1
  48. package/.pi/harnesses/agent-hub/index.ts +19 -19
  49. package/.pi/harnesses/agent-hub/package.json +1 -1
  50. package/.pi/harnesses/agent-hub/peer-spawn-plan.ts +1 -1
  51. package/.pi/harnesses/agent-hub/tools/fleet-tools.ts +3 -5
  52. package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +2 -2
  53. package/.pi/harnesses/ask-user-remote/index.ts +2 -2
  54. package/.pi/harnesses/coms/package.json +1 -1
  55. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  56. package/.pi/harnesses/lib/spawned-peers.js +1 -1
  57. package/.pi/prompts/af-constraints.md +31 -0
  58. package/.versions/2.0.8/.pi/agent-fleet/hermes/README.md +347 -0
  59. package/.versions/2.0.8/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  60. package/.versions/2.0.8/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  61. package/.versions/2.0.8/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  62. package/.versions/2.0.8/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  63. package/.versions/2.0.8/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  64. package/.versions/2.0.8/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  65. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  66. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  67. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  68. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  69. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  70. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  71. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  72. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  73. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  74. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  75. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  76. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  77. package/.versions/2.0.8/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  78. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  79. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  80. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  81. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  82. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  83. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  84. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  85. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  86. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  87. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  88. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  89. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  90. package/.versions/2.0.8/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  91. package/.versions/2.0.8/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  92. package/.versions/2.0.8/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  93. package/.versions/2.0.8/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  94. package/.versions/2.0.8/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  95. package/.versions/2.0.8/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  96. package/.versions/2.0.8/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  97. package/.versions/2.0.8/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  98. package/.versions/2.0.8/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  99. package/.versions/2.0.8/.pi/agent-fleet/scripts/fleet.ts +216 -0
  100. package/.versions/2.0.8/.pi/agent-fleet/scripts/flow.ts +137 -0
  101. package/.versions/2.0.8/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  102. package/.versions/2.0.8/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  103. package/.versions/2.0.8/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  104. package/.versions/2.0.8/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  105. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  106. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  107. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  108. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  109. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  110. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  111. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  112. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  113. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
  114. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  115. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  116. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  117. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  118. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  119. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  120. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  121. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  122. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  123. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  124. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  125. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  126. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  127. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  128. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  129. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  130. package/.versions/2.0.8/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  131. package/.versions/2.0.8/.pi/agent-fleet/scripts/package-lock.json +35 -0
  132. package/.versions/2.0.8/.pi/agent-fleet/scripts/package.json +9 -0
  133. package/.versions/2.0.8/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  134. package/.versions/2.0.8/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  135. package/.versions/2.0.8/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  136. package/.versions/2.0.8/.pi/agent-fleet/scripts/team-up.ts +378 -0
  137. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +133 -0
  138. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  139. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  140. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  141. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  142. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  143. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  144. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  145. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  146. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  147. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  148. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  149. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  150. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  151. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  152. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  153. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  154. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  155. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  156. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  157. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  158. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  159. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  160. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  161. package/.versions/2.0.8/.pi/agent-fleet/scripts/workflows/wf-scout.ts +38 -0
  162. package/.versions/2.0.8/.pi/agents/dispatch-policy.yaml +32 -0
  163. package/.versions/2.0.8/.pi/agents/model-profiles.yaml +83 -0
  164. package/.versions/2.0.8/.pi/agents/peers.yaml +147 -0
  165. package/.versions/2.0.8/.pi/agents/teams.yaml +41 -0
  166. package/.versions/2.0.8/.pi/agents/voices.yaml +13 -0
  167. package/.versions/2.0.8/.pi/damage-control-rules.yaml +297 -0
  168. package/.versions/2.0.8/.pi/extensions/btw/README.md +120 -0
  169. package/.versions/2.0.8/.pi/extensions/btw/index.ts +914 -0
  170. package/.versions/2.0.8/.pi/extensions/btw/package.json +6 -0
  171. package/.versions/2.0.8/.pi/extensions/btw/state.js +179 -0
  172. package/.versions/2.0.8/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  173. package/.versions/2.0.8/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  174. package/.versions/2.0.8/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  175. package/.versions/2.0.8/.pi/extensions/compact-and-continue/README.md +42 -0
  176. package/.versions/2.0.8/.pi/extensions/compact-and-continue/index.ts +120 -0
  177. package/.versions/2.0.8/.pi/extensions/compact-and-continue/package.json +6 -0
  178. package/.versions/2.0.8/.pi/extensions/mcp-bridge/README.md +46 -0
  179. package/.versions/2.0.8/.pi/extensions/mcp-bridge/index.ts +206 -0
  180. package/.versions/2.0.8/.pi/extensions/mcp-bridge/package.json +6 -0
  181. package/.versions/2.0.8/.pi/extensions/package-lock.json +1175 -0
  182. package/.versions/2.0.8/.pi/extensions/package.json +9 -0
  183. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/README.md +205 -0
  184. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/config.ts +198 -0
  185. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  186. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/index.ts +248 -0
  187. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/package.json +6 -0
  188. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  189. package/.versions/2.0.8/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  190. package/.versions/2.0.8/.pi/harnesses/agent-hub/README.md +1203 -0
  191. package/.versions/2.0.8/.pi/harnesses/agent-hub/acceptance.ts +62 -0
  192. package/.versions/2.0.8/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  193. package/.versions/2.0.8/.pi/harnesses/agent-hub/artifacts.js +146 -0
  194. package/.versions/2.0.8/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  195. package/.versions/2.0.8/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  196. package/.versions/2.0.8/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  197. package/.versions/2.0.8/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
  198. package/.versions/2.0.8/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  199. package/.versions/2.0.8/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
  200. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  201. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  202. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  203. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  204. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  205. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  206. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  207. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  208. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  209. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  210. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  211. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  212. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  213. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  214. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  215. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/context.ts +43 -0
  216. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  217. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  218. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  219. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  220. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  221. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  222. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  223. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  224. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  225. package/.versions/2.0.8/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  226. package/.versions/2.0.8/.pi/harnesses/agent-hub/config/agents.ts +177 -0
  227. package/.versions/2.0.8/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
  228. package/.versions/2.0.8/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
  229. package/.versions/2.0.8/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  230. package/.versions/2.0.8/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
  231. package/.versions/2.0.8/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
  232. package/.versions/2.0.8/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  233. package/.versions/2.0.8/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  234. package/.versions/2.0.8/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  235. package/.versions/2.0.8/.pi/harnesses/agent-hub/context-window.js +106 -0
  236. package/.versions/2.0.8/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  237. package/.versions/2.0.8/.pi/harnesses/agent-hub/delegate.ts +446 -0
  238. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
  239. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  240. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
  241. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
  242. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
  243. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
  244. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
  245. package/.versions/2.0.8/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  246. package/.versions/2.0.8/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  247. package/.versions/2.0.8/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
  248. package/.versions/2.0.8/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  249. package/.versions/2.0.8/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  250. package/.versions/2.0.8/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  251. package/.versions/2.0.8/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
  252. package/.versions/2.0.8/.pi/harnesses/agent-hub/footer.ts +30 -0
  253. package/.versions/2.0.8/.pi/harnesses/agent-hub/helpers.ts +266 -0
  254. package/.versions/2.0.8/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
  255. package/.versions/2.0.8/.pi/harnesses/agent-hub/index.ts +2151 -0
  256. package/.versions/2.0.8/.pi/harnesses/agent-hub/input/completions.ts +76 -0
  257. package/.versions/2.0.8/.pi/harnesses/agent-hub/input/shortcuts.ts +18 -0
  258. package/.versions/2.0.8/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
  259. package/.versions/2.0.8/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  260. package/.versions/2.0.8/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  261. package/.versions/2.0.8/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  262. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  263. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  264. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  265. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  266. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  267. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  268. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  269. package/.versions/2.0.8/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  270. package/.versions/2.0.8/.pi/harnesses/agent-hub/no-progress.ts +76 -0
  271. package/.versions/2.0.8/.pi/harnesses/agent-hub/package.json +7 -0
  272. package/.versions/2.0.8/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  273. package/.versions/2.0.8/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  274. package/.versions/2.0.8/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  275. package/.versions/2.0.8/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  276. package/.versions/2.0.8/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  277. package/.versions/2.0.8/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
  278. package/.versions/2.0.8/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  279. package/.versions/2.0.8/.pi/harnesses/agent-hub/presentation.ts +48 -0
  280. package/.versions/2.0.8/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
  281. package/.versions/2.0.8/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
  282. package/.versions/2.0.8/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  283. package/.versions/2.0.8/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
  284. package/.versions/2.0.8/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  285. package/.versions/2.0.8/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  286. package/.versions/2.0.8/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
  287. package/.versions/2.0.8/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
  288. package/.versions/2.0.8/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  289. package/.versions/2.0.8/.pi/harnesses/agent-hub/return-contract.js +293 -0
  290. package/.versions/2.0.8/.pi/harnesses/agent-hub/return-extract.js +75 -0
  291. package/.versions/2.0.8/.pi/harnesses/agent-hub/review-findings.js +102 -0
  292. package/.versions/2.0.8/.pi/harnesses/agent-hub/run-budget.js +537 -0
  293. package/.versions/2.0.8/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  294. package/.versions/2.0.8/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  295. package/.versions/2.0.8/.pi/harnesses/agent-hub/scope-gate.js +123 -0
  296. package/.versions/2.0.8/.pi/harnesses/agent-hub/session-health.js +110 -0
  297. package/.versions/2.0.8/.pi/harnesses/agent-hub/session-start.ts +42 -0
  298. package/.versions/2.0.8/.pi/harnesses/agent-hub/spawn.ts +404 -0
  299. package/.versions/2.0.8/.pi/harnesses/agent-hub/timeline.ts +54 -0
  300. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
  301. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  302. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/context.ts +134 -0
  303. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
  304. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +273 -0
  305. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  306. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  307. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
  308. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
  309. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
  310. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  311. package/.versions/2.0.8/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
  312. package/.versions/2.0.8/.pi/harnesses/agent-hub/types.ts +63 -0
  313. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
  314. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
  315. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
  316. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +125 -0
  317. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/grid.ts +42 -0
  318. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  319. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  320. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  321. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/running-strip.ts +139 -0
  322. package/.versions/2.0.8/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
  323. package/.versions/2.0.8/.pi/harnesses/agent-hub/version.ts +42 -0
  324. package/.versions/2.0.8/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  325. package/.versions/2.0.8/.pi/harnesses/agent-hub/work-mode.ts +167 -0
  326. package/.versions/2.0.8/.pi/harnesses/ask-user-remote/README.md +59 -0
  327. package/.versions/2.0.8/.pi/harnesses/ask-user-remote/index.ts +558 -0
  328. package/.versions/2.0.8/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  329. package/.versions/2.0.8/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  330. package/.versions/2.0.8/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
  331. package/.versions/2.0.8/.pi/harnesses/coms/README.md +100 -0
  332. package/.versions/2.0.8/.pi/harnesses/coms/index.ts +282 -0
  333. package/.versions/2.0.8/.pi/harnesses/coms/package.json +7 -0
  334. package/.versions/2.0.8/.pi/harnesses/coms/version.ts +42 -0
  335. package/.versions/2.0.8/.pi/harnesses/damage-control-continue/README.md +135 -0
  336. package/.versions/2.0.8/.pi/harnesses/damage-control-continue/index.ts +541 -0
  337. package/.versions/2.0.8/.pi/harnesses/damage-control-continue/package.json +7 -0
  338. package/.versions/2.0.8/.pi/harnesses/damage-control-continue/version.ts +42 -0
  339. package/.versions/2.0.8/.pi/harnesses/lib/coms-core-io.ts +385 -0
  340. package/.versions/2.0.8/.pi/harnesses/lib/coms-core.ts +577 -0
  341. package/.versions/2.0.8/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  342. package/.versions/2.0.8/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
  343. package/.versions/2.0.8/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
  344. package/.versions/2.0.8/.pi/harnesses/lib/context-budget-view.ts +107 -0
  345. package/.versions/2.0.8/.pi/harnesses/lib/context-budget.ts +114 -0
  346. package/.versions/2.0.8/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  347. package/.versions/2.0.8/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  348. package/.versions/2.0.8/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  349. package/.versions/2.0.8/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  350. package/.versions/2.0.8/.pi/harnesses/lib/fleet-dashboard-ops.ts +161 -0
  351. package/.versions/2.0.8/.pi/harnesses/lib/fleet-dashboard-view.ts +148 -0
  352. package/.versions/2.0.8/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
  353. package/.versions/2.0.8/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  354. package/.versions/2.0.8/.pi/harnesses/lib/fleet-panel.ts +34 -0
  355. package/.versions/2.0.8/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  356. package/.versions/2.0.8/.pi/harnesses/lib/fleet-selection.ts +24 -0
  357. package/.versions/2.0.8/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  358. package/.versions/2.0.8/.pi/harnesses/lib/herdr-client.ts +472 -0
  359. package/.versions/2.0.8/.pi/harnesses/lib/herdr-presence.ts +399 -0
  360. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  361. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  362. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  363. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  364. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  365. package/.versions/2.0.8/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  366. package/.versions/2.0.8/.pi/harnesses/lib/spawned-peers.js +190 -0
  367. package/.versions/2.0.8/.pi/harnesses/lib/update-check.ts +222 -0
  368. package/.versions/2.0.8/.pi/harnesses/package-lock.json +2039 -0
  369. package/.versions/2.0.8/.pi/harnesses/package.json +10 -0
  370. package/.versions/2.0.8/.pi/prompts/af-build.md +24 -0
  371. package/.versions/2.0.8/.pi/prompts/af-code-simplify.md +22 -0
  372. package/.versions/2.0.8/.pi/prompts/af-constraints.md +31 -0
  373. package/.versions/2.0.8/.pi/prompts/af-plan.md +17 -0
  374. package/.versions/2.0.8/.pi/prompts/af-review.md +16 -0
  375. package/.versions/2.0.8/.pi/prompts/af-set-hermes-telegram.md +15 -0
  376. package/.versions/2.0.8/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  377. package/.versions/2.0.8/.pi/prompts/af-ship.md +17 -0
  378. package/.versions/2.0.8/.pi/prompts/af-spec.md +15 -0
  379. package/.versions/2.0.8/.pi/prompts/af-test.md +19 -0
  380. package/.versions/2.0.8/.pi/skills/bowser/SKILL.md +145 -0
  381. package/.versions/2.0.8/.version +1 -0
  382. package/.versions/2.0.8/agents/architect.md +25 -0
  383. package/.versions/2.0.8/agents/bowser.md +28 -0
  384. package/.versions/2.0.8/agents/builder.md +56 -0
  385. package/.versions/2.0.8/agents/code-reviewer.md +210 -0
  386. package/.versions/2.0.8/agents/deep-researcher.md +33 -0
  387. package/.versions/2.0.8/agents/documenter.md +23 -0
  388. package/.versions/2.0.8/agents/orchestrator.md +23 -0
  389. package/.versions/2.0.8/agents/plan-reviewer.md +84 -0
  390. package/.versions/2.0.8/agents/planner.md +106 -0
  391. package/.versions/2.0.8/agents/releaser.md +25 -0
  392. package/.versions/2.0.8/agents/researcher.md +31 -0
  393. package/.versions/2.0.8/agents/security-auditor.md +168 -0
  394. package/.versions/2.0.8/agents/test-engineer.md +154 -0
  395. package/.versions/2.0.8/agents/web-debugger.md +44 -0
  396. package/.versions/2.0.8/agents/web-performance-auditor.md +194 -0
  397. package/.versions/2.0.8/bin/catalog/harness-runtime-closure.json +32 -0
  398. package/.versions/2.0.8/codex/fleet-session-client/SKILL.md +34 -0
  399. package/.versions/2.0.8/codex/fleet-session-client.zip +0 -0
  400. package/.versions/2.0.8/docs/ARCHITECTURE.md +416 -0
  401. package/.versions/2.0.8/docs/agent-fleet-setup.md +568 -0
  402. package/.versions/2.0.8/docs/claude-code-coms-bridge.md +134 -0
  403. package/.versions/2.0.8/docs/codex-session-bridge.md +219 -0
  404. package/.versions/2.0.8/docs/coms-hermes-bridge.md +188 -0
  405. package/.versions/2.0.8/docs/getting-started.md +126 -0
  406. package/.versions/2.0.8/docs/npm-install.md +356 -0
  407. package/.versions/2.0.8/docs/pi-extensions.md +446 -0
  408. package/.versions/2.0.8/docs/pi-setup.md +76 -0
  409. package/.versions/2.0.8/docs/skill-anatomy.md +150 -0
  410. package/.versions/2.0.8/install-manifest.json +2991 -0
  411. package/.versions/2.0.8/justfile +247 -0
  412. package/.versions/2.0.8/manifest-meta.json +970 -0
  413. package/.versions/2.0.8/references/accessibility-checklist.md +160 -0
  414. package/.versions/2.0.8/references/communication-contract.md +26 -0
  415. package/.versions/2.0.8/references/definition-of-done.md +67 -0
  416. package/.versions/2.0.8/references/fleet-coordination-patterns.md +171 -0
  417. package/.versions/2.0.8/references/observability-checklist.md +92 -0
  418. package/.versions/2.0.8/references/orchestration-patterns.md +370 -0
  419. package/.versions/2.0.8/references/performance-checklist.md +236 -0
  420. package/.versions/2.0.8/references/prompting-patterns.md +380 -0
  421. package/.versions/2.0.8/references/security-checklist.md +245 -0
  422. package/.versions/2.0.8/references/testing-patterns.md +235 -0
  423. package/.versions/2.0.8/references/workflow-authoring.md +304 -0
  424. package/.versions/2.0.8/skills/_internal/grilling.md +59 -0
  425. package/.versions/2.0.8/skills/browser-testing-with-devtools/SKILL.md +351 -0
  426. package/.versions/2.0.8/skills/code-review-and-quality/SKILL.md +396 -0
  427. package/.versions/2.0.8/skills/compound-learning/SKILL.md +137 -0
  428. package/.versions/2.0.8/skills/constraint-driven-development/SKILL.md +338 -0
  429. package/.versions/2.0.8/skills/constraint-driven-development/references/floor-guard.md +99 -0
  430. package/.versions/2.0.8/skills/context-engineering/SKILL.md +341 -0
  431. package/.versions/2.0.8/skills/deprecation-and-migration/SKILL.md +247 -0
  432. package/.versions/2.0.8/skills/designing-agents/SKILL.md +394 -0
  433. package/.versions/2.0.8/skills/designing-agents/pi-harness-authoring.md +222 -0
  434. package/.versions/2.0.8/skills/drafting-workflows/SKILL.md +143 -0
  435. package/.versions/2.0.8/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  436. package/.versions/2.0.8/skills/frontend-ui-engineering/SKILL.md +328 -0
  437. package/.versions/2.0.8/skills/git-workflow-and-versioning/SKILL.md +316 -0
  438. package/.versions/2.0.8/skills/idea-refine/SKILL.md +182 -0
  439. package/.versions/2.0.8/skills/idea-refine/examples.md +238 -0
  440. package/.versions/2.0.8/skills/idea-refine/frameworks.md +99 -0
  441. package/.versions/2.0.8/skills/idea-refine/refinement-criteria.md +113 -0
  442. package/.versions/2.0.8/skills/idea-refine/scripts/idea-refine.sh +15 -0
  443. package/.versions/2.0.8/skills/incremental-implementation/SKILL.md +302 -0
  444. package/.versions/2.0.8/skills/interview-me/SKILL.md +226 -0
  445. package/.versions/2.0.8/skills/orchestration-verification/SKILL.md +181 -0
  446. package/.versions/2.0.8/skills/peer-coms/SKILL.md +90 -0
  447. package/.versions/2.0.8/skills/performance-optimization/SKILL.md +496 -0
  448. package/.versions/2.0.8/skills/planning-and-task-breakdown/SKILL.md +289 -0
  449. package/.versions/2.0.8/skills/security-and-hardening/SKILL.md +524 -0
  450. package/.versions/2.0.8/skills/spec-driven-development/SKILL.md +295 -0
  451. package/.versions/2.0.8/skills/using-agent-skills/SKILL.md +198 -0
  452. package/.versions/2.0.8/vendor/agent-skills-upstream/LICENSE +21 -0
  453. package/.versions/2.0.8/vendor/agent-skills-upstream/README.md +430 -0
  454. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  455. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  456. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  457. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  458. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  459. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  460. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  461. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  462. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  463. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  464. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  465. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  466. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  467. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  468. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  469. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  470. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  471. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  472. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  473. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  474. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  475. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  476. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  477. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  478. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  479. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  480. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  481. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  482. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  483. package/.versions/2.0.8/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  484. package/CHANGELOG.md +39 -0
  485. package/README.md +10 -9
  486. package/bin/catalog/harness-runtime-closure.json +23 -22
  487. package/bin/cli.js +24 -1
  488. package/bin/lib/apply.js +6 -2
  489. package/bin/lib/detect-agent.js +1 -1
  490. package/bin/lib/doctor.js +3 -3
  491. package/bin/lib/manifest.js +23 -16
  492. package/bin/lib/path-boundaries.js +96 -0
  493. package/bin/lib/personas.js +15 -2
  494. package/bin/lib/set-hermes-telegram.js +2 -2
  495. package/bin/lib/set-hermes-watchdog.js +1 -1
  496. package/bin/lib/state.js +5 -1
  497. package/bin/lib/verify.js +43 -5
  498. package/bin/snapshot-version.js +6 -6
  499. package/codex/fleet-session-client/SKILL.md +3 -3
  500. package/docs/ARCHITECTURE.md +29 -20
  501. package/docs/MIGRATION-agent-fleet.md +11 -7
  502. package/docs/agent-fleet-setup.md +9 -2
  503. package/docs/claude-code-coms-bridge.md +10 -9
  504. package/docs/codex-session-bridge.md +18 -18
  505. package/docs/coms-hermes-bridge.md +6 -6
  506. package/docs/hermes-watchdog-supervisor.md +1 -1
  507. package/docs/npm-install.md +30 -1
  508. package/docs/pi-extensions.md +6 -6
  509. package/docs/workflows.md +9 -5
  510. package/install-manifest.json +202 -97
  511. package/justfile +19 -19
  512. package/manifest-meta.json +50 -38
  513. package/package.json +26 -26
  514. package/references/observability-checklist.md +1 -0
  515. package/references/performance-checklist.md +83 -0
  516. package/references/prompting-patterns.md +1 -1
  517. package/references/security-checklist.md +85 -19
  518. package/references/testing-patterns.md +12 -13
  519. package/references/workflow-authoring.md +5 -5
  520. package/skills/code-review-and-quality/SKILL.md +17 -2
  521. package/skills/constraint-driven-development/SKILL.md +338 -0
  522. package/skills/constraint-driven-development/references/floor-guard.md +99 -0
  523. package/skills/context-engineering/SKILL.md +52 -2
  524. package/skills/deprecation-and-migration/SKILL.md +42 -1
  525. package/skills/designing-agents/SKILL.md +12 -12
  526. package/skills/drafting-workflows/SKILL.md +6 -6
  527. package/skills/drafting-workflows/scripts/make-workflow.ts +3 -3
  528. package/skills/frontend-ui-engineering/SKILL.md +2 -2
  529. package/skills/git-workflow-and-versioning/SKILL.md +1 -1
  530. package/skills/incremental-implementation/SKILL.md +13 -9
  531. package/skills/peer-coms/SKILL.md +4 -4
  532. package/skills/performance-optimization/SKILL.md +152 -6
  533. package/skills/planning-and-task-breakdown/SKILL.md +32 -8
  534. package/skills/security-and-hardening/SKILL.md +84 -21
  535. package/skills/spec-driven-development/SKILL.md +41 -2
  536. package/skills/using-agent-skills/SKILL.md +3 -2
  537. package/vendor/agent-skills-upstream/README.md +427 -8
  538. package/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +73 -0
  539. package/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +2 -2
  540. package/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  541. package/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  542. package/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +49 -1
  543. package/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +4 -4
  544. package/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +1 -1
  545. package/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +12 -2
  546. package/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +3 -3
  547. package/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +1 -1
  548. package/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +1 -1
  549. package/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +9 -9
  550. package/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +36 -1
  551. package/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +151 -5
  552. package/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +32 -9
  553. package/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +64 -7
  554. package/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +26 -6
  555. package/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +23 -1
  556. package/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +42 -3
  557. package/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +18 -3
  558. package/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +3 -2
  559. package/scripts/lib/hermes-monitor-events.ts +0 -1
  560. package/scripts/lib/hermes-monitor-herdr.ts +0 -2
  561. package/scripts/lib/hermes-monitor-registry.ts +0 -2
  562. package/scripts/lib/hermes-monitor-socket.ts +0 -2
  563. package/scripts/lib/hermes-monitor-store.ts +0 -2
  564. /package/{hermes → .pi/agent-fleet/hermes}/desktop-plugins/agent-fleet-herdr/plugin.js +0 -0
  565. /package/{hermes → .pi/agent-fleet/hermes}/desktop-plugins/agent-fleet-herdr/presentation.js +0 -0
  566. /package/{hermes → .pi/agent-fleet/hermes}/desktop-plugins/agent-fleet-monitor/plugin.js +0 -0
  567. /package/{hermes → .pi/agent-fleet/hermes}/desktop-plugins/agent-fleet-monitor/state.js +0 -0
  568. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/herdr_source.py +0 -0
  569. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/manifest.json +0 -0
  570. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/plugin_api.py +0 -0
  571. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/sessions.py +0 -0
  572. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/dashboard/tasks.py +0 -0
  573. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-herdr/plugin.yaml +0 -0
  574. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-monitor/dashboard/adapter.py +0 -0
  575. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-monitor/dashboard/dist/index.js +0 -0
  576. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-monitor/dashboard/manifest.json +0 -0
  577. /package/{hermes → .pi/agent-fleet/hermes}/plugins/agent-fleet-monitor/dashboard/plugin_api.py +0 -0
  578. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-liaison/SKILL.md +0 -0
  579. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/manifest.json +0 -0
  580. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog.py +0 -0
  581. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_actions.py +0 -0
  582. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_contract.py +0 -0
  583. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_delivery.py +0 -0
  584. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_engine.py +0 -0
  585. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_judgment.py +0 -0
  586. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_recovery.py +0 -0
  587. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_state.py +0 -0
  588. /package/{hermes → .pi/agent-fleet/hermes}/skills/hub-watchdog/scripts/watchdog_transport.py +0 -0
  589. /package/{scripts → .pi/agent-fleet/scripts}/fleet-codex-client.ts +0 -0
  590. /package/{scripts → .pi/agent-fleet/scripts}/hermes-watchdog-capability-probe.ts +0 -0
  591. /package/{scripts → .pi/agent-fleet/scripts}/lib/fake-herdr-server.ts +0 -0
  592. /package/{scripts → .pi/agent-fleet/scripts}/lib/fleet-codex-catalog.ts +0 -0
  593. /package/{scripts → .pi/agent-fleet/scripts}/lib/fleet-codex-operations.ts +0 -0
  594. /package/{scripts → .pi/agent-fleet/scripts}/lib/fleet-codex-session.ts +0 -0
  595. /package/{scripts → .pi/agent-fleet/scripts}/lib/fleet-command.ts +0 -0
  596. /package/{scripts → .pi/agent-fleet/scripts}/lib/flow-command.ts +0 -0
  597. /package/{scripts → .pi/agent-fleet/scripts}/lib/flow-maintenance.ts +0 -0
  598. /package/{scripts → .pi/agent-fleet/scripts}/package-lock.json +0 -0
  599. /package/{scripts → .pi/agent-fleet/scripts}/package.json +0 -0
  600. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/changes.ts +0 -0
  601. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/debate.ts +0 -0
  602. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/env.ts +0 -0
  603. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/gates.ts +0 -0
  604. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/git.ts +0 -0
  605. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/merge.ts +0 -0
  606. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/model-visibility.ts +0 -0
  607. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/permissions.ts +0 -0
  608. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/poll.ts +0 -0
  609. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/quality.ts +0 -0
  610. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/run.ts +0 -0
  611. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/voices.ts +0 -0
  612. /package/{scripts → .pi/agent-fleet/scripts}/workflows/lib/writer-lease.ts +0 -0
  613. /package/{scripts → .pi/agent-fleet/scripts}/workflows/tsconfig.json +0 -0
  614. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-build-test.ts +0 -0
  615. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-debate.ts +0 -0
  616. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-document.ts +0 -0
  617. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-poll.ts +0 -0
  618. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-quality.ts +0 -0
  619. /package/{scripts → .pi/agent-fleet/scripts}/workflows/wf-scout.ts +0 -0
@@ -22,7 +22,7 @@ Quick reference for web application security. Use alongside the `security-and-ha
22
22
 
23
23
  Before reaching for controls, spend five minutes thinking like an attacker:
24
24
 
25
- - [ ] Trust boundaries mapped (requests, uploads, webhooks, third-party APIs, LLM output)
25
+ - [ ] Trust boundaries mapped (requests, uploads, webhooks, third-party APIs, LLM output, and local values written by processes you don't control)
26
26
  - [ ] Assets named (credentials, PII, payment data, admin actions, money movement)
27
27
  - [ ] STRIDE run per boundary (Spoofing, Tampering, Repudiation, Info disclosure, DoS, Elevation)
28
28
  - [ ] Abuse cases written next to use cases ("how would I misuse this?")
@@ -63,6 +63,46 @@ Before reaching for controls, spend five minutes thinking like an attacker:
63
63
  - [ ] HTML output encoded (use framework auto-escaping)
64
64
  - [ ] URLs validated before redirect (prevent open redirect)
65
65
  - [ ] Server-side URL fetches allowlisted; private/reserved IPs blocked (prevent SSRF)
66
+ - [ ] Destructive path operations (delete/move/overwrite): symlinks resolved, allowlisted root, minimum depth, ownership evidence read before the call
67
+
68
+ ### Destructive Path Operations
69
+
70
+ Containment for a target named by data. Resolve first, then decide — and treat the
71
+ result as a candidate, not as authorization:
72
+
73
+ ```typescript
74
+ import { realpath, readFile } from 'node:fs/promises';
75
+ import { resolve, relative, isAbsolute, join, sep } from 'node:path';
76
+
77
+ const ALLOWED_ROOTS = ['/var/lib/myapp/sessions']; // an allowlist, not a pattern
78
+ const MIN_DEPTH = 1; // so a root is never the target
79
+
80
+ async function resolveDeletable(candidate: string, expectedOwner: string) {
81
+ const target = await realpath(resolve(candidate)); // symlinks resolved BEFORE the check
82
+ const inRoot = ALLOWED_ROOTS.some((root) => {
83
+ const rel = relative(root, target);
84
+ // `rel === '..'` / `'../'` only — a plain `startsWith('..')` would also
85
+ // reject a legitimate child named `..cache`.
86
+ if (rel === '' || rel === '..' || rel.startsWith(`..${sep}`) || isAbsolute(rel)) return false;
87
+ return rel.split(sep).length >= MIN_DEPTH;
88
+ });
89
+ if (!inRoot) throw new Error(`refusing: outside allowed roots (${target})`);
90
+
91
+ const owner = await readFile(join(target, '.owner'), 'utf8').catch(() => null);
92
+ if (owner?.trim() !== expectedOwner) throw new Error(`refusing: unproven owner (${target})`);
93
+ return target;
94
+ }
95
+ ```
96
+
97
+ What this does not do, and must be said where the snippet is copied from:
98
+
99
+ - **The marker is self-attestation.** Anything that can write inside the root can write
100
+ `.owner`. `expectedOwner` has to come from authenticated state, and the marker needs
101
+ integrity protection (restrictive ownership, or a MAC) before it is authorization
102
+ rather than a consistency check against a misderived target.
103
+ - **Returning a path leaves a check/use race.** Where an untrusted process can swap an
104
+ ancestor between the check and the call, operate on a descriptor with no-follow,
105
+ beneath-the-root semantics, or guarantee the hierarchy is immutable for the duration.
66
106
 
67
107
  ## Security Headers
68
108
 
@@ -101,24 +141,50 @@ cors({ origin: '*' }) // Allows any origin
101
141
 
102
142
  ## Dependency Security
103
143
 
104
- ```bash
105
- # Audit dependencies
106
- npm audit
107
-
108
- # Fix automatically where possible
109
- npm audit fix
110
-
111
- # Check for critical vulnerabilities
112
- npm audit --audit-level=critical
144
+ First locate the **installation boundary**. If the package is matched by a parent `workspaces` declaration, use that workspace root; otherwise use the nearest project root that owns both its manifest and dependency graph. At that boundary, corroborate `packageManager` (when present), the lockfile, and CI commands. Stop if they disagree or competing manager lockfiles exist there. A nested project is independent only when it is outside the parent workspace; independent subprojects may legitimately use different managers.
113
145
 
114
- # Keep dependencies updated
115
- npx npm-check-updates
116
- ```
117
-
118
- **Supply-chain hygiene** (`npm audit` won't catch malicious packages):
119
- - [ ] Lockfile committed; CI installs with `npm ci` (not `npm install`)
120
- - [ ] New dependencies reviewed (maintenance, downloads, `postinstall` scripts)
121
- - [ ] No typosquats (`cross-env` vs `crossenv`, `react-dom` vs `reactdom`)
146
+ | Manager/version signal | Frozen/immutable CI install | Known-advisory audit |
147
+ |---|---|---|
148
+ | npm (`package-lock.json` or `npm-shrinkwrap.json`) | `npm ci` | `npm audit` |
149
+ | pnpm | `pnpm install --frozen-lockfile` | `pnpm audit` |
150
+ | Yarn 2+ | `yarn install --immutable` | `yarn npm audit -A -R` |
151
+ | Yarn 1 | `yarn install --frozen-lockfile` | `yarn audit` |
152
+
153
+ For an unlisted manager or version, consult its official documentation; do not substitute another manager's commands or newer defaults.
154
+
155
+ ### Install-Script Gate
156
+
157
+ Never discover dependency lifecycle scripts by first executing an ordinary install on a client whose defaults have not been verified.
158
+
159
+ 1. Bootstrap with dependency scripts disabled, or with a documented default-deny policy plus fail-closed enforcement.
160
+ 2. Inspect the exact script source and package version before approval.
161
+ 3. Record the narrowest native allow/deny policy at the installation boundary and commit it.
162
+ 4. Run a clean frozen/immutable install with that policy and verify the required packages still build.
163
+
164
+ **Point-in-time snapshot:** Package-manager defaults and command names change quickly. Verify this matrix against the pinned client's current official documentation before relying on it.
165
+
166
+ | Manager version | Native policy |
167
+ |---|---|
168
+ | npm without verified granular approvals | Bootstrap with `npm ci --ignore-scripts`, or persist `ignore-scripts=true` when project-wide blocking is intended. Keep scripts disabled or deliberately upgrade before allowing any reviewed dependency script. |
169
+ | npm 11.18.x (verified on 11.18.0) | Unreviewed dependency scripts run with a warning by default. Enforce `strict-allow-scripts=true` before a normal install, then use the workspace-unaware `npm install-scripts ls` from the installation boundary; keep approvals version-pinned and denials name-wide. |
170
+ | npm 12.x (verified on 12.0.1) | Unreviewed dependency scripts are skipped by default; `strict-allow-scripts=true` makes their presence fail the install before execution. Use the same `npm install-scripts` review and approval flow. |
171
+ | pnpm 11+ | Use `pnpm approve-builds` and commit `allowBuilds` decisions; `strictDepBuilds` defaults to `true`, so unreviewed builds fail. |
172
+ | pnpm 10.26–10.x | Configure `allowBuilds` explicitly, or use `pnpm approve-builds` with the legacy `onlyBuiltDependencies` / `ignoredBuiltDependencies` lists. Set `strictDepBuilds: true`; its v10 default is `false`. |
173
+ | pnpm 10.1–10.25 | `pnpm approve-builds` records the legacy lists; enable `strictDepBuilds` where supported (10.3+). |
174
+ | Older or unknown pnpm | Bootstrap with `pnpm install --frozen-lockfile --ignore-scripts`. Keep scripts disabled unless the pinned version documents an enforceable policy. |
175
+ | Yarn 4.14+ | Dependency postinstalls are disabled by default. Grant only required exceptions with top-level `dependenciesMeta.<package>.built: true`. |
176
+ | Yarn 2–4.13 | Set `enableScripts: false` in `.yarnrc.yml`, then grant only required exceptions with top-level `dependenciesMeta.<package>.built: true`; do not enable scripts globally. |
177
+ | Yarn 1 | Bootstrap with `yarn install --ignore-scripts`; keep scripts disabled unless each required exception is reviewed under the pinned client's documented workflow. |
178
+
179
+ Authoritative checks: [npm install-scripts](https://docs.npmjs.com/cli/v11/commands/npm-install-scripts/), [install policy](https://docs.npmjs.com/cli/v11/commands/npm-install/), and [CLI releases](https://github.com/npm/cli/releases); [pnpm approve-builds](https://pnpm.io/cli/approve-builds) and [build settings](https://pnpm.io/settings#allowbuilds); [Yarn security](https://yarnpkg.com/features/security) and [manifest](https://yarnpkg.com/configuration/manifest#dependenciesMeta).
180
+
181
+ **Supply-chain hygiene** (advisory audits do not catch newly malicious packages):
182
+ - [ ] Exactly one authoritative lockfile per project/workspace root is committed and CI never rewrites it
183
+ - [ ] Critical/high findings are triaged for reachability; deferrals have a reason and review date
184
+ - [ ] Forced audit remediation (`npm audit fix --force` or equivalent) is never automatic; remediation diffs and changelogs are reviewed
185
+ - [ ] Registry signatures/provenance are verified where the manager supports it
186
+ - [ ] Dependency lifecycle scripts are blocked before first execution and approved only through the pinned manager's native policy
187
+ - [ ] New dependencies are reviewed for ownership, maintenance, release age, provenance, transitive graph, and typosquatting
122
188
 
123
189
  ## AI / LLM Security
124
190
 
@@ -155,7 +221,7 @@ res.status(500).json({
155
221
  | 3 | Injection | Parameterized queries, input validation |
156
222
  | 4 | Insecure Design | Threat modeling, spec-driven development |
157
223
  | 5 | Security Misconfiguration | Security headers, minimal permissions, audit deps |
158
- | 6 | Vulnerable Components | `npm audit`, keep deps updated, minimal deps |
224
+ | 6 | Vulnerable Components | The ecosystem's dependency audit (`npm audit`, `pip-audit`, ...), keep deps updated, minimal deps |
159
225
  | 7 | Auth Failures | Strong passwords, rate limiting, session management |
160
226
  | 8 | Data Integrity Failures | Verify updates/dependencies, signed artifacts |
161
227
  | 9 | Logging Failures | Log security events, don't log secrets |
@@ -1,6 +1,6 @@
1
- # Testing Patterns Reference
1
+ # Testing Patterns Reference (JavaScript/TypeScript)
2
2
 
3
- Quick reference for common testing patterns across the stack. Use alongside the `test-driven-development` skill.
3
+ Quick reference of JavaScript/TypeScript testing patterns — Jest, React Testing Library, Supertest, and Playwright — illustrating the universal principles from the `test-driven-development` skill. The principles (Arrange-Act-Assert, naming, mock discipline, anti-patterns) apply in any ecosystem; the syntax and tooling shown here are JS/TS-specific. In another stack, follow the same principles with the repository's own test framework and commands.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -202,23 +202,22 @@ import { test, expect } from '@playwright/test';
202
202
  test('user can create and complete a task', async ({ page }) => {
203
203
  // Navigate and authenticate
204
204
  await page.goto('/');
205
- await page.fill('[name="email"]', 'test@example.com');
206
- await page.fill('[name="password"]', 'testpass123');
207
- await page.click('button:has-text("Log in")');
205
+ await page.getByRole('textbox', { name: /email/i }).fill('test@example.com');
206
+ await page.getByLabel(/password/i).fill('testpass123');
207
+ await page.getByRole('button', { name: /log in/i }).click();
208
208
 
209
209
  // Create a task
210
- await page.click('button:has-text("New Task")');
211
- await page.fill('[name="title"]', 'Buy groceries');
212
- await page.click('button:has-text("Create")');
210
+ await page.getByRole('button', { name: /new task/i }).click();
211
+ await page.getByRole('textbox', { name: /title/i }).fill('Buy groceries');
212
+ await page.getByRole('button', { name: /create/i }).click();
213
213
 
214
214
  // Verify task appears
215
- await expect(page.locator('text=Buy groceries')).toBeVisible();
215
+ const task = page.getByRole('listitem', { name: /buy groceries/i });
216
+ await expect(task).toBeVisible();
216
217
 
217
218
  // Complete the task
218
- await page.click('[aria-label="Complete Buy groceries"]');
219
- await expect(page.locator('text=Buy groceries')).toHaveCSS(
220
- 'text-decoration-line', 'line-through'
221
- );
219
+ await task.getByRole('checkbox', { name: /complete buy groceries/i }).check();
220
+ await expect(task).toHaveCSS('text-decoration-line', 'line-through');
222
221
  });
223
222
  ```
224
223
 
@@ -19,7 +19,7 @@ just flow <name> [args] [--allow-dirty] [--run-id <id>] [--dry-run]
19
19
  The equivalent raw entry point is:
20
20
 
21
21
  ```text
22
- node --experimental-strip-types scripts/flow.ts <name> [args]
22
+ node --experimental-strip-types .pi/agent-fleet/scripts/flow.ts <name> [args]
23
23
  ```
24
24
 
25
25
  The script loads the repository `.env` without replacing variables already present in `process.env`.
@@ -230,7 +230,7 @@ Workflow name breaks exact score ties.
230
230
  The selected workflow is copied in full.
231
231
  The phase docstring block is replaced and workflow/preflight symbols are renamed from the source identity to the unique camel-cased identity derived from the new file name.
232
232
  For `wf-plan-build-review.ts`, the required entry is `planBuildReviewWorkflow` (and optional `planBuildReviewWorkflowPreflight`).
233
- Built-in flows are listed in `scripts/flow.ts`; for a non-built-in name, the dispatcher discovers `wf-<name>.ts` on demand by this exact export convention. A successful draft is therefore immediately reachable through `just flow <name>` without editing the built-in map.
233
+ Built-in flows are listed in `.pi/agent-fleet/scripts/flow.ts`; for a non-built-in name, the dispatcher discovers `wf-<name>.ts` on demand by this exact export convention. A successful draft is therefore immediately reachable through `just flow <name>` without editing the built-in map.
234
234
  The generator never overwrites an existing workflow.
235
235
 
236
236
  Generated TODOs are limited to actual judgment:
@@ -248,7 +248,7 @@ A successful handoff names both the generated file and copied source.
248
248
 
249
249
  ## Scoped TypeScript
250
250
 
251
- `scripts/workflows/tsconfig.json` includes only workflow production TypeScript.
251
+ `.pi/agent-fleet/scripts/workflows/tsconfig.json` includes only workflow production TypeScript.
252
252
  Workflow imports of hub seams cross typed dynamic boundaries so the compiler does not absorb the hub program.
253
253
  Tests remain checked by Node's runtime test execution rather than expanding the scoped project.
254
254
  The project emits nothing.
@@ -257,12 +257,12 @@ No typecheck failure requires edits under `.pi/harnesses/**`.
257
257
  The canonical command is:
258
258
 
259
259
  ```text
260
- npx tsc -p scripts/workflows/tsconfig.json --noEmit
260
+ npx tsc -p .pi/agent-fleet/scripts/workflows/tsconfig.json --noEmit
261
261
  ```
262
262
 
263
263
  ## Package and install surface
264
264
 
265
- The npm package includes `scripts/flow.ts`, `scripts/lib/flow-command.ts`, `scripts/workflows/*.ts`, `scripts/workflows/lib/*.ts`, and the scoped tsconfig.
265
+ The npm package includes `.pi/agent-fleet/scripts/flow.ts`, `.pi/agent-fleet/scripts/lib/flow-command.ts`, `.pi/agent-fleet/scripts/workflows/*.ts`, `.pi/agent-fleet/scripts/workflows/lib/*.ts`, and the scoped tsconfig.
266
266
  It also includes the complete `skills/` and `references/` trees. The installer maps the workflow guide to `.pi/agent-fleet/docs/workflows.md`, so the drafting skill, generator, authoring reference, and managed guide are packaged without adding product documentation to the target repository's `docs/` tree.
267
267
  The install manifest is generated from `manifest-meta.json` and the repository tree.
268
268
  Workflow runtime files use preserved repository-relative paths because the justfile recipe imports them there.
@@ -289,6 +289,16 @@ Part of code review is dependency review:
289
289
 
290
290
  **Rule:** Prefer standard library and existing utilities over new dependencies. Every dependency is a liability.
291
291
 
292
+ **Upgrading an existing dependency** is a code change like any other, and the riskiest upgrades are the ones merged in bulk with a message like "bump deps." Review them with the same discipline:
293
+
294
+ 1. **Read the changelog, not just the version number.** Semver is a promise the maintainer may not have kept — a "patch" can carry a behavioral change. For a major bump, read the migration notes and find what breaks.
295
+ 2. **One dependency per change.** Upgrade and merge them individually (or in small related groups). When a bulk bump breaks the build, you've lost which package did it; a single-package change makes the cause obvious and the revert clean.
296
+ 3. **Let the tests decide.** The upgrade is verified by a green suite before *and* after, not by "it installed." If coverage around the dependency's behavior is thin, that gap is the real finding — add a test first.
297
+ 4. **Mind the transitive graph.** Most installed packages are ones nobody chose directly. Review the lockfile diff, not just `package.json`; a single direct bump can pull in dozens of indirect changes.
298
+ 5. **Keep the lockfile honest.** Commit it, review its diff, and never hand-edit it. The lockfile is the thing that actually pins what ships.
299
+
300
+ For triaging `npm audit` findings and supply-chain risk (typosquatting, compromised maintainers), follow the `security-and-hardening` skill — this section covers the upgrade *workflow*, that one covers the security verdict.
301
+
292
302
  ## The Review Checklist
293
303
 
294
304
  ```markdown
@@ -338,8 +348,8 @@ Part of code review is dependency review:
338
348
  ```
339
349
  ## See Also
340
350
 
341
- - For detailed security review guidance, see `references/security-checklist.md`
342
- - For performance review checks, see `references/performance-checklist.md`
351
+ - For detailed security review guidance, see `../../references/security-checklist.md`
352
+ - For performance review checks, see `../../references/performance-checklist.md`
343
353
 
344
354
  ## Common Rationalizations
345
355
 
@@ -352,6 +362,8 @@ Part of code review is dependency review:
352
362
  | "The tests pass, so it's good" | Tests are necessary but not sufficient. They don't catch architecture problems, security issues, or readability concerns. |
353
363
  | "The refactor makes it cleaner" | Relocating complexity isn't reducing it. If the reader still holds the same number of concepts, the structure didn't improve — look for the version where branches disappear. |
354
364
  | "It's only a small addition to this file" | Small diffs still push files past a healthy size and bolt branches onto unrelated flows. Judge the resulting structure, not the diff size. |
365
+ | "It's just a version bump" | A bump is a behavior change you didn't write. Read the changelog; semver doesn't guarantee no breakage. |
366
+ | "I'll upgrade everything in one PR to save time" | A bulk bump that breaks the build hides which package did it. One dependency per change keeps the cause and the revert clean. |
355
367
 
356
368
  ## Red Flags
357
369
 
@@ -367,6 +379,8 @@ Part of code review is dependency review:
367
379
  - A change that grows an already-large file instead of decomposing it
368
380
  - New conditionals scattered into unrelated code paths (a missing abstraction)
369
381
  - A bespoke helper that duplicates an existing canonical one, or feature logic placed in a shared module
382
+ - A bulk "bump dependencies" PR with no changelog review and no per-package isolation
383
+ - A lockfile change that's hand-edited, uncommitted, or merged without reviewing its diff
370
384
 
371
385
  ## Verification
372
386
 
@@ -377,5 +391,6 @@ After review is complete:
377
391
  - [ ] Tests pass
378
392
  - [ ] Build succeeds
379
393
  - [ ] The verification story is documented (what changed, how it was verified)
394
+ - [ ] Dependency upgrades were reviewed against their changelog, isolated per package, and verified by a green suite with the lockfile diff reviewed
380
395
 
381
396
  **Presumptive blockers:** surface and propose the simpler design for each of these; escalate to Required only when the change actively makes structure worse: a refactor that relocates complexity instead of reducing it; a change that pushes a file past the size boundary with no decomposition; feature logic added to a shared module; a near-duplicate of an existing canonical helper; a silent fallback that hides an unclear invariant.
@@ -0,0 +1,338 @@
1
+ ---
2
+ name: constraint-driven-development
3
+ description: Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.
4
+ ---
5
+
6
+ # Constraint-Driven Development
7
+
8
+ ## Overview
9
+
10
+ Other skills in this pack describe what good looks like. `code-review-and-quality` gives you five axes. `test-driven-development` gives you a cycle. `security-and-hardening` gives you a threat list. All of that lives in prose the agent reads and may or may not follow, and none of it survives the end of the session.
11
+
12
+ This skill produces something different: a written record of **this project's** bar, with numbers, that outlives the conversation and can be checked mechanically.
13
+
14
+ The reason matters. When you wrote the code, reading it told you whether it was any good. An agent writes more in an afternoon than you will read that week, so the judgement moves out of your head and into checks that run around the loop. Those checks need to exist, they need numbers you actually chose, and they need to fire close enough to the work that the agent fixes its own output.
15
+
16
+ Spec-driven development says what to build. Test-driven development proves it works. Constraint-driven development defines what "good enough to ship" means, before anyone argues about it in a pull request.
17
+
18
+ ## When to Use
19
+
20
+ Apply this skill when:
21
+
22
+ - Starting a project or a significant feature and no quality bar is written down
23
+ - The user asks to "set up constraints", "add quality gates", "define our standards", or "stop the agent shipping junk"
24
+ - An agent is producing volume nobody is reading line by line
25
+ - CI has checks but nobody can say which ones block a merge and which ones are decoration
26
+ - Coverage, performance, or accessibility numbers get argued about per-PR instead of decided once
27
+ - You're about to run `/build auto` or any autonomous loop, and the only thing standing between it and main is a test suite the agent also wrote
28
+
29
+ **When NOT to use:**
30
+
31
+ - The project already has a `CONSTRAINTS.md` and the user isn't changing it — read it and follow it instead
32
+ - One-off scripts, spikes, throwaway prototypes
33
+ - The user wants a code review right now (`code-review-and-quality`) or a CI pipeline built (`ci-cd-and-automation`)
34
+ - Pre-product-market-fit code with a two-week expected lifetime — the floor below is still worth it, the rest isn't
35
+
36
+ ## Loading Constraints
37
+
38
+ The interview needs a live user. **Don't run it in non-interactive contexts** — CI, a headless `just flow` run, or any autonomous loop. If constraints are missing and you're in one of those, apply the Floor below, note that you did, and flag the rest for a human.
39
+
40
+ ## The Process
41
+
42
+ ### Step 1: Detect before you ask
43
+
44
+ Never ask what you can read. Before the first question, gather:
45
+
46
+ | What | Where to look |
47
+ |------|---------------|
48
+ | Language and stack | `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml` |
49
+ | Test runner | dev dependencies, `test` script, existing test files |
50
+ | Existing linters | `eslint.config.*`, `biome.json`, `.ruff.toml` |
51
+ | Coverage today | `coverage/` output, or run the suite once |
52
+ | CI | `.github/workflows/`, `.gitlab-ci.yml` |
53
+ | Existing Fleet gate | `quality:` under `## workflows` in `.ai/agent-fleet-overrides.md` |
54
+ | Agent harness | `.pi/`, `.ai/agent-fleet-overrides.md`, `AGENTS.md` |
55
+
56
+ Report what you found in two lines, then ask only what's left.
57
+
58
+ ### Step 2: Four questions, each with a default
59
+
60
+ Follow the one-question-at-a-time discipline from `interview-me`, with one change: every question here has a default, so "I don't know" is a complete answer that still produces a working config.
61
+
62
+ ```
63
+ Q1: Beyond the floor, which of these do you want enforced?
64
+ (a) Test coverage on new code
65
+ (b) Security scanning
66
+ (c) Performance budgets
67
+ (d) Accessibility
68
+ (e) Architecture boundaries
69
+ GUESS: (a) and (b) — you have a test runner already and you're handling user input.
70
+ DEFAULT if unsure: (a) and (b).
71
+ Say what each pick costs: (c) and (d) need a running URL, (e) needs a rules file written.
72
+ ```
73
+
74
+ ```
75
+ Q2: When a check fails while the agent is mid-task, should it block or warn?
76
+ GUESS: Block. You're running agents unattended and a warning nobody reads is a warning.
77
+ DEFAULT if unsure: Block on the floor, warn on everything else for the first two weeks.
78
+ ```
79
+
80
+ ```
81
+ Q3: Do you have target numbers in mind, or should I measure where you are today and hold that line?
82
+ GUESS: Measure. Most teams don't have a number, and an invented one gets ignored.
83
+ DEFAULT if unsure: Measure and hold. See "Ratchets" below.
84
+ ```
85
+
86
+ ```
87
+ Q4: What's the slowest check you'll tolerate before the agent hands work back?
88
+ GUESS: About 90 seconds. Longer and you'll stop running it.
89
+ DEFAULT if unsure: 90 seconds at task end, unlimited in CI.
90
+ ```
91
+
92
+ Stop at four. A twelve-question intake produces a config nobody understands and a user who regrets starting.
93
+
94
+ ### Step 3: Write CONSTRAINTS.md
95
+
96
+ One file at the repo root. Any agent on any harness can read it, and a change to it shows up in review where it belongs.
97
+
98
+ > **In a Fleet project the two halves live apart, on purpose.** `CONSTRAINTS.md` carries
99
+ > the *dimensions, the numbers, and the reason for each number* — it is what a human reads
100
+ > and what review diffs. The *executable gate* is `quality:` under `## workflows` in
101
+ > `.ai/agent-fleet-overrides.md`, which is the one command `just flow` runs; there is no
102
+ > implicit fallback, and a missing or empty value is a startup refusal (exit `3`). Write
103
+ > the command in `quality:` and cite it from the `Checked by` column. Never let
104
+ > `CONSTRAINTS.md` name a gate command that `quality:` does not run — that is the drift
105
+ > this split exists to prevent.
106
+
107
+ ```markdown
108
+ # Constraints
109
+
110
+ Last reviewed: 2026-08-08 by @addy
111
+
112
+ ## Floor (always enforced, no setup required)
113
+
114
+ - No new suppression comments: `@ts-ignore`, `eslint-disable`, `# noqa`, `# type: ignore`
115
+ - No unimplemented stubs: `throw new Error("Not implemented")`, empty `catch {}`
116
+ - No skipped or deleted tests without a reason in the commit message
117
+ - No secrets in source
118
+ - This file does not get weakened to make a change pass
119
+
120
+ ## Enforced with numbers
121
+
122
+ | Dimension | Rule | Checked by | Runs at |
123
+ |-----------|------|-----------|---------|
124
+ | Types | Zero type errors | `tsc --noEmit` | every edit |
125
+ | Lint | Zero errors from our config | `biome check` | every edit |
126
+ | Secrets | No secrets in source | `gitleaks detect --redact` | every edit |
127
+ | Coverage | Changed lines ≥ 80% covered | `vitest run --coverage` + git diff | task end, CI |
128
+ | Security: code | No high findings | `semgrep scan --config p/default` | CI |
129
+ | Security: deps | Nothing at high or above | `osv-scanner scan source -r .` | CI |
130
+ | Accessibility | Zero critical or serious | `axe $PREVIEW_URL --tags wcag2a,wcag2aa,wcag21aa` | preview deploy |
131
+ | Performance | LCP ≤ 2500ms, CLS ≤ 0.1 | `lighthouse $PREVIEW_URL --output=json` | preview deploy |
132
+
133
+ Every row names the command that produces the verdict. A dimension with a
134
+ number and no command in this column is an aspiration, not a constraint.
135
+
136
+ ## Measured, not yet enforced
137
+
138
+ | Metric | Today | Direction |
139
+ |--------|-------|-----------|
140
+ | Project coverage | 62.4% | must not fall |
141
+ | Bundle size (main) | 184 kB | must not grow |
142
+
143
+ ## Exceptions
144
+
145
+ | ID | Rule | Path | Reason | Owner | Expires |
146
+ |----|------|------|--------|-------|---------|
147
+ | W1 | `no-explicit-any` | `src/legacy/**` | Rewrite tracked in ENG-441 | @addy | 2026-11-01 |
148
+ ```
149
+
150
+ Then make the file discoverable. In a Fleet project the agent-facing pointer belongs in
151
+ `.ai/agent-fleet-overrides.md` — the harnesses already read it and the deterministic CLI
152
+ owns it. Adding the same line to a human-owned `AGENTS.md` or `CLAUDE.md` is optional and
153
+ needs the user's say-so first; never edit those two silently.
154
+
155
+ ```
156
+ Read CONSTRAINTS.md before writing code. Do not weaken it to make a change pass.
157
+ ```
158
+
159
+ ### Step 4: Install what each dimension needs
160
+
161
+ Picking a dimension means installing something. Don't leave the user with a number and no mechanism, and don't invent your own checker when a de facto one exists — these tools are listed because their rule formats and thresholds are what everything else in the ecosystem targets, so the team's existing config keeps working.
162
+
163
+ | Dimension | Tool | Install | Run | Gate on |
164
+ |-----------|------|---------|-----|---------|
165
+ | Types (TS) | tsc | already there | `tsc --noEmit` | any error |
166
+ | Types (Python) | mypy | `pip install mypy` | `mypy .` | any error |
167
+ | Lint | your existing config | already there | `eslint .` / `biome check` / `ruff check` | any error |
168
+ | Coverage (JS) | your test runner | already there | `vitest run --coverage` (or `jest --coverage`) | coverage of changed lines |
169
+ | Coverage (Python) | pytest-cov | `pip install pytest-cov` | `pytest --cov --cov-report=lcov` | same |
170
+ | Security: code | Semgrep | `pipx install semgrep` | `semgrep scan --config p/default --config p/owasp-top-ten` | any high finding |
171
+ | Security: secrets | gitleaks | `brew install gitleaks` | `gitleaks detect --redact --no-banner` | any finding |
172
+ | Security: dependencies | osv-scanner | `brew install osv-scanner` | `osv-scanner scan source -r .` | high or above |
173
+ | Performance: page | Lighthouse | `npm i -D lighthouse` | `lighthouse $URL --output=json --quiet` | LCP, CLS, performance score |
174
+ | Performance: bundle | size-limit | `npm i -D size-limit` | `size-limit --json` | per-entry byte budget |
175
+ | Accessibility | axe-core | `npm i -D @axe-core/cli` | `axe $URL --tags wcag2a,wcag2aa,wcag21aa` | zero critical or serious |
176
+ | Architecture | dependency-cruiser | `npm i -D dependency-cruiser` | `depcruise --validate src` | any violation |
177
+ | Assertion quality | Stryker | `npm i -D @stryker-mutator/core` | `stryker run --mutate <changed files>` | mutation score |
178
+
179
+ Five things that will bite you if you skip them:
180
+
181
+ 1. **`--redact` on gitleaks is not optional.** Without it the matched secret lands in the agent's transcript, which is how a leaked key ends up in a log, a summary, or a commit message. Report the rule and the location, never the value.
182
+ 2. **Lighthouse and axe need a URL.** They only work against a running app, so they belong in the runtime stage against a preview deploy or a local server you start first. If the project has no URL to hit — a CLI, a library, a desktop app — say so and drop the dimension rather than inventing a check that can't run.
183
+ 3. **Scope the expensive ones to the diff.** `stryker run --mutate` on the whole repo takes hours and gets turned off; on the files a change touched it takes under a minute. Same for Semgrep, which takes a path list.
184
+ 4. **Coverage needs no second test run.** Read the lcov your suite already writes and intersect it with `git diff`. Running the suite twice to get a number is the fastest way to make people hate this.
185
+ 5. **Semgrep's registry rules are free to run; check the licence before redistributing them.** `opengrep` is a drop-in fork with the same rule format and JSON output if that matters to your legal team.
186
+
187
+ Add each one to the project's own script so it's reproducible without an agent:
188
+
189
+ ```json
190
+ {
191
+ "scripts": {
192
+ "check:fast": "tsc --noEmit && eslint . && gitleaks detect --redact --no-banner",
193
+ "check:task": "npm run check:fast && vitest run --coverage",
194
+ "check:full": "npm run check:task && semgrep scan --config p/default && osv-scanner scan source -r ."
195
+ }
196
+ }
197
+ ```
198
+
199
+ That mapping matters more than the tools. `check:fast` is what runs after an edit, `check:task` when the agent thinks it's done, `check:full` in CI.
200
+
201
+ **In a Fleet project, `quality:` points at the task-end script.** Set
202
+ `quality: npm run check:task` (or whatever the project's equivalent is) under
203
+ `## workflows` in `.ai/agent-fleet-overrides.md`. That is what `just flow` executes, so it
204
+ is the one command that actually blocks a flow from being accepted.
205
+
206
+ The commands now live in two places — the `Checked by` column in `CONSTRAINTS.md` and these scripts. `CONSTRAINTS.md` is the canonical source *for the reasoning*: it carries why each number is what it is, and it shows up in review. The scripts are the mechanism, and `quality:` is the one the runtime obeys. If the file and the scripts drift, the file wins and the scripts get fixed.
207
+
208
+ ### Step 5: Wire it to the lifecycle
209
+
210
+ The single biggest mistake is running everything everywhere. A check that stalls the agent gets switched off, and a gate people switched off is worse than no gate, because the bar still looks like it exists.
211
+
212
+ | Phase | Command | What runs | Budget |
213
+ |-------|---------|-----------|--------|
214
+ | BUILD | `/af-build` | Types, lint, secrets, the floor | under 5s, changed file only |
215
+ | VERIFY | `/af-test` | Related tests, coverage on changed lines | under 90s |
216
+ | REVIEW | `/af-review` | Everything, plus the guards below | minutes |
217
+ | SHIP | `/af-ship` | Direction checks, no regressions | CI |
218
+ | FLOW | `just flow` | Whatever `quality:` names — the gate that decides acceptance | per flow |
219
+
220
+ Two rules that keep this tolerable:
221
+
222
+ 1. **Scope to the diff.** Check the lines this change touched, not the whole repo. Coverage of changed lines is a number the agent can move; project coverage is one it inherited.
223
+ 2. **Cost decides placement.** Anything over a few seconds moves out of the edit loop. Mutation testing on a whole repo takes hours; on the files a change touched it takes under a minute, which is the difference between a check people run and one they don't.
224
+
225
+ ### Step 6: Guard the bar itself
226
+
227
+ Someone will point out that if the agent writes the code and the checks, the checks prove nothing. Half right, and worth engineering around.
228
+
229
+ Agents don't craft clever loopholes. They hit a red check and take the cheapest road to green. Watch for these five moves in the diff, at review time:
230
+
231
+ 1. **The threshold moved.** A budget lowered, a severity dropped, a check removed from the fast stage. Compare `CONSTRAINTS.md` against its state at the branch point.
232
+ 2. **A test got easier.** `.skip` added, a test file deleted, assertions pulled out of tests that stayed.
233
+ 3. **A checker got silenced.** New `@ts-ignore` or `eslint-disable`. Four suppressions deserve special attention because they switch off a check you're relying on: `istanbul ignore` drops code from coverage instead of testing it, `Stryker disable` hides a surviving mutant, `nosemgrep` and `gitleaks:allow` do it for security findings.
234
+ 4. **Work is unfinished.** A stub that throws, an empty `catch` turning a failure into silence, a `TODO` standing where the implementation should be.
235
+ 5. **An exception appeared.** A new row in the Exceptions table nobody discussed.
236
+
237
+ None of this needs tooling beyond `git diff`. Tightening the bar should be silent; loosening it should be loud.
238
+
239
+ Unlike the numbered dimensions, the floor has no de facto tool of its own, so an agent asked to enforce it tends to write a checker from scratch, and two agents write two different ones. A reference implementation of these five checks ships with this skill in [references/floor-guard.md](references/floor-guard.md) (diff-scoped, exit `0`/`1`/`2`, patterns adaptable per ecosystem). Adapt that rather than reinventing it, for the same reason every dimension names a de facto tool: so the mechanism is the same across runs and stacks.
240
+
241
+ **Not all checks are equally circular.** Rank them by one question: can the agent make this pass by writing code that doesn't work?
242
+
243
+ - **External** — axe-core encodes WCAG, `osv-scanner` reads a vulnerability database, Lighthouse measures a real browser. The agent can't argue with these.
244
+ - **Project** — your lint rules, your layer boundaries. A human owns the file.
245
+ - **Suite** — your own tests. Most useful, and the only genuinely circular one.
246
+
247
+ A bar made entirely of the third kind is worth less than one with an outside opinion in it. Check that at least one external constraint is present.
248
+
249
+ ### Step 7: Ratchets, when you don't have a number
250
+
251
+ Set 80% coverage on a codebase at 62% and you get a red build forever, then a team that learns to ignore red builds.
252
+
253
+ The alternative asks for no decision: record where you are, then refuse to get worse. Put it in the "Measured, not yet enforced" table with today's number and a direction. Every check compares against the recorded value, not an aspiration. When a number improves, update it; when it drops, that's the finding.
254
+
255
+ This also answers a fair objection to training. Models are rewarded for passing tests, which you can evaluate in seconds. Architectural rot shows up over months and never reaches the weights. A ratchet is the missing penalty, written down where the build can see it.
256
+
257
+ ## Sane Defaults
258
+
259
+ When the user has no opinion, use these. They're chosen to be met by most codebases on day one.
260
+
261
+ | Constraint | Default | Why this number |
262
+ |------------|---------|-----------------|
263
+ | Coverage of changed lines | ≥ 80% | High enough to force a test, low enough to allow a config line |
264
+ | Project coverage | today's value, must not fall | No argument needed to adopt |
265
+ | Mutation score (if used) | ≥ 60% to start | Typical for a suite never mutated before; 80% is mature |
266
+ | Dependency vulnerabilities | nothing at high or above | Below that is mostly noise |
267
+ | LCP | ≤ 2500 ms | Core Web Vitals "good" threshold |
268
+ | CLS | ≤ 0.1 | Same |
269
+ | Accessibility | zero critical or serious axe violations | Moderate and minor are often debatable |
270
+ | Exception lifetime | 90 days | Long enough to plan the fix, short enough to remember |
271
+ | Ratchet tolerance | 0.5% | Absorbs drift when an unrelated file moves the number |
272
+
273
+ State the number and the reason together. A threshold without a rationale gets deleted by the next person who hits it.
274
+
275
+ ## Escalation Path
276
+
277
+ Constraints work at three levels of teeth. Start at the first.
278
+
279
+ 1. **Written only.** `CONSTRAINTS.md` exists and agents read it. Costs nothing, catches the honest mistakes, relies on the agent complying.
280
+ 2. **Scripted.** An `npm run check` (or `make check`) that runs the fast checks, wired into your agent's post-edit hook and your CI. Deterministic, no new dependency.
281
+ 3. **Tool-backed.** A dedicated runner that handles diff scoping, budgets, ratchets, and the guard checks. Use when the config outgrows a shell script. The floor-guard reference in [references/floor-guard.md](references/floor-guard.md) is the starting point for the guard-checks half of this.
282
+
283
+ Most projects should stop at 2. Move to 3 when you're maintaining more than about thirty lines of check-running shell.
284
+
285
+ **A first run can be floor-only.** The floor guard is diff-only and needs no installs, so you can enforce the floor on day one and add numbered dimensions as you install each tool, rather than standing up every checker before the first commit is protected. Security tools that install machine-wide (gitleaks, osv-scanner) can also run CI-only if you'd rather keep laptops clean; declare where each dimension runs in the `Runs at` column.
286
+
287
+ ## Common Rationalizations
288
+
289
+ | Excuse | Reality |
290
+ |--------|---------|
291
+ | "We'll add constraints once the code settles" | Code settles around whatever was allowed while it was moving |
292
+ | "The tests are the constraints" | Tests you wrote prove you agree with yourself; they say nothing about coverage of new code, dependency risk, or bundle growth |
293
+ | "We can't hit 80% coverage" | Then don't set 80%. Set today's number and hold it |
294
+ | "This will slow the agent down" | Only if you put slow checks in the fast loop. That's a placement error, not an argument against constraints |
295
+ | "I'll remember what our standards are" | The agent won't, and it's writing most of the code |
296
+ | "Constraints will block us shipping" | An exception with an owner and a date unblocks you. Deleting the constraint unblocks everyone forever |
297
+
298
+ ## Red Flags
299
+
300
+ Stop and reconsider if you notice:
301
+
302
+ - The interview ran past four questions, or produced a config the user can't explain
303
+ - A budget was set that the codebase fails today, with no plan to reach it
304
+ - A dimension was written into CONSTRAINTS.md with a number but no tool behind it
305
+ - A checker was hand-rolled when a de facto one exists, so the team's existing config is ignored
306
+ - Every constraint is checked by the project's own test suite, with no external opinion
307
+ - `CONSTRAINTS.md` changed in the same commit as the feature that was failing
308
+ - An exception has no owner, or an expiry more than a year out
309
+ - The agent proposed relaxing a threshold instead of fixing the code
310
+ - Slow checks landed in the edit loop and someone has started passing `--no-verify`
311
+ - Nobody has opened `CONSTRAINTS.md` since it was written
312
+
313
+ ## Verification
314
+
315
+ The skill was applied correctly when:
316
+
317
+ - [ ] `CONSTRAINTS.md` exists, and every number in it has a stated reason
318
+ - [ ] The floor is enforced and passes on the current codebase without changes
319
+ - [ ] Every dimension the user picked has a tool installed and a command that runs today
320
+ - [ ] Each constraint says where it runs, and the fast stage stays under a few seconds
321
+ - [ ] At least one constraint is external (not judged by this project's own tests)
322
+ - [ ] Measured-only metrics record today's value and a direction
323
+ - [ ] Exceptions have an owner and an expiry date
324
+ - [ ] `AGENTS.md` or `CLAUDE.md` points at the file
325
+ - [ ] A trial run on the current branch produces no failures the user disagrees with
326
+
327
+ ## See Also
328
+
329
+ - `interview-me` — the one-question-at-a-time discipline this skill's intake borrows
330
+ - `code-review-and-quality` — how to review; this skill decides what the review enforces
331
+ - `ci-cd-and-automation` — building the pipeline these constraints run in
332
+ - `test-driven-development` — the suite that coverage and mutation constraints measure
333
+ - `security-and-hardening` — what the security dimension should contain
334
+ - `performance-optimization` — where the performance numbers come from
335
+
336
+ ## See Also
337
+
338
+ Constraints are the *numbers* layered on top of the project-wide Definition of Done — the standing, unnumbered bar every change clears regardless of task. This skill does not restate it; see [`../../references/definition-of-done.md`](../../references/definition-of-done.md). The floor below duplicates none of it: the Definition of Done says the work is finished, the floor says the bar was not quietly lowered to get there.