@monoes/monomindcli 2.9.7 → 2.9.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 (295) hide show
  1. package/.claude/agents/design/design-monodesign.md +1 -2
  2. package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +1 -2
  3. package/.claude/agents/engineering/engineering-ai-engineer.md +1 -2
  4. package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -1
  5. package/.claude/agents/engineering/engineering-backend-architect.md +1 -2
  6. package/.claude/agents/engineering/engineering-code-reviewer.md +1 -2
  7. package/.claude/agents/engineering/engineering-data-engineer.md +1 -2
  8. package/.claude/agents/engineering/engineering-database-optimizer.md +1 -2
  9. package/.claude/agents/engineering/engineering-devops-automator.md +1 -2
  10. package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +1 -2
  11. package/.claude/agents/engineering/engineering-feishu-integration-developer.md +1 -2
  12. package/.claude/agents/engineering/engineering-frontend-developer.md +1 -2
  13. package/.claude/agents/engineering/engineering-git-workflow-master.md +1 -2
  14. package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -1
  15. package/.claude/agents/engineering/engineering-mobile-app-builder.md +1 -2
  16. package/.claude/agents/engineering/engineering-rapid-prototyper.md +1 -2
  17. package/.claude/agents/engineering/engineering-security-engineer.md +1 -2
  18. package/.claude/agents/engineering/engineering-senior-developer.md +1 -2
  19. package/.claude/agents/engineering/engineering-software-architect.md +1 -2
  20. package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +1 -2
  21. package/.claude/agents/engineering/engineering-sre.md +0 -1
  22. package/.claude/agents/engineering/engineering-technical-writer.md +1 -2
  23. package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -1
  24. package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +1 -2
  25. package/.claude/agents/github/code-review-swarm.md +0 -1
  26. package/.claude/agents/github/github-modes.md +0 -1
  27. package/.claude/agents/github/issue-tracker.md +0 -1
  28. package/.claude/agents/github/multi-repo-swarm.md +0 -1
  29. package/.claude/agents/github/pr-manager.md +0 -1
  30. package/.claude/agents/github/project-board-sync.md +0 -1
  31. package/.claude/agents/github/release-manager.md +0 -1
  32. package/.claude/agents/github/repo-architect.md +0 -1
  33. package/.claude/agents/github/swarm-issue.md +0 -1
  34. package/.claude/agents/github/swarm-pr.md +0 -1
  35. package/.claude/agents/github/sync-coordinator.md +0 -1
  36. package/.claude/agents/github/workflow-automation.md +0 -1
  37. package/.claude/agents/marketing/marketing-competitive-content.md +1 -2
  38. package/.claude/agents/marketing/marketing-cro-specialist.md +1 -2
  39. package/.claude/agents/marketing/marketing-email-specialist.md +1 -2
  40. package/.claude/agents/marketing/marketing-launch-strategist.md +1 -2
  41. package/.claude/agents/marketing/marketing-pricing-strategist.md +1 -2
  42. package/.claude/agents/specialized/agentic-identity-trust.md +0 -1
  43. package/.claude/agents/specialized/agents-orchestrator.md +1 -2
  44. package/.claude/agents/specialized/automation-governance-architect.md +1 -2
  45. package/.claude/agents/specialized/blockchain-security-auditor.md +1 -2
  46. package/.claude/agents/specialized/compliance-auditor.md +1 -2
  47. package/.claude/agents/specialized/identity-graph-operator.md +0 -1
  48. package/.claude/agents/specialized/lsp-index-engineer.md +1 -2
  49. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -1
  50. package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -1
  51. package/.claude/agents/specialized/specialized-developer-advocate.md +1 -2
  52. package/.claude/agents/specialized/specialized-document-generator.md +1 -2
  53. package/.claude/agents/specialized/specialized-mcp-builder.md +1 -2
  54. package/.claude/agents/specialized/specialized-model-qa.md +0 -1
  55. package/.claude/agents/specialized/specialized-workflow-architect.md +1 -2
  56. package/.claude/agents/specialized/zk-steward.md +1 -2
  57. package/.claude/agents/testing/production-validator.md +0 -1
  58. package/.claude/agents/testing/tdd-london-swarm.md +0 -1
  59. package/.claude/agents/testing/testing-accessibility-auditor.md +0 -1
  60. package/.claude/agents/testing/testing-api-tester.md +1 -2
  61. package/.claude/agents/testing/testing-evidence-collector.md +1 -2
  62. package/.claude/agents/testing/testing-performance-benchmarker.md +1 -2
  63. package/.claude/agents/testing/testing-test-results-analyzer.md +1 -2
  64. package/.claude/agents/testing/testing-tool-evaluator.md +1 -2
  65. package/.claude/agents/testing/testing-workflow-optimizer.md +1 -2
  66. package/.claude/commands/hooks/README.md +1 -1
  67. package/.claude/commands/memory/README.md +6 -7
  68. package/.claude/commands/monitoring/README.md +1 -1
  69. package/.claude/helpers/control-start.cjs +27 -7
  70. package/.claude/helpers/handlers/route-handler.cjs +22 -3
  71. package/.claude/helpers/handlers/session-handler.cjs +43 -0
  72. package/.claude/helpers/intelligence.cjs +27 -6
  73. package/.claude/helpers/statusline.cjs +45 -11
  74. package/.claude/skills/agentic-jujutsu/SKILL.md +17 -15
  75. package/.claude/skills/hive-mind-advanced/SKILL.md +212 -559
  76. package/.claude/skills/hooks-automation/SKILL.md +1 -1
  77. package/.claude/skills/mastermind-adapters/SKILL.md +0 -11
  78. package/.claude/skills/mastermind-agents/SKILL.md +0 -11
  79. package/.claude/skills/mastermind-backup/SKILL.md +0 -11
  80. package/.claude/skills/mastermind-bootstrap/SKILL.md +0 -11
  81. package/.claude/skills/mastermind-delegation/SKILL.md +14 -12
  82. package/.claude/skills/mastermind-idea/SKILL.md +0 -5
  83. package/.claude/skills/mastermind-monitor/SKILL.md +0 -15
  84. package/.claude/skills/mastermind-org-settings/SKILL.md +0 -11
  85. package/.claude/skills/mastermind-plugins/SKILL.md +0 -11
  86. package/.claude/skills/mastermind-protocol/SKILL.md +6 -124
  87. package/.claude/skills/mastermind-repeat/SKILL.md +0 -25
  88. package/.claude/skills/mastermind-review/SKILL.md +1 -1
  89. package/.claude/skills/mastermind-stoporg/SKILL.md +0 -19
  90. package/.claude/skills/memory-toolkit/SKILL.md +12 -11
  91. package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +8 -1
  92. package/.claude/skills/pair-programming/SKILL.md +1 -1
  93. package/.claude/skills/performance-analysis/SKILL.md +228 -484
  94. package/.claude/skills/specialagent/SKILL.md +31 -133
  95. package/.claude/skills/swarm-advanced/SKILL.md +2 -2
  96. package/.claude/skills/swarm-orchestration/SKILL.md +220 -150
  97. package/.claude/skills/verification-quality/SKILL.md +247 -571
  98. package/README.md +3 -3
  99. package/dist/src/commands/agent-lifecycle.js +3 -3
  100. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  101. package/dist/src/commands/autopilot.d.ts.map +1 -1
  102. package/dist/src/commands/autopilot.js +7 -1
  103. package/dist/src/commands/autopilot.js.map +1 -1
  104. package/dist/src/commands/doc.d.ts.map +1 -1
  105. package/dist/src/commands/doc.js +14 -3
  106. package/dist/src/commands/doc.js.map +1 -1
  107. package/dist/src/commands/doctor-env-checks.d.ts +1 -1
  108. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
  109. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  110. package/dist/src/commands/doctor-project-checks.js +3 -37
  111. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  112. package/dist/src/commands/doctor.d.ts.map +1 -1
  113. package/dist/src/commands/doctor.js +30 -1
  114. package/dist/src/commands/doctor.js.map +1 -1
  115. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  116. package/dist/src/commands/hooks-coverage-commands.js +75 -67
  117. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  118. package/dist/src/commands/hooks-workers.d.ts.map +1 -1
  119. package/dist/src/commands/hooks-workers.js +41 -10
  120. package/dist/src/commands/hooks-workers.js.map +1 -1
  121. package/dist/src/commands/hooks.js +1 -1
  122. package/dist/src/commands/index.d.ts +1 -1
  123. package/dist/src/commands/index.d.ts.map +1 -1
  124. package/dist/src/commands/index.js +20 -4
  125. package/dist/src/commands/index.js.map +1 -1
  126. package/dist/src/commands/init.d.ts.map +1 -1
  127. package/dist/src/commands/init.js +80 -7
  128. package/dist/src/commands/init.js.map +1 -1
  129. package/dist/src/commands/mcp.d.ts.map +1 -1
  130. package/dist/src/commands/mcp.js +78 -2
  131. package/dist/src/commands/mcp.js.map +1 -1
  132. package/dist/src/commands/neural-optimize.d.ts.map +1 -1
  133. package/dist/src/commands/neural-optimize.js +27 -5
  134. package/dist/src/commands/neural-optimize.js.map +1 -1
  135. package/dist/src/commands/org-observe.d.ts.map +1 -1
  136. package/dist/src/commands/org-observe.js +37 -30
  137. package/dist/src/commands/org-observe.js.map +1 -1
  138. package/dist/src/commands/org.d.ts.map +1 -1
  139. package/dist/src/commands/org.js +129 -2
  140. package/dist/src/commands/org.js.map +1 -1
  141. package/dist/src/commands/performance.js +1 -1
  142. package/dist/src/commands/performance.js.map +1 -1
  143. package/dist/src/commands/security-cve.d.ts.map +1 -1
  144. package/dist/src/commands/security-cve.js +1 -11
  145. package/dist/src/commands/security-cve.js.map +1 -1
  146. package/dist/src/commands/security-misc.d.ts +0 -9
  147. package/dist/src/commands/security-misc.d.ts.map +1 -1
  148. package/dist/src/commands/security-misc.js +33 -54
  149. package/dist/src/commands/security-misc.js.map +1 -1
  150. package/dist/src/commands/security-scan.d.ts.map +1 -1
  151. package/dist/src/commands/security-scan.js +3 -11
  152. package/dist/src/commands/security-scan.js.map +1 -1
  153. package/dist/src/commands/swarm.d.ts.map +1 -1
  154. package/dist/src/commands/swarm.js +7 -2
  155. package/dist/src/commands/swarm.js.map +1 -1
  156. package/dist/src/commands/ui.d.ts +8 -0
  157. package/dist/src/commands/ui.d.ts.map +1 -0
  158. package/dist/src/commands/ui.js +94 -0
  159. package/dist/src/commands/ui.js.map +1 -0
  160. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  161. package/dist/src/init/claudemd-generator.js +7 -9
  162. package/dist/src/init/claudemd-generator.js.map +1 -1
  163. package/dist/src/init/executor.d.ts.map +1 -1
  164. package/dist/src/init/executor.js +13 -3
  165. package/dist/src/init/executor.js.map +1 -1
  166. package/dist/src/init/kimi-generator.d.ts +3 -2
  167. package/dist/src/init/kimi-generator.d.ts.map +1 -1
  168. package/dist/src/init/kimi-generator.js +45 -13
  169. package/dist/src/init/kimi-generator.js.map +1 -1
  170. package/dist/src/init/statusline-generator.d.ts +1 -1
  171. package/dist/src/init/statusline-generator.js +1 -1
  172. package/dist/src/init/write-capabilities.js +7 -7
  173. package/dist/src/init/write-capabilities.js.map +1 -1
  174. package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
  175. package/dist/src/knowledge/document-pipeline.js +1 -0
  176. package/dist/src/knowledge/document-pipeline.js.map +1 -1
  177. package/dist/src/knowledge/eval/golden-set.d.ts.map +1 -1
  178. package/dist/src/knowledge/eval/golden-set.js +21 -32
  179. package/dist/src/knowledge/eval/golden-set.js.map +1 -1
  180. package/dist/src/mcp-tools/embeddings-tools.js +2 -2
  181. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  182. package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
  183. package/dist/src/mcp-tools/hooks-intelligence.js +29 -3
  184. package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
  185. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  186. package/dist/src/mcp-tools/hooks-routing.js +32 -19
  187. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  188. package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
  189. package/dist/src/mcp-tools/monograph/query-tools.js +48 -18
  190. package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
  191. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  192. package/dist/src/mcp-tools/performance-tools.js +15 -10
  193. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  194. package/dist/src/memory/embedding-operations.d.ts +4 -0
  195. package/dist/src/memory/embedding-operations.d.ts.map +1 -1
  196. package/dist/src/memory/embedding-operations.js +125 -32
  197. package/dist/src/memory/embedding-operations.js.map +1 -1
  198. package/dist/src/memory/hnsw-operations.d.ts +1 -1
  199. package/dist/src/memory/hnsw-operations.js +1 -1
  200. package/dist/src/memory/memory-bridge.d.ts +8 -0
  201. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  202. package/dist/src/memory/memory-bridge.js +37 -8
  203. package/dist/src/memory/memory-bridge.js.map +1 -1
  204. package/dist/src/memory/memory-read.d.ts +1 -1
  205. package/dist/src/memory/memory-read.js +2 -2
  206. package/dist/src/memory/memory-read.js.map +1 -1
  207. package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
  208. package/dist/src/orgrt/antigravity-runner.js +6 -6
  209. package/dist/src/orgrt/antigravity-runner.js.map +1 -1
  210. package/dist/src/orgrt/checkpoint-ops.d.ts +11 -1
  211. package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
  212. package/dist/src/orgrt/checkpoint-ops.js +18 -86
  213. package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
  214. package/dist/src/orgrt/checkpoint.d.ts +1 -1
  215. package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
  216. package/dist/src/orgrt/checkpoint.js +3 -3
  217. package/dist/src/orgrt/checkpoint.js.map +1 -1
  218. package/dist/src/orgrt/daemon.d.ts +9 -1
  219. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  220. package/dist/src/orgrt/daemon.js +267 -139
  221. package/dist/src/orgrt/daemon.js.map +1 -1
  222. package/dist/src/orgrt/decisions.d.ts +13 -0
  223. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  224. package/dist/src/orgrt/decisions.js +95 -0
  225. package/dist/src/orgrt/decisions.js.map +1 -1
  226. package/dist/src/orgrt/forwarder.d.ts.map +1 -1
  227. package/dist/src/orgrt/forwarder.js +148 -15
  228. package/dist/src/orgrt/forwarder.js.map +1 -1
  229. package/dist/src/orgrt/kimicode-runner.js +1 -1
  230. package/dist/src/orgrt/kimicode-runner.js.map +1 -1
  231. package/dist/src/orgrt/opencode-runner.js +1 -1
  232. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  233. package/dist/src/orgrt/session.d.ts +27 -1
  234. package/dist/src/orgrt/session.d.ts.map +1 -1
  235. package/dist/src/orgrt/session.js +67 -6
  236. package/dist/src/orgrt/session.js.map +1 -1
  237. package/dist/src/orgrt/task-dag.d.ts +11 -1
  238. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  239. package/dist/src/orgrt/task-dag.js +93 -2
  240. package/dist/src/orgrt/task-dag.js.map +1 -1
  241. package/dist/src/orgrt/templates.d.ts.map +1 -1
  242. package/dist/src/orgrt/templates.js +26 -2
  243. package/dist/src/orgrt/templates.js.map +1 -1
  244. package/dist/src/orgrt/types.d.ts +77 -1
  245. package/dist/src/orgrt/types.d.ts.map +1 -1
  246. package/dist/src/orgrt/types.js +28 -2
  247. package/dist/src/orgrt/types.js.map +1 -1
  248. package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
  249. package/dist/src/orgrt/vercel-providers.js +9 -4
  250. package/dist/src/orgrt/vercel-providers.js.map +1 -1
  251. package/dist/src/orgrt/vercel-runner.d.ts +0 -23
  252. package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
  253. package/dist/src/orgrt/vercel-runner.js +38 -7
  254. package/dist/src/orgrt/vercel-runner.js.map +1 -1
  255. package/dist/tsconfig.tsbuildinfo +1 -1
  256. package/package.json +3 -3
  257. package/.claude/commands/mastermind/approvev1.md +0 -94
  258. package/.claude/commands/mastermind/architect.md +0 -52
  259. package/.claude/commands/mastermind/autodev.md +0 -28
  260. package/.claude/commands/mastermind/build.md +0 -23
  261. package/.claude/commands/mastermind/finish.md +0 -17
  262. package/.claude/commands/mastermind/runorgv1.md +0 -159
  263. package/.claude/commands/mastermind/taskdev.md +0 -23
  264. package/.claude/commands/mastermind/tdd.md +0 -19
  265. package/.claude/commands/mastermind/verify.md +0 -19
  266. package/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
  267. package/.claude/skills/mastermind-architect/SKILL.md +0 -862
  268. package/.claude/skills/mastermind-autodev/SKILL.md +0 -360
  269. package/.claude/skills/mastermind-build/SKILL.md +0 -169
  270. package/.claude/skills/mastermind-companies/SKILL.md +0 -256
  271. package/.claude/skills/mastermind-content/SKILL.md +0 -197
  272. package/.claude/skills/mastermind-costs/SKILL.md +0 -151
  273. package/.claude/skills/mastermind-finance/SKILL.md +0 -166
  274. package/.claude/skills/mastermind-finish/SKILL.md +0 -251
  275. package/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
  276. package/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
  277. package/.claude/skills/mastermind-marketing/SKILL.md +0 -228
  278. package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
  279. package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
  280. package/.claude/skills/mastermind-ops/SKILL.md +0 -168
  281. package/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
  282. package/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
  283. package/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
  284. package/.claude/skills/mastermind-projects/SKILL.md +0 -167
  285. package/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
  286. package/.claude/skills/mastermind-sales/SKILL.md +0 -170
  287. package/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
  288. package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
  289. package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
  290. package/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
  291. package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
  292. package/.claude/skills/mastermind-tdd/SKILL.md +0 -424
  293. package/.claude/skills/mastermind-verify/SKILL.md +0 -196
  294. package/.claude/skills/mastermind-wiki/SKILL.md +0 -314
  295. package/.claude/skills/monolean-review/SKILL.md +0 -57
@@ -1,674 +1,350 @@
1
1
  ---
2
2
  name: verification-quality
3
- description: |
4
- Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.
3
+ description: Comprehensive truth scoring, code quality verification, and automatic rollback system with a 0.95 confidence threshold for ensuring high-quality agent outputs and codebase reliability.
5
4
  ---
6
5
 
7
- # Verification & Quality Assurance Skill
6
+ # verification-quality — Evidence Before Claims
8
7
 
9
- ## What This Skill Does
8
+ ## Overview
10
9
 
11
- This skill provides a comprehensive verification and quality assurance system that ensures code quality and correctness through:
10
+ Claims without evidence are noise. "It works", "tests pass", "I fixed it" — none of
11
+ these mean anything until verified against the codebase, the test suite, and the build.
12
12
 
13
- - **Truth Scoring**: Real-time reliability metrics (0.0-1.0 scale) for code, agents, and tasks
14
- - **Verification Checks**: Automated code correctness, security, and best practices validation
15
- - **Automatic Rollback**: Instant reversion of changes that fail verification (default threshold: 0.95)
16
- - **Quality Metrics**: Statistical analysis with trends, confidence intervals, and improvement tracking
17
- - **CI/CD Integration**: Export capabilities for continuous integration pipelines
18
- - **Real-time Monitoring**: Live dashboards and watch modes for ongoing verification
13
+ This skill wires four concepts to monomind's real command surface: **truth scoring**
14
+ (a 0.0–1.0 confidence score from citable evidence), an **evidence-before-claims
15
+ protocol** (require `file:line`, test names, or build output before marking done),
16
+ **auto-rollback** (regression detection via `analyze diff`, revert via git), and a
17
+ **multi-angle quality workflow** (correctness, tests, security, performance, docs).
19
18
 
20
- ## Prerequisites
19
+ **Core principle:** NO CLAIM IS TRUE UNTIL VERIFIED AGAINST EVIDENCE.
21
20
 
22
- - Monomind installed (`npx monomind@alpha`)
23
- - Git repository (for rollback features)
24
- - Node.js 18+ (for dashboard features)
25
-
26
- ## Quick Start
27
-
28
- ```bash
29
- # View current truth scores
30
- npx monomind@alpha truth
31
-
32
- # Run verification check
33
- npx monomind@alpha verify check
34
-
35
- # Verify specific file with custom threshold
36
- npx monomind@alpha verify check --file src/app.js --threshold 0.98
37
-
38
- # Rollback last failed verification
39
- npx monomind@alpha verify rollback --last-good
21
+ **Iron Law:**
22
+ ```
23
+ NO "DONE" WITHOUT A TRUTH SCORE ≥ 0.95 BACKED BY CITABLE EVIDENCE
40
24
  ```
41
25
 
26
+ If you cannot point to a `file:line`, a passing test name, or a green build, you
27
+ have not finished. You have started.
28
+
29
+ ## When to Use
30
+
31
+ Use for ANY task that ends in a claim of completion: "I implemented X", "the bug is
32
+ fixed", "tests pass", "ready to ship", or any agent-returned work.
33
+
34
+ **Use this ESPECIALLY when:** the agent (or you) is in a hurry — that's when false
35
+ claims slip in; the change touches security, money, auth, or data integrity; a
36
+ previous attempt already failed; you're about to commit, push, open a PR, or merge.
37
+
38
+ **Don't skip when:** "it's a tiny change" (tiny changes break tests too) or "I'm sure"
39
+ (confidence without evidence is the failure mode this skill prevents).
40
+
41
+ ## The Real Command Surface
42
+
43
+ These are the ONLY commands this skill wires to. Anything else is invented.
44
+
45
+ | Command | What it does | Phase |
46
+ |---|---|---|
47
+ | `monomind analyze diff` | Git diff risk + change classification | Evidence, regression |
48
+ | `monomind analyze code` | Static code analysis | Verification |
49
+ | `monomind analyze deps --security` | Dependency CVEs | Verification |
50
+ | `monomind analyze complexity` | Cyclomatic complexity | Verification |
51
+ | `monomind analyze symbols` | Extract functions/classes/types | Evidence |
52
+ | `monomind analyze imports` | Import graph | Verification |
53
+ | `monomind security scan` | Vulnerability + secret scan | Verification |
54
+ | `monomind security secrets` | Dedicated secret detection | Verification |
55
+ | `monomind security audit` | Security audit log | Verification |
56
+ | `monomind performance benchmark` | Run benchmarks (wasm/memory/search) | Evidence |
57
+ | `monomind performance metrics` | View/export metrics | Monitoring |
58
+ | `monomind performance bottleneck` | Identify bottlenecks | Verification |
59
+ | `monomind doctor` / `doctor --fix` | 28 health-check categories | Baseline, monitoring |
60
+ | `monomind hooks metrics` | Learning-hook metrics | Monitoring |
61
+ | `monomind hooks intelligence` | Neural/MoE/HNSW status | Monitoring |
62
+ | `monomind monograph search` | Knowledge graph search (BM25/semantic/hybrid) | Evidence |
63
+ | `monomind monograph build` | Build/rebuild the knowledge graph | Baseline |
64
+ | `monomind tokens dashboard` | Token spend | Monitoring |
65
+
66
+ > Use `npx monomind@latest ...` from outside the repo; inside the repo
67
+ > `node packages/@monomind/cli/bin/cli.js ...` works too. **Never use `monomind@alpha`** —
68
+ > it does not exist.
69
+
70
+ ### MCP tools (called by Claude Code, not the CLI)
71
+
72
+ | Tool | Use |
73
+ |---|---|
74
+ | `mcp__monomind__hooks_pre-task` | Capture task intent + acceptance criteria before work |
75
+ | `mcp__monomind__hooks_post-task` | Record outcome + evidence after work |
76
+ | `mcp__monomind__monograph_query` | Find `file:line` for a symbol before citing it |
77
+ | `mcp__monomind__monograph_impact` | Blast radius before risky edits |
78
+ | `mcp__monomind__monograph_context` | 360° callers/callees for the change site |
79
+ | `mcp__monomind__system_health` | Snapshot system health before declaring done |
80
+ | `mcp__monomind__system_metrics` | Objective metrics for the verification record |
81
+
42
82
  ---
43
83
 
44
- ## Complete Guide
84
+ ## Core Concept: The Truth Score
45
85
 
46
- ### Truth Scoring System
86
+ A truth score is a 0.0–1.0 confidence value derived from **evidence you can cite**,
87
+ not a feeling. The default ship threshold is **0.95**. The score is computed in
88
+ Phase 3 from real command output; the action mapping lives in Phase 4. You do not
89
+ invent it.
47
90
 
48
- #### View Truth Metrics
91
+ ---
49
92
 
50
- Display comprehensive quality and reliability metrics for your codebase and agent tasks.
93
+ ## The Four Phases
51
94
 
52
- **Basic Usage:**
95
+ Complete each phase before moving on. Skipping a phase produces unverified claims.
53
96
 
54
- ```bash
55
- # View current truth scores (default: table format)
56
- npx monomind@alpha truth
97
+ ### Phase 1: Evidence Collection
57
98
 
58
- # View scores for specific time period
59
- npx monomind@alpha truth --period 7d
99
+ BEFORE claiming work is done, gather evidence it actually works.
60
100
 
61
- # View scores for specific agent
62
- npx monomind@alpha truth --agent coder --period 24h
101
+ **1a. State the claim precisely:**
102
+ > "I claim X is done. Acceptance criteria: [list]. Evidence required: [list]."
63
103
 
64
- # Find files/tasks below threshold
65
- npx monomind@alpha truth --threshold 0.8
104
+ **1b. Capture task intent (MCP) and cite the change site via the knowledge graph:**
66
105
  ```
67
-
68
- **Output Formats:**
69
-
70
- ```bash
71
- # Table format (default)
72
- npx monomind@alpha truth --format table
73
-
74
- # JSON for programmatic access
75
- npx monomind@alpha truth --format json
76
-
77
- # CSV for spreadsheet analysis
78
- npx monomind@alpha truth --format csv
79
-
80
- # HTML report with visualizations
81
- npx monomind@alpha truth --format html --export report.html
106
+ mcp__monomind__hooks_pre-task({ task: "...", acceptance: ["...", "..."] })
107
+ mcp__monomind__monograph_query(symbol: "refreshToken") # cite before editing
108
+ mcp__monomind__monograph_impact(file: "src/auth/refresh.ts")
82
109
  ```
110
+ Every cited location must be `file:line`. "Somewhere in auth" is not a citation.
83
111
 
84
- **Real-time Monitoring:**
85
-
112
+ **1c. Capture the diff as evidence:**
86
113
  ```bash
87
- # Watch mode with live updates
88
- npx monomind@alpha truth --watch
89
-
90
- # Export metrics automatically
91
- npx monomind@alpha truth --export .monomind/metrics/truth-$(date +%Y%m%d).json
114
+ npx monomind@latest analyze diff --risk --classify -v > evidence-diff.json
115
+ npx monomind@latest analyze imports src/auth --external # import-graph blast radius
92
116
  ```
93
117
 
94
- #### Truth Score Dashboard
118
+ **Success criteria:** acceptance criteria written, diff classified on disk, every
119
+ changed symbol cited as `file:line`.
95
120
 
96
- Example dashboard output:
97
-
98
- ```
99
- 📊 Truth Metrics Dashboard
100
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
-
102
- Overall Truth Score: 0.947 ✅
103
- Trend: ↗️ +2.3% (7d)
104
-
105
- Top Performers:
106
- verification-agent 0.982 ⭐
107
- code-analyzer 0.971 ⭐
108
- test-generator 0.958 ✅
109
-
110
- Needs Attention:
111
- refactor-agent 0.821 ⚠️
112
- docs-generator 0.794 ⚠️
113
-
114
- Recent Tasks:
115
- task-456 0.991 ✅ "Implement auth"
116
- task-455 0.967 ✅ "Add tests"
117
- task-454 0.743 ❌ "Refactor API"
118
- ```
119
-
120
- #### Metrics Explained
121
-
122
- **Truth Scores (0.0-1.0):**
123
-
124
- - `1.0-0.95`: Excellent (production-ready)
125
- - `0.94-0.85`: Good (acceptable quality)
126
- - `0.84-0.75`: Warning (needs attention)
127
- - `<0.75`: Critical (requires immediate action)
128
-
129
- **Trend Indicators:**
130
-
131
- - ↗️ Improving (positive trend)
132
- - → Stable (consistent performance)
133
- - ↘️ Declining (quality regression detected)
134
-
135
- **Statistics:**
136
-
137
- - **Mean Score**: Average truth score across all measurements
138
- - **Median Score**: Middle value (less affected by outliers)
139
- - **Standard Deviation**: Consistency of scores (lower = more consistent)
140
- - **Confidence Interval**: Statistical reliability of measurements
141
-
142
- ### Verification Checks
143
-
144
- #### Run Verification
121
+ ---
145
122
 
146
- Execute comprehensive verification checks on code, tasks, or agent outputs.
123
+ ### Phase 2: Multi-Angle Verification
147
124
 
148
- **File Verification:**
125
+ Run each angle that applies. **All applicable angles must pass** or the truth score
126
+ drops. Skip an angle only when it genuinely does not apply (and say so).
149
127
 
128
+ **Angle 1 — Correctness (always applies):**
150
129
  ```bash
151
- # Verify single file
152
- npx monomind@alpha verify check --file src/app.js
153
-
154
- # Verify directory recursively
155
- npx monomind@alpha verify check --directory src/
156
-
157
- # Verify with auto-fix enabled
158
- npx monomind@alpha verify check --file src/utils.js --auto-fix
159
-
160
- # Verify current working directory
161
- npx monomind@alpha verify check
130
+ npx monomind@latest analyze code src/auth/ # static analysis on touched paths
131
+ npm run build && npm run typecheck # use the project's real commands
162
132
  ```
163
133
 
164
- **Task Verification:**
165
-
134
+ **Angle 2 — Tests (always applies when tests exist):**
166
135
  ```bash
167
- # Verify specific task output
168
- npx monomind@alpha verify check --task task-123
169
-
170
- # Verify with custom threshold
171
- npx monomind@alpha verify check --task task-456 --threshold 0.99
172
-
173
- # Verbose output for debugging
174
- npx monomind@alpha verify check --task task-789 --verbose
136
+ npm test -- --reporter=spec
175
137
  ```
138
+ The evidence is **test names + counts**, not "tests passed".
176
139
 
177
- **Batch Verification:**
178
-
140
+ **Angle 3 — Security (applies to auth, crypto, input boundaries, deps):**
179
141
  ```bash
180
- # Verify multiple files in parallel
181
- npx monomind@alpha verify batch --files "*.js" --parallel
182
-
183
- # Verify with pattern matching
184
- npx monomind@alpha verify batch --pattern "src/**/*.ts"
185
-
186
- # Integration test suite
187
- npx monomind@alpha verify integration --test-suite full
142
+ npx monomind@latest security scan
143
+ npx monomind@latest security secrets
144
+ npx monomind@latest analyze deps --security
188
145
  ```
189
146
 
190
- #### Verification Criteria
191
-
192
- The verification system evaluates:
193
-
194
- 1. **Code Correctness**
195
- - Syntax validation
196
- - Type checking (TypeScript)
197
- - Logic flow analysis
198
- - Error handling completeness
199
-
200
- 2. **Best Practices**
201
- - Code style adherence
202
- - SOLID principles
203
- - Design patterns usage
204
- - Modularity and reusability
205
-
206
- 3. **Security**
207
- - Vulnerability scanning
208
- - Secret detection
209
- - Input validation
210
- - Authentication/authorization checks
211
-
212
- 4. **Performance**
213
- - Algorithmic complexity
214
- - Memory usage patterns
215
- - Database query optimization
216
- - Bundle size impact
217
-
218
- 5. **Documentation**
219
- - JSDoc/TypeDoc completeness
220
- - README accuracy
221
- - API documentation
222
- - Code comments quality
223
-
224
- #### JSON Output for CI/CD
225
-
147
+ **Angle 4 — Performance (applies to hot paths, queries, bundles):**
226
148
  ```bash
227
- # Get structured JSON output
228
- npx monomind@alpha verify check --json > verification.json
229
-
230
- # Example JSON structure:
231
- {
232
- "overallScore": 0.947,
233
- "passed": true,
234
- "threshold": 0.95,
235
- "checks": [
236
- {
237
- "name": "code-correctness",
238
- "score": 0.98,
239
- "passed": true
240
- },
241
- {
242
- "name": "security",
243
- "score": 0.91,
244
- "passed": false,
245
- "issues": [...]
246
- }
247
- ]
248
- }
149
+ npx monomind@latest performance benchmark -s all -i 100 -o json > bench.json
150
+ npx monomind@latest performance bottleneck
151
+ npx monomind@latest analyze complexity src/auth/ -t 10
249
152
  ```
250
153
 
251
- ### Automatic Rollback
252
-
253
- #### Rollback Failed Changes
254
-
255
- Automatically revert changes that fail verification checks.
256
-
257
- **Basic Rollback:**
258
-
154
+ **Angle 5 — Documentation (applies to public APIs, behavior changes):**
259
155
  ```bash
260
- # Rollback to last known good state
261
- npx monomind@alpha verify rollback --last-good
262
-
263
- # Rollback to specific commit
264
- npx monomind@alpha verify rollback --to-commit abc123
265
-
266
- # Interactive rollback with preview
267
- npx monomind@alpha verify rollback --interactive
156
+ npx monomind@latest analyze symbols src/auth/refresh.ts # did docs track changes?
268
157
  ```
158
+ If exported symbols changed and docs didn't, this angle fails.
269
159
 
270
- **Smart Rollback:**
271
-
160
+ **Angle 6 — System health:**
272
161
  ```bash
273
- # Rollback only failed files (preserve good changes)
274
- npx monomind@alpha verify rollback --selective
275
-
276
- # Rollback with automatic backup
277
- npx monomind@alpha verify rollback --backup-first
278
-
279
- # Dry-run mode (preview without executing)
280
- npx monomind@alpha verify rollback --dry-run
162
+ npx monomind@latest doctor
281
163
  ```
164
+ A red doctor category blocks the claim, even if the code looks fine.
282
165
 
283
- **Rollback Performance:**
284
-
285
- - Git-based rollback: <1 second
286
- - Selective file rollback: <500ms
287
- - Backup creation: Automatic before rollback
288
-
289
- ### Verification Reports
290
-
291
- #### Generate Reports
292
-
293
- Create detailed verification reports with metrics and visualizations.
166
+ ---
294
167
 
295
- **Report Formats:**
168
+ ### Phase 3: Truth Score Computation
296
169
 
297
- ```bash
298
- # JSON report
299
- npx monomind@alpha verify report --format json
170
+ Score each applicable angle — judgment against a checklist, not a vibe:
300
171
 
301
- # HTML report with charts
302
- npx monomind@alpha verify report --export metrics.html --format html
172
+ | Angle | 1.0 (full) | 0.5 (partial) | 0.0 (fail/no evidence) |
173
+ |---|---|---|---|
174
+ | Correctness | Build + typecheck + analyze code clean | Typecheck clean, build warnings | Build or typecheck fails |
175
+ | Tests | All relevant tests pass, names captured | New tests pass, one pre-existing flake | Any relevant test fails |
176
+ | Security | `security scan`, `secrets`, `deps --security` clean | One informational finding, no exploit path | Any HIGH/CRITICAL or leaked secret |
177
+ | Performance | Benchmark within baseline, no new hotspot | Within ±5% of baseline | Regression vs. baseline |
178
+ | Documentation | All changed symbols documented | Minor export undocumented | Public API change with no doc update |
179
+ | System health | `doctor` green | Yellows acknowledged | Any red category |
303
180
 
304
- # CSV for data analysis
305
- npx monomind@alpha verify report --format csv --export metrics.csv
306
-
307
- # Markdown summary
308
- npx monomind@alpha verify report --format markdown
181
+ **Composite score formula:**
182
+ ```
183
+ truth_score = (sum of angle scores) / (number of applicable angles)
309
184
  ```
310
185
 
311
- **Time-based Reports:**
312
-
313
- ```bash
314
- # Last 24 hours
315
- npx monomind@alpha verify report --period 24h
316
-
317
- # Last 7 days
318
- npx monomind@alpha verify report --period 7d
319
-
320
- # Last 30 days with trends
321
- npx monomind@alpha verify report --period 30d --include-trends
186
+ A failing angle zeroes its row. **Any 0.0 angle caps the composite at 0.85** —
187
+ critical findings always block shipping regardless of the average.
322
188
 
323
- # Custom date range
324
- npx monomind@alpha verify report --from 2025-01-01 --to 2025-01-31
189
+ Write the score and per-angle evidence to the task record:
190
+ ```
191
+ mcp__monomind__hooks_post-task({
192
+ task: "Fix auth refresh race", outcome: "complete", truth_score: 0.96,
193
+ evidence: {
194
+ diff: "evidence-diff.json",
195
+ tests: "auth.test.ts: 42 passed, 0 failed",
196
+ security: "scan clean; deps --security 0 HIGH",
197
+ performance: "benchmark within 1.2% of baseline",
198
+ health: "doctor green",
199
+ citations: ["src/auth/refresh.ts:87", "src/auth/refresh.ts:134"]
200
+ }
201
+ })
325
202
  ```
326
203
 
327
- **Report Content:**
204
+ ---
328
205
 
329
- - Overall truth scores
330
- - Per-agent performance metrics
331
- - Task completion quality
332
- - Verification pass/fail rates
333
- - Rollback frequency
334
- - Quality improvement trends
335
- - Statistical confidence intervals
206
+ ### Phase 4: Decision — Ship, Fix, or Rollback
336
207
 
337
- ### Interactive Dashboard
208
+ Use the composite score from Phase 3:
338
209
 
339
- #### Launch Dashboard
210
+ | Score | Decision | Required action |
211
+ |---|---|---|
212
+ | `≥ 0.95` | **Ship** | Record evidence via `hooks_post-task`; proceed to commit/PR |
213
+ | `0.85–0.94` | **Ship with caveats** | Record the gaps explicitly in the PR description |
214
+ | `0.75–0.84` | **Fix** | Return to Phase 1 with the failing angle as the new task |
215
+ | `< 0.75` | **Rollback** | See Auto-Rollback below; do not leave broken code on the branch |
340
216
 
341
- Run interactive web-based verification dashboard with real-time updates.
217
+ **3 or more fix loops without reaching 0.95 → architectural problem.** Stop, discuss
218
+ with the user. Do not attempt a 4th loop. (Same rule as `mastermind-debug` Phase 4.5.)
342
219
 
343
- ```bash
344
- # Launch dashboard on default port (3000)
345
- npx monomind@alpha verify dashboard
220
+ ---
346
221
 
347
- # Custom port
348
- npx monomind@alpha verify dashboard --port 8080
222
+ ## Methodology: Auto-Rollback
349
223
 
350
- # Export dashboard data
351
- npx monomind@alpha verify dashboard --export
224
+ When a change scores below 0.75, or a regression is detected after merge, revert.
225
+ monomind does not have a magic `verify rollback` subcommand — rollback is **git +
226
+ evidence from `analyze diff`**.
352
227
 
353
- # Dashboard with auto-refresh
354
- npx monomind@alpha verify dashboard --refresh 5s
228
+ **1. Confirm the regression is real:**
229
+ ```bash
230
+ npx monomind@latest analyze diff --risk -v # was it high-risk at review?
231
+ npx monomind@latest analyze complexity src/ -t 15 -f json
232
+ npx monomind@latest performance benchmark -s all -i 100 -o json > now.json
233
+ # diff now.json against the saved baseline
355
234
  ```
356
235
 
357
- **Dashboard Features:**
358
-
359
- - Real-time truth score updates (WebSocket)
360
- - Interactive charts and graphs
361
- - Agent performance comparison
362
- - Task history timeline
363
- - Rollback history viewer
364
- - Export to PDF/HTML
365
- - Filter by time period/agent/score
366
-
367
- ### Configuration
368
-
369
- #### Default Configuration
370
-
371
- Set verification preferences in `.monomind/config.json`:
372
-
373
- ```json
374
- {
375
- "verification": {
376
- "threshold": 0.95,
377
- "autoRollback": true,
378
- "gitIntegration": true,
379
- "hooks": {
380
- "preCommit": true,
381
- "preTask": true,
382
- "postEdit": true
383
- },
384
- "checks": {
385
- "codeCorrectness": true,
386
- "security": true,
387
- "performance": true,
388
- "documentation": true,
389
- "bestPractices": true
390
- }
391
- },
392
- "truth": {
393
- "defaultFormat": "table",
394
- "defaultPeriod": "24h",
395
- "warningThreshold": 0.85,
396
- "criticalThreshold": 0.75,
397
- "autoExport": {
398
- "enabled": true,
399
- "path": ".monomind/metrics/truth-daily.json"
400
- }
401
- }
402
- }
236
+ **2. Roll back to the last known-good state:**
237
+ ```bash
238
+ git log --oneline -10
239
+ git revert <bad-commit> --no-edit # preserves the diagnosis in history
240
+ # or, if nothing downstream depends on it:
241
+ git reset --hard <last-good-commit>
403
242
  ```
404
243
 
405
- #### Threshold Configuration
406
-
407
- **Adjust verification strictness:**
408
-
244
+ **3. Prevent recurrence:**
409
245
  ```bash
410
- # Strict mode (99% accuracy required)
411
- npx monomind@alpha verify check --threshold 0.99
412
-
413
- # Lenient mode (90% acceptable)
414
- npx monomind@alpha verify check --threshold 0.90
415
-
416
- # Set default threshold
417
- npx monomind@alpha config set verification.threshold 0.98
246
+ # Add a regression test for the failure mode BEFORE re-attempting (see mastermind-tdd)
247
+ npx monomind@latest doctor # re-verify the rolled-back state
248
+ npx monomind@latest security scan
418
249
  ```
419
250
 
420
- **Per-environment thresholds:**
421
-
422
- ```json
423
- {
424
- "verification": {
425
- "thresholds": {
426
- "production": 0.99,
427
- "staging": 0.95,
428
- "development": 0.9
429
- }
430
- }
431
- }
432
- ```
251
+ **Rules:**
252
+ - Never rollback silently — record what failed and why in the postmortem.
253
+ - Selective rollback (revert one file, keep another) is fine **if** `analyze diff`
254
+ shows the changes are independent. Otherwise revert as a unit.
255
+ - Always re-verify the rolled-back state passes the failing angle.
433
256
 
434
- ### Integration Examples
257
+ ---
435
258
 
436
- #### CI/CD Integration
259
+ ## Methodology: CI/CD Integration
437
260
 
438
- **GitHub Actions:**
261
+ Wire the same four phases into CI so unverified work cannot merge.
439
262
 
263
+ **GitHub Action — quality gate on PRs:**
440
264
  ```yaml
441
265
  name: Quality Verification
442
-
443
- on: [push, pull_request]
444
-
266
+ on: [pull_request]
445
267
  jobs:
446
268
  verify:
447
269
  runs-on: ubuntu-latest
448
270
  steps:
449
- - uses: actions/checkout@v1
450
-
451
- - name: Install Dependencies
452
- run: npm install
453
-
454
- - name: Run Verification
271
+ - uses: actions/checkout@v4
272
+ with: { fetch-depth: 0 } # analyze diff needs history
273
+ - run: npm ci
274
+ - name: Build + typecheck + tests # Angle 1 + 2
455
275
  run: |
456
- npx monomind@alpha verify check --json > verification.json
457
-
458
- - name: Check Truth Score
276
+ npm run build
277
+ npm run typecheck
278
+ npm test
279
+ - name: Diff risk + security # Angle 3
459
280
  run: |
460
- score=$(jq '.overallScore' verification.json)
461
- if (( $(echo "$score < 0.95" | bc -l) )); then
462
- echo "Truth score too low: $score"
463
- exit 1
464
- fi
465
-
466
- - name: Upload Report
467
- uses: actions/upload-artifact@v1
468
- with:
469
- name: verification-report
470
- path: verification.json
471
- ```
472
-
473
- **GitLab CI:**
474
-
475
- ```yaml
476
- verify:
477
- stage: test
478
- script:
479
- - npx monomind@alpha verify check --threshold 0.95 --json > verification.json
480
- - |
481
- score=$(jq '.overallScore' verification.json)
482
- if [ $(echo "$score < 0.95" | bc) -eq 1 ]; then
483
- echo "Verification failed with score: $score"
484
- exit 1
485
- fi
486
- artifacts:
487
- paths:
488
- - verification.json
489
- reports:
490
- junit: verification.json
491
- ```
492
-
493
- #### Swarm Integration
494
-
495
- Run verification automatically during swarm operations:
496
-
497
- ```bash
498
- # Swarm with verification enabled
499
- npx monomind@alpha swarm --verify --threshold 0.98
500
-
501
- # Hive Mind with auto-rollback
502
- npx monomind@alpha hive-mind --verify --rollback-on-fail
503
-
504
- # Training pipeline with verification
505
- npx monomind@alpha train --verify --threshold 0.99
506
- ```
507
-
508
- #### Pair Programming Integration
509
-
510
- Enable real-time verification during collaborative development:
511
-
512
- ```bash
513
- # Pair with verification
514
- npx monomind@alpha pair --verify --real-time
515
-
516
- # Pair with custom threshold
517
- npx monomind@alpha pair --verify --threshold 0.97 --auto-fix
518
- ```
519
-
520
- ### Advanced Workflows
521
-
522
- #### Continuous Verification
523
-
524
- Monitor codebase continuously during development:
525
-
526
- ```bash
527
- # Watch directory for changes
528
- npx monomind@alpha verify watch --directory src/
529
-
530
- # Watch with auto-fix
531
- npx monomind@alpha verify watch --directory src/ --auto-fix
532
-
533
- # Watch with notifications
534
- npx monomind@alpha verify watch --notify --threshold 0.95
535
- ```
536
-
537
- #### Monitoring Integration
538
-
539
- Send metrics to external monitoring systems:
540
-
541
- ```bash
542
- # Export to Prometheus
543
- npx monomind@alpha truth --format json | \
544
- curl -X POST https://pushgateway.example.com/metrics/job/monomind \
545
- -d @-
546
-
547
- # Send to DataDog
548
- npx monomind@alpha verify report --format json | \
549
- curl -X POST "https://api.datadoghq.com/api/v1/series?api_key=${DD_API_KEY}" \
550
- -H "Content-Type: application/json" \
551
- -d @-
552
-
553
- # Custom webhook
554
- npx monomind@alpha truth --format json | \
555
- curl -X POST https://metrics.example.com/api/truth \
556
- -H "Content-Type: application/json" \
557
- -d @-
558
- ```
559
-
560
- #### Pre-commit Hooks
561
-
562
- Automatically verify before commits:
563
-
564
- ```bash
565
- # Install pre-commit hook
566
- npx monomind@alpha verify install-hook --pre-commit
567
-
568
- # .git/hooks/pre-commit example:
569
- #!/bin/bash
570
- npx monomind@alpha verify check --threshold 0.95 --json > /tmp/verify.json
571
-
572
- score=$(jq '.overallScore' /tmp/verify.json)
573
- if (( $(echo "$score < 0.95" | bc -l) )); then
574
- echo "❌ Verification failed with score: $score"
575
- echo "Run 'npx monomind@alpha verify check --verbose' for details"
576
- exit 1
577
- fi
578
-
579
- echo "✅ Verification passed with score: $score"
281
+ npx monomind@latest analyze diff main..HEAD --risk --classify --format json > diff-risk.json
282
+ npx monomind@latest security scan
283
+ npx monomind@latest analyze deps --security
284
+ - name: Health + benchmark # Angle 4 + 6
285
+ run: |
286
+ npx monomind@latest doctor
287
+ npx monomind@latest performance benchmark -s all -i 50 -o json > bench.json
288
+ - uses: actions/upload-artifact@v4
289
+ with: { name: verification-evidence, path: "diff-risk.json\nbench.json" }
580
290
  ```
581
291
 
582
- ### Performance Metrics
583
-
584
- **Verification Speed:**
585
-
586
- - Single file check: <100ms
587
- - Directory scan: <500ms (per 100 files)
588
- - Full codebase analysis: <5s (typical project)
589
- - Truth score calculation: <50ms
590
-
591
- **Rollback Speed:**
292
+ > Prefer **risk classification** (qualitative, stable) over **hard latency thresholds**
293
+ > (fragile, flaky) for the gate. Use metrics for trend analysis offline.
592
294
 
593
- - Git-based rollback: <1s
594
- - Selective file rollback: <500ms
595
- - Backup creation: <2s
596
-
597
- **Dashboard Performance:**
598
-
599
- - Initial load: <1s
600
- - Real-time updates: <100ms latency (WebSocket)
601
- - Chart rendering: 60 FPS
602
-
603
- ### Troubleshooting
295
+ ---
604
296
 
605
- #### Common Issues
297
+ ## Methodology: Continuous Monitoring
606
298
 
607
- **Low Truth Scores:**
299
+ Verification is not just a PR gate. Keep watching after merge:
608
300
 
609
301
  ```bash
610
- # Get detailed breakdown
611
- npx monomind@alpha truth --verbose --threshold 0.0
612
-
613
- # Check specific criteria
614
- npx monomind@alpha verify check --verbose
615
-
616
- # View agent-specific issues
617
- npx monomind@alpha truth --agent <agent-name> --format json
302
+ npx monomind@latest doctor # daily health
303
+ npx monomind@latest performance metrics -t 7d -f json > "metrics-$(date +%Y%m%d).json"
304
+ npx monomind@latest hooks metrics # what hooks learned
305
+ npx monomind@latest hooks intelligence # neural/HNSW status (usually not-loaded)
306
+ npx monomind@latest tokens dashboard -p week --no-interactive # spend surprises → quality problems
618
307
  ```
619
308
 
620
- **Rollback Failures:**
621
-
622
- ```bash
623
- # Check git status
624
- git status
309
+ For long-term storage, pipe `performance metrics -f prometheus` into Prometheus and
310
+ alert on trend, not on single values.
625
311
 
626
- # View rollback history
627
- npx monomind@alpha verify rollback --history
628
-
629
- # Manual rollback
630
- git reset --hard HEAD~1
631
- ```
632
-
633
- **Verification Timeouts:**
634
-
635
- ```bash
636
- # Increase timeout
637
- npx monomind@alpha verify check --timeout 60s
638
-
639
- # Verify in batches
640
- npx monomind@alpha verify batch --batch-size 10
641
- ```
642
-
643
- ### Exit Codes
312
+ ---
644
313
 
645
- Verification commands return standard exit codes:
314
+ ## Red Flags — STOP and Return to Phase 1
315
+
316
+ | Thought / Action | What it means |
317
+ |---|---|
318
+ | "It works" with no test names or file:line | No evidence. Phase 1. |
319
+ | "Tests pass" with no output captured | Untested claim. Re-run and capture. |
320
+ | "It's a tiny change, skip verification" | Tiny changes break tests too. Phase 2. |
321
+ | "Security probably isn't affected" | Probably ≠ verified. If auth/crypto/input touched, run `security scan`. |
322
+ | "Performance feels fine" | Feeling is not measurement. Run `performance benchmark`. |
323
+ | Skipping an angle without saying why | Silent skips are how bugs ship. State "N/A because…". |
324
+ | "Doctor has a red but it's unrelated" | Verify the unrelated-ness, don't assume. |
325
+ | 3+ fix loops, still < 0.95 | Architectural problem. Stop, discuss design. |
326
+ | Merging with score 0.85 "to unblock" | Below threshold is below threshold. Fix the gap. |
327
+ | "The agent said it's done" / "it compiled" | Agent claims and clean compiles are inputs to verify, not conclusions. |
646
328
 
647
- - `0`: Verification passed (score ≥ threshold)
648
- - `1`: Verification failed (score < threshold)
649
- - `2`: Error during verification (invalid input, system error)
329
+ ---
650
330
 
651
- ### Related Commands
331
+ ## Related Skills
652
332
 
653
- - `npx monomind@alpha pair` - Collaborative development with verification
654
- - `npx monomind@alpha train` - Training with verification feedback
655
- - `npx monomind@alpha swarm` - Multi-agent coordination with quality checks
656
- - `npx monomind@alpha report` - Generate comprehensive project reports
333
+ - [`mastermind-debug`](../mastermind-debug/SKILL.md) — root-cause methodology when verification finds a failure
334
+ - [`mastermind-tdd`](../mastermind-tdd/SKILL.md) — failing-test-first in Phase 1 evidence collection
335
+ - [`performance-analysis`](../performance-analysis/SKILL.md) — Phase 2 Angle 4 deep-dive
336
+ - [`mastermind-receive-review`](../mastermind-receive-review/SKILL.md) — same rigor applied to incoming review feedback
337
+ - [`swarm-orchestration`](../swarm-orchestration/SKILL.md) — every agent output runs through Phase 1–4 before merge
657
338
 
658
- ### Best Practices
339
+ ## Quick Reference
659
340
 
660
- 1. **Set Appropriate Thresholds**: Use 0.99 for critical code, 0.95 for standard, 0.90 for experimental
661
- 2. **Enable Auto-rollback**: Prevent bad code from persisting
662
- 3. **Monitor Trends**: Track improvement over time, not just current scores
663
- 4. **Integrate with CI/CD**: Make verification part of your pipeline
664
- 5. **Use Watch Mode**: Get immediate feedback during development
665
- 6. **Export Metrics**: Track quality metrics in your monitoring system
666
- 7. **Review Rollbacks**: Understand why changes were rejected
667
- 8. **Train Agents**: Use verification feedback to improve agent performance
341
+ | Phase | Key commands | Success criteria |
342
+ |---|---|---|
343
+ | **1. Evidence** | `analyze diff --risk`, `monograph query/impact`, `hooks_pre-task` | Acceptance criteria + cited `file:line` on disk |
344
+ | **2. Verification** | `analyze code`, `security scan`, `performance benchmark`, `analyze complexity`, `doctor` | Every applicable angle scored |
345
+ | **3. Truth score** | Composite formula above | Numeric score + per-angle evidence recorded via `hooks_post-task` |
346
+ | **4. Decision** | `git` (rollback when `< 0.75`) | Ship ≥ 0.95, fix 0.75–0.94, rollback `< 0.75` |
668
347
 
669
- ### Additional Resources
348
+ ---
670
349
 
671
- - Truth Scoring Algorithm: See `/docs/truth-scoring.md`
672
- - Verification Criteria: See `/docs/verification-criteria.md`
673
- - Integration Examples: See `/examples/verification/`
674
- - API Reference: See `/docs/api/verification.md`
350
+ **Version**: 2.0.0 · **Last Updated**: 2026-08-12