fsmp/lib.rs
1//! `fsmp` — FSM Prompter: prompt-driven workflows backed by extended finite
2//! state machines.
3//!
4//! A **definition** ([`model::Definition`]) is a static workflow, authored
5//! ahead of the run — by a person, or by an agent working with one — and kept
6//! in version control: states carrying prose guidance, guarded transitions
7//! with effects, read-only params, and mutable context. The agent driving a
8//! machine never authors or mutates its own definition. An **instance**
9//! ([`model::Instance`]) is one live run — a snapshot of the definition taken
10//! at creation, plus the current state, the context, and a transition log.
11//!
12//! The pieces:
13//!
14//! - [`model`] — the data types for definitions and instances.
15//! - [`engine`] — guard evaluation, effect application, and `{var}`
16//! interpolation, implemented as methods on [`model::Instance`].
17//! - [`render`] — turns an instance into the step text an agent acts on
18//! (prose or JSON).
19//! - [`lint`] — checks a definition for authoring problems (unreachable
20//! states, dead ends, unknown targets) without instantiating it.
21//! - [`store`] — definition parsing/validation and the on-disk instance
22//! layout under `$FSMP_HOME` (default `~/.fsmp`).
23//! - [`guide`] — the embedded authoring/driving reference docs.
24//!
25//! The primary interface is the `fsmp` CLI (this crate's binary), whose
26//! primary user is an AI coding agent driving one transition at a time. This
27//! library exposes the same engine for embedding in another transport or
28//! harness. The API is pre-1.0 and may change.
29
30pub mod engine;
31pub mod guide;
32pub mod lint;
33pub mod model;
34pub mod render;
35pub mod store;