@nerviq/cli 1.20.0 → 1.21.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.
Files changed (185) hide show
  1. package/LICENSE +23 -23
  2. package/README.md +2 -2
  3. package/bin/cli.js +1 -0
  4. package/package.json +2 -1
  5. package/src/activity.js +1039 -1039
  6. package/src/adoption-advisor.js +299 -299
  7. package/src/aider/config-parser.js +166 -166
  8. package/src/aider/context.js +6 -2
  9. package/src/aider/deep-review.js +316 -316
  10. package/src/aider/domain-packs.js +303 -303
  11. package/src/aider/freshness.js +93 -93
  12. package/src/aider/governance.js +253 -253
  13. package/src/aider/interactive.js +334 -334
  14. package/src/aider/mcp-packs.js +329 -329
  15. package/src/aider/patch.js +214 -214
  16. package/src/aider/plans.js +186 -186
  17. package/src/aider/premium.js +360 -360
  18. package/src/aider/setup.js +404 -404
  19. package/src/aider/techniques.js +312 -67
  20. package/src/analyze.js +951 -951
  21. package/src/anti-patterns.js +485 -485
  22. package/src/audit/instruction-files.js +180 -180
  23. package/src/audit/recommendations.js +577 -577
  24. package/src/auto-suggest.js +154 -154
  25. package/src/badge.js +13 -13
  26. package/src/behavioral-drift.js +801 -801
  27. package/src/benchmark.js +67 -67
  28. package/src/catalog.js +103 -103
  29. package/src/certification.js +128 -128
  30. package/src/codex/config-parser.js +183 -183
  31. package/src/codex/context.js +223 -223
  32. package/src/codex/deep-review.js +493 -493
  33. package/src/codex/domain-packs.js +394 -394
  34. package/src/codex/freshness.js +84 -84
  35. package/src/codex/governance.js +192 -192
  36. package/src/codex/interactive.js +618 -618
  37. package/src/codex/mcp-packs.js +914 -914
  38. package/src/codex/patch.js +209 -209
  39. package/src/codex/plans.js +251 -251
  40. package/src/codex/premium.js +614 -614
  41. package/src/codex/setup.js +591 -591
  42. package/src/context.js +10 -4
  43. package/src/continuous-ops.js +681 -681
  44. package/src/copilot/activity.js +309 -309
  45. package/src/copilot/deep-review.js +346 -346
  46. package/src/copilot/domain-packs.js +372 -372
  47. package/src/copilot/freshness.js +57 -57
  48. package/src/copilot/governance.js +222 -222
  49. package/src/copilot/interactive.js +406 -406
  50. package/src/copilot/mcp-packs.js +826 -826
  51. package/src/copilot/plans.js +253 -253
  52. package/src/copilot/premium.js +451 -451
  53. package/src/copilot/setup.js +488 -488
  54. package/src/cost-tracking.js +61 -61
  55. package/src/cursor/activity.js +301 -301
  56. package/src/cursor/config-parser.js +265 -265
  57. package/src/cursor/context.js +256 -256
  58. package/src/cursor/deep-review.js +334 -334
  59. package/src/cursor/domain-packs.js +368 -368
  60. package/src/cursor/freshness.js +65 -65
  61. package/src/cursor/governance.js +229 -229
  62. package/src/cursor/interactive.js +391 -391
  63. package/src/cursor/mcp-packs.js +828 -828
  64. package/src/cursor/plans.js +254 -254
  65. package/src/cursor/premium.js +469 -469
  66. package/src/cursor/setup.js +488 -488
  67. package/src/dashboard.js +493 -493
  68. package/src/deep-review.js +428 -428
  69. package/src/deprecation.js +98 -98
  70. package/src/diff-only.js +280 -280
  71. package/src/doctor.js +119 -119
  72. package/src/domain-pack-expansion.js +1033 -1033
  73. package/src/domain-packs.js +387 -387
  74. package/src/feedback.js +178 -178
  75. package/src/fix-engine.js +783 -783
  76. package/src/fix-prompts.js +122 -122
  77. package/src/formatters/sarif.js +115 -115
  78. package/src/freshness.js +74 -74
  79. package/src/gemini/config-parser.js +275 -275
  80. package/src/gemini/deep-review.js +559 -559
  81. package/src/gemini/domain-packs.js +393 -393
  82. package/src/gemini/freshness.js +66 -66
  83. package/src/gemini/governance.js +201 -201
  84. package/src/gemini/interactive.js +860 -860
  85. package/src/gemini/mcp-packs.js +915 -915
  86. package/src/gemini/plans.js +269 -269
  87. package/src/gemini/premium.js +760 -760
  88. package/src/gemini/setup.js +692 -692
  89. package/src/governance.js +72 -72
  90. package/src/harmony/add.js +68 -68
  91. package/src/harmony/advisor.js +333 -333
  92. package/src/harmony/canon.js +565 -565
  93. package/src/harmony/cli.js +591 -591
  94. package/src/harmony/drift.js +401 -401
  95. package/src/harmony/governance.js +313 -313
  96. package/src/harmony/memory.js +239 -239
  97. package/src/harmony/sync.js +475 -475
  98. package/src/harmony/watch.js +370 -370
  99. package/src/hook-validation.js +342 -342
  100. package/src/index.js +271 -271
  101. package/src/init.js +184 -184
  102. package/src/instruction-surfaces.js +185 -185
  103. package/src/integrations.js +144 -144
  104. package/src/interactive.js +118 -118
  105. package/src/locales/en.json +1 -1
  106. package/src/locales/es.json +1 -1
  107. package/src/mcp-packs.js +830 -830
  108. package/src/mcp-server.js +726 -726
  109. package/src/mcp-validation.js +337 -337
  110. package/src/nerviq-sync.json +7 -7
  111. package/src/opencode/config-parser.js +109 -109
  112. package/src/opencode/context.js +247 -247
  113. package/src/opencode/deep-review.js +313 -313
  114. package/src/opencode/domain-packs.js +262 -262
  115. package/src/opencode/freshness.js +66 -66
  116. package/src/opencode/governance.js +159 -159
  117. package/src/opencode/interactive.js +392 -392
  118. package/src/opencode/mcp-packs.js +705 -705
  119. package/src/opencode/patch.js +184 -184
  120. package/src/opencode/plans.js +231 -231
  121. package/src/opencode/premium.js +413 -413
  122. package/src/opencode/setup.js +449 -449
  123. package/src/opencode/techniques.js +27 -27
  124. package/src/operating-profile.js +574 -574
  125. package/src/org.js +152 -152
  126. package/src/permission-rules.js +218 -218
  127. package/src/plans.js +839 -839
  128. package/src/platform-change-manifest.js +86 -86
  129. package/src/plugins.js +110 -110
  130. package/src/policy-layers.js +210 -210
  131. package/src/profiles.js +124 -124
  132. package/src/prompt-injection.js +74 -74
  133. package/src/public-api.js +173 -173
  134. package/src/recommendation-rules.js +84 -84
  135. package/src/repo-archetype.js +386 -386
  136. package/src/secret-patterns.js +39 -39
  137. package/src/server.js +527 -527
  138. package/src/setup/analysis.js +607 -607
  139. package/src/setup/runtime.js +172 -172
  140. package/src/setup.js +677 -677
  141. package/src/shared/capabilities.js +194 -194
  142. package/src/source-urls.js +132 -132
  143. package/src/stack-checks.js +565 -565
  144. package/src/supplemental-checks.js +13 -13
  145. package/src/synergy/adaptive.js +261 -261
  146. package/src/synergy/compensation.js +137 -137
  147. package/src/synergy/evidence.js +193 -193
  148. package/src/synergy/learning.js +199 -199
  149. package/src/synergy/patterns.js +227 -227
  150. package/src/synergy/ranking.js +83 -83
  151. package/src/synergy/report.js +165 -165
  152. package/src/synergy/routing.js +146 -146
  153. package/src/techniques/api.js +407 -407
  154. package/src/techniques/automation.js +316 -316
  155. package/src/techniques/compliance.js +257 -257
  156. package/src/techniques/hygiene.js +294 -294
  157. package/src/techniques/instructions.js +243 -243
  158. package/src/techniques/observability.js +226 -226
  159. package/src/techniques/optimization.js +142 -142
  160. package/src/techniques/quality.js +318 -318
  161. package/src/techniques/security.js +237 -237
  162. package/src/techniques/shared.js +443 -443
  163. package/src/techniques/stacks.js +2294 -2294
  164. package/src/techniques/tools.js +106 -106
  165. package/src/techniques/workflow.js +413 -413
  166. package/src/techniques.js +81 -81
  167. package/src/terminology.js +73 -73
  168. package/src/token-estimate.js +35 -35
  169. package/src/usage-patterns.js +99 -99
  170. package/src/verification-metadata.js +145 -145
  171. package/src/watch.js +247 -247
  172. package/src/windsurf/activity.js +302 -302
  173. package/src/windsurf/config-parser.js +267 -267
  174. package/src/windsurf/context.js +120 -10
  175. package/src/windsurf/deep-review.js +337 -337
  176. package/src/windsurf/domain-packs.js +370 -370
  177. package/src/windsurf/freshness.js +36 -36
  178. package/src/windsurf/governance.js +231 -231
  179. package/src/windsurf/interactive.js +388 -388
  180. package/src/windsurf/mcp-packs.js +792 -792
  181. package/src/windsurf/plans.js +247 -247
  182. package/src/windsurf/premium.js +468 -468
  183. package/src/windsurf/setup.js +471 -471
  184. package/src/windsurf/techniques.js +155 -33
  185. package/src/workspace.js +375 -375
@@ -1,253 +1,253 @@
1
- /**
2
- * Aider Governance — permission profiles, policy packs, pilot rollout
3
- *
4
- * Aider governance is fundamentally simpler than IDE platforms:
5
- * - Git is the ONLY safety mechanism (commits before changes)
6
- * - No hooks, no sandbox modes, no approval policies
7
- * - Safety comes from: auto-commits, git history, CI gates, code review
8
- * - 3 model roles provide implicit trust levels
9
- */
10
-
11
- const { AIDER_DOMAIN_PACKS } = require('./domain-packs');
12
- const { AIDER_MCP_PACKS } = require('./mcp-packs');
13
-
14
- /**
15
- * Aider permission profiles are git-based.
16
- * Since Aider has no sandbox/approval system, profiles map to
17
- * recommended git workflow patterns.
18
- */
19
- const AIDER_PERMISSION_PROFILES = [
20
- {
21
- key: 'review-first',
22
- label: 'Review First',
23
- risk: 'low',
24
- defaultAutoCommits: true,
25
- approvalPolicy: 'manual-review',
26
- useWhen: 'First contact with a repo, security-sensitive work, or regulated environments.',
27
- behavior: 'Auto-commits enabled but all changes require manual git review before push. Use `git diff` and `git log` after each session.',
28
- },
29
- {
30
- key: 'standard',
31
- label: 'Standard',
32
- risk: 'medium',
33
- defaultAutoCommits: true,
34
- approvalPolicy: 'trust-with-tests',
35
- useWhen: 'Normal development with test and lint verification loops.',
36
- behavior: 'Auto-commits + auto-test + auto-lint. Changes verified automatically, manual review for complex work.',
37
- },
38
- {
39
- key: 'autonomous',
40
- label: 'Autonomous',
41
- risk: 'high',
42
- defaultAutoCommits: true,
43
- approvalPolicy: 'ci-gated',
44
- useWhen: 'Automated batch processing with CI gates for quality control.',
45
- behavior: 'Aider runs with --yes flag in CI. All changes go through CI pipeline before merge.',
46
- },
47
- {
48
- key: 'ci-headless',
49
- label: 'CI Headless',
50
- risk: 'high',
51
- defaultAutoCommits: true,
52
- approvalPolicy: 'pipeline-only',
53
- useWhen: 'GitHub Actions or CI automation where Aider generates PRs.',
54
- behavior: 'No human interaction. Changes submitted as PRs with required reviews.',
55
- },
56
- ];
57
-
58
- /**
59
- * Git-based safety registry — Aider's safety comes from git, not hooks.
60
- */
61
- const AIDER_SAFETY_REGISTRY = [
62
- {
63
- key: 'auto-commits',
64
- mechanism: 'git',
65
- purpose: 'Every Aider change creates a git commit — the primary undo mechanism.',
66
- risk: 'critical-if-disabled',
67
- configKey: 'auto-commits',
68
- },
69
- {
70
- key: 'dirty-commits',
71
- mechanism: 'git',
72
- purpose: 'Allow Aider to commit even with a dirty working tree.',
73
- risk: 'low',
74
- configKey: 'dirty-commits',
75
- },
76
- {
77
- key: 'attribute-author',
78
- mechanism: 'git-metadata',
79
- purpose: 'Tag AI-authored commits with distinct author for traceability.',
80
- risk: 'none',
81
- configKey: 'attribute-author',
82
- },
83
- {
84
- key: 'commit-prefix',
85
- mechanism: 'git-metadata',
86
- purpose: 'Prefix AI commits for easy filtering in git log.',
87
- risk: 'none',
88
- configKey: 'aider-commit-prefix',
89
- },
90
- {
91
- key: 'pre-commit-hooks',
92
- mechanism: 'git-hooks',
93
- purpose: 'Git pre-commit hooks run on Aider commits too — lint, format, etc.',
94
- risk: 'medium',
95
- configKey: null,
96
- },
97
- {
98
- key: 'undo-command',
99
- mechanism: 'git-reset',
100
- purpose: '/undo command reverts the last Aider commit via git.',
101
- risk: 'none',
102
- configKey: null,
103
- },
104
- ];
105
-
106
- /**
107
- * Aider policy packs — recommended policy configurations.
108
- */
109
- const AIDER_POLICY_PACKS = [
110
- {
111
- key: 'solo-dev',
112
- label: 'Solo Developer',
113
- useWhen: 'Single developer working with Aider on personal projects.',
114
- config: {
115
- 'auto-commits': true,
116
- 'auto-lint': true,
117
- 'auto-test': true,
118
- 'show-diffs': true,
119
- 'attribute-author': true,
120
- },
121
- conventions: ['Document key commands (/undo, /add, /drop)', 'Set up lint and test commands'],
122
- },
123
- {
124
- key: 'team-standard',
125
- label: 'Team Standard',
126
- useWhen: 'Team development where Aider changes go through code review.',
127
- config: {
128
- 'auto-commits': true,
129
- 'auto-lint': true,
130
- 'auto-test': true,
131
- 'show-diffs': true,
132
- 'attribute-author': true,
133
- 'attribute-committer': true,
134
- 'aider-commit-prefix': '"aider: "',
135
- },
136
- conventions: ['Require PR review for Aider branches', 'CI must pass before merge', 'Tag AI-authored commits'],
137
- },
138
- {
139
- key: 'enterprise-governed',
140
- label: 'Enterprise Governed',
141
- useWhen: 'Enterprise environment with compliance requirements.',
142
- config: {
143
- 'auto-commits': true,
144
- 'auto-lint': true,
145
- 'auto-test': true,
146
- 'show-diffs': true,
147
- 'attribute-author': true,
148
- 'attribute-committer': true,
149
- 'aider-commit-prefix': '"aider: "',
150
- },
151
- conventions: [
152
- 'All AI changes require human review',
153
- 'CI pipeline mandatory before merge',
154
- 'Audit trail via git log with commit prefix',
155
- 'Convention file must include security guidelines',
156
- 'Regular review of Aider convention file',
157
- ],
158
- },
159
- {
160
- key: 'ci-automation',
161
- label: 'CI Automation',
162
- useWhen: 'Aider running in CI/CD pipelines (headless mode).',
163
- config: {
164
- 'auto-commits': true,
165
- 'yes': true,
166
- 'no-auto-lint': false,
167
- 'auto-test': true,
168
- 'attribute-author': true,
169
- 'aider-commit-prefix': '"aider-ci: "',
170
- },
171
- conventions: [
172
- 'All changes submitted as PRs',
173
- 'Required reviewer approvals',
174
- 'CI gates must pass',
175
- 'No direct push to main',
176
- ],
177
- },
178
- ];
179
-
180
- /**
181
- * Pilot rollout kit for Aider adoption.
182
- */
183
- const AIDER_PILOT_ROLLOUT_KIT = {
184
- phasedRollout: [
185
- {
186
- phase: 1,
187
- label: 'Single Developer Trial',
188
- duration: '1-2 weeks',
189
- actions: [
190
- 'Install Aider, create .aider.conf.yml',
191
- 'Create CONVENTIONS.md with project basics',
192
- 'Enable auto-commits and show-diffs',
193
- 'Use on low-risk tasks first',
194
- ],
195
- },
196
- {
197
- phase: 2,
198
- label: 'Team Pilot',
199
- duration: '2-4 weeks',
200
- actions: [
201
- 'Share .aider.conf.yml and CONVENTIONS.md in repo',
202
- 'Enable auto-lint and auto-test loops',
203
- 'Add commit prefix for AI traceability',
204
- 'Require PR review for Aider branches',
205
- ],
206
- },
207
- {
208
- phase: 3,
209
- label: 'Full Adoption',
210
- duration: 'Ongoing',
211
- actions: [
212
- 'Standardize Aider config across repos',
213
- 'Integrate Aider into CI pipelines (optional)',
214
- 'Regular convention file reviews',
215
- 'Monitor AI-authored code quality metrics',
216
- ],
217
- },
218
- ],
219
- successMetrics: [
220
- 'Time-to-resolution for Aider-assisted tasks',
221
- 'Test pass rate on Aider-generated code',
222
- 'Developer satisfaction scores',
223
- 'No-overwrite rate on existing repo files',
224
- ],
225
- rollbackExpectations: [
226
- 'Every Aider change can be undone with /undo or git revert.',
227
- 'Convention files can be removed without breaking anything.',
228
- 'Config file removal returns Aider to CLI-flag-only mode.',
229
- ],
230
- };
231
-
232
- function getAiderGovernanceSummary() {
233
- return {
234
- platform: 'aider',
235
- platformLabel: 'Aider',
236
- permissionProfiles: AIDER_PERMISSION_PROFILES,
237
- safetyRegistry: AIDER_SAFETY_REGISTRY,
238
- policyPacks: AIDER_POLICY_PACKS,
239
- domainPacks: AIDER_DOMAIN_PACKS,
240
- mcpPacks: AIDER_MCP_PACKS,
241
- pilotRolloutKit: AIDER_PILOT_ROLLOUT_KIT,
242
- platformCaveats: [
243
- 'Git is the ONLY safety mechanism — do not disable auto-commits.',
244
- 'No native MCP, hooks, or agent system.',
245
- 'Convention files must be explicitly passed (no auto-discovery).',
246
- '4-level config precedence: env vars > CLI args > .aider.conf.yml > defaults.',
247
- ],
248
- };
249
- }
250
-
251
- module.exports = {
252
- getAiderGovernanceSummary,
253
- };
1
+ /**
2
+ * Aider Governance — permission profiles, policy packs, pilot rollout
3
+ *
4
+ * Aider governance is fundamentally simpler than IDE platforms:
5
+ * - Git is the ONLY safety mechanism (commits before changes)
6
+ * - No hooks, no sandbox modes, no approval policies
7
+ * - Safety comes from: auto-commits, git history, CI gates, code review
8
+ * - 3 model roles provide implicit trust levels
9
+ */
10
+
11
+ const { AIDER_DOMAIN_PACKS } = require('./domain-packs');
12
+ const { AIDER_MCP_PACKS } = require('./mcp-packs');
13
+
14
+ /**
15
+ * Aider permission profiles are git-based.
16
+ * Since Aider has no sandbox/approval system, profiles map to
17
+ * recommended git workflow patterns.
18
+ */
19
+ const AIDER_PERMISSION_PROFILES = [
20
+ {
21
+ key: 'review-first',
22
+ label: 'Review First',
23
+ risk: 'low',
24
+ defaultAutoCommits: true,
25
+ approvalPolicy: 'manual-review',
26
+ useWhen: 'First contact with a repo, security-sensitive work, or regulated environments.',
27
+ behavior: 'Auto-commits enabled but all changes require manual git review before push. Use `git diff` and `git log` after each session.',
28
+ },
29
+ {
30
+ key: 'standard',
31
+ label: 'Standard',
32
+ risk: 'medium',
33
+ defaultAutoCommits: true,
34
+ approvalPolicy: 'trust-with-tests',
35
+ useWhen: 'Normal development with test and lint verification loops.',
36
+ behavior: 'Auto-commits + auto-test + auto-lint. Changes verified automatically, manual review for complex work.',
37
+ },
38
+ {
39
+ key: 'autonomous',
40
+ label: 'Autonomous',
41
+ risk: 'high',
42
+ defaultAutoCommits: true,
43
+ approvalPolicy: 'ci-gated',
44
+ useWhen: 'Automated batch processing with CI gates for quality control.',
45
+ behavior: 'Aider runs with --yes flag in CI. All changes go through CI pipeline before merge.',
46
+ },
47
+ {
48
+ key: 'ci-headless',
49
+ label: 'CI Headless',
50
+ risk: 'high',
51
+ defaultAutoCommits: true,
52
+ approvalPolicy: 'pipeline-only',
53
+ useWhen: 'GitHub Actions or CI automation where Aider generates PRs.',
54
+ behavior: 'No human interaction. Changes submitted as PRs with required reviews.',
55
+ },
56
+ ];
57
+
58
+ /**
59
+ * Git-based safety registry — Aider's safety comes from git, not hooks.
60
+ */
61
+ const AIDER_SAFETY_REGISTRY = [
62
+ {
63
+ key: 'auto-commits',
64
+ mechanism: 'git',
65
+ purpose: 'Every Aider change creates a git commit — the primary undo mechanism.',
66
+ risk: 'critical-if-disabled',
67
+ configKey: 'auto-commits',
68
+ },
69
+ {
70
+ key: 'dirty-commits',
71
+ mechanism: 'git',
72
+ purpose: 'Allow Aider to commit even with a dirty working tree.',
73
+ risk: 'low',
74
+ configKey: 'dirty-commits',
75
+ },
76
+ {
77
+ key: 'attribute-author',
78
+ mechanism: 'git-metadata',
79
+ purpose: 'Tag AI-authored commits with distinct author for traceability.',
80
+ risk: 'none',
81
+ configKey: 'attribute-author',
82
+ },
83
+ {
84
+ key: 'commit-prefix',
85
+ mechanism: 'git-metadata',
86
+ purpose: 'Prefix AI commits for easy filtering in git log.',
87
+ risk: 'none',
88
+ configKey: 'aider-commit-prefix',
89
+ },
90
+ {
91
+ key: 'pre-commit-hooks',
92
+ mechanism: 'git-hooks',
93
+ purpose: 'Git pre-commit hooks run on Aider commits too — lint, format, etc.',
94
+ risk: 'medium',
95
+ configKey: null,
96
+ },
97
+ {
98
+ key: 'undo-command',
99
+ mechanism: 'git-reset',
100
+ purpose: '/undo command reverts the last Aider commit via git.',
101
+ risk: 'none',
102
+ configKey: null,
103
+ },
104
+ ];
105
+
106
+ /**
107
+ * Aider policy packs — recommended policy configurations.
108
+ */
109
+ const AIDER_POLICY_PACKS = [
110
+ {
111
+ key: 'solo-dev',
112
+ label: 'Solo Developer',
113
+ useWhen: 'Single developer working with Aider on personal projects.',
114
+ config: {
115
+ 'auto-commits': true,
116
+ 'auto-lint': true,
117
+ 'auto-test': true,
118
+ 'show-diffs': true,
119
+ 'attribute-author': true,
120
+ },
121
+ conventions: ['Document key commands (/undo, /add, /drop)', 'Set up lint and test commands'],
122
+ },
123
+ {
124
+ key: 'team-standard',
125
+ label: 'Team Standard',
126
+ useWhen: 'Team development where Aider changes go through code review.',
127
+ config: {
128
+ 'auto-commits': true,
129
+ 'auto-lint': true,
130
+ 'auto-test': true,
131
+ 'show-diffs': true,
132
+ 'attribute-author': true,
133
+ 'attribute-committer': true,
134
+ 'aider-commit-prefix': '"aider: "',
135
+ },
136
+ conventions: ['Require PR review for Aider branches', 'CI must pass before merge', 'Tag AI-authored commits'],
137
+ },
138
+ {
139
+ key: 'enterprise-governed',
140
+ label: 'Enterprise Governed',
141
+ useWhen: 'Enterprise environment with compliance requirements.',
142
+ config: {
143
+ 'auto-commits': true,
144
+ 'auto-lint': true,
145
+ 'auto-test': true,
146
+ 'show-diffs': true,
147
+ 'attribute-author': true,
148
+ 'attribute-committer': true,
149
+ 'aider-commit-prefix': '"aider: "',
150
+ },
151
+ conventions: [
152
+ 'All AI changes require human review',
153
+ 'CI pipeline mandatory before merge',
154
+ 'Audit trail via git log with commit prefix',
155
+ 'Convention file must include security guidelines',
156
+ 'Regular review of Aider convention file',
157
+ ],
158
+ },
159
+ {
160
+ key: 'ci-automation',
161
+ label: 'CI Automation',
162
+ useWhen: 'Aider running in CI/CD pipelines (headless mode).',
163
+ config: {
164
+ 'auto-commits': true,
165
+ 'yes': true,
166
+ 'no-auto-lint': false,
167
+ 'auto-test': true,
168
+ 'attribute-author': true,
169
+ 'aider-commit-prefix': '"aider-ci: "',
170
+ },
171
+ conventions: [
172
+ 'All changes submitted as PRs',
173
+ 'Required reviewer approvals',
174
+ 'CI gates must pass',
175
+ 'No direct push to main',
176
+ ],
177
+ },
178
+ ];
179
+
180
+ /**
181
+ * Pilot rollout kit for Aider adoption.
182
+ */
183
+ const AIDER_PILOT_ROLLOUT_KIT = {
184
+ phasedRollout: [
185
+ {
186
+ phase: 1,
187
+ label: 'Single Developer Trial',
188
+ duration: '1-2 weeks',
189
+ actions: [
190
+ 'Install Aider, create .aider.conf.yml',
191
+ 'Create CONVENTIONS.md with project basics',
192
+ 'Enable auto-commits and show-diffs',
193
+ 'Use on low-risk tasks first',
194
+ ],
195
+ },
196
+ {
197
+ phase: 2,
198
+ label: 'Team Pilot',
199
+ duration: '2-4 weeks',
200
+ actions: [
201
+ 'Share .aider.conf.yml and CONVENTIONS.md in repo',
202
+ 'Enable auto-lint and auto-test loops',
203
+ 'Add commit prefix for AI traceability',
204
+ 'Require PR review for Aider branches',
205
+ ],
206
+ },
207
+ {
208
+ phase: 3,
209
+ label: 'Full Adoption',
210
+ duration: 'Ongoing',
211
+ actions: [
212
+ 'Standardize Aider config across repos',
213
+ 'Integrate Aider into CI pipelines (optional)',
214
+ 'Regular convention file reviews',
215
+ 'Monitor AI-authored code quality metrics',
216
+ ],
217
+ },
218
+ ],
219
+ successMetrics: [
220
+ 'Time-to-resolution for Aider-assisted tasks',
221
+ 'Test pass rate on Aider-generated code',
222
+ 'Developer satisfaction scores',
223
+ 'No-overwrite rate on existing repo files',
224
+ ],
225
+ rollbackExpectations: [
226
+ 'Every Aider change can be undone with /undo or git revert.',
227
+ 'Convention files can be removed without breaking anything.',
228
+ 'Config file removal returns Aider to CLI-flag-only mode.',
229
+ ],
230
+ };
231
+
232
+ function getAiderGovernanceSummary() {
233
+ return {
234
+ platform: 'aider',
235
+ platformLabel: 'Aider',
236
+ permissionProfiles: AIDER_PERMISSION_PROFILES,
237
+ safetyRegistry: AIDER_SAFETY_REGISTRY,
238
+ policyPacks: AIDER_POLICY_PACKS,
239
+ domainPacks: AIDER_DOMAIN_PACKS,
240
+ mcpPacks: AIDER_MCP_PACKS,
241
+ pilotRolloutKit: AIDER_PILOT_ROLLOUT_KIT,
242
+ platformCaveats: [
243
+ 'Git is the ONLY safety mechanism — do not disable auto-commits.',
244
+ 'No native MCP, hooks, or agent system.',
245
+ 'Convention files must be explicitly passed (no auto-discovery).',
246
+ '4-level config precedence: env vars > CLI args > .aider.conf.yml > defaults.',
247
+ ],
248
+ };
249
+ }
250
+
251
+ module.exports = {
252
+ getAiderGovernanceSummary,
253
+ };