tractatus/CLAUDE.md
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

3.3 KiB

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

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:

# 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 <input.md> <output.pdf>

🚨 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 <type> [path] "<desc>"

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.