# @maya/forge-assist

AI co-creation for the V7 Forge with static policy, mandatory AUTH-001
authorization, and Moremi Wasmtime admission.

## At a glance

- **Path:** `libs/maya/forge-assist`
- **Domain:** maya (active)
- **Owner:** @GreyChimp
- **Docs:** [deep-dive](/docs/domains/maya/deep-dive) ·
  [systems one-pager](/docs/systems/lib-maya.md)
- **Nx project:** `@maya/forge-assist`

## Commands

```bash
pnpm nx test @maya/forge-assist
pnpm nx lint @maya/forge-assist
```

## Executable authority boundary

`ForgeAssistService` requires a `ForgeInvocationAuthority`. Production callers
use `Auth001ForgeInvocationAuthority` with the portfolio
`PortfolioCapabilityBroker`. Each generated attempt—including every quality
refinement—must resolve a separate AUTH-001 use for each declared capability.
The use is bound to:

- actor, tenant, run/session, purpose, resource, action, trust zones, and risk;
- artifact ID and exact source SHA-256;
- a maximum 15-second one-shot execution window;
- zero egress, zero secrets, and zero operating-system processes; and
- explicit fuel, memory, and wall-time limits from the grant's `forge`
  capability modifier.

Moremi accepts admission schema `v7.moremi.forge-assist-admission.3`. The
supported Forge language deliberately contains only constant string bindings and
top-level `oshun.invoke(capability, strictJsonPayload);` statements. Moremi
rejects every statement it cannot compile, embeds each canonical payload in a
core Wasmtime module, and executes the complete accepted program. Its linker
refuses capabilities without a binding, rechecks expiry and wall time inside the
host callback, applies the narrowest fuel/memory limits to the store, and
returns the exact AUTH-001 use and payload-hash traces. Forge Assist rejects any
receipt whose traces are not bound to the request.
