TheFlow
|
2af47035ac
|
refactor: remove website code and fix critical startup crashes (Phase 8)
CRITICAL FIX: Server would CRASH ON STARTUP (multiple import errors)
REMOVED (2 scripts):
1. scripts/framework-watchdog.js
- Monitored .claude/session-state.json (OUR Claude Code setup)
- Monitored .claude/token-checkpoints.json (OUR file structure)
- Implementers won't have our .claude/ directory
2. scripts/init-db.js
- Created website collections: blog_posts, media_inquiries, case_submissions
- Created website collections: resources, moderation_queue, users, citations
- Created website collections: translations, koha_donations
- Next steps referenced deleted scripts (npm run seed:admin)
REWRITTEN (2 files):
src/models/index.js (29 lines → 27 lines)
- REMOVED imports: Document, BlogPost, MediaInquiry, CaseSubmission, Resource
- REMOVED imports: ModerationQueue, User (all deleted in Phase 2)
- KEPT imports: AuditLog, DeliberationSession, GovernanceLog, GovernanceRule
- KEPT imports: Precedent, Project, SessionState, VariableValue, VerificationLog
- Result: Only framework models exported
src/server.js (284 lines → 163 lines, 43% reduction)
- REMOVED: Imports to deleted middleware (csrf-protection, response-sanitization)
- REMOVED: Stripe webhook handling (/api/koha/webhook)
- REMOVED: Static file caching (for deleted public/ directory)
- REMOVED: Static file serving (public/ deleted in Phase 6)
- REMOVED: CSRF token endpoint
- REMOVED: Website homepage with "auth, documents, blog, admin" references
- REMOVED: Instruction sync (scripts/sync-instructions-to-db.js reference)
- REMOVED: Hardcoded log path (${process.env.HOME}/var/log/tractatus/...)
- REMOVED: Website-specific security middleware
- KEPT: Security headers, rate limiting, CORS, body parsers
- KEPT: API routes, governance services, MongoDB connections
- RESULT: Clean framework-only server
RESULT: Repository can now start without crashes, all imports resolve
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-10-21 22:17:02 +13:00 |
|
TheFlow
|
0dd4a5f6c8
|
refactor: reduce public repo to minimal implementation-only resource
REMOVED: 267 non-implementation files (51% reduction)
Categories removed:
- Research documents & case studies (35 files)
- Planning/internal development docs (28 files)
- Website pages & assets (93 files - this is framework code, not website code)
- Audit reports (6 files)
- Non-essential admin UI (11 files)
- Markdown content duplicates (10 files)
- Internal development scripts (96 files)
- Internal setup docs (2 files)
RETAINED: 253 implementation-focused files
- Core framework services (src/)
- Test suite (tests/)
- API documentation (docs/api/)
- Deployment quickstart guide
- Essential admin UI (rule manager, dashboard, hooks dashboard)
- Architecture decision records
- Configuration files
PURPOSE: Public repo is now focused exclusively on developers
implementing Tractatus, not researchers studying it or users visiting
the website. All background/research content available at
https://agenticgovernance.digital
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-10-21 21:09:34 +13:00 |
|
TheFlow
|
32ee38ae84
|
feat: complete Phase 2 - accessibility, performance, mobile polish
- WCAG 2.1 AA compliance (100%)
- Focus indicators on all 9 pages
- Skip links for keyboard navigation
- Form ARIA labels and semantic HTML
- Color contrast fixes (18/18 combinations pass)
- Performance audit (avg 1ms load time)
- Mobile responsiveness verification (9/9 pages)
- All improvements deployed to production
New audit infrastructure:
- scripts/check-color-contrast.js - Color contrast verification
- scripts/performance-audit.js - Load time testing
- scripts/mobile-audit.js - Mobile readiness checker
- scripts/audit-accessibility.js - Automated a11y testing
Documentation:
- audit-reports/accessibility-manual-audit.md - WCAG checklist
- audit-reports/accessibility-improvements-summary.md - Implementation log
- audit-reports/performance-report.json - Performance data
- audit-reports/mobile-audit-report.json - Mobile analysis
- audit-reports/polish-refinement-complete.md - Executive summary
- DEPLOYMENT-2025-10-08.md - Production deployment log
- SESSION-HANDOFF-2025-10-08.md - Session handoff document
New content:
- docs/markdown/organizational-theory-foundations.md
- public/images/tractatus-icon.svg
- public/js/components/navbar.js
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-10-08 13:29:26 +13:00 |
|