Skip to content

Commit 1e1e116

Browse files
wmaynerclaude
andcommitted
Add campaign_walkthrough MCP prompt
An interactive, step-ordered guide for planning a cluster campaign on a large system: get the substrate into the server, price the full workload honestly against the 72-hour slot, elicit a feasible scope with re-estimation, choose the SIA mode, review the budget and planned ledger, and hand off the condor submit/monitor/collect steps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PEAxNzhDCaTrntX3o1JqMV
1 parent 969918e commit 1e1e116

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the `campaign_walkthrough` MCP prompt: an interactive, step-ordered guide for setting up a cluster campaign for a large system — system intake, honest feasibility pricing, scope elicitation with re-estimation, SIA mode, budget and packing review, and the cluster hand-off.

pyphi/mcp/prompts.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,68 @@ def migrate_code(code: str) -> str:
6868
"φ_s = 0 under the new 2026 default)."
6969
)
7070

71+
@mcp.prompt()
72+
def campaign_walkthrough(description: str = "") -> str:
73+
"""Plan a cluster campaign for a large system, step by step.
74+
75+
Parameters
76+
----------
77+
description : str, optional
78+
Anything already known about the system and the desired
79+
results (size, dynamics, which quantities matter, cluster
80+
access). Leave empty to start from scratch.
81+
"""
82+
context = f"What I know so far:\n\n{description}\n\n" if description else ""
83+
return (
84+
"Help me set up an HTCondor campaign (for example on UW-Madison's "
85+
f"CHTC) to analyze a large system with PyPhi.\n\n{context}"
86+
"First read the 'campaigns' and 'performance' reference topics "
87+
"with get_iit_reference. Then walk me through the setup "
88+
"interactively — one question at a time, each step's outcome "
89+
"reviewed with me before the next:\n\n"
90+
"1. The system. Get the substrate into the server: an example via "
91+
"load_example, or build mine with build_substrate (use the "
92+
"build_system_walkthrough approach if I only have a description). "
93+
"Confirm it with describe_substrate. Establish the state to "
94+
"analyze and what result I actually need: the cause-effect "
95+
"structure of one system (a CES campaign), or many independent "
96+
"runs across states/substrates/formalisms (a sweep campaign).\n"
97+
"2. Honest feasibility. Price the full, unscoped workload with "
98+
"estimate_cost. Work units are enumeration counts, not seconds; "
99+
"as an anchor, a single 72-hour condor slot covers very roughly "
100+
"10^8 to 10^10 units depending on per-unit cost, so counts far "
101+
"beyond that per cell mean the full computation is out of reach "
102+
"no matter how many jobs we use. Tell me plainly if it is.\n"
103+
"3. Scope (CES campaigns). If the full surface is infeasible, "
104+
"elicit a feasible one: which mechanisms matter to me (an "
105+
"explicit list, an order bound, units that must be involved), "
106+
"and any purview constraints. Re-run estimate_cost with the "
107+
"scope until the total is tractable, showing me the numbers at "
108+
"each step. Be clear about what exclusion means: within the "
109+
"scope every value is exact, and the excluded remainder is "
110+
"covered by certified bounds in the scope report — a scope "
111+
"narrows the computation, it never approximates it.\n"
112+
"4. The SIA. Decide how the system irreducibility analysis is "
113+
"handled: sharded in the campaign (the default), supplied "
114+
"precomputed (sia_ref, if I already have one), or skipped — in "
115+
"which case congruence resolves against the intrinsic-"
116+
"information state and the result carries no Φₛ.\n"
117+
"5. Budget and packing. Choose units_per_job with me: enough "
118+
"jobs to use the pool, each job minutes-to-hours of work, and "
119+
"well under the 72-hour slot. Review the planned task ledger "
120+
"and any admission-control warnings from prepare_ces_campaign "
121+
"(or prepare_campaign for sweeps) before treating the campaign "
122+
"as ready. Set a seed.\n"
123+
"6. Hand-off. Give me the exact cluster steps: build the "
124+
"container image, copy the campaign directory to the access "
125+
"point, condor_submit pyphi.sub; then campaign_status to "
126+
"monitor (resubmission is just condor_submit again), and "
127+
"collect_campaign when done — including how to read the scope "
128+
"report's Σφ_r lower bound and measured upper bounds.\n\n"
129+
"Never prepare into an existing directory, and confirm my "
130+
"choices at each numbered step before acting on them."
131+
)
132+
71133
@mcp.prompt()
72134
def build_system_walkthrough(description: str) -> str:
73135
"""Turn a description of some units into a valid substrate.

0 commit comments

Comments
 (0)