{"id":"ac468c3d-f9ae-41e8-948e-cadd34f2f409","slug":"promptwise","kind":"mcp","name":"PromptWise","summary":"Governance layer for AI coding agents — model routing, security scanning, tamper-evident audit trail, JIT permissions. MCP server, 142 tools, 83 skill packs, 14 agent hosts, MIT licensed.","owner":"u2anilgit","repoUrl":"https://github.com/u2anilgit/PromptWise","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-05-19T15:23:17.000Z","addedAt":"2026-10-21T06:07:06.243Z","logoUrl":"https://avatars.githubusercontent.com/u/76249552?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","cloud-infra","memory-knowledge"],"tags":["ai-agents","ai-tools","audit-trail","claude-code","developer-tools","governance","llm-security","security-tools"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-21T07:55:19.535Z","sample":false,"url":"https://conduits.dev/tools/promptwise","language":"Python","transports":["stdio"],"install":{"pypi":"promptwise"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# PromptWise\n\n**The governance & intelligence layer for AI agents.** Role-aware prompting, model\nrouting, cost & budget control, security/compliance scanning, responsible-AI advisories,\nworkflow planning, a governed agile method, runtime enforcement hooks, and 83 portable skill\npacks — emitted in the formats every agent already reads.\n\n> Built on open standards, not against them. PromptWise is a *conductor*, not a replacement\n> for Cursor / Copilot / Claude Code.\n\n**Works with:** Claude Code · Claude Desktop (tools only, no hooks) · Codex · Cursor ·\nGemini CLI · Copilot · Windsurf · JetBrains AI Assistant · Cline · Aider · Goose ·\nOpenHands · Grok Build/Grok CLI (reads CLAUDE.md natively) · any MCP host\n**Standards:** MCP · SKILL.md · AGENTS.md\n\n[![CI](https://github.com/u2anilgit/PromptWise/actions/workflows/ci.yml/badge.svg)](https://github.com/u2anilgit/PromptWise/actions/workflows/ci.yml)\n![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)\n![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)\n![Skill packs](https://img.shields.io/badge/skill%20packs-83-7C5BD4.svg)\n![MCP tools](https://img.shields.io/badge/MCP%20tools-144-4C5BD4.svg)\n\n📖 **[User Guide](docs/USER_GUIDE.md)** · [Install](INSTALL.md) · [Configuration](CONFIGURATION.md) · [Architecture](docs/ARCHITECTURE.md) · [Landing page](https://u2anilgit.github.io/PromptWise/)\n\n![PromptWise landing page walkthrough](docs/promptwise-landing-scroll.gif)\n\n---\n\n## Why\n\nThe ecosystem standardized. MCP (Linux Foundation–governed), SKILL.md, and AGENTS.md are\nnow the shared substrate across every major coding agent. PromptWise doesn't fight that —\nit compiles its intelligence **down to those three formats** and adds the layer none of\nthem have:\n\n- **Model routing** — right tier (Haiku/Sonnet/Opus) per task, with budget awareness.\n- **Preflight pipeline** — every prompt, in every connected host, gets one combined\n  pass before work starts: rewrite advisory, secret/injection scan, task-type\n  classification (bugfix/docs/refactor/enhancement/new-code), model/tier routing,\n  and an opt-in shortlist of the last 2-3 current models per tier. Advisory-only by\n  design (an MCP server can't force a host to swap models mid-turn) — surfaces as\n  session context, never blocks. See `core/preflight.py`.\n- **Reasoning-effort routing** — low/medium/high, independent of model tier — plus an\n  outcome-learning adapter (mirrors the model-tier router's design) that blends in past\n  results once there's enough evidence, fail-open to the static pick otherwise.\n- **Context-budget engineering** — compression, caching, batching, thread handoff.\n- **Response-size governance** — every tool response passes through one size cap at the\n  `call_tool` choke point before reaching the caller; a generic recursive walker bounds\n  any over-limit list at any nesting depth, exempting the handful of tools (exports) where\n  the full payload is the point.\n- **Role intelligence** — 83 role/technique skill packs (banking, HIPAA, QA, TDD, ADR, …).\n- **Compliance gating** — auditable PRD→architecture→story→commit chain for regulated teams.\n- **Runtime enforcement** — Claude Code lifecycle hooks auto-run security/policy/audit checks on every Write/Edit and tool call. A flagged write defers to Claude Code's normal allow/deny prompt (never a hard, opaque block) and is logged silently either way; standing exceptions are time-boxed JIT grants (`grant_jit_permission`), scoped to one file or a whole project. Destructive shell commands and runaway tool-call loops still hard-deny. Fail-open throughout: a hook error never wedges the session. See `hooks/`.\n- **Red-team regression harness** — a durable, offline attack/benign corpus run against the security scanner, diffed against a stored baseline to catch both missed detections and false-positive regressions (`run_red_team_harness`). All scanning is air-gapped by default — no unconditional network calls.\n- **Continuous learning** — corrections become durable, searchable rules (FTS5) replayed before relevant work; packs self-optimize offline. Local-first, air-gapped safe.\n- **Workflow planning** — classify a task → an ordered chain of PromptWise's *own* skill packs (PRD → design → stories → TDD → review). Fully self-contained, no external tools.\n- **Governed agile method** — analyst→pm→architect→po planning then per-story sm→dev→qa loop, with context-engineered stories, advisory quality gates, policy-as-code, and a hash-chained audit trail. See [docs/AGILE_METHOD.md](docs/AGILE_METHOD.md).\n- **In-editor dashboard** — an optional local VS Code panel surfaces budget, security posture, and governance proposals at a glance, over the same MCP server. No external services, no daemon, no marketplace install required. See [vscode-extension/](vscode-extension/).\n\n## Architecture — one source, three emitters\n\n```\nPromptWise core  (router · roles · compliance · context engine · workflow_planner)\n        ├─▶ MCP tools      → route_request, plan_workflow, owasp_scan …  (144)\n        ├─▶ SKILL.md packs → 83 portable packs in skill_packs/\n        ├─▶ Lifecycle hooks→ enforce security/policy/audit at runtime (hooks/)\n        └─▶ AGENTS.md      → project context + active constitution\n```\n\n## Quickstart (Claude Code)\n\n```bash\ngit clone https://github.com/u2anilgit/PromptWise.git\ncd PromptWise\npip install -e .\n```\n\nAdd the plugin marketplace (local) and enable it, or point your MCP host at the server:\n\n```jsonc\n// .mcp.json — already included\n{\n  \"mcpServers\": {\n    \"promptwise\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"promptwise.server\"],\n      \"cwd\": \"${projectDir}\",\n      \"env\": { \"PYTHONPATH\": \"${projectDir}/src\" }\n    }\n  }\n}\n```\n\nRestart your agent, run `/mcp` — PromptWise tools appear. Then just `/promptwise`.\n\n## What's inside\n\n| Path | What |\n|------|------|\n| `src/promptwise/` | Engine: MCP server + core logic, security, plugins, transports |\n| `skill_packs/` | 83 portable `SKILL.md` role/technique packs (incl. `agile/` personas; copy into any agent) |\n| `hooks/` | Claude Code lifecycle hooks — runtime security/policy/audit enforcement (fail-open) |\n| `commands/`, `agents/` | Plugin slash commands and sub-agents |\n| `.claude-plugin/` | Plugin + marketplace manifests, the `/promptwise` hub skill |\n| `config/` | Pricing, providers, roles, security, compliance config |\n| `AGENTS.md` | Universal project-context emitter |\n| `docs/` | Integration guides (configuration reference, multi-platform setup) |\n| `vscode-extension/` | Optional local VS Code panel — Budget/Security/Governance dashboard, TypeScript, builds to a local `.vsix`, zero external services |\n\n## Workflow planner (self-contained)\n\n`plan_workflow` classifies a task by intent · scale · risk and returns an ordered chain\nof PromptWise's **own** skill packs — each step runnable via `invoke_skill`. No external\nframeworks, CLIs, or network:\n\n| Task shape | → Workflow (PromptWise skill packs) |\n|------------|-------------------------------------|\n| Greenfield build | `prd-generator` → `system-design` → `user-story-generator` → `tdd` → `code-review` → `verification-before-completion` |\n| Brownfield change | `systematic-debugging` → `refactoring` → `test-generator` → `code-review` → `verify` |\n| Docs / spec only | `prd-generator` → `user-story-generator` → `adr` |\n| Regulated (any of the above) | + `security-architecture` + `owasp_scan` + `get_sbom`, compliance-gate flag set |\n\n## VS Code panel (optional)\n\nA local Budget/Security/Governance dashboard, in-editor. Spawns the same MCP\nserver over stdio (via the official `@modelcontextprotocol/sdk`) — no\nexternal services, no daemon, no network calls, no marketplace publish.\n\n```bash\ncd vscode-extension\nnpm install\nnpm run package\ncode --install-extension promptwise-panel-0.1.0.vsix\n```\n\nRun **PromptWise: Open Panel**. See\n[vscode-extension/README.md](vscode-extension/README.md) for settings and\ndevelopment notes.\n\n## Documentation\n\n| Doc | What |\n|-----|------|\n| [docs/USER_GUIDE.md](docs/USER_GUIDE.md) | Hands-on: hub, working with skills, real examples |\n| [INSTALL.md](INSTALL.md) | Install + register with any MCP host |\n| [CONFIGURATION.md](CONFIGURATION.md) | Config files, budgets, security, adding packs |\n| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Functional / technical / ER / sequence diagrams |\n\n## Testing\n\n```bash\npip install -e \".[dev]\"\npython -m pytest tests -q        # packs, planner, agile method, governance, enforcement hooks, learning loop, policy intel, tracker, tools\n```\n\nVS Code panel (optional, separate package):\n\n```bash\ncd vscode-extension && npm install && node --test test/*.test.ts\n```\n\n## Status\n\n**Early-stage, building in public.** Package version `1.10.0` in `pyproject.toml`\n(the changelog trails a few shipped features — see `docs/ROADMAP.md` for the live,\naccurate ledger); 144 MCP tools, 83 portable skill packs, 1638 tests, registered\nthrough a decorator-based tool registry (one source of truth per tool, organized into a\n`handlers/` package of 25 category files instead of one monolithic `server.py`).\nEverything runs directly from PromptWise — local-first, no third-party integrations,\nair-gapped by default.\n\n**Core engine:** model-tier routing with budget awareness, a reasoning-effort axis\n(low/medium/high, independent of tier, with its own outcome-learning adapter), a\nresponse-size cap at the `call_tool` choke point so no tool response is ever unbounded,\ncontext-budget engineering (compression/caching/batching/handoff), and cost + audit\nlogging for every skill invocation.\n\n**Cross-agent portability — one governance source, 11 native emitters:** Claude,\nCodex/AGENTS.md, Cursor, Copilot, Cline, Gemini, Windsurf, JetBrains AI Assistant,\nAider (`CONVENTIONS.md`), Goose (`.goosehints`), OpenHands\n(`.openhands/microagents/repo.md`) — plus Grok Build/Grok CLI, which needs no emitter\nof its own since it natively auto-reads CLAUDE.md/AGENTS.md. `detect_agents()` probes\nall of them (bar Grok, which has no marker file to detect) so `propose_agent_config`'s\nauto-target-selection actually sees every host you've configured. Also: a single-file\nweb-agent bundle (`export_web_bundle`) for ChatGPT/Gemini/Claude.ai web chat, where\nthere's no IDE/CLI/MCP surface to emit into.\n\n**Zero-manual-step onboarding:** `python -m promptwise bootstrap --sync-agents` detects\nevery host present in a repo and writes their native config in one command — the\nskill-pack surface (active pack families + drift fingerprint) is included automatically,\nand Codex additionally gets its MCP server registered directly in a repo-scoped\n`.codex/config.toml`, no separate manual step required.\n\n**Governance & security:** the runtime enforcement hooks layer (`hooks/`) — a flagged\nWrite/Edit defers to Claude Code's normal allow/deny prompt instead of a hard block,\nlogs silently either way, and standing exceptions are time-boxed JIT grants scoped to\na file or a whole project; destructive shell commands and runaway tool-call loops still\nhard-deny. A compliance report card (OWASP LLM Top 10 2025 / NIST AI RMF / MITRE ATLAS),\nan OpenTelemetry GenAI exporter, policy inheritance (`extends:` org → team → project,\ntighten-only), SIEM-streamable audit sinks, within-tier cost-aware model routing, and\ndashboard auth/RBAC (binds `127.0.0.1` by default; non-loopback requires credentials).\nAn append-only, human-reviewed injection-detection corpus refresh workflow\n(`review_corpus_candidates`/`promote_corpus_candidates`, before/after precision-recall\ndiffed on every promotion) keeps the prompt-injection detector's benchmark corpus\ncurrent without turning it into a live, unaudited ML classifier. A durable eval +\nred-team regression harness (offline, baseline-diffed, pass/fail gated), MCP\nsupply-chain auditing, a searchable trace, and prompt version rollback/replay round out\nthe governance surface.\n\n**Method & learning:** the governed agile method (analyst→pm→architect→po planning,\nper-story sm→dev→qa loop, quality gates, policy-as-code, hash-chained audit trail), the\nself-contained workflow planner, a continuous learning loop with offline skill\nauto-optimization, an autonomous governor (policy-gated, reversible, advise-by-default)\nwith a budget-guardian overlay, diagram generators, and a task/effort/usage tracker. An\noptional local VS Code panel (`vscode-extension/`) surfaces budget, security, and\ngovernance at a glance over the same MCP server, zero external services.\n\n**Known gaps, sized but not built:** OAuth/third-party-connector support for remote MCP\n(ChatGPT Desktop-style apps and third-party agents need federated auth and multi-tenant\nstate — out of scope for token-authenticated team use). Token-authenticated Streamable\nHTTP transport for your-own-devices/team use is now available (`PROMPTWISE_TRANSPORT=http`,\nsee `docs/OPS_REMOTE_MCP.md`). Cost-conscious routing over deprecated/prior-gen models is\nalso unbuilt (the registry already retains deprecated model pricing; the router just never\nreaches for it — a small, well-scoped addition once the default-on-vs-opt-in question is settled).\n\n## License\n\nMIT — see [LICENSE](LICENSE). Open standards are credited in [NOTICE](NOTICE).\n"}