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
@@ -1,6 +1,6 @@
1
1
  # Publish MotionLoom to npm from your workstation
2
2
 
3
- This guide publishes the prepared `motionloom@2.1.0` package from your own computer. The npm password, authenticator code and access token must stay on your computer; never paste them into chat, GitHub issues or repository files.
3
+ This guide publishes the prepared `motionloom@2.2.0` package from your own computer. The npm password, authenticator code and access token must stay on your computer; never paste them into chat, GitHub issues or repository files.
4
4
 
5
5
  ## 1. Install prerequisites
6
6
 
@@ -48,7 +48,7 @@ npm pack --dry-run --json --ignore-scripts
48
48
  npm publish --dry-run --access public
49
49
  ```
50
50
 
51
- The dry-run should report `motionloom@2.1.0`, public access, and the current package file list. Do not hard-code a historical file count: inspect the JSON output and compare it with the checked-in package allowlist. The prepack hook removes generated Python bytecode before packaging. Do not publish if the dry-run shows private keys, `.env` files, `artifacts/`, `dev-lab/` or `__pycache__/` entries.
51
+ The dry-run should report `motionloom@2.2.0`, public access, and the current package file list. Do not hard-code a historical file count: inspect the JSON output and compare it with the checked-in package allowlist. The prepack hook removes generated Python bytecode before packaging. Do not publish if the dry-run shows private keys, `.env` files, `artifacts/`, `dev-lab/` or `__pycache__/` entries.
52
52
 
53
53
  ## 5. Publish the package
54
54
 
@@ -58,15 +58,15 @@ When the dry-run is correct and `npm whoami` shows the intended account, publish
58
58
  npm publish --access public
59
59
  ```
60
60
 
61
- The version `2.1.0` becomes immutable on npm after a successful publish. If npm reports that the version already exists, stop and verify the registry instead of trying to overwrite it.
61
+ The version `2.2.0` becomes immutable on npm after a successful publish. If npm reports that the version already exists, stop and verify the registry instead of trying to overwrite it.
62
62
 
63
63
  ## 6. Verify the registry publication
64
64
 
65
- Run the following commands and confirm that they return `2.1.0` and a tarball URL:
65
+ Run the following commands and confirm that they return `2.2.0` and a tarball URL:
66
66
 
67
67
  ```bash
68
68
  npm view motionloom version --registry=https://registry.npmjs.org/
69
- npm view motionloom@2.1.0 name version license dist.tarball dist.shasum --json \
69
+ npm view motionloom@2.2.0 name version license dist.tarball dist.shasum --json \
70
70
  --registry=https://registry.npmjs.org/
71
71
  ```
72
72
 
@@ -76,7 +76,7 @@ Then test installation in a clean temporary directory:
76
76
  TMP_DIR="$(mktemp -d)"
77
77
  cd "$TMP_DIR"
78
78
  npm init --yes
79
- npm install motionloom@2.1.0
79
+ npm install motionloom@2.2.0
80
80
  motionloom --help
81
81
  motionloom doctor
82
82
  ```
@@ -0,0 +1,18 @@
1
+ # Agent consumer fixtures
2
+
3
+ This example set is a small, machine-readable map of how an Agent should consume MotionLoom. It is intentionally not a fake demo application and it does not claim user approval. Each case points to a repository artifact or a real runtime harness and states its evidence level.
4
+
5
+ Run the offline contract checks first:
6
+
7
+ ```text
8
+ motionloom discovery check --root . --json
9
+ python3 tests/scripts/test_consumer_fixtures.py
10
+ ```
11
+
12
+ For the browser-backed runtime cases, install the repository dependencies and run:
13
+
14
+ ```text
15
+ npm run runtime:test
16
+ ```
17
+
18
+ The real runtime harness emits deterministic scrub points at 0/50/100% for Rive, GSAP and Framer Motion. The Lottie and dotLottie cases are asset/package contracts; they must not be described as runtime-verified unless corresponding runtime evidence exists in the task bundle. The body-rig and continuity cases exercise structure and cross-scene semantics.
@@ -0,0 +1,82 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "fixture_set": "agent-consumer-smoke",
4
+ "purpose": "Show Agents how to select an animation capability, locate evidence and preserve review boundaries.",
5
+ "repository_root": "..",
6
+ "cases": [
7
+ {
8
+ "id": "lottie-json-source-bound",
9
+ "framework": "lottie",
10
+ "category": "asset-runtime",
11
+ "source": "src/output/browser-review-smoke/animation.json",
12
+ "manifest": "src/output/browser-review-smoke/manifest.json",
13
+ "verification": "python3 scripts/validate-lottie.py src/output/browser-review-smoke/animation.json",
14
+ "evidence_level": "asset-contract",
15
+ "expected": "source_binding and Lottie structural validation; runtime acceptance still requires runtime evidence"
16
+ },
17
+ {
18
+ "id": "dotlottie-package",
19
+ "framework": "dotlottie",
20
+ "category": "asset-package",
21
+ "source": "src/output/browser-review-smoke/animation.json",
22
+ "manifest": "src/output/browser-review-smoke/manifest.json",
23
+ "verification": "node scripts/to-dotlottie.mjs --scene-dir src/output/browser-review-smoke --output <temporary-output>/animation.lottie",
24
+ "evidence_level": "package-contract",
25
+ "expected": "manifest.json selects the initial animation and the archive validates without system zip"
26
+ },
27
+ {
28
+ "id": "rive-runtime",
29
+ "framework": "rive",
30
+ "category": "browser-runtime",
31
+ "source": "tests/runtime-harness/main.jsx",
32
+ "evidence": "artifacts/runtime-adapters/rive/runtime-evidence.json",
33
+ "verification": "RUNTIME_FRAMEWORKS=rive npm run runtime:test",
34
+ "evidence_level": "runtime-verified-fixture",
35
+ "expected": "real browser adapter, ready=true, runtime state and 0/50/100 snapshots"
36
+ },
37
+ {
38
+ "id": "gsap-runtime",
39
+ "framework": "gsap",
40
+ "category": "browser-runtime",
41
+ "source": "tests/runtime-harness/main.jsx",
42
+ "evidence": "artifacts/runtime-adapters/gsap/runtime-evidence.json",
43
+ "verification": "RUNTIME_FRAMEWORKS=gsap npm run runtime:test",
44
+ "evidence_level": "runtime-verified-fixture",
45
+ "expected": "real browser adapter, ready=true, runtime state and 0/50/100 snapshots"
46
+ },
47
+ {
48
+ "id": "framer-motion-runtime",
49
+ "framework": "framer-motion",
50
+ "category": "browser-runtime",
51
+ "source": "tests/runtime-harness/main.jsx",
52
+ "evidence": "artifacts/runtime-adapters/framer-motion/runtime-evidence.json",
53
+ "verification": "RUNTIME_FRAMEWORKS=framer-motion npm run runtime:test",
54
+ "evidence_level": "runtime-verified-fixture",
55
+ "expected": "real browser adapter, ready=true, runtime state and 0/50/100 snapshots"
56
+ },
57
+ {
58
+ "id": "body-rig",
59
+ "framework": "svg-cutout-rig",
60
+ "category": "body-animation",
61
+ "source": "assets/library/avatar-base.svg",
62
+ "verification": "python3 src/rig/cutout_rig.py build --input assets/library/avatar-base.svg --output <temporary-output>/rigged.svg",
63
+ "evidence_level": "structure-verified-fixture",
64
+ "expected": "named anatomy, pivot markers and parent-first hierarchy remain inspectable"
65
+ },
66
+ {
67
+ "id": "continuity-multiscene",
68
+ "framework": "framework-neutral",
69
+ "category": "continuity",
70
+ "source": "tests/fixtures/continuity-multiscene",
71
+ "evidence": "tests/fixtures/continuity-multiscene/continuity-report.json",
72
+ "verification": "python3 scripts/intelligence.py continuity validate --report tests/fixtures/continuity-multiscene/continuity-report.json",
73
+ "evidence_level": "semantic-structure-fixture",
74
+ "expected": "scene-01 and scene-02 share continuity while scene-02-drift remains an explicit negative case"
75
+ }
76
+ ],
77
+ "review_boundary": {
78
+ "approval": false,
79
+ "user_review_required": true,
80
+ "pr_side_effects": "explicit-confirmation"
81
+ }
82
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "motionloom",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.20.0",
6
- "description": "MotionLoom: project-aware animation Skill with graph, provenance, Motion IR, runtime telemetry, DSSE-compatible signed attestation, external evidence verification and Dev Lab review.",
6
+ "description": "MotionLoom: project-aware animation Skill with Agent interoperability, graph, provenance, Motion IR, runtime telemetry, Visual Truth, Remediation Learning, DSSE-compatible signed attestation, external evidence verification and Dev Lab review.",
7
7
  "author": "lenhonbp",
8
8
  "bin": {
9
9
  "motionloom": "bin/motionloom.mjs"
@@ -32,7 +32,12 @@
32
32
  "tests/evals",
33
33
  "tests/scripts/run_tests.py",
34
34
  "tests/scripts/test_attestation.py",
35
- "tests/scripts/test_project_memory.py"
35
+ "tests/scripts/test_project_memory.py",
36
+ ".agents",
37
+ ".claude",
38
+ ".codex",
39
+ "AGENTS.md",
40
+ "agent-surfaces.json"
36
41
  ],
37
42
  "keywords": [
38
43
  "animation",
@@ -50,7 +55,10 @@
50
55
  "provenance",
51
56
  "attestation",
52
57
  "browser-review",
53
- "dev-lab"
58
+ "dev-lab",
59
+ "visual-truth",
60
+ "remediation-learning",
61
+ "agent-interoperability"
54
62
  ],
55
63
  "repository": {
56
64
  "type": "git",
@@ -70,7 +78,7 @@
70
78
  "scripts": {
71
79
  "prepack": "node scripts/prepack-clean.mjs",
72
80
  "test": "node bin/motionloom.mjs test",
73
- "validate": "node bin/motionloom.mjs quality-gate --all",
81
+ "validate": "npm run quality:attestation",
74
82
  "doctor": "node bin/motionloom.mjs doctor --json",
75
83
  "docs:check": "python3 scripts/docs-audit.py",
76
84
  "eval:projects": "python3 scripts/eval-projects.py --allow-insufficient",
@@ -99,9 +107,16 @@
99
107
  "attestation:policy": "node bin/motionloom.mjs attestation validate-policy",
100
108
  "attestation:keygen": "node bin/motionloom.mjs attestation-keygen",
101
109
  "quality:telemetry": "node bin/motionloom.mjs quality-gate --scene browser-review-smoke --context artifacts/browser-review-smoke-task/project-context.json --task-dir artifacts/browser-review-smoke-task --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry",
102
- "quality:attestation": "node bin/motionloom.mjs quality-gate --scene browser-review-smoke --context artifacts/browser-review-smoke-task/project-context.json --task-dir artifacts/browser-review-smoke-task --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation",
110
+ "quality:attestation": "node bin/motionloom.mjs quality-gate --scene browser-review-smoke --context artifacts/browser-review-smoke-task/project-context.json --task-dir artifacts/browser-review-smoke-task --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation --require-visual-truth",
103
111
  "pack:dotlottie": "node scripts/to-dotlottie.mjs",
104
- "runtime:test": "node scripts/runtime-adapters.mjs"
112
+ "runtime:test": "node scripts/runtime-adapters.mjs",
113
+ "visual-truth:build": "node bin/motionloom.mjs visual-truth build",
114
+ "visual-truth:check": "node bin/motionloom.mjs visual-truth validate --root . --input src/output/browser-review-smoke/visual-truth.json",
115
+ "remediation:validate": "node bin/motionloom.mjs remediation-learning validate --history artifacts/remediation-history.jsonl --json",
116
+ "remediation:summary": "node bin/motionloom.mjs remediation-learning summary --history artifacts/remediation-history.jsonl --output artifacts/remediation-summary.json --json",
117
+ "discovery:check": "node bin/motionloom.mjs discovery check --root . --json",
118
+ "discovery:show": "node bin/motionloom.mjs discovery show --root . --json",
119
+ "install:matrix": "node bin/motionloom.mjs discovery install-matrix --root . --json"
105
120
  },
106
121
  "dependencies": {
107
122
  "@lottiefiles/dotlottie-web": "^0.79.0",
@@ -0,0 +1,29 @@
1
+ # Agent interoperability reference
2
+
3
+ Read this reference when installing MotionLoom into a new Agent environment or when adding a new discovery surface.
4
+
5
+ ## Contract hierarchy
6
+
7
+ 1. `SKILL.md` is the canonical workflow and must stay below the skill context budget.
8
+ 2. `agent-card.json` is the machine-readable capability and side-effect contract.
9
+ 3. `agent-surfaces.json` is the discovery/install/compatibility contract.
10
+ 4. `.agents/skills`, `.claude`, `.codex` and `AGENTS.md` are short routers that point to the canonical sources.
11
+ 5. `docs/AGENT-INTEGRATION.md` is user-facing installation and troubleshooting documentation.
12
+
13
+ Do not put divergent workflow rules into an Agent-specific file. Add reusable domain detail to `references/` or `docs/`, then update the canonical Skill navigation.
14
+
15
+ ## Discovery check output
16
+
17
+ The JSON result contains `status`, `source`, `surface_count`, `installation_count`, `errors` and `warnings`. `status=pass` means the local package has the expected files and contract values. It does not assert that the host project has been analyzed, that runtime dependencies are installed, that a candidate rendered correctly or that a user approved a change.
18
+
19
+ ## Adding a new Agent surface
20
+
21
+ Add one manifest entry with a safe relative path, a supported agent identifier, `canonical: SKILL.md` and either `load_mode: alias` or `load_mode: router`. Create a short file at that path. Add or update the installation/discovery test and run `motionloom discovery check --root . --json`, `python3 scripts/docs-audit.py` and the full test suite. Never silently overwrite an existing surface with a copied version of `SKILL.md`.
22
+
23
+ ## Source and version binding
24
+
25
+ When a user reports a discovery issue, capture the package version, source kind, resolved path, Git remote/commit where available and the discovery JSON. Treat a version mismatch as a structural problem, not as a runtime animation failure. Do not use network access in the check command; registry/Git availability belongs to the installation step.
26
+
27
+ ## Approval boundary
28
+
29
+ Discovery is deliberately orthogonal to approval. The discovery command can only tell an Agent how to load MotionLoom. It cannot transition an animation task to `ready_for_pr` or `confirmed`, and it cannot change `approval` from `false` to `true`.
@@ -15,6 +15,8 @@ Use this reference when an Agent needs to understand or extend MotionLoom's task
15
15
  | `semantic-lint-benchmark.json` | `python3 scripts/intelligence.py semantic-lint benchmark --task-dir <task>` | Measures in-process semantic-lint execution, rule coverage and p95 against a deterministic threshold; it is a performance contract, not visual approval. |
16
16
  | `runtime-telemetry.json` | `motionloom runtime-telemetry <scene> artifacts/<task-id>` | Records deterministic scrub-point observations, RAF timing, runtime state hashes and source/manifest/Motion IR bindings from the real adapter harness. The npm CLI is the cross-platform entrypoint; the legacy `.sh` wrapper remains for Unix compatibility. |
17
17
  | `evidence-verifier-report.json` | `python3 scripts/evidence-verifier.py --scene-dir <scene-dir> --task-dir <task> --runtime-evidence <path>` | Read-only external verification result for task/scene/path/hash/age integrity; `approval` is always `false`. |
18
+ | `visual-truth.json` | `motionloom visual-truth build|validate` | Baseline/candidate PNG hashes, dimensions, deterministic comparison signal, region-level review explanation and source/runtime/Motion IR provenance; `approval` is always `false`. |
19
+ | `remediation-history.jsonl` | `motionloom remediation-learning record-outcome|record-benchmark|summary` | Append-only, hash-chained user-confirmed corrections and deterministic benchmark runs; first-pass metrics guide future work but `approval` is always `false`. |
18
20
  | `attestation-statement.json` | `python3 scripts/attestation.py statement --scene-dir <scene-dir> --task-dir <task> --context <context>` | Derives canonical task/scene/source/manifest/Motion IR/evidence hash bindings before signing. |
19
21
  | `attestation.json` | `python3 scripts/attestation.py build --statement <statement> --private-key <key> --key-id <id>` | DSSE-compatible Ed25519 envelope over the versioned statement; `approval` is always `false`. |
20
22
  | `trust-policy.json` | `python3 scripts/attestation.py validate-policy --path <policy>` | Declares trusted keys, validity, rotation and fail-closed revocation behavior. |
@@ -71,6 +73,8 @@ python3 scripts/quality-gate.py \
71
73
  --context <project-context.json> \
72
74
  --task-dir artifacts/<task-id> \
73
75
  --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation
76
+ python3 scripts/remediation-learning.py validate --history artifacts/remediation-history.jsonl --json
77
+ python3 scripts/remediation-learning.py summary --history artifacts/remediation-history.jsonl --output artifacts/remediation-summary.json --json
74
78
  python3 scripts/eval-intelligence.py
75
79
  ```
76
80
 
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://motionloom.dev/schemas/agent-surfaces.schema.json",
4
+ "title": "MotionLoom Agent Surfaces",
5
+ "type": "object",
6
+ "required": ["schema_version", "name", "version", "canonical", "surfaces", "installations", "compatibility", "rules"],
7
+ "properties": {
8
+ "schema_version": {"const": "1.0"},
9
+ "name": {"const": "motionloom"},
10
+ "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"},
11
+ "canonical": {
12
+ "type": "object",
13
+ "required": ["skill", "agent_card", "cli"],
14
+ "properties": {
15
+ "skill": {"const": "SKILL.md"},
16
+ "agent_card": {"const": "agent-card.json"},
17
+ "cli": {"const": "bin/motionloom.mjs"}
18
+ },
19
+ "additionalProperties": false
20
+ },
21
+ "surfaces": {
22
+ "type": "array",
23
+ "minItems": 4,
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["id", "kind", "path", "canonical", "load_mode", "agents"],
27
+ "properties": {
28
+ "id": {"type": "string", "pattern": "^[a-z0-9-]+$"},
29
+ "kind": {"type": "string", "enum": ["agent-skill", "agent-instructions", "repository-guide"]},
30
+ "path": {"type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"},
31
+ "canonical": {"const": "SKILL.md"},
32
+ "load_mode": {"type": "string", "enum": ["alias", "router"]},
33
+ "agents": {"type": "array", "minItems": 1, "items": {"type": "string"}}
34
+ },
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "installations": {
39
+ "type": "array",
40
+ "minItems": 3,
41
+ "items": {
42
+ "type": "object",
43
+ "required": ["id", "source_kind", "command", "verification", "provenance"],
44
+ "properties": {
45
+ "id": {"type": "string"},
46
+ "source_kind": {"type": "string", "enum": ["npm", "git", "local"]},
47
+ "command": {"type": "string"},
48
+ "verification": {"type": "string"},
49
+ "provenance": {"type": "string"}
50
+ },
51
+ "additionalProperties": false
52
+ }
53
+ },
54
+ "compatibility": {
55
+ "type": "object",
56
+ "required": ["operating_systems", "node", "python", "agents"],
57
+ "properties": {
58
+ "operating_systems": {"type": "array", "items": {"type": "string"}},
59
+ "node": {"type": "string"},
60
+ "python": {"type": "string"},
61
+ "agents": {"type": "array", "items": {"type": "string"}}
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ "rules": {
66
+ "type": "object",
67
+ "required": ["canonical_instruction_source", "no_surface_copy", "no_network_required_for_check", "approval_is_never_inferred"],
68
+ "properties": {
69
+ "canonical_instruction_source": {"const": "SKILL.md"},
70
+ "no_surface_copy": {"const": true},
71
+ "no_network_required_for_check": {"const": true},
72
+ "approval_is_never_inferred": {"const": true}
73
+ },
74
+ "additionalProperties": false
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lenhonbp/MotionLoom/blob/main/schemas/remediation-history.schema.json",
4
+ "title": "MotionLoom remediation and benchmark history event",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema_version", "event_id", "event_type", "recorded_at", "previous_event_sha256", "event_sha256"],
8
+ "properties": {
9
+ "schema_version": {"const": "0.1"},
10
+ "event_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,127}$"},
11
+ "event_type": {"type": "string", "enum": ["remediation_outcome", "benchmark_run"]},
12
+ "recorded_at": {"type": "string", "format": "date-time"},
13
+ "previous_event_sha256": {"type": ["string", "null"], "pattern": "^[a-f0-9]{64}$"},
14
+ "event_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
15
+ "user_confirmed": {"type": "boolean"},
16
+ "first_pass_accepted": {"type": "boolean"},
17
+ "correction_count": {"type": "integer", "minimum": 0},
18
+ "result": {"type": "string", "enum": ["pass", "fail", "partial", "unknown"]},
19
+ "status": {"type": "string", "enum": ["pass", "fail"]},
20
+ "p95_ms": {"type": "number", "minimum": 0},
21
+ "threshold_ms": {"type": "number", "exclusiveMinimum": 0}
22
+ }
23
+ }
@@ -11,6 +11,7 @@
11
11
  "category": {"type": "string", "minLength": 1},
12
12
  "file": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
13
13
  "runtime_evidence": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
14
+ "visual_truth": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
14
15
  "source_binding": {
15
16
  "type": "object",
16
17
  "required": ["kind", "source_path", "authority", "license", "sha256"],
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lenhonbp/MotionLoom/blob/main/schemas/visual-truth.schema.json",
4
+ "title": "MotionLoom Visual Truth Contract",
5
+ "type": "object",
6
+ "required": ["schema_version", "contract", "status", "scene", "frames", "comparison", "provenance", "review_boundary"],
7
+ "properties": {
8
+ "schema_version": {"const": "1.0"},
9
+ "contract": {"const": "motionloom-visual-truth"},
10
+ "status": {"enum": ["pass", "review_required"]},
11
+ "scene": {"type": "string", "minLength": 1},
12
+ "task_id": {"type": ["string", "null"]},
13
+ "frames": {
14
+ "type": "object",
15
+ "required": ["baseline", "candidate"],
16
+ "properties": {
17
+ "baseline": {"$ref": "#/$defs/frame"},
18
+ "candidate": {"$ref": "#/$defs/frame"}
19
+ },
20
+ "additionalProperties": false
21
+ },
22
+ "comparison": {
23
+ "type": "object",
24
+ "required": ["metric", "same_dimensions", "byte_identical", "changed", "interpretation"],
25
+ "properties": {
26
+ "metric": {"type": "string"},
27
+ "same_dimensions": {"type": "boolean"},
28
+ "byte_identical": {"type": "boolean"},
29
+ "changed": {"type": "boolean"},
30
+ "distance": {"type": "number", "minimum": 0},
31
+ "threshold": {"type": "number", "minimum": 0},
32
+ "interpretation": {"enum": ["equal", "review_required"]}
33
+ },
34
+ "additionalProperties": true
35
+ },
36
+ "regions": {"type": "array"},
37
+ "provenance": {
38
+ "type": "object",
39
+ "required": ["source_path", "source_sha256", "manifest_path", "manifest_sha256"],
40
+ "properties": {
41
+ "source_path": {"type": "string", "pattern": "^(?!/)(?!.*\\.\\.).+$"},
42
+ "source_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
43
+ "manifest_path": {"type": "string", "pattern": "^(?!/)(?!.*\\.\\.).+$"},
44
+ "manifest_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
45
+ "runtime_evidence_path": {"type": ["string", "null"]},
46
+ "runtime_evidence_sha256": {"type": ["string", "null"]},
47
+ "motion_ir_path": {"type": ["string", "null"]},
48
+ "motion_ir_sha256": {"type": ["string", "null"]}
49
+ },
50
+ "additionalProperties": true
51
+ },
52
+ "review_boundary": {
53
+ "type": "object",
54
+ "required": ["approval", "user_review_required", "decision"],
55
+ "properties": {
56
+ "approval": {"const": false},
57
+ "user_review_required": {"const": true},
58
+ "decision": {"const": "pending"}
59
+ },
60
+ "additionalProperties": true
61
+ }
62
+ },
63
+ "$defs": {
64
+ "frame": {
65
+ "type": "object",
66
+ "required": ["role", "percent", "path", "sha256", "bytes", "width", "height"],
67
+ "properties": {
68
+ "role": {"enum": ["baseline", "candidate"]},
69
+ "percent": {"type": "integer", "minimum": 0, "maximum": 100},
70
+ "path": {"type": "string", "pattern": "^(?!/)(?!.*\\.\\.).+$"},
71
+ "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
72
+ "bytes": {"type": "integer", "minimum": 1},
73
+ "width": {"type": "integer", "minimum": 1},
74
+ "height": {"type": "integer", "minimum": 1}
75
+ },
76
+ "additionalProperties": true
77
+ }
78
+ },
79
+ "additionalProperties": true
80
+ }
package/scripts/devlab.py CHANGED
@@ -19,7 +19,7 @@ TASK_ARTIFACTS = (
19
19
  "issue-register.json", "decision-log.jsonl", "project-memory.json",
20
20
  "project-graph.json", "provenance.json", "capability-registry.json",
21
21
  "motion-ir.json", "replay-bundle.json", "semantic-lint-report.json",
22
- "continuity-report.json", "fix-plan.json", "browser-observation.md",
22
+ "continuity-report.json", "fix-plan.json", "visual-truth.json", "browser-observation.md",
23
23
  )
24
24
 
25
25