TheFlow
ac2db33732
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
a3c8ca462c
SECURITY: Remove all internal/confidential files from public repository
...
CRITICAL SECURITY FIX:
Removed 226 internal and sensitive files from git tracking to protect
the public tractatus-framework repository from exposing confidential
development information, server details, and internal strategies.
SCOPE:
This cleanup separates the INTERNAL repository (tractatus) from the
PUBLIC repository (tractatus-framework on GitHub).
REMOVED DIRECTORIES (entire):
- .claude/ (framework session state, metrics, archives)
- governance/ (internal operational governance)
- For Claude Web/ (internal development specs)
- scripts/hook-validators/ (internal enforcement)
- scripts/framework-components/ (internal components)
- docs/planning/, docs/testing/, docs/outreach/
- docs/stripe-analysis/, docs/economist-analysis/
- docs/framework-incidents/, docs/deployment-logs/
- docs/analysis-archive-2025-10/
REMOVED ROOT FILES:
- CLAUDE_*.md, ClaudeWeb*.md (internal development)
- PITCH-*.md (internal pitch documents)
- PHASE-*.md, MEETING_NOTES*.md (internal planning)
- SESSION*.md, OPTIMAL_NEXT_SESSION*.md (session handoffs)
- ARCHIVE_SUMMARY*.md, CLOSEDOWN*.* (session archives)
- EXECUTIVE_BRIEF*.md (internal briefs)
- Tractatus-Website-Complete-Specification*.md (internal specs)
- UI_TRANSFORMATION_PROJECT_PLAN.md, SITE_IMPROVEMENT_PRIORITIES.md
- SCHEDULED_TASKS.md, TRACTATUS_BRAND_SYSTEM.md
- .stripe-ids.json, .rsyncignore (sensitive/deployment)
- deployment-output.txt, migration-output.txt (logs)
- ECONOMIST_LETTER*.docx, PERPLEXITY_USER_PROMPT.txt (correspondence)
REMOVED SCRIPTS:
- scripts/deploy-*.sh (contain server IPs)
- scripts/session-init.js, scripts/check-session-pressure.js
- scripts/analyze-violations.js
- scripts/hook-validators/*.js (5 files)
- scripts/framework-components/*.js
REMOVED DOCS (96 files):
- docs/SESSION*.md, docs/session-handoff-*.md
- docs/DEPLOYMENT*.md, docs/MULTI_PROJECT*.md
- docs/DOCUMENT_AUDIT*.md, docs/DOCUMENT_*.md
- docs/BLOG-POST-OUTLINES.md
- docs/PHASE-*.md, docs/STRIPE_*.md, docs/KOHA*.md
- docs/SECURITY_AUDIT*.md, docs/FRAMEWORK_FAILURE*.md
- docs/BENCHMARK*.md, docs/IMPLEMENTATION_PROGRESS*.md
- docs/BOOTSTRAPPING*.md, docs/GOVERNANCE-RULE-LIBRARY.md
- docs/SIMULATION*.md, docs/API_MEMORY*.md
ADDED PROTECTIONS:
1. Comprehensive .gitignore (172 lines)
- Blocks all internal directories
- Blocks all internal file patterns
- Prevents accidental commits
2. PUBLIC_REPO_CHECKLIST.md
- Security verification checklist
- Weekly maintenance procedures
- Clear guidelines for public vs internal
REMAINING PUBLIC FILES: 6,435
- src/: 85 (open source services)
- tests/: 35 (unit/integration tests)
- public/: 178 (website frontend)
- scripts/: 111 (public utilities)
- docs/: 107 (public documentation)
- root: 13 (README, LICENSE, package.json, configs)
VERIFICATION:
✓ No server IPs
✓ No SSH keys or credentials
✓ No payment system secrets
✓ No internal planning documents
✓ No session handoffs or development logs
✓ No deployment scripts with production details
RESULT:
Public tractatus-framework repository now contains ONLY:
- Open source code
- Public documentation
- Implementation guides
- Apache 2.0 licensed content
Internal tractatus repository (local) retains ALL files for development.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 18:50:16 +13:00
TheFlow
209a3a291a
feat(framework): implement 6 high-priority governance enhancements
...
SUMMARY:
Implemented 6 framework refinements identified from incident analysis
(inst_049 and inst_025 violations). These enhancements provide architectural
enforcement for patterns that previously relied on voluntary compliance.
ENHANCEMENTS IMPLEMENTED:
1. Instruction Analytics Script (Priority 8)
- scripts/analyze-instruction-violations.js
- Analyzes instruction-history.json for usage patterns
- Identifies most violated instructions
- Calculates enforcement effectiveness (hook vs. voluntary)
- Shows 97.2% voluntary compliance, 75% hook enforcement
- Recommendations for converting voluntary → architectural
2. Framework Incidents Database (Priority 7)
- .claude/framework-incidents.json
- Structured tracking of framework violations
- INC-001: Ignored user hypothesis (70k tokens wasted)
- INC-002: Deployment directory flattening (inst_025 violation)
- Statistics: 2 incidents, 75k tokens wasted, 4.5 hours lost
3. Loop Detector Module (Priorities 3 & 4)
- scripts/framework-components/LoopDetector.js
- Detects "stuck in loop" patterns
- Triggers: 3+ edits to same file, repeated action types
- Feeds into MetacognitiveVerifier and ContextPressureMonitor
- Calculates pressure contribution (5-40 points by severity)
4. Action Pattern Tracker (Priority 3 & 4)
- scripts/track-action-patterns.js
- Tracks edit/write actions to detect repetition
- Alerts after 3 consecutive edits to same file
- Maintains action history (last 100 actions)
- Recommendations for metacognitive verification
5. Pre-Deployment Validation (Priority 5)
- scripts/validate-deployment.js
- Validates rsync/scp commands against inst_025
- Detects directory structure flattening
- Suggests separate commands for different directories
- Prevents 4th documented occurrence of deployment errors
6. User Suggestion Tracker (Priority 6)
- scripts/track-user-suggestions.js
- Implements inst_049: "Test user hypothesis first"
- Tracks user technical hypotheses
- Flags untested hypotheses as HIGH priority
- Integrates with MetacognitiveVerifier for compliance
USAGE:
Instruction Analytics:
node scripts/analyze-instruction-violations.js
Loop Detection:
node scripts/track-action-patterns.js --check
node scripts/track-action-patterns.js --summary
Deployment Validation:
node scripts/validate-deployment.js --command "rsync ..."
User Suggestions:
node scripts/track-user-suggestions.js --add "hypothesis text"
node scripts/track-user-suggestions.js --check-untested
IMPACT:
- Converts 6 voluntary compliance patterns to architectural enforcement
- Prevents repeat of documented 75k token waste
- Provides visibility into framework effectiveness
- Establishes foundation for future hook integration
METRICS FROM ANALYTICS:
- Active Instructions: 40
- Voluntary Compliance: 97.2%
- Hook Enforcement: 75.0%
- Recorded Violations: 2
- Tokens Wasted: 75,000
NEXT STEPS:
- Integrate LoopDetector into MetacognitiveVerifier.service.js
- Add Pre-Deployment Validation to Bash command validator hook
- Wire User Suggestion Tracker into BoundaryEnforcer checks
- Document successful compliance patterns (7 STRATEGIC instructions at 100%)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 20:41:10 +13:00