Skip to content

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

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

[PAR-805] Add Claude configuration and capability definitions#63
mescalantea merged 14 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 the first repo-specific Claude capabilities. This gives the team a shared, committed baseline: architecture guidance, a permission allowlist, automated quality gates, and reusable skill/agent definitions tailored to integration-core's conventions.

References

How is it being implemented?

  • CLAUDE.md — documents the architecture (Onion model, ServiceRegister, BootstrapComponent wiring, the four API facades, multistore), the Docker-wrapped commands, and the working principles / verify gate.
  • .claude/settings.json — committed permission allowlist for the bin/* wrappers, common read-only git commands, and the sq-git:* skills.
  • Git quality gates.githooks/pre-commit (PHP syntax across all supported versions, phpcbf/phpcs, scoped phpstan) and .githooks/pre-push (full phpstan + full PHPUnit, skipped when no PHP-relevant changes). Enabled via setup.sh setting core.hooksPath.
  • .gitignore / .gitattributes — track the shared .claude/ config and hooks while excluding local-only files and keeping them out of Composer exports.
  • scaffold-feature skill (.claude/skills/) — generates a new feature's skeleton across the Domain / DataAccess / BootstrapComponent / facade layers, grounded in the CountryConfiguration reference, with PHP 7.2 syntax and the verify gate baked in.
  • integration-core-reviewer agent (.claude/agents/) — architecture-aware diff review enforcing this repo's invariants: PHP 7.2 syntax, onion-layer boundaries, the Response-not-throw facade contract, multistore StoreContext scoping, and BootstrapComponent registration.

How is it tested?

Automated tests (no production code changed — this PR adds tooling and configuration only). The new git hooks were exercised on this branch: the pre-commit and pre-push gates correctly skip when no PHP files are staged/pushed.

How is it going to be deployed?

Standard deployment.

mescalantea and others added 10 commits June 15, 2026 11:08
Document the codebase for Claude Code: the platform-agnostic library
layout, ServiceRegister/BootstrapComponent wiring, API facade + Aspects
flow, multi-store context, and the integration-contract boundary.

Capture the Docker-based bin/ tooling accurately (container must be up;
bin/phpunit ignores args) and add adapted working principles tied to the
project's phpunit/phpcs/phpstan verification gates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Allow the Docker-based bin/ tooling (phpunit, phpcs, phpcbf, phpstan,
composer, php-syntax-check), docker compose, the setup/teardown scripts,
read-only git commands, and the sq-git commit/open-pr/sync-branch skills
so routine project commands run without per-call prompts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the first repo-specific Claude capabilities on top of the PAR-805
configuration baseline:

- scaffold-feature skill: generates a new feature's skeleton across the
  Domain/DataAccess/BootstrapComponent/facade layers, grounded in the
  CountryConfiguration reference, with PHP 7.2 and the verify gate baked in.
- integration-core-reviewer agent: architecture-aware diff review enforcing
  this repo's invariants (7.2 syntax, onion boundaries, Response-not-throw,
  StoreContext scoping, BootstrapComponent registration).

Co-Authored-By: Claude <noreply@anthropic.com>
- setup.sh: add missing trailing newline.
- integration-core-reviewer: correct PHP trailing-comma versions
  (calls 7.3+, parameter lists 8.0+).

Co-Authored-By: Claude <noreply@anthropic.com>
@mescalantea mescalantea marked this pull request as ready for review June 15, 2026 11:20
@mescalantea mescalantea requested review from AleksandarBoljanovic and m1k3lm and removed request for ristokekovic June 15, 2026 11:21

@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 review of the Claude tooling/config. The architecture docs are accurate against the codebase (verified BootstrapComponent init methods, the four facades, phpstan level 6, the bin/* wrapper behavior, PHP 7.2 pin, CountryConfiguration reference) and the git hooks are carefully written. One blocking issue (the reviewer agent invokes a graphify tool that doesn't exist in the repo), a few should-fix items, and some accuracy nits — all left inline.

Comment thread .claude/agents/integration-core-reviewer.md Outdated
Comment thread .claude/settings.json Outdated
Comment thread .claude/settings.json Outdated
Comment thread .gitignore
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread .claude/skills/scaffold-feature/SKILL.md
Comment thread .githooks/pre-push

if is_zero "$remote_sha"; then
# New branch on the remote: diff the commits not yet on any remote.
oldest=$(git rev-list "$local_sha" --not --remotes | tail -1)

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.

Nit (non-blocking). Deriving the new-branch base from --not --remotes scopes against all remotes. For the normal "feature branch off master" case this is fine; in multi-remote setups it can over- or under-scope the diff. Edge case.

@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.

Follow-up: consistency between CLAUDE.md and DEVELOPER_GUIDE.md. They agree on everything this PR touched (Docker wrappers, single-test invocation, run-tests.sh, XDebug 2.9.8/9003), but there's one stale value and some now-duplicated prose that will drift. Notes inline.

Comment thread DEVELOPER_GUIDE.md
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Resolve the blocker and should-fix items from the PAR-805 review:

- reviewer agent: drop mandatory graphify step (tool not in repo);
  orient via the agent's available tools instead
- settings.json: narrow broad docker compose allow-rule to
  `up`/`exec php`, and standardize all Bash perms on the `cmd:*`
  prefix form
- DEVELOPER_GUIDE.md: bump stale phpstan --memory-limit 512M to 1G
- CLAUDE.md / scaffold-feature: correct aspect namespace
  (concrete aspects live in AdminAPI\Aspects, only the runner is
  in Bootstrap/Aspect); note .phpcs.xml.dist precedence; collapse
  single-test and run-tests.sh duplication into DEVELOPER_GUIDE.md
  pointers

Co-Authored-By: Claude <noreply@anthropic.com>
@mescalantea mescalantea merged commit 78f3fbe into master Jun 17, 2026
5 checks passed
@mescalantea mescalantea deleted the chore/PAR-805-Add-Claude-configuration-and-capability-definitions branch June 17, 2026 10:23
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