agent-manifesto-kit 1.5.0 → 1.7.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.
- package/README.md +38 -0
- package/collection/NOTICE.md +8 -0
- package/collection/bundles/blender-3d/README.md +7 -2
- package/collection/bundles/blender-3d/agents/visual-reviewer.md +8 -2
- package/collection/bundles/blender-3d/skills/blender-asset/SKILL.md +23 -1
- package/collection/bundles/blender-3d/skills/blender-asset/workflows/asset.yml +5 -0
- package/collection/bundles/blender-3d/skills/blender-mocap-retarget/SKILL.md +25 -0
- package/collection/bundles/blender-3d/skills/blender-reference-model/SKILL.md +52 -8
- package/collection/bundles/blender-3d/skills/blender-reference-model/scripts/mesh_report.py +62 -8
- package/collection/skills/astro-preview/SKILL.md +60 -0
- package/collection/skills/kimodo-motion/SKILL.md +101 -0
- package/collection/skills/kimodo-motion/agents/openai.yaml +4 -0
- package/collection/skills/kimodo-motion/patches/kimodo-cpp-keyposes.patch +398 -0
- package/collection/skills/kimodo-motion/scripts/kimodo_motion.py +459 -0
- package/collection/skills/kimodo-motion/scripts/kimodo_retarget.py +280 -0
- package/collection/skills/kimodo-motion/tests/blender_roundtrip.py +105 -0
- package/collection/skills/kimodo-motion/tests/test_kimodo_motion.py +183 -0
- package/collection/skills/self-reflection/SKILL.md +121 -0
- package/collection/skills/self-reflection/agents/openai.yaml +4 -0
- package/collection/skills/self-reflection/assets/report-template.json +8 -0
- package/collection/skills/self-reflection/assets/report.html +64 -0
- package/collection/skills/self-reflection/references/report-format.md +42 -0
- package/collection/skills/self-reflection/scripts/export_claude.py +59 -0
- package/collection/skills/self-reflection/scripts/reflect.py +320 -0
- package/collection/skills/self-reflection/scripts/report.py +322 -0
- package/collection/skills/self-reflection/tests/test_export_claude.py +83 -0
- package/collection/skills/self-reflection/tests/test_reflect.py +189 -0
- package/collection/skills/self-reflection/tests/test_report.py +250 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,6 +86,18 @@ The [Blender bundle](collection/bundles/blender-3d/README.md) includes Quick, St
|
|
|
86
86
|
Production workflows, compact create/fix handoffs and per-phase usage records. Start with
|
|
87
87
|
`blender-asset`; animation and export checks are optional additions to the selected profile.
|
|
88
88
|
|
|
89
|
+
Use the local Astro Preview application for project asset previews:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
agentkit sync astro-preview --provider claude,codex
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The [Astro Preview skill](collection/skills/astro-preview/SKILL.md) covers stable preview links,
|
|
96
|
+
linked model animations, image differences, audio A/B and local HTML/Vite profiles.
|
|
97
|
+
Supply the application's checkout once through
|
|
98
|
+
`ASTRO_PREVIEW_DIR` or project context. The skill reuses its local server and catalog;
|
|
99
|
+
Agentkit installs the instructions, while the application is installed separately.
|
|
100
|
+
|
|
89
101
|
Get retro suggestions after significant sessions (optional Stop-hook nudge for both tools):
|
|
90
102
|
|
|
91
103
|
```bash
|
|
@@ -93,6 +105,32 @@ agentkit sync session-retro --provider claude,codex
|
|
|
93
105
|
python3 .claude/skills/session-retro/scripts/install_hooks.py
|
|
94
106
|
```
|
|
95
107
|
|
|
108
|
+
Review new portions of Codex session history with persistent checkpoints and an offline HTML report history:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
agentkit sync self-reflection --provider claude,codex
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The [Self Reflection skill](collection/skills/self-reflection/SKILL.md) includes Python helpers,
|
|
115
|
+
tests and report templates. It reviews instructions and delegation, carries open episodes and
|
|
116
|
+
recommendations between runs, and keeps logs and review state local. Requires Python 3.10+
|
|
117
|
+
on macOS/Linux. Both providers can run it; the input format remains Codex JSONL, not native
|
|
118
|
+
Claude transcripts. Unlike the single-session `session-retro` digest above, it incrementally
|
|
119
|
+
reviews project history and publishes a cumulative report with a date/time selector.
|
|
120
|
+
The bundled Claude exporter also supports an explicitly chosen project or global install.
|
|
121
|
+
|
|
122
|
+
Generate humanoid clips locally with NVIDIA Kimodo, starting and ending in a rig's own poses:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
agentkit sync kimodo-motion --provider claude,codex
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The [Kimodo Motion skill](collection/skills/kimodo-motion/SKILL.md) ships a patch that adds key-pose
|
|
129
|
+
constraints (upstream Kimodo's constraints JSON) to the native kimodo.cpp build, Python helpers for
|
|
130
|
+
generation, key-pose error gates, frame sheets and residual easing, and Blender scripts that turn a
|
|
131
|
+
Mixamo-named rig's pose into a key pose and bake takes back onto the rig. kimodo.cpp, its models and
|
|
132
|
+
Blender are installed separately; `KIMODO_ROOT` and `BLENDER` point at them.
|
|
133
|
+
|
|
96
134
|
Adopt a single skill for Codex:
|
|
97
135
|
|
|
98
136
|
```bash
|
package/collection/NOTICE.md
CHANGED
|
@@ -34,3 +34,11 @@ This collection contains skills and agents derived in part from third-party open
|
|
|
34
34
|
- **Source:** `meta-tags-optimizer` skill by Aaron He Zhu — https://github.com/aaron-he-zhu/seo-geo-claude-skills/tree/main/build/meta-tags-optimizer
|
|
35
35
|
- **License:** Apache License 2.0
|
|
36
36
|
- **Nature of derivation:** Concept, length budgets, and tag-set coverage (title / meta description / Open Graph / Twitter Card / supporting tags) adapted from the upstream skill. Upstream coupling to `memory/content/`, `memory/hot-cache.md`, `memory/open-loops.md`, the CORE-EEAT alignment check, the cross-skill "next step" routing to `schema-markup-generator`, and the multi-language preset list are not carried over. Procedure, safety constraints, and output contract are rewritten for this collection's single-file skill format.
|
|
37
|
+
|
|
38
|
+
## kimodo-motion
|
|
39
|
+
|
|
40
|
+
- **Sources:**
|
|
41
|
+
- kimodo.cpp by the LocalAI team — https://github.com/localai-org/kimodo.cpp (commit `ed8a931`): the key-pose patch modifies its sources; the SOMA30 joint names, parents and offsets in `scripts/kimodo_motion.py` are copied from its `scripts/export_glb.py`.
|
|
42
|
+
- Kimodo by NVIDIA — https://github.com/nv-tlabs/kimodo: the constraints JSON format and the full-body/end-effector conditioning the patch follows; the skeleton definitions kimodo.cpp copied.
|
|
43
|
+
- **License:** Apache License 2.0 (kimodo.cpp and NVIDIA Kimodo code). Model weights are not included; they carry the NVIDIA Open Model License and the Meta Llama 3 Community License.
|
|
44
|
+
- **Nature of derivation:** The patch adds key-pose constraint input to kimodo.cpp's native generator. Generation helpers, gates, residual easing, sheets and the Blender scripts are original to this collection.
|
|
@@ -133,6 +133,11 @@ requires an empty clip set. Require only the structure the task actually needs.
|
|
|
133
133
|
|
|
134
134
|
The original modeling and retarget tools came from measured reference-character sessions.
|
|
135
135
|
The 1.5.0 workflow separates that demanding use case from simpler tasks, based on a two-week
|
|
136
|
-
Claude/Codex session audit. The
|
|
137
|
-
|
|
136
|
+
Claude/Codex session audit. The 1.6.0 guidance (measured specs, low-poly and organic-form
|
|
137
|
+
rules, animated review with layer drift, garment liners, reach checks for held props,
|
|
138
|
+
generated-mesh provenance, freezing accepted results, review of live rounds) comes from a
|
|
139
|
+
consumer game project's character and building work.
|
|
140
|
+
|
|
141
|
+
The audit did not establish that two medium sessions match one large session at half the
|
|
142
|
+
price. Silhouette scores, technical checks and sampled images each
|
|
138
143
|
cover different criteria; none is a universal quality certificate.
|
|
@@ -27,14 +27,20 @@ do not open builder/rig code, whole transcripts or unrelated project files.
|
|
|
27
27
|
|
|
28
28
|
1. Confirm image access and required views. If unavailable, identify the missing evidence;
|
|
29
29
|
do not invent observations or infer appearance from filenames or scores.
|
|
30
|
-
2.
|
|
30
|
+
2. Describe the candidate on its own first (shapes, proportions, face, colours, details), as if
|
|
31
|
+
the reference were unseen; then compare. Ask whether a viewer would call it the same object;
|
|
32
|
+
a high score with a box for a face or black holes for openings is still a major finding.
|
|
33
|
+
Compare the highest-priority visible criteria at intended display size. Inspect relevant
|
|
31
34
|
details at larger size where identity or construction depends on them. Requested deviations
|
|
32
|
-
are not defects; optional taste preferences cannot force another pass.
|
|
35
|
+
are not defects; optional taste preferences cannot force another pass. A fix that overshoots
|
|
36
|
+
the reference (too bright, too big, too many) is a finding too.
|
|
33
37
|
3. For a repair, examine changed regions and visually affected dependencies. Reuse prior
|
|
34
38
|
findings only when their evidence is still current; note any unresolved required criterion.
|
|
35
39
|
4. Assess applicable silhouette/proportion, identity detail, colour, attachments and construction.
|
|
36
40
|
For motion, inspect contacts, feet, collisions, joint deformation and sampled loop transitions.
|
|
37
41
|
Contact sheets alone do not prove behavior between sampled frames; state that limitation.
|
|
42
|
+
When the brief includes deformation or motion, a character judged only from static renders
|
|
43
|
+
is `unverified`: require the animated frames and close-ups listed in the packet.
|
|
38
44
|
5. Return at most five findings, major first. Report fewer when fewer exist. Do not fill a quota.
|
|
39
45
|
Escalate a missing required judgment separately from observed defects.
|
|
40
46
|
|
|
@@ -31,6 +31,11 @@ origin, dimensions, polygon/material constraints and target engine only when rel
|
|
|
31
31
|
Identify editable source versus derived outputs. A revision also names the changed region,
|
|
32
32
|
existing failures, allowed changes and previous evidence to reuse.
|
|
33
33
|
|
|
34
|
+
Every profile, however small the asset, starts from a measured spec sized to the task (for a
|
|
35
|
+
revision, the changed region): relevant dimensions, colours per region, a feature checklist with
|
|
36
|
+
regions, and tolerances. Without a reference, the brief's numbers and recorded defaults are the
|
|
37
|
+
spec. Acceptance compares them in the contract's required views; "looks similar" is not a criterion.
|
|
38
|
+
|
|
34
39
|
## Procedure
|
|
35
40
|
|
|
36
41
|
Apply Stop Conditions immediately during every step; return the blocked work and evidence gaps.
|
|
@@ -41,7 +46,11 @@ Apply Stop Conditions immediately during every step; return the blocked work and
|
|
|
41
46
|
2. Make the smallest persisted Blender Python builder or edit script that produces the requested
|
|
42
47
|
change. Preserve user-authored geometry, materials and names outside that change. Save to
|
|
43
48
|
the agreed output; never overwrite an authoritative hand-edited `.blend` by rebuilding it.
|
|
44
|
-
Build into a new file and reconcile when script and scene disagree.
|
|
49
|
+
Build into a new file and reconcile when script and scene disagree. Expose tunable values as
|
|
50
|
+
command-line overrides (`blender -b --python build.py -- --set NAME=VALUE`); a parameter
|
|
51
|
+
search passes values that way and never rewrites the builder's source with sed or shell loops.
|
|
52
|
+
Wait for background builds and renders on the job's own completion signal (harness job
|
|
53
|
+
tools or its process ID); a process-name polling loop can match itself and never end.
|
|
45
54
|
3. For a new asset, establish scale and primary forms before details. For a narrow repair,
|
|
46
55
|
edit the affected region; do not restart the whole asset or regenerate unchanged views.
|
|
47
56
|
4. Run the contract's relevant technical checks and render the affected views at the intended
|
|
@@ -51,6 +60,17 @@ Apply Stop Conditions immediately during every step; return the blocked work and
|
|
|
51
60
|
artifact paths, evidence, remaining defects and actual changes for the coordinator's next
|
|
52
61
|
gate. Stop this invocation after one build or repair stage.
|
|
53
62
|
|
|
63
|
+
## Generated and Imported Meshes
|
|
64
|
+
|
|
65
|
+
Image-to-3D output, scans and downloaded models enter as inputs, not as finished assets.
|
|
66
|
+
Record provenance per run (source or generator and version, licence, input image, seed,
|
|
67
|
+
settings) next to the asset. Check the licence of every model in the chain, including
|
|
68
|
+
preprocessing such as background removal, whose weights may forbid commercial use. Verify
|
|
69
|
+
up-axis, facing and scale after import (some generators export lying along Y), cull hidden
|
|
70
|
+
inner shells before decimating, and render the back and a posed view before skinning: a
|
|
71
|
+
single-view generator invents the far side. Accepted results are frozen by the workflow's
|
|
72
|
+
completion rules; re-verify a frozen manifest before shipping a rebuild of its files.
|
|
73
|
+
|
|
54
74
|
## State and Usage Helpers
|
|
55
75
|
|
|
56
76
|
Resolve scripts relative to this skill directory, not the shell working directory.
|
|
@@ -65,6 +85,8 @@ They do not launch agents, render, collect billing automatically or enforce a li
|
|
|
65
85
|
overwrite authoritative work: return the concrete blocker without changing that work.
|
|
66
86
|
- A required check cannot run: record `not_tested` and return the missing capability.
|
|
67
87
|
- The coordinator has not reserved a permitted repair round: do not start another repair.
|
|
88
|
+
- A model or asset in the input chain has an unknown licence, or one that forbids the intended
|
|
89
|
+
use: do not ingest it; return the licence gap.
|
|
68
90
|
|
|
69
91
|
## Output Contract
|
|
70
92
|
|
|
@@ -7,6 +7,7 @@ contract:
|
|
|
7
7
|
required:
|
|
8
8
|
- brief and authoritative input/output paths
|
|
9
9
|
- profile with reason and measurable acceptance criteria
|
|
10
|
+
- measured spec sized to the task - dimensions, colours per region and a feature checklist with regions
|
|
10
11
|
- required evidence IDs, views/checks and task-specific tolerances
|
|
11
12
|
- allowed changes, units/axes/origin and deliverables
|
|
12
13
|
optional:
|
|
@@ -73,6 +74,8 @@ review:
|
|
|
73
74
|
- If image viewing or an independent agent is unavailable, record review as not_tested.
|
|
74
75
|
- A required review that cannot run blocks acceptance; deliver partial progress and identify the missing capability.
|
|
75
76
|
- A Quick or Standard reviewer trigger adds a gate without automatically escalating the entire profile.
|
|
77
|
+
- A live preview link or intermediate round shown to the user is a presentation; it takes the same review gate as a delivery under the chosen profile, run while the user looks.
|
|
78
|
+
- When the contract includes deformation or motion, the packet includes the motion evidence listed in blender-mocap-retarget step 7.
|
|
76
79
|
repair:
|
|
77
80
|
owner: calling agent
|
|
78
81
|
rules:
|
|
@@ -102,4 +105,6 @@ completion:
|
|
|
102
105
|
- Visual approval cannot replace a technical or engine gate; technical pass cannot replace required visual review.
|
|
103
106
|
- Optional defects and untested optional capabilities are disclosed without forcing extra rounds.
|
|
104
107
|
- Deliver editable source, persisted scripts, requested exports, evidence summary and measured usage coverage.
|
|
108
|
+
- When the contract marks a result shippable, freeze it - a manifest of SHA-256 hashes of its reproducible exports, ingested inputs and builders, plus a version-control tag where one is used; list files that do not rebuild bit-identical as non-reproducible.
|
|
109
|
+
- A rebuild that changes a frozen hash needs new acceptance; variants build on the frozen result without changing it.
|
|
105
110
|
- Record outcome as accepted, partial or blocked; never claim savings without comparable accepted-task measurements.
|
|
@@ -76,6 +76,12 @@ Apply Stop Conditions immediately during every step; return the blocked work and
|
|
|
76
76
|
and fails unmet thresholds or missing requested coverage. Run with `--python-exit-code 1`.
|
|
77
77
|
7. Inspect affected frame contact sheets at the intended size, including representative contacts,
|
|
78
78
|
transitions and extremes. Missing views cannot prove motion continuity; report sampling limits.
|
|
79
|
+
Review a character animated, never only in rest pose: the contract's locomotion clips and
|
|
80
|
+
extreme-pose clips (for example walk, run, aim, crouch, prone) from front, three-quarter and
|
|
81
|
+
hip angles, plus head, neck, shoulder, armpit, crotch and inner-thigh close-ups. Measure rigid
|
|
82
|
+
layers on a deforming surface (face parts, beards, badges) for drift: the per-frame maximum
|
|
83
|
+
offset of sampled layer points from their anchor points on the surface under them, against
|
|
84
|
+
the contract's tolerance (0 mm for a layer that shares the surface's weights).
|
|
79
85
|
8. For requested exports, isolate intended actions and export. Use `verify_gltf.py` with
|
|
80
86
|
`--expect-clips Walk,Run --exact-clips` (substitute the contract's exact names) and the required
|
|
81
87
|
`--require-mesh`, `--require-skin`, `--require-rig` flags. For a static export the expected clip
|
|
@@ -104,6 +110,25 @@ coverage `not_tested`; never claim delivery acceptance with a missing required c
|
|
|
104
110
|
the repeated frame, so playback does not stutter.
|
|
105
111
|
- Overlap tests between adjacent regions of one mesh report shared edges. Pair regions that
|
|
106
112
|
should never touch.
|
|
113
|
+
- Before narrowing a failing check (fewer regions, excluded pairs), render the flagged frame
|
|
114
|
+
and name the cause: real body contact (legs brushing) justifies the exclusion, shared edges
|
|
115
|
+
are re-paired as above, anything else is a defect. A metric that flags every frame is fixed,
|
|
116
|
+
or dropped with the coordinator's approval and recorded `not_tested`; never kept and ignored.
|
|
117
|
+
- Clips are rest-relative: a rig whose bone rolls differ from the source rig bends limbs the
|
|
118
|
+
wrong way. Keep the character's joint positions but copy the source rig's rolls, or retarget
|
|
119
|
+
the roll difference explicitly.
|
|
120
|
+
- One long triangle spanning two bones (jaw to neck) shears when they rotate apart, and a layer
|
|
121
|
+
on it dips under the skin. Add a ring at the transition; weight tweaks alone do not clear it.
|
|
122
|
+
- Extreme poses press body parts together: an aiming upper arm opens a garment's armhole onto
|
|
123
|
+
the torso, and no weight, offset or binding keeps it closed. Line the covered skin with a thin
|
|
124
|
+
closed sheet of the garment's cloth, skinned with the skin's own weights, and judge it by
|
|
125
|
+
visible skin pixels (rays into the posed scene) in the worst clips, not by triangle crossings.
|
|
126
|
+
A ring or liner is added geometry: rest-pose renders must stay within the appearance tolerance.
|
|
127
|
+
- Stylised proportions limit what clips can do. Measure reach (shoulder joint to palm against the
|
|
128
|
+
distance to each grip point) before promising a two-handed hold from a source clip; short arms
|
|
129
|
+
cannot reach a shouldered aim. If reach falls short, report the hold as blocked with the
|
|
130
|
+
measured gap and options (grip point, prop scale, clip edit); never stretch the character.
|
|
131
|
+
Check a held prop in the static pose too, not only in motion.
|
|
107
132
|
|
|
108
133
|
## Output Contract
|
|
109
134
|
|
|
@@ -24,7 +24,8 @@ criteria and required evidence; do not invent a universal quality target.
|
|
|
24
24
|
|
|
25
25
|
## Invariants
|
|
26
26
|
|
|
27
|
-
- Build through a persisted Python builder run with `blender -b
|
|
27
|
+
- Build through a persisted Python builder run with `blender -b`, with the command-line
|
|
28
|
+
overrides of `../blender-asset` Procedure step 2; no unrecorded manual edits.
|
|
28
29
|
Rebuilding must reproduce the model. If the user edits the `.blend` by hand, that file becomes
|
|
29
30
|
authoritative: never rebuild over it; build into a new file and reconcile.
|
|
30
31
|
- Preserve project units, axes and origins. For a new character with no conventions, record
|
|
@@ -37,6 +38,40 @@ criteria and required evidence; do not invent a universal quality target.
|
|
|
37
38
|
- Keep machine paths (Blender and engine executables) in the project's own instructions, not in
|
|
38
39
|
builders.
|
|
39
40
|
|
|
41
|
+
## Low-Poly Geometry Policy
|
|
42
|
+
|
|
43
|
+
Every triangle must earn its place on the silhouette or on a visible plane, unless the task
|
|
44
|
+
contract sets a different density or shading style.
|
|
45
|
+
|
|
46
|
+
1. Prefer planar forms and visible facets (flat shading; facets carry the form).
|
|
47
|
+
2. Use: 6-8 sided cylinders; 4-8 segment curves only where the silhouette needs them;
|
|
48
|
+
manually shaped polygon cages; flat or mostly flat readable planes.
|
|
49
|
+
3. Avoid, unless the contract requires them: subdivision surfaces; dense bevels; high-segment
|
|
50
|
+
cylinders/spheres; smooth shading as a substitute for form; dense hidden geometry;
|
|
51
|
+
procedural noise standing in for folds or hair.
|
|
52
|
+
4. Before adding geometry, ask: "Does this improve the silhouette or a visible plane?"
|
|
53
|
+
If not, do not add it.
|
|
54
|
+
|
|
55
|
+
## Organic Forms
|
|
56
|
+
|
|
57
|
+
Heads, bodies, hair and similar organic forms are built from a few smooth parametric sections
|
|
58
|
+
(superellipse rings or hull points whose widths, depths and heights are measured parameters),
|
|
59
|
+
not traced from a reference mask row by row: sheet noise, ears and beards in a mask end up in
|
|
60
|
+
the form. Bridge rings ring to ring into one quad mesh, or hull the sections and union the
|
|
61
|
+
small closed parts (nose, ears) with an exact boolean. Run the checks below through Blender:
|
|
62
|
+
`blender -b model.blend --python-exit-code 1 --python <skill>/scripts/mesh_report.py -- <args>`;
|
|
63
|
+
`<skill>` is this installed skill's directory. Gate every iteration with
|
|
64
|
+
`--organic --collection ORGANIC --json mesh.json`: each scoped mesh must have faces, pass
|
|
65
|
+
the health checks, have one connected component and zero BVH self-overlap pairs, ignoring
|
|
66
|
+
faces that share vertices. Put only the required organic meshes in that collection.
|
|
67
|
+
Layers (hair, beard, clothing) are shells offset from the surface below; check named pairs
|
|
68
|
+
with `--strict --pairs Hair:Head --json layers.json` and require zero overlaps. A missing
|
|
69
|
+
surface yields `null` (`not_tested`) in the pair report and fails the gate.
|
|
70
|
+
BVH checks detect surface intersections, not containment without surface contact; inspect
|
|
71
|
+
layer placement in the required views too. Proportions come from landmarks (eyes, nose,
|
|
72
|
+
mouth, joints) with a stated tolerance; an IoU above the contract's expected band suggests the form traces the
|
|
73
|
+
drawing's noise.
|
|
74
|
+
|
|
40
75
|
## Tools
|
|
41
76
|
|
|
42
77
|
Scripts in this skill's `scripts/` folder. Image scripts run with system Python 3 plus Pillow and
|
|
@@ -52,7 +87,7 @@ numpy. Blender's bundled Python has neither, so run them outside Blender.
|
|
|
52
87
|
| `colors.py` | Sampled colour ratios between the reference and the render |
|
|
53
88
|
| `diff_renders.py` | Pixel diff of two render folders, e.g. before and after rigging; exits non-zero on change |
|
|
54
89
|
| `contact_sheet.py` | Tile renders into one image for review |
|
|
55
|
-
| `mesh_report.py` | Blender:
|
|
90
|
+
| `mesh_report.py` | Blender: mesh health and component counts; `--organic` gates health, connectivity and self-overlap; `--strict --pairs A:B,C:D` gates world-space surface overlaps; `--json` persists evidence |
|
|
56
91
|
|
|
57
92
|
`refspec.py` documents the spec format. Drafted view names and cameras are guesses: confirm them
|
|
58
93
|
against the sheet's labels before building.
|
|
@@ -62,17 +97,26 @@ against the sheet's labels before building.
|
|
|
62
97
|
Apply Stop Conditions immediately during every step; return the blocked work and evidence gaps.
|
|
63
98
|
|
|
64
99
|
1. Confirm task criteria, reference priorities and requested deviations. Draft and confirm the
|
|
65
|
-
spec
|
|
66
|
-
|
|
100
|
+
spec before building: the workflow contract's measured spec with a scale anchor, one checklist
|
|
101
|
+
line per visible feature with its reference region, and relations between parts ("rail
|
|
102
|
+
standoff exceeds the cap overhang"). Set `meters_per_px` from the intended dimensions. Measure
|
|
103
|
+
on the original image, through a camera matched to it; redrawn elevations are hints. A palette
|
|
104
|
+
supplied with the reference is authoritative; sampling a lit picture is a fallback. View
|
|
105
|
+
names/cameras are guesses until checked against the sheet labels. Record conflicting views
|
|
106
|
+
instead of averaging silently.
|
|
67
107
|
2. Measure silhouettes and primary forms before adding detail. For a revision, preserve accepted
|
|
68
108
|
geometry and start from the authoritative asset; edit only the scoped region.
|
|
69
|
-
3. Render selected views at the reference scale
|
|
70
|
-
|
|
71
|
-
|
|
109
|
+
3. Render selected views at the reference scale, camera and light (a studio-lit reference is
|
|
110
|
+
judged under a studio rig, not game lighting). Use `compare.py` and `edges.py` to identify
|
|
111
|
+
differences, and report per-view IoU as a diagnostic; turn `edges.py` rows into section
|
|
112
|
+
parameters (Organic Forms). Acceptance follows the spec and feature checklist in these views;
|
|
113
|
+
no fixed IoU score guarantees completion.
|
|
72
114
|
4. Inspect relevant interior details with `zoom.py` (for example a prop latch, face or equipment
|
|
73
115
|
attachment). Inspect colours when colour fidelity is required, respecting requested changes.
|
|
74
116
|
5. Render additional angles only where needed to test required visibility, construction or
|
|
75
|
-
changed dependencies. Check for floating parts, poke-through and unfinished surfaces
|
|
117
|
+
changed dependencies. Check for floating parts, poke-through and unfinished surfaces, with
|
|
118
|
+
close-ups of every junction between parts. Self-check visible identity (face, openings,
|
|
119
|
+
junctions), not only the easy metrics.
|
|
76
120
|
6. Run `mesh_report.py` for the agreed object scope and assess the task's topology/material/size
|
|
77
121
|
constraints. Explain intentional open edges. Export and re-import only when export is a
|
|
78
122
|
deliverable; record unrun required checks as `not_tested`.
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"""Per-object mesh health and cost report for a saved .blend (read-only).
|
|
2
2
|
|
|
3
|
-
blender -b model.blend --python mesh_report.py -- [--collection NAME] [--exclude-prefix SRC_] [--json out.json] [--strict]
|
|
3
|
+
blender -b model.blend --python-exit-code 1 --python mesh_report.py -- [--collection NAME] [--exclude-prefix SRC_] [--json out.json] [--strict] [--organic] [--pairs A:B,C:D]
|
|
4
4
|
|
|
5
5
|
Reports evaluated triangles, vertices, non-manifold edges, zero-area faces, loose vertices,
|
|
6
6
|
empty material slots, origin and dimensions. Non-manifold edges are acceptable on deliberately
|
|
7
7
|
open shells (hems, cards); treat them as findings to explain, not automatic failures.
|
|
8
8
|
--strict exits non-zero when any object has degenerate faces, loose vertices or empty slots.
|
|
9
|
+
--organic also requires faces, one connected component and no self-overlap per scoped object.
|
|
10
|
+
Self-overlap ignores face pairs sharing vertices. --pairs reports world-space surface
|
|
11
|
+
overlaps between named scoped meshes; --strict or --organic rejects non-zero counts.
|
|
12
|
+
Missing surfaces report null (not_tested) and fail required pair checks.
|
|
13
|
+
BVH surface checks do not detect containment without surface intersections.
|
|
9
14
|
"""
|
|
10
15
|
import argparse
|
|
11
16
|
import json
|
|
@@ -13,6 +18,7 @@ import sys
|
|
|
13
18
|
|
|
14
19
|
import bmesh
|
|
15
20
|
import bpy
|
|
21
|
+
from mathutils.bvhtree import BVHTree
|
|
16
22
|
|
|
17
23
|
argv = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else []
|
|
18
24
|
p = argparse.ArgumentParser()
|
|
@@ -20,6 +26,8 @@ p.add_argument("--collection")
|
|
|
20
26
|
p.add_argument("--exclude-prefix", default="")
|
|
21
27
|
p.add_argument("--json")
|
|
22
28
|
p.add_argument("--strict", action="store_true")
|
|
29
|
+
p.add_argument("--organic", action="store_true")
|
|
30
|
+
p.add_argument("--pairs", default="")
|
|
23
31
|
args = p.parse_args(argv)
|
|
24
32
|
|
|
25
33
|
if args.collection:
|
|
@@ -30,20 +38,55 @@ if args.collection:
|
|
|
30
38
|
else:
|
|
31
39
|
objects = [o for o in bpy.context.scene.objects if o.type == "MESH"]
|
|
32
40
|
objects = [o for o in objects if not (args.exclude_prefix and o.name.startswith(args.exclude_prefix))]
|
|
41
|
+
scoped = {o.name: o for o in objects}
|
|
42
|
+
pairs = []
|
|
43
|
+
for value in args.pairs.split(",") if args.pairs else []:
|
|
44
|
+
names = value.split(":")
|
|
45
|
+
if len(names) != 2 or names[0] == names[1] or any(n not in scoped for n in names):
|
|
46
|
+
p.error(f"pair must name two distinct scoped meshes: {value}")
|
|
47
|
+
pairs.append(tuple(names))
|
|
48
|
+
pair_names = {name for pair in pairs for name in pair}
|
|
33
49
|
|
|
34
50
|
dg = bpy.context.evaluated_depsgraph_get()
|
|
35
51
|
rows, problems = [], 0
|
|
52
|
+
trees = {}
|
|
36
53
|
for ob in sorted(objects, key=lambda o: o.name):
|
|
37
54
|
ev = ob.evaluated_get(dg)
|
|
38
55
|
me = ev.to_mesh()
|
|
39
56
|
bm = bmesh.new()
|
|
40
57
|
bm.from_mesh(me)
|
|
58
|
+
degenerate_faces = sum(1 for f in bm.faces if f.calc_area() < 1e-10)
|
|
59
|
+
unseen = set(bm.verts)
|
|
60
|
+
components = 0
|
|
61
|
+
while unseen:
|
|
62
|
+
components += 1
|
|
63
|
+
pending = [unseen.pop()]
|
|
64
|
+
while pending:
|
|
65
|
+
for edge in pending.pop().link_edges:
|
|
66
|
+
for vertex in edge.verts:
|
|
67
|
+
if vertex in unseen:
|
|
68
|
+
unseen.remove(vertex)
|
|
69
|
+
pending.append(vertex)
|
|
70
|
+
self_overlaps = None
|
|
71
|
+
if args.organic or ob.name in pair_names:
|
|
72
|
+
bm.faces.ensure_lookup_table()
|
|
73
|
+
bm.faces.index_update()
|
|
74
|
+
bm.transform(ob.matrix_world)
|
|
75
|
+
tree = BVHTree.FromBMesh(bm) if bm.faces else None
|
|
76
|
+
if ob.name in pair_names:
|
|
77
|
+
trees[ob.name] = tree
|
|
78
|
+
if args.organic and tree is not None:
|
|
79
|
+
face_verts = [set(f.verts) for f in bm.faces]
|
|
80
|
+
self_overlaps = sum(1 for a, b in tree.overlap(tree)
|
|
81
|
+
if a < b and not face_verts[a].intersection(face_verts[b]))
|
|
41
82
|
row = {
|
|
42
83
|
"object": ob.name,
|
|
43
84
|
"tris": sum(len(f.verts) - 2 for f in bm.faces),
|
|
44
85
|
"verts": len(bm.verts),
|
|
86
|
+
"components": components,
|
|
87
|
+
"self_overlap_pairs": self_overlaps,
|
|
45
88
|
"non_manifold_edges": sum(1 for e in bm.edges if not e.is_manifold),
|
|
46
|
-
"degenerate_faces":
|
|
89
|
+
"degenerate_faces": degenerate_faces,
|
|
47
90
|
"loose_verts": sum(1 for v in bm.verts if not v.link_edges),
|
|
48
91
|
"empty_material_slots": sum(1 for s in ob.material_slots if s.material is None) + (0 if ob.material_slots else 1),
|
|
49
92
|
"origin": [round(c, 4) for c in ob.matrix_world.translation],
|
|
@@ -51,17 +94,28 @@ for ob in sorted(objects, key=lambda o: o.name):
|
|
|
51
94
|
}
|
|
52
95
|
bm.free()
|
|
53
96
|
ev.to_mesh_clear()
|
|
54
|
-
problems += bool(row["degenerate_faces"] or row["loose_verts"] or row["empty_material_slots"]
|
|
97
|
+
problems += bool(row["degenerate_faces"] or row["loose_verts"] or row["empty_material_slots"]
|
|
98
|
+
or (args.organic and (not row["tris"] or components != 1 or self_overlaps)))
|
|
55
99
|
rows.append(row)
|
|
56
100
|
|
|
57
|
-
|
|
101
|
+
overlaps = {f"{a} x {b}": len(trees[a].overlap(trees[b]))
|
|
102
|
+
if trees[a] is not None and trees[b] is not None else None for a, b in pairs}
|
|
103
|
+
problems += sum(count is None or count > 0 for count in overlaps.values())
|
|
104
|
+
if not objects and (args.strict or args.organic):
|
|
105
|
+
problems += 1
|
|
106
|
+
|
|
107
|
+
print(f"{'object':24s} {'tris':>6s} {'verts':>6s} {'parts':>5s} {'self':>5s} {'nonman':>6s} {'degen':>5s} {'loose':>5s} {'nomat':>5s} origin")
|
|
58
108
|
for r in rows:
|
|
59
|
-
|
|
109
|
+
overlap_text = "-" if r["self_overlap_pairs"] is None else str(r["self_overlap_pairs"])
|
|
110
|
+
print(f"{r['object'][:24]:24s} {r['tris']:6d} {r['verts']:6d} {r['components']:5d} {overlap_text:>5s} {r['non_manifold_edges']:6d} {r['degenerate_faces']:5d} "
|
|
60
111
|
f"{r['loose_verts']:5d} {r['empty_material_slots']:5d} {tuple(r['origin'])}")
|
|
112
|
+
for pair, count in overlaps.items():
|
|
113
|
+
print(f"OVERLAP {pair}: {count if count is not None else 'not_tested'} face pair(s)")
|
|
61
114
|
total = sum(r["tris"] for r in rows)
|
|
62
|
-
print(f"TOTAL {len(rows)} objects, {total} triangles; {problems}
|
|
115
|
+
print(f"TOTAL {len(rows)} objects, {total} triangles; {problems} failing check(s)")
|
|
63
116
|
if args.json:
|
|
64
117
|
with open(args.json, "w") as f:
|
|
65
|
-
json.dump({"objects": rows, "total_tris": total
|
|
66
|
-
|
|
118
|
+
json.dump({"objects": rows, "total_tris": total, "organic_checked": args.organic,
|
|
119
|
+
"pair_overlaps": overlaps}, f, indent=2)
|
|
120
|
+
if (args.strict or args.organic) and problems:
|
|
67
121
|
sys.exit(1)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: astro-preview
|
|
3
|
+
description: Open and verify local project assets in Astro Preview when a user needs browser previews of images, sound, Blender/3D models, animations, local HTML/Vite or comparison analysis. Use the existing viewer rather than creating a project-specific preview app.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
Prepare a local Astro Preview workspace for the requested assets, open the relevant viewer, and report the observed result. Building or changing Astro Preview itself is outside this workflow.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- Astro Preview is a local TypeScript server and browser application. The consumer supplies its checkout path as `ASTRO_PREVIEW_DIR` or in project context; do not assume a personal filesystem path or a published npm package.
|
|
13
|
+
- Use the checkout's `README.md` as the tool documentation. Resolve a clickable local link to that file when reporting setup. Install [Node.js](https://nodejs.org/en/download) matching the checkout's `package.json` engine, then run `npm --prefix "$ASTRO_PREVIEW_DIR" install` once if dependencies are absent.
|
|
14
|
+
- Verify the checkout with `node "$ASTRO_PREVIEW_DIR/bin/viewer.mjs" --help` and confirm it identifies Astro Preview. If the checkout cannot be located, request its path and halt setup; do not substitute another viewer silently.
|
|
15
|
+
- For Vite profiles, the selected project needs its own installed [Vite](https://vite.dev/guide/) and dependencies. Follow that project's package manager and dependency versions; if installation is needed, use its documented install command. Verify with the project-local `node node_modules/vite/bin/vite.js --version` from the Vite directory (or the package manager's local binary equivalent). Astro Preview never installs packages or runs arbitrary shell commands.
|
|
16
|
+
- Native GLB/glTF previews need no Blender. `.blend`, OBJ and FBX conversion require [Blender](https://www.blender.org/download/) on macOS, at the default application path or via `VIEWER_BLENDER`. Verify the configured executable with `--version` before conversion. Other formats can still be previewed when Blender is absent.
|
|
17
|
+
|
|
18
|
+
## Procedure
|
|
19
|
+
|
|
20
|
+
Apply the boundaries below throughout these steps; halt only the affected operation when a prerequisite or authorization is missing.
|
|
21
|
+
|
|
22
|
+
1. Locate the actual output files and select the smallest useful project roots. Prefer generated asset folders over registering the entire repository. Keep the project name stable and use absolute paths.
|
|
23
|
+
2. Reuse a running Astro Preview instance if its page loads and it uses the intended catalog. Otherwise run `npm --prefix "$ASTRO_PREVIEW_DIR" run dev` in a managed terminal, then open `http://127.0.0.1:4174`. For an existing build use `npm --prefix "$ASTRO_PREVIEW_DIR" start`. Respect configured `VIEWER_PORT` and use the exact loopback address. Record the process handle and stop only a process this task started when it is no longer needed.
|
|
24
|
+
3. Register the named project idempotently:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
node "$ASTRO_PREVIEW_DIR/bin/viewer.mjs" project add "Project name" --root /absolute/outputs --root /absolute/references --json
|
|
28
|
+
node "$ASTRO_PREVIEW_DIR/bin/viewer.mjs" project show "Project name" --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
CLI and server must share `VIEWER_DATA_DIR` when it is configured. Existing roots remain; do not remove them merely to match the example. For reading operations, use a listed project ID if a name is ambiguous. If named-root registration encounters duplicate names, halt that operation and request a unique name or explicit selection through the viewer; IDs are not accepted in place of the name by `project add --root`. Listing or scanning is available through `project list`, `asset list` and `project scan` with `--json`. After CLI registration or other catalog changes, reload or navigate the viewer page before selecting the project; an already open empty catalog does not subscribe to project updates.
|
|
32
|
+
4. Generate a stable viewer link when useful:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
node "$ASTRO_PREVIEW_DIR/bin/viewer.mjs" open "project-id" "asset-id-a" "asset-id-b" --layout 2 --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Open the returned URL with the browser tool. Omit assets/layout for a project link. `--json` emits the URL without launching a browser; it does not start the server. Assets accept IDs or unambiguous root-relative paths. Use Copy preview link for the current ordered layout, including comparisons across projects. Links require the same local catalog; they capture project/assets/layout, not full camera, assembly or playback state. If a stale ID/path fails, inspect the current catalog and report the missing asset rather than inventing an ID.
|
|
39
|
+
5. Open the project's explorer or gallery and choose the relevant files. Use image zoom/pan for screenshots, waveform/playback/seek/loop for sound, and model camera/wireframe/parts/animation controls for 3D. Use 2–6 comparison slots for models, images or sound, including assets from different projects; linked cameras apply to 3D. Compatible animation libraries and assembly controls preview rigs/parts without modifying their sources. For requested motion comparisons where playable clips are available, select a playable clip in each model slot, then enable Linked animations for shared time/play/pause/seek/speed/loop; each slot keeps its local clip selection. Use Front/Rear/Left/Right/Top, Skeleton and Bounds for inspection. Verify that playback advances in every relevant slot; incompatible clips remain unavailable.
|
|
40
|
+
6. For exactly two sound assets use Audio A/B and verify switching at the current position. RMS matching attenuates the louder PCM recording; silent inputs cannot be matched. For exactly two same-size images use Pixel difference: first frame/page, up to 8 MP, visible RGBA comparison with alpha-weighted RGB. Report changed-pixel count/percentage and the heatmap.
|
|
41
|
+
7. For requested HTML/Vite web apps use Project previews: reuse the intended profile or add one with an authorized root, HTML entry file or Vite directory, then Start and Open preview. HTML uses a separate capability-protected local origin. Stable viewer links never start profiles. Stop only a runtime this task started when it is no longer needed. If Vite is absent, halt that launch and continue supported previews.
|
|
42
|
+
8. After generating or changing assets, wait for live refresh and verify the changed viewer. Use Refresh for exports that preserve size/mtime. Verify the real browser result with the available browser tool: rendered image/model or HTML/Vite page, loaded clip, or audio playback state and duration. A successful API response or screenshot alone does not prove sound is audible or animation plays; report what was actually checked. Preserve useful workspace tabs and view state for the user.
|
|
43
|
+
|
|
44
|
+
## Boundaries
|
|
45
|
+
|
|
46
|
+
- Previewing and registering folders authorizes local catalog/cache changes. Asset viewers keep source assets read-only. Reviews decisions, comments, archive and deletion write review state/media; perform those only when explicitly requested.
|
|
47
|
+
- Starting Vite executes the project's config/plugins on the host: they can write caches/files or use networking. Launch only the user's intended trusted project; this is not sandboxed Blender or Reviews HTML. Vite’s resource port uses its own dev-server access controls rather than Astro Preview’s API/capability session. The viewer controls its own runtime process, not arbitrary existing project processes.
|
|
48
|
+
- Keep the server on loopback. Do not upload assets, publish the app or replace a user's running process as part of opening a preview.
|
|
49
|
+
- GLB/glTF preserve rigs, morphs and clips; their external dependencies must remain inside configured roots. Add an intended sibling asset root when authorized; do not weaken path validation or fetch remote model dependencies.
|
|
50
|
+
- Sound codecs depend on the browser. GIF/multipage images display the first frame/page. Video and unsupported formats have no interactive viewer; compressed glTF needing Draco/meshopt/Basis decoders is unsupported. Report a relevant limitation and continue with supported assets; Astro Preview's cache-only Blender conversion is part of previewing; exporting converted assets outside its cache requires a separate user request.
|
|
51
|
+
- Data uses Astro Preview's own catalog, separate from Astro Pilot. Do not claim imported projects or reduced memory usage unless verified.
|
|
52
|
+
|
|
53
|
+
## Output Contract
|
|
54
|
+
|
|
55
|
+
Emit `Skill: astro-preview - output below`, then state:
|
|
56
|
+
|
|
57
|
+
- Viewer URL and whether the server was reused or started.
|
|
58
|
+
- Registered project name/ID and roots.
|
|
59
|
+
- Assets/view mode, optional profile/runtime URL, and observed rendering, playback or comparison metrics.
|
|
60
|
+
- Relevant limitations, missing prerequisites or unverified playback/rendering.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kimodo-motion
|
|
3
|
+
description: Generate humanoid animation clips locally with NVIDIA Kimodo (native kimodo.cpp build) from a text prompt, optionally starting and ending in given poses (key-pose constraints taken from a rig's existing clips), check them numerically and visually on Kimodo's own skeleton, and retarget them onto a Mixamo-named Blender rig. Use when a clip nobody provides is needed (a draw, a gesture, a transition between two existing poses); not for editing captured clips or for finger animation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kimodo Motion
|
|
7
|
+
|
|
8
|
+
## Scope
|
|
9
|
+
|
|
10
|
+
- Text-to-motion takes on Kimodo's SOMA30 skeleton, several seeds per prompt, with optional start/end key poses
|
|
11
|
+
taken from a rig's own clips, so a take starts and ends where the neighbouring clips do (no cut/settle/blend).
|
|
12
|
+
- Numeric gates (key-pose error), frame sheets for a reviewer, a bake onto a Mixamo-named rig with a direction check.
|
|
13
|
+
- Out of scope: fingers and props (Kimodo has neither), mid-clip keys (the patch reads `end-effector` keys on any
|
|
14
|
+
frame; `generate` keys only the ends), root2d paths (not supported), engine integration, loop clips.
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
- [kimodo.cpp](https://github.com/localai-org/kimodo.cpp) at `ed8a931` (Apache-2.0) with
|
|
19
|
+
`<skill>/patches/kimodo-cpp-keyposes.patch` (`git apply`). It adds `kmd-generate ... --constraints FILE`, which reads
|
|
20
|
+
upstream Kimodo's constraints JSON (`fullbody`, `end-effector`, `left/right-hand/foot`). Build (C++23, CMake 3.25+;
|
|
21
|
+
verified CPU-only on macOS, Vulkan per its README on Linux):
|
|
22
|
+
`cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DKIMODO_ENABLE_VULKAN=OFF -DKIMODO_BUILD_TESTS=OFF && cmake --build
|
|
23
|
+
build --target kmd-generate`. Verify: `build/kmd-generate` prints a usage line with `--constraints`.
|
|
24
|
+
- Models: `scripts/download_gguf_weights.sh --output "$PWD" --model soma-rp-v1.1` (needs the `hf` CLI). Keep the
|
|
25
|
+
NVIDIA Open Model License and Meta Llama 3 notices. Verify: `ls "$KIMODO_ROOT"/models/*.gguf` shows the
|
|
26
|
+
motion and text files the defaults (or `KIMODO_MOTION_GGUF` / `KIMODO_TEXT_GGUF`) name.
|
|
27
|
+
- Environment: `KIMODO_ROOT` (that checkout); `KIMODO_GENERATE`, `KIMODO_MOTION_GGUF`, `KIMODO_TEXT_GGUF` when they
|
|
28
|
+
differ from the defaults in `<skill>/scripts/kimodo_motion.py` (relative to `KIMODO_ROOT` or absolute);
|
|
29
|
+
optional `KIMODO_EXPORT_GLB` (its `scripts/export_glb.py`: a skeleton GLB per take).
|
|
30
|
+
- [Python 3.10+](https://www.python.org/downloads/), standard library; sheets need Pillow
|
|
31
|
+
(`python3 -m pip install Pillow`, verify `python3 -c "import PIL"`).
|
|
32
|
+
- Key poses and retargeting: [Blender](https://www.blender.org/download/) 4.x/5.x, `BLENDER` = its executable.
|
|
33
|
+
Verify: `"$BLENDER" -b --factory-startup --version`, then `BLENDER=... python3 -m unittest discover -s
|
|
34
|
+
<skill>/tests -v` (the round trip skips without `BLENDER`).
|
|
35
|
+
|
|
36
|
+
## Inputs
|
|
37
|
+
|
|
38
|
+
- Prompt, length `F` in frames (30 fps), seeds (3-4), output dir; for key poses: the rig `.blend` (one armature,
|
|
39
|
+
Mixamo names with prefix `mixamorig:` unless `--prefix` says otherwise, facing -Y) and the clips whose poses start
|
|
40
|
+
and end the take (action-only `.blend` files, with a frame).
|
|
41
|
+
|
|
42
|
+
## Procedure
|
|
43
|
+
|
|
44
|
+
`<skill>` is this skill's installed folder; commands run from the consumer project.
|
|
45
|
+
|
|
46
|
+
1. Spec before generating: the prompt (one short sentence of what the body does; wording about the end state made
|
|
47
|
+
takes start in it), `F`, seeds, start/end poses, acceptance (the gates below, the content a reviewer must see).
|
|
48
|
+
2. Key poses: `python3 <skill>/scripts/kimodo_motion.py keypose --rig RIG.blend start=IDLE.blend end=HOLD.blend
|
|
49
|
+
--out POSES.json [--prefix P]`. It inverts the retarget's bone map and rest alignment and fails above 3 deg on
|
|
50
|
+
any mapped bone's direction. It moves the root so the lower toe stands at Kimodo's toe height (`--toe-y`,
|
|
51
|
+
0.015 m). Regenerate the poses whenever a source clip is re-baked.
|
|
52
|
+
3. Generate: `python3 <skill>/scripts/kimodo_motion.py generate --prompt "..." --frames F --seeds 1,2,3,4 --start
|
|
53
|
+
POSES.json:start --end POSES.json:end --out DIR --name k1`. Defaults:
|
|
54
|
+
- each key is held 3 frames (`--hold`): a single key let the take leave a still pose at full speed;
|
|
55
|
+
- hands and feet keep their turn (`end-effector`; `--no-effectors` turns it off): positions alone left the
|
|
56
|
+
hands 24-39 deg off;
|
|
57
|
+
- the model's residual on its keys (about 19 mm mean, up to about 5 cm at finger ends) is eased out over 0.3 s
|
|
58
|
+
(`--post`) as an offset, not a blend toward the static key (that moved joints 14-20 cm mid-motion). The
|
|
59
|
+
model's own take stays in `raw/`.
|
|
60
|
+
4. Numeric gates, per take, in `keypose_error.json`:
|
|
61
|
+
- the model's own take: mean joint error at most 30 mm on every key frame (`check DIR/k1_s1 --model` re-runs it);
|
|
62
|
+
- after post: at most 5 mm on any joint (`check DIR/k1_s1` re-runs it);
|
|
63
|
+
- known-bad: the same prompt and `F` without `--start/--end` (`--name k1n --seeds 1`) must FAIL
|
|
64
|
+
`check DIR/k1n_s1 --model --constraints DIR/k1_s1/constraints.json` (measured: 79-289 mm). If it passes, the
|
|
65
|
+
gate is broken: stop.
|
|
66
|
+
5. Sheets for a fresh-context reviewer or the user, never the agent that generated the takes:
|
|
67
|
+
- phases: `sheet DIR/k1_s* DIR/k1_s1/raw DIR/k1n_s1 --keys DIR/k1_s1/constraints.json --out phases.png`;
|
|
68
|
+
- every frame of both junctions: `--span 0:10` and `--span F-11:F-1` (75 frames: `64:74`).
|
|
69
|
+
Ask for: start and end on the grey keys, pops where a hold releases, and whether the motion reads as the prompt.
|
|
70
|
+
Drop takes that do something else (a seed that does the end action first keeps doing it). Take at most two
|
|
71
|
+
rounds of new seeds or prompts; after that, ask the user. Mark the chosen take in `provenance.json` (`used_as`).
|
|
72
|
+
6. Retarget the chosen take: `"$BLENDER" -b RIG.blend --factory-startup --python-exit-code 1 --python
|
|
73
|
+
<skill>/scripts/kimodo_retarget.py -- retarget --clip NAME=DIR/k1_s3 --out CLIPS.glb --report report.json
|
|
74
|
+
[--prefix P]`. Every mapped bone's world turn is copied and only the hips move. Above 3 deg on any bone's
|
|
75
|
+
direction it writes the report and no GLB. Fingers, props and contact fixes belong to the consumer project.
|
|
76
|
+
`stats` gives the right hand's closest approach to the hip, for draw or reach clips.
|
|
77
|
+
|
|
78
|
+
## Boundaries
|
|
79
|
+
|
|
80
|
+
- Write takes into new dirs (`generate` refuses existing ones). Keep `provenance.json` (seed, command, keys) for
|
|
81
|
+
AI-content disclosure. Models, licences and machine paths stay outside the skill.
|
|
82
|
+
- Where a hold releases, the residual offset can add a one-frame step of about 2 cm. Measure the largest per-frame
|
|
83
|
+
joint step in the junction strips against `raw/` and report it. Do not hide it.
|
|
84
|
+
|
|
85
|
+
## Stop Conditions
|
|
86
|
+
|
|
87
|
+
- `kmd-generate` lacks `--constraints` (unpatched build) or a model file is missing: stop and report.
|
|
88
|
+
- `keypose` or `retarget` fails its direction gate, or reports missing bones: the rig's names, prefix or rest differ
|
|
89
|
+
from the map. Stop; do not loosen the 3 deg tolerance.
|
|
90
|
+
- The known-bad passes the model gate, every take fails it, or all takes are rejected after two rounds: report the
|
|
91
|
+
numbers and sheets to the user.
|
|
92
|
+
|
|
93
|
+
## Output Contract
|
|
94
|
+
|
|
95
|
+
Skill: kimodo-motion - output below
|
|
96
|
+
|
|
97
|
+
| Take | Model mean / max (mm) | After post max (mm) | Post move (mm) | Hold-release step vs raw (mm/frame) | Content verdict | Use |
|
|
98
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
99
|
+
|
|
100
|
+
Followed by: the poses file, the take dirs, the known-bad result, the sheet paths, the reviewer's verdict, and the
|
|
101
|
+
retarget report (worst direction per clip) when baked.
|