arch-lens-process-flow
Skill1 starsChanged 8 months agoMITView on GitHub
Create Process/Execution Flow architecture diagram showing runtime behavior, state transitions, and decision points. Physiological lens answering "How does it behave?
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arch-lens-c4-containerSkill
- arch-lens-concurrencySkill
- arch-lens-data-lineageSkill
- arch-lens-deploymentSkill
- arch-lens-developmentSkill
- arch-lens-error-resilienceSkill
- arch-lens-module-dependencySkill
- arch-lens-operationalSkill
- arch-lens-repository-accessSkill
- arch-lens-scenariosSkill
- arch-lens-securitySkill
- arch-lens-state-lifecycleSkill
- audit-archSkill
- audit-bugsSkill
- audit-cohesionSkill
- audit-defense-standardsSkill
- audit-frictionSkill
- audit-implSkill
- audit-testsSkill
- design-guardsSkill
- dry-walkthroughSkill
- elaborate-phaseSkill
- exp-lens-benchmark-representativenessSkill
- exp-lens-causal-assumptionsSkill
- exp-lens-comparator-constructionSkill
- exp-lens-error-budgetSkill
- exp-lens-estimand-claritySkill
- exp-lens-exploratory-confirmatorySkill
- exp-lens-fair-comparisonSkill
- exp-lens-governance-riskSkill
- exp-lens-iterative-learningSkill
- exp-lens-measurement-validitySkill
- exp-lens-pipeline-integritySkill
- exp-lens-randomization-blockingSkill
- exp-lens-reproducibility-artifactsSkill
- exp-lens-sensitivity-robustnessSkill
- exp-lens-severity-testingSkill
- exp-lens-unit-interferenceSkill
- exp-lens-validity-threatsSkill
- exp-lens-variance-stabilitySkill
- id-slopSkill
- implement-worktreeSkill
- investigateSkill
- make-arch-diagSkill
- make-experiment-diagSkill
- make-groupsSkill
- make-planSkill
- make-reqSkill
- make-scenariosSkill
- mermaidSkill
- plan-arcSkill
- rectifySkill
- review-approachSkill
- update-architectureSkill
- update-reqsSkill
- update-specsSkill
- verify-diagSkill
- verify-proposed-diagSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
BEFORE creating any diagram, LOAD the /mermaid skill using the Skill tool - this is MANDATORY
- Distinctive: line 50
Look for: state machine patterns, workflow graphs, FSM implementations, state enum/constants
- Distinctive: line 55
Look for: main(), run(), execute(), start(), __call__, async handlers
- Distinctive: line 60
Look for: if/else chains, switch/case, route_*, should_*, can_*, is_*
- Distinctive: line 65
Look for: while, for, retry logic, max_iterations, loop constructs
- Distinctive: line 70
Look for: return, raise/throw, complete, error, success, failure states
- Distinctive: line 114
Keep START/END outside subgraphs
- Very specific: line 129
Write the diagram to: temp/arch-lens-process-flow/arch_diag_process_flow_{YYYY-MM-DD_HHMMSS}.md
- Distinctive: line 214
Before creating the diagram, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Process Flow Architecture Lens
Cognitive Mode: Physiological Primary Question: "How does it behave?" Focus: Runtime Behavior, State Transitions, Decision Points, Control Flow
When to Use
- Need to understand runtime execution paths
- Documenting state machines or workflows
- Analyzing decision points and branching logic
- User invokes
/arch-lens-process-flowor/make-arch-diag process
Critical Constraints
NEVER:
- Modify any source code files
- Include static structure details (that's C4 lens)
- Show data storage details (that's data lineage lens)
ALWAYS:
- Focus on BEHAVIOR and STATE TRANSITIONS
- Show decision points as diamonds
- Include loop mechanisms and retry logic
- BEFORE creating any diagram, LOAD the
/mermaidskill using the Skill tool - this is MANDATORY
Analysis Workflow
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
State Machines & Workflows
- Find state definitions and transitions
- Identify workflow orchestration
- Look for: state machine patterns, workflow graphs, FSM implementations, state enum/constants
Entry Points & Triggers
- Find how processes are started
- Identify triggers and events
- Look for: main(), run(), execute(), start(), call, async handlers
Decision Points
- Find conditional logic that affects flow
- Identify routing functions
- Look for: if/else chains, switch/case, route_, should_, can_, is_
Loop Mechanisms
- Find iteration and retry patterns
- Identify continuation conditions
- Look for: while, for, retry logic, max_iterations, loop constructs
Terminal States
- Find completion conditions
- Identify error termination
- Look for: return, raise/throw, complete, error, success, failure states
Step 2: Map State Transitions
For each workflow/state machine discovered:
- States/Nodes: List all distinct states
- Transitions: Map state-to-state connections
- Guards: Conditions that determine transitions
- Actions: What happens during transitions
Step 3: Identify Flow Patterns
Document key patterns:
- Linear sequences (A -> B -> C)
- Branches (decision points)
- Loops (with termination conditions)
- Error paths
- Parallel paths (if any)
CRITICAL - Analyze Read/Write Direction: For EVERY node that interacts with state or storage:
- Reads from: What data does this node consume? From where?
- Writes to: What data does this node produce? To where?
- State mutations: Does it modify in-memory state, database, or files?
Label state interactions on edges:
- "reads" / "loads" / "queries" for input
- "writes" / "saves" / "updates" for output
- Distinguish primary storage (read/write) from write-only artifacts
Step 4: Create the Diagram
Use flowchart with:
Direction: TB for hierarchical flow, LR for sequential processes
Node Types:
([Label])- Rounded: Start/End terminals{Label}- Diamond: Decision points[Label]- Rectangle: Process nodes[[Label]]- Subroutine: Subgraph calls
Subgraphs for Phases:
- Group related states into phases
- Keep START/END outside subgraphs
Node Styling:
terminalclass: START, END, ERROR nodesphaseclass: Control flow, analysis nodeshandlerclass: Processing, execution nodesstateNodeclass: Decision, routing nodesdetectorclass: Validation gates, failure handling
Edge Labels:
- Show conditions on decision branches
- Include loop counts where relevant
Step 5: Write Output
Write the diagram to: temp/arch-lens-process-flow/arch_diag_process_flow_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Process Flow Diagram: {Workflow Name}
**Lens:** Process Flow (Physiological)
**Question:** How does it behave?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Workflow Overview
| Phase | Nodes | Key Decision Points | Loop Mechanism |
|-------|-------|---------------------|----------------|
| {phase} | {count} | {decisions} | {loop info} |
## Flow Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50, 'curve': 'basis'}}}%%
flowchart TB
%% CLASS DEFINITIONS %%
classDef terminal fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
%% TERMINALS %%
START([START])
COMPLETE([COMPLETE])
ERROR([ERROR])
subgraph Phase1 ["Phase Name"]
direction TB
N1["Node Name<br/>━━━━━━━━━━<br/>Description"]
N2{"Decision<br/>━━━━━━━━━━<br/>Condition?"}
N3["Process Node<br/>━━━━━━━━━━<br/>Action"]
end
%% FLOW %%
START --> N1
N1 --> N2
N2 -->|"condition A"| N3
N2 -->|"condition B"| ERROR
N3 --> COMPLETE
%% CLASS ASSIGNMENTS %%
class START,COMPLETE,ERROR terminal;
class N1,N3 handler;
class N2 stateNode;Color Legend:
| Color | Category | Description |
| Dark Blue | Terminal | Start, complete, and error states |
| Purple | Phase | Control flow and analysis nodes |
| Orange | Handler | Processing and execution nodes |
| Teal | State | Selection and routing decisions |
| Red | Detector | Validation gates and failure handling |
State Machine Characteristics
| Aspect | Value | Notes |
| Total Nodes | {count} | |
| Decision Points | {count} | |
| Loop Mechanism | {description} | {max iterations} |
| Error Paths | {count} |
Critical Routing Logic
- Condition A: {what triggers this path}
- Condition B: {what triggers this path}
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/make-arch-diag` - Parent skill for lens selection
- `/mermaid` - MUST BE LOADED before creating diagram
- `/arch-lens-concurrency` - For parallel execution details
- `/arch-lens-error-resilience` - For failure handling specificsDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

