@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,192 @@
|
|
|
1
|
+
const { CODEX_DOMAIN_PACKS } = require('./domain-packs');
|
|
2
|
+
const { CODEX_MCP_PACKS } = require('./mcp-packs');
|
|
3
|
+
|
|
4
|
+
const CODEX_PERMISSION_PROFILES = [
|
|
5
|
+
{
|
|
6
|
+
key: 'locked-down',
|
|
7
|
+
label: 'Locked Down',
|
|
8
|
+
risk: 'low',
|
|
9
|
+
defaultSandbox: 'read-only',
|
|
10
|
+
approvalPolicy: 'untrusted',
|
|
11
|
+
useWhen: 'First contact with a repo, security review, or regulated environments.',
|
|
12
|
+
behavior: 'No writes, explicit escalation for anything outside trusted commands.',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: 'standard',
|
|
16
|
+
label: 'Standard',
|
|
17
|
+
risk: 'medium',
|
|
18
|
+
defaultSandbox: 'workspace-write',
|
|
19
|
+
approvalPolicy: 'on-request',
|
|
20
|
+
useWhen: 'Default product work where Codex edits locally but risky commands still need review.',
|
|
21
|
+
behavior: 'Balanced baseline for normal repo work.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: 'full-auto',
|
|
25
|
+
label: 'Full Auto',
|
|
26
|
+
risk: 'high',
|
|
27
|
+
defaultSandbox: 'workspace-write',
|
|
28
|
+
approvalPolicy: 'never',
|
|
29
|
+
useWhen: 'Externally sandboxed automation only, with strong repo guardrails.',
|
|
30
|
+
behavior: 'No approval prompts. Suitable only when the outer environment is controlled.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'unrestricted',
|
|
34
|
+
label: 'Unrestricted',
|
|
35
|
+
risk: 'critical',
|
|
36
|
+
defaultSandbox: 'danger-full-access',
|
|
37
|
+
approvalPolicy: 'never',
|
|
38
|
+
useWhen: 'Exceptional internal debugging only.',
|
|
39
|
+
behavior: 'Bypasses core safety boundaries and should never be the product default.',
|
|
40
|
+
},
|
|
41
|
+
// CP-10: New profile for CI/automation
|
|
42
|
+
{
|
|
43
|
+
key: 'ci-automation',
|
|
44
|
+
label: 'CI Automation',
|
|
45
|
+
risk: 'high',
|
|
46
|
+
defaultSandbox: 'workspace-write',
|
|
47
|
+
approvalPolicy: 'never',
|
|
48
|
+
useWhen: 'GitHub Actions, `codex exec`, or scheduled automation where the outer CI environment provides containment.',
|
|
49
|
+
behavior: 'No prompts. Designed for `codex exec` and GitHub Action contexts. Requires CODEX_API_KEY, not user credentials.',
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const CODEX_HOOK_REGISTRY = [
|
|
54
|
+
{
|
|
55
|
+
key: 'session-start',
|
|
56
|
+
file: '.codex/hooks.json',
|
|
57
|
+
triggerPoint: 'SessionStart',
|
|
58
|
+
matcher: null,
|
|
59
|
+
purpose: 'Bootstrap local context or guardrails at session start when hooks are supported.',
|
|
60
|
+
risk: 'low',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: 'pre-tool-use',
|
|
64
|
+
file: '.codex/hooks.json',
|
|
65
|
+
triggerPoint: 'PreToolUse',
|
|
66
|
+
matcher: 'shell or tool events',
|
|
67
|
+
purpose: 'Pre-flight validation before risky work.',
|
|
68
|
+
risk: 'medium',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'post-tool-use',
|
|
72
|
+
file: '.codex/hooks.json',
|
|
73
|
+
triggerPoint: 'PostToolUse',
|
|
74
|
+
matcher: 'shell or tool events',
|
|
75
|
+
purpose: 'Post-edit checks and guardrails after commands complete.',
|
|
76
|
+
risk: 'medium',
|
|
77
|
+
},
|
|
78
|
+
// CP-10: Expanded hook registry
|
|
79
|
+
{
|
|
80
|
+
key: 'user-prompt-submit',
|
|
81
|
+
file: '.codex/hooks.json',
|
|
82
|
+
triggerPoint: 'UserPromptSubmit',
|
|
83
|
+
matcher: null,
|
|
84
|
+
purpose: 'Validate or transform user prompts before they reach the model.',
|
|
85
|
+
risk: 'low',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: 'stop',
|
|
89
|
+
file: '.codex/hooks.json',
|
|
90
|
+
triggerPoint: 'Stop',
|
|
91
|
+
matcher: null,
|
|
92
|
+
purpose: 'Clean up resources or log session outcomes when Codex exits.',
|
|
93
|
+
risk: 'low',
|
|
94
|
+
},
|
|
95
|
+
// Parity hooks to match Claude's 7
|
|
96
|
+
{
|
|
97
|
+
key: 'injection-defense',
|
|
98
|
+
file: '.codex/hooks.json',
|
|
99
|
+
triggerPoint: 'PreToolUse',
|
|
100
|
+
matcher: 'fetch or web events',
|
|
101
|
+
purpose: 'Validate external content for prompt injection before processing.',
|
|
102
|
+
risk: 'medium',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: 'trust-drift-check',
|
|
106
|
+
file: '.codex/hooks.json',
|
|
107
|
+
triggerPoint: 'PostToolUse',
|
|
108
|
+
matcher: 'config or agents file changes',
|
|
109
|
+
purpose: 'Detect config/instruction drift after tool edits that touch trust surfaces.',
|
|
110
|
+
risk: 'medium',
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
const CODEX_POLICY_PACKS = [
|
|
115
|
+
{
|
|
116
|
+
key: 'baseline-safe',
|
|
117
|
+
label: 'Baseline Safe',
|
|
118
|
+
modules: ['AGENTS.md baseline', 'safe profile', 'network explicit', 'history explicit'],
|
|
119
|
+
useWhen: 'Default local Codex rollout.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: 'automation-reviewed',
|
|
123
|
+
label: 'Automation Reviewed',
|
|
124
|
+
modules: ['safe GitHub Action strategy', 'managed CODEX_API_KEY', 'manual test note'],
|
|
125
|
+
useWhen: 'Repos adding Codex workflows in CI or scheduled automation.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: 'skills-and-subagents',
|
|
129
|
+
label: 'Skills + Subagents',
|
|
130
|
+
modules: ['repo-local skills', 'custom agent field validation', 'fanout limits'],
|
|
131
|
+
useWhen: 'Teams that want structured Codex specialization without losing governance.',
|
|
132
|
+
},
|
|
133
|
+
// CP-10: New policy packs
|
|
134
|
+
{
|
|
135
|
+
key: 'cloud-automation',
|
|
136
|
+
label: 'Cloud Automation',
|
|
137
|
+
modules: ['ci-automation profile', 'CODEX_API_KEY auth', 'exec safety review', 'cloud trust boundary'],
|
|
138
|
+
useWhen: 'Repos deploying Codex in CI/CD, cloud tasks, or scheduled automation.',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
key: 'enterprise-strict',
|
|
142
|
+
label: 'Enterprise Strict',
|
|
143
|
+
modules: ['locked-down profile', 'audit trail', 'explicit governance export', 'compliance-safe history settings'],
|
|
144
|
+
useWhen: 'Regulated or compliance-sensitive repos where every Codex action must be auditable.',
|
|
145
|
+
},
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
const CODEX_PILOT_ROLLOUT_KIT = {
|
|
149
|
+
recommendedScope: [
|
|
150
|
+
'Start with audit and setup on one trusted repo before enabling automation.',
|
|
151
|
+
'Keep AGENTS.md and config.toml in version control so Codex behavior is reviewable.',
|
|
152
|
+
'Use workflow_dispatch or manual dry runs before schedules or cloud tasks.',
|
|
153
|
+
],
|
|
154
|
+
approvals: [
|
|
155
|
+
'Engineering owner approves approval_policy and sandbox_mode.',
|
|
156
|
+
'Security owner approves any CI, cloud, or full-auto posture.',
|
|
157
|
+
'Pilot owner records before/after audit deltas and rollback expectations.',
|
|
158
|
+
],
|
|
159
|
+
successMetrics: [
|
|
160
|
+
'Audit score delta',
|
|
161
|
+
'Config explicitness delta',
|
|
162
|
+
'Time to first useful Codex task',
|
|
163
|
+
'No-overwrite rate on existing repo files',
|
|
164
|
+
],
|
|
165
|
+
rollbackExpectations: [
|
|
166
|
+
'Every Codex setup/apply write path should emit a rollback artifact.',
|
|
167
|
+
'Treat hooks on Windows as unsupported and move enforcement to CI.',
|
|
168
|
+
'Re-run audit after rollback to confirm the repo returned to the expected state.',
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
function getCodexGovernanceSummary() {
|
|
173
|
+
return {
|
|
174
|
+
platform: 'codex',
|
|
175
|
+
platformLabel: 'Codex',
|
|
176
|
+
permissionProfiles: CODEX_PERMISSION_PROFILES,
|
|
177
|
+
hookRegistry: CODEX_HOOK_REGISTRY,
|
|
178
|
+
policyPacks: CODEX_POLICY_PACKS,
|
|
179
|
+
domainPacks: CODEX_DOMAIN_PACKS,
|
|
180
|
+
mcpPacks: CODEX_MCP_PACKS,
|
|
181
|
+
pilotRolloutKit: CODEX_PILOT_ROLLOUT_KIT,
|
|
182
|
+
platformCaveats: [
|
|
183
|
+
'Hooks are not enforced on Windows today.',
|
|
184
|
+
'agents.max_threads defaults high enough to deserve an explicit cap.',
|
|
185
|
+
'Cloud tasks have a different trust class than local CLI work.',
|
|
186
|
+
],
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
module.exports = {
|
|
191
|
+
getCodexGovernanceSummary,
|
|
192
|
+
};
|