---
schema_version: 1
revision: "22ce5d34dbcb5a78"
id: "factory-bounded-prompts"
title: "Bounded prompts for factory work"
---

# Bounded prompts for factory work

Six complete exercises with explicit input, expected output, and success evidence, plus the read-only audit setup.

## TL;DR

- **Every prompt declares** its input, expected result, and success check.
- **Copying is preparation;** attempting and verifying are separate progress stages.
- **Your agent can install** the complete audit from agent.md.

Paste this into your agent:

``` text
Fetch 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.
```

## Quick start

Orient yourself in the current repository before choosing a prompt.

``` text
ROOT="$(git rev-parse --show-toplevel)"
cd "$ROOT"
printf 'Repository: %s\n' "$ROOT"
git status --short
git diff --stat
find . -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
```

## Prompt library

### Audit one factory boundary

- Agent: Repository-capable coding agent
- Working directory: Project root
- Inputs: One recurring task and the current repository
- Expected result: A seven-part boundary map with one human gate

**Success:** All claims are Observed, Inferred, or Proposed; the tree is unchanged.

``` text
You are auditing one recurring software task as a bounded factory loop. Work read-only until I explicitly approve a change.

First inspect the current repository and ask me to name the recurring task if it is not already clear. Then return these seven sections:

1. Task contract — input, desired outcome, and what is outside scope.
2. Required context — the minimum current evidence needed before acting.
3. Boundary map — repository rule, launch rule, command rule, human gate, and automated check.
4. Risk gate — the first expensive, destructive, public, or hard-to-reverse action that must stop for approval.
5. Success evidence — one exact command or observable signal that can prove the task worked.
6. Receipt — what the next session needs to reproduce the result and understand the decision.
7. Smallest reversible delta — the first experiment that tests this loop without production mutation.

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.
```

### Compose the smallest useful evidence packet

- Agent: Coding agent
- Working directory: Project root
- Inputs: Task, relevant files, fresh command output, optional annotated image
- Expected result: A source list, omissions, and one verification plan

**Success:** Every included source changes the decision, action, or verification.

``` text
Prepare 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.
```

### Generate structural variations

- Agent: Design-capable coding agent
- Working directory: Project root; write only to a scratch route or directory
- Inputs: Stable content, product goal, design constraints
- Expected result: Four meaningfully different mockups and a comparison index

**Success:** Options differ in structure, not only color or type.

``` text
Create 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.
```

### Recover a trustworthy handoff

- Agent: Coding agent with repository and history access
- Working directory: Project root
- Inputs: Working tree, recent commits, notes, artifacts, available session history
- Expected result: A compact recovery memo and one next check

**Success:** The memo distinguishes verified state from remembered or inferred state.

``` text
Recover 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.
```

### Prepare a maximum-intelligence consult

- Agent: Strong independent reasoning model
- Working directory: Project root or supplied evidence bundle
- Inputs: One hard decision and filtered supporting evidence
- Expected result: Alternatives, hidden assumptions, experiment, reversal plan

**Success:** The recommendation is falsifiable and does not depend on missing context.

``` text
Review 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.
```

### Earn the right to automate

- Agent: Coding agent and human owner
- Working directory: Project root
- Inputs: VISION.md or product evidence plus one recurring review
- Expected result: Manual → script → agent → CI → blocking-gate promotion plan

**Success:** Every promotion has an owner, evidence threshold, cost boundary, and recovery path.

``` text
Map 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.
```

## Set up the boundary audit

These steps mirror [agent.md](https://proud-anchor-53zn.here.now/agent.md).

1.  Confirm Git and preserve the working tree.

2.  Create the complete prompt:

    ``` text
    # Factory Loop Boundary Audit

    Use this prompt before automating or expanding a recurring software task.

    ## Instructions

    You are auditing one recurring software task as a bounded factory loop. Work read-only until I explicitly approve a change.

    First inspect the current repository and ask me to name the recurring task if it is not already clear. Then return these seven sections:

    1. Task contract — input, desired outcome, and what is outside scope.
    2. Required context — the minimum current evidence needed before acting.
    3. Boundary map — repository rule, launch rule, command rule, human gate, and automated check.
    4. Risk gate — the first expensive, destructive, public, or hard-to-reverse action that must stop for approval.
    5. Success evidence — one exact command or observable signal that can prove the task worked.
    6. Receipt — what the next session needs to reproduce the result and understand the decision.
    7. Smallest reversible delta — the first experiment that tests this loop without production mutation.

    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.

    ## Success contract

    - The output contains all seven named sections.
    - Every statement is labeled Observed, Inferred, or Proposed.
    - One explicit human gate and one exact verification signal are named.
    - The audit makes no repository changes.
    ```

3.  Run the structural check:

    ``` text
    mkdir -p .agents/prompts
    test -s .agents/prompts/factory-loop-audit.md
    grep -q '^## Success contract' .agents/prompts/factory-loop-audit.md
    printf 'factory loop prompt installed\n'
    ```

**Success check:** the installed audit returns seven labeled sections, one human gate, one exact verification signal, and changes no pre-existing file.

``` text
factory loop prompt installed
```

## Use the smallest prompt that can change the result

Before: 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.

The prompts are companion-authored exercises grounded in the recorded operating patterns. They are not presented as verbatim workshop quotations.

## Original references

- [Factory prompt library](https://proud-anchor-53zn.here.now/prompts.html)
