Skip to main content

Module catchup

Module catchup 

Source
Expand description

DOC-28 catch-up context injection for the PM prompt (#1762, PR2).

Why: The PM agent needs recent project-activity context (paused sessions, git commits, memory palace entries) at task start so it can orient without interrogating the operator. This module wraps the shared engine in trusty-common and exposes a single pm_catchup_context fn that is wired into the PM prompt path only (sub-agents receive None). What: pm_catchup_context(project_dir) -> Option<String> โ€” async, fail-open (returns None on any error or empty result), never advances the watermark (advancement is owned by trusty-mpm session_launch). Test: catchup::tests::pm_catchup_context_does_not_panic_on_empty_repo. DOC-28 catch-up context injection for the PM prompt (#1762, PR2).

Why: When a PM agent starts a task, it has no intrinsic knowledge of recent project activity โ€” paused sessions, new git commits, or recent memory palace entries. Injecting a catch-up digest as seed fallback_guidance in the PM system prompt gives it the context to orient quickly, mirroring the behaviour the trusty-mpm harness provides via session_launch. What: pm_catchup_context builds a CatchupOptions for the project and calls the shared engine in trusty-common, returning Some(digest) when meaningful content was produced or None to indicate the assembler should skip this section entirely. Test: catchup::tests::pm_catchup_context_does_not_panic_on_empty_repo.

Functionsยง

pm_catchup_context
Build PM-prompt catch-up seed context for the given project directory.