@rvdbreemen/adr-kit-opencode 0.52.0 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +29 -29
- package/README.md +861 -850
- package/bin/adr +0 -0
- package/bin/adr-audit +0 -0
- package/bin/adr-context +0 -0
- package/bin/adr-discover +0 -0
- package/bin/adr-doctor +0 -0
- package/bin/adr-generate-scripts +0 -0
- package/bin/adr-grill-signal +0 -0
- package/bin/adr-guardian +0 -0
- package/bin/adr-index +0 -0
- package/bin/adr-judge +0 -0
- package/bin/adr-judge-precommit +0 -0
- package/bin/adr-lint +0 -0
- package/bin/adr-mcp +0 -0
- package/bin/adr-migrate +0 -0
- package/bin/adr-quality +0 -0
- package/bin/adr-readiness +0 -0
- package/bin/adr-readiness-ci +0 -0
- package/bin/adr-related +0 -0
- package/bin/adr-renumber +254 -254
- package/bin/adr-retire +0 -0
- package/bin/adr-settings +0 -0
- package/bin/adr-status +0 -0
- package/bin/adr-suggest +0 -0
- package/bin/adr-watch +0 -0
- package/bin/bump-version +0 -0
- package/clients/workflows.json +229 -229
- package/hooks/__init__.py +1 -1
- package/hooks/adapters/__init__.py +13 -13
- package/hooks/adapters/claude.py +27 -27
- package/hooks/adapters/codex.py +26 -26
- package/hooks/adapters/copilot.py +11 -11
- package/hooks/adr-hook.py +128 -128
- package/hooks/adr_hook_core.py +843 -843
- package/hooks/adr_pr_guard.py +367 -367
- package/instructions/ADR-guide.md +48 -48
- package/instructions/adr.coding.md +82 -82
- package/instructions/adr.review.md +182 -182
- package/opencode/plugin.ts +1 -4
- package/package.json +5 -2
- package/schemas/adr-context-probes.schema.json +56 -56
- package/schemas/adr-enforcement.schema.json +57 -57
- package/schemas/adr-frontmatter.schema.json +144 -144
- package/schemas/adr-index.schema.json +276 -276
- package/schemas/adr-kit-config.schema.json +371 -371
- package/schemas/adr-readiness.schema.json +41 -41
- package/schemas/client-capabilities.schema.json +503 -503
- package/schemas/client-certification.schema.json +101 -101
- package/schemas/doctor-output.schema.json +92 -92
- package/skills/adr/SKILL.md +780 -780
- package/skills/audit/SKILL.md +103 -103
- package/skills/context/SKILL.md +77 -77
- package/skills/grill/SKILL.md +84 -84
- package/skills/grill/agents/openai.yaml +4 -4
- package/skills/guardian/SKILL.md +316 -316
- package/skills/init/SKILL.md +499 -499
- package/skills/install-hooks/SKILL.md +154 -154
- package/skills/judge/SKILL.md +168 -168
- package/skills/lint/SKILL.md +321 -321
- package/skills/migrate/SKILL.md +313 -313
- package/skills/related/SKILL.md +62 -62
- package/skills/retire/SKILL.md +41 -41
- package/skills/review/SKILL.md +167 -167
- package/skills/settings/SKILL.md +73 -73
- package/skills/setup/SKILL.md +128 -128
- package/skills/supersede/SKILL.md +136 -136
- package/skills/upgrade/SKILL.md +273 -273
- package/templates/adr-kit-guide.md +354 -354
- package/templates/adr-template.canonical.md +115 -115
- package/templates/adr-template.madr.md +131 -131
- package/templates/adr-template.md +131 -131
- package/templates/adr-template.nygard.md +111 -111
- package/templates/cc-settings/guardian-hook-entry.json +9 -9
- package/templates/githooks/pre-commit +1 -1
- package/templates/github-workflows/adr-audit.yml +58 -58
- package/templates/github-workflows/adr-guardian-audit.yml +133 -133
- package/templates/github-workflows/adr-index-check.yml +30 -30
- package/templates/github-workflows/adr-judge.yml +31 -31
- package/templates/github-workflows/adr-readiness.yml +18 -18
- package/templates/validate_adr_template.py +38 -38
- package/templates/validate_adr_template.sh +74 -74
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<!-- adr-kit-guide v0.35.0 -->
|
|
2
|
-
<!-- Generated ADR Kit guidance. Local additions belong in .adr-kit/ADR-guide.local.md. -->
|
|
3
|
-
|
|
4
|
-
# ADR Kit agent guide
|
|
5
|
-
|
|
6
|
-
Architecture decisions live in `docs/adr/`. Read the source ADR before treating
|
|
7
|
-
a generated summary as binding.
|
|
8
|
-
|
|
9
|
-
## Before implementation
|
|
10
|
-
|
|
11
|
-
1. Query the task with `adr-kit:context` or `bin/adr-context`.
|
|
12
|
-
2. Read the returned Accepted ADRs.
|
|
13
|
-
3. If the work introduces or changes a long-lived decision, use `adr-kit:adr`
|
|
14
|
-
and keep the new record Proposed until a human accepts it.
|
|
15
|
-
|
|
16
|
-
## During implementation
|
|
17
|
-
|
|
18
|
-
- Treat hook-provided ADR context as advisory steering. Hooks fail open.
|
|
19
|
-
- Treat deterministic pre-commit enforcement as the blocking floor.
|
|
20
|
-
- Never rewrite an Accepted ADR. Create a Proposed successor and use the
|
|
21
|
-
supersession lifecycle.
|
|
22
|
-
- Keep generated indexes and client artifacts deterministic; edit their
|
|
23
|
-
canonical sources instead.
|
|
24
|
-
|
|
25
|
-
## Before completion
|
|
26
|
-
|
|
27
|
-
1. Run strict ADR lint and the relevant focused tests.
|
|
28
|
-
2. Regenerate `docs/adr/ADR-INDEX.md`, `docs/adr/ADR-INDEX.json`, and the
|
|
29
|
-
generated README block after ADR changes.
|
|
30
|
-
3. Use `adr-kit:judge` or `bin/adr-judge` to check the staged diff.
|
|
31
|
-
4. Record the decision, evidence, and verification in the project task.
|
|
32
|
-
|
|
33
|
-
## Ownership
|
|
34
|
-
|
|
35
|
-
`.adr-kit/ADR-guide.md` is generated and may be replaced after backup.
|
|
36
|
-
Put project-specific guidance in `.adr-kit/ADR-guide.local.md` or outside ADR
|
|
37
|
-
Kit marker blocks in `AGENTS.md`, `CLAUDE.md`, and Copilot instructions.
|
|
38
|
-
|
|
39
|
-
If `.adr-kit/ADR-guide.local.md` exists, read it after this file. It is
|
|
40
|
-
user-owned and ADR Kit never overwrites or removes it.
|
|
41
|
-
|
|
42
|
-
## Judgment
|
|
43
|
-
|
|
44
|
-
Deterministic ADR checks remain available without a model. Paid or cloud model
|
|
45
|
-
judgment is opt-in. Local judgment is active only when a configured or
|
|
46
|
-
unambiguously discovered provider/model identity has been verified. Missing,
|
|
47
|
-
ambiguous, or unreachable models are degraded optional judgment, never a
|
|
48
|
-
successful judgment result.
|
|
1
|
+
<!-- adr-kit-guide v0.35.0 -->
|
|
2
|
+
<!-- Generated ADR Kit guidance. Local additions belong in .adr-kit/ADR-guide.local.md. -->
|
|
3
|
+
|
|
4
|
+
# ADR Kit agent guide
|
|
5
|
+
|
|
6
|
+
Architecture decisions live in `docs/adr/`. Read the source ADR before treating
|
|
7
|
+
a generated summary as binding.
|
|
8
|
+
|
|
9
|
+
## Before implementation
|
|
10
|
+
|
|
11
|
+
1. Query the task with `adr-kit:context` or `bin/adr-context`.
|
|
12
|
+
2. Read the returned Accepted ADRs.
|
|
13
|
+
3. If the work introduces or changes a long-lived decision, use `adr-kit:adr`
|
|
14
|
+
and keep the new record Proposed until a human accepts it.
|
|
15
|
+
|
|
16
|
+
## During implementation
|
|
17
|
+
|
|
18
|
+
- Treat hook-provided ADR context as advisory steering. Hooks fail open.
|
|
19
|
+
- Treat deterministic pre-commit enforcement as the blocking floor.
|
|
20
|
+
- Never rewrite an Accepted ADR. Create a Proposed successor and use the
|
|
21
|
+
supersession lifecycle.
|
|
22
|
+
- Keep generated indexes and client artifacts deterministic; edit their
|
|
23
|
+
canonical sources instead.
|
|
24
|
+
|
|
25
|
+
## Before completion
|
|
26
|
+
|
|
27
|
+
1. Run strict ADR lint and the relevant focused tests.
|
|
28
|
+
2. Regenerate `docs/adr/ADR-INDEX.md`, `docs/adr/ADR-INDEX.json`, and the
|
|
29
|
+
generated README block after ADR changes.
|
|
30
|
+
3. Use `adr-kit:judge` or `bin/adr-judge` to check the staged diff.
|
|
31
|
+
4. Record the decision, evidence, and verification in the project task.
|
|
32
|
+
|
|
33
|
+
## Ownership
|
|
34
|
+
|
|
35
|
+
`.adr-kit/ADR-guide.md` is generated and may be replaced after backup.
|
|
36
|
+
Put project-specific guidance in `.adr-kit/ADR-guide.local.md` or outside ADR
|
|
37
|
+
Kit marker blocks in `AGENTS.md`, `CLAUDE.md`, and Copilot instructions.
|
|
38
|
+
|
|
39
|
+
If `.adr-kit/ADR-guide.local.md` exists, read it after this file. It is
|
|
40
|
+
user-owned and ADR Kit never overwrites or removes it.
|
|
41
|
+
|
|
42
|
+
## Judgment
|
|
43
|
+
|
|
44
|
+
Deterministic ADR checks remain available without a model. Paid or cloud model
|
|
45
|
+
judgment is opt-in. Local judgment is active only when a configured or
|
|
46
|
+
unambiguously discovered provider/model identity has been verified. Missing,
|
|
47
|
+
ambiguous, or unreachable models are degraded optional judgment, never a
|
|
48
|
+
successful judgment result.
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# ADR Rules for Coding Work
|
|
2
|
-
|
|
3
|
-
When you are about to implement or change code, run through these rules **before** writing.
|
|
4
|
-
|
|
5
|
-
## Before implementing
|
|
6
|
-
|
|
7
|
-
- **Check for existing ADRs**: scan `docs/adr/` for an ADR that governs the area you are about to touch. The fastest path: read `docs/adr/README.md` index, then open the relevant ADRs.
|
|
8
|
-
- **Assess architectural significance**: does the change affect any of the following?
|
|
9
|
-
- Architecture: service or module boundaries, deployment topology, integration patterns
|
|
10
|
-
- Non-functional requirements: security, availability, performance, privacy, resilience
|
|
11
|
-
- Interfaces and contracts: public APIs, message topics, RPC contracts, breaking changes
|
|
12
|
-
- Dependencies: new framework, new library, swap-out with broad impact
|
|
13
|
-
- Build and tooling: build system, CI gates, development workflow
|
|
14
|
-
|
|
15
|
-
If yes, an ADR is in scope. If clearly no (bug fix, refactor that preserves contract, doc fix), skip the ADR work.
|
|
16
|
-
- **Use the canonical guide**: `docs/adr/README.md` is the source of truth for the project's ADR conventions. The ADR `SKILL.md` installed by Claude Code, Codex, or GitHub Copilot CLI is the comprehensive how-to.
|
|
17
|
-
|
|
18
|
-
## Creating a new ADR
|
|
19
|
-
|
|
20
|
-
If no ADR exists and the change is architecturally significant:
|
|
21
|
-
|
|
22
|
-
1. **Hand the work to the ADR generator subagent** (`adr-generator`). Provide it with the title, decision, alternatives, constraints, and any related ADRs. The agent writes a fully-formed ADR file at `docs/adr/ADR-XXX-title.md`.
|
|
23
|
-
2. **Review the generated ADR yourself** before linking from code: confirm it passes the four verification gates (Completeness, Evidence, Clarity, Consistency) defined in the skill.
|
|
24
|
-
3. **Reference the ADR** in your commit message and (if relevant) the PR description: `ADR: docs/adr/ADR-XXX-title.md`.
|
|
25
|
-
4. **Add code comments** that point to the ADR at non-obvious enforcement sites: `// See ADR-XXX for why we use this pattern.`
|
|
26
|
-
5. **Add an Enforcement block (v0.12+) when the rule has any code surface.** Accepted ADRs SHOULD carry an `## Enforcement` section. Three patterns:
|
|
27
|
-
- **Declarative** (`forbid_pattern` / `forbid_import` / `require_pattern`) — regex/glob rules that `bin/adr-judge` runs at commit time. Preferred when expressible; fast, no LLM round-trip.
|
|
28
|
-
- **`"llm_judge": true`** — for rules that need a model's judgement (semantic compliance, intent reading). The pre-commit hook batches all `llm_judge: true` ADRs into ONE Claude Sonnet call (`claude -p --model claude-sonnet-4-6`) and blocks the commit on `VIOLATION` when the LLM pass is active. As of v0.17.0 the LLM pass is opt-in: enable via `judge.llm_enabled:true` in `.adr-kit.json`, or `ADR_KIT_LLM=1` for a single commit. Falls back to declarative-only when the `claude` CLI is missing — never blocks on tooling drift. The same engine drives `/adr-kit:judge` (which always fires the LLM pass regardless of config) so verdicts are consistent across hook and skill.
|
|
29
|
-
- **Section omitted** — for governance / process ADRs with no code surface. Add a one-line explanation in the body so reviewers (Check 7) know it's intentional.
|
|
30
|
-
|
|
31
|
-
Schema: `schemas/adr-enforcement.schema.json`. Canonical guide: `.claude/adr-kit-guide.md` after `/adr-kit:init`.
|
|
32
|
-
|
|
33
|
-
## Superseding an existing ADR
|
|
34
|
-
|
|
35
|
-
If your change reverses or replaces an `Accepted` ADR:
|
|
36
|
-
|
|
37
|
-
1. **Do not modify the accepted ADR's decision text or reasoning.** ADRs are immutable once `Accepted`, except for the Status line and an appended `## Status History` transition.
|
|
38
|
-
2. **Write a new superseding ADR** that explains: (a) what is changing, (b) why the original choice no longer fits, (c) what the new choice is, (d) the migration path if consumers are affected.
|
|
39
|
-
3. **Update status without rewriting history**: set the old ADR's Status line to `Superseded by ADR-YYY` and append the matching `status_history` entry. Rationale lives in the new ADR.
|
|
40
|
-
4. **Cross-link** in both ADRs' `## Related Decisions` sections.
|
|
41
|
-
|
|
42
|
-
## Amending (vs superseding)
|
|
43
|
-
|
|
44
|
-
Some ADRs have a stable contract but a narrow scope-change. The toolkit distinguishes:
|
|
45
|
-
|
|
46
|
-
- **Supersede**: the old decision is no longer in force. Status line of old ADR: `Superseded by ADR-YYY`.
|
|
47
|
-
- **Amend**: the old decision still stands, but a specific aspect is narrowed or extended. Status line of old ADR: `Amended by ADR-YYY` (optional: leave `Accepted` if amend is content-additive only).
|
|
48
|
-
|
|
49
|
-
Use amend when the existing ADR's other consumers should not have to change. Use supersede when the contract itself is replaced.
|
|
50
|
-
|
|
51
|
-
## Implementation checklist
|
|
52
|
-
|
|
53
|
-
For every commit that lands an architecturally significant change:
|
|
54
|
-
|
|
55
|
-
- [ ] An ADR exists or has been created via the adr-generator agent
|
|
56
|
-
- [ ] The ADR follows the project structure in `docs/adr/README.md`
|
|
57
|
-
- [ ] At least 2 alternatives are documented with rejection reasoning
|
|
58
|
-
- [ ] Consequences include both positive and negative impacts; risks have mitigations
|
|
59
|
-
- [ ] The four verification gates from the skill all pass
|
|
60
|
-
- [ ] Commit message and PR description link to the ADR
|
|
61
|
-
- [ ] If superseding, the old ADR's Status line and appended Status History entry are updated and cross-references are in place
|
|
62
|
-
- [ ] Code comments point at the ADR at non-obvious enforcement sites
|
|
63
|
-
|
|
64
|
-
## Definition of Done
|
|
65
|
-
|
|
66
|
-
- ADR exists, is readable, and is reachable from `docs/adr/README.md`
|
|
67
|
-
- ADR focuses on rationale ("why"), not implementation detail ("how")
|
|
68
|
-
- The PR or commit links to the ADR by path
|
|
69
|
-
- Supersession or amendment chain is correct (if applicable)
|
|
70
|
-
- ADR has no placeholders, no `TODO:` markers, no em dashes
|
|
71
|
-
|
|
72
|
-
## When the ADR rule does not apply
|
|
73
|
-
|
|
74
|
-
Skip the ADR work for:
|
|
75
|
-
|
|
76
|
-
- Bug fixes that do not change a contract
|
|
77
|
-
- Refactors that preserve external behaviour
|
|
78
|
-
- Documentation updates (unless the doc *is* an ADR)
|
|
79
|
-
- Configuration tweaks within an existing range
|
|
80
|
-
- Minor feature additions that fit an established pattern
|
|
81
|
-
|
|
82
|
-
If you are unsure, default to creating an ADR. The cost of writing one is 15 to 30 minutes; the cost of re-deriving the rationale 6 months from now is hours. (See the Anti-Rationalization Guards table in `SKILL.md`.)
|
|
1
|
+
# ADR Rules for Coding Work
|
|
2
|
+
|
|
3
|
+
When you are about to implement or change code, run through these rules **before** writing.
|
|
4
|
+
|
|
5
|
+
## Before implementing
|
|
6
|
+
|
|
7
|
+
- **Check for existing ADRs**: scan `docs/adr/` for an ADR that governs the area you are about to touch. The fastest path: read `docs/adr/README.md` index, then open the relevant ADRs.
|
|
8
|
+
- **Assess architectural significance**: does the change affect any of the following?
|
|
9
|
+
- Architecture: service or module boundaries, deployment topology, integration patterns
|
|
10
|
+
- Non-functional requirements: security, availability, performance, privacy, resilience
|
|
11
|
+
- Interfaces and contracts: public APIs, message topics, RPC contracts, breaking changes
|
|
12
|
+
- Dependencies: new framework, new library, swap-out with broad impact
|
|
13
|
+
- Build and tooling: build system, CI gates, development workflow
|
|
14
|
+
|
|
15
|
+
If yes, an ADR is in scope. If clearly no (bug fix, refactor that preserves contract, doc fix), skip the ADR work.
|
|
16
|
+
- **Use the canonical guide**: `docs/adr/README.md` is the source of truth for the project's ADR conventions. The ADR `SKILL.md` installed by Claude Code, Codex, or GitHub Copilot CLI is the comprehensive how-to.
|
|
17
|
+
|
|
18
|
+
## Creating a new ADR
|
|
19
|
+
|
|
20
|
+
If no ADR exists and the change is architecturally significant:
|
|
21
|
+
|
|
22
|
+
1. **Hand the work to the ADR generator subagent** (`adr-generator`). Provide it with the title, decision, alternatives, constraints, and any related ADRs. The agent writes a fully-formed ADR file at `docs/adr/ADR-XXX-title.md`.
|
|
23
|
+
2. **Review the generated ADR yourself** before linking from code: confirm it passes the four verification gates (Completeness, Evidence, Clarity, Consistency) defined in the skill.
|
|
24
|
+
3. **Reference the ADR** in your commit message and (if relevant) the PR description: `ADR: docs/adr/ADR-XXX-title.md`.
|
|
25
|
+
4. **Add code comments** that point to the ADR at non-obvious enforcement sites: `// See ADR-XXX for why we use this pattern.`
|
|
26
|
+
5. **Add an Enforcement block (v0.12+) when the rule has any code surface.** Accepted ADRs SHOULD carry an `## Enforcement` section. Three patterns:
|
|
27
|
+
- **Declarative** (`forbid_pattern` / `forbid_import` / `require_pattern`) — regex/glob rules that `bin/adr-judge` runs at commit time. Preferred when expressible; fast, no LLM round-trip.
|
|
28
|
+
- **`"llm_judge": true`** — for rules that need a model's judgement (semantic compliance, intent reading). The pre-commit hook batches all `llm_judge: true` ADRs into ONE Claude Sonnet call (`claude -p --model claude-sonnet-4-6`) and blocks the commit on `VIOLATION` when the LLM pass is active. As of v0.17.0 the LLM pass is opt-in: enable via `judge.llm_enabled:true` in `.adr-kit.json`, or `ADR_KIT_LLM=1` for a single commit. Falls back to declarative-only when the `claude` CLI is missing — never blocks on tooling drift. The same engine drives `/adr-kit:judge` (which always fires the LLM pass regardless of config) so verdicts are consistent across hook and skill.
|
|
29
|
+
- **Section omitted** — for governance / process ADRs with no code surface. Add a one-line explanation in the body so reviewers (Check 7) know it's intentional.
|
|
30
|
+
|
|
31
|
+
Schema: `schemas/adr-enforcement.schema.json`. Canonical guide: `.claude/adr-kit-guide.md` after `/adr-kit:init`.
|
|
32
|
+
|
|
33
|
+
## Superseding an existing ADR
|
|
34
|
+
|
|
35
|
+
If your change reverses or replaces an `Accepted` ADR:
|
|
36
|
+
|
|
37
|
+
1. **Do not modify the accepted ADR's decision text or reasoning.** ADRs are immutable once `Accepted`, except for the Status line and an appended `## Status History` transition.
|
|
38
|
+
2. **Write a new superseding ADR** that explains: (a) what is changing, (b) why the original choice no longer fits, (c) what the new choice is, (d) the migration path if consumers are affected.
|
|
39
|
+
3. **Update status without rewriting history**: set the old ADR's Status line to `Superseded by ADR-YYY` and append the matching `status_history` entry. Rationale lives in the new ADR.
|
|
40
|
+
4. **Cross-link** in both ADRs' `## Related Decisions` sections.
|
|
41
|
+
|
|
42
|
+
## Amending (vs superseding)
|
|
43
|
+
|
|
44
|
+
Some ADRs have a stable contract but a narrow scope-change. The toolkit distinguishes:
|
|
45
|
+
|
|
46
|
+
- **Supersede**: the old decision is no longer in force. Status line of old ADR: `Superseded by ADR-YYY`.
|
|
47
|
+
- **Amend**: the old decision still stands, but a specific aspect is narrowed or extended. Status line of old ADR: `Amended by ADR-YYY` (optional: leave `Accepted` if amend is content-additive only).
|
|
48
|
+
|
|
49
|
+
Use amend when the existing ADR's other consumers should not have to change. Use supersede when the contract itself is replaced.
|
|
50
|
+
|
|
51
|
+
## Implementation checklist
|
|
52
|
+
|
|
53
|
+
For every commit that lands an architecturally significant change:
|
|
54
|
+
|
|
55
|
+
- [ ] An ADR exists or has been created via the adr-generator agent
|
|
56
|
+
- [ ] The ADR follows the project structure in `docs/adr/README.md`
|
|
57
|
+
- [ ] At least 2 alternatives are documented with rejection reasoning
|
|
58
|
+
- [ ] Consequences include both positive and negative impacts; risks have mitigations
|
|
59
|
+
- [ ] The four verification gates from the skill all pass
|
|
60
|
+
- [ ] Commit message and PR description link to the ADR
|
|
61
|
+
- [ ] If superseding, the old ADR's Status line and appended Status History entry are updated and cross-references are in place
|
|
62
|
+
- [ ] Code comments point at the ADR at non-obvious enforcement sites
|
|
63
|
+
|
|
64
|
+
## Definition of Done
|
|
65
|
+
|
|
66
|
+
- ADR exists, is readable, and is reachable from `docs/adr/README.md`
|
|
67
|
+
- ADR focuses on rationale ("why"), not implementation detail ("how")
|
|
68
|
+
- The PR or commit links to the ADR by path
|
|
69
|
+
- Supersession or amendment chain is correct (if applicable)
|
|
70
|
+
- ADR has no placeholders, no `TODO:` markers, no em dashes
|
|
71
|
+
|
|
72
|
+
## When the ADR rule does not apply
|
|
73
|
+
|
|
74
|
+
Skip the ADR work for:
|
|
75
|
+
|
|
76
|
+
- Bug fixes that do not change a contract
|
|
77
|
+
- Refactors that preserve external behaviour
|
|
78
|
+
- Documentation updates (unless the doc *is* an ADR)
|
|
79
|
+
- Configuration tweaks within an existing range
|
|
80
|
+
- Minor feature additions that fit an established pattern
|
|
81
|
+
|
|
82
|
+
If you are unsure, default to creating an ADR. The cost of writing one is 15 to 30 minutes; the cost of re-deriving the rationale 6 months from now is hours. (See the Anti-Rationalization Guards table in `SKILL.md`.)
|
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
# ADR Checks for Code Review
|
|
2
|
-
|
|
3
|
-
When you are reviewing a PR or a diff, run these seven checks for ADR compliance. The canonical guide is `docs/adr/README.md`; the comprehensive skill is `SKILL.md`. Check 7 was added in adr-kit v0.12.0 alongside the declarative Enforcement-block engine in `bin/adr-judge`.
|
|
4
|
-
|
|
5
|
-
## Check 1: ADR exists for architecturally significant changes
|
|
6
|
-
|
|
7
|
-
If the diff touches any of:
|
|
8
|
-
|
|
9
|
-
- **Architecture**: service or module boundaries, deployment, integration patterns
|
|
10
|
-
- **Non-functional requirements**: security, availability, performance, privacy, resilience
|
|
11
|
-
- **Interfaces and contracts**: API behaviour, message topics, RPC contracts, breaking changes
|
|
12
|
-
- **Dependencies**: new frameworks or libraries with broad impact
|
|
13
|
-
- **Build and tooling**: build system, CI gates, development workflow
|
|
14
|
-
|
|
15
|
-
then there should be a linked ADR.
|
|
16
|
-
|
|
17
|
-
**Action if missing:**
|
|
18
|
-
|
|
19
|
-
- Request an ADR. Be specific about which decision should be captured.
|
|
20
|
-
- Suggest the `adr-generator` subagent for fast scaffolding.
|
|
21
|
-
|
|
22
|
-
## Check 2: ADR is properly linked
|
|
23
|
-
|
|
24
|
-
Verify the PR description includes:
|
|
25
|
-
|
|
26
|
-
- A path to the ADR: `docs/adr/ADR-XXX-title.md`
|
|
27
|
-
- A clear explanation of how the diff relates to the ADR
|
|
28
|
-
- If implementing a `Proposed` ADR, check whether the Status should flip to `Accepted` in this PR
|
|
29
|
-
|
|
30
|
-
**Action if link is missing or unclear:**
|
|
31
|
-
|
|
32
|
-
- Request the ADR link in the PR description.
|
|
33
|
-
- Ask for one sentence connecting the code change to the ADR's decision.
|
|
34
|
-
|
|
35
|
-
## Check 3: No ADR violations
|
|
36
|
-
|
|
37
|
-
Check whether the diff violates an `Accepted` ADR:
|
|
38
|
-
|
|
39
|
-
- Cross-reference `docs/adr/README.md` for relevant ADRs to the touched files
|
|
40
|
-
- Check ADR-specific compliance for ADRs that include enforcement rules
|
|
41
|
-
- Verify the change follows patterns established by `Accepted` ADRs
|
|
42
|
-
|
|
43
|
-
**Action if violation found:**
|
|
44
|
-
|
|
45
|
-
- *Option 1*: request alignment with the existing ADR.
|
|
46
|
-
- *Option 2*: request a new superseding ADR if the decision needs to change.
|
|
47
|
-
- Always explain *why* the change conflicts with the documented decision.
|
|
48
|
-
|
|
49
|
-
## Check 4: Supersession is correct
|
|
50
|
-
|
|
51
|
-
If the PR supersedes an existing ADR:
|
|
52
|
-
|
|
53
|
-
- Verify the new ADR includes a `## Related Decisions` entry "Supersedes ADR-XXX"
|
|
54
|
-
- Verify the old ADR's Status line is updated to `Superseded by ADR-YYY` and its `## Status History` has a matching appended transition
|
|
55
|
-
- Verify the supersession rationale appears in the new ADR (not the old one)
|
|
56
|
-
- Verify the old ADR's content (context, decision, alternatives, consequences) and earlier history entries are **not modified**. Only the Status line and one appended transition may change.
|
|
57
|
-
|
|
58
|
-
**Action if supersession is incorrect:**
|
|
59
|
-
|
|
60
|
-
- Request proper supersession linking.
|
|
61
|
-
- If the old ADR's content was edited, request a revert of that part.
|
|
62
|
-
|
|
63
|
-
## Check 5: ADR quality (the four verification gates)
|
|
64
|
-
|
|
65
|
-
Apply the four named gates from `SKILL.md`:
|
|
66
|
-
|
|
67
|
-
- **Completeness gate**: problem stated, decision unambiguous, 2+ alternatives with rejection reasoning, consequences in both directions, risks named with mitigations.
|
|
68
|
-
- **Evidence gate**: bare adjectives replaced with measurements; constraint claims anchored to a source; code references include `file:line`; external claims linked.
|
|
69
|
-
- **Clarity gate**: acronyms defined on first use, technical concepts explained when load-bearing, decision explainable in one paragraph at the top.
|
|
70
|
-
- **Consistency gate**: no conflict with another `Accepted` ADR (or explicit supersede), cross-references present, terminology matches other ADRs, ADR number sequential.
|
|
71
|
-
|
|
72
|
-
**Action if a gate fails:**
|
|
73
|
-
|
|
74
|
-
- Cite the failing gate by name: "This ADR fails the Evidence gate. Please add a measurement to back the 'reduces fragmentation' claim."
|
|
75
|
-
- Suggest a fix.
|
|
76
|
-
- Reference an existing ADR in the project as a positive example, if available.
|
|
77
|
-
|
|
78
|
-
## Check 6: Legacy non-compliance
|
|
79
|
-
|
|
80
|
-
If existing code does not comply with a *new* ADR:
|
|
81
|
-
|
|
82
|
-
- Acknowledge the legacy non-compliance explicitly.
|
|
83
|
-
- Request a remediation plan: an incremental cleanup, a tech-debt issue with a target version, or an explicit "out of scope for this PR" note.
|
|
84
|
-
- Do not block the ADR adoption itself due to legacy issues.
|
|
85
|
-
- Ensure the *new* code in this PR complies.
|
|
86
|
-
|
|
87
|
-
## Check 7: Enforcement block (v0.12+)
|
|
88
|
-
|
|
89
|
-
Every new `Accepted` ADR with a code surface SHOULD include an `## Enforcement` section so the pre-commit hook can guard the boundary. Three acceptable patterns:
|
|
90
|
-
|
|
91
|
-
- **Declarative rules.** A fenced JSON block with `forbid_pattern` / `forbid_import` / `require_pattern` arrays. `bin/adr-judge` runs them deterministically on the staged diff at commit time. Preferred when the rule is mechanically expressible — fastest path, no LLM round-trip.
|
|
92
|
-
- **`"llm_judge": true`.** Free-form ADRs whose rules cannot be expressed as regex but are still code-relevant. The pre-commit hook batches all `llm_judge` ADRs into ONE Claude Sonnet call and blocks the commit on `VIOLATION` when the LLM pass is active. As of v0.17.0 the LLM pass is opt-in (off by default); enable via `judge.llm_enabled:true` in `.adr-kit.json`, or `ADR_KIT_LLM=1` for a single commit. `/adr-kit:judge` always runs the LLM pass on demand regardless of that setting. Falls back to declarative-only when the `claude` CLI is missing — never blocks on tooling drift. Cost shape when enabled: ~$0.10–0.30 per commit on Sonnet 4.6 with prompt caching.
|
|
93
|
-
- **Section omitted.** ADRs with no code surface (governance, process, organisational decisions). The judge skips them silently. The PR author should explain in the ADR body *why* the rule isn't mechanically expressible.
|
|
94
|
-
|
|
95
|
-
**Action if missing on a code-touching ADR:**
|
|
96
|
-
|
|
97
|
-
- Request an Enforcement block. Suggest one of the three patterns based on the rule's shape.
|
|
98
|
-
- Reference an existing ADR in the project that already has a good declarative block, if available.
|
|
99
|
-
- Reject "we'll add it later" — adding the block is part of the original Definition of Done. Without it, drift is silent.
|
|
100
|
-
|
|
101
|
-
## Review-comment templates
|
|
102
|
-
|
|
103
|
-
### Missing ADR
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
This change introduces a new caching pattern, which affects architecture.
|
|
107
|
-
Please create an ADR documenting:
|
|
108
|
-
- Why caching is needed (context, constraints)
|
|
109
|
-
- Cache options considered (Redis, Memcached, in-memory)
|
|
110
|
-
- Chosen approach and rationale
|
|
111
|
-
- Consequences (performance gains, memory and complexity costs)
|
|
112
|
-
|
|
113
|
-
The adr-generator subagent can scaffold this. See SKILL.md for the template.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### ADR violation
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
This change uses pattern X in performance-critical code, which violates
|
|
120
|
-
ADR-NNN (Title). Two options:
|
|
121
|
-
|
|
122
|
-
1. Refactor to follow ADR-NNN's pattern.
|
|
123
|
-
2. Write a superseding ADR if the decision needs to change.
|
|
124
|
-
|
|
125
|
-
ADR-NNN: docs/adr/ADR-NNN-title.md
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Supersession issue
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
This ADR supersedes ADR-OLD but ADR-OLD has not been updated.
|
|
132
|
-
|
|
133
|
-
Please:
|
|
134
|
-
1. Update ADR-OLD Status line to "Superseded by ADR-NEW".
|
|
135
|
-
2. Confirm ADR-OLD's content (context, decision, alternatives, consequences)
|
|
136
|
-
is unchanged. ADR immutability is the rule; only the Status line moves.
|
|
137
|
-
3. Cross-reference both ADRs in their `## Related Decisions` sections.
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Verification gate failure
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
This ADR's Evidence gate fails. Two specific spots:
|
|
144
|
-
|
|
145
|
-
1. "Improves performance" (line N): replace with a measurement
|
|
146
|
-
("reduces request latency from X to Y") or a benchmark reference.
|
|
147
|
-
2. "Memory constraint requires this" (line M): cite where (datasheet,
|
|
148
|
-
measured, vendor doc) and how much.
|
|
149
|
-
|
|
150
|
-
ADR-NNN in this repo is a good positive reference for the Evidence gate.
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Missing Enforcement block
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
This ADR has a clear code surface (touches src/X, governs Y) but no
|
|
157
|
-
## Enforcement section. Without one, the pre-commit hook can't guard
|
|
158
|
-
the boundary and silent drift will accumulate.
|
|
159
|
-
|
|
160
|
-
Please add one of the three patterns:
|
|
161
|
-
|
|
162
|
-
- Declarative rules in a fenced JSON block (forbid_pattern, forbid_import,
|
|
163
|
-
require_pattern). Preferred if the rule can be expressed as regex/glob.
|
|
164
|
-
- `"llm_judge": true` — for nuanced rules that need a model's judgement.
|
|
165
|
-
Deep review still happens via /adr-kit:judge in a Claude Code session.
|
|
166
|
-
- Omit the section AND add a one-line explanation in the ADR body for
|
|
167
|
-
why the rule has no code surface (governance / process / etc.).
|
|
168
|
-
|
|
169
|
-
Schema: schemas/adr-enforcement.schema.json
|
|
170
|
-
Reference example: ADR-NNN in this repo.
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Definition of Done for review
|
|
174
|
-
|
|
175
|
-
- [ ] Architecturally significant changes have a linked ADR
|
|
176
|
-
- [ ] ADR link is in the PR description
|
|
177
|
-
- [ ] No `Accepted` ADR is violated, or a superseding ADR is in place
|
|
178
|
-
- [ ] Supersession chain is correct
|
|
179
|
-
- [ ] All four verification gates pass on the ADR
|
|
180
|
-
- [ ] Legacy non-compliance, if any, has a remediation plan
|
|
181
|
-
- [ ] Code comments at non-obvious enforcement sites point at the ADR
|
|
182
|
-
- [ ] New `Accepted` ADRs with a code surface include an `## Enforcement` block (declarative rules OR `"llm_judge": true` OR explicit "no code surface" note)
|
|
1
|
+
# ADR Checks for Code Review
|
|
2
|
+
|
|
3
|
+
When you are reviewing a PR or a diff, run these seven checks for ADR compliance. The canonical guide is `docs/adr/README.md`; the comprehensive skill is `SKILL.md`. Check 7 was added in adr-kit v0.12.0 alongside the declarative Enforcement-block engine in `bin/adr-judge`.
|
|
4
|
+
|
|
5
|
+
## Check 1: ADR exists for architecturally significant changes
|
|
6
|
+
|
|
7
|
+
If the diff touches any of:
|
|
8
|
+
|
|
9
|
+
- **Architecture**: service or module boundaries, deployment, integration patterns
|
|
10
|
+
- **Non-functional requirements**: security, availability, performance, privacy, resilience
|
|
11
|
+
- **Interfaces and contracts**: API behaviour, message topics, RPC contracts, breaking changes
|
|
12
|
+
- **Dependencies**: new frameworks or libraries with broad impact
|
|
13
|
+
- **Build and tooling**: build system, CI gates, development workflow
|
|
14
|
+
|
|
15
|
+
then there should be a linked ADR.
|
|
16
|
+
|
|
17
|
+
**Action if missing:**
|
|
18
|
+
|
|
19
|
+
- Request an ADR. Be specific about which decision should be captured.
|
|
20
|
+
- Suggest the `adr-generator` subagent for fast scaffolding.
|
|
21
|
+
|
|
22
|
+
## Check 2: ADR is properly linked
|
|
23
|
+
|
|
24
|
+
Verify the PR description includes:
|
|
25
|
+
|
|
26
|
+
- A path to the ADR: `docs/adr/ADR-XXX-title.md`
|
|
27
|
+
- A clear explanation of how the diff relates to the ADR
|
|
28
|
+
- If implementing a `Proposed` ADR, check whether the Status should flip to `Accepted` in this PR
|
|
29
|
+
|
|
30
|
+
**Action if link is missing or unclear:**
|
|
31
|
+
|
|
32
|
+
- Request the ADR link in the PR description.
|
|
33
|
+
- Ask for one sentence connecting the code change to the ADR's decision.
|
|
34
|
+
|
|
35
|
+
## Check 3: No ADR violations
|
|
36
|
+
|
|
37
|
+
Check whether the diff violates an `Accepted` ADR:
|
|
38
|
+
|
|
39
|
+
- Cross-reference `docs/adr/README.md` for relevant ADRs to the touched files
|
|
40
|
+
- Check ADR-specific compliance for ADRs that include enforcement rules
|
|
41
|
+
- Verify the change follows patterns established by `Accepted` ADRs
|
|
42
|
+
|
|
43
|
+
**Action if violation found:**
|
|
44
|
+
|
|
45
|
+
- *Option 1*: request alignment with the existing ADR.
|
|
46
|
+
- *Option 2*: request a new superseding ADR if the decision needs to change.
|
|
47
|
+
- Always explain *why* the change conflicts with the documented decision.
|
|
48
|
+
|
|
49
|
+
## Check 4: Supersession is correct
|
|
50
|
+
|
|
51
|
+
If the PR supersedes an existing ADR:
|
|
52
|
+
|
|
53
|
+
- Verify the new ADR includes a `## Related Decisions` entry "Supersedes ADR-XXX"
|
|
54
|
+
- Verify the old ADR's Status line is updated to `Superseded by ADR-YYY` and its `## Status History` has a matching appended transition
|
|
55
|
+
- Verify the supersession rationale appears in the new ADR (not the old one)
|
|
56
|
+
- Verify the old ADR's content (context, decision, alternatives, consequences) and earlier history entries are **not modified**. Only the Status line and one appended transition may change.
|
|
57
|
+
|
|
58
|
+
**Action if supersession is incorrect:**
|
|
59
|
+
|
|
60
|
+
- Request proper supersession linking.
|
|
61
|
+
- If the old ADR's content was edited, request a revert of that part.
|
|
62
|
+
|
|
63
|
+
## Check 5: ADR quality (the four verification gates)
|
|
64
|
+
|
|
65
|
+
Apply the four named gates from `SKILL.md`:
|
|
66
|
+
|
|
67
|
+
- **Completeness gate**: problem stated, decision unambiguous, 2+ alternatives with rejection reasoning, consequences in both directions, risks named with mitigations.
|
|
68
|
+
- **Evidence gate**: bare adjectives replaced with measurements; constraint claims anchored to a source; code references include `file:line`; external claims linked.
|
|
69
|
+
- **Clarity gate**: acronyms defined on first use, technical concepts explained when load-bearing, decision explainable in one paragraph at the top.
|
|
70
|
+
- **Consistency gate**: no conflict with another `Accepted` ADR (or explicit supersede), cross-references present, terminology matches other ADRs, ADR number sequential.
|
|
71
|
+
|
|
72
|
+
**Action if a gate fails:**
|
|
73
|
+
|
|
74
|
+
- Cite the failing gate by name: "This ADR fails the Evidence gate. Please add a measurement to back the 'reduces fragmentation' claim."
|
|
75
|
+
- Suggest a fix.
|
|
76
|
+
- Reference an existing ADR in the project as a positive example, if available.
|
|
77
|
+
|
|
78
|
+
## Check 6: Legacy non-compliance
|
|
79
|
+
|
|
80
|
+
If existing code does not comply with a *new* ADR:
|
|
81
|
+
|
|
82
|
+
- Acknowledge the legacy non-compliance explicitly.
|
|
83
|
+
- Request a remediation plan: an incremental cleanup, a tech-debt issue with a target version, or an explicit "out of scope for this PR" note.
|
|
84
|
+
- Do not block the ADR adoption itself due to legacy issues.
|
|
85
|
+
- Ensure the *new* code in this PR complies.
|
|
86
|
+
|
|
87
|
+
## Check 7: Enforcement block (v0.12+)
|
|
88
|
+
|
|
89
|
+
Every new `Accepted` ADR with a code surface SHOULD include an `## Enforcement` section so the pre-commit hook can guard the boundary. Three acceptable patterns:
|
|
90
|
+
|
|
91
|
+
- **Declarative rules.** A fenced JSON block with `forbid_pattern` / `forbid_import` / `require_pattern` arrays. `bin/adr-judge` runs them deterministically on the staged diff at commit time. Preferred when the rule is mechanically expressible — fastest path, no LLM round-trip.
|
|
92
|
+
- **`"llm_judge": true`.** Free-form ADRs whose rules cannot be expressed as regex but are still code-relevant. The pre-commit hook batches all `llm_judge` ADRs into ONE Claude Sonnet call and blocks the commit on `VIOLATION` when the LLM pass is active. As of v0.17.0 the LLM pass is opt-in (off by default); enable via `judge.llm_enabled:true` in `.adr-kit.json`, or `ADR_KIT_LLM=1` for a single commit. `/adr-kit:judge` always runs the LLM pass on demand regardless of that setting. Falls back to declarative-only when the `claude` CLI is missing — never blocks on tooling drift. Cost shape when enabled: ~$0.10–0.30 per commit on Sonnet 4.6 with prompt caching.
|
|
93
|
+
- **Section omitted.** ADRs with no code surface (governance, process, organisational decisions). The judge skips them silently. The PR author should explain in the ADR body *why* the rule isn't mechanically expressible.
|
|
94
|
+
|
|
95
|
+
**Action if missing on a code-touching ADR:**
|
|
96
|
+
|
|
97
|
+
- Request an Enforcement block. Suggest one of the three patterns based on the rule's shape.
|
|
98
|
+
- Reference an existing ADR in the project that already has a good declarative block, if available.
|
|
99
|
+
- Reject "we'll add it later" — adding the block is part of the original Definition of Done. Without it, drift is silent.
|
|
100
|
+
|
|
101
|
+
## Review-comment templates
|
|
102
|
+
|
|
103
|
+
### Missing ADR
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
This change introduces a new caching pattern, which affects architecture.
|
|
107
|
+
Please create an ADR documenting:
|
|
108
|
+
- Why caching is needed (context, constraints)
|
|
109
|
+
- Cache options considered (Redis, Memcached, in-memory)
|
|
110
|
+
- Chosen approach and rationale
|
|
111
|
+
- Consequences (performance gains, memory and complexity costs)
|
|
112
|
+
|
|
113
|
+
The adr-generator subagent can scaffold this. See SKILL.md for the template.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### ADR violation
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
This change uses pattern X in performance-critical code, which violates
|
|
120
|
+
ADR-NNN (Title). Two options:
|
|
121
|
+
|
|
122
|
+
1. Refactor to follow ADR-NNN's pattern.
|
|
123
|
+
2. Write a superseding ADR if the decision needs to change.
|
|
124
|
+
|
|
125
|
+
ADR-NNN: docs/adr/ADR-NNN-title.md
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Supersession issue
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
This ADR supersedes ADR-OLD but ADR-OLD has not been updated.
|
|
132
|
+
|
|
133
|
+
Please:
|
|
134
|
+
1. Update ADR-OLD Status line to "Superseded by ADR-NEW".
|
|
135
|
+
2. Confirm ADR-OLD's content (context, decision, alternatives, consequences)
|
|
136
|
+
is unchanged. ADR immutability is the rule; only the Status line moves.
|
|
137
|
+
3. Cross-reference both ADRs in their `## Related Decisions` sections.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Verification gate failure
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
This ADR's Evidence gate fails. Two specific spots:
|
|
144
|
+
|
|
145
|
+
1. "Improves performance" (line N): replace with a measurement
|
|
146
|
+
("reduces request latency from X to Y") or a benchmark reference.
|
|
147
|
+
2. "Memory constraint requires this" (line M): cite where (datasheet,
|
|
148
|
+
measured, vendor doc) and how much.
|
|
149
|
+
|
|
150
|
+
ADR-NNN in this repo is a good positive reference for the Evidence gate.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Missing Enforcement block
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
This ADR has a clear code surface (touches src/X, governs Y) but no
|
|
157
|
+
## Enforcement section. Without one, the pre-commit hook can't guard
|
|
158
|
+
the boundary and silent drift will accumulate.
|
|
159
|
+
|
|
160
|
+
Please add one of the three patterns:
|
|
161
|
+
|
|
162
|
+
- Declarative rules in a fenced JSON block (forbid_pattern, forbid_import,
|
|
163
|
+
require_pattern). Preferred if the rule can be expressed as regex/glob.
|
|
164
|
+
- `"llm_judge": true` — for nuanced rules that need a model's judgement.
|
|
165
|
+
Deep review still happens via /adr-kit:judge in a Claude Code session.
|
|
166
|
+
- Omit the section AND add a one-line explanation in the ADR body for
|
|
167
|
+
why the rule has no code surface (governance / process / etc.).
|
|
168
|
+
|
|
169
|
+
Schema: schemas/adr-enforcement.schema.json
|
|
170
|
+
Reference example: ADR-NNN in this repo.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Definition of Done for review
|
|
174
|
+
|
|
175
|
+
- [ ] Architecturally significant changes have a linked ADR
|
|
176
|
+
- [ ] ADR link is in the PR description
|
|
177
|
+
- [ ] No `Accepted` ADR is violated, or a superseding ADR is in place
|
|
178
|
+
- [ ] Supersession chain is correct
|
|
179
|
+
- [ ] All four verification gates pass on the ADR
|
|
180
|
+
- [ ] Legacy non-compliance, if any, has a remediation plan
|
|
181
|
+
- [ ] Code comments at non-obvious enforcement sites point at the ADR
|
|
182
|
+
- [ ] New `Accepted` ADRs with a code surface include an `## Enforcement` block (declarative rules OR `"llm_judge": true` OR explicit "no code surface" note)
|
package/opencode/plugin.ts
CHANGED
|
@@ -293,10 +293,7 @@ export default async function AdrKitOpenCodePlugin(
|
|
|
293
293
|
if (options.references !== false && existsSync(join(input.directory, "docs", "adr"))) {
|
|
294
294
|
config.references ||= {}
|
|
295
295
|
if (!config.references["adr-decisions"]) {
|
|
296
|
-
config.references["adr-decisions"] =
|
|
297
|
-
path: join(input.directory, "docs", "adr"),
|
|
298
|
-
description: "Architecture Decision Records. Read returned Markdown before applying a decision.",
|
|
299
|
-
}
|
|
296
|
+
config.references["adr-decisions"] = join(input.directory, "docs", "adr")
|
|
300
297
|
}
|
|
301
298
|
}
|
|
302
299
|
|