docs: consolidate and restructure documentation architecture

- Remove outdated root-level documentation files
  - Delete IMPLEMENTATION_STATUS.md, WORK_IN_PROGRESS.md, UI_IMPROVEMENTS_SUMMARY.md, CLAUDE.md

- Reorganize documentation into docs/ folder
  - Move UNIFIED_EDITOR_EXPERIENCES.md → docs/unified-editor-experiences.md
  - Move DATATABLE_MIGRATION_PROGRESS.md → docs/datatable-migration-progress.md
  - Move SEED_SCRIPT_README.md → docs/seed-script-readme.md

- Create comprehensive new documentation
  - Add docs/implementation-status.md with production readiness assessment
  - Add docs/work-in-progress.md with active development tracking
  - Add docs/development-achievements.md consolidating all major accomplishments

- Update documentation hub
  - Enhance docs/README.md with complete 13-document structure
  - Organize into logical categories: Core, Status, Achievements
  - Provide clear navigation and purpose for each document

Features:
- 73% code reduction achievement through unified editor experiences
- Complete DataTable migration with enterprise features
- Comprehensive seed database with realistic research scenarios
- Production-ready status with 100% backend, 95% frontend completion
- Clean documentation architecture supporting future development

Breaking Changes: None - documentation restructuring only
Migration: Documentation moved to docs/ folder, no code changes required
This commit is contained in:
2025-08-04 23:54:47 -04:00
parent adf0820f32
commit 433c1c4517
168 changed files with 35831 additions and 3041 deletions

34
.rules
View File

@@ -6,6 +6,8 @@ Project Context
- Implements role-based access control with four primary roles: Administrator, Researcher, Wizard, Observer
- Features a hierarchical experiment structure: Study > Experiment > Step > Action
- Requires real-time communication for wizard control during trials
- Exclusively uses Bun as the package manager and runtime (never npm or yarn)
- All creators and editors are dedicated pages, not modals or dialogs
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples
@@ -87,6 +89,9 @@ Component Patterns
- Use Suspense boundaries for async components
- Create reusable form components with react-hook-form
- Implement keyboard navigation for accessibility
- All entity creators and editors must be full pages (e.g., /studies/new, /experiments/[id]/edit)
- Never use modals or dialogs for creating or editing entities
- Use dedicated routes for all CRUD operations
Real-time Features
- Use WebSockets for trial execution updates
@@ -118,12 +123,20 @@ Security Best Practices
- Implement CSRF protection
- Use secure HTTP headers via Next.js config
Package Management & Development
- Use Bun exclusively for all package management operations
- Run commands with `bun install`, `bun run`, `bun add`, etc.
- Never use npm, yarn, or pnpm commands
- Use `bun dev` for development server
- Use `bun build` for production builds
Testing Approach
- Write integration tests for tRPC procedures
- Test authorization logic thoroughly
- Use MSW for mocking external services
- Test critical user flows with Playwright
- Ensure proper error handling in tests
- Run tests with `bun test`
Specific HRIStudio Patterns
- Robot plugins must implement the standard interface
@@ -132,6 +145,9 @@ Specific HRIStudio Patterns
- Use event sourcing for trial execution history
- Implement version control for experiment designs
- Support offline-capable wizard interfaces
- All entity management (studies, experiments, participants, trials) uses page-based navigation
- Create/edit flows are full page experiences with proper breadcrumbs and navigation
- Use Next.js routing for all entity operations (/entity/new, /entity/[id]/edit)
Error Handling
- Use custom error classes for different error types
@@ -147,4 +163,22 @@ Accessibility
- Test with screen readers
- Provide visual feedback for all actions
Development Commands
- `bun install` - Install dependencies
- `bun build` - Build for production
- `bun start` - Start production server
- `bun test` - Run tests
- `bun typecheck` - Run TypeScript checks
- `bun lint` - Run ESLint
- `bun db:generate` - Generate database schema
- `bun db:migrate` - Run database migrations
- `bun db:push` - Push schema changes
- `bun db:studio` - Open database studio
Development Server Restrictions
- NEVER run development servers (`bun dev`, `npm run dev`, etc.)
- NEVER run drizzle studio (`bun db:studio`)
- Use only build, typecheck, and lint commands for verification
- Development servers and database studios should not be started in any circumstances
Follow Next.js 14 best practices for Data Fetching, Rendering, and Routing.