Skip to content

Commit b162697

Browse files
committed
merge: main into feat-1.17.0-inline-db-mutation-hook (bump to 1.23.0)
Absorbs PR #28 (1.21.0 atomic-design ownership hooks), PR #32 (1.22.0 DOJ-4571 cross-cutting hooks), and PR #29 (gemini-review multi-model). Bumps this PR's version label from 1.20.0 → 1.23.0 to land on top of the new main. Conflict resolution: version-only on package.json, plugin.json, marketplace.json, README.md. CHANGELOG.md: renamed [1.20.0] entry to [1.23.0] (in-place), kept [1.22.0] and [1.21.0] from main intact, updated parallel-version-coordination note. Tests: 320 / 320 passing (297 manifest + 23 cross-cutting). Created by Claude Code on behalf of @lapc506
2 parents 239d1d1 + a8f8be4 commit b162697

30 files changed

Lines changed: 3568 additions & 32 deletions

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
33
"name": "make-no-mistakes",
4-
"version": "1.20.0",
4+
"version": "1.23.0",
55
"description": "The disciplined dev lifecycle — implement issues, review PRs, sync releases, test E2E, manage sessions, and stash secrets via OS-native prompts. One plugin to make no mistakes.",
66
"owner": {
77
"name": "Luis Andres Pena Castillo",
@@ -11,7 +11,7 @@
1111
{
1212
"name": "make-no-mistakes",
1313
"description": "Dev lifecycle orchestrator: disciplined Linear issue execution with worktree isolation, PR review with Greptile gating, team release sync, E2E test generation and execution, test suite previewer, security pentesting, MoSCoW + RICE prioritization, cross-platform secret stash via OS-native GUI prompts (zenity / kdialog / osascript / Get-Credential), and session management. 18 commands, 6 auto-activating skills, 2 specialized agents.",
14-
"version": "1.20.0",
14+
"version": "1.23.0",
1515
"author": {
1616
"name": "Luis Andres Pena Castillo",
1717
"email": "lapc506@users.noreply.github.com"

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "make-no-mistakes",
3-
"version": "1.20.0",
3+
"version": "1.23.0",
44
"description": "The disciplined dev lifecycle — implement issues, review PRs, sync releases, test E2E, manage sessions, stash secrets, and enforce manifest-driven tool-call hooks. One plugin to make no mistakes.",
55
"author": {
66
"name": "Luis Andres Pena Castillo",

CHANGELOG.md

Lines changed: 148 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
1919
## [Unreleased]
2020

21-
## [1.20.0] - 2026-05-29
21+
## [1.23.0] - 2026-05-29
2222

2323
### Added
2424
- **Six new `inline-db-mutation-*` rules extending the scripts-not-DB
@@ -104,7 +104,145 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
104104
Moodle-flavoured `ssh-db-mutation` rule; this release simply expands
105105
the enforcement surface).
106106
- **Parallel-version coordination:** originally claimed `1.17.0`; bumped
107-
to `1.20.0` after rebasing onto main (which had absorbed 1.17.0–1.19.0).
107+
to `1.20.0` after rebasing onto main (which had absorbed 1.17.0–1.19.0),
108+
then to `1.23.0` after PR #28 (1.21.0), #32 (1.22.0), and #29 merged
109+
during the rebase window. Used `git merge origin/main --no-edit` per
110+
policy memory `reference_use_merge_not_rebase_after_team_releases.md`
111+
(preserves original commit history and avoids re-pushing a rewritten
112+
branch onto the reviewer's diff).
113+
114+
## [1.22.0] - 2026-05-29
115+
116+
### Added
117+
118+
- **Cure 4b cross-cutting PreToolUse hooks (DOJ-4571).** Three generalized
119+
hooks distributed via the toolkit so every consumer repo inherits
120+
cross-cutting defenses, parametrized via a per-repo opt-in config file at
121+
`.claude/config/cross-cutting-hooks.json`. File absence → all three hooks
122+
no-op (full backward compatibility). Hooks live in
123+
`hooks/cross-cutting/` alongside the existing manifest-driven rules:
124+
125+
- `pre-write-no-cleartext-secret-in-config.sh` — blocks Write/Edit/
126+
MultiEdit of JSON/YAML/TOML/env config files that introduce
127+
`${...KEY|SECRET|TOKEN|PASSWORD|...}` placeholders without the
128+
cure-shape `_FILE` / `_PATH` suffix. Generalized from DOJ-4554's
129+
openclaw.json-specific version (PR #266 in
130+
`dojo-agent-openclaw-plugin`).
131+
- `pre-write-cross-repo-schema-ownership.sh` — blocks new SQL
132+
migrations for tables not owned by this repo, per a config-driven
133+
`owned_tables` allowlist + `migration_paths` glob. Empty allowlist
134+
blocks every migration in the configured paths (the gateway pattern,
135+
where the repo has no migration pipeline). Generalized from
136+
DOJ-4554's `pre-write-plugin-side-migration.sh`.
137+
- `pre-write-version-bump-discipline.sh` — blocks multi-step version
138+
bumps on any pinned dependency by delegating to a per-repo validator
139+
script. Each entry in the `version_bumps` array names a file
140+
pattern, version-extraction regex, and validator script. Old version
141+
is read from the git HEAD blob; new version from the proposed
142+
content; both via bash native `=~` matching (avoids sed-delimiter
143+
clashes with regexes containing `/`).
144+
145+
- **Per-surface `defer_to_local_hook` flag (belt-and-braces).** Repos
146+
that already have a tighter Cure 4a hook for one of these surfaces
147+
(currently only `dojo-agent-openclaw-plugin`) set
148+
`defer_to_local_hook: true` on the matching config block. The 4b hook
149+
emits an info-stderr and fail-opens; the 4a hook owns enforcement.
150+
Lets the config block stay live (visible, documented, ready for the
151+
day 4a is retired) without firing the looser 4b version.
152+
153+
- **Schema:** `schemas/cross-cutting-hooks.schema.json` (JSON Schema for
154+
editor autocomplete + CI validation).
155+
156+
- **Bypass markers:** three comment leaders accepted (`#`, `//`, `--`)
157+
so the marker fits whichever syntax the target file uses. Trailing
158+
terminator class extended to include backslash so JSON-serialized
159+
embedded newlines (`marker\n...`) don't break detection.
160+
161+
- **Tests:** `hooks/cross-cutting/tests/test-cross-cutting.sh` — 23
162+
hermetic fixtures (≥7 per hook) spinning up isolated git repos per
163+
case; wired into `npm run test-hooks` after the manifest-rules block.
164+
Total runner now reports 248/248 passing.
165+
166+
- **Docs:** `hooks/cross-cutting/README.md` — opt-in walkthrough,
167+
surface semantics, bypass markers, belt-and-braces with local 4a
168+
hooks, three-layer rollback (per-surface disable /
169+
`CLAUDE_DISABLE_PLUGIN_HOOKS` / plugin pin), fail-open invariants.
170+
171+
### Changed
172+
173+
- `hooks/hooks.json` description updated to surface the new
174+
`hooks/cross-cutting/` directory alongside `hooks/rules/` and
175+
`hooks/atomic/`.
176+
- `hooks/hooks.json` PreToolUse `Write|Edit|MultiEdit|NotebookEdit`
177+
block now registers the 3 cross-cutting scripts AFTER `pre-edit.sh`
178+
and alongside `hooks/atomic/pre-atomic.sh` (manifest-driven rules run
179+
first; atomic-design and cross-cutting hooks layer on as siblings).
180+
- `package.json` `files[]` adds `schemas/` and `references/` so the
181+
JSON Schemas and example configs ship in the npm package (also
182+
benefits `schemas/atomic-design-rules.schema.json` and
183+
`references/atomic-design-rules.example.json` from 1.21.0).
184+
185+
### Notes
186+
187+
- Originally targeted `1.20.0` (per the parallel-version note in 1.21.0);
188+
PR #28 landed first as 1.21.0, so this rebases onto 1.22.0 to preserve
189+
monotonic ordering. No semantic content change vs. the originally
190+
proposed 1.20.0.
191+
- Two review fixes from PR #32 (dojo-code-reviewer): replaced GNU-only
192+
`sed ... //I` with explicit bracket-class spelling (BSD sed
193+
compatibility on macOS); switched HIGH_IMPACT_RE / CURE_RE from
194+
quad-backslash escaping to single-quote-plus-interpolation convention.
195+
- Consumer-repo opt-in (config files in `dojo-os` and
196+
`dojo-agent-openclaw-plugin`) lands in sibling PRs after `1.22.0`
197+
publishes. Per DOJ-4571 belt-and-braces decision,
198+
`dojo-agent-openclaw-plugin` keeps its existing 4a hooks AND opts in
199+
with `defer_to_local_hook: true` on all three surfaces; `dojo-os`
200+
opts in with the 4b hooks owning enforcement.
201+
- Refs: DOJ-4571 (this work), DOJ-4554 (Cure 4a foundation), DOJ-4064
202+
(4-cure thesis), DOJ-4524 (the persistence-freeze incident the
203+
schema-ownership hook prevents), DOJ-4208 (the cleartext-key incident
204+
the cleartext-secret hook prevents), DOJ-4061 (the gateway-version-bump
205+
chain the version-bump hook prevents).
206+
207+
## [1.21.0] - 2026-05-29
208+
209+
### Added
210+
- **Recovered atomic-design ownership-drift hooks** — the code listed in the
211+
1.14.0 entry was never actually shipped (changelog entry existed without
212+
corresponding source). This release lands the real implementation:
213+
- `hooks/atomic/pre-atomic.sh` — PreToolUse enforcement for atomic-design
214+
pillar ownership: blocks writes to junk-drawer folders, enforces
215+
canonical folder names (singular/plural), detects cross-pillar imports
216+
that bypass declared `shared_pillars`, and warns when an atom file
217+
contains state/effect/query hooks (Brad Frost stateless-atom rule).
218+
- `hooks/atomic/post-atomic-drift.sh` — PostToolUse drift telemetry scoped
219+
to the pillar of the file just written: organism count cap, root-flat
220+
cap, and duplicate-basename detection across pillars.
221+
- `schemas/atomic-design-rules.schema.json` — JSON Schema for the
222+
per-repo `.atomic-design-rules.json` config (pillars, canonical_folders,
223+
junk_drawers, drift_thresholds, exempt_markers).
224+
- `references/atomic-design-rules.example.json` — starter config that
225+
reflects the post-DOJ-3946 canonical pillar taxonomy (2026-05-14 audit
226+
outcome: 9 pillars, `course/` and `courses/` absorbed into `pathways`).
227+
- `commands/atomic-rules-init.md``/atomic-rules-init` slash command for
228+
bootstrapping atomic-design rules in a target repo.
229+
- `hooks/atomic/README.md` — operator documentation for both hooks.
230+
- Wired into `hooks/hooks.json` so consumers get enforcement on plugin
231+
install with no additional setup beyond placing a config at the repo
232+
root.
233+
- New section in `skills/spec-recommend/SKILL.md` + anti-examples block
234+
documenting the recovered atomic-design lineage.
235+
236+
### Notes
237+
- Pillar taxonomy in `references/atomic-design-rules.example.json` matches
238+
the canonical 9-pillar list established by the DOJ-3946 council in the
239+
2026-05-14 audit (pathways, launchpad, community, projects, marketplace,
240+
hackathons, events, agent, dojo-score, plus platform as the shared pillar).
241+
The example only enumerates a subset; consumers configure their own list.
242+
- **Parallel-version coordination:** version `1.20.0` was originally
243+
reserved for the DOJ-4571 Cure 4b cross-repo hooks PR. PR #28
244+
(this release) landed first as `1.21.0`; DOJ-4571 followed as
245+
`1.22.0` to preserve monotonic ordering. See `[1.22.0]` above.
108246

109247
## [1.19.0] - 2026-05-26
110248

@@ -278,6 +416,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
278416

279417
## [1.14.0] - 2026-05-14
280418

419+
> **Note:** The source files described in this entry were never actually
420+
> committed in 1.14.0 — only the version bump and keyword changes landed.
421+
> The implementation was recovered and shipped in **1.21.0** (see entry
422+
> above). Treat this entry as the intent record; treat 1.21.0 as the
423+
> shipped record.
424+
281425
### Added
282426
- Atomic-design enforcement hooks: `hooks/atomic/pre-atomic.sh`,
283427
`hooks/atomic/post-atomic-drift.sh` — per-repo PreToolUse + PostToolUse
@@ -455,7 +599,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
455599
- Product Owner Extension (SPOPC) roadmap section in README
456600
([PR #4](https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/pull/4)).
457601

458-
[Unreleased]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/compare/v1.14.0...HEAD
602+
[Unreleased]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/compare/v1.21.0...HEAD
603+
[1.21.0]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/releases/tag/v1.21.0
459604
[1.14.0]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/releases/tag/v1.14.0
460605
[1.12.0]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/releases/tag/v1.12.0
461606
[1.11.0]: https://github.com/DojoCodingLabs/make-no-mistakes-toolkit/releases/tag/v1.11.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# make-no-mistakes
22

3-
**Version: 1.20.0** · [CHANGELOG](./CHANGELOG.md) · [Marketplace](https://github.com/DojoCodingLabs/make-no-mistakes-toolkit)
3+
**Version: 1.23.0** · [CHANGELOG](./CHANGELOG.md) · [Marketplace](https://github.com/DojoCodingLabs/make-no-mistakes-toolkit)
44

55
The disciplined dev lifecycle — implement issues, review PRs, sync releases, test E2E, and manage sessions. One plugin to make no mistakes.
66

commands/atomic-rules-init.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
description: Scaffold a .atomic-design-rules.json at the current repo root so the make-no-mistakes atomic-design hooks (PreToolUse ownership enforcement + PostToolUse drift telemetry) start enforcing for this repo. No-op if the file already exists.
3+
priority: 60
4+
---
5+
6+
# Atomic Rules Init
7+
8+
Bootstrap atomic-design ownership enforcement for the current repo by writing
9+
a `.atomic-design-rules.json` at the repo root. The make-no-mistakes plugin
10+
hooks (`hooks/atomic/pre-atomic.sh` and `hooks/atomic/post-atomic-drift.sh`)
11+
read this file at every Edit/Write/MultiEdit/NotebookEdit call. If the file
12+
is absent, the hooks are a no-op — installing the plugin is always safe.
13+
14+
This command produces a STARTER config based on what it can infer from the
15+
current repo. You will refine it before committing.
16+
17+
---
18+
19+
## Step 1: Sanity-check the repo
20+
21+
Run these commands in parallel:
22+
23+
```bash
24+
# Find repo root
25+
git rev-parse --show-toplevel
26+
27+
# Detect the components root by checking the two most common conventions
28+
ls -d src/components 2>/dev/null || ls -d components 2>/dev/null || echo "no components root found"
29+
30+
# Check if a config already exists
31+
test -f .atomic-design-rules.json && echo "EXISTS" || echo "MISSING"
32+
```
33+
34+
If the config already exists, STOP and tell the user. Do not overwrite.
35+
36+
If no components root is found, ask the user to clarify before proceeding.
37+
38+
---
39+
40+
## Step 2: Detect candidate pillars
41+
42+
Run:
43+
44+
```bash
45+
# Each first-level subfolder under the components root is a pillar candidate
46+
ls -d $COMPONENTS_ROOT/*/ 2>/dev/null | xargs -n1 basename
47+
```
48+
49+
For each candidate, ask the user:
50+
- Slug (kebab-case; default = folder name)
51+
- Owner (Slack handle or Linear team; required so violation messages name a reviewer)
52+
- Whether this is a SHARED pillar (importable by any other pillar)
53+
- Optional `max_organisms` override
54+
55+
Stop after the user has confirmed at least one pillar. The starter config
56+
can list as few as one pillar; more can be added later.
57+
58+
---
59+
60+
## Step 3: Detect junk drawers (heuristic)
61+
62+
Run:
63+
64+
```bash
65+
# Folders directly under components root that have > 5 loose files and
66+
# no atomic subfolders are likely junk drawers.
67+
for d in $COMPONENTS_ROOT/*/; do
68+
loose=$(find "$d" -maxdepth 1 -type f \( -name '*.tsx' -o -name '*.ts' \) 2>/dev/null | wc -l)
69+
has_atomic=$(ls -d "$d"{atoms,molecules,organisms,templates} 2>/dev/null | wc -l)
70+
if [ "$loose" -gt 5 ] && [ "$has_atomic" -eq 0 ]; then
71+
echo "candidate junk drawer: $d (loose=$loose)"
72+
fi
73+
done
74+
```
75+
76+
Surface candidates to the user and ask which to mark as junk drawers.
77+
78+
---
79+
80+
## Step 4: Detect plural/singular drift
81+
82+
Run:
83+
84+
```bash
85+
# Pairs of folders that differ only by a trailing 's' are drift candidates.
86+
ls -d $COMPONENTS_ROOT/*/ | xargs -n1 basename | sort -u > /tmp/pillar-list
87+
for name in $(cat /tmp/pillar-list); do
88+
plural="${name}s"
89+
if grep -qx "$plural" /tmp/pillar-list; then
90+
echo "drift pair: $name <-> $plural"
91+
fi
92+
done
93+
```
94+
95+
For each pair, ask the user which form is canonical, then add a
96+
`canonical_folders` entry.
97+
98+
---
99+
100+
## Step 5: Write the config
101+
102+
Compose the JSON using the schema at:
103+
`make-no-mistakes-toolkit/schemas/atomic-design-rules.schema.json`
104+
105+
Reference example:
106+
`make-no-mistakes-toolkit/references/atomic-design-rules.example.json`
107+
108+
Minimum viable starter (replace placeholders with what you gathered above):
109+
110+
```json
111+
{
112+
"$schema": "https://raw.githubusercontent.com/DojoCodingLabs/make-no-mistakes-toolkit/main/schemas/atomic-design-rules.schema.json",
113+
"version": 1,
114+
"components_root": "src/components",
115+
"pillars": [
116+
{ "slug": "platform", "folder": "platform", "owner": "@platform-team" }
117+
],
118+
"shared_pillars": ["platform"],
119+
"atomic_levels": {
120+
"atoms": {
121+
"folder": "atoms",
122+
"forbid_content_patterns": [
123+
"use(State|Reducer|Effect|LayoutEffect|Query|Mutation|InfiniteQuery)\\b",
124+
"useContext\\b"
125+
],
126+
"forbid_message": "Atoms must be stateless. Move state to a molecule or organism."
127+
}
128+
},
129+
"drift_thresholds": {
130+
"max_organisms_per_pillar": 100,
131+
"max_root_files_per_pillar": 5,
132+
"public_prefix_stale_days": 30
133+
}
134+
}
135+
```
136+
137+
Write it via the standard Write tool. Then print:
138+
139+
> Created .atomic-design-rules.json. The atomic-design hooks will now
140+
> enforce on every Edit/Write/MultiEdit/NotebookEdit. To bypass for a
141+
> single file, add `// @atomic-exempt: <reason>` to its content.
142+
> Kill switch: `CLAUDE_DISABLE_PLUGIN_HOOKS=1`.
143+
144+
---
145+
146+
## Step 6: Quick verification
147+
148+
Suggest the user run a known-violating Edit so they can see the hook fire:
149+
150+
> Try editing a file in a junk drawer or under `*/atoms/*` with a
151+
> `useState` import. The hook should block the write and explain why.
152+
153+
Do NOT actually perform the edit. The user owns that test.
154+
155+
---
156+
157+
## Boundaries
158+
159+
- This command writes ONE file. Do not modify CLAUDE.md, AGENTS.md, or any
160+
other repo file. Pillar enforcement starts from the JSON alone.
161+
- Do NOT commit. Show the user the diff via `git status`/`git diff` and
162+
let them decide.
163+
- If the user asks for a more sophisticated setup (e.g. importing
164+
pillars from a Linear team mapping), defer to a manual PR — this
165+
command intentionally produces a clean starter.

0 commit comments

Comments
 (0)