{
  "schemaVersion": "1",
  "revision": "22ce5d34dbcb5a78",
  "id": "factory-bounded-prompts",
  "slug": "bounded-prompts",
  "title": "Bounded prompts for factory work",
  "summary": "Six complete exercises with explicit input, expected output, and success evidence, plus the read-only audit setup.",
  "category": "Planning",
  "tags": [
    "prompts",
    "contracts",
    "audit"
  ],
  "sources": [
    {
      "label": "Factory prompt library",
      "url": "https://proud-anchor-53zn.here.now/prompts.html"
    }
  ],
  "sourceUnits": [
    "prompts.html#TL;DR",
    "prompts.html#Quick start",
    "prompts.html#Prompt library",
    "prompts.html#Set up the boundary audit",
    "prompts.html#Use the smallest prompt that can change the result"
  ],
  "collection": "factory",
  "categoryId": "planning",
  "wordCount": 1327,
  "url": "/topics/factory-bounded-prompts/",
  "markdownUrl": "/markdown/factory-bounded-prompts.md?raw=1&v=22ce5d34dbcb5a78",
  "jsonUrl": "/api/v1/documents/factory-bounded-prompts.json",
  "headings": [
    {
      "id": "tl-dr",
      "text": "TL;DR",
      "level": 2
    },
    {
      "id": "quick-start",
      "text": "Quick start",
      "level": 2
    },
    {
      "id": "prompt-library",
      "text": "Prompt library",
      "level": 2
    },
    {
      "id": "audit-one-factory-boundary",
      "text": "Audit one factory boundary",
      "level": 3
    },
    {
      "id": "compose-the-smallest-useful-evidence-packet",
      "text": "Compose the smallest useful evidence packet",
      "level": 3
    },
    {
      "id": "generate-structural-variations",
      "text": "Generate structural variations",
      "level": 3
    },
    {
      "id": "recover-a-trustworthy-handoff",
      "text": "Recover a trustworthy handoff",
      "level": 3
    },
    {
      "id": "prepare-a-maximum-intelligence-consult",
      "text": "Prepare a maximum-intelligence consult",
      "level": 3
    },
    {
      "id": "earn-the-right-to-automate",
      "text": "Earn the right to automate",
      "level": 3
    },
    {
      "id": "set-up-the-boundary-audit",
      "text": "Set up the boundary audit",
      "level": 2
    },
    {
      "id": "use-the-smallest-prompt-that-can-change-the-result",
      "text": "Use the smallest prompt that can change the result",
      "level": 2
    }
  ],
  "markdown": "# Bounded prompts for factory work\n\nSix complete exercises with explicit input, expected output, and success evidence, plus the read-only audit setup.\n\n## TL;DR\n\n- **Every prompt declares** its input, expected result, and success check.\n- **Copying is preparation;** attempting and verifying are separate progress stages.\n- **Your agent can install** the complete audit from agent.md.\n\nPaste this into your agent:\n\n``` text\nFetch https://proud-anchor-53zn.here.now/agent.md and follow it to install the factory-loop audit in my current project. Run the success check and show me the result.\n```\n\n## Quick start\n\nOrient yourself in the current repository before choosing a prompt.\n\n``` text\nROOT=\"$(git rev-parse --show-toplevel)\"\ncd \"$ROOT\"\nprintf 'Repository: %s\\n' \"$ROOT\"\ngit status --short\ngit diff --stat\nfind . -maxdepth 2 -type f \\( -name AGENTS.md -o -name README.md -o -name package.json -o -name pyproject.toml -o -name Cargo.toml \\) -print | sort\n```\n\n## Prompt library\n\n### Audit one factory boundary\n\n- Agent: Repository-capable coding agent\n- Working directory: Project root\n- Inputs: One recurring task and the current repository\n- Expected result: A seven-part boundary map with one human gate\n\n**Success:** All claims are Observed, Inferred, or Proposed; the tree is unchanged.\n\n``` text\nYou are auditing one recurring software task as a bounded factory loop. Work read-only until I explicitly approve a change.\n\nFirst inspect the current repository and ask me to name the recurring task if it is not already clear. Then return these seven sections:\n\n1. Task contract — input, desired outcome, and what is outside scope.\n2. Required context — the minimum current evidence needed before acting.\n3. Boundary map — repository rule, launch rule, command rule, human gate, and automated check.\n4. Risk gate — the first expensive, destructive, public, or hard-to-reverse action that must stop for approval.\n5. Success evidence — one exact command or observable signal that can prove the task worked.\n6. Receipt — what the next session needs to reproduce the result and understand the decision.\n7. Smallest reversible delta — the first experiment that tests this loop without production mutation.\n\nLabel every statement Observed, Inferred, or Proposed. Do not install tools, use credentials, mutate data, publish, or edit files. If evidence is missing, stop and name the missing evidence instead of guessing.\n```\n\n### Compose the smallest useful evidence packet\n\n- Agent: Coding agent\n- Working directory: Project root\n- Inputs: Task, relevant files, fresh command output, optional annotated image\n- Expected result: A source list, omissions, and one verification plan\n\n**Success:** Every included source changes the decision, action, or verification.\n\n``` text\nPrepare the smallest evidence packet for this task before proposing a solution. Separate: task, constraints, current implementation, fresh runtime evidence, visual evidence, and success check. For each source, say which decision it can change. Identify stale, duplicated, contradictory, or irrelevant material and exclude it. End with the exact evidence still missing. Do not implement yet.\n```\n\n### Generate structural variations\n\n- Agent: Design-capable coding agent\n- Working directory: Project root; write only to a scratch route or directory\n- Inputs: Stable content, product goal, design constraints\n- Expected result: Four meaningfully different mockups and a comparison index\n\n**Success:** Options differ in structure, not only color or type.\n\n``` text\nCreate four dependency-free design variations without editing production files. Hold the content and product goal constant. Vary information architecture, hierarchy, density, navigation, and interaction emphasis. Give every option a distinct design thesis. Build a comparison index that explains what each option optimizes, what it sacrifices, and which user behavior it makes easiest. Stop before choosing a winner. Label this a Companion-authored exercise.\n```\n\n### Recover a trustworthy handoff\n\n- Agent: Coding agent with repository and history access\n- Working directory: Project root\n- Inputs: Working tree, recent commits, notes, artifacts, available session history\n- Expected result: A compact recovery memo and one next check\n\n**Success:** The memo distinguishes verified state from remembered or inferred state.\n\n``` text\nRecover this task from durable evidence. Report: current objective, current repository state, last verified result, decisions already settled, open risks, failed attempts worth preserving, next bounded action, and the exact command or observation that will prove it. Use history only to locate evidence; verify important claims against the current tree or artifacts. Do not continue implementation until the recovery memo is internally consistent.\n```\n\n### Prepare a maximum-intelligence consult\n\n- Agent: Strong independent reasoning model\n- Working directory: Project root or supplied evidence bundle\n- Inputs: One hard decision and filtered supporting evidence\n- Expected result: Alternatives, hidden assumptions, experiment, reversal plan\n\n**Success:** The recommendation is falsifiable and does not depend on missing context.\n\n``` text\nReview this decision independently. State the decision in one sentence. Identify hidden assumptions and the most costly way the current framing could be wrong. Propose at least three materially different options, including the simplest viable option. For each, give evidence, tradeoffs, reversibility, and failure modes. Recommend the smallest discriminating experiment and define the result that would change your recommendation. Finish with a reversal plan.\n```\n\n### Earn the right to automate\n\n- Agent: Coding agent and human owner\n- Working directory: Project root\n- Inputs: VISION.md or product evidence plus one recurring review\n- Expected result: Manual → script → agent → CI → blocking-gate promotion plan\n\n**Success:** Every promotion has an owner, evidence threshold, cost boundary, and recovery path.\n\n``` text\nMap this recurring review onto an automation ladder: manual run, deterministic script, bounded agent, non-blocking CI report, blocking gate, schedule, or human approval. Keep it at the lowest stage that is currently justified. For each possible promotion, specify the evidence threshold, false-positive tolerance, latency and cost budget, owner, stop condition, and recovery path. Run nothing and schedule nothing. End with the next five manual receipts we should collect.\n```\n\n## Set up the boundary audit\n\nThese steps mirror [agent.md](https://proud-anchor-53zn.here.now/agent.md).\n\n1.  Confirm Git and preserve the working tree.\n\n2.  Create the complete prompt:\n\n    ``` text\n    # Factory Loop Boundary Audit\n\n    Use this prompt before automating or expanding a recurring software task.\n\n    ## Instructions\n\n    You are auditing one recurring software task as a bounded factory loop. Work read-only until I explicitly approve a change.\n\n    First inspect the current repository and ask me to name the recurring task if it is not already clear. Then return these seven sections:\n\n    1. Task contract — input, desired outcome, and what is outside scope.\n    2. Required context — the minimum current evidence needed before acting.\n    3. Boundary map — repository rule, launch rule, command rule, human gate, and automated check.\n    4. Risk gate — the first expensive, destructive, public, or hard-to-reverse action that must stop for approval.\n    5. Success evidence — one exact command or observable signal that can prove the task worked.\n    6. Receipt — what the next session needs to reproduce the result and understand the decision.\n    7. Smallest reversible delta — the first experiment that tests this loop without production mutation.\n\n    Label every statement Observed, Inferred, or Proposed. Do not install tools, use credentials, mutate data, publish, or edit files. If evidence is missing, stop and name the missing evidence instead of guessing.\n\n    ## Success contract\n\n    - The output contains all seven named sections.\n    - Every statement is labeled Observed, Inferred, or Proposed.\n    - One explicit human gate and one exact verification signal are named.\n    - The audit makes no repository changes.\n    ```\n\n3.  Run the structural check:\n\n    ``` text\n    mkdir -p .agents/prompts\n    test -s .agents/prompts/factory-loop-audit.md\n    grep -q '^## Success contract' .agents/prompts/factory-loop-audit.md\n    printf 'factory loop prompt installed\\n'\n    ```\n\n**Success check:** the installed audit returns seven labeled sections, one human gate, one exact verification signal, and changes no pre-existing file.\n\n``` text\nfactory loop prompt installed\n```\n\n## Use the smallest prompt that can change the result\n\nBefore: name the boundary. Prompt: include only decisive evidence. Success evidence: run one exact check. Reflect: record what changed your decision. Continue: return to the related lesson.\n\nThe prompts are companion-authored exercises grounded in the recorded operating patterns. They are not presented as verbatim workshop quotations."
}
