src/autoskillit/skills_extended/arch-lens-concurrency/SKILL.md
Create Concurrency architecture diagram showing parallel execution patterns, thread pools, synchronization, and barriers. Physiological lens answering "How does parallelism work?"
npx skillsauth add talont-org/autoskillit arch-lens-concurrencyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Cognitive Mode: Physiological Primary Question: "How does parallelism work?" Focus: Parallel Execution, Thread Pools, Synchronization, Barriers
/autoskillit:arch-lens-concurrency or /autoskillit:make-arch-diag concurrencyNEVER:
run_in_background: true is prohibited)ALWAYS:
/autoskillit:mermaid skill using the Skill tool - this is MANDATORYtemp/arch-lens-concurrency/...
save path to absolute by prepending the full CWD:
diagram_path = /absolute/cwd/temp/arch-lens-concurrency/{filename}.md
This token is MANDATORY — the pipeline cannot proceed without it./autoskillit:arch-lens-concurrency [context_path]
If a context_path positional argument is present:
context_pathIf no context_path is provided, skip this step and explore the full CWD in Step 1.
Spawn Explore subagents to investigate:
Concurrency Model
Worker Pools
Parallel Operations
Synchronization Points
State Access
Sequential Boundaries
Document:
CRITICAL - Analyze Read/Write Direction: For EVERY concurrent component and shared resource:
Identify:
For each shared resource:
Use flowchart with:
Direction: TB for spawn-barrier-collect pattern
Subgraphs:
Node Styling:
terminal class: Start/end pointsphase class: Sequential nodesnewComponent class: Parallel workers (green)detector class: Spawn and barrier pointshandler class: Processing within workersoutput class: Atomic state updatesstateNode class: Thread safety mechanismsSpecial Elements:
Write the diagram to: {{AUTOSKILLIT_TEMP}}/arch-lens-concurrency/arch_diag_concurrency_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
After writing the diagram file, emit a structured output line:
IMPORTANT: Emit the structured output tokens as literal plain text with no markdown formatting on the token names. Do not wrap token names in
**bold**,*italic*, or any other markdown. The adjudicator performs a regex match on the exact token name — decorators cause match failure.
diagram_path = {absolute_path_to_diagram_file}
# Concurrency Diagram: {System Name}
**Lens:** Concurrency (Physiological)
**Question:** How does parallelism work?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Concurrency Model
| Aspect | Value | Notes |
|--------|-------|-------|
| Primary Model | {threading/asyncio/multiprocessing} | |
| Worker Pool Type | {ThreadPoolExecutor/etc} | |
| Max Workers | {count} | |
| Parallel Operations | {what is parallelized} | |
## Concurrency 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;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;
subgraph MainThread ["MAIN THREAD (Sequential)"]
direction TB
START([START])
INIT["Initialize<br/>━━━━━━━━━━<br/>Setup state"]
DECISION{"Multiple<br/>items?"}
SEQ["Sequential Path<br/>━━━━━━━━━━<br/>Single thread"]
SPAWN["Spawn Workers<br/>━━━━━━━━━━<br/>Fork point"]
BARRIER["Barrier<br/>━━━━━━━━━━<br/>Wait for all"]
ATOMIC["Atomic Update<br/>━━━━━━━━━━<br/>Main thread only"]
COMPLETE([COMPLETE])
end
subgraph ThreadPool ["THREAD POOL (Parallel)"]
direction TB
W1["Worker 1<br/>━━━━━━━━━━<br/>Task execution"]
W2["Worker 2<br/>━━━━━━━━━━<br/>Task execution"]
WN["Worker N<br/>━━━━━━━━━━<br/>Task execution"]
end
subgraph Isolation ["THREAD SAFETY"]
direction TB
ISO1["Isolated state"]
ISO2["No shared writes"]
ISO3["Return data only"]
end
%% MAIN FLOW %%
START --> INIT
INIT --> DECISION
DECISION -->|"1 item"| SEQ
DECISION -->|"N items"| SPAWN
SEQ --> COMPLETE
%% PARALLEL FLOW %%
SPAWN --> W1
SPAWN --> W2
SPAWN --> WN
W1 --> BARRIER
W2 --> BARRIER
WN --> BARRIER
BARRIER --> ATOMIC
ATOMIC --> COMPLETE
%% ISOLATION %%
W1 -.-> ISO1
W2 -.-> ISO2
WN -.-> ISO3
%% CLASS ASSIGNMENTS %%
class START,COMPLETE terminal;
class INIT,SEQ phase;
class DECISION stateNode;
class SPAWN,BARRIER detector;
class W1,W2,WN newComponent;
class ATOMIC output;
class ISO1,ISO2,ISO3 stateNode;
Color Legend: | Color | Category | Description | |-------|----------|-------------| | Dark Blue | Terminal | Start and end points | | Purple | Sequential | Single-threaded nodes | | Green | Workers | Parallel workers | | Red | Synchronization | Spawn and barrier points | | Dark Teal | Atomic | Main-thread-only state updates | | Teal | Isolation | Thread safety guarantees |
| Component | Model | Synchronization | |-----------|-------|-----------------| | {component} | {single-threaded/parallel} | {mechanism} |
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/autoskillit: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
- `/autoskillit:make-arch-diag` - Parent skill for lens selection
- `/autoskillit:mermaid` - MUST BE LOADED before creating diagram
- `/autoskillit:arch-lens-process-flow` - For general workflow view
- `/autoskillit:arch-lens-error-resilience` - For parallel failure handling
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"