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

@planu/cli

Package Overview
Dependencies
Maintainers
1
Versions
372
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Potential malware was recently detected in this package.

Affected versions:

1.32.21.32.41.38.01.43.01.44.0
+37 more

@planu/cli

Planu β€” MCP Server for Spec Driven Development. Manages specs, estimations, reverse engineering, and auto-learning across any language/framework.

npmnpm
Version
1.38.0
Version published
Weekly downloads
1.5K
-48.95%
Maintainers
1
Weekly downloads
Β 
Created
Source

Planu

Spec Driven Development for AI coding agents.

Build License Node

πŸ“š Documentation Β· πŸ‡ͺπŸ‡Έ DocumentaciΓ³n en EspaΓ±ol

Installation

Claude Desktop / Claude Code

Add to your claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "planu": {
      "command": "npx",
      "args": ["-y", "@planu/cli@latest"]
    }
  }
}

Requires Node.js β‰₯ 22. No API keys or accounts needed β€” all data is stored locally.

Auto-updates: Using @latest ensures users always get the current version. Every time the MCP server starts, npx checks the npm registry and downloads any newer release automatically β€” no reinstall needed.

What is Planu?

Planu is an MCP (Model Context Protocol) server that brings Spec Driven Development to AI coding agents. It manages the full spec lifecycle -- from requirements clarification and spec creation to estimation, validation, and drift detection. It enforces a project Constitution (immutable architectural principles extracted from CLAUDE.md and .cursorrules), validates DoR/DoD at every lifecycle transition, generates PLAN.md execution files for implementing specs step-by-step, and detects spec versioning drift with cascading downstream impact analysis. Language and framework agnostic, it works with any stack and learns from your codebase over time.

SDD Lifecycle

clarify β†’ create_spec β†’ DoR check β†’ implement (PLAN.md) β†’ validate β†’ drift detection β†’ done

Each transition is gated by DoR (Definition of Ready) and DoD (Definition of Done) checklists. Constitution compliance is enforced automatically at create_spec, audit, and detect_drift. Spec versioning tracks every change and flags downstream spec impact when a dependency drifts.

Getting Started

1. Initialize your project

"Initialize my project at /Users/me/my-app with planu"

Planu scans the directory and auto-detects your language, framework, package manager, and architecture style. It returns a projectId (e.g., proj_abc123) you'll use in all subsequent commands. No manual configuration needed.

2. Create your first spec

"Create a spec for adding Google OAuth authentication to my project proj_abc123"

Planu generates a full HU.md with acceptance criteria, a DoR checklist, database schema hints, and a step-by-step PLAN.md. All stored locally β€” no accounts, no cloud.

3. Implement guided by the spec

Claude uses the spec as a development contract while you code. When you're done, validate coverage:

"Validate spec SPEC-001 against the code at /Users/me/my-app/src"

4. Detect drift

As the codebase evolves, keep specs in sync:

"Check if my implementation matches SPEC-001 spec"

Planu reports which criteria are covered, missing, or drifted β€” and flags downstream specs affected by the change.

Use Cases

New feature

"Use planu to create a spec for [feature] in project [id]"

Audit dependencies

"Audit the stack of my project [id] and suggest improvements"

Plan a migration

"Create a migration plan from Express to Fastify for project [id]"

Reverse engineer existing code

"Reverse engineer my codebase at /path/to/project and generate specs"

Detect tech debt

"Analyze tech debt in project [id]"

Features

A -- Configuration

ToolDescription
set_localeChange the active locale for messages and spec templates
init_projectInitialize a project -- detects language, framework, architecture, and stores project knowledge; also detects AI-native architecture patterns (inference mode, orchestration frameworks), frontend performance setup (Core Web Vitals budgets, SSR frameworks), and K3s/Nomad workload orchestrators
init_constitutionGenerate the project constitution -- immutable architectural principles extracted from CLAUDE.md, .cursorrules; auto-enforced in create_spec, audit, and drift detection

B -- Spec Lifecycle

ToolDescription
clarify_requirementsGenerate targeted clarification questions before creating a spec
create_specCreate a full SDD spec with auto-generated sections: ADR hints, DB schema, UI contracts, test plan, execution plan, DoR checklist; generates AI-native architecture criteria (latency budgets, fallback chains, prompt versioning) and frontend performance criteria (Core Web Vitals, SSR hydration, MFE boundaries) when detected
list_specsList all specs for a project, optionally filtering by status
update_statusTransition a spec through its lifecycle with DoR/DoD validation at each step
summarize_specGenerate a concise summary of a spec
generate_checklistGenerate a quality checklist for a spec
reconcile_specReconcile spec with implementation changes, with per-change approval and Constitution compliance check
manage_scopeManage the project scope definition and backlog
detect_contradictionsAnalyze all specs in a project for semantic contradictions
check_readinessEvaluate if a spec is ready for implementation -- completeness, criteria quality, and dependency status
package_handoffGenerate a structured handoff package for an AI agent to implement a spec, including objective, criteria, file list, and constraints

C -- Analysis and Estimation

ToolDescription
estimateEstimate effort, cost, and token usage for a spec using multi-agent analysis
reverse_engineerAnalyze existing code and generate an SDD spec from it
validateValidate implementation against its spec -- coverage, drift, and quality
detect_driftDetect drift between spec and implementation -- includes Constitution compliance, downstream spec impact
auditAudit code for SOLID, clean code, architecture, and Constitution violations; generates quality score 0-100
learn_patternTeach the system a new pattern (architecture, convention, estimation, stack, quality)
security_checkAnalyze a spec against OWASP Top 10, scan code for insecure patterns, and generate a security score (A–F) with drift detection
capture_learningCapture a discovered pattern or lesson into the spec system with semantic deduplication
paradigm_reportDetect and report the programming paradigms used in a project
reality_checkEvaluate whether a set of requirements is feasible given the project context

D -- Design and Planning

ToolDescription
generate_adrGenerate Architecture Decision Records for a spec
design_schemaDesign database schema from spec requirements
define_ui_contractDefine UI component contracts, data flow, and state management
challenge_specStress-test a spec for failures, concurrency, scale, and edge cases
generate_execution_planGenerate a step-by-step PLAN.md for implementing a spec -- RED/GREEN/VERIFY cycle with parallelizable steps
generate_orchestration_scriptGenerate a 3-layer parallel automation script (worktrees + claude -p) for running specs concurrently
event_contractsManage event-driven architecture contracts -- generate JSON Schema event contracts for producer/consumer validation

E -- Stack and Agents

ToolDescription
suggest_stackSuggest a technology stack based on project requirements
check_versionsCheck dependency versions for updates, deprecations, and security issues
generate_skillGenerate an agent skill file for a specific platform
detect_agentDetect the AI coding agent platform in use
generate_sub_agentGenerate a sub-agent definition for multi-agent orchestration
generate_rulesGenerate agent rules files (.cursorrules, CLAUDE.md, etc.)

F -- Dev Lifecycle

ToolDescription
suggest_toolingAssess and suggest dev lifecycle tooling (CI/CD, testing, monitoring, etc.); includes AI-native tooling recommendations (LLM observability, semantic cache, prompt management, guardrails) and frontend performance tooling (Lighthouse CI, visual regression, component libraries)
generate_testsGenerate test plan and test files from a spec
generate_docsGenerate documentation from specs and code
integrate_pmIntegrate with project management tools (Jira, Linear, GitHub Issues, etc.)

G -- Infrastructure

ToolDescription
manage_contextSave, load, and manage persistent context notes across sessions
manage_gitGit integration -- branches, PRs, changelogs, hooks linked to specs
orchestrateMulti-agent orchestration -- register agents, lock resources, distribute tasks
consult_docsConsult framework documentation for a specific topic
discover_mcpsDiscover MCP servers configured in the environment
suggest_mcpsSuggest MCP servers that could benefit the project
migrate_techGuide tech stack migration -- analyze source codebase, map equivalences, generate migration plan, validate functional parity, and plan DB migration
orchestrate_agentsDeclare agent capabilities, route tasks to the best agent, generate structured handoff contexts, and detect file-ownership conflicts before parallel execution
validate_workflowValidate developer workflow conventions: suggest the right AI model for a task, detect Git Flow violations, audit MCP tool conventions, or run a full workflow audit
log_decisionRegister, list, search, or supersede architectural and process decisions for a project
facilitateEntry point for users unfamiliar with Planu -- guides them through the SDD workflow interactively
request_contextGenerate a prompt that asks the user for reference documentation (README, PRD, architecture docs)
contribute_contextPersist structured knowledge extracted from user-provided documents into the project knowledge base

H -- Governance & Stack Health

ToolDescription
data_governanceDetect PII in specs, generate retention policies, draft privacy notices, and audit GDPR/CCPA/LGPD compliance
audit_stackAudit all project dependencies, classify as up_to_date/outdated/vulnerable/unmaintained, and generate a StackHealthScore (0–100)
plan_upgradeGenerate a migration plan for upgrading a specific package -- breaking changes, estimated effort, and rollback procedure
detect_deprecationsScan project source files for deprecated API patterns (no network) and return a deprecation report with tech-debt estimate

Quick Setup

pnpm install
pnpm build

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "planu": {
      "command": "node",
      "args": ["/absolute/path/to/planu/dist/index.js"],
      "env": {
        "SDD_DATA_DIR": "/absolute/path/to/planu/data",
        "SDD_HOURLY_RATE": "50",
        "SDD_LOCALE": "en"
      }
    }
  }
}

Claude Code

claude mcp add planu node /absolute/path/to/planu/dist/index.js

Architecture

src/
β”œβ”€β”€ index.ts          # MCP server entry point
β”œβ”€β”€ tools/            # MCP tool handlers (174 tools, 9 streams A-I)
β”œβ”€β”€ resources/        # MCP resources (read-only)
β”œβ”€β”€ engine/           # Business logic (estimator, analyzer, validator)
β”œβ”€β”€ storage/          # JSON persistence layer
β”œβ”€β”€ types/            # TypeScript interfaces (16 domain files)
β”œβ”€β”€ config/           # Extensible registries and signatures
└── i18n/             # Internationalization (en, es, pt)

Data is stored as JSON files in data/ (gitignored):

data/
β”œβ”€β”€ projects/{hash}/  # Per-project: specs, metrics, patterns, knowledge
└── global/           # Shared: templates, pricing

Configuration

VariableDescriptionDefault
SDD_DATA_DIRPath to data storage directory./data
SDD_HOURLY_RATEDeveloper hourly rate (USD) for cost estimation50
SDD_LOCALEDefault locale (en, es, pt)en

Control Panel

Planu ships with a cross-platform interactive launcher and a parallel spec execution system.

Launchers

PlatformHow to run
macOSDouble-click sdd.command or bash sdd.sh
Linux / WSLbash sdd.sh
WindowsDouble-click sdd.bat (requires WSL or Git Bash)
Makefilemake watch / make status / make auto / make batch SPECS="..."

The menu provides: real-time worker dashboard, system status, automatic batch detection, explicit spec batches, tests, lint, and cleanup.

Parallel Spec Execution

Specs are implemented by autonomous claude -p workers running in isolated git worktrees. Resource allocation is dynamic -- computed at runtime from the machine's physical cores and available RAM.

bash scripts/parallel-specs.sh --status    # show spec readiness and worker state
bash scripts/parallel-specs.sh --auto      # detect and launch next ready batch
bash scripts/parallel-specs.sh SPEC-014a SPEC-021   # launch specific specs
bash scripts/watch-workers.sh 10           # real-time dashboard, refresh every 10s

Worker limits are computed as min(phys_cores / 2, (avail_ram - 3 GB) / 0.35 GB) and capped at 10. A background health monitor warns on high swap and kills the highest-memory worker if swap exceeds 3 GB.

Development

CommandDescription
pnpm buildCompile TypeScript
pnpm devWatch mode
pnpm lintLint with ESLint (zero warnings)
pnpm lint:fixLint and auto-fix
pnpm testRun tests with Vitest
pnpm formatFormat with Prettier
pnpm format:checkCheck formatting
pnpm typecheckType-check without emitting
pnpm checkRun typecheck + lint + format check

Pre-commit hooks (Husky + lint-staged) run automatically: typecheck, eslint, prettier, commitlint, and secretlint.

Releasing a New Version

Releases are automated via GitHub Actions (.github/workflows/publish.yml). When a commit lands on main with a version bump in package.json, the workflow publishes to npm automatically β€” no manual npm publish needed.

One-time setup: NPM_TOKEN secret

The workflow requires an NPM_TOKEN secret configured in GitHub:

  • Go to npmjs.com β†’ your account β†’ Access Tokens β†’ Generate New Token
  • Select type Automation (scoped to publish)
  • Copy the token
  • Go to your GitHub repo β†’ Settings β†’ Secrets and variables β†’ Actions β†’ New repository secret
  • Name: NPM_TOKEN β€” Value: the token from step 3

How to cut a release

# 1. Bump version in package.json (e.g. 0.1.1 β†’ 0.1.2)
# 2. Commit and push to develop
git add package.json && git commit -m "chore(release): bump version to 0.1.2"
git push origin develop

# 3. Merge develop β†’ main (triggers auto-publish)
git checkout main && git merge --ff-only develop && git push origin main

The workflow checks if the version in package.json already exists on npm. If not, it publishes. If yes, it skips silently.

Contributing

See CONTRIBUTING.md for the GitFlow strategy, branch naming, commit conventions, and PR process.

License

MIT

Keywords

mcp

FAQs

Package last updated on 12 Apr 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