Ds analysis campaign

From OpenLAIR/dr-claw · View interactive version

Ds analysis campaign is an AI agent skill from the GitHub repository OpenLAIR/dr-claw. Use when a quest needs one or more follow-up runs such as ablations, robustness checks, error analysis, or failure analysis after a main experiment.

How to use this skill

Skill file

Analysis Campaign

Use this skill when one or more follow-up runs are needed and the quest needs a coordinated evidence campaign.

This is the shared DeepScientist protocol for supplementary experiments after a durable result.

Use the same route for:

For paper-facing work, treat “analysis campaign” broadly:

Do not assume a writing-facing campaign means “analysis only”.

Do not invent a separate experiment system for those cases.

Interaction discipline

Stage purpose

The analysis-campaign stage exists to test the strength, boundaries, and failure modes of a result.

It preserves the core old DeepScientist analysis-experimenter discipline:

The campaign should behave like a disciplined evidence program, not an unstructured pile of extra runs.

For campaign prioritization and writing-facing slice design, read references/campaign-design.md.

When the campaign is paper-facing and the mapping fields are not obvious, also read references/writing-facing-slice-examples.md.

Quick workflow

Treat this as the compressed campaign map. The authoritative slice protocol and aggregation rules remain in Workflow.

  1. Bind the campaign to the parent run or idea and, when writing-facing, to the selected outline.
  2. When the campaign is writing-facing, refresh paper/paper_experiment_matrix.* before freezing the slice frontier.
  3. Before launching slices, create PLAN.md and CHECKLIST.md.
  4. Use PLAN.md as the durable charter and CHECKLIST.md as the living execution surface while launching, monitoring, recording, and aggregating slices.
  5. Run claim-critical slices first and smoke-test long slices before their real runs.
  6. Revise the plan and matrix if slice feasibility, ordering, comparators, or campaign interpretation changes materially, and record every slice durably, including honest non-success states.
  7. Close meaningful campaign milestones with a concise 1-2 sentence summary that says whether the claim gained stable support, partial support, contradiction, or unresolved ambiguity, what the matrix frontier now looks like, and what happens next.

Non-negotiable rules

Use when

Do not use when

Preconditions and gate

Before launching a campaign, confirm:

If the question list is fuzzy, sharpen it before running anything.

Treat quest files, attached user assets, checkpoints, configs, extracted texts, baselines, and existing code paths as the first-choice asset pool.

Do not design slices around hypothetical resources that the current system cannot actually access or run.

If a slice cannot be executed with the current system, redesign it around available assets or explicitly report that the task cannot currently be completed.

If infeasibility appears mid-run, attempt bounded recovery first; if still blocked, record the slice with a non-success status and explain why.

If ids, active refs, or current quest state are unclear after restart, call artifact.get_quest_state(detail='summary') and artifact.resolve_runtime_refs(...) before launching or recording slices.

If the exact quest brief / plan / status wording matters for campaign scope, call artifact.read_quest_documents(...).

If earlier user instructions materially affect campaign scope or ordering, call artifact.get_conversation_context(...) before changing the slice set.

For concrete paper-facing cases:

Do not leave a slice "completed" while the paper contract still looks stale.

Required plan and checklist

Before launching any real campaign slice, create a quest-visible PLAN.md and CHECKLIST.md.

Truth sources

Use:

Do not summarize a campaign from impressions alone.

Required durable outputs

A campaign should usually leave behind:

In the current runtime, represent that with existing artifact actions only:

Workflow

0. Launch the campaign durably

Before launching any slice, record the campaign start through artifacts:

  1. write a decision artifact with:
  1. write a charter report with the planned slice list
  2. update plan.md if the campaign materially changes the quest path

Do not start a multi-slice campaign from chat-only intent.

Do not start it from chat-only intent plus vague notes either: write PLAN.md and CHECKLIST.md first, using references/campaign-plan-template.md and references/campaign-checklist-template.md as the default structures.

After the charter and launch decision are durably recorded, send one threaded artifact.interact(kind='milestone', ...) update naming:

0.1 Bind the campaign to the selected outline when writing-facing

If the campaign exists to support a paper or paper-like report:

For writing-facing campaigns, every slice should also carry paper-contract identity, not just free-form text:

Do not treat a completed analysis slice as paper-ready until those fields exist and the slice is mappable back into the selected outline or paper experiment matrix.

Use references/writing-facing-slice-examples.md when the correct field values are not obvious.

This keeps the analysis campaign aligned with the paper plan instead of becoming a free-floating batch of slices.

1. Define the campaign charter

State:

The charter should also include:

Prefer to keep this charter in PLAN.md first and mirror the execution frontier in CHECKLIST.md.

For each analysis question, also state:

If there are many possible slices, order them by decision value:

  1. most claim-critical ablation or contradiction check
  2. strongest robustness or sensitivity checks
  3. failure-mode explanation
  4. efficiency or secondary supporting analyses

Do not spend half the campaign budget on secondary slices before the claim-critical ones run.

When the parent line is still below solid evidence quality, use the campaign first to move it from minimum to solid before chasing broader polish.

2. Split into isolated analysis runs

Each analysis run should correspond to one need, such as:

Avoid changing many factors at once unless the campaign is explicitly exploratory.

For each slice, define at minimum:

Recommended extra per-slice fields:

If a slice needs an extra comparator baseline:

Recommended run_kind naming in the current runtime:

Create the campaign with artifact.create_analysis_campaign(...) before starting any slice.

Even one extra experiment should still be represented as a one-slice campaign so Git and Canvas show a real child node.

Branch that campaign from the current workspace/result node rather than mutating the completed parent node in place.

That tool should receive the full slice list, and each returned slice worktree becomes the required execution location for that slice.

Only create the campaign after you have verified that the listed slices are actually executable with the current quest assets and runtime.

When the campaign is writing-facing, the same call should also carry selected_outline_ref, research_questions, experimental_designs, and todo_items.

If ids or refs are unclear, recover them first with artifact.resolve_runtime_refs(...), artifact.get_analysis_campaign(...), or artifact.list_paper_outlines(...) instead of guessing.

Treat campaign_id as system-owned, and treat slice_id / todo_id as agent-authored semantic ids.

Do not replace the normal campaign flow with repeated manual artifact.prepare_branch(...) calls.

After each slice finishes, call artifact.record_analysis_slice(...) immediately so the result is mirrored back to the parent branch and the next slice can be activated.

If a slice fails or becomes infeasible, still call artifact.record_analysis_slice(...) with an honest non-success status plus the real blocker and next recommendation; do not leave the campaign state ambiguous.

After every completed, excluded, or blocked writing-facing slice:

Do not keep launching writing-facing slices from stale memory when the matrix has changed.

For slice recording, deviations and evidence_paths are optional context fields, not mandatory ceremony; include them only when they materially help explanation or auditability.

Each artifact.record_analysis_slice(...) call should also include an evaluation_summary with exactly these six fields:

Use those six fields to keep each slice readable at a glance from Canvas, stage tabs, review, and rebuttal.

The longer prose still matters, but the six-field summary is the stable routing summary.

For writing-facing campaigns, prefer running claim-carrying slices before supporting slices unless an auxiliary check is required to make the main slice interpretable.

For slices that run longer than a quick smoke check:

3. Keep comparability

Comparability rules:

For code-modifying slices, the default durable layout should stay interpretable:

If the variation itself changes the evaluation setup, record that explicitly and do not present the run as a direct apples-to-apples comparison.

4. Record each analysis slice

Before a long slice starts, emit a progress artifact or artifact.interact(kind='progress', ...) update so the quest shows that the slice is active.

For each run, record:

Preferred per-slice summary shape:

Each completed slice should also leave a run artifact containing at least:

If a slice fails before producing evidence, still record it as a failed or partial run artifact rather than silently skipping it.

When a slice materially changes the recommended route or weakens the main claim, do not wait until the final synthesis to mention it.

Send a threaded artifact.interact(kind='milestone', ...) update at that point with the new boundary or risk.

5. Aggregate the campaign

The campaign report should explain:

Campaign reporting rules:

When there are many slices, summarize the top 3-5 most important ones first, then point to the full evidence paths.

The aggregated report should also answer:

When the aggregated campaign report is complete, send a richer threaded artifact.interact(kind='milestone', ...) update.

Lead that milestone with a concise 1-2 sentence campaign outcome summary before expanding into slice-level detail.

If QQ milestone media is enabled and the aggregated report materially changes the claim boundary, you may attach one campaign summary PNG to that closing milestone update.

That update should explicitly classify the campaign outcome in the same language as the report:

6. Route the next step

A campaign should end with an explicit next move:

Record the post-campaign route as a decision artifact.

When helpful, include a reflection block with:

and a next_direction block that states:

This makes the next stage executable without guesswork.

Analysis-quality rules

Good campaign behavior:

Strong campaign ordering usually looks like:

  1. most claim-critical ablation or comparison
  2. strongest robustness or sensitivity checks
  3. failure-mode or error analysis
  4. efficiency or secondary analysis

The exact order can vary, but the most claim-relevant evidence should appear first.

Weak campaign behavior:

Memory rules

Stage-start requirement:

Write to memory only when the campaign yields reusable lessons, such as:

Stage-end requirement:

The campaign’s main record belongs in run artifacts and the aggregated report.

When synthesizing the campaign, read the per-slice evaluation_summary fields first, then expand into longer evidence only where the short summaries are still ambiguous.

Artifact rules

Typical artifact sequence:

Failure and blocked handling

Record blocked or failed campaign states explicitly, such as:

A blocked campaign should still name the next best action.

Exit criteria

Exit the analysis-campaign stage once one of the following is durably true:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.