Skip to content

Track and consolidate .claude, and add a pipeline for implementing FHIRPath issues - #2699

Open
piotrszul wants to merge 18 commits into
mainfrom
fix/local_claude
Open

Track and consolidate .claude, and add a pipeline for implementing FHIRPath issues#2699
piotrszul wants to merge 18 commits into
mainfrom
fix/local_claude

Conversation

@piotrszul

@piotrszul piotrszul commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

A local /.claude/ rule in .git/info/exclude had been quietly hiding most of this repository's
Claude Code configuration from version control, so some skills were tracked and others were not.
This branch removes that rule, brings the hidden content under version control, tidies what turned
up, and then builds on it: a skill-driven pipeline that takes a FHIRPath issue to a PR.

The two halves are related — the pipeline is only shareable because the configuration it lives in
is now tracked.

Bringing .claude/ under version control

  • Track the files the local exclude rule was hiding.
  • Move personal artifact docs out of the tracked tree into an untracked area.
  • Consolidate .claude/specs/ into the skills that actually use those references, and add a
    fhir-search-spec skill for the FHIR search specification and SearchParameter registry.
  • Remove an unused FHIR search design document and the references to it.

A pipeline for FHIRPath issues

/implement-pathling <issue> drives an issue to a PR ready for review. It delegates to specialists
for spec lookup, test design, exclusion hygiene, and correctness review, and stops at the PR — it
does not merge.

Gates are decided by paths rather than judgment. A change confined to a new @FhirPathFunction
method on an existing provider proceeds on its own. Anything touching the parser, operators, the
evaluation context, or the type system stops and escalates into an OpenSpec change, so a
framework-level design is reviewed before code exists. Unresolved ambiguity between the
specification and the reference corpus stops too.

Correctness review runs before the branch is pushed rather than after, so a finding is folded into
the commit it belongs to and the pull request opens in the state it is meant to be judged in.

Two further gates guard the entry point, because most of the run is unsupervised. A liveness check
confirms the issue is still open, that no pull request already covers it, and that the functions it
names are not already registered — so a run cannot spend itself reimplementing work that has
landed. And since the tracker is public, issue text is read as scope rather than as instruction:
text that directs the run is reported back rather than obeyed.

Three supporting skills: pathling-yaml-exclusions for the conformance baselines,
pathling-fhirpath-review for a correctness rubric, and a repaired fhirpath-test-designer.

Repairs found along the way

  • fhirpath-test-designer described a different project's DSL. It named FhirPathTestBase,
    com.example.fhirpath and @TestFactory, and stated that stringEmpty(), elementEmpty() and
    choice() do not exist. Pathling uses FhirPathDslTestBase, au.csiro.pathling.test.dsl and
    @FhirPathTest, and all three methods do exist. Any generated test would not have compiled.
    DslApiContractTest now exercises every documented construct so the two cannot drift apart
    unnoticed.
  • spark-catalyst declared name: Apache Spark Catalyst API, which is not a valid skill name.
  • CLAUDE.md carried stale versions (9.3.0-SNAPSHOT, server 1.0.0-SNAPSHOT; actually
    9.9.0-SNAPSHOT and 2.0.1) alongside a feature-implementation process now owned by the
    orchestrator. It is rewritten around gotchas that are not inferable from the repository, and
    hardcoded versions are dropped rather than updated.

A note on the diff size

77k insertions, of which ~75.8k is vendored specification text that was previously untracked:
search-parameters.json (67.6k), FHIR_search.md (3.5k), FHIRPath.md (4.6k) and
FHIR_FHIRpath.md (0.7k). Roughly 2k lines are authored content. Everything reads as an addition
because these files were never tracked — CLAUDE.md appears as a new 86-line file even though it
is a rewrite of a 438-line one.

Verification

  • DslApiContractTest — 10 tests, 0 failures. Every DSL construct documented in the test-designer
    skill compiles and behaves as documented.
  • YamlReferenceImplTest — 1821 tests, 0 failures, 961 skipped (the exclusion baseline).
  • YamlFhirPathTest — 1268 tests, 0 failures.
  • FhirViewShareableComplianceTest — 124 tests, 0 failures.
  • All 32 skills carry valid frontmatter whose name matches its directory; no dangling references.
  • The OpenSpec escalation path was probed against the CLI: the spec-driven artifact graph is
    proposal → {design, specs} → tasks, not the linear order the schema listing suggests.

The orchestrator itself has not yet been run end to end. The intended first run is against #2385
(existence functions), attended, before trusting it unattended.

🤖 Generated with Claude Code

piotrszul and others added 16 commits August 4, 2026 20:05
These files were invisible to git because of a blanket /.claude/ rule in
.git/info/exclude (a local, untracked exclude file). Checking them in as-is
so we can review and decide what should actually be tracked, ignored, or
removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The fhirpath implementation guide and code review checklist were personal
working documents, not project-shared content, so they belong in the local
.local/_claude area rather than under version control. Also dropped the
now-dangling reference to them from CLAUDE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The spec files in .claude/specs/ duplicated content already tracked under
.claude/skills/fhirpath-spec/references/, and the remaining files each
belonged conceptually to a specific skill rather than a shared top-level
folder. Moved DSL_Testing_Strategy.md into fhirpath-test-designer and
created a new fhir-search-spec skill for the FHIR search specification and
SearchParameter registry, then updated CLAUDE.md to point at the new
locations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The design document isn't referenced by any other file, so drop the
pointers to it from CLAUDE.md and the fhir-search-spec skill.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Now that CLAUDE.md and the fhir-search-spec skill no longer reference this
document, and nothing else in the repo does either, drop the file itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Turns a FHIRPath issue into a PR ready for review, so the 30-odd open
feature issues can be worked without re-deriving the process each time.
An orchestrator skill drives the run and delegates to specialists for
spec lookup, test design, exclusion hygiene, and correctness review.

Gates are mechanical rather than judgment calls. A change confined to a
new function on an existing provider proceeds on its own; anything
touching the parser, operators, evaluation context, or type system stops
and escalates into an OpenSpec change for design review before code
exists. Ambiguity between the spec and the reference corpus also stops.

The test designer skill described a different project's DSL, so it would
have emitted tests that do not compile. It is rewritten against the real
one, and a contract test now exercises every documented construct to
fail the build if the two drift apart.

CLAUDE.md loses the process it duplicated, along with stale versions and
guidance inferable from the repo, and keeps the gotchas that are not:
formatting gates compilation, stale upstream modules surface as bogus
compile errors, and the conformance baseline asserts how each excluded
case fails, so an obsolete exclusion turns the build red by itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… reference

DSL_Testing_Strategy.md documented sb.extension(...) as a DSL builder method,
but FhirPathModelBuilder has never had one — extensions are accessed by URL
and serialised the way HAPI does, which the map-based synthetic subject
cannot express. Corrected the guidance to point at withResource, matching
what the skill's own SKILL.md already says about the map-based builder's
limitations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fhirpath-spec previously relied on an untracked, per-machine symlink at
.local/fhirpath.js to consult the official reference implementation. That
path is invisible to worktrees and to anyone else who checks the repo out,
so the cross-referencing capability silently vanished outside the original
author's own checkout.

cache-github-repo replaces it with a tracked, per-project pin
(.claude/repo-cache.yaml, keyed by org/repo) and a version-keyed local
cache shared across projects and worktrees. It separates the interactive
decision (which version to use, asked once via `configure`) from the
non-interactive fast path other skills delegate to (`ensure`, which fails
outright rather than guessing when run unattended). fhirpath-spec's Step 0
and implement-pathling's --unattended propagation are updated accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Clean-session testing surfaced three ways these skills skipped the
interactive version-pin prompt instead of actually asking: silently
picking the latest tag, misreading fhirpath-spec's --unattended
passthrough as unconditional, and treating a general "auto mode"
disposition as equivalent to the skill's own --unattended flag. Rewords
the ensure/configure branches and the reference-implementation check so
each of these no longer reads as a valid reason to skip the prompt.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fhirpath-test-designer's test-matrix review gate had no defined behaviour
under --unattended, unlike the other gates in implement-pathling's
pipeline, so an unattended run could stall waiting for a reviewer that
will never respond. Also removes a hardcoded model name from the commit
templates and trims prose that duplicated content already stated
elsewhere in the same skill.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Records the fhirpath.js version pin so the cache-github-repo skill has
a deterministic, shared reference across sessions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
An adversarial review against the writing-great-skills rubric found: Step 5
and Step 6 disagreed about when tests get written, the branch-exists stop in
Step 2 was missing from the Step 0 gate table (leaving --unattended behaviour
undefined for it), and the Reminders section duplicated several sentences
already stated in the numbered steps. Also disclosed the rarely-taken OpenSpec
escalation procedure to a separate file so the common path stays legible, and
pointed two build-gotcha notes at the parent CLAUDE.md instead of restating
them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Review now runs before the branch is pushed, so findings are folded into
the commits they belong to and the pull request opens in the state it is
meant to be judged in, rather than accumulating corrections after the
fact.

Adds a liveness check before branching, so an unsupervised run cannot
spend itself reimplementing work that has already landed, and treats
issue text from the public tracker as scope to act on rather than as
instructions to follow.

Moves the build ladder and the commit and pull request templates into
reference files, matching the layout the other Pathling skills use.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The DSL contract test left two documented surfaces unexercised, so removing
either would have kept the build green while the test-designer skill went
stale — the drift the test exists to prevent. It now covers them.

The skills also carried three inaccuracies that would mislead a run rather
than merely read poorly: the empty-versus-absent distinction was described
two incompatible ways across one skill, the unattended flag was not threaded
to the reviewer subagent that consults the spec skill, and a section headed
"fields that do not work" listed one that does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Step 2 hardcoded origin/main as the branch point, which is correct for real
issue work but breaks battle-testing the pipeline's own tooling before it
merges to main — a branch built from origin/main would be missing the very
skill files the run depends on. --base makes the override explicit and
threads it through Step 10's review range and Step 11's PR target instead of
relying on a manual, unrecorded workaround. Also renamed the worktree path
from .worktrees/<N> to .worktrees/issue/<N> so it matches the branch name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Aligns the implement-pathling skill's --worktree path with the
EnterWorktree tool's hardcoded root, since that root cannot be changed
via settings.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to Backlog in Pathling Aug 10, 2026
@piotrszul piotrszul moved this from Backlog to In progress in Pathling Aug 10, 2026
johngrimes and others added 2 commits August 10, 2026 22:23
When the CI R package cache misses, devtools and pkgdown are compiled
from source, pulling in systemfonts, textshaping and ragg. These require
font and image development headers that were not present on the runner,
so the R dependency install failed with "there is no package called
'devtools'". Install the required libraries in the shared R setup action
so every workflow that builds the R library is covered.
Backtick-quoting the operator in the roxygen tag produced a malformed
NAMESPACE entry that R's namespace loader looks up literally, causing
"object '`%||%`' is not exported by 'namespace:rlang'" even though the
operator is genuinely exported. Quoting matches the existing convention
used for sparklyr's "%>%" import in the same file.
@sonarqubecloud

Copy link
Copy Markdown

@piotrszul
piotrszul requested a review from johngrimes August 10, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants