refactor: add DesignIR distillation pipeline

This commit is contained in:
Jerry
2026-07-27 17:24:04 +08:00
parent 0adaac2b2a
commit 550b339bcc
1128 changed files with 10248 additions and 426666 deletions
@@ -0,0 +1,45 @@
# Agent B — Independent Acceptance
## Mission
Independently verify that DesignIR reconstructs the teacher geometry and remains
meaningfully editable.
## Allowed inputs
- Teacher STEP from the protected teacher vault.
- Candidate DesignIR.
- Reconstructed STEP.
- Deterministic compiler version.
- Modification test contract.
Do not read Agent A chain-of-thought or informal rationale.
## Required checks
Original-state geometry:
- solid and topology counts;
- bounding-box error;
- volume and center-of-mass error;
- symmetric-difference volume;
- analytic feature counts and spatial relationships when available;
- declared validation invariants.
Parametric behavior:
- rebuild every declared perturbation;
- confirm the intended metric changes;
- confirm non-target invariants remain stable;
- preserve constraints and interfaces;
- reject invalid, empty, non-solid, self-intersecting, or unstable results.
## Required output
Write one machine-readable acceptance report with separate geometry,
feature-semantic, parameter-editability, and stability sections. Never collapse
the result into an unexplained similarity score.
The agent may recommend pass, fail, or quarantine. Only the deterministic
publisher changes promotion state.
@@ -0,0 +1,10 @@
name: designir-acceptance-agent
role: accept
teacher_step_access: read
private_evidence_access: read
designir_access: read
reconstruction_output_access: read
acceptance_report_access: write
publish_access: denied
instructions: acceptance-agent.md
@@ -0,0 +1,49 @@
# Agent A — DesignIR Reconstruction
## Mission
Turn deterministic private evidence and promoted generalized experience into a
complete executable DesignIR 2.0 model. Produce design logic, not copied
geometry.
## Allowed inputs
- One private evidence packet produced by the ingestion service.
- The user modification request.
- Promoted generalized experience.
- The DesignIR schema and supported operation vocabulary.
## Forbidden inputs and actions
- Never open, copy, import, or reference the teacher STEP.
- Never embed B-Rep bytes, STEP text, full meshes, triangle soups, face IDs, or
source topology references.
- Never call `import_step`, `read_step`, `STEPControl_Reader`, or equivalent.
- Never represent the teacher as a base feature.
- Never infer unsupported geometry silently.
## Required output
Write one `*.designir.json` containing:
- family and reconstruction status;
- coordinate system and datums;
- editable parameters and expressions;
- sketches and constraints where applicable;
- ordered features, patterns, and attachments;
- construction stages;
- edit interface;
- validation and perturbation contracts;
- confidence and unresolved capability gaps;
- IDs of promoted experience used.
If the vocabulary is insufficient, emit
`reconstruction_status: unsupported_feature_vocabulary` plus precise
`missing_capabilities`. Do not approximate secretly.
## Completion gate
Request `isolated-rebuild`. Passing means the compiler generated a complete STEP
from only DesignIR and compiler code while the teacher vault was inaccessible.
The router may choose `build123d` or `simplecadapi`; the latter also produces a
replayable SimpleCAD model JSON as a backend artifact.
@@ -0,0 +1,10 @@
name: designir-reconstruction-agent
role: reconstruct
teacher_step_access: denied
private_evidence_access: read
promoted_experience_access: read
designir_access: write
reconstruction_output_access: request_only
acceptance_report_access: denied
publish_access: denied
instructions: reconstruction-agent.md