This guide explains how to get Spine Harmony running with OpenAI’s coding-agent workflow, usually called Codex. Some people may describe this as using an AI “copilot” for files and notes. The practical setup is the same: give the coding agent the Spine Harmony instructions, keep your real medical data in a separate private workspace, and ask the agent to organize notes, symptom logs, and clinician questions.
Important naming note: GitHub Copilot is a Microsoft/GitHub product. OpenAI’s coding-agent product is commonly called Codex. This guide uses OpenAI Codex / Copilot-style workflow to cover the common beginner wording, but the actual commands below use OpenAI Codex.
Medical and privacy warning: Spine Harmony is not medical advice, diagnosis, treatment guidance, emergency triage, radiology interpretation, or a medical device. If you paste or upload medical records into Codex, ChatGPT, a cloud IDE, or another hosted AI tool, you may be disclosing medical information to that provider. Review the provider’s terms, privacy policy, retention settings, and your own comfort level before adding real records.
You will create two folders:
Documents/
├── spine-harmony-agent/ # public template repo; no private medical files
└── spine-harmony-private/ # your private workspace; do not upload to GitHub
Codex should work inside spine-harmony-private/. The public repo is only the instruction and template pack.
Spine Harmony works because an AI coding agent can read project instructions and workspace files:
AGENTS.md tells the agent how a Spine Harmony assistant should behave.templates/ contains blank starter files for your profile, journal, symptom tracker, Q&A log, and handoff notes.You need:
Optional but helpful:
Documents/SpineHarmony/ for all local files.spine-harmony-agent.Documents folder.Open Terminal or PowerShell and run:
cd ~/Documents
git clone https://github.com/d2ma-tech/spine-harmony-agent.git
If git is not installed, use Option A or install Git first.
Create a separate folder for your real data:
cd ~/Documents
mkdir spine-harmony-private
This folder is intentionally separate from the public GitHub repo. Do not push this private folder to GitHub.
The Codex CLI expects to work inside a git repository. Your private folder can be a local-only git repo that is never pushed anywhere.
cd ~/Documents/spine-harmony-private
git init
This is only for local file tracking. It does not upload anything by itself.
.gitignoreInside spine-harmony-private, create a .gitignore file so common private or bulky medical files are not accidentally committed.
On macOS/Linux:
cat > .gitignore <<'EOF'
# Real medical/private data — keep out of git history
records/
imaging/
exports/
reports/private/
consultations/
transcripts/
*.pdf
*.doc
*.docx
*.zip
*.7z
*.tar
*.gz
*.dcm
*.dicom
*.nii
*.mha
*.mhd
*.nrrd
# Secrets and local environment files
.env
*.key
*.pem
*token*
*secret*
# Operating-system/editor clutter
.DS_Store
Thumbs.db
.vscode/
.idea/
EOF
On Windows PowerShell:
@'
# Real medical/private data — keep out of git history
records/
imaging/
exports/
reports/private/
consultations/
transcripts/
*.pdf
*.doc
*.docx
*.zip
*.7z
*.tar
*.gz
*.dcm
*.dicom
*.nii
*.mha
*.mhd
*.nrrd
# Secrets and local environment files
.env
*.key
*.pem
*token*
*secret*
# Operating-system/editor clutter
.DS_Store
Thumbs.db
.vscode/
.idea/
'@ | Set-Content .gitignore
From your Documents folder, copy the public instruction file into your private workspace:
cd ~/Documents
cp spine-harmony-agent/AGENTS.md spine-harmony-private/AGENTS.md
Why this matters: Codex and other coding agents can read AGENTS.md as project instructions. This tells the agent to stay spine-specific, preserve privacy, avoid diagnosis/treatment advice, and keep real patient data out of public outputs.
Run:
cd ~/Documents
cp spine-harmony-agent/templates/USER.md spine-harmony-private/USER.md
cp spine-harmony-agent/templates/SpineHarmony_Journal.md spine-harmony-private/SpineHarmony_Journal.md
cp spine-harmony-agent/templates/qa-log.md spine-harmony-private/qa-log.md
cp spine-harmony-agent/templates/symptom-tracker.md spine-harmony-private/symptom-tracker.md
cp spine-harmony-agent/templates/handoff.md spine-harmony-private/handoff.md
You now have a private workspace with the minimum starter files.
Create folders for files you may want to organize locally:
cd ~/Documents/spine-harmony-private
mkdir -p records imaging exports reports/private consultations transcripts
Keep real records in these folders. They are ignored by the .gitignore above.
Open spine-harmony-private in a text editor and edit:
USER.md — basic profile and preferences;SpineHarmony_Journal.md — your spine-health timeline;symptom-tracker.md — current symptom and pain tracking;qa-log.md — questions and answers you want preserved;handoff.md — a short summary for future sessions.Use plain language. You do not need perfect medical formatting.
Example safe first entries:
# USER
- Name: [your name or initials]
- Location/timezone: [your timezone]
- Spine condition summary: [brief plain-English summary]
- Current clinicians: [optional]
- Privacy preference: Keep real medical files out of public repos.
# Spine Harmony Journal
## Current spine-health summary
- Main issue: [plain-English description]
- Key imaging/report facts: [source facts only]
- Current treatment plan from clinician: [what your clinician said]
- Open questions for next appointment: [list]
If you already have OpenAI Codex available in your coding environment, skip to Step 10.
If you are using the Codex CLI, install it with npm:
npm install -g @openai/codex
Then confirm it runs:
codex --version
If the command is not found, check that Node.js/npm are installed and that your terminal can see globally installed npm packages.
Follow the login or authentication instructions shown by your Codex environment. Depending on your setup, this may be:
Do not put API keys, tokens, passwords, or recovery codes inside your Spine Harmony files.
Run Codex from the private folder, not the public template repo:
cd ~/Documents/spine-harmony-private
codex
Or for a one-shot instruction:
cd ~/Documents/spine-harmony-private
codex exec "Read AGENTS.md, USER.md, SpineHarmony_Journal.md, symptom-tracker.md, qa-log.md, and handoff.md. Summarize what is currently known, list missing information, and suggest clinician-verification questions. Do not diagnose or recommend treatment."
If your Codex environment has a graphical interface, open the folder spine-harmony-private as the project/workspace and make sure it can see AGENTS.md.
Paste this as your first prompt:
Read AGENTS.md and follow it as the project instruction.
Then read USER.md, SpineHarmony_Journal.md, symptom-tracker.md, qa-log.md, and handoff.md.
Please give me:
1. a concise spine-history summary grounded only in the files;
2. missing information I should add;
3. questions to ask my clinician;
4. any red-flag symptoms that should be handled by urgent medical care, without trying to triage severity.
Do not diagnose, recommend treatment, interpret imaging as a clinician, or tell me to start/stop/change medication, exercise, procedures, or surgery.
After you have created the initial workspace, you may make a local commit so you can track your own edits over time:
cd ~/Documents/spine-harmony-private
git status
git add AGENTS.md USER.md SpineHarmony_Journal.md qa-log.md symptom-tracker.md handoff.md .gitignore
git commit -m "Initialize private Spine Harmony workspace"
Do not add raw medical records, imaging, PDFs, transcripts, or private generated reports to git.
Use Codex to help maintain your files, for example:
Read AGENTS.md and symptom-tracker.md. Add this new symptom note to the tracker while preserving my raw facts. Then update the trend summary cautiously without saying the treatment worked unless a clinician said that.
New note:
[Paste your note here]
Read AGENTS.md, SpineHarmony_Journal.md, and qa-log.md. Prepare a short question list for my next spine appointment. Separate source facts from interpretation. Do not recommend treatment.
Read AGENTS.md and handoff.md. Update handoff.md so another session can understand the current state, open questions, and safety boundaries. Keep it concise.
Before adding real records, check:
spine-harmony-private, not spine-harmony-agent.AGENTS.md exists in the private folder..gitignore exists in the private folder.Good tasks:
Avoid asking Codex to:
If you are using a ChatGPT project, OpenAI web workspace, or other OpenAI copilot-style interface instead of the Codex CLI:
Spine Harmony.AGENTS.md as the project instruction.This is less file-native than Codex, but the same safety rules apply.
Make sure you started Codex from the private folder:
cd ~/Documents/spine-harmony-private
pwd
ls
codex
You should see AGENTS.md, USER.md, SpineHarmony_Journal.md, qa-log.md, symptom-tracker.md, and handoff.md.
Tell it explicitly:
Read AGENTS.md again and follow it as the project instruction. Stay within the Spine Harmony boundaries: organize, summarize, track, and prepare clinician questions; do not diagnose or recommend treatment.
spine-harmony-agent and into spine-harmony-private.git status shows medical files ready to commitDo not commit. Add the file type or folder to .gitignore, then check again:
git status
Push it back inside the boundary:
Do not recommend treatment or make medical decisions. Reframe this as: source facts, uncertainty, questions for my clinician, and safety boundaries.
If you cannot use terminal commands:
spine-harmony-private somewhere safe on your computer.AGENTS.md from the repo into spine-harmony-private.templates/ into spine-harmony-private.Spine Harmony is a structured patient-side memory and preparation system. It can help you stay organized, track symptoms, and ask better questions. It should not diagnose, replace qualified clinicians, or make treatment decisions.