بنقرة واحدة
architecture-review
Review architecture changes, evaluate design decisions, write ADRs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Review architecture changes, evaluate design decisions, write ADRs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | architecture-review |
| description | Review architecture changes, evaluate design decisions, write ADRs |
| user-invocable | true |
Review proposed or implemented architecture changes. Acts as the Solution Architect role: evaluates system design decisions, API contracts, module boundaries, and records decisions as ADRs (Architecture Decision Records).
Use this skill when:
Read the relevant files to understand existing patterns:
# Module structure
ls src/{components,pages,hooks,lib,types}/
# Existing hooks (data flow patterns)
head -30 src/hooks/useStudy.ts src/hooks/useQuiz.ts src/hooks/useWords.ts
# Routing
grep "Route\|path=" src/App.tsx
# DB schema
cat supabase/migrations/001_initial_schema.sql
Check against these architectural principles (from CLAUDE.md):
| Principle | Check |
|---|---|
| Exam-focused | Does this map to a specific exam topic or user need? |
| No data fetching in components | Data flows: Supabase/JSON → hook → page → component |
| Client-side FSRS | Scheduling logic stays in useStudy, not components or backend |
| Single Supabase client | Only src/lib/supabase.ts creates the client |
| RLS on all tables | Every new table must have RLS policies |
| Offline-capable SRS | FSRS runs without network; sync on reconnect |
| Mobile-first | Every new UI works at 375px |
For any new feature, draw the data flow:
[Source] → [Hook] → [Page] → [Component]
Supabase table → useWords() → VocabPage → WordList
Local JSON → useGrammar() → GrammarPage → TopicList
FSRS + Supabase → useStudy() → StudyPage → Flashcard
Identify where new data will come from and which hook owns it.
Define the contract before implementation:
// Table: new_table
interface NewTableRow {
id: string // uuid, generated
user_id: string // references auth.users
created_at: string // timestamptz, default now()
// ... domain fields
}
// RLS policies needed:
// SELECT: user_id = auth.uid()
// INSERT: user_id = auth.uid()
// UPDATE: user_id = auth.uid()
// DELETE: user_id = auth.uid()
For significant decisions, write an ADR. Save to docs/adr/NNN-title.md:
# ADR-NNN: <Title>
## Status
Proposed | Accepted | Deprecated | Superseded by ADR-XXX
## Context
Why is this decision needed? What forces are at play?
## Decision
What was decided?
## Consequences
**Positive:** ...
**Negative / trade-offs:** ...
**Risks:** ...
## Alternatives considered
1. **Alternative A** — rejected because...
2. **Alternative B** — rejected because...
## Architecture Review — <Feature Name>
### Current state
Brief description of relevant existing architecture.
### Proposed change
What's being added/changed and how it fits.
### Data flow
[Diagram as above]
### Concerns
- [CONCERN] Description → suggested resolution
### Decision
✓ Approved as-is / ⚠ Approved with changes / ✗ Rethink needed
### Recommended next steps
1. ...
2. ...
### ADR
(include ADR text if decision is significant)
Manage the project backlog — add, list, filter, update, prioritize, and suggest work items
Daily session wrapper — start with backlog, work, commit, retro
End-of-session retrospective — summarize work, update backlog statuses, update MEMORY.md
Commit, branch, PR, self-review, fix — then stop for human approval before merge
Pre-flight for parallel work — pick items, check file overlap, set statuses, generate terminal commands
Manage project backlog — add, list, filter, update, prioritize, suggest