Open source (MIT). A senior PM in your terminal. PM audits software products by reading the codebase (primary source of truth) and, optionally, your public marketing site (auxiliary context). It never runs your product — no browser automation, no fake signups, no logins to your live app.
npm install -g @sinameraji/pm
cd your-product-repo
pm init # paste your Anthropic API key
pm auditPM uses Claude (Sonnet 4.6 by default, Opus 4.7 on the deep tier) for inference. You bring your own Anthropic API key — your key, your rate limits, your bill. Nothing is transmitted anywhere except api.anthropic.com.
A typical audit takes about 8–12 minutes and costs roughly $1–3 in Anthropic API credits at your account's rates. Deep-tier audits cost 3–5× more. Latest published rates: anthropic.com/pricing.
Prefer not to install globally? npx @sinameraji/pm@latest audit works without any global install.
A skilled PM reading your codebase can narrate the user's first run from memory. PM does the same thing, algorithmically. It extracts your routes, forms, components, copy, auth gates and tracking events — then reconstructs the intended product from the code, and a plausible user journey from the same code.
- Codebase = source of truth. What the code says the product does IS what the product does. It's unrealistic to run production apps locally (multiple server/infra/frontend folders, env vars, seed data, auth flows). PM skips that entirely.
- Marketing URL = auxiliary. Optional. Helps PM understand the positioning promise (hero copy, pricing, features). When marketing and code disagree, the code wins — and PM reports the divergence.
This means PM works on anything you have source access to — enterprise SaaS, authenticated-only dashboards, anything behind a paywall — because it never needs to run or sign into your live product.
Artifacts land in .pm/artifacts/{audit_id}/:
map.yaml— static code map (routes, components, forms, nav, auth providers)scraped-surfaces.yaml— marketing pages (only if a URL was provided)lean-canvas.yaml— reconstructed intent (problem, segments, UVP, JTBD, value moments)paths.yaml— imagined user journey per persona, inferred from codedelta.yaml— classified gaps between intent and the code's realityproblems.yaml— ranked by explicit leverage argumentsolutions.yaml+prototypes/*.html— top-5 fixes with annotated HTML mockupsspec.md+spec.html— the PM deliverable
Your key, your control. No hosted proxy. No shared quota. No markup on inference. Your key is stored locally (~/.pm/config.yaml, chmod 600) and only ever sent to api.anthropic.com. Delete it any time with pm config unset anthropic-key.
Rate limits are yours. Deep-tier parallel stages will use up to 4 concurrent Anthropic requests. Pro accounts handle this comfortably; if you hit 429s, drop to fast tier or raise your limit with Anthropic.
Pick on pm init:
| Stage | fast (default) | deep |
|---|---|---|
| A — intent | claude-sonnet-4-6 | claude-sonnet-4-6 |
| B — classify + walk | claude-sonnet-4-6 | claude-sonnet-4-6 |
| B — model (structure) | claude-sonnet-4-6 | claude-opus-4-7 |
| C — delta | claude-sonnet-4-6 | claude-opus-4-7 |
| D — leverage | claude-sonnet-4-6 | claude-sonnet-4-6 |
| E — spec | claude-sonnet-4-6 | claude-opus-4-7 |
| E — prototype HTML | claude-sonnet-4-6 | claude-sonnet-4-6 |
| F — assembly | claude-sonnet-4-6 | claude-opus-4-7 |
Switch after init:
pm config set model-tier deep # all deep stages upgrade to Opus
pm config set stage_models.c claude-opus-4-7 # or override one stagePrompt caching is on for every long, audit-agnostic system prompt (Stages A, C, D, F, plus B-classify/B-model/B-walk on the same system prefix across retries). Back-to-back audits on the same repo typically show cache_read_input_tokens > 0 on the second run — knock a chunk off the input cost. See pm audit --verbose to inspect.
Six-stage deterministic pipeline, fully specified by schema. See docs/the-method.md.
CLI on your machine (Node 20+). No backend. No Playwright. No live-product automation. See docs/architecture.md.
packages/
shared/ Zod schemas + TS types — single source of truth
cli/ the `pm` command-line tool
marketing/ pm-init.pages.dev landing (Astro on Cloudflare Pages)
pnpm install
pnpm build
pnpm test
pnpm lintNode 20+ and pnpm 9+ required.
1.1.x ran on Cloudflare Workers AI with a hosted proxy and a device-flow JWT. 1.2.0 is BYO Anthropic, no backend. First pm audit after upgrading prompts you to run pm init for the key — details in docs/migration-from-1.1.md.
- The method
- Architecture
- BYO Anthropic — what gets sent, what's stored
- Migration from 1.1.x
- Models and tiers
- Cost + time — what to expect
- Authoring patterns
Built by Sina Meraji.
- X: @sinasanm
- GitHub: @sinameraji
- LinkedIn: sinameraji
PRs welcome — new extractors, new patterns, better prompts. See docs/patterns-authoring.md.
MIT.