pumuki 6.3.17 → 6.3.19
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 +217 -182
- package/VERSION +1 -1
- package/assets/benchmarks/c021-baseline-precommit-v001-baseline.json +145 -0
- package/assets/benchmarks/c021-baseline-precommit-v001.json +7679 -0
- package/assets/benchmarks/c022-baseline-precommit-v001-baseline.json +101 -0
- package/assets/benchmarks/c022-baseline-precommit-v001.json +4121 -0
- package/assets/benchmarks/c023-hotspots-mvp-t0-v001-baseline.json +2532 -0
- package/assets/benchmarks/c023-hotspots-mvp-t0-v001.json +2532 -0
- package/assets/benchmarks/legacy-baseline-precommit-v012.json +367 -0
- package/assets/readme/menu-option1/01-menu-consumer-v2.png +0 -0
- package/assets/readme/menu-option1/02-option1-preflight-block.png +0 -0
- package/assets/readme/menu-option1/03-option1-final-summary-block.png +0 -0
- package/assets/readme/menu-option1/04-option1-preflight-pass.png +0 -0
- package/assets/readme/menu-option1/05-option1-final-summary-pass.png +0 -0
- package/assets/readme/menu-option1/06-menu-after-run-pass.png +0 -0
- package/core/facts/HeuristicFact.ts +1 -0
- package/core/facts/detectors/browser/index.test.ts +48 -0
- package/core/facts/detectors/browser/index.ts +74 -56
- package/core/facts/detectors/contract.test.ts +29 -0
- package/core/facts/detectors/contract.ts +63 -0
- package/core/facts/detectors/process/core.test.ts +64 -0
- package/core/facts/detectors/process/core.ts +130 -103
- package/core/facts/detectors/process/shell.test.ts +49 -0
- package/core/facts/detectors/process/shell.ts +163 -149
- package/core/facts/detectors/process/spawn.test.ts +49 -0
- package/core/facts/detectors/process/spawn.ts +68 -106
- package/core/facts/detectors/security/index.ts +21 -2
- package/core/facts/detectors/security/securityCredentials.test.ts +68 -0
- package/core/facts/detectors/security/securityCredentials.ts +182 -160
- package/core/facts/detectors/security/securityCrypto.test.ts +48 -0
- package/core/facts/detectors/security/securityCrypto.ts +97 -79
- package/core/facts/detectors/security/securityJwt.test.ts +67 -0
- package/core/facts/detectors/security/securityJwt.ts +128 -110
- package/core/facts/detectors/security/securityTls.test.ts +35 -0
- package/core/facts/detectors/security/securityTls.ts +89 -77
- package/core/facts/detectors/typescript/index.test.ts +383 -0
- package/core/facts/detectors/typescript/index.ts +415 -11
- package/core/facts/detectors/utils/astHelpers.test.ts +43 -1
- package/core/facts/detectors/utils/astHelpers.ts +57 -2
- package/core/facts/extractHeuristicFacts.ts +286 -5
- package/core/gate/evaluateRules.test.ts +95 -0
- package/core/gate/evaluateRules.ts +173 -7
- package/core/rules/presets/astHeuristicsRuleSet.test.ts +3 -0
- package/core/rules/presets/astHeuristicsRuleSet.ts +2 -0
- package/core/rules/presets/heuristics/commonLegacy.ts +138 -0
- package/core/rules/presets/heuristics/typescript.ts +18 -0
- package/core/utils/stableStringify.ts +1 -1
- package/docs/API_REFERENCE.md +71 -1
- package/docs/CONFIGURATION.md +50 -0
- package/docs/INSTALLATION.md +3 -0
- package/docs/OPERATIONS.md +74 -0
- package/docs/README.md +15 -6
- package/docs/README_MENU_WALKTHROUGH.md +65 -0
- package/docs/REFRACTOR_PROGRESS.md +1303 -118
- package/docs/RELEASE_NOTES.md +29 -0
- package/docs/TESTING.md +13 -0
- package/docs/USAGE.md +154 -2
- package/docs/evidence-v2.1.md +40 -1
- package/docs/validation/README.md +19 -60
- package/docs/validation/c022-phase-acceptance-contract.md +172 -0
- package/docs/validation/detection-audit-baseline.md +60 -0
- package/integrations/config/compileSkillsLock.ts +22 -4
- package/integrations/config/coreSkillsLock.ts +30 -0
- package/integrations/config/heuristics.test.ts +28 -1
- package/integrations/config/heuristics.ts +5 -1
- package/integrations/config/loadProjectRules.ts +1 -1
- package/integrations/config/skillsCompilerTemplates.ts +54 -0
- package/integrations/config/skillsCustomRules.ts +369 -0
- package/integrations/config/skillsDetectorRegistry.ts +155 -0
- package/integrations/config/skillsEffectiveLock.ts +140 -0
- package/integrations/config/skillsLock.ts +31 -4
- package/integrations/config/skillsMarkdownRules.ts +348 -0
- package/integrations/config/skillsPolicy.ts +3 -3
- package/integrations/config/skillsRuleSet.ts +349 -56
- package/integrations/config/skillsSources.ts +1 -1
- package/integrations/evidence/buildEvidence.ts +101 -1
- package/integrations/evidence/evaluationMetrics.ts +46 -0
- package/integrations/evidence/platformSummary.test.ts +143 -0
- package/integrations/evidence/platformSummary.ts +185 -0
- package/integrations/evidence/repoState.ts +7 -4
- package/integrations/evidence/rulesCoverage.ts +110 -0
- package/integrations/evidence/schema.test.ts +40 -0
- package/integrations/evidence/schema.ts +49 -0
- package/integrations/evidence/writeEvidence.test.ts +152 -0
- package/integrations/evidence/writeEvidence.ts +113 -8
- package/integrations/gate/evaluateAiGate.ts +140 -0
- package/integrations/gate/stagePolicies.ts +53 -184
- package/integrations/git/GitService.ts +89 -2
- package/integrations/git/collectFileChurnOwnership.ts +206 -0
- package/integrations/git/composeFileTechnicalRiskSignals.ts +239 -0
- package/integrations/git/evaluateStagedIOS.ts +4 -4
- package/integrations/git/findingTraceability.ts +18 -8
- package/integrations/git/index.ts +3 -0
- package/integrations/git/rankFileHotspots.ts +165 -0
- package/integrations/git/resolveGitRefs.ts +2 -2
- package/integrations/git/runCliCommand.ts +3 -3
- package/integrations/git/runPlatformGate.ts +322 -29
- package/integrations/git/runPlatformGateEvaluation.ts +125 -2
- package/integrations/git/runPlatformGateEvidence.ts +23 -0
- package/integrations/git/runPlatformGateFacts.ts +42 -0
- package/integrations/git/runPlatformGateOutput.ts +40 -2
- package/integrations/git/stageRunners.ts +73 -12
- package/integrations/lifecycle/adapter.ts +1 -1
- package/integrations/lifecycle/analyticsHotspots.ts +128 -0
- package/integrations/lifecycle/artifacts.ts +3 -3
- package/integrations/lifecycle/cli.ts +521 -65
- package/integrations/lifecycle/doctor.ts +1 -1
- package/integrations/lifecycle/gitService.ts +19 -15
- package/integrations/lifecycle/index.ts +141 -0
- package/integrations/lifecycle/install.ts +3 -0
- package/integrations/lifecycle/npmService.ts +2 -2
- package/integrations/lifecycle/operationalMemoryContract.ts +427 -0
- package/integrations/lifecycle/operationalMemorySignals.ts +305 -0
- package/integrations/lifecycle/operationalMemorySnapshot.ts +151 -0
- package/integrations/lifecycle/remove.ts +1 -1
- package/integrations/lifecycle/saasEnterpriseAnalytics.ts +179 -0
- package/integrations/lifecycle/saasFederation.ts +318 -0
- package/integrations/lifecycle/saasIngestionAudit.ts +136 -0
- package/integrations/lifecycle/saasIngestionAuth.ts +115 -0
- package/integrations/lifecycle/saasIngestionBuilder.ts +56 -0
- package/integrations/lifecycle/saasIngestionContract.ts +419 -0
- package/integrations/lifecycle/saasIngestionGovernance.ts +205 -0
- package/integrations/lifecycle/saasIngestionIdempotency.ts +25 -0
- package/integrations/lifecycle/saasIngestionMetrics.ts +181 -0
- package/integrations/lifecycle/saasIngestionTransport.ts +359 -0
- package/integrations/lifecycle/state.ts +21 -21
- package/integrations/lifecycle/status.ts +1 -1
- package/integrations/lifecycle/update.ts +3 -1
- package/integrations/mcp/aiGateCheck.ts +43 -0
- package/integrations/mcp/enterpriseServer.ts +13 -20
- package/integrations/mcp/evidencePayloadCollectionsPaging.ts +7 -5
- package/integrations/mcp/evidencePayloadConfig.ts +3 -3
- package/integrations/notifications/emitAuditSummaryNotification.ts +135 -0
- package/integrations/platform/detectAndroid.ts +1 -4
- package/integrations/platform/detectBackend.ts +18 -1
- package/integrations/platform/detectFrontend.ts +23 -8
- package/integrations/platform/detectPlatforms.ts +38 -1
- package/integrations/sdd/openSpecCli.ts +3 -3
- package/integrations/sdd/policy.ts +2 -2
- package/integrations/sdd/sessionStore.ts +19 -19
- package/integrations/sdd/types.ts +1 -1
- package/integrations/tdd/contract.ts +160 -0
- package/integrations/tdd/enforcement.ts +335 -0
- package/integrations/tdd/index.ts +6 -0
- package/integrations/tdd/scope.ts +184 -0
- package/integrations/tdd/types.ts +33 -0
- package/integrations/tdd/waiver.ts +111 -0
- package/package.json +28 -21
- package/scripts/adapter-real-session-git-lib.ts +2 -2
- package/scripts/adapter-session-status-command-lib.ts +2 -2
- package/scripts/adapter-session-status-hook-log-filter-lib.ts +36 -10
- package/scripts/adapter-session-status-log-utils-lib.ts +40 -5
- package/scripts/adapter-session-status-writes-log-filter-lib.ts +13 -3
- package/scripts/adapters/install-agent-config.ts +1 -1
- package/scripts/build-adapter-readiness.ts +2 -2
- package/scripts/build-adapter-real-session-report.ts +2 -2
- package/scripts/build-consumer-startup-triage-runner-lib.ts +2 -2
- package/scripts/build-consumer-startup-triage.ts +2 -2
- package/scripts/build-consumer-startup-unblock-status.ts +2 -2
- package/scripts/build-consumer-support-ticket-draft.ts +2 -2
- package/scripts/build-legacy-parity-report.ts +78 -0
- package/scripts/build-mock-consumer-ab-report.ts +4 -3
- package/scripts/build-mock-consumer-startup-triage.ts +2 -2
- package/scripts/build-phase5-blockers-readiness.ts +2 -2
- package/scripts/build-phase5-execution-closure-status.ts +2 -2
- package/scripts/build-phase5-external-handoff.ts +2 -2
- package/scripts/c020-benchmark-lib.ts +86 -0
- package/scripts/check-package-manifest.ts +116 -19
- package/scripts/clean-validation-artifacts.ts +2 -2
- package/scripts/collect-consumer-ci-artifacts-gh-command-lib.ts +2 -2
- package/scripts/consumer-ci-auth-check-contract.ts +2 -1
- package/scripts/consumer-ci-auth-check-gh-lib.ts +2 -2
- package/scripts/consumer-support-bundle-contract.ts +5 -1
- package/scripts/consumer-support-bundle-gh-command-lib.ts +2 -2
- package/scripts/consumer-workflow-lint-command-lib.ts +2 -2
- package/scripts/framework-menu-action-contract.ts +3 -0
- package/scripts/framework-menu-actions-diagnostics-maintenance-lib.ts +26 -2
- package/scripts/framework-menu-actions-gates-stage-lib.ts +15 -0
- package/scripts/framework-menu-advanced-view-lib.ts +136 -0
- package/scripts/framework-menu-builders-maintenance.ts +4 -0
- package/scripts/framework-menu-builders.ts +1 -0
- package/scripts/framework-menu-consumer-actions-lib.ts +74 -0
- package/scripts/framework-menu-consumer-preflight-lib.ts +230 -0
- package/scripts/framework-menu-consumer-runtime-lib.ts +233 -0
- package/scripts/framework-menu-evidence-summary-lib.ts +258 -0
- package/scripts/framework-menu-gate-lib.ts +98 -0
- package/scripts/framework-menu-layout-lib.ts +116 -0
- package/scripts/framework-menu-legacy-audit-lib.ts +1229 -0
- package/scripts/framework-menu-legibility-lib.ts +92 -0
- package/scripts/framework-menu-matrix-baseline-lib.ts +107 -0
- package/scripts/framework-menu-matrix-canary-lib.ts +260 -0
- package/scripts/framework-menu-matrix-evidence-lib.ts +67 -0
- package/scripts/framework-menu-matrix-runner-lib.ts +99 -0
- package/scripts/framework-menu-prompts.ts +19 -0
- package/scripts/framework-menu-rule-coverage-diagnostics-lib.ts +213 -0
- package/scripts/framework-menu-runner-git-lib.ts +2 -2
- package/scripts/framework-menu-runner-process-lib.ts +3 -3
- package/scripts/framework-menu-runners-validation-custom-rules-lib.ts +11 -0
- package/scripts/framework-menu-runners-validation-hardmode-lib.ts +38 -4
- package/scripts/framework-menu-runners-validation-notifications-lib.ts +20 -0
- package/scripts/framework-menu-runners-validation-rule-coverage-lib.ts +18 -0
- package/scripts/framework-menu-runners-validation.ts +3 -0
- package/scripts/framework-menu-runners.ts +2 -0
- package/scripts/framework-menu-skills-lib.ts +3 -2
- package/scripts/framework-menu-system-notifications-lib.ts +191 -0
- package/scripts/framework-menu-ui-components-lib.ts +220 -0
- package/scripts/framework-menu-ui-version-lib.ts +6 -0
- package/scripts/framework-menu.ts +75 -79
- package/scripts/gitflow-cli-lib.ts +263 -0
- package/scripts/gitflow.ts +7 -0
- package/scripts/import-custom-skills.ts +74 -0
- package/scripts/legacy-parity-report-lib.ts +406 -0
- package/scripts/package-install-smoke-command-lib.ts +2 -2
- package/scripts/package-manifest-lib.ts +1 -0
- package/scripts/phase5-execution-closure-runner-exec-command-lib.ts +2 -2
- package/scripts/run-c020-benchmark.ts +154 -0
- package/scripts/run-phase5-execution-closure.ts +2 -2
- package/skills.lock.json +8874 -175
- package/docs/validation/adapter-hook-runtime-local-report.md +0 -45
- package/docs/validation/adapter-real-session-report-template.md +0 -63
- package/docs/validation/consumer-ci-startup-failure-playbook.md +0 -181
- package/docs/validation/github-support-ticket-template-startup-failure.md +0 -84
package/README.md
CHANGED
|
@@ -1,162 +1,165 @@
|
|
|
1
1
|
# Pumuki
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
[](https://www.npmjs.com/package/pumuki)
|
|
4
6
|
[](https://github.com/SwiftEnProfundidad/ast-intelligence-hooks/actions/workflows/ci.yml)
|
|
5
7
|
[](LICENSE)
|
|
6
8
|
|
|
7
9
|
Enterprise governance framework for AI-assisted software delivery.
|
|
8
10
|
|
|
9
|
-
Pumuki
|
|
11
|
+
Pumuki gives engineering teams one deterministic execution model across local development, hooks, and CI:
|
|
10
12
|
|
|
11
|
-
`Facts -> Rules -> Gate -> ai_evidence v2.1`
|
|
13
|
+
`Facts -> Rules -> Gate -> .ai_evidence.json (v2.1)`
|
|
12
14
|
|
|
13
|
-
##
|
|
15
|
+
## Who This README Is For
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
| Profile | Use this path first |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Consumer repository team | [5-Minute Quick Start (Consumer)](#5-minute-quick-start-consumer) |
|
|
20
|
+
| Framework maintainers (this repo) | [Framework Maintainer Flow](#framework-maintainer-flow-this-repo) |
|
|
21
|
+
| Platform/architecture owners | [Enterprise Operations Baseline](#enterprise-operations-baseline) |
|
|
16
22
|
|
|
17
|
-
-
|
|
18
|
-
- Unified stage model: `PRE_WRITE`, `PRE_COMMIT`, `PRE_PUSH`, `CI`.
|
|
19
|
-
- Multi-platform rule evaluation (iOS, Android, Backend, Frontend).
|
|
20
|
-
- Mandatory OpenSpec/SDD policy enforcement.
|
|
21
|
-
- Optional MCP runtime for agent integrations.
|
|
23
|
+
## 5-Minute Quick Start (Consumer)
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Prerequisites:
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
- Node.js `>= 18`
|
|
28
|
+
- npm `>= 9`
|
|
29
|
+
- Git repository
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
Install and bootstrap:
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npm install --save-exact pumuki
|
|
35
|
+
npx --yes pumuki install
|
|
36
|
+
npx --yes pumuki doctor
|
|
37
|
+
npx --yes pumuki status
|
|
38
|
+
```
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
OpenSpec/SDD baseline:
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
```bash
|
|
43
|
+
npx --yes pumuki sdd status
|
|
44
|
+
mkdir -p openspec/changes/<change-id>
|
|
45
|
+
npx --yes pumuki sdd session --open --change=<change-id>
|
|
46
|
+
npx --yes pumuki sdd validate --stage=PRE_COMMIT
|
|
47
|
+
```
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
Run local gates:
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
```bash
|
|
52
|
+
npx --yes pumuki-pre-write
|
|
53
|
+
npx --yes pumuki-pre-commit
|
|
54
|
+
```
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
Run push/CI gates (requires proper git context):
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
```bash
|
|
59
|
+
git push --set-upstream origin <branch>
|
|
60
|
+
npx --yes pumuki-pre-push
|
|
61
|
+
npx --yes pumuki-ci
|
|
62
|
+
```
|
|
49
63
|
|
|
50
|
-
|
|
64
|
+
Expected behavior:
|
|
51
65
|
|
|
52
|
-
- `PRE_WRITE`:
|
|
53
|
-
- `
|
|
54
|
-
-
|
|
66
|
+
- `PRE_WRITE` and `PRE_COMMIT`: should pass when SDD session is valid and rules are satisfied.
|
|
67
|
+
- `PRE_PUSH`: blocks if branch has no upstream tracking reference.
|
|
68
|
+
- `CI`: requires a valid diff range context (not `HEAD..HEAD` with ambiguous range).
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
## Why Pumuki
|
|
57
71
|
|
|
58
|
-
|
|
72
|
+
Modern teams need fast feedback with strict governance. Pumuki combines:
|
|
59
73
|
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
74
|
+
- Deterministic enforcement per stage (`PRE_WRITE`, `PRE_COMMIT`, `PRE_PUSH`, `CI`).
|
|
75
|
+
- A single evidence contract (`.ai_evidence.json`, v2.1) for auditability and automation.
|
|
76
|
+
- Multi-platform governance (iOS, Android, Backend, Frontend).
|
|
77
|
+
- Unified skills engine with deterministic precedence (`core -> repo -> custom`).
|
|
78
|
+
- Mandatory OpenSpec/SDD checks for enterprise change control.
|
|
79
|
+
- Unified CLI plus optional MCP servers for agent-driven workflows.
|
|
64
80
|
|
|
65
|
-
|
|
81
|
+
## Enterprise Execution Model
|
|
66
82
|
|
|
67
|
-
|
|
83
|
+
Each execution follows the same pipeline:
|
|
68
84
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- `opencode`
|
|
85
|
+
1. Facts extraction from staged/range/repo scope.
|
|
86
|
+
2. Rule evaluation by platform and stage policy.
|
|
87
|
+
3. Gate decision (`PASS`, `WARN`, `BLOCK`) with deterministic thresholds.
|
|
88
|
+
4. Evidence emission (`.ai_evidence.json`) with findings, metadata, and coverage telemetry.
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
Rules resolution order:
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
1. Core rules (embedded package snapshot).
|
|
93
|
+
2. Repo rules (`skills.lock.json`), optional.
|
|
94
|
+
3. Custom rules (`.pumuki/custom-rules.json`), optional.
|
|
78
95
|
|
|
79
|
-
|
|
80
|
-
- `npm >= 9`
|
|
81
|
-
- `git`
|
|
96
|
+
Conflict policy:
|
|
82
97
|
|
|
83
|
-
|
|
98
|
+
- `custom > repo > core` (last writer wins by `ruleId`).
|
|
99
|
+
- Platform rules activate only for detected platforms.
|
|
100
|
+
- `generic/text` rules remain available as cross-platform governance guards.
|
|
84
101
|
|
|
85
|
-
|
|
86
|
-
npm install --save-exact pumuki
|
|
87
|
-
```
|
|
102
|
+
Rule modes:
|
|
88
103
|
|
|
89
|
-
|
|
104
|
+
- `AUTO`: mapped to deterministic detectors/heuristics.
|
|
105
|
+
- `DECLARATIVE`: valid only when explicitly declared in lock/custom payload (no silent fallback for rules extracted from skills markdown).
|
|
90
106
|
|
|
91
|
-
|
|
92
|
-
npx --yes pumuki install
|
|
93
|
-
```
|
|
107
|
+
## Core Capabilities
|
|
94
108
|
|
|
95
|
-
|
|
109
|
+
1. Deterministic stage gates with consistent exit semantics.
|
|
110
|
+
2. Evidence v2.1 with rules coverage enforcement and stable ordering.
|
|
111
|
+
3. Unified skills rules engine (core + repo + custom).
|
|
112
|
+
4. Unified AI gate behavior across CLI and MCP surfaces.
|
|
113
|
+
5. Mandatory OpenSpec/SDD policy checks.
|
|
114
|
+
6. Interactive menu UX (consumer + advanced modes).
|
|
115
|
+
7. Hard mode policy hardening (`.pumuki/hard-mode.json` + env overrides).
|
|
116
|
+
8. Lifecycle commands for install/update/diagnostics/teardown.
|
|
117
|
+
9. Provider-agnostic adapter scaffolding (`codex`, `claude`, `cursor`, `windsurf`, `opencode`).
|
|
118
|
+
10. Optional MCP servers for evidence and enterprise context.
|
|
96
119
|
|
|
97
|
-
|
|
98
|
-
npx --yes pumuki doctor
|
|
99
|
-
npx --yes pumuki status
|
|
100
|
-
npx --yes pumuki sdd status
|
|
101
|
-
```
|
|
120
|
+
## Framework Maintainer Flow (This Repo)
|
|
102
121
|
|
|
103
|
-
|
|
122
|
+
Use this only when working in the Pumuki framework repository itself:
|
|
104
123
|
|
|
105
124
|
```bash
|
|
106
|
-
|
|
125
|
+
npm run framework:menu
|
|
126
|
+
PUMUKI_MENU_UI_V2=1 npm run framework:menu
|
|
127
|
+
PUMUKI_MENU_MODE=advanced npm run framework:menu
|
|
107
128
|
```
|
|
108
129
|
|
|
109
|
-
|
|
130
|
+
Skills engine operations:
|
|
110
131
|
|
|
111
132
|
```bash
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
133
|
+
npm run skills:compile
|
|
134
|
+
npm run skills:lock:check
|
|
135
|
+
npm run skills:import:custom
|
|
136
|
+
npm run skills:import:custom -- --source <absolute-path-to-SKILL.md> --source <second-absolute-path-to-SKILL.md>
|
|
116
137
|
```
|
|
117
138
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Pumuki supports hard-mode policy resolution via `.pumuki/hard-mode.json`.
|
|
121
|
-
|
|
122
|
-
Example:
|
|
139
|
+
Adapter scaffolding:
|
|
123
140
|
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
141
|
+
```bash
|
|
142
|
+
npx --yes pumuki adapter install --agent=codex --dry-run
|
|
143
|
+
npx --yes pumuki adapter install --agent=cursor
|
|
144
|
+
npm run adapter:install -- --agent=claude
|
|
129
145
|
```
|
|
130
146
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
- `critical-high`
|
|
134
|
-
|
|
135
|
-
Environment overrides:
|
|
147
|
+
Operational matrix/canary:
|
|
136
148
|
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
- policy trace is exposed in AI Gate outputs
|
|
143
|
-
- hard mode state is captured in `repo_state.lifecycle.hard_mode`
|
|
144
|
-
|
|
145
|
-
## PRE_WRITE Contract
|
|
149
|
+
```bash
|
|
150
|
+
node --import tsx -e "const mod = await import('./scripts/framework-menu-matrix-runner-lib.ts'); const report = await mod.default.runConsumerMenuMatrix({ repoRoot: process.cwd() }); console.log(JSON.stringify(report, null, 2));"
|
|
151
|
+
node --import tsx -e "const mod = await import('./scripts/framework-menu-matrix-canary-lib.ts'); const report = await mod.default.runConsumerMenuCanary({ repoRoot: process.cwd() }); console.log(JSON.stringify(report, null, 2));"
|
|
152
|
+
```
|
|
146
153
|
|
|
147
|
-
|
|
154
|
+
Legacy parity report (strict comparator):
|
|
148
155
|
|
|
149
156
|
```bash
|
|
150
|
-
|
|
157
|
+
node --import tsx scripts/build-legacy-parity-report.ts --legacy=<legacy-evidence-path> --enterprise=<enterprise-evidence-path> --out=<output-path>
|
|
151
158
|
```
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- `sdd`
|
|
156
|
-
- `ai_gate`
|
|
157
|
-
- `telemetry.chain = "pumuki->ai_gate->ai_evidence"`
|
|
160
|
+
## Command Reference
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
### Lifecycle (Consumer)
|
|
160
163
|
|
|
161
164
|
```bash
|
|
162
165
|
npx --yes pumuki install
|
|
@@ -167,125 +170,157 @@ npx --yes pumuki doctor
|
|
|
167
170
|
npx --yes pumuki status
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- `pumuki remove` is the full teardown path (hooks + artifacts + dependency cleanup logic).
|
|
173
|
-
- `npm uninstall pumuki` only removes dependency entries.
|
|
174
|
-
|
|
175
|
-
## Adapter Commands
|
|
173
|
+
### SDD / OpenSpec (Consumer)
|
|
176
174
|
|
|
177
175
|
```bash
|
|
178
|
-
npx --yes pumuki
|
|
179
|
-
npx --yes pumuki
|
|
180
|
-
|
|
176
|
+
npx --yes pumuki sdd status
|
|
177
|
+
npx --yes pumuki sdd session --open --change=<change-id>
|
|
178
|
+
npx --yes pumuki sdd session --refresh
|
|
179
|
+
npx --yes pumuki sdd session --close
|
|
180
|
+
npx --yes pumuki sdd validate --stage=PRE_COMMIT
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Pumuki core does not depend on MCP, but MCP is available for external agents.
|
|
186
|
-
|
|
187
|
-
Evidence MCP:
|
|
183
|
+
### Stage Gates (Consumer)
|
|
188
184
|
|
|
189
185
|
```bash
|
|
190
|
-
npx --yes pumuki-
|
|
186
|
+
npx --yes pumuki-pre-write
|
|
187
|
+
npx --yes pumuki-pre-commit
|
|
188
|
+
npx --yes pumuki-pre-push
|
|
189
|
+
npx --yes pumuki-ci
|
|
191
190
|
```
|
|
192
191
|
|
|
193
|
-
|
|
192
|
+
### MCP Servers (Optional, Long-Running)
|
|
194
193
|
|
|
195
194
|
```bash
|
|
195
|
+
npx --yes pumuki-mcp-evidence
|
|
196
196
|
npx --yes pumuki-mcp-enterprise
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
## Validation and Diagnostics (Framework-Only)
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
- `docs/MCP_SERVERS.md`
|
|
203
|
-
- `docs/MCP_AGENT_CONTEXT_CONSUMPTION.md`
|
|
204
|
-
|
|
205
|
-
## Framework Repository (This Repo)
|
|
201
|
+
These commands are for maintainers and may require additional arguments, external repo context, or authenticated GitHub access.
|
|
206
202
|
|
|
207
203
|
```bash
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
npm
|
|
204
|
+
npm run validation:consumer-ci-artifacts -- --repo <owner/repo>
|
|
205
|
+
npm run validation:consumer-ci-auth-check -- --repo <owner/repo>
|
|
206
|
+
npm run validation:consumer-workflow-lint -- --repo-path <absolute-path-to-consumer-repo>
|
|
207
|
+
npm run validation:consumer-support-bundle -- --repo <owner/repo>
|
|
208
|
+
npm run validation:consumer-support-ticket-draft
|
|
209
|
+
npm run validation:consumer-startup-unblock-status
|
|
210
|
+
npm run validation:consumer-startup-triage -- --repo <owner/repo> --skip-workflow-lint
|
|
211
|
+
npm run validation:mock-consumer-ab-report
|
|
212
|
+
npm run validation:adapter-readiness
|
|
213
|
+
npm run validation:adapter-session-status
|
|
214
|
+
npm run validation:adapter-real-session-report
|
|
215
|
+
npm run validation:phase5-blockers-readiness
|
|
216
|
+
npm run validation:phase5-execution-closure-status
|
|
217
|
+
npm run validation:phase5-execution-closure -- --repo <owner/repo> --skip-workflow-lint
|
|
218
|
+
npm run validation:phase5-external-handoff
|
|
219
|
+
npm run validation:clean-artifacts
|
|
211
220
|
```
|
|
212
221
|
|
|
213
|
-
|
|
222
|
+
Important:
|
|
214
223
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
npm run validation:package-manifest
|
|
220
|
-
npm run skills:lock:check
|
|
221
|
-
```
|
|
224
|
+
- Several validation scripts intentionally return non-zero when verdict is `BLOCKED`, `PENDING`, or `MISSING_INPUTS`.
|
|
225
|
+
- Non-zero in these scripts is often diagnostic output, not a runtime crash.
|
|
226
|
+
- `validation:consumer-support-ticket-draft` expects an existing support bundle generated by `validation:consumer-support-bundle`.
|
|
227
|
+
- If workflow lint is required in your flow, provide `--repo-path` and `--actionlint-bin`; otherwise use `--skip-workflow-lint`.
|
|
222
228
|
|
|
223
|
-
|
|
229
|
+
## Menu Walkthrough and Screenshots
|
|
224
230
|
|
|
225
|
-
|
|
226
|
-
npm run framework:menu
|
|
227
|
-
```
|
|
231
|
+
### Capture 1 — Consumer Menu (v2)
|
|
228
232
|
|
|
229
|
-
Consumer
|
|
233
|
+

|
|
230
234
|
|
|
231
|
-
|
|
232
|
-
npx --yes pumuki-framework
|
|
233
|
-
```
|
|
235
|
+
### Capture 2 — Option 1 Pre-flight (BLOCK context)
|
|
234
236
|
|
|
235
|
-
|
|
237
|
+

|
|
236
238
|
|
|
237
|
-
|
|
238
|
-
- `pumuki-framework`
|
|
239
|
-
- `pumuki-pre-write`
|
|
240
|
-
- `pumuki-pre-commit`
|
|
241
|
-
- `pumuki-pre-push`
|
|
242
|
-
- `pumuki-ci`
|
|
243
|
-
- `pumuki-mcp-evidence`
|
|
244
|
-
- `pumuki-mcp-enterprise`
|
|
239
|
+
### Capture 3 — Option 1 Final Summary (BLOCK)
|
|
245
240
|
|
|
246
|
-
|
|
241
|
+

|
|
247
242
|
|
|
248
|
-
|
|
243
|
+
### Capture 4 — Option 1 Pre-flight (PASS scenario)
|
|
249
244
|
|
|
250
|
-
|
|
251
|
-
npx --yes pumuki doctor
|
|
252
|
-
npx --yes pumuki status
|
|
253
|
-
```
|
|
245
|
+

|
|
254
246
|
|
|
255
|
-
|
|
247
|
+
### Capture 5 — Option 1 Final Summary (PASS)
|
|
256
248
|
|
|
257
|
-
|
|
258
|
-
git push --set-upstream origin <branch>
|
|
259
|
-
```
|
|
249
|
+

|
|
260
250
|
|
|
261
|
-
|
|
251
|
+
### Capture 6 — Menu Status After PASS Run
|
|
262
252
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
253
|
+

|
|
254
|
+
|
|
255
|
+
Extended annotated walkthrough:
|
|
266
256
|
|
|
267
|
-
|
|
257
|
+
- `docs/README_MENU_WALKTHROUGH.md`
|
|
268
258
|
|
|
269
|
-
|
|
259
|
+
## Enterprise Operations Baseline
|
|
270
260
|
|
|
271
|
-
|
|
261
|
+
Pumuki production SaaS operation baseline is defined in:
|
|
272
262
|
|
|
273
|
-
- `docs/
|
|
274
|
-
- `docs/INSTALLATION.md`
|
|
275
|
-
- `docs/USAGE.md`
|
|
276
|
-
- `docs/CONFIGURATION.md`
|
|
277
|
-
- `docs/API_REFERENCE.md`
|
|
278
|
-
- `docs/evidence-v2.1.md`
|
|
279
|
-
- `docs/MCP_SERVERS.md`
|
|
280
|
-
- `docs/MCP_EVIDENCE_CONTEXT_SERVER.md`
|
|
281
|
-
- `docs/validation/README.md`
|
|
263
|
+
- `docs/OPERATIONS.md`
|
|
282
264
|
|
|
283
|
-
|
|
265
|
+
Highlights:
|
|
284
266
|
|
|
285
|
-
-
|
|
286
|
-
- `
|
|
287
|
-
-
|
|
267
|
+
- Minimum SLO/SLA targets for ingestion availability, latency, freshness, and isolation.
|
|
268
|
+
- Severity model (`SEV1/SEV2/SEV3`) with response and RCA expectations.
|
|
269
|
+
- Mandatory controls for tenant/repo isolation, auth policy, idempotency, and auditing.
|
|
270
|
+
- Go-live checklist and rollback requirements.
|
|
271
|
+
|
|
272
|
+
## Troubleshooting
|
|
273
|
+
|
|
274
|
+
- `OpenSpec change "<id>" not found`: ensure `openspec/changes/<id>` exists before opening session.
|
|
275
|
+
- `SDD_SESSION_MISSING`: open and validate session first.
|
|
276
|
+
- `pre-push blocked: branch has no upstream`: run `git push --set-upstream origin <branch>`.
|
|
277
|
+
- `Missing required argument --repo` / `--repo-path`: pass required flags for validation scripts.
|
|
278
|
+
- Legacy parity report usage requires `--legacy=<path>` and `--enterprise=<path>` (equals form).
|
|
279
|
+
- If menu v2 rendering fails, Pumuki falls back to classic UI.
|
|
280
|
+
|
|
281
|
+
## Documentation Index
|
|
282
|
+
|
|
283
|
+
- Installation: `docs/INSTALLATION.md`
|
|
284
|
+
- Usage: `docs/USAGE.md`
|
|
285
|
+
- Testing: `docs/TESTING.md`
|
|
286
|
+
- API reference: `docs/API_REFERENCE.md`
|
|
287
|
+
- Architecture: `docs/ARCHITECTURE.md`
|
|
288
|
+
- Configuration: `docs/CONFIGURATION.md`
|
|
289
|
+
- Code standards: `docs/CODE_STANDARDS.md`
|
|
290
|
+
- Branch protection: `docs/BRANCH_PROTECTION_GUIDE.md`
|
|
291
|
+
- MCP servers: `docs/MCP_SERVERS.md`
|
|
292
|
+
- MCP evidence server: `docs/MCP_EVIDENCE_CONTEXT_SERVER.md`
|
|
293
|
+
- MCP consumption: `docs/MCP_AGENT_CONTEXT_CONSUMPTION.md`
|
|
294
|
+
- Evidence schema v2.1: `docs/evidence-v2.1.md`
|
|
295
|
+
- Operations policy (SLA/SLO): `docs/OPERATIONS.md`
|
|
296
|
+
- Release notes: `docs/RELEASE_NOTES.md`
|
|
297
|
+
- Changelog: `CHANGELOG.md`
|
|
298
|
+
|
|
299
|
+
## Collaboration
|
|
300
|
+
|
|
301
|
+
Contributions are welcome. For high-quality collaboration:
|
|
302
|
+
|
|
303
|
+
1. Read `docs/CONTRIBUTING.md` and `docs/CODE_STANDARDS.md`.
|
|
304
|
+
2. Create a dedicated branch per change.
|
|
305
|
+
3. Keep scope focused and include deterministic evidence when relevant.
|
|
306
|
+
4. Before opening a PR, run at least:
|
|
307
|
+
- `npm run typecheck`
|
|
308
|
+
- `npm run test:operational-memory`
|
|
309
|
+
- `npm run test:saas-ingestion`
|
|
310
|
+
5. Open a PR with clear problem statement, approach, and validation evidence.
|
|
311
|
+
|
|
312
|
+
## Support and Security
|
|
313
|
+
|
|
314
|
+
- Functional/usage issues: open a GitHub issue with reproducible steps.
|
|
315
|
+
- Enterprise diagnostics: include generated reports from `.audit-reports` when applicable.
|
|
316
|
+
- Security-sensitive findings: use GitHub Security Advisories for coordinated disclosure.
|
|
288
317
|
|
|
289
318
|
## License
|
|
290
319
|
|
|
291
|
-
MIT
|
|
320
|
+
MIT. See `LICENSE`.
|
|
321
|
+
|
|
322
|
+
## If Pumuki Helped You
|
|
323
|
+
|
|
324
|
+
If this project was useful for your team, please consider leaving a GitHub star:
|
|
325
|
+
|
|
326
|
+
[Star Pumuki on GitHub](https://github.com/SwiftEnProfundidad/ast-intelligence-hooks)
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v6.3.
|
|
1
|
+
v6.3.19
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stage": "PRE_COMMIT",
|
|
3
|
+
"audit_mode": "engine",
|
|
4
|
+
"outcome": "BLOCK",
|
|
5
|
+
"files_scanned": 987,
|
|
6
|
+
"total_violations": 146,
|
|
7
|
+
"by_enterprise_severity": {
|
|
8
|
+
"CRITICAL": 42,
|
|
9
|
+
"HIGH": 44,
|
|
10
|
+
"MEDIUM": 60,
|
|
11
|
+
"LOW": 0
|
|
12
|
+
},
|
|
13
|
+
"rules_coverage": {
|
|
14
|
+
"active": 417,
|
|
15
|
+
"evaluated": 417,
|
|
16
|
+
"unevaluated": 0,
|
|
17
|
+
"coverage_ratio": 1
|
|
18
|
+
},
|
|
19
|
+
"top_rules": [
|
|
20
|
+
{
|
|
21
|
+
"ruleId": "common.types.unknown_without_guard",
|
|
22
|
+
"count": 60
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"ruleId": "common.types.undefined_in_base_type",
|
|
26
|
+
"count": 33
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"ruleId": "common.types.record_unknown_requires_type",
|
|
30
|
+
"count": 26
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"ruleId": "common.network.missing_error_handling",
|
|
34
|
+
"count": 6
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"ruleId": "common.error.empty_catch",
|
|
38
|
+
"count": 4
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"ruleId": "skills.backend.no-empty-catch",
|
|
42
|
+
"count": 4
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"ruleId": "skills.frontend.no-empty-catch",
|
|
46
|
+
"count": 4
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"ruleId": "heuristics.ts.child-process-spawn-sync.ast",
|
|
50
|
+
"count": 2
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"ruleId": "heuristics.ts.child-process-exec-file-sync.ast",
|
|
54
|
+
"count": 1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"ruleId": "heuristics.ts.child-process-exec-file-untrusted-args.ast",
|
|
58
|
+
"count": 1
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"ruleId": "heuristics.ts.child-process-exec.ast",
|
|
62
|
+
"count": 1
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"ruleId": "heuristics.ts.dynamic-shell-invocation.ast",
|
|
66
|
+
"count": 1
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"ruleId": "heuristics.ts.process-exit.ast",
|
|
70
|
+
"count": 1
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"ruleId": "workflow.bdd.insufficient_features",
|
|
74
|
+
"count": 1
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"ruleId": "workflow.bdd.missing_feature_files",
|
|
78
|
+
"count": 1
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"top_files": [
|
|
82
|
+
{
|
|
83
|
+
"file": "scripts/framework-menu-matrix-canary-lib.ts",
|
|
84
|
+
"count": 6
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"file": "core/facts/extractHeuristicFacts.ts",
|
|
88
|
+
"count": 4
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"file": "integrations/lifecycle/gitService.ts",
|
|
92
|
+
"count": 4
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"file": "core/facts/detectors/typescript/index.ts",
|
|
96
|
+
"count": 3
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"file": "integrations/config/skillsCustomRules.ts",
|
|
100
|
+
"count": 3
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"file": "integrations/lifecycle/update.ts",
|
|
104
|
+
"count": 3
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"file": "integrations/mcp/enterpriseServer.ts",
|
|
108
|
+
"count": 3
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"file": "scripts/adapter-session-status-writes-log-filter-lib.ts",
|
|
112
|
+
"count": 3
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"file": "PROJECT_ROOT",
|
|
116
|
+
"count": 2
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"file": "core/facts/detectors/browser/index.ts",
|
|
120
|
+
"count": 2
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"file": "core/facts/detectors/process/core.ts",
|
|
124
|
+
"count": 2
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"file": "core/facts/detectors/process/shell.ts",
|
|
128
|
+
"count": 2
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"file": "core/facts/detectors/process/spawn.ts",
|
|
132
|
+
"count": 2
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"file": "core/facts/detectors/security/securityCredentials.ts",
|
|
136
|
+
"count": 2
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"file": "core/facts/detectors/security/securityCrypto.ts",
|
|
140
|
+
"count": 2
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"source": ".audit_tmp/c021-0-t2/enterprise-menu1.json",
|
|
144
|
+
"generated_at": "2026-02-24T09:18:27Z"
|
|
145
|
+
}
|