pumuki 6.3.26 → 6.3.28
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 +3 -1
- package/bin/pumuki-mcp-enterprise-stdio.js +5 -0
- package/bin/pumuki-mcp-evidence-stdio.js +5 -0
- package/core/gate/conditionMatches.ts +1 -21
- package/core/gate/evaluateGate.js +5 -0
- package/core/gate/evaluateRules.js +5 -0
- package/core/gate/evaluateRules.ts +1 -24
- package/core/gate/scopeMatcher.ts +84 -0
- package/docs/EXECUTION_BOARD.md +749 -376
- package/docs/MCP_SERVERS.md +41 -2
- package/docs/README.md +6 -2
- package/docs/REFRACTOR_PROGRESS.md +374 -6
- package/docs/validation/README.md +11 -1
- package/docs/validation/p9-ruralgo-bug-registry.md +607 -0
- package/docs/validation/p9-ruralgo-fork-validation-tracking.md +904 -0
- package/docs/validation/real-repo-manual-e2e-ruralgo-fork.md +372 -0
- package/integrations/config/skillsCompliance.ts +212 -0
- package/integrations/evidence/integrity.ts +352 -0
- package/integrations/evidence/rulesCoverage.ts +94 -0
- package/integrations/evidence/schema.test.ts +16 -0
- package/integrations/evidence/schema.ts +41 -0
- package/integrations/evidence/writeEvidence.test.ts +68 -0
- package/integrations/evidence/writeEvidence.ts +23 -2
- package/integrations/gate/evaluateAiGate.ts +382 -15
- package/integrations/gate/stagePolicies.ts +70 -15
- package/integrations/gate/waivers.ts +209 -0
- package/integrations/git/findingTraceability.ts +3 -23
- package/integrations/git/index.js +5 -0
- package/integrations/git/runCliCommand.ts +16 -0
- package/integrations/git/runPlatformGate.ts +53 -1
- package/integrations/git/runPlatformGateEvaluation.ts +13 -0
- package/integrations/git/stageRunners.ts +168 -5
- package/integrations/lifecycle/adapter.templates.json +72 -5
- package/integrations/lifecycle/adapter.ts +78 -4
- package/integrations/lifecycle/cli.ts +384 -14
- package/integrations/lifecycle/doctor.ts +534 -0
- package/integrations/lifecycle/hookBlock.ts +2 -1
- package/integrations/lifecycle/index.js +5 -0
- package/integrations/lifecycle/install.ts +115 -3
- package/integrations/lifecycle/openSpecBootstrap.ts +68 -8
- package/integrations/lifecycle/preWriteAutomation.ts +142 -0
- package/integrations/mcp/aiGateCheck.ts +6 -0
- package/integrations/mcp/aiGateReceipt.ts +188 -0
- package/integrations/mcp/enterpriseServer.ts +14 -1
- package/integrations/mcp/enterpriseStdioServer.cli.ts +315 -0
- package/integrations/mcp/evidenceStdioServer.cli.ts +342 -0
- package/integrations/mcp/index.js +5 -0
- package/integrations/sdd/index.js +5 -0
- package/integrations/sdd/index.ts +2 -0
- package/integrations/sdd/policy.ts +191 -2
- package/integrations/sdd/sessionStore.ts +139 -19
- package/integrations/sdd/syncDocs.ts +180 -0
- package/integrations/sdd/types.ts +4 -1
- package/integrations/telemetry/structuredTelemetry.ts +197 -0
- package/package.json +27 -8
- package/scripts/build-p9-validation-manifests.ts +53 -0
- package/scripts/check-p9-ruralgo-baseline-clean.ts +200 -0
- package/scripts/check-p9-ruralgo-baseline-versioned.ts +198 -0
- package/scripts/check-p9-ruralgo-branch-ready.ts +215 -0
- package/scripts/check-p9-ruralgo-install-health.ts +288 -0
- package/scripts/check-p9-ruralgo-runtime-ready.ts +188 -0
- package/scripts/check-package-manifest.ts +49 -0
- package/scripts/check-tracking-single-active.sh +40 -0
- package/scripts/framework-menu-consumer-preflight-lib.ts +31 -0
- package/scripts/framework-menu-consumer-runtime-lib.ts +3 -3
- package/scripts/framework-menu-legacy-audit-lib.ts +35 -7
- package/scripts/framework-menu-matrix-evidence-lib.ts +6 -2
- package/scripts/manage-library.sh +1 -1
- package/scripts/p9-ruralgo-baseline-clean-lib.ts +117 -0
- package/scripts/p9-ruralgo-baseline-versioned-lib.ts +119 -0
- package/scripts/p9-ruralgo-branch-ready-lib.ts +128 -0
- package/scripts/p9-ruralgo-install-health-lib.ts +121 -0
- package/scripts/p9-ruralgo-runtime-ready-lib.ts +149 -0
- package/scripts/p9-validation-manifests-lib.ts +366 -0
- package/scripts/package-manifest-lib.ts +9 -0
- package/skills.lock.json +1 -1
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
|
|
4
|
+
export type ValidationStage = 'PRE_WRITE' | 'PRE_COMMIT' | 'PRE_PUSH' | 'CI';
|
|
5
|
+
|
|
6
|
+
export type StageMatrixStatus = {
|
|
7
|
+
PRE_WRITE: 'pending' | 'pass' | 'fail' | 'na';
|
|
8
|
+
PRE_COMMIT: 'pending' | 'pass' | 'fail' | 'na';
|
|
9
|
+
PRE_PUSH: 'pending' | 'pass' | 'fail' | 'na';
|
|
10
|
+
CI: 'pending' | 'pass' | 'fail' | 'na';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type FunctionalityKind = 'bin' | 'script' | 'export' | 'lifecycle_command' | 'menu_action';
|
|
14
|
+
|
|
15
|
+
export type FunctionalityItem = {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: FunctionalityKind;
|
|
18
|
+
source: string;
|
|
19
|
+
description: string;
|
|
20
|
+
command?: string;
|
|
21
|
+
stageMatrix: StageMatrixStatus;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type RulesItem = {
|
|
25
|
+
ruleId: string;
|
|
26
|
+
source: 'execution_board' | 'source_scan';
|
|
27
|
+
stageMatrix: StageMatrixStatus;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type FunctionalityMatrix = {
|
|
31
|
+
generatedAt: string;
|
|
32
|
+
repoRoot: string;
|
|
33
|
+
totals: {
|
|
34
|
+
bins: number;
|
|
35
|
+
scripts: number;
|
|
36
|
+
exports: number;
|
|
37
|
+
lifecycleCommands: number;
|
|
38
|
+
menuActions: number;
|
|
39
|
+
overall: number;
|
|
40
|
+
};
|
|
41
|
+
items: ReadonlyArray<FunctionalityItem>;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type RulesMatrix = {
|
|
45
|
+
generatedAt: string;
|
|
46
|
+
repoRoot: string;
|
|
47
|
+
totals: {
|
|
48
|
+
executionBoardRules: number;
|
|
49
|
+
sourceScannedRules: number;
|
|
50
|
+
overallUnion: number;
|
|
51
|
+
};
|
|
52
|
+
items: ReadonlyArray<RulesItem>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const PENDING_STAGE_MATRIX: StageMatrixStatus = {
|
|
56
|
+
PRE_WRITE: 'pending',
|
|
57
|
+
PRE_COMMIT: 'pending',
|
|
58
|
+
PRE_PUSH: 'pending',
|
|
59
|
+
CI: 'pending',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const clonePendingStageMatrix = (): StageMatrixStatus => {
|
|
63
|
+
return {
|
|
64
|
+
PRE_WRITE: PENDING_STAGE_MATRIX.PRE_WRITE,
|
|
65
|
+
PRE_COMMIT: PENDING_STAGE_MATRIX.PRE_COMMIT,
|
|
66
|
+
PRE_PUSH: PENDING_STAGE_MATRIX.PRE_PUSH,
|
|
67
|
+
CI: PENDING_STAGE_MATRIX.CI,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const readUtf8 = (path: string): string => {
|
|
72
|
+
return readFileSync(path, 'utf8');
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const parseLifecycleCommandsFromHelpText = (cliSource: string): ReadonlyArray<string> => {
|
|
76
|
+
const helpMatch = cliSource.match(/const HELP_TEXT = `([\s\S]*?)`\.trim\(\);/);
|
|
77
|
+
if (!helpMatch) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
return helpMatch[1]
|
|
81
|
+
.split('\n')
|
|
82
|
+
.map((line) => line.trim())
|
|
83
|
+
.filter((line) => line.startsWith('pumuki '));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
type MenuAction = {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const parseMenuActions = (source: string): ReadonlyArray<MenuAction> => {
|
|
92
|
+
const actions: MenuAction[] = [];
|
|
93
|
+
const actionPattern = /id:\s*'([^']+)'\s*,[\s\S]{0,260}?label:\s*'([^']+)'/g;
|
|
94
|
+
let match = actionPattern.exec(source);
|
|
95
|
+
while (match) {
|
|
96
|
+
actions.push({ id: match[1], label: match[2] });
|
|
97
|
+
match = actionPattern.exec(source);
|
|
98
|
+
}
|
|
99
|
+
const seen = new Set<string>();
|
|
100
|
+
const unique: MenuAction[] = [];
|
|
101
|
+
for (const action of actions) {
|
|
102
|
+
const key = `${action.id}|${action.label}`;
|
|
103
|
+
if (seen.has(key)) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
seen.add(key);
|
|
107
|
+
unique.push(action);
|
|
108
|
+
}
|
|
109
|
+
return unique.sort((a, b) => Number(a.id) - Number(b.id) || a.label.localeCompare(b.label));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const parseConsumerMenuActions = (repoRoot: string): ReadonlyArray<MenuAction> => {
|
|
113
|
+
const source = readUtf8(resolve(repoRoot, 'scripts/framework-menu-consumer-actions-lib.ts'));
|
|
114
|
+
return parseMenuActions(source);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const parseAdvancedMenuActions = (repoRoot: string): ReadonlyArray<MenuAction> => {
|
|
118
|
+
const files = [
|
|
119
|
+
'scripts/framework-menu-actions-gates-stage-lib.ts',
|
|
120
|
+
'scripts/framework-menu-actions-gates-ci-lib.ts',
|
|
121
|
+
'scripts/framework-menu-actions-gates-tools-lib.ts',
|
|
122
|
+
'scripts/framework-menu-actions-diagnostics-adapter-lib.ts',
|
|
123
|
+
'scripts/framework-menu-actions-diagnostics-ci-lib.ts',
|
|
124
|
+
'scripts/framework-menu-actions-diagnostics-support-core-lib.ts',
|
|
125
|
+
'scripts/framework-menu-actions-diagnostics-support-triage-lib.ts',
|
|
126
|
+
'scripts/framework-menu-actions-diagnostics-maintenance-lib.ts',
|
|
127
|
+
'scripts/framework-menu-actions-phase5-reports-lib.ts',
|
|
128
|
+
'scripts/framework-menu-actions-phase5-exec-lib.ts',
|
|
129
|
+
'scripts/framework-menu-actions-phase5-exit-lib.ts',
|
|
130
|
+
];
|
|
131
|
+
const actions: MenuAction[] = [];
|
|
132
|
+
for (const file of files) {
|
|
133
|
+
const source = readUtf8(resolve(repoRoot, file));
|
|
134
|
+
for (const action of parseMenuActions(source)) {
|
|
135
|
+
actions.push(action);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const seen = new Set<string>();
|
|
139
|
+
const unique: MenuAction[] = [];
|
|
140
|
+
for (const action of actions) {
|
|
141
|
+
const key = `${action.id}|${action.label}`;
|
|
142
|
+
if (seen.has(key)) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
seen.add(key);
|
|
146
|
+
unique.push(action);
|
|
147
|
+
}
|
|
148
|
+
return unique.sort((a, b) => Number(a.id) - Number(b.id) || a.label.localeCompare(b.label));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const parseRuleIdsFromExecutionBoard = (repoRoot: string): ReadonlyArray<string> => {
|
|
152
|
+
const source = readUtf8(resolve(repoRoot, 'docs/EXECUTION_BOARD.md'));
|
|
153
|
+
const ruleIds = new Set<string>();
|
|
154
|
+
const lines = source.split('\n');
|
|
155
|
+
let inRulesSection = false;
|
|
156
|
+
for (const line of lines) {
|
|
157
|
+
if (line.startsWith('## Checklist B')) {
|
|
158
|
+
inRulesSection = true;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (inRulesSection && line.startsWith('## ') && !line.startsWith('## Checklist B')) {
|
|
162
|
+
inRulesSection = false;
|
|
163
|
+
}
|
|
164
|
+
if (!inRulesSection) {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const match = line.match(/`rule:([^`]+)`/);
|
|
168
|
+
if (match) {
|
|
169
|
+
ruleIds.add(match[1].trim());
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return [...ruleIds].sort();
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const readAllTsSources = (repoRoot: string): ReadonlyArray<string> => {
|
|
176
|
+
const roots = ['core/rules/presets', 'integrations/config'];
|
|
177
|
+
const files: string[] = [];
|
|
178
|
+
const visit = (relativePath: string): void => {
|
|
179
|
+
const absolutePath = resolve(repoRoot, relativePath);
|
|
180
|
+
const stats = statSync(absolutePath);
|
|
181
|
+
if (stats.isDirectory()) {
|
|
182
|
+
for (const child of readdirSync(absolutePath)) {
|
|
183
|
+
visit(`${relativePath}/${child}`);
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (!relativePath.endsWith('.ts') || relativePath.endsWith('.test.ts')) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
files.push(absolutePath);
|
|
191
|
+
};
|
|
192
|
+
for (const root of roots) {
|
|
193
|
+
visit(root);
|
|
194
|
+
}
|
|
195
|
+
return files.map((file) => readUtf8(file));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const parseRuleIdsFromSource = (repoRoot: string): ReadonlyArray<string> => {
|
|
199
|
+
const ruleIds = new Set<string>();
|
|
200
|
+
const sources = readAllTsSources(repoRoot);
|
|
201
|
+
for (const source of sources) {
|
|
202
|
+
const ruleIdPattern = /ruleId:\s*['"]([^'"]+)['"]/g;
|
|
203
|
+
let match = ruleIdPattern.exec(source);
|
|
204
|
+
while (match) {
|
|
205
|
+
ruleIds.add(match[1].trim());
|
|
206
|
+
match = ruleIdPattern.exec(source);
|
|
207
|
+
}
|
|
208
|
+
const explicitIdPattern = /id:\s*['"]((?:skills|backend|frontend|ios|android|common|workflow|heuristics)\.[^'"]+)['"]/g;
|
|
209
|
+
match = explicitIdPattern.exec(source);
|
|
210
|
+
while (match) {
|
|
211
|
+
ruleIds.add(match[1].trim());
|
|
212
|
+
match = explicitIdPattern.exec(source);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return [...ruleIds].sort();
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export const buildFunctionalityMatrix = (repoRoot: string): FunctionalityMatrix => {
|
|
219
|
+
const packageJson = JSON.parse(readUtf8(resolve(repoRoot, 'package.json'))) as {
|
|
220
|
+
bin?: Record<string, string>;
|
|
221
|
+
scripts?: Record<string, string>;
|
|
222
|
+
exports?: Record<string, string>;
|
|
223
|
+
};
|
|
224
|
+
const bins = Object.keys(packageJson.bin ?? {}).sort();
|
|
225
|
+
const scripts = Object.keys(packageJson.scripts ?? {}).sort();
|
|
226
|
+
const exportsEntries = Object.keys(packageJson.exports ?? {}).sort();
|
|
227
|
+
const lifecycleSource = readUtf8(resolve(repoRoot, 'integrations/lifecycle/cli.ts'));
|
|
228
|
+
const lifecycleCommands = parseLifecycleCommandsFromHelpText(lifecycleSource);
|
|
229
|
+
const consumerActions = parseConsumerMenuActions(repoRoot);
|
|
230
|
+
const advancedActions = parseAdvancedMenuActions(repoRoot);
|
|
231
|
+
|
|
232
|
+
const items: FunctionalityItem[] = [];
|
|
233
|
+
|
|
234
|
+
for (const bin of bins) {
|
|
235
|
+
items.push({
|
|
236
|
+
id: `bin:${bin}`,
|
|
237
|
+
kind: 'bin',
|
|
238
|
+
source: 'package.json#bin',
|
|
239
|
+
description: `Binary entrypoint "${bin}"`,
|
|
240
|
+
command: `npx ${bin}`,
|
|
241
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
for (const script of scripts) {
|
|
246
|
+
items.push({
|
|
247
|
+
id: `script:${script}`,
|
|
248
|
+
kind: 'script',
|
|
249
|
+
source: 'package.json#scripts',
|
|
250
|
+
description: `Script "${script}"`,
|
|
251
|
+
command: `npm run ${script}`,
|
|
252
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
for (const exportEntry of exportsEntries) {
|
|
257
|
+
items.push({
|
|
258
|
+
id: `export:${exportEntry}`,
|
|
259
|
+
kind: 'export',
|
|
260
|
+
source: 'package.json#exports',
|
|
261
|
+
description: `Export "${exportEntry}"`,
|
|
262
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
for (const command of lifecycleCommands) {
|
|
267
|
+
items.push({
|
|
268
|
+
id: `lifecycle:${command}`,
|
|
269
|
+
kind: 'lifecycle_command',
|
|
270
|
+
source: 'integrations/lifecycle/cli.ts#HELP_TEXT',
|
|
271
|
+
description: command,
|
|
272
|
+
command,
|
|
273
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
for (const action of consumerActions) {
|
|
278
|
+
items.push({
|
|
279
|
+
id: `menu.consumer.${action.id}`,
|
|
280
|
+
kind: 'menu_action',
|
|
281
|
+
source: 'scripts/framework-menu-consumer-actions-lib.ts',
|
|
282
|
+
description: action.label,
|
|
283
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
for (const action of advancedActions) {
|
|
288
|
+
items.push({
|
|
289
|
+
id: `menu.advanced.${action.id}`,
|
|
290
|
+
kind: 'menu_action',
|
|
291
|
+
source: 'scripts/framework-menu-actions-*-lib.ts',
|
|
292
|
+
description: action.label,
|
|
293
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
items.push({
|
|
298
|
+
id: 'menu.consumer.switch.A',
|
|
299
|
+
kind: 'menu_action',
|
|
300
|
+
source: 'scripts/framework-menu.ts',
|
|
301
|
+
description: 'Switch consumer mode to advanced mode',
|
|
302
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
303
|
+
});
|
|
304
|
+
items.push({
|
|
305
|
+
id: 'menu.advanced.switch.C',
|
|
306
|
+
kind: 'menu_action',
|
|
307
|
+
source: 'scripts/framework-menu.ts',
|
|
308
|
+
description: 'Switch advanced mode to consumer mode',
|
|
309
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
return {
|
|
313
|
+
generatedAt: new Date().toISOString(),
|
|
314
|
+
repoRoot: resolve(repoRoot),
|
|
315
|
+
totals: {
|
|
316
|
+
bins: bins.length,
|
|
317
|
+
scripts: scripts.length,
|
|
318
|
+
exports: exportsEntries.length,
|
|
319
|
+
lifecycleCommands: lifecycleCommands.length,
|
|
320
|
+
menuActions: consumerActions.length + advancedActions.length + 2,
|
|
321
|
+
overall: items.length,
|
|
322
|
+
},
|
|
323
|
+
items,
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export const buildRulesMatrix = (repoRoot: string): RulesMatrix => {
|
|
328
|
+
const fromExecutionBoard = parseRuleIdsFromExecutionBoard(repoRoot);
|
|
329
|
+
const fromSource = parseRuleIdsFromSource(repoRoot);
|
|
330
|
+
const executionBoardSet = new Set(fromExecutionBoard);
|
|
331
|
+
const sourceSet = new Set(fromSource);
|
|
332
|
+
const union = new Set<string>([...fromExecutionBoard, ...fromSource]);
|
|
333
|
+
const items: RulesItem[] = [...union]
|
|
334
|
+
.sort()
|
|
335
|
+
.map((ruleId) => ({
|
|
336
|
+
ruleId,
|
|
337
|
+
source: executionBoardSet.has(ruleId) ? 'execution_board' : 'source_scan',
|
|
338
|
+
stageMatrix: clonePendingStageMatrix(),
|
|
339
|
+
}));
|
|
340
|
+
return {
|
|
341
|
+
generatedAt: new Date().toISOString(),
|
|
342
|
+
repoRoot: resolve(repoRoot),
|
|
343
|
+
totals: {
|
|
344
|
+
executionBoardRules: executionBoardSet.size,
|
|
345
|
+
sourceScannedRules: sourceSet.size,
|
|
346
|
+
overallUnion: union.size,
|
|
347
|
+
},
|
|
348
|
+
items,
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export const writeP9ValidationManifests = (repoRoot: string, outDir: string): {
|
|
353
|
+
functionalityPath: string;
|
|
354
|
+
rulesPath: string;
|
|
355
|
+
functionality: FunctionalityMatrix;
|
|
356
|
+
rules: RulesMatrix;
|
|
357
|
+
} => {
|
|
358
|
+
const functionality = buildFunctionalityMatrix(repoRoot);
|
|
359
|
+
const rules = buildRulesMatrix(repoRoot);
|
|
360
|
+
const functionalityPath = resolve(outDir, 'p9-functionality-matrix.json');
|
|
361
|
+
const rulesPath = resolve(outDir, 'p9-rules-matrix.json');
|
|
362
|
+
mkdirSync(dirname(functionalityPath), { recursive: true });
|
|
363
|
+
writeFileSync(functionalityPath, `${JSON.stringify(functionality, null, 2)}\n`, 'utf8');
|
|
364
|
+
writeFileSync(rulesPath, `${JSON.stringify(rules, null, 2)}\n`, 'utf8');
|
|
365
|
+
return { functionalityPath, rulesPath, functionality, rules };
|
|
366
|
+
};
|
|
@@ -5,12 +5,21 @@ export const REQUIRED_PACKAGE_PATHS = [
|
|
|
5
5
|
'bin/pumuki-pre-push.js',
|
|
6
6
|
'bin/pumuki-ci.js',
|
|
7
7
|
'bin/pumuki-mcp-evidence.js',
|
|
8
|
+
'bin/pumuki-mcp-evidence-stdio.js',
|
|
9
|
+
'bin/pumuki-mcp-enterprise.js',
|
|
10
|
+
'bin/pumuki-mcp-enterprise-stdio.js',
|
|
11
|
+
'core/gate/evaluateGate.js',
|
|
12
|
+
'core/gate/evaluateRules.js',
|
|
8
13
|
'core/utils/stableStringify.ts',
|
|
9
14
|
'core/facts/detectors/typescript/index.ts',
|
|
10
15
|
'core/rules/presets/heuristics/typescript.ts',
|
|
11
16
|
'scripts/package-install-smoke.ts',
|
|
17
|
+
'integrations/git/index.js',
|
|
12
18
|
'integrations/git/runPlatformGate.ts',
|
|
19
|
+
'integrations/lifecycle/index.js',
|
|
13
20
|
'integrations/lifecycle/cli.ts',
|
|
21
|
+
'integrations/mcp/index.js',
|
|
22
|
+
'integrations/sdd/index.js',
|
|
14
23
|
'integrations/notifications/emitAuditSummaryNotification.ts',
|
|
15
24
|
'integrations/evidence/buildEvidence.ts',
|
|
16
25
|
];
|