trw_deliver
Persist learnings and progress from this session to future ones by checkpointing, reflecting, and running background housekeeping.
Instructions
Persist learnings and progress so future sessions inherit this session's work.
Use when:
Your session is about to end and you want discoveries to persist for future agents.
A milestone is reached and you want to close out the current run directory.
Before calling, check: did you record at least one discovery with trw_learn? If not, add even a one-line root-cause learning so the next agent avoids re-discovery.
Runs reflect + checkpoint synchronously, then launches housekeeping (consolidation, publish, telemetry, tier sweep) in the background. Background work is concurrency-safe — overlapping batches are skipped rather than queued.
Input:
run_path: path to run directory (auto-detected if None).
skip_reflect: skip reflection step (e.g., already reflected).
skip_index_sync: skip INDEX/ROADMAP sync step.
allow_unverified: explicit override for delivery without a passing trw_build_check record. Use only for documented acceptable failures.
unverified_reason: required rationale when allow_unverified is true.
Output: DeliverResultDict with fields {run_path: str, reflect: dict, checkpoint: dict, deferred: str, critical_steps_completed: int, deferred_steps: int, errors: list, success: bool, learning_reflection?: str}.
Example: trw_deliver() → {"run_path": "/path/...", "critical_steps_completed": 2, "deferred": "launched", "success": true}
See Also: trw_checkpoint, trw_instructions_sync
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_path | No | ||
| skip_reflect | No | ||
| skip_index_sync | No | ||
| allow_unverified | No | ||
| unverified_reason | No |