@rvdbreemen/adr-kit-opencode 0.52.0 → 0.53.0

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.
Files changed (83) hide show
  1. package/.claude-plugin/plugin.json +29 -29
  2. package/README.md +865 -850
  3. package/bin/adr +0 -0
  4. package/bin/adr-audit +0 -0
  5. package/bin/adr-context +0 -0
  6. package/bin/adr-discover +0 -0
  7. package/bin/adr-doctor +0 -0
  8. package/bin/adr-generate-scripts +0 -0
  9. package/bin/adr-grill-signal +0 -0
  10. package/bin/adr-guardian +0 -0
  11. package/bin/adr-index +0 -0
  12. package/bin/adr-judge +0 -0
  13. package/bin/adr-judge-precommit +0 -0
  14. package/bin/adr-lint +0 -0
  15. package/bin/adr-mcp +96 -4
  16. package/bin/adr-migrate +0 -0
  17. package/bin/adr-quality +0 -0
  18. package/bin/adr-readiness +0 -0
  19. package/bin/adr-readiness-ci +0 -0
  20. package/bin/adr-related +0 -0
  21. package/bin/adr-renumber +254 -254
  22. package/bin/adr-retire +0 -0
  23. package/bin/adr-settings +0 -0
  24. package/bin/adr-status +0 -0
  25. package/bin/adr-suggest +0 -0
  26. package/bin/adr-watch +0 -0
  27. package/bin/adr_doctor_probes.py +2 -0
  28. package/bin/bump-version +0 -0
  29. package/clients/workflows.json +229 -229
  30. package/hooks/__init__.py +1 -1
  31. package/hooks/adapters/__init__.py +13 -13
  32. package/hooks/adapters/claude.py +27 -27
  33. package/hooks/adapters/codex.py +26 -26
  34. package/hooks/adapters/copilot.py +11 -11
  35. package/hooks/adr-hook.py +128 -128
  36. package/hooks/adr_hook_core.py +843 -843
  37. package/hooks/adr_pr_guard.py +367 -367
  38. package/instructions/ADR-guide.md +101 -48
  39. package/instructions/adr.coding.md +82 -82
  40. package/instructions/adr.review.md +182 -182
  41. package/opencode/plugin.ts +1 -4
  42. package/package.json +5 -2
  43. package/schemas/adr-context-probes.schema.json +56 -56
  44. package/schemas/adr-enforcement.schema.json +57 -57
  45. package/schemas/adr-frontmatter.schema.json +144 -144
  46. package/schemas/adr-index.schema.json +276 -276
  47. package/schemas/adr-kit-config.schema.json +371 -371
  48. package/schemas/adr-readiness.schema.json +41 -41
  49. package/schemas/client-capabilities.schema.json +503 -503
  50. package/schemas/client-certification.schema.json +101 -101
  51. package/schemas/doctor-output.schema.json +92 -92
  52. package/skills/adr/SKILL.md +780 -780
  53. package/skills/audit/SKILL.md +103 -103
  54. package/skills/context/SKILL.md +77 -77
  55. package/skills/grill/SKILL.md +84 -84
  56. package/skills/grill/agents/openai.yaml +4 -4
  57. package/skills/guardian/SKILL.md +316 -316
  58. package/skills/init/SKILL.md +499 -499
  59. package/skills/install-hooks/SKILL.md +154 -154
  60. package/skills/judge/SKILL.md +168 -168
  61. package/skills/lint/SKILL.md +321 -321
  62. package/skills/migrate/SKILL.md +313 -313
  63. package/skills/related/SKILL.md +62 -62
  64. package/skills/retire/SKILL.md +41 -41
  65. package/skills/review/SKILL.md +167 -167
  66. package/skills/settings/SKILL.md +73 -73
  67. package/skills/setup/SKILL.md +128 -128
  68. package/skills/supersede/SKILL.md +136 -136
  69. package/skills/upgrade/SKILL.md +273 -273
  70. package/templates/adr-kit-guide.md +354 -354
  71. package/templates/adr-template.canonical.md +115 -115
  72. package/templates/adr-template.madr.md +131 -131
  73. package/templates/adr-template.md +131 -131
  74. package/templates/adr-template.nygard.md +111 -111
  75. package/templates/cc-settings/guardian-hook-entry.json +9 -9
  76. package/templates/githooks/pre-commit +1 -1
  77. package/templates/github-workflows/adr-audit.yml +58 -58
  78. package/templates/github-workflows/adr-guardian-audit.yml +133 -133
  79. package/templates/github-workflows/adr-index-check.yml +30 -30
  80. package/templates/github-workflows/adr-judge.yml +31 -31
  81. package/templates/github-workflows/adr-readiness.yml +18 -18
  82. package/templates/validate_adr_template.py +38 -38
  83. 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.