Add a requirement to a review
Give a review with no PRD a requirement, so it also checks that the change does what was asked.
A review of a merge request that names no PRD checks that the code is sound, but not that it does what was asked. Add a requirement gives that review a PRD after the fact: one you already have, or a short one an agent writes from a few lines you type. Entropix links the PRD to the change and reviews the same commit again against the PRD's acceptance criteria, keeping every decision you already made.
Before you start
- The review is of a merge request (not a branch review), and its round has finished.
- The change has no PRD yet: neither its description, title, branch nor a
Refs:commit trailer names one. See How PRDs work for how a PRD is usually named on a merge request. - To have a new PRD written, a model must be set up for the organisation's PRD writer.
When the review has no PRD, its page shows a requirement box with Add a requirement, and the rail shows Requirement · none · Add.
Link an existing PRD
- On the review page, choose Add a requirement. The page What should this change do? opens.
- Choose Use an existing PRD and pick the PRD. The list shows ready and drafting PRDs, those that read this repository first, then newest first. A PRD that reads this repository is marked · reads this repository; a draft with no criteria yet is marked · no criteria yet. Completed PRDs are behind Show N completed PRDs. Cancelled PRDs are not listed.
- If the list is long, type in Search PRDs (optional) and choose Search.
- Choose Add requirement.
Have a new PRD written
- On the review page, choose Add a requirement.
- Choose Write a new one and describe in What this change should do what the change is meant to achieve. Or attach a
.mdor.txtfile instead. Use one or the other, not both. - Choose Add requirement.
The organisation's PRD writer writes a short PRD: an overview, one user story, at most three requirements and at most three acceptance criteria, with no Approach or Architecture sections. If there is no PRD writer, the organisation's default agent writes it. When the writer holds the reviewed repository, it reads it. The new PRD has its own page like any other; see Read and change a PRD.
Writing a new PRD also needs the right to start a PRD, which every Member has. If no model is set up for the writer, the section says Writing a new PRD needs a model. Settings › Models.
What happens next
You return to the review page. A Requirement box shows the progress and the page refreshes itself:
- Writing PRD-n, for a new PRD, with its place in the queue.
- PRD-n linked, with how many acceptance criteria it has.
- Re-checking !N against its criteria.
At the same time, Entropix:
- Posts one comment on the merge request saying the PRD is linked. It does not edit the merge request's title or description.
- Sets the
entropix/reviewstatus to pending. - Starts a requirement round: the next round number, on the same commit. Your decisions on earlier findings are kept. Only the repository's reviewer takes part; no other review agents join it.
While it runs, the rail offers only Save decisions. You can send back or approve once it finishes.
A change has one PRD. A PRD linked here wins over a PRD that the merge request's text names later.
Read the result
When the requirement round finishes, the review page shows a Does it do what was asked? fold, and the rail reads Requirement · PRD-n · M of K met.
- The headline: the PRD and how many of its criteria are met, with Remove requirement beside it.
- What's left to complete: the criteria that are not met yet, as a short list.
- One row per criterion, with its result and proof:
| Result | Means |
|---|---|
| Met | A passing test proves it, or the reviewer quoted the code that does it (shown as read, not run). |
| Not met | It is not done. The row links to the finding the review raised for it. |
| Unknown | The reviewer could not tell, the proof relies on something else, no test passed, or the quoted code is not at the latest commit. |
The findings list keeps the earlier round's findings in their own section, Round N findings, carried with their decisions, and puts new ones under Raised by the requirement check. Decide them and send back or approve as usual; see Decide, send back or approve. Later rounds, after the developer pushes, keep checking the same criteria.
Remove a requirement
- In the Does it do what was asked? fold, choose Remove requirement.
- The page Remove the requirement? shows the Linked requirement: PRD.
- Choose Remove requirement.
Past rounds and your decisions stay. The next round checks the change without a PRD. The PRD itself is not deleted. You can only remove a PRD that was added here: a PRD named in the merge request's own text stays until someone edits that text.
What you can and can't do
- Link a ready, drafting or completed PRD to a review that has none.
- Have a short PRD written from a few lines or a file.
- Keep your decisions: the requirement round carries them.
- Remove a requirement you added, and add another.
- Link more than one PRD to a change.
- Add a requirement to a branch review, or before the round finishes.
- Link a cancelled PRD.
- Remove a PRD that the merge request's own text names.
- Have Entropix edit the merge request's text.
Troubleshooting
| Message | What it means |
|---|---|
| A branch review has no change to add a requirement to. | Branch reviews have no merge request. Open a merge request first. |
| This change already has a PRD. | It is already checked against a PRD. Remove that one first if it was added here. |
| The review has not finished yet. | Wait for the round to finish. |
| This round is closed (the change is …). | The change was merged or closed. |
| Choose a PRD. / Choose where the requirement comes from. | Pick a PRD, or describe the change under Write a new one. |
| No model is set up to write a PRD. | Set up a model for the PRD writer, or link an existing PRD. |
| a newer push of this change is being reviewed — add the requirement there | Open the newest round's review and add it there. |
| PRD-n was cancelled | Pick another PRD. |
| A message ending PRD-n was written; open it at /prds/n. | The new PRD was written but could not be linked. Open it, then try linking it as an existing PRD. |
| PRD-n is named in the change's own text … | Shown when you try to remove it. Edit the merge request's text to drop the PRD. |