Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

pumuki

Package Overview
Dependencies
Maintainers
1
Versions
369
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pumuki

Enterprise governance framework for AI-assisted software delivery with Git hooks, SDD/OpenSpec, AST intelligence, evidence, MCP and multi-platform rule enforcement.

latest
Source
npmnpm
Version
6.3.379
Version published
Maintainers
1
Created
Source

Pumuki

Pumuki

npm version CI Node.js version License: MIT

Pumuki is an enterprise governance framework for AI-assisted software delivery.

It turns repository rules, SDD/OpenSpec workflow, Git hooks, AST intelligence, skills contracts, evidence, notifications, an interactive menu and optional MCP servers into one deterministic delivery contract:

Facts -> Rules -> Gate -> Evidence

Pumuki is built for teams that need AI agents and humans to follow the same engineering law: know the active change, evaluate the real diff, block unsafe delivery, explain the reason in developer language, and leave auditable evidence.

Current maturity: advanced beta. The framework is already useful for governed internal adoption and consumer-repository rollout, but the project is still evolving quickly.

Contents

Why Pumuki Exists

AI-assisted development increases delivery speed, but it also increases the risk of ungoverned changes: skipped tests, missing specs, vague evidence, mixed commits, stale repo context, unsafe hooks, and rules that live only in documentation.

Pumuki makes those rules executable.

It is designed to answer operational questions before a change enters the repository:

QuestionPumuki answer
What is being changed?Git scope, SDD context and repository facts.
Which rules apply?Platform rule packs, skills contracts, policy-as-code and project overrides.
Can this change proceed?Deterministic gate decision per stage.
Why was it blocked?Developer-facing cause, file, rule and remediation.
What evidence remains?.ai_evidence.json v2.1 plus optional MCP/telemetry access.

Pumuki does not replace product tests, code review, domain acceptance criteria or security review. It enforces the delivery contract around them.

What Pumuki Does

Pumuki provides a governed delivery surface for modern repositories:

CapabilityWhat it provides
Git lifecycleManaged pre-commit and pre-push hooks, with chained PRE_WRITE by default.
Stage gatesPRE_WRITE, PRE_COMMIT, PRE_PUSH and CI policies with deterministic semantics.
Full auditpumuki audit for tracked-repository evaluation outside a hook.
SDD/OpenSpecChange sessions, validation, evidence sync and state sync.
Session continuityRepo-owned context, SDD state, evidence and MCP resources so a new AI window can resume from facts instead of chat memory.
AST intelligenceRule-backed findings for iOS, Android, backend, frontend and generic TypeScript patterns.
Skills contractsCompiled rules from enterprise skills, with coverage checks and missing-detector protection.
EvidenceStable .ai_evidence.json v2.1 snapshots for auditability and automation.
Developer UXInteractive menu, clear blocking messages, terminal output and system notifications.
MCPOptional evidence and enterprise MCP servers over HTTP or stdio.
AdaptersProvider-agnostic adapter scaffolding for Codex, Claude, Cursor, Windsurf and Opencode.
Policy-as-codeOptional signed stage-policy contract under .pumuki/policy-as-code.json.
TelemetryOptional JSONL and OTLP export for enterprise observability.
Brownfield controlScope-aware gates that avoid blocking a slice for unrelated historical debt.

Architecture

Pumuki governance flow

Pumuki keeps product decisions deterministic by separating domain logic from integrations:

LayerResponsibility
core/*Facts, rules, rule presets and gate decision model.
integrations/*Git scopes, stage policies, evidence, SDD, MCP, notifications and lifecycle adapters.
bin/*Public CLI binaries published by npm.
docs/*Product documentation, operation guides, MCP contracts and rule-pack references.
vendor/skills/*Vendored enterprise skill contracts consumed by the rules compiler.

Core pipeline:

Git scope / repo state
  -> fact extraction
  -> platform detection
  -> rule-pack and skills loading
  -> stage policy evaluation
  -> gate decision
  -> evidence, notification and optional MCP/telemetry output

Pumuki is IDE-agnostic at baseline. Git hooks, gates, lifecycle, evidence and policy enforcement do not require Cursor, Codex, Claude or any other IDE. IDE/client files are opt-in adapter output.

Quick Start

Prerequisites:

  • Node.js >=18
  • npm >=9
  • Git repository

Install Pumuki in a consumer repository:

npm install --save-exact pumuki
npx --yes pumuki bootstrap --enterprise
npx --yes pumuki status --json
npx --yes pumuki doctor --deep --json

After bootstrap, the normal developer path is intentionally small:

git add <files>
git commit
git push

Managed hooks run the required Pumuki lifecycle automatically. Teams only reach for explicit commands when they need setup, diagnostics, CI wiring, SDD evidence, MCP servers or operational recovery.

Open a governed SDD change session when the repository requires explicit SDD/OpenSpec control:

npx --yes pumuki sdd status
npx --yes pumuki sdd session --open --change=<change-id>
npx --yes pumuki sdd validate --stage=PRE_COMMIT --json

Run a full tracked-repository audit only for diagnostics or governance reporting:

npx --yes pumuki audit --json
npx --yes pumuki audit --stage=CI --engine --json

Installation

Consumer Repository

Recommended enterprise path:

npm install --save-exact pumuki
npx --yes pumuki bootstrap --enterprise

What the bootstrap path does:

  • installs managed Git hooks;
  • configures lifecycle state;
  • creates .pumuki/adapter.json when missing;
  • prepares OpenSpec/SDD baseline where applicable;
  • initializes evidence when missing;
  • runs deep diagnostics.

The package postinstall runs a baseline pumuki install in Git repositories unless disabled. That baseline is IDE-agnostic: hooks, lifecycle and .pumuki/adapter.json are the default product surface.

Useful postinstall controls:

VariableEffect
PUMUKI_SKIP_POSTINSTALL=1Disable postinstall bootstrap.
PUMUKI_POSTINSTALL_WITH_MCP=1Include MCP wiring during postinstall.
PUMUKI_POSTINSTALL_MCP_AGENT=<agent>Select optional adapter/client wiring for postinstall.
PUMUKI_SKIP_CHAINED_PRE_WRITE=1Skip chained PRE_WRITE inside managed hooks.

Framework Repository

For maintainers of this repository:

git clone https://github.com/SwiftEnProfundidad/ast-intelligence-hooks.git
cd ast-intelligence-hooks
npm ci
npm run -s typecheck
npm run -s test:deterministic

Uninstallation and Upgrade

Plain npm removal only removes the dependency. It does not remove managed lifecycle state.

GoalCommand
Remove managed hooks and purge runtime artifactsnpx --yes pumuki uninstall --purge-artifacts
Remove lifecycle and dependency from package manifestsnpx --yes pumuki remove
Update to latest package and reapply hooksnpx --yes pumuki update --latest
Standard npm dependency removal onlynpm uninstall pumuki

Recommended upgrade check:

npm install --save-exact pumuki@latest
npx --yes pumuki status --json
npx --yes pumuki doctor --deep --json
npx --yes pumuki policy reconcile --strict --json

If status or doctor reports version drift, use the alignmentCommand printed in the JSON payload.

Command Reference

The main lifecycle binary is pumuki. This section is an operator reference, not the expected daily developer workflow. The intended enterprise path is progressive disclosure:

  • bootstrap once per repository.
  • work through normal Git operations.
  • let managed hooks, CI and policy decide automatically.
  • use explicit commands only for diagnostics, evidence, adapters, SDD operations or automation.
pumuki --version | -v
pumuki bootstrap [--enterprise] [--agent=<name>] [--json]
pumuki install [--with-mcp] [--agent=<name>]
pumuki uninstall [--purge-artifacts]
pumuki remove
pumuki update [--latest|--spec=<package-spec>]
pumuki doctor [--remote-checks] [--deep] [--parity] [--json]
pumuki audit [--stage=PRE_WRITE|PRE_COMMIT|PRE_PUSH|CI] [--engine] [--json]
pumuki status [--json] [--remote-checks]
pumuki menu
pumuki watch [--stage=<stage>] [--scope=<scope>] [--once] [--json]
pumuki loop run --objective=<text> [--max-attempts=<n>] [--json]
pumuki adapter install --agent=<name> [--dry-run] [--json]
pumuki analytics hotspots report [--top=<n>] [--since-days=<n>] [--json]
pumuki analytics hotspots diagnose [--json]
pumuki policy reconcile [--strict] [--apply] [--json]
pumuki context init|status|repair [--json]
pumuki sdd status|validate|session|sync-docs|sync|learn|auto-sync|evidence|state-sync

Published binaries:

BinaryPurpose
pumukiMain lifecycle CLI.
pumuki-framework, pumuki-ast-hooks, ast-hooksInteractive framework/menu entrypoints.
pumuki-pre-writePRE_WRITE gate and SDD policy surface.
pumuki-pre-commitPRE_COMMIT hook runner.
pumuki-pre-pushPRE_PUSH hook runner.
pumuki-ciCI gate runner.
pumuki-mcp-evidenceEvidence MCP HTTP server.
pumuki-mcp-enterpriseEnterprise MCP HTTP server.
pumuki-mcp-evidence-stdioEvidence MCP stdio bridge.
pumuki-mcp-enterprise-stdioEnterprise MCP stdio bridge.

Detailed command documentation:

Git Hooks and CI

Pumuki evaluates different scopes per stage:

StageTypical triggerScopePurpose
PRE_WRITEBefore hook execution or explicit guardActive write/session contextPrevent unmanaged agent work and invalid SDD state.
PRE_COMMITpre-commitgit diff --cachedProtect the atomic commit.
PRE_PUSHpre-pushupstream..HEADProtect outgoing branch range.
CICI jobCI base rangeRepeat the same governance outside the laptop.
auditManual CLIGit tracked filesDiagnose the full tracked repository.

Managed pre-commit and pre-push hooks run pumuki-pre-write first by default, then the stage runner. Use PUMUKI_SKIP_CHAINED_PRE_WRITE=1 only for explicit operational exceptions.

CI entrypoint:

npx --yes --package pumuki@latest pumuki-ci

When GitHub Actions quota or remote CI is not available, this repository uses local validation as the operational merge bar:

npm run -s validation:local-merge-bar

SDD and OpenSpec

Pumuki supports a mandatory SDD/OpenSpec delivery workflow for enterprise repositories.

Common commands:

npx --yes pumuki sdd status --json
npx --yes pumuki sdd session --open --change=<change-id> --json
npx --yes pumuki sdd session --refresh --ttl-minutes=90 --json
npx --yes pumuki sdd validate --stage=PRE_WRITE --json
npx --yes pumuki sdd evidence --scenario-id=<id> --test-command='<command>' --test-status=passed --json
npx --yes pumuki sdd state-sync --scenario-id=<id> --status=done --dry-run --json

Stage aliases:

AliasStage
REDPRE_WRITE
GREENPRE_COMMIT
REFACTORPRE_PUSH
CLOSECI

OpenSpec is resolved from the checked repository, not from a random global binary on PATH. Install or bootstrap Pumuki inside the repository so local and CI behavior match.

Session Continuity and AI Window Handoff

Pumuki is designed for AI-assisted work where the chat window, IDE session or CLI agent can change before the repository work is finished.

It does not claim to preserve private conversational memory from a vendor window. Instead, it externalizes the operational context that matters into repository-owned, auditable state:

Context surfaceWhat it preserves
.pumuki/context/context.jsonLocal context contract for the repository and the instruction that an AI agent must stop if the context cannot be read or validated.
`pumuki context initstatus
SDD/OpenSpec session stateActive change id, session validity and stage validation through pumuki sdd status, session and validate.
.ai_evidence.json v2.1Last gate snapshot, findings, platform detection, rule provenance, severity breakdown and operational hints.
Managed hooks and receiptsPRE_WRITE/PRE_COMMIT/PRE_PUSH/CI decisions, MCP receipt freshness and evidence age.
MCP resourcesProvider-agnostic resources such as context://active, sdd://status, sdd://active-change, gitflow://state and evidence://status.

This makes a new AI window resumable from facts:

npx --yes pumuki status --json
npx --yes pumuki context status --json
npx --yes pumuki sdd status --json
npx --yes pumuki doctor --deep --json

For MCP-capable clients, the same pattern is available through read-only context resources and evidence endpoints before an agent edits files. The expected agent behavior is conservative: if context, evidence or SDD state is missing or invalid, the agent should downgrade to diagnosis and report a blocker instead of mutating production code.

In practice, Pumuki turns "remember what we were doing" into a repository contract: current branch, lifecycle health, active SDD change, latest evidence, blocking findings, remediation and policy provenance are recoverable without trusting the transient memory of one AI session.

AST Intelligence and Rule Packs

Pumuki detects active platforms and loads rule packs for the real repository shape:

PlatformCoverage area
iOSSwift, SwiftUI, Swift Testing, concurrency, architecture and security patterns.
AndroidKotlin, Compose, DI, lifecycle, architecture and Android-specific risk patterns.
BackendTypeScript/NestJS, DTO validation, controllers, DI, error handling, persistence and security patterns.
FrontendTypeScript/React/Next.js, JSX accessibility, API routes, UI safety and browser risk patterns.
GenericCross-platform TypeScript, process, filesystem, dynamic code execution and security signals.

Current baseline families:

  • iosEnterpriseRuleSet
  • backendRuleSet
  • frontendRuleSet
  • androidRuleSet
  • astHeuristicsRuleSet
  • compiled skills bundles from skills.lock.json

Rule-pack documentation:

AST intelligence is not a promise that every guideline can be enforced as code. Pumuki distinguishes runtime-code rules, process rules, positive recommendations and rules that still require study, so the gate does not create false confidence.

Evidence

Pumuki writes deterministic evidence to .ai_evidence.json using the v2.1 contract.

Evidence can include:

  • stage and policy metadata;
  • gate outcome;
  • findings and blocking causes;
  • loaded rulesets and content hashes;
  • detected platforms;
  • skills coverage;
  • SDD/OpenSpec state;
  • operational hints;
  • ledger and snapshot metadata.

Reference:

Menu and Notifications

Pumuki includes an interactive menu for local developer operation.

Framework repository:

npm run framework:menu
PUMUKI_MENU_MODE=advanced npm run framework:menu

Consumer repository:

npx --yes --package pumuki@latest pumuki-framework

Screenshots from the consumer menu:

Consumer menuBlocked pre-flightFinal summary
Consumer menuPre-flight blockFinal block
Pre-flight passFinal passMenu after pass

Notification channels include terminal output, stderr mirrors for relevant blocking events and optional system notifications. Blocking messages are expected to explain:

  • blocking cause;
  • concrete rule or skill;
  • file and line when available;
  • missing condition;
  • direct remediation.

Extended walkthrough:

MCP and Agent Adapters

MCP is optional. Git hooks and gates do not depend on MCP.

Pumuki publishes two MCP server families:

ServerPurpose
pumuki-mcp-evidenceRead-only evidence context over HTTP.
pumuki-mcp-enterpriseEnterprise repository state, resources and safe tools over HTTP.
pumuki-mcp-evidence-stdioEvidence resources over MCP stdio.
pumuki-mcp-enterprise-stdioEnterprise resources/tools over MCP stdio.

The enterprise server exposes repository-state resources used for session continuity, including context://active, gitflow://state, sdd://status, sdd://active-change and evidence://status. The evidence server exposes compact and paginated evidence views so agents can load only the facts they need before acting.

Consumer quick start:

npx --yes --package pumuki@latest pumuki-mcp-evidence
npx --yes --package pumuki@latest pumuki-mcp-enterprise
npx --yes --package pumuki@latest pumuki-mcp-enterprise-stdio

Adapter scaffolding:

npx --yes pumuki adapter install --agent=repo --dry-run --json
npx --yes pumuki adapter install --agent=<agent> --json
npx --yes pumuki adapter install --agent=cursor --dry-run --json

Supported adapter targets include repo, cursor, claude, codex, windsurf and opencode. These are opt-in client adapters; the managed Git hooks, gates, lifecycle, evidence and .pumuki/adapter.json baseline remain AI-agent, CLI and IDE agnostic.

References:

Enterprise Operations

Pumuki includes enterprise-oriented controls for teams that need governed rollout across multiple repositories.

AreaCapability
Policy-as-code.pumuki/policy-as-code.json with stage signatures and strict validation.
TelemetryOptional JSONL and OTLP export for gate telemetry.
Version driftstatus and doctor expose effective/runtime/lifecycle/package alignment.
Adapter healthDeep diagnostics for hook and MCP wiring.
Worktree hygieneGuardrails for pending changes and atomic delivery.
Consumer rolloutPackage smoke, installed-bin smoke and consumer support tooling.
Operations policySLO/SLA, severity model, incident response and rollback expectations.

Operational references:

Adoption Models

ContextRecommended path
Greenfield repositoryInstall Pumuki early, enable SDD/OpenSpec, commit through hooks from day one.
Brownfield repositoryStart with scoped hooks and audits; fix active-slice debt before historical debt.
AI-enabled teamTreat AGENTS.md and skills as the human contract, and Pumuki as executable enforcement.
Multi-platform monorepoPin platforms when needed and let rule packs activate by detected scope.
Enterprise rolloutPilot in one consumer, validate doctor/status/hooks, then repin controlled repositories.

Suggested rollout checklist:

  • Install exact package version.
  • Run pumuki bootstrap --enterprise.
  • Verify status and doctor.
  • Open an SDD session for a real change.
  • Run PRE_WRITE and PRE_COMMIT.
  • Validate menu and notification output.
  • Add CI gate when the local contract is stable.
  • Document local exceptions in the consumer repository.

Troubleshooting

SymptomLikely causeAction
SDD_SESSION_MISSINGNo active SDD session.Run pumuki sdd session --open --change=<change-id>.
SDD_SESSION_INVALIDSession does not match current change or expired.Run pumuki sdd session --refresh --ttl-minutes=90.
OPENSPEC_MISSINGRepo-local OpenSpec binary is missing.Run pumuki bootstrap --enterprise or install the required package in the repo.
PRE_PUSH blocks due to missing upstreamBranch has no tracking ref.Run git push --set-upstream origin <branch>.
Version drift in doctorPackage/runtime/lifecycle versions differ.Use the printed alignmentCommand.
Hook blocks unrelated brownfield debtScope classification may be wrong.Capture command, staged files and JSON output; open an issue.
.ai_evidence.json changes during docs-only workEvidence refresh behavior is active.Review the diff and stage only when the evidence belongs to the slice.
MCP port conflictAnother instance is running.Use PUMUKI_ENTERPRISE_MCP_PORT=0 for dynamic port allocation.

Bug report template:

Repository:
Branch:
Pumuki version:
Command:
Expected result:
Actual result:
Staged files:
Relevant output:
Evidence file present:

Documentation

Start here:

Optional training hub:

Contributing

For high-quality contributions:

  • Read Contributing and Code Standards.
  • Work on a dedicated branch.
  • Keep each change atomic.
  • Add focused regression coverage for behavior changes.
  • Run the relevant local validation commands.
  • Open a PR with problem, approach and evidence.

Maintainer validation commands:

npm run -s typecheck
npm run -s test:deterministic
npm run -s validation:package-manifest
npm run -s smoke:pumuki-surface

For release-grade validation in this repository:

npm run -s validation:local-merge-bar
npm publish --dry-run --access public

Publishing to npm is a separate release operation and may require registry auth/MFA handling.

Support and Security

  • Functional issues: use GitHub Issues.
  • Security-sensitive issues: use GitHub Security Advisories or coordinated private disclosure.
  • Enterprise diagnostics: attach command output and evidence excerpts, but never include secrets.

License

MIT. See LICENSE.

Keywords

ast

FAQs

Package last updated on 27 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts