@neurcode-ai/cli 0.9.65 → 0.9.66
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/dist/commands/bootstrap-policy.d.ts +29 -0
- package/dist/commands/bootstrap-policy.d.ts.map +1 -0
- package/dist/commands/bootstrap-policy.js +334 -0
- package/dist/commands/bootstrap-policy.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +82 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/quickstart.d.ts +21 -0
- package/dist/commands/quickstart.d.ts.map +1 -0
- package/dist/commands/quickstart.js +178 -0
- package/dist/commands/quickstart.js.map +1 -0
- package/dist/commands/remediate-export.d.ts +31 -0
- package/dist/commands/remediate-export.d.ts.map +1 -0
- package/dist/commands/remediate-export.js +283 -0
- package/dist/commands/remediate-export.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +106 -10
- package/dist/commands/verify.js.map +1 -1
- package/dist/governance/canonical-invariants.d.ts +88 -0
- package/dist/governance/canonical-invariants.d.ts.map +1 -0
- package/dist/governance/canonical-invariants.js +197 -0
- package/dist/governance/canonical-invariants.js.map +1 -0
- package/dist/governance/canonical-ordering.d.ts +76 -0
- package/dist/governance/canonical-ordering.d.ts.map +1 -0
- package/dist/governance/canonical-ordering.js +189 -0
- package/dist/governance/canonical-ordering.js.map +1 -0
- package/dist/governance/canonical-pipeline.d.ts +7 -0
- package/dist/governance/canonical-pipeline.d.ts.map +1 -1
- package/dist/governance/canonical-pipeline.js +184 -16
- package/dist/governance/canonical-pipeline.js.map +1 -1
- package/dist/governance/diff-line-provenance.d.ts +59 -0
- package/dist/governance/diff-line-provenance.d.ts.map +1 -0
- package/dist/governance/diff-line-provenance.js +118 -0
- package/dist/governance/diff-line-provenance.js.map +1 -0
- package/dist/governance/pilot-readiness.d.ts +34 -0
- package/dist/governance/pilot-readiness.d.ts.map +1 -0
- package/dist/governance/pilot-readiness.js +226 -0
- package/dist/governance/pilot-readiness.js.map +1 -0
- package/dist/governance/policy-parity-validator.d.ts +62 -0
- package/dist/governance/policy-parity-validator.d.ts.map +1 -0
- package/dist/governance/policy-parity-validator.js +137 -0
- package/dist/governance/policy-parity-validator.js.map +1 -0
- package/dist/governance/remediation-boundary.d.ts +55 -0
- package/dist/governance/remediation-boundary.d.ts.map +1 -0
- package/dist/governance/remediation-boundary.js +120 -0
- package/dist/governance/remediation-boundary.js.map +1 -0
- package/dist/governance/structural-cache.d.ts +103 -0
- package/dist/governance/structural-cache.d.ts.map +1 -0
- package/dist/governance/structural-cache.js +240 -0
- package/dist/governance/structural-cache.js.map +1 -0
- package/dist/governance/structural-on-diff.d.ts +22 -2
- package/dist/governance/structural-on-diff.d.ts.map +1 -1
- package/dist/governance/structural-on-diff.js +36 -4
- package/dist/governance/structural-on-diff.js.map +1 -1
- package/dist/governance/structural-policy-merge.d.ts +8 -0
- package/dist/governance/structural-policy-merge.d.ts.map +1 -1
- package/dist/governance/structural-policy-merge.js +7 -0
- package/dist/governance/structural-policy-merge.js.map +1 -1
- package/dist/governance/verify-runtime-guard.d.ts +99 -0
- package/dist/governance/verify-runtime-guard.d.ts.map +1 -0
- package/dist/governance/verify-runtime-guard.js +129 -0
- package/dist/governance/verify-runtime-guard.js.map +1 -0
- package/dist/index.js +50 -14
- package/dist/index.js.map +1 -1
- package/dist/intent-engine/repo-classifier.d.ts +64 -0
- package/dist/intent-engine/repo-classifier.d.ts.map +1 -0
- package/dist/intent-engine/repo-classifier.js +178 -0
- package/dist/intent-engine/repo-classifier.js.map +1 -0
- package/dist/structural-rules/index.d.ts +4 -0
- package/dist/structural-rules/index.d.ts.map +1 -1
- package/dist/structural-rules/index.js +18 -1
- package/dist/structural-rules/index.js.map +1 -1
- package/dist/structural-rules/python/PY003-broad-except-clause.d.ts +21 -0
- package/dist/structural-rules/python/PY003-broad-except-clause.d.ts.map +1 -1
- package/dist/structural-rules/python/PY003-broad-except-clause.js +212 -21
- package/dist/structural-rules/python/PY003-broad-except-clause.js.map +1 -1
- package/dist/structural-rules/python/PY011-thread-lifecycle.d.ts +11 -0
- package/dist/structural-rules/python/PY011-thread-lifecycle.d.ts.map +1 -0
- package/dist/structural-rules/python/PY011-thread-lifecycle.js +97 -0
- package/dist/structural-rules/python/PY011-thread-lifecycle.js.map +1 -0
- package/dist/structural-rules/python/PY012-asyncio-run-misuse.d.ts +11 -0
- package/dist/structural-rules/python/PY012-asyncio-run-misuse.d.ts.map +1 -0
- package/dist/structural-rules/python/PY012-asyncio-run-misuse.js +83 -0
- package/dist/structural-rules/python/PY012-asyncio-run-misuse.js.map +1 -0
- package/dist/structural-rules/python/PY013-mutable-default-arg.d.ts +11 -0
- package/dist/structural-rules/python/PY013-mutable-default-arg.d.ts.map +1 -0
- package/dist/structural-rules/python/PY013-mutable-default-arg.js +73 -0
- package/dist/structural-rules/python/PY013-mutable-default-arg.js.map +1 -0
- package/dist/structural-rules/python/PY014-fixed-sleep-retry.d.ts +11 -0
- package/dist/structural-rules/python/PY014-fixed-sleep-retry.d.ts.map +1 -0
- package/dist/structural-rules/python/PY014-fixed-sleep-retry.js +115 -0
- package/dist/structural-rules/python/PY014-fixed-sleep-retry.js.map +1 -0
- package/dist/structural-rules/types.d.ts +12 -0
- package/dist/structural-rules/types.d.ts.map +1 -1
- package/dist/utils/verify-runtime-stability.d.ts +142 -0
- package/dist/utils/verify-runtime-stability.d.ts.map +1 -0
- package/dist/utils/verify-runtime-stability.js +230 -0
- package/dist/utils/verify-runtime-stability.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Quickstart Command
|
|
4
|
+
*
|
|
5
|
+
* Guided onboarding flow. Gets a new engineer to first deterministic finding
|
|
6
|
+
* within 2 minutes. Zero interactive prompts. Zero network calls.
|
|
7
|
+
*
|
|
8
|
+
* What it does:
|
|
9
|
+
* 1. Resolves project root (git repo required)
|
|
10
|
+
* 2. Initializes .neurcode/ directory
|
|
11
|
+
* 3. Writes starter policy if none exists
|
|
12
|
+
* 4. Writes starter config skeleton if none exists
|
|
13
|
+
* 5. Prints 5-step verify flow explanation
|
|
14
|
+
* 6. Prints local-only mode explanation
|
|
15
|
+
* 7. Recommends next commands
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.quickstartCommand = quickstartCommand;
|
|
22
|
+
const fs_1 = require("fs");
|
|
23
|
+
const path_1 = require("path");
|
|
24
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
25
|
+
const project_root_1 = require("../utils/project-root");
|
|
26
|
+
const pilot_readiness_1 = require("../governance/pilot-readiness");
|
|
27
|
+
const STARTER_POLICY = `# Neurcode Starter Policy
|
|
28
|
+
# Generated by neurcode quickstart
|
|
29
|
+
# Edit this file to add governance rules for your project.
|
|
30
|
+
#
|
|
31
|
+
# Policy structure:
|
|
32
|
+
# - id: unique rule identifier
|
|
33
|
+
# name: human-readable name
|
|
34
|
+
# description: what this rule enforces
|
|
35
|
+
# severity: BLOCKING | ADVISORY
|
|
36
|
+
# pattern: file glob this rule applies to
|
|
37
|
+
#
|
|
38
|
+
# After editing, run: neurcode policy compile
|
|
39
|
+
#
|
|
40
|
+
# Full policy reference: https://docs.neurcode.com/policy
|
|
41
|
+
|
|
42
|
+
name: "Starter Policy"
|
|
43
|
+
version: "1.0.0"
|
|
44
|
+
description: "Neurcode starter governance policy"
|
|
45
|
+
|
|
46
|
+
rules:
|
|
47
|
+
- id: "REQUIRE_CHANGE_INTENT"
|
|
48
|
+
name: "Require Change Intent"
|
|
49
|
+
description: "All PRs must have a declared change intent documented in the plan."
|
|
50
|
+
severity: ADVISORY
|
|
51
|
+
|
|
52
|
+
- id: "STRUCTURAL_BASELINE"
|
|
53
|
+
name: "Structural Baseline"
|
|
54
|
+
description: "Enforce deterministic structural rules (SR001-SR010) on all code changes."
|
|
55
|
+
severity: BLOCKING
|
|
56
|
+
scope: structural
|
|
57
|
+
|
|
58
|
+
- id: "NO_SILENT_FAILURES"
|
|
59
|
+
name: "No Silent Failures"
|
|
60
|
+
description: "Async operations must not silently swallow exceptions (SR001)."
|
|
61
|
+
severity: BLOCKING
|
|
62
|
+
scope: structural
|
|
63
|
+
ruleIds: [SR001]
|
|
64
|
+
`;
|
|
65
|
+
const STARTER_CONFIG_TEMPLATE = (projectRoot) => JSON.stringify({
|
|
66
|
+
_comment: 'Neurcode project config. Run `neurcode init` to bind to a remote project.',
|
|
67
|
+
projectId: null,
|
|
68
|
+
orgId: null,
|
|
69
|
+
projectRoot,
|
|
70
|
+
localOnlyMode: true,
|
|
71
|
+
structuralRulesEnabled: true,
|
|
72
|
+
_generatedBy: 'neurcode quickstart',
|
|
73
|
+
}, null, 2);
|
|
74
|
+
function printBanner(text) {
|
|
75
|
+
console.log(chalk_1.default.bold.cyan(`\n${'═'.repeat(60)}`));
|
|
76
|
+
console.log(chalk_1.default.bold.white(` ${text}`));
|
|
77
|
+
console.log(chalk_1.default.cyan('═'.repeat(60)));
|
|
78
|
+
}
|
|
79
|
+
function printStep(n, title, desc) {
|
|
80
|
+
console.log(chalk_1.default.bold.white(`\n Step ${n}: ${title}`));
|
|
81
|
+
console.log(chalk_1.default.dim(` ${desc}`));
|
|
82
|
+
}
|
|
83
|
+
async function quickstartCommand(options = {}) {
|
|
84
|
+
const rootTrace = (0, project_root_1.resolveNeurcodeProjectRootWithTrace)(process.cwd());
|
|
85
|
+
const projectRoot = rootTrace.projectRoot;
|
|
86
|
+
const neurcodeDir = (0, path_1.join)(projectRoot, '.neurcode');
|
|
87
|
+
const created = [];
|
|
88
|
+
const skipped = [];
|
|
89
|
+
if (!options.json) {
|
|
90
|
+
printBanner('Neurcode Quickstart — First Governance Finding in < 2 Minutes');
|
|
91
|
+
console.log(chalk_1.default.dim('\n Setting up deterministic governance for this repository.\n'));
|
|
92
|
+
}
|
|
93
|
+
// 1. Initialize .neurcode/
|
|
94
|
+
if (!(0, fs_1.existsSync)(neurcodeDir)) {
|
|
95
|
+
(0, fs_1.mkdirSync)(neurcodeDir, { recursive: true });
|
|
96
|
+
created.push('.neurcode/');
|
|
97
|
+
}
|
|
98
|
+
// 2. Write starter policy
|
|
99
|
+
const policyPath = (0, path_1.join)(neurcodeDir, 'policy.yml');
|
|
100
|
+
if (!(0, fs_1.existsSync)(policyPath) || options.force) {
|
|
101
|
+
(0, fs_1.writeFileSync)(policyPath, STARTER_POLICY, 'utf-8');
|
|
102
|
+
created.push('.neurcode/policy.yml');
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
skipped.push('.neurcode/policy.yml (already exists)');
|
|
106
|
+
}
|
|
107
|
+
// 3. Write starter config
|
|
108
|
+
const configPath = (0, path_1.join)(neurcodeDir, 'config.json');
|
|
109
|
+
if (!(0, fs_1.existsSync)(configPath) || options.force) {
|
|
110
|
+
(0, fs_1.writeFileSync)(configPath, STARTER_CONFIG_TEMPLATE(projectRoot), 'utf-8');
|
|
111
|
+
created.push('.neurcode/config.json');
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
skipped.push('.neurcode/config.json (already exists)');
|
|
115
|
+
}
|
|
116
|
+
if (options.json) {
|
|
117
|
+
const readiness = (0, pilot_readiness_1.runPilotReadinessCheck)(projectRoot);
|
|
118
|
+
console.log(JSON.stringify({
|
|
119
|
+
success: true,
|
|
120
|
+
projectRoot,
|
|
121
|
+
created,
|
|
122
|
+
skipped,
|
|
123
|
+
readiness: {
|
|
124
|
+
status: readiness.ready ? 'ready' : 'not-ready',
|
|
125
|
+
passing: readiness.checks.filter(c => c.status === 'pass').length,
|
|
126
|
+
total: readiness.checks.length,
|
|
127
|
+
},
|
|
128
|
+
}, null, 2));
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
// Print created/skipped
|
|
132
|
+
if (created.length > 0) {
|
|
133
|
+
console.log(chalk_1.default.green(' Created:'));
|
|
134
|
+
for (const f of created)
|
|
135
|
+
console.log(chalk_1.default.green(` ✅ ${f}`));
|
|
136
|
+
}
|
|
137
|
+
if (skipped.length > 0) {
|
|
138
|
+
console.log(chalk_1.default.dim(' Skipped (already exists):'));
|
|
139
|
+
for (const f of skipped)
|
|
140
|
+
console.log(chalk_1.default.dim(` ⏭️ ${f}`));
|
|
141
|
+
}
|
|
142
|
+
// 4. Explain the verify flow
|
|
143
|
+
printBanner('How Neurcode Verify Works');
|
|
144
|
+
printStep(1, 'Set intent', 'Run `neurcode plan "I am adding X feature to Y service"` to declare your change intent.');
|
|
145
|
+
printStep(2, 'Write code', 'Use your AI tools (Cursor, Claude Code, Codex) to generate or write code.');
|
|
146
|
+
printStep(3, 'Run verify', 'Run `neurcode verify` to check your code against the plan and structural rules.');
|
|
147
|
+
printStep(4, 'Review findings', 'BLOCKING findings must be resolved. ADVISORY findings are informational.\n' +
|
|
148
|
+
' Structural rules (SR001–SR010) are deterministic — same code = same result, always.');
|
|
149
|
+
printStep(5, 'Iterate', 'Fix blocking findings, re-run verify. When passing, the PR is governance-cleared.');
|
|
150
|
+
// 5. Explain local-only mode
|
|
151
|
+
printBanner('Local-Only Mode (No Network Required)');
|
|
152
|
+
console.log(chalk_1.default.dim('\n `neurcode verify --local-only` runs deterministic structural analysis'));
|
|
153
|
+
console.log(chalk_1.default.dim(' without network access. It uses AST-backed rules to detect:'));
|
|
154
|
+
console.log(chalk_1.default.dim('\n SR001 — Swallowed async rejections'));
|
|
155
|
+
console.log(chalk_1.default.dim(' SR002 — Missing error propagation'));
|
|
156
|
+
console.log(chalk_1.default.dim(' SR003 — Timer/resource leaks'));
|
|
157
|
+
console.log(chalk_1.default.dim(' SR004 — Unvalidated external inputs'));
|
|
158
|
+
console.log(chalk_1.default.dim(' SR005–SR010 — Additional structural integrity rules\n'));
|
|
159
|
+
console.log(chalk_1.default.dim(' These findings are:'));
|
|
160
|
+
console.log(chalk_1.default.dim(' • Deterministic — same code always produces same finding'));
|
|
161
|
+
console.log(chalk_1.default.dim(' • Reproducible — identical on any machine, any time'));
|
|
162
|
+
console.log(chalk_1.default.dim(' • No LLM involved — pure AST analysis\n'));
|
|
163
|
+
// 6. Next commands
|
|
164
|
+
printBanner('Recommended Next Commands');
|
|
165
|
+
console.log('');
|
|
166
|
+
console.log(chalk_1.default.bold.white(' 1. Run a governance check right now (no network required):'));
|
|
167
|
+
console.log(chalk_1.default.cyan(' neurcode verify --local-only\n'));
|
|
168
|
+
console.log(chalk_1.default.bold.white(' 2. Check system readiness:'));
|
|
169
|
+
console.log(chalk_1.default.cyan(' neurcode doctor\n'));
|
|
170
|
+
console.log(chalk_1.default.bold.white(' 3. Generate enterprise-specific policies:'));
|
|
171
|
+
console.log(chalk_1.default.cyan(' neurcode bootstrap-policy\n'));
|
|
172
|
+
console.log(chalk_1.default.bold.white(' 4. Set a plan for full governance:'));
|
|
173
|
+
console.log(chalk_1.default.cyan(' neurcode plan "describe your change intent"\n'));
|
|
174
|
+
console.log(chalk_1.default.bold.white(' 5. Connect to a remote project (requires API key):'));
|
|
175
|
+
console.log(chalk_1.default.cyan(' neurcode login && neurcode init\n'));
|
|
176
|
+
console.log(chalk_1.default.bold.green(' ✅ Quickstart complete. Run `neurcode verify --local-only` to get your first finding.\n'));
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=quickstart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../src/commands/quickstart.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;AAyEH,8CA8GC;AArLD,2BAA0D;AAC1D,+BAA4B;AAC5B,kDAA0B;AAC1B,wDAA4E;AAC5E,mEAAuE;AAOvE,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCtB,CAAC;A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2BAA2B,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC,CAAC;IAC9F,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;IAEpE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC,CAAC;AAC5H,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* neurcode remediate-export
|
|
3
|
+
*
|
|
4
|
+
* Exports a structured, deterministic remediation payload for a governance finding.
|
|
5
|
+
* The payload is designed to be passed to an external AI coding assistant
|
|
6
|
+
* (Cursor, Claude, Codex, GitHub Copilot) for remediation.
|
|
7
|
+
*
|
|
8
|
+
* TRUST BOUNDARY:
|
|
9
|
+
* Neurcode detects and exports. Your AI assistant remediates.
|
|
10
|
+
* This command never modifies any file.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* neurcode remediate-export --finding <id>
|
|
14
|
+
* neurcode remediate-export --finding-index 0
|
|
15
|
+
* neurcode remediate-export --all
|
|
16
|
+
* neurcode remediate-export --finding <id> --format mcp
|
|
17
|
+
* neurcode remediate-export --finding <id> --out ./payload.json
|
|
18
|
+
* neurcode remediate-export --finding <id> --copy
|
|
19
|
+
*/
|
|
20
|
+
interface RemediateExportOptions {
|
|
21
|
+
finding?: string;
|
|
22
|
+
findingIndex?: string;
|
|
23
|
+
all?: boolean;
|
|
24
|
+
format?: 'json' | 'mcp';
|
|
25
|
+
out?: string;
|
|
26
|
+
copy?: boolean;
|
|
27
|
+
json?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function remediateExportCommand(options: RemediateExportOptions): Promise<void>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=remediate-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remediate-export.d.ts","sourceRoot":"","sources":["../../src/commands/remediate-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA6IH,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoG3F"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* neurcode remediate-export
|
|
4
|
+
*
|
|
5
|
+
* Exports a structured, deterministic remediation payload for a governance finding.
|
|
6
|
+
* The payload is designed to be passed to an external AI coding assistant
|
|
7
|
+
* (Cursor, Claude, Codex, GitHub Copilot) for remediation.
|
|
8
|
+
*
|
|
9
|
+
* TRUST BOUNDARY:
|
|
10
|
+
* Neurcode detects and exports. Your AI assistant remediates.
|
|
11
|
+
* This command never modifies any file.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* neurcode remediate-export --finding <id>
|
|
15
|
+
* neurcode remediate-export --finding-index 0
|
|
16
|
+
* neurcode remediate-export --all
|
|
17
|
+
* neurcode remediate-export --finding <id> --format mcp
|
|
18
|
+
* neurcode remediate-export --finding <id> --out ./payload.json
|
|
19
|
+
* neurcode remediate-export --finding <id> --copy
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.remediateExportCommand = remediateExportCommand;
|
|
23
|
+
const fs_1 = require("fs");
|
|
24
|
+
const path_1 = require("path");
|
|
25
|
+
const crypto_1 = require("crypto");
|
|
26
|
+
const child_process_1 = require("child_process");
|
|
27
|
+
const cli_json_1 = require("../utils/cli-json");
|
|
28
|
+
const chalk = (0, cli_json_1.loadChalk)();
|
|
29
|
+
// ── Trust boundary statement — fixed, never changes ──────────────────────────
|
|
30
|
+
const TRUST_BOUNDARY_STATEMENT = 'Neurcode deterministically detects and governs. ' +
|
|
31
|
+
'Your AI coding assistant (Cursor, Claude, Codex, GitHub Copilot) performs remediation. ' +
|
|
32
|
+
'Neurcode never autonomously modifies production code.';
|
|
33
|
+
// ── Remediation category map — deterministic, ruleId-keyed ───────────────────
|
|
34
|
+
const REMEDIATION_CATEGORY = {
|
|
35
|
+
PY003: 'exception-handling',
|
|
36
|
+
PY005: 'input-validation',
|
|
37
|
+
PY001: 'async-lifecycle',
|
|
38
|
+
PY006: 'async-lifecycle',
|
|
39
|
+
PY007: 'resource-lifecycle',
|
|
40
|
+
PY008: 'retry-resilience',
|
|
41
|
+
PY009: 'security',
|
|
42
|
+
PY010: 'resource-lifecycle',
|
|
43
|
+
PY011: 'thread-lifecycle',
|
|
44
|
+
PY012: 'async-lifecycle',
|
|
45
|
+
PY013: 'correctness',
|
|
46
|
+
PY014: 'retry-resilience',
|
|
47
|
+
SR001: 'exception-handling',
|
|
48
|
+
SR002: 'data-flow',
|
|
49
|
+
SR003: 'resource-lifecycle',
|
|
50
|
+
SR004: 'input-validation',
|
|
51
|
+
SR009: 'retry-resilience',
|
|
52
|
+
SR010: 'retry-resilience',
|
|
53
|
+
DS001: 'distributed-consistency',
|
|
54
|
+
'potential-secret-default': 'security',
|
|
55
|
+
'potential-secret-high': 'security',
|
|
56
|
+
};
|
|
57
|
+
// ── Suggested prompt hint per category — advisory, never prescriptive ─────────
|
|
58
|
+
const PROMPT_HINT = {
|
|
59
|
+
'exception-handling': 'The finding identifies an exception handling pattern that silently swallows errors. ' +
|
|
60
|
+
'Remediation should ensure exceptions are re-raised or converted to structured error responses.',
|
|
61
|
+
'input-validation': 'The finding identifies a missing input validation boundary. ' +
|
|
62
|
+
'Remediation should add schema validation (e.g., Pydantic model) before processing the input.',
|
|
63
|
+
'async-lifecycle': 'The finding identifies an async pattern that may cause silent failures or event loop blocking. ' +
|
|
64
|
+
'Remediation should ensure async tasks are tracked and exceptions are handled.',
|
|
65
|
+
'resource-lifecycle': 'The finding identifies a resource (session, connection, thread) that may not be properly closed. ' +
|
|
66
|
+
'Remediation should use context managers or explicit cleanup in finally blocks.',
|
|
67
|
+
'thread-lifecycle': 'The finding identifies a thread created without daemon=True or without a stored reference. ' +
|
|
68
|
+
'Remediation should set daemon=True and store the thread reference for join() on shutdown.',
|
|
69
|
+
'retry-resilience': 'The finding identifies a retry pattern without exponential backoff or a thundering-herd risk. ' +
|
|
70
|
+
'Remediation should implement exponential backoff with jitter.',
|
|
71
|
+
'security': 'The finding identifies a security-sensitive pattern (hardcoded credential, unsafe deserialization). ' +
|
|
72
|
+
'Remediation must use environment variables, secret managers, or safe alternatives.',
|
|
73
|
+
'correctness': 'The finding identifies a correctness issue (e.g., mutable default argument). ' +
|
|
74
|
+
'Remediation should follow standard Python idioms to avoid shared mutable state.',
|
|
75
|
+
'distributed-consistency': 'The finding identifies a distributed consistency issue. ' +
|
|
76
|
+
'Remediation should add compensating logic, idempotency, or saga rollback.',
|
|
77
|
+
'data-flow': 'The finding identifies a data flow issue (unbounded collection, leaking state). ' +
|
|
78
|
+
'Remediation should add bounds or explicit cleanup.',
|
|
79
|
+
};
|
|
80
|
+
async function remediateExportCommand(options) {
|
|
81
|
+
const projectRoot = process.cwd();
|
|
82
|
+
const lastVerifyPath = (0, path_1.join)(projectRoot, '.neurcode', 'last-verify-output.json');
|
|
83
|
+
if (!(0, fs_1.existsSync)(lastVerifyPath)) {
|
|
84
|
+
console.error(chalk.red('✗ No verify output found.'));
|
|
85
|
+
console.error(chalk.dim(' Run: neurcode verify --policy-only --json'));
|
|
86
|
+
console.error(chalk.dim(' The last verify output must exist at .neurcode/last-verify-output.json'));
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
let verifyOutput;
|
|
90
|
+
try {
|
|
91
|
+
verifyOutput = JSON.parse((0, fs_1.readFileSync)(lastVerifyPath, 'utf-8'));
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
console.error(chalk.red('✗ Could not parse .neurcode/last-verify-output.json'));
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
// Collect findings from verify output
|
|
98
|
+
const findings = collectFindings(verifyOutput);
|
|
99
|
+
if (findings.length === 0) {
|
|
100
|
+
console.log(chalk.green('✅ No findings in last verify run. Nothing to export.'));
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
// Select which findings to export
|
|
104
|
+
let selected = [];
|
|
105
|
+
if (options.all) {
|
|
106
|
+
selected = findings;
|
|
107
|
+
}
|
|
108
|
+
else if (options.findingIndex !== undefined) {
|
|
109
|
+
const idx = parseInt(options.findingIndex, 10);
|
|
110
|
+
if (isNaN(idx) || idx < 0 || idx >= findings.length) {
|
|
111
|
+
console.error(chalk.red(`✗ --finding-index ${options.findingIndex} out of range. ${findings.length} findings available.`));
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
selected = [findings[idx]];
|
|
115
|
+
}
|
|
116
|
+
else if (options.finding) {
|
|
117
|
+
const found = findings.filter((f) => (f.id ?? f.findingId ?? '') === options.finding ||
|
|
118
|
+
String(f.findingId ?? f.id ?? '').startsWith(options.finding));
|
|
119
|
+
if (found.length === 0) {
|
|
120
|
+
console.error(chalk.red(`✗ Finding "${options.finding}" not found in last verify output.`));
|
|
121
|
+
console.error(chalk.dim(` Available IDs:`));
|
|
122
|
+
findings.slice(0, 10).forEach((f) => console.error(chalk.dim(` ${f.id ?? f.findingId ?? '(no id)'} — ${f.ruleId ?? f.rule ?? '?'} @ ${f.file ?? f.filePath ?? '?'}`)));
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
selected = found;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
// Default: export index 0 with a prompt
|
|
129
|
+
console.log(chalk.dim(`No finding specified. Exporting finding at index 0. Use --finding-index N or --all.\n`));
|
|
130
|
+
selected = [findings[0]];
|
|
131
|
+
}
|
|
132
|
+
const format = options.format ?? 'json';
|
|
133
|
+
const replayChecksum = verifyOutput.replayChecksum ?? null;
|
|
134
|
+
const replayMode = verifyOutput.replayMode ?? null;
|
|
135
|
+
const payloads = selected.map((finding) => buildPayload(finding, verifyOutput, projectRoot, replayChecksum, replayMode, format));
|
|
136
|
+
const output = payloads.length === 1
|
|
137
|
+
? JSON.stringify(format === 'mcp' ? payloads[0].mcpEnvelope : payloads[0], null, 2)
|
|
138
|
+
: JSON.stringify(format === 'mcp' ? payloads.map(p => p.mcpEnvelope) : payloads, null, 2);
|
|
139
|
+
// Write to file or stdout
|
|
140
|
+
if (options.out) {
|
|
141
|
+
const outPath = (0, path_1.resolve)(projectRoot, options.out);
|
|
142
|
+
(0, fs_1.writeFileSync)(outPath, output, 'utf-8');
|
|
143
|
+
console.log(chalk.green(`✅ Remediation export written to ${outPath}`));
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
console.log(output);
|
|
147
|
+
}
|
|
148
|
+
// Copy to clipboard
|
|
149
|
+
if (options.copy) {
|
|
150
|
+
try {
|
|
151
|
+
(0, child_process_1.execSync)('pbcopy', { input: output });
|
|
152
|
+
console.error(chalk.green('\n✅ Remediation payload copied to clipboard.'));
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
console.error(chalk.yellow('\n⚠ --copy failed (pbcopy not available on this system).'));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Print trust boundary reminder
|
|
159
|
+
if (!options.json) {
|
|
160
|
+
console.error(chalk.dim('\n─────────────────────────────────────────────────────────'));
|
|
161
|
+
console.error(chalk.cyan(' Trust Boundary'));
|
|
162
|
+
console.error(chalk.dim(' Neurcode detects. Your AI assistant remediates.'));
|
|
163
|
+
console.error(chalk.dim(' Pass this payload to Cursor, Claude, Codex, or any provider.'));
|
|
164
|
+
console.error(chalk.dim(' Neurcode will re-verify after remediation.'));
|
|
165
|
+
console.error(chalk.dim('─────────────────────────────────────────────────────────\n'));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// ── Builders ──────────────────────────────────────────────────────────────────
|
|
169
|
+
function collectFindings(verifyOutput) {
|
|
170
|
+
// Try multiple possible locations in verify output shape
|
|
171
|
+
const govEnvelope = verifyOutput.governanceVerification?.findings ?? [];
|
|
172
|
+
const violations = verifyOutput.violations ?? [];
|
|
173
|
+
const blockingItems = verifyOutput.blockingItems ?? [];
|
|
174
|
+
const advisoryItems = verifyOutput.advisoryItems ?? [];
|
|
175
|
+
if (govEnvelope.length > 0)
|
|
176
|
+
return govEnvelope;
|
|
177
|
+
return [...violations, ...blockingItems, ...advisoryItems];
|
|
178
|
+
}
|
|
179
|
+
function buildPayload(finding, verifyOutput, projectRoot, replayChecksum, replayMode, format) {
|
|
180
|
+
const ruleId = finding.ruleId ?? finding.rule ?? finding.structuralMetadata?.ruleId ?? 'UNKNOWN';
|
|
181
|
+
const filePath = finding.filePath ?? finding.file ?? finding.evidence?.filePath ?? '';
|
|
182
|
+
const line = finding.line ?? finding.evidence?.line ?? null;
|
|
183
|
+
const column = finding.column ?? finding.evidence?.column ?? null;
|
|
184
|
+
const severity = finding.severity ?? 'BLOCKING';
|
|
185
|
+
const determinismClass = finding.determinismClassification ?? finding.determinism ?? 'deterministic-structural';
|
|
186
|
+
const findingId = finding.id ?? finding.findingId ?? '';
|
|
187
|
+
const ruleName = finding.title ?? finding.ruleName ?? finding.name ?? ruleId;
|
|
188
|
+
const operationalExplanation = finding.operationalImplication ?? finding.message ?? finding.explanation ?? '';
|
|
189
|
+
// Extract code span from file if it exists
|
|
190
|
+
const { codeSpan, surroundingContext } = extractCodeSpan(projectRoot, filePath, line);
|
|
191
|
+
// Deterministic export ID
|
|
192
|
+
const exportId = (0, crypto_1.createHash)('sha256')
|
|
193
|
+
.update(`${findingId}|${filePath}|${line ?? 0}|${ruleId}`)
|
|
194
|
+
.digest('hex')
|
|
195
|
+
.slice(0, 32);
|
|
196
|
+
// Finding graph hash (deterministic over finding identity fields)
|
|
197
|
+
const findingGraphHash = (0, crypto_1.createHash)('sha256')
|
|
198
|
+
.update(`${ruleId}|${filePath}|${line ?? 0}|${severity}|${determinismClass}`)
|
|
199
|
+
.digest('hex')
|
|
200
|
+
.slice(0, 16);
|
|
201
|
+
const remediationCategory = REMEDIATION_CATEGORY[ruleId] ?? 'general';
|
|
202
|
+
const suggestedPromptHint = PROMPT_HINT[remediationCategory] ?? PROMPT_HINT['correctness'];
|
|
203
|
+
const policyViolations = [];
|
|
204
|
+
if (finding.structuralMetadata?.policyRef)
|
|
205
|
+
policyViolations.push(finding.structuralMetadata.policyRef);
|
|
206
|
+
if (finding.policy)
|
|
207
|
+
policyViolations.push(finding.policy);
|
|
208
|
+
const payload = {
|
|
209
|
+
exportId,
|
|
210
|
+
exportedAt: new Date().toISOString(),
|
|
211
|
+
neurcodeVersion: '0.9.66',
|
|
212
|
+
schemaVersion: '2026-05-12',
|
|
213
|
+
findingId,
|
|
214
|
+
ruleId,
|
|
215
|
+
ruleName,
|
|
216
|
+
severity,
|
|
217
|
+
determinismClass,
|
|
218
|
+
filePath,
|
|
219
|
+
line,
|
|
220
|
+
column,
|
|
221
|
+
codeSpan,
|
|
222
|
+
surroundingContext,
|
|
223
|
+
policyViolations,
|
|
224
|
+
operationalExplanation,
|
|
225
|
+
remediationCategory,
|
|
226
|
+
trustBoundaryStatement: TRUST_BOUNDARY_STATEMENT,
|
|
227
|
+
replayChecksum,
|
|
228
|
+
replayMode,
|
|
229
|
+
findingGraphHash,
|
|
230
|
+
provenanceRunId: finding.provenanceMetadata?.planId ?? null,
|
|
231
|
+
provenanceAt: finding.provenanceMetadata?.generatedAt ?? null,
|
|
232
|
+
suggestedPromptHint,
|
|
233
|
+
};
|
|
234
|
+
if (format === 'mcp') {
|
|
235
|
+
payload.mcpEnvelope = {
|
|
236
|
+
type: 'neurcode/remediation-request',
|
|
237
|
+
version: '1.0',
|
|
238
|
+
trust: 'deterministic-governance',
|
|
239
|
+
finding: {
|
|
240
|
+
id: findingId,
|
|
241
|
+
ruleId,
|
|
242
|
+
severity,
|
|
243
|
+
file: filePath,
|
|
244
|
+
line,
|
|
245
|
+
codeSpan,
|
|
246
|
+
},
|
|
247
|
+
context: surroundingContext,
|
|
248
|
+
constraint: TRUST_BOUNDARY_STATEMENT,
|
|
249
|
+
promptHint: suggestedPromptHint,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
return payload;
|
|
253
|
+
}
|
|
254
|
+
function extractCodeSpan(projectRoot, filePath, line) {
|
|
255
|
+
if (!filePath || line === null) {
|
|
256
|
+
return { codeSpan: '(file or line not available)', surroundingContext: '' };
|
|
257
|
+
}
|
|
258
|
+
const fullPath = (0, path_1.resolve)(projectRoot, filePath);
|
|
259
|
+
if (!(0, fs_1.existsSync)(fullPath)) {
|
|
260
|
+
return { codeSpan: `(file not found: ${filePath})`, surroundingContext: '' };
|
|
261
|
+
}
|
|
262
|
+
try {
|
|
263
|
+
const content = (0, fs_1.readFileSync)(fullPath, 'utf-8');
|
|
264
|
+
const lines = content.split('\n');
|
|
265
|
+
const zeroIdx = line - 1;
|
|
266
|
+
const targetLine = lines[zeroIdx] ?? '';
|
|
267
|
+
const contextStart = Math.max(0, zeroIdx - 5);
|
|
268
|
+
const contextEnd = Math.min(lines.length - 1, zeroIdx + 5);
|
|
269
|
+
const contextLines = [];
|
|
270
|
+
for (let i = contextStart; i <= contextEnd; i++) {
|
|
271
|
+
const prefix = i === zeroIdx ? '→ ' : ' ';
|
|
272
|
+
contextLines.push(`${String(i + 1).padStart(4)} ${prefix}${lines[i]}`);
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
codeSpan: targetLine.trim(),
|
|
276
|
+
surroundingContext: contextLines.join('\n'),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
return { codeSpan: '(could not read file)', surroundingContext: '' };
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=remediate-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remediate-export.js","sourceRoot":"","sources":["../../src/commands/remediate-export.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;AAuJH,wDAoGC;AAzPD,2BAA6D;AAC7D,+BAAqC;AACrC,mCAAoC;AACpC,iDAAyC;AACzC,gDAA8C;AAE9C,MAAM,KAAK,GAAG,IAAA,oBAAS,GAAE,CAAC;AAE1B,gFAAgF;AAChF,MAAM,wBAAwB,GAC5B,kDAAkD;IACl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AAI,EAAE;YAC3B,kBAAkB,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;SAC5C,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC;IACvE,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqJH,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mGAAmG;IACnG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kGAAkG;IAClG,eAAe,CAAC,EAAE,OAAO,CAAC;I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