@rvdbreemen/adr-kit-opencode 0.52.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.
- package/.claude-plugin/plugin.json +29 -0
- package/LICENSE +21 -0
- package/README.md +850 -0
- package/bin/adr +1552 -0
- package/bin/adr-audit +454 -0
- package/bin/adr-context +584 -0
- package/bin/adr-discover +546 -0
- package/bin/adr-doctor +166 -0
- package/bin/adr-generate-scripts +421 -0
- package/bin/adr-grill-signal +131 -0
- package/bin/adr-guardian +1263 -0
- package/bin/adr-index +199 -0
- package/bin/adr-judge +2832 -0
- package/bin/adr-judge-precommit +87 -0
- package/bin/adr-lint +2087 -0
- package/bin/adr-mcp +1093 -0
- package/bin/adr-migrate +644 -0
- package/bin/adr-quality +275 -0
- package/bin/adr-readiness +211 -0
- package/bin/adr-readiness-ci +111 -0
- package/bin/adr-related +401 -0
- package/bin/adr-renumber +254 -0
- package/bin/adr-retire +467 -0
- package/bin/adr-settings +399 -0
- package/bin/adr-status +797 -0
- package/bin/adr-suggest +803 -0
- package/bin/adr-watch +674 -0
- package/bin/adr_catalog.py +536 -0
- package/bin/adr_config.py +280 -0
- package/bin/adr_doctor_checks.py +407 -0
- package/bin/adr_doctor_core.py +342 -0
- package/bin/adr_doctor_models.py +186 -0
- package/bin/adr_doctor_probes.py +216 -0
- package/bin/adr_format.py +786 -0
- package/bin/adr_grill_signal.py +123 -0
- package/bin/adr_guardian_queue.py +218 -0
- package/bin/adr_history_scan.py +278 -0
- package/bin/adr_index_core.py +443 -0
- package/bin/adr_llm.py +333 -0
- package/bin/adr_llm_judge_migration.py +314 -0
- package/bin/adr_quality_core.py +674 -0
- package/bin/adr_query.py +678 -0
- package/bin/adr_readiness.py +442 -0
- package/bin/adr_readiness_ci.py +123 -0
- package/bin/adr_regex.py +165 -0
- package/bin/adr_regex_worker.py +30 -0
- package/bin/adr_retrieval_health.py +385 -0
- package/bin/adr_schema.py +448 -0
- package/bin/adr_state.py +172 -0
- package/bin/bump-version +71 -0
- package/clients/workflows.json +229 -0
- package/hooks/__init__.py +1 -0
- package/hooks/adapters/__init__.py +13 -0
- package/hooks/adapters/claude.py +27 -0
- package/hooks/adapters/codex.py +26 -0
- package/hooks/adapters/copilot.py +11 -0
- package/hooks/adr-hook.py +128 -0
- package/hooks/adr_hook_core.py +843 -0
- package/hooks/adr_pr_guard.py +367 -0
- package/instructions/ADR-guide.md +48 -0
- package/instructions/adr.coding.md +82 -0
- package/instructions/adr.review.md +182 -0
- package/opencode/plugin.ts +451 -0
- package/package.json +41 -0
- package/schemas/adr-context-probes.schema.json +56 -0
- package/schemas/adr-enforcement.schema.json +57 -0
- package/schemas/adr-frontmatter.schema.json +144 -0
- package/schemas/adr-index.schema.json +276 -0
- package/schemas/adr-kit-config.schema.json +371 -0
- package/schemas/adr-readiness.schema.json +41 -0
- package/schemas/client-capabilities.schema.json +503 -0
- package/schemas/client-certification.schema.json +101 -0
- package/schemas/doctor-output.schema.json +92 -0
- package/schemas/marketplace.json.schema.json +70 -0
- package/schemas/plugin.json.schema.json +67 -0
- package/scripts/adr_settings.py +239 -0
- package/scripts/benchmark-adr-grilling.py +323 -0
- package/scripts/benchmark-client-generation.py +178 -0
- package/scripts/build-client-adapters.py +139 -0
- package/scripts/bump-version.py +304 -0
- package/scripts/check-branch-sync.py +243 -0
- package/scripts/check-release-version.py +81 -0
- package/scripts/client_certification.py +153 -0
- package/scripts/client_evidence.py +280 -0
- package/scripts/client_generation.py +288 -0
- package/scripts/client_generation_artifacts.py +351 -0
- package/scripts/client_generation_model.py +173 -0
- package/scripts/client_generation_state.py +260 -0
- package/scripts/client_support_matrix.py +360 -0
- package/scripts/install-agent-envs.py +300 -0
- package/scripts/probe-client-events.py +183 -0
- package/scripts/project_setup.py +379 -0
- package/scripts/refresh-otgw-corpus.py +219 -0
- package/scripts/settings.py +81 -0
- package/scripts/setup-project.py +205 -0
- package/scripts/sync-agent-plugins.py +17 -0
- package/scripts/version_sites.py +377 -0
- package/skills/adr/SKILL.md +780 -0
- package/skills/audit/SKILL.md +103 -0
- package/skills/context/SKILL.md +77 -0
- package/skills/grill/SKILL.md +84 -0
- package/skills/grill/agents/openai.yaml +4 -0
- package/skills/guardian/SKILL.md +316 -0
- package/skills/init/SKILL.md +499 -0
- package/skills/install-hooks/SKILL.md +154 -0
- package/skills/judge/SKILL.md +168 -0
- package/skills/lint/SKILL.md +321 -0
- package/skills/migrate/SKILL.md +313 -0
- package/skills/related/SKILL.md +62 -0
- package/skills/retire/SKILL.md +41 -0
- package/skills/review/SKILL.md +167 -0
- package/skills/settings/SKILL.md +73 -0
- package/skills/setup/SKILL.md +128 -0
- package/skills/supersede/SKILL.md +136 -0
- package/skills/upgrade/SKILL.md +273 -0
- package/templates/adr-kit-guide.md +354 -0
- package/templates/adr-template.canonical.md +115 -0
- package/templates/adr-template.madr.md +131 -0
- package/templates/adr-template.md +131 -0
- package/templates/adr-template.nygard.md +111 -0
- package/templates/cc-settings/guardian-hook-entry.json +9 -0
- package/templates/githooks/pre-commit +337 -0
- package/templates/github-workflows/adr-audit.yml +58 -0
- package/templates/github-workflows/adr-guardian-audit.yml +133 -0
- package/templates/github-workflows/adr-index-check.yml +30 -0
- package/templates/github-workflows/adr-judge.yml +31 -0
- package/templates/github-workflows/adr-readiness.yml +18 -0
- package/templates/validate_adr_template.py +38 -0
- package/templates/validate_adr_template.sh +74 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# ADR guardian audit: weekly CI-cron sweep of the cheap tier only.
|
|
2
|
+
#
|
|
3
|
+
# COPY-PASTE TEMPLATE for downstream projects that use adr-kit.
|
|
4
|
+
# Copy this file to .github/workflows/adr-guardian-audit.yml in your repo.
|
|
5
|
+
# Unlike the adr-kit self-dogfood workflow, this variant checks out the
|
|
6
|
+
# adr-kit tools into .adr-kit/ first, because your repo does not carry
|
|
7
|
+
# the bin/ scripts itself. Pin ADR_KIT_REF to a release tag for stability.
|
|
8
|
+
#
|
|
9
|
+
# What it does (team mode, see skills/guardian/SKILL.md):
|
|
10
|
+
# - Runs the free cheap tier: adr-lint + adr-retire + adr-status.
|
|
11
|
+
# - Aggregates one markdown report.
|
|
12
|
+
# - Maintains a single tracking issue ("ADR guardian audit"): created on
|
|
13
|
+
# first findings, body updated on later runs, closed when clean.
|
|
14
|
+
#
|
|
15
|
+
# Invariants:
|
|
16
|
+
# - NEVER runs an LLM (ADR-001 posture: LLM gates are opt-in and local).
|
|
17
|
+
# - Report-only: the job always succeeds; findings go to the issue.
|
|
18
|
+
# - No secrets beyond the default GITHUB_TOKEN.
|
|
19
|
+
|
|
20
|
+
name: ADR guardian audit
|
|
21
|
+
|
|
22
|
+
on:
|
|
23
|
+
schedule:
|
|
24
|
+
- cron: "0 6 * * 1"
|
|
25
|
+
workflow_dispatch:
|
|
26
|
+
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
issues: write
|
|
30
|
+
|
|
31
|
+
env:
|
|
32
|
+
ADR_KIT_REF: main # pin to a release tag, e.g. v0.20.1
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
audit:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
with:
|
|
44
|
+
repository: rvdbreemen/adr-kit
|
|
45
|
+
ref: ${{ env.ADR_KIT_REF }}
|
|
46
|
+
path: .adr-kit
|
|
47
|
+
|
|
48
|
+
- uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.11"
|
|
51
|
+
|
|
52
|
+
- name: Run cheap-tier sweep (lint + retire + status)
|
|
53
|
+
id: sweep
|
|
54
|
+
shell: bash
|
|
55
|
+
run: |
|
|
56
|
+
REPORT="$RUNNER_TEMP/adr-guardian-report.md"
|
|
57
|
+
if [ ! -d docs/adr ]; then
|
|
58
|
+
echo "No docs/adr directory; nothing to audit."
|
|
59
|
+
echo "findings=false" >> "$GITHUB_OUTPUT"
|
|
60
|
+
exit 0
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
lint_rc=0
|
|
64
|
+
python .adr-kit/bin/adr-lint docs/adr > "$RUNNER_TEMP/lint.txt" 2>&1 || lint_rc=$?
|
|
65
|
+
python .adr-kit/bin/adr-retire docs/adr --repo-root . --format markdown \
|
|
66
|
+
> "$RUNNER_TEMP/retire.md" 2>&1 || true
|
|
67
|
+
python .adr-kit/bin/adr-status --adr-dir docs/adr --format markdown \
|
|
68
|
+
> "$RUNNER_TEMP/status.md" 2>&1 || true
|
|
69
|
+
|
|
70
|
+
{
|
|
71
|
+
echo "# ADR guardian audit (cheap tier)"
|
|
72
|
+
echo
|
|
73
|
+
echo "_Last sweep: $(date -u +%Y-%m-%dT%H:%M:%SZ) · commit ${GITHUB_SHA} · report-only, no LLM._"
|
|
74
|
+
echo
|
|
75
|
+
echo "## Lint (adr-lint, default gates)"
|
|
76
|
+
echo
|
|
77
|
+
echo '```'
|
|
78
|
+
cat "$RUNNER_TEMP/lint.txt"
|
|
79
|
+
echo '```'
|
|
80
|
+
echo
|
|
81
|
+
echo "## Retirement candidates (adr-retire)"
|
|
82
|
+
echo
|
|
83
|
+
cat "$RUNNER_TEMP/retire.md"
|
|
84
|
+
echo
|
|
85
|
+
echo "## Status (adr-status)"
|
|
86
|
+
echo
|
|
87
|
+
cat "$RUNNER_TEMP/status.md"
|
|
88
|
+
} > "$REPORT"
|
|
89
|
+
cat "$REPORT"
|
|
90
|
+
|
|
91
|
+
findings=false
|
|
92
|
+
if [ "$lint_rc" -ne 0 ]; then
|
|
93
|
+
findings=true
|
|
94
|
+
fi
|
|
95
|
+
if grep -q '^## ADR-' "$RUNNER_TEMP/retire.md"; then
|
|
96
|
+
findings=true
|
|
97
|
+
fi
|
|
98
|
+
echo "findings=$findings" >> "$GITHUB_OUTPUT"
|
|
99
|
+
|
|
100
|
+
- name: Create or update tracking issue
|
|
101
|
+
if: steps.sweep.outputs.findings == 'true'
|
|
102
|
+
env:
|
|
103
|
+
GH_TOKEN: ${{ github.token }}
|
|
104
|
+
shell: bash
|
|
105
|
+
run: |
|
|
106
|
+
TITLE="ADR guardian audit"
|
|
107
|
+
existing=$(gh issue list --state open --search "\"$TITLE\" in:title" \
|
|
108
|
+
--json number,title \
|
|
109
|
+
--jq "[.[] | select(.title == \"$TITLE\")][0].number // empty")
|
|
110
|
+
if [ -n "$existing" ]; then
|
|
111
|
+
gh issue edit "$existing" --body-file "$RUNNER_TEMP/adr-guardian-report.md"
|
|
112
|
+
echo "Updated tracking issue #$existing"
|
|
113
|
+
else
|
|
114
|
+
gh issue create --title "$TITLE" \
|
|
115
|
+
--body-file "$RUNNER_TEMP/adr-guardian-report.md"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
- name: Close tracking issue when clean
|
|
119
|
+
if: steps.sweep.outputs.findings == 'false'
|
|
120
|
+
env:
|
|
121
|
+
GH_TOKEN: ${{ github.token }}
|
|
122
|
+
shell: bash
|
|
123
|
+
run: |
|
|
124
|
+
TITLE="ADR guardian audit"
|
|
125
|
+
existing=$(gh issue list --state open --search "\"$TITLE\" in:title" \
|
|
126
|
+
--json number,title \
|
|
127
|
+
--jq "[.[] | select(.title == \"$TITLE\")][0].number // empty")
|
|
128
|
+
if [ -n "$existing" ]; then
|
|
129
|
+
gh issue close "$existing" \
|
|
130
|
+
--comment "Latest guardian sweep came back clean. Closing."
|
|
131
|
+
else
|
|
132
|
+
echo "No open tracking issue and no findings. Nothing to do."
|
|
133
|
+
fi
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated-index freshness on every pull request.
|
|
2
|
+
#
|
|
3
|
+
# The lifecycle CLI regenerates README.md, ADR-INDEX.md and ADR-INDEX.json
|
|
4
|
+
# inside its own transaction, so anything written through `bin/adr` keeps them
|
|
5
|
+
# true. An ADR edited by hand -- or written straight to disk by a coding agent,
|
|
6
|
+
# which is the common case in a harness -- does not. The index is what every
|
|
7
|
+
# other tool and every agent reads first, so a stale one quietly misinforms
|
|
8
|
+
# everything downstream.
|
|
9
|
+
#
|
|
10
|
+
# The commit hook warns about this; it cannot block, because it reads the
|
|
11
|
+
# worktree while the commit is the staged snapshot. Here the checkout is the
|
|
12
|
+
# commit, so blocking is honest.
|
|
13
|
+
#
|
|
14
|
+
# Copy into .github/workflows/ of your project.
|
|
15
|
+
name: ADR index freshness
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
pull_request:
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
adr-index-check:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: rvdbreemen/adr-kit/.github/actions/adr-index-check@main
|
|
29
|
+
with:
|
|
30
|
+
adr-dir: docs/adr
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ADR enforcement on every pull request.
|
|
2
|
+
#
|
|
3
|
+
# The pre-commit hook judges one commit; this judges the whole branch, which is
|
|
4
|
+
# what the reviewer is actually being asked to accept. Declarative-only by
|
|
5
|
+
# default: no LLM, no secrets, no API key.
|
|
6
|
+
#
|
|
7
|
+
# Copy into .github/workflows/ of your project. The checkout MUST use
|
|
8
|
+
# fetch-depth: 0 so both sides of the diff exist.
|
|
9
|
+
name: ADR enforcement
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [main]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
adr-judge:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
- uses: rvdbreemen/adr-kit/.github/actions/adr-judge@main
|
|
26
|
+
with:
|
|
27
|
+
adr-dir: docs/adr/
|
|
28
|
+
# A release-sized branch diff needs more room than a single commit.
|
|
29
|
+
# This budget is deliberately separate from judge.max_diff_bytes, so
|
|
30
|
+
# raising it here does not weaken the commit-time gate.
|
|
31
|
+
max-diff-bytes: "33554432"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: ADR readiness
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
adr-readiness:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- uses: rvdbreemen/adr-kit/.github/actions/adr-readiness@v0.37.0
|
|
17
|
+
with:
|
|
18
|
+
adr-dir: docs/adr
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Reference sample of adr-generate-scripts output; the generator does not read
|
|
3
|
+
# this file. It exists so a human can see the expected shape of a generated
|
|
4
|
+
# validator. Keep it in step with bin/adr-generate-scripts.
|
|
5
|
+
#
|
|
6
|
+
# Generated by adr-kit for ADR-NNN. Do not edit manually.
|
|
7
|
+
# Validates stdin against ADR-NNN enforcement rules.
|
|
8
|
+
# Usage: cat file.py | python validate.py
|
|
9
|
+
# echo "suspicious line" | python validate.py
|
|
10
|
+
# Exit 0 = clean, exit 1 = violations found.
|
|
11
|
+
#
|
|
12
|
+
# This script is fully standalone — no adr-kit dependency required.
|
|
13
|
+
# Only the Python standard library (re, sys) is used.
|
|
14
|
+
|
|
15
|
+
import re
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
# Patterns are injected by adr-generate-scripts from the ADR's ## Enforcement block.
|
|
19
|
+
# Each entry is a compiled regex pattern and an error message.
|
|
20
|
+
FORBID_RULES = [
|
|
21
|
+
(re.compile('\\bFoo\\b'), 'Do not use Foo.'), # example — replaced at generation time
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def main():
|
|
26
|
+
lines = sys.stdin.readlines()
|
|
27
|
+
violations = 0
|
|
28
|
+
for i, line in enumerate(lines, 1):
|
|
29
|
+
for pattern, message in FORBID_RULES:
|
|
30
|
+
if pattern.search(line):
|
|
31
|
+
print(f"VIOLATION line {i}: {message}", file=sys.stderr)
|
|
32
|
+
print(f" {line.rstrip()}", file=sys.stderr)
|
|
33
|
+
violations += 1
|
|
34
|
+
sys.exit(1 if violations > 0 else 0)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
main()
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# validate_adr_template.sh — reference sample of adr-generate-scripts output.
|
|
3
|
+
#
|
|
4
|
+
# The generator does not read this file; it emits its scripts from built-in
|
|
5
|
+
# templates. This file exists so a human can see the expected shape without
|
|
6
|
+
# running the generator, so keep it in step with bin/adr-generate-scripts.
|
|
7
|
+
#
|
|
8
|
+
# This file documents the shape of generated shell validation scripts.
|
|
9
|
+
# It is NOT runnable as-is; {PLACEHOLDERS} are replaced by the generator.
|
|
10
|
+
# The generator in bin/adr-generate-scripts produces the actual shell script.
|
|
11
|
+
#
|
|
12
|
+
# Generated script behaviour:
|
|
13
|
+
# - Reads stdin completely into memory (supports piping).
|
|
14
|
+
# - Validates each pattern as POSIX ERE at startup and warns about
|
|
15
|
+
# any pattern grep -E rejects (Python-only regex features won't compile
|
|
16
|
+
# under ERE — use adr-judge for authoritative validation).
|
|
17
|
+
# - Runs ONE grep -nE pass per rule across the full input
|
|
18
|
+
# (O(rules) subprocess spawns, not O(lines × rules)).
|
|
19
|
+
# - Reports VIOLATION to stderr with line number, message, and snippet.
|
|
20
|
+
# - Exit 0 = clean, exit 1 = at least one violation.
|
|
21
|
+
#
|
|
22
|
+
# Example of a generated file for ADR-001 with one forbid rule:
|
|
23
|
+
#
|
|
24
|
+
# #!/bin/bash
|
|
25
|
+
# # Generated by adr-kit for ADR-001. Do not edit manually.
|
|
26
|
+
# # Validates stdin against ADR-001 enforcement rules.
|
|
27
|
+
# # Usage: cat file.py | bash validate.sh
|
|
28
|
+
#
|
|
29
|
+
# set -euo pipefail
|
|
30
|
+
#
|
|
31
|
+
# # --- Pattern validation at startup --------------------------------
|
|
32
|
+
# _INVALID=0
|
|
33
|
+
# for _pat in \
|
|
34
|
+
# '\bFoo\b'
|
|
35
|
+
# do
|
|
36
|
+
# if ! printf '' | grep -qE -- "$_pat" 2>/dev/null; then
|
|
37
|
+
# printf '[adr-validate] WARN: invalid ERE pattern: %s\n' "$_pat" >&2
|
|
38
|
+
# _INVALID=1
|
|
39
|
+
# fi
|
|
40
|
+
# done
|
|
41
|
+
# if [ "$_INVALID" -eq 1 ]; then
|
|
42
|
+
# printf '%s\n' '[adr-validate] WARN: some patterns invalid for ERE (grep). Results may be incomplete. Use adr-judge for authoritative validation.' >&2
|
|
43
|
+
# fi
|
|
44
|
+
#
|
|
45
|
+
# # --- Main validation ---------------------------------------------
|
|
46
|
+
# VIOLATIONS=0
|
|
47
|
+
# INPUT=$(cat)
|
|
48
|
+
#
|
|
49
|
+
# check_rule() {
|
|
50
|
+
# local pattern="$1"
|
|
51
|
+
# local message="$2"
|
|
52
|
+
# local matches
|
|
53
|
+
# matches=$(printf '%s\n' "$INPUT" | grep -nE -- "$pattern" || true)
|
|
54
|
+
# if [ -n "$matches" ]; then
|
|
55
|
+
# while IFS= read -r hit; do
|
|
56
|
+
# [ -z "$hit" ] && continue
|
|
57
|
+
# local lineno="${hit%%:*}"
|
|
58
|
+
# local content="${hit#*:}"
|
|
59
|
+
# printf 'VIOLATION line %s: %s\n' "$lineno" "$message" >&2
|
|
60
|
+
# printf ' %s\n' "$content" >&2
|
|
61
|
+
# VIOLATIONS=$((VIOLATIONS + 1))
|
|
62
|
+
# done <<< "$matches"
|
|
63
|
+
# fi
|
|
64
|
+
# }
|
|
65
|
+
#
|
|
66
|
+
# check_rule '\bFoo\b' 'Do not use Foo.'
|
|
67
|
+
#
|
|
68
|
+
# [ "$VIOLATIONS" -gt 0 ] && exit 1
|
|
69
|
+
# exit 0
|
|
70
|
+
#
|
|
71
|
+
# Template placeholders (replaced by generate_shell_script in bin/adr-generate-scripts):
|
|
72
|
+
# {adr_id} — e.g. "ADR-001"
|
|
73
|
+
# {patterns_block} — one quoted pattern per line, for the startup validity loop
|
|
74
|
+
# {checks_block} — one line per rule: check_rule 'PATTERN' 'MESSAGE'
|