# Reference Scenario: Bracket

The bracket scenario is the current MVP reference flow for `.aieng`. It exists to make the project easy to run, inspect, explain, and test without requiring a CAD kernel, mesher, solver, LLM, RAG system, MCP tool, plugin, or external engineering application.

The scenario is intentionally narrow: a single bracket-like mechanical part imported from a STEP-like fixture, transformed into a structured `.aieng` package, enriched with mock topology, rule-based feature candidates, user-provided engineering context, AI-readable summaries, and a structured patch proposal.

## Why this scenario exists

The scenario validates the core project thesis:

> The file should carry enough engineering semantics that a general AI can understand the model before calling any tools.

It demonstrates how an engineering model can behave more like a repository than a single opaque CAD file. A general AI can inspect typed resources, stable IDs, constraints, protected regions, assumptions, validation status, and patch proposals before any external CAD/CAE execution.

## What it validates

The reference bracket flow validates that the current MVP can produce and validate a package containing:

- `manifest.json`
- `geometry/source.step`
- `geometry/normalized.step`
- `geometry/topology_map.json`
- `graph/feature_graph.json`
- `graph/constraints.json`
- `simulation/setup.yaml`
- `ai/protected_regions.json`
- `README_FOR_AI.md`
- `ai/summary.md`
- `ai/patches/patch_0001.json`

It also validates cross-resource references such as:

- feature IDs pointing to topology IDs;
- constraints pointing to feature IDs;
- simulation boundary conditions and loads pointing to feature IDs;
- protected regions pointing to feature IDs;
- patch proposals avoiding protected feature IDs.

## What is mock-based

The current demo is not real CAD topology extraction.

- `examples/bracket.step` is a small STEP-like fixture.
- `aieng import-step` copies the file into the package as a geometry resource.
- `aieng extract-topology` uses `MockTopologyExtractor`.
- No STEP geometry is parsed.
- No B-rep topology is extracted from the STEP content.
- No CAD kernel is used.
- The mock topology is deterministic and bracket-like so later structured resources have stable IDs for tests and demos.

## What is user-provided context

`examples/bracket_user_context.yaml` supplies engineering meaning that cannot be inferred safely from the mock topology alone, including:

- material: `Al6061-T6`;
- protected feature: `feat_hole_pattern_001`;
- fixed support feature: `feat_hole_pattern_001`;
- load target: `feat_base_plate_001`;
- target maximum von Mises stress;
- assumptions about the fixed support and load target.

This context is converted into structured resources by `aieng apply-context`.

## What is generated by the system

The CLI chain generates:

1. package manifest and directory structure;
2. copied STEP resources;
3. deterministic mock topology map;
4. deterministic rule-based feature candidates;
5. structured constraints, simulation setup, and protected regions from user context;
6. AI-readable Markdown summaries derived from structured resources;
7. a structured, unexecuted patch proposal for mass reduction that avoids protected mounting interfaces.

## What is not yet implemented

The reference scenario does not implement:

- real STEP parsing;
- real topology extraction;
- CAD feature recognition from exact geometry;
- geometry modification;
- patch execution;
- meshing;
- solver export;
- solver execution;
- manufacturing checks;
- LLM, RAG, skill, MCP, or plugin calls.

No generated file should be interpreted as proof that the bracket is safe, manufacturable, or structurally valid.

## What a general AI should understand

After running the demo, a general AI should be able to inspect the `.aieng` package and answer, using object IDs:

- what resources exist in the package;
- which topology and feature candidates are present;
- which feature IDs are protected;
- which material and simulation intent were supplied by the user;
- which assumptions are user-provided;
- which validation steps have not been run;
- why no stress or displacement result is validated;
- what patch proposal was generated;
- which protected targets the patch proposal avoids.

The important distinction is that the AI-readable summaries help navigation, but structured JSON/YAML resources remain the source of truth.
