Skip to content

Commit 7232f35

Browse files
authored
release: v1.0.0 First Stone (#14)
* chore: baseline remove-fuzzy-match-operator planning artifacts Feature file, interview notes, DoD in product_definition.md, and test stubs for removing ~= (APPROXIMATELY_EQUAL) operator. * feat(condition): remove ~= fuzzy match operator Squash-merge feature/remove-fuzzy-match-operator. Removes the ~= fuzzy match operator from condition evaluation, updates loader to reject unknown operators, and migrates loader behavior tests to unit tests. * release: v1.0.0 First Stone * fix: align @id format and test conventions with established patterns - Feature file: @id:remove-fuzzy-match-NNN → @id:<8-char-hex> - Test functions: test_remove_fuzzy_match_NNN → test_remove_fuzzy_match_operator_<hex> - Docstrings: Given/When/Then → Given:/When:/Then: (with colons) - README: remove BPMN/SCXML comparison paragraph * fix: remove deprecated License classifier (PEP 639)
1 parent 8a56e65 commit 7232f35

30 files changed

Lines changed: 1626 additions & 794 deletions

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [v1.0.0] - First Stone - 2026-05-06
4+
5+
### Added
6+
7+
- **Specification reference page**: `docs/index.html` — semver.org-style specification with numbered rules, RFC 2119 language, formal syntax grammar, normative D3 diagrams, and FAQ
8+
- **Remove fuzzy match operator**: `~=` (APPROXIMATELY_EQUAL) removed from the specification and reference implementation; flows using `~=` now produce `FlowParseError` with state context
9+
10+
### Changed
11+
12+
- **Condition operators reduced from 7 to 6**: `==`, `!=`, `>=`, `<=`, `>`, `<`
13+
- **`flowr/domain/condition.py`**: removed `APPROXIMATELY_EQUAL` enum value, `~=` from operator prefix map, and approximate comparison logic
14+
- **`flowr/domain/loader.py`**: added `_validate_condition_operators()` to reject `~=` in all when-clause forms (inline dict, list-form, named references) with `FlowParseError`
15+
- **Specification documents**: `flow_definition_spec.md`, `glossary.md`, `system.md`, `product_definition.md` updated to list exactly 6 operators
16+
- **ADR_20260426_fuzzy_match_algorithm.md**: deprecated with removal notice
17+
- **README.md**: banner image uses absolute URL for PyPI rendering, guard conditions explicitly list 6 operators, documentation links use absolute URLs
18+
- **pyproject.toml**: version bumped to 1.0.0, status promoted to Production/Stable, Documentation URL points to spec page, added PyPI classifiers
19+
20+
### Removed
21+
22+
- `~=` condition operator (APPROXIMATELY_EQUAL) — no longer a valid operator in the flowr specification
23+
- 6 obsolete tests referencing `~=` parsing and evaluation
24+
325
All notable changes to this project will be documented in this file.
426

527
## [v0.5.0+20260505] - Fine Sift - 2026-05-05

README.md

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,58 @@
11
<div align="center">
22

3-
<img src="docs/assets/banner.svg" alt="flowr — non-deterministic state machine specification to knead workflows" width="100%"/>
3+
<img src="https://raw.githubusercontent.com/nullhack/flowr/main/docs/assets/banner.svg" alt="flowr — non-deterministic state machine specification to knead workflows" width="100%"/>
44

55
<br/><br/>
66

77
[![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=for-the-badge)](https://nullhack.github.io/flowr/coverage/)
88
[![CI](https://img.shields.io/github/actions/workflow/status/nullhack/flowr/ci.yml?style=for-the-badge&label=CI)](https://github.com/nullhack/flowr/actions/workflows/ci.yml)
9-
[![Python](https://img.shields.io/badge/python-%E2%89%A513.0-blue?style=for-the-badge)](https://www.python.org/downloads/)
9+
[![Python](https://img.shields.io/badge/python-%E2%89%A53.13-blue?style=for-the-badge)](https://www.python.org/downloads/)
1010
[![PyPI](https://img.shields.io/pypi/v/flowr?color=%2300FF41&style=for-the-badge)](https://pypi.org/project/flowr/)
1111
[![MIT License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://github.com/nullhack/flowr/blob/main/LICENSE)
1212

13-
**Define workflow state machines in YAML. Validate, query, and track them from the terminal.**
13+
**A declarative, validatable YAML format for non-deterministic state machine workflows.**
14+
15+
[Read the specification →](https://nullhack.github.io/flowr/)
1416

1517
</div>
1618

1719
---
1820

19-
> **⚠️ Beta — do not install.** This project is under active development. The API, package structure, and configuration may change without notice until the first stable release.
21+
## The specification
2022

21-
You write a flow definition in YAML. flowr checks that it is structurally valid, tells you what states exist and which transitions are available, and keeps track of where you are — across invocations, across subflows. One specification format. One CLI. No runtime engine, no side effects, no opinions about what your workflow should *do* — only what it *is* and whether it *holds together*.
23+
flowr defines what a workflow **is** — its states, transitions, guard conditions, subflows — not what it **does**. No execution engine. No side effects. No opinions about retries, timeouts, or error handling. A YAML file declares structure. A validator checks integrity. Tools query, track, and visualise. [The format is the foundation.](https://nullhack.github.io/flowr/)
2224

23-
---
25+
What the specification covers:
2426

25-
## Who is this for?
27+
- **States** with unique ids, per-state attributes, and transition mappings
28+
- **Transitions** that resolve to state ids or declared exit names
29+
- **Guard conditions** gated by evidence-based expressions using 6 operators (`==`, `!=`, `>=`, `<=`, `>`, `<`)
30+
- **Named condition groups** reusable across transitions on the same state
31+
- **Subflows** with call-stack semantics — push on entry, pop on exit
32+
- **Within-flow cycles** for iterative workflows
33+
- **Validation rules** — structural integrity checks independent of any runtime
2634

27-
### Agent Operators — Persist workflow state across CLI invocations
35+
What the specification does **not** cover:
2836

29-
You run `flowr check`, then `flowr transition`, then `flowr check` again — each time passing the flow name and current state by hand. Or you let sessions track it: `flowr session init deploy-flow`, `flowr --session transition approve`, `flowr --session check`. The session file remembers where you are. Push into a subflow; pop back out. No state to reconstruct, no context to pass.
30-
31-
### Developers — Validate and query workflow definitions from code or terminal
32-
33-
You write a flow YAML. You need to know: is it valid? Which states can I reach from here? Does this transition have guard conditions? `flowr validate`, `flowr states`, `flowr next`, `flowr check` answer these questions — from the terminal for humans, from the Python library for tools.
37+
- Execution engines, side-effect hooks, retry logic, timeout handling
38+
- Parallel (fork-join) states
39+
- Orchestration, scheduling, or event dispatch
3440

35-
### Tool Authors — Build on a specification, not a runtime
36-
37-
flowr defines a YAML format for non-deterministic state machines with per-state attributes, guard conditions, and subflows. The validator enforces structural constraints. The library parses flows into dataclasses. No execution engine, no side-effect hooks — a clean foundation for editors, visualizers, or orchestration layers.
41+
**[Full specification with examples and visual diagrams](https://nullhack.github.io/flowr/)**
3842

3943
---
4044

41-
## What it does
45+
## The reference implementation
46+
47+
This repository contains a Python reference implementation — a CLI and library that validates, queries, and tracks flow definitions conforming to the specification. The specification is the contract; this code is one tool that honours it.
4248

4349
```
4450
flowr validate deploy.yaml → valid: True
4551
flowr states deploy.yaml → prepare, execute, review
4652
flowr next deploy.yaml review → approve → deployed [blocked] need: score=>=80
47-
→ reject → failed
53+
→ reject → failed
4854
flowr transition deploy.yaml review approve --evidence score=85
49-
→ from: review, to: deployed
55+
→ from: review, to: deployed
5056
flowr session init deploy-flow → session created at state: prepare
5157
flowr --session transition approve → from: prepare, to: review
5258
flowr mermaid deploy.yaml → stateDiagram-v2 ...
@@ -56,7 +62,7 @@ flowr mermaid deploy.yaml → stateDiagram-v2 ...
5662

5763
**Query.** States, transitions, conditions, attributes — ask any question the flow can answer.
5864

59-
**Sessions.** Init, show, set-state, transition, list. Subflow push/pop for nested workflows. Auto-enters initial subflow on `session init`. One `--session` flag turns any command session-aware (including `validate` and `states`).
65+
**Sessions.** Init, show, set-state, transition, list. Subflow push/pop for nested workflows. Auto-enters initial subflow on `session init`. One `--session` flag turns any command session-aware.
6066

6167
**Config.** `flowr config` shows where every value comes from — default, pyproject.toml, or CLI override.
6268

@@ -146,6 +152,22 @@ default_session = default (default)
146152

147153
---
148154

155+
## Who is this for?
156+
157+
### Specification adopters
158+
159+
You build editors, visualizers, CI systems, or orchestration layers. You need a structural format for workflow state machines — not an execution engine. The flowr specification gives you states, transitions, guard conditions, and subflows in a declarative YAML format with a conforming validator. Any tool can parse it. [Read the spec.](https://nullhack.github.io/flowr/)
160+
161+
### Agent operators
162+
163+
You run `flowr check`, then `flowr transition`, then `flowr check` again — each time passing the flow name and current state by hand. Or you let sessions track it: `flowr session init deploy-flow`, `flowr --session transition approve`, `flowr --session check`. The session file remembers where you are. Push into a subflow; pop back out. No state to reconstruct, no context to pass.
164+
165+
### Developers
166+
167+
You write a flow YAML. You need to know: is it valid? Which states can I reach from here? Does this transition have guard conditions? `flowr validate`, `flowr states`, `flowr next`, `flowr check` answer these questions — from the terminal for humans, from the Python library for tools.
168+
169+
---
170+
149171
## CLI Reference
150172

151173
| Command | Description |
@@ -192,18 +214,12 @@ Hexagonal architecture. Domain has no infrastructure dependencies. CLI is the pr
192214

193215
---
194216

195-
## Why does this exist
196-
197-
No existing YAML standard covers non-deterministic state machine workflows with per-state agent assignment and filesystem-as-source-of-truth. Existing solutions (XState, SCXML, Serverless Workflow, BPMN) target execution engines or deterministic workflows. flowr fills this gap: a declarative, validatable, toolable format for workflows that branch on evidence rather than control flow.
198-
199-
---
200-
201217
## Documentation
202218

203-
- **[flowr docs](https://nullhack.github.io/flowr/)**hosted documentation
204-
- **[Flow Definition Specification](docs/spec/flow_definition_spec.md)** — authoritative YAML format reference
205-
- **[System Overview](docs/spec/system.md)** — architecture, domain model, module structure
206-
- **[Product Definition](docs/spec/product_definition.md)** — product boundaries, users, and scope
219+
- **[Specification](https://nullhack.github.io/flowr/)**the flowr format with examples and visual diagrams
220+
- **[Flow Definition Specification](https://github.com/nullhack/flowr/blob/main/docs/spec/flow_definition_spec.md)** — authoritative YAML format reference
221+
- **[System Overview](https://github.com/nullhack/flowr/blob/main/docs/spec/system.md)** — architecture, domain model, module structure
222+
- **[Product Definition](https://github.com/nullhack/flowr/blob/main/docs/spec/product_definition.md)** — product boundaries, users, and scope
207223

208224
---
209225

@@ -222,4 +238,4 @@ uv run task static-check # type checking
222238

223239
## License
224240

225-
MIT — see [LICENSE](LICENSE).
241+
MIT — see [LICENSE](LICENSE).

docs/adr/ADR_20260426_condition_inlining.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ Keeping `GuardCondition` unchanged preserves backward compatibility and simplici
5050

5151
| Risk | Probability | Impact | Mitigation | Accepted? |
5252
|------|------------|--------|------------|-----------|
53-
| Loader complexity increases with three when forms | Medium | Low | Well-tested with comprehensive BDD scenarios | Yes |
53+
| Loader complexity increases with three when forms | Medium | Low | Well-tested with thorough BDD scenarios | Yes |

docs/adr/ADR_20260426_fuzzy_match_algorithm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Status
44

5-
Accepted
5+
**Deprecated** — The `~=` operator was removed from the flowr specification in v1.0.0 (2026-05-06). It was unused in practice and added unnecessary complexity. See feature `remove-fuzzy-match-operator`. This ADR is retained for historical reference only.
66

77
## Context
88

docs/assets/banner.svg

Lines changed: 11 additions & 11 deletions
Loading

docs/assets/logo.svg

Lines changed: 22 additions & 37 deletions
Loading

0 commit comments

Comments
 (0)