/**
* Ralph Wiggum - Long-running agent loops for iterative development.
* Port of Geoffrey Huntley's approach.
*/
import * as fs from "node:fs";
import * as path from "node:path";
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
import { Type } from "@sinclair/typebox";
const RALPH_DIR = ".ralph";
const COMPLETE_MARKER = "COMPLETE";
const DEFAULT_TEMPLATE = `# Task
Describe your task here.
## Goals
- Goal 1
- Goal 2
## Checklist
- [ ] Item 1
- [ ] Item 2
## Verification
- Commands run, working directories, relevant environment variables, outputs, and preserved artifacts
## Final Verification
- Exact monitor-rerunnable command:
- Working directory:
- Required preserved artifacts:
- Result: