Feedback loopable first. An agent that can't start the app, log in or see the page guesses. Setup paves that road before it writes any prose: one start command, a dev login, seeds, readable logs, a screenshot, and a preflight that says what's missing. Then the guidance that tells every later session what this project is, which words it uses, and how work gets checked and delivered.
Done: a fresh session that was told nothing reaches a logged-in screenshot of the app, and can name the checks a change must pass, without asking.
Existing files win. Fill what's missing, leave the rest alone and say so.
Two modes. Project mode, the default, is steps 1 to 6 below. /altitude:setup --user, or 'set my defaults', is user mode: skip to User mode.
The host
Tell it from your own session, since the server can't: Amp has thread and orb tools and reads AGENTS.md; Claude Code has ~/.claude and reads CLAUDE.md. Where the guidance goes:
- Boost (
boost.jsonexists, or.ai/guidelinesfeeds a generated AGENTS.md or CLAUDE.md): write the source in.ai/guidelines/*.md, never the generated file, and tell the user to runphp artisan boost:update. - Amp:
AGENTS.mdat the root. ACLAUDE.mdbeside it that is only@AGENTS.mdkeeps Claude Code on the same text. - Claude Code:
CLAUDE.md, importing the guideline files with@.ai/guidelines/<file>.mdlines.
Add lines; never rewrite what's there.
Settings
The skills read four settings, nearest first: altitude.json in the repo root (the older .claude/altitude.json is still read), then ~/.config/altitude/altitude.json, then the Altitude account through the server's whoami and settings tools, then the defaults. A direct instruction in the conversation beats all of them. Values come from fixed lists, never commands, so a cloned repo's file can't run anything.
| Key | Values | Default | Read by |
|---|---|---|---|
delivery | main, pr | main | ship |
unfinished | flag, branch | flag | ship |
after_deploy | check, none | check | ship |
review_labs | a list of OpenAI, xAI, Google, GitHub, Cursor, opencode; a repo's file only narrows the user's or the account's | none | review's panel |
Write a project's altitude.json only for a value that differs from the account's or the user's: this project ships through pull requests, say. The format hook's format and analyse lists stay in .claude/altitude.json (step 4).
1. Survey
From the repo root (git rev-parse --show-toplevel), find out what exists before asking anything:
- The road: how the app starts (
.amp/services.yaml,.agents/setup,composer run dev,package.jsonscripts, a Procfile,docker-compose.yml), whether a dev login exists (a local-only route such as/__dev/login/{email}), seeders and a seeded account, where logs and mail land locally (storage/logs, alogmailer), how a screenshot is taken (agent-browser, Playwright, Dusk), and a preflight route. - The guidance: which exist of
.ai/guidelines/purpose.md,vocabulary.md,working.md,.ai/sync-docs.md,.ai/protected-surfaces.md,altitude.json,.claude/altitude.json,AGENTS.md,CLAUDE.md,boost.json. - The product:
README.md,composer.jsonorpackage.jsondescriptions, the routes, the main models. - The tools:
vendor/bin/pint,vendor/bin/phpstanwith its config,vendor/bin/pestorphpunit,package.jsonscripts (test,lint,types). - The tracker: a GitHub remote with issues, a tracker named in
README.mdorCONTRIBUTING.md, issue ids ingit log. - Commit style:
git log --oneline -20. - The user's defaults:
~/.config/altitude/working.md(or~/.claude/altitude/working.mdwhile it exists), and the account's settings throughsettingswhen the server is connected. They are starting answers for the interview. - Protected surfaces in the tree: auth (
routes/auth.php,app/Http/Controllers/Auth,config/auth.php,app/Policies), payments (Cashier, billing, webhooks),database/migrations, a public API (routes/api.php), legal text, mail.
2. Pave the road
Build what the survey found missing, in the project's own patterns, as tooling the repo keeps. Ask once before the first change, listing what you'll add; this is code, so it goes through the finish skill after.
- One start command that brings up the app and what it needs: the database, queue worker, Vite. In Amp, load the
orb-setupskill and let it own.agents/setupand.agents/resume; declare the servers in.amp/services.yaml. - A dev login: a route that logs in as a seeded account by its address and answers 404 outside the local environment, with a test that proves the 404.
?to=<path>lands on a page. - Seeds: one command that resets to a known state, with an account that has something on every page and a new, empty one.
- A preflight: a local-only route beside the dev login, such as
/__dev/preflight, that returns as JSON exactly what a fresh agent is missing: env keys that are unset, whether the database answers and is migrated, whether the assets are built, whether the seed accounts exist, whether the services it needs answer. Each itemokor the one command that fixes it. Also 404 outside local, with a test. - Logs and mail as text: mail and one-time codes written to the log locally; where the log is, in the guidance.
- A screenshot: the command that captures a logged-in page at a URL, and a state in the URL wherever the app allows it.
Something the project can't have (no web UI, no database): skip it and say so.
3. Interview
One round, short. Open with one line on what you'll write and why, then ask only what the survey couldn't answer. Each question leads with your recommended answer, drafted from the survey. Use the interview skill's form. Skip any question whose file already exists; offer the user's defaults where the survey found nothing specific.
- Purpose. Your draft: what the product is in two or three sentences, who it serves, what it's not.
- Vocabulary. Your draft: the eight to fifteen concepts the code and UI share, each with the word you found and any competing words. Ask which word wins.
- Tracker. Recommended: what the survey found.
- The gate. Recommended: the surfaces the survey found, each with a security review. Ask what else needs approval before it ships.
- Checks. Recommended: the commands the survey found. For a Laravel app:
php artisan test --compact --filter=<name>,php artisan test --compact,vendor/bin/pint <files>,vendor/bin/phpstan analyse. - Delivery. Recommended: the account's or the user's. Ask only whether this project differs, such as a project with outside contributors that ships through pull requests.
- Format hook. Recommended:
"format": ["pint"]whenvendor/bin/pintexists,"analyse": ["phpstan"]whenvendor/bin/phpstanand a config exist. One line: after each turn, the hook formats the PHP files the agent touched and runs PHPStan on them, and holds the turn until errors are fixed.
Don't ask about commit style unless git log shows none.
4. Write what's missing
Use the templates next to this file. Replace every {{placeholder}} with the project's own content, and check none is left (grep -n '{{' <each file you wrote>). Where a section has nothing to say yet, write one line saying so.
| File | Template | Holds |
|---|---|---|
.ai/guidelines/purpose.md | templates/purpose.md | What the product is and isn't, who it serves, what must stay true |
.ai/guidelines/vocabulary.md | templates/vocabulary.md | One row per concept: the term, its meaning, where it lives in code, the words not to use |
.ai/guidelines/working.md | templates/working.md | How to run it (start, log in, seed, preflight, logs, screenshot), reading order, where things are recorded, the gate, Done means with the literal commands, commit style |
.ai/sync-docs.md | templates/sync-docs.md | Optional. The doc surfaces, the areas that own them and the truth each is checked against |
.ai/protected-surfaces.md | templates/protected-surfaces.md | One row per surface: name, paths, why, which review |
altitude.json | none | Only the settings that differ, by key |
.claude/altitude.json | none | The tools the format hook may run, by name |
Without Boost, the .ai/guidelines files may go into AGENTS.md or CLAUDE.md directly when the project prefers one file; ask.
.claude/altitude.json takes names, never commands: pint under format and phpstan under analyse; anything else is ignored. Write it only when the user accepted a tool. In a git repository the hook ignores it until it's committed or staged, so stage it and say so. The hook also runs nothing until the user lists the checkout under trusted_repos in ~/.config/altitude/altitude.json, since a fresh clone passes every other check: ask, and add its path once they say yes.
Done means lists the exact commands, in the order they run, because other skills copy them from there.
5. Wire the guidance in
As The host says. .ai/sync-docs.md and .ai/protected-surfaces.md stay out of the always-loaded file; the skills that need them read them when they run.
6. Prove it
Start a fresh session that was told nothing (a new thread in Amp, a subagent or claude -p in Claude Code) and ask it to start the app, log in as the seeded account and screenshot a page, then name the checks a change must pass. Watch what it does. Where it asked, guessed or searched for long, the road has a gap: fix it and run a fresh one again. Then report:
- Built: the start command, the dev login, the seeds, the preflight and their tests.
- Written: each file, one line on what it holds.
- Left alone: each file that existed, and anything in it that contradicts the interview. Suggest the edit; don't make it.
- Wiring: the lines added, or the
boost:updatecommand to run. - The fresh session: what it did, its screenshot, and any gap left.
User mode
With an Altitude account. When the Altitude MCP server is connected (its tools user_brief and voice_brief are among your tools, loaded or deferred), the account holds USER and VOICE and serves them to every session. Call user_brief for USER and voice_brief for VOICE, and follow what each returns: it says what to ask, through the interview skill, and which tool stores each answer. Skip user.py and USER.md below; the other files of this mode are still written here.
Writes how the user works in every project, outside any repo. It runs from any folder and reads no project. The user's Altitude folder is ~/.config/altitude/; read ~/.claude/altitude/ too while it still exists, and never write there. USER.md is the exception: in Claude Code without an account it stays at ~/.claude/USER.md ($CLAUDE_CONFIG_DIR when that's set), where the context hook reads it.
| File | Holds |
|---|---|
~/.claude/USER.md | Without an account only. Their preferences as directives. Written only by user.py |
~/.config/altitude/working.md | Where work is recorded, the gate, the checks they always want, commit style. Template: templates/user-working.md |
~/.config/altitude/ui.md | Optional. Their UI bar for every project |
~/.config/altitude/altitude.json | Optional. Their settings for every project, when they differ from the account's |
Project files win. Skills read the project's guidelines first and fall back to ~/.config/altitude/working.md; a project's .ai/guidelines/ui.md wins over ~/.config/altitude/ui.md the same way. Project mode offers these defaults as its starting answers.
Survey
- Which of
working.md,ui.mdandaltitude.jsonexist. All three there: report what each says and skip the interview below; USER.md still gets its round. python3 "${CLAUDE_PLUGIN_ROOT}/skills/setup/user.py" status: which preference questions are answered and which are open. Outside the plugin, fetchuser.pyandquestions.jsonwith the Altitude server'sget_scripttool ({skill: "setup", path: "user.py"}), write them into one folder frommktemp -d, and in one command check each sha256 against what the tool returned and run that copy withpython3 -I.- The
uiskill's default bar: read${CLAUDE_PLUGIN_ROOT}/skills/ui/SKILL.mdwhen it exists; it says where its bar lives. - Whether the ui.sh MCP tool is among your tools.
USER.md
USER.md holds what the user prefers, as directives: one per line, each opening with Always, Never or Prefer, grouped under Communication, Decisions, Git, Code and Writing, within 4.000 characters. Preferences only: no biography, no list of projects, nothing about other people. The questions that fill it are in questions.json next to this file, each option with the directive it writes.
user.py next to this file owns every write to USER.md and to its state, altitude/user.json. Never edit USER.md yourself. Its commands:
status: per questionanswered,skipped,openoryours(a line the user edited or removed, which the script never writes again; deleting USER.md outright starts the file over, and the next write puts back every answered line), the lines the user wrote themselves, the character count, and undernextthe open questions for the next round, in file order.answer <id> <option id>, oranswer <id> --text '<directive>'for a question withfree: true. Answering again replaces the line.skip <id>.
A write is refused, with nothing written, when USER.md would pass 4.000 characters, or when the config folder sits in a git repository that doesn't ignore USER.md and altitude/user.json. Pass the refusal on as it stands: it says what to do.
- Import. When nothing is answered yet and the config folder has a
CLAUDE.mdwith preferences in it, read it before asking anything. Match its lines to the questions and show one list: per question, the line and the option it picks, or a typed directive where the line says more than any option and the question isfree. The user approves or corrects the list as a whole; write the approved answers withanswer. Lines about who they are, their projects or other people match no question and stay where they are. Nothing leaves their CLAUDE.md: name the lines USER.md now carries and leave that edit to them. - A round. The
nextquestions fromstatus, four at most, in one question form. Each question is itsask. Each option is itslabel, with the directive it writes as the description. Only a 'No preference' option writes nothing; its description says so. The recommended option comes first. Every other answer writes its line, the recommended one included: USER.md stands on its own. A skipped question writes nothing, and Altitude's working rules cover it. A typed answer to afreequestion becomes a directive: rephrase it to open with Always, Never or Prefer, show it, and write it on their yes. To a question that isn'tfree, ask them to pick an option or skip it. - After the round. Say how many questions are open and that
/altitude:setup --usercontinues where it stopped. Never ask an answered, skipped oryoursquestion again; the user changes one by naming it.
Interview
One round, the same way as project mode: a line on what you'll write, then each question with your recommended answer first. Skip the questions whose file exists.
- Where work is recorded. Recommended: each project's own issue tracker, GitHub Issues when the repo has a GitHub remote, and decisions recorded on the issue or pull request that made them. Ask whether one tracker holds their work everywhere.
- The gate. Recommended: commits wait for their word, pushes and production deploys always do, and a change to auth, payments or migrations gets a
securityagent pass before it's committed. Ask what to add or drop. - Checks they always want. Recommended: the tests that cover the change, the formatter on the files touched, the full suite before a commit, and a look at changed UI in the browser. Write kinds of check, not commands: skills copy the commands under 'Done means', so a command belongs here only when it holds in every project they work in.
- Commit style. Recommended: an imperative subject under 72 characters, a body only when the reason isn't obvious from the diff. A project's own
git logstill wins where it shows a style. - UI bar. Ask whether to write one. Recommended: yes when they build interfaces, starting from the
uiskill's default bar; ask what to add, drop or tighten. Without theuiskill, ask for their bar in a few lines, or skip the file. - ui.sh. Ask only when the ui.sh MCP tool is available. Recommended: on. One line: the
ui-shskill fetches ui.sh's design guidelines with the user's own ui.sh account. With an Altitude account, it is switched on at/account/skills; tell the user, since a session can't switch it. - Other labs. Recommended: none. One line: the panel in the
reviewskill lets another lab's model read a repo only whenreview_labsnames that lab. Write their answer asreview_labswhen they name any.
Write
Create ~/.config/altitude/ when it's missing. Never overwrite a file that exists. USER.md is the exception, written only through user.py as above.
working.md: fromtemplates/user-working.md. Replace every{{placeholder}}and check none is left (grep -n '{{' ~/.config/altitude/working.md). Keep the headings: skills look sections up by them.ui.md: when they asked for one. Their bar as a short list, starting from a copy of theuiskill's default bar with their changes applied. Say in the report that it's a copy: a later change to the skill's bar doesn't reach it.altitude.json: only for a setting that differs from the account's, or without an account. The keys are those of the project's file (see Settings), neverformatoranalyse.
Report
- Written: each file, one line on what it holds. For USER.md: its size against the 4.000 characters, and how many questions are open.
- Left alone: each file that existed, and anything in it that contradicts the interview. Suggest the edit; don't make it.
- How it applies: a project's own files win, and
/altitude:setupin a project offers these answers first.
What not to do
- Overwrite or reformat an existing file, even to fix it.
- Put a shell command in any
altitude.json. - Put
formatoranalysein the user'saltitude.json. The format hook runs a project's own binaries, so only a project's committed.claude/altitude.jsonturns it on. - Edit a generated AGENTS.md or CLAUDE.md.
- Invent product facts, vocabulary or checks the survey and the user didn't give you.
- Commit or push. The user decides when these files land.