Agentic FHIR IG Authoring (Demo)
0.1.0 - ci-build
Agentic FHIR IG Authoring (Demo), published by HL7 Switzerland. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7ch/agentic-ig/ and changes regularly. See the Directory of published versions
Anyone can propose an addition to this guide with a GitHub issue. An AI agent turns the issue into a pull request and responds to comments on it, and a human reviews the pull request before it is merged. This page describes the set-up so that other IG projects can copy it.
agent.| Step | Done by | Detail |
|---|---|---|
| Start | Contributor or maintainer | Until 25 November 2026 every new issue starts a run. Afterwards a maintainer starts the run by adding the label agent, and the run is rejected unless that person has write access. The label also starts a further run at any time. |
| Prepare | Workflow | Checks out the repository, installs SUSHI, Jekyll and the IG Publisher on the runner, and writes the issue with all its comments to a file for the agent. |
| Announce | Workflow | Comments on the issue that an agent has picked it up, with the model and the address where the ci-build will publish the branch. |
| Implement | Agent | Follows the issue-to-pr skill: classifies the issue, checks sources, edits the files, builds, and writes a summary. |
| Report | Workflow | Reads the model and the token counts from the agent's run log. |
| Open pull request | Workflow | Commits the changes to the branch agent-issue-<number> and opens the pull request with the agent's summary, the QA counts and the usage report. |
| Check | HL7 ci-build | Builds the branch on build.fhir.org after the push. The pull request links to the rendered guide and the QA report of the branch. |
| Review | Maintainer | Reads the diff and the rendered pages, then merges or comments. |
| Follow-up | Agent and workflow | Every comment and every review on the pull request starts a further run. The workflow first merges the main branch into the branch, and the agent resolves any conflict. The agent then reads all comments, the workflow pushes one more commit to the branch and posts the agent's response, with the usage report, on the pull request. |
| File | Purpose |
|---|---|
.github/ISSUE_TEMPLATE/ |
Issue forms that collect what the agent needs |
.github/workflows/agent-issue-to-pr.yml |
Decides whether a run starts, runs the agent and opens the pull request |
.github/workflows/agent-pr-follow-up.yml |
Runs the agent on every comment or review of a pull request |
.github/scripts/agent-pr-context.sh |
Collects the issue and all pull request comments for a follow-up run |
.github/scripts/install-toolchain.sh |
Installs the build tools on the runner |
.github/scripts/agent-roles.sh |
Tells the agent who is a maintainer, from the write access to the repository |
.github/scripts/agent-usage.py |
Turns the agent's run log into the usage report |
.claude/skills/issue-to-pr/SKILL.md |
Tells the agent how to implement an issue and how to respond to pull request comments |
.claude/skills/ig-qa-loop/SKILL.md |
Tells the agent how to build and fix QA errors |
AGENTS.md |
Build commands, layout, conventions and limits for every agent |
The agent starts with no memory of earlier runs. Everything it knows about this guide comes from three files in the repository: AGENTS.md for the build commands and conventions, the ig-qa-loop skill for the build loop, and the issue-to-pr skill for this workflow. When a run goes wrong because the agent lacked knowledge, the fix is a change to one of these files.
The agent treats a person as a maintainer when that person has write access to the repository. The workflow looks this up for everyone who wrote on the issue or the pull request and gives the agent the list. It does not use the role label that GitHub attaches to a comment: for a person whose organisation membership is private, a workflow sees that label as "contributor", and the agent then wrongly reported that no maintainer had commented.
The workflow posts two comments per run, on the issue for a first run and on the pull request for a follow-up run:
The closing comment mentions the person who opened the issue and the person who started the run, so GitHub notifies them in the way they have configured, by e-mail or in the web interface.
These comments cannot start another agent run. They are posted with the workflow's own token, and GitHub starts no workflow for events from that token. The follow-up workflow also ignores every comment from a bot account.
Every pull request the agent opens ends with a usage report: the model, the input, cache and output tokens, the number of turns and the duration. The workflow computes it from the run log, so the figures do not depend on what the agent says about itself. The same report is posted on the issue, also when the agent made no change, and every follow-up run posts its own report on the pull request.
The agent runs with Claude Code GitHub Actions. It needs one repository secret:
CLAUDE_CODE_OAUTH_TOKEN: a token tied to a Claude subscription, created with claude setup-token. Runs then count against that person's subscription and no API key is needed.ANTHROPIC_API_KEY: an API key, billed per token. Use this, or workload identity federation, when the set-up should not depend on one person.The model is Claude Opus 5.5 (claude-opus-5-5). Set the repository variable AGENT_MODEL to a model id to choose another one.
merge=union in .gitattributes). GitHub's own conflict check may not apply this rule, so a pull request can still show a conflict in the change log until a follow-up run has merged the main branch.Issue text and fetched web pages are untrusted input. The safeguards reduce what a manipulated agent can do; they do not remove the need to read the diff.
This project ran a one-week trial, until 25 November 2026, in which every new issue started the agent without a maintainer reading it first. That is the shortest path for contributors, and it has a cost: anyone with a GitHub account can start runs on the project's Claude account, and the first reader of an issue is the agent. After the trial a maintainer approves each issue with the label agent. The end date is a single value, OPEN_INTAKE_UNTIL, in the workflow file, and the workflow switches by itself.
The agent may change everything under input/: pages, profiles, extensions, terminology and examples. It implements a cardinality, must-support flag, binding or code when the issue or a comment states it, and lists each such change for the reviewer. It does not choose such a value on its own when nobody stated one; it then asks. It may not change workflows, skills, build scripts or instruction files.
Every issue that a pull request covers gets its own line in the change log, with a link to the issue. This also holds for issues and requests that come in later through comments on the pull request.
agent, which starts a new run. If the label is already there, the maintainer removes it and adds it again.