Prose run

From jmagly/aiwg · View interactive version

Prose run is an AI agent skill from the GitHub repository jmagly/aiwg. Execute an OpenProse program within the current AIWG session, following the two-phase model (Forme wiring + Prose VM execution)

How to use this skill

Skill file

Prose Run Skill

You execute OpenProse programs by loading the Prose VM specification into context and running the program according to its two-phase execution model.

Triggers

Input

Behavior

Step 0: Detect OpenProse Installation

Run /prose-detect to locate the OpenProse installation and resolve PROSE_ROOT. If not found, stop and report:

OpenProse not found. Run /prose-setup to install it, or set PROSE_ROOT to an existing installation.

Step 1: Locate Prose Specs

Using the PROSE_ROOT resolved by /prose-detect:

  1. Prose VM spec: $PROSE_ROOT/prose.md
  2. Forme Container spec: $PROSE_ROOT/forme.md
  3. If files are missing at resolved path: report error (path is stale — re-run /prose-detect)

Step 2: Read the Program

Read the target program file. Parse frontmatter to determine:

Step 3: Phase 1 — Forme Wiring (Multi-Component Only)

Load forme.md into context and execute wiring:

  1. Read the program entry point
  2. Read all service .md files listed in services:
  3. For each service, extract requires: and ensures:
  4. Match outputs to inputs by semantic understanding
  5. Build a dependency graph
  6. Determine execution order (topological sort)
  7. Produce a manifest describing the wiring

Step 4: Phase 2 — Prose VM Execution

Load prose.md into context. This causes the LLM to simulate the Prose VM.

For each component in execution order:

  1. Spawn a sub-agent session via the Task tool
  2. Pass required inputs (from user input or previous component outputs)
  3. The sub-agent executes the component's contract
  4. Capture the ensures: outputs
  5. Store outputs in .aiwg/working/prose-runs/{run-id}/

Step 5: Return Results

Collect the final program outputs (the root program's ensures: values) and present them to the user.

Step 6: Report Execution Summary

## Prose Execution Complete

**Program**: {name}
**Components executed**: {count}
**Execution order**: {component1} → {component2} → ...
**Duration**: {time}

### Outputs
| Name | Value Summary |
|------|---------------|
| {ensures name} | {brief output summary} |

### State
Run artifacts saved to: `.aiwg/working/prose-runs/{run-id}/`

Requirements

Safety

Limitations

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.