From c4144c2f735ab8973fb6487b9e4597915f8a38af Mon Sep 17 00:00:00 2001 From: Gustavo Freze Date: Fri, 7 Aug 2026 16:48:51 -0300 Subject: [PATCH 1/3] chore: Remove the versioned Claude configuration. --- .claude/hooks/php-ordering-conformance.py | 607 ----------- .../php-prose-punctuation-conformance.py | 176 ---- .claude/rules/php-library-architecture.md | 147 --- .claude/rules/php-library-code-style.md | 961 ------------------ .claude/rules/php-library-documentation.md | 203 ---- .claude/rules/php-library-github-workflows.md | 104 -- .claude/rules/php-library-modeling.md | 314 ------ .claude/rules/php-library-testing.md | 372 ------- .claude/rules/php-library-tooling.md | 147 --- .claude/settings.json | 249 ----- .claude/skills/commit-message/SKILL.md | 119 --- .claude/skills/tiny-blocks-consume/SKILL.md | 68 -- .../tiny-blocks-consume/references/catalog.md | 32 - .../scripts/refresh-catalog.py | 102 -- .claude/skills/tiny-blocks-create/SKILL.md | 159 --- .../assets/config/.editorconfig | 19 - .../assets/config/.gitattributes | 22 - .../assets/config/.gitignore | 32 - .../tiny-blocks-create/assets/config/Makefile | 74 -- .../assets/config/composer.json | 72 -- .../assets/config/infection.json.dist | 23 - .../assets/config/phpcs.xml | 93 -- .../assets/config/phpstan.neon.dist | 6 - .../assets/config/phpunit.xml | 39 - .../assets/docs/SECURITY.md | 12 - .../github/ISSUE_TEMPLATE/bug_report.md | 29 - .../github/ISSUE_TEMPLATE/feature_request.md | 17 - .../assets/github/PULL_REQUEST_TEMPLATE.md | 16 - .../assets/github/workflows/ci.yml | 105 -- CLAUDE.md | 61 -- 30 files changed, 4380 deletions(-) delete mode 100644 .claude/hooks/php-ordering-conformance.py delete mode 100644 .claude/hooks/php-prose-punctuation-conformance.py delete mode 100644 .claude/rules/php-library-architecture.md delete mode 100644 .claude/rules/php-library-code-style.md delete mode 100644 .claude/rules/php-library-documentation.md delete mode 100644 .claude/rules/php-library-github-workflows.md delete mode 100644 .claude/rules/php-library-modeling.md delete mode 100644 .claude/rules/php-library-testing.md delete mode 100644 .claude/rules/php-library-tooling.md delete mode 100644 .claude/settings.json delete mode 100644 .claude/skills/commit-message/SKILL.md delete mode 100644 .claude/skills/tiny-blocks-consume/SKILL.md delete mode 100644 .claude/skills/tiny-blocks-consume/references/catalog.md delete mode 100644 .claude/skills/tiny-blocks-consume/scripts/refresh-catalog.py delete mode 100644 .claude/skills/tiny-blocks-create/SKILL.md delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/.editorconfig delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/.gitattributes delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/.gitignore delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/Makefile delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/composer.json delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/infection.json.dist delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/phpcs.xml delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/phpstan.neon.dist delete mode 100644 .claude/skills/tiny-blocks-create/assets/config/phpunit.xml delete mode 100644 .claude/skills/tiny-blocks-create/assets/docs/SECURITY.md delete mode 100644 .claude/skills/tiny-blocks-create/assets/github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .claude/skills/tiny-blocks-create/assets/github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .claude/skills/tiny-blocks-create/assets/github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .claude/skills/tiny-blocks-create/assets/github/workflows/ci.yml delete mode 100644 CLAUDE.md diff --git a/.claude/hooks/php-ordering-conformance.py b/.claude/hooks/php-ordering-conformance.py deleted file mode 100644 index 21a3ec0..0000000 --- a/.claude/hooks/php-ordering-conformance.py +++ /dev/null @@ -1,607 +0,0 @@ -#!/usr/bin/env python3 -"""PHP ordering conformance hook for tiny-blocks PHP libraries. - -Self-contained PostToolUse hook on Edit|Write|MultiEdit. Verifies the deterministic -ordering conventions for PHP declarations: - -- Parameter ordering: declaration parameters (constructors, factories, methods, - property promotion) in three tiers, required parameters first, then defaulted - parameters, then a variadic, each tier by identifier length ascending, - alphabetical tie-breaker, semantic pairs preserved. A PHPUnit test method fed by - a data provider is exempt, its parameters are the columns of its data set. -- Member ordering: constants, enum cases, constructor, static methods, instance - methods, in that group order, each group length-ascending with alphabetical - tie-breaker. PHPUnit test classes instead order methods as lifecycle hooks (in - execution order), then other methods, then data providers. - -The analysis is pure (FileUnit in, Violation out) and runs in three passes over -well-formed PHP: a lexical pass blanks every comment, string, and heredoc/nowdoc -body (LITERALS), a structural pass maps every bracket to its pair (bracket_spans); -extraction assigns tokens of interest to their containers by flat walks. Control -flow uses guard clauses only and nesting never exceeds two levels. Reports -violations to stderr and exits 2 to prompt Claude, exits 0 silently if no violations -or the file is out of scope. -""" - -import json -import re -import sys -from dataclasses import dataclass -from enum import Enum -from functools import cached_property -from pathlib import Path -from typing import Final - -# --- Configuration ---------------------------------------------------------- - -# In-scope files: PHP sources under src/ or tests/. -SCOPE_PATTERN: Final = re.compile(r"(^|/)(src|tests)/.+\.php$") - -# Semantic pairs (exhaustive). Natural order wins between -# the two members when both appear in the same parameter list. -SEMANTIC_PAIRS: Final = ( - ("start", "end"), - ("from", "to"), - ("startAt", "endAt"), - ("createdAt", "updatedAt"), - ("before", "after"), - ("min", "max"), -) - -# Each member maps to (first, second, position). Both members keep their natural -# order only when both are present, sorting as a unit at the lead member's key. -PAIR_MEMBER: Final = { - member: (first, second, position) - for first, second in SEMANTIC_PAIRS - for position, member in enumerate((first, second)) -} - -MODIFIERS: Final = ("abstract", "final", "private", "protected", "public", "static") - -# The lexical grammar: every PHP construct that must not be scanned as code. -# Alternatives are ordered, the heredoc label closes via backreference. -LITERALS: Final = re.compile( - r""" - /\*.*?\*/ # block comment - | //[^\n]* # line comment - | \#(?!\[)[^\n]* # hash comment, never a #[ attribute - | <<<[ \t]*(?P['"]?)(?P