Skip to content

[PAR-805] Add Claude configuration and capability definitions#116

Merged
mescalantea merged 8 commits into
masterfrom
chore/PAR-805-Add-Claude-configuration-and-capability-definitions
Jun 17, 2026
Merged

[PAR-805] Add Claude configuration and capability definitions#116
mescalantea merged 8 commits into
masterfrom
chore/PAR-805-Add-Claude-configuration-and-capability-definitions

Conversation

@mescalantea

Copy link
Copy Markdown
Contributor

What is the goal?

Set up Claude Code to work effectively in this repository and ship a shared, committed baseline of repo-specific capabilities: architecture guidance, a permission allowlist, automated quality gates that mirror CI, and a version-bump skill tailored to this module's release ritual.

References

How is it being implemented?

  • CLAUDE.md — documents the architecture (the two Sequra\Core vs SeQura\Core namespaces, Bootstrap service wiring, di.xml payment-gateway virtual types, persistence/patches), the Docker-wrapped bin/* commands, and the working principles / verify gate.
  • .claude/settings.json — committed permission allowlist for the bin/* wrappers and read-only git, with deny rules for secrets (.env*, *.pem, *.key) and ask gates for outward/destructive actions (setup.sh, teardown.sh, git push).
  • Git quality gates.githooks/pre-commit (PHP 7.4 syntax + phpcbf/phpcs scoped to staged files, via throwaway images — no container needed) and .githooks/pre-push (multi-version syntax sweep 7.4–8.4 + full phpcs + full phpstan, mirroring static-analysis.yml; skipped when no PHP-relevant changes). Enabled via setup.sh setting core.hooksPath .githooks.
  • version-bump skill (.claude/skills/) — bumps composer.json version and etc/module.xml setup_version in lockstep, scaffolds a Setup/Patch/Data/Version*.php patch only when a data migration is needed, and reminds that the git tag must match (the desync that 12f117c had to fix).
  • .gitignore / .gitattributes — track the shared .claude/ config and .githooks/ while excluding local-only files and keeping all of it out of the Composer/Packagist export (export-ignore).

Caveats

The hooks only activate after running ./setup.sh (or git config core.hooksPath .githooks) once per clone, since core.hooksPath is a local git setting that isn't checked in. pre-push phpstan additionally requires the magento container up with vendor/ populated by bin/update-sequra.

How is it tested?

No production code changed — this PR adds tooling and configuration only. The new git hooks were exercised on this branch: pre-push correctly skipped (No PHP-relevant changes in the pushed commits) since the branch touches no .php files.

How is it going to be deployed?

Standard deployment. All added files are dev-only and export-ignored, so nothing ships in the Composer/Packagist dist tarball.

@m1k3lm m1k3lm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline notes from the review. The deny-glob gap is the one worth fixing before merge; the rest are a footgun to document and two cleanups. Solid tooling PR overall.

Comment thread .claude/settings.json Outdated
Comment thread .claude/settings.json Outdated
Comment thread .githooks/pre-commit Outdated
Comment thread .githooks/pre-push Outdated

@m1k3lm m1k3lm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise
Solid, well-documented tooling PR. Recommend tightening the .env* deny rule before merge (security-relevant given existing backup files), and deciding on the partial-stage behavior in pre-commit. The phpstan duplication and the check-attr pattern are cleanups, not blockers.

AleksandarBoljanovic and others added 2 commits June 17, 2026 11:57
- Broaden .env deny globs (Read(**/.env*), Read(.env*)) so secrets in
  hyphenated backups like .env-back are not readable; fix git check-attr
  permission to the prefix-match form Bash(git check-attr:*).
- pre-commit: re-stage only files phpcbf actually rewrote and warn when a
  re-staged file was partially staged, avoiding silently committing
  unstaged hunks; document the caveat in the hook header.
- Make bin/phpstan TTY-aware and reuse it from pre-push instead of
  duplicating the docker compose invocation.

Co-Authored-By: Claude <noreply@anthropic.com>
@mescalantea mescalantea merged commit 841281e into master Jun 17, 2026
4 checks passed
@mescalantea mescalantea deleted the chore/PAR-805-Add-Claude-configuration-and-capability-definitions branch June 17, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants