Ds baseline

From OpenLAIR/dr-claw · View interactive version

Ds baseline is an AI agent skill from the GitHub repository OpenLAIR/dr-claw. Use when a quest needs to attach, import, reproduce, repair, verify, compare, or publish a baseline and its metrics.

How to use this skill

Skill file

Baseline

This skill establishes the reference system the quest will compare against.

The target is one trustworthy baseline line, not an endless reproduction diary.

Interaction discipline

Tool discipline

Non-negotiable rules

Stage purpose

The baseline stage should produce a usable reference point through one of four routes:

  1. attach an existing reusable baseline
  2. import a reusable baseline package
  3. reproduce a baseline from source
  4. repair a broken or stale baseline

Keep the classic control flow:

  1. analysis
  2. setup
  3. execution
  4. verification

These are control gates, not paperwork walls.

Quick workflow

  1. Read the source paper and source repo first, or record exactly what is missing and why.
  2. Choose the lightest trustworthy route: attach, import, reproduce, or repair.
  3. Start with the fast path whenever the current baseline object, command path, and acceptance target are already clear enough to validate cheaply.
  4. Before substantial baseline setup, code edits, or a real baseline run, create PLAN.md and CHECKLIST.md; short-form files are enough for simple fast-path work.
  5. Keep one dominant phase visible: analysis -> setup -> execution -> verification.
  6. Prefer one clean implementation pass, one smoke test, and then one normal baseline run.
  7. Retry only when smoke, verification, or runtime evidence shows a concrete failure or incompatibility.
  8. Close the stage by confirming or waiving the gate, then hand off with a concise 1-2 sentence summary of trust status and next anchor.

Fast-path first

Default to the lightest baseline path that can still establish a trustworthy comparison.

Default to a fast path when it can establish trust with less work.

Fast path is the default when any of the following is true:

Fast path means:

Escalate from fast path to fuller audit only when:

Use when

Do not use when

Stage gate

Do not proceed to comparison-heavy downstream work unless one of the following is durably true:

Operationally:

Required plan and checklist

Before substantial baseline setup, code edits, or a real baseline run, create a quest-visible PLAN.md and CHECKLIST.md.

Default retry discipline:

Required durable outputs

The baseline stage should usually leave behind:

For simple attach/import flows or a straightforward reproduce flow, do not stall just to precreate every optional note file.

Useful optional notes:

File-by-file contract

Minimum stability rules:

Durable path contract

Use the real runtime paths consistently.

Quest-local paths:

Global reusable registry paths:

Baseline id and variant rules

Do not invent parallel durable locations when these runtime contracts already exist.

Do not leave the authoritative metric contract only in chat, memory, or prose once the baseline is accepted.

If a baseline is reproduced only because an analysis campaign needs an extra comparator:

Multi-baseline policy

One quest may legitimately need more than one baseline.

Route order

Prefer this order:

  1. attach
  2. import
  3. reproduce
  4. repair

Prefer reuse over redundant reproduction.

Workflow

Phase 1. Analysis

Before running anything substantial, determine:

Default analysis discipline:

Escalate to a fuller audit only when the command path is unclear, the repo is large or confusing, repair mode is active, or custom code changes look likely.

When the fuller audit is necessary, capture only what later stages truly need:

If the source paper is available, record:

You may inspect local feasibility with shell-based checks for OS, GPU, CPU, RAM, disk, Python version, and whether uv is available.

The analysis phase should leave behind a concrete plan rather than only conversational intent.

Phase 2. Setup

Prepare the selected route:

For Python baselines, standardize environment setup around uv.

Python environment rule: use `uv`

Practical rules:

Common uv patterns:

Setup should record:

Fallbacks:

Phase 3. Execution

Run only the work required to establish the baseline credibly.

Execution rules:

Long-running execution discipline:

Keep retries bounded:

Phase 4. Verification

Verification is mandatory before baseline acceptance.

Verify:

Classify the outcome as one of:

Verification must explicitly separate:

Verification should answer:

A verification report should be self-contained enough that a later stage can answer:

Baseline comparability contract

The baseline stage is not complete just because something ran.

It is complete when later stages can compare against it fairly.

Before declaring a baseline usable, make the comparability contract explicit:

Unless the user explicitly specifies otherwise, treat the original paper's evaluation protocol as the canonical baseline contract.

If any of these fields are still materially unknown, do not pretend the baseline is a clean downstream reference.

For the fuller checklist and verdict meanings, read references/comparability-contract.md.

Feasibility and trust classes

Before acceptance, classify feasibility as one of:

And classify downstream trust as one of:

Do not silently upgrade a degraded or merely operational result into a normal trusted baseline.

Minimum baseline artifact content

The accepted baseline artifact should include at least:

If variants exist, also include:

Metric-contract rules:

Publication and reuse

Use the registry deliberately, not as an afterthought.

If the result is reusable beyond the current quest:

If the current quest should reuse an existing baseline:

If runtime state already includes requested_baseline_ref or a matching confirmed_baseline_ref:

For a clearer attach/import/reproduce/repair rubric, read references/route-selection.md.

For reusable-package expectations, read references/publishable-baseline-package.md.

Workspace and branch rules

Memory rules

Stage-start requirement:

Write memory only for reusable lessons such as:

When calling memory.write(...), pass tags as an array like ["stage:baseline", "baseline:<baseline_id>", "type:repro-lesson"], not as one comma-joined string.

Stage-end requirement:

Artifact rules

Typical artifact sequence:

For stable field shapes, read references/artifact-payload-examples.md.

The baseline handoff should make these items obvious:

If this packet is not obvious from the accepted artifact plus verification note, the baseline line is not stable enough yet.

Failure and blocked handling

Do not hide failures.

If blocked, record the class explicitly:

A blocked result must state:

Reasonable autonomous fixes before escalation:

If a fix would change confirmed scope, metrics, permissions, or resource assumptions, stop and return to analysis rather than applying it silently.

Exit criteria

Exit the baseline stage once one of the following is durably true:

Typical next anchors:

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.