Skip to content

chore: add Claude Code setup adapted to this repo#27

Merged
turegjorup merged 3 commits into
developfrom
feature/claude-code-setup
May 22, 2026
Merged

chore: add Claude Code setup adapted to this repo#27
turegjorup merged 3 commits into
developfrom
feature/claude-code-setup

Conversation

@turegjorup
Copy link
Copy Markdown
Contributor

Summary

Adds a project-level Claude Code setup (CLAUDE.md + .claude/) tailored to this repo's Taskfile / Elasticsearch / API Platform conventions. Starts from a config copied from a Doctrine/Yarn-flavoured project and adapts it to fit here.

No production code is touched.

Files Changed

  • CLAUDE.md (new) — onboarding doc for Claude Code: project purpose (read-only ES-backed API, data owned by event-database-imports), Taskfile-based commands, request-flow architecture (Dto → State Provider → ElasticSearchIndex), and the non-obvious conventions (no Doctrine entities, PHPUnit fails on deprecations, etc.).
  • .claude/settings.json (new) — permission allow/deny/ask lists, SessionStart hook to bring up docker compose, PreToolUse block on lock files / .env.local, PostToolUse auto-format hooks for PHP / Twig / composer.json / YAML / Markdown using this repo's services (prettier, markdownlint — not a node service, which doesn't exist here), and a Stop hook running bin/console lint:container. Merged the previous settings.local.json MCP keys in here.
  • .claude/settings.local.json (new, empty {}) — gitignored per-user override slot.
  • .gitignore — ignore .claude/settings.local.json (same pattern as .env.local).
  • .claude/agents/pr-readiness.md (new) — mirrors .github/workflows/*.yaml: composer validate/normalize, PHP/Twig/YAML/Markdown coding-standards, PHPStan, fixtures + task api:test, task api:spec:export diff check, CHANGELOG check.
  • .claude/agents/reload-fixtures.md (new) — replaces an inherited create-migration agent that assumed Doctrine. Handles the README's "No alive nodes" Elasticsearch recovery dance.
  • .claude/skills/update-api-spec/SKILL.md (new) — points at task api:spec:export and the single public/spec.yaml (not the inherited two-file api-spec-v1.{yaml,json}).

Test Plan

  • Open this repo in Claude Code — SessionStart hook brings up the docker compose stack.
  • Edit a .php file — PostToolUse runs php-cs-fixer then phpstan on the file.
  • Edit a .yaml file — PostToolUse runs prettier via the prettier compose service.
  • Edit a .md file — PostToolUse runs markdownlint --fix via the markdownlint compose service.
  • Try to edit .env.local or composer.lockPreToolUse hook blocks the write.
  • Run the pr-readiness agent — all CI-equivalent checks execute successfully.
  • Run the update-api-spec skill after a no-op resource change — produces a clean git diff public/spec.yaml.

🤖 Generated with Claude Code

Adds CLAUDE.md, project-level .claude/ config, two agents
(pr-readiness, reload-fixtures) and an update-api-spec skill,
all targeted at this repo's Taskfile / Elasticsearch / API
Platform setup. settings.local.json is gitignored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@turegjorup turegjorup self-assigned this May 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

No changes detected in API specification

turegjorup and others added 2 commits May 22, 2026 10:57
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@turegjorup turegjorup requested a review from cableman May 22, 2026 09:00
@turegjorup turegjorup merged commit 6234209 into develop May 22, 2026
12 checks passed
@turegjorup turegjorup deleted the feature/claude-code-setup branch May 22, 2026 09:00
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.

1 participant