@nerviq/cli 0.0.1 → 0.9.0-beta.2
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/CHANGELOG.md +181 -0
- package/LICENSE +21 -0
- package/README.md +447 -0
- package/bin/cli.js +749 -0
- package/content/case-study-template.md +91 -0
- package/content/claims-governance.md +37 -0
- package/content/claude-code/audit-repo/SKILL.md +20 -0
- package/content/claude-native-integration.md +60 -0
- package/content/devto-article.json +9 -0
- package/content/launch-posts.md +226 -0
- package/content/pilot-rollout-kit.md +30 -0
- package/content/release-checklist.md +31 -0
- package/package.json +53 -4
- package/src/activity.js +529 -0
- package/src/aider/activity.js +226 -0
- package/src/aider/config-parser.js +166 -0
- package/src/aider/context.js +158 -0
- package/src/aider/deep-review.js +316 -0
- package/src/aider/domain-packs.js +278 -0
- package/src/aider/freshness.js +168 -0
- package/src/aider/governance.js +253 -0
- package/src/aider/interactive.js +334 -0
- package/src/aider/mcp-packs.js +98 -0
- package/src/aider/patch.js +214 -0
- package/src/aider/plans.js +186 -0
- package/src/aider/premium.js +360 -0
- package/src/aider/setup.js +404 -0
- package/src/aider/techniques.js +1323 -0
- package/src/analyze.js +821 -0
- package/src/audit.js +1003 -0
- package/src/badge.js +13 -0
- package/src/benchmark.js +339 -0
- package/src/claudex-sync.json +7 -0
- package/src/codex/activity.js +324 -0
- package/src/codex/config-parser.js +183 -0
- package/src/codex/context.js +221 -0
- package/src/codex/deep-review.js +493 -0
- package/src/codex/domain-packs.js +372 -0
- package/src/codex/freshness.js +167 -0
- package/src/codex/governance.js +192 -0
- package/src/codex/interactive.js +618 -0
- package/src/codex/mcp-packs.js +660 -0
- package/src/codex/patch.js +209 -0
- package/src/codex/plans.js +251 -0
- package/src/codex/premium.js +614 -0
- package/src/codex/setup.js +603 -0
- package/src/codex/techniques.js +2649 -0
- package/src/context.js +272 -0
- package/src/copilot/activity.js +309 -0
- package/src/copilot/config-parser.js +226 -0
- package/src/copilot/context.js +197 -0
- package/src/copilot/deep-review.js +346 -0
- package/src/copilot/domain-packs.js +350 -0
- package/src/copilot/freshness.js +197 -0
- package/src/copilot/governance.js +222 -0
- package/src/copilot/interactive.js +406 -0
- package/src/copilot/mcp-packs.js +572 -0
- package/src/copilot/patch.js +238 -0
- package/src/copilot/plans.js +253 -0
- package/src/copilot/premium.js +450 -0
- package/src/copilot/setup.js +488 -0
- package/src/copilot/techniques.js +1822 -0
- package/src/cursor/activity.js +301 -0
- package/src/cursor/config-parser.js +265 -0
- package/src/cursor/context.js +236 -0
- package/src/cursor/deep-review.js +334 -0
- package/src/cursor/domain-packs.js +346 -0
- package/src/cursor/freshness.js +214 -0
- package/src/cursor/governance.js +229 -0
- package/src/cursor/interactive.js +391 -0
- package/src/cursor/mcp-packs.js +571 -0
- package/src/cursor/patch.js +243 -0
- package/src/cursor/plans.js +254 -0
- package/src/cursor/premium.js +468 -0
- package/src/cursor/setup.js +488 -0
- package/src/cursor/techniques.js +1786 -0
- package/src/deep-review.js +345 -0
- package/src/domain-packs.js +364 -0
- package/src/formatters/sarif.js +115 -0
- package/src/gemini/activity.js +402 -0
- package/src/gemini/config-parser.js +275 -0
- package/src/gemini/context.js +221 -0
- package/src/gemini/deep-review.js +559 -0
- package/src/gemini/domain-packs.js +371 -0
- package/src/gemini/freshness.js +204 -0
- package/src/gemini/governance.js +201 -0
- package/src/gemini/interactive.js +860 -0
- package/src/gemini/mcp-packs.js +658 -0
- package/src/gemini/patch.js +229 -0
- package/src/gemini/plans.js +269 -0
- package/src/gemini/premium.js +759 -0
- package/src/gemini/setup.js +692 -0
- package/src/gemini/techniques.js +2084 -0
- package/src/governance.js +523 -0
- package/src/harmony/advisor.js +383 -0
- package/src/harmony/audit.js +303 -0
- package/src/harmony/canon.js +444 -0
- package/src/harmony/cli.js +331 -0
- package/src/harmony/drift.js +401 -0
- package/src/harmony/governance.js +313 -0
- package/src/harmony/memory.js +238 -0
- package/src/harmony/sync.js +458 -0
- package/src/harmony/watch.js +336 -0
- package/src/index.js +256 -0
- package/src/insights.js +119 -0
- package/src/interactive.js +118 -0
- package/src/mcp-packs.js +597 -0
- package/src/opencode/activity.js +286 -0
- package/src/opencode/config-parser.js +109 -0
- package/src/opencode/context.js +247 -0
- package/src/opencode/deep-review.js +313 -0
- package/src/opencode/domain-packs.js +240 -0
- package/src/opencode/freshness.js +158 -0
- package/src/opencode/governance.js +159 -0
- package/src/opencode/interactive.js +392 -0
- package/src/opencode/mcp-packs.js +474 -0
- package/src/opencode/patch.js +184 -0
- package/src/opencode/plans.js +231 -0
- package/src/opencode/premium.js +413 -0
- package/src/opencode/setup.js +449 -0
- package/src/opencode/techniques.js +1713 -0
- package/src/plans.js +655 -0
- package/src/secret-patterns.js +30 -0
- package/src/setup.js +1274 -0
- package/src/synergy/adaptive.js +261 -0
- package/src/synergy/compensation.js +156 -0
- package/src/synergy/evidence.js +193 -0
- package/src/synergy/learning.js +184 -0
- package/src/synergy/patterns.js +227 -0
- package/src/synergy/ranking.js +83 -0
- package/src/synergy/report.js +163 -0
- package/src/synergy/routing.js +152 -0
- package/src/techniques.js +1354 -0
- package/src/watch.js +229 -0
- package/src/windsurf/activity.js +302 -0
- package/src/windsurf/config-parser.js +267 -0
- package/src/windsurf/context.js +249 -0
- package/src/windsurf/deep-review.js +337 -0
- package/src/windsurf/domain-packs.js +348 -0
- package/src/windsurf/freshness.js +215 -0
- package/src/windsurf/governance.js +231 -0
- package/src/windsurf/interactive.js +388 -0
- package/src/windsurf/mcp-packs.js +535 -0
- package/src/windsurf/patch.js +231 -0
- package/src/windsurf/plans.js +247 -0
- package/src/windsurf/premium.js +467 -0
- package/src/windsurf/setup.js +471 -0
- package/src/windsurf/techniques.js +1758 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
const { GEMINI_DOMAIN_PACKS } = require('./domain-packs');
|
|
2
|
+
const { GEMINI_MCP_PACKS } = require('./mcp-packs');
|
|
3
|
+
|
|
4
|
+
const GEMINI_PERMISSION_PROFILES = [
|
|
5
|
+
{
|
|
6
|
+
key: 'locked-down',
|
|
7
|
+
label: 'Locked Down',
|
|
8
|
+
risk: 'low',
|
|
9
|
+
defaultSandbox: 'restricted',
|
|
10
|
+
approvalPolicy: 'always-confirm',
|
|
11
|
+
useWhen: 'First contact with a repo, security review, or regulated environments.',
|
|
12
|
+
behavior: 'No writes, explicit confirmation for anything outside read-only operations.',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: 'normal',
|
|
16
|
+
label: 'Normal',
|
|
17
|
+
risk: 'medium',
|
|
18
|
+
defaultSandbox: 'sandbox-enabled',
|
|
19
|
+
approvalPolicy: 'prompt-on-write',
|
|
20
|
+
useWhen: 'Default product work where Gemini CLI edits locally but risky commands still need review.',
|
|
21
|
+
behavior: 'Balanced baseline for normal repo work with sandbox protection.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: 'auto-edit',
|
|
25
|
+
label: 'Auto Edit',
|
|
26
|
+
risk: 'medium',
|
|
27
|
+
defaultSandbox: 'sandbox-enabled',
|
|
28
|
+
approvalPolicy: 'auto-approve-edits',
|
|
29
|
+
useWhen: 'Trusted repos where file edits are pre-approved but shell commands still require confirmation.',
|
|
30
|
+
behavior: 'Auto-approves file writes but prompts for shell execution and network access.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'yolo',
|
|
34
|
+
label: 'YOLO',
|
|
35
|
+
risk: 'critical',
|
|
36
|
+
defaultSandbox: 'disabled',
|
|
37
|
+
approvalPolicy: 'never',
|
|
38
|
+
useWhen: 'Exceptional internal debugging or fully sandboxed external environments only.',
|
|
39
|
+
behavior: 'Bypasses ALL confirmation prompts. --yolo flag. Extremely dangerous in production repos. Should never be the product default.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: 'sandboxed',
|
|
43
|
+
label: 'Sandboxed',
|
|
44
|
+
risk: 'low',
|
|
45
|
+
defaultSandbox: 'strict-sandbox',
|
|
46
|
+
approvalPolicy: 'prompt-on-escape',
|
|
47
|
+
useWhen: 'Repos requiring strict filesystem isolation with explicit sandbox escape approval.',
|
|
48
|
+
behavior: 'All operations run in sandbox. Any escape from sandbox requires explicit user approval.',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: 'ci-headless',
|
|
52
|
+
label: 'CI Headless',
|
|
53
|
+
risk: 'high',
|
|
54
|
+
defaultSandbox: 'sandbox-enabled',
|
|
55
|
+
approvalPolicy: 'never',
|
|
56
|
+
useWhen: 'GitHub Actions, CI pipelines, or scheduled automation where the outer CI environment provides containment.',
|
|
57
|
+
behavior: 'No prompts. Designed for CI contexts with CI_* environment variables. Requires GEMINI_API_KEY, not user credentials.',
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const GEMINI_HOOK_REGISTRY = [
|
|
62
|
+
{
|
|
63
|
+
key: 'before-tool',
|
|
64
|
+
file: '.gemini/settings.json',
|
|
65
|
+
triggerPoint: 'BeforeTool',
|
|
66
|
+
matcher: 'tool events',
|
|
67
|
+
purpose: 'Pre-flight validation before tool execution.',
|
|
68
|
+
risk: 'medium',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'after-tool',
|
|
72
|
+
file: '.gemini/settings.json',
|
|
73
|
+
triggerPoint: 'AfterTool',
|
|
74
|
+
matcher: 'tool events',
|
|
75
|
+
purpose: 'Post-execution checks and guardrails after tool commands complete.',
|
|
76
|
+
risk: 'medium',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: 'after-tool-scrub',
|
|
80
|
+
file: '.gemini/settings.json',
|
|
81
|
+
triggerPoint: 'AfterTool',
|
|
82
|
+
matcher: 'sensitive output patterns',
|
|
83
|
+
purpose: 'Scrub sensitive data (secrets, tokens, PII) from tool output before it reaches the model context. Gemini-unique hook variant.',
|
|
84
|
+
risk: 'medium',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'session-start',
|
|
88
|
+
file: '.gemini/settings.json',
|
|
89
|
+
triggerPoint: 'SessionStart',
|
|
90
|
+
matcher: null,
|
|
91
|
+
purpose: 'Bootstrap local context, load policies, or set guardrails at session start.',
|
|
92
|
+
risk: 'low',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: 'session-end',
|
|
96
|
+
file: '.gemini/settings.json',
|
|
97
|
+
triggerPoint: 'SessionEnd',
|
|
98
|
+
matcher: null,
|
|
99
|
+
purpose: 'Clean up resources, log session outcomes, or export metrics when Gemini CLI exits.',
|
|
100
|
+
risk: 'low',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: 'user-prompt-submit',
|
|
104
|
+
file: '.gemini/settings.json',
|
|
105
|
+
triggerPoint: 'UserPromptSubmit',
|
|
106
|
+
matcher: null,
|
|
107
|
+
purpose: 'Validate or transform user prompts before they reach the model.',
|
|
108
|
+
risk: 'low',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: 'policy-enforce',
|
|
112
|
+
file: '.gemini/settings.json',
|
|
113
|
+
triggerPoint: 'PolicyEnforce',
|
|
114
|
+
matcher: 'policy rule violations',
|
|
115
|
+
purpose: 'Enforce policy TOML rules before allowing operations. Gemini-unique hook for declarative governance.',
|
|
116
|
+
risk: 'medium',
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
const GEMINI_POLICY_PACKS = [
|
|
121
|
+
{
|
|
122
|
+
key: 'baseline-safe',
|
|
123
|
+
label: 'Baseline Safe',
|
|
124
|
+
modules: ['GEMINI.md baseline', 'safe settings.json', 'sandbox enabled', 'yolo disabled'],
|
|
125
|
+
useWhen: 'Default local Gemini CLI rollout.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: 'sandbox-enforced',
|
|
129
|
+
label: 'Sandbox Enforced',
|
|
130
|
+
modules: ['strict sandbox mode', 'filesystem isolation', 'escape approval required', 'blocked paths list'],
|
|
131
|
+
useWhen: 'Repos requiring strict filesystem boundaries with no implicit sandbox escapes. Gemini-unique policy pack.',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
key: 'policy-governed',
|
|
135
|
+
label: 'Policy Governed',
|
|
136
|
+
modules: ['policy TOML files active', 'PolicyEnforce hook enabled', 'declarative rule engine', 'audit trail for violations'],
|
|
137
|
+
useWhen: 'Repos using Gemini CLI declarative policy system for governance. Gemini-unique policy pack.',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: 'automation-reviewed',
|
|
141
|
+
label: 'Automation Reviewed',
|
|
142
|
+
modules: ['safe GitHub Action strategy', 'managed GEMINI_API_KEY', 'CI_* env detection', 'manual test note'],
|
|
143
|
+
useWhen: 'Repos adding Gemini CLI workflows in CI or scheduled automation.',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: 'enterprise-strict',
|
|
147
|
+
label: 'Enterprise Strict',
|
|
148
|
+
modules: ['locked-down profile', 'audit trail', 'explicit governance export', 'compliance-safe settings', 'policy-governed enforcement'],
|
|
149
|
+
useWhen: 'Regulated or compliance-sensitive repos where every Gemini CLI action must be auditable.',
|
|
150
|
+
},
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
const GEMINI_PILOT_ROLLOUT_KIT = {
|
|
154
|
+
recommendedScope: [
|
|
155
|
+
'Start with audit and setup on one trusted repo before enabling automation.',
|
|
156
|
+
'Keep GEMINI.md and settings.json in version control so Gemini CLI behavior is reviewable.',
|
|
157
|
+
'Use workflow_dispatch or manual dry runs before schedules or CI tasks.',
|
|
158
|
+
'Never use --yolo in production without external sandbox containment.',
|
|
159
|
+
],
|
|
160
|
+
approvals: [
|
|
161
|
+
'Engineering owner approves sandbox mode and approval policy.',
|
|
162
|
+
'Security owner approves any CI, automation, or --yolo posture.',
|
|
163
|
+
'Pilot owner records before/after audit deltas and rollback expectations.',
|
|
164
|
+
'Policy files (.gemini/policy/) require review like code changes.',
|
|
165
|
+
],
|
|
166
|
+
successMetrics: [
|
|
167
|
+
'Audit score delta',
|
|
168
|
+
'Settings explicitness delta',
|
|
169
|
+
'Time to first useful Gemini CLI task',
|
|
170
|
+
'No-overwrite rate on existing repo files',
|
|
171
|
+
'Policy violation detection rate',
|
|
172
|
+
],
|
|
173
|
+
rollbackExpectations: [
|
|
174
|
+
'Every Gemini CLI setup/apply write path should emit a rollback artifact.',
|
|
175
|
+
'Re-run audit after rollback to confirm the repo returned to the expected state.',
|
|
176
|
+
'Policy files can be removed to revert governance without affecting other config.',
|
|
177
|
+
],
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
function getGeminiGovernanceSummary() {
|
|
181
|
+
return {
|
|
182
|
+
platform: 'gemini',
|
|
183
|
+
platformLabel: 'Gemini CLI',
|
|
184
|
+
permissionProfiles: GEMINI_PERMISSION_PROFILES,
|
|
185
|
+
hookRegistry: GEMINI_HOOK_REGISTRY,
|
|
186
|
+
policyPacks: GEMINI_POLICY_PACKS,
|
|
187
|
+
domainPacks: GEMINI_DOMAIN_PACKS,
|
|
188
|
+
mcpPacks: GEMINI_MCP_PACKS,
|
|
189
|
+
pilotRolloutKit: GEMINI_PILOT_ROLLOUT_KIT,
|
|
190
|
+
platformCaveats: [
|
|
191
|
+
'The --yolo flag bypasses ALL confirmation prompts and is a critical risk if used outside a fully sandboxed environment.',
|
|
192
|
+
'Code deletion bug: Gemini CLI may delete files unexpectedly during refactors — always review diffs before confirming.',
|
|
193
|
+
'Rate limiting: Gemini API has per-minute and per-day rate limits that can interrupt long automation chains.',
|
|
194
|
+
'CI_* environment variables change Gemini CLI behavior — ensure CI contexts use ci-headless profile explicitly.',
|
|
195
|
+
],
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
module.exports = {
|
|
200
|
+
getGeminiGovernanceSummary,
|
|
201
|
+
};
|