@punal_manalan/blender-project-harness 0.0.0-stage → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.kilo/agent/blender-grader.md +197 -0
  2. package/.kilo/agent/blender-worker.md +127 -0
  3. package/.kilo/blender-project-harness/config.example.json +71 -0
  4. package/.kilo/blender-project-harness/tools/harness/EXPECTED_FLOW.md +656 -0
  5. package/.kilo/blender-project-harness/tools/harness/blender-operations.mjs +882 -0
  6. package/.kilo/blender-project-harness/tools/harness/blender-operations.test.mjs +550 -0
  7. package/.kilo/blender-project-harness/tools/harness/blender.mjs +301 -0
  8. package/.kilo/blender-project-harness/tools/harness/blender.test.mjs +87 -0
  9. package/.kilo/blender-project-harness/tools/harness/cli.mjs +127 -0
  10. package/.kilo/blender-project-harness/tools/harness/documents.mjs +201 -0
  11. package/.kilo/blender-project-harness/tools/harness/download.mjs +94 -0
  12. package/.kilo/blender-project-harness/tools/harness/download.test.mjs +63 -0
  13. package/.kilo/blender-project-harness/tools/harness/engine.mjs +1866 -0
  14. package/.kilo/blender-project-harness/tools/harness/engine.test.mjs +2219 -0
  15. package/.kilo/blender-project-harness/tools/harness/intake.mjs +571 -0
  16. package/.kilo/blender-project-harness/tools/harness/intake.test.mjs +181 -0
  17. package/.kilo/blender-project-harness/tools/harness/package-lock.json +1227 -0
  18. package/.kilo/blender-project-harness/tools/harness/package.json +15 -0
  19. package/.kilo/blender-project-harness/tools/harness/plugin.mjs +550 -0
  20. package/.kilo/blender-project-harness/tools/harness/plugin.test.mjs +526 -0
  21. package/.kilo/blender-project-harness/tools/harness/proxy.mjs +222 -0
  22. package/.kilo/blender-project-harness/tools/harness/proxy.test.mjs +217 -0
  23. package/.kilo/blender-project-harness/tools/harness/scaffold.mjs +83 -0
  24. package/.kilo/blender-project-harness/tools/harness/scaffold.test.mjs +74 -0
  25. package/.kilo/blender-project-harness/tools/harness/server.mjs +24 -0
  26. package/.kilo/blender-project-harness/tools/harness/shell-policy.mjs +196 -0
  27. package/.kilo/blender-project-harness/tools/harness/shell-policy.test.mjs +68 -0
  28. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/ASSETS.md +29 -0
  29. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/DECISIONS.md +8 -0
  30. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/Goals/01-project-brief.md +71 -0
  31. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/Goals/README.md +17 -0
  32. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/INTAKE.md +8 -0
  33. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/README.md +57 -0
  34. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/REQUIREMENTS.md +64 -0
  35. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/REVIEW.md +29 -0
  36. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/References/README.md +18 -0
  37. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/Reviews/README.md +48 -0
  38. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/TASKSTRACKER.md +10 -0
  39. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/Tasks/README.md +4 -0
  40. package/.kilo/blender-project-harness/tools/harness/templates/project/Documents/WORKFLOW.md +36 -0
  41. package/.kilo/blender-project-harness/tools/harness/templates/project/README.md +130 -0
  42. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/README.md +31 -0
  43. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/audio/.gitkeep +0 -0
  44. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/external/README.md +43 -0
  45. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/external/SOURCE_TEMPLATE.md +18 -0
  46. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/hdri/.gitkeep +0 -0
  47. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/models/.gitkeep +0 -0
  48. package/.kilo/blender-project-harness/tools/harness/templates/project/assets/textures/.gitkeep +0 -0
  49. package/.kilo/blender-project-harness/tools/harness/templates/project/backups/.gitkeep +0 -0
  50. package/.kilo/blender-project-harness/tools/harness/templates/project/backups/README.md +5 -0
  51. package/.kilo/blender-project-harness/tools/harness/templates/project/exports/.gitkeep +0 -0
  52. package/.kilo/blender-project-harness/tools/harness/templates/project/exports/README.md +11 -0
  53. package/.kilo/blender-project-harness/tools/harness/templates/project/renders/README.md +7 -0
  54. package/.kilo/blender-project-harness/tools/harness/templates/project/renders/final/.gitkeep +0 -0
  55. package/.kilo/blender-project-harness/tools/harness/templates/project/renders/wip/.gitkeep +0 -0
  56. package/.kilo/blender-project-harness/tools/harness/templates/project/scenes/README.md +10 -0
  57. package/.kilo/blender-project-harness/tools/harness/templates/project/scripts/README.md +16 -0
  58. package/.kilo/blender-project-harness/tools/harness/test-fixture.mjs +91 -0
  59. package/.kilo/blender-project-harness/tools/harness/workspace.mjs +30 -0
  60. package/.kilo/blender-project-harness/tools/harness/workspace.test.mjs +31 -0
  61. package/.kilo/blender-project-harness/tools/test_blender_tools.py +427 -0
  62. package/.kilo/plugins/blender-workflow.js +3 -0
  63. package/.kilo/skills/blender-assets/SKILL.md +99 -0
  64. package/.kilo/skills/blender-mcp/SKILL.md +147 -0
  65. package/.kilo/skills/blender-mcp/references/README.md +22 -0
  66. package/.kilo/skills/blender-mcp/references/animation.md +83 -0
  67. package/.kilo/skills/blender-mcp/references/bpy.md +97 -0
  68. package/.kilo/skills/blender-mcp/references/level-design.md +53 -0
  69. package/.kilo/skills/blender-mcp/references/materials.md +80 -0
  70. package/.kilo/skills/blender-mcp/references/retopology.md +104 -0
  71. package/.kilo/skills/blender-mcp/references/rigging.md +123 -0
  72. package/.kilo/skills/blender-mcp/references/scene.md +72 -0
  73. package/.kilo/skills/blender-project-goal/SKILL.md +115 -0
  74. package/.kilo/skills/blender-project-grading/SKILL.md +184 -0
  75. package/.kilo/skills/blender-project-readme/SKILL.md +46 -0
  76. package/.kilo/skills/blender-project-requirements/SKILL.md +84 -0
  77. package/.kilo/skills/blender-project-scaffold/SKILL.md +59 -0
  78. package/.kilo/skills/blender-project-workflow/SKILL.md +96 -0
  79. package/.kilo/skills/blender-subagents/SKILL.md +204 -0
  80. package/.kilo/skills/blender-workflow-harness/SKILL.md +187 -0
  81. package/AGENTS.md +234 -0
  82. package/Blender/README.md +30 -0
  83. package/CHANGELOG.md +22 -0
  84. package/LICENSE +21 -0
  85. package/README.md +368 -2
  86. package/THIRD_PARTY_NOTICES.md +51 -0
  87. package/bin/blender-project-harness.mjs +4 -0
  88. package/installer/cli.mjs +116 -0
  89. package/installer/install.mjs +325 -0
  90. package/installer/install.test.mjs +134 -0
  91. package/package.json +58 -6
@@ -0,0 +1,123 @@
1
+ ---
2
+ title: Rigging
3
+ summary: Armatures from Python, Rigify for characters, skinning with automatic weights and how to fix it, and verifying deformation.
4
+ ---
5
+
6
+ # Rigging
7
+
8
+ ## Before rigging
9
+
10
+ - Inspect existing transforms, animation, constraints, and rig conventions before changing them.
11
+ Applied scale and aligned mesh/rig transforms often help, but world origin, ground placement, and
12
+ facing -Y are conventions, not universal automatic-weight requirements. Do not move or apply
13
+ transforms to an existing rig without assessing the impact.
14
+ - Merge duplicate vertices (`bmesh.ops.remove_doubles`) and remove loose parts. Generated meshes
15
+ are often many disconnected islands, which makes automatic weights fail.
16
+ - Characters rig best in A-pose or T-pose with a bit of bend at elbows and knees.
17
+
18
+ ## Humanoids: Rigify
19
+
20
+ All operators below MUST follow `bpy.md`: verify required mode, exact targets, and `poll()`;
21
+ use a viewport override only when required. Any actual selection/active-object changes MUST be
22
+ saved and restored in `finally`. Edit bones MUST be accessed only in Edit Mode.
23
+
24
+ ```python
25
+ import addon_utils
26
+ addon_utils.enable("rigify", default_set=False) # when enabling it is authorized
27
+ bpy.ops.object.armature_human_metarig_add() # needs a 3D viewport override
28
+ metarig = bpy.context.active_object
29
+ ```
30
+
31
+ 1. Scale and move the metarig to fit the mesh (edit bones: `metarig.data.edit_bones["spine"].head`),
32
+ aligning joints with the mesh's joints. Check against the mesh with `look(mode="angles", shading="xray", views=["front","right"])`.
33
+ 2. Generate: with the metarig active, `bpy.ops.pose.rigify_generate()`. Inspect the actual generated
34
+ rig instead of assuming a fixed name. Preserve the metarig for regeneration.
35
+ 3. Skin to the generated rig, not the metarig.
36
+
37
+ ## Simple or non-humanoid rigs
38
+
39
+ Build bones directly in Edit Mode, starting from Object Mode. This example temporarily changes
40
+ actual selection, so restoration is mandatory even if bone creation fails:
41
+
42
+ ```python
43
+ if bpy.context.mode != "OBJECT":
44
+ raise RuntimeError("Rig creation requires Object Mode")
45
+ view_layer = bpy.context.view_layer
46
+ saved_selection = [o for o in view_layer.objects if o.select_get()]
47
+ saved_active = view_layer.objects.active
48
+ arm_data = bpy.data.armatures.new("Rig"); rig = bpy.data.objects.new("Rig", arm_data)
49
+ bpy.context.scene.collection.objects.link(rig)
50
+ try:
51
+ for selected in saved_selection:
52
+ selected.select_set(False)
53
+ rig.select_set(True)
54
+ view_layer.objects.active = rig
55
+ if not bpy.ops.object.mode_set.poll():
56
+ raise RuntimeError("Cannot enter Edit Mode for the new rig")
57
+ try:
58
+ bpy.ops.object.mode_set(mode="EDIT")
59
+ root = arm_data.edit_bones.new("root"); root.head = (0, 0, 0); root.tail = (0, 0.3, 0)
60
+ b = arm_data.edit_bones.new("arm"); b.head = (0, 0, 1); b.tail = (0, 0, 2); b.parent = root
61
+ finally:
62
+ if rig.mode != "OBJECT":
63
+ if not bpy.ops.object.mode_set.poll():
64
+ raise RuntimeError("Cannot leave Edit Mode; stop and report the current state")
65
+ bpy.ops.object.mode_set(mode="OBJECT")
66
+ finally:
67
+ rig.select_set(False)
68
+ for selected in saved_selection:
69
+ selected.select_set(True)
70
+ view_layer.objects.active = saved_active
71
+ ```
72
+
73
+ Mechanical things (doors, wheels, robots) often suit rigid bone parenting. Set the parent, bone, and
74
+ parent inverse while preserving the intended world transform; direct parent assignment can move parts.
75
+
76
+ ## Skinning
77
+
78
+ For automatic weights, MUST isolate the intended mesh and armature, with the armature active.
79
+ This override leaves actual user selection unchanged; selecting the mesh alone would retain
80
+ unrelated selected objects and can reparent them:
81
+
82
+ ```python
83
+ if bpy.context.mode != "OBJECT" or mesh.type != "MESH" or rig.type != "ARMATURE":
84
+ raise RuntimeError("Automatic weights require Object Mode, a mesh, and an armature")
85
+ targets = [mesh, rig]
86
+ if any(o not in bpy.context.editable_objects or o not in bpy.context.selectable_objects
87
+ for o in targets):
88
+ raise RuntimeError("Skinning targets must be editable and selectable")
89
+ with bpy.context.temp_override(object=rig, active_object=rig,
90
+ selected_objects=targets, selected_editable_objects=targets):
91
+ if not bpy.ops.object.parent_set.poll():
92
+ raise RuntimeError("parent_set is unavailable in this context")
93
+ bpy.ops.object.parent_set(type="ARMATURE_AUTO")
94
+ ```
95
+
96
+ If Blender reports "Bone Heat Weighting: failed to find solution for one or more bones":
97
+
98
+ - Merge by distance and remove interior faces, then retry.
99
+ - Or skin a voxel-remeshed copy, then transfer weights to the original with a Data Transfer
100
+ modifier (vertex groups, nearest face interpolated) and apply it.
101
+ - If scale contributes to failure, test larger scale on a copy while preserving transforms and rig
102
+ relationships; do not rescale the original rig as a blind repair.
103
+
104
+ ## Verify
105
+
106
+ `get_scene_info(fields=["weights"], query="Body")` reports vertices no deform bone moves and deform
107
+ bones with no vertex group. Investigate unweighted vertices and unused groups against the intended
108
+ deformation; intentionally unused deform bones are possible. Save existing pose transforms before
109
+ testing a rig control whose actual name was inspected:
110
+
111
+ ```python
112
+ pb = rig.pose.bones["upper_arm_fk.L"]; pb.rotation_mode = "XYZ"; pb.rotation_euler.x = 1.2
113
+ ```
114
+
115
+ `look(mode="angles", target=["Body"])` and check elbows, shoulders, knees and hips for collapsing
116
+ or stretching. Restore the saved pose transforms afterward; do not clear the user's original pose.
117
+
118
+ ## Sources
119
+
120
+ - https://docs.blender.org/manual/en/5.0/addons/rigging/rigify/introduction.html
121
+ - https://docs.blender.org/manual/en/5.0/addons/rigging/rigify/basics.html
122
+ - https://docs.blender.org/api/current/info_gotchas_armatures_and_bones.html
123
+ - https://raw.githubusercontent.com/blender/blender/v5.0.0/source/blender/editors/object/object_relations.cc
@@ -0,0 +1,72 @@
1
+ ---
2
+ title: Scene design
3
+ summary: Building a believable scene - scale, grounding, composition, choosing between generated and library assets, lighting and camera.
4
+ ---
5
+
6
+ # Scene design
7
+
8
+ ## Workflow
9
+
10
+ 1. `get_scene_info` — know what's there and the scene's scale before adding anything.
11
+ 2. Block out with primitives at real-world size: the layout, the big shapes, the camera.
12
+ `look(mode="camera")` or `look(mode="angles")` to check proportions before spending on assets.
13
+ Use `text` for labels and `modifier` for bevel, subdivision, solidify, mirror, and array detail.
14
+ 3. Replace blockout pieces with real assets, biggest and most visible first.
15
+ 4. Light, then set materials, then dress with small props.
16
+ 5. Judge the image, not your intentions: is anything
17
+ floating, clipping, the wrong size, or hidden from camera?
18
+
19
+ ## Getting assets
20
+
21
+ MUST read [`blender-assets`](../../blender-assets/SKILL.md) before external asset work and follow
22
+ the asset-type branches in `../SKILL.md`. Model size/support checks below do not apply to HDRI
23
+ worlds or texture materials; those require lighting/material inspection instead.
24
+
25
+ - **Import locally** with the harness `import_asset` operation after the file is registered under
26
+ `assets/external/<source>/<asset>/`; use `link_library` for `.blend` libraries. Use
27
+ `blender_workflow {action:"intake"}` to copy user files and create the register and sidecars. The
28
+ raw `blender_import_asset` and `blender_generate_3d` tools stay blocked.
29
+ - **Poly Haven** (`search_assets(source="polyhaven")`): HDRIs, PBR textures for large surfaces
30
+ (floors, walls, terrain), and generic realistic props. CC0.
31
+ - **Sketchfab**: specific real-world things (a named car model, a landmark), and realistic props.
32
+ Check the licence and face count in results.
33
+ - **Poly Pizza**: stylised low-poly props, fast and light. Credit CC-BY creators.
34
+ - **Script it** only through reviewed harness operations; arbitrary project Python is blocked.
35
+
36
+ Match the confirmed style. Mixed low-poly and photoreal assets can be intentional; do not impose a
37
+ style restriction that the user has not confirmed.
38
+
39
+ ## After every model import
40
+
41
+ Imported models arrive at arbitrary scale, rotation and origin. Inspect the imported parent or child
42
+ bounds with `get_scene_info`; use those facts:
43
+
44
+ - Scale to real size from the bounding box, not by eye.
45
+ - Place it on its intended support surface. For an unparented object on world Z=0,
46
+ `obj.location.z -= min_z` uses the world bounding box minimum. Account for parent transforms.
47
+ - Rotate it to face the right way; generators usually face -Y or +Y. Check with
48
+ `look(mode="angles", target=[name])`.
49
+ - Check it doesn't intersect its neighbours.
50
+
51
+ ## Composition
52
+
53
+ - Decide the camera early and compose for it; set `scene.camera`, focal length 35–50 mm for
54
+ natural views, 85 mm+ for product shots, 24 mm or wider for interiors.
55
+ - Foreground, midground, background. Leave negative space. Rule of thirds for the subject.
56
+ - Vary scale and rotation of repeated props slightly; perfect grids read as fake.
57
+ - Ground contact sells realism: props sit on surfaces, small things cluster against larger ones.
58
+
59
+ ## Lighting
60
+
61
+ - Start with an HDRI from Poly Haven for ambient light and reflections; set its strength
62
+ (0.5–1.5), then add a key light (sun or area) for shape and shadows.
63
+ - Three-point for products: key, fill at lower power, rim behind.
64
+ - Interiors: area lights in windows (portals in Cycles) plus practicals (lamps with emission).
65
+ - Check with `look(mode="camera", shading="rendered")` for EEVEE or Workbench. For Cycles, render
66
+ and inspect `look(image="Render Result")`. Investigate exposure, lighting, materials, and intended
67
+ contrast instead of treating every black or white area as a lighting error.
68
+
69
+ ## Render settings
70
+
71
+ Read the current engine rather than setting one blindly (see `bpy.md`). For quick
72
+ previews keep samples low; raise them only for the final render.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: blender-project-goal
3
+ description: Use for Blender design requests and returns to paused projects. Defines discovery, bootstrap, project goal recording, and goal start/resume. Excludes read-only questions and workspace maintenance.
4
+ ---
5
+
6
+ # Blender Project Goal
7
+
8
+ Blender production requires an active registered goal and current project records. Read-only
9
+ questions and workspace maintenance MUST NOT launch or modify Blender.
10
+
11
+ The orchestrator owns goal commands and continuation decisions. Users provide inputs, never goal
12
+ commands. If the goal is already paused, do not repeat the stop procedure. There is no successful action, final response, or runtime notice that is approval. A final response alone does not prove approval; a response is not approval without the runtime receipt.
13
+
14
+ Use `blender_document` `{action:"read"}` for structured project-document access; direct full-file
15
+ reads are acceptable but discouraged. Use `blender_workflow {action:"status"}` after compaction,
16
+ restart, or any gate error. Execute `status.nextStep.command`; it names the required goal, document,
17
+ registration, launch, or production step. The canonical goal template is
18
+ `../../../.kilo/blender-project-harness/tools/harness/templates/project/Documents/Goals/01-project-brief.md`.
19
+
20
+ ## New project
21
+
22
+ Requirements, workflow mode, review mode, and scaffolding happen in ordinary chat before a goal
23
+ starts. Kilo removes `question` during an active goal.
24
+
25
+ 1. Confirm requirements with `blender-project-requirements`.
26
+ 2. Ask the optional-workflow intake questions: generate references with Media MCP or supply them,
27
+ use supplied, direct-download, browser/provider, or user-assisted assets, handle scripts as
28
+ none/source-only, and required deliverable formats. Use `intake {scan:true}` to inspect supplied
29
+ paths; it does not write the project. Do not generate paid images, download, or execute scripts
30
+ without explicit consent. Record the media/download scope in the goal or decisions.
31
+ 3. Collect workflow mode with `blender-project-workflow` and review mode with
32
+ `blender-project-grading`.
33
+ 4. Scaffold with `blender-project-scaffold`.
34
+ 5. Create or update README, requirements, workflow, review, assets, decisions, and the filled goal
35
+ with `bootstrap-document`. Use `capabilities.documentFormats`; the harness rejects malformed
36
+ records.
37
+ 6. Commit the exact scaffold with `bootstrap-commit`. NEVER stage or commit project paths manually.
38
+ 7. Call `prepare` `{project,goal,scene}`. Pass its exact question and labels to `question`. Only the
39
+ runtime answer registers the project.
40
+ 8. Call `goal(action="start", objective=<the entire filled prompt>)`. End the turn after a
41
+ successful start.
42
+ 9. On the next goal turn, inspect `blender_workflow` `status` and continue with its `nextStep`.
43
+
44
+ NEVER start a goal to ask questions. NEVER create new project documents outside the harness. Update
45
+ existing documents only inside declared change paths.
46
+
47
+ ## Return to paused project
48
+
49
+ 1. Read `Documents/WORKFLOW.md`, `Documents/REVIEW.md`, the active goal, requirements, assets, and
50
+ decisions needed for the pending work.
51
+ 2. On a genuine later return, ask both mode questions only before registration. Once registered,
52
+ requirements, workflow, review mode, and the active goal are frozen; do not reask or record a mode
53
+ change inside the run. Routine approval, clarification, manual-edit pauses, automatic goal turns,
54
+ and compaction are continuations: do not reask modes for those.
55
+ 3. Confirm records remain current. Registration-changing edits require supported re-registration
56
+ through `prepare`; current re-registration is limited to the capped-review escalation path. If the
57
+ required path is unavailable, STOP and report the tooling blocker. Never edit external harness
58
+ state.
59
+ 4. Resume only when the pending answer permits continuation:
60
+ `goal(action="resume")` for an unchanged objective. End the turn.
61
+ 5. Changed scope MUST stop production and report the need for explicit re-registration. Do not edit
62
+ the active goal or other registration documents inside a change. NEVER resume a stale objective.
63
+
64
+ ## Required goal content
65
+
66
+ The filled goal MUST contain:
67
+
68
+ - Mission in the user's exact words.
69
+ - Project name and links to README, requirements, workflow, review, assets, decisions, and
70
+ references.
71
+ - Visual outcome: subject, composition, camera, lighting, materials, colour, scale, mood.
72
+ - Scope: in, out, external dependencies.
73
+ - Deliverables: scene, review render, exports, documents.
74
+ - Acceptance checks observable in a render or readable in a file.
75
+ - Workflow: harness actions, autonomy mode, review mode, configured graders.
76
+ - Done: current documents, inspected sealed render, final applicable `PASS` when grading is enabled,
77
+ and no genuine unresolved blocker or major finding.
78
+
79
+ ## Goal state
80
+
81
+ Kilo stores the goal under session metadata `kilo.goal` with status `active`, `paused`, `blocked`, or
82
+ `complete`. A rejected tool call blocks the goal; `goal_report` is unavailable until
83
+ `goal {action:"resume"}` succeeds. The harness exposes `status.kiloGoal` and, when Kilo reports
84
+ `blocked` or `paused`, returns `nextStep.phase:"resume-goal"`. Follow it before any report or further
85
+ production action. A harness deny is not permission to bypass the gate.
86
+
87
+ ## Input handoffs
88
+
89
+ Kilo has no `question` during an active goal.
90
+
91
+ 1. If work cannot continue because approval or a decision is missing, call
92
+ `goal_report(status="blocked", reason=<pending input>)` with the exact evidence. A blocked report
93
+ does not require a commit. End the turn with the decision needed and the next change proposed for
94
+ the user.
95
+ 2. On the next ordinary user turn, ask the required `question` before resuming.
96
+ 3. For approval, call `blender_workflow` `approval` and use its exact question and labels. Freeform
97
+ direction does not replace the runtime receipt.
98
+ 4. Resume with `goal(action="resume")` only after the answer authorizes continuation and records
99
+ remain current. End the turn.
100
+ 5. NEVER delegate goal commands to the user, self-approve, or resume an outdated goal.
101
+
102
+ ## Rules
103
+
104
+ - Production MUST NOT start before registration, active goal, and committed valid records.
105
+ - Requirements are frozen after registration; a requested change stops production for explicit
106
+ re-registration.
107
+ - Partially Autonomous approval is mandatory after every reviewable change before its commit.
108
+ - `review` mode `All` or `Single` requires configured grader receipts before approval or commit.
109
+ - Use harness document and commit actions. Manual project document writes and Git commits are
110
+ blocked.
111
+ - Unsupported material is not made acceptable by a written goal. Stop for reviewed tooling.
112
+ - NEVER claim completion without a clean checkpoint, inspected sealed render, and final applicable
113
+ `PASS` or recorded `Off` self-review. Call `goal_report(status="complete",reason=<evidence>)` only
114
+ after that state; then give the final response. Stop Blender through `blender_workflow` unless it
115
+ is intentionally left open for user inspection, and report which choice was made.
@@ -0,0 +1,184 @@
1
+ ---
2
+ name: blender-project-grading
3
+ description: Use when configuring or running independent Blender grader subagents. Defines review modes, evidence, round folders, aggregation, dispositions, and re-review.
4
+ ---
5
+
6
+ # Blender Project Grading
7
+
8
+ Graders review sealed evidence against confirmed requirements. They do not edit the scene and do not
9
+ replace the orchestrator's mandatory `blender_look` inspection.
10
+
11
+ `AGENTS.md` defines hard invariants. `blender-workflow-harness` defines the runtime actions. Call
12
+ `blender_workflow {action:"status"}` and follow `nextStep` when a review gate fails.
13
+
14
+ ## When review is required
15
+
16
+ - Review every reviewable change: a bounded change with at least one apply operation.
17
+ - NEVER review the bootstrap save. Commit and checkpoint it without sealing or grading.
18
+ - Mode `Off`: call `self-review` after inspecting the sealed render.
19
+ - Mode `All`: every configured grader reviews each round.
20
+ - Mode `Single`: only the named configured grader reviews.
21
+ - Partially Autonomous: complete review and obtain approval before the change commit.
22
+ - Re-review a failed round with `revision:true` within `max_rounds`.
23
+ - Missing, disabled, invalid, or unavailable required grading STOPS production. NEVER silently
24
+ downgrade to self-review.
25
+
26
+ ## Milestone scope
27
+
28
+ - `final:false` is a partial milestone. Graders must judge only the declared milestone and the
29
+ requirements it advances. Future or unbuilt scope is deferred, not a finding; absent future content
30
+ MUST NOT be reported as a blocker or major.
31
+ - `final:true` is the full-spec review. Only then must every confirmed requirement and the complete
32
+ deliverable be present.
33
+ - For intermediate changes, pass the milestone-specific requirement IDs the change advances. Do not
34
+ pass full-deliverable IDs whose content is intentionally deferred; reserve the complete set for the
35
+ final change.
36
+ - The grader ticket prompt includes the partial/final scope contract. Do not remove or weaken it.
37
+
38
+ ## Review mode record
39
+
40
+ `Documents/REVIEW.md` MUST contain one `Mode:` value (`Off`, `All`, or `Single`), one `Selected:`
41
+ date, and for `Single` one `Single grader:` name. Ask the mode in ordinary chat before the goal
42
+ starts and on a genuine later return. Do not reask for routine approval or continuation pauses.
43
+ Switch modes only after explicit user direction. After registration, the review record is frozen;
44
+ stop and report the need for explicit re-registration instead of editing it inside a bounded change.
45
+
46
+ ## Config
47
+
48
+ Read `blender_subagents.graders` from `.kilo/blender-project-harness/config.json`. The tracked
49
+ `.kilo/blender-project-harness/config.example.json` is the template.
50
+
51
+ ```json
52
+ {
53
+ "blender_subagents": {
54
+ "graders": {
55
+ "agent": "blender-grader",
56
+ "enabled": true,
57
+ "max_parallel": 1,
58
+ "max_rounds": 2,
59
+ "graders": [
60
+ {
61
+ "name": "visual",
62
+ "focus": "composition, camera, lighting, colour, materials",
63
+ "provider": "provider-id",
64
+ "model": "model-name",
65
+ "variant": "reasoning-variant",
66
+ "backup": {
67
+ "provider": "backup-provider-id",
68
+ "model": "backup-model-name",
69
+ "variant": "backup-reasoning-variant"
70
+ },
71
+ "max_minutes": 5,
72
+ "max_steps": 10
73
+ }
74
+ ]
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ The harness validates the roster at `prepare`: unique slug, non-empty focus/model fields, one complete
81
+ backup provider/model/reasoning variant per grader, positive budgets, `max_steps` within the grader
82
+ ceiling, `max_parallel` within the roster, and `max_rounds` 1-4. Give the `spec` grader 12 steps when
83
+ it must complete a final full-spec review; 10 can be exhausted before the documentation reads. NEVER fabricate, drop, substitute, or
84
+ borrow a grader or model. Resolve models with `agent_manager_models`; per-task overrides require
85
+ explicit user request. A primary dispatch failure may retry once with the configured backup; record
86
+ `modelRole` and do not change the roster or review mode.
87
+
88
+ ## Evidence and round folder
89
+
90
+ For every scene change, call `finalize`, then issue `wip`, and `blender_look` the WIP render before
91
+ `seal`; every third apply also requires a WIP check. A WIP render is not review evidence and stays
92
+ out of commits.
93
+
94
+ Call `seal` after the reviewable scene is ready. It saves the authoritative scene and captures every
95
+ declared scene:
96
+
97
+ - a camera PNG per scene (and a master sequence still when applicable);
98
+ - `scene.txt` and `scene-facts.json` per scene;
99
+ - `manifest.json` with UTC time, goal, base commit, dirty state, primary scene, scene list, scene
100
+ requirement mapping, spec hashes, selected graders, and evidence hashes.
101
+
102
+ Call `blender_look` on every returned scene render. The runtime records one inspection receipt per
103
+ scene; review is blocked until every declared scene is inspected. NEVER substitute an image, rewrite
104
+ sealed evidence, or change the manifest.
105
+
106
+ The harness creates `Documents/Reviews/R<NN>-<yyyyMMddTHHmmssZ>/`. `NN` is the next project-wide round number; never reuse or overwrite a round. `_evidence/` is ignored; reports, manifest, and the round index are tracked. Each grader writes only `<grader>/REPORT.md`, through `blender_document` `{action:"write"}`. Direct report edits are denied. The ticket prompt lists exact evidence files with hashes; the grader must read those exact paths, not an evidence folder, and may use only its assigned report. A multi-scene report must cite every declared scene name. Read `operation_tasks` in the manifest and `Documents/TASKSTRACKER.md` with `Documents/Tasks/<id>/` as process evidence; `blender_document {action:"ledger"}` returns the structured rows. Never edit either.
107
+
108
+ ## Dispatch
109
+
110
+ 0. Read spec documents through `blender_document` `{action:"read"}`. Direct `read`/`grep` is
111
+ acceptable but discouraged. Read non-markdown evidence directly.
112
+
113
+ 1. After seal and successful `look`, call
114
+ `blender_workflow` `grader-ticket` `{name}` for each selected grader.
115
+ 2. Pass its returned prompt to the normal `blender-grader` task. Keep the literal
116
+ `HARNESS_GRADER:<token>`, report path, scene hash, evidence key, and deadline unchanged.
117
+ 3. Fill only the user-prompt and prior-findings placeholders. Do not invent a child session or
118
+ report receipt.
119
+ 4. Issue all selected grader tickets, then dispatch up to `max_parallel` grader tasks in one batch
120
+ before waiting; graders run read-only and never edit the scene. One writer rule remains.
121
+ 5. Retain each runtime-bound `task_id`. Resume the same grader session for re-review when model and
122
+ focus are unchanged.
123
+ 6. If a task fails before binding a child session, call `grader-fail {name,reason}` so the failure
124
+ is recorded against the ticket.
125
+
126
+ A missing or failed report permits one replacement `grader-ticket` before `review`; the replacement
127
+ gets a fresh pass budget. A tooling/evidence `BLOCKED` report is retryable without a scene revision;
128
+ a second failure is aggregated by `review`, after which `nextStep` returns `retry-grader` or
129
+ `preserve`, not `begin`. Graders never loop or ask the user. The assigned report write is exempt
130
+ from both the step budget and the deadline so a grader can always record its verdict. A grader may
131
+ read its own prior `REPORT.md` under `Documents/Reviews/`; peer grader reports remain denied.
132
+
133
+ ## Aggregate and dispose
134
+
135
+ 1. Verify each report exists, cites the sealed evidence and scene hash, and declares exactly one
136
+ verdict.
137
+ 2. Merge duplicate findings; the highest substantiated severity wins.
138
+ 3. Resolve disagreements against the confirmed spec and frozen evidence; record the reasoning.
139
+ 4. Record every finding as `open`, `fixed`, `deferred`, or `declined` with a reason. A declined
140
+ blocker or major requires evidence that it is false or outside confirmed scope. Time pressure or
141
+ preference is not a waiver.
142
+ 5. Call `review` `{notes,reason,dispositions}`. The harness validates reports, computes the verdict,
143
+ writes `REVIEW.md`, appends the round row to `Documents/Reviews/README.md`, and auto-commits in
144
+ Fully Autonomous mode. In Partially Autonomous mode it
145
+ writes the verdict and waits for approval; `commit` then creates the review commit. A tooling
146
+ `BLOCKED` verdict is not auto-committed; retry the blocked grader with the configured backup.
147
+ 6. After the retry budget is exhausted, call `preserve {reason}` instead of looping. It commits the
148
+ sealed render, reports, aggregate review, tracker, and task records as `WIP`; then `checkpoint`
149
+ and `pause` or `reregister`. NEVER mark a tooling block `PASS`.
150
+ 7. Call `checkpoint` after the scoped commit. NEVER create or commit review documents manually.
151
+
152
+ Verdicts:
153
+
154
+ - `PASS`: all selected graders completed, required dimensions were assessed, evidence is complete,
155
+ and no substantiated blocker or major remains.
156
+ - `CHANGES_REQUIRED`: at least one blocker or major remains.
157
+ - `BLOCKED`: evidence/spec missing, grader failed, or a necessary decision is unavailable.
158
+
159
+ One substantiated blocker fails the round regardless of other PASS verdicts. Two rounds without
160
+ improvement on the same finding STOP for user direction; do not run a third automatic round.
161
+
162
+ ## Re-review
163
+
164
+ Create a new round with `revision:true`. Resume the same grader sessions where possible. Give each
165
+ grader its own prior report path, the new frozen evidence, the new exact report path, and the
166
+ orchestrator's dispositions. The grader marks each prior finding `FIXED`, `OPEN`, or `REGRESSED`
167
+ with evidence, then adds new findings. NEVER permit peer report reads or rewrite sealed metadata.
168
+
169
+ ## Approval and completion
170
+
171
+ - In Partially Autonomous mode, complete review before calling `approval`. Pass its exact question
172
+ and labels to `question`; only a runtime answer authorizes the commit.
173
+ - Findings do not authorize fixes. A correction requires a new bounded `begin` with `revision:true`.
174
+ - Completion requires a clean `checkpoint`, current records, inspected sealed render, and final
175
+ applicable `PASS` or recorded `Off` self-review with no unresolved blocker or major.
176
+ - Commit policy: `bootstrap-commit` before registration, `commit` after registration. Manual project
177
+ Git commands are blocked. Failed/expired changes use `recover` for repairs or `commit {mode:"wip"}`
178
+ to preserve them; a sealed tooling block uses `preserve`. `checkpoint` verifies exactly one scoped
179
+ commit range after the change base and a clean project.
180
+
181
+ ## References
182
+
183
+ - `.kilo/agent/blender-grader.md` for the report rubric and output contract.
184
+ - `.kilo/blender-project-harness/config.example.json` for the tracked config template.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: blender-project-readme
3
+ description: Use when creating or updating a Blender project README. Enforces the required project sections and harness-owned document path.
4
+ ---
5
+
6
+ # Blender Project README
7
+
8
+ Canonical template: `../../../.kilo/blender-project-harness/tools/harness/templates/project/README.md`. Write the project copy
9
+ at `Blender/<Project>/README.md` through `bootstrap-document` before registration or `document`
10
+ inside a declared bounded change.
11
+
12
+ ## Required sections
13
+
14
+ Keep this order. Each heading MUST appear exactly once.
15
+
16
+ 1. Project title.
17
+ 2. Purpose: one concrete paragraph.
18
+ 3. What this project is: subject, audience, visual result.
19
+ 4. Requirements: link to confirmed `Documents/REQUIREMENTS.md`; summarize only the highest-priority
20
+ points. Do not duplicate the requirement register.
21
+ 5. Visual direction: style, references, colour, lighting, camera, scale.
22
+ 6. Deliverables: main `.blend`, final renders, exports, documents.
23
+ 7. Project structure: actual folders and authoritative `.blend`.
24
+ 8. Blender: workspace MCP port, harness launch/stop, run log, main file, relative paths, one-instance
25
+ rule.
26
+ 9. Workflow: links to `Documents/WORKFLOW.md` and `Documents/REVIEW.md`; selected modes; review index.
27
+ 10. External assets: summary plus links to `Documents/ASSETS.md` and
28
+ `assets/external/README.md`. User files are brought in through `intake`; never instruct the user
29
+ to create folders or copy by hand.
30
+ 11. Goals: index of `Documents/Goals/*.md`.
31
+ 12. References: links to `Documents/References/`.
32
+ 13. Open questions and next steps.
33
+
34
+ The harness validates `Status:` and `Last updated:` fields. Replace instructional placeholders with
35
+ project facts. Do not invent requirements or asset details; link to their registers.
36
+
37
+ ## Validation
38
+
39
+ - Every deliverable path MUST exist or be explicitly planned.
40
+ - Requirements MUST be confirmed and linked.
41
+ - Workflow and review records MUST contain selected modes and be linked.
42
+ - The authoritative `.blend` path MUST match the MCP settings after the first save.
43
+ - External assets MUST be registered and linked.
44
+ - The goal index MUST match `Documents/Goals/` and identify the active goal.
45
+ - Before completion, the README MUST reflect the delivered state, inspected review render, and final
46
+ applicable review result.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: blender-project-requirements
3
+ description: Use before creating a Blender project and whenever requirements are added or changed. Runs a confirmation discussion and stores confirmed requirements.
4
+ ---
5
+
6
+ # Blender Project Requirements
7
+
8
+ Requirements are agreed with the user, never inferred. Production MUST NOT start until requirements
9
+ are confirmed, workflow and review modes are selected, the scaffold is committed, and registration is
10
+ complete.
11
+
12
+ ## Gate
13
+
14
+ - Run this discussion in ordinary chat before any goal starts. Kilo removes `question` during an
15
+ active goal.
16
+ - Do not scaffold, launch Blender, or create scene work during the discussion.
17
+ - For a necessary question during production, follow `blender-project-goal` for the required-input
18
+ handoff. Do not let an unconfirmed requirement become scene work.
19
+ - Pure workspace maintenance is exempt.
20
+
21
+ ## Discussion
22
+
23
+ 1. Read `AGENTS.md` and the existing project documents.
24
+ 2. Use the user's request as the starting brief. Ask only for information that is missing.
25
+ 3. Use `question` for concrete choices, ambiguities, visual direction, scope, constraints, external
26
+ assets, and acceptance. Keep options to 2-4.
27
+ 4. Challenge vague terms. Convert abstract ideas into observable outcomes. Put future work under
28
+ `Deferred` and explicit exclusions under `Out of scope`.
29
+ 5. Cover purpose, audience, visual outcome, deliverables, acceptance, constraints, external assets,
30
+ and exclusions. Do not walk a generic checklist.
31
+ 6. Reflect a concise draft back to the user. Ask:
32
+ - `Confirm requirements`
33
+ - `Keep discussing`
34
+ - `Change something`
35
+ 7. Loop until the user explicitly confirms. Silence, a new topic, or an unrelated `ok` is not
36
+ confirmation.
37
+ 8. On confirmation, record the exact user words and scope. Create or update
38
+ `Documents/REQUIREMENTS.md` with `Status: Confirmed`, `Confirmed: YYYY-MM-DD`,
39
+ `Confirmation: <exact response and scope>`, and a change-log row. Use `bootstrap-document` before
40
+ registration. After registration, requirements are frozen; do not use `document` for them.
41
+ 9. New project: collect workflow mode with `blender-project-workflow` and review mode with
42
+ `blender-project-grading`, scaffold, fill all records, commit with `bootstrap-commit`, then
43
+ `prepare` and start the goal.
44
+ 10. Existing project: registration documents are frozen after registration. If the user requests a
45
+ requirements change, STOP and report the need for explicit re-registration. Do not edit
46
+ `Documents/REQUIREMENTS.md`, `Documents/WORKFLOW.md`, `Documents/REVIEW.md`, or the active goal
47
+ inside a bounded change.
48
+
49
+ ## Research
50
+
51
+ - Use `websearch` for ambiguous terms, current standards, references, feasibility, or best practice.
52
+ - Use Context7 for library, framework, and Blender API docs. Follow `blender-mcp` for Blender API
53
+ gaps.
54
+ - Research factual gaps before asking; ask the user for preference, intent, priority, or scope.
55
+ - Use official or primary sources first. State date, version, and conflicts.
56
+ - Report a short `found / means / options` summary with titles and URLs. Separate facts from
57
+ assumptions.
58
+ - Record research that supports or changes a requirement under `Research notes`; put long material
59
+ in `Documents/References/`. NEVER turn a finding into a requirement without explicit confirmation.
60
+ - If research is unavailable or inconclusive, mark an open question. Do not guess.
61
+ - Search public information only. NEVER send private project data, credentials, or user identity.
62
+
63
+ ## Requirement format
64
+
65
+ - Use stable IDs grouped by category: `REQ-01`, `REQ-02`, and so on.
66
+ - Make each requirement testable and user-visible where possible.
67
+ - Keep unresolved items under `Open questions` and acknowledged future work under `Deferred`.
68
+ - Keep explicit exclusions under `Out of scope` with a reason.
69
+ - Store the confirmed source in `Documents/REQUIREMENTS.md`; do not duplicate it across documents.
70
+
71
+ ## Mandatory record
72
+
73
+ The harness validates `Documents/REQUIREMENTS.md` through `capabilities.documentFormats`. It MUST
74
+ contain exactly the required fields and sections, including:
75
+
76
+ - `Status: Confirmed`
77
+ - a valid `Confirmed:` date
78
+ - a non-placeholder `Confirmation:` reply
79
+ - `Core value`, `Confirmed requirements`, `Constraints`, `Deferred`, `Out of scope`,
80
+ `Open questions`, `Research notes`, and `Change log`
81
+
82
+ A malformed or unconfirmed record blocks `prepare`. Fix it through `bootstrap-document` before
83
+ registration; never edit around the harness. After registration, stop and report the malformed
84
+ record instead of writing the frozen document.