Uh oh!
There was an error while loading. Please reload this page.
chore: adapt Claude Code setup from event-database-imports - #28
Merged
Conversation
Fix the Edit/Write hooks to read the file path from the tool payload via jq instead of the unset CLAUDE_FILE_PATH env var (the previous hooks silently no-oped), add a SessionStart jq prerequisite check, widen the PreToolUse blocklist (symfony.lock, config/reference.php, vendor, node_modules, var/cache), and add a Stop hook that warns when the shared Elasticsearch index contract (src/Model/IndexName.php) changes. Document the cross-repo relationship and the automation in CLAUDE.md.
✅ No changes detected in API specification |
…de-setup-from-imports # Conflicts: # CHANGELOG.md
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapt the Claude Code tooling from the sibling
event-database-importsPR #81 to this repo, scoped to the parts that apply to a read-only API.Changes
.claude/settings.jsonEdit/Writehooks: read the edited file path from the tool payload viajq(.tool_input.file_path) instead of$CLAUDE_FILE_PATH. Claude Code never sets that env var, so the previous formatting/blocking hooks silently no-oped.SessionStart: warn whenjqis missing on the host (the hooks now depend on it).PreToolUse: widen the blocklist (symfony.lock,config/reference.php,vendor/,node_modules/,var/cache/), add theMultiEditmatcher, and useexit 2so a blocked edit is actually rejected.Stop: runscripts/claude-hook-check-index-contract.shin addition tolint:container.scripts/claude-hook-check-index-contract.sh— Stop-hook helper (mirror of the importer's, from the consumer side) that warns whensrc/Model/IndexName.phpchanges, since the importer duplicates the index-name contract by hand.CLAUDE.md— add a "Works with event-database-imports" section (shared Elasticsearch contract, index lifecycle, hand-duplicated names/mappings) and a "Claude Code automation" reference.CHANGELOG.md—[Unreleased]entry.Why
The repo's Claude hooks were carried over from an earlier setup that keyed on
$CLAUDE_FILE_PATH; that variable isn't populated by Claude Code, so single-file auto-formatting and the lock-file guard never actually ran. The importer PR verified thejq-from-stdin mechanism, so this brings the same working approach here. The index-contract guard matters more on this side: the API has no mapping definitions of its own and trusts the fields/types the importer writes, so a contract change elsewhere can silently break filters/providers here.Out of scope (deliberately not adapted)
mate/,AGENTS.md,bin/codex); low value for a read-only API with no service graph to introspect. Easy to add later if wanted.create-migration/messenger-handler-reviewer/authorization-reviewersubagents — no Doctrine migrations, no Messenger pipeline, and only trivial API-key auth here.