Chapter 15 : Jay and code
Jay was born as a code editor, and it shows: attach a Git repository to a session, the bar switches to Code on its own, and Jay reads the code, edits files, runs commands, runs the tests and prepares the commits. Developers find a pair-programming partner in it; people who don't code find the fastest tool as soon as a task touches hundreds of files.
A code session
| Building block | What it is |
|---|---|
| JAY.md | The file at the root, read in every session: conventions, commands, architecture, pitfalls (chapter 4). Ask Jay to write it from the project |
| The Code position | In the bar: the branch, the isolated copy, the "+12 −3" diff of the work in progress, the Terminal button. In the drawer, the Code tab: the modified files, the diff of each change |
| /commit, /diff, /status, /pr | The Git moves. Jay never commits or pushes on its own: /commit is your move, and it writes the message following your rules (Settings, Git); /pr writes the pull request description, which Jay then opens on your forge after confirmation |
| Forges | GitHub, Forgejo, GitLab, Bitbucket, in Settings: Jay opens, lists and reviews pull requests |
| The Terminal | Shared per project, where Jay runs and reads its commands, with your allowed and denied commands |
| Command hooks | A script before or after each of Jay's actions: format a modified file, run the linter (chapter 11) |
| The Design System | The drawer tab that extracts the real system from the code, its drift and its fixes with proof (chapter 6) |
| The simulator | Jay installs, launches and drives your app in the iOS simulator or an Android emulator: it taps, scrolls, takes screenshots |
| DOPE | Code agents in a container, with your Jay account, in every Jay plan |
The isolated copy
Next to the branch name, a checkbox: the isolated copy. Jay then works in a copy of the repository, on a real branch, without touching your working tree. You keep coding in yours while it moves forward in its own, and you merge when it's good. Memory and the knowledge base stay the project's.
Sessions that talk to each other
Jay searches your other sessions and your meetings when you refer to them: "pick up what we decided yesterday about the API." Two more moves, open to everyone: link another of your Jay projects as read-only (the front end that reads the back end), and write to another session, which replies on its own when it's idle. Every send is confirmed with you, even with Full access, and a reply doesn't trigger another: no loop between two agents.
Your first code session
- Attach the project folder. If it's a Git repository, the session opens in Code; otherwise, flip the switch to Code.
- Have it explore first. "Explain this project to me: its structure, its purpose, how to run it."
- Ask for the JAY.md. "Write the JAY.md: commands, architecture, conventions, pitfalls you notice."
- Give it a small real task, in Plan mode. Approve the plan, switch to Build, let it work.
- Review the diff in the Code tab, then /commit.
Best practices
- Explore, plan, code, verify. Always ask for a plan before big changes.
- Small, precise tasks. "Add email validation to the sign-up form" rather than "improve the site."
- Tests as the final judge. Ask for the test to be written first, then made to pass.
- Git as a safety net. A commit before every big change, or the isolated copy.
- A short, living JAY.md. Add a rule every time you correct the same mistake twice.
- The right mode. Versatile for small touch-ups, Thinking for a feature, Expert for a redesign or a stubborn bug.
Jay for people who don't code
You don't need to be a developer to benefit. As soon as a task touches a lot of files or data, a code session is the fastest tool, because Jay writes a small program to do it in one go, and shows you its plan first.
| Area | What you ask |
|---|---|
| Files | "Rename the 400 photos in this folder with the date and place, and sort them by month." |
| Data | "Merge the 12 monthly Excel files into one, clean up the duplicates and make a summary table." |
| Web | "Create a 4-page showcase site for my consulting business, with my brand kit, and explain how to put it online." |
| Documents | "Convert all these Word documents to PDF with the same layout and a table of contents." |
| Mini-tools | "Build a small tool, a local web page, where I paste a job posting and my résumé, and that gives me a score and the missing skills." |