@rigour-labs/mcp 2.21.2 → 3.0.0
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/README.md +11 -1
- package/dist/index.js +73 -1236
- package/dist/tools/agent-handlers.d.ts +14 -0
- package/dist/tools/agent-handlers.js +176 -0
- package/dist/tools/definitions.d.ts +293 -0
- package/dist/tools/definitions.js +249 -0
- package/dist/tools/execution-handlers.d.ts +11 -0
- package/dist/tools/execution-handlers.js +134 -0
- package/dist/tools/memory-handlers.d.ts +10 -0
- package/dist/tools/memory-handlers.js +52 -0
- package/dist/tools/pattern-handlers.d.ts +9 -0
- package/dist/tools/pattern-handlers.js +72 -0
- package/dist/tools/quality-handlers.d.ts +25 -0
- package/dist/tools/quality-handlers.js +116 -0
- package/dist/tools/review-handler.d.ts +16 -0
- package/dist/tools/review-handler.js +42 -0
- package/dist/utils/config.d.ts +146 -0
- package/dist/utils/config.js +93 -0
- package/package.json +21 -3
- package/.claude-plugin/SKILL.md +0 -51
- package/.claude-plugin/marketplace.json +0 -21
- package/.claude-plugin/plugin.json +0 -17
- package/server.json +0 -21
- package/src/index.test.ts +0 -333
- package/src/index.ts +0 -1432
- package/src/smoke.test.ts +0 -7
- package/src/supervisor.test.ts +0 -158
- package/tsconfig.json +0 -10
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// ─── Score / Severity Formatters ──────────────────────────────────
|
|
2
|
+
function formatScoreText(stats) {
|
|
3
|
+
let text = '';
|
|
4
|
+
if (stats.score !== undefined) {
|
|
5
|
+
text = `\nScore: ${stats.score}/100`;
|
|
6
|
+
if (stats.ai_health_score !== undefined)
|
|
7
|
+
text += ` | AI Health: ${stats.ai_health_score}/100`;
|
|
8
|
+
if (stats.structural_score !== undefined)
|
|
9
|
+
text += ` | Structural: ${stats.structural_score}/100`;
|
|
10
|
+
}
|
|
11
|
+
return text;
|
|
12
|
+
}
|
|
13
|
+
function formatSeverityText(stats) {
|
|
14
|
+
if (!stats.severity_breakdown)
|
|
15
|
+
return '';
|
|
16
|
+
const parts = Object.entries(stats.severity_breakdown).filter(([, c]) => c > 0).map(([s, c]) => `${s}: ${c}`);
|
|
17
|
+
return parts.length > 0 ? `\nSeverity: ${parts.join(', ')}` : '';
|
|
18
|
+
}
|
|
19
|
+
// ─── Handlers ─────────────────────────────────────────────────────
|
|
20
|
+
export async function handleCheck(runner, cwd) {
|
|
21
|
+
const report = await runner.run(cwd);
|
|
22
|
+
const scoreText = formatScoreText(report.stats);
|
|
23
|
+
const sevText = formatSeverityText(report.stats);
|
|
24
|
+
const result = {
|
|
25
|
+
content: [{
|
|
26
|
+
type: "text",
|
|
27
|
+
text: `RIGOUR AUDIT RESULT: ${report.status}${scoreText}${sevText}\n\nSummary:\n${Object.entries(report.summary).map(([k, v]) => `- ${k}: ${v}`).join("\n")}`,
|
|
28
|
+
}],
|
|
29
|
+
};
|
|
30
|
+
result._rigour_report = report;
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
export async function handleExplain(runner, cwd) {
|
|
34
|
+
const report = await runner.run(cwd);
|
|
35
|
+
if (report.status === "PASS") {
|
|
36
|
+
const passScore = report.stats.score !== undefined ? ` Score: ${report.stats.score}/100.` : '';
|
|
37
|
+
return {
|
|
38
|
+
content: [{ type: "text", text: `ALL QUALITY GATES PASSED.${passScore} No failures to explain.` }],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
let header = 'RIGOUR EXPLAIN:';
|
|
42
|
+
header += formatScoreText(report.stats);
|
|
43
|
+
header += formatSeverityText(report.stats);
|
|
44
|
+
const bullets = report.failures.map((f, i) => {
|
|
45
|
+
const sev = (f.severity || 'medium').toUpperCase();
|
|
46
|
+
const prov = f.provenance ? ` (${f.provenance})` : '';
|
|
47
|
+
return `${i + 1}. [${sev}] [${f.id.toUpperCase()}]${prov} ${f.title}: ${f.details}${f.hint ? ` (Hint: ${f.hint})` : ''}`;
|
|
48
|
+
}).join("\n");
|
|
49
|
+
return { content: [{ type: "text", text: `${header}\n\n${bullets}` }] };
|
|
50
|
+
}
|
|
51
|
+
export async function handleStatus(runner, cwd) {
|
|
52
|
+
const report = await runner.run(cwd);
|
|
53
|
+
return {
|
|
54
|
+
content: [{
|
|
55
|
+
type: "text",
|
|
56
|
+
text: JSON.stringify({
|
|
57
|
+
status: report.status,
|
|
58
|
+
summary: report.summary,
|
|
59
|
+
failureCount: report.failures.length,
|
|
60
|
+
score: report.stats.score,
|
|
61
|
+
ai_health_score: report.stats.ai_health_score,
|
|
62
|
+
structural_score: report.stats.structural_score,
|
|
63
|
+
severity_breakdown: report.stats.severity_breakdown,
|
|
64
|
+
provenance_breakdown: report.stats.provenance_breakdown,
|
|
65
|
+
durationMs: report.stats.duration_ms,
|
|
66
|
+
}, null, 2),
|
|
67
|
+
}],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export async function handleGetFixPacket(runner, cwd, config) {
|
|
71
|
+
const report = await runner.run(cwd);
|
|
72
|
+
if (report.status === "PASS") {
|
|
73
|
+
const passScore = report.stats.score !== undefined ? ` Score: ${report.stats.score}/100.` : '';
|
|
74
|
+
return {
|
|
75
|
+
content: [{ type: "text", text: `ALL QUALITY GATES PASSED.${passScore} The current state meets the required engineering standards.` }],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const { FixPacketService } = await import("@rigour-labs/core");
|
|
79
|
+
const fixPacketService = new FixPacketService();
|
|
80
|
+
const fixPacket = fixPacketService.generate(report, config);
|
|
81
|
+
const packet = fixPacket.violations.map((v, i) => {
|
|
82
|
+
const sevTag = `[${(v.severity || 'medium').toUpperCase()}]`;
|
|
83
|
+
const catTag = v.category ? `(${v.category})` : '';
|
|
84
|
+
let text = `FIX TASK ${i + 1}: ${sevTag} ${catTag} [${v.id.toUpperCase()}] ${v.title}\n`;
|
|
85
|
+
text += ` - CONTEXT: ${v.details}\n`;
|
|
86
|
+
if (v.files?.length > 0)
|
|
87
|
+
text += ` - TARGET FILES: ${v.files.join(", ")}\n`;
|
|
88
|
+
if (v.hint)
|
|
89
|
+
text += ` - REFACTORING GUIDANCE: ${v.hint}\n`;
|
|
90
|
+
return text;
|
|
91
|
+
}).join("\n---\n");
|
|
92
|
+
let scoreHeader = formatScoreText(report.stats).trim();
|
|
93
|
+
if (scoreHeader)
|
|
94
|
+
scoreHeader += '\n';
|
|
95
|
+
return {
|
|
96
|
+
content: [{
|
|
97
|
+
type: "text",
|
|
98
|
+
text: `ENGINEERING REFINEMENT REQUIRED:\n${scoreHeader}\nThe project state violated ${report.failures.length} quality gates. You MUST address these failures before declaring the task complete (critical issues first):\n\n${packet}`,
|
|
99
|
+
}],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export function handleListGates(config) {
|
|
103
|
+
return {
|
|
104
|
+
content: [{
|
|
105
|
+
type: "text",
|
|
106
|
+
text: `ACTIVE QUALITY GATES:\n\n${Object.entries(config.gates).map(([k, v]) => {
|
|
107
|
+
if (typeof v === 'object' && v !== null)
|
|
108
|
+
return `- ${k}: ${JSON.stringify(v)}`;
|
|
109
|
+
return `- ${k}: ${v}`;
|
|
110
|
+
}).join("\n")}`,
|
|
111
|
+
}],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export function handleGetConfig(config) {
|
|
115
|
+
return { content: [{ type: "text", text: JSON.stringify(config, null, 2) }] };
|
|
116
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Review Tool Handler
|
|
3
|
+
*
|
|
4
|
+
* Handler for: rigour_review
|
|
5
|
+
*
|
|
6
|
+
* @since v2.17.0 — extracted from monolithic index.ts
|
|
7
|
+
*/
|
|
8
|
+
import { GateRunner } from "@rigour-labs/core";
|
|
9
|
+
type ToolResult = {
|
|
10
|
+
content: {
|
|
11
|
+
type: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
export declare function handleReview(runner: GateRunner, cwd: string, diff: string, changedFiles?: string[]): Promise<ToolResult>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { parseDiff } from '../utils/config.js';
|
|
2
|
+
export async function handleReview(runner, cwd, diff, changedFiles) {
|
|
3
|
+
// 1. Map diff to line numbers for filtering
|
|
4
|
+
const diffMapping = parseDiff(diff);
|
|
5
|
+
const targetFiles = changedFiles || Object.keys(diffMapping);
|
|
6
|
+
// 2. Run high-fidelity analysis on changed files
|
|
7
|
+
const report = await runner.run(cwd, targetFiles);
|
|
8
|
+
// 3. Filter failures to only those on changed lines (or global gate failures)
|
|
9
|
+
const filteredFailures = report.failures.filter(failure => {
|
|
10
|
+
if (!failure.files || failure.files.length === 0)
|
|
11
|
+
return true;
|
|
12
|
+
return failure.files.some(file => {
|
|
13
|
+
const fileModifiedLines = diffMapping[file];
|
|
14
|
+
if (!fileModifiedLines)
|
|
15
|
+
return false;
|
|
16
|
+
if (failure.line !== undefined)
|
|
17
|
+
return fileModifiedLines.has(failure.line);
|
|
18
|
+
return true;
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
content: [{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: JSON.stringify({
|
|
25
|
+
status: filteredFailures.length > 0 ? "FAIL" : "PASS",
|
|
26
|
+
score: report.stats.score,
|
|
27
|
+
ai_health_score: report.stats.ai_health_score,
|
|
28
|
+
structural_score: report.stats.structural_score,
|
|
29
|
+
failures: filteredFailures.map(f => ({
|
|
30
|
+
id: f.id,
|
|
31
|
+
gate: f.title,
|
|
32
|
+
severity: f.severity || 'medium',
|
|
33
|
+
provenance: f.provenance || 'traditional',
|
|
34
|
+
message: f.details,
|
|
35
|
+
file: f.files?.[0] || "",
|
|
36
|
+
line: f.line || 1,
|
|
37
|
+
suggestion: f.hint,
|
|
38
|
+
})),
|
|
39
|
+
}),
|
|
40
|
+
}],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
export declare function loadConfig(cwd: string): Promise<{
|
|
2
|
+
ignore: string[];
|
|
3
|
+
version: number;
|
|
4
|
+
commands: {
|
|
5
|
+
format?: string | undefined;
|
|
6
|
+
lint?: string | undefined;
|
|
7
|
+
typecheck?: string | undefined;
|
|
8
|
+
test?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
gates: {
|
|
11
|
+
max_file_lines: number;
|
|
12
|
+
forbid_todos: boolean;
|
|
13
|
+
forbid_fixme: boolean;
|
|
14
|
+
forbid_paths: string[];
|
|
15
|
+
required_files: string[];
|
|
16
|
+
ast: {
|
|
17
|
+
complexity: number;
|
|
18
|
+
max_methods: number;
|
|
19
|
+
max_params: number;
|
|
20
|
+
max_nesting: number;
|
|
21
|
+
max_inheritance_depth: number;
|
|
22
|
+
max_class_dependencies: number;
|
|
23
|
+
max_function_lines: number;
|
|
24
|
+
};
|
|
25
|
+
staleness: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
rules: Record<string, boolean>;
|
|
28
|
+
};
|
|
29
|
+
dependencies: {
|
|
30
|
+
forbid: string[];
|
|
31
|
+
trusted_registry?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
architecture: {
|
|
34
|
+
boundaries: {
|
|
35
|
+
from: string;
|
|
36
|
+
to: string;
|
|
37
|
+
mode: "allow" | "deny";
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
safety: {
|
|
41
|
+
max_files_changed_per_cycle: number;
|
|
42
|
+
protected_paths: string[];
|
|
43
|
+
};
|
|
44
|
+
context: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
sensitivity: number;
|
|
47
|
+
mining_depth: number;
|
|
48
|
+
ignored_patterns: string[];
|
|
49
|
+
cross_file_patterns: boolean;
|
|
50
|
+
naming_consistency: boolean;
|
|
51
|
+
import_relationships: boolean;
|
|
52
|
+
max_cross_file_depth: number;
|
|
53
|
+
};
|
|
54
|
+
environment: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
enforce_contracts: boolean;
|
|
57
|
+
tools: Record<string, string>;
|
|
58
|
+
required_env: string[];
|
|
59
|
+
};
|
|
60
|
+
retry_loop_breaker: {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
max_retries: number;
|
|
63
|
+
auto_classify: boolean;
|
|
64
|
+
doc_sources: Record<string, string>;
|
|
65
|
+
};
|
|
66
|
+
agent_team: {
|
|
67
|
+
enabled: boolean;
|
|
68
|
+
max_concurrent_agents: number;
|
|
69
|
+
cross_agent_pattern_check: boolean;
|
|
70
|
+
handoff_verification: boolean;
|
|
71
|
+
task_ownership: "strict" | "collaborative";
|
|
72
|
+
};
|
|
73
|
+
checkpoint: {
|
|
74
|
+
enabled: boolean;
|
|
75
|
+
interval_minutes: number;
|
|
76
|
+
quality_threshold: number;
|
|
77
|
+
drift_detection: boolean;
|
|
78
|
+
auto_save_on_failure: boolean;
|
|
79
|
+
};
|
|
80
|
+
security: {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
sql_injection: boolean;
|
|
83
|
+
xss: boolean;
|
|
84
|
+
path_traversal: boolean;
|
|
85
|
+
hardcoded_secrets: boolean;
|
|
86
|
+
insecure_randomness: boolean;
|
|
87
|
+
command_injection: boolean;
|
|
88
|
+
block_on_severity: "critical" | "high" | "medium" | "low";
|
|
89
|
+
};
|
|
90
|
+
adaptive: {
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
base_coverage_threshold: number;
|
|
93
|
+
base_quality_threshold: number;
|
|
94
|
+
auto_detect_tier: boolean;
|
|
95
|
+
forced_tier?: "hobby" | "startup" | "enterprise" | undefined;
|
|
96
|
+
};
|
|
97
|
+
duplication_drift: {
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
similarity_threshold: number;
|
|
100
|
+
min_body_lines: number;
|
|
101
|
+
};
|
|
102
|
+
hallucinated_imports: {
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
check_relative: boolean;
|
|
105
|
+
check_packages: boolean;
|
|
106
|
+
ignore_patterns: string[];
|
|
107
|
+
};
|
|
108
|
+
inconsistent_error_handling: {
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
max_strategies_per_type: number;
|
|
111
|
+
min_occurrences: number;
|
|
112
|
+
ignore_empty_catches: boolean;
|
|
113
|
+
};
|
|
114
|
+
context_window_artifacts: {
|
|
115
|
+
enabled: boolean;
|
|
116
|
+
min_file_lines: number;
|
|
117
|
+
degradation_threshold: number;
|
|
118
|
+
signals_required: number;
|
|
119
|
+
};
|
|
120
|
+
promise_safety: {
|
|
121
|
+
enabled: boolean;
|
|
122
|
+
ignore_patterns: string[];
|
|
123
|
+
check_unhandled_then: boolean;
|
|
124
|
+
check_unsafe_parse: boolean;
|
|
125
|
+
check_async_without_await: boolean;
|
|
126
|
+
check_unsafe_fetch: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
output: {
|
|
130
|
+
report_path: string;
|
|
131
|
+
};
|
|
132
|
+
planned: string[];
|
|
133
|
+
preset?: string | undefined;
|
|
134
|
+
paradigm?: string | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
export interface MemoryStore {
|
|
137
|
+
memories: Record<string, {
|
|
138
|
+
value: string;
|
|
139
|
+
timestamp: string;
|
|
140
|
+
}>;
|
|
141
|
+
}
|
|
142
|
+
export declare function getMemoryPath(cwd: string): Promise<string>;
|
|
143
|
+
export declare function loadMemory(cwd: string): Promise<MemoryStore>;
|
|
144
|
+
export declare function saveMemory(cwd: string, store: MemoryStore): Promise<void>;
|
|
145
|
+
export declare function logStudioEvent(cwd: string, event: any): Promise<void>;
|
|
146
|
+
export declare function parseDiff(diff: string): Record<string, Set<number>>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration & Utility Helpers
|
|
3
|
+
*
|
|
4
|
+
* Shared utilities for config loading, memory persistence,
|
|
5
|
+
* Studio event logging, and diff parsing.
|
|
6
|
+
*
|
|
7
|
+
* @since v2.17.0 — extracted from monolithic index.ts
|
|
8
|
+
*/
|
|
9
|
+
import fs from "fs-extra";
|
|
10
|
+
import path from "path";
|
|
11
|
+
import yaml from "yaml";
|
|
12
|
+
import { randomUUID } from "crypto";
|
|
13
|
+
import { ConfigSchema } from "@rigour-labs/core";
|
|
14
|
+
// ─── Config Loading ───────────────────────────────────────────────
|
|
15
|
+
export async function loadConfig(cwd) {
|
|
16
|
+
const configPath = path.join(cwd, "rigour.yml");
|
|
17
|
+
if (!(await fs.pathExists(configPath))) {
|
|
18
|
+
console.error(`[RIGOUR] rigour.yml not found in ${cwd}, auto-initializing...`);
|
|
19
|
+
const { execa } = await import("execa");
|
|
20
|
+
try {
|
|
21
|
+
await execa("npx", ["rigour", "init"], { cwd, shell: true });
|
|
22
|
+
console.error(`[RIGOUR] Auto-initialization complete.`);
|
|
23
|
+
}
|
|
24
|
+
catch (initError) {
|
|
25
|
+
throw new Error(`Rigour auto-initialization failed: ${initError.message}. Please run 'npx rigour init' manually.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const configContent = await fs.readFile(configPath, "utf-8");
|
|
29
|
+
return ConfigSchema.parse(yaml.parse(configContent));
|
|
30
|
+
}
|
|
31
|
+
export async function getMemoryPath(cwd) {
|
|
32
|
+
const rigourDir = path.join(cwd, ".rigour");
|
|
33
|
+
await fs.ensureDir(rigourDir);
|
|
34
|
+
return path.join(rigourDir, "memory.json");
|
|
35
|
+
}
|
|
36
|
+
export async function loadMemory(cwd) {
|
|
37
|
+
const memPath = await getMemoryPath(cwd);
|
|
38
|
+
if (await fs.pathExists(memPath)) {
|
|
39
|
+
const content = await fs.readFile(memPath, "utf-8");
|
|
40
|
+
return JSON.parse(content);
|
|
41
|
+
}
|
|
42
|
+
return { memories: {} };
|
|
43
|
+
}
|
|
44
|
+
export async function saveMemory(cwd, store) {
|
|
45
|
+
const memPath = await getMemoryPath(cwd);
|
|
46
|
+
await fs.writeFile(memPath, JSON.stringify(store, null, 2));
|
|
47
|
+
}
|
|
48
|
+
// ─── Studio Event Logging ─────────────────────────────────────────
|
|
49
|
+
export async function logStudioEvent(cwd, event) {
|
|
50
|
+
try {
|
|
51
|
+
const rigourDir = path.join(cwd, ".rigour");
|
|
52
|
+
await fs.ensureDir(rigourDir);
|
|
53
|
+
const eventsPath = path.join(rigourDir, "events.jsonl");
|
|
54
|
+
const logEntry = JSON.stringify({
|
|
55
|
+
id: randomUUID(),
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
...event,
|
|
58
|
+
}) + "\n";
|
|
59
|
+
await fs.appendFile(eventsPath, logEntry);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Silent fail — Studio logging is non-blocking and zero-telemetry
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ─── Diff Parsing ─────────────────────────────────────────────────
|
|
66
|
+
export function parseDiff(diff) {
|
|
67
|
+
const lines = diff.split("\n");
|
|
68
|
+
const mapping = {};
|
|
69
|
+
let currentFile = "";
|
|
70
|
+
let currentLine = 0;
|
|
71
|
+
for (const line of lines) {
|
|
72
|
+
if (line.startsWith("+++ b/")) {
|
|
73
|
+
currentFile = line.slice(6);
|
|
74
|
+
mapping[currentFile] = new Set();
|
|
75
|
+
}
|
|
76
|
+
else if (line.startsWith("@@")) {
|
|
77
|
+
const match = line.match(/\+(\d+)/);
|
|
78
|
+
if (match) {
|
|
79
|
+
currentLine = parseInt(match[1], 10);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else if (line.startsWith("+") && !line.startsWith("+++")) {
|
|
83
|
+
if (currentFile) {
|
|
84
|
+
mapping[currentFile].add(currentLine);
|
|
85
|
+
}
|
|
86
|
+
currentLine++;
|
|
87
|
+
}
|
|
88
|
+
else if (!line.startsWith("-")) {
|
|
89
|
+
currentLine++;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return mapping;
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigour-labs/mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "MCP server for AI code quality gates. Integrates with Claude Desktop, Cursor, Cline, and VS Code to enforce engineering standards in real-time.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://rigour.run",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"mcp",
|
|
9
|
+
"model-context-protocol",
|
|
10
|
+
"quality-gates",
|
|
11
|
+
"ai-code-quality",
|
|
12
|
+
"claude",
|
|
13
|
+
"cursor",
|
|
14
|
+
"cline",
|
|
15
|
+
"code-review",
|
|
16
|
+
"static-analysis",
|
|
17
|
+
"agent-governance"
|
|
18
|
+
],
|
|
4
19
|
"type": "module",
|
|
5
20
|
"mcpName": "io.github.rigour-labs/rigour",
|
|
6
|
-
"
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
7
25
|
"bin": {
|
|
8
26
|
"rigour-mcp": "dist/index.js"
|
|
9
27
|
},
|
|
@@ -20,7 +38,7 @@
|
|
|
20
38
|
"execa": "^8.0.1",
|
|
21
39
|
"fs-extra": "^11.2.0",
|
|
22
40
|
"yaml": "^2.8.2",
|
|
23
|
-
"@rigour-labs/core": "
|
|
41
|
+
"@rigour-labs/core": "3.0.0"
|
|
24
42
|
},
|
|
25
43
|
"devDependencies": {
|
|
26
44
|
"@types/node": "^25.0.3",
|
package/.claude-plugin/SKILL.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Rigour Governance Skills
|
|
2
|
-
|
|
3
|
-
Rigour provides meta-cognitive governance tools to ensure AI agents stay aligned with engineering standards, project context, and brand identity during long-running coworking tasks.
|
|
4
|
-
|
|
5
|
-
## Skills
|
|
6
|
-
|
|
7
|
-
### `rigour_checkpoint`
|
|
8
|
-
Record a quality checkpoint during long-running agent execution. Use periodically (every 15-30 min) to enable drift detection and quality monitoring. Essential for coworking mode.
|
|
9
|
-
|
|
10
|
-
**Parameters:**
|
|
11
|
-
- `cwd` (string, required): Absolute path to the project root.
|
|
12
|
-
- `progressPct` (number, required): Estimated progress percentage (0-100).
|
|
13
|
-
- `summary` (string, required): Brief description of work done since last checkpoint.
|
|
14
|
-
- `qualityScore` (number, required): Self-assessed quality score (0-100).
|
|
15
|
-
- `filesChanged` (array of strings): List of files modified since last checkpoint.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
### `rigour_agent_register`
|
|
20
|
-
Register an agent in a multi-agent session. Use this at the START of agent execution to claim task scope and enable cross-agent conflict detection.
|
|
21
|
-
|
|
22
|
-
**Parameters:**
|
|
23
|
-
- `cwd` (string, required): Absolute path to the project root.
|
|
24
|
-
- `agentId` (string, required): Unique identifier for this agent (e.g., 'marketing-pro', 'sales-bot').
|
|
25
|
-
- `taskScope` (array of strings, required): Glob patterns defining the files/directories this agent will work on.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
### `rigour_check`
|
|
30
|
-
Run all configured quality gates (Lint, Test, AST, etc.) on the project. Call this before completing a task to verify overall quality.
|
|
31
|
-
|
|
32
|
-
**Parameters:**
|
|
33
|
-
- `cwd` (string, required): Absolute path to the project root.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
### `rigour_get_fix_packet`
|
|
38
|
-
If gates fail, call this to retrieve a prioritized 'Fix Packet' containing detailed instructions on how to resolve the violations.
|
|
39
|
-
|
|
40
|
-
**Parameters:**
|
|
41
|
-
- `cwd` (string, required): Absolute path to the project root.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
### `rigour_remember`
|
|
46
|
-
Persist critical instructions or project-specific conventions that should be remembered across sessions.
|
|
47
|
-
|
|
48
|
-
**Parameters:**
|
|
49
|
-
- `cwd` (string, required): Absolute path to the project root.
|
|
50
|
-
- `key` (string, required): Unique key for the memory.
|
|
51
|
-
- `value` (string, required): The instruction or context to remember.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://claude.com/schemas/marketplace.schema.json",
|
|
3
|
-
"name": "Rigour Governance",
|
|
4
|
-
"version": "2.14.0",
|
|
5
|
-
"description": "Meta-cognitive governance for AI agents. Monitor drift, manage agent teams, and enforce quality gates during long-running coworking tasks.",
|
|
6
|
-
"owner": {
|
|
7
|
-
"name": "Rigour Labs",
|
|
8
|
-
"email": "support@rigour.dev"
|
|
9
|
-
},
|
|
10
|
-
"plugins": [
|
|
11
|
-
{
|
|
12
|
-
"name": "rigour-governance",
|
|
13
|
-
"description": "Quality gate checks, checkpoint supervision, and multi-agent governance for Claude Cowork mode.",
|
|
14
|
-
"version": "2.14.0",
|
|
15
|
-
"source": {
|
|
16
|
-
"type": "npm",
|
|
17
|
-
"package": "@rigour-labs/mcp"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Rigour Quality Governance",
|
|
3
|
-
"version": "2.14.0",
|
|
4
|
-
"description": "Meta-cognitive governance for AI agents. Monitor drift, manage agent teams, and enforce quality gates during long-running coworking tasks.",
|
|
5
|
-
"author": "Rigour Labs",
|
|
6
|
-
"capabilities": {
|
|
7
|
-
"mcp": {
|
|
8
|
-
"enabled": true
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"entrypoint": "../dist/index.js",
|
|
12
|
-
"icon": "🛡️",
|
|
13
|
-
"categories": [
|
|
14
|
-
"Productivity",
|
|
15
|
-
"Developer Tools"
|
|
16
|
-
]
|
|
17
|
-
}
|
package/server.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
-
"name": "io.github.rigour-labs/rigour",
|
|
4
|
-
"description": "Quality gates for AI agents. Lint, test, build checks with memory persistence.",
|
|
5
|
-
"repository": {
|
|
6
|
-
"url": "https://github.com/rigour-labs/rigour",
|
|
7
|
-
"source": "github"
|
|
8
|
-
},
|
|
9
|
-
"version": "2.12.0",
|
|
10
|
-
"packages": [
|
|
11
|
-
{
|
|
12
|
-
"registryType": "npm",
|
|
13
|
-
"identifier": "@rigour-labs/mcp",
|
|
14
|
-
"version": "2.12.0",
|
|
15
|
-
"transport": {
|
|
16
|
-
"type": "stdio"
|
|
17
|
-
},
|
|
18
|
-
"runtime": "node"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|