* docs: regenerate API documentation from src/app/api (329 routes) The generator only recognised `export async function GET`, so every route exported as a guarded const (`export const GET = withAdmin(...)`) or a destructured re-export was missing: the doc listed 116 endpoints, many of them since renamed or removed, against 329 route files today. Teach it the other two export shapes and the withAuth/withAdmin guards, and regenerate both copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive dated audits, compliance trackers and migration proposals Moves point-in-time records into docs/archive/ (with a README saying they describe the day they were written): the 2026-01 dev-guide compliance plan, codebase audit, DRY/SSOT and Phase 1 fix logs, the 2026-02 overnight cross-project plan, the 2026-07-02 audit report, the 2026-07-06 Shopware migration plan and system migration strategy, and CODE_AUDIT.md. CODE_AUDIT.md was listed in .claude/CLAUDE.md, .gemini/GEMINI.md and docs/README.md as the current list of issues to fix while its own banner called it a historical snapshot; those entries now point at docs/AUDIT_BACKLOG_2026-08.md, the list of findings still open. docs/README also stops linking api/, legacy/ and reference/, which do not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive closed trackers and docs for removed code Into docs/archive/: ARCHITECTURE_DEBT (status CLOSED 2026-06-30), DATABASE_AUDIT (Neon, pre-cutover), UPGRADE_PLAN (2026-06-03 snapshot; Tailwind 4 and React 19 are done), MIGRATION_PLAN_QQQ5 and PROFILES_SSOT_PLAN (both executed: migrations 105 and 121/122), production-ready-checklist (Frauenfeld plan that never shipped), and three docs whose code is gone: PROJECT_PAGES_GUIDE (src/components/projects and the per-project pages, now one [slug] route), RevampCopilot (no src/features/chatbot) and projects/upcycling (the /projects/upcycling pages and businessPlan messages are no longer in the tree). Inbound references follow the move, including three code comments. SHARED_CONTEXT and COMMANDS stop describing the upcycling mini-site as live; COMMANDS drops db:migrate-users, which is not a script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: correct live docs against the tree - BLOG_SYSTEM: rewritten from the code. There is no TinaCMS and no content/submissions; posts merge content/posts/*.md with blog_posts, and submissions are blog_submissions rows reviewed by staff. - installation guide: rewritten. There is no cms-api, no docker-compose.dev.yml and no default admin password; setup is services:up, db:migrate, setup-admins, dev. - RELIABILITY: migration 005b (not 005), no ENABLE_CMS gate, prod facts. - RESPONSIVE_DESIGN_SYSTEM: ResponsiveSection/Hero/Heading were removed; document Section, PageHero and Heading instead. - DEAD_CODE: the /api/repairers and /api/it-hilfe/helpers proxies and the routes.helpers alias are deleted, not 410; fix a stale line range. - DEV_GUIDE, AGENTS, claude/cursor/gemini guides, .cursorrules: DEVELOPMENT_GUIDELINES.md never existed here; protected files are in .claude/CLAUDE.md. src/config/site.ts -> org.ts/urls.ts; Next.js 16. - src/middleware.ts -> src/proxy.ts; components/ui/Button.tsx -> src/components/ui/button.tsx; reference page paths. - docs-paths baseline 68 -> 6, as the check asks when the count falls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: fix dead links in package and example READMEs ai-native-cms-core linked a Next.js plugin, a CLI and docs/quick-start.md that do not exist in this repo; ai-native-cms-react has no README; the saldo README pointed at the repo root instead of the implementation in src/lib/team/saldo.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD --------- Co-authored-by: Claude <noreply@anthropic.com>
13 KiB
created_date, last_modified_date, last_modified_summary
| created_date | last_modified_date | last_modified_summary |
|---|---|---|
| 2026-01-30 | 2026-01-06 | Updated to clarify terminal CLI vs web usage; terminal tools have file/terminal access |
Claude Agent Guidelines
For AI agents working via Claude on the RevampIT codebase
Note for Terminal Users: If you're using Claude Code (terminal tool), it automatically loads
.claude/CLAUDE.mdand has full file/terminal access. This guide is for web/non-terminal Claude usage.Purpose: This document provides Claude-specific instructions for web/non-terminal usage where file access is limited.
Quick Start
Before starting any task:
- ✅ Read
docs/development/DEV_GUIDE.md- Core development principles - ✅ Read
docs/BEST_PRACTICES.md- Critical AI slop prevention - ✅ Read
.claude/CLAUDE.md("Protected Files") - File deletion protection rules - ✅ Understand Claude's capabilities and best practices
Claude Usage Modes
🤖 Claude Code (Terminal Tool)
If you're using Claude Code in the terminal:
- ✅ Auto-loads:
.claude/CLAUDE.md(project context) - ✅ Has file access - Can read/write files directly
- ✅ Has terminal access - Can run commands
- ✅ Full repository context - Understands codebase structure
- 📖 See:
.claude/CLAUDE.mdfor terminal-specific instructions
🌐 Claude Web/Non-Terminal
If you're using Claude via web interface or without terminal tools:
Capabilities
Claude provides:
- ✅ Strong code analysis - Excellent at understanding code structure
- ✅ Pattern recognition - Good at identifying patterns and anti-patterns
- ✅ Refactoring suggestions - Strong at suggesting improvements
- ✅ Documentation - Good at writing clear documentation
- ✅ Problem solving - Excellent debugging capabilities
Strengths
Claude excels at:
- 🎯 Code review - Thorough analysis of code quality
- 🎯 Architecture - Understanding system design
- 🎯 Best practices - Applying development principles
- 🎯 Explanations - Clear, detailed explanations
Limitations (Web/Non-Terminal Only)
When using Claude without terminal tools:
- ⚠️ No direct file access - Cannot read/write files directly (depends on interface)
- ⚠️ Limited real-time context - Works with provided context
- ⚠️ No terminal access - Cannot run commands directly
- ⚠️ Context window limits - May need to work in chunks for large codebases
Claude-Specific Best Practices
1. Leverage Code Analysis
Use Claude's strength in code review:
// ✅ GOOD: Request thorough analysis
"Analyze this code for:
1. Adherence to docs/development/DEV_GUIDE.md
2. TypeScript best practices
3. Error handling patterns
4. Potential improvements
5. Anti-patterns from docs/BEST_PRACTICES.md
Code:
[Paste code here]
Provide:
- Detailed analysis
- Specific improvements
- Refactored code if needed
- Explanation of changes"
2. Request Pattern Matching
Use Claude's pattern recognition:
// ✅ GOOD: Ask for pattern analysis
"Review these files and identify:
- Common patterns
- Inconsistencies
- Opportunities for refactoring
- Best practices violations
Files:
- src/app/api/products/route.ts
- src/app/api/services/route.ts
- src/app/api/workshops/route.ts
Suggest:
- Unified pattern to follow
- Refactoring approach
- Implementation plan"
3. Request Detailed Explanations
Use Claude's explanation strength:
// ✅ GOOD: Request explanations
"Explain:
1. Why this pattern is used
2. How it relates to docs/development/DEV_GUIDE.md
3. What alternatives exist
4. Trade-offs of each approach
Code:
[Paste code]"
4. Provide Architectural Context
Claude works well with architecture:
// ✅ GOOD: Provide architecture context
"Context:
- System architecture: docs/guides/ARCHITECTURE.md
- Development guide: docs/development/DEV_GUIDE.md
- Current implementation: [describe]
Task:
[Describe task]
Request:
- Analysis of approach
- Alignment with architecture
- Implementation suggestions"
5. Request Incremental Refactoring
For large changes:
// ✅ GOOD: Break into steps
"Refactor this codebase incrementally:
Phase 1: Extract shared utilities
Phase 2: Standardize patterns
Phase 3: Update all usages
Phase 4: Verify and test
Provide:
- Step-by-step plan
- Code for each phase
- Verification steps"
Critical Rules for Claude Agents
File Deletion Protection
⚠️ NEVER suggest deleting files without explicit user request
Before suggesting deletion:
- ✅ Confirm user intent
- ✅ Analyze impact thoroughly
- ✅ Suggest alternatives (deprecation, migration)
- ✅ Provide backup strategy
Protected files (NEVER suggest deleting):
- Migration files (
supabase/migrations/*) - Core configuration files
- Documentation files
.envfiles- Test files
AI Slop Prevention
Before suggesting new code:
- ✅ Analyze existing codebase structure
- ✅ Identify similar implementations
- ✅ Check for naming conflicts
- ✅ Verify no duplicates exist
- ✅ Ensure consistency with patterns
Red flags to identify:
- 🚩 Duplicate components with similar names
- 🚩 Conflicting utility functions
- 🚩 Inconsistent patterns across similar features
- 🚩 Orphaned code that should be integrated
Code Quality Standards
Always suggest:
- ✅ TypeScript strict mode compliance
- ✅ Proper error handling with logger
- ✅ Following DRY principles
- ✅ Single Source of Truth (SSOT)
- ✅ Consistent patterns
- ✅ Self-documenting code
Never suggest:
- ❌
anytypes without justification - ❌
console.logstatements - ❌ Duplicate functionality
- ❌ Magic strings/numbers
- ❌ Inconsistent error handling
Claude Workflow Patterns
Pattern 1: Code Review and Improvement
// Step 1: Request comprehensive review
"Review this code comprehensively:
File: src/app/api/products/route.ts
[Paste code]
Check against:
- docs/development/DEV_GUIDE.md
- docs/BEST_PRACTICES.md
- TypeScript best practices
- Error handling patterns
Provide:
- Detailed analysis
- Specific issues found
- Improvement suggestions
- Refactored code"
Pattern 2: Architecture Alignment
// Step 1: Provide context
"Current architecture: docs/guides/ARCHITECTURE.md
Development guide: docs/development/DEV_GUIDE.md
Task: [Describe task]
Analyze:
- Alignment with architecture
- Consistency with patterns
- Best approach given constraints
Suggest:
- Implementation approach
- File structure
- Integration points"
Pattern 3: Refactoring Plan
// Step 1: Identify issues
"Analyze these files for refactoring opportunities:
Files:
- [List files]
Issues observed:
- Code duplication
- Inconsistent patterns
- Hardcoded values
Request:
- Refactoring strategy
- Step-by-step plan
- Risk assessment
- Implementation code"
Common Tasks with Claude
Code Review
// Request format:
"Perform comprehensive code review:
Code:
[Paste code]
Checklist:
- [ ] Follows docs/development/DEV_GUIDE.md
- [ ] TypeScript best practices
- [ ] Error handling
- [ ] No console.log (use logger)
- [ ] Proper types (no any)
- [ ] Follows existing patterns
- [ ] No duplicate functionality
Provide:
- Detailed findings
- Priority of issues
- Specific fixes
- Improved code"
Refactoring
// Request format:
"Refactor this code to follow DRY and SSOT principles:
Current code:
[Paste code]
Issues:
- Duplicated logic
- Hardcoded values
- Inconsistent patterns
Requirements:
1. Extract shared utilities
2. Move constants to config
3. Standardize patterns
4. Maintain functionality
5. Follow docs/development/DEV_GUIDE.md
Provide:
- Refactoring plan
- Refactored code
- Migration guide
- Testing strategy"
Architecture Analysis
// Request format:
"Analyze architecture alignment:
Current implementation:
[Describe current state]
Proposed changes:
[Describe proposed changes]
Reference:
- docs/guides/ARCHITECTURE.md
- docs/development/DEV_GUIDE.md
Analyze:
- Architectural fit
- Pattern consistency
- Integration points
- Potential issues
Suggest:
- Best approach
- Alternative options
- Trade-offs
- Implementation plan"
Code Examples for Claude
Requesting Component Creation
// Provide template and requirements:
"Create a new component following these specifications:
Template:
'use client'; // If using hooks
import { /* imports */ } from '@/lib/...';
interface ComponentProps {
// Define props
}
export function ComponentName({ /* props */ }: ComponentProps) {
// Implementation
}
Requirements:
1. Location: src/components/[category]/[Name].tsx
2. Props: [describe props]
3. Functionality: [describe behavior]
4. Styling: Tailwind CSS, follow design system
5. Error handling: Proper error states
6. Types: Full TypeScript types
Reference:
- docs/development/DEV_GUIDE.md for patterns
- src/components/products/ProductCard.tsx for structure
Provide complete implementation with explanations."
Requesting API Route
// Provide template and requirements:
"Create an API route following this pattern:
Template:
import { NextRequest, NextResponse } from 'next/server';
import { logger } from '@/lib/logger';
export async function METHOD(request: NextRequest) {
try {
// Implementation
return NextResponse.json({ success: true, data });
} catch (error) {
logger.error('Error', { error });
return NextResponse.json(
{ success: false, error: 'Message' },
{ status: 500 }
);
}
}
Requirements:
1. Endpoint: /api/[resource]
2. Method: [GET/POST/PUT/DELETE]
3. Authentication: [required/optional]
4. Validation: [describe]
5. Error handling: Use logger
Reference:
- docs/development/DEV_GUIDE.md
- src/app/api/products/route.ts
Provide complete implementation with error handling."
Verification and Testing
Code Review Checklist
Always suggest user verify:
// After code generation, suggest:
"Verify the implementation:
1. TypeScript compilation:
pnpm run build
2. Linting:
pnpm run lint
3. Tests:
pnpm run test
4. Manual testing:
pnpm run dev
# Test in browser
5. Code review checklist:
- [ ] Follows docs/development/DEV_GUIDE.md
- [ ] No console.log
- [ ] Proper TypeScript types
- [ ] Error handling
- [ ] Follows patterns
- [ ] No duplicates"
Refactoring Verification
// After refactoring, suggest:
"Verify refactoring:
1. Functionality preserved:
- Run existing tests
- Manual testing
- Check all usages updated
2. Code quality:
- pnpm run lint
- pnpm run build
- Check for regressions
3. Documentation:
- Update relevant docs
- Update last_modified_date
- Add change summary"
Advanced Patterns
Incremental Refactoring
// For large refactoring:
"Plan incremental refactoring:
Phase 1: Extract shared code
- Identify common patterns
- Create utility functions
- Update one file as example
Phase 2: Standardize patterns
- Apply pattern to all files
- Ensure consistency
- Update types
Phase 3: Verify and test
- Run tests
- Check for regressions
- Update documentation
Provide:
- Detailed plan for each phase
- Code for Phase 1
- Migration strategy"
Pattern Analysis
// Request pattern analysis:
"Analyze patterns across codebase:
Files to analyze:
- [List similar files]
Identify:
- Common patterns
- Inconsistencies
- Best practices violations
- Refactoring opportunities
Suggest:
- Unified pattern
- Implementation approach
- Migration plan"
Quick Reference
Essential Prompts
For code review:
"Review [code] against docs/development/DEV_GUIDE.md.
Check for:
- TypeScript best practices
- Error handling
- Pattern consistency
- AI slop prevention
Provide detailed analysis and improvements."
For refactoring:
"Refactor [code] to follow DRY and SSOT principles.
Extract shared logic.
Move constants to config.
Follow docs/development/DEV_GUIDE.md patterns.
Provide refactored code and migration plan."
For architecture:
"Analyze [proposal] against:
- docs/guides/ARCHITECTURE.md
- docs/development/DEV_GUIDE.md
Provide:
- Architectural analysis
- Alignment check
- Implementation suggestions
- Trade-offs"
Key Files to Reference
docs/development/DEV_GUIDE.md- Main development guidedocs/BEST_PRACTICES.md- Best practices and AI slop prevention.claude/CLAUDE.md("Protected Files") - File deletion protectiondocs/guides/ARCHITECTURE.md- System architecture
Remember
- ✅ Leverage analysis strength - Use Claude for thorough code review
- ✅ Provide context - Architecture and patterns help Claude
- ✅ Request explanations - Claude excels at explaining decisions
- ✅ Incremental approach - Break large tasks into phases
- ✅ Protect files - Never suggest deletion without approval
- ✅ Prevent AI slop - Analyze before suggesting new code
- ✅ Verify everything - Always suggest verification steps
Use Claude's strengths in analysis and explanation to improve code quality!
Last Updated: 2026-01-30
For: Claude/Codex agents