motionloom 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.agents/skills/motionloom/SKILL.md +14 -0
  2. package/.claude/skills/motionloom.md +5 -0
  3. package/.codex/skills/motionloom.md +11 -0
  4. package/AGENTS.md +17 -0
  5. package/CHANGELOG.md +27 -0
  6. package/README.md +6 -0
  7. package/ROADMAP.md +9 -5
  8. package/SECURITY.md +3 -2
  9. package/SKILL.md +27 -4
  10. package/agent-card.json +23 -2
  11. package/agent-surfaces.json +79 -0
  12. package/bin/motionloom.mjs +11 -1
  13. package/docs/AGENT-INTEGRATION.md +47 -0
  14. package/docs/CHECKLIST.md +2 -1
  15. package/docs/STATUS.md +1 -1
  16. package/docs/audits/ci-replay-remediation-2026-08-13.md +33 -0
  17. package/docs/releases/2.2.0.md +35 -0
  18. package/docs/releases/npm-publish-from-workstation.md +6 -6
  19. package/examples/agent-consumer/README.md +18 -0
  20. package/examples/agent-consumer/fixture-manifest.json +82 -0
  21. package/package.json +22 -7
  22. package/references/agent-interoperability.md +29 -0
  23. package/references/intelligence-core.md +4 -0
  24. package/schemas/agent-surfaces.schema.json +78 -0
  25. package/schemas/remediation-history.schema.json +23 -0
  26. package/schemas/scene-manifest.schema.json +1 -0
  27. package/schemas/visual-truth.schema.json +80 -0
  28. package/scripts/devlab.py +1 -1
  29. package/scripts/discovery.py +257 -0
  30. package/scripts/docs-audit.py +17 -1
  31. package/scripts/pr.py +1 -0
  32. package/scripts/quality-gate.py +43 -3
  33. package/scripts/remediation-learning.py +326 -0
  34. package/scripts/report.py +16 -0
  35. package/scripts/visual-truth.py +310 -0
  36. package/src/output/browser-review-smoke/manifest.json +1 -0
  37. package/src/output/browser-review-smoke/visual-truth.json +68 -0
  38. package/tests/scripts/run_tests.py +59 -0
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: motionloom
3
+ description: Load the canonical MotionLoom Skill from the repository root for project-aware animation production, runtime evidence, Dev Lab review and review-first PR handoff.
4
+ ---
5
+
6
+ # MotionLoom Agent Skills surface
7
+
8
+ This is a **portable discovery alias**, not a second copy of the Skill. Load the canonical [`SKILL.md`](../../../SKILL.md) from the repository root and use [`agent-card.json`](../../../agent-card.json) for machine-readable capabilities. Before using the Skill, run:
9
+
10
+ ```text
11
+ motionloom discovery check --root <motionloom-checkout> --json
12
+ ```
13
+
14
+ Keep the review boundary intact: a candidate may be rendered and reviewed, but approval is never inferred and a PR is never opened without explicit user confirmation.
@@ -0,0 +1,5 @@
1
+ # MotionLoom for Claude Code
2
+
3
+ Use MotionLoom when the task creates, fixes, validates, renders or hands off animation inside an existing project. Load the repository-root [`SKILL.md`](../../SKILL.md) as the canonical instruction source and [`agent-card.json`](../../agent-card.json) for capability discovery. Do not copy or fork the workflow into this file.
4
+
5
+ Start with `motionloom discovery check --root <motionloom-checkout> --json`, then follow the required lifecycle: project context → source binding → runtime evidence → Dev Lab browser review → user-confirmed handoff. `approval` remains `false` until the user explicitly approves.
@@ -0,0 +1,11 @@
1
+ # MotionLoom for Codex
2
+
3
+ Use MotionLoom for project-aware animation work, including Lottie/dotLottie, Rive, GSAP, Framer Motion, body rigs and runtime-backed review. Load the canonical repository-root [`SKILL.md`](../../SKILL.md) and use [`agent-card.json`](../../agent-card.json) rather than duplicating instructions.
4
+
5
+ Verify discovery first:
6
+
7
+ ```text
8
+ motionloom discovery check --root <motionloom-checkout> --json
9
+ ```
10
+
11
+ Always produce task-bound artifacts and runtime evidence, suggest/open the internal Dev Lab after rendering, report unresolved issues, and stop before commit/push/PR unless the user explicitly confirms.
package/AGENTS.md ADDED
@@ -0,0 +1,17 @@
1
+ # MotionLoom Agent Router
2
+
3
+ This repository exposes one canonical Agent Skill: [`SKILL.md`](SKILL.md). Load it when the task concerns animation production, motion design, asset binding, runtime rendering, Dev Lab review or PR handoff. Use [`agent-card.json`](agent-card.json) for machine-readable capabilities and [`agent-surfaces.json`](agent-surfaces.json) for installation/discovery compatibility.
4
+
5
+ ## First action
6
+
7
+ Run the offline discovery check from the checkout root:
8
+
9
+ ```text
10
+ motionloom discovery check --root . --json
11
+ ```
12
+
13
+ Then follow the lifecycle in `SKILL.md`. The repository may coordinate Lottie, dotLottie, Rive, GSAP and Framer Motion, but it does not replace those runtimes. Render evidence, provenance, semantic checks and browser review are separate states. **Do not infer user approval from a passing heuristic, signature, screenshot or quality gate.**
14
+
15
+ ## Source of truth
16
+
17
+ Do not duplicate or edit Agent-specific copies of the workflow. If this router conflicts with `SKILL.md`, the canonical root Skill and machine-readable schemas win. Use `references/agent-interoperability.md` for discovery details and `docs/AGENT-INTEGRATION.md` for installation examples.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  All notable MotionLoom changes are documented here. The project follows semantic versioning for the npm package and keeps major contract changes in dedicated release notes under [`docs/releases/`](docs/releases/).
4
4
 
5
+ ## [Unreleased]
6
+
7
+ - No unreleased changes are currently tracked.
8
+
9
+ ## [2.2.0] - 2026-08-13
10
+
11
+ ### Added
12
+
13
+ - Canonical Agent interoperability surfaces for `.agents/skills`, `.claude`, `.codex`, source discovery and cross-platform installation checks.
14
+ - Consumer fixtures for Lottie/dotLottie, Rive, GSAP, Framer Motion, body rigs and multi-scene continuity.
15
+ - Visual Truth Contract with frame hashes, runtime/source provenance, deterministic perceptual signals, region explanations and review-required semantics.
16
+ - Append-only, hash-chained Remediation Learning ledger for user-confirmed outcomes, correction counts, first-pass acceptance, issue-class outliers and benchmark provenance.
17
+
18
+ ### Fixed
19
+
20
+ - Quality CI now rebuilds the context-bound replay bundle after runtime, report and attestation artifacts are generated, preventing stale replay hashes from rejecting an otherwise valid changed-scene gate.
21
+
22
+ ### Verified
23
+
24
+ - Mainline Quality, Documentation and Package Hygiene, and Security workflows pass on the replay-remediation commit.
25
+ - The local release candidate passes the full regression, docs/Skill validation, runtime adapter, discovery, installation matrix, Visual Truth, Remediation Learning, attestation and npm tarball checks.
26
+
27
+ ### Boundary
28
+
29
+ - This is a release candidate prepared from the green mainline. Remote tag creation, GitHub Release creation and npm publication remain explicit maintainer actions; evidence and heuristics never grant user approval.
30
+
5
31
  ## [2.1.0] - 2026-08-13
6
32
 
7
33
  ### Added
@@ -37,5 +63,6 @@ See the [2.0.0 release note](docs/releases/2.0.0.md).
37
63
 
38
64
  The 1.5.0–1.9.0 milestones established runtime evidence, browser review, Intelligence Core, semantic lint, continuity, telemetry and trust-boundary hardening. Their detailed notes are available in [`docs/releases/`](docs/releases/).
39
65
 
66
+ [2.2.0]: docs/releases/2.2.0.md
40
67
  [2.1.0]: docs/releases/2.1.0.md
41
68
  [2.0.0]: docs/releases/2.0.0.md
package/README.md CHANGED
@@ -138,6 +138,8 @@ MotionLoom keeps distinct layers distinct:
138
138
  | Layer | It proves | It does not prove |
139
139
  |---|---|---|
140
140
  | Runtime evidence | The selected runtime produced the declared snapshots and observed state | That the motion is aesthetically correct or user-approved |
141
+ | Visual Truth Contract | Baseline/candidate frame identity, dimensions, provenance and review-required regions are bound to the scene | That a changed frame is acceptable or user-approved |
142
+ | Remediation Learning | User-confirmed correction outcomes and deterministic benchmark history with first-pass metrics | That aggregate history can approve a new animation or replace review |
141
143
  | Provenance | Which source/material/product bytes were used and how they hash | That the source is appropriate beyond the declared authority/license contract |
142
144
  | Semantic lint and benchmark | Bounded rule findings, risk signals and performance measurements | Human visual quality or intent acceptance |
143
145
  | Signed attestation | A trusted signer signed the same task-bound hashes under the policy | Reviewer consent, accessibility approval or PR authorization |
@@ -162,6 +164,7 @@ The Skill can trigger or suggest an internal browser-capable Agent to open the D
162
164
  |---|---|
163
165
  | `SKILL.md` | Installable Agent Skill contract |
164
166
  | `agent-card.json` | Capability discovery and side-effect policy |
167
+ | `agent-surfaces.json`, `.agents/`, `.claude/`, `.codex/` | Cross-Agent discovery aliases and portability contract |
165
168
  | `bin/motionloom.mjs` | Cross-platform npm CLI entrypoint |
166
169
  | `src/core/` | Analyzer, Motion Spec and runtime snapshot engine |
167
170
  | `src/rig/` | Character body rig and pose engine |
@@ -172,6 +175,8 @@ The Skill can trigger or suggest an internal browser-capable Agent to open the D
172
175
  | `docs/` | Framework selection, checklists, audits and release notes |
173
176
  | `dev-lab/` | Self-contained browser review workbench and harness |
174
177
  | `artifacts/<task-id>/` | Per-task evidence, report and handoff bundle |
178
+ | `schemas/visual-truth.schema.json`, `scripts/visual-truth.py` | Provenance-bound visual comparison and review explanation contract |
179
+ | `schemas/remediation-history.schema.json`, `scripts/remediation-learning.py` | Append-only remediation/benchmark ledger and aggregate learning metrics |
175
180
  | `tests/` | Regression, adversarial and deep-stress evaluation harnesses |
176
181
 
177
182
  ## Documentation map
@@ -184,6 +189,7 @@ The Skill can trigger or suggest an internal browser-capable Agent to open the D
184
189
  | Understand Agent intelligence | [Intelligence Core](references/intelligence-core.md) and [roadmap](ROADMAP.md) |
185
190
  | Run labeled project evaluation | [Project corpus manifest](tests/evals/project-corpus.json) and `python3 scripts/eval-projects.py --allow-insufficient` |
186
191
  | Understand trust boundaries | [Signed attestation](references/signed-attestation.md) and [2.0.0 release note](docs/releases/2.0.0.md) |
192
+ | Validate visual truth before review/PR | `motionloom visual-truth build|validate` and [production checklist](docs/CHECKLIST.md) |
187
193
  | Check current evidence posture | [Current status](docs/STATUS.md), [external corpus evidence](docs/audits/external-project-corpus-2026-08-13.md) and [historical audit snapshot](AUDIT-REPORT.md) |
188
194
  | Contribute code or docs | [CONTRIBUTING.md](CONTRIBUTING.md) |
189
195
  | Report a vulnerability or request help | [SECURITY.md](SECURITY.md) and [SUPPORT.md](SUPPORT.md) |
package/ROADMAP.md CHANGED
@@ -2,18 +2,22 @@
2
2
 
3
3
  MotionLoom's roadmap is organized around one question: **does this reduce incorrect animation iterations while keeping the user in control of quality and Git side effects?** A roadmap item is not complete because a prompt or template exists; it is complete when the contract, evidence, regression coverage and Agent handoff are inspectable.
4
4
 
5
- ## Current baseline: 2.1.0
5
+ ## Current baseline: 2.2.0 release candidate
6
6
 
7
- The current repository baseline includes project-aware analysis, durable Project Memory, context-bound Motion Spec, source binding, real runtime adapters for Lottie/dotLottie/SVG cutout/Rive/GSAP/Framer Motion, Dev Lab browser review, Intelligence Core, semantic and continuity feedback, runtime telemetry, external evidence verification, signed attestation and cross-platform CLI/CI contracts.
7
+ The current repository baseline includes project-aware analysis, durable Project Memory, context-bound Motion Spec, source binding, real runtime adapters for Lottie/dotLottie/SVG cutout/Rive/GSAP/Framer Motion, Dev Lab browser review, Intelligence Core, semantic and continuity feedback, runtime telemetry, external evidence verification, signed attestation, Agent interoperability surfaces, Visual Truth, Remediation Learning and cross-platform CLI/CI contracts. The package metadata is at `2.2.0`; remote publication remains pending explicit release approval.
8
8
 
9
9
  ## Next milestones
10
10
 
11
11
  | Milestone | Focus | Acceptance signal | Status |
12
12
  |---|---|---|---|
13
- | **2.2** | Visual Truth Contract | Provenance-bound frame comparison with `pass`, `fail`, `warn` and `unknown`; no automatic user approval | Planned |
14
- | **2.3** | Remediation Learning | User-confirmed correction count, first-pass acceptance and rerender-avoidance ledger | Planned |
13
+ | **2.2** | Visual Truth Contract | Provenance-bound frame comparison with `pass`, `fail`, `warn` and `unknown`; no automatic user approval | Included in 2.2.0 candidate |
14
+ | **2.3** | Remediation Learning | User-confirmed correction count, first-pass acceptance and rerender-avoidance ledger | Included in 2.2.0 candidate |
15
15
  | **2.4** | Runtime Scale | Multi-project, browser and device corpus with capability compatibility explanations | Planned |
16
- | **2.5** | Agent Interoperability | Versioned schemas, compatibility matrix and replayable task bundles across Agents | Planned |
16
+ | **2.5** | Agent Interoperability | Versioned schemas, compatibility matrix and replayable task bundles across Agents | Included in 2.2.0 candidate |
17
+
18
+ ## Working-tree implementation status
19
+
20
+ The current implementation pass has delivered the contracts behind milestones 2.2, 2.3 and 2.5: canonical Agent discovery/install surfaces, consumer fixtures and a Ubuntu/macOS/Windows matrix; Visual Truth is bound into scene manifests, Dev Lab handoff and the review-first quality gate; Remediation Learning records hash-chained benchmark/outcome history; and CI replay evidence is rebuilt after generated artifacts. The remaining release work is remote tag/Release creation, npm publication and paired evaluation on additional real projects.
17
21
 
18
22
  ## Product principles
19
23
 
package/SECURITY.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Version | Security fixes |
6
6
  |---|---|
7
- | `2.1.x` | Supported |
7
+ | `2.2.x` | Release candidate; support begins on publication |
8
+ | `2.1.x` | Current published line; supported until 2.2.0 publication |
8
9
  | `2.0.x` | Best effort while upgrading |
9
10
  | `<2.0.0` | Not supported |
10
11
 
@@ -20,7 +21,7 @@ MotionLoom can read and write files in the host project, invoke runtimes and pre
20
21
 
21
22
  Path guards, task identity, source/manifest hashes, evidence freshness, signer policy and approval invariants are security-relevant contracts. Report any bypass that allows cross-project memory, cross-task evidence, stale runtime output or unreviewed Git side effects.
22
23
 
23
- See the [signed attestation reference](references/signed-attestation.md), [browser review contract](references/browser-review-contract.md) and [2.1.0 release note](docs/releases/2.1.0.md) for the current threat model and limitations.
24
+ See the [signed attestation reference](references/signed-attestation.md), [browser review contract](references/browser-review-contract.md) and [2.2.0 release note](docs/releases/2.2.0.md) for the current threat model and limitations.
24
25
 
25
26
  ## CI/CD controls
26
27
 
package/SKILL.md CHANGED
@@ -7,7 +7,7 @@ description: >-
7
7
  validate, review, or deliver animation inside an existing project.
8
8
  license: MIT
9
9
  metadata:
10
- version: "2.1.0"
10
+ version: "2.2.0"
11
11
  target_frameworks: "lottie,dotlottie,rive,gsap,framer-motion,spine,threejs"
12
12
  verified_runtimes: "lottie-json,dotlottie-package,svg-cutout-rig,rive,gsap,framer-motion"
13
13
  ---
@@ -28,11 +28,12 @@ Treat every animation request as a production task, not as an isolated asset-gen
28
28
  6. **Bind Intelligence Core** — build a framework-neutral `motion-ir.json`, `project-graph.json`, `provenance.json`, `replay-bundle.json`, `semantic-lint-report.json` and `semantic-lint-benchmark.json` with `python3 scripts/intelligence.py`. Select only a capability registry entry whose status is `verified`, whose evidence is fresh and whose compatibility matches the target environment. A confidence score or benchmark result can prioritize investigation; neither can replace deterministic or human acceptance.
29
29
  6a. **Harden the trust boundary** — keep artifact and task bundles inside the repository/task root, reject symlinked evidence, bind replay to its exact `task_dir`, `task_id` and scene, select one deterministic report bundle per scene, and require browser candidate/review identity and expiry checks before readiness. The Dev Lab must reject cross-origin or identity-mismatched artifact bases. In strict runtime-observability runs, capture `runtime-telemetry.json` and a read-only `evidence-verifier-report.json`; verifier output must preserve `approval: false`. These checks expose risk and prevent evidence mixing, but do not turn heuristics or evidence integrity into approval.
30
30
  6b. **Attest** — derive a canonical statement from the exact scene/task hashes, sign it with an Ed25519 key through `scripts/attestation.py`, and verify it with the independent `scripts/attestation-verifier.py` against a fail-closed `trust-policy.json`. DSSE/SLSA-compatible attestation proves signer and binding integrity only; `approval` must remain `false` and never replaces user review.
31
- 7. **Browser review handoff** — run `python3 scripts/review-hook.py prepare --task-dir artifacts/<task-id> --lab-url <internal-lab-url>`. The hook prepares the exact candidate and emits a JSON action for a browser-capable Agent. Trigger or suggest that Agent to open the emitted URL, inspect frames 0/50/100, scrub the timeline and ask the user to review. This is not a separate Dev Lab Skill; it is a required post-render handoff.
31
+ 7. **Visual truth and browser review handoff** — after runtime rendering, build `visual-truth.json` from real baseline/candidate PNGs with `motionloom visual-truth build`. The contract records frame hashes, dimensions, runtime/source/manifest provenance and region-level review explanations; a changed frame means `review_required`, never automatic failure or approval. Then run `python3 scripts/review-hook.py prepare --task-dir artifacts/<task-id> --lab-url <internal-lab-url>`. The hook prepares the exact candidate and emits a JSON action for a browser-capable Agent. Trigger or suggest that Agent to open the emitted URL, inspect frames 0/50/100, scrub the timeline and ask the user to review. This is not a separate Dev Lab Skill; it is a required post-render handoff.
32
32
  8. **Review capture** — the browser Agent calls `window.__lab.getReview()` after the user approves or requests changes, then persists it with `python3 scripts/report.py review --task-dir artifacts/<task-id> --candidate-id <id> --decision approved|changes_requested --reviewer user`. A change request returns to generation; no approval means no PR.
33
- 9. **Validate** — run `motionloom review-hook validate --task-dir artifacts/<task-id>`, `motionloom intelligence semantic-lint benchmark --task-dir artifacts/<task-id> --iterations 25 --threshold-ms 500`, `motionloom runtime-telemetry <scene> artifacts/<task-id>`, the independent attestation verifier, `motionloom report-contract --root . --scenes-file <changed-scenes> --require-attestation`, `motionloom quality-gate --scene <scene> --context <context-path> --task-dir artifacts/<task-id> --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation`, and `motionloom doctor --json` when validating the Skill package itself.
33
+ 9. **Validate** — run `motionloom visual-truth validate --root . --input src/output/<scene>/visual-truth.json --scene <scene> --task-id <task-id>`, `motionloom review-hook validate --task-dir artifacts/<task-id>`, `motionloom intelligence semantic-lint benchmark --task-dir artifacts/<task-id> --iterations 25 --threshold-ms 500`, `motionloom runtime-telemetry <scene> artifacts/<task-id>`, the independent attestation verifier, `motionloom report-contract --root . --scenes-file <changed-scenes> --require-attestation`, `motionloom quality-gate --scene <scene> --context <context-path> --task-dir artifacts/<task-id> --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation --require-visual-truth`, and `motionloom doctor --json` when validating the Skill package itself.
34
34
  10. **Report** — create or update an artifact bundle with `python3 scripts/report.py`. Record facts with `report.py add`, structural defects with `report.py structure`, collect checksums with `report.py collect`, and run `report.py check` before rendering the final report. The final report must state completed, verified, not completed, blocked/failed, structure problems, browser candidate/review evidence and the recommended next Agent/Skill.
35
- 11. **Confirm** — only after approved browser review and a passing quality gate run the platform-neutral PR preparation command. Commit, push and open PR are explicit side effects.
35
+ 11. **Learn** — after a user-confirmed fix or a deterministic benchmark, record it with `motionloom remediation-learning record-outcome|record-benchmark`. Run `summary` to expose correction count, first-pass acceptance, success rate, issue-class outliers and benchmark pass rate. Only `--user-confirmed` outcomes contribute to remediation acceptance metrics.
36
+ 12. **Confirm** — only after approved browser review and a passing quality gate run the platform-neutral PR preparation command. Commit, push and open PR are explicit side effects.
36
37
 
37
38
  ## Durable Project Memory
38
39
 
@@ -61,6 +62,7 @@ Only user-confirmed decisions and outcomes may become durable remediation memory
61
62
  - Read `docs/ROADMAP-INTELLIGENCE.md` before extending graph, provenance, capability or replay behavior.
62
63
  - Read `references/intelligence-core.md` before building or validating Intelligence Core artifacts.
63
64
  - Read `docs/research/AGENT-PROTOCOL-FINDINGS.md` before exposing MotionLoom through Agent tools or MCP resources.
65
+ - Read `references/agent-interoperability.md` when installing MotionLoom into Codex, Claude Code, Cursor, OpenCode or another Agent environment; run `motionloom discovery check --root <motionloom-checkout> --json` before relying on a surface.
64
66
 
65
67
  ## Non-negotiable contracts
66
68
 
@@ -75,6 +77,8 @@ Only user-confirmed decisions and outcomes may become durable remediation memory
75
77
  - Browser-review candidates are single-use, time-bounded and bound to the exact task, scene and candidate identity; Dev Lab artifact/task bases must be same-origin and identity-consistent before staging a review decision.
76
78
  - Report completeness must select one deterministic passing task bundle per scene and fail on ambiguous ties; a valid artifact is never sufficient to bypass explicit user approval.
77
79
  - Runtime telemetry must bind task, scene, source, manifest, Motion IR and deterministic scrub points; tampered, stale, missing or cross-task telemetry is a verification failure.
80
+ - Visual Truth must bind baseline/candidate PNG hashes, dimensions, source, manifest, runtime evidence and Motion IR where available; it explains changed regions for review but never emits approval.
81
+ - Remediation Learning history is append-only and hash-chained; correction counts and first-pass acceptance guide the next Agent but never approve an artifact or replace current-task evidence.
78
82
  - Signed attestation must bind the same task, scene, context, source, manifest, Motion IR and evidence hashes; unknown, expired or revoked signers fail closed. Attestation verification is an integrity result only and must preserve `approval: false`.
79
83
 
80
84
  ## Framework boundary
@@ -101,6 +105,25 @@ node scripts/runtime-adapters.mjs
101
105
  # Capture and verify runtime telemetry without Bash dependencies.
102
106
  motionloom runtime-telemetry <scene> artifacts/<task-id>
103
107
 
108
+ # Build and validate a provenance-bound visual comparison from real runtime PNGs.
109
+ motionloom visual-truth build --root . --scene <scene> \
110
+ --baseline src/output/<scene>/snapshot/frame-00.png \
111
+ --candidate src/output/<scene>/snapshot/frame-100.png \
112
+ --source src/output/<scene>/<source-file> \
113
+ --manifest src/output/<scene>/manifest.json \
114
+ --runtime-evidence artifacts/<task-id>/runtime-adapters/runtime-evidence.json \
115
+ --motion-ir artifacts/<task-id>/motion-ir.json --task-id <task-id> \
116
+ --output src/output/<scene>/visual-truth.json
117
+ motionloom visual-truth validate --root . --input src/output/<scene>/visual-truth.json \
118
+ --scene <scene> --task-id <task-id>
119
+
120
+ # Record only a user-confirmed remediation outcome, then summarize durable learning.
121
+ motionloom remediation-learning record-outcome --history artifacts/remediation-history.jsonl \
122
+ --event-id outcome-001 --issue-id easing-drift --summary "User accepted easing correction" \
123
+ --result pass --correction-count 1 --source-task-id <task-id> --user-confirmed --json
124
+ motionloom remediation-learning summary --history artifacts/remediation-history.jsonl \
125
+ --output artifacts/remediation-summary.json --json
126
+
104
127
  # Build the task-bound Intelligence Core artifacts.
105
128
  python3 scripts/intelligence.py motion-ir build --task-dir artifacts/<task-id>
106
129
  python3 scripts/intelligence.py graph build --task-dir artifacts/<task-id>
package/agent-card.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "card_version": "1.0",
3
3
  "name": "motionloom",
4
- "version": "2.1.0",
5
- "description": "Project-aware animation production with durable Project Memory, graph, provenance, framework-neutral motion IR, runtime verification and telemetry, DSSE-compatible signed attestation, external evidence verification, semantic feedback, continuity checks, internal browser review, trust-boundary hardening and deterministic Agent handoff.",
4
+ "version": "2.2.0",
5
+ "description": "Project-aware animation production with durable Project Memory, graph, provenance, framework-neutral motion IR, runtime verification and telemetry, Visual Truth, Remediation Learning, DSSE-compatible signed attestation, external evidence verification, semantic feedback, continuity checks, internal browser review, trust-boundary hardening and deterministic Agent handoff.",
6
6
  "capabilities": [
7
+ "agent.discovery.check",
8
+ "agent.discovery.source",
9
+ "agent.discovery.install-matrix",
7
10
  "project.analyze",
8
11
  "project.memory.init",
9
12
  "project.memory.inspect",
@@ -42,6 +45,12 @@
42
45
  "runtime.verify.framer-motion",
43
46
  "runtime.telemetry.capture",
44
47
  "runtime.telemetry.validate",
48
+ "visual-truth.build",
49
+ "visual-truth.validate",
50
+ "remediation-learning.record-outcome",
51
+ "remediation-learning.record-benchmark",
52
+ "remediation-learning.validate",
53
+ "remediation-learning.summary",
45
54
  "evidence.verify.external",
46
55
  "attestation.statement.build",
47
56
  "attestation.sign.ed25519",
@@ -63,6 +72,7 @@
63
72
  "source-asset"
64
73
  ],
65
74
  "output_artifacts": [
75
+ "agent-discovery-report",
66
76
  "project-context",
67
77
  "motion-spec",
68
78
  "runtime-scene",
@@ -86,6 +96,9 @@
86
96
  "replay-bundle",
87
97
  "semantic-lint-report",
88
98
  "semantic-lint-benchmark",
99
+ "visual-truth",
100
+ "remediation-history",
101
+ "remediation-summary",
89
102
  "hardening-audit-report",
90
103
  "project-memory",
91
104
  "continuity-report",
@@ -132,6 +145,9 @@
132
145
  }
133
146
  ],
134
147
  "entrypoints": {
148
+ "discovery_check": "motionloom discovery check --root <motionloom-checkout> --json",
149
+ "discovery_source": "motionloom discovery source --root <motionloom-checkout> --json",
150
+ "discovery_install_matrix": "motionloom discovery install-matrix --root <motionloom-checkout> --json",
135
151
  "analyze": "motionloom analyze <project-path> --init-memory",
136
152
  "memory_init": "motionloom memory init --project-root <project-path>",
137
153
  "memory_inspect": "motionloom memory inspect --project-root <project-path> --json",
@@ -165,6 +181,11 @@
165
181
  "attestation_verify": "python3 scripts/attestation-verifier.py --attestation artifacts/<task-id>/attestation.json --trust-policy artifacts/<task-id>/trust-policy.json --expected-task-id <task-id> --expected-scene <scene>",
166
182
  "attestation_report": "python3 scripts/attestation-verifier.py --attestation artifacts/<task-id>/attestation.json --trust-policy artifacts/<task-id>/trust-policy.json --expected-task-id <task-id> --expected-scene <scene> --output artifacts/<task-id>/attestation-verifier-report.json",
167
183
  "quality_gate_attestation": "python3 scripts/quality-gate.py --scene <scene> --context <path> --task-dir artifacts/<task-id> --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation",
184
+ "visual_truth_build": "motionloom visual-truth build --root <project-path> --scene <scene> --baseline <baseline.png> --candidate <candidate.png> --output src/output/<scene>/visual-truth.json",
185
+ "visual_truth_validate": "motionloom visual-truth validate --root <project-path> --input src/output/<scene>/visual-truth.json --scene <scene> --task-id <task-id>",
186
+ "remediation_record_outcome": "motionloom remediation-learning record-outcome --history artifacts/remediation-history.jsonl --event-id <id> --issue-id <issue-id> --summary <summary> --result pass|fail|partial|unknown --correction-count <n> --user-confirmed",
187
+ "remediation_record_benchmark": "motionloom remediation-learning record-benchmark --history artifacts/remediation-history.jsonl --event-id <id> --operation <operation> --task-id <task-id> --scene <scene> --iterations <n> --p95-ms <ms> --threshold-ms <ms>",
188
+ "remediation_summary": "motionloom remediation-learning summary --history artifacts/remediation-history.jsonl --output artifacts/remediation-summary.json --json",
168
189
  "browser_review_prepare": "python3 scripts/review-hook.py prepare --task-dir artifacts/<task-id> --lab-url <internal-lab-url>",
169
190
  "browser_review_validate": "python3 scripts/review-hook.py validate --task-dir artifacts/<task-id>",
170
191
  "pr_prepare": "node scripts/pr.mjs <scene>"
@@ -0,0 +1,79 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "name": "motionloom",
4
+ "version": "2.2.0",
5
+ "canonical": {
6
+ "skill": "SKILL.md",
7
+ "agent_card": "agent-card.json",
8
+ "cli": "bin/motionloom.mjs"
9
+ },
10
+ "surfaces": [
11
+ {
12
+ "id": "agents-skills",
13
+ "kind": "agent-skill",
14
+ "path": ".agents/skills/motionloom/SKILL.md",
15
+ "canonical": "SKILL.md",
16
+ "load_mode": "alias",
17
+ "agents": ["codex", "claude-code", "cursor", "opencode"]
18
+ },
19
+ {
20
+ "id": "claude-code",
21
+ "kind": "agent-instructions",
22
+ "path": ".claude/skills/motionloom.md",
23
+ "canonical": "SKILL.md",
24
+ "load_mode": "alias",
25
+ "agents": ["claude-code"]
26
+ },
27
+ {
28
+ "id": "codex",
29
+ "kind": "agent-instructions",
30
+ "path": ".codex/skills/motionloom.md",
31
+ "canonical": "SKILL.md",
32
+ "load_mode": "alias",
33
+ "agents": ["codex"]
34
+ },
35
+ {
36
+ "id": "repository-agent-guide",
37
+ "kind": "repository-guide",
38
+ "path": "AGENTS.md",
39
+ "canonical": "SKILL.md",
40
+ "load_mode": "router",
41
+ "agents": ["codex", "claude-code", "cursor", "opencode"]
42
+ }
43
+ ],
44
+ "installations": [
45
+ {
46
+ "id": "npm-registry",
47
+ "source_kind": "npm",
48
+ "command": "npm install --save-dev motionloom",
49
+ "verification": "motionloom discovery check --root . --json",
50
+ "provenance": "package-lock-or-pnpm-lock"
51
+ },
52
+ {
53
+ "id": "github-checkout",
54
+ "source_kind": "git",
55
+ "command": "git clone https://github.com/lenhonbp/MotionLoom.git",
56
+ "verification": "node bin/motionloom.mjs discovery check --root . --json",
57
+ "provenance": "git-commit-and-remote"
58
+ },
59
+ {
60
+ "id": "local-source",
61
+ "source_kind": "local",
62
+ "command": "node <motionloom-checkout>/bin/motionloom.mjs discovery check --root <motionloom-checkout> --json",
63
+ "verification": "python3 scripts/discovery.py check --root . --json",
64
+ "provenance": "absolute-or-relative-source-path"
65
+ }
66
+ ],
67
+ "compatibility": {
68
+ "operating_systems": ["ubuntu", "macos", "windows"],
69
+ "node": ">=18",
70
+ "python": ">=3.11",
71
+ "agents": ["codex", "claude-code", "cursor", "opencode"]
72
+ },
73
+ "rules": {
74
+ "canonical_instruction_source": "SKILL.md",
75
+ "no_surface_copy": true,
76
+ "no_network_required_for_check": true,
77
+ "approval_is_never_inferred": true
78
+ }
79
+ }
@@ -34,10 +34,13 @@ const PYTHON_COMMANDS = {
34
34
  manifest: "scripts/manifest.py",
35
35
  test: "tests/scripts/run_tests.py",
36
36
  "deep-audit": "tests/scripts/deep-stress.py",
37
+ discovery: "scripts/discovery.py",
38
+ "visual-truth": "scripts/visual-truth.py",
39
+ "remediation-learning": "scripts/remediation-learning.py",
37
40
  };
38
41
 
39
42
  function printHelp() {
40
- console.log(`MotionLoom 2.1.0 — project-aware animation production and evidence contracts
43
+ console.log(`MotionLoom 2.2.0 — project-aware animation production and evidence contracts
41
44
 
42
45
  Usage:
43
46
  motionloom <command> [args...]
@@ -59,6 +62,9 @@ Commands:
59
62
  validate-lottie Validate a Lottie animation
60
63
  manifest Build or validate a production manifest
61
64
  eval-intelligence Run adversarial Intelligence Core evaluation
65
+ discovery Check Agent surfaces, source identity and install matrix
66
+ visual-truth Build or validate provenance-bound visual comparisons
67
+ remediation-learning Record or summarize user-confirmed remediation and benchmark history
62
68
 
63
69
  Cross-platform examples:
64
70
  motionloom analyze . --init-memory
@@ -66,6 +72,10 @@ Cross-platform examples:
66
72
  motionloom memory refresh --project-root . --json
67
73
  motionloom memory record-decision --project-root . --id ui-easing \\
68
74
  --status accepted --summary "Use ease-out for UI entry" --user-confirmed
75
+ motionloom discovery check --root . --json
76
+ motionloom discovery install-matrix --root . --json
77
+ motionloom visual-truth validate --root . --input src/output/<scene>/visual-truth.json
78
+ motionloom remediation-learning summary --history artifacts/remediation-history.jsonl --json
69
79
 
70
80
  The CLI never grants approval or opens a pull request by itself. User review
71
81
  and explicit repository side-effect confirmation remain separate gates.
@@ -0,0 +1,47 @@
1
+ # Agent interoperability and installation contract
2
+
3
+ MotionLoom is distributed as one Skill with several **discovery surfaces**, not as several independent Skills. The root `SKILL.md` is canonical. `agent-card.json` is the capability contract. `agent-surfaces.json` records the supported surfaces, installation sources and compatibility policy.
4
+
5
+ ## Install sources
6
+
7
+ | Source | Typical command | Verification | Provenance to retain |
8
+ |---|---|---|---|
9
+ | npm registry | `npm install --save-dev motionloom` | `motionloom discovery check --root . --json` | lockfile and resolved package version |
10
+ | Git checkout | `git clone https://github.com/lenhonbp/MotionLoom.git` | `node bin/motionloom.mjs discovery check --root . --json` | remote URL and commit SHA |
11
+ | Local source | invoke `<checkout>/bin/motionloom.mjs` | `python3 scripts/discovery.py check --root . --json` | source path and local commit if present |
12
+
13
+ The check is offline and read-only. Installation, source identity and capability compatibility are separate from network authentication. A passing check means that the package is structurally discoverable; it does not mean that a scene is runtime-verified or approved.
14
+
15
+ ## Agent surfaces
16
+
17
+ | Surface | Path | Role |
18
+ |---|---|---|
19
+ | Agent Skills | `.agents/skills/motionloom/SKILL.md` | Portable alias for Agent Skills discovery |
20
+ | Claude Code | `.claude/skills/motionloom.md` | Claude-specific router to the canonical Skill |
21
+ | Codex | `.codex/skills/motionloom.md` | Codex-specific router to the canonical Skill |
22
+ | Repository router | `AGENTS.md` | Short first-load instructions for repository-aware Agents |
23
+
24
+ These files deliberately remain short. They must not become a second instruction source. Every surface points back to `SKILL.md`; drift is a contract failure and is checked by `motionloom discovery check` and the documentation audit.
25
+
26
+ ## Agent compatibility matrix
27
+
28
+ | Agent | Discovery surface | Expected first action | Review boundary |
29
+ |---|---|---|---|
30
+ | Codex | `.codex/skills/motionloom.md`, `.agents/skills/motionloom/SKILL.md` | Run discovery check, load root Skill and Agent Card | No commit/push/PR without explicit user confirmation |
31
+ | Claude Code | `.claude/skills/motionloom.md`, `.agents/skills/motionloom/SKILL.md` | Run discovery check, load root Skill and Agent Card | Same review-first gate |
32
+ | Cursor | `.agents/skills/motionloom/SKILL.md`, `AGENTS.md` | Load canonical Skill through repository rules | Same review-first gate |
33
+ | OpenCode | `.agents/skills/motionloom/SKILL.md`, `AGENTS.md` | Load canonical Skill and run discovery check | Same review-first gate |
34
+
35
+ Support here means that the repository exposes a deterministic discovery contract. It does not claim that every Agent version automatically loads every convention. The Agent must report when a surface is unavailable or when it cannot open the internal Dev Lab.
36
+
37
+ ## Required first-run sequence
38
+
39
+ Run `motionloom discovery check --root <checkout> --json`, inspect `source`, then run project analysis with `motionloom analyze <project> --init-memory`. Load the project context and durable Project Memory before planning. After rendering, prepare a task-bound browser candidate and suggest or trigger the internal Dev Lab. Capture user feedback separately from runtime evidence. A valid signature, quality gate or screenshot is not a user approval.
40
+
41
+ ## Portability policy
42
+
43
+ The npm entrypoint is the public cross-platform surface. Ubuntu, macOS and Windows must use Node argument arrays, Python `pathlib`, UTF-8 JSON and no required Bash, POSIX `/tmp`, system `zip` or system `unzip`. Bash wrappers may remain convenience scripts for repository contributors, but the discovery and validation commands must work through Node/Python on all supported operating systems.
44
+
45
+ ## Troubleshooting
46
+
47
+ If discovery fails, do not continue as if the Skill were loaded. Inspect the JSON `errors`, verify that the checkout has not mixed files from different versions, and rerun from the intended root. If the package version and `agent-surfaces.json` disagree, use the same source checkout or reinstall the package. If a runtime dependency is missing, report it as a blocker; do not replace runtime evidence with a static placeholder.
package/docs/CHECKLIST.md CHANGED
@@ -23,9 +23,10 @@ A scene is only ready for the confirm-into-PR step when every item below passes.
23
23
 
24
24
  ## Source traceability
25
25
  - [ ] Every geometric asset references an authoritative source (`assets/library/` or the host project) — flagged if invented.
26
- - [ ] `manifest.json` records framework, source path, license note, spec hash, and completed checklist entries.
26
+ - [ ] `manifest.json` records framework, source path, license note, spec hash, visual-truth path, and completed checklist entries.
27
27
 
28
28
  ## PR readiness
29
29
  - [ ] Snapshot PNGs exist for 0/50/100%.
30
+ - [ ] `visual-truth.json` binds real baseline/candidate frames to source, manifest and available runtime/Motion IR hashes; `approval` remains `false`.
30
31
  - [ ] `motion-spec.json` is bound to the exact `project-context.json` hash (implements == planned).
31
32
  - [ ] Dev Lab URL tested on mobile viewport and desktop.
package/docs/STATUS.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Current release posture
6
6
 
7
- MotionLoom's repository source and package manifest are at version **2.1.0**. The public npm registry currently serves **2.0.0**; the GitHub repository has no tag or GitHub Release for 2.1.0 until an explicitly approved release is performed. The repository has a cross-platform CLI, durable Project Memory, artifact-first handoff, runtime evidence, signed attestation and a browser-based Dev Lab review contract. The protected manual release workflow verifies package/changelog/release-note alignment before publication.
7
+ MotionLoom's repository source and package manifest are at **2.2.0 release-candidate metadata**. The public npm registry currently serves **2.1.0**, while the latest published GitHub Release/tag remains **v2.1.0**; the 2.2.0 tag, GitHub Release and npm publication are intentionally pending explicit maintainer approval. The repository has a cross-platform CLI, durable Project Memory, Agent interoperability surfaces, artifact-first handoff, runtime evidence, Visual Truth, Remediation Learning, signed attestation and a browser-based Dev Lab review contract. The protected manual release workflow verifies package/changelog/release-note alignment before publication.
8
8
 
9
9
  The repository is **engineering-ready for continued integration work**, not a universal production certification for every animation framework or every host project. CI status must be read from the latest GitHub Actions run, not inferred from historical audit prose.
10
10
 
@@ -0,0 +1,33 @@
1
+ # CI Replay Remediation — 2026-08-13
2
+
3
+ ## Evidence
4
+
5
+ The `MotionLoom Quality` workflow for commit [`d148f21`](https://github.com/lenhonbp/MotionLoom/commit/d148f2175e47e3fc32f7156fc83af82c749b47ed) completed with failure in run [`31709781319`](https://github.com/lenhonbp/MotionLoom/actions/runs/31709781319). Documentation and Package Hygiene and Security Analysis completed successfully on the same commit.
6
+
7
+ The failing step was **Enforce context-bound quality gate**. The recorded rejection was:
8
+
9
+ > `replay bundle has 11 mismatch(es)`
10
+
11
+ The preceding Intelligence, project graph, Motion IR and provenance checks were valid. The failure therefore represented stale replay hashes, not an approval decision or a request to weaken the verifier.
12
+
13
+ ## Root cause
14
+
15
+ The Quality workflow treated `replay-bundle.json` as a committed integrity snapshot, but earlier steps intentionally regenerate runtime telemetry, semantic-lint benchmark output, report/manifest output, signed attestation output and rendered runtime evidence for changed scenes. The quality gate then verified the old replay bundle against those newly generated files. A local verification before the generated-artifact phase could pass while the same sequence in CI correctly reported mismatches.
16
+
17
+ ## Remediation
18
+
19
+ The workflow now runs the canonical command below after runtime snapshot rendering and before the context-bound quality gate:
20
+
21
+ ```text
22
+ python3 scripts/intelligence.py replay capture \
23
+ --task-dir "artifacts/${scene}-task" --root . \
24
+ --output "artifacts/${scene}-task/replay-bundle.json"
25
+ ```
26
+
27
+ The change does not remove replay verification, expand exclusions, or turn heuristic evidence into approval. A regression assertion checks that replay capture follows runtime rendering and precedes the quality gate. A temporary task-bundle test also confirms that tampered evidence is rejected, canonical capture rebuilds its hashes, and the rebuilt bundle verifies successfully.
28
+
29
+ ## Local verification
30
+
31
+ After the remediation, the following checks passed locally: engine regression, docs audit, Skill Doctor, skill-creator validator, runtime adapter smoke, Agent discovery, installation matrix, Visual Truth validation, Remediation Learning validation, quality attestation with Visual Truth required, npm dry-run, Python syntax compilation and `git diff --check`.
32
+
33
+ This audit records the CI incident and its fix as evidence; it does not change the published `motionloom@2.1.0` version or grant user approval.
@@ -0,0 +1,35 @@
1
+ # MotionLoom 2.2.0
2
+
3
+ ## Summary
4
+
5
+ MotionLoom 2.2.0 turns the project-aware animation Skill into a more portable Agent production contract. This release candidate adds canonical discovery surfaces, consumer fixtures, cross-platform installation evidence, provenance-bound Visual Truth, append-only Remediation Learning and a CI replay remediation that fails closed without confusing stale evidence with user approval.
6
+
7
+ ## Added
8
+
9
+ ### Agent interoperability and installation
10
+
11
+ The package now exposes one canonical `SKILL.md` through `.agents/skills`, `.claude`, `.codex` and `AGENTS.md`. The discovery manifest and schema describe source kind, version, canonical files, compatibility and verification commands. The `motionloom discovery check`, `source` and `install-matrix` commands are cross-platform and do not require network access for local contract checks.
12
+
13
+ The consumer fixture manifest covers Lottie/dotLottie, Rive, GSAP, Framer Motion, body rigs and multi-scene continuity. Ubuntu, macOS and Windows are represented as explicit installation-matrix targets rather than an unverified portability claim.
14
+
15
+ ### Visual Truth
16
+
17
+ `visual-truth.json` binds baseline and candidate frame hashes, dimensions, scene/task identity, source and manifest provenance, runtime evidence and Motion IR where available. The validator emits deterministic comparison signals and region-level explanations for review. A changed frame produces `review_required`; it never becomes automatic approval.
18
+
19
+ ### Remediation Learning
20
+
21
+ The append-only, hash-chained remediation history stores user-confirmed outcomes and deterministic benchmark records. Summaries expose correction count, first-pass acceptance, success rate, issue-class outliers and benchmark pass rate. Unconfirmed outcomes cannot enter acceptance metrics.
22
+
23
+ ## Fixed
24
+
25
+ The Quality workflow now rebuilds the exact task-bound replay bundle after runtime, report and attestation artifacts are generated and before the context-bound quality gate. Regression coverage exercises tamper rejection and canonical replay rebuild, preventing stale generated hashes from causing a false CI rejection.
26
+
27
+ ## Verified behavior
28
+
29
+ The release candidate passes the full regression harness, docs audit, Skill Doctor, skill-creator validator, runtime adapter smoke, discovery and installation matrix checks, Visual Truth validation, Remediation Learning validation, quality attestation with Visual Truth required, npm package dry-run, Python syntax compilation and diff hygiene. The mainline commit carrying the replay fix also passed Quality, Documentation and Package Hygiene, and Security workflows on GitHub.
30
+
31
+ ## Trust boundary and remaining scope
32
+
33
+ This release does not infer approval from visual metrics, heuristics, signatures, attestations or benchmark scores. The user must inspect the Dev Lab review candidate and explicitly approve before PR preparation. Commit, push, tag creation, GitHub Release creation and npm publication remain separate explicit side effects.
34
+
35
+ The next evidence priority is paired evaluation across additional real animation projects to measure first-pass acceptance, correction count, time-to-fix and rerender avoidance without presenting synthetic scores as human approval.