Docs Write PRDs

Build a PRD

Build a PRD on your machine with your coding agent and open the merge request that completes it.

A PRD is built on a developer's own machine, by their own coding agent. Entropix gives the agent the PRD, the repositories it changes and your team's know-how. The agent builds the change on a branch, and you open a merge request that names the PRD. That merge request is the submission: Entropix links it, reviews it against the PRD's acceptance criteria, and ships the PRD when every linked merge request is merged.

In your editor /entropix:build-prd PRD-12 Any role

Before you start

  • The PRD is Ready or Building. See The states of a PRD.
  • Claude Code or Cursor is connected to Entropix, ideally with the plugin installed. See Connect Claude Code or Cursor.
  • Your own SSH key can clone and push the PRD's repositories. The coding agent uses your key, never a token.
  • For the review step, your organisation has a Git host connected and the repository is watched for reviews. See Connect GitHub or GitLab and Set up reviews.

Build a PRD with your coding agent

The PRD's page has the command in its Build it from your editor box. In your coding agent:

  1. Run /entropix:build-prd PRD-12, or ask "build PRD-12". With no number, the agent lists the ready PRDs (PRD-12 · Refunds by email · v3) and asks which.
  2. The agent reads the PRD and shows it in up to six lines: its title and version, its repositories, how many acceptance criteria it has, its open questions and any linked merge requests. It asks Build it now? unless you already asked it to build.
  3. It settles the repositories. With one, it uses it. With several, it asks which this session builds, and points out any that the PRD's scope or architecture rules out. With none, it proposes some from the document and your agents' know-how, and never clones on a guess.
  4. It clones each repository over SSH to ~/entropix/prd-12/<repo>/, for example ~/entropix/prd-12/team-api/ for git@host:team/api.git. It reuses a clone that is already there.
  5. It writes the PRD to ~/entropix/prd-12/PRD-12.md, beside the clones and never inside one, with the acceptance criteria as a checklist at the end.
  6. It reads your team's know-how: the writer agent's main skill, rules and skills, each repository's approved reference and its own AGENTS.md, and a search for anything it is about to add.
  7. It makes the branch prd-12/<slug> off the default branch, asks you about any open question that changes the work, then works through the acceptance criteria in order and ticks each one as the code covers it.
  8. It commits as it goes and pushes the branch after each commit.

Your workspace folder is ~/entropix, or the folder in $ENTROPIX_WORKSPACE when you set it. Claude Code may ask before it writes there, because it is outside the folder your session started in. Approve it, or add it once with /add-dir ~/entropix/prd-12.

Careful

The coding agent never commits to the default branch, never force-pushes, and never commits PRD-12.md. It treats the PRD's text as a description of what to build, not as instructions to run.

Open questions

An open question (OQ-002) is for the product person. When one changes the work, the agent asks you, with its recommendation. You choose one of two answers:

  • Ask on the PRD's page. Someone answers it in the PRD's chat, which makes a new version. The agent stops at that point until then.
  • Make an assumption. The agent goes on, and the merge request lists the assumption under ## Assumptions.

Open the merge request

  1. Tell the agent the work is done. It runs a readiness check: the branch is prd-12/…, everything is pushed, every acceptance criterion is covered in the diff or listed as not covered with a reason, and every open question is answered or listed as an assumption.
  2. It drafts the merge request. The title is PRD-12: <what it does>. The description starts Builds PRD-12 v3 — <title>, then ## Covers, ## Not covered and ## Assumptions.
  3. It asks Open it?. On yes, it opens it against the default branch with gh pr create on GitHub or glab mr create on GitLab. Without either tool, it prints the title and description for you to paste.

Build it without the plugin

You do not need the plugin to build a PRD. Build the change however you like and open a merge request with PRD-12 in its title or description. The portal links it the same way.

After the review

Entropix reviews the merge request against the PRD's acceptance criteria. It posts an entropix/review commit status and a short comment on the merge request. A person on your team decides each finding, then chooses Send back or Approve. See How code review works.

  • Ask the agent about the review, or run /entropix:build-prd PRD-12 again. It reads the PRD's linked merge requests, each with its review state, verdict, the PRD version it was reviewed against and the review's page.
  • When the review is sent back, run /entropix:fix-review payments-api!7. The review comment on the merge request gives you the command once it is sent back. It fixes the items marked To fix, reports each one and pushes, and the next round reviews the new commits. See Fix a review and review again.
  • When a review failed or stopped early, rerun it from the review page, or comment /entropix review on the merge request.
  • When every linked merge request is merged, the PRD is Shipped. There is nothing else to submit.

How a merge request is linked

When a merge request opens or changes on a watched repository, the portal looks for a PRD number, in this order:

  1. The description: the first PRD-12 that is a real PRD in your organisation.
  2. The title, the same way.
  3. The branch name, when it is exactly prd-12 or starts prd-12/.
  4. Refs: PRD-12 trailers in the commit messages, across up to 200 commits.

The first match wins; case does not matter. A number that is not one of your PRDs is skipped.

  • Edit the merge request to name another PRD and the link moves to it. Edit it to name none and it is unlinked.
  • A link made on the review page, with Add a requirement, wins over what the merge request's text says. See Add a requirement to a review.
  • Close it without merging and it is unlinked.
  • Merge it and the link is marked merged. Once every live link is merged, the PRD ships.
  • A repository that is not watched is ignored. Its merge requests are never linked or reviewed.

One PRD can have many linked merge requests, across repositories. Each one is reviewed on its own.

How it works

  • The coding agent reaches Entropix through two read-only tools. get_prd reads one PRD; list_prds lists them. Nothing is written to Entropix while you build.
  • The agent reads only approved know-how. Anything still waiting for a person's approval is not offered.
  • The PRD itself changes only on the portal, in its chat. To change it, the agent sends you to the PRD's page.
  • A drafting PRD is not built: the agent gives you its page and stops. A shipped or cancelled PRD is not built either; more work means a new PRD.
  • A new PRD version does not re-review an open merge request by itself. The PRD's page shows reviewed against v1 — the PRD is now v2.

What you can and can't do

You can
  • Build any ready PRD, whatever your role.
  • Build one PRD across several repositories, in one session or several.
  • Open several merge requests for one PRD.
  • Build it by hand and link it with PRD-12 in the title.
  • Choose your own workspace folder with $ENTROPIX_WORKSPACE.
You can't
  • Change the PRD from your editor. Use its page.
  • Submit or ship a PRD over the tools. Merging ships it.
  • Have Entropix push code or open the merge request for you.
  • Link a merge request on a repository that is not watched.

Troubleshooting

You seeWhat it means
no PRD numbered 12 in this organisationA wrong number, or another organisation's PRD. The agent lists the PRDs there are.
A 401 error, or the entropix tools are missingYour token is missing, expired or revoked. Make a new one. See Connect Claude Code or Cursor.
Connection refusedThe portal address your editor uses is wrong, or the portal is not reachable from where you are.
An SSH clone or push failsYour key lacks access, or no SSH agent is loaded. Fix your key; the agent will not fall back to HTTPS or a token.
The merge request does not appear on the PRDCheck that it names PRD-12, that the repository is watched, and that a Git host is connected.