Record a Catch (append to defect memory)
lens_catches_addRecord a discovered defect, its pattern, and the prevention rule to the defect bank so future work catches the same mistake.
Instructions
Append a NAMED DEFECT to the defect bank so it is caught next time. Record what was WRONG, the general pattern it is an instance of, and the forward rule that prevents it — doctrine REJECTS routine passes, so only log actual defects. Set self_catch=true when the defect was a failure of your own validation discipline. This is the write half of the improvement loop: enough recurrences of a pattern promote it to a deterministic check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd. | |
| rule | Yes | The forward rule that prevents this next time | |
| catch | Yes | What was WRONG (the specific defect found) | |
| domain | Yes | Domain, e.g. marketing, finance, agency | |
| pattern | Yes | The general trap this is an instance of | |
| self_catch | No | True if this was a failure of the validator's own discipline | |
| artifact_type | Yes | Artifact type, e.g. landing-copy, research-brief |