Pflow
效率与工作流by stackdump
Petri net tools for Claude: validate, simulate, analyze, generate code, compose nets, seal models, and generate full-stack apps from natural language. 18 MCP tools for Petri net workflows.
Tools (22)
petri_analyzeAnalyze a Petri net model for behavioral properties including reachability, deadlocks, liveness, boundedness, and element importance.
petri_applicationGenerate a complete full-stack application from an Application specification. This accepts the high-level Application DSL with entities, roles, pages, and workflows.
petri_code_to_flowConvert source code into a formal Petri net model. Analyzes code structure (control flow, state machines, resource management, concurrency) and produces an executable, verifiable Petri net — not just a diagram.
petri_codegenGenerate executable code from a validated Petri net model. Produces event-sourced application code with state machine, events, and API handlers.
petri_composeCompose multiple Petri net models into a CompositeNet with typed links between them. Validates that link endpoints reference valid places/transitions in the referenced schemas.
petri_diffCompare two Petri net models and show structural differences. Reports added, removed, and modified places, transitions, arcs, roles, and access rules.
petri_docsGenerate markdown documentation from a Petri net model with mermaid diagrams for visualization. Useful for exploring and understanding models.
petri_extendModify an existing Petri net model by applying operations. Operations: add_place, add_transition, add_arc, add_event, add_event_field, add_binding, remove_place, remove_transition, remove_arc, remove_event, remove_binding. Returns the modified model.
petri_frontendGenerate a vanilla JavaScript ES modules frontend application from a Petri net model. Produces a Vite + ES modules project with API client, state display, and transition forms using plain JavaScript.
petri_helpReturns a recommended CLAUDE.md snippet for working with pflow Petri net models. Paste this into your project's CLAUDE.md to give Claude the context it needs to design and generate Petri net applications.
petri_jssdkGenerate a typed JS SDK (ES modules) from a Petri net model. Produces workflow.js, events.js, aggregate.js, permissions.js, test.js, and index.html that wrap pflow-engine.js for browser-first testing. Optionally preview a single file.
petri_migrateMigrate a Petri net model from v1 (flat) to v2 (nested) schema format. V2 format separates the net definition from extensions like roles and views.
petri_previewPreview a single generated file without full code generation. Use this to check specific files before committing to full generation. Available templates: main, workflow, events, aggregate, api, openapi, test, config, migrations, auth, middleware, permissions, views, navigation, admin, debug
petri_sealCreate a tamper-evident PetriNetSeal for a Petri net model. Computes a canonical SHA-256 hash and optionally verifies declared invariants via reachability analysis. Returns a JSON-LD seal document.
petri_simulateSimulate firing transitions and see state changes. Returns detailed step-by-step state trace. Use this to verify workflow behavior before code generation.
petri_submitSubmit a Petri net model to the public catalog. Only core Petri net structure is accepted (places, transitions, arcs) — no extensions or code. Models are content-addressed and deduplicated by hash.
petri_validateValidate a Petri net model for structural correctness. Checks for empty models, unconnected elements, and invalid arc references.
petri_verifyVerify a PetriNetSeal: recompute the model hash, check it matches the sealed CID, and re-verify all declared invariants via reachability analysis.
petri_visualizeGenerate an SVG visualization of a Petri net model showing places, transitions, and arcs.
pflow_validateValidate a Petri net model.json for common issues including dead workflows, missing initial tokens, invalid arcs, and entity/role consistency.
seal_listList sealed Petri net models from the catalog. Returns catalog entries with metadata (name, type, CID, invariant summaries, tags). Optionally filter by net type, tag, or text query.
seal_searchGet the full PetriNetSeal document for a model by its @id or modelCID. Returns the complete seal with model, hash, invariants, and verification results.
Related MCP Servers
MCP server for terminal commands, file operations, and process management
5.8kOpen-source SEC EDGAR toolkit — 11 tools, 7 prompts, every filing type. No API key required.
1.9k