Medication Tracker

Project preferences

Use this skill when planning, implementing, or reviewing changes in this repository. Keep all project-specific preferences and workflows in this single file. This skill supplements AGENTS.md and cannot weaken its security, privacy, accessibility, licensing, testing, or authorization rules.

Purpose and scope

This repository is one Privatium app, apps/meds/, the Medication Tracker: a personal medication tracker for families with chronic conditions. It is a Tier 1 app, written in Lua 5.4 with LSP templates and a SQL schema, and it runs on a Privatium node the household controls. Everything outside apps/meds/ is documentation, tests, licensing and assistant guides.

Environment and structure

Follow the repository’s existing file and folder naming conventions when adding new files.

Setup and verification

Run the app from a link in the Privatium data directory, never with the checkout as the data root, so private keys and real records stay out of the working tree:

ln -s ~/git/privatium-app-meds/apps/meds ~/.local/share/privatium/apps/meds
privatium dev --app meds

Before finishing any change to the app, lint it and fix every finding:

privatium lint apps/meds

The command exits with code 3 while findings remain. The GitHub Actions workflow .github/workflows/lint.yml runs the same lint with the pinned Privatium release.

Then run the tests from the root of the repository, and fix every failure:

lua5.4 tests/lua/run.lua
python3 tests/test_supply.py
python3 tests/test_catalog.py
PRIVATIUM=/path/to/privatium tests/smoke.sh

The unit tests need Lua 5.4, the version Privatium runs. The smoke test starts its own node on a temporary data directory and uses invented data only.

Project constraints

Terms

Use one name for each concept in the interface, messages, help, and documentation. Words to know defines each of these for families; add a new term there and here together.

Use Meaning Avoid
person, people Someone in the household whose medications the app tracks patient, member, user
medication A medicine on screen and in developer pages. Family pages may say “medicine” in running text, but use “medication” when they name a screen, tab or field. prescription, when it means the medicine itself
tracked medication A medication that a person takes, shown on the Medications tab item
catalog The list of products the app knows about database, library
product One catalog entry: one medication at one strength, form and package item, SKU
drug The active substance, as in “generic name” and “drug references” (the public lists the online search reads) drug, when it means a medication or a product
fill One time a pharmacy gives out a medication dispense, order, purchase
refill Another fill of the same prescription reorder
prescriber The clinician who wrote the prescription doctor (in the interface), provider
insurance plan, plan Whoever pays for a fill. “Payer” appears only in the data model and developer pages. insurer, insurance company, carrier
prior authorization A plan’s approval before it pays for a medication. Family pages explain it as an approval from the plan at first use. PA, preauthorization
patient portal A plan’s, pharmacy’s or doctor’s website that lists fills or medications portal site, account page

Project skills

Load privatium-tier1-lua, privatium-security and privatium-accessibility from skills/ before changing the app, and apps/meds/SKILL.md for the app’s own schema and conventions. Load privatium-overview only when a change might belong in another tier.

Conclusion

Keep the app small, lint clean, and documented table by table.

Additional resources