@monoes/monomindcli 2.9.4 → 2.9.5
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/commands/mastermind/approvev1.md +94 -0
- package/.claude/commands/mastermind/architect.md +52 -0
- package/.claude/commands/mastermind/autodev.md +28 -0
- package/.claude/commands/mastermind/build.md +23 -0
- package/.claude/commands/mastermind/finish.md +17 -0
- package/.claude/commands/mastermind/runorgv1.md +159 -0
- package/.claude/commands/mastermind/taskdev.md +23 -0
- package/.claude/commands/mastermind/tdd.md +19 -0
- package/.claude/commands/mastermind/verify.md +19 -0
- package/.claude/helpers/intelligence.cjs +6 -27
- package/.claude/skills/agentic-jujutsu/SKILL.md +15 -17
- package/.claude/skills/hive-mind-advanced/SKILL.md +559 -212
- package/.claude/skills/hooks-automation/SKILL.md +1 -1
- package/.claude/skills/mastermind-approvev1/SKILL.md +191 -0
- package/.claude/skills/mastermind-architect/SKILL.md +862 -0
- package/.claude/skills/mastermind-autodev/SKILL.md +360 -0
- package/.claude/skills/mastermind-build/SKILL.md +169 -0
- package/.claude/skills/mastermind-companies/SKILL.md +256 -0
- package/.claude/skills/mastermind-content/SKILL.md +197 -0
- package/.claude/skills/mastermind-costs/SKILL.md +151 -0
- package/.claude/skills/mastermind-finance/SKILL.md +166 -0
- package/.claude/skills/mastermind-finish/SKILL.md +251 -0
- package/.claude/skills/mastermind-heartbeatv1/SKILL.md +167 -0
- package/.claude/skills/mastermind-instance-settings/SKILL.md +315 -0
- package/.claude/skills/mastermind-marketing/SKILL.md +228 -0
- package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +181 -0
- package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +158 -0
- package/.claude/skills/mastermind-ops/SKILL.md +168 -0
- package/.claude/skills/mastermind-org-chart/SKILL.md +209 -0
- package/.claude/skills/mastermind-project-detail/SKILL.md +249 -0
- package/.claude/skills/mastermind-project-workspace/SKILL.md +244 -0
- package/.claude/skills/mastermind-projects/SKILL.md +167 -0
- package/.claude/skills/mastermind-runorgv1/SKILL.md +731 -0
- package/.claude/skills/mastermind-sales/SKILL.md +170 -0
- package/.claude/skills/mastermind-taskdev/SKILL.md +377 -0
- package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +60 -0
- package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +144 -0
- package/.claude/skills/mastermind-taskdev/implementer-prompt.md +114 -0
- package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +80 -0
- package/.claude/skills/mastermind-tdd/SKILL.md +424 -0
- package/.claude/skills/mastermind-verify/SKILL.md +196 -0
- package/.claude/skills/mastermind-wiki/SKILL.md +314 -0
- package/.claude/skills/monolean-review/SKILL.md +57 -0
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +484 -228
- package/.claude/skills/swarm-advanced/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +150 -220
- package/.claude/skills/verification-quality/SKILL.md +571 -247
- 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 +1 -7
- 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 +3 -14
- 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 +20 -3
- 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 +1 -30
- 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 +67 -75
- 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 +10 -41
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +7 -80
- 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 +2 -78
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +3 -116
- 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 +11 -1
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/security-misc.d.ts +9 -0
- package/dist/src/commands/security-misc.d.ts.map +1 -1
- package/dist/src/commands/security-misc.js +54 -33
- 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 +11 -3
- 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 +2 -7
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +3 -13
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/kimi-generator.d.ts +2 -3
- package/dist/src/init/kimi-generator.d.ts.map +1 -1
- package/dist/src/init/kimi-generator.js +13 -45
- 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/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 +3 -29
- 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 +19 -32
- 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 +18 -48
- 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 +10 -15
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.d.ts +0 -4
- package/dist/src/memory/embedding-operations.d.ts.map +1 -1
- package/dist/src/memory/embedding-operations.js +32 -125
- 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-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/monovector/diff-classifier.js +3 -3
- package/dist/src/monovector/diff-classifier.js.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts +1 -11
- package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.js +1 -15
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
- package/dist/src/orgrt/checkpoint.js +1 -1
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +0 -6
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +0 -26
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +0 -13
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +0 -95
- package/dist/src/orgrt/decisions.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 +1 -27
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +3 -42
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/task-dag.d.ts +1 -11
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js +2 -93
- 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 +0 -24
- package/dist/src/orgrt/templates.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +1 -70
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +0 -19
- 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 +4 -9
- package/dist/src/orgrt/vercel-providers.js.map +1 -1
- package/dist/src/orgrt/vercel-runner.d.ts +23 -0
- package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-runner.js +1 -26
- package/dist/src/orgrt/vercel-runner.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1,350 +1,674 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verification-quality
|
|
3
|
-
description:
|
|
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.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
+
# Verification & Quality Assurance Skill
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## What This Skill Does
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
these mean anything until verified against the codebase, the test suite, and the build.
|
|
11
|
+
This skill provides a comprehensive verification and quality assurance system that ensures code quality and correctness through:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## Prerequisites
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
22
|
+
- Monomind installed (`npx monomind@alpha`)
|
|
23
|
+
- Git repository (for rollback features)
|
|
24
|
+
- Node.js 18+ (for dashboard features)
|
|
25
25
|
|
|
26
|
-
|
|
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 |
|
|
26
|
+
## Quick Start
|
|
81
27
|
|
|
82
|
-
|
|
28
|
+
```bash
|
|
29
|
+
# View current truth scores
|
|
30
|
+
npx monomind@alpha truth
|
|
31
|
+
|
|
32
|
+
# Run verification check
|
|
33
|
+
npx monomind@alpha verify check
|
|
83
34
|
|
|
84
|
-
|
|
35
|
+
# Verify specific file with custom threshold
|
|
36
|
+
npx monomind@alpha verify check --file src/app.js --threshold 0.98
|
|
85
37
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
invent it.
|
|
38
|
+
# Rollback last failed verification
|
|
39
|
+
npx monomind@alpha verify rollback --last-good
|
|
40
|
+
```
|
|
90
41
|
|
|
91
42
|
---
|
|
92
43
|
|
|
93
|
-
##
|
|
44
|
+
## Complete Guide
|
|
45
|
+
|
|
46
|
+
### Truth Scoring System
|
|
47
|
+
|
|
48
|
+
#### View Truth Metrics
|
|
94
49
|
|
|
95
|
-
|
|
50
|
+
Display comprehensive quality and reliability metrics for your codebase and agent tasks.
|
|
96
51
|
|
|
97
|
-
|
|
52
|
+
**Basic Usage:**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# View current truth scores (default: table format)
|
|
56
|
+
npx monomind@alpha truth
|
|
98
57
|
|
|
99
|
-
|
|
58
|
+
# View scores for specific time period
|
|
59
|
+
npx monomind@alpha truth --period 7d
|
|
100
60
|
|
|
101
|
-
|
|
102
|
-
|
|
61
|
+
# View scores for specific agent
|
|
62
|
+
npx monomind@alpha truth --agent coder --period 24h
|
|
103
63
|
|
|
104
|
-
|
|
64
|
+
# Find files/tasks below threshold
|
|
65
|
+
npx monomind@alpha truth --threshold 0.8
|
|
105
66
|
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
|
109
82
|
```
|
|
110
|
-
Every cited location must be `file:line`. "Somewhere in auth" is not a citation.
|
|
111
83
|
|
|
112
|
-
**
|
|
84
|
+
**Real-time Monitoring:**
|
|
85
|
+
|
|
113
86
|
```bash
|
|
114
|
-
|
|
115
|
-
npx monomind@
|
|
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
|
|
116
92
|
```
|
|
117
93
|
|
|
118
|
-
|
|
119
|
-
changed symbol cited as `file:line`.
|
|
94
|
+
#### Truth Score Dashboard
|
|
120
95
|
|
|
121
|
-
|
|
96
|
+
Example dashboard output:
|
|
122
97
|
|
|
123
|
-
|
|
98
|
+
```
|
|
99
|
+
📊 Truth Metrics Dashboard
|
|
100
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
124
101
|
|
|
125
|
-
|
|
126
|
-
|
|
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
|
|
145
|
+
|
|
146
|
+
Execute comprehensive verification checks on code, tasks, or agent outputs.
|
|
147
|
+
|
|
148
|
+
**File Verification:**
|
|
127
149
|
|
|
128
|
-
**Angle 1 — Correctness (always applies):**
|
|
129
150
|
```bash
|
|
130
|
-
|
|
131
|
-
|
|
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
|
|
132
162
|
```
|
|
133
163
|
|
|
134
|
-
**
|
|
164
|
+
**Task Verification:**
|
|
165
|
+
|
|
135
166
|
```bash
|
|
136
|
-
|
|
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
|
|
137
175
|
```
|
|
138
|
-
The evidence is **test names + counts**, not "tests passed".
|
|
139
176
|
|
|
140
|
-
**
|
|
177
|
+
**Batch Verification:**
|
|
178
|
+
|
|
141
179
|
```bash
|
|
142
|
-
|
|
143
|
-
npx monomind@
|
|
144
|
-
|
|
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
|
|
145
188
|
```
|
|
146
189
|
|
|
147
|
-
|
|
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
|
+
|
|
148
226
|
```bash
|
|
149
|
-
|
|
150
|
-
npx monomind@
|
|
151
|
-
|
|
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
|
+
}
|
|
152
249
|
```
|
|
153
250
|
|
|
154
|
-
|
|
251
|
+
### Automatic Rollback
|
|
252
|
+
|
|
253
|
+
#### Rollback Failed Changes
|
|
254
|
+
|
|
255
|
+
Automatically revert changes that fail verification checks.
|
|
256
|
+
|
|
257
|
+
**Basic Rollback:**
|
|
258
|
+
|
|
155
259
|
```bash
|
|
156
|
-
|
|
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
|
|
157
268
|
```
|
|
158
|
-
If exported symbols changed and docs didn't, this angle fails.
|
|
159
269
|
|
|
160
|
-
**
|
|
270
|
+
**Smart Rollback:**
|
|
271
|
+
|
|
161
272
|
```bash
|
|
162
|
-
|
|
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
|
|
163
281
|
```
|
|
164
|
-
A red doctor category blocks the claim, even if the code looks fine.
|
|
165
282
|
|
|
166
|
-
|
|
283
|
+
**Rollback Performance:**
|
|
167
284
|
|
|
168
|
-
|
|
285
|
+
- Git-based rollback: <1 second
|
|
286
|
+
- Selective file rollback: <500ms
|
|
287
|
+
- Backup creation: Automatic before rollback
|
|
169
288
|
|
|
170
|
-
|
|
289
|
+
### Verification Reports
|
|
171
290
|
|
|
172
|
-
|
|
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 |
|
|
291
|
+
#### Generate Reports
|
|
180
292
|
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
truth_score = (sum of angle scores) / (number of applicable angles)
|
|
184
|
-
```
|
|
293
|
+
Create detailed verification reports with metrics and visualizations.
|
|
185
294
|
|
|
186
|
-
|
|
187
|
-
critical findings always block shipping regardless of the average.
|
|
295
|
+
**Report Formats:**
|
|
188
296
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
})
|
|
297
|
+
```bash
|
|
298
|
+
# JSON report
|
|
299
|
+
npx monomind@alpha verify report --format json
|
|
300
|
+
|
|
301
|
+
# HTML report with charts
|
|
302
|
+
npx monomind@alpha verify report --export metrics.html --format html
|
|
303
|
+
|
|
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
|
|
202
309
|
```
|
|
203
310
|
|
|
204
|
-
|
|
311
|
+
**Time-based Reports:**
|
|
205
312
|
|
|
206
|
-
|
|
313
|
+
```bash
|
|
314
|
+
# Last 24 hours
|
|
315
|
+
npx monomind@alpha verify report --period 24h
|
|
207
316
|
|
|
208
|
-
|
|
317
|
+
# Last 7 days
|
|
318
|
+
npx monomind@alpha verify report --period 7d
|
|
209
319
|
|
|
210
|
-
|
|
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 |
|
|
320
|
+
# Last 30 days with trends
|
|
321
|
+
npx monomind@alpha verify report --period 30d --include-trends
|
|
216
322
|
|
|
217
|
-
|
|
218
|
-
|
|
323
|
+
# Custom date range
|
|
324
|
+
npx monomind@alpha verify report --from 2025-01-01 --to 2025-01-31
|
|
325
|
+
```
|
|
219
326
|
|
|
220
|
-
|
|
327
|
+
**Report Content:**
|
|
221
328
|
|
|
222
|
-
|
|
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
|
|
223
336
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
337
|
+
### Interactive Dashboard
|
|
338
|
+
|
|
339
|
+
#### Launch Dashboard
|
|
340
|
+
|
|
341
|
+
Run interactive web-based verification dashboard with real-time updates.
|
|
227
342
|
|
|
228
|
-
**1. Confirm the regression is real:**
|
|
229
343
|
```bash
|
|
230
|
-
|
|
231
|
-
npx monomind@
|
|
232
|
-
|
|
233
|
-
#
|
|
344
|
+
# Launch dashboard on default port (3000)
|
|
345
|
+
npx monomind@alpha verify dashboard
|
|
346
|
+
|
|
347
|
+
# Custom port
|
|
348
|
+
npx monomind@alpha verify dashboard --port 8080
|
|
349
|
+
|
|
350
|
+
# Export dashboard data
|
|
351
|
+
npx monomind@alpha verify dashboard --export
|
|
352
|
+
|
|
353
|
+
# Dashboard with auto-refresh
|
|
354
|
+
npx monomind@alpha verify dashboard --refresh 5s
|
|
234
355
|
```
|
|
235
356
|
|
|
236
|
-
**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
+
}
|
|
242
403
|
```
|
|
243
404
|
|
|
244
|
-
|
|
405
|
+
#### Threshold Configuration
|
|
406
|
+
|
|
407
|
+
**Adjust verification strictness:**
|
|
408
|
+
|
|
245
409
|
```bash
|
|
246
|
-
#
|
|
247
|
-
npx monomind@
|
|
248
|
-
|
|
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
|
|
249
418
|
```
|
|
250
419
|
|
|
251
|
-
**
|
|
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.
|
|
420
|
+
**Per-environment thresholds:**
|
|
256
421
|
|
|
257
|
-
|
|
422
|
+
```json
|
|
423
|
+
{
|
|
424
|
+
"verification": {
|
|
425
|
+
"thresholds": {
|
|
426
|
+
"production": 0.99,
|
|
427
|
+
"staging": 0.95,
|
|
428
|
+
"development": 0.9
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
```
|
|
258
433
|
|
|
259
|
-
|
|
434
|
+
### Integration Examples
|
|
260
435
|
|
|
261
|
-
|
|
436
|
+
#### CI/CD Integration
|
|
437
|
+
|
|
438
|
+
**GitHub Actions:**
|
|
262
439
|
|
|
263
|
-
**GitHub Action — quality gate on PRs:**
|
|
264
440
|
```yaml
|
|
265
441
|
name: Quality Verification
|
|
266
|
-
|
|
442
|
+
|
|
443
|
+
on: [push, pull_request]
|
|
444
|
+
|
|
267
445
|
jobs:
|
|
268
446
|
verify:
|
|
269
447
|
runs-on: ubuntu-latest
|
|
270
448
|
steps:
|
|
271
|
-
- uses: actions/checkout@
|
|
272
|
-
|
|
273
|
-
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
npm run typecheck
|
|
278
|
-
npm test
|
|
279
|
-
- name: Diff risk + security # Angle 3
|
|
449
|
+
- uses: actions/checkout@v1
|
|
450
|
+
|
|
451
|
+
- name: Install Dependencies
|
|
452
|
+
run: npm install
|
|
453
|
+
|
|
454
|
+
- name: Run Verification
|
|
280
455
|
run: |
|
|
281
|
-
npx monomind@
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
- name: Health + benchmark # Angle 4 + 6
|
|
456
|
+
npx monomind@alpha verify check --json > verification.json
|
|
457
|
+
|
|
458
|
+
- name: Check Truth Score
|
|
285
459
|
run: |
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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
|
|
290
471
|
```
|
|
291
472
|
|
|
292
|
-
|
|
293
|
-
> (fragile, flaky) for the gate. Use metrics for trend analysis offline.
|
|
473
|
+
**GitLab CI:**
|
|
294
474
|
|
|
295
|
-
|
|
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
|
+
```
|
|
296
492
|
|
|
297
|
-
|
|
493
|
+
#### Swarm Integration
|
|
298
494
|
|
|
299
|
-
|
|
495
|
+
Run verification automatically during swarm operations:
|
|
300
496
|
|
|
301
497
|
```bash
|
|
302
|
-
|
|
303
|
-
npx monomind@
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
npx monomind@
|
|
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
|
|
307
506
|
```
|
|
308
507
|
|
|
309
|
-
|
|
310
|
-
alert on trend, not on single values.
|
|
508
|
+
#### Pair Programming Integration
|
|
311
509
|
|
|
312
|
-
|
|
510
|
+
Enable real-time verification during collaborative development:
|
|
313
511
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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. |
|
|
512
|
+
```bash
|
|
513
|
+
# Pair with verification
|
|
514
|
+
npx monomind@alpha pair --verify --real-time
|
|
328
515
|
|
|
329
|
-
|
|
516
|
+
# Pair with custom threshold
|
|
517
|
+
npx monomind@alpha pair --verify --threshold 0.97 --auto-fix
|
|
518
|
+
```
|
|
330
519
|
|
|
331
|
-
|
|
520
|
+
### Advanced Workflows
|
|
332
521
|
|
|
333
|
-
|
|
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
|
|
522
|
+
#### Continuous Verification
|
|
338
523
|
|
|
339
|
-
|
|
524
|
+
Monitor codebase continuously during development:
|
|
340
525
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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` |
|
|
526
|
+
```bash
|
|
527
|
+
# Watch directory for changes
|
|
528
|
+
npx monomind@alpha verify watch --directory src/
|
|
347
529
|
|
|
348
|
-
|
|
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"
|
|
580
|
+
```
|
|
581
|
+
|
|
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:**
|
|
592
|
+
|
|
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
|
|
604
|
+
|
|
605
|
+
#### Common Issues
|
|
606
|
+
|
|
607
|
+
**Low Truth Scores:**
|
|
608
|
+
|
|
609
|
+
```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
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
**Rollback Failures:**
|
|
621
|
+
|
|
622
|
+
```bash
|
|
623
|
+
# Check git status
|
|
624
|
+
git status
|
|
625
|
+
|
|
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
|
|
644
|
+
|
|
645
|
+
Verification commands return standard exit codes:
|
|
646
|
+
|
|
647
|
+
- `0`: Verification passed (score ≥ threshold)
|
|
648
|
+
- `1`: Verification failed (score < threshold)
|
|
649
|
+
- `2`: Error during verification (invalid input, system error)
|
|
650
|
+
|
|
651
|
+
### Related Commands
|
|
652
|
+
|
|
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
|
|
657
|
+
|
|
658
|
+
### Best Practices
|
|
659
|
+
|
|
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
|
|
668
|
+
|
|
669
|
+
### Additional Resources
|
|
349
670
|
|
|
350
|
-
|
|
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`
|