Current Version: 2.4 Design: design/document-patch-control.design.md v2.4 Session: dd0bf4af-a66b-4b07-bb9d-a90a0e57b54e Full history: changelog/document-patch-control.changelog.md
Core Principle: Patch documents are governed patch/review artifacts outside the live /phase workspace, and a patch means a self-identifying before/after change artifact that shows the exact intended modification surface clearly enough for review.
Patch docs remain the canonical place for governed patch artifacts. Changelog remains the version authority, and TODO remains execution-only tracking.
A patch is a governed change artifact whose job is to show what will change before or during reviewable execution.
A valid patch must make it easy for a reviewer to answer:
- what artifact changes
- where it changes
- what exists now
- what it should become after the change
- whether the change is additive, replacement, deletion, or restructuring
A patch is not:
- a retrospective summary of what already happened
- a phase summary or rollout dashboard
- a prose-only recap with no explicit change surface
- a generic plan that leaves the reviewer guessing the actual before/after delta
Governed patch files must use a self-identifying <context>.patch.md filename and may live in one of these places:
- shared patch directory:
patch/<context>.patch.md - repository root:
<context>.patch.md
Additional rules:
patch/is the default shared patch directory for this repository- root-level placement is allowed when the patch should live directly at repository top level
- generic
patch.mdis not allowed - do not use version suffixes in patch filenames
Live phased execution planning does not belong in /patch or in root-level *.patch.md files.
The dedicated live phase-plan workspace is:
phase/
SUMMARY.md
phase-001-<phase-name>.md
phase-001-01-<subphase-name>.md
- The canonical reusable phase-planning helper for this repository is
phase-implementation-template.mdat the RULES root - Root-level placement improves discoverability but does not make the helper authoritative
Each patch document must include:
Current VersionSessionStatusTarget DesignFull historylink
Each patch changelog must include:
Parent DocumentCurrent VersionSession
Every governed patch document must include, at minimum:
- Context
- Analysis
- Change items
- Verification
- Rollback approach
Optional implementation order is allowed when sequencing matters, but it does not replace the required change items.
For each concrete change item, the patch must show:
- target artifact or stable target location
- change type (
additive,replacement,deletion, orrestructuring) - current/before state
- target/after state
- enough comparison detail for a reviewer to understand the exact change surface
Use one or more of these forms when applicable:
- before/after snippets
- current/target comparison tables
- unified diff style blocks
- patch hunk sections with explicit target file/path and anchors
- clearly scoped command/config replacement blocks
The rule is semantic rather than tied to one markdown layout. The comparison must be concrete enough for review.
For each concrete change item, the patch should identify a stable target location.
Acceptable locators include:
- file path
- section heading or anchor
- function/class/query name
- config key path
- route/endpoint name
- command block label
- schema object/table/column reference
If exact line numbers are unstable or not yet known, use the most precise stable locator available.
Not every patch is a code diff. When a patch is conceptual, governance-only, or architecture-only, it may omit code snippets only if it says so explicitly and still provides structured before/after comparison.
In that case the patch must say clearly that:
- it is a non-code patch or non-snippet patch
- the change surface is conceptual / governance / structural
- concrete runtime edits are intentionally out of scope for that patch
A patch should be specific enough that a reviewer can answer:
- what artifact changes
- where it changes
- what the current state is
- what the proposed state is
- how the before/after comparison maps to the intended modification
If those questions cannot be answered from the patch, the patch is under-specified.
When patch documents are used, they remain governed patch/review artifacts.
They remain appropriate for:
- tactical change artifacts
- governed review artifacts
- patch-specific transition analysis
- reviewable current→target documentation that is outside the live phase workspace
They are not appropriate for:
- retrospective summary documents
- general progress recaps
- the active phase summary/index
- live per-phase execution files
The live phased execution workspace is /phase.
It contains:
phase/SUMMARY.mdas the governed summary/indexphase/phase-001-*.mdand peers as child phase-detail files
The following are not allowed:
- using
/patchas the live phase-plan namespace - storing the active phase summary/index in a patch file instead of
phase/SUMMARY.md - storing live per-phase execution files in patch artifacts
If phased execution exists, it should follow phase-implementation.md for:
- when phase planning should be used versus not used
- the required
/phasestructure - stable phase fields
- design references per phase
- optional patch-input synthesis inside the live phase plan when patch-derived work matters
- status and action-point expectations
- TODO coordination and changelog coordination
- cross-phase handoffs
- verification and rollback boundaries
phase-implementation.md may synthesize governed patch inputs into live phased execution planning when relevant.
This does not create a reverse-link requirement:
- patch documents may remain complete patch artifacts without pointing back to phase
- design documents may remain target-state artifacts without pointing back to phase
- patch usage inside phase does not move live execution planning into patch artifacts
document-patch-control.md owns patch governance and metadata.
It also owns:
- the definition of patch as a before/after change artifact
- the patch filename and location rules
- the requirement that governed patch docs represent intended change surfaces concretely enough for review
- the boundary that keeps live phased execution out of patch artifacts
It does not own the full semantic definition of phase planning.
- Active patch metadata must use real session IDs
- Placeholder markers are not allowed in active metadata
LEGACY-*is allowed only for historical records when original session data is unavailable
- Patch
Current Versionmust align with patch changelogCurrent Version Target Designreference must resolve to an existing design document/version- Patch metadata synchronization follows governance order with final patch sync when affected
The document-patch-control checklist validates governed patch quality only.
Validate here:
- patch identity and metadata
- target-design and history-link integrity
- patch structure and reviewability
- patch change-representation quality
- synchronization behavior
- patch-versus-phase namespace separation
Do not validate here:
- phase necessity
- phase sequencing quality
- per-phase design-traceability and execution quality
- per-phase execution-step quality
SUMMARY.mdcontent quality
Those belong to phase-implementation.md when phases are used.
Use this checklist to validate the patch as a governed artifact.
- Patch path uses an allowed location model (
patch/<context>.patch.mdor root<context>.patch.md) - Patch filename is self-identifying and uses
<context>.patch.md - Patch metadata fields are complete
- Session metadata is real (no placeholders)
-
Target Designreference resolves correctly -
Full historylinks resolve correctly
- Patch version aligns with patch changelog version when applicable
- Patch remains identifiable as a governed patch artifact
-
phase-implementation.mdis referenced for phase semantics when applicable - Root-level
phase-implementation-template.mdremains non-governed - The patch does not act like TODO authority or changelog authority
- The patch does not masquerade as the live
/phasesummary/index or per-phase detail layer
- Patch includes context, analysis, change items, verification, and rollback approach
- A reviewer can identify what is changing and why this patch exists
- A reviewer can identify the intended target design or target state
- The patch remains readable as a governed change/review artifact because live phase detail is kept outside patch artifacts
- Patch identifies the target artifact or stable target location for each concrete change item
- Patch shows before/current state and after/target state in a comparison-friendly form for each structured change item
- Patch makes clear whether each change is additive, replacement, deletion, or restructuring
- If exact code/snippet comparison is intentionally not present, the patch explicitly declares itself non-code/conceptual and still provides structured before/after comparison
- A reviewer can understand how the change would be applied without having to guess the change surface
- Governance update order remains consistent when the patch participates in synchronized work
- Related design, runtime, changelog, TODO, and
/phasereferences are not obviously stale - Patch history references remain valid after synchronization
- The patch remains self-identifying outside its directory context
| Metric | Target |
|---|---|
| Patch metadata completeness | 100% |
| Patch placement clarity | 100% |
| Active placeholder session markers | 0 |
| Patch ↔ changelog version alignment | 100% |
| Patch ↔ target design reference validity | 100% |
| Patch-role clarity | 100% |
| Patch change-representation clarity | 100% |
| Patch target-location clarity | 100% |
| Patch-versus-phase namespace separation clarity | 100% |
| Patch-governance checklist boundary clarity vs phase-implementation | 100% |
| Live phased execution files under patch artifacts | 0 |
| Broken patch history links | 0 |
| Document | Relationship |
|---|---|
| document-changelog-control.md v4.7 | Version authority and metadata contract |
| project-documentation-standards.md v2.8 | Project-level document governance and role boundary model |
| phase-implementation.md v2.5 | Semantic authority for phased execution planning |
| todo-standards.md v2.2 | Execution tracking alignment |
| phase-implementation-template.md | Non-governed root helper for authoring |
Full history: changelog/document-patch-control.changelog.md