Validation Rules
Purpose: Process Guard validation rules and FSM reference Detail Level: Overview with links to details
Overview
Section titled “Overview”Process Guard validates delivery workflow changes at commit time using a Decider pattern. It enforces the 4-state FSM defined in PDR-005 and prevents common workflow violations.
6 validation rules | 4 FSM states | 3 protection levels
Validation Rules
Section titled “Validation Rules”Rules are checked in order. Errors block commit; warnings are informational.
| Rule ID | Severity | Description |
|---|---|---|
completed-protection | error | Completed specs require unlock-reason tag to modify |
invalid-status-transition | error | Status transitions must follow FSM path |
scope-creep | error | Active specs cannot add new deliverables |
session-scope | warning | File outside session scope |
session-excluded | error | File explicitly excluded from session |
deliverable-removed | warning | Deliverable was removed from spec |
Full error catalog with fix instructions
FSM State Diagram
Section titled “FSM State Diagram”Valid transitions per PDR-005 MVP Workflow:
stateDiagram-v2
[*] --> roadmap: new pattern
roadmap --> active
roadmap --> deferred
active --> completed
active --> roadmap: blocked/regressed
deferred --> roadmap
completed --> [*]: terminal
Valid Transitions:
roadmap->active->completed(normal flow)active->roadmap(blocked/regressed)roadmap<->deferred(parking)
Protection Levels
Section titled “Protection Levels”Protection levels determine what modifications are allowed per status.
| Status | Protection | Can Add Deliverables | Needs Unlock |
|---|---|---|---|
roadmap | none | Yes | No |
active | scope | No | No |
completed | hard | No | Yes |
deferred | none | Yes | No |
CLI Usage
Section titled “CLI Usage”# Pre-commit (default mode)lint-process --staged
# CI pipeline with strict modelint-process --all --strict
# Override session scope checkinglint-process --staged --ignore-session
# Debug: show derived process statelint-process --staged --show-stateOptions
Section titled “Options”| Flag | Description |
|---|---|
--staged | Validate staged files only (pre-commit) |
--all | Validate all tracked files (CI) |
--strict | Treat warnings as errors (exit 1) |
--ignore-session | Skip session scope validation |
--show-state | Debug: show derived process state |
--format json | Machine-readable JSON output |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | No errors (warnings allowed unless --strict) |
1 | Errors found or warnings with --strict |
Escape Hatches
Section titled “Escape Hatches”Override mechanisms for exceptional situations.
| Situation | Solution | Example |
|---|---|---|
| Fix bug in completed spec | Add unlock reason tag | @libar-docs-unlock-reason:'Fix-typo' |
| Modify outside session scope | Use ignore flag | lint-process --staged --ignore-session |
| CI treats warnings as errors | Use strict flag | lint-process --all --strict |