{"id":50706567,"url":"https://github.com/sinameraji/tpm","last_synced_at":"2026-06-09T12:30:59.989Z","repository":{"id":352332201,"uuid":"1214336679","full_name":"sinameraji/tpm","owner":"sinameraji","description":"Open-source Technical Product Manager CLI — audits software products by reading the codebase (deterministic six-stage pipeline, Cloudflare Workers AI).  ","archived":false,"fork":false,"pushed_at":"2026-04-19T04:08:31.000Z","size":776,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T04:13:23.863Z","etag":null,"topics":["audit","cli","cloudflare-workers-ai","open-source","pm","product-management","typescript"],"latest_commit_sha":null,"homepage":"https://tpm-d3h.pages.dev  ","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinameraji.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-18T12:41:32.000Z","updated_at":"2026-04-19T04:08:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sinameraji/tpm","commit_stats":null,"previous_names":["sinameraji/tpm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sinameraji/tpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinameraji%2Ftpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinameraji%2Ftpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinameraji%2Ftpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinameraji%2Ftpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinameraji","download_url":"https://codeload.github.com/sinameraji/tpm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinameraji%2Ftpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit","cli","cloudflare-workers-ai","open-source","pm","product-management","typescript"],"created_at":"2026-06-09T12:30:59.916Z","updated_at":"2026-06-09T12:30:59.975Z","avatar_url":"https://github.com/sinameraji.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PM — Product Manager\n\n**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.\n\n```bash\nnpm install -g @sinameraji/pm\n\ncd your-product-repo\npm init       # paste your Anthropic API key\npm audit\n```\n\nPM 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`.\n\nA 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](https://www.anthropic.com/pricing).\n\n**Prefer not to install globally?** `npx @sinameraji/pm@latest audit` works without any global install.\n\n## The mental model\n\nA 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.\n\n- **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.\n- **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.\n\nThis 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.\n\n## What you get\n\nArtifacts land in `.pm/artifacts/{audit_id}/`:\n\n- `map.yaml` — static code map (routes, components, forms, nav, auth providers)\n- `scraped-surfaces.yaml` — marketing pages (only if a URL was provided)\n- `lean-canvas.yaml` — reconstructed intent (problem, segments, UVP, JTBD, value moments)\n- `paths.yaml` — imagined user journey per persona, inferred from code\n- `delta.yaml` — classified gaps between intent and the code's reality\n- `problems.yaml` — ranked by explicit leverage argument\n- `solutions.yaml` + `prototypes/*.html` — top-5 fixes with annotated HTML mockups\n- `spec.md` + `spec.html` — the PM deliverable\n\n## Why BYO\n\n**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`.\n\n**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.\n\n## Model tiers\n\nPick on `pm init`:\n\n| Stage                 | fast (default)    | deep              |\n| --------------------- | ----------------- | ----------------- |\n| A — intent            | claude-sonnet-4-6 | claude-sonnet-4-6 |\n| B — classify + walk   | claude-sonnet-4-6 | claude-sonnet-4-6 |\n| B — model (structure) | claude-sonnet-4-6 | claude-opus-4-7   |\n| C — delta             | claude-sonnet-4-6 | claude-opus-4-7   |\n| D — leverage          | claude-sonnet-4-6 | claude-sonnet-4-6 |\n| E — spec              | claude-sonnet-4-6 | claude-opus-4-7   |\n| E — prototype HTML    | claude-sonnet-4-6 | claude-sonnet-4-6 |\n| F — assembly          | claude-sonnet-4-6 | claude-opus-4-7   |\n\nSwitch after `init`:\n\n```bash\npm config set model-tier deep            # all deep stages upgrade to Opus\npm config set stage_models.c claude-opus-4-7   # or override one stage\n```\n\nPrompt 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 \u003e 0` on the second run — knock a chunk off the input cost. See `pm audit --verbose` to inspect.\n\n## The method\n\nSix-stage deterministic pipeline, fully specified by schema. See [`docs/the-method.md`](./docs/the-method.md).\n\n## Architecture\n\nCLI on your machine (Node 20+). No backend. No Playwright. No live-product automation. See [`docs/architecture.md`](./docs/architecture.md).\n\n## Repo layout\n\n```\npackages/\n  shared/     Zod schemas + TS types — single source of truth\n  cli/        the `pm` command-line tool\n  marketing/  pm-init.pages.dev landing (Astro on Cloudflare Pages)\n```\n\n## Development\n\n```bash\npnpm install\npnpm build\npnpm test\npnpm lint\n```\n\nNode 20+ and pnpm 9+ required.\n\n## Upgrading from 1.1.x\n\n1.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`](./docs/migration-from-1.1.md).\n\n## Docs\n\n- [The method](./docs/the-method.md)\n- [Architecture](./docs/architecture.md)\n- [BYO Anthropic — what gets sent, what's stored](./docs/byo.md)\n- [Migration from 1.1.x](./docs/migration-from-1.1.md)\n- [Models and tiers](./docs/models.md)\n- [Cost + time — what to expect](./docs/cost-and-time.md)\n- [Authoring patterns](./docs/patterns-authoring.md)\n\n## Author\n\nBuilt by [Sina Meraji](https://github.com/sinameraji).\n\n- X: [@sinasanm](https://x.com/sinasanm)\n- GitHub: [@sinameraji](https://github.com/sinameraji)\n- LinkedIn: [sinameraji](https://linkedin.com/in/sinameraji)\n\nPRs welcome — new extractors, new patterns, better prompts. See [`docs/patterns-authoring.md`](./docs/patterns-authoring.md).\n\n## License\n\n[MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinameraji%2Ftpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinameraji%2Ftpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinameraji%2Ftpm/lists"}