Development Architecture Lens
Cognitive Mode: Development
Primary Question: "How is it built and tested?"
Focus: Project Structure, Build Tools, Quality Gates, Test Framework
When to Use
- Need to understand developer experience
- Documenting build and test infrastructure
- Analyzing code quality gates
- User invokes
/arch-lens-development or /make-arch-diag development
Critical Constraints
NEVER:
- Modify any source code files
- Include runtime architecture details
- Show business logic
ALWAYS:
- Focus on BUILD and TEST infrastructure
- Show quality gate pipeline
- Document test framework setup
- Include entry points
- BEFORE creating any diagram, LOAD the
/mermaid skill using the Skill tool - this is MANDATORY
Analysis Workflow
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
Project Structure
- Find top-level directory organization
- Identify module/package boundaries
- Look for: build configs, package definitions, project layout
Build Tooling
- Find build configuration
- Identify package manager and build backend
- Look for: build config files, makefiles, task runners, package managers
Linting & Formatting
- Find code quality tools
- Identify pre-commit hooks
- Look for: linter configs, formatter configs, pre-commit hooks, code quality tools
Type Checking
- Find type checking configuration
- Identify strictness level
- Look for: type checker configs, static analysis tools
Test Framework
- Find test configuration
- Identify test patterns and fixtures
- Look for: test configs, test directories, test runners, test fixtures
CI/CD (if present)
- Find CI configuration
- Identify workflow stages
- Look for: CI/CD configs, workflow definitions, pipeline configs
Entry Points
- Find CLI entry points
- Identify console scripts
- Look for: entry point definitions, command definitions, binary files
Step 2: Map Quality Pipeline
Document the code quality pipeline:
Code -> Format -> Lint -> Type Check -> Test -> Commit
CRITICAL - Analyze Read/Write Direction:
For EVERY build/test component:
- Inputs (reads): What files/config does this tool READ?
- Outputs (writes): What does this tool WRITE (reports, modified files)?
- Side effects: Does it modify source files or just report?
Distinguish:
- Tools that READ and MODIFY code (formatters)
- Tools that READ and REPORT only (linters, type checkers)
- Tools that READ code and WRITE artifacts (test output files)
- Config files (READ by tools, not written by build process)
Step 3: Count Project Metrics
| Metric |
Value |
| Source Files |
N |
| Test Files |
N |
| Dependencies |
N |
| Entry Points |
N |
Step 4: Create the Diagram
Use flowchart with:
Direction: TB for pipeline flow
Subgraphs:
- Project Structure (directories)
- Build Tools (packaging)
- Quality Gates (linting, types)
- Test Framework (test runner, etc)
- Entry Points (CLI commands)
Node Styling:
cli class: Project structure, directories
phase class: Build configuration
detector class: Quality gates (linting, typing)
handler class: Test framework
output class: Entry points, outputs
Show Pipeline Flow:
- Code through quality gates
- Build to entry points
Step 5: Write Output
Write the diagram to: temp/arch-lens-development/arch_diag_development_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Development Diagram: {Project Name}
**Lens:** Development (Build & Test)
**Question:** How is it built and tested?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Project Metrics
| Metric | Value |
|--------|-------|
| Source Directories | {count} |
| Test Files | {count} |
| Dependencies | {count} |
| Entry Points | {count} |
## Development Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
flowchart TB
%% CLASS DEFINITIONS %%
classDef cli 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 output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
subgraph Structure ["PROJECT STRUCTURE"]
direction TB
SRC["src/<br/>━━━━━━━━━━<br/>Source code"]
TESTS["tests/<br/>━━━━━━━━━━<br/>Test suite"]
end
subgraph Build ["BUILD TOOLING"]
direction TB
CONFIG["Build Config<br/>━━━━━━━━━━<br/>Build system"]
TASKFILE["Task Runner<br/>━━━━━━━━━━<br/>Task automation"]
end
subgraph Quality ["CODE QUALITY GATES"]
direction TB
FORMAT["Formatter<br/>━━━━━━━━━━<br/>Code style"]
LINT["Linter<br/>━━━━━━━━━━<br/>Code quality"]
TYPES["Type Checker<br/>━━━━━━━━━━<br/>Static analysis"]
end
subgraph Testing ["TEST FRAMEWORK"]
direction TB
TESTRUN["Test Runner<br/>━━━━━━━━━━<br/>Test execution"]
FIXTURES["Fixtures<br/>━━━━━━━━━━<br/>Test setup"]
end
subgraph EntryPoints ["ENTRY POINTS"]
direction LR
EP1["cli-command"]
end
%% FLOW %%
SRC --> CONFIG
TESTS --> CONFIG
CONFIG --> TASKFILE
CONFIG --> FORMAT
FORMAT --> LINT
LINT --> TYPES
TYPES --> TESTRUN
TESTRUN --> FIXTURES
CONFIG --> EP1
%% CLASS ASSIGNMENTS %%
class SRC,TESTS cli;
class CONFIG,TASKFILE phase;
class FORMAT,LINT,TYPES detector;
class TESTRUN,FIXTURES handler;
class EP1 output;
Color Legend:
| Color |
Category |
Description |
| Dark Blue |
Structure |
Project directories |
| Purple |
Build |
Configuration and automation |
| Red |
Quality |
Linters and type checkers |
| Orange |
Testing |
Test framework and fixtures |
| Dark Teal |
Entry Points |
CLI commands |
Development Workflow
Code -> format -> lint -> type-check -> test -> commit
Pre-commit Hooks
| Hook |
Purpose |
| {hook} |
{purpose} |
Entry Points
| Command |
Module |
Purpose |
| {command} |
{module} |
{purpose} |
---
## 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
1---2name: arch-lens-development3description: Create Development architecture diagram showing project structure, build tools, and quality gates. Development lens answering "How is it built and tested?"4---56# Development Architecture Lens78**Cognitive Mode:** Development9**Primary Question:** "How is it built and tested?"10**Focus:** Project Structure, Build Tools, Quality Gates, Test Framework1112## When to Use1314- Need to understand developer experience15- Documenting build and test infrastructure16- Analyzing code quality gates17- User invokes `/arch-lens-development` or `/make-arch-diag development`1819## Critical Constraints2021**NEVER:**22- Modify any source code files23- Include runtime architecture details24- Show business logic2526**ALWAYS:**27- Focus on BUILD and TEST infrastructure28- Show quality gate pipeline29- Document test framework setup30- Include entry points31- BEFORE creating any diagram, LOAD the `/mermaid` skill using the Skill tool - this is MANDATORY3233---3435## Analysis Workflow3637### Step 1: Launch Parallel Exploration Subagents3839Spawn Explore subagents to investigate:4041**Project Structure**42- Find top-level directory organization43- Identify module/package boundaries44- Look for: build configs, package definitions, project layout4546**Build Tooling**47- Find build configuration48- Identify package manager and build backend49- Look for: build config files, makefiles, task runners, package managers5051**Linting & Formatting**52- Find code quality tools53- Identify pre-commit hooks54- Look for: linter configs, formatter configs, pre-commit hooks, code quality tools5556**Type Checking**57- Find type checking configuration58- Identify strictness level59- Look for: type checker configs, static analysis tools6061**Test Framework**62- Find test configuration63- Identify test patterns and fixtures64- Look for: test configs, test directories, test runners, test fixtures6566**CI/CD (if present)**67- Find CI configuration68- Identify workflow stages69- Look for: CI/CD configs, workflow definitions, pipeline configs7071**Entry Points**72- Find CLI entry points73- Identify console scripts74- Look for: entry point definitions, command definitions, binary files7576### Step 2: Map Quality Pipeline7778Document the code quality pipeline:79```80Code -> Format -> Lint -> Type Check -> Test -> Commit81```8283**CRITICAL - Analyze Read/Write Direction:**84For EVERY build/test component:85- **Inputs (reads)**: What files/config does this tool READ?86- **Outputs (writes)**: What does this tool WRITE (reports, modified files)?87- **Side effects**: Does it modify source files or just report?8889Distinguish:90- Tools that READ and MODIFY code (formatters)91- Tools that READ and REPORT only (linters, type checkers)92- Tools that READ code and WRITE artifacts (test output files)93- Config files (READ by tools, not written by build process)9495### Step 3: Count Project Metrics9697| Metric | Value |98|--------|-------|99| Source Files | N |100| Test Files | N |101| Dependencies | N |102| Entry Points | N |103104### Step 4: Create the Diagram105106Use flowchart with:107108**Direction:** `TB` for pipeline flow109110**Subgraphs:**111- Project Structure (directories)112- Build Tools (packaging)113- Quality Gates (linting, types)114- Test Framework (test runner, etc)115- Entry Points (CLI commands)116117**Node Styling:**118- `cli` class: Project structure, directories119- `phase` class: Build configuration120- `detector` class: Quality gates (linting, typing)121- `handler` class: Test framework122- `output` class: Entry points, outputs123124**Show Pipeline Flow:**125- Code through quality gates126- Build to entry points127128### Step 5: Write Output129130Write the diagram to: `temp/arch-lens-development/arch_diag_development_{YYYY-MM-DD_HHMMSS}.md`131132---133134## Output Template135136```markdown137# Development Diagram: {Project Name}138139**Lens:** Development (Build & Test)140**Question:** How is it built and tested?141**Date:** {YYYY-MM-DD}142**Scope:** {What was analyzed}143144## Project Metrics145146| Metric | Value |147|--------|-------|148| Source Directories | {count} |149| Test Files | {count} |150| Dependencies | {count} |151| Entry Points | {count} |152153## Development Diagram154155```mermaid156%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%157flowchart TB158 %% CLASS DEFINITIONS %%159 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;160 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;161 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;162 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;163 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;164 classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;165166 subgraph Structure ["PROJECT STRUCTURE"]167 direction TB168 SRC["src/<br/>━━━━━━━━━━<br/>Source code"]169 TESTS["tests/<br/>━━━━━━━━━━<br/>Test suite"]170 end171172 subgraph Build ["BUILD TOOLING"]173 direction TB174 CONFIG["Build Config<br/>━━━━━━━━━━<br/>Build system"]175 TASKFILE["Task Runner<br/>━━━━━━━━━━<br/>Task automation"]176 end177178 subgraph Quality ["CODE QUALITY GATES"]179 direction TB180 FORMAT["Formatter<br/>━━━━━━━━━━<br/>Code style"]181 LINT["Linter<br/>━━━━━━━━━━<br/>Code quality"]182 TYPES["Type Checker<br/>━━━━━━━━━━<br/>Static analysis"]183 end184185 subgraph Testing ["TEST FRAMEWORK"]186 direction TB187 TESTRUN["Test Runner<br/>━━━━━━━━━━<br/>Test execution"]188 FIXTURES["Fixtures<br/>━━━━━━━━━━<br/>Test setup"]189 end190191 subgraph EntryPoints ["ENTRY POINTS"]192 direction LR193 EP1["cli-command"]194 end195196 %% FLOW %%197 SRC --> CONFIG198 TESTS --> CONFIG199 CONFIG --> TASKFILE200201 CONFIG --> FORMAT202 FORMAT --> LINT203 LINT --> TYPES204205 TYPES --> TESTRUN206 TESTRUN --> FIXTURES207208 CONFIG --> EP1209210 %% CLASS ASSIGNMENTS %%211 class SRC,TESTS cli;212 class CONFIG,TASKFILE phase;213 class FORMAT,LINT,TYPES detector;214 class TESTRUN,FIXTURES handler;215 class EP1 output;216```217218**Color Legend:**219| Color | Category | Description |220|-------|----------|-------------|221| Dark Blue | Structure | Project directories |222| Purple | Build | Configuration and automation |223| Red | Quality | Linters and type checkers |224| Orange | Testing | Test framework and fixtures |225| Dark Teal | Entry Points | CLI commands |226227## Development Workflow228229```230Code -> format -> lint -> type-check -> test -> commit231```232233## Pre-commit Hooks234235| Hook | Purpose |236|------|---------|237| {hook} | {purpose} |238239## Entry Points240241| Command | Module | Purpose |242|---------|--------|---------|243| {command} | {module} | {purpose} |244```245246---247248## Pre-Diagram Checklist249250Before creating the diagram, verify:251252- [ ] LOADED `/mermaid` skill using the Skill tool253- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)254- [ ] Diagram will include a color legend table255256---257258## Related Skills259260- `/make-arch-diag` - Parent skill for lens selection261- `/mermaid` - MUST BE LOADED before creating diagram