Agentic.Loop.Stages.WorkspaceSnapshot (agentic v0.2.2)

Copy Markdown

Gathers workspace context and injects it into the conversation.

Only active on the first pipeline pass (ctx.turns_used == 0). Sits before ContextGuard in every pipeline that includes it.

Responsibilities:

  • Gather workspace context: git branch/status/recent commits, file tree, instruction files, project config
  • Inject a structured workspace context message into ctx.messages
  • Check ctx.callbacks[:on_workspace_snapshot] — if provided, use the host's snapshot; otherwise gather automatically
  • On subsequent passes, no-ops (the snapshot is already in messages)