Playbook: Verify

This page is written for the agent. For a plain explanation, see the manual: The cycle of a feature.

Command: /nodfirst-verify (in Codex: $nodfirst-verify). Without commands, tell your agent: follow nodfirst/playbooks/verify.md.

Version: 0.6 (likelihood line and when-to-close hint new in 0.6; severity by impact, closing with open tasks and the re-run rule used once; used on two projects and a rerun: six runs on full features, one partial, one on a light fix; closing used four times)

Purpose: an independent check that the finished code does what the approved spec says, nothing more and nothing less, and respects the plan and the constitution (C14). It complements analyze, which checks the documents before the code exists.

Prompt: /nodfirst-verify (or mention nodfirst/playbooks/verify.md), in a new chat, ideally with another model or another agent than the one that implemented the feature. To close the feature afterwards: /nodfirst-verify close followed by the findings you accept, each with a reason (any chat).

Output: specs/NNN-feature-name/verification.md (the only file you may create or overwrite). Nothing else changes, except the lines named in “Closing the feature” when the human closes it.

Context to read (do not ask the human to attach it)

AGENTS.md, nodfirst/constitution.md, project/profile.md, the modules it lists (nodfirst/modules/), and for the active feature spec.md, design.md if any, plan.md, tasks.md, analysis.md (a light fix has only spec.md: read the specs it changes instead); then the code and tests the tasks name, and the rest of the code base as needed.

Preconditions

  • Light fix (Track: Light in the spec): there is no tasks.md. The change is the commit or commits of the fix (fix NNN done); verify against the light spec, the specs and plan decisions it changes, and that diff. This is not a partial verification.
  • Full track: all tasks of the feature are [x]. If not, say which are open and ask whether to verify what exists (a partial verification says so in its header).
  • Independence: if this chat also wrote code for the feature, say so and recommend a new chat; continue only if the human insists, and write it in the header.

Instructions for the agent

You are an inspector, not a builder. Follow nodfirst/constitution.md, especially C1, C3, C4, C5, C6 and C14. Do not trust the implement reports: check the code and run the commands yourself.

  1. Closing. If the human asks to close the feature (close …), skip the checks and go to “Closing the feature” below.
  2. Run the single quality command (profile, Section 5) from a fresh environment if the profile allows it, otherwise as is. Record the command, the result and the number of tests. If it cannot run (a missing tool, a secret, a device), say so and why: it goes to Needs a human (step 8), and it is never a pass.
  3. Requirement by requirement. For every active requirement and acceptance criterion of the spec, find the code that implements it and the test that proves it. Classify each:
    • met: implemented, and a test fails if the behaviour is removed (read the test; a test that cannot fail does not count);
    • partial: some cases or criteria missing;
    • missing: not implemented;
    • contradicts: implemented differently from the spec;
    • untested: implemented but no test in the code proves it. A check that could not be done from here (a real device, a store or CI console, the production site, a person with a keyboard or a screen reader) is not a finding about the code: write it under Needs a human, never as passed and never as a finding.
  4. Look for what nobody asked for (C1, C3): behaviour, screens, endpoints, settings, dependencies, licences or metadata that no spec, plan or task names. Each is a finding of kind unrequested.
  5. Plan and constitution: decisions of the plan respected (data model, interfaces, dependencies with their pinned versions); constitution rules C1-C14 and the exceptions in the profile.
  6. Security and privacy review (C6) of the feature’s code, using the spec’s “Security and privacy” section, the plan’s security table and the active modules’ checklists (for web: OWASP Top 10; for a backend: OWASP API Security Top 10). At least: input validation at the boundary, access checks on the trusted side for every protected operation, secrets in code or config, personal data in logs or messages, messages that echo input, dependencies with known high-severity vulnerabilities if an audit tool exists. For each security item, try three to five inputs meant to get through it (from the code and tests; run them where the project allows) and report each one that would. Write what you checked and what you could not check.
  7. Accessibility (C7, if there is a UI): what automated checks report, and what needs a person (keyboard and screen reader pass) — the latter goes to “Needs a human”.
  8. Severity of each finding, by what it means for the people who use the product:
    • Critical: a security or privacy hole; a constitution violation; required behaviour missing or contradicted; data lost or corrupted in normal use.
    • High: in normal use, a user is blocked, gets a wrong result, or is misled about the result (for example told something was saved when it was not); a requirement only partly met or not tested.
    • Medium: unrequested behaviour that changes no result or data (for example a wrong message next to a result the user can see is correct); a defect reachable only with unusual input or hand-edited data; a weak test; a gate weakened by a setting; stale text.
    • Low: cosmetic, naming, file layout. On a re-run, list every finding of the previous run as closed, still open or reclassified; a change of severity or kind needs a reason (new evidence, or the previous run misapplied this scale). Do not reclassify only to change the verdict.
  9. Write verification.md:
    • Header: feature, date, run number, who verified (model or agent, and “independent: yes/no”), quality command and result.
    • Summary (at most five lines) and the verdict, by these rules only:
      • not verified: at least one Critical or High finding;
      • partly verified: no Critical or High finding, and some items under Needs a human are still open;
      • verified: no Critical or High finding, and nothing under Needs a human is open.
    • Table: requirement / criterion → status → code → test.
    • Findings: ID, severity, kind, where, what is wrong, who could meet it in normal use and how likely (one line, everyday words), the smallest fix and where it belongs (a new task, a spec change request, a plan revision).
    • Needs a human: checks that could not be done from here, each as a checkbox line the human can follow (what to do, where, what counts as a pass). When the human reports a result, record it on the line (result, who, date, as given); a failed check becomes a finding of the next run.
    • On a re-run: the previous findings with their new state (step 7).
  10. Stop. Show the summary and the verdict. In the Guided profile, explain the verdict in everyday words. When only Medium and Low findings remain, say in one line that closing with them accepted is a reasonable choice, and that each further run tends to find rarer cases; the human decides. Do not fix anything: fixes become tasks appended to tasks.md by the tasks playbook (revision), or change requests, and then verify runs again; or the human closes the feature with the findings accepted (below).

Closing the feature (only when the human decides)

After the verification, the human decides; you never do (C2). Either fix (the findings become tasks or change requests, then verify runs again) or close. Even a verified feature is finished only when the human closes it. The human closes with /nodfirst-verify close … or in words (for example “close feature 001, accept F3 and F7”). Closing does not need a new chat: it records a decision and checks nothing. Then:

  1. Open tasks. If tasks of the feature are not done, list them and ask whether they become a follow-up, a later feature, or are dropped. Every Critical or High finding left, and every open item under Needs a human, is named by the human as accepted (or, for a Needs-a-human item, reported as done), each with a reason and a follow-up (a roadmap item, a later feature, or “none”). Ask for whatever is missing. Anything the human does not name stays open, and the feature is not closed. Before recording an accepted Critical or security finding, say in one sentence what it means for the people who use the product (Guided profile: in everyday words).
  2. Record the decision, changing nothing else:
    • verification.md: a final section Closure with closed by, date (as the human gives them), the verdict at closure (unchanged), and a table finding or check → reason → follow-up (for a feature with nothing left: “Nothing left open”);
    • project/behaviour.md: add, change or remove the lines of the requirements this feature or fix changed (one line each, ID first, under its area; withdrawn requirements disappear). With tasks still open (a partial verification), write only the requirements whose tasks are done, and say in the area heading what is still open;
    • project/profile.md, Section 0: Active feature: none, if it names this feature;
    • project/roadmap.md, if the feature has a line there (light fixes do not): at the end of the feature’s line, – closed <date> (verified) or – closed <date> (findings accepted: F…); each follow-up the human wants on the roadmap, as one line under Follow-ups (- <what> – from verification NNN); only a follow-up the human calls a feature gets a numbered line.
  3. Lessons. Propose up to three entries for project/lessons.md from this feature: findings the human accepted, corrections the human made along the way, rules that were vague. Write only those the human accepts.
  4. Git checkpoints: commit those files with the message feature NNN closed.

The verdict is never changed to make a closure possible: a feature closed with accepted findings stays partly verified or not verified, and says so.

Do not

  • Edit any file other than verification.md (and, at closure, the lines named above), fix code, mark tasks, or approve or close anything on your own.
  • Count a check that did not run as passed.

Back to top

NodFirst is released under the MIT licence. These pages are generated from the files in the repository.

This site uses Just the Docs, a documentation theme for Jekyll.