@rvdbreemen/adr-kit-opencode 0.59.0 → 0.59.1
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 +1 -1
- package/README.md +3 -3
- package/instructions/ADR-guide.md +1 -1
- package/package.json +1 -1
- package/templates/adr-kit-guide.md +1 -1
- package/templates/cc-settings/guardian-hook-entry.json +1 -1
- package/templates/githooks/pre-commit +24 -12
- package/templates/github-workflows/adr-readiness.yml +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adr-kit",
|
|
3
3
|
"description": "Architecture Decision Record toolkit for AI coding agents: bootstrap, multi-format authoring, bounded deterministic enforcement, lifecycle workflows, context injection, generated graph indexes, and local health checks.",
|
|
4
|
-
"version": "0.59.
|
|
4
|
+
"version": "0.59.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Robert van den Breemen",
|
|
7
7
|
"url": "https://github.com/rvdbreemen"
|
package/README.md
CHANGED
|
@@ -314,7 +314,7 @@ For another project, use the published package:
|
|
|
314
314
|
```json
|
|
315
315
|
{
|
|
316
316
|
"$schema": "https://opencode.ai/config.json",
|
|
317
|
-
"plugin": ["@rvdbreemen/adr-kit-opencode@0.59.
|
|
317
|
+
"plugin": ["@rvdbreemen/adr-kit-opencode@0.59.1"]
|
|
318
318
|
}
|
|
319
319
|
```
|
|
320
320
|
|
|
@@ -673,7 +673,7 @@ jobs:
|
|
|
673
673
|
- uses: actions/checkout@v4
|
|
674
674
|
with:
|
|
675
675
|
fetch-depth: 0 # both sides of the diff must be available
|
|
676
|
-
- uses: rvdbreemen/adr-kit/.github/actions/adr-judge@v0.59.
|
|
676
|
+
- uses: rvdbreemen/adr-kit/.github/actions/adr-judge@v0.59.1
|
|
677
677
|
with:
|
|
678
678
|
adr-dir: docs/adr/
|
|
679
679
|
```
|
|
@@ -687,7 +687,7 @@ The action also takes `max-diff-bytes` (default 32 MiB, available from the relea
|
|
|
687
687
|
```yaml
|
|
688
688
|
repos:
|
|
689
689
|
- repo: https://github.com/rvdbreemen/adr-kit
|
|
690
|
-
rev: v0.59.
|
|
690
|
+
rev: v0.59.1
|
|
691
691
|
hooks:
|
|
692
692
|
- id: adr-judge
|
|
693
693
|
```
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- adr-kit-guide v0.59.
|
|
1
|
+
<!-- adr-kit-guide v0.59.1 -->
|
|
2
2
|
<!-- Canonical project-side ADR guide. Copied from the plugin's templates/adr-kit-guide.md to .claude/adr-kit-guide.md by /adr-kit:init, /adr-kit:upgrade, and /adr-kit:setup. -->
|
|
3
3
|
<!-- This file is plain markdown — readable by Claude Code, headless `claude -p`, shell scripts in pre-commit hooks, evaluator scripts, and any agent that doesn't process @-imports. Do not embed Claude-Code-specific syntax inside this file. -->
|
|
4
4
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_comment": "ADR Guardian SessionStart hook entry for .claude/settings.json",
|
|
3
3
|
"_note": "Add this entry under hooks.SessionStart[0].hooks[] in the project's .claude/settings.json.",
|
|
4
4
|
"_remove_marker": "adr-guardian-session-start",
|
|
5
|
-
"_wrapper_version": "0.59.
|
|
5
|
+
"_wrapper_version": "0.59.1",
|
|
6
6
|
"type": "command",
|
|
7
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
8
|
"timeout": 10
|
|
@@ -52,28 +52,41 @@ 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.59.
|
|
55
|
+
ADR_KIT_WRAPPER_VERSION="0.59.1"
|
|
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
|
|
59
59
|
exit 0
|
|
60
60
|
fi
|
|
61
61
|
|
|
62
|
-
#
|
|
62
|
+
# Find a Python 3.10+ — adr-judge needs it. Ask each candidate for its own
|
|
63
|
+
# version and keep searching past one that is too old, so python3=3.9 next to
|
|
64
|
+
# python=3.12 selects 3.12 instead of failing (issue #155). tr strips the CR a
|
|
65
|
+
# Windows interpreter appends.
|
|
63
66
|
_PYTHON3=""
|
|
64
67
|
for _cmd in python3 python py; do
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
command -v "$_cmd" >/dev/null 2>&1 || continue
|
|
69
|
+
_ver=$("$_cmd" -c 'import sys; print("%d %d" % sys.version_info[:2])' 2>/dev/null | tr -d '\r') || continue
|
|
70
|
+
_major=${_ver%% *}
|
|
71
|
+
_minor=${_ver#* }
|
|
72
|
+
if [ "${_major:-0}" -gt 3 ] 2>/dev/null ||
|
|
73
|
+
{ [ "${_major:-0}" -eq 3 ] && [ "${_minor:-0}" -ge 10 ]; } 2>/dev/null; then
|
|
74
|
+
_PYTHON3="$_cmd"
|
|
75
|
+
break
|
|
72
76
|
fi
|
|
73
77
|
done
|
|
74
78
|
|
|
79
|
+
# True when version $1 >= $2, compared field by field as numbers. Uses the
|
|
80
|
+
# Python found above instead of GNU sort's version mode, which is not portable
|
|
81
|
+
# (issue #155).
|
|
82
|
+
_version_ge() {
|
|
83
|
+
"$_PYTHON3" -c 'import re, sys
|
|
84
|
+
key = lambda v: [int(x) for x in re.findall(r"\d+", v)]
|
|
85
|
+
sys.exit(0 if key(sys.argv[1]) >= key(sys.argv[2]) else 1)' "$1" "$2"
|
|
86
|
+
}
|
|
87
|
+
|
|
75
88
|
if [ -z "$_PYTHON3" ]; then
|
|
76
|
-
echo "[adr-kit] ERROR: Python 3 not found. adr-judge requires Python 3.10+." >&2
|
|
89
|
+
echo "[adr-kit] ERROR: Python 3 not found (none at 3.10+). adr-judge requires Python 3.10+." >&2
|
|
77
90
|
echo "[adr-kit] Install Python: https://www.python.org/downloads/" >&2
|
|
78
91
|
echo "[adr-kit] On macOS: brew install python3" >&2
|
|
79
92
|
echo "[adr-kit] On Windows: winget install Python.Python.3.12" >&2
|
|
@@ -128,8 +141,7 @@ for _plugin_root in "${_plugin_roots[@]}"; do
|
|
|
128
141
|
'import json,sys; print(json.load(open(sys.argv[1], encoding="utf-8")).get("version", "0.0.0"))' \
|
|
129
142
|
"$_manifest" 2>/dev/null
|
|
130
143
|
) || _candidate_version="0.0.0"
|
|
131
|
-
|
|
132
|
-
if [ "$_newest" = "$_candidate_version" ]; then
|
|
144
|
+
if _version_ge "$_candidate_version" "$_best_version"; then
|
|
133
145
|
_best_version="$_candidate_version"
|
|
134
146
|
ADR_JUDGE="$_plugin_root/bin/adr-judge"
|
|
135
147
|
if [ -f "$_plugin_root/bin/adr-suggest" ]; then
|