@pharaoh-so/mcp 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pharaoh-so/mcp",
3
3
  "mcpName": "so.pharaoh/pharaoh",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "description": "MCP proxy for Pharaoh — maps codebases into queryable knowledge graphs for AI agents. Enables Claude Code in headless environments (VPS, SSH, CI) via device flow auth.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: audit-tests
3
+ prompt-name: audit-tests
3
4
  description: "Classify tests by real value: ceremony versus protection. Mutation score over line coverage — tests that can't detect mutations are theater. Identify tests that prove nothing, tests that duplicate coverage, and gaps where real protection is missing. Produce an actionable audit with keep, rewrite, and delete verdicts."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: brainstorm
3
+ prompt-name: brainstorm
3
4
  description: "Explore intent, requirements, and design before implementation. Collaborative dialogue to turn ideas into specs. Ask clarifying questions one at a time, propose 2-3 approaches with trade-offs, get approval before writing any code. Prevents wasted work from unexamined assumptions."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: debt
3
+ prompt-name: find-tech-debt
3
4
  description: "Categorized technical debt report using Pharaoh knowledge graph. Four-step pro-tier workflow: dead code detection, duplicate logic discovery, undocumented complex functions via spec gaps, and volatile high-complexity module identification. Categorizes findings as DELETE, CONSOLIDATE, DOCUMENT, STABILIZE, or TEST — each with the specific function or file, effort estimate, and risk of ignoring."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: debug
3
+ prompt-name: systematic-debugging
3
4
  description: "Systematic 4-phase debugging methodology. Root cause investigation before any fixes. Read errors carefully, reproduce consistently, trace data flow, form hypotheses, test minimally. If 3+ fixes fail, question the architecture. No guessing, no quick patches, no symptom fixes."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: execute
3
+ prompt-name: execute-plan
3
4
  description: "Execute a written implementation plan with review checkpoints. Load plan, review critically, execute tasks sequentially with verification at each step. Stop and ask when blocked — never guess through ambiguity. Finish with branch completion workflow."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: explore
3
+ prompt-name: explore-module
3
4
  description: "Deep-dive into a single codebase module using Pharaoh knowledge graph. Four-step free-tier workflow: full structure with functions, exports, and complexity scores; blast radius of what depends on it; upstream and downstream dependency mapping; and related function discovery. Produces a module briefing with purpose, key functions, dependencies, risk areas, and external API surface."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: finish
3
+ prompt-name: finish-branch
3
4
  description: "Complete a development branch after implementation. Verify all tests pass, present structured options (merge locally, create PR, keep branch, or discard), execute the chosen workflow, and clean up worktrees. Never merge broken code or delete work without confirmation."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: health
3
+ prompt-name: health-check
3
4
  description: "Full codebase health sweep using Pharaoh knowledge graph. Six-step pro-tier workflow: module map with metrics, dead code detection, test coverage gaps, duplicate logic, regression risk scoring, and spec drift analysis. Produces an A-F grade, top 5 risks, tech debt hotspots (high-complexity + low-coverage + high-volatility intersections), spec drift summary, and prioritized actions with effort estimates."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: investigate
3
+ prompt-name: investigate-change
3
4
  description: "Full architectural context gathering before modifying a function, file, or module using Pharaoh knowledge graph. Four-step free-tier workflow: module structure, blast radius of downstream callers, related function discovery, and dependency mapping. Blocks code suggestions until all context is gathered. Produces an investigation report with structure, blast radius, related functions, dependency context, and risk assessment."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: onboard
3
+ prompt-name: onboard-to-codebase
3
4
  description: "Quick codebase orientation using Pharaoh knowledge graph. Five-step workflow using only free-tier tools: full module map, deep-dive into the three largest modules, entry point discovery, critical path blast radius, and core data flow mapping. Produces an onboarding summary with module descriptions, entry points, data flow, and key functions to read first."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: orchestrate
3
+ prompt-name: orchestrate-plan
3
4
  description: "Execute implementation plans by dispatching one subagent per task with two-stage review (spec compliance then code quality). Sequential task execution with quality gates. Controller stays in session, constructs focused context for each agent, never shares session history. Handles DONE/DONE_WITH_CONCERNS/NEEDS_CONTEXT/BLOCKED status protocol."
4
5
  version: 0.2.5
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: parallel
3
+ prompt-name: parallel-agents
3
4
  description: "Dispatch 2+ independent subagent tasks that run concurrently. Each agent gets focused scope, clear goal, constraints, and expected output. No shared state between agents. Review and integrate results after all complete."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: pharaoh
3
+ prompt-name: pharaoh-core
3
4
  description: "Codebase knowledge graph — gives AI agents full architectural awareness. Query architecture, dependencies, blast radius, module context, and function search instead of reading files one at a time. Code intelligence via MCP: understand any codebase in seconds."
4
5
  version: 0.3.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: plan
3
+ prompt-name: plan-with-pharaoh
3
4
  description: "Full-cycle architecture-aware planning: Pharaoh reconnaissance, structured plan writing with bite-sized TDD steps and zero placeholders, then deep adversarial review with wiring verification and interactive issue resolution. Replaces both writing-plans and plan-review."
4
5
  version: 0.3.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: pr
3
+ prompt-name: pre-pr-review
3
4
  description: "Pre-pull-request architectural review checklist using Pharaoh codebase knowledge graph. Covers module context, blast radius per touched module, hidden coupling between modules, duplicate logic detection, regression risk scoring, and vision spec alignment. Produces a structured review summary before opening a PR."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: refactor
3
+ prompt-name: safe-refactor
3
4
  description: "Safe refactoring workflow using Pharaoh codebase knowledge graph. Six-step process: module context, blast radius of downstream callers, reachability verification, dependency mapping, naming conflict detection, and test coverage assessment. Produces a refactoring plan with every caller listed, test files identified, unreachable code flagged, and high-risk paths warned."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,61 +1,287 @@
1
1
  ---
2
2
  name: review
3
- description: "Architecture-aware pre-PR code review using Pharaoh codebase knowledge graph. Four-phase workflow: context gathering with module structure and blast radius, risk assessment with regression scoring and wiring checks, spec alignment against vision docs, and a final verdict of SHIP / SHIP WITH CHANGES / BLOCK. Auto-block rules for unreachable exports, circular dependencies, high regression risk, and spec violations."
4
- version: 0.2.0
3
+ prompt-name: review-with-pharaoh
4
+ description: "The definitive code review. Five-phase workflow: git context detection (worktree, branch, base, changed files), Pharaoh recon (architecture map, module context, blast radius in one call), parallel specialized agent dispatch (code quality, error handling, test coverage, type design), cross-model adversarial review for security-sensitive changes, and a final synthesized verdict of SHIP / SHIP WITH CHANGES / BLOCK. Always architecture-aware, always branch-aware."
5
+ version: 0.3.0
5
6
  homepage: https://pharaoh.so
6
7
  user-invocable: true
7
- metadata: {"emoji": "☥", "tags": ["code-review", "pull-request", "architecture", "pharaoh", "regression-risk", "spec-alignment"]}
8
+ metadata: {"emoji": "☥", "tags": ["code-review", "pull-request", "architecture", "pharaoh", "multi-agent", "adversarial-review", "regression-risk", "spec-alignment"]}
8
9
  ---
9
10
 
10
11
  # Review with Pharaoh
11
12
 
12
- Architecture-aware pre-PR review. Uses `review-with-pharaoh` a 4-phase workflow that assesses blast radius, regression risk, wiring integrity, duplication, and spec alignment. Produces a final verdict: SHIP, SHIP WITH CHANGES, or BLOCK.
13
+ The definitive code review. Architecture-aware, branch-aware, multi-agent, adversarial. Five phases that combine Pharaoh's knowledge graph with parallel specialized reviewers and an independent cross-model second opinion.
14
+
15
+ Final verdict: **SHIP** / **SHIP WITH CHANGES** / **BLOCK**
13
16
 
14
17
  ## When to Use
15
18
 
16
- Invoke before merging any pull request. Use it when reviewing changes that touch shared modules, export new functions, modify core data flows, or claim to implement a spec.
19
+ Before merging any branch. Before opening any PR. When reviewing changes that touch shared modules, export new functions, modify core data flows, or claim to implement a spec.
17
20
 
18
- ## Workflow
21
+ ---
19
22
 
20
- ### Phase 1 — Context
23
+ ## Phase 0Git Context
21
24
 
22
- 1. For each touched module, call `get_module_context` to understand its structure.
23
- 2. For each touched module, call `get_blast_radius` to identify downstream impact.
24
- 3. Call `query_dependencies` between the touched modules to map coupling.
25
+ **Goal:** Know exactly what changed and where you are. This phase is mandatory and runs before anything else.
25
26
 
26
- ### Phase 2 Risk Assessment
27
+ 1. Detect the current environment:
28
+ ```bash
29
+ git rev-parse --show-toplevel # repo root (may be a worktree)
30
+ git worktree list # detect if running in a worktree
31
+ git branch --show-current # current branch name
32
+ git log --oneline -1 # latest commit
33
+ ```
27
34
 
28
- 4. Call `get_regression_risk` for the target repository to assess overall change risk.
29
- 5. Call `check_reachability` for new exports in the touched modules — are they wired?
30
- 6. Call `get_consolidation_opportunities` for the repository to check for duplicated logic.
35
+ 2. Determine the base branch (what this branch diverged from):
36
+ ```bash
37
+ git merge-base HEAD main # or master, or whatever the default is
38
+ ```
31
39
 
32
- ### Phase 3 Spec Alignment
40
+ 3. Collect the full changeset from the base:
41
+ ```bash
42
+ git diff --name-only $(git merge-base HEAD main)...HEAD # all changed files
43
+ git diff --stat $(git merge-base HEAD main)...HEAD # summary stats
44
+ git log --oneline $(git merge-base HEAD main)..HEAD # all commits on this branch
45
+ ```
33
46
 
34
- 7. Call `get_vision_gaps` for the repository to verify changes align with specs.
47
+ 4. Also check for uncommitted work:
48
+ ```bash
49
+ git diff --name-only # unstaged changes
50
+ git diff --cached --name-only # staged but uncommitted
51
+ ```
35
52
 
36
- ### Phase 4 Verdict
53
+ 5. Extract the **touched modules** from the changed file paths. Group files by their top-level directory or module boundary. These module names feed Phase 1.
37
54
 
38
- Produce a review with:
39
- - **Architecture impact:** modules affected, dependency changes, blast radius
40
- - **Risk assessment:** regression risk level, volatile modules touched
41
- - **Wiring check:** are all new exports reachable from entry points?
42
- - **Duplication check:** does new code duplicate existing logic?
43
- - **Spec alignment:** do changes match or drift from vision specs?
55
+ **Output of Phase 0:** Branch name, base branch, commit count, list of changed files, list of touched modules, and whether there's uncommitted work.
44
56
 
45
- Final verdict: **SHIP** / **SHIP WITH CHANGES** / **BLOCK**
57
+ ---
58
+
59
+ ## Phase 1 — Pharaoh Recon
60
+
61
+ **Goal:** Get the full architectural picture in one call. Do NOT skip this phase — it is what makes this review architecture-aware instead of just a code diff review.
62
+
63
+ Call `pharaoh_recon` with:
64
+ - **repo:** The repository name
65
+ - **include_map:** `true`
66
+ - **modules:** The touched modules from Phase 0 (up to 5)
67
+ - **blast_radius:** The most critical changed files/functions as blast radius targets (up to 3). Pick the files with the most downstream risk — entry points, shared utilities, exported APIs.
68
+ - **dependencies:** Pairs of touched modules to trace coupling between (up to 3)
69
+
70
+ Then call these additional tools for data recon doesn't cover:
71
+ - `get_regression_risk` — overall change risk score for the repo
72
+ - `get_consolidation_opportunities` — duplicate logic the PR may introduce
73
+ - `check_reachability` — are new exports wired to entry points?
74
+ - `get_vision_gaps` — do changes align with or drift from specs?
75
+
76
+ **Output of Phase 1:** Architecture map, module profiles for every touched module, blast radius for high-risk changes, dependency paths between coupled modules, regression risk level, duplication findings, reachability status, and spec alignment.
77
+
78
+ ---
79
+
80
+ ## Phase 2 — Parallel Specialized Review
81
+
82
+ **Goal:** Deep-dive the actual code changes from multiple expert angles simultaneously. Launch these as **parallel subagents** — they are independent and should run concurrently.
83
+
84
+ ### Determine which reviewers to dispatch
85
+
86
+ | Agent | When to dispatch | Focus |
87
+ |-------|-----------------|-------|
88
+ | **Code Reviewer** | Always | Bugs, logic errors, CLAUDE.md compliance, code quality. Confidence-filtered (only issues >= 80/100). |
89
+ | **Security Reviewer** | When changes touch auth, encryption, tokens, tenant isolation, data access, billing, webhooks, Cypher queries, or any security-sensitive surface. Also dispatch when Phase 1 regression risk is HIGH. | OWASP Top 10, injection vectors, access control bypasses, tenant isolation violations, cryptographic misuse, secret exposure, plus project-specific security rules. See checklist below. |
90
+ | **Silent Failure Hunter** | When changes touch error handling, catch blocks, fallback logic, API calls, or any code that could suppress errors | Silent failures, broad catches, swallowed errors, missing user feedback, unjustified fallbacks. |
91
+ | **Test Analyzer** | When test files are changed, or when new functionality lacks corresponding tests | Behavioral coverage gaps, brittle tests, missing edge cases, tests that prove nothing. |
92
+ | **Type Design Analyzer** | When new types/interfaces are introduced or existing types are modified | Encapsulation, invariant expression, invariant enforcement. Rates each type 1-10 on four axes. |
93
+
94
+ ### Security Reviewer — Checklist
95
+
96
+ The Security Reviewer agent runs a systematic audit against two layers: universal web security (OWASP) and project-specific invariants.
97
+
98
+ **Layer 1 — OWASP Top 10 + Common Vulnerabilities:**
99
+ - **Injection:** SQL/Cypher injection, command injection, XSS (reflected/stored/DOM), template injection
100
+ - **Broken auth:** Hardcoded credentials, weak token generation, missing expiry, session fixation
101
+ - **Broken access control:** Missing authorization checks, IDOR, privilege escalation, path traversal
102
+ - **Cryptographic failures:** Weak algorithms, plaintext secrets, missing encryption at rest/transit, key exposure
103
+ - **Security misconfiguration:** Permissive CORS, verbose error messages leaking internals, debug endpoints in production
104
+ - **Vulnerable dependencies:** Known CVEs in direct dependencies (check against changed package.json/lockfile)
105
+ - **SSRF:** Unvalidated URLs in fetch/request calls, redirect chains
106
+ - **Logging & monitoring:** Sensitive data in logs, missing audit trails for privileged operations
107
+
108
+ **Layer 2 — Project-Specific Security Rules (from CLAUDE.md):**
109
+ - Every Cypher query takes `repo` as first parameter — no unanchored MATCH clauses
110
+ - `validateRepoOwnership()` runs before every tool handler
111
+ - No default/fallback repo values — repo always from tenant's Postgres `tenant_repos`
112
+ - Tokens stored as SHA-256 hashes, never plaintext
113
+ - GitHub tokens encrypted at rest (AES-256-GCM with per-tenant HKDF-derived keys)
114
+ - Webhook signatures verified on every request (`PHARAOH_GITHUB_WEBHOOK_SECRET`)
115
+ - Org membership re-checked on every token refresh
116
+ - Tenant Neo4j users get `reader` role only — graph writes use admin connection
117
+ - Rate limiting enforced per tenant, not per user
118
+ - Neo4j admin credentials never leave server-side env vars
119
+
120
+ **Detection triggers (auto-dispatch when changed files match):**
121
+ - `src/auth/**`, `src/crypto/**` — authentication, encryption
122
+ - `src/mcp/server.ts`, `src/mcp/tenant-resolver.ts` — session management, tenant isolation
123
+ - `src/mcp/neo4j-queries.ts` — Cypher query construction
124
+ - `src/stripe/**`, `src/web/routes/billing.ts` — payment flows
125
+ - `src/github/webhooks.ts`, `src/web/routes/webhooks.ts` — webhook verification
126
+ - `src/db/**` — database access, schema changes
127
+ - `src/upload/**` — file upload validation
128
+ - Any file containing `validateRepoOwnership`, `runQuery`, `encryptProperty`, `verifyWebhookSignature`
129
+
130
+ **Output format:** Each finding must include:
131
+ 1. Vulnerability class (e.g., "Cypher Injection", "Missing Ownership Check")
132
+ 2. Severity: CRITICAL / HIGH / MEDIUM
133
+ 3. Affected file:line
134
+ 4. Attack scenario: how an attacker would exploit this
135
+ 5. Remediation: specific code change required
136
+
137
+ ### How to dispatch each agent
138
+
139
+ For each agent, launch a subagent (via the Agent tool) with:
140
+ 1. The **git diff** of the relevant changed files (not the full session history)
141
+ 2. The **Pharaoh context** from Phase 1 (architecture map, blast radius, module profiles) — this is what makes these agents architecture-aware
142
+ 3. The **CLAUDE.md rules** relevant to the review (testing requirements, security non-negotiables, code style)
143
+ 4. A clear instruction to focus ONLY on changed code, not pre-existing issues
144
+ 5. For the **Security Reviewer** specifically: include the full Layer 2 checklist above and the list of security-sensitive file paths so it knows the project's threat model
145
+
146
+ Each agent returns a structured report with findings categorized by severity:
147
+ - **CRITICAL** (90-100): Must fix before merge
148
+ - **IMPORTANT** (80-89): Should fix before merge
149
+ - **SUGGESTION** (70-79): Consider for a follow-up
150
+
151
+ ### What NOT to dispatch
152
+
153
+ - **Comment Analyzer** and **Code Simplifier** are polish agents. Do not include them in the review — they distract from correctness. Run them separately if wanted.
154
+ - Do not dispatch agents for trivial changes (typo fixes, dependency bumps, config changes). If Phase 0 shows < 20 lines changed across non-test files, skip Phase 2 entirely and go straight to Phase 4.
155
+
156
+ ---
157
+
158
+ ## Phase 3 — Adversarial Review
159
+
160
+ **Goal:** Independent second opinion on security-sensitive changes. A different agent evaluates the code fresh, without knowledge of your reasoning.
161
+
162
+ ### When to trigger
163
+
164
+ Trigger Phase 3 when ANY of these are true:
165
+ - Changes touch **auth, encryption, access control, token handling, or session management**
166
+ - Changes touch **tenant isolation, query construction, or data access patterns**
167
+ - Changes touch **billing, subscription management, or payment flows**
168
+ - Changes modify **webhook verification or signature checking**
169
+ - Regression risk from Phase 1 is **HIGH**
170
+ - You are not confident about a specific change's correctness
171
+
172
+ If none of these triggers are met, **skip Phase 3** and proceed to Phase 4.
173
+
174
+ ### How to run
46
175
 
47
- Auto-block triggers (any of these = BLOCK):
48
- - Unreachable exports (new code with zero callers)
176
+ 1. **Prepare a review package** do NOT send your session history:
177
+ - The changed files (full diff or complete file contents)
178
+ - What the code does and why it was changed (1-2 sentences)
179
+ - Security constraints from CLAUDE.md (tenant isolation rules, encryption requirements, etc.)
180
+ - Specific concerns you want the reviewer to focus on
181
+
182
+ 2. **Dispatch to an independent subagent** with instructions to evaluate the code fresh and assign verdicts:
183
+
184
+ | Verdict | Meaning |
185
+ |---------|---------|
186
+ | **AGREE** | Implementation is correct for the stated concern |
187
+ | **DISAGREE** | Concrete issue identified with evidence and suggested fix |
188
+ | **CONTEXT** | Cannot determine correctness — needs more information |
189
+
190
+ 3. **Evaluate findings:**
191
+ - AGREE items: no action
192
+ - DISAGREE items: verify against actual code. If confirmed, it becomes a CRITICAL finding. If the reviewer lacked context, document why the current approach is correct.
193
+ - CONTEXT items: provide the missing information and note it in the review output
194
+
195
+ ---
196
+
197
+ ## Phase 4 — Synthesis & Verdict
198
+
199
+ **Goal:** Merge all findings into a single, actionable review. No raw dumps — synthesize.
200
+
201
+ ### Structure the output as:
202
+
203
+ ```markdown
204
+ # Review: [branch-name] → [base-branch]
205
+
206
+ **[X] commits | [Y] files changed | [Z] modules touched**
207
+ **Worktree:** [path] (or "main repo")
208
+
209
+ ---
210
+
211
+ ## Architecture Impact
212
+ - Modules affected: [list with blast radius numbers]
213
+ - Dependency changes: [new coupling, removed coupling]
214
+ - Highest blast radius: [module/function] → [N downstream callers across M modules]
215
+
216
+ ## Risk Assessment
217
+ - Regression risk: [LOW / MEDIUM / HIGH] — [one-line reason]
218
+ - Volatile modules touched: [list, if any]
219
+ - Wiring status: [all new exports reachable? / N unreachable exports found]
220
+
221
+ ## Code Quality ([N] findings)
222
+
223
+ ### Critical ([count])
224
+ - [finding with file:line, source agent, and fix]
225
+
226
+ ### Important ([count])
227
+ - [finding with file:line, source agent, and fix]
228
+
229
+ ### Suggestions ([count])
230
+ - [finding with file:line]
231
+
232
+ ## Security ([N] findings, or "No security-sensitive changes")
233
+ - [Security reviewer findings with vulnerability class, severity, file:line, attack scenario, and remediation]
234
+ - [Or: "Security reviewer not dispatched — no security-sensitive files in changeset"]
235
+
236
+ ## Test Coverage
237
+ - [Test analyzer summary — gaps, quality issues, positive observations]
238
+
239
+ ## Spec Alignment
240
+ - [Vision gaps introduced or resolved]
241
+
242
+ ## Adversarial Review
243
+ - [Phase 3 results, or "Skipped — no security-sensitive changes detected"]
244
+
245
+ ---
246
+
247
+ ## Verdict: [SHIP / SHIP WITH CHANGES / BLOCK]
248
+
249
+ [If not SHIP: numbered list of specific required changes before merge]
250
+ ```
251
+
252
+ ### Auto-block triggers (any of these = BLOCK)
253
+
254
+ - Any CRITICAL security finding (injection, broken access control, tenant isolation violation, secret exposure)
255
+ - Unreachable exports (new public code with zero callers)
49
256
  - New circular dependencies between modules
50
257
  - HIGH regression risk without corresponding test coverage
51
258
  - Vision spec violations (building against spec intent)
259
+ - Any CRITICAL finding from Phase 2 or Phase 3 that is confirmed and unfixed
260
+ - DISAGREE verdict from adversarial review on security-sensitive code, confirmed after verification
261
+ - Unanchored Cypher query (MATCH without traversing through `Repo {name: $repo}`)
262
+ - Missing `validateRepoOwnership()` on a new tool handler
263
+
264
+ ### SHIP WITH CHANGES triggers
265
+
266
+ - IMPORTANT findings that are confirmed but non-blocking
267
+ - Test coverage gaps for new functionality
268
+ - Duplication that should be consolidated in a follow-up
269
+ - Spec drift that is intentional but should be documented
270
+
271
+ ### SHIP triggers
272
+
273
+ - No CRITICAL or confirmed IMPORTANT findings
274
+ - All new exports are reachable
275
+ - Regression risk is LOW or MEDIUM with adequate test coverage
276
+ - Spec alignment is clean or intentionally divergent with documentation
277
+
278
+ ---
279
+
280
+ ## Quick Mode
52
281
 
53
- ## Output
282
+ For small changes (< 50 lines, single module, no security surface):
283
+ - Run Phase 0 + Phase 1 + Phase 4 only
284
+ - Skip Phase 2 (parallel agents) and Phase 3 (adversarial)
285
+ - Still architecture-aware, just faster
54
286
 
55
- A structured review containing:
56
- - Architecture impact summary with specific modules and blast radius numbers
57
- - Risk level (LOW / MEDIUM / HIGH) with data backing
58
- - Wiring status for all new exports
59
- - Duplication findings with affected modules
60
- - Spec alignment verdict
61
- - Final verdict (SHIP / SHIP WITH CHANGES / BLOCK) with specific required changes if not SHIP
287
+ Explicitly opt in with: `/review quick`
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: review-codex
3
+ prompt-name: cross-model-review
3
4
  description: "Cross-model security review. Dispatch code to a different AI model or subagent for independent second-opinion review. Evaluator applies AGREE, DISAGREE, or CONTEXT verdicts to each finding. Catches blind spots from single-model reasoning. Use for security-sensitive code, auth flows, data access, and architectural decisions."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: review-receive
3
+ prompt-name: receive-code-review
3
4
  description: "Receive code review feedback with technical rigor. No performative agreement — verify suggestions against codebase reality before implementing. Push back with evidence when feedback is wrong. Clarify all unclear items before implementing any. External feedback is suggestions to evaluate, not orders to follow."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: sessions
3
+ prompt-name: session-decomposition
3
4
  description: "Decompose work into parallel, isolated sessions using git worktrees. Each session gets fresh context, a narrow scope, and produces atomic commits. Prevents context window pollution from large tasks. Coordinate across sessions without shared state."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: tdd
3
+ prompt-name: test-driven-development
3
4
  description: "Test-driven development discipline. Write the failing test first, watch it fail, write minimal code to pass, refactor. No production code without a failing test. No exceptions without explicit permission. Covers red-green-refactor cycle, common rationalizations, and when to start over."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: verify
3
+ prompt-name: verification
3
4
  description: "Evidence before assertions. Run verification commands and confirm output before claiming work is complete, fixed, or passing. No 'should work now' — run the command, read the output, then claim the result. Covers tests, builds, linting, agent delegation, and requirement checklists."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: wiring
3
+ prompt-name: validate-wiring
3
4
  description: "Wiring validation for a codebase module using Pharaoh knowledge graph. Four-step pro-tier workflow: entry point reachability, caller verification via blast radius, test coverage per function, and dead code detection. Categorizes functions as CONNECTED, UNREACHABLE, DEAD, or UNTESTED. Produces a PASS or FAIL verdict with specific issues listed. Iron law: zero callers on a non-entry-point export means the code is not wired."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: worktree
3
+ prompt-name: git-worktree
3
4
  description: "Set up isolated git worktrees for feature work. Smart directory selection with safety verification — checks for existing worktree directories, verifies gitignore, auto-detects project setup, and confirms clean test baseline before starting. Prevents accidentally committing worktree contents."
4
5
  version: 0.2.0
5
6
  homepage: https://pharaoh.so