← Code review and governance guides

How to review changes to Must not and Forbids

How-To Code review and governance Advanced 1141007HOWTO-1141007

HOWTO-1141007Code review and governanceAdvanced

This guide shows you how to review changes to Must not and Forbids in SpecDD specs for a spec-driven development workflow.

These sections are high leverage. They do not just describe current code. They shape what future humans and agents are allowed to do, which dependencies they may introduce, and which boundaries must stay protected.

Short answer

Review Must not and Forbids changes as governance changes. Ask what boundary is being added, removed, narrowed, or weakened; whether parent constraints still apply; what behavior or dependency risk changes; whether the rationale is clear; and what verification proves the new rule is safe.

When to use this guide

Use this guide when a pull request:

Background

Must not lists forbidden behavior, non-goals, and architectural boundaries.

Forbids lists forbidden dependencies, paths, modules, libraries, tools, or access.

In SpecDD conflict handling, Must not and Forbids are stronger than Must, Depends on, or Tasks. That means a task cannot justify violating them. Changing these rules changes what future work may do.

Steps

1. Classify the boundary change

First decide what kind of change it is.

Adding a boundary:

Must not:
  Write browser storage directly from itinerary behavior.

Narrowing a boundary:

Must not:
  Write browser storage directly from itinerary UI components.

Weakening or removing a boundary:

-  Write browser storage directly from itinerary behavior.

Adding a forbidden dependency:

Forbids:
  ../booking/*

Removing a forbidden dependency:

-  ../booking/*

Removals and weakenings usually deserve the strongest review.

2. Review why the rule is changing

Require a concrete reason:

Weak reasons:

If the rationale is missing, request it before approving.

3. Check inherited constraints

A child spec cannot silently loosen a parent Must not or use a parent-forbidden dependency.

Before approving, ask:

If the parent still forbids the behavior, changing the child spec does not make the behavior allowed.

4. Evaluate behavior and dependency risk

For Must not, ask:

For Forbids, ask:

5. Require evidence and alternatives

For low-risk additions, review may be simple. Adding a specific Must not to protect a known local boundary is usually straightforward.

For removals or weakenings, require evidence:

If the safer option is to narrow the rule, request narrowing instead of removal.

6. Approve, narrow, or reject

Approve when the new rule is clear, locally owned, consistent with parent constraints, and backed by appropriate evidence.

Request narrowing when the old rule is too broad but the pull request removes too much protection.

Reject when the change:

Review checklist

Ask:

Common mistakes

How to verify the result

The review succeeded when:

← Code review and governance guides