caramel
Skip to content
Browse documentation
Guides / Working with an agent

Give your agent a map.

The same conventions, release context, and proof commands that make Caramel easier for a person to learn.

Application guideTarget: 0.7.1

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.

Terminal
frappe agent-manifest
frappe routes books

Choose the application file

config/routes.crEndpoint declarations
app/actions/Contracts and request behavior
app/models/ + app/changesets/Data and write rules
app/views/Typed HTML views
app/jobs/Background work
spec/requests/Request behavior tests

Read 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.

frappe check --agent · two findings
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:31

When 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.

Browse every command →

Make the result reviewable

Terminal
frappe check
frappe corretto
frappe lint

Report 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.