Add .claude/session-state.json, .claude/token-checkpoints.json, and
SESSION_CLOSEDOWN_*.md to .gitignore. These are auto-generated session
files that should not be committed.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Major project restructuring to separate framework from website implementation:
Package Changes:
- name: "tractatus-framework" v3.5.0 → "tractatus-website" v0.1.0
- description: Updated to reflect website platform purpose
- Added website-specific scripts (build:css, migrate:docs, etc.)
- Added website dependencies (puppeteer, stripe, i18n, etc.)
README Changes:
- Rewritten to focus on research framework and website
- Updated badges and links
- Added "What is Tractatus?" section
- Removed framework-specific deployment instructions
.gitignore Changes:
- Drastically simplified (189 line reduction)
- Removed public repository protection rules
- This is now the primary development repository
.env Changes:
- Updated examples to reflect website configuration
- Removed framework-specific environment variables
This commit documents that this repository is the WEBSITE implementation,
separate from the tractatus-framework package repository at
github.com/AgenticGovernance/tractatus-framework.
Production deployment remains via manual rsync, NOT GitHub.
Removed files:
- SECURITY_INCIDENT_HUMAN_ACTIONS_REQUIRED.md (internal security doc)
- .claude/instruction-history.json (project-specific governance rules)
- scripts/add-security-rules-2025-10-21.js (dated, project-specific)
- scripts/apply-governance-audit-2025-10-21.js (dated, project-specific)
- docs/governance/GOVERNANCE_LEARNINGS_2025-10-21.md (internal learnings)
- docs/governance/GOVERNANCE_RULES_AUDIT_2025-10-21.md (internal audit)
These are internal to the tractatus project, not framework resources.
Public repo should contain only framework implementation code and docs.
Updated .gitignore to prevent future commits of similar files.
CRITICAL SECURITY:
- Removed 3,019 pptx-env Python virtualenv files from public tracking
- Added pptx-env/ to .gitignore
- Note: Stripe live key ALREADY removed in previous commit a6dc277
NEW CONTRIBUTING.md (world-class):
- Research-quality standards matching README
- Honest about alpha status (108 failing tests)
- Correct contact: research@agenticgovernance.digital
- No fabricated features or cultural positioning
- Rigorous testing/documentation standards
- Clear research ethics section
RESULT: Public GitHub now properly cleaned and documented
SECURITY INCIDENT:
- Stripe detected exposed live API key sk_live_***tMjIK
- Found hardcoded in create-live-prices.js and create-live-stripe-prices.js
- Files were pushed to public GitHub in previous commit
- Removing immediately and adding to .gitignore
ACTION REQUIRED:
User MUST rotate Stripe API keys immediately in Stripe Dashboard:
https://dashboard.stripe.com/apikeys
Files removed:
- scripts/create-live-prices.js
- scripts/create-live-stripe-prices.js
SUMMARY:
Fixed admin login failures caused by two issues:
1. Response sanitization middleware stripping auth tokens
2. Admin users missing password field in database
ROOT CAUSE ANALYSIS:
- sanitizeResponseData middleware removed ALL fields named 'token'
- This included authentication tokens that SHOULD be sent to clients
- Admin user records created without proper password field
- User.authenticate() failed on bcrypt.compare() with undefined password
FIXES:
1. Changed auth response field from 'token' to 'accessToken'
- Avoids overly aggressive sanitization
- More semantically correct (it's specifically an access token)
- Frontend updated to use data.accessToken
2. Created fix-admin-user.js script
- Properly creates admin user via User.create()
- Ensures password field is bcrypt hashed
- Deletes old malformed user records
3. Updated login.js auto-fill for correct dev email
- Changed from admin@tractatus.local to admin@agenticgovernance.digital
TESTING:
- Local login now returns accessToken (308 char JWT)
- User object returned with proper ID serialization
- Auth flow: POST /api/auth/login → returns accessToken + user
- Ready for production deployment
FILES:
- src/controllers/auth.controller.js: Use accessToken field
- public/js/admin/login.js: Store data.accessToken, update default email
- scripts/fix-admin-user.js: Admin user creation/fix utility
NEXT STEPS:
1. Deploy to production
2. Run: node scripts/fix-admin-user.js admin@agenticgovernance.digital <password>
3. Test admin login at /admin/login.html
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
CRITICAL SECURITY FIX:
- Removed ADMIN_LOGIN_INSTRUCTIONS.md (contained admin password)
- Removed scripts/reset-admin-password.js (password reset utility)
- Added both to .gitignore to prevent future exposure
IMMEDIATE ACTIONS REQUIRED:
1. Rotate admin password on production (current password was exposed)
2. Consider purging these files from Git history if repo is public
3. Review all committed files for sensitive information
These files should remain local-only and never be committed to version control.
Co-Authored-By: Claude <noreply@anthropic.com>
Implements architectural enforcement to prevent framework fade (voluntary
compliance failures). This addresses Case Study #27028 where AI skipped
session-init.js despite explicit CRITICAL warnings while implementing
anti-fade enforcement mechanisms.
## New Components
### Hook Validators (scripts/hook-validators/)
- validate-file-edit.js: Pre-Edit enforcement (CSP, conflicts, boundaries)
- validate-file-write.js: Pre-Write enforcement (overwrites, boundaries)
- check-token-checkpoint.js: Prevents checkpoint fade at 50k/100k/150k
### Documentation
- CONTINUOUS_ENFORCEMENT_ARCHITECTURE.md: Technical architecture
- BOOTSTRAPPING_SOLUTION.md: Solves auto-run session-init problem
- PRE_APPROVED_COMMANDS.md: Extracted from CLAUDE.md (context reduction)
- Case Study #27028: Framework fade during anti-fade implementation
### Session Initialization Enhancement
- scripts/session-init.js: Added Section 8 (Hook Architecture Status)
- Reports hook validator installation and pre-approved commands
### CLAUDE.md Reduction (Not Committed - .gitignored)
- Reduced from 235 lines to 86 lines (63% reduction)
- Philosophy: "If it can be enforced in code, it should not be documented"
## Key Findings
Case Study #27028 proved documentation-based governance fundamentally
cannot work. AI skipped session-init.js despite "⚠️ CRITICAL" warning
while actively implementing anti-fade enforcement. This validates the
thesis that architectural enforcement (code that runs automatically)
is the only viable solution.
## Next Steps
Bootstrapping solution required: session-init.js needs automatic
invocation on continued sessions. Without this, framework fade will
recur. Options documented in BOOTSTRAPPING_SOLUTION.md.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed package-lock.json from .gitignore
- Added package-lock.json to git tracking
- Fixes npm ci failure in sync-public-docs workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Security improvements:
- Enhanced .gitignore to protect sensitive files
- Removed internal docs from version control (CLAUDE.md, session handoffs, security audits)
- Sanitized README.md (removed internal paths and infrastructure details)
- Protected session state and token checkpoint files
Framework documentation:
- Added 4 case studies (framework in action, failures, real-world governance, pre-publication audit)
- Added rule proliferation research topic
- Sanitized public-facing documentation
Content updates:
- Updated public/leader.html with honest claims only
- Updated public/docs.html with Resources section
- All content complies with inst_016, inst_017, inst_018 (no fabrications, no guarantees, accurate status)
This commit represents Phase 4 of development with production-ready security hardening.