원클릭으로
code-review-architecture
Architecture code review lens for assessing design quality, coupling, cohesion, and structural integrity.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Architecture code review lens for assessing design quality, coupling, cohesion, and structural integrity.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
pi-ensemble's bundled vipune memory doctrine — full reference for using the vipune CLI as a project-scoped semantic memory store. Encodes the 5-type memory taxonomy (fact, preference, procedure, guard, observation), the active/candidate status split as the long-term/short-term mechanism, freshness verification before acting on recalled memories, conflict handling via --supersedes, periodic consolidation reflexes, the hard prohibition on storing secrets, and pi-ensemble-specific framing (multi-agent shared DB, session autosave). Use this skill whenever starting a project task; before delegating work; before making architectural decisions; after task completion; when the user mentions "remember"/"recall"/"vipune"; when surprised by codebase reality vs recalled memory; or when encountering a known-feeling pitfall. Project-scoped, semantic-search-driven; designed to make every session smarter than the last without context bloat or memory rot.
REST and GraphQL API design with versioning, authentication, and OpenAPI documentation. Use when designing API endpoints, request/response formats, or API architecture. Do NOT use for implementation in specific languages.
Error-handling and resilience code review lens for catching silent failures, unbounded I/O, swallowed exceptions, and partial-failure pitfalls.
Performance code review lens for identifying bottlenecks, inefficient algorithms, and resource waste.
Security-focused code review lens for identifying vulnerabilities, injection risks, auth flaws, and unsafe patterns.
Simplicity code review lens for identifying unnecessary complexity, dead code, and maintainability issues.
SOC 직업 분류 기준
| name | code-review-architecture |
| description | Architecture code review lens for assessing design quality, coupling, cohesion, and structural integrity. |
Specialized agent for architectural analysis during code review. Focuses on design patterns, modularity, coupling, and systemic concerns.
When PM explicitly dispatches this lens:
Do NOT broaden into:
All findings must follow this structure:
## Must Fix
- [CRITICAL|HIGH] [path:line] Title
- Description: What is wrong and why it matters
- Suggestion: Specific fix with code example
- Metadata: cross_lens_candidate=true/false, tradeoff_required=true/false
## Observations
- [MEDIUM|LOW] [path:line] Title
- Description: Informational finding
- Metadata: cross_lens_candidate=true/false, tradeoff_required=true/false
## Summary
[One paragraph overall assessment]
When reporting findings, always include:
cross_lens_candidate: Indicates this finding might also be relevant to other lenses
true if this finding could trigger other lens checks (e.g., tight coupling might affect both architecture and simplicity)false if this is purely an architectural concerntradeoff_required: Indicates if fixing this requires accepting a tradeoff
true if the fix involves significant refactoring, complexity, or timeline tradeoffsfalse if the fix is straightforward with no downsideCoupling and Cohesion
Separation of Concerns
Abstraction and Interfaces
Module Boundaries
Design Patterns
Data Flow
Extensibility and Maintainability
Transaction Boundary Invariants
BEGIN/COMMIT), Spring @Transactional, .NET TransactionScope, Go sql.Tx, Elixir Ecto.Multi, Python SQLAlchemy Session.begin, any ORM's transaction { } / transaction do end block, and most database migrations (which run inside an implicit transaction by default on engines that support transactional DDL).after_save, after_create, after_update, after_destroy, before_save), Django signals (post_save, pre_save, post_delete), SQLAlchemy events (after_insert, before_update), Hibernate/JPA listeners (@PostPersist, @PreUpdate), Sequelize hooks (afterCreate, afterUpdate), Prisma middleware, Entity Framework SaveChanges interceptors, Ecto changeset callbacks, Mongoose middleware (pre/post). The common failure mode: a hook fires as part of the save, writes to a non-transactional store, and is NOT rolled back when the enclosing transaction aborts.after_commit / after_rollback, Django transaction.on_commit, SQLAlchemy after_commit event, Spring TransactionSynchronization, .NET TransactionCompleted, Ecto Repo.transaction combined with explicit post-commit side-effects. External side effects MUST use the boundary-safe variant, OR be explicitly documented as safe-under-rollback (idempotent on replay, append-only with dedup).## Must Fix
- [HIGH] [src/controllers/order.ts:23] Business logic in controller
- Description: Order validation and pricing logic embedded in controller, should be in domain service
- Suggestion: Extract to OrderService.validateAndPrice() and call from controller
- Metadata: cross_lens_candidate=true, tradeoff_required=false
Before returning any verdict, identify one plausible failure scenario for the primary architectural change in the diff — a transaction rollback mid-way through, a hook firing under a constraint violation, a dependency cycle triggered under load, a layering bypass, a contract change that existing callers don't honor — and trace the state the system ends in. If you cannot construct such a scenario, your review is incomplete — return BLOCKED with the reason "could not construct failure scenario" rather than APPROVED.
When a diff touches migrations, bulk persistence operations, or new persistence call sites, read the lifecycle hooks of every affected type before concluding. Cross-file reasoning is required; line-by-line diff review is insufficient for architectural findings.
Concretely for transactional-scope diffs: name the transactional entry point, list every type whose persistence methods are called inside it, list every lifecycle hook declared on those types that is NOT a post-commit variant, and for each such hook state what it would write to an external store on partial rollback. If the type/model files were not opened and their hooks not inspected, return BLOCKED — the analysis is incomplete regardless of whether a finding was reached.
This lens is part of the six-pass code review protocol. Findings are merged with other lenses via deterministic synthesis: