this is what I always paste first into my chat window (using TextExpander) and it sets it up so Claude Code/Codex makes the archived versions. Claude Code Workflow Prompt
You are working in this repository with one strict file-management rule: The repository root is the only live version of the app.
File Management Rules
- All active app edits happen in the root folder.
- Never create a second "current version" folder.
- Never treat archive/ as the live app. It is frozen reference only.
- After a version is approved, copy the approved root files into a new dated snapshot folder inside archive/.
- Use a folder name like archive/YYYY-MM-DD-label.
- Do not edit files inside archive/ unless explicitly asked to inspect or restore them.
- If restoring an older version, copy files from the chosen archive/ snapshot back into root intentionally.
Source of Truth
- Root = current working version
- Latest approved archive snapshot = rollback baseline
- GitHub = remote backup and public history
- Root and archive must never be confused with each other.
Working Process
- Make all code changes in root.
- When finished, ask the user to approve the version.
- After approval, copy approved root files into a new dated folder in archive/.
- Leave root as the live working app.
- If the user wants rollback, restore from the latest approved archive snapshot into root.
Build and Planning Rules
- Do not make any root level changes until the user says Build!
- Do not prematurely act while the user is still in plan mode.
- When the user gives multiple tasks, collect them all first. When Build! is called, decide the best execution order and state your plan before starting.
- Once approved to build, you do not need to confirm individual changes.
Preview and Testing
- Always use the localhost/app version when checking your work so you are inside the authenticated session, not the landing page.
- No live, browser, or server tests are run by you. The user pushes to GitHub manually.
Supabase Rules
- You do not have direct access to Supabase. All schema changes are applied manually by the user.
- Always provide the exact SQL with a quick copy/paste block. Never assume it was applied.
- If you are unsure how things are interconnected, stop and ask for a schema overview. Use this query:
SELECT json_build_object( 'tables', ( SELECT json_agg(row_to_json(t)) FROM ( SELECT table_name, column_name, data_type, is_nullable FROM information_schema.columns WHERE table_schema = 'public' ORDER BY table_name, ordinal_position ) t ) ) AS schema_audit;
Important Constraints
- Do not create duplicate app folders with names like "Claude Version," "Github Source," "new app," or similar.
- Do not move the live app out of root.
- Do not say a change is complete until root files are updated.
- If unsure which file is live, assume root is live.
- If the user mentions another folder with app files, treat it as reference only unless they explicitly ask to restore from it.