Sub topic 17
Common pitfalls and how to avoid them
This chapter assumes you have read the earlier chapters on spec structure, rules, edge cases, acceptance criteria, tuning data, prioritization, review, and change management. It collects the mistakes that show up most often when those pieces are applied badly. For each one it covers how to recognize it, why it hurts, and what to do instead.
Why pitfalls cluster
Most spec failures come from one of three causes. The writer assumed the reader shared their context. The writer mixed up kinds of information, such as rules, numbers, and opinions. Or the spec drifted away from the build after sign-off. The diagram below maps the pitfalls in this chapter to those causes.
Pitfalls from hidden assumptions
Vague rules
Words such as "quickly", "nearby", "some", and "appropriate" feel clear to the author. Each reader fills them in differently, so engineering and QA end up with different readings.
A vague rule:
The enemy notices the player when the player is close and makes noise.A rewritten rule:
1. An enemy in the Idle state changes to Alerted when the player is within
detection_radius (see enemy_tuning.yaml) and the player's noise level
is at least Walk.
2. Crouching sets the player's noise level to Silent.The rewrite names a state, a trigger, and a tuning reference. A reviewer can disagree with it, and that is the point: a precise rule can be argued about, and a vague one can't.
Missing edge cases
The happy path is easy to write. Bugs live where two systems meet. Before sign-off, walk each rule through a short checklist:
- What if the feature starts while another feature is active (dash during a stun, for example)?
- What if the player dies, pauses, or changes scene mid-action?
- What if input arrives on the same frame as another input?
- What if the target is destroyed or leaves the map while the action is in flight?
- What happens at zero, at the maximum, and one past the maximum?
- What happens in co-op, on save and load, or on a different input device?
You do not need an answer to every question. An unanswered question belongs in Open questions with an owner, not in someone's head.
No design intent
A spec with rules but no intent forces engineers to guess when a case is not covered. Intent gives them a tiebreaker. If the dash exists to make movement feel responsive, then an engineer who must choose between a 3-frame input delay and a 10-frame one knows which to pick. State the experience in one or two sentences and say how you will judge it, such as a playtest question or a telemetry measure.
Pitfalls from mixed information
Numbers buried in rules
If the rule text says "the dash lasts 0.2 seconds", every balance change becomes a spec edit, a review, and a version bump. Put the number in a tuning file and reference it by name.
# dash_tuning.yaml
dash:
duration: 0.2 # seconds
cooldown: 0.8 # seconds3. The player cannot dash while dash.cooldown has not elapsed.The exception is a number that is part of the design promise, such as "exactly one air dash per jump". If changing it would change what the feature is, keep it in the rules.
Prescribing implementation
Specs that say "use a state machine with a coroutine" or "store this in a singleton" take decisions away from the people best placed to make them. Describe observable behavior and constraints. Leave the technique to engineering. If a technical approach really is required, put it under Dependencies and constraints and give the reason.
| Spec says | Problem | Better |
|---|---|---|
| "Use raycasts to detect walls." | Dictates a technique | "Dashing into a wall ends the dash immediately." |
| "Add a bool `isDashing`." | Dictates data layout | "The player has a Dashing state that blocks Attack." |
| "Make it feel good." | Not checkable | "Dash starts within 3 frames of the button press." |
Untestable acceptance criteria
A criterion such as "the dash feels responsive" cannot pass or fail. QA will either guess or skip it. Split feelings into two parts. Put the measurable proxy in acceptance criteria and the subjective judgment in a playtest plan tied to the design intent.
Scenario: Dash responds to input quickly
Given the player is on the ground and the dash is not on cooldown
When the player presses Dash
Then the dash starts within 3 framesEach scenario should describe one observable behavior. If a "Then" step needs the word "and" more than once, the scenario probably holds several behaviors and should be split.
Everything is a must
When every item is marked must-have, the labels carry no information, and the first schedule slip forces an unplanned cut made under pressure. Apply the must, should, and could split honestly. A useful test: if this item were cut, would the design intent still be met? If yes, it is not a must.
Pitfalls from drift after sign-off
The stale spec
Once the build and the document disagree, people stop trusting the document, and a spec nobody trusts is worse than none. Common causes are fixes made in chat and never written back, and bugs resolved by "that's how it works now".
Practical habits:
- Make the spec the first place a rule changes, then the code. If the team must change code first (a hotfix), update the spec in the same work item.
- Keep a change log with date, author, reason, and affected sections.
- Link the spec from the tasks and test cases built from it, so a change shows who is affected.
Silent scope growth
Small additions ("while we're here, let's also let the dash break crates") accumulate. Each one is cheap alone, but together they change the schedule and the test surface. After sign-off, route every addition through the same path: write the change, name its cost, and get the original reviewers to accept it. Park ideas that miss the cut in the Out of scope list so they are visible, not lost.
Open questions with no owner
An open question without an owner and a due date is a risk that nobody tracks. Write each one as a question, an owner, and a decision date. Review the list at every spec check-in. A question that is still open when the dependent work starts should block that work or carry a stated default.
Process pitfalls
- Writing alone. A spec written without engineering, art, and QA input misses constraints. Draft with a quick conversation first, then write.
- Review as a formality. If reviewers only skim, sign-off means nothing. Give each reviewer a specific question: engineering checks feasibility, QA checks testability, animation checks asset needs.
- Too much spec. A forty-page document for a small feature will not be read. Match depth to risk. A low-risk tweak may need only intent, rules, and acceptance criteria.
- Copy-pasting the template. Empty sections filled with "N/A" or placeholder text hide real gaps. Delete sections that truly do not apply, and say why in one line if the omission could surprise someone.
A quick self-audit
Run these questions on a draft:
- Does the first screen state the intent and how success is judged?
- Does every rule use a defined term, a trigger, and a result?
- Are all numbers in the tuning file, except promise-level ones?
- Can QA write a pass or fail check for each acceptance criterion?
- Does every open question have an owner and a date?
- Is it clear what is out of scope?
- Would a change to this spec be recorded and visible to the people it affects?
Exercise
A spec rule reads "The shield blocks most damage for a short time after activation, and breaks if the player is hit too many times." Name three problems with it and rewrite it so it can be tested.
Show answer
Problems: "most damage", "a short time", and "too many times" are vague quantities. The numbers also belong in a tuning file, not in rule text. The rule does not say which states or damage types apply. A rewrite: "1. When Shield is activated, the player enters the Shielded state for shield.duration. 2. While Shielded, incoming damage is reduced by shield.damagereduction. 3. Each hit received while Shielded reduces shield.charges by 1. 4. When shield.charges reaches 0, the player leaves the Shielded state immediately." The values go in shieldtuning.yaml. A matching acceptance scenario: Given the player is Shielded with 1 charge, When the player takes a hit, Then the player is no longer Shielded.
Exercise
Your team lead asks to add a new "dash breaks crates" behavior two days after sign-off. Describe how you handle it without falling into the silent scope growth or stale spec pitfalls.
Show answer
Write the proposed change into the spec as a marked revision, including the rule, its edge cases (for example, what happens to items inside the crate), and new acceptance criteria. State the cost to engineering, art, audio, and QA. Ask the original reviewers to approve or defer it. If approved, record it in the change log with date, author, and reason, and update the linked tasks and test cases. If deferred, list it under Out of scope so it stays visible.