Operational Architecture Lens
Cognitive Mode: Operational
Primary Question: "How is it run and monitored?"
Focus: CLI Workflows, Configuration, Observability, Task Commands
When to Use
- Need to understand operator/admin perspective
- Documenting CLI commands and workflows
- Analyzing configuration and monitoring setup
- User invokes
/arch-lens-operational or /make-arch-diag operational
Critical Constraints
NEVER:
- Modify any source code files
- Include internal implementation details
- Show code-level patterns
ALWAYS:
- Focus on OPERATOR experience
- Show CLI commands and their purposes
- Document configuration hierarchy
- Include monitoring and logging outputs
- 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:
CLI Entry Points
- Find all CLI commands
- Identify command groups and subcommands
- Look for: CLI frameworks (Click, argparse, Commander, etc.), entry points, main commands
Configuration
- Find configuration sources
- Identify environment variables
- Look for: config files (config.yaml, .env, settings.json, application.yml), environment variable usage, configuration libraries
Task Automation
- Find task runner definitions
- Identify automation scripts
- Look for: Taskfile.yml, Makefile, package.json scripts, Rakefile, scripts/ directory
Logging & Monitoring
- Find logging configuration
- Identify observability outputs
- Look for: logging configuration, log files, metrics, activity logs, temp/ output directories
Status & Health
- Find status/health commands
- Identify diagnostic outputs
- Look for: status, health, info, diagnose, check commands
Reset & Recovery
- Find reset/cleanup commands
- Identify recovery operations
- Look for: reset, clean, clear, purge, restore commands
Step 2: Map Operator Workflows
Document common operator workflows:
- Create: How to start new work
- Run: How to execute
- Monitor: How to check status
- Debug: How to diagnose issues
- Reset: How to recover from errors
CRITICAL - Analyze Read/Write Direction:
For EVERY operational component:
- Configuration: READ from env/files (input to system)
- State tracking: Does the system READ and WRITE, or just WRITE?
- Logs/monitoring: Typically WRITE-only (system writes, humans read)
- Status commands: READ from state to display
Clearly categorize:
- State (read/write): System reads back to make decisions
- Artifacts (write-only): System writes for human inspection, never reads back
- Config (read-only): System reads but doesn't modify
Step 3: Document Configuration Hierarchy
Example pattern (adjust to actual system):
1. Environment Variables (highest priority)
2. Secret files (e.g., .secrets.toml, .env.local)
3. Project config (e.g., config.yaml, settings.json)
4. Defaults (lowest priority)
Step 4: Create the Diagram
Use flowchart with:
Direction: TB for hierarchical command structure
Subgraphs:
- CLI Entry Points (commands)
- Configuration (sources)
- Registry/State (tracking)
- Monitoring (observability)
- Task Commands (automation)
Node Styling:
cli class: CLI commands
phase class: Configuration sources
stateNode class: State tracking (database, registry)
output class: Monitoring outputs
handler class: Task automation commands
Show Relationships:
- Commands to configuration
- Commands to state tracking
- State to monitoring outputs
Step 5: Write Output
Write the diagram to: temp/arch-lens-operational/arch_diag_operational_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Operational Diagram: {System Name}
**Lens:** Operational (Administration)
**Question:** How is it run and monitored?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## CLI Commands Quick Reference
| Command | Purpose | Key Flags |
|---------|---------|-----------|
| {command} | {purpose} | {flags} |
## Operational 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;
subgraph CLI ["CLI ENTRY POINTS"]
direction TB
CMD1["command-name<br/>━━━━━━━━━━<br/>--flag1 --flag2<br/>Purpose"]
end
subgraph Config ["CONFIGURATION"]
direction TB
ENV["Environment Variables<br/>━━━━━━━━━━<br/>API keys, modes"]
SETTINGS["Config File<br/>━━━━━━━━━━<br/>Project config"]
end
subgraph Registry ["STATE TRACKING"]
direction TB
STATE["State Repository<br/>━━━━━━━━━━<br/>Active state<br/>Progress"]
end
subgraph Monitoring ["OBSERVABILITY"]
direction TB
LOGS["Activity Logs<br/>━━━━━━━━━━<br/>Step-by-step"]
DEBUG["Debug Artifacts<br/>━━━━━━━━━━<br/>temp/ directory"]
end
subgraph Tasks ["TASK COMMANDS"]
direction TB
TASK1["task command<br/>━━━━━━━━━━<br/>Automation"]
end
%% FLOWS %%
CMD1 --> ENV
ENV --> SETTINGS
CMD1 --> STATE
CMD1 --> LOGS
LOGS --> DEBUG
%% CLASS ASSIGNMENTS %%
class CMD1 cli;
class ENV,SETTINGS phase;
class STATE stateNode;
class LOGS,DEBUG output;
class TASK1 handler;
Color Legend:
| Color |
Category |
Description |
| Dark Blue |
CLI |
Command-line entry points |
| Purple |
Config |
Configuration hierarchy |
| Teal |
Registry |
State tracking |
| Dark Teal |
Monitoring |
Observability outputs |
| Orange |
Tasks |
Task automation |
Configuration Hierarchy
| Priority |
Source |
Example |
| 1 (highest) |
Environment |
API_KEY=... |
| 2 |
Secret file |
.env.local |
| 3 |
Config file |
config.yaml |
| 4 (lowest) |
Defaults |
Built-in |
Operator Workflows
Create New Work
{command example}
Check Status
{command example}
Reset/Recovery
{command example}
---
## 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-development` - For build tooling view
- `/arch-lens-deployment` - For infrastructure view
1---2name: arch-lens-operational3description: Create Operational architecture diagram showing CLI workflows, configuration, and observability. Administration lens answering "How is it run and monitored?"4---56# Operational Architecture Lens78**Cognitive Mode:** Operational9**Primary Question:** "How is it run and monitored?"10**Focus:** CLI Workflows, Configuration, Observability, Task Commands1112## When to Use1314- Need to understand operator/admin perspective15- Documenting CLI commands and workflows16- Analyzing configuration and monitoring setup17- User invokes `/arch-lens-operational` or `/make-arch-diag operational`1819## Critical Constraints2021**NEVER:**22- Modify any source code files23- Include internal implementation details24- Show code-level patterns2526**ALWAYS:**27- Focus on OPERATOR experience28- Show CLI commands and their purposes29- Document configuration hierarchy30- Include monitoring and logging outputs31- 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**CLI Entry Points**42- Find all CLI commands43- Identify command groups and subcommands44- Look for: CLI frameworks (Click, argparse, Commander, etc.), entry points, main commands4546**Configuration**47- Find configuration sources48- Identify environment variables49- Look for: config files (config.yaml, .env, settings.json, application.yml), environment variable usage, configuration libraries5051**Task Automation**52- Find task runner definitions53- Identify automation scripts54- Look for: Taskfile.yml, Makefile, package.json scripts, Rakefile, scripts/ directory5556**Logging & Monitoring**57- Find logging configuration58- Identify observability outputs59- Look for: logging configuration, log files, metrics, activity logs, temp/ output directories6061**Status & Health**62- Find status/health commands63- Identify diagnostic outputs64- Look for: status, health, info, diagnose, check commands6566**Reset & Recovery**67- Find reset/cleanup commands68- Identify recovery operations69- Look for: reset, clean, clear, purge, restore commands7071### Step 2: Map Operator Workflows7273Document common operator workflows:74- **Create**: How to start new work75- **Run**: How to execute76- **Monitor**: How to check status77- **Debug**: How to diagnose issues78- **Reset**: How to recover from errors7980**CRITICAL - Analyze Read/Write Direction:**81For EVERY operational component:82- **Configuration**: READ from env/files (input to system)83- **State tracking**: Does the system READ and WRITE, or just WRITE?84- **Logs/monitoring**: Typically WRITE-only (system writes, humans read)85- **Status commands**: READ from state to display8687Clearly categorize:88- **State (read/write)**: System reads back to make decisions89- **Artifacts (write-only)**: System writes for human inspection, never reads back90- **Config (read-only)**: System reads but doesn't modify9192### Step 3: Document Configuration Hierarchy9394Example pattern (adjust to actual system):95```961. Environment Variables (highest priority)972. Secret files (e.g., .secrets.toml, .env.local)983. Project config (e.g., config.yaml, settings.json)994. Defaults (lowest priority)100```101102### Step 4: Create the Diagram103104Use flowchart with:105106**Direction:** `TB` for hierarchical command structure107108**Subgraphs:**109- CLI Entry Points (commands)110- Configuration (sources)111- Registry/State (tracking)112- Monitoring (observability)113- Task Commands (automation)114115**Node Styling:**116- `cli` class: CLI commands117- `phase` class: Configuration sources118- `stateNode` class: State tracking (database, registry)119- `output` class: Monitoring outputs120- `handler` class: Task automation commands121122**Show Relationships:**123- Commands to configuration124- Commands to state tracking125- State to monitoring outputs126127### Step 5: Write Output128129Write the diagram to: `temp/arch-lens-operational/arch_diag_operational_{YYYY-MM-DD_HHMMSS}.md`130131---132133## Output Template134135```markdown136# Operational Diagram: {System Name}137138**Lens:** Operational (Administration)139**Question:** How is it run and monitored?140**Date:** {YYYY-MM-DD}141**Scope:** {What was analyzed}142143## CLI Commands Quick Reference144145| Command | Purpose | Key Flags |146|---------|---------|-----------|147| {command} | {purpose} | {flags} |148149## Operational Diagram150151```mermaid152%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%153flowchart TB154 %% CLASS DEFINITIONS %%155 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;156 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;157 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;158 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;159 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;160161 subgraph CLI ["CLI ENTRY POINTS"]162 direction TB163 CMD1["command-name<br/>━━━━━━━━━━<br/>--flag1 --flag2<br/>Purpose"]164 end165166 subgraph Config ["CONFIGURATION"]167 direction TB168 ENV["Environment Variables<br/>━━━━━━━━━━<br/>API keys, modes"]169 SETTINGS["Config File<br/>━━━━━━━━━━<br/>Project config"]170 end171172 subgraph Registry ["STATE TRACKING"]173 direction TB174 STATE["State Repository<br/>━━━━━━━━━━<br/>Active state<br/>Progress"]175 end176177 subgraph Monitoring ["OBSERVABILITY"]178 direction TB179 LOGS["Activity Logs<br/>━━━━━━━━━━<br/>Step-by-step"]180 DEBUG["Debug Artifacts<br/>━━━━━━━━━━<br/>temp/ directory"]181 end182183 subgraph Tasks ["TASK COMMANDS"]184 direction TB185 TASK1["task command<br/>━━━━━━━━━━<br/>Automation"]186 end187188 %% FLOWS %%189 CMD1 --> ENV190 ENV --> SETTINGS191 CMD1 --> STATE192 CMD1 --> LOGS193 LOGS --> DEBUG194195 %% CLASS ASSIGNMENTS %%196 class CMD1 cli;197 class ENV,SETTINGS phase;198 class STATE stateNode;199 class LOGS,DEBUG output;200 class TASK1 handler;201```202203**Color Legend:**204| Color | Category | Description |205|-------|----------|-------------|206| Dark Blue | CLI | Command-line entry points |207| Purple | Config | Configuration hierarchy |208| Teal | Registry | State tracking |209| Dark Teal | Monitoring | Observability outputs |210| Orange | Tasks | Task automation |211212## Configuration Hierarchy213214| Priority | Source | Example |215|----------|--------|---------|216| 1 (highest) | Environment | `API_KEY=...` |217| 2 | Secret file | .env.local |218| 3 | Config file | config.yaml |219| 4 (lowest) | Defaults | Built-in |220221## Operator Workflows222223### Create New Work224```bash225{command example}226```227228### Check Status229```bash230{command example}231```232233### Reset/Recovery234```bash235{command example}236```237```238239---240241## Pre-Diagram Checklist242243Before creating the diagram, verify:244245- [ ] LOADED `/mermaid` skill using the Skill tool246- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)247- [ ] Diagram will include a color legend table248249---250251## Related Skills252253- `/make-arch-diag` - Parent skill for lens selection254- `/mermaid` - MUST BE LOADED before creating diagram255- `/arch-lens-development` - For build tooling view256- `/arch-lens-deployment` - For infrastructure view