agent-manifesto-kit 1.5.0 → 1.6.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/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/package.json +1 -1
|
@@ -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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-manifesto-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "CLI to discover and adopt Agent Manifesto Kit capabilities (skills, agents, pipelines) into your project for Claude, Codex, or AI-agnostic targets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|