Check Healthcare Security Decisions in Code AI Agents Write
Teams building clinical, patient-facing and medical device software already make security architecture decisions about their code. Three shipped Mneme rule kinds can check some of those decisions when a coding agent writes the change. Each has limits, listed below.
An agent writes the call the security architecture forbids.
Security architects in healthcare make decisions about how code handles patient data. Clinical services never log a patient record, and browser code reaches the data warehouse only through the backend API. Idle sessions time out after fifteen minutes. Some of these decisions answer to frameworks such as the US Health Insurance Portability and Accountability Act (HIPAA) or the International Electrotechnical Commission (IEC) standard 62304 for medical device software. Mneme does not satisfy those frameworks.
A coding agent asked to debug an appointment service works from the code and the prompt in front of it. It does not read the security architecture record. If it adds a line that logs the whole patient object, only a reviewer who spots that line in the diff stops it.
Three rule kinds apply, each with limits.
A security architect writes the decision as an Architecture Decision Record (ADR): a Markdown file with a Constraints section. mneme adr import compiles the constraints into rules stored in a memory file, .mneme/project_memory.json. mneme check then evaluates code changes against those rules in two places: the Claude Code hook, which runs before Claude Code’s Edit, Write and MultiEdit tools change a file, and CI. Each check returns PASS, WARN or FAIL. Strict mode exits non-zero on WARN or FAIL. Warn mode exits 0 on all three, and exits 2 only on an error or when a rule could not be evaluated (INCOMPLETE).
The examples below are illustrative. Tested runs with real output are on the Architectural Security Governance use case, with the full table of what Mneme checks and does not check. To try it yourself, start with the quickstart.
| Rule kind (mneme-hq 0.11.0) | Example decision | Verdict and limits |
|---|---|---|
FORBID_LITERAL with include_paths |
Forbid log.info(patient) in services/clinical/**. |
FAIL, in the Claude Code hook and in CI. Exact, case-sensitive text, so log.info(p) after p = patient passes. The rule skips files outside the listed paths. |
| FORBID_NUMERIC_ABOVE | SESSION_IDLE_TIMEOUT_SECONDS must not exceed 900 in Python files under src/**. |
FAIL, in CI only, on Python files checked with --source-file. The Claude Code hook does not evaluate it. In 0.11.0, once a numeric rule is in the memory file, every check that uses --input returns INCOMPLETE (exit 2), even in warn mode and for Python files. |
| FORBID_DEPENDENCY | Flag @google-cloud/bigquery, because browser code must reach the data warehouse through the backend API. |
WARN only, never FAIL, and no path scope, so the same import in backend code warns too. It matches any single word of the name, so a file that mentions google.com warns. Because this name splits into several words, it is checked only when the change description passed to --query retrieves this decision. |
No case study yet.
There is no case study for healthcare yet. This page describes what the shipped rule kinds can express. It does not report results from any healthcare or medical software team. We will add one when a team agrees to publish theirs.
What Mneme does not do here.
- It does not certify compliance. Mneme does not make a codebase or a team compliant with HIPAA, IEC 62304 or any other framework, and a passing
mneme checkis not evidence of compliance. - It does not detect protected health information (PHI) or other personal data by meaning. A FORBID_LITERAL rule matches the exact text you name, so the same value logged through a renamed variable passes.
- It does not find vulnerabilities or check dependencies against known-vulnerability (CVE) or licence data. Keep static application security testing (SAST), software composition analysis (SCA) and code review.
- It does not enforce infrastructure, network or cloud policy, and it does not govern what an agent does at runtime. It checks code changes.
- It keeps no audit log.
mneme checkprints a verdict and exits with a code. Keep its--jsonoutput from CI if you need a record.