Skip to content

A decision is a Design record issue, and docs/adr is frozen by a path rule in uphold's own policy - #286

Merged
HackingGate merged 1 commit into
mainfrom
design-records-and-adr-freeze
Sep 30, 2026
Merged

HackingGate merged 1 commit into
mainfrom
design-records-and-adr-freeze

Conversation

@HackingGate

@HackingGate HackingGate commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Builds the parts of #285 that belong in the tree. A decision is a Design record issue; docs/adr is frozen at the records that exist, by a rule in uphold's own policy.

What changed, against the issue's Done-when

  • Freeze docs/adr -- built; the ruling on ADR 0012 is not made here. adr-freeze in policy/principles.toml:

    [rule.adr-freeze]
    message = """
    file a Design record issue (label design) instead; docs/adr is frozen history.
    The records already under docs/adr stay and are cited as they are; a decision
    not yet ruled goes to the issue tracker, and the repository receives what runs.
    """
    path_regexp = '^docs/adr/'
    files.include = ["docs/adr"]
    files.exclude = [
        "/docs/adr/0001-a-config-surface-a-stranger-can-read-in-one-minute.md",
        # ... one exact path per existing record, through 0012
    ]

    Claimed in policy/upheld.toml for single-authoritative-source. Proof: uphold scan on this tree prints policy checks passed (exit 0); with a scratch docs/adr/0013-x.md staged (never committed, removed afterwards) it prints policy check failed: adr-freeze, the message, and docs/adr/0013-x.md, exit 1. ADR 0012 stays at Proposed until the owner rules it, and CONTRIBUTING.md says so.

  • Template, and where a decision goes -- built. .github/ISSUE_TEMPLATE/design.md has the seven headings (Goal, Today, Decision, Design, Plan, Done when, Open), title Design: , labels design, ruling:pending, and prompts as HTML comments. config.yml keeps blank issues enabled. CONTRIBUTING.md gains "Where a decision goes": the issue comes before the pull request, research goes in a comment, the ruling is a label, REFERENCE.md stays the normative current-state document, and the existing ADRs stay as history. No sentence in CONTRIBUTING.md or README.md told a contributor to write an ADR, so none needed changing.

  • Status vocabulary -- built as labels on this repository: design, ruling:pending, ruling:accepted, ruling:rejected, ruling:deferred. The age check is left Open (below).

  • ROADMAP without issue numbers -- built. The one numbered citation and the two "the issue" references are prose naming the evidence-layer design, and the top of the page says live state is the tracker's milestones and labels. What is planned or not planned is unchanged; no milestones were created.

  • Wheel named -- GitHub issue templates and labels, and path_regexp from uphold's own engine for the freeze. No new tool.

  • REVIEW.md and AGENTS.md are regenerated with --review --emit; the only change is adr-freeze in the list of active rules.

Engine gap, noted rather than built

path_regexp expresses the freeze, with two limits that could be a later Design record:

  • The scan reads git ls-files, so the rule fires on a staged or tracked file, not on an untracked one in the working tree. That is the commit seam, which is where the freeze needs to hold.
  • The rule's goal state is selecting nothing, so files.min_selected cannot guard it: a renamed docs/adr directory reads clean. The Rust regex engine has no lookahead, which is why the existing records are excluded by path rather than by pattern. A rule kind such as "only these paths may exist under this root" would carry both.

Open, not built

  • "Open without a ruling for N days." uphold has no gate that reads the issue tracker. Options: a scheduled GitHub Actions workflow that lists issues with label:design label:ruling:pending created more than N days ago and fails the run when any exist (needs only issues: read); or none, leaving the age visible in the label's issue list. Not chosen here.
  • Watch: per-rule must-fire fixtures. A declaration beside a rule naming the input it must refuse, modelled on ast-grep test and conftest verify.
  • Watch: ast-grep as a backend for code-shaped rules, whose root-anchored glob semantics match uphold's.
  • Ruling ADR 0012, which the owner does.

https://claude.ai/code/session_01DzvkN2qyaQDc3h7vqY2zLL

Summary by CodeRabbit

  • New Features
    • Added a Design issue template with prompts for recording goals, decisions, plans, and open questions. Blank issue submissions are also enabled.
  • Documentation
    • Clarified how to record and track decisions in Design issues, including ruling labels and where to keep research evidence.
    • Updated the roadmap to explain where scheduled and in-progress work is tracked.
  • Policy
    • New ADR files are now blocked; existing ADRs remain unchanged.

… rule in uphold's own policy

.github/ISSUE_TEMPLATE/design.md files a Design record: seven headings
(Goal, Today, Decision, Design, Plan, Done when, Open), title "Design: ",
labels design and ruling:pending, with the research as a comment carrying
version, date and evidence per claim, rejected options one clause each, the
diagram as a fenced mermaid block, a plan of one pull request per item that
names the library or engine feature it stands on, and a Done-when that names
the test or rule holding the decision. config.yml keeps blank issues enabled.

adr-freeze is a path_regexp rule over docs/adr with the existing records
excluded by exact path, so a new file staged there fails uphold scan at
pre-commit with the remedy in its message. It is claimed in upheld.toml for
single-authoritative-source. CONTRIBUTING.md says where a decision goes;
ROADMAP.md cites no issue by number and points at the tracker's milestones
and labels for live state. REVIEW.md and AGENTS.md are regenerated with
--review --emit, which lists adr-freeze among the active rules.

Claude-Session: https://claude.ai/code/session_01DzvkN2qyaQDc3h7vqY2zLL
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7569f685-65ea-44dd-8879-fd960736a1d9

📥 Commits

Reviewing files that changed from the base of the PR and between 73dd288 and a413364.

📒 Files selected for processing (8)
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/design.md
  • AGENTS.md
  • CONTRIBUTING.md
  • REVIEW.md
  • ROADMAP.md
  • policy/principles.toml
  • policy/upheld.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes add a Design issue template and guidance for recording decisions. They also add the adr-freeze policy rule, connect it to an enforcement claim, list it in review guidance, and update roadmap descriptions.

Changes

Design records and ADR freeze

Layer / File(s) Summary
Design issue workflow
.github/ISSUE_TEMPLATE/config.yml, .github/ISSUE_TEMPLATE/design.md, CONTRIBUTING.md
The issue configuration enables blank submissions. The new template defines seven sections and ruling metadata. Contribution guidance describes where to record decisions, rulings, and supporting evidence.
ADR freeze enforcement
policy/principles.toml, policy/upheld.toml, AGENTS.md, REVIEW.md
The adr-freeze rule selects new paths under docs/adr/ and excludes 12 existing ADR paths. An enforcement claim links the rule to single-authoritative-source, and review guidance lists the rule.
Roadmap references
ROADMAP.md
The roadmap identifies the issue tracker as the source for live work status and attributes evidence-layer details to the evidence-layer design rather than an issue number.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to a4133

The Design workflow and ADR freeze are ready to merge; no actionable issue affecting decision records or repository policy remains.

Architecture Summary

Architecture risk: 🔵 Low · up to a4133

The change affects 5 systems.

Changed systems: policy, AGENTS.md, CONTRIBUTING.md, REVIEW.md, ROADMAP.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — policy (service) was modified; 2 changed files map to changed impact.
  • observed — AGENTS.md (service) was modified; 1 changed file maps to changed impact.
  • observed — CONTRIBUTING.md (service) was modified; 1 changed file maps to changed impact.
  • observed — REVIEW.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in AGENTS.md: Added adr-freeze to the list of active static rules.
  • observed — Modified behavior in CONTRIBUTING.md: Adds guidance for recording decisions in Design record issues and keeping decision metadata out of tracked files. It specifies the single-label ruling states, retains existing ADRs as history, and states that adr-freeze rejects other files under docs/adr/; ADR 0012 remains Proposed pending the owner’s ruling.
  • observed — Modified behavior in REVIEW.md: Added adr-freeze to the list of active static rules.
  • observed — Modified behavior in ROADMAP.md: Adds an introduction describing the roadmap’s scope and identifying the issue tracker as the source for live work status; states that the page cites no issue by number.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: recording decisions in Design issues and freezing new files under docs/adr. It is specific and related to the changeset, although longer than idea…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.96%. Comparing base (73dd288) to head (a413364).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   93.96%   93.96%           
=======================================
  Files          46       46           
  Lines       20069    20069           
=======================================
  Hits        18857    18857           
  Misses       1212     1212           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HackingGate
HackingGate merged commit 77cae6b into main Sep 30, 2026
12 checks passed
@HackingGate
HackingGate deleted the design-records-and-adr-freeze branch September 30, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants