All Docs/Requirements

Requirements

A requirement is a promise your product has to keep: something it must always do, or must never do. For example, "customers can always check out without creating an account", or "customer data is never kept longer than the law requires". Once a requirement is in force, new work is checked against it, and work that would break it is held until someone deals with it.

You'll find a project's requirements under Knowledge → Requirements in the project sidebar, directly after Memories. The page carries a Beta badge. Everyone on the project can read the requirements, and Search requirements… finds one by its wording.

When to use a requirement instead of a decision

A decision records a choice your team made and why, such as which payment provider to use. Later work can revisit it, with the right person's OK. A requirement is an obligation that every later piece of work has to meet, whatever else changes.

Keep requirements for the few things that must never be broken. A choice about how something is built, or how your team likes to work, belongs in Memories as a decision or convention. How your agents should build and ship belongs in Rules and instructions.

Add a requirement

  • Ask Dev or your agent. Tell it what the product must always or never do. When Dev or your agent thinks something you said should be a requirement, it asks you first and explains what that means. It never records one nobody asked for.
  • Talk it through from the Requirements page. Press Add a requirement, then Start a conversation. Choose Dev, one of your agents, or nobody for now, and say what you want in your own words. Dev or your agent drafts the requirement with you and records it only when you say yes.
  • Write it yourself. The form is optional. Press Add a requirement, then Open the form. Give it a one-line title, say When it applies and What must hold, and attach any Supporting documents, such as a standard or policy it relies on. Press Review requirement to see exactly what will be recorded, then Add requirement.

A new requirement starts to bind work once its own checks finish, and it applies to new work from then on.

Before Dev or your agent saves a new requirement, or rewrites one substantially, it looks for records that already cover the same ground and shows you any it finds, so you can update the existing one instead of adding a second.

Who can make a requirement binding

Who asksWhat happens
A Maintainer, including the project leadThe requirement is recorded straight away and binds work once its checks finish.
A Contributor or Reviewed ContributorIt's sent for a Maintainer to accept (the page offers Propose a requirement). It binds nothing until they do.
A ViewerCan read and discuss requirements, but not add them.

An automation can't add a requirement.

Change or retract a requirement

Click a requirement to open it. You'll see the full text, where it was agreed, its history, and the evidence recorded when work was checked against it. Use Discuss, on the requirement's card or once it is open, to talk it through: pick its existing conversation or start a new one, then choose Dev, one of your agents, or nobody for now.

To change it, press Edit on its card or once it's open, change its title, When it applies, What must hold, Guidance for coding agents or its supporting documents, and press Review changes. To withdraw it, press Retract. When your change needs someone's OK, the controls read Suggest an edit and Retract (needs its owner’s OK) or Retract (needs a maintainer to accept), and the change is sent for that person to accept.

A requirement belongs to the person who agreed to it. Its owner or the project lead can change or retract it directly. When another Maintainer changes or retracts it, the change waits for the owner's or the project lead's OK, and Contributors suggest changes for approval. If nobody owns it any more, any Maintainer can change it. The requirement stays as it is while a change waits. A waiting change can be accepted or declined from the requirement itself, the same way as for a memory (see Memories).

A retracted requirement stays in its history but doesn't apply to new work. Turn on Superseded & retracted on the Requirements page to see earlier ones.

When work goes against a requirement

New tasks, decisions and requirements are checked against your project's requirements, and finished work is checked against the ones that apply before it counts as done. When work would break one, the question appears in Review, with the requirement and the work side by side.

The work then waits, even when the requirement is your own. Your agent can still build it on its own branch, but doesn't merge it into the tracking branch, and it can't reach Done, until one of these happens:

  • the work is fixed so the requirement holds. When the agent hands the fixed work back, DevSpec checks it again, and if the check passes the hold clears by itself, with nobody's OK needed;
  • the requirement is updated or retracted, by its owner or the project lead;
  • the finding is ruled a false alarm, because the work doesn't actually break the requirement;
  • its owner or the project lead lets this work go ahead. The requirement stays in force for everything else and is marked Needs update — partially overruled, so they can write the exception in, keep it as it is or retract it (see Deal with a memory marked partially overruled).

If your repository uses DevSpec's pull-request check, a broken requirement also holds the pull request. See Repositories and GitHub.

How Dev and your agents use requirements

You don't have to remind anyone of your requirements. As a conversation turns to something a requirement covers, Dev and your agents are shown it. When your agent takes a task, it's given every requirement that bears on the work, and it follows them.

When an agent checks finished work and sees it meet a requirement, it records that on the requirement. Open the requirement to see that evidence, version by version.