Suggestions
jadpo suggest finds code that could use a standard type or a standard
operation, such as money held as a whole number of pence, or a loop that
adds up a list. It never edits: the edits stay with your agent, and, for
type clashes only, with jadpo fix. An agent runs it after writing code,
to catch hand-rolled money, durations, points and loops. It is also how
Jadpo learns which of its signals are right.
It formats first, as jadpo fmt does; a file with syntax errors stops it,
as it stops every command that writes source. Then it scans the program
graph: every type, field and entity, and every function, action and
constant body. Tests, fixtures and seeds are left out, since they follow
the code they test.
| Signals A signal is a pattern |
| Snippets and their canonical form A finding is about a snippet: the smallest expression, or member of a declaration, that holds the signal. |
| The suggestions report Findings are numbered S1, S2… in file order, each with its place, what it suggests, the signal and the snippet. |
| Ignoring a suggestion When a finding is wrong for your code, keep it quiet with a reason. |
| Teaching a miss When the scan missed something, record it before you change the code. |
| What is kept, and where Every entry to share goes to |
| Sharing with Jadpo HQ Sharing is how Jadpo learns which signals are right: which findings people take, which they ignore and why, and what the scan missed. |
Markdown for agents: /docs/suggestions.md.Built from Jadpo main at aee2e8f.