Playbook: Fix (light track)
This page is written for the agent. For a plain explanation, see the manual: Small fixes light track.
Command: /nodfirst-fix (in Codex: $nodfirst-fix). Without commands, tell your agent: follow nodfirst/playbooks/fix.md.
Version: 0.5 (used on one project, one security-relevant fix; behaviour.md update new in 0.3; five-line report new in 0.4; class-of-input fixes new in 0.5)
Purpose: a bug fix, or a small change to one behaviour, without the full cycle (constitution, Section 1, light track).
Prompt: /nodfirst-fix (or mention nodfirst/playbooks/fix.md) and, below it, what is wrong or what should change, in your own words.
Output: specs/NNN-short-name/spec.md with Track: Light, a test, the change, and the records updated.
Context to read (do not ask the human to attach it)
AGENTS.md, nodfirst/constitution.md, project/profile.md, the modules it lists, the specs that describe the behaviour involved, and the code concerned.
Instructions for the agent
Follow nodfirst/constitution.md, especially C1, C2, C5 and C11.
- Resume. If the human names an existing light spec that is already
Approved(for example in a new chat), go straight to step 5. - Check that it is light. It is light only if it changes one behaviour and touches no data model, public contract (API, file format, message others rely on), authentication, permissions or personal data. If any of these is touched, or you are unsure, say so and recommend the full track (
/nodfirst-specify). Stop unless the human confirms. - Find the source of truth. Name the spec and the requirement or criterion that describe the behaviour today (
001-R5), or say that no spec describes it.- A bug is code that does not do what the spec says: the spec stays as it is.
- A change is a new or different behaviour: the spec that describes it must change too (C11).
- Write the light spec
specs/NNN-short-name/spec.md(next free number; set it asActive featurein the profile, Section 0) with only: goal (two sentences), the requirement(s) and criteria changed or added, “Impact on existing specs” with the IDs involved, the test that will prove it, andTrack: Light. For a change, list the edits to the existing spec (as Mode B ofspecifywould: IDs stable, withdrawn items kept). - Stop for approval (C2). In the Solo profile the human may approve this spec and ask you to implement in the same session (“approved, go ahead”); the implementation report is still accepted separately.
- After approval:
- Apply the edits to the existing spec, if any, and record the approval.
- Test first: write the test that reproduces the bug or describes the change; run it and show it fails for the right reason (C5).
- Make the smallest change that passes; run the single quality command (profile, Section 5).
- A fix of a check on input covers the class of inputs, not only the reported example, and its test names the class.
- Report as
implementdoes: at most five lines in the conversation (what works now, gates with the number of tests, what the human must do, deviations and interpretations); Before, tests added, files and each gate in the commit message, and on request.
- Short verification: re-read the criteria of the light spec against the code and the test, and list any other behaviour the change could affect, with the tests that cover it. Say whether the fix is security-relevant (it touches input validation, access checks, secrets, request metadata, logging of personal data, or an accepted security finding).
- Stop. When the human accepts the report:
- Not security-relevant: the fix is finished. For a change (not a bug), update its lines in
project/behaviour.md. SetActive feature: none(profile, Section 0) and, with git checkpoints, commit (fix NNN done). - Security-relevant: with git checkpoints, commit (
fix NNN done), keep the fix as the active feature, and recommend/nodfirst-verifyin a new chat. The fix is finished when the human closes it (/nodfirst-verify close). Light fixes have no line inproject/roadmap.md; do not add one.
- Not security-relevant: the fix is finished. For a change (not a bug), update its lines in
Do not
- Use the light track to avoid an approval, a test, or a spec update.
- Change anything outside the behaviour named in the light spec.