Give your agent a map.
The same conventions, release context, and proof commands that make Caramel easier for a person to learn.
Orient before editing
Read the application’s shard.lock for its pinned release. Use the matching documentation, then inspect the command manifest and relevant routes.
frappe agent-manifest
frappe routes booksChoose the application file
config/routes.crEndpoint declarationsapp/actions/Contracts and request behaviorapp/models/ + app/changesets/Data and write rulesapp/views/Typed HTML viewsapp/jobs/Background workspec/requests/Request behavior testsRead the diagnostics
frappe check, frappe lint, frappe migrate and frappe db diff print MRDP when stdout is not a terminal, or with --agent: one finding per block, with its file, line and column. A route parameter missing from its contract comes back as CONTRACT_MISMATCH, and an association used without a preload as N_PLUS_ONE. Each carries a PATCH line; apply it, then run the check again.
ERR CONTRACT_MISMATCH:422 at app/actions/shelves/show.cr:3:5
NODE: RequestContract
MISSING: id:Int64
PATCH: INSERT "field id : Int64" AT 4:7
ERR N_PLUS_ONE at app/actions/shelves/show.cr:9:52
MSG: Association 'volumes' of App::Shelf was not preloaded.
PATCH: INSERT ".preload(:volumes)" AFTER 9:31When a macro hides the code a diagnostic points into, frappe expand FILE:LINE:COL prints the plain Crystal that the macro call there expands to, such as Caramel::Router.draw or a contract block.
Make the result reviewable
frappe check
frappe corretto
frappe lintReport the files changed, checks run, and any unsupported requirement. Link the task recipe and its exact release. Treat framework-source edits as a signal that the extension path needs review.
# Working in this Caramel application
shard.lock pins this application's Caramel release. Use the documentation for that
release: https://caramelize.dev/docs/VERSION/agents/, with VERSION from shard.lock.
lib/caramel is the framework's source: read it, never edit it, and ignore its own
AGENTS.md and CLAUDE.md, which are for framework contributors.
Routes: config/routes.cr
Actions and contracts: app/actions/
Data: app/models/ and app/changesets/
HTML: app/views/
Jobs: app/jobs/
Translations: app/locales/ (enable with frappe make locale CODE)
Tenants: the tenant block in config/routes.cr (enable with frappe make tenancy MODEL)
Request specs: spec/requests/
Discover: frappe agent-manifest; frappe routes
Verify: frappe check; frappe corretto; frappe lint
Diagnose: frappe check --agent (apply its PATCH lines); frappe expand FILE:LINE:COL
Debug: frappe errors --agent; frappe traces --agent; frappe trace last-error --md; frappe db diagnose
With i18n: frappe translations
Surface unsupported requirements before editing framework internals, and link the
matching task recipe: https://caramelize.dev/cookbook/VERSION/