@pharaoh-so/mcp 0.3.28 → 0.3.31

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/README.md CHANGED
@@ -64,45 +64,28 @@ Authentication uses [RFC 8628](https://datatracker.ietf.org/doc/html/rfc8628) (O
64
64
 
65
65
  ## Available Tools
66
66
 
67
- Once connected, Pharaoh provides 19 MCP tools organized into four categories:
67
+ Once connected, Pharaoh provides these MCP tools:
68
68
 
69
- ### Orient (Free)
69
+ ### Orient
70
70
 
71
71
  | Tool | What it answers |
72
72
  |------|----------------|
73
73
  | `get_codebase_map` | What modules exist and how do they relate? |
74
74
  | `get_module_context` | What does this module look like before I modify it? |
75
75
  | `search_functions` | Does this function already exist somewhere? |
76
- | `get_design_system` | What UI components and tokens already exist? |
76
+ | `pharaoh_recon` | Map, module context, search and blast radius in one call |
77
77
 
78
- ### Investigate (Free + Pro)
78
+ ### Investigate
79
79
 
80
80
  | Tool | What it answers |
81
81
  |------|----------------|
82
82
  | `get_blast_radius` | What breaks if I change this function/file/module? |
83
- | `query_dependencies` | How are these two modules connected? |
84
- | `check_reachability` | Is this function actually reachable from entry points? |
85
- | `get_vision_docs` | Is there a PRD or spec for this? |
86
83
 
87
- ### Audit (Pro)
84
+ ### Manage
88
85
 
89
86
  | Tool | What it answers |
90
87
  |------|----------------|
91
- | `get_vision_gaps` | What's specified but not built? What's built but not specified? |
92
- | `get_cross_repo_audit` | Are shared dependencies drifting between repos? |
93
- | `get_consolidation_opportunities` | Where is duplicate or overlapping logic? |
94
- | `get_unused_code` | What code is never called and safe to delete? |
95
- | `get_test_coverage` | Which modules/functions lack test coverage? |
96
- | `get_regression_risk` | How risky is this change to production? |
97
-
98
- ### Manage (Free)
99
-
100
- | Tool | What it answers |
101
- |------|----------------|
102
- | `request_upload` | Map a local repo without installing the GitHub App |
103
- | `setup_environment` | Install recommended development plugins |
104
88
  | `pharaoh_account` | Check plan, toggle PR Guard, trigger refresh |
105
- | `pharaoh_feedback` | Report false positives or tool issues |
106
89
  | `pharaoh_admin` | Org-level administration |
107
90
 
108
91
  ## Inspect Mode
package/commands/plan.md CHANGED
@@ -39,12 +39,11 @@ Do NOT review from memory or assumptions. Query the actual codebase first.
39
39
  ### If Pharaoh MCP tools are available:
40
40
 
41
41
  1. `get_codebase_map` — current modules, hot files, dependency graph
42
- 2. `get_vision_docs` — read the repo's architectural contract. If the plan touches a domain with a MUST-bullet, the assertion is a hard constraint on the plan. Raise it explicitly in Section 1. If `get_vision_docs` returns an empty-state scaffold, flag that the repo needs `/pharaoh:vision` before planning anything architectural.
42
+ 2. Read `docs/VISION.md` if the repo has one — the repo's architectural contract. If the plan touches a domain with a MUST-bullet, the assertion is a hard constraint on the plan. Raise it explicitly in Section 1.
43
43
  3. `search_functions` for keywords related to the plan — find existing code to reuse/extend
44
44
  4. `get_module_context` on affected modules — entry points, patterns, conventions
45
- 5. `query_dependencies` between affected modules — coupling, circular deps
45
+ 5. `pharaoh_recon` with `dependencies` pairs for the affected modules — coupling, circular deps
46
46
  6. `get_blast_radius` on the primary target of the change — know what breaks
47
- 7. `check_reachability` on the primary target — verify it's actually reachable from entry points before worrying about it
48
47
 
49
48
  ### Without Pharaoh (graceful fallback):
50
49
 
@@ -96,7 +95,6 @@ Adapt depth to change size. Skip sections that don't apply. **After each section
96
95
 
97
96
  - Are all new exports called from a production entry point?
98
97
  - Run `get_blast_radius` on any new/changed functions — zero callers = not done
99
- - `check_reachability` on new exports — verify reachable from API handlers, crons, or event handlers
100
98
  - Does the plan declare WHERE new code gets called from? If not, flag it
101
99
  - Integration points: how does this connect to what already exists?
102
100
 
@@ -138,7 +136,6 @@ Number each issue (1, 2, 3...) and letter each option (A, B, C...). Recommended
138
136
 
139
137
  - **Before reviewing**: recon (Step 1 above)
140
138
  - **During review**: `get_blast_radius` when evaluating impact of changes; `search_functions` before suggesting new code
141
- - **After decisions**: `check_reachability` on all new exports; `get_unused_code` to catch disconnections
142
139
  - **Final sweep**: `get_blast_radius` on ALL new exports — zero callers on non-entry-points = plan is incomplete
143
140
 
144
141
  ## Workflow Rules
@@ -61,14 +61,9 @@ Call `pharaoh_recon` with:
61
61
  - **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.
62
62
  - **dependencies:** Pairs of touched modules to trace coupling between (up to 3)
63
63
 
64
- Then call these additional tools for data recon doesn't cover:
65
- - `get_regression_risk` — overall change risk score for the repo
66
- - `get_consolidation_opportunities` — duplicate logic the PR may introduce
67
- - `check_reachability` — are new exports wired to entry points?
68
- - `get_vision_docs` — read the repo's architectural contract. For every touched module, pull its relevant assertions. Any change touching code governed by a MUST-bullet must be checked against that assertion — if the change would violate the MUST, the verdict tips toward BLOCK unless VISION.md is updated in the same PR with user approval.
69
- - `get_vision_gaps` — do changes align with or drift from specs? New complex functions without a matching assertion are flagged; retired specs with implementing code are flagged.
64
+ Then read `docs/VISION.md` if the repo has one — the repo's architectural contract. For every touched module, find its relevant assertions. Any change touching code governed by a MUST-bullet must be checked against that assertion — if the change would violate the MUST, the verdict tips toward BLOCK unless VISION.md is updated in the same PR with user approval.
70
65
 
71
- **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.
66
+ **Output of Phase 1:** Architecture map, module profiles for every touched module, blast radius for high-risk changes, dependency paths between coupled modules, and spec alignment.
72
67
 
73
68
  ---
74
69
 
@@ -81,7 +76,7 @@ Then call these additional tools for data recon doesn't cover:
81
76
  | Agent | When to dispatch | Focus |
82
77
  |-------|-----------------|-------|
83
78
  | **Code Reviewer** | Always | Bugs, logic errors, CLAUDE.md compliance, code quality. Confidence-filtered (only issues >= 80/100). |
84
- | **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. |
79
+ | **Security Reviewer** | When changes touch auth, encryption, tokens, tenant isolation, data access, billing, webhooks, Cypher queries, or any security-sensitive surface. Also dispatch when the Phase 1 blast radius marks the change as HIGH risk. | OWASP Top 10, injection vectors, access control bypasses, tenant isolation violations, cryptographic misuse, secret exposure, plus project-specific security rules. See checklist below. |
85
80
  | **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. |
86
81
  | **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. |
87
82
  | **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. |
@@ -119,7 +114,6 @@ The Security Reviewer agent runs a systematic audit against two layers: universa
119
114
  - `src/stripe/**`, `src/web/routes/billing.ts` — payment flows
120
115
  - `src/github/webhooks.ts`, `src/web/routes/webhooks.ts` — webhook verification
121
116
  - `src/db/**` — database access, schema changes
122
- - `src/upload/**` — file upload validation
123
117
  - Any file containing `validateRepoOwnership`, `runQuery`, `encryptProperty`, `verifyWebhookSignature`
124
118
 
125
119
  **Output format:** Each finding must include:
@@ -161,7 +155,7 @@ Trigger Phase 3 when ANY of these are true:
161
155
  - Changes touch **tenant isolation, query construction, or data access patterns**
162
156
  - Changes touch **billing, subscription management, or payment flows**
163
157
  - Changes modify **webhook verification or signature checking**
164
- - Regression risk from Phase 1 is **HIGH**
158
+ - The Phase 1 blast radius marks the change as **HIGH** risk
165
159
  - You are not confident about a specific change's correctness
166
160
 
167
161
  If none of these triggers are met, **skip Phase 3** and proceed to Phase 4.