# Propose a change request as a risk-classified intent record for the CAB

Roles:

- Analyst
- RiskOfficer

The product owner supplies a change request as the caller input.
The proposal travels as text between the roles until it is final: no one writes files or commits before the final commit, so every turn before it leaves the repository unchanged.
At most two review rounds take place.
Finding numbers are references within this proposal only, and no transition depends on numbering or any fixed presentation format of either player's reply.
`propose` ends with exactly one new commit on the current branch that adds the intent record, and returns that commit, the intent id, the risk class, and whether the proposal was agreed or committed as disputed.

When the product owner gives a change request, Captain shall prompt Analyst:

```markdown
Read @specs/ and the relevant code to understand the change request below.
If the request is too ambiguous to identify the systems touched or the risk class, ask the product owner one question before drafting.
Draft a proposal as one intent record, following @specs/meta.md for intent records and choosing the next free intent id and file path under @specs/intents/.
The intent record shall state:
- the business goal;
- the customer-facing change;
- the systems touched, each named as it appears in @specs/ or the code;
- the risk classification, exactly one of low, medium, or high, with the reason drawn from the systems touched and the data involved;
- the rollback approach;
- acceptance checks, each with an observable pass condition.
Do not write files or commit; reply with the intent id, its file path, and the complete intent record text.
```

Captain shall append the change request in quotes (`>`):

> Change request: <caller-input>

Results:
- `drafted`: Analyst replied with a complete drafted intent record and wrote no file and made no commit; a progress report or promise of a later draft supports no outcome. Output shall include `proposal: <verbatim final text>`.

When Analyst has drafted the proposal, at the first review round, Captain shall prompt RiskOfficer:

```markdown
Review the proposed intent record below for the change advisory board.
Read @specs/ and the relevant code to verify the systems touched and the data involved.
Check that:
- the risk class is justified by the systems touched and the data involved;
- every acceptance check is testable, with an observable pass condition;
- a high-risk change names a rollback that restores service without data loss.
Flag only what materially affects the risk classification, testability, or rollback — not wording or style.
Number every finding.
If you find nothing to flag, say plainly that you have no findings.
Do not edit files or commit; report findings only.
```

Captain shall append the round's context in quotes (`>`):

> Change request: <caller-input>
> Proposal: <proposal>

Results:
- `hasFindings`: RiskOfficer raised one or more numbered findings; a progress report or promise of a later review supports no outcome. Output shall include `riskFindings: <verbatim final text>`.
- `noFindings`: RiskOfficer affirmatively reported that the review is complete with no findings; a progress report or promise of a later review supports no outcome.

When RiskOfficer raises findings in the first review round, Captain shall prompt Analyst:

```markdown
The RiskOfficer reviewed your proposal; the findings are below.
For each finding, accept or reject it; if you reject one, give the reasoning and cite @specs/ or code that supports it.
Fix every finding you accept in the intent record.
Keep the intent id and file path unchanged.
Do not write files or commit; reply with every disposition and the complete revised intent record text.
```

Captain shall append the round's context in quotes (`>`):

> Change request: <caller-input>
> Proposal: <proposal>
> RiskOfficer findings: <risk-findings>

Results:
- `revised`: Analyst replied with a disposition for every finding and the complete revised intent record, and wrote no file and made no commit; a progress report or promise of a later revision supports no outcome. Output shall include `proposal: <verbatim final text>`.

When Analyst has revised the proposal, at the second and final review round, Captain shall prompt RiskOfficer:

```markdown
The Analyst revised the proposal in response to your findings; the dispositions and the revised intent record are below.
Read @specs/ and the relevant code to verify the systems touched and the data involved.
For each earlier finding, confirm it is resolved, accept the rebuttal, or keep it with your reasoning.
Check that:
- the risk class is justified by the systems touched and the data involved;
- every acceptance check is testable, with an observable pass condition;
- a high-risk change names a rollback that restores service without data loss.
Flag only what materially affects the risk classification, testability, or rollback — not wording or style.
Keep the numbers of earlier findings you keep, and number new findings after them.
If no finding remains, say plainly that you have no findings.
Do not edit files or commit; report findings only.
```

Captain shall append the round's context in quotes (`>`):

> Change request: <caller-input>
> Your earlier findings: <risk-findings>
> Revised proposal: <proposal>

Results:
- `hasFindings`: RiskOfficer kept or raised one or more numbered findings; a progress report or promise of a later review supports no outcome. Output shall include `riskFindings: <verbatim final text>`.
- `noFindings`: RiskOfficer affirmatively reported that the review is complete with no findings remaining; a progress report or promise of a later review supports no outcome.

When RiskOfficer reports no findings in either review round, Captain shall prompt Analyst:

```markdown
The RiskOfficer has no findings on your latest proposal below.
Write its intent record, exactly as last proposed, to its file path under @specs/intents/.
Commit only that file, in exactly one new commit on the current branch; never amend or rewrite an existing commit.
Make the commit message name the intent id and the risk class.
Report to the product owner the commit hash, the intent id, and the risk class, and that the RiskOfficer agreed.
```

Captain shall append the context in quotes (`>`):

> Change request: <caller-input>
> Latest proposal: <proposal>

Results:
- `committed`: Analyst added the intent record in exactly one new commit on the current branch and reported it. On this outcome `propose` returns the commit, the intent id, and the risk class, with the proposal agreed. Output shall include `latestCommit: <commit identity>`, `intentId: <intent id>`, and `riskClass: <low, medium or high>`.

When RiskOfficer still has findings after the second review round, Captain shall prompt Analyst:

```markdown
The RiskOfficer still has findings after the final review round; they are below, and no further review will take place.
You may fix in the intent record any finding you accept.
Add a "Disputed" heading to the intent record listing every finding below by its number and text, each with your response: fixed but not re-reviewed, or rejected with your reasoning.
Write the intent record to its file path under @specs/intents/, keeping its intent id.
Commit only that file, in exactly one new commit on the current branch; never amend or rewrite an existing commit.
Make the commit message name the intent id and the risk class, and state that the proposal is disputed.
Report to the product owner the commit hash, the intent id, and the risk class, and that the proposal is disputed, listing the open finding numbers.
```

Captain shall append the context in quotes (`>`):

> Change request: <caller-input>
> Latest proposal: <proposal>
> Open RiskOfficer findings: <risk-findings>

Results:
- `committedDisputed`: Analyst added the intent record, with its "Disputed" heading listing the open findings, in exactly one new commit on the current branch and reported it as disputed. On this outcome `propose` returns the commit, the intent id, and the risk class, with the proposal disputed. Output shall include `latestCommit: <commit identity>`, `intentId: <intent id>`, and `riskClass: <low, medium or high>`.
