[PAR-805] Add Claude configuration and capability definitions#63
Conversation
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>
…hecks and documentation
m1k3lm
left a comment
There was a problem hiding this comment.
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.
|
|
||
| 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) |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
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>
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 thebin/*wrappers, common read-only git commands, and thesq-git:*skills..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 viasetup.shsettingcore.hooksPath..gitignore/.gitattributes— track the shared.claude/config and hooks while excluding local-only files and keeping them out of Composer exports.scaffold-featureskill (.claude/skills/) — generates a new feature's skeleton across the Domain / DataAccess / BootstrapComponent / facade layers, grounded in theCountryConfigurationreference, with PHP 7.2 syntax and the verify gate baked in.integration-core-revieweragent (.claude/agents/) — architecture-aware diff review enforcing this repo's invariants: PHP 7.2 syntax, onion-layer boundaries, the Response-not-throw facade contract, multistoreStoreContextscoping, andBootstrapComponentregistration.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.