Repository navigation
chore(framework): the architecture rules are enforced where every tool passes - #895
Merged
Merged
Conversation
…l passes The write-time refusal was a Claude Code PreToolUse hook. It bought one turn of latency for a mechanism no other tool can host: across every plugin shipped here the portable hook surface is SessionStart, and a write-time refusal has no equivalent on Codex, Cursor or Copilot. A guard this repository can only enforce for one of the tools it supports contradicts the premise of the repository. The pre-commit job already covers every edit that reaches a commit, whichever tool or person made it, and validate.yml replays it over the whole tree on each pull request, so nothing that was enforced stops being enforced. The hook also failed open by design, and nothing lints scripts/ or .claude/hooks/, so it could have stopped working without anything saying so. architecture-scan.js keeps only the three functions the command uses. Refs #250 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FPREgkoNtK4PYh2YyZbztq AIDD-Session-Id: 2261efcd-a873-4e60-9893-2217f702bde2
231 words to say a pre-commit job runs. The file breakdown is readable in the code, the reason the write-time hook went lives in its own commit and pull request, and "never refuses a citation with no file behind it" is a test's job to state, not a sentence's. What stays is the rule, and the one exemption a reader applying that rule would otherwise trip over. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FPREgkoNtK4PYh2YyZbztq AIDD-Session-Id: 2261efcd-a873-4e60-9893-2217f702bde2
ARCHITECTURE.md states the rule and the one exception to it. What runs the rule belongs in the pre-commit gates table, which is where someone asks what a commit checks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FPREgkoNtK4PYh2YyZbztq AIDD-Session-Id: 2261efcd-a873-4e60-9893-2217f702bde2
A critical pass over the two documents, one reader at a time, found five defects in this branch's own edits. All five are corrected here. - The `--no-verify` sentence was replaced by a second falsehood. Checked against all nine workflows this time: no workflow fires on a push to a feature branch, `ci.yml` and `cli-ci.yml` fire on any pull request whatever its base, and only `validate.yml` filters `main` and `next`, minus three `cli` jobs it excludes. - Reading "Claude Code" as "an AI coding tool" made line 9 false. The manifest it points at is `.claude-plugin/marketplace.json`; codex emits `.agents/plugins/`, cursor `.cursor-plugin/`, copilot `.plugin/`. All three substitutions are reverted. That framing needs a rewrite, not a word swap. - The exemption bullet named one of the two holes in rule one. `isExemptFromOrthogonality` also exempts every path under `plugins/aidd-orchestrator/`. - The doc test read tables by position, so a `Runs` cell could name a deleted script and stay green. Tables are now found by their header cells and read by column name. A fifth test opens the script the table names. - Its failure message named one exemption bullet after this branch split it into two. Nine attacks replayed against the rewritten parser: a missing script, an un-backticked name and a wrong event go red; a blank line inside a table, an escaped pipe and an inserted column stay green. Four semantic mutations each redden exactly the test that names them. 503 tests pass. Referenced paths 0 dead, doc duplication 0, architecture rules 350 governed files clean. Refs #250 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FPREgkoNtK4PYh2YyZbztq AIDD-Session-Id: 2261efcd-a873-4e60-9893-2217f702bde2
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The two architecture rules of #250 were enforced twice: as an
architecture-rulespre-commit job, and as a Claude CodePreToolUsehook that refused the write itself.The hook bought one turn of latency for a mechanism no other tool can host. Across every plugin shipped here the portable hook surface is
SessionStart—SessionStart×2,PostToolUse×1,Stop×1 — and the Codex profile wiresSessionStartalone. A write-time refusal has no equivalent on Codex, Cursor or Copilot.A guard this repository can only enforce for one of the tools it supports contradicts the premise of the repository, so it is removed rather than duplicated.
What still holds
Nothing that was enforced stops being enforced. The pre-commit job covers every edit that reaches a commit, whichever tool or person made it, and
validate.ymlreplays it over the whole tree on each pull request. Only the moment of the refusal moves: commit time instead of write time.The hook also failed open at every step by design, and nothing lints
scripts/or.claude/hooks/— every one of those jobs globscli/**— so it could have stopped working with nothing to say so.How to verify
node scripts/check-architecture-rules.js→350 governed file(s) checked, no violation- See aidd-context:01-memory here.toplugins/aidd-vcs/skills/01-commit/SKILL.md, rerun → exits 1 with…SKILL.md:36 addresses sibling plugin \"aidd-context\"node scripts/check-tests-leave-git-alone.js -- node --test 'scripts/__tests__/**/*.test.js'→ 498 tests, 0 failedgrep -rn check-architecture-rules .claude/→ nothingarchitecture-scan.jskeeps only the three functions the command uses;violationsForFileandactionFileNameswere exported for the hook alone and are now private.Refs #250
🤖 Generated with Claude Code
https://claude.ai/code/session_01FPREgkoNtK4PYh2YyZbztq