-
Notifications
You must be signed in to change notification settings - Fork 103
Add lightweight ADR process with Undecided state and CI linting #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ba7f158
Add lightweight ADR process with Undecided state and CI linting
ef645ab
Add GitHub Actions workflow for ADR linting
721a75d
Add YAML frontmatter to ADRs with relates_to for problem docs
176d255
Address PR review feedback
54c143a
Drop old lint workflow
ralphbean 171eb5e
Add GitHub Actions workflow for ADR linting
15f9cbf
ci: add Python toolchain with uv, ruff, ty, and security scanning
waynesun09 de0a9f2
style: apply ruff lint and format fixes to existing code
waynesun09 22f20fb
fix: apply ruff lint fixes to hack/lint-adr-frontmatter
waynesun09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| merge_group: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6.0.2 | ||
|
|
||
| - uses: actions/setup-python@v6.2.0 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7.6.0 | ||
|
|
||
| - name: Install pre-commit | ||
| run: uv pip install --system pre-commit | ||
|
|
||
| - name: Run pre-commit (skip ty) | ||
| run: SKIP=ty pre-commit run --all-files | ||
|
|
||
| - name: Run ty check | ||
| run: uvx ty check hack/ | ||
|
|
||
| - name: Run ADR linting | ||
| run: make lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| .worktrees/ | ||
| __pycache__/ | ||
| *.pyc | ||
| .venv/ | ||
| .ruff_cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-yaml | ||
| args: ['--unsafe'] | ||
| - id: end-of-file-fixer | ||
| - id: trailing-whitespace | ||
| - id: detect-private-key | ||
| - id: check-added-large-files | ||
| args: ['--maxkb=1000'] | ||
| - id: check-merge-conflict | ||
| - id: check-json | ||
| - id: check-toml | ||
| - id: mixed-line-ending | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.7 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix] | ||
| - id: ruff-format | ||
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: ty | ||
| name: ty check | ||
| entry: uvx ty check | ||
| language: system | ||
| types: [python] | ||
| pass_filenames: false | ||
|
|
||
| - repo: https://github.com/PyCQA/bandit | ||
| rev: "1.9.4" | ||
| hooks: | ||
| - id: bandit | ||
| args: ['-r', 'hack/', 'experiments/', '--skip', 'B101,B404,B603'] | ||
| pass_filenames: false | ||
|
|
||
| - repo: https://github.com/zricethezav/gitleaks | ||
| rev: v8.30.0 | ||
| hooks: | ||
| - id: gitleaks | ||
|
|
||
| - repo: https://github.com/rhysd/actionlint | ||
| rev: v1.7.11 | ||
| hooks: | ||
| - id: actionlint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| .DEFAULT_GOAL := help | ||
| .PHONY: help lint check fmt lint-adr-status lint-adr-numbers lint-adr-frontmatter | ||
|
|
||
| help: | ||
| @echo "Available targets:" | ||
| @echo " help - Show this help message" | ||
| @echo " lint - Run all linting and validation" | ||
| @echo " check - Run ruff and ty checks on Python" | ||
| @echo " fmt - Format Python code with ruff" | ||
| @echo " lint-adr-status - Validate ADR statuses in all ADR files" | ||
| @echo " lint-adr-numbers - Check for duplicate ADR numeric identifiers" | ||
| @echo " lint-adr-frontmatter - Validate ADR frontmatter and cross-references" | ||
|
|
||
| lint: check lint-adr-status lint-adr-numbers lint-adr-frontmatter | ||
|
|
||
| check: | ||
| uvx ruff check . | ||
| uvx ty check hack/ | ||
|
|
||
| fmt: | ||
| uvx ruff format . | ||
|
|
||
| lint-adr-status: | ||
| @./hack/lint-adr-status | ||
|
|
||
| lint-adr-numbers: | ||
| @./hack/lint-adr-numbers | ||
|
|
||
| lint-adr-frontmatter: | ||
| @uv run --script ./hack/lint-adr-frontmatter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| title: "NUMBER. TITLE" | ||
| status: Proposed # Valid values: Proposed, Undecided, Accepted, Deprecated, Superseded | ||
| relates_to: | ||
| - problem-doc-name # filename without .md from docs/problems/ | ||
| topics: | ||
| - topic-tag | ||
| --- | ||
|
|
||
| # NUMBER. TITLE | ||
|
|
||
| Date: YYYY-MM-DD | ||
|
|
||
| ## Status | ||
|
|
||
| {Proposed | Undecided | Accepted | Deprecated | Superseded} | ||
|
|
||
| ## Context | ||
|
|
||
| What is the issue that we're seeing that motivates this decision or change? | ||
|
|
||
| ## Options | ||
|
|
||
| _Required for Undecided ADRs. Describe the options under consideration without | ||
| choosing one yet. Each option should have a brief description and known | ||
| trade-offs._ | ||
|
|
||
| ### Option 1: ... | ||
|
|
||
| ### Option 2: ... | ||
|
|
||
| ## Decision | ||
|
|
||
| _Leave blank for Undecided ADRs._ What is the change that we're proposing | ||
| and/or doing? | ||
|
|
||
| ## Consequences | ||
|
|
||
| What becomes easier or more difficult to do because of this change? | ||
| For Undecided ADRs, describe consequences that apply regardless of which option | ||
| is chosen, or leave blank. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| title: "1. Use ADRs for decision making" | ||
| status: Accepted | ||
| relates_to: | ||
| - "*" | ||
| topics: | ||
| - process | ||
| --- | ||
|
|
||
| # 1. Use ADRs for decision making | ||
|
|
||
| Date: 2026-03-20 | ||
|
|
||
| ## Status | ||
|
|
||
| Accepted | ||
|
|
||
| ## Context | ||
|
|
||
| Fullsend is a design exploration repo with multiple problem documents that | ||
| evolve independently. As thinking matures in these problem areas, we need a way | ||
| to crystallize specific decisions without rushing to conclusions. The existing | ||
| problem documents are good for exploring the space, but they don't clearly | ||
| separate "options we're considering" from "decisions we've made." | ||
|
|
||
| We want a lightweight process that lets us: | ||
|
|
||
| - Propose decisions that we know need to be made, even before we've chosen an | ||
| answer. | ||
| - Describe options and trade-offs in a structured way. | ||
| - Record the final decision and its rationale once consensus forms. | ||
| - Keep a clear history of what was decided and why. | ||
|
|
||
| ## Decision | ||
|
|
||
| We adopt Architecture Decision Records (ADRs), following the format described | ||
| by Michael Nygard, adapted for this repo's needs. | ||
|
|
||
| ADRs live in `docs/ADRs/` and follow the naming convention | ||
| `NNNN-short-description.md` where `NNNN` is a unique four-digit number. | ||
|
|
||
| Each ADR has a Status field. Valid statuses are: | ||
|
|
||
| - **Proposed** -- A decision has been drafted but not yet discussed or agreed | ||
| upon. | ||
| - **Undecided** -- The problem is identified, options are described, but no | ||
| decision has been made yet. These ADRs can be merged and iterated on. They | ||
| must include an Options section describing the alternatives under | ||
| consideration. | ||
| - **Accepted** -- The decision has been made. | ||
| - **Deprecated** -- The decision is no longer relevant. | ||
| - **Superseded** -- The decision has been replaced by a later ADR. | ||
|
|
||
| The Undecided status is a deliberate part of our workflow. It lets us merge ADRs | ||
| that frame a decision and its options, so the community can discuss and refine | ||
| the options over time without pressure to decide prematurely. When consensus | ||
| forms, the ADR is updated to Accepted with a Decision section filled in. | ||
|
|
||
| Each ADR includes YAML frontmatter with structured metadata: | ||
|
|
||
| - **title** -- The ADR title (required). | ||
| - **status** -- Must match the `## Status` section in the body (required). | ||
| - **relates_to** -- A list of problem document names (filenames without `.md` | ||
| from `docs/problems/`) that this ADR relates to. Use `"*"` for ADRs that | ||
| apply broadly across all problem areas. | ||
| - **topics** -- Free-form tags for discoverability. | ||
|
|
||
| This frontmatter makes it possible to discover which ADRs relate to a given | ||
| problem area without manually maintaining cross-reference lists. | ||
|
|
||
| ADR linting is borrowed from the | ||
| [konflux-ci/architecture](https://github.com/konflux-ci/architecture) repo and | ||
| runs in CI to validate statuses, number uniqueness, and frontmatter correctness | ||
| (including cross-references to problem docs). | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Problem documents in `docs/problems/` remain the place for open-ended | ||
| exploration. ADRs are for when a specific decision point has been identified. | ||
| - Contributors can propose ADRs in the Undecided state to start structured | ||
| discussion around a specific choice. | ||
| - The linting ensures ADRs follow the expected format, catching mistakes early. | ||
| - We inherit a proven format from the broader konflux-ci organization, making it | ||
| familiar to contributors who work across repos. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ | |
|
|
||
| from scanner.parser import parse_task | ||
|
|
||
|
|
||
| FIXTURES = Path(__file__).parent / "fixtures" | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ | |
|
|
||
| import anthropic | ||
|
|
||
|
|
||
| MODEL = "claude-sonnet-4-6" | ||
| TEMPERATURE = 0 | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.