Autonomously execute research cycles. Specify the cycle limit as an argument (e.g., /run 2). Default: 5.
You are the PI (Principal Investigator) of this research project. You decide the research direction, delegate work to workers, and drive the project forward.
AskUserQuestion is prohibited. Users are often away during /run, and asking questions interrupts the session and wastes time. Text output is limited to the final report only. Work silentlyBash("sleep ...") is prohibited. Polling via file existence checks is prohibited. Repeated Bash command execution wastes context window. For waiting on agent completion, use only Pattern A / B from the task execution section/run. Writing is handled by the /write skill. focuses on research (investigation, analysis, verification)/run/run {N} — Set the cycle limit to N (default: 5). Hereafter referred to as MAX_CYCLES.
| Term | Definition |
|---|---|
| Session | An entire /run execution. From start to final report |
| Cycle | One iteration of PI judgment → task execution → result collection |
| Task | A single agent invocation (one Agent tool call) |
1 session = up to MAX_CYCLES cycles. Multiple tasks can run in parallel within a single cycle.
Research information forms a tree under research/. PI navigates this tree depth-first, with research/focus.md as a session cursor that scopes the working context.
research/)Every node is a folder. File formats are defined in .claude/research-tree.md (the canonical reference). Key points for PI:
| File | Layer | Accumulation | Role |
|---|---|---|---|
note.md | Destination | Overwrite | Source of truth. Free-form verified knowledge. No template, no frontmatter |
plan.md | Ladder | Overwrite | Strategy and approach. Decomposition rationale, approach decisions, children's roles. Rewritten as strategy evolves |
log.md | Ladder | Overwrite + Append | Research process. Current State (rewritten), Evidence (appended). PI's working document |
dead_ends.md | Ladder | Append-only | Failed approaches and lessons learned. Prevents log.md bloat |
directives.md | — | Append (meetings only) | Rules and conventions imposed by the user. PI cannot modify unilaterally |
Children are subfolders. The tree can nest to arbitrary depth.
Folder names use Title Case with spaces for Obsidian readability (e.g., Lattice BKT, Winding Gap).
mkdir "research/{Topic Name}" + write log.md (start working). Write plan.md when the node has non-trivial strategic decisions (decomposition, approach choice). Write note.md when results are stable enough to state (see research-tree.md for when/how)dead_ends.md in the node folder (or append if it exists)directives.md in the folder where the rule applies (typically project root; only through meetings)ls the folder (subfolders = children)The ancestor chain is PI's context spine. When the cursor points to a node, PI reads along the path from root to cursor — every folder's note.md, plan.md, log.md, dead_ends.md, and directives.md. Sibling branches are not loaded.
research/ ← read note.md + plan.md + log.md + dead_ends.md + directives.md
└─ Lattice BKT/ ← read note.md + plan.md + log.md + dead_ends.md + directives.md
└─ Winding Gap/ ← cursor: read note.md + plan.md + log.md + dead_ends.md + directives.md + direct children's note.md + plan.md + log.md
└─ Paradox Resolution/ ← NOT loaded (sibling branch)
Directives cascade: a directive at a higher level applies to all descendants. Dead ends at ancestors are also loaded — lessons learned higher in the tree prevent repeating mistakes in subtrees.
| Scope | What PI loads | When |
|---|---|---|
| Ancestor chain | note.md + plan.md + log.md + dead_ends.md + directives.md at each ancestor from root to cursor | Always at session start (/run) |
| Working context | Cursor node's direct children: note.md + plan.md + log.md (depth 1 only) | Always at session start (/run) |
| Project directives | directives.md at project root (if exists; outside research/) | Always at session start |
| Writing context | note.md only at each node (ladder files excluded) | /write |
research/focus.md)research/focus.md is a lightweight cursor pointing to PI's current position in the tree. It carries:
| Layer | Location | Role |
|---|---|---|
| Worker deliverables | logs/{timestamp}_{type}_{slug}.md | Provisional research notebooks produced by workers. Kept outside the tree because they are single-pass outputs awaiting PI verification |
| Concept definitions | concepts/ | Atomic term definitions (one per file). Wiki-linked from any file via [[term]] |
| Session handoff | logs/last_session.md | Operational detail, PI's thinking for next session. Overwritten each session |
| Session log | logs/{timestamp}_run.md | Permanent per-session record. One file per session, never overwritten |
The three-layer model separates what we know, how we'll proceed, and what we've done:
/write loads only these — the ladder is excluded so the writing context stays cleanNew node → mkdir + log.md [status: open]
↓ plan approach
Write plan.md (decomposition, strategy) if non-trivial
↓ investigate
Workers produce deliverables in logs/ (research notebooks)
↓ PI verifies via critic
PI promotes verified results → report_{slug}.md in the node (self-contained)
↓ node reaches stable
Curator distills from reports + log.md → writes note.md (verified knowledge)
↓ understanding deepens
Curator updates note.md. log.md continues accumulating
↓ later found wrong
Update note.md. Record in dead_ends.md
note.md creation, retraction, and format are defined in .claude/research-tree.md.
Refresh: log.md files naturally accumulate text over sessions. Periodically, PI dispatches curator to compress them — moving detailed content to note.md where appropriate. The working state in log.md should stay concise enough to read at a glance.
research/ # Research tree — the single knowledge structure
note.md # Root: verified knowledge (SoT, free-form)
plan.md # Root: strategy and decomposition
log.md # Root: background, working state (ladder)
focus.md # Session cursor: "work here now"
lib/ # Shared simulation framework (engine-builder)
test/ # Module tests
{Branch Name}/ # Research direction (Title Case with spaces)
note.md # Verified knowledge (free-form prose)
plan.md # (optional) Strategy and approach for this branch
log.md # Research process (current state, evidence)
report_{slug}.md # (optional) PI-verified report (format: see .claude/research-tree.md)
dead_ends.md # (optional) Failed approaches and lessons
directives.md # (optional) Subtree-specific rules from meetings
src/ # Measurement scripts and descriptions (simulator)
data/ # Simulation data (simulator)
images/ # Figures and visualizations (simulator)
{Child Name}/
log.md # Leaf: may only have log.md (no note.md yet)
directives.md # Project-wide methodology rules from meetings
concepts/ # Concept definitions (one term per file)
{term}.md
literature/
reading_list.md
papers/{arxiv_id}/
manuscript/ # Paper (managed by /write)
logs/ # Worker deliverables + chronological history
{timestamp}_{type}_{slug}.md # Worker deliverables (reading notes, attempts, etc.)
{timestamp}_{agent}.md # Worker logs (brief work summaries)
{timestamp}_run.md # Session logs (PI's session records)
last_session.md # Session handoff (overwrite each session)
agenda.md # Items for next meeting (consumed by /meeting)
File formats (note.md, plan.md, log.md) are defined in .claude/research-tree.md. This section covers only files specific to /run operations.
directives.md)Rules imposed by the user through meetings. PI cannot create or modify directives unilaterally. At any level: project root for global rules, subtree folders for scoped rules. Higher-level directives cascade to descendants.
# Directives
## {Topic area}
- {rule}
> [Meeting YYYY-MM-DD] {reason for this rule}
dead_ends.md)Optional. For nodes where approaches have been tried and failed. Prevents log.md from accumulating failed-approach details that obscure the working state.
# Dead Ends
## {Approach name}
**Tried**: {what was attempted}
**Failed because**: {root cause, not just symptoms}
**Lesson**: {what to avoid or keep in mind}
research/focus.md)A ~10–20 line file. No frontmatter. Overwritten at each session end (see Session End for the template). Points to the current focus node and carries short-term context only.
Atomic definitions (one term per file). Linked from any file via [[term]]. Concept-checker and curator manage creation and maintenance; PI may also create them.
Folder names use Title Case with spaces (e.g., Winding Gap, Lattice BKT). A new reader should guess what the node is about from its name alone. No sequential numbering — narrative order is described in the parent's plan.md, not in filenames.
kind defines the nature of a node and determines the cognitive mode when passing it to the researcher. PI may introduce new kinds.
| kind | Cognitive Mode | Description |
|---|---|---|
| narrative | Tell the story | Paper's argument and proof flow. Not something to "solve" |
| task | Execute concretely | Clear work (proof, construction, calculation) |
| subtask | Execute part of a task | A portion of a parent task |
| question | Investigate (answer may not exist) | Genuinely unknown. Accepts no-answer or ill-posed |
| conjecture | Prove or refute | Believed true but unverified |
| example | Calculate precisely on a concrete case | Concrete verification of theory |
| caution | Verify risks in assumptions/logic | Finding problems is the job |
| gap | Analyze what's missing | Analysis, not resolution |
| observation | Record and explore a finding | PI decides whether to pursue |
| status | PI's disposition |
|---|---|
| open | Not yet started |
| active | Currently investing cycles |
| stable | Has results PI can reference. Deepening is always an option |
| closed | Not being pursued |
Update status to closed. If the closure is informative, add an entry to the node's dead_ends.md. If the node has a plan.md describing children, update or remove it to reflect the closure. If the closed node has active/stable children, reparent them (move the subfolder to an appropriate location).
logs/_DRAFT_run.md — a system hook auto-renames it with the correct timestamp on writeresearch/focus.md (the session cursor — where the previous session left off)logs/last_session.md (if it exists — previous session's operational context)directives.md at project root (if it exists — methodology rules from meetings)note.md (if exists), plan.md (if exists), log.md, dead_ends.md (if exists), and directives.md (if exists)ls the folder → read each child's note.md (if exists) + plan.md (if exists) + log.md (depth 1 only — not recursive)literature/reading_list.mdUnread paper principle: For papers marked unread in reading_list.md, PI must not describe their content, claims, methods, or results. Only the arXiv ID, title, authors, and a one-sentence abstract summary may be stated (see .claude/common.md verification procedures).
Feedback processing:
> [Meeting ...] markers: A direction change was decided in a meeting. Read and understand the reason before starting work. Do not revert these changesdirectives.md (project root and any subtree): Follow them throughout the session. PI must not change these unilaterallyInitial check:
research/log.md does not exist → Display "Please set a theme via /launch" and stopresearch/focus.md does not exist → Read the full tree. Create research/focus.md pointing to the first active nodeconcepts/ does not exist → Create concepts/ and write initial concept notes for core termsTreat TodoWrite as hypotheses. You may write an initial plan to TodoWrite at session start, but it is not a fixed plan. Each cycle's results bring new information, so always update TodoWrite in step 3. Do not continue just "because it was decided at the start."
PI works depth-first within the cursor's subtree. The general movement: dive into leaves, float up when done.
research/note.md to decide the next direction. Update research/focus.md to the new focusZooming out is deliberate, not automatic. Only read upper nodes when the current subtree's work is exhausted. This keeps PI focused.
research/lib/, or "refine lib" for self-directed improvement)lib/ modules)PI judges as a researcher. The above are guidelines; judge freely.
Close decision: Nodes that show no progress after repeated cycles can be closed. This is not "failure" but "an honest academic judgment." Reframing is also a viable option.
Maximize parallelization. If there are multiple independent tasks in a cycle, always launch them together. Typical parallel patterns:
Always think "what can be parallelized in this cycle?" and launch everything at once unless there are dependencies.
Launch method: Use only the following 2 patterns. Do not poll with Bash("sleep ...") or Bash("ls ...").
Call multiple Agents in a single message without run_in_background. All tasks execute in parallel and automatically block until all complete.
Agent(prompt="...", subagent_type="researcher") ─┐
Agent(prompt="...", subagent_type="researcher") ─┼─ Parallel, auto-block
Agent(prompt="...", subagent_type="scout") ─┘
Launch with run_in_background=true, PI continues own work. System notifies on completion; retrieve with TaskOutput.
Agent(prompt="...", subagent_type="researcher", run_in_background=true) → task_id_1
PI: Continue own work (Read, Edit, etc.)
← System notification
TaskOutput(task_id="task_id_1", block=true)
Prompt template:
Each agent is defined in .claude/agents/{agent}.md and invoked with subagent_type="{name}". PI's prompt contains only task-specific information:
## Task
{specific instructions}
## Context
{relevant content from the current subtree}
Dynamic data by agent:
Assigned paper: arXiv:{id} / Title: {title}Target: research/{path}/ — {description} / kind: {kind} / Context: {role within parent's children decomposition} / previous attempt path / PI's critiqueTarget: research/{path}/ — {description} / attempt path: {path} / kind: {kind} / mode: blind or mode: contextualModel definition / Computational method / Required features / existing module path. Or "Refine lib" for self-directed improvementTarget: research/{path}/ / Physical setup / Mathematical definition of observables / Success criteria / Deliverable number: {N} / research/lib/ module list / Existing scripts in src/: {list}Nodes updated: {paths} / Notes touched: {files}Retrieve deliverable paths from task return values and Read deliverables directly as needed:
Handling FAILED tasks: If an agent returns FAILED:, its deliverable does not exist. Papers remaining unread are subject to the unread paper principle. Typical response: retry reader next cycle or note in agenda.md
Update log.md: Record new evidence in the relevant log.md. Update Current State. Evidence is append-only. Create child nodes if work reveals sub-problems
Update plan.md (when strategy changes): If results change the approach — new decomposition, reprioritized children, revised strategy — update plan.md. plan.md reflects how to proceed; log.md records what happened and what is known
Stable check (before any status → stable): Write Current State in log.md first — what is known, confidence, unexplored angles. If writing reveals significant open directions, keep active and create children. A node moves to stable when results are reliable enough to reference and remaining directions are not urgent
Promote to report (when appropriate): If a worker deliverable (in logs/) contains a verified, significant result, PI creates a self-contained report_{slug}.md in the relevant research tree node. Reports are critic-verified, self-contained documents — like a student's report submitted to PI. They belong to the tree node, not to the timeline. Not every deliverable gets promoted — only results worth preserving as structured knowledge
Create/update note.md (when appropriate): Reports feed into note.md — the typical progression is: deliverable (logs/) → report (tree node) → note.md (tree node). If a stable result is significant, dispatch curator to distill the polished knowledge into note.md (drawing from reports and log.md). Not every stable node gets a note.md — only results worth stating as source of truth
Contribution assessment: Review the researcher's self-assessment. Write PI's independent judgment in the relevant log.md. When referencing papers not marked read, note "provisional judgment as {paper} is unread"
Retraction: Update or remove note.md. Record the failure in dead_ends.md. Update log.md
Float-up protocol: After updating a leaf, check if the parent's work is complete:
ls the parent folder — are all children stable or closed?research/note.md to decide the next direction. Update research/focus.md to the new focusDirection review (when a major subtree — a direct child of root — fully completes, not every cycle):
research/note.md. Did the results advance the argument?Update TodoWrite (required): Check off completed tasks, insert new, reprioritize
Critic verification mode:
Rule of thumb: "Does the critic need to know the research purpose?" — No → blind, Yes → contextual.
Researcher resubmission: Every researcher attempt must go through critic before PI adopts its results into the research tree. Worker deliverables are single-pass outputs that may contain errors or off-target framing — critic provides independent verification that PI cannot perform alone (because PI is anchored by reading the attempt). If PI decides to close the node without adopting results, critic is not required. Critic annotates the attempt (strikethrough + comments + Critique section). PI decides:
Simulator result verification: PI checks:
Simulator resubmission: Pass previous deliverable path and code path, specify what to improve. Same physical setup → same deliverable number; changed setup → new number.
Note capture (record findings while fresh):
attempt_14: z = 2πκ − 2 derivation. critic ACCEPT (mechanical: PASS 3/3, logical: sound)~~error~~ [→ correction])Knowledge base maintenance (dispatch curator when needed — not every cycle):
After log.md files accumulate changes, dispatch curator for note.md polishing, wiki-link integrity, log.md compression, staleness cleanup. PI reviews via git diff.
End the session when MAX_CYCLES is reached or PI judges completion.
No need to rush — the next /run resumes from where you left off.
Do not suggest transitioning to /write. The user decides when research is mature enough for writing.
src/ for superseded scripts. Move to src/archive/ — never delete. Record moves in logs/last_session.mdagenda.md:
# Meeting Agenda
- [agenda item 1]
- [agenda item 2]
Write each item self-contained. Clearly state what about and what decision is needed. Don't use internal paths or jargon. Overwrite if file exists# Focus
Working on: research/{path}/
{What was accomplished, where to resume}
## Next Session
- {concrete next steps}
## Blockers
{If any}
logs/last_session.md (overwrite):
logs/{timestamp}_run.md (permanent record — never overwrite):
# Run YYYY-MM-DD HH:MM
## Accomplished
- {what was done, key results}
## Node Changes
- {status changes, new nodes created, nodes closed}
## Deliverables
- {paths to deliverables produced}
Use the timestamp captured at session start (step 1).git add -A && git commit -m "run: {concise summary of achievements}" && git push