Ds finalize

From OpenLAIR/dr-claw · View interactive version

Ds finalize is an AI agent skill from the GitHub repository OpenLAIR/dr-claw. Use when the quest is ready to consolidate final claims, limitations, recommendations, summary state, and graph exports before stopping or archiving.

How to use this skill

Skill file

Finalize

Use this skill to close or pause a quest responsibly.

Interaction discipline

Stage purpose

The finalize stage should not pretend every line succeeded.

It should produce the most accurate final state of the quest:

Finalize is not just a short summary.

It is the durable closure protocol that turns a long-running research graph into a recoverable stopping point, a publishable handoff, or an honest continue-later checkpoint.

Use when

Do not use when

Preconditions and gate

Before finalizing, gather:

If finalization reveals that the quest is still too uncertain, route back through decision rather than forcing closure.

For paper-like deliverables, do not finalize while any of these remain true:

If the current paper-state blocker is not obvious from the existing files, call artifact.get_paper_contract_health(detail='full') before deciding whether finalize is legitimate.

If the active quest/runtime state is unclear after restart or long pause, call artifact.get_quest_state(detail='summary') first.

If the exact latest SUMMARY.md, status.md, or active user requirement wording matters for closure, call artifact.read_quest_documents(...).

If earlier user/assistant continuity matters for whether the quest should really stop, call artifact.get_conversation_context(...) instead of guessing from prompt context alone.

Truth sources

Use:

Do not finalize from chat memory alone.

Required durable outputs

The finalize stage should usually leave behind:

If the quest produced a paper-style bundle, finalization should also check that the writing stage left behind enough closure evidence, such as:

Workflow

1. Consolidate the accepted evidence and package inventory

State clearly:

Do not only say that evidence exists.

Say clearly what exists and why it matters. Name concrete paths or artifact ids only when the user asks for them or needs them to act.

When a paper bundle exists, verify the manifest inventory explicitly, including:

2. Build the final claim ledger

For every important outcome, classify it as one of:

For each claim, record:

If a claim was once believed and later weakened, preserve that downgrade history rather than silently deleting it.

Also build a compact belief-change log for the most important claim transitions, such as:

For each transition, record:

3. Produce a final limitations and failure section

Limitations should include:

Also preserve:

4. Produce the final recommendation

Choose the most honest next recommendation, such as:

The recommendation should include:

When deciding whether the quest is publish-ready or only archive-ready, be explicit about which writing or validation gates have actually passed.

5. Build a resume or handoff packet

If the quest may continue later, leave behind a compact restart packet that answers:

This packet should be short, high-signal, and directly usable by a future agent turn.

6. Refresh the durable quest view

Refresh:

If the summary changes materially, make it clear why the quest is now considered final or paused.

When summarizing long histories, prefer the highest-impact findings and decisions rather than a full chronological replay.

7. Record the final decision

The final stage should end with an explicit durable decision or report rather than an implied stopping point.

If multiple closure options were available, record why the chosen one beat the alternatives.

Finalization-quality rules

Good finalization:

Weak finalization:

Memory rules

Stage-start requirement:

Finalize should read memory before writing closure, especially:

If final closure depends on rereading a paper, keep the same split:

Write to memory only when the lesson is reusable across quests, such as:

Stage-end requirement:

Quest-specific closure state belongs in files and artifacts first, not only memory.

Artifact rules

Typical final artifacts:

Good final artifacts often include:

Failure and blocked handling

If finalization is premature, record that explicitly.

Common blocked finalize states:

In that case, route back to the proper stage through decision.

Extra references

Use these references when you need a denser closure checklist:

Exit criteria

Exit the finalize 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.