BenluW's picture
Require a newly created isolated subagent for every case (v2.1)
aba9ff7 verified
|
Raw History Blame Contribute Delete
7.32 kB

Complete-case execution guide

One primary coordinator manages the batch. For EVERY case, the coordinator MUST CREATE A NEW subagent with a distinct agent/session ID and no inherited conversation history. Invoke the platform creation tool; clearing or reusing an old agent is insufficient. The new subagent owns that one case from A through final assembly, in the same context. Do not delegate phases. Never assign another case to that agent, including after it has completed. The coordinator must not annotate cases itself. Record the new subagent ID against the packet ID. If new isolated subagents are unavailable, report the limitation and leave the case unrun.

Dispatch once per case

From the package root, the coordinator verifies the release and exports a complete task. Replace the example ID with the assigned packet ID:

python tools/verify_package.py
python tools/export_worker_task.py --packet-id new_001 --output work/new_001/case.task.json

Create a NEW subagent for this case, then give it that task and the operational package path. Use fork_turns="none" or the platform equivalent. It contains the full evidence once, the English ownership instructions, all phase prompts and schemas. Do not pass manifest/model-authorship metadata, historical labels or other cases as additional judge context.

The case subagent reads the full task and follows the commands below itself. Its phases share context: C is targeted re-review and D is self-checking, not independent or blinded adjudication. Earlier judgments are provisional; the original evidence remains the sole basis for substantive decisions.

Commands executed by the case owner

Run from the package directory. Choose only the assigned ID:

PACKET_ID='new_001'
mkdir -p "requests/by_packet/$PACKET_ID" "outputs/validation/$PACKET_ID"
mkdir -p outputs/unified outputs/e1_subtype outputs/joint outputs/critic outputs/final

A. Full review. Apply phase_instructions.unified_v1 to the complete original task input_text. Write pure JSON matching its schema to outputs/unified/<packet_id>.json, then validate:

python tools/validate_results.py --stage unified_v1 --packet-id "$PACKET_ID" \
  --results outputs/unified --report "outputs/validation/$PACKET_ID/unified.jsonl"

B. E1 subtypes. Generate the exact dependent input:

python tools/prepare_requests.py --stage e1_subtype --packet-id "$PACKET_ID" \
  --unified-results outputs/unified --output "requests/by_packet/$PACKET_ID/e1_subtype.jsonl"

If one request is emitted, read its complete input_text and instructions and perform the annotation yourself. Save outputs/e1_subtype/<packet_id>.json. If valid A has no E1, retain the generated .skipped.jsonl and create no subtype output. Validate the result or legitimate skip:

python tools/validate_results.py --stage e1_subtype --packet-id "$PACKET_ID" \
  --unified-results outputs/unified --results outputs/e1_subtype \
  --report "outputs/validation/$PACKET_ID/e1_subtype.jsonl"

C. Targeted E5/C1 re-review. Re-read the complete original evidence and apply phase_instructions.joint_v1 yourself. Inspect all relevant answers, including areas where A found no error; do not just copy A's E5/C1 list. Save outputs/joint/<packet_id>.json, then validate:

python tools/validate_results.py --stage joint_v1 --packet-id "$PACKET_ID" \
  --results outputs/joint --report "outputs/validation/$PACKET_ID/joint.jsonl"

D. Candidate self-check. Generate this case's candidate packet:

python tools/prepare_requests.py --stage joint_verified_v1 --packet-id "$PACKET_ID" \
  --joint-results outputs/joint --output "requests/by_packet/$PACKET_ID/critic.jsonl"

If a request is emitted, assess its candidates yourself under the supplied instructions; preserve supported, unsupported and uncertain as distinct. Save outputs/critic/<packet_id>.json. With no candidates, retain the skip record and create no critic output. Validate:

python tools/validate_results.py --stage joint_verified_v1 --packet-id "$PACKET_ID" \
  --joint-results outputs/joint --results outputs/critic \
  --report "outputs/validation/$PACKET_ID/critic.jsonl"

Assembly. The same case owner runs:

python tools/assemble_results.py --packet-id "$PACKET_ID" --output "outputs/final/$PACKET_ID.json"

Keep all intermediate results and return the final path and phase statuses to the coordinator. Do not create another reviewer to finish the case.

Result interpretation

The final artifact records review_design: one subagent per case, shared context across phases, no independent specialist review or verification. It stores raw source_stage_results, authoritative_indices selecting the final records, and reference_index/related_error_links preserving their origins. C2 can retain a link to preliminary A-stage E5 without counting that E5 as an authoritative final event. e1_annotations bind to exact A event IDs. verified_candidates retains each proposal, origin and same-agent decision; its name is a structural field, not a claim of independent verification.

Only ordinary E1/E2/E3/E4/E6 and C2 come from A. E5/C1 come from C candidates supported by D. E1 review flags do not reverse original events. Unsupported and uncertain candidates remain visible. The assembler creates no pooled error count, global per-question verdict or additional medical summary. It does not perform cross-phase semantic deduplication: potentially related E4/E5 propositions remain traceable and should not be blindly summed.

E5/C1 case status follows the existing conservative rule: a supported candidate makes its axis positive; otherwise an uncertain decision or any C-stage unresolved item keeps that reviewed axis unresolved. With no such concern, rejected candidates yield negative. An axis without candidates retains C's own status. No subtype is silently rewritten from free-text self-check reasons.

Failures and parallelism

Parallelize different cases. Each case has one owner and separate file paths. Do not overwrite shared initial requests or frozen evidence. Missing/invalid required results block assembly; they are not no-error outcomes. If A/B fails, the owner may still perform C/D, but the case remains incomplete. Keep failed attempts and report them; do not silently regenerate valid judgments or modify substantive conclusions to pass structural checks.

All tools are offline. Do not browse, fetch images, call paid APIs/external models or regenerate the original answers. No pixels are supplied; use only text evidence and retain unresolved/image-adjudication needs where required. If the full case does not fit the context, report that limitation rather than truncating or substituting a summary. Write explanations in English and retain exact quotations in their original language.

Validation checks formats, IDs, quotes, coverage and recorded hashes, not clinical accuracy. Hashes and review_design record intended provenance; they do not prove actual execution. Keep host logs, worker identity and model metadata separately. Identical assembly reruns are allowed; a different final artifact is never overwritten. Previous independent-review results must stay separate from this same-agent protocol.