@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,136 +1,136 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: supersede
|
|
3
|
-
description: "Supersede an Accepted ADR while preserving history and links. Use for replacing a decision, successor ADRs, or changed architecture."
|
|
4
|
-
argument-hint: "[ADR id to supersede; e.g. \"ADR-007\"]"
|
|
5
|
-
license: MIT
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
allowed-tools: [Read, Bash, Edit, Write, Task]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# adr-kit supersede
|
|
11
|
-
|
|
12
|
-
Use `$ARGUMENTS` as the required ADR id. Ask for the id when it is empty and
|
|
13
|
-
never infer a destructive target.
|
|
14
|
-
|
|
15
|
-
You are running `/adr-kit:supersede`. Purpose: replace an existing decision
|
|
16
|
-
with a new one without rewriting history. The old ADR's reasoning stays
|
|
17
|
-
immutable; only its Status line changes and its Status History grows by one
|
|
18
|
-
entry. Everything else lands in the new ADR.
|
|
19
|
-
|
|
20
|
-
Resolve the plugin path once and reuse it:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
ADR_KIT=$(ls -d ~/.claude/plugins/cache/rvdbreemen-adr-kit/adr-kit/*/ | sort -V | tail -1)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Step 1 - Identify the target and show its graph
|
|
27
|
-
|
|
28
|
-
1. Take the ADR id from the argument; if absent, ask which ADR to supersede.
|
|
29
|
-
2. Run the graph tool on it and show the user the result:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
python "$ADR_KIT/bin/adr-related" ADR-OLD --format json
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Present inbound edges explicitly: these are the ADRs that point at the
|
|
36
|
-
target and may need their Related Decisions updated after supersession.
|
|
37
|
-
Flag any dangling references already present.
|
|
38
|
-
|
|
39
|
-
3. **Conflict guard (hard stop).** Read the old ADR. If its Status line
|
|
40
|
-
already says `Superseded by ADR-X` where X is NOT the ADR you are about to
|
|
41
|
-
create, stop and surface the conflict to the user verbatim. Never
|
|
42
|
-
overwrite an existing supersession pointer; the user must resolve the
|
|
43
|
-
chain (perhaps the right move is superseding ADR-X instead).
|
|
44
|
-
|
|
45
|
-
4. Confirm with the user: "Supersede ADR-OLD (<title>) with a new ADR about
|
|
46
|
-
<reason>?" Do not proceed without a yes.
|
|
47
|
-
|
|
48
|
-
## Step 2 - Draft the superseding ADR (Proposed)
|
|
49
|
-
|
|
50
|
-
Before drafting, run `/adr-kit:grill --revalidate ADR-OLD`. Revalidation covers
|
|
51
|
-
changed forces, alternatives, migration, consequences, new evidence, and impact
|
|
52
|
-
on related ADRs. It supports unchanged, Proposed successor, reject-candidate,
|
|
53
|
-
and explicit defer outcomes. Never rewrite Accepted prose.
|
|
54
|
-
|
|
55
|
-
Determine the next free ADR number (highest existing + 1, no gaps, no reuse).
|
|
56
|
-
Invoke the `adr-generator` subagent with:
|
|
57
|
-
|
|
58
|
-
- The user's stated reason for the change as Context input.
|
|
59
|
-
- The old ADR's Decision text as background (what is being replaced and why
|
|
60
|
-
it no longer holds).
|
|
61
|
-
- An explicit instruction to include in `## Related Decisions`:
|
|
62
|
-
`- **ADR-OLD (<old title>)**: Supersedes ADR-OLD.`
|
|
63
|
-
- `Status: Proposed` with today's date, and a `status_history` entry:
|
|
64
|
-
|
|
65
|
-
```yaml
|
|
66
|
-
status_history:
|
|
67
|
-
- date: YYYY-MM-DD
|
|
68
|
-
status: Proposed
|
|
69
|
-
changed_by: <user>
|
|
70
|
-
reason: Drafted to supersede ADR-OLD
|
|
71
|
-
changed_via: adr-kit /adr-kit:supersede
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Show the draft to the user. **Never auto-accept it.** The user reviews and
|
|
75
|
-
may iterate; the new ADR is only flipped to `Accepted` (by the user or on
|
|
76
|
-
their explicit instruction) before the old one is touched.
|
|
77
|
-
|
|
78
|
-
Show the complete acceptance packet and require an explicit `yes` in this
|
|
79
|
-
active session before invoking `adr accept ... --confirm`. A failure or
|
|
80
|
-
interruption stops
|
|
81
|
-
before `adr supersede`, leaving the old ADR and reciprocal links unchanged.
|
|
82
|
-
|
|
83
|
-
## Step 3 - Supersede transactionally (only after approval)
|
|
84
|
-
|
|
85
|
-
Only after the user has approved the new ADR-NEW:
|
|
86
|
-
|
|
87
|
-
1. Ensure ADR-NEW is Accepted through `python "$ADR_KIT/bin/adr" accept
|
|
88
|
-
ADR-NEW --adr-dir docs/adr`. Acceptance is blocked unless all verification
|
|
89
|
-
gates pass.
|
|
90
|
-
2. Run the only supported reciprocal mutation:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
python "$ADR_KIT/bin/adr" supersede ADR-OLD --by ADR-NEW \
|
|
94
|
-
--adr-dir docs/adr --changed-by "<user>" \
|
|
95
|
-
--reason "Superseded by ADR-NEW (<new title>)"
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
The command rejects illegal or conflicting chains before mutation. It
|
|
99
|
-
atomically updates both ADRs and all generated index views, and restores
|
|
100
|
-
their original bytes if any write or index refresh fails. Never reproduce
|
|
101
|
-
these edits manually.
|
|
102
|
-
3. If inbound ADRs from Step 1 reference the old decision, list them and offer
|
|
103
|
-
a note pointing at ADR-NEW. Apply only entries the user approves.
|
|
104
|
-
|
|
105
|
-
## Step 4 - Verify the chain
|
|
106
|
-
|
|
107
|
-
Run all three and show the results:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
python "$ADR_KIT/bin/adr-related" ADR-OLD --format json
|
|
111
|
-
python "$ADR_KIT/bin/adr-related" ADR-NEW --format json
|
|
112
|
-
python "$ADR_KIT/bin/adr-lint" docs/adr/
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
The chain is clean when:
|
|
116
|
-
|
|
117
|
-
- ADR-OLD shows outbound `superseded-by -> ADR-NEW` and ADR-NEW shows
|
|
118
|
-
outbound `supersedes -> ADR-OLD` (and inbound mirrors of each other).
|
|
119
|
-
- Neither graph reports dangling references.
|
|
120
|
-
- adr-lint reports no FAIL on either file.
|
|
121
|
-
|
|
122
|
-
If any check fails, fix the link wiring (not the old ADR's prose) and re-run
|
|
123
|
-
until clean. Report the final state to the user.
|
|
124
|
-
|
|
125
|
-
## Boundaries
|
|
126
|
-
|
|
127
|
-
- **Immutability.** The only allowed edits to the old ADR are the Status line
|
|
128
|
-
flip and appended status history performed by the lifecycle command.
|
|
129
|
-
- **Conflict guard.** An existing `Superseded by` pointing at a different ADR
|
|
130
|
-
is a stop-the-line conflict. Surface it; never overwrite.
|
|
131
|
-
- **No auto-accept.** The new ADR starts as Proposed and a human approves it.
|
|
132
|
-
Do not flip it to Accepted on your own initiative.
|
|
133
|
-
- **No silent edits to third ADRs.** Updating inbound referencers happens
|
|
134
|
-
only per-entry with user approval.
|
|
135
|
-
- **Verification is part of the job.** Do not declare the supersession done
|
|
136
|
-
before Step 4 is clean.
|
|
1
|
+
---
|
|
2
|
+
name: supersede
|
|
3
|
+
description: "Supersede an Accepted ADR while preserving history and links. Use for replacing a decision, successor ADRs, or changed architecture."
|
|
4
|
+
argument-hint: "[ADR id to supersede; e.g. \"ADR-007\"]"
|
|
5
|
+
license: MIT
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
allowed-tools: [Read, Bash, Edit, Write, Task]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# adr-kit supersede
|
|
11
|
+
|
|
12
|
+
Use `$ARGUMENTS` as the required ADR id. Ask for the id when it is empty and
|
|
13
|
+
never infer a destructive target.
|
|
14
|
+
|
|
15
|
+
You are running `/adr-kit:supersede`. Purpose: replace an existing decision
|
|
16
|
+
with a new one without rewriting history. The old ADR's reasoning stays
|
|
17
|
+
immutable; only its Status line changes and its Status History grows by one
|
|
18
|
+
entry. Everything else lands in the new ADR.
|
|
19
|
+
|
|
20
|
+
Resolve the plugin path once and reuse it:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
ADR_KIT=$(ls -d ~/.claude/plugins/cache/rvdbreemen-adr-kit/adr-kit/*/ | sort -V | tail -1)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Step 1 - Identify the target and show its graph
|
|
27
|
+
|
|
28
|
+
1. Take the ADR id from the argument; if absent, ask which ADR to supersede.
|
|
29
|
+
2. Run the graph tool on it and show the user the result:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python "$ADR_KIT/bin/adr-related" ADR-OLD --format json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Present inbound edges explicitly: these are the ADRs that point at the
|
|
36
|
+
target and may need their Related Decisions updated after supersession.
|
|
37
|
+
Flag any dangling references already present.
|
|
38
|
+
|
|
39
|
+
3. **Conflict guard (hard stop).** Read the old ADR. If its Status line
|
|
40
|
+
already says `Superseded by ADR-X` where X is NOT the ADR you are about to
|
|
41
|
+
create, stop and surface the conflict to the user verbatim. Never
|
|
42
|
+
overwrite an existing supersession pointer; the user must resolve the
|
|
43
|
+
chain (perhaps the right move is superseding ADR-X instead).
|
|
44
|
+
|
|
45
|
+
4. Confirm with the user: "Supersede ADR-OLD (<title>) with a new ADR about
|
|
46
|
+
<reason>?" Do not proceed without a yes.
|
|
47
|
+
|
|
48
|
+
## Step 2 - Draft the superseding ADR (Proposed)
|
|
49
|
+
|
|
50
|
+
Before drafting, run `/adr-kit:grill --revalidate ADR-OLD`. Revalidation covers
|
|
51
|
+
changed forces, alternatives, migration, consequences, new evidence, and impact
|
|
52
|
+
on related ADRs. It supports unchanged, Proposed successor, reject-candidate,
|
|
53
|
+
and explicit defer outcomes. Never rewrite Accepted prose.
|
|
54
|
+
|
|
55
|
+
Determine the next free ADR number (highest existing + 1, no gaps, no reuse).
|
|
56
|
+
Invoke the `adr-generator` subagent with:
|
|
57
|
+
|
|
58
|
+
- The user's stated reason for the change as Context input.
|
|
59
|
+
- The old ADR's Decision text as background (what is being replaced and why
|
|
60
|
+
it no longer holds).
|
|
61
|
+
- An explicit instruction to include in `## Related Decisions`:
|
|
62
|
+
`- **ADR-OLD (<old title>)**: Supersedes ADR-OLD.`
|
|
63
|
+
- `Status: Proposed` with today's date, and a `status_history` entry:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
status_history:
|
|
67
|
+
- date: YYYY-MM-DD
|
|
68
|
+
status: Proposed
|
|
69
|
+
changed_by: <user>
|
|
70
|
+
reason: Drafted to supersede ADR-OLD
|
|
71
|
+
changed_via: adr-kit /adr-kit:supersede
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Show the draft to the user. **Never auto-accept it.** The user reviews and
|
|
75
|
+
may iterate; the new ADR is only flipped to `Accepted` (by the user or on
|
|
76
|
+
their explicit instruction) before the old one is touched.
|
|
77
|
+
|
|
78
|
+
Show the complete acceptance packet and require an explicit `yes` in this
|
|
79
|
+
active session before invoking `adr accept ... --confirm`. A failure or
|
|
80
|
+
interruption stops
|
|
81
|
+
before `adr supersede`, leaving the old ADR and reciprocal links unchanged.
|
|
82
|
+
|
|
83
|
+
## Step 3 - Supersede transactionally (only after approval)
|
|
84
|
+
|
|
85
|
+
Only after the user has approved the new ADR-NEW:
|
|
86
|
+
|
|
87
|
+
1. Ensure ADR-NEW is Accepted through `python "$ADR_KIT/bin/adr" accept
|
|
88
|
+
ADR-NEW --adr-dir docs/adr`. Acceptance is blocked unless all verification
|
|
89
|
+
gates pass.
|
|
90
|
+
2. Run the only supported reciprocal mutation:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
python "$ADR_KIT/bin/adr" supersede ADR-OLD --by ADR-NEW \
|
|
94
|
+
--adr-dir docs/adr --changed-by "<user>" \
|
|
95
|
+
--reason "Superseded by ADR-NEW (<new title>)"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The command rejects illegal or conflicting chains before mutation. It
|
|
99
|
+
atomically updates both ADRs and all generated index views, and restores
|
|
100
|
+
their original bytes if any write or index refresh fails. Never reproduce
|
|
101
|
+
these edits manually.
|
|
102
|
+
3. If inbound ADRs from Step 1 reference the old decision, list them and offer
|
|
103
|
+
a note pointing at ADR-NEW. Apply only entries the user approves.
|
|
104
|
+
|
|
105
|
+
## Step 4 - Verify the chain
|
|
106
|
+
|
|
107
|
+
Run all three and show the results:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python "$ADR_KIT/bin/adr-related" ADR-OLD --format json
|
|
111
|
+
python "$ADR_KIT/bin/adr-related" ADR-NEW --format json
|
|
112
|
+
python "$ADR_KIT/bin/adr-lint" docs/adr/
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The chain is clean when:
|
|
116
|
+
|
|
117
|
+
- ADR-OLD shows outbound `superseded-by -> ADR-NEW` and ADR-NEW shows
|
|
118
|
+
outbound `supersedes -> ADR-OLD` (and inbound mirrors of each other).
|
|
119
|
+
- Neither graph reports dangling references.
|
|
120
|
+
- adr-lint reports no FAIL on either file.
|
|
121
|
+
|
|
122
|
+
If any check fails, fix the link wiring (not the old ADR's prose) and re-run
|
|
123
|
+
until clean. Report the final state to the user.
|
|
124
|
+
|
|
125
|
+
## Boundaries
|
|
126
|
+
|
|
127
|
+
- **Immutability.** The only allowed edits to the old ADR are the Status line
|
|
128
|
+
flip and appended status history performed by the lifecycle command.
|
|
129
|
+
- **Conflict guard.** An existing `Superseded by` pointing at a different ADR
|
|
130
|
+
is a stop-the-line conflict. Surface it; never overwrite.
|
|
131
|
+
- **No auto-accept.** The new ADR starts as Proposed and a human approves it.
|
|
132
|
+
Do not flip it to Accepted on your own initiative.
|
|
133
|
+
- **No silent edits to third ADRs.** Updating inbound referencers happens
|
|
134
|
+
only per-entry with user approval.
|
|
135
|
+
- **Verification is part of the job.** Do not declare the supersession done
|
|
136
|
+
before Step 4 is clean.
|