# WORKFLOW.md - Symphony configuration

> The single file the principal hand-edits to control Symphony.
> Holds the engine's configuration and the prompt template that every
> autonomous run is built from. Change behaviour by changing this file.

```yaml
---
tracker:   github
repo:      releasedgroup/payments-service
base:      main
poll:      30s
agent:     codex-cli
model:     gpt-5-codex
isolation: per-issue           # one workspace per issue, path-contained
require:                       # the engine refuses to close an issue unless
  - tests_pass                 # …all tests pass
  - docs_updated               # …user-facing docs are touched if behaviour changed
  - spec_referenced            # …SPEC.md was the source of truth, not the code
pr:
  reviewers: [nick-beaugeard]
  draft:     false
  labels:    [symphony, needs-human-review]
---

# Prompt template
# Variables come from the GitHub issue and the repo metadata.
# This template is rendered once per claimed issue and forms the
# entire prompt the agent receives.

Resolve issue #{{issue.number}} - "{{issue.title}}".

SPEC.md in this repository is the source of truth. If the change you are
about to make is not already implied by SPEC.md, stop and either:

  (a) propose a one-line spec edit that justifies it, and wait for human
      review, or
  (b) reject the issue as a spec-level question.

Do not infer intent from the existing code. The existing code is a build
artifact of an earlier version of SPEC.md.

Every change MUST ship in the same pull request as:

  1. Code that implements the change against SPEC.md.
  2. Tests covering the acceptance criteria affected.
  3. Documentation updates (API reference, runbook, README) for any change
     that is visible to a caller or operator.
  4. A short PR description that names the SPEC.md section the change
     descends from.

Open a pull request when all of the above are green. A change without
tests and docs is not a finished change - do not mark the issue done.
```

## How a run actually goes

```text
$ symphony status
[poll]  github: 1 active issue
[claim] #214  "add idempotency key to POST /payments"
[wkspc] created  .work/issue-214/
[spec]  read SPEC.md  (source of truth)
[agent] codex-cli  turn 1/…
        + src/Payments/Idempotency.cs
        + tests/Idempotency_Tests.cs
        ~ docs/api/payments.md
[test]  xUnit  17 passed  0 failed
[pr]    opened #PR-461  → review
[idle]  agent done · 0 human edits
```

## What the engine refuses to do

- Close an issue without passing tests.
- Open a PR that touches behaviour without touching docs.
- Make a behavioural change that has no corresponding line in `SPEC.md`.
  (It will instead open a draft PR proposing the spec edit.)

The point is structural. Quality is not enforced by a person remembering
to do the right thing - it is enforced by the engine refusing to call an
issue done until the spec, the code, the tests and the docs are all
consistent.
