Modes
CORA is always in one of four modes. The mode decides what it is allowed to do, not just how it talks.
Press Shift+Tab to cycle through the modes. Type /mode to see the list with the active one marked.
code (the default)
Writing and changing code, running tests
Yes, and it asks you every time
ask
Answering questions about the code
No
plan
Investigating, then writing a plan of what to do
No
review
Reviewing changes and reporting problems
No
Start in Ask if you are new. Nothing it does can surprise you.
The mode resets every time you start. Every run of cora starts in code, and /new resets to code as well. A mode is what you are doing right now, not a setting you configure once. To start somewhere else:
cora -m askWhat each mode is good at
Choosing the right mode for the job
Start from the job, not from the most powerful-looking option.
Understand unfamiliar code, or explain a failure, without changing anything
ask
Trace @src/orders/create.js from the route to the database. Explain how a duplicate order can be created. Cite the files and lines, and do not change anything.
Decide how to build something before building it
plan
Write a plan for adding a per-customer credit limit. Cover the files affected, the API and database changes, validation, how we roll it back, the test cases, and anything you are unsure about.
Fix a bug or add a feature
code
Fix the bug described in @notes/bug-123.md. Follow the pattern in @src/api/orders.js, keep the public API unchanged, add a small test, and show me the test output.
Check a change before merging it
review
Review my uncommitted changes for correctness, compatibility, security, and missing tests. Only report things you can point at, with file and line.
A few common jobs and the path that works best:
A reproducible bug in one place
code, then review if it matters
Code can reproduce it, fix it, and run the test in one go.
A small field, validation rule, or UI tweak
code
Name the existing pattern to follow and the check you want run.
A multi-file feature you already understand
plan → code → review
A plan you have read first saves rework.
A vague, cross-cutting change
ask or plan first
Resolve the unknowns before anyone writes code.
Anything touching payments, logins, or permissions
plan → code → review
Slow down deliberately, and get the independent read at the end.