// Understand and navigate the DevPrep AI 7-folder architecture. Use this skill when asked about code organization, where to place new features, what modules exist, or when starting development tasks that need architecture context. Auto-triggers on keywords like "where should", "add module", "architecture", "structure", "organize", "place code", "what modules".
| name | architecture-navigator |
| description | Understand and navigate the DevPrep AI 7-folder architecture. Use this skill when asked about code organization, where to place new features, what modules exist, or when starting development tasks that need architecture context. Auto-triggers on keywords like "where should", "add module", "architecture", "structure", "organize", "place code", "what modules". |
Provide instant architecture intelligence for the DevPrep AI codebase. Generate architecture maps, answer placement questions ("where should X go?"), and validate code organization against the 7-folder structure. This skill eliminates the need to manually read architecture documentation at conversation start.
When starting a development conversation or when explicitly requested, scan the codebase to generate a real-time architecture map.
How to scan:
# Run the architecture scanner from project root
bash ./.claude/skills/architecture-navigator/scripts/scan_architecture.sh
The scanner will output:
When to scan:
Output format: Compact markdown summary (~50-100 lines) showing the current architecture state.
Answer "where should X go?" questions using the 7-folder placement rules.
Decision tree:
app/ (but keep minimal, import from modules/)modules/{feature}/shared/lib/store/types/styles/Example queries and responses:
| User Query | Response |
|---|---|
| "Where should social login go?" | modules/auth/ - Feature-specific authentication logic |
| "Where should I add payment processing?" | modules/payments/ - New feature module for payment domain logic |
| "Where do reusable buttons go?" | shared/components/ui/Button.tsx - Reusable UI component |
| "Where's the Claude AI integration?" | lib/claude/ - External service integration |
| "Where should shopping cart state go?" | store/cartStore.ts - Global state management |
| "Where do API types go?" | types/ai/api.ts - Shared TypeScript definitions |
For detailed rules, reference references/architecture-rules.md which includes:
List existing modules and explain their purpose when asked.
How to discover modules:
# Quick module list
ls -1 frontend/src/modules/
# With file counts
find frontend/src/modules/ -mindepth 1 -maxdepth 1 -type d -exec sh -c 'echo -n "{}:" && find "{}" -name "*.ts*" | wc -l' \;
Common questions:
Validate that code follows the 7-folder structure rules.
What to check:
app/ are minimal (just imports)modules/, not app/shared/, not duplicatedlib/store/Validation commands:
# Check for business logic in app/ (should be minimal)
grep -r "useState\|useEffect\|async function" frontend/src/app/
# Check for cross-module imports (forbidden)
grep -r "from.*modules/" frontend/src/modules/
# Check for modules importing from shared (allowed)
grep -r "from.*shared/" frontend/src/modules/
When a development conversation begins, proactively scan the architecture:
scripts/scan_architecture.sh to generate current architecture mapWhen asked "where should X go?":
references/architecture-rules.mdExample:
User: "Where should I add OAuth authentication?"
Response:
OAuth authentication should go in `modules/auth/oauth/`:
- It's feature-specific (authentication domain)
- It belongs in modules/ (not reusable across other features)
- Structure: modules/auth/oauth/GoogleAuth.tsx, OAuthProvider.tsx, etc.
The OAuth client setup (SDK wrapper) should go in `lib/oauth/client.ts` (external integration).
When creating a new feature module:
modules/{feature-name}/modules/{feature}/
├── components/ - Feature-specific UI
├── hooks/ - Feature-specific hooks
├── utils/ - Feature-specific utilities
└── types.ts - Feature-specific types (if not shared)
This skill automatically activates when these phrases are detected:
Manual invocation: Use /architecture or explicitly request "scan the architecture".
Fast bash script that scans the 7-folder structure and generates a markdown architecture map. Outputs module list, key locations, and quick stats.
Usage:
bash scripts/scan_architecture.sh [project-root]
Output: Compact markdown summary (~50-100 lines) suitable for loading into context.
Comprehensive placement rules for the 7-folder architecture. Reference this document when:
Key sections:
architecture-rules.md for detailed justificationUser: "I want to add a notification system that shows toast messages across the app."
Response:
Let me scan the current architecture first:
bash ./.claude/skills/architecture-navigator/scripts/scan_architecture.sh
[Architecture map output]
For a global notification system with toast messages:
shared/components/Toast.tsx (reusable UI)store/uiStore.ts (global state for managing active toasts)shared/hooks/useToast.ts (convenient API: useToast().show())Reasoning:
Import flow:
useToast() from shared/hooks/store/uiStore.tsshared/components/Toast.tsxThis follows the architecture rules: modules/ → shared/ → store/ (allowed import direction).