一键导入
architecture
This skill should be used when the user asks to "design system", "create ADR", "review architecture", or mentions architectural decisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill should be used when the user asks to "design system", "create ADR", "review architecture", or mentions architectural decisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
On-demand adversarial quality reviews using strategy templates. Selects strategies by criticality level, executes adversarial templates against deliverables, and scores quality using LLM-as-Judge rubric. Integrates with quality-enforcement.md SSOT.
Product management and product marketing decision framework. Invoke when users need product strategy (PRDs, vision, roadmaps), customer insight (personas, journey maps, VOC), business analysis (business cases, market sizing, pricing), competitive intelligence (battle cards, win/loss, competitive analysis), or go-to-market planning (GTM plans, positioning, MRDs, buyer personas). Uses 18 validated industry frameworks organized around Cagan's Value Risk and Business Viability Risk domains. Supports discovery mode (hypothesis-driven) and delivery mode (stakeholder-ready). Trigger keywords - PRD, product requirements, roadmap, prioritize, RICE, persona, journey map, VOC, business case, market sizing, TAM, competitive analysis, battle card, GTM, go-to-market, positioning, messaging, MRD.
Structured prompt construction and quality validation for Jerry Framework. Invoke when building structured prompts, generating NPT-009/NPT-013 constraints, or scoring prompt quality. Guides users through the 5-element prompt anatomy, generates formatted constraints with XML wrapping, and scores prompts against the 7-criterion rubric.
INTERNAL SKILL — auto-loaded for framework output voice quality. Reviews, rewrites, and scores framework output text for persona compliance using the Shane McConkey ethos: joy and excellence as multipliers. Governs quality gate messages, error messages, CLI output, hook text, and framework-generated text. Not user-invocable; loaded automatically when framework output needs voice enforcement.
Parse, extract, and format transcripts (VTT, SRT, plain text) into structured Markdown packets with action items, decisions, questions, and topics. v2.0 uses hybrid Python+LLM architecture for VTT files. Integrates with ps-critic for quality review.
Work item tracking and task management using the Jerry Framework hierarchy (Initiative, Epic, Feature, Story, Task, Enabler, Bug, Impediment). Manages WORKTRACKER.md manifests, tracks progress, and enforces template usage for consistent work decomposition.
| name | architecture |
| description | This skill should be used when the user asks to "design system", "create ADR", "review architecture", or mentions architectural decisions. |
| version | 1.0.0 |
| allowed-tools | ["Read","Write","Grep","Glob","Edit"] |
| activation-keywords | ["architecture","design system","ADR","architecture decision","hexagonal","ports and adapters","review architecture","architectural compliance","layer dependencies","domain model"] |
Version: 1.0.0 Framework: Jerry Architecture (ARCH) Constitutional Compliance: Jerry Constitution v1.0
| Section | Purpose |
|---|---|
| Purpose | What this skill does |
| When to Use This Skill | Activation triggers |
| Available Agents | Agent registry for this skill |
| Commands | CLI commands and examples |
| Architectural Principles | Core design principles |
| Layer Dependency Rules | Import boundary enforcement |
| Templates | Available templates |
| Constitutional Compliance | Principle mapping |
| Integration with Other Skills | Cross-skill workflows |
| Quick Reference | Common tasks and decision workflows |
| Routing Disambiguation | When this skill is the wrong choice |
| References | Canonical sources |
This SKILL.md serves multiple audiences:
| Level | Audience | Sections to Focus On |
|---|---|---|
| L0 (ELI5) | New users, stakeholders | Purpose, When to Use, Architectural Principles |
| L1 (Engineer) | Developers implementing features | Commands, Layer Dependency Rules, References |
| L2 (Architect) | System designers | Architectural Principles, Constitutional Compliance |
The Architecture skill provides guidance for system design, architecture review, and structural analysis. It helps maintain hexagonal architecture principles and ensures consistent design decisions.
Activate when:
This skill provides command-based analysis rather than agent-based workflows. Commands are invoked via natural language or explicit requests.
| Command | Purpose | Output Location |
|---|---|---|
analyze | Verify architectural compliance of a component | Console + optional file |
diagram | Generate architecture visualizations | Console or specified file path |
review | Review design documents against checklists | Console + optional file |
decision | Create an Architecture Decision Record | docs/design/ADR_NNN_*.md |
Analyze a component's architectural compliance.
@architecture analyze <path> [--depth DEPTH]
Arguments:
path: Path to component (file or directory)--depth: Analysis depth (surface, deep) (default: surface)Example:
@architecture analyze src/domain/
Output:
Architecture Analysis: src/domain/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer: Domain (Innermost)
Compliance: ✓ PASS
Checks:
✓ No external package imports
✓ No imports from application/
✓ No imports from infrastructure/
✓ No imports from interface/
✓ Entities use dataclasses
✓ Value objects are frozen
Components Found:
- aggregates/work_item.py (Aggregate Root)
- aggregates/project.py (Aggregate Root)
- value_objects/status.py (Value Object)
- ports/repository.py (Secondary Port)
Recommendations:
- Consider adding domain events for state changes
Generate architecture diagrams.
@architecture diagram <type> [--output PATH] [--format FORMAT]
Arguments:
type: hexagonal, component, sequence, data-flow--output: Output file path--format: mermaid, plantuml, ascii (default: mermaid)Example:
@architecture diagram hexagonal --format mermaid
Output:
graph TB
subgraph "Interface Layer"
CLI[CLI Adapter]
API[API Adapter]
end
subgraph "Application Layer"
UC[Use Cases]
CMD[Commands]
QRY[Queries]
end
subgraph "Domain Layer"
AGG[Aggregates]
VO[Value Objects]
EVT[Domain Events]
PORT[Ports]
end
subgraph "Infrastructure Layer"
REPO[Repository Adapter]
MSG[Messaging Adapter]
end
CLI --> UC
API --> UC
UC --> CMD
UC --> QRY
CMD --> AGG
QRY --> AGG
AGG --> PORT
PORT -.-> REPO
EVT -.-> MSG
Review a design document or proposed change.
@architecture review <path> [--checklist CHECKLIST]
Arguments:
path: Path to design document or code--checklist: Checklist to apply (hexagonal, ddd, solid, all)Example:
@architecture review docs/design/AUTH_DESIGN.md --checklist hexagonal
Output:
Architecture Review: AUTH_DESIGN.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Checklist: Hexagonal Architecture
Domain Layer:
✓ Business logic isolated from infrastructure
✓ Entities enforce invariants
⚠ Missing domain events for state changes
Ports:
✓ IUserRepository defined as protocol
✓ ITokenService defined as protocol
✗ INotifier port missing for notifications
Adapters:
✓ JWTTokenAdapter implements ITokenService
✓ SQLiteUserRepository implements IUserRepository
⚠ Consider adding InMemory adapters for testing
Dependency Direction:
✓ Domain has no outward dependencies
✓ Application depends only on domain
✓ Infrastructure implements domain ports
Overall: PASS with recommendations
Recommendations:
1. Add UserRegistered domain event
2. Define INotifier port for email notifications
3. Create InMemoryUserRepository for unit tests
Create an Architecture Decision Record (ADR).
@architecture decision <title> [--status STATUS]
Arguments:
title: Decision title--status: proposed, accepted, deprecated, supersededExample:
@architecture decision "Use SQLite for persistence"
Creates: docs/design/ADR_001_sqlite_persistence.md
Template:
# ADR-001: Use SQLite for Persistence
**Status**: Proposed
**Date**: 2026-01-07
**Author**: Claude
## Context
{What is the issue that we're seeing that is motivating this decision?}
## Decision
We will use SQLite for persistence because...
## Consequences
### Positive
- {Benefit 1}
- {Benefit 2}
### Negative
- {Drawback 1}
- {Drawback 2}
### Neutral
- {Observation}
## Alternatives Considered
| Option | Pros | Cons | Decision |
|--------|------|------|----------|
| SQLite | ... | ... | Selected |
| PostgreSQL | ... | ... | Rejected |
| File-based | ... | ... | Rejected |
## References
- {Link to relevant documentation}
"Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases." — Alistair Cockburn
Key Rules:
Tactical Patterns Used:
┌─────────────────────────────────────────┐
│ Interface Layer │
│ (CLI, API - may import all layers) │
├─────────────────────────────────────────┤
│ Infrastructure Layer │
│ (may import domain, application) │
├─────────────────────────────────────────┤
│ Application Layer │
│ (may import domain only) │
├─────────────────────────────────────────┤
│ Domain Layer │
│ (NO external imports - stdlib only) │
└─────────────────────────────────────────┘
Architecture artifacts should use standardized templates to ensure consistency.
Location: .context/templates/
| Template | Use For | Path |
|---|---|---|
adr.md | Architecture Decision Records | docs/knowledge/exemplars/templates/adr.md |
Usage: When creating a new ADR, reference the template to ensure consistent structure and sections.
All architecture work adheres to the Jerry Constitution v1.0:
| Principle | Requirement | Consequence of Violation |
|---|---|---|
| P-003 | NEVER spawn recursive subagents -- max 1 level | Agent hierarchy violation; uncontrolled token consumption |
| P-020 | NEVER override user intent -- ask before destructive ops | Unauthorized action; trust erosion |
| P-022 | NEVER deceive about actions, capabilities, or confidence | Governance undermined; quality assessment invalidated |
| P-002 | NEVER leave outputs in transient context only -- persist to files | Context rot vulnerability; artifacts lost on session compaction |
| P-004 | NEVER omit reasoning provenance or source documentation in ADRs | Untraceable decisions; audit trail broken |
| P-011 | NEVER make architecture recommendations without supporting evidence | Unsupported recommendations; confidence inflated without basis |
| H-07 | NEVER violate architecture layer isolation -- domain, application, composition root boundaries enforced | Architecture layer corruption; dependency violations propagate |
| H-10 | NEVER place multiple public classes in a single file | File bloat; class discovery degraded |
The architecture skill integrates with other Jerry skills:
| Skill | Integration Point | Example |
|---|---|---|
/problem-solving | ps-architect creates ADRs | Architecture decisions documented via ps-architect agent |
/nasa-se | nse-architecture formal trade studies | NASA SE process informs architecture decisions |
/orchestration | Multi-phase design workflows | Orchestrated architecture review processes |
Cross-Skill Handoff:
ps-architect output → architecture review command for validationnse-architecture trade study → architecture decision for ADR creation| Task | Command / Approach | Output |
|---|---|---|
| Verify layer compliance | @architecture analyze src/domain/ | Console report with pass/fail |
| Generate hexagonal diagram | @architecture diagram hexagonal --format mermaid | Mermaid diagram |
| Review design document | @architecture review docs/design/AUTH_DESIGN.md --checklist hexagonal | Checklist report |
| Create an ADR | @architecture decision "Use SQLite for persistence" | docs/design/ADR_NNN_*.md |
| Check import boundaries | @architecture analyze src/ --depth deep | Full dependency analysis |
| Step | Action | Artifact |
|---|---|---|
| 1. Identify need | Recognize architectural choice required | Problem statement |
| 2. Research options | Use /problem-solving for analysis | Research findings |
| 3. Evaluate trade-offs | Use /nasa-se for formal trade study | Trade study matrix |
| 4. Document decision | @architecture decision "<title>" | ADR in docs/design/ |
| 5. Validate compliance | @architecture analyze <path> | Compliance report |
When this skill is the wrong choice and what happens if misrouted.
| Condition | Use Instead | Consequence of Misrouting |
|---|---|---|
| Root cause analysis or debugging needed | /problem-solving (ps-investigator) | Architecture methodology (layer dependency rules, CQRS patterns, hexagonal structure) applied to investigation tasks produces structural design artifacts instead of causal chains; root cause not isolated |
| Requirements engineering or V&V needed | /nasa-se | Requirements expressed as architectural decisions; V&V traceability lost; compliance gaps not detected |
| Offensive security testing or penetration testing | /red-team | Architecture compliance checks applied to offensive engagement produce structural diagrams instead of attack narratives; engagement methodology entirely absent |
| Adversarial quality review or tournament scoring | /adversary | Architecture review checklists applied instead of adversarial strategy templates; S-014 scoring rubric not loaded |
| Security hardening or threat modeling | /eng-team | Architecture skill lacks STRIDE/DREAD methodology; security-specific governance layers (OWASP, NIST SSDF) not available |
| Multi-agent workflow coordination | /orchestration | Architecture commands are single-step operations; no state tracking, checkpointing, or sync barrier capability |
.context/rules/architecture-standards.mddocs/governance/JERRY_CONSTITUTION.mdSkill Version: 1.0.0 Constitutional Compliance: Jerry Constitution v1.0 Last Updated: 2026-02-16