# Loop Engineering Meta-Prompt Use this meta-prompt for every TAC Product Factory / Plan F3 plan that touches agents, deploy, RSI, or self-improvement. ## Required loop sections Every plan must explicitly map the work to four loops: 1. **Agent loop** — what agent/tool loop runs until done. 2. **Verification loop** — what deterministic checks, reviewers, receipts, or rubrics gate success. 3. **Event-driven loop** — what webhook, cron, queue, file event, or dashboard trigger runs the work without manual prompting. 4. **Hill-climbing loop** — what trace/evidence can safely modify prompts, skills, tools, or config later. ## Required safety fields Every plan/receipt must include: - Canonical deploy route: `git-proxy:8099/deploy`. - Legacy note: `deploy-webhook:8098` is internal/stale for guarded product deploy. - `auto_patch_proven`: `false` unless a degraded-skill recovery receipt exists. - `rsi_canary_recovery_evidence`: `true` only when linking the canary receipt. - Evidence receipt paths for any RSI/self-improvement claim. ## Required validation At minimum, plans must name the checks that prove: - plan schema/sections validate; - deploy route is signed-action-only; - tests pass; - claims do not exceed receipts. ## Taste rule Prefer the boring loop that compounds over the clever prompt that works once. If the plan needs a new framework, first prove a markdown file, JSON receipt, and pytest assertion cannot hold the invariant. ## Model Workspace Protocol note For sequential workflows with human review between stages, prefer folder-structured orchestration before multi-agent framework code. The Model Workspace Protocol pattern treats numbered folders as stages, markdown files as role/context carriers, and local scripts as the boring mechanical layer. Use this when it fits: - `00-intake/` — raw request, sources, constraints. - `10-plan/` — Plan F3 artifact and assumptions. - `20-build/` — implementation notes and changed files. - `30-verify/` — test output, verifier notes, receipts. - `40-ship/` — signed deploy request, outcome, rollback notes. Reference: arXiv 2603.16021, "Interpretable Context Methodology: Folder Structure as Agentic Architecture".