@monoes/monomindcli 2.9.6 → 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.
- package/.claude/agents/design/design-monodesign.md +1 -2
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-ai-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -1
- package/.claude/agents/engineering/engineering-backend-architect.md +1 -2
- package/.claude/agents/engineering/engineering-code-reviewer.md +1 -2
- package/.claude/agents/engineering/engineering-data-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-database-optimizer.md +1 -2
- package/.claude/agents/engineering/engineering-devops-automator.md +1 -2
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +1 -2
- package/.claude/agents/engineering/engineering-frontend-developer.md +1 -2
- package/.claude/agents/engineering/engineering-git-workflow-master.md +1 -2
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -1
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +1 -2
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +1 -2
- package/.claude/agents/engineering/engineering-security-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-senior-developer.md +1 -2
- package/.claude/agents/engineering/engineering-software-architect.md +1 -2
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-sre.md +0 -1
- package/.claude/agents/engineering/engineering-technical-writer.md +1 -2
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -1
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +1 -2
- package/.claude/agents/github/code-review-swarm.md +0 -1
- package/.claude/agents/github/github-modes.md +0 -1
- package/.claude/agents/github/issue-tracker.md +0 -1
- package/.claude/agents/github/multi-repo-swarm.md +0 -1
- package/.claude/agents/github/pr-manager.md +0 -1
- package/.claude/agents/github/project-board-sync.md +0 -1
- package/.claude/agents/github/release-manager.md +0 -1
- package/.claude/agents/github/repo-architect.md +0 -1
- package/.claude/agents/github/swarm-issue.md +0 -1
- package/.claude/agents/github/swarm-pr.md +0 -1
- package/.claude/agents/github/sync-coordinator.md +0 -1
- package/.claude/agents/github/workflow-automation.md +0 -1
- package/.claude/agents/marketing/marketing-competitive-content.md +1 -2
- package/.claude/agents/marketing/marketing-cro-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-email-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-launch-strategist.md +1 -2
- package/.claude/agents/marketing/marketing-pricing-strategist.md +1 -2
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -1
- package/.claude/agents/specialized/agents-orchestrator.md +1 -2
- package/.claude/agents/specialized/automation-governance-architect.md +1 -2
- package/.claude/agents/specialized/blockchain-security-auditor.md +1 -2
- package/.claude/agents/specialized/compliance-auditor.md +1 -2
- package/.claude/agents/specialized/identity-graph-operator.md +0 -1
- package/.claude/agents/specialized/lsp-index-engineer.md +1 -2
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -1
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -1
- package/.claude/agents/specialized/specialized-developer-advocate.md +1 -2
- package/.claude/agents/specialized/specialized-document-generator.md +1 -2
- package/.claude/agents/specialized/specialized-mcp-builder.md +1 -2
- package/.claude/agents/specialized/specialized-model-qa.md +0 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +1 -2
- package/.claude/agents/specialized/zk-steward.md +1 -2
- package/.claude/agents/testing/production-validator.md +0 -1
- package/.claude/agents/testing/tdd-london-swarm.md +0 -1
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -1
- package/.claude/agents/testing/testing-api-tester.md +1 -2
- package/.claude/agents/testing/testing-evidence-collector.md +1 -2
- package/.claude/agents/testing/testing-performance-benchmarker.md +1 -2
- package/.claude/agents/testing/testing-test-results-analyzer.md +1 -2
- package/.claude/agents/testing/testing-tool-evaluator.md +1 -2
- package/.claude/agents/testing/testing-workflow-optimizer.md +1 -2
- package/.claude/commands/hooks/README.md +1 -1
- package/.claude/commands/memory/README.md +6 -7
- package/.claude/commands/monitoring/README.md +1 -1
- package/.claude/helpers/control-start.cjs +27 -7
- package/.claude/helpers/handlers/route-handler.cjs +22 -3
- package/.claude/helpers/handlers/session-handler.cjs +43 -0
- package/.claude/helpers/intelligence.cjs +27 -6
- package/.claude/helpers/statusline.cjs +45 -11
- package/.claude/skills/agentic-jujutsu/SKILL.md +17 -15
- package/.claude/skills/hive-mind-advanced/SKILL.md +212 -559
- package/.claude/skills/hooks-automation/SKILL.md +1 -1
- package/.claude/skills/mastermind-adapters/SKILL.md +0 -11
- package/.claude/skills/mastermind-agents/SKILL.md +0 -11
- package/.claude/skills/mastermind-backup/SKILL.md +0 -11
- package/.claude/skills/mastermind-bootstrap/SKILL.md +0 -11
- package/.claude/skills/mastermind-delegation/SKILL.md +14 -12
- package/.claude/skills/mastermind-idea/SKILL.md +0 -5
- package/.claude/skills/mastermind-monitor/SKILL.md +0 -15
- package/.claude/skills/mastermind-org-settings/SKILL.md +0 -11
- package/.claude/skills/mastermind-plugins/SKILL.md +0 -11
- package/.claude/skills/mastermind-protocol/SKILL.md +6 -124
- package/.claude/skills/mastermind-repeat/SKILL.md +0 -25
- package/.claude/skills/mastermind-review/SKILL.md +1 -1
- package/.claude/skills/mastermind-stoporg/SKILL.md +0 -19
- package/.claude/skills/memory-toolkit/SKILL.md +12 -11
- package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +8 -1
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +228 -484
- package/.claude/skills/specialagent/SKILL.md +31 -133
- package/.claude/skills/swarm-advanced/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +220 -150
- package/.claude/skills/verification-quality/SKILL.md +247 -571
- package/README.md +3 -3
- package/dist/src/commands/agent-lifecycle.js +3 -3
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/autopilot.d.ts.map +1 -1
- package/dist/src/commands/autopilot.js +7 -1
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/doc.d.ts.map +1 -1
- package/dist/src/commands/doc.js +14 -3
- package/dist/src/commands/doc.js.map +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +3 -37
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +30 -1
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
- package/dist/src/commands/hooks-coverage-commands.js +75 -67
- package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
- package/dist/src/commands/hooks-workers.d.ts.map +1 -1
- package/dist/src/commands/hooks-workers.js +41 -10
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/index.d.ts +1 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +20 -4
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +80 -7
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +78 -2
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/neural-optimize.d.ts.map +1 -1
- package/dist/src/commands/neural-optimize.js +27 -5
- package/dist/src/commands/neural-optimize.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +1 -0
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +129 -2
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/commands/performance.js +1 -1
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +1 -11
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/security-misc.d.ts +0 -9
- package/dist/src/commands/security-misc.d.ts.map +1 -1
- package/dist/src/commands/security-misc.js +33 -54
- package/dist/src/commands/security-misc.js.map +1 -1
- package/dist/src/commands/security-scan.d.ts.map +1 -1
- package/dist/src/commands/security-scan.js +3 -11
- package/dist/src/commands/security-scan.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +7 -2
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/ui.d.ts +8 -0
- package/dist/src/commands/ui.d.ts.map +1 -0
- package/dist/src/commands/ui.js +94 -0
- package/dist/src/commands/ui.js.map +1 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +7 -9
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +13 -3
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/kimi-generator.d.ts +3 -2
- package/dist/src/init/kimi-generator.d.ts.map +1 -1
- package/dist/src/init/kimi-generator.js +45 -13
- package/dist/src/init/kimi-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +1 -1
- package/dist/src/init/statusline-generator.js +1 -1
- package/dist/src/init/write-capabilities.js +7 -7
- package/dist/src/init/write-capabilities.js.map +1 -1
- package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
- package/dist/src/knowledge/document-pipeline.js +1 -0
- package/dist/src/knowledge/document-pipeline.js.map +1 -1
- package/dist/src/knowledge/eval/golden-set.d.ts.map +1 -1
- package/dist/src/knowledge/eval/golden-set.js +21 -32
- package/dist/src/knowledge/eval/golden-set.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +2 -2
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +29 -3
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +32 -19
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.js +48 -18
- package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +15 -10
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.d.ts +4 -0
- package/dist/src/memory/embedding-operations.d.ts.map +1 -1
- package/dist/src/memory/embedding-operations.js +125 -32
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/hnsw-operations.d.ts +1 -1
- package/dist/src/memory/hnsw-operations.js +1 -1
- package/dist/src/memory/memory-bridge.d.ts +8 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +37 -8
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-read.d.ts +1 -1
- package/dist/src/memory/memory-read.js +2 -2
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
- package/dist/src/orgrt/antigravity-runner.js +6 -6
- package/dist/src/orgrt/antigravity-runner.js.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts +11 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.js +18 -86
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
- package/dist/src/orgrt/checkpoint.d.ts +1 -1
- package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint.js +3 -3
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +9 -1
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +267 -139
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +13 -0
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +95 -0
- package/dist/src/orgrt/decisions.js.map +1 -1
- package/dist/src/orgrt/forwarder.d.ts.map +1 -1
- package/dist/src/orgrt/forwarder.js +148 -15
- package/dist/src/orgrt/forwarder.js.map +1 -1
- package/dist/src/orgrt/kimicode-runner.js +1 -1
- package/dist/src/orgrt/kimicode-runner.js.map +1 -1
- package/dist/src/orgrt/opencode-runner.js +1 -1
- package/dist/src/orgrt/opencode-runner.js.map +1 -1
- package/dist/src/orgrt/session.d.ts +27 -1
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +67 -6
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/task-dag.d.ts +11 -1
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js +93 -2
- package/dist/src/orgrt/task-dag.js.map +1 -1
- package/dist/src/orgrt/templates.d.ts.map +1 -1
- package/dist/src/orgrt/templates.js +26 -2
- package/dist/src/orgrt/templates.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +77 -1
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +28 -2
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-providers.js +9 -4
- package/dist/src/orgrt/vercel-providers.js.map +1 -1
- package/dist/src/orgrt/vercel-runner.d.ts +0 -23
- package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-runner.js +38 -7
- package/dist/src/orgrt/vercel-runner.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/.claude/commands/mastermind/approvev1.md +0 -94
- package/.claude/commands/mastermind/architect.md +0 -52
- package/.claude/commands/mastermind/autodev.md +0 -28
- package/.claude/commands/mastermind/build.md +0 -23
- package/.claude/commands/mastermind/finish.md +0 -17
- package/.claude/commands/mastermind/runorgv1.md +0 -159
- package/.claude/commands/mastermind/taskdev.md +0 -23
- package/.claude/commands/mastermind/tdd.md +0 -19
- package/.claude/commands/mastermind/verify.md +0 -19
- package/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
- package/.claude/skills/mastermind-architect/SKILL.md +0 -862
- package/.claude/skills/mastermind-autodev/SKILL.md +0 -360
- package/.claude/skills/mastermind-build/SKILL.md +0 -169
- package/.claude/skills/mastermind-companies/SKILL.md +0 -256
- package/.claude/skills/mastermind-content/SKILL.md +0 -197
- package/.claude/skills/mastermind-costs/SKILL.md +0 -151
- package/.claude/skills/mastermind-finance/SKILL.md +0 -166
- package/.claude/skills/mastermind-finish/SKILL.md +0 -251
- package/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
- package/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
- package/.claude/skills/mastermind-marketing/SKILL.md +0 -228
- package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
- package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
- package/.claude/skills/mastermind-ops/SKILL.md +0 -168
- package/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
- package/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
- package/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
- package/.claude/skills/mastermind-projects/SKILL.md +0 -167
- package/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
- package/.claude/skills/mastermind-sales/SKILL.md +0 -170
- package/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
- package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
- package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
- package/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
- package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
- package/.claude/skills/mastermind-tdd/SKILL.md +0 -424
- package/.claude/skills/mastermind-verify/SKILL.md +0 -196
- package/.claude/skills/mastermind-wiki/SKILL.md +0 -314
- 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
|
-
#
|
|
6
|
+
# verification-quality — Evidence Before Claims
|
|
8
7
|
|
|
9
|
-
##
|
|
8
|
+
## Overview
|
|
10
9
|
|
|
11
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
- **
|
|
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
|
-
|
|
19
|
+
**Core principle:** NO CLAIM IS TRUE UNTIL VERIFIED AGAINST EVIDENCE.
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
##
|
|
84
|
+
## Core Concept: The Truth Score
|
|
45
85
|
|
|
46
|
-
|
|
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
|
-
|
|
91
|
+
---
|
|
49
92
|
|
|
50
|
-
|
|
93
|
+
## The Four Phases
|
|
51
94
|
|
|
52
|
-
|
|
95
|
+
Complete each phase before moving on. Skipping a phase produces unverified claims.
|
|
53
96
|
|
|
54
|
-
|
|
55
|
-
# View current truth scores (default: table format)
|
|
56
|
-
npx monomind@alpha truth
|
|
97
|
+
### Phase 1: Evidence Collection
|
|
57
98
|
|
|
58
|
-
|
|
59
|
-
npx monomind@alpha truth --period 7d
|
|
99
|
+
BEFORE claiming work is done, gather evidence it actually works.
|
|
60
100
|
|
|
61
|
-
|
|
62
|
-
|
|
101
|
+
**1a. State the claim precisely:**
|
|
102
|
+
> "I claim X is done. Acceptance criteria: [list]. Evidence required: [list]."
|
|
63
103
|
|
|
64
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
85
|
-
|
|
112
|
+
**1c. Capture the diff as evidence:**
|
|
86
113
|
```bash
|
|
87
|
-
|
|
88
|
-
npx monomind@
|
|
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
|
-
|
|
118
|
+
**Success criteria:** acceptance criteria written, diff classified on disk, every
|
|
119
|
+
changed symbol cited as `file:line`.
|
|
95
120
|
|
|
96
|
-
|
|
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
|
-
|
|
123
|
+
### Phase 2: Multi-Angle Verification
|
|
147
124
|
|
|
148
|
-
**
|
|
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
|
-
#
|
|
152
|
-
|
|
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
|
-
**
|
|
165
|
-
|
|
134
|
+
**Angle 2 — Tests (always applies when tests exist):**
|
|
166
135
|
```bash
|
|
167
|
-
|
|
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
|
-
**
|
|
178
|
-
|
|
140
|
+
**Angle 3 — Security (applies to auth, crypto, input boundaries, deps):**
|
|
179
141
|
```bash
|
|
180
|
-
|
|
181
|
-
npx monomind@
|
|
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
|
-
|
|
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
|
-
|
|
228
|
-
npx monomind@
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
271
|
-
|
|
160
|
+
**Angle 6 — System health:**
|
|
272
161
|
```bash
|
|
273
|
-
|
|
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
|
-
|
|
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
|
-
|
|
168
|
+
### Phase 3: Truth Score Computation
|
|
296
169
|
|
|
297
|
-
|
|
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
|
-
|
|
302
|
-
|
|
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
|
-
|
|
305
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
324
|
-
|
|
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
|
-
|
|
204
|
+
---
|
|
328
205
|
|
|
329
|
-
|
|
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
|
-
|
|
208
|
+
Use the composite score from Phase 3:
|
|
338
209
|
|
|
339
|
-
|
|
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
|
-
|
|
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
|
-
|
|
344
|
-
# Launch dashboard on default port (3000)
|
|
345
|
-
npx monomind@alpha verify dashboard
|
|
220
|
+
---
|
|
346
221
|
|
|
347
|
-
|
|
348
|
-
npx monomind@alpha verify dashboard --port 8080
|
|
222
|
+
## Methodology: Auto-Rollback
|
|
349
223
|
|
|
350
|
-
|
|
351
|
-
|
|
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
|
-
|
|
354
|
-
|
|
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
|
-
**
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
-
|
|
361
|
-
|
|
362
|
-
|
|
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
|
-
|
|
406
|
-
|
|
407
|
-
**Adjust verification strictness:**
|
|
408
|
-
|
|
244
|
+
**3. Prevent recurrence:**
|
|
409
245
|
```bash
|
|
410
|
-
#
|
|
411
|
-
npx monomind@
|
|
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
|
-
**
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
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
|
-
|
|
257
|
+
---
|
|
435
258
|
|
|
436
|
-
|
|
259
|
+
## Methodology: CI/CD Integration
|
|
437
260
|
|
|
438
|
-
|
|
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@
|
|
450
|
-
|
|
451
|
-
-
|
|
452
|
-
|
|
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
|
-
|
|
457
|
-
|
|
458
|
-
|
|
276
|
+
npm run build
|
|
277
|
+
npm run typecheck
|
|
278
|
+
npm test
|
|
279
|
+
- name: Diff risk + security # Angle 3
|
|
459
280
|
run: |
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
297
|
+
## Methodology: Continuous Monitoring
|
|
606
298
|
|
|
607
|
-
|
|
299
|
+
Verification is not just a PR gate. Keep watching after merge:
|
|
608
300
|
|
|
609
301
|
```bash
|
|
610
|
-
#
|
|
611
|
-
npx monomind@
|
|
612
|
-
|
|
613
|
-
#
|
|
614
|
-
npx monomind@
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
648
|
-
- `1`: Verification failed (score < threshold)
|
|
649
|
-
- `2`: Error during verification (invalid input, system error)
|
|
329
|
+
---
|
|
650
330
|
|
|
651
|
-
|
|
331
|
+
## Related Skills
|
|
652
332
|
|
|
653
|
-
- `
|
|
654
|
-
- `
|
|
655
|
-
- `
|
|
656
|
-
- `
|
|
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
|
-
|
|
339
|
+
## Quick Reference
|
|
659
340
|
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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
|
-
|
|
348
|
+
---
|
|
670
349
|
|
|
671
|
-
|
|
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
|