> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# context-engineer

> Turn a vague user script into a context contract, route it, add backpressure, execute, and report. The concierge proxy.

`context-engineer` is an archived, copyable concierge example, not installed by
`init`. Copy it from `examples/init-pack/` with its dependency closure, or ask
`create-workflow` to author a repo-specific equivalent. Hand it a vague,
plain-English script and it does the context engineering for you end to end:
classify, draft a **context contract**, grill you on blocking ambiguities one
question at a time, route and gate the work, execute (or dispatch) it, and
write a self-contained HTML report of the whole run.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smithers-orchestrator workflow run context-engineer \
  --prompt "Clean up the flaky e2e tests and make CI green again"
```

By default it pauses for contract approval before any work executes. Clear the
gate with `bunx smithers-orchestrator approve RUN_ID --node approve-contract`, or run
autonomously with `--input '{"review":false}'`.

## Stages

1. **classify-script**: read the script; decide the task modes touched and whether it needs durable execution.
2. **inventory-context**: inspect the repo, tools, and `.smithers/skills` to draft a context contract (goal, non-goals, assumptions, inputs, missing inputs, constraints, risks, desired artifacts, success criteria, verification signals).
3. **grill**: resolve blocking ambiguity with `GrillMe`, one question at a time, each with a recommended answer.
4. **route**: choose how to carry out the work: single task, skills, durable seeded workflow, or a human.
5. **build-backpressure**: map every success criterion to a verification method and enforcement gate.
6. **approve-contract**: durable human approval gate for the whole contract (skippable via `review: false`).
7. **execute**: a Ralph loop that does or dispatches the work, honoring the gates, until it reports done.
8. **report**: a concise HTML slideshow of the script, contract, decisions, route, gates, artifacts, and unresolved items.

## Inputs

| Input    | Type    | Default                                                      |
| -------- | ------- | ------------------------------------------------------------ |
| `prompt` | string  | `"Describe what you want Smithers to do, in plain English."` |
| `review` | boolean | `true` (pause for contract approval before executing)        |

## Monitor it

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smithers-orchestrator workflow run context-engineer --prompt "…" -d   # detach
bunx smithers-orchestrator ps                                              # active / paused / recent
bunx smithers-orchestrator logs RUN_ID -f                                 # follow events
bunx smithers-orchestrator approve RUN_ID --node approve-contract         # clear the contract gate
```

Use this when you have a fuzzy ask and want Smithers to do the context
engineering first, instead of firing a half-specified task at a bare agent.
