Fix twenty findings from the Motion review
Each was raised by a reviewer and then survived an independent attempt to refute it. The four that mattered most: - A third of the starter library was invisible. Three templates authored `fields` shapes no renderer read — decisions, blockingSet, checks, steps and the rest — so about forty records rendered as no DOM at all, in the library and again on the engagement that instantiated them. Nothing failed: a renderer returns null for a key set it does not recognise, and a header-plus-body page looks like a template written that way. FieldsView now reads every key the seeds carry. - "Add a framework" opened a picker that could never match, because the dialog was seeded with both the forced kind and the deal's stage, and qualification serves only the qualification stage. The stage is now dropped when MOTION_KIND_STAGES says the pair is incoherent. - Piggy reported the promotion count as an exact figure capped at 8, against a tile showing the true count beside it. It is now counted in SQL, and all three motion tools carry a ResultScope whose denominator is shared lineages — never rows, never private drafts. - No Motion test went through createApp, so the whole feature could be unmounted with a green suite. That is the AGENTS.md §5 trap that already cost this project read-guards.ts and learn.ts. Also: both sides of the instantiate/edit race now lock, so a template cannot be rewritten under an artefact that has copied it; concurrent engagement opens queue on the deal row and get the 409 the handler already promised rather than a 500; latestScore uses DISTINCT ON instead of losing engagements past a 200-row cap; the migration adds the scored_by_user_id foreign key the schema declares; and the demo clear refunds usage_count for engagements it reaches by cascade, which otherwise left starter templates permanently un-editable. Verified on a fresh database: 16 migrations apply and re-apply as a no-op, both seeds idempotent, usage_count back to zero after --clear. 564 unit tests pass. Every Motion route measures zero horizontal overflow at 393 and 1440 in both themes, and all twelve seeded field trees are asserted onto the screen by scripts/motion-fields-check.mjs. One thing left open deliberately: the shipped qualification scorecard's five bands and MOTION_BANDS' four are calibrated differently. The framework's table is now titled as its own guidance rather than the product's verdict, which removes the contradiction on screen. Making the framework's calibration authoritative over the persisted band column is a product decision nobody has made. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -83,6 +83,7 @@ and is redacted if an upstream error happens to echo it.
|
||||
| `pig_inventory_search` | What could we buy to cover demand we cannot serve? |
|
||||
| `pig_search` | Find an account |
|
||||
| `pig_get_account` | Everything about one account |
|
||||
| `pig_motion_library` | What practice have we already written for this stage? |
|
||||
| `pig_log_activity` | Record a call, meeting or note |
|
||||
|
||||
`pig_capacity_match` is the one worth learning. Ask it in plain language:
|
||||
@@ -96,10 +97,10 @@ break-even.
|
||||
|
||||
## Why the surface is small
|
||||
|
||||
Nine tools, each doing one thing. A sprawling tool list measurably degrades
|
||||
Ten tools, each doing one thing. A sprawling tool list measurably degrades
|
||||
model performance, and anything genuinely niche is reachable through
|
||||
`pig_search` or the HTTP API. If you need something that is not here, it is
|
||||
probably better added as a service method than as a tenth tool.
|
||||
probably better added as a service method than as an eleventh tool.
|
||||
|
||||
## What it cannot do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user