motionloom 2.2.0 → 2.3.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.
@@ -0,0 +1,55 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "provenance_id": "hero-male-ai-pilot-provenance",
4
+ "task_id": "mission-1.17.5-ai-pilot",
5
+ "scene": "hero-male-ai-pilot",
6
+ "created_at": "2026-08-14T00:00:00Z",
7
+ "asset": {
8
+ "id": "hero-male-ai-pilot",
9
+ "path": "hero-male.json",
10
+ "type": "runtime-pilot",
11
+ "framework": "body-rig",
12
+ "version": "0.1.0"
13
+ },
14
+ "authority": "ai_generated",
15
+ "readiness": "runtime_ready",
16
+ "generator": {
17
+ "model": "declared-by-agent-at-generation-time",
18
+ "task_id": "mission-1.17.5-ai-pilot",
19
+ "source": "agent-created-pilot",
20
+ "generated_at": "2026-08-14T00:00:00Z",
21
+ "agent": "codex"
22
+ },
23
+ "license": {
24
+ "spdx": "UNLICENSED",
25
+ "source": "internal-generation",
26
+ "attribution": "Generated pilot retained for runtime testing; production distribution requires a separate rights decision."
27
+ },
28
+ "files": [
29
+ {
30
+ "path": "hero-male.json",
31
+ "role": "runtime-pilot",
32
+ "sha256": "fc723dce3005fb2d16fe6df2e20a116f361b2b2b82b4aff7045c186c55190c27"
33
+ }
34
+ ],
35
+ "provenance_chain": [
36
+ {
37
+ "step": "generate",
38
+ "actor": "agent:codex",
39
+ "source": "agent-created-pilot",
40
+ "timestamp": "2026-08-14T00:00:00Z"
41
+ },
42
+ {
43
+ "step": "runtime-test",
44
+ "actor": "runtime:motionloom",
45
+ "source": "internal-runtime-evidence",
46
+ "timestamp": "2026-08-14T00:00:00Z"
47
+ }
48
+ ],
49
+ "runtime_evidence": {
50
+ "status": "pass",
51
+ "runtime": "motionloom-body-rig-runtime",
52
+ "tested_at": "2026-08-14T00:00:00Z",
53
+ "evidence_path": "runtime-evidence.json"
54
+ }
55
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motionloom",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.20.0",
6
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.",
@@ -28,6 +28,9 @@
28
28
  "references",
29
29
  "docs",
30
30
  "examples",
31
+ "scripts/asset-provenance.py",
32
+ "schemas/asset-provenance.schema.json",
33
+ "examples/agent-consumer/ai-generated-pilot-provenance.json",
31
34
  "project-context.example.json",
32
35
  "tests/evals",
33
36
  "tests/scripts/run_tests.py",
@@ -80,6 +83,10 @@
80
83
  "test": "node bin/motionloom.mjs test",
81
84
  "validate": "npm run quality:attestation",
82
85
  "doctor": "node bin/motionloom.mjs doctor --json",
86
+ "setup": "node bin/motionloom.mjs setup",
87
+ "setup:dry": "node bin/motionloom.mjs setup --dry-run",
88
+ "status": "node bin/motionloom.mjs status",
89
+ "repair": "node bin/motionloom.mjs repair",
83
90
  "docs:check": "python3 scripts/docs-audit.py",
84
91
  "eval:projects": "python3 scripts/eval-projects.py --allow-insufficient",
85
92
  "release:verify": "python3 scripts/release-verify.py",
@@ -116,7 +123,9 @@
116
123
  "remediation:summary": "node bin/motionloom.mjs remediation-learning summary --history artifacts/remediation-history.jsonl --output artifacts/remediation-summary.json --json",
117
124
  "discovery:check": "node bin/motionloom.mjs discovery check --root . --json",
118
125
  "discovery:show": "node bin/motionloom.mjs discovery show --root . --json",
119
- "install:matrix": "node bin/motionloom.mjs discovery install-matrix --root . --json"
126
+ "install:matrix": "node bin/motionloom.mjs discovery install-matrix --root . --json",
127
+ "asset-provenance:validate": "node bin/motionloom.mjs asset-provenance validate --input examples/agent-consumer/ai-generated-pilot-provenance.json --json",
128
+ "asset-provenance:check": "node bin/motionloom.mjs asset-provenance check --input examples/agent-consumer/ai-generated-pilot-provenance.json --root examples/agent-consumer --mode runtime --json"
120
129
  },
121
130
  "dependencies": {
122
131
  "@lottiefiles/dotlottie-web": "^0.79.0",
@@ -16,6 +16,17 @@ Do not put divergent workflow rules into an Agent-specific file. Add reusable do
16
16
 
17
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
18
 
19
+ ## One-command onboarding
20
+
21
+ For a host project that has not installed MotionLoom, prefer:
22
+
23
+ ```bash
24
+ npx --yes motionloom setup --project-root <project-path>
25
+ npx --no-install motionloom status --project-root <project-path> --json
26
+ ```
27
+
28
+ `setup` is idempotent. It detects the project root and package manager, installs a local development dependency when needed, merges only the managed router block in `AGENTS.md`, runs discovery and bootstraps project context plus `.motionloom/project-memory.json`. Use `--dry-run --json` to preview and `repair --yes --json` to restore missing managed pieces. A setup result of `blocked` is actionable failure, not permission to continue with guessed context. Setup never commits, pushes, opens a PR or infers approval.
29
+
19
30
  ## Adding a new Agent surface
20
31
 
21
32
  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`.
@@ -8,6 +8,7 @@ Use this reference when an Agent needs to understand or extend MotionLoom's task
8
8
  | --- | --- | --- |
9
9
  | `project-graph.json` | `python3 scripts/intelligence.py graph build --task-dir <task>` | Links project, intent, scene, context, artifacts and review with task identity and hashes. |
10
10
  | `provenance.json` | `python3 scripts/intelligence.py provenance build --task-dir <task>` | Records step actor, builder, materials, products, policy, result and parent chain hash. |
11
+ | `asset-provenance.json` | `motionloom asset-provenance check --input <path> --root <scene-dir> --mode runtime|production` | Classifies asset origin/authority and effective readiness, binds file hashes and license/source metadata, and fails closed before production eligibility. It never grants `production_approved`. |
11
12
  | `capability-registry.json` | `python3 scripts/intelligence.py capabilities build --output <path>` | Describes verified/scaffold-only adapters, evidence freshness, compatibility, fallback and side effects. |
12
13
  | `motion-ir.json` | `python3 scripts/intelligence.py motion-ir build --task-dir <task>` | Binds framework-neutral tracks and accessibility policy to task, scene, context and source. |
13
14
  | `replay-bundle.json` | `python3 scripts/intelligence.py replay capture --root <root> --task-dir <task>` | Captures clean-root artifact hashes and environment metadata; verification fails on mutation or omission. |
@@ -26,7 +27,7 @@ Use this reference when an Agent needs to understand or extend MotionLoom's task
26
27
 
27
28
  ## Agent operating rules
28
29
 
29
- The Agent must build the graph, Motion IR, provenance, replay bundle, P1 feedback reports and semantic-lint benchmark after render and before the strict quality gate. For a strict observability run it must also capture runtime telemetry and run the external verifier before `--require-telemetry`. For a production trust run it must derive/sign `attestation.json`, copy or resolve a managed `trust-policy.json`, run the independent attestation verifier and use `--require-attestation`. It must run the report completeness contract for changed scenes; that contract selects one deterministic passing task bundle and fails on ambiguous ties. It may use a verified capability only when the registry evidence is fresh, its hash matches the referenced file and the target environment is compatible. `scaffold_only` is a planning option, never a production acceptance result.
30
+ The Agent must build the graph, Motion IR, step-level provenance, asset provenance, replay bundle, P1 feedback reports and semantic-lint benchmark after render and before the strict quality gate. For a strict observability run it must also capture runtime telemetry and run the external verifier before `--require-telemetry`. For a production trust run it must derive/sign `attestation.json`, copy or resolve a managed `trust-policy.json`, run the independent attestation verifier and use `--require-attestation` plus `--require-asset-provenance`. It must run the report completeness contract for changed scenes; that contract selects one deterministic passing task bundle and fails on ambiguous ties. It may use a verified capability only when the registry evidence is fresh, its hash matches the referenced file and the target environment is compatible. `scaffold_only` is a planning option, never a production acceptance result.
30
31
 
31
32
  The graph and provenance are evidence indexes, not approval tokens. A valid graph cannot bypass source binding, runtime assertions, browser review, reviewer consent or the `OPEN_PR=0` default. A confidence or risk value can prioritize investigation but cannot replace a deterministic rule or human decision.
32
33
 
@@ -72,7 +73,11 @@ python3 scripts/quality-gate.py \
72
73
  --scene <scene> \
73
74
  --context <project-context.json> \
74
75
  --task-dir artifacts/<task-id> \
75
- --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation
76
+ --require-browser-review --require-intelligence --require-p1 --require-benchmark --require-telemetry --require-attestation --require-asset-provenance
77
+ motionloom asset-provenance check \
78
+ --input src/output/<scene>/asset-provenance.json \
79
+ --root src/output/<scene> --mode production \
80
+ --manifest src/output/<scene>/manifest.json --json
76
81
  python3 scripts/remediation-learning.py validate --history artifacts/remediation-history.jsonl --json
77
82
  python3 scripts/remediation-learning.py summary --history artifacts/remediation-history.jsonl --output artifacts/remediation-summary.json --json
78
83
  python3 scripts/eval-intelligence.py
@@ -98,5 +103,6 @@ The replay policy excludes generated reports and manifests because `report.py co
98
103
  | `artifact_base must share the Dev Lab origin` or identity binding failure | Dev Lab query parameters would mix an external or foreign task/candidate bundle | Reject the handoff and regenerate the review URL from the canonical task bundle. |
99
104
  | `runtime telemetry verification failed` | Scrub-point evidence is stale, tampered, missing, cross-task, path-escaped or bound to different source/manifest/Motion IR bytes | Re-run the real runtime capture from the canonical scene/task bundle, then verify again; never treat the verifier as approval. |
100
105
  | `attestation verification failed` | Payload hash, DSSE signature, signer validity/revocation, policy lookup, path binding or expected task/scene binding failed | Regenerate the statement from current artifacts, re-run the external verifier against a managed policy and investigate signer lifecycle; never flip `approval` or bypass user review. |
106
+ | `asset provenance is blocked` or `production_eligible: false` | Origin is unknown/AI-generated without the required review, a file hash/license/runtime/full-gate record is missing, or an Agent self-asserted artist authority/approval | Keep the candidate runtime-only, fix the provenance record or obtain the required human review; never rewrite the authority tier or set `production_approved` automatically. |
101
107
 
102
108
  The public eval corpus is `tests/evals/intelligence-cases.json`. It covers positive verified selection plus scaffold-only, stale evidence, tampering, graph corruption, replay tamper and foreign-task candidate failures. P1 extends the acceptance surface with semantic warning preservation, generic-intent detection, multi-scene context drift, selective rerun binding, performance budget/frame-rate warnings, perceptual easing/reduced-motion warnings and benchmark execution time. The 1.9.0 slice adds runtime telemetry happy-path, state tamper, cross-task identity, stale evidence and symlink escape cases. The 2.0.0 slice adds clean attestation, payload tamper, binding mismatch, revoked signer and unknown signer cases without weakening the approval=false and human-review invariants.
@@ -43,7 +43,7 @@
43
43
  "required": ["id", "source_kind", "command", "verification", "provenance"],
44
44
  "properties": {
45
45
  "id": {"type": "string"},
46
- "source_kind": {"type": "string", "enum": ["npm", "git", "local"]},
46
+ "source_kind": {"type": "string", "enum": ["npm", "npx", "git", "local"]},
47
47
  "command": {"type": "string"},
48
48
  "verification": {"type": "string"},
49
49
  "provenance": {"type": "string"}
@@ -0,0 +1,183 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/lenhonbp/MotionLoom/blob/main/schemas/asset-provenance.schema.json",
4
+ "title": "MotionLoom asset provenance contract",
5
+ "description": "Asset-level origin, authority, readiness and human-governance contract. This schema never treats an Agent assertion as human approval.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "provenance_id", "asset", "authority", "readiness", "files", "license", "provenance_chain", "created_at"],
9
+ "properties": {
10
+ "schema_version": {"const": "1.0"},
11
+ "provenance_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,127}$"},
12
+ "task_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,127}$"},
13
+ "scene": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{1,63}$"},
14
+ "created_at": {"type": "string", "format": "date-time"},
15
+ "asset": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["id", "path", "type", "framework"],
19
+ "properties": {
20
+ "id": {"type": "string", "minLength": 1},
21
+ "path": {"type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+"},
22
+ "type": {"type": "string", "minLength": 1},
23
+ "framework": {"type": "string", "minLength": 1},
24
+ "version": {"type": "string", "minLength": 1}
25
+ }
26
+ },
27
+ "authority": {
28
+ "type": "string",
29
+ "enum": ["ai_generated", "ai_assisted", "ai_assisted_human_reviewed", "artist_authored", "unknown"]
30
+ },
31
+ "readiness": {
32
+ "type": "string",
33
+ "enum": ["blocked", "runtime_ready", "review_required", "production_eligible", "production_approved"]
34
+ },
35
+ "generator": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["model", "task_id", "source", "generated_at"],
39
+ "properties": {
40
+ "model": {"type": "string", "minLength": 1},
41
+ "task_id": {"type": "string", "minLength": 1},
42
+ "source": {"type": "string", "minLength": 1},
43
+ "generated_at": {"type": "string", "format": "date-time"},
44
+ "prompt_hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
45
+ "agent": {"type": "string", "minLength": 1}
46
+ }
47
+ },
48
+ "human_attestation": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["attestor", "attestor_type", "decision", "attested_at", "user_confirmed"],
52
+ "properties": {
53
+ "attestor": {"type": "string", "minLength": 1},
54
+ "attestor_type": {"type": "string", "enum": ["artist", "user"]},
55
+ "decision": {"type": "string", "enum": ["artist_authored", "accepted", "rejected"]},
56
+ "attested_at": {"type": "string", "format": "date-time"},
57
+ "user_confirmed": {"const": true},
58
+ "signature": {"type": "string", "minLength": 1}
59
+ }
60
+ },
61
+ "human_review": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["reviewer", "decision", "scope", "reviewed_at", "user_confirmed"],
65
+ "properties": {
66
+ "reviewer": {"type": "string", "minLength": 1},
67
+ "decision": {"type": "string", "enum": ["approved", "rejected", "changes_requested"]},
68
+ "scope": {"type": "string", "minLength": 1},
69
+ "reviewed_at": {"type": "string", "format": "date-time"},
70
+ "user_confirmed": {"const": true},
71
+ "notes": {"type": "string"}
72
+ }
73
+ },
74
+ "human_approval": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["issued_by", "decision", "approved_at", "user_confirmed"],
78
+ "properties": {
79
+ "issued_by": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": ["id", "type"],
83
+ "properties": {
84
+ "id": {"type": "string", "minLength": 1},
85
+ "type": {"type": "string", "enum": ["user", "artist"]}
86
+ }
87
+ },
88
+ "decision": {"const": "approved"},
89
+ "approved_at": {"type": "string", "format": "date-time"},
90
+ "user_confirmed": {"const": true},
91
+ "notes": {"type": "string"}
92
+ }
93
+ },
94
+ "license": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": ["spdx", "source", "attribution"],
98
+ "properties": {
99
+ "spdx": {"type": "string", "minLength": 1},
100
+ "source": {"type": "string", "minLength": 1},
101
+ "attribution": {"type": "string", "minLength": 1}
102
+ }
103
+ },
104
+ "files": {
105
+ "type": "array",
106
+ "minItems": 1,
107
+ "items": {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": ["path", "role", "sha256"],
111
+ "properties": {
112
+ "path": {"type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+"},
113
+ "role": {"type": "string", "minLength": 1},
114
+ "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
115
+ "bytes": {"type": "integer", "minimum": 0}
116
+ }
117
+ }
118
+ },
119
+ "provenance_chain": {
120
+ "type": "array",
121
+ "minItems": 1,
122
+ "items": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["step", "actor", "source", "timestamp"],
126
+ "properties": {
127
+ "step": {"type": "string", "minLength": 1},
128
+ "actor": {"type": "string", "minLength": 1},
129
+ "source": {"type": "string", "minLength": 1},
130
+ "timestamp": {"type": "string", "format": "date-time"},
131
+ "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
132
+ }
133
+ }
134
+ },
135
+ "runtime_evidence": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": ["status", "runtime", "tested_at"],
139
+ "properties": {
140
+ "status": {"type": "string", "enum": ["pass", "fail", "not_run"]},
141
+ "runtime": {"type": "string", "minLength": 1},
142
+ "tested_at": {"type": "string", "format": "date-time"},
143
+ "evidence_path": {"type": "string", "minLength": 1},
144
+ "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
145
+ }
146
+ },
147
+ "full_gate": {
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "required": ["status", "quality_gate", "visual_truth", "license", "checked_at"],
151
+ "properties": {
152
+ "status": {"type": "string", "enum": ["pass", "fail", "not_run"]},
153
+ "quality_gate": {"const": "pass"},
154
+ "visual_truth": {"const": "pass"},
155
+ "license": {"const": "pass"},
156
+ "checked_at": {"type": "string", "format": "date-time"},
157
+ "report_path": {"type": "string", "minLength": 1}
158
+ }
159
+ }
160
+ },
161
+ "allOf": [
162
+ {
163
+ "if": {"required": ["authority"], "properties": {"authority": {"enum": ["ai_generated", "ai_assisted", "ai_assisted_human_reviewed"]}}},
164
+ "then": {"required": ["generator"]}
165
+ },
166
+ {
167
+ "if": {"required": ["authority"], "properties": {"authority": {"const": "artist_authored"}}},
168
+ "then": {"required": ["human_attestation"]}
169
+ },
170
+ {
171
+ "if": {"required": ["authority"], "properties": {"authority": {"const": "unknown"}}},
172
+ "then": {"properties": {"readiness": {"const": "blocked"}}}
173
+ },
174
+ {
175
+ "if": {"required": ["readiness"], "properties": {"readiness": {"const": "production_approved"}}},
176
+ "then": {"required": ["human_approval", "full_gate"]}
177
+ },
178
+ {
179
+ "if": {"required": ["readiness"], "properties": {"readiness": {"const": "production_eligible"}}},
180
+ "then": {"required": ["full_gate"]}
181
+ }
182
+ ]
183
+ }
@@ -12,6 +12,7 @@
12
12
  "file": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
13
13
  "runtime_evidence": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
14
14
  "visual_truth": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
15
+ "asset_provenance": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*\\.\\.).+$"},
15
16
  "source_binding": {
16
17
  "type": "object",
17
18
  "required": ["kind", "source_path", "authority", "license", "sha256"],