@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.
Files changed (82) hide show
  1. package/.claude-plugin/plugin.json +29 -29
  2. package/README.md +861 -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 +0 -0
  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/bump-version +0 -0
  28. package/clients/workflows.json +229 -229
  29. package/hooks/__init__.py +1 -1
  30. package/hooks/adapters/__init__.py +13 -13
  31. package/hooks/adapters/claude.py +27 -27
  32. package/hooks/adapters/codex.py +26 -26
  33. package/hooks/adapters/copilot.py +11 -11
  34. package/hooks/adr-hook.py +128 -128
  35. package/hooks/adr_hook_core.py +843 -843
  36. package/hooks/adr_pr_guard.py +367 -367
  37. package/instructions/ADR-guide.md +48 -48
  38. package/instructions/adr.coding.md +82 -82
  39. package/instructions/adr.review.md +182 -182
  40. package/opencode/plugin.ts +1 -4
  41. package/package.json +5 -2
  42. package/schemas/adr-context-probes.schema.json +56 -56
  43. package/schemas/adr-enforcement.schema.json +57 -57
  44. package/schemas/adr-frontmatter.schema.json +144 -144
  45. package/schemas/adr-index.schema.json +276 -276
  46. package/schemas/adr-kit-config.schema.json +371 -371
  47. package/schemas/adr-readiness.schema.json +41 -41
  48. package/schemas/client-capabilities.schema.json +503 -503
  49. package/schemas/client-certification.schema.json +101 -101
  50. package/schemas/doctor-output.schema.json +92 -92
  51. package/skills/adr/SKILL.md +780 -780
  52. package/skills/audit/SKILL.md +103 -103
  53. package/skills/context/SKILL.md +77 -77
  54. package/skills/grill/SKILL.md +84 -84
  55. package/skills/grill/agents/openai.yaml +4 -4
  56. package/skills/guardian/SKILL.md +316 -316
  57. package/skills/init/SKILL.md +499 -499
  58. package/skills/install-hooks/SKILL.md +154 -154
  59. package/skills/judge/SKILL.md +168 -168
  60. package/skills/lint/SKILL.md +321 -321
  61. package/skills/migrate/SKILL.md +313 -313
  62. package/skills/related/SKILL.md +62 -62
  63. package/skills/retire/SKILL.md +41 -41
  64. package/skills/review/SKILL.md +167 -167
  65. package/skills/settings/SKILL.md +73 -73
  66. package/skills/setup/SKILL.md +128 -128
  67. package/skills/supersede/SKILL.md +136 -136
  68. package/skills/upgrade/SKILL.md +273 -273
  69. package/templates/adr-kit-guide.md +354 -354
  70. package/templates/adr-template.canonical.md +115 -115
  71. package/templates/adr-template.madr.md +131 -131
  72. package/templates/adr-template.md +131 -131
  73. package/templates/adr-template.nygard.md +111 -111
  74. package/templates/cc-settings/guardian-hook-entry.json +9 -9
  75. package/templates/githooks/pre-commit +1 -1
  76. package/templates/github-workflows/adr-audit.yml +58 -58
  77. package/templates/github-workflows/adr-guardian-audit.yml +133 -133
  78. package/templates/github-workflows/adr-index-check.yml +30 -30
  79. package/templates/github-workflows/adr-judge.yml +31 -31
  80. package/templates/github-workflows/adr-readiness.yml +18 -18
  81. package/templates/validate_adr_template.py +38 -38
  82. package/templates/validate_adr_template.sh +74 -74
@@ -1,131 +1,131 @@
1
- ---
2
- id: "ADR-NNN"
3
- title: "Short Imperative Title"
4
- status: "Proposed"
5
- date: "YYYY-MM-DD"
6
- binding: false
7
- gate: null
8
- documents_shipped: false
9
- verified_in: []
10
- supersedes: []
11
- superseded_by: null
12
- format: "madr"
13
- topics: []
14
- aliases: []
15
- components: []
16
- symbols: []
17
- context_scope: "selective"
18
- ---
19
-
20
- <!-- markdownlint-disable MD025 -->
21
-
22
- # ADR-NNN Short Imperative Title
23
-
24
- ## Status
25
-
26
- Proposed, YYYY-MM-DD.
27
-
28
- ## Status History
29
-
30
- ```yaml
31
- status_history:
32
- - date: YYYY-MM-DD
33
- status: Proposed
34
- changed_by: user@example.com
35
- reason: Initial proposal
36
- changed_via: adr-kit
37
- ```
38
-
39
- ## Context and Problem Statement
40
-
41
- State the problem, constraints, and concrete evidence.
42
-
43
- ## Decision Drivers
44
-
45
- * Driver one.
46
- * Driver two.
47
-
48
- ## Considered Options
49
-
50
- * Option A.
51
- * Option B.
52
- * Do nothing, when it is a realistic option.
53
-
54
- ## Decision Outcome
55
-
56
- Chosen option: **Option A**, because state the decisive rationale.
57
-
58
- ### Confirmation
59
-
60
- State how implementation of the decision will be verified.
61
-
62
- ## Decision Contract
63
-
64
- ### Must
65
-
66
- * State required implementation constraints.
67
-
68
- ### Must Not
69
-
70
- * State prohibited implementation choices.
71
-
72
- ### Exceptions
73
-
74
- * State explicit exceptions, or `None`.
75
-
76
- ### Verification
77
-
78
- * Name the test, command, or source anchor that verifies this decision.
79
-
80
- ## Consequences
81
-
82
- ### Positive
83
-
84
- * Expected benefit.
85
-
86
- ### Negative
87
-
88
- * Accepted cost or risk and its mitigation.
89
-
90
- ## Pros and Cons of the Options
91
-
92
- ### Option A
93
-
94
- * Good, because ...
95
- * Bad, because ...
96
-
97
- ### Option B
98
-
99
- * Good, because ...
100
- * Bad, because ...
101
-
102
- ## Open Questions
103
-
104
- List unresolved human decisions as unchecked tasks. Accepted ADRs must have no
105
- unresolved items.
106
-
107
- Answer them with `bin/adr answer`, which rewrites an item as
108
- `- [x] <question> — **Answered <date> by <signer>:** <answer>`. A checked item
109
- is resolved, so it no longer blocks acceptance and stays in the record. Do not
110
- delete an answered question: the reasoning is what a future reader needs in
111
- order to re-evaluate the decision.
112
-
113
- ## Related Decisions
114
-
115
- * None.
116
-
117
- ## References
118
-
119
- * Add at least one verifiable local or external reference.
120
-
121
- ## Enforcement
122
-
123
- Delete this optional section when the decision has no machine-checkable surface.
124
-
125
- ```json
126
- {
127
- "forbid_pattern": [],
128
- "forbid_import": [],
129
- "require_pattern": []
130
- }
131
- ```
1
+ ---
2
+ id: "ADR-NNN"
3
+ title: "Short Imperative Title"
4
+ status: "Proposed"
5
+ date: "YYYY-MM-DD"
6
+ binding: false
7
+ gate: null
8
+ documents_shipped: false
9
+ verified_in: []
10
+ supersedes: []
11
+ superseded_by: null
12
+ format: "madr"
13
+ topics: []
14
+ aliases: []
15
+ components: []
16
+ symbols: []
17
+ context_scope: "selective"
18
+ ---
19
+
20
+ <!-- markdownlint-disable MD025 -->
21
+
22
+ # ADR-NNN Short Imperative Title
23
+
24
+ ## Status
25
+
26
+ Proposed, YYYY-MM-DD.
27
+
28
+ ## Status History
29
+
30
+ ```yaml
31
+ status_history:
32
+ - date: YYYY-MM-DD
33
+ status: Proposed
34
+ changed_by: user@example.com
35
+ reason: Initial proposal
36
+ changed_via: adr-kit
37
+ ```
38
+
39
+ ## Context and Problem Statement
40
+
41
+ State the problem, constraints, and concrete evidence.
42
+
43
+ ## Decision Drivers
44
+
45
+ * Driver one.
46
+ * Driver two.
47
+
48
+ ## Considered Options
49
+
50
+ * Option A.
51
+ * Option B.
52
+ * Do nothing, when it is a realistic option.
53
+
54
+ ## Decision Outcome
55
+
56
+ Chosen option: **Option A**, because state the decisive rationale.
57
+
58
+ ### Confirmation
59
+
60
+ State how implementation of the decision will be verified.
61
+
62
+ ## Decision Contract
63
+
64
+ ### Must
65
+
66
+ * State required implementation constraints.
67
+
68
+ ### Must Not
69
+
70
+ * State prohibited implementation choices.
71
+
72
+ ### Exceptions
73
+
74
+ * State explicit exceptions, or `None`.
75
+
76
+ ### Verification
77
+
78
+ * Name the test, command, or source anchor that verifies this decision.
79
+
80
+ ## Consequences
81
+
82
+ ### Positive
83
+
84
+ * Expected benefit.
85
+
86
+ ### Negative
87
+
88
+ * Accepted cost or risk and its mitigation.
89
+
90
+ ## Pros and Cons of the Options
91
+
92
+ ### Option A
93
+
94
+ * Good, because ...
95
+ * Bad, because ...
96
+
97
+ ### Option B
98
+
99
+ * Good, because ...
100
+ * Bad, because ...
101
+
102
+ ## Open Questions
103
+
104
+ List unresolved human decisions as unchecked tasks. Accepted ADRs must have no
105
+ unresolved items.
106
+
107
+ Answer them with `bin/adr answer`, which rewrites an item as
108
+ `- [x] <question> — **Answered <date> by <signer>:** <answer>`. A checked item
109
+ is resolved, so it no longer blocks acceptance and stays in the record. Do not
110
+ delete an answered question: the reasoning is what a future reader needs in
111
+ order to re-evaluate the decision.
112
+
113
+ ## Related Decisions
114
+
115
+ * None.
116
+
117
+ ## References
118
+
119
+ * Add at least one verifiable local or external reference.
120
+
121
+ ## Enforcement
122
+
123
+ Delete this optional section when the decision has no machine-checkable surface.
124
+
125
+ ```json
126
+ {
127
+ "forbid_pattern": [],
128
+ "forbid_import": [],
129
+ "require_pattern": []
130
+ }
131
+ ```
@@ -1,111 +1,111 @@
1
- ---
2
- id: "ADR-NNN"
3
- title: "Short Imperative Title"
4
- status: "Proposed"
5
- date: "YYYY-MM-DD"
6
- binding: false
7
- gate: null
8
- documents_shipped: false
9
- verified_in: []
10
- supersedes: []
11
- superseded_by: null
12
- format: "nygard"
13
- topics: []
14
- aliases: []
15
- components: []
16
- symbols: []
17
- context_scope: "selective"
18
- ---
19
-
20
- <!-- markdownlint-disable MD025 -->
21
-
22
- # ADR-NNN Short Imperative Title
23
-
24
- ## Status
25
-
26
- Proposed, YYYY-MM-DD.
27
-
28
- ## Status History
29
-
30
- ```yaml
31
- status_history:
32
- - date: YYYY-MM-DD
33
- status: Proposed
34
- changed_by: user@example.com
35
- reason: Initial proposal
36
- changed_via: adr-kit
37
- ```
38
-
39
- ## Context
40
-
41
- Describe the forces at play in value-neutral language with concrete evidence.
42
-
43
- ## Decision
44
-
45
- State the response to those forces in active voice: "We will ...".
46
-
47
- ## Decision Contract
48
-
49
- ### Must
50
-
51
- - State required implementation constraints.
52
-
53
- ### Must Not
54
-
55
- - State prohibited implementation choices.
56
-
57
- ### Exceptions
58
-
59
- - State explicit exceptions, or `None`.
60
-
61
- ### Verification
62
-
63
- - Name the test, command, or source anchor that verifies this decision.
64
-
65
- ## Consequences
66
-
67
- **Positive:**
68
-
69
- - Expected benefit.
70
-
71
- **Negative:**
72
-
73
- - Accepted cost or risk and its mitigation.
74
-
75
- ## Alternatives Considered
76
-
77
- adr-kit extension for deterministic completeness:
78
-
79
- - **Alternative A.** Rejection reason.
80
- - **Alternative B.** Rejection reason.
81
-
82
- ## Open Questions
83
-
84
- List unresolved human decisions as unchecked tasks. Accepted ADRs must have no
85
- unresolved items.
86
-
87
- Answer them with `bin/adr answer`, which rewrites an item as
88
- `- [x] <question> — **Answered <date> by <signer>:** <answer>`. A checked item
89
- is resolved, so it no longer blocks acceptance and stays in the record. Do not
90
- delete an answered question: the reasoning is what a future reader needs in
91
- order to re-evaluate the decision.
92
-
93
- ## Related Decisions
94
-
95
- - None.
96
-
97
- ## References
98
-
99
- - Add at least one verifiable local or external reference.
100
-
101
- ## Enforcement
102
-
103
- Delete this optional adr-kit extension when no machine-checkable rule applies.
104
-
105
- ```json
106
- {
107
- "forbid_pattern": [],
108
- "forbid_import": [],
109
- "require_pattern": []
110
- }
111
- ```
1
+ ---
2
+ id: "ADR-NNN"
3
+ title: "Short Imperative Title"
4
+ status: "Proposed"
5
+ date: "YYYY-MM-DD"
6
+ binding: false
7
+ gate: null
8
+ documents_shipped: false
9
+ verified_in: []
10
+ supersedes: []
11
+ superseded_by: null
12
+ format: "nygard"
13
+ topics: []
14
+ aliases: []
15
+ components: []
16
+ symbols: []
17
+ context_scope: "selective"
18
+ ---
19
+
20
+ <!-- markdownlint-disable MD025 -->
21
+
22
+ # ADR-NNN Short Imperative Title
23
+
24
+ ## Status
25
+
26
+ Proposed, YYYY-MM-DD.
27
+
28
+ ## Status History
29
+
30
+ ```yaml
31
+ status_history:
32
+ - date: YYYY-MM-DD
33
+ status: Proposed
34
+ changed_by: user@example.com
35
+ reason: Initial proposal
36
+ changed_via: adr-kit
37
+ ```
38
+
39
+ ## Context
40
+
41
+ Describe the forces at play in value-neutral language with concrete evidence.
42
+
43
+ ## Decision
44
+
45
+ State the response to those forces in active voice: "We will ...".
46
+
47
+ ## Decision Contract
48
+
49
+ ### Must
50
+
51
+ - State required implementation constraints.
52
+
53
+ ### Must Not
54
+
55
+ - State prohibited implementation choices.
56
+
57
+ ### Exceptions
58
+
59
+ - State explicit exceptions, or `None`.
60
+
61
+ ### Verification
62
+
63
+ - Name the test, command, or source anchor that verifies this decision.
64
+
65
+ ## Consequences
66
+
67
+ **Positive:**
68
+
69
+ - Expected benefit.
70
+
71
+ **Negative:**
72
+
73
+ - Accepted cost or risk and its mitigation.
74
+
75
+ ## Alternatives Considered
76
+
77
+ adr-kit extension for deterministic completeness:
78
+
79
+ - **Alternative A.** Rejection reason.
80
+ - **Alternative B.** Rejection reason.
81
+
82
+ ## Open Questions
83
+
84
+ List unresolved human decisions as unchecked tasks. Accepted ADRs must have no
85
+ unresolved items.
86
+
87
+ Answer them with `bin/adr answer`, which rewrites an item as
88
+ `- [x] <question> — **Answered <date> by <signer>:** <answer>`. A checked item
89
+ is resolved, so it no longer blocks acceptance and stays in the record. Do not
90
+ delete an answered question: the reasoning is what a future reader needs in
91
+ order to re-evaluate the decision.
92
+
93
+ ## Related Decisions
94
+
95
+ - None.
96
+
97
+ ## References
98
+
99
+ - Add at least one verifiable local or external reference.
100
+
101
+ ## Enforcement
102
+
103
+ Delete this optional adr-kit extension when no machine-checkable rule applies.
104
+
105
+ ```json
106
+ {
107
+ "forbid_pattern": [],
108
+ "forbid_import": [],
109
+ "require_pattern": []
110
+ }
111
+ ```
@@ -1,9 +1,9 @@
1
- {
2
- "_comment": "ADR Guardian SessionStart hook entry for .claude/settings.json",
3
- "_note": "Add this entry under hooks.SessionStart[0].hooks[] in the project's .claude/settings.json.",
4
- "_remove_marker": "adr-guardian-session-start",
5
- "_wrapper_version": "0.52.0",
6
- "type": "command",
7
- "command": "ADR_KIT=$(ls -d ~/.claude/plugins/cache/rvdbreemen-adr-kit/adr-kit/*/ 2>/dev/null | sort -V | tail -1) && [ -n \"$ADR_KIT\" ] && _PY=$(command -v python3 || command -v python || command -v py) && [ -n \"$_PY\" ] && \"$_PY\" \"$ADR_KIT/bin/adr-guardian\" check 2>/dev/null || true",
8
- "timeout": 10
9
- }
1
+ {
2
+ "_comment": "ADR Guardian SessionStart hook entry for .claude/settings.json",
3
+ "_note": "Add this entry under hooks.SessionStart[0].hooks[] in the project's .claude/settings.json.",
4
+ "_remove_marker": "adr-guardian-session-start",
5
+ "_wrapper_version": "0.52.2",
6
+ "type": "command",
7
+ "command": "ADR_KIT=$(ls -d ~/.claude/plugins/cache/rvdbreemen-adr-kit/adr-kit/*/ 2>/dev/null | sort -V | tail -1) && [ -n \"$ADR_KIT\" ] && _PY=$(command -v python3 || command -v python || command -v py) && [ -n \"$_PY\" ] && \"$_PY\" \"$ADR_KIT/bin/adr-guardian\" check 2>/dev/null || true",
8
+ "timeout": 10
9
+ }
@@ -52,7 +52,7 @@ set -e
52
52
  # freezes at install time. adr-guardian compares this stamp against the
53
53
  # installed plugin version and nudges /adr-kit:upgrade when the wrapper lags.
54
54
  # Maintained by scripts/bump-version.py; do not edit by hand.
55
- ADR_KIT_WRAPPER_VERSION="0.52.0"
55
+ ADR_KIT_WRAPPER_VERSION="0.52.2"
56
56
 
57
57
  if [ "${ADR_KIT_HOOK_DISABLE:-0}" = "1" ]; then
58
58
  echo "[adr-kit] hook disabled for this commit (ADR_KIT_HOOK_DISABLE=1)" >&2
@@ -1,58 +1,58 @@
1
- # Whole-codebase ADR audit.
2
- #
3
- # The per-diff gates answer "does this change violate a decision?". None of them
4
- # answers "does the code as it stands today obey the decisions as they stand
5
- # today", because a rule added after a file was written has never been applied to
6
- # that file. This workflow asks that question on a cadence.
7
- #
8
- # Mechanically it is a diff against the empty tree, so every line reads as added
9
- # and forbid rules reach the whole repository. That diff is large by
10
- # construction, which is what the separate budget is for.
11
- #
12
- # Report-only by design: it opens or updates one issue and never fails the run.
13
- # A weekly sweep that turns the default branch red for a pre-existing violation
14
- # teaches people to ignore it.
15
- name: adr-audit
16
-
17
- on:
18
- schedule:
19
- - cron: "0 6 * * 1"
20
- workflow_dispatch:
21
-
22
- permissions:
23
- contents: read
24
- issues: write
25
-
26
- jobs:
27
- audit:
28
- name: whole-codebase audit
29
- runs-on: ubuntu-latest
30
- steps:
31
- - uses: actions/checkout@v4
32
- with:
33
- fetch-depth: 0
34
-
35
- - uses: actions/setup-python@v5
36
- with:
37
- python-version: '3.11'
38
-
39
- - name: Audit the decisions and the code
40
- id: audit
41
- run: |
42
- set +e
43
- python bin/adr-audit --whole-codebase --gates all --format text \
44
- > "$RUNNER_TEMP/audit.txt" 2>&1
45
- echo "exit_code=$?" >> "$GITHUB_OUTPUT"
46
- set -e
47
- cat "$RUNNER_TEMP/audit.txt"
48
-
49
- - name: Explain the verdict
50
- run: |
51
- case "${{ steps.audit.outputs.exit_code }}" in
52
- 0) echo "On course." ;;
53
- 1) echo "The code violates an Accepted ADR. Owner: whoever wrote the code." ;;
54
- 3) echo "The ADR set fails its own gates. Owner: whoever wrote the records." ;;
55
- 4) echo "Both: the code violates an ADR and the records fail their gates." ;;
56
- 2) echo "The audit could not run. Owner: whoever installed it." ;;
57
- *) echo "Unrecognised exit code." ;;
58
- esac
1
+ # Whole-codebase ADR audit.
2
+ #
3
+ # The per-diff gates answer "does this change violate a decision?". None of them
4
+ # answers "does the code as it stands today obey the decisions as they stand
5
+ # today", because a rule added after a file was written has never been applied to
6
+ # that file. This workflow asks that question on a cadence.
7
+ #
8
+ # Mechanically it is a diff against the empty tree, so every line reads as added
9
+ # and forbid rules reach the whole repository. That diff is large by
10
+ # construction, which is what the separate budget is for.
11
+ #
12
+ # Report-only by design: it opens or updates one issue and never fails the run.
13
+ # A weekly sweep that turns the default branch red for a pre-existing violation
14
+ # teaches people to ignore it.
15
+ name: adr-audit
16
+
17
+ on:
18
+ schedule:
19
+ - cron: "0 6 * * 1"
20
+ workflow_dispatch:
21
+
22
+ permissions:
23
+ contents: read
24
+ issues: write
25
+
26
+ jobs:
27
+ audit:
28
+ name: whole-codebase audit
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ with:
33
+ fetch-depth: 0
34
+
35
+ - uses: actions/setup-python@v5
36
+ with:
37
+ python-version: '3.11'
38
+
39
+ - name: Audit the decisions and the code
40
+ id: audit
41
+ run: |
42
+ set +e
43
+ python bin/adr-audit --whole-codebase --gates all --format text \
44
+ > "$RUNNER_TEMP/audit.txt" 2>&1
45
+ echo "exit_code=$?" >> "$GITHUB_OUTPUT"
46
+ set -e
47
+ cat "$RUNNER_TEMP/audit.txt"
48
+
49
+ - name: Explain the verdict
50
+ run: |
51
+ case "${{ steps.audit.outputs.exit_code }}" in
52
+ 0) echo "On course." ;;
53
+ 1) echo "The code violates an Accepted ADR. Owner: whoever wrote the code." ;;
54
+ 3) echo "The ADR set fails its own gates. Owner: whoever wrote the records." ;;
55
+ 4) echo "Both: the code violates an ADR and the records fail their gates." ;;
56
+ 2) echo "The audit could not run. Owner: whoever installed it." ;;
57
+ *) echo "Unrecognised exit code." ;;
58
+ esac