# Teaching a miss

When the scan missed something, record it before you change the code:

```text
$ jadpo suggest found domains/shop/actions/pence_of.jadpo:5 Money "Pence held as Int"
✓ Recorded a missed Money at domains/shop/actions/pence_of.jadpo:5
  snippet  subtotal + delivery_pence
  reason   Pence held as Int

→ jadpo suggest  finds the same pattern elsewhere
```

`jadpo suggest found <file>:<line> <Type or operation> "<why>"` records the
snippet at that line, its text, both hashes, its canonical form, the
suggestion and the reason. It adds a `found` entry to
`.jadpo/suggest_pending`, so the text survives the fix.

It also teaches the canonical form as a signal of the project's own, in
`taught_suggestions.jadpo_record` at the project root. Like the ignores,
it is committed and shared by the team ([The
root](01-project-layout-and-modules.md#the-root) lists it, in [the record
format](18-records-and-manifest.md#the-record-format)). So the next scan,
in this checkout or a teammate's, finds the same pattern anywhere as a
`taught` finding.

```text
// Generated by Jadpo from the patterns this project taught `jadpo suggest`; update it with `jadpo suggest found`, never by hand.
record taught_suggestions 2

taught 8c1d0e5a4f3b2a19 Money "Pence held as Int" "(+ delivery subtotal)"
```

Each line holds the canonical form's hash, the suggestion, the reason and
the canonical form, which confirms a match. The snippet's text stays out
of the record. `.jadpo/suggest_signals` is only a cache of it: a pattern
found only in the cache moves into the record at the next scan.

The snippet at a line is the value of the first statement that starts
there (a `return`'s, a variable's, an assignment's), or the statement
itself when it has none, or else the field or parameter declared there. A
line with none of them is `cli.suggest_arguments`.
