@pharaoh-so/mcp 0.3.51 → 0.3.53
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/.mcp.json +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +2 -1
- package/dist/backend.d.ts +31 -0
- package/dist/backend.js +49 -1
- package/dist/helpers.js +1 -1
- package/dist/index.js +16 -3
- package/dist/install-skills.d.ts +3 -3
- package/dist/install-skills.js +36 -6
- package/dist/proxy-server.d.ts +1 -0
- package/dist/proxy-server.js +19 -2
- package/dist/setup.d.ts +19 -0
- package/dist/setup.js +45 -11
- package/package.json +1 -1
- package/trace-app.html +299 -112
- package/commands/sessions.md +0 -101
- package/skills/parallel/SKILL.md +0 -75
- package/skills/sessions/SKILL.md +0 -102
package/commands/sessions.md
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Decompose work into parallel, isolated sessions using git worktrees
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Session Decomposition
|
|
6
|
-
|
|
7
|
-
Break large tasks into parallel, isolated work sessions. Each session runs in its own git worktree with fresh context, focused scope, and atomic commits.
|
|
8
|
-
|
|
9
|
-
## When to Use
|
|
10
|
-
|
|
11
|
-
- Task is too large for a single context window
|
|
12
|
-
- Work has 3+ independent sub-tasks that don't touch the same files
|
|
13
|
-
- You need to preserve context quality across a multi-hour effort
|
|
14
|
-
- Multiple features or fixes can proceed in parallel
|
|
15
|
-
|
|
16
|
-
## Do Not Use When
|
|
17
|
-
|
|
18
|
-
- Sub-tasks share files or state
|
|
19
|
-
- Work is sequential (each step depends on the previous)
|
|
20
|
-
- Task fits comfortably in one session
|
|
21
|
-
|
|
22
|
-
## Step 1: Reconnaissance
|
|
23
|
-
|
|
24
|
-
If Pharaoh MCP tools are available, call `get_codebase_map` and `get_module_context` on affected modules to understand the current landscape before decomposing.
|
|
25
|
-
|
|
26
|
-
## Step 2: Decompose
|
|
27
|
-
|
|
28
|
-
Break the task into sessions. Each session must:
|
|
29
|
-
|
|
30
|
-
- Have a clear, narrow goal (one feature, one fix, one module)
|
|
31
|
-
- Touch a distinct set of files — no overlap between sessions
|
|
32
|
-
- Be independently verifiable (tests pass, build succeeds)
|
|
33
|
-
- Produce atomic commits that make sense on their own
|
|
34
|
-
|
|
35
|
-
## Step 3: Write Session Prompts
|
|
36
|
-
|
|
37
|
-
For each session, write a complete prompt containing:
|
|
38
|
-
|
|
39
|
-
- **Goal:** what this session produces (1-2 sentences)
|
|
40
|
-
- **Scope:** which files/modules to touch (explicit list)
|
|
41
|
-
- **Constraints:** what NOT to change
|
|
42
|
-
- **Verification:** how to confirm the work is correct
|
|
43
|
-
- **Context:** any architectural decisions or patterns to follow
|
|
44
|
-
|
|
45
|
-
## Step 4: Present for Review (MANDATORY — do NOT skip)
|
|
46
|
-
|
|
47
|
-
**STOP. Paste every session prompt into the chat as a numbered list.**
|
|
48
|
-
|
|
49
|
-
For each session, show:
|
|
50
|
-
1. The session name
|
|
51
|
-
2. The full prompt text
|
|
52
|
-
3. Which sessions need `/plan` review (flag anything non-trivial)
|
|
53
|
-
|
|
54
|
-
**Wait for the user to approve, modify, add, remove, or reorder sessions before proceeding.** Do not create worktrees or execute any work until the user explicitly approves the decomposition.
|
|
55
|
-
|
|
56
|
-
If the user says "looks good" or similar, proceed. If they request changes, update the prompts and present again.
|
|
57
|
-
|
|
58
|
-
## Step 5: Create Worktrees
|
|
59
|
-
|
|
60
|
-
Only after user approval. For each session, create an isolated worktree:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
git worktree add .worktrees/<session-name> -b <branch-name>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Install dependencies in each worktree. Verify clean baseline (tests pass).
|
|
67
|
-
|
|
68
|
-
## Step 6: Execute Sessions
|
|
69
|
-
|
|
70
|
-
Run each session independently. Sessions should not reference each other's work-in-progress — they operate on the same base commit.
|
|
71
|
-
|
|
72
|
-
## Step 7: Integrate
|
|
73
|
-
|
|
74
|
-
After all sessions complete:
|
|
75
|
-
|
|
76
|
-
1. Verify each branch independently (tests pass, build succeeds)
|
|
77
|
-
2. Merge branches sequentially into the target branch
|
|
78
|
-
3. Resolve any conflicts (rare if decomposition was clean)
|
|
79
|
-
4. Run full verification on the integrated result
|
|
80
|
-
|
|
81
|
-
## Decomposition Rules
|
|
82
|
-
|
|
83
|
-
| Good decomposition | Bad decomposition |
|
|
84
|
-
|---|---|
|
|
85
|
-
| Session A: auth module, Session B: billing module | Session A: backend, Session B: frontend (likely share types) |
|
|
86
|
-
| Session A: new feature, Session B: unrelated bugfix | Session A: write code, Session B: write tests (coupled) |
|
|
87
|
-
| Session A: parser, Session B: renderer (clear interface) | Session A: first half of file, Session B: second half |
|
|
88
|
-
|
|
89
|
-
## Key Principles
|
|
90
|
-
|
|
91
|
-
- **No shared files** — if two sessions touch the same file, merge them into one
|
|
92
|
-
- **Fresh context per session** — don't carry state between sessions
|
|
93
|
-
- **Atomic commits** — each session's output should be a coherent, reviewable unit
|
|
94
|
-
- **Verify before integrating** — never merge a session that doesn't pass its own checks
|
|
95
|
-
- **Decomposition is the hard part** — spend time getting boundaries right before starting work
|
|
96
|
-
- **The user reviews before execution** — always present prompts, never skip to building
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
Here is the task to decompose into sessions:
|
|
100
|
-
|
|
101
|
-
$ARGUMENTS
|
package/skills/parallel/SKILL.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: parallel
|
|
3
|
-
prompt-name: parallel-agents
|
|
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."
|
|
5
|
-
version: 0.2.0
|
|
6
|
-
homepage: https://pharaoh.so
|
|
7
|
-
user-invocable: true
|
|
8
|
-
metadata: {"emoji": "☥", "tags": ["parallel", "subagents", "concurrency", "delegation", "efficiency"]}
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Parallel Dispatch
|
|
12
|
-
|
|
13
|
-
Delegate independent tasks to specialized agents running concurrently. Each agent gets isolated context and focused scope. Never share your session history — construct exactly what each agent needs.
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
- 2+ independent tasks with no shared state
|
|
18
|
-
- Multiple failures across different subsystems
|
|
19
|
-
- Each problem can be understood without context from others
|
|
20
|
-
- Agents won't edit the same files
|
|
21
|
-
|
|
22
|
-
## Do Not Use When
|
|
23
|
-
|
|
24
|
-
- Failures are related (fixing one might fix others)
|
|
25
|
-
- Tasks require understanding full system state
|
|
26
|
-
- Agents would edit the same files or resources
|
|
27
|
-
- You don't yet know what's broken (investigate first)
|
|
28
|
-
|
|
29
|
-
## The Pattern
|
|
30
|
-
|
|
31
|
-
### 1. Identify Independent Domains
|
|
32
|
-
|
|
33
|
-
Group work by what's independent:
|
|
34
|
-
- Different test files with different root causes
|
|
35
|
-
- Different modules with unrelated issues
|
|
36
|
-
- Different features with no shared code
|
|
37
|
-
|
|
38
|
-
### 2. Craft Agent Prompts
|
|
39
|
-
|
|
40
|
-
Each agent gets:
|
|
41
|
-
|
|
42
|
-
- **Specific scope:** one file, one module, one subsystem
|
|
43
|
-
- **Clear goal:** what success looks like
|
|
44
|
-
- **Constraints:** what NOT to change
|
|
45
|
-
- **Context:** error messages, relevant code paths, architectural notes
|
|
46
|
-
- **Expected output:** summary of findings and changes
|
|
47
|
-
|
|
48
|
-
### 3. Dispatch
|
|
49
|
-
|
|
50
|
-
Launch all agents simultaneously. They run concurrently with no coordination needed.
|
|
51
|
-
|
|
52
|
-
### 4. Review and Integrate
|
|
53
|
-
|
|
54
|
-
When agents return:
|
|
55
|
-
|
|
56
|
-
1. Read each summary — understand what changed
|
|
57
|
-
2. Check for conflicts — did agents edit overlapping code?
|
|
58
|
-
3. Run full test suite — verify all fixes work together
|
|
59
|
-
4. Spot-check results — agents can make systematic errors
|
|
60
|
-
|
|
61
|
-
## Prompt Quality
|
|
62
|
-
|
|
63
|
-
| Bad | Good |
|
|
64
|
-
|-----|------|
|
|
65
|
-
| "Fix all the tests" | "Fix the 3 failures in agent-abort.test.ts" |
|
|
66
|
-
| "Fix the race condition" | "Fix timing in abort test — here are the error messages: ..." |
|
|
67
|
-
| No constraints | "Do NOT change production code, fix tests only" |
|
|
68
|
-
| "Fix it" | "Return: root cause summary + what you changed" |
|
|
69
|
-
|
|
70
|
-
## Iron Rules
|
|
71
|
-
|
|
72
|
-
- **One task per agent** — focused agents produce better results than broad ones
|
|
73
|
-
- **No shared state** — agents must not depend on each other's output
|
|
74
|
-
- **Never trust agent reports** — verify changes independently before integrating
|
|
75
|
-
- **Construct context, don't inherit** — give each agent exactly what it needs, nothing more
|
package/skills/sessions/SKILL.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sessions
|
|
3
|
-
prompt-name: session-decomposition
|
|
4
|
-
description: "Decompose work into parallel, isolated sessions using git worktrees. Each session gets fresh context, a narrow scope, and produces atomic commits. Presents session prompts for user review before execution."
|
|
5
|
-
version: 0.3.0
|
|
6
|
-
homepage: https://pharaoh.so
|
|
7
|
-
user-invocable: true
|
|
8
|
-
metadata: {"emoji": "☥", "tags": ["sessions", "worktrees", "parallel-work", "context-management", "decomposition"]}
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Session Decomposition
|
|
12
|
-
|
|
13
|
-
Break large tasks into parallel, isolated work sessions. Each session runs in its own git worktree with fresh context, focused scope, and atomic commits.
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
- Task is too large for a single context window
|
|
18
|
-
- Work has 3+ independent sub-tasks that don't touch the same files
|
|
19
|
-
- You need to preserve context quality across a multi-hour effort
|
|
20
|
-
- Multiple features or fixes can proceed in parallel
|
|
21
|
-
|
|
22
|
-
## Do Not Use When
|
|
23
|
-
|
|
24
|
-
- Sub-tasks share files or state
|
|
25
|
-
- Work is sequential (each step depends on the previous)
|
|
26
|
-
- Task fits comfortably in one session
|
|
27
|
-
|
|
28
|
-
## Step 1: Reconnaissance
|
|
29
|
-
|
|
30
|
-
If Pharaoh MCP tools are available, call `get_codebase_map` and `get_module_context` on affected modules to understand the current landscape before decomposing.
|
|
31
|
-
|
|
32
|
-
## Step 2: Decompose
|
|
33
|
-
|
|
34
|
-
Break the task into sessions. Each session must:
|
|
35
|
-
|
|
36
|
-
- Have a clear, narrow goal (one feature, one fix, one module)
|
|
37
|
-
- Touch a distinct set of files — no overlap between sessions
|
|
38
|
-
- Be independently verifiable (tests pass, build succeeds)
|
|
39
|
-
- Produce atomic commits that make sense on their own
|
|
40
|
-
|
|
41
|
-
## Step 3: Write Session Prompts
|
|
42
|
-
|
|
43
|
-
For each session, write a complete prompt containing:
|
|
44
|
-
|
|
45
|
-
- **Goal:** what this session produces (1-2 sentences)
|
|
46
|
-
- **Scope:** which files/modules to touch (explicit list)
|
|
47
|
-
- **Constraints:** what NOT to change
|
|
48
|
-
- **Verification:** how to confirm the work is correct
|
|
49
|
-
- **Context:** any architectural decisions or patterns to follow
|
|
50
|
-
|
|
51
|
-
## Step 4: Present for Review (MANDATORY — do NOT skip)
|
|
52
|
-
|
|
53
|
-
**STOP. Paste every session prompt into the chat as a numbered list.**
|
|
54
|
-
|
|
55
|
-
For each session, show:
|
|
56
|
-
1. The session name
|
|
57
|
-
2. The full prompt text
|
|
58
|
-
3. Which sessions need `/plan` review (flag anything non-trivial)
|
|
59
|
-
|
|
60
|
-
**Wait for the user to approve, modify, add, remove, or reorder sessions before proceeding.** Do not create worktrees or execute any work until the user explicitly approves the decomposition.
|
|
61
|
-
|
|
62
|
-
If the user says "looks good" or similar, proceed. If they request changes, update the prompts and present again.
|
|
63
|
-
|
|
64
|
-
## Step 5: Create Worktrees
|
|
65
|
-
|
|
66
|
-
Only after user approval. For each session, create an isolated worktree:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
git worktree add .worktrees/<session-name> -b <branch-name>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Install dependencies in each worktree. Verify clean baseline (tests pass).
|
|
73
|
-
|
|
74
|
-
## Step 6: Execute Sessions
|
|
75
|
-
|
|
76
|
-
Run each session independently. Sessions should not reference each other's work-in-progress — they operate on the same base commit.
|
|
77
|
-
|
|
78
|
-
## Step 7: Integrate
|
|
79
|
-
|
|
80
|
-
After all sessions complete:
|
|
81
|
-
|
|
82
|
-
1. Verify each branch independently (tests pass, build succeeds)
|
|
83
|
-
2. Merge branches sequentially into the target branch
|
|
84
|
-
3. Resolve any conflicts (rare if decomposition was clean)
|
|
85
|
-
4. Run full verification on the integrated result
|
|
86
|
-
|
|
87
|
-
## Decomposition Rules
|
|
88
|
-
|
|
89
|
-
| Good decomposition | Bad decomposition |
|
|
90
|
-
|---|---|
|
|
91
|
-
| Session A: auth module, Session B: billing module | Session A: backend, Session B: frontend (likely share types) |
|
|
92
|
-
| Session A: new feature, Session B: unrelated bugfix | Session A: write code, Session B: write tests (coupled) |
|
|
93
|
-
| Session A: parser, Session B: renderer (clear interface) | Session A: first half of file, Session B: second half |
|
|
94
|
-
|
|
95
|
-
## Key Principles
|
|
96
|
-
|
|
97
|
-
- **No shared files** — if two sessions touch the same file, merge them into one
|
|
98
|
-
- **Fresh context per session** — don't carry state between sessions
|
|
99
|
-
- **Atomic commits** — each session's output should be a coherent, reviewable unit
|
|
100
|
-
- **Verify before integrating** — never merge a session that doesn't pass its own checks
|
|
101
|
-
- **Decomposition is the hard part** — spend time getting boundaries right before starting work
|
|
102
|
-
- **The user reviews before execution** — always present prompts, never skip to building
|