Skip to content

chore(claude): share Claude Code and agent configuration#147

Merged
smunini merged 2 commits into
mainfrom
chore/share-claude-agents-config
Jun 13, 2026
Merged

chore(claude): share Claude Code and agent configuration#147
smunini merged 2 commits into
mainfrom
chore/share-claude-agents-config

Conversation

@aacruzgon

Copy link
Copy Markdown
Contributor

Summary

Promotes the local Claude Code / agent workflow configuration to a shared, committed part of the repository so every contributor gets the same project guidance, subsystem skills, and review hooks. Previously .claude/ and AGENTS.md were gitignored and lived only on individual machines.

Changes

Skills (.claude/skills/ + mirrored .agents/skills/)

  • 13 subsystem skills: run-hfs-server, work-with-fhirpath, work-with-sof, work-with-pysof, work-with-hts, test-hfs, bulk-data-export, bulk-data-submit, docker-and-release, plus new work-with-auth, work-with-audit, work-with-subscriptions, and work-with-cds-hooks.

Project guidance

  • CLAUDE.md: corrected the workspace crate count (→ 17) and added the missing helios-hts, helios-auth, helios-audit, helios-subscriptions, and helios-cds-hooks crate-table rows and skill entries.
  • AGENTS.md: added.

Review hooks (.claude/settings.json, .claude/hooks/, .claude/schemas/)

  • hfs-policy.sh — session/prompt context plus a Stop gate that holds completion until cargo fmt --all, CI-style clippy, and an affected cargo test are recorded.
  • codex-verify-plan.sh — PreToolUse gate on ExitPlanMode; Codex reviews the plan against an HFS-specialized schema (domains: server_api, persistence, fhir_core, subscriptions, tooling_config) covering tenant-first persistence, FHIR-version gating, CI coverage, and reuse-over-duplication.
  • codex-final-plan-review.sh — Stop-time review comparing the accepted plan to the implementation (git diff + recorded check state), capped retries, with remote-CI execution treated as out of scope.
  • codex-gate-log.sh — shared timestamped + JSONL logging used by both gates.

.gitignore

  • Stop ignoring .claude/ and AGENTS.md; keep .claude/state/ and .claude/debug/ (runtime) ignored.

Testing

  • Docs/config only — no compiled code changed (commit carries [skip ci]).
  • bash -n on all hook scripts and jq empty on all schemas pass; the gate pass/deny/block paths were exercised locally with stubbed and real codex runs.

Notes

  • The Codex hooks are fail-closed and require the codex CLI. Contributors without it will be blocked at ExitPlanMode (plan gate) and Stop (final review) unless they set CODEX_PLAN_GATE_DISABLE=1. hfs-policy.sh only needs jq/python3.
  • Hooks take effect on a fresh Claude Code session (settings.json is read at startup).
  • .claude/skills/ and .agents/skills/ are kept as identical mirrors.

Make the local Claude Code / agent workflow configuration a shared,
committed part of the repo so the whole team gets the same skills,
project guidance, and review hooks.

Changes:
- Add .claude/skills and mirrored .agents/skills (13 subsystem skills:
  fhirpath, sof, pysof, hts, run-hfs-server, test-hfs, bulk-data
  export/submit, docker-and-release, plus new auth, audit,
  subscriptions, and cds-hooks).
- Add .claude/settings.json and .claude/hooks: the hfs-policy stop-gate
  plus the Codex-backed plan gate (PreToolUse/ExitPlanMode), final
  implementation review (Stop), and a shared logging helper, with
  .claude/schemas holding their JSON output contracts.
- Refresh CLAUDE.md: correct the crate count to 17 and add the
  hts/auth/audit/subscriptions/cds-hooks crate rows and skill entries.
- Add AGENTS.md and stop ignoring .claude / AGENTS.md in .gitignore;
  keep the .claude/state and .claude/debug runtime dirs ignored.

The Codex hooks are fail-closed and require the `codex` CLI; set
CODEX_PLAN_GATE_DISABLE=1 to bypass them.

Tests: docs/config only. Validated shell syntax (bash -n) and JSON
(jq) for all hooks and schemas locally; no compiled code changed.
smunini
smunini previously approved these changes Jun 13, 2026
@smunini smunini merged commit c179bfd into main Jun 13, 2026
3 checks passed
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants