# Tractatus - Active Session Governance (Claude Code) **Project**: Tractatus Website | **Database**: tractatus_dev (port 27017) | **App Port**: 9000 **Status**: Phase 1 Development | **Separate from**: family-history, sydigital --- ## ⚠️ MANDATORY SESSION START ```bash node scripts/session-init.js ``` **⚠️ CRITICAL: Also run this IMMEDIATELY after continuing from a compacted conversation!** This script enforces: - ✅ Local development server running on port 9000 (BLOCKS if not running) - ✅ Framework components initialized and operational - ✅ Token checkpoints configured (50k, 100k, 150k) - ✅ Session state tracking active - ✅ Instruction history loaded **If blocked**: Follow on-screen instructions to start local server, then re-run. --- ## 🎯 QUICK REFERENCE **MongoDB**: Port 27017, database `tractatus_dev` **Application**: Node.js/Express, port 9000 (local), port 9000 (production) **Tech Stack**: Vanilla JS, Tailwind CSS, MongoDB, Express **No shared code**: Separate from family-history and sydigital **Human approval required**: Architectural changes, DB schema, security, values content **Quality standard**: World-class, no shortcuts, no fake data ### Process Management: systemd (NOT pm2) **Production**: `tractatus.service` on vps-93a693da.vps.ovh.net **Development**: `npm start` (local) or `tractatus-dev.service` (systemd) **Common Commands**: ```bash # Local development npm start # Start local server (port 9000) node scripts/session-init.js # Initialize session (MANDATORY) node scripts/check-session-pressure.js # Check context pressure # Production deployment ./scripts/deploy-full-project-SAFE.sh # Deploy to production (safe) ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net "sudo systemctl status tractatus" ssh -i ~/.ssh/tractatus_deploy ubuntu@vps-93a693da.vps.ovh.net "sudo systemctl restart tractatus" # Document workflow npm run migrate:docs -- --source docs/markdown --force node scripts/generate-single-pdf.js ``` --- ## 🚨 FRAMEWORK ENFORCEMENT **All governance is now ENFORCED, not documented:** 1. **session-init.js**: Blocks session without local server on port 9000 2. **Framework components**: Initialize automatically, run continuously 3. **Token checkpoints**: Automated pressure reporting at 50k, 100k, 150k 4. **Pre-action checks**: Use `node scripts/pre-action-check.js [path] ""` **If you experience framework fade** (not using components), this indicates an enforcement gap that must be fixed architecturally, not documented. --- ## 📚 REFERENCE DOCUMENTS - **CLAUDE_Tractatus_Maintenance_Guide.md**: Full governance framework, conventions, directory structure - **docs/claude-code-framework-enforcement.md**: Complete technical documentation - **PRE_APPROVED_COMMANDS.md**: Pre-approved bash command patterns (document optimization workflow) - **.claude/instruction-history.json**: Persistent instruction database - **.claude/session-state.json**: Current session framework activity - **.claude/token-checkpoints.json**: Token milestone tracking --- **Last Updated**: 2025-10-15 (Eliminated 70% of redundant documentation; enforcement now architectural) **Philosophy**: If it can be enforced in code, it should not be documented here.