# FlexiForge 0.2 — SHiRE Integration Candidate

A working local STL-to-articulation engine with a new approval-gated bridge for SHiRE and SHIRE3D.

## New in 0.2

- Deterministic automatic joint-location suggestions along the model's dominant body axis.
- SHiRE job manifests and event history.
- Immutable design approval tokens.
- Geometry generation blocked until Ray approves the selected joint design.
- Validation report for every generated STL.
- Separate immutable export approval.
- Verified export to the SHiREVault network drive only; no silent local fallback.
- Local API on port `8876`, avoiding the existing SHiRE Brain port `8765`.
- Command-line bridge at `shire_flexiforge.py` for later SHiRE routing.
- Safe ARMOR OS installation candidate under `integration/`.

## Guided lifecycle

```text
REQUEST
  → SHiRE JOINT SUGGESTIONS
  → RAY SELECTS/APPROVES DESIGN
  → FLEXIFORGE BUILDS LOCALLY
  → VALIDATION
  → RAY APPROVES EXPORT
  → VERIFIED SHiREVAULT EXPORT
```

## Run locally

Windows: double-click `start_windows.bat`.

ARMOR OS/Linux:

```bash
./start_linux.sh
```

The interface opens at `http://127.0.0.1:8876`.

## SHiRE CLI example

```bash
python shire_flexiforge.py create \
  --source /path/to/dragon.stl \
  --project "Dragon Fidget" \
  --intent "Make the tail articulated"

python shire_flexiforge.py select JOB_ID S01 --joint flexi
python shire_flexiforge.py request-design-approval JOB_ID
python shire_flexiforge.py approve-design JOB_ID APPROVAL_TOKEN
python shire_flexiforge.py forge JOB_ID
python shire_flexiforge.py validate JOB_ID
python shire_flexiforge.py request-export-approval JOB_ID
python shire_flexiforge.py approve-export JOB_ID APPROVAL_TOKEN
python shire_flexiforge.py export JOB_ID
```

Final exports are written beneath:

```text
/SHiREVault/SHIRE3D/FlexiForge/Projects/<project>/<job-id>
```

The path must resolve to a verified network mount and be writable. FlexiForge stops if it cannot prove that condition.

## Current engineering boundary

This version creates one assembly joint per job. It does not yet generate a full print-in-place chain automatically. Hinge/flexi modes use a separate pin, and the ball-and-socket mode uses a snap assembly. All outputs still require slicer inspection and a physical clearance test.

## ARMOR OS integration candidate

`integration/install_into_armor_candidate.sh`:

- requires host `armoros`;
- requires a clean `/home/shire3d/ARMOR` Git working tree;
- verifies `/SHiREVault` is on a non-root mounted filesystem;
- creates and verifies a Git bundle at `/SHiREVault/Backup/OSBackups`;
- installs only new FlexiForge paths;
- does not enable a service, commit changes, or touch BlenderMCP.
