pumuki 6.3.172 → 6.3.174

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 (120) hide show
  1. package/AGENTS.md +1 -16
  2. package/CHANGELOG.md +0 -101
  3. package/README.md +10 -14
  4. package/VERSION +1 -1
  5. package/core/facts/detectors/text/android.test.ts +0 -2827
  6. package/core/facts/detectors/text/android.ts +182 -5121
  7. package/core/facts/detectors/text/ios.test.ts +12 -290
  8. package/core/facts/detectors/text/ios.ts +28 -301
  9. package/core/facts/detectors/typescript/index.test.ts +139 -3733
  10. package/core/facts/detectors/typescript/index.ts +264 -4959
  11. package/core/facts/extractHeuristicFacts.ts +11 -328
  12. package/core/gate/evaluateRules.test.ts +0 -7
  13. package/core/gate/evaluateRules.ts +2 -1
  14. package/core/rules/presets/heuristics/android.test.ts +1 -399
  15. package/core/rules/presets/heuristics/android.ts +1 -1481
  16. package/core/rules/presets/heuristics/ios.test.ts +1 -11
  17. package/core/rules/presets/heuristics/ios.ts +0 -36
  18. package/core/rules/presets/heuristics/typescript.test.ts +2 -158
  19. package/core/rules/presets/heuristics/typescript.ts +0 -508
  20. package/core/rules/presets/iosEnterpriseRuleSet.test.ts +0 -5
  21. package/core/rules/presets/iosEnterpriseRuleSet.ts +5 -5
  22. package/docs/README.md +3 -3
  23. package/docs/operations/RELEASE_NOTES.md +1 -94
  24. package/docs/operations/framework-menu-consumer-walkthrough.md +15 -18
  25. package/docs/product/API_REFERENCE.md +1 -1
  26. package/docs/product/CONFIGURATION.md +0 -7
  27. package/docs/product/USAGE.md +1 -1
  28. package/docs/validation/README.md +1 -3
  29. package/docs/validation/ios-avdlee-parity-matrix.md +1 -1
  30. package/integrations/config/skillsCompilerTemplates.test.ts +0 -145
  31. package/integrations/config/skillsCompilerTemplates.ts +2 -1013
  32. package/integrations/config/skillsDetectorRegistry.ts +8 -523
  33. package/integrations/config/skillsMarkdownRules.ts +8 -1088
  34. package/integrations/config/skillsRuleSet.ts +3 -44
  35. package/integrations/evidence/buildEvidence.ts +5 -34
  36. package/integrations/evidence/platformSummary.test.ts +9 -73
  37. package/integrations/evidence/platformSummary.ts +7 -165
  38. package/integrations/evidence/repoState.ts +0 -3
  39. package/integrations/evidence/rulesCoverage.ts +0 -83
  40. package/integrations/evidence/schema.ts +0 -29
  41. package/integrations/evidence/writeEvidence.test.ts +0 -4
  42. package/integrations/evidence/writeEvidence.ts +2 -41
  43. package/integrations/gate/evaluateAiGate.ts +8 -312
  44. package/integrations/gate/remediationCatalog.ts +2 -20
  45. package/integrations/gate/stagePolicies.ts +18 -24
  46. package/integrations/git/astIntelligenceDualValidation.ts +2 -2
  47. package/integrations/git/gitAtomicity.ts +39 -284
  48. package/integrations/git/resolveGitRefs.ts +6 -35
  49. package/integrations/git/runPlatformGate.ts +143 -512
  50. package/integrations/git/runPlatformGateOutput.ts +8 -13
  51. package/integrations/git/stageRunners.ts +41 -25
  52. package/integrations/lifecycle/adapter.ts +0 -24
  53. package/integrations/lifecycle/audit.ts +16 -14
  54. package/integrations/lifecycle/cli.ts +20 -37
  55. package/integrations/lifecycle/cliSdd.ts +3 -4
  56. package/integrations/lifecycle/doctor.ts +1 -1
  57. package/integrations/lifecycle/packageInfo.ts +1 -118
  58. package/integrations/lifecycle/policyReconcile.ts +4 -27
  59. package/integrations/lifecycle/preWriteAutomation.ts +5 -5
  60. package/integrations/lifecycle/state.ts +1 -8
  61. package/integrations/lifecycle/watch.ts +8 -28
  62. package/integrations/mcp/aiGateCheck.ts +10 -194
  63. package/integrations/mcp/autoExecuteAiStart.ts +4 -7
  64. package/integrations/mcp/enterpriseServer.ts +3 -19
  65. package/integrations/mcp/preFlightCheck.ts +10 -89
  66. package/integrations/policy/gitAtomicityEnforcement.ts +2 -2
  67. package/integrations/policy/heuristicsEnforcement.ts +2 -2
  68. package/integrations/policy/policyProfiles.ts +18 -24
  69. package/integrations/policy/preWriteEnforcement.ts +1 -1
  70. package/integrations/policy/sddCompletenessEnforcement.ts +2 -2
  71. package/integrations/policy/skillsEnforcement.ts +47 -1
  72. package/integrations/policy/tddBddEnforcement.ts +2 -2
  73. package/integrations/sdd/evidenceScaffold.ts +8 -124
  74. package/integrations/tdd/contract.ts +0 -1
  75. package/integrations/tdd/enforcement.ts +0 -103
  76. package/integrations/tdd/types.ts +0 -6
  77. package/package.json +1 -1
  78. package/scripts/check-tracking-single-active.sh +1 -1
  79. package/scripts/framework-menu-advanced-view-lib.ts +0 -49
  80. package/scripts/framework-menu-consumer-actions-lib.ts +32 -32
  81. package/scripts/framework-menu-consumer-preflight-render.ts +0 -10
  82. package/scripts/framework-menu-consumer-preflight-run.ts +5 -31
  83. package/scripts/framework-menu-consumer-preflight-types.ts +0 -12
  84. package/scripts/framework-menu-consumer-runtime-actions.ts +5 -11
  85. package/scripts/framework-menu-consumer-runtime-audit.ts +28 -0
  86. package/scripts/framework-menu-consumer-runtime-evidence-classic.ts +42 -118
  87. package/scripts/framework-menu-consumer-runtime-lib.ts +0 -38
  88. package/scripts/framework-menu-consumer-runtime-menu.ts +15 -55
  89. package/scripts/framework-menu-consumer-runtime-types.ts +0 -4
  90. package/scripts/framework-menu-evidence-summary-read.ts +1 -17
  91. package/scripts/framework-menu-evidence-summary-types.ts +0 -3
  92. package/scripts/framework-menu-layout-data.ts +23 -3
  93. package/scripts/framework-menu-system-notifications-cause.ts +1 -24
  94. package/scripts/framework-menu-system-notifications-env.ts +0 -8
  95. package/scripts/framework-menu-system-notifications-gate.ts +2 -9
  96. package/scripts/framework-menu-system-notifications-macos-applescript-dialog.ts +1 -1
  97. package/scripts/framework-menu-system-notifications-macos-dialog-payload.ts +2 -14
  98. package/scripts/framework-menu-system-notifications-macos-swift-source.ts +1 -1
  99. package/scripts/framework-menu-system-notifications-payloads-blocked.ts +4 -128
  100. package/scripts/framework-menu-system-notifications-payloads.ts +1 -8
  101. package/scripts/framework-menu-system-notifications-remediation.ts +1 -15
  102. package/scripts/framework-menu-system-notifications-text.ts +1 -7
  103. package/scripts/framework-menu.ts +2 -37
  104. package/scripts/package-install-smoke-consumer-git-repo-lib.ts +1 -10
  105. package/scripts/package-install-smoke-consumer-npm-lib.ts +9 -46
  106. package/skills.lock.json +1244 -807
  107. package/integrations/evidence/trackingContract.ts +0 -17
  108. package/integrations/gate/blockingCause.ts +0 -40
  109. package/integrations/gate/governanceActionCatalog.ts +0 -296
  110. package/integrations/gate/runPlatformGateConfig.ts +0 -55
  111. package/integrations/gate/runPlatformGateDefaults.ts +0 -19
  112. package/integrations/lifecycle/bootstrapManifest.ts +0 -248
  113. package/integrations/lifecycle/cliGovernanceConsole.ts +0 -69
  114. package/integrations/lifecycle/governanceNextAction.ts +0 -181
  115. package/integrations/lifecycle/governanceObservationSnapshot.ts +0 -376
  116. package/integrations/lifecycle/trackingState.ts +0 -403
  117. package/integrations/mcp/alignedPlatformGate.ts +0 -248
  118. package/integrations/mcp/readMcpPrePushStdin.ts +0 -7
  119. package/scripts/build-ruralgo-s1-evidence-pack.ts +0 -85
  120. package/scripts/ruralgo-s1-evidence-pack-lib.ts +0 -200
@@ -1,85 +0,0 @@
1
- import {
2
- buildRuralGoS1EvidencePackMarkdown,
3
- writeRuralGoS1EvidencePack,
4
- } from './ruralgo-s1-evidence-pack-lib';
5
-
6
- type CliOptions = {
7
- consumerRoot: string;
8
- outFile: string;
9
- packageVersion: string;
10
- generatedAt: string;
11
- };
12
-
13
- const parseArgs = (argv: ReadonlyArray<string>): CliOptions => {
14
- const options: CliOptions = {
15
- consumerRoot: '<RURALGO_REPO_ROOT>',
16
- outFile: '.audit-reports/ruralgo-s1/ruralgo-s1-evidence-pack.md',
17
- packageVersion: 'unknown',
18
- generatedAt: new Date().toISOString(),
19
- };
20
-
21
- for (let index = 0; index < argv.length; index += 1) {
22
- const token = argv[index];
23
- const next = argv[index + 1];
24
- switch (token) {
25
- case '--consumer-root':
26
- if (!next) {
27
- throw new Error('missing value for --consumer-root');
28
- }
29
- options.consumerRoot = next;
30
- index += 1;
31
- break;
32
- case '--out':
33
- if (!next) {
34
- throw new Error('missing value for --out');
35
- }
36
- options.outFile = next;
37
- index += 1;
38
- break;
39
- case '--package-version':
40
- if (!next) {
41
- throw new Error('missing value for --package-version');
42
- }
43
- options.packageVersion = next;
44
- index += 1;
45
- break;
46
- case '--generated-at':
47
- if (!next) {
48
- throw new Error('missing value for --generated-at');
49
- }
50
- options.generatedAt = next;
51
- index += 1;
52
- break;
53
- default:
54
- throw new Error(`unknown argument: ${token}`);
55
- }
56
- }
57
-
58
- return options;
59
- };
60
-
61
- const main = (): number => {
62
- const cwd = process.cwd();
63
- const options = parseArgs(process.argv.slice(2));
64
- const markdown = buildRuralGoS1EvidencePackMarkdown({
65
- cwd,
66
- consumerRoot: options.consumerRoot,
67
- packageVersion: options.packageVersion,
68
- generatedAt: options.generatedAt,
69
- });
70
- const outputPath = writeRuralGoS1EvidencePack({
71
- cwd,
72
- outFile: options.outFile,
73
- markdown,
74
- });
75
- process.stdout.write(`ruralgo s1 evidence pack generated at ${outputPath}\n`);
76
- return 0;
77
- };
78
-
79
- try {
80
- process.exitCode = main();
81
- } catch (error) {
82
- const message = error instanceof Error ? error.message : 'unknown error';
83
- process.stderr.write(`ruralgo s1 evidence pack failed: ${message}\n`);
84
- process.exitCode = 1;
85
- }
@@ -1,200 +0,0 @@
1
- import { mkdirSync, writeFileSync } from 'node:fs';
2
- import { dirname, resolve } from 'node:path';
3
-
4
- type RuralGoS1EvidenceEntry = {
5
- title: string;
6
- mode: 'shell' | 'mcp';
7
- command: string;
8
- capture: ReadonlyArray<string>;
9
- expectedFragments: ReadonlyArray<string>;
10
- incs: ReadonlyArray<string>;
11
- };
12
-
13
- export type RuralGoS1EvidencePackOptions = {
14
- cwd: string;
15
- consumerRoot: string;
16
- packageVersion: string;
17
- generatedAt: string;
18
- };
19
-
20
- const resolvePumukiPackageSelector = (packageVersion: string): string => {
21
- const trimmed = packageVersion.trim();
22
- const isStableSemver = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(trimmed);
23
- if (isStableSemver) {
24
- return `pumuki@${trimmed}`;
25
- }
26
- return 'pumuki@latest';
27
- };
28
-
29
- const EVIDENCE_ENTRIES: ReadonlyArray<RuralGoS1EvidenceEntry> = [
30
- {
31
- title: 'Lifecycle status',
32
- mode: 'shell',
33
- command: 'npm run pumuki:status',
34
- capture: [
35
- 'Bloque `governance truth` completo.',
36
- 'Indicadores de contrato efectivo, rama y skills surface.',
37
- ],
38
- expectedFragments: [
39
- 'governance truth',
40
- 'governance_effective',
41
- 'contract_surface',
42
- 'current_branch',
43
- ],
44
- incs: ['PUMUKI-INC-070', 'PUMUKI-INC-071', 'PUMUKI-INC-073', 'PUMUKI-INC-076'],
45
- },
46
- {
47
- title: 'Lifecycle doctor',
48
- mode: 'shell',
49
- command: 'npm run pumuki:doctor',
50
- capture: [
51
- 'Veredicto humano final.',
52
- 'Bloque `governance truth` con `next_action` visible.',
53
- ],
54
- expectedFragments: [
55
- 'governance truth',
56
- 'next_action',
57
- 'reason_code',
58
- 'WARN',
59
- ],
60
- incs: ['PUMUKI-INC-070', 'PUMUKI-INC-071', 'PUMUKI-INC-073'],
61
- },
62
- {
63
- title: 'PRE_WRITE canónico',
64
- mode: 'shell',
65
- command: 'npx --yes --package pumuki@latest pumuki sdd validate --stage=PRE_WRITE --json',
66
- capture: [
67
- 'Salida JSON completa.',
68
- 'Campos de session/mode y remediación inmediata.',
69
- ],
70
- expectedFragments: [
71
- '"stage":"PRE_WRITE"',
72
- '"decision"',
73
- '"next_action"',
74
- ],
75
- incs: ['PUMUKI-INC-070', 'PUMUKI-INC-072'],
76
- },
77
- {
78
- title: 'Hook pre-commit / gate',
79
- mode: 'shell',
80
- command: 'git commit --allow-empty -m "test: pumuki s1 validation"',
81
- capture: [
82
- 'Bloque de gate con `reason_code`, `instruction` y `next_action`.',
83
- 'Si bloquea, conservar `NEXT:` y `REMEDIATION:`.',
84
- ],
85
- expectedFragments: [
86
- 'reason_code=',
87
- 'instruction=',
88
- 'next_action=',
89
- ],
90
- incs: ['PUMUKI-INC-071', 'PUMUKI-INC-073', 'PUMUKI-INC-076'],
91
- },
92
- {
93
- title: 'MCP pre_flight_check',
94
- mode: 'mcp',
95
- command: 'mcp::pre_flight_check(stage=PRE_WRITE)',
96
- capture: [
97
- 'Payload completo de `result`.',
98
- 'Campos `reason_code`, `instruction`, `next_action`, `hints`.',
99
- ],
100
- expectedFragments: [
101
- 'reason_code',
102
- 'instruction',
103
- 'next_action',
104
- 'hints',
105
- ],
106
- incs: ['PUMUKI-INC-071', 'PUMUKI-INC-072', 'PUMUKI-INC-073'],
107
- },
108
- {
109
- title: 'MCP auto_execute_ai_start',
110
- mode: 'mcp',
111
- command: 'mcp::auto_execute_ai_start(stage=PRE_WRITE)',
112
- capture: [
113
- 'Payload completo de `result`.',
114
- 'Campos `action`, `reason_code`, `next_action`, `confidence_pct`.',
115
- ],
116
- expectedFragments: [
117
- 'action',
118
- 'reason_code',
119
- 'next_action',
120
- 'confidence_pct',
121
- ],
122
- incs: ['PUMUKI-INC-071', 'PUMUKI-INC-073', 'PUMUKI-INC-076'],
123
- },
124
- ];
125
-
126
- const renderEntry = (params: {
127
- entry: RuralGoS1EvidenceEntry;
128
- consumerRoot: string;
129
- }): string => {
130
- const command = params.entry.mode === 'shell'
131
- ? `cd ${params.consumerRoot} && ${params.entry.command}`
132
- : params.entry.command;
133
-
134
- return [
135
- `### ${params.entry.title}`,
136
- '',
137
- `- mode: ${params.entry.mode}`,
138
- `- command: \`${command}\``,
139
- `- incs: ${params.entry.incs.join(', ')}`,
140
- '- capture:',
141
- ...params.entry.capture.map((item) => ` - ${item}`),
142
- '- expected_fragments:',
143
- ...params.entry.expectedFragments.map((item) => ` - ${item}`),
144
- '',
145
- ].join('\n');
146
- };
147
-
148
- export const buildRuralGoS1EvidencePackMarkdown = (
149
- options: RuralGoS1EvidencePackOptions
150
- ): string => {
151
- const pumukiPackageSelector = resolvePumukiPackageSelector(options.packageVersion);
152
- const evidenceEntries: ReadonlyArray<RuralGoS1EvidenceEntry> = EVIDENCE_ENTRIES.map((entry) =>
153
- entry.title === 'PRE_WRITE canónico'
154
- ? {
155
- ...entry,
156
- command: `npx --yes --package ${pumukiPackageSelector} pumuki sdd validate --stage=PRE_WRITE --json`,
157
- }
158
- : entry
159
- );
160
-
161
- return [
162
- '# RuralGo S1 Evidence Pack',
163
- '',
164
- `- generated_at: ${options.generatedAt}`,
165
- `- consumer_root: \`${options.consumerRoot}\``,
166
- `- package_version: ${options.packageVersion}`,
167
- '- objective: validar S1 contra PUMUKI-INC-071/073/076 y reunir soporte adicional para 070/072.',
168
- '',
169
- '## Uso',
170
- '',
171
- '- Ejecuta los comandos shell desde el consumer real tras repinear la semver publicada.',
172
- '- Captura las respuestas MCP desde una sesión conectada al servidor enterprise.',
173
- '- No muevas un INC a `FIXED` si falta convergencia entre lifecycle, hooks y MCP.',
174
- '',
175
- ...evidenceEntries.map((entry) =>
176
- renderEntry({
177
- entry,
178
- consumerRoot: options.consumerRoot,
179
- })
180
- ),
181
- '## Criterio rápido de cierre',
182
- '',
183
- '- `PUMUKI-INC-071`: candidato a FIXED si lifecycle, hooks y MCP exponen contrato efectivo del repo.',
184
- '- `PUMUKI-INC-073`: candidato a FIXED si el verde parcial desaparece y se ve governance real.',
185
- '- `PUMUKI-INC-076`: candidato a FIXED si hooks y surfaces muestran GitFlow/naming como parte del gate.',
186
- '- `PUMUKI-INC-072`: no cerrar salvo que el pre-edit gate aparezca de forma homogénea y automática.',
187
- '',
188
- ].join('\n');
189
- };
190
-
191
- export const writeRuralGoS1EvidencePack = (params: {
192
- cwd: string;
193
- outFile: string;
194
- markdown: string;
195
- }): string => {
196
- const outputPath = resolve(params.cwd, params.outFile);
197
- mkdirSync(dirname(outputPath), { recursive: true });
198
- writeFileSync(outputPath, params.markdown, 'utf8');
199
- return outputPath;
200
- };