Skip to content

feat(export): flowr export command with JSON and Mermaid adapters#16

Merged
nullhack merged 5 commits intomainfrom
feat/export-command
May 7, 2026
Merged

feat(export): flowr export command with JSON and Mermaid adapters#16
nullhack merged 5 commits intomainfrom
feat/export-command

Conversation

@nullhack
Copy link
Copy Markdown
Owner

@nullhack nullhack commented May 7, 2026

Summary

  • Replaces flowr mermaid with unified flowr export --format <format> command backed by a pluggable adapter architecture
  • Two built-in adapters: JsonExporter (structured nodes/edges with --flat, --no-attrs) and MermaidExporter (stateDiagram-v2 with --no-conditions)
  • Auto-detects file vs directory input; directory mode exports all flows sorted alphabetically
  • Full discovery and planning artifacts included (interview notes, event storming, domain model, feature files)

Acceptance Criteria

All 17 BDD scenarios pass (337 tests, 100% coverage):

Feature @ids Tests
export-core 8ababd33 6c684a46 43d8849f d0169acb 3c8f8a0a e4152bc9 19cb145b dad5b532 8
export-json f8eb4019 7187f2ad f79514e5 99a274dd 4
export-mermaid a2045d96 67b1b50c 2e068a23 1d5ba172 0ce7099f 5

Breaking Change

flowr mermaid is removed. Users must migrate to flowr export --format mermaid.

Files Changed

  • flowr/__main__.py — export subcommand, mermaid removal, directory mode
  • flowr/domain/export.py — FlowExporter Protocol
  • flowr/exporters/ — JsonExporter, MermaidExporter, registry
  • docs/ — discovery artifacts, feature files, spec updates
  • tests/ — 17 BDD tests + 7 unit tests, 100% coverage

nullhack added 5 commits May 6, 2026 15:34
- Add export feature discovery artifacts (event storming, domain model,
  glossary updates, interview notes, feature file)
- Migrate system.md content into technical_design.md, delete system.md
- Convert all ASCII diagrams to Mermaid in spec docs
- Fix glossary orphaned entry, domain_model title/section order
- AGENTS.md: read overlapping in/out artifacts before dispatch (UPDATE not CREATE)
- AGENTS.md: unbundle dispatch phases with commit discipline reference
- flowr-spec: add git to common attrs keys
- Split export.feature into 3 features for INVEST compliance (core/json/mermaid)
- Add typed source stubs (FlowExporter Protocol, JsonExporter, MermaidExporter, registry)
- Add 17 test skeletons with @id traceability (all skipped)
- Add feature-specific Definition of Done for export
- Add post-mortem PM_20260506_non-hex-feature-ids
pyright inferred node dict as dict[str, str], but attrs is dict[str, Any].
Explicit annotation resolves the static type check failure.
@nullhack nullhack merged commit 3d7fb19 into main May 7, 2026
7 checks passed
@nullhack nullhack deleted the feat/export-command branch May 7, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant