@chankov/agent-fleet 0.0.7 → 0.0.9

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 (636) hide show
  1. package/.pi/agents/model-profiles.yaml +9 -2
  2. package/.pi/agents/peers.yaml +12 -16
  3. package/.pi/agents/teams.yaml +4 -2
  4. package/.pi/harnesses/agent-hub/README.md +20 -5
  5. package/.pi/harnesses/agent-hub/footer.ts +4 -2
  6. package/.pi/harnesses/agent-hub/index.ts +104 -11
  7. package/.pi/harnesses/agent-hub/package.json +1 -1
  8. package/.pi/harnesses/agent-hub/version.ts +25 -1
  9. package/.pi/harnesses/coms/README.md +8 -1
  10. package/.pi/harnesses/coms/package.json +1 -1
  11. package/.pi/harnesses/coms/version.ts +25 -1
  12. package/.pi/harnesses/damage-control-continue/README.md +8 -1
  13. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  14. package/.pi/harnesses/damage-control-continue/version.ts +25 -1
  15. package/.pi/harnesses/lib/herdr-client.ts +10 -1
  16. package/.pi/harnesses/lib/spawned-peers.js +190 -0
  17. package/.versions/0.0.8/.claude/commands/build.md +44 -0
  18. package/.versions/0.0.8/.claude/commands/code-simplify.md +22 -0
  19. package/.versions/0.0.8/.claude/commands/design-agent.md +14 -0
  20. package/.versions/0.0.8/.claude/commands/doctor-agent-fleet.md +17 -0
  21. package/.versions/0.0.8/.claude/commands/orchestrate.md +112 -0
  22. package/.versions/0.0.8/.claude/commands/plan.md +16 -0
  23. package/.versions/0.0.8/.claude/commands/prime.md +22 -0
  24. package/.versions/0.0.8/.claude/commands/review.md +16 -0
  25. package/.versions/0.0.8/.claude/commands/set-hermes-telegram.md +15 -0
  26. package/.versions/0.0.8/.claude/commands/set-hermes-watchdog.md +6 -0
  27. package/.versions/0.0.8/.claude/commands/setup-agent-fleet.md +25 -0
  28. package/.versions/0.0.8/.claude/commands/ship.md +72 -0
  29. package/.versions/0.0.8/.claude/commands/spec.md +15 -0
  30. package/.versions/0.0.8/.claude/commands/test.md +19 -0
  31. package/.versions/0.0.8/.claude/commands/webperf.md +32 -0
  32. package/.versions/0.0.8/.claude/orchestrate-teams.yaml +24 -0
  33. package/.versions/0.0.8/.opencode/commands/af-build.md +17 -0
  34. package/.versions/0.0.8/.opencode/commands/af-code-simplify.md +16 -0
  35. package/.versions/0.0.8/.opencode/commands/af-compound.md +16 -0
  36. package/.versions/0.0.8/.opencode/commands/af-design-agent.md +15 -0
  37. package/.versions/0.0.8/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  38. package/.versions/0.0.8/.opencode/commands/af-orchestrate.md +112 -0
  39. package/.versions/0.0.8/.opencode/commands/af-plan.md +16 -0
  40. package/.versions/0.0.8/.opencode/commands/af-prime.md +22 -0
  41. package/.versions/0.0.8/.opencode/commands/af-review.md +15 -0
  42. package/.versions/0.0.8/.opencode/commands/af-set-hermes-telegram.md +15 -0
  43. package/.versions/0.0.8/.opencode/commands/af-set-hermes-watchdog.md +6 -0
  44. package/.versions/0.0.8/.opencode/commands/af-setup-agent-fleet.md +15 -0
  45. package/.versions/0.0.8/.opencode/commands/af-ship.md +16 -0
  46. package/.versions/0.0.8/.opencode/commands/af-spec.md +16 -0
  47. package/.versions/0.0.8/.opencode/commands/af-test.md +21 -0
  48. package/.versions/0.0.8/.opencode/commands/af-webperf.md +32 -0
  49. package/.versions/0.0.8/.opencode/orchestrate-teams.yaml +24 -0
  50. package/.versions/0.0.8/.pi/agents/dispatch-policy.yaml +32 -0
  51. package/.versions/0.0.8/.pi/agents/model-profiles.yaml +20 -0
  52. package/.versions/0.0.8/.pi/agents/peers.yaml +146 -0
  53. package/.versions/0.0.8/.pi/agents/teams.yaml +39 -0
  54. package/.versions/0.0.8/.pi/damage-control-rules.yaml +297 -0
  55. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  56. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  57. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  58. package/.versions/0.0.8/.pi/extensions/btw/README.md +118 -0
  59. package/.versions/0.0.8/.pi/extensions/btw/index.ts +917 -0
  60. package/.versions/0.0.8/.pi/extensions/btw/package.json +6 -0
  61. package/.versions/0.0.8/.pi/extensions/btw/state.js +179 -0
  62. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  63. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  64. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  65. package/.versions/0.0.8/.pi/extensions/compact-and-continue/README.md +42 -0
  66. package/.versions/0.0.8/.pi/extensions/compact-and-continue/index.ts +120 -0
  67. package/.versions/0.0.8/.pi/extensions/compact-and-continue/package.json +6 -0
  68. package/.versions/0.0.8/.pi/extensions/mcp-bridge/README.md +46 -0
  69. package/.versions/0.0.8/.pi/extensions/mcp-bridge/index.ts +206 -0
  70. package/.versions/0.0.8/.pi/extensions/mcp-bridge/package.json +6 -0
  71. package/.versions/0.0.8/.pi/extensions/package-lock.json +1143 -0
  72. package/.versions/0.0.8/.pi/extensions/package.json +9 -0
  73. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/README.md +201 -0
  74. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/config.ts +198 -0
  75. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  76. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/index.ts +248 -0
  77. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/package.json +6 -0
  78. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  79. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  80. package/.versions/0.0.8/.pi/harnesses/agent-hub/README.md +857 -0
  81. package/.versions/0.0.8/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  82. package/.versions/0.0.8/.pi/harnesses/agent-hub/artifacts.js +146 -0
  83. package/.versions/0.0.8/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  84. package/.versions/0.0.8/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  85. package/.versions/0.0.8/.pi/harnesses/agent-hub/context-window.js +106 -0
  86. package/.versions/0.0.8/.pi/harnesses/agent-hub/delegate.ts +435 -0
  87. package/.versions/0.0.8/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  88. package/.versions/0.0.8/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  89. package/.versions/0.0.8/.pi/harnesses/agent-hub/footer.ts +29 -0
  90. package/.versions/0.0.8/.pi/harnesses/agent-hub/helpers.ts +248 -0
  91. package/.versions/0.0.8/.pi/harnesses/agent-hub/index.ts +8609 -0
  92. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  93. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  94. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  95. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  96. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  97. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  98. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  99. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -0
  100. package/.versions/0.0.8/.pi/harnesses/agent-hub/package.json +7 -0
  101. package/.versions/0.0.8/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  102. package/.versions/0.0.8/.pi/harnesses/agent-hub/research-retention.js +34 -0
  103. package/.versions/0.0.8/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  104. package/.versions/0.0.8/.pi/harnesses/agent-hub/return-contract.js +293 -0
  105. package/.versions/0.0.8/.pi/harnesses/agent-hub/return-extract.js +75 -0
  106. package/.versions/0.0.8/.pi/harnesses/agent-hub/run-budget.js +181 -0
  107. package/.versions/0.0.8/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  108. package/.versions/0.0.8/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  109. package/.versions/0.0.8/.pi/harnesses/agent-hub/session-health.js +110 -0
  110. package/.versions/0.0.8/.pi/harnesses/agent-hub/spawn.ts +354 -0
  111. package/.versions/0.0.8/.pi/harnesses/agent-hub/version.ts +18 -0
  112. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/README.md +19 -0
  113. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/index.ts +321 -0
  114. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  115. package/.versions/0.0.8/.pi/harnesses/coms/README.md +93 -0
  116. package/.versions/0.0.8/.pi/harnesses/coms/index.ts +1767 -0
  117. package/.versions/0.0.8/.pi/harnesses/coms/package.json +7 -0
  118. package/.versions/0.0.8/.pi/harnesses/coms/version.ts +18 -0
  119. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/README.md +117 -0
  120. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/index.ts +536 -0
  121. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/package.json +7 -0
  122. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/version.ts +18 -0
  123. package/.versions/0.0.8/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  124. package/.versions/0.0.8/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  125. package/.versions/0.0.8/.pi/harnesses/lib/herdr-client.ts +463 -0
  126. package/.versions/0.0.8/.pi/harnesses/lib/herdr-presence.ts +399 -0
  127. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  128. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  129. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  130. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  131. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  132. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  133. package/.versions/0.0.8/.pi/harnesses/package-lock.json +35 -0
  134. package/.versions/0.0.8/.pi/harnesses/package.json +9 -0
  135. package/.versions/0.0.8/.pi/prompts/af-build.md +24 -0
  136. package/.versions/0.0.8/.pi/prompts/af-code-simplify.md +22 -0
  137. package/.versions/0.0.8/.pi/prompts/af-doctor-agent-fleet.md +15 -0
  138. package/.versions/0.0.8/.pi/prompts/af-plan.md +16 -0
  139. package/.versions/0.0.8/.pi/prompts/af-review.md +16 -0
  140. package/.versions/0.0.8/.pi/prompts/af-set-hermes-telegram.md +15 -0
  141. package/.versions/0.0.8/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  142. package/.versions/0.0.8/.pi/prompts/af-setup-agent-fleet.md +27 -0
  143. package/.versions/0.0.8/.pi/prompts/af-ship.md +17 -0
  144. package/.versions/0.0.8/.pi/prompts/af-spec.md +15 -0
  145. package/.versions/0.0.8/.pi/prompts/af-test.md +19 -0
  146. package/.versions/0.0.8/.pi/skills/bowser/SKILL.md +145 -0
  147. package/.versions/0.0.8/.version +1 -0
  148. package/.versions/0.0.8/agents/architect.md +23 -0
  149. package/.versions/0.0.8/agents/bowser.md +26 -0
  150. package/.versions/0.0.8/agents/builder.md +53 -0
  151. package/.versions/0.0.8/agents/code-reviewer.md +205 -0
  152. package/.versions/0.0.8/agents/deep-researcher.md +31 -0
  153. package/.versions/0.0.8/agents/documenter.md +18 -0
  154. package/.versions/0.0.8/agents/orchestrator.md +65 -0
  155. package/.versions/0.0.8/agents/plan-reviewer.md +60 -0
  156. package/.versions/0.0.8/agents/planner.md +69 -0
  157. package/.versions/0.0.8/agents/releaser.md +24 -0
  158. package/.versions/0.0.8/agents/researcher.md +28 -0
  159. package/.versions/0.0.8/agents/security-auditor.md +166 -0
  160. package/.versions/0.0.8/agents/test-engineer.md +151 -0
  161. package/.versions/0.0.8/agents/web-debugger.md +42 -0
  162. package/.versions/0.0.8/agents/web-performance-auditor.md +192 -0
  163. package/.versions/0.0.8/codex/CONDUCTOR.md +148 -0
  164. package/.versions/0.0.8/docs/ARCHITECTURE.md +262 -0
  165. package/.versions/0.0.8/docs/agent-fleet-setup.md +366 -0
  166. package/.versions/0.0.8/docs/claude-code-coms-bridge.md +109 -0
  167. package/.versions/0.0.8/docs/codex-remote-conductor.md +170 -0
  168. package/.versions/0.0.8/docs/coms-hermes-bridge.md +189 -0
  169. package/.versions/0.0.8/docs/getting-started.md +231 -0
  170. package/.versions/0.0.8/docs/npm-install.md +337 -0
  171. package/.versions/0.0.8/docs/opencode-setup.md +249 -0
  172. package/.versions/0.0.8/docs/pi-extensions.md +293 -0
  173. package/.versions/0.0.8/docs/pi-setup.md +476 -0
  174. package/.versions/0.0.8/docs/skill-anatomy.md +150 -0
  175. package/.versions/0.0.8/hermes/README.md +347 -0
  176. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  177. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  178. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  179. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  180. package/.versions/0.0.8/hermes/gates/gate-o-capability.md +8 -0
  181. package/.versions/0.0.8/hermes/gates/gate-o-validator-fixtures.json +1 -0
  182. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  183. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  184. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  185. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  186. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  187. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  188. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  189. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  190. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  191. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  192. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  193. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  194. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  195. package/.versions/0.0.8/hermes/skills/hub-conductor/SKILL.md +84 -0
  196. package/.versions/0.0.8/hermes/skills/hub-liaison/SKILL.md +84 -0
  197. package/.versions/0.0.8/hermes/skills/hub-watchdog/SKILL.md +76 -0
  198. package/.versions/0.0.8/hermes/skills/hub-watchdog/manifest.json +1 -0
  199. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  200. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  201. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  202. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  203. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  204. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  205. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  206. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  207. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  208. package/.versions/0.0.8/hermes/watchdog-tests/__init__.py +0 -0
  209. package/.versions/0.0.8/hooks/SIMPLIFY-IGNORE.md +90 -0
  210. package/.versions/0.0.8/hooks/coms-stop-hook.mjs +84 -0
  211. package/.versions/0.0.8/hooks/hooks.json +14 -0
  212. package/.versions/0.0.8/hooks/session-start.sh +74 -0
  213. package/.versions/0.0.8/hooks/simplify-ignore.sh +302 -0
  214. package/.versions/0.0.8/justfile +245 -0
  215. package/.versions/0.0.8/references/accessibility-checklist.md +160 -0
  216. package/.versions/0.0.8/references/definition-of-done.md +67 -0
  217. package/.versions/0.0.8/references/fleet-coordination-patterns.md +151 -0
  218. package/.versions/0.0.8/references/observability-checklist.md +91 -0
  219. package/.versions/0.0.8/references/orchestration-patterns.md +370 -0
  220. package/.versions/0.0.8/references/performance-checklist.md +153 -0
  221. package/.versions/0.0.8/references/prompting-patterns.md +380 -0
  222. package/.versions/0.0.8/references/security-checklist.md +179 -0
  223. package/.versions/0.0.8/references/testing-patterns.md +236 -0
  224. package/.versions/0.0.8/scripts/codex-conductor.ts +41 -0
  225. package/.versions/0.0.8/scripts/codex-remote-control.ts +167 -0
  226. package/.versions/0.0.8/scripts/coms-claude-bridge.ts +401 -0
  227. package/.versions/0.0.8/scripts/coms-cli.ts +484 -0
  228. package/.versions/0.0.8/scripts/coms-hermes-bridge.ts +413 -0
  229. package/.versions/0.0.8/scripts/fleet.ts +149 -0
  230. package/.versions/0.0.8/scripts/hermes-monitor-capability-runner.ts +25 -0
  231. package/.versions/0.0.8/scripts/hermes-monitor-scenario.ts +474 -0
  232. package/.versions/0.0.8/scripts/hermes-watchdog-capability-probe.ts +45 -0
  233. package/.versions/0.0.8/scripts/install-hermes-plugin.sh +180 -0
  234. package/.versions/0.0.8/scripts/lib/claude-bridge-core.ts +165 -0
  235. package/.versions/0.0.8/scripts/lib/codex-conductor.ts +88 -0
  236. package/.versions/0.0.8/scripts/lib/codex-remote-control.ts +480 -0
  237. package/.versions/0.0.8/scripts/lib/coms-envelope.ts +582 -0
  238. package/.versions/0.0.8/scripts/lib/fake-herdr-server.ts +88 -0
  239. package/.versions/0.0.8/scripts/lib/fleet-command.ts +109 -0
  240. package/.versions/0.0.8/scripts/lib/herdr-layout.ts +263 -0
  241. package/.versions/0.0.8/scripts/lib/hermes-bridge-core.ts +241 -0
  242. package/.versions/0.0.8/scripts/lib/hermes-monitor-events.ts +1 -0
  243. package/.versions/0.0.8/scripts/lib/hermes-monitor-herdr.ts +2 -0
  244. package/.versions/0.0.8/scripts/lib/hermes-monitor-model.ts +3 -0
  245. package/.versions/0.0.8/scripts/lib/hermes-monitor-registry.ts +2 -0
  246. package/.versions/0.0.8/scripts/lib/hermes-monitor-socket.ts +2 -0
  247. package/.versions/0.0.8/scripts/lib/hermes-monitor-store.ts +2 -0
  248. package/.versions/0.0.8/scripts/lib/monitor-env.ts +120 -0
  249. package/.versions/0.0.8/scripts/lib/persona-banner.ts +62 -0
  250. package/.versions/0.0.8/scripts/lib/spawn-stagger.ts +101 -0
  251. package/.versions/0.0.8/scripts/lib/team-project.ts +191 -0
  252. package/.versions/0.0.8/scripts/lib/team-snapshot.ts +147 -0
  253. package/.versions/0.0.8/scripts/peer-banner.ts +40 -0
  254. package/.versions/0.0.8/scripts/team-snapshot.ts +237 -0
  255. package/.versions/0.0.8/scripts/team-up.ts +360 -0
  256. package/.versions/0.0.8/skills/_internal/grilling.md +11 -0
  257. package/.versions/0.0.8/skills/browser-testing-with-devtools/SKILL.md +352 -0
  258. package/.versions/0.0.8/skills/code-review-and-quality/SKILL.md +381 -0
  259. package/.versions/0.0.8/skills/compound-learning/SKILL.md +137 -0
  260. package/.versions/0.0.8/skills/context-engineering/SKILL.md +291 -0
  261. package/.versions/0.0.8/skills/deprecation-and-migration/SKILL.md +206 -0
  262. package/.versions/0.0.8/skills/designing-agents/SKILL.md +394 -0
  263. package/.versions/0.0.8/skills/designing-agents/pi-harness-authoring.md +222 -0
  264. package/.versions/0.0.8/skills/frontend-ui-engineering/SKILL.md +328 -0
  265. package/.versions/0.0.8/skills/git-workflow-and-versioning/SKILL.md +316 -0
  266. package/.versions/0.0.8/skills/guided-workspace-setup/SKILL.md +544 -0
  267. package/.versions/0.0.8/skills/guided-workspace-setup/companion-manifest.json +36 -0
  268. package/.versions/0.0.8/skills/idea-refine/SKILL.md +182 -0
  269. package/.versions/0.0.8/skills/idea-refine/examples.md +238 -0
  270. package/.versions/0.0.8/skills/idea-refine/frameworks.md +99 -0
  271. package/.versions/0.0.8/skills/idea-refine/refinement-criteria.md +113 -0
  272. package/.versions/0.0.8/skills/idea-refine/scripts/idea-refine.sh +15 -0
  273. package/.versions/0.0.8/skills/incremental-implementation/SKILL.md +287 -0
  274. package/.versions/0.0.8/skills/interview-me/SKILL.md +226 -0
  275. package/.versions/0.0.8/skills/orchestration-verification/SKILL.md +181 -0
  276. package/.versions/0.0.8/skills/peer-coms/SKILL.md +90 -0
  277. package/.versions/0.0.8/skills/performance-optimization/SKILL.md +350 -0
  278. package/.versions/0.0.8/skills/planning-and-task-breakdown/SKILL.md +236 -0
  279. package/.versions/0.0.8/skills/security-and-hardening/SKILL.md +461 -0
  280. package/.versions/0.0.8/skills/spec-driven-development/SKILL.md +245 -0
  281. package/.versions/0.0.8/skills/using-agent-skills/SKILL.md +199 -0
  282. package/.versions/0.0.8/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  283. package/.versions/0.0.8/vendor/agent-skills-upstream/LICENSE +21 -0
  284. package/.versions/0.0.8/vendor/agent-skills-upstream/README.md +11 -0
  285. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  286. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  287. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  288. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  289. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  290. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  291. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  292. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  293. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  294. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  295. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  296. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  297. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  298. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  299. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  300. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  301. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  302. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  303. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  304. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  305. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  306. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  307. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  308. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  309. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  310. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  311. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  312. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  313. package/.versions/0.0.9/.claude/commands/build.md +44 -0
  314. package/.versions/0.0.9/.claude/commands/code-simplify.md +22 -0
  315. package/.versions/0.0.9/.claude/commands/design-agent.md +14 -0
  316. package/.versions/0.0.9/.claude/commands/doctor-agent-fleet.md +17 -0
  317. package/.versions/0.0.9/.claude/commands/orchestrate.md +112 -0
  318. package/.versions/0.0.9/.claude/commands/plan.md +16 -0
  319. package/.versions/0.0.9/.claude/commands/prime.md +22 -0
  320. package/.versions/0.0.9/.claude/commands/review.md +16 -0
  321. package/.versions/0.0.9/.claude/commands/set-hermes-telegram.md +15 -0
  322. package/.versions/0.0.9/.claude/commands/set-hermes-watchdog.md +6 -0
  323. package/.versions/0.0.9/.claude/commands/setup-agent-fleet.md +25 -0
  324. package/.versions/0.0.9/.claude/commands/ship.md +72 -0
  325. package/.versions/0.0.9/.claude/commands/spec.md +15 -0
  326. package/.versions/0.0.9/.claude/commands/test.md +19 -0
  327. package/.versions/0.0.9/.claude/commands/webperf.md +32 -0
  328. package/.versions/0.0.9/.claude/orchestrate-teams.yaml +24 -0
  329. package/.versions/0.0.9/.opencode/commands/af-build.md +17 -0
  330. package/.versions/0.0.9/.opencode/commands/af-code-simplify.md +16 -0
  331. package/.versions/0.0.9/.opencode/commands/af-compound.md +16 -0
  332. package/.versions/0.0.9/.opencode/commands/af-design-agent.md +15 -0
  333. package/.versions/0.0.9/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  334. package/.versions/0.0.9/.opencode/commands/af-orchestrate.md +112 -0
  335. package/.versions/0.0.9/.opencode/commands/af-plan.md +16 -0
  336. package/.versions/0.0.9/.opencode/commands/af-prime.md +22 -0
  337. package/.versions/0.0.9/.opencode/commands/af-review.md +15 -0
  338. package/.versions/0.0.9/.opencode/commands/af-set-hermes-telegram.md +15 -0
  339. package/.versions/0.0.9/.opencode/commands/af-set-hermes-watchdog.md +6 -0
  340. package/.versions/0.0.9/.opencode/commands/af-setup-agent-fleet.md +15 -0
  341. package/.versions/0.0.9/.opencode/commands/af-ship.md +16 -0
  342. package/.versions/0.0.9/.opencode/commands/af-spec.md +16 -0
  343. package/.versions/0.0.9/.opencode/commands/af-test.md +21 -0
  344. package/.versions/0.0.9/.opencode/commands/af-webperf.md +32 -0
  345. package/.versions/0.0.9/.opencode/orchestrate-teams.yaml +24 -0
  346. package/.versions/0.0.9/.pi/agents/dispatch-policy.yaml +32 -0
  347. package/.versions/0.0.9/.pi/agents/model-profiles.yaml +27 -0
  348. package/.versions/0.0.9/.pi/agents/peers.yaml +142 -0
  349. package/.versions/0.0.9/.pi/agents/teams.yaml +41 -0
  350. package/.versions/0.0.9/.pi/damage-control-rules.yaml +297 -0
  351. package/.versions/0.0.9/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  352. package/.versions/0.0.9/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  353. package/.versions/0.0.9/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  354. package/.versions/0.0.9/.pi/extensions/btw/README.md +118 -0
  355. package/.versions/0.0.9/.pi/extensions/btw/index.ts +917 -0
  356. package/.versions/0.0.9/.pi/extensions/btw/package.json +6 -0
  357. package/.versions/0.0.9/.pi/extensions/btw/state.js +179 -0
  358. package/.versions/0.0.9/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  359. package/.versions/0.0.9/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  360. package/.versions/0.0.9/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  361. package/.versions/0.0.9/.pi/extensions/compact-and-continue/README.md +42 -0
  362. package/.versions/0.0.9/.pi/extensions/compact-and-continue/index.ts +120 -0
  363. package/.versions/0.0.9/.pi/extensions/compact-and-continue/package.json +6 -0
  364. package/.versions/0.0.9/.pi/extensions/mcp-bridge/README.md +46 -0
  365. package/.versions/0.0.9/.pi/extensions/mcp-bridge/index.ts +206 -0
  366. package/.versions/0.0.9/.pi/extensions/mcp-bridge/package.json +6 -0
  367. package/.versions/0.0.9/.pi/extensions/package-lock.json +1143 -0
  368. package/.versions/0.0.9/.pi/extensions/package.json +9 -0
  369. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/README.md +201 -0
  370. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/config.ts +198 -0
  371. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  372. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/index.ts +248 -0
  373. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/package.json +6 -0
  374. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  375. package/.versions/0.0.9/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  376. package/.versions/0.0.9/.pi/harnesses/agent-hub/README.md +872 -0
  377. package/.versions/0.0.9/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  378. package/.versions/0.0.9/.pi/harnesses/agent-hub/artifacts.js +146 -0
  379. package/.versions/0.0.9/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  380. package/.versions/0.0.9/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  381. package/.versions/0.0.9/.pi/harnesses/agent-hub/context-window.js +106 -0
  382. package/.versions/0.0.9/.pi/harnesses/agent-hub/delegate.ts +435 -0
  383. package/.versions/0.0.9/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  384. package/.versions/0.0.9/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  385. package/.versions/0.0.9/.pi/harnesses/agent-hub/footer.ts +31 -0
  386. package/.versions/0.0.9/.pi/harnesses/agent-hub/helpers.ts +248 -0
  387. package/.versions/0.0.9/.pi/harnesses/agent-hub/index.ts +8702 -0
  388. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  389. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  390. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  391. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  392. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  393. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  394. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  395. package/.versions/0.0.9/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -0
  396. package/.versions/0.0.9/.pi/harnesses/agent-hub/package.json +7 -0
  397. package/.versions/0.0.9/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  398. package/.versions/0.0.9/.pi/harnesses/agent-hub/research-retention.js +34 -0
  399. package/.versions/0.0.9/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  400. package/.versions/0.0.9/.pi/harnesses/agent-hub/return-contract.js +293 -0
  401. package/.versions/0.0.9/.pi/harnesses/agent-hub/return-extract.js +75 -0
  402. package/.versions/0.0.9/.pi/harnesses/agent-hub/run-budget.js +181 -0
  403. package/.versions/0.0.9/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  404. package/.versions/0.0.9/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  405. package/.versions/0.0.9/.pi/harnesses/agent-hub/session-health.js +110 -0
  406. package/.versions/0.0.9/.pi/harnesses/agent-hub/spawn.ts +354 -0
  407. package/.versions/0.0.9/.pi/harnesses/agent-hub/version.ts +42 -0
  408. package/.versions/0.0.9/.pi/harnesses/ask-user-remote/README.md +19 -0
  409. package/.versions/0.0.9/.pi/harnesses/ask-user-remote/index.ts +321 -0
  410. package/.versions/0.0.9/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  411. package/.versions/0.0.9/.pi/harnesses/coms/README.md +100 -0
  412. package/.versions/0.0.9/.pi/harnesses/coms/index.ts +1767 -0
  413. package/.versions/0.0.9/.pi/harnesses/coms/package.json +7 -0
  414. package/.versions/0.0.9/.pi/harnesses/coms/version.ts +42 -0
  415. package/.versions/0.0.9/.pi/harnesses/damage-control-continue/README.md +124 -0
  416. package/.versions/0.0.9/.pi/harnesses/damage-control-continue/index.ts +536 -0
  417. package/.versions/0.0.9/.pi/harnesses/damage-control-continue/package.json +7 -0
  418. package/.versions/0.0.9/.pi/harnesses/damage-control-continue/version.ts +42 -0
  419. package/.versions/0.0.9/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  420. package/.versions/0.0.9/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  421. package/.versions/0.0.9/.pi/harnesses/lib/herdr-client.ts +472 -0
  422. package/.versions/0.0.9/.pi/harnesses/lib/herdr-presence.ts +399 -0
  423. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  424. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  425. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  426. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  427. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  428. package/.versions/0.0.9/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  429. package/.versions/0.0.9/.pi/harnesses/lib/spawned-peers.js +190 -0
  430. package/.versions/0.0.9/.pi/harnesses/package-lock.json +35 -0
  431. package/.versions/0.0.9/.pi/harnesses/package.json +9 -0
  432. package/.versions/0.0.9/.pi/prompts/af-build.md +24 -0
  433. package/.versions/0.0.9/.pi/prompts/af-code-simplify.md +22 -0
  434. package/.versions/0.0.9/.pi/prompts/af-doctor-agent-fleet.md +15 -0
  435. package/.versions/0.0.9/.pi/prompts/af-plan.md +16 -0
  436. package/.versions/0.0.9/.pi/prompts/af-review.md +16 -0
  437. package/.versions/0.0.9/.pi/prompts/af-set-hermes-telegram.md +15 -0
  438. package/.versions/0.0.9/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  439. package/.versions/0.0.9/.pi/prompts/af-setup-agent-fleet.md +27 -0
  440. package/.versions/0.0.9/.pi/prompts/af-ship.md +17 -0
  441. package/.versions/0.0.9/.pi/prompts/af-spec.md +15 -0
  442. package/.versions/0.0.9/.pi/prompts/af-test.md +19 -0
  443. package/.versions/0.0.9/.pi/skills/bowser/SKILL.md +145 -0
  444. package/.versions/0.0.9/.version +1 -0
  445. package/.versions/0.0.9/agents/architect.md +24 -0
  446. package/.versions/0.0.9/agents/bowser.md +27 -0
  447. package/.versions/0.0.9/agents/builder.md +54 -0
  448. package/.versions/0.0.9/agents/code-reviewer.md +204 -0
  449. package/.versions/0.0.9/agents/deep-researcher.md +32 -0
  450. package/.versions/0.0.9/agents/documenter.md +18 -0
  451. package/.versions/0.0.9/agents/orchestrator.md +66 -0
  452. package/.versions/0.0.9/agents/plan-reviewer.md +62 -0
  453. package/.versions/0.0.9/agents/planner.md +70 -0
  454. package/.versions/0.0.9/agents/releaser.md +24 -0
  455. package/.versions/0.0.9/agents/researcher.md +28 -0
  456. package/.versions/0.0.9/agents/security-auditor.md +167 -0
  457. package/.versions/0.0.9/agents/test-engineer.md +153 -0
  458. package/.versions/0.0.9/agents/web-debugger.md +43 -0
  459. package/.versions/0.0.9/agents/web-performance-auditor.md +193 -0
  460. package/.versions/0.0.9/codex/CONDUCTOR.md +148 -0
  461. package/.versions/0.0.9/docs/ARCHITECTURE.md +262 -0
  462. package/.versions/0.0.9/docs/agent-fleet-setup.md +366 -0
  463. package/.versions/0.0.9/docs/claude-code-coms-bridge.md +109 -0
  464. package/.versions/0.0.9/docs/codex-remote-conductor.md +170 -0
  465. package/.versions/0.0.9/docs/coms-hermes-bridge.md +189 -0
  466. package/.versions/0.0.9/docs/getting-started.md +231 -0
  467. package/.versions/0.0.9/docs/npm-install.md +337 -0
  468. package/.versions/0.0.9/docs/opencode-setup.md +249 -0
  469. package/.versions/0.0.9/docs/pi-extensions.md +356 -0
  470. package/.versions/0.0.9/docs/pi-setup.md +476 -0
  471. package/.versions/0.0.9/docs/skill-anatomy.md +150 -0
  472. package/.versions/0.0.9/hermes/README.md +347 -0
  473. package/.versions/0.0.9/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  474. package/.versions/0.0.9/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  475. package/.versions/0.0.9/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  476. package/.versions/0.0.9/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  477. package/.versions/0.0.9/hermes/gates/gate-o-capability.md +8 -0
  478. package/.versions/0.0.9/hermes/gates/gate-o-validator-fixtures.json +1 -0
  479. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  480. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  481. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  482. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  483. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  484. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  485. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  486. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  487. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  488. package/.versions/0.0.9/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  489. package/.versions/0.0.9/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  490. package/.versions/0.0.9/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  491. package/.versions/0.0.9/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  492. package/.versions/0.0.9/hermes/skills/hub-conductor/SKILL.md +84 -0
  493. package/.versions/0.0.9/hermes/skills/hub-liaison/SKILL.md +84 -0
  494. package/.versions/0.0.9/hermes/skills/hub-watchdog/SKILL.md +76 -0
  495. package/.versions/0.0.9/hermes/skills/hub-watchdog/manifest.json +1 -0
  496. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  497. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  498. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  499. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  500. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  501. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  502. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  503. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  504. package/.versions/0.0.9/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  505. package/.versions/0.0.9/hermes/watchdog-tests/__init__.py +0 -0
  506. package/.versions/0.0.9/hooks/SIMPLIFY-IGNORE.md +90 -0
  507. package/.versions/0.0.9/hooks/coms-stop-hook.mjs +84 -0
  508. package/.versions/0.0.9/hooks/hooks.json +14 -0
  509. package/.versions/0.0.9/hooks/session-start.sh +74 -0
  510. package/.versions/0.0.9/hooks/simplify-ignore.sh +302 -0
  511. package/.versions/0.0.9/justfile +254 -0
  512. package/.versions/0.0.9/references/accessibility-checklist.md +160 -0
  513. package/.versions/0.0.9/references/definition-of-done.md +67 -0
  514. package/.versions/0.0.9/references/fleet-coordination-patterns.md +151 -0
  515. package/.versions/0.0.9/references/observability-checklist.md +91 -0
  516. package/.versions/0.0.9/references/orchestration-patterns.md +370 -0
  517. package/.versions/0.0.9/references/performance-checklist.md +153 -0
  518. package/.versions/0.0.9/references/prompting-patterns.md +380 -0
  519. package/.versions/0.0.9/references/security-checklist.md +179 -0
  520. package/.versions/0.0.9/references/testing-patterns.md +236 -0
  521. package/.versions/0.0.9/scripts/codex-conductor.ts +41 -0
  522. package/.versions/0.0.9/scripts/codex-remote-control.ts +167 -0
  523. package/.versions/0.0.9/scripts/coms-claude-bridge.ts +401 -0
  524. package/.versions/0.0.9/scripts/coms-cli.ts +484 -0
  525. package/.versions/0.0.9/scripts/coms-hermes-bridge.ts +413 -0
  526. package/.versions/0.0.9/scripts/fleet.ts +168 -0
  527. package/.versions/0.0.9/scripts/hermes-monitor-capability-runner.ts +25 -0
  528. package/.versions/0.0.9/scripts/hermes-monitor-scenario.ts +474 -0
  529. package/.versions/0.0.9/scripts/hermes-watchdog-capability-probe.ts +45 -0
  530. package/.versions/0.0.9/scripts/install-hermes-plugin.sh +180 -0
  531. package/.versions/0.0.9/scripts/lib/claude-bridge-core.ts +165 -0
  532. package/.versions/0.0.9/scripts/lib/codex-conductor.ts +88 -0
  533. package/.versions/0.0.9/scripts/lib/codex-remote-control.ts +480 -0
  534. package/.versions/0.0.9/scripts/lib/coms-envelope.ts +582 -0
  535. package/.versions/0.0.9/scripts/lib/fake-herdr-server.ts +88 -0
  536. package/.versions/0.0.9/scripts/lib/fleet-command.ts +111 -0
  537. package/.versions/0.0.9/scripts/lib/herdr-layout.ts +281 -0
  538. package/.versions/0.0.9/scripts/lib/hermes-bridge-core.ts +241 -0
  539. package/.versions/0.0.9/scripts/lib/hermes-monitor-events.ts +1 -0
  540. package/.versions/0.0.9/scripts/lib/hermes-monitor-herdr.ts +2 -0
  541. package/.versions/0.0.9/scripts/lib/hermes-monitor-model.ts +3 -0
  542. package/.versions/0.0.9/scripts/lib/hermes-monitor-registry.ts +2 -0
  543. package/.versions/0.0.9/scripts/lib/hermes-monitor-socket.ts +2 -0
  544. package/.versions/0.0.9/scripts/lib/hermes-monitor-store.ts +2 -0
  545. package/.versions/0.0.9/scripts/lib/monitor-env.ts +120 -0
  546. package/.versions/0.0.9/scripts/lib/peer-launch.ts +314 -0
  547. package/.versions/0.0.9/scripts/lib/persona-banner.ts +62 -0
  548. package/.versions/0.0.9/scripts/lib/spawn-stagger.ts +101 -0
  549. package/.versions/0.0.9/scripts/lib/team-project.ts +193 -0
  550. package/.versions/0.0.9/scripts/lib/team-snapshot.ts +147 -0
  551. package/.versions/0.0.9/scripts/peer-banner.ts +40 -0
  552. package/.versions/0.0.9/scripts/peer-launch.ts +259 -0
  553. package/.versions/0.0.9/scripts/team-snapshot.ts +237 -0
  554. package/.versions/0.0.9/scripts/team-up.ts +360 -0
  555. package/.versions/0.0.9/skills/_internal/grilling.md +11 -0
  556. package/.versions/0.0.9/skills/browser-testing-with-devtools/SKILL.md +352 -0
  557. package/.versions/0.0.9/skills/code-review-and-quality/SKILL.md +381 -0
  558. package/.versions/0.0.9/skills/compound-learning/SKILL.md +137 -0
  559. package/.versions/0.0.9/skills/context-engineering/SKILL.md +291 -0
  560. package/.versions/0.0.9/skills/deprecation-and-migration/SKILL.md +206 -0
  561. package/.versions/0.0.9/skills/designing-agents/SKILL.md +394 -0
  562. package/.versions/0.0.9/skills/designing-agents/pi-harness-authoring.md +222 -0
  563. package/.versions/0.0.9/skills/frontend-ui-engineering/SKILL.md +328 -0
  564. package/.versions/0.0.9/skills/git-workflow-and-versioning/SKILL.md +316 -0
  565. package/.versions/0.0.9/skills/guided-workspace-setup/SKILL.md +544 -0
  566. package/.versions/0.0.9/skills/guided-workspace-setup/companion-manifest.json +38 -0
  567. package/.versions/0.0.9/skills/idea-refine/SKILL.md +182 -0
  568. package/.versions/0.0.9/skills/idea-refine/examples.md +238 -0
  569. package/.versions/0.0.9/skills/idea-refine/frameworks.md +99 -0
  570. package/.versions/0.0.9/skills/idea-refine/refinement-criteria.md +113 -0
  571. package/.versions/0.0.9/skills/idea-refine/scripts/idea-refine.sh +15 -0
  572. package/.versions/0.0.9/skills/incremental-implementation/SKILL.md +287 -0
  573. package/.versions/0.0.9/skills/interview-me/SKILL.md +226 -0
  574. package/.versions/0.0.9/skills/orchestration-verification/SKILL.md +181 -0
  575. package/.versions/0.0.9/skills/peer-coms/SKILL.md +90 -0
  576. package/.versions/0.0.9/skills/performance-optimization/SKILL.md +350 -0
  577. package/.versions/0.0.9/skills/planning-and-task-breakdown/SKILL.md +236 -0
  578. package/.versions/0.0.9/skills/security-and-hardening/SKILL.md +461 -0
  579. package/.versions/0.0.9/skills/spec-driven-development/SKILL.md +245 -0
  580. package/.versions/0.0.9/skills/using-agent-skills/SKILL.md +199 -0
  581. package/.versions/0.0.9/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  582. package/.versions/0.0.9/vendor/agent-skills-upstream/LICENSE +21 -0
  583. package/.versions/0.0.9/vendor/agent-skills-upstream/README.md +11 -0
  584. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  585. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  586. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  587. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  588. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  589. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  590. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  591. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  592. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  593. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  594. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  595. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  596. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  597. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  598. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  599. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  600. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  601. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  602. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  603. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  604. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  605. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  606. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  607. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  608. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  609. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  610. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  611. package/.versions/0.0.9/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  612. package/CHANGELOG.md +44 -0
  613. package/agents/architect.md +1 -0
  614. package/agents/bowser.md +1 -0
  615. package/agents/builder.md +1 -0
  616. package/agents/code-reviewer.md +4 -5
  617. package/agents/deep-researcher.md +2 -1
  618. package/agents/orchestrator.md +1 -0
  619. package/agents/plan-reviewer.md +3 -1
  620. package/agents/planner.md +3 -2
  621. package/agents/security-auditor.md +1 -0
  622. package/agents/test-engineer.md +3 -1
  623. package/agents/web-debugger.md +1 -0
  624. package/agents/web-performance-auditor.md +1 -0
  625. package/docs/ARCHITECTURE.md +1 -1
  626. package/docs/pi-extensions.md +66 -3
  627. package/justfile +10 -1
  628. package/package.json +2 -2
  629. package/scripts/fleet.ts +22 -3
  630. package/scripts/lib/fleet-command.ts +5 -3
  631. package/scripts/lib/herdr-layout.ts +18 -0
  632. package/scripts/lib/peer-launch.ts +314 -0
  633. package/scripts/lib/team-project.ts +3 -1
  634. package/scripts/peer-launch.ts +259 -0
  635. package/skills/guided-workspace-setup/companion-manifest.json +3 -0
  636. /package/{.pi → .versions/0.0.8/.pi}/harnesses/agent-hub/spawned-peers.js +0 -0
@@ -0,0 +1,234 @@
1
+ ---
2
+ name: planning-and-task-breakdown
3
+ description: Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.
4
+ ---
5
+
6
+ # Planning and Task Breakdown
7
+
8
+ ## Overview
9
+
10
+ Decompose work into small, verifiable tasks with explicit acceptance criteria. Good task breakdown is the difference between an agent that completes work reliably and one that produces a tangled mess. Every task should be small enough to implement, test, and verify in a single focused session.
11
+
12
+ ## When to Use
13
+
14
+ - You have a spec and need to break it into implementable units
15
+ - A task feels too large or vague to start
16
+ - Work needs to be parallelized across multiple agents or sessions
17
+ - You need to communicate scope to a human
18
+ - The implementation order isn't obvious
19
+
20
+ **When NOT to use:** Single-file changes with obvious scope, or when the spec already contains well-defined tasks.
21
+
22
+ ## The Planning Process
23
+
24
+ ### Step 1: Enter Plan Mode
25
+
26
+ Before writing any code, operate in read-only mode:
27
+
28
+ - Read the spec and relevant codebase sections
29
+ - Identify existing patterns and conventions
30
+ - Map dependencies between components
31
+ - Note risks and unknowns
32
+
33
+ **Do NOT write code during planning.** The output is a plan document saved to `tasks/plan.md` and a task list saved to `tasks/todo.md`, not implementation.
34
+
35
+ ### Step 2: Identify the Dependency Graph
36
+
37
+ Map what depends on what:
38
+
39
+ ```
40
+ Database schema
41
+ │
42
+ ├── API models/types
43
+ │ │
44
+ │ ├── API endpoints
45
+ │ │ │
46
+ │ │ └── Frontend API client
47
+ │ │ │
48
+ │ │ └── UI components
49
+ │ │
50
+ │ └── Validation logic
51
+ │
52
+ └── Seed data / migrations
53
+ ```
54
+
55
+ Implementation order follows the dependency graph bottom-up: build foundations first.
56
+
57
+ ### Step 3: Slice Vertically
58
+
59
+ Instead of building all the database, then all the API, then all the UI — build one complete feature path at a time:
60
+
61
+ **Bad (horizontal slicing):**
62
+ ```
63
+ Task 1: Build entire database schema
64
+ Task 2: Build all API endpoints
65
+ Task 3: Build all UI components
66
+ Task 4: Connect everything
67
+ ```
68
+
69
+ **Good (vertical slicing):**
70
+ ```
71
+ Task 1: User can create an account (schema + API + UI for registration)
72
+ Task 2: User can log in (auth schema + API + UI for login)
73
+ Task 3: User can create a task (task schema + API + UI for creation)
74
+ Task 4: User can view task list (query + API + UI for list view)
75
+ ```
76
+
77
+ Each vertical slice delivers working, testable functionality.
78
+
79
+ ### Step 4: Write Tasks
80
+
81
+ Each task follows this structure:
82
+
83
+ ```markdown
84
+ ## Task [N]: [Short descriptive title]
85
+
86
+ **Description:** One paragraph explaining what this task accomplishes.
87
+
88
+ **Acceptance criteria:**
89
+ - [ ] [Specific, testable condition]
90
+ - [ ] [Specific, testable condition]
91
+
92
+ **Verification:**
93
+ - [ ] Tests pass: `npm test -- --grep "feature-name"`
94
+ - [ ] Build succeeds: `npm run build`
95
+ - [ ] Manual check: [description of what to verify]
96
+
97
+ **Dependencies:** [Task numbers this depends on, or "None"]
98
+
99
+ **Files likely touched:**
100
+ - `src/path/to/file.ts`
101
+ - `tests/path/to/test.ts`
102
+
103
+ **Estimated scope:** [Small: 1-2 files | Medium: 3-5 files | Large: 5+ files]
104
+ ```
105
+
106
+ ### Step 5: Order and Checkpoint
107
+
108
+ Arrange tasks so that:
109
+
110
+ 1. Dependencies are satisfied (build foundation first)
111
+ 2. Each task leaves the system in a working state
112
+ 3. Verification checkpoints occur after every 2-3 tasks
113
+ 4. High-risk tasks are early (fail fast)
114
+
115
+ Add explicit checkpoints:
116
+
117
+ ```markdown
118
+ ## Checkpoint: After Tasks 1-3
119
+ - [ ] All tests pass
120
+ - [ ] Application builds without errors
121
+ - [ ] Core user flow works end-to-end
122
+ - [ ] Review with human before proceeding
123
+ ```
124
+
125
+ ## Task Sizing Guidelines
126
+
127
+ | Size | Files | Scope | Example |
128
+ |------|-------|-------|---------|
129
+ | **XS** | 1 | Single function or config change | Add a validation rule |
130
+ | **S** | 1-2 | One component or endpoint | Add a new API endpoint |
131
+ | **M** | 3-5 | One feature slice | User registration flow |
132
+ | **L** | 5-8 | Multi-component feature | Search with filtering and pagination |
133
+ | **XL** | 8+ | **Too large — break it down further** | — |
134
+
135
+ If a task is L or larger, it should be broken into smaller tasks. An agent performs best on S and M tasks.
136
+
137
+ **When to break a task down further:**
138
+ - It would take more than one focused session (roughly 2+ hours of agent work)
139
+ - You cannot describe the acceptance criteria in 3 or fewer bullet points
140
+ - It touches two or more independent subsystems (e.g., auth and billing)
141
+ - You find yourself writing "and" in the task title (a sign it is two tasks)
142
+
143
+ ## Output Files
144
+
145
+ - **Plan document:** Save the implementation plan to `tasks/plan.md`.
146
+ - **Task list:** Save the checklist-style task list to `tasks/todo.md`.
147
+
148
+ Create the `tasks/` directory if it does not exist. These paths are the convention expected by the `/build` command and other downstream tooling.
149
+
150
+ ## Plan Document Template
151
+
152
+ ```markdown
153
+ # Implementation Plan: [Feature/Project Name]
154
+
155
+ ## Overview
156
+ [One paragraph summary of what we're building]
157
+
158
+ ## Architecture Decisions
159
+ - [Key decision 1 and rationale]
160
+ - [Key decision 2 and rationale]
161
+
162
+ ## Task List
163
+
164
+ ### Phase 1: Foundation
165
+ - [ ] Task 1: ...
166
+ - [ ] Task 2: ...
167
+
168
+ ### Checkpoint: Foundation
169
+ - [ ] Tests pass, builds clean
170
+
171
+ ### Phase 2: Core Features
172
+ - [ ] Task 3: ...
173
+ - [ ] Task 4: ...
174
+
175
+ ### Checkpoint: Core Features
176
+ - [ ] End-to-end flow works
177
+
178
+ ### Phase 3: Polish
179
+ - [ ] Task 5: ...
180
+ - [ ] Task 6: ...
181
+
182
+ ### Checkpoint: Complete
183
+ - [ ] All acceptance criteria met
184
+ - [ ] Ready for review
185
+
186
+ ## Risks and Mitigations
187
+ | Risk | Impact | Mitigation |
188
+ |------|--------|------------|
189
+ | [Risk] | [High/Med/Low] | [Strategy] |
190
+
191
+ ## Open Questions
192
+ - [Question needing human input]
193
+ ```
194
+
195
+ ## Parallelization Opportunities
196
+
197
+ When multiple agents or sessions are available:
198
+
199
+ - **Safe to parallelize:** Independent feature slices, tests for already-implemented features, documentation
200
+ - **Must be sequential:** Database migrations, shared state changes, dependency chains
201
+ - **Needs coordination:** Features that share an API contract (define the contract first, then parallelize)
202
+
203
+ ## Common Rationalizations
204
+
205
+ | Rationalization | Reality |
206
+ |---|---|
207
+ | "I'll figure it out as I go" | That's how you end up with a tangled mess and rework. 10 minutes of planning saves hours. |
208
+ | "The tasks are obvious" | Write them down anyway. Explicit tasks surface hidden dependencies and forgotten edge cases. |
209
+ | "Planning is overhead" | Planning is the task. Implementation without a plan is just typing. |
210
+ | "I can hold it all in my head" | Context windows are finite. Written plans survive session boundaries and compaction. |
211
+
212
+ ## Red Flags
213
+
214
+ - Starting implementation without a written task list
215
+ - Tasks that say "implement the feature" without acceptance criteria
216
+ - No verification steps in the plan
217
+ - All tasks are XL-sized
218
+ - No checkpoints between tasks
219
+ - Dependency order isn't considered
220
+
221
+ ## Verification
222
+
223
+ Before starting implementation, confirm:
224
+
225
+ - [ ] Every task has acceptance criteria
226
+ - [ ] Every task has a verification step
227
+ - [ ] Task dependencies are identified and ordered correctly
228
+ - [ ] No task touches more than ~5 files
229
+ - [ ] Checkpoints exist between major phases
230
+ - [ ] The human has reviewed and approved the plan
231
+
232
+ ## See Also
233
+
234
+ Acceptance criteria are per-task and answer "did we build the right thing?". They sit on top of the project-wide Definition of Done, the standing bar every task clears before it counts as done. See `references/definition-of-done.md`.
@@ -0,0 +1,467 @@
1
+ ---
2
+ name: security-and-hardening
3
+ description: Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services.
4
+ ---
5
+
6
+ # Security and Hardening
7
+
8
+ ## Overview
9
+
10
+ Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.
11
+
12
+ ## When to Use
13
+
14
+ - Building anything that accepts user input
15
+ - Implementing authentication or authorization
16
+ - Storing or transmitting sensitive data
17
+ - Integrating with external APIs or services
18
+ - Adding file uploads, webhooks, or callbacks
19
+ - Handling payment or PII data
20
+
21
+ ## Process: Threat Model First
22
+
23
+ Controls bolted on without a threat model are guesses. Before hardening, spend five minutes thinking like an attacker:
24
+
25
+ 1. **Map the trust boundaries.** Where does untrusted data cross into your system? HTTP requests, form fields, file uploads, webhooks, third-party APIs, message queues, and **LLM output**. Every boundary is attack surface.
26
+ 2. **Name the assets.** What's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
27
+ 3. **Run STRIDE over each boundary** — a quick lens, not a ceremony:
28
+
29
+ | Threat | Ask | Typical mitigation |
30
+ |---|---|---|
31
+ | **S**poofing | Can someone impersonate a user/service? | Authentication, signature verification |
32
+ | **T**ampering | Can data be altered in transit or at rest? | Integrity checks, parameterized queries, HTTPS |
33
+ | **R**epudiation | Can an action be denied later? | Audit logging of security events |
34
+ | **I**nformation disclosure | Can data leak? | Encryption, field allowlists, generic errors |
35
+ | **D**enial of service | Can it be overwhelmed? | Rate limiting, input size caps, timeouts |
36
+ | **E**levation of privilege | Can a user gain rights they shouldn't? | Authorization checks, least privilege |
37
+
38
+ 4. **Write abuse cases next to use cases.** For each feature, ask "how would I misuse this?" — then make that your first test.
39
+
40
+ If you can't name the trust boundaries for a feature, you're not ready to secure it. This is OWASP **A04: Insecure Design** — most breaches begin in design, not code.
41
+
42
+ ## The Three-Tier Boundary System
43
+
44
+ ### Always Do (No Exceptions)
45
+
46
+ - **Validate all external input** at the system boundary (API routes, form handlers)
47
+ - **Parameterize all database queries** — never concatenate user input into SQL
48
+ - **Encode output** to prevent XSS (use framework auto-escaping, don't bypass it)
49
+ - **Use HTTPS** for all external communication
50
+ - **Hash passwords** with bcrypt/scrypt/argon2 (never store plaintext)
51
+ - **Set security headers** (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
52
+ - **Use httpOnly, secure, sameSite cookies** for sessions
53
+ - **Run the detected package manager's native audit** against the committed lockfile before every release
54
+
55
+ ### Ask First (Requires Human Approval)
56
+
57
+ - Adding new authentication flows or changing auth logic
58
+ - Storing new categories of sensitive data (PII, payment info)
59
+ - Adding new external service integrations
60
+ - Changing CORS configuration
61
+ - Adding file upload handlers
62
+ - Modifying rate limiting or throttling
63
+ - Granting elevated permissions or roles
64
+
65
+ ### Never Do
66
+
67
+ - **Never commit secrets** to version control (API keys, passwords, tokens)
68
+ - **Never log sensitive data** (passwords, tokens, full credit card numbers)
69
+ - **Never trust client-side validation** as a security boundary
70
+ - **Never disable security headers** for convenience
71
+ - **Never use `eval()` or `innerHTML`** with user-provided data
72
+ - **Never store sessions in client-accessible storage** (localStorage for auth tokens)
73
+ - **Never expose stack traces** or internal error details to users
74
+
75
+ ## OWASP Top 10 Prevention Patterns
76
+
77
+ These are prevention patterns, not a ranking. For the 2021 ordering, see the quick-reference table in `references/security-checklist.md`.
78
+
79
+ ### Injection (SQL, NoSQL, OS Command)
80
+
81
+ ```typescript
82
+ // BAD: SQL injection via string concatenation
83
+ const query = `SELECT * FROM users WHERE id = '${userId}'`;
84
+
85
+ // GOOD: Parameterized query
86
+ const user = await db.query('SELECT * FROM users WHERE id = $1', [userId]);
87
+
88
+ // GOOD: ORM with parameterized input
89
+ const user = await prisma.user.findUnique({ where: { id: userId } });
90
+ ```
91
+
92
+ ### Broken Authentication
93
+
94
+ ```typescript
95
+ // Password hashing
96
+ import { hash, compare } from 'bcrypt';
97
+
98
+ const SALT_ROUNDS = 12;
99
+ const hashedPassword = await hash(plaintext, SALT_ROUNDS);
100
+ const isValid = await compare(plaintext, hashedPassword);
101
+
102
+ // Session management
103
+ app.use(session({
104
+ secret: process.env.SESSION_SECRET, // From environment, not code
105
+ resave: false,
106
+ saveUninitialized: false,
107
+ cookie: {
108
+ httpOnly: true, // Not accessible via JavaScript
109
+ secure: true, // HTTPS only
110
+ sameSite: 'lax', // CSRF protection
111
+ maxAge: 24 * 60 * 60 * 1000, // 24 hours
112
+ },
113
+ }));
114
+ ```
115
+
116
+ ### Cross-Site Scripting (XSS)
117
+
118
+ ```typescript
119
+ // BAD: Rendering user input as HTML
120
+ element.innerHTML = userInput;
121
+
122
+ // GOOD: Use framework auto-escaping (React does this by default)
123
+ return <div>{userInput}</div>;
124
+
125
+ // If you MUST render HTML, sanitize first
126
+ import DOMPurify from 'dompurify';
127
+ const clean = DOMPurify.sanitize(userInput);
128
+ ```
129
+
130
+ ### Broken Access Control
131
+
132
+ ```typescript
133
+ // Always check authorization, not just authentication
134
+ app.patch('/api/tasks/:id', authenticate, async (req, res) => {
135
+ const task = await taskService.findById(req.params.id);
136
+
137
+ // Check that the authenticated user owns this resource
138
+ if (task.ownerId !== req.user.id) {
139
+ return res.status(403).json({
140
+ error: { code: 'FORBIDDEN', message: 'Not authorized to modify this task' }
141
+ });
142
+ }
143
+
144
+ // Proceed with update
145
+ const updated = await taskService.update(req.params.id, req.body);
146
+ return res.json(updated);
147
+ });
148
+ ```
149
+
150
+ ### Security Misconfiguration
151
+
152
+ ```typescript
153
+ // Security headers (use helmet for Express)
154
+ import helmet from 'helmet';
155
+ app.use(helmet());
156
+
157
+ // Content Security Policy
158
+ app.use(helmet.contentSecurityPolicy({
159
+ directives: {
160
+ defaultSrc: ["'self'"],
161
+ scriptSrc: ["'self'"],
162
+ styleSrc: ["'self'", "'unsafe-inline'"], // Tighten if possible
163
+ imgSrc: ["'self'", 'data:', 'https:'],
164
+ connectSrc: ["'self'"],
165
+ },
166
+ }));
167
+
168
+ // CORS — restrict to known origins
169
+ app.use(cors({
170
+ origin: process.env.ALLOWED_ORIGINS?.split(',') || 'http://localhost:3000',
171
+ credentials: true,
172
+ }));
173
+ ```
174
+
175
+ ### Sensitive Data Exposure
176
+
177
+ ```typescript
178
+ // Never return sensitive fields in API responses
179
+ function sanitizeUser(user: UserRecord): PublicUser {
180
+ const { passwordHash, resetToken, ...publicFields } = user;
181
+ return publicFields;
182
+ }
183
+
184
+ // Use environment variables for secrets
185
+ const API_KEY = process.env.STRIPE_API_KEY;
186
+ if (!API_KEY) throw new Error('STRIPE_API_KEY not configured');
187
+ ```
188
+
189
+ ### Server-Side Request Forgery (SSRF)
190
+
191
+ Any time the server fetches a URL the user influenced — webhooks, "import from URL", image proxies, link previews — an attacker can aim it at internal services (cloud metadata, `localhost`, private IPs).
192
+
193
+ ```typescript
194
+ // BAD: fetch whatever the user gives you
195
+ await fetch(req.body.webhookUrl);
196
+
197
+ // GOOD: allowlist scheme + host, reject if ANY resolved IP is private, forbid redirects
198
+ import { lookup } from 'node:dns/promises';
199
+ import ipaddr from 'ipaddr.js';
200
+
201
+ const ALLOWED_HOSTS = new Set(['hooks.example.com']);
202
+
203
+ async function assertSafeUrl(raw: string): Promise<URL> {
204
+ const url = new URL(raw);
205
+ if (url.protocol !== 'https:') throw new Error('https only');
206
+ if (!ALLOWED_HOSTS.has(url.hostname)) throw new Error('host not allowed');
207
+ // Resolve ALL records; a single private/reserved address fails the check.
208
+ const addrs = await lookup(url.hostname, { all: true });
209
+ if (addrs.some((a) => ipaddr.parse(a.address).range() !== 'unicast')) {
210
+ throw new Error('private/reserved IP');
211
+ }
212
+ return url;
213
+ }
214
+
215
+ await fetch(await assertSafeUrl(req.body.webhookUrl), { redirect: 'error' });
216
+ ```
217
+
218
+ The `range() !== 'unicast'` check covers loopback, link-local `169.254.169.254` (cloud metadata, the #1 SSRF target), private, and unique-local ranges across IPv4 and IPv6.
219
+
220
+ **Caveat — this still has a TOCTOU gap.** `fetch` resolves DNS again after the check, so an attacker using a short-TTL record can rebind to an internal IP between validation and connection. For high-risk surfaces, resolve once and connect to the pinned IP, or put a filtering agent in front (`request-filtering-agent` / `ssrf-req-filter`).
221
+
222
+ ## Input Validation Patterns
223
+
224
+ ### Schema Validation at Boundaries
225
+
226
+ ```typescript
227
+ import { z } from 'zod';
228
+
229
+ const CreateTaskSchema = z.object({
230
+ title: z.string().min(1).max(200).trim(),
231
+ description: z.string().max(2000).optional(),
232
+ priority: z.enum(['low', 'medium', 'high']).default('medium'),
233
+ dueDate: z.string().datetime().optional(),
234
+ });
235
+
236
+ // Validate at the route handler
237
+ app.post('/api/tasks', async (req, res) => {
238
+ const result = CreateTaskSchema.safeParse(req.body);
239
+ if (!result.success) {
240
+ return res.status(422).json({
241
+ error: {
242
+ code: 'VALIDATION_ERROR',
243
+ message: 'Invalid input',
244
+ details: result.error.flatten(),
245
+ },
246
+ });
247
+ }
248
+ // result.data is now typed and validated
249
+ const task = await taskService.create(result.data);
250
+ return res.status(201).json(task);
251
+ });
252
+ ```
253
+
254
+ ### File Upload Safety
255
+
256
+ ```typescript
257
+ // Restrict file types and sizes
258
+ const ALLOWED_TYPES = ['image/jpeg', 'image/png', 'image/webp'];
259
+ const MAX_SIZE = 5 * 1024 * 1024; // 5MB
260
+
261
+ function validateUpload(file: UploadedFile) {
262
+ if (!ALLOWED_TYPES.includes(file.mimetype)) {
263
+ throw new ValidationError('File type not allowed');
264
+ }
265
+ if (file.size > MAX_SIZE) {
266
+ throw new ValidationError('File too large (max 5MB)');
267
+ }
268
+ // Don't trust the file extension — check magic bytes if critical
269
+ }
270
+ ```
271
+
272
+ ## Triaging Dependency Audit Results
273
+
274
+ Package-manager audits report known advisories; they do not prove a package is trustworthy or that vulnerable code is reachable. Use this decision tree:
275
+
276
+ ```
277
+ The native package-manager audit reports a vulnerability
278
+ ├── Severity: critical or high
279
+ │ ├── Is the vulnerable code reachable in runtime, build, test, or deployment paths?
280
+ │ │ ├── YES --> Fix immediately (update, patch, or replace the dependency)
281
+ │ │ └── NO (confirmed unused across those paths) --> Fix soon, but not a blocker
282
+ │ └── Is a fix available?
283
+ │ ├── YES --> Update to the patched version
284
+ │ └── NO --> Check for workarounds, consider replacing the dependency, or add to allowlist with a review date
285
+ ├── Severity: moderate
286
+ │ ├── Reachable in production? --> Fix in the next release cycle
287
+ │ └── Dev-only? --> Fix when convenient, track in backlog
288
+ └── Severity: low
289
+ └── Track and fix during regular dependency updates
290
+ ```
291
+
292
+ **Key questions:**
293
+ - Is the vulnerable function actually called in your code path?
294
+ - Is the dependency a runtime dependency or dev-only?
295
+ - Is the vulnerability exploitable given your deployment context (e.g., a server-side vulnerability in a client-only app)?
296
+
297
+ When you defer a fix, document the reason and set a review date.
298
+
299
+ ### Supply-Chain Hygiene
300
+
301
+ Do not assume npm or treat the nearest manifest as the install root. Apply this order:
302
+
303
+ 1. **Find the installation boundary and manager.** Use the workspace root that owns the lockfile, or an independent nested project only when it is outside that workspace. There, corroborate `packageManager` (when present), the lockfile, and CI; stop on disagreement or competing lockfiles. Pin the manager version and use the matrix in `references/security-checklist.md`.
304
+ 2. **Block dependency scripts before first execution.** Bootstrap with scripts disabled or a documented fail-closed policy, inspect the pending script source, approve only the minimum required packages, commit the policy, then verify with a clean frozen/immutable install. Never blanket-approve scripts.
305
+
306
+ Audits only find known advisories; they do not catch a newly malicious or typosquatted package. Therefore:
307
+
308
+ - **Never apply forced audit remediation automatically** (`npm audit fix --force` or equivalent). Preview the remediation, read changelogs, and test each resulting upgrade; forced fixes may cross declared dependency ranges.
309
+ - **Verify registry signatures and provenance where supported** (`npm audit signatures`, `pnpm audit signatures`) and treat absence as a signal to investigate, not automatic proof of compromise.
310
+ - **Review new dependencies, lockfile diffs, and script-policy changes together** — ownership, maintenance, release age, provenance, transitive graph, and typosquats such as `cross-env` vs `crossenv` (OWASP **A06**, **LLM03**).
311
+
312
+ ## Rate Limiting
313
+
314
+ ```typescript
315
+ import rateLimit from 'express-rate-limit';
316
+
317
+ // General API rate limit
318
+ app.use('/api/', rateLimit({
319
+ windowMs: 15 * 60 * 1000, // 15 minutes
320
+ max: 100, // 100 requests per window
321
+ standardHeaders: true,
322
+ legacyHeaders: false,
323
+ }));
324
+
325
+ // Stricter limit for auth endpoints
326
+ app.use('/api/auth/', rateLimit({
327
+ windowMs: 15 * 60 * 1000,
328
+ max: 10, // 10 attempts per 15 minutes
329
+ }));
330
+ ```
331
+
332
+ ## Secrets Management
333
+
334
+ ```
335
+ .env files:
336
+ ├── .env.example → Committed (template with placeholder values)
337
+ ├── .env → NOT committed (contains real secrets)
338
+ └── .env.local → NOT committed (local overrides)
339
+
340
+ .gitignore must include:
341
+ .env
342
+ .env.local
343
+ .env.*.local
344
+ *.pem
345
+ *.key
346
+ ```
347
+
348
+ **Always check before committing:**
349
+ ```bash
350
+ # Check for accidentally staged secrets
351
+ git diff --cached | grep -i "password\|secret\|api_key\|token"
352
+ ```
353
+
354
+ **If a secret is ever committed, rotate it.** Deleting the line or rewriting history is not enough — assume it's compromised the moment it reaches a remote. Revoke and reissue the key first, then purge it from history.
355
+
356
+ ## Securing AI / LLM Features
357
+
358
+ If your app calls an LLM — chatbots, summarizers, agents, RAG — it inherits a new attack surface. Map it to the [OWASP Top 10 for LLM Applications (2025)](https://genai.owasp.org/llm-top-10/):
359
+
360
+ - **Treat all model output as untrusted input (LLM05: Improper Output Handling).** Never pass LLM output straight into `eval`, SQL, a shell, `innerHTML`, or a file path. Validate and encode it exactly as you would raw user input.
361
+ - **Assume prompts can be hijacked (LLM01: Prompt Injection).** Untrusted text in the context window — a user message, a fetched web page, a PDF — can carry instructions. The system prompt is not a security boundary; enforce permissions in code, not in the prompt.
362
+ - **Keep secrets and other users' data out of prompts (LLM02 / LLM07).** Anything in the context can be echoed back. Don't put API keys, cross-tenant data, or the full system prompt where the model can repeat it.
363
+ - **Constrain tool and agent permissions (LLM06: Excessive Agency).** Scope tools to the minimum, require confirmation for destructive or irreversible actions, and validate every tool argument.
364
+ - **Bound consumption (LLM10: Unbounded Consumption).** Cap tokens, request rate, and loop/recursion depth so a crafted input can't run up cost or hang the system.
365
+ - **Isolate retrieval data (LLM08: Vector and Embedding Weaknesses).** In RAG, treat the vector store as a trust boundary: partition embeddings per tenant so one user can't retrieve another's data, and validate documents before indexing so poisoned content can't steer answers.
366
+
367
+ ```typescript
368
+ // BAD: trusting model output as a command or as markup
369
+ const sql = await llm.generate(`Write SQL for: ${userQuestion}`);
370
+ await db.query(sql); // arbitrary query execution
371
+ container.innerHTML = await llm.reply(userMessage); // stored XSS, via the model
372
+
373
+ // GOOD: model output is data — parse defensively, then validate, then encode
374
+ let intent;
375
+ try {
376
+ intent = CommandSchema.parse(JSON.parse(await llm.replyJson(userMessage)));
377
+ } catch {
378
+ throw new ValidationError('unexpected model output'); // JSON.parse or schema failed
379
+ }
380
+ await runAllowlistedAction(intent.action, intent.params);
381
+ container.textContent = await llm.reply(userMessage);
382
+ ```
383
+
384
+ ## Security Review Checklist
385
+
386
+ ```markdown
387
+ ### Authentication
388
+ - [ ] Passwords hashed with bcrypt/scrypt/argon2 (salt rounds ≥ 12)
389
+ - [ ] Session tokens are httpOnly, secure, sameSite
390
+ - [ ] Login has rate limiting
391
+ - [ ] Password reset tokens expire
392
+
393
+ ### Authorization
394
+ - [ ] Every endpoint checks user permissions
395
+ - [ ] Users can only access their own resources
396
+ - [ ] Admin actions require admin role verification
397
+
398
+ ### Input
399
+ - [ ] All user input validated at the boundary
400
+ - [ ] SQL queries are parameterized
401
+ - [ ] HTML output is encoded/escaped
402
+ - [ ] Server-side URL fetches are allowlisted (no SSRF to internal services)
403
+
404
+ ### Data
405
+ - [ ] No secrets in code or version control
406
+ - [ ] Sensitive fields excluded from API responses
407
+ - [ ] PII encrypted at rest (if applicable)
408
+
409
+ ### Infrastructure
410
+ - [ ] Security headers configured (CSP, HSTS, etc.)
411
+ - [ ] CORS restricted to known origins
412
+ - [ ] Dependencies audited for vulnerabilities
413
+ - [ ] Error messages don't expose internals
414
+
415
+ ### Supply Chain
416
+ - [ ] One authoritative lockfile committed; CI uses that manager's frozen/immutable install
417
+ - [ ] Native audit triaged by reachability and fix risk; dependency install scripts blocked unless explicitly approved
418
+ - [ ] New dependencies reviewed (ownership, provenance, release age, transitive graph)
419
+
420
+ ### AI / LLM (if used)
421
+ - [ ] Model output treated as untrusted (no eval/SQL/innerHTML/shell)
422
+ - [ ] Secrets and other users' data kept out of prompts
423
+ - [ ] Tool/agent permissions scoped; destructive actions require confirmation
424
+ ```
425
+ ## See Also
426
+
427
+ For detailed security checklists and pre-commit verification steps, see `references/security-checklist.md`.
428
+
429
+ ## Common Rationalizations
430
+
431
+ | Rationalization | Reality |
432
+ |---|---|
433
+ | "This is an internal tool, security doesn't matter" | Internal tools get compromised. Attackers target the weakest link. |
434
+ | "We'll add security later" | Security retrofitting is 10x harder than building it in. Add it now. |
435
+ | "No one would try to exploit this" | Automated scanners will find it. Security by obscurity is not security. |
436
+ | "The framework handles security" | Frameworks provide tools, not guarantees. You still need to use them correctly. |
437
+ | "It's just a prototype" | Prototypes become production. Security habits from day one. |
438
+ | "Threat modeling is overkill here" | Five minutes of "how would I attack this?" prevents the design flaws no control can patch later. |
439
+ | "It's just LLM output, it's only text" | That "text" can be a SQL statement, a script tag, or a shell command. Treat it like any untrusted input. |
440
+ | "The audit passed, so the dependency is safe" | Audits match known advisories. They do not detect a newly malicious package or make unreviewed install scripts safe to execute. |
441
+
442
+ ## Red Flags
443
+
444
+ - User input passed directly to database queries, shell commands, or HTML rendering
445
+ - Secrets in source code or commit history
446
+ - API endpoints without authentication or authorization checks
447
+ - Missing CORS configuration or wildcard (`*`) origins
448
+ - No rate limiting on authentication endpoints
449
+ - Stack traces or internal errors exposed to users
450
+ - Dependencies with known critical vulnerabilities, competing lockfiles at one installation boundary, non-reproducible installs, or blanket-approved scripts
451
+ - Server fetches user-supplied URLs without an allowlist (SSRF)
452
+ - LLM/model output passed into a query, the DOM, a shell, or `eval`
453
+ - Secrets, PII, or the full system prompt placed inside an LLM context window
454
+
455
+ ## Verification
456
+
457
+ After implementing security-relevant code:
458
+
459
+ - [ ] The native audit has no unmitigated reachable critical/high findings; CI preserves the authoritative lockfile and blocks unreviewed dependency scripts
460
+ - [ ] No secrets in source code or git history
461
+ - [ ] All user input validated at system boundaries
462
+ - [ ] Authentication and authorization checked on every protected endpoint
463
+ - [ ] Security headers present in response (check with browser DevTools)
464
+ - [ ] Error responses don't expose internal details
465
+ - [ ] Rate limiting active on auth endpoints
466
+ - [ ] Server-side URL fetches validated against an allowlist (no SSRF)
467
+ - [ ] LLM/model output validated and encoded before use (if AI features present)