TheFlow
2298d36bed
fix(submissions): restructure Economist package and fix article display
...
- Create Economist SubmissionTracking package correctly:
* mainArticle = full blog post content
* coverLetter = 216-word SIR— letter
* Links to blog post via blogPostId
- Archive 'Letter to The Economist' from blog posts (it's the cover letter)
- Fix date display on article cards (use published_at)
- Target publication already displaying via blue badge
Database changes:
- Make blogPostId optional in SubmissionTracking model
- Economist package ID: 68fa85ae49d4900e7f2ecd83
- Le Monde package ID: 68fa2abd2e6acd5691932150
Next: Enhanced modal with tabs, validation, export
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 08:47:42 +13:00
TheFlow
6496e0d811
refactor: remove entire public/ directory - Tractatus PROJECT web interface
...
REMOVED: All 37 files in public/ directory
This is the Tractatus PROJECT's web interface (admin system, website features),
NOT framework implementation code.
Files removed:
- Admin system (4 pages): dashboard, hooks-dashboard, login, rule-manager
- Shows: Moderation Queue, Users, Documents, Blog Curation
- This is OUR project admin, not tools for framework implementers
- Admin JavaScript (8 files)
- CSS/fonts (10 files)
- Images (4 files)
- Components (3 files): interactive-diagram, navbar-admin, pressure-chart
- Demos (5 files): 27027, boundary, classification, deliberation, tractatus
- Utils (1 file): api.js
- Favicons (2 files)
REASON: public/ directory contained Tractatus PROJECT website/admin interface.
Framework implementers don't need OUR admin system - they build their own.
All web interface code belongs in internal repository only.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 21:57:02 +13:00
TheFlow
f7d933dbe2
feat: redesign docs sidebar with audience-based categories + fix PNG background
...
## Architecture Diagram PNG Fix
- Regenerated PNG with solid white background (no transparency)
- Removed alpha channel (RGBA → RGB)
- Increased resolution to 2400x2000 for true high-res quality
- Fixed poor UX with checkered/transparent background on implementer.html
## Documentation Sidebar Redesign
Reorganized from flat "getting started" list to 5 hierarchical categories
based on user journey and expertise level:
### New Category Structure:
- 📘 Introduction (1-5): Beginner level, all audiences
- ⚙️ Implementation (10-19): Practical/technical for implementers
- 📊 Case Studies (20-29): Real-world examples
- 💼 Business Strategy (30-35): For leaders/decision makers
- 🔬 Advanced Topics (40-49): Deep technical (collapsed by default)
### Benefits:
- Clear progression: beginner → intermediate → advanced
- Audience-specific paths (researcher, implementer, leader)
- Reduced cognitive load (5 categories vs 15+ flat items)
- Easy to find relevant content by expertise level
### Technical Implementation:
- Updated docs-app.js CATEGORIES object with new structure
- Updated categorizeDocument() to use order ranges (1-5, 10-19, 20-29, 30-35, 40-49)
- Created scripts/reorganize-docs-sidebar.js for automated metadata updates
- Reorganized 15 documents in MongoDB with new order/category/audience
### Production Deployment:
- ✅ Deployed architecture-diagram.png (887KB, RGB, 2400x2000)
- ✅ Deployed updated docs-app.js
- ✅ Ran reorganization script on tractatus_prod database
- ✅ Verified via API: correct categories and ordering
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 09:10:58 +13:00
TheFlow
e086066b99
feat: technical architecture diagram with comprehensive documentation (Task 8)
...
Complete system architecture visualization showing Claude Code + Tractatus
integration across 4 layers: API/Web, Governance, Persistence, and Runtime.
**Diagram Files:**
1. architecture-diagram.svg (15KB)
- Scalable vector format for web and documentation
- 4-layer visualization with color-coded components
- Data flow arrows showing integration points
- Professional design suitable for research papers
2. architecture-diagram.png (581KB)
- High-resolution 2400x2000 raster format
- Generated via Inkscape from SVG
- Suitable for presentations and print materials
3. architecture-diagram.mmd
- Mermaid diagram for markdown embedding
- Supports dynamic rendering in documentation
- Version control friendly text format
**Documentation:**
4. docs/markdown/technical-architecture.md (18KB)
- Comprehensive technical architecture guide
- Layer-by-layer component descriptions
- Integration points and data flows
- Performance characteristics (<10ms overhead)
- Deployment architecture (Docker/systemd)
- Complementarity with Claude Code explanation
5. public/downloads/technical-architecture-diagram.pdf
- Generated from markdown with embedded diagram
- Complete documentation in portable format
- Suitable for offline reading and distribution
**Implementer Page Integration:**
6. public/implementer.html
- Added "System Architecture" section after Deployment Quickstart
- Full-width diagram display with shadow effects
- Three download buttons: SVG, PNG (High-Res), PDF
- 4-card layer breakdown (API → Governance → Persistence → Runtime)
- 3-point integration explanation with numbered badges
- Professional color scheme matching brand (purple/green/yellow/blue)
**Architecture Layers:**
Layer 4 - API & Web Interface:
- Demo endpoints (/api/demo/*)
- Admin dashboard
- Documentation system
- Blog with AI curation
Layer 3 - Tractatus Governance:
- BoundaryEnforcer (values decisions)
- InstructionPersistenceClassifier (classification)
- CrossReferenceValidator (pattern bias prevention)
- ContextPressureMonitor (degradation detection)
- MetacognitiveVerifier (complex operation verification)
Layer 2 - MongoDB Persistence:
- governance_rules collection (rule storage with indexes)
- audit_logs collection (compliance trail)
- session_state collection (pressure tracking)
- instruction_history collection (cross-reference validation)
Layer 1 - Claude Code Runtime:
- Base LLM environment (200k context window)
- Session management (persistent state)
- Tool access (Bash, Read, Write, Edit)
- File system operations (.claude/ directory)
**Key Integration Points:**
1. Pre-Action Checks:
- All actions validated against governance rules
- BLOCK or ALLOW with explanation
- Audit log entry created
2. Instruction Persistence:
- User instructions classified (quadrant, persistence, scope)
- Stored in .claude/instruction-history.json + MongoDB
- Cross-referenced before conflicting actions
3. Context Pressure Monitoring:
- Real-time pressure calculation (tokens, messages, errors)
- Mandatory checkpoint reporting (50k, 100k, 150k)
- Early warning system for degradation
**The 27027 Incident Prevention Flow:**
User: "Use MongoDB port 27027"
→ Classifier: SYSTEM/HIGH/session
→ Stored in instruction_history
[107k tokens later, pressure builds]
AI attempts: port 27017 (pattern recognition)
→ CrossReferenceValidator: CONFLICT DETECTED
→ Action BLOCKED, user notified
→ AI corrects to 27027
→ Audit log created
**Deployment:**
✅ Deployed to production:
- SVG/PNG diagrams to /public/images/
- PDF to /public/downloads/
- Markdown docs to /docs/markdown/
- Updated implementer.html with diagram section
**Roadmap Progress:**
Phase 2, Week 3, Task 8: Technical Architecture Diagram - COMPLETED
Priority: High | Effort: 4-6 hours | Status: ✅ Done
**Success Criteria Met:**
✓ Clear, professional diagram explaining complementarity with Claude Code
✓ High-resolution exports (SVG, PNG, PDF)
✓ Comprehensive technical documentation
✓ Integrated into implementer page
✓ Multiple format downloads available
✓ Layer-by-layer component breakdown
✓ Data flow visualization
✓ Performance metrics documented
Next: Task 9 - Video Walkthrough (Week 3, 2-3 days)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 07:37:10 +13:00