Commit graph

9 commits

Author SHA1 Message Date
TheFlow
91be0db15d refactor: Rename "Home AI" → "Village AI" across entire codebase
- 57 files modified, 5 files renamed (home-ai → village-ai)
- HTML pages: all user-facing text, data-i18n attributes, anchor IDs, CSS classes
- i18n JSON: keys (home_ai → village_ai) and values across en/de/fr/mi
- Locale files renamed: home-ai.json → village-ai.json (4 languages)
- Main page renamed: home-ai.html → village-ai.html
- Research downloads: translated terms updated (French "IA domestique",
  Māori "AI ā-whare"/"AI kāinga" → "Village AI" per brand name rule)
- JavaScript: navbar component, blog post scripts
- Markdown: research timeline, steering vectors paper, taonga paper

Aligns with community codebase rename (commit 21ab7bc0).
"Village" is a brand name — stays untranslated in all languages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:09:44 +13:00
TheFlow
9895d155e3 fix: Resolve stale CSS caching and CI test failure
- Add ?v= cache-bust parameters to CSS references in index.html,
  home-ai.html, and timeline.html (were missing, causing stale CSS)
- Fix version.json: disable forceUpdate (was causing 10s auto-reload
  loops), fix minVersion paradox (was 0.2.1 > current 0.1.3)
- Fix update-cache-version.js: stop always setting forceUpdate=true,
  add 7 missing HTML files to cache-bust list, add bare CSS/JS
  reference detection
- Fix ClaudeAPI.test.js: generateBlogTopics now takes context object,
  not positional arguments
- Add spacing between honesty note and Koha section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:10:29 +13:00
TheFlow
0b2a8a5fd4 fix: correct admin dashboard filename in cache version script 2025-11-04 10:49:11 +13:00
TheFlow
782c90b2e7 feat(cache): enforce mandatory cache version updates for JS changes
- Enhanced update-cache-version.js to update service worker and version.json
- Added inst_075 governance instruction (HIGH persistence)
- Integrated cache check into deployment script (Step 1/5)
- Created CACHE_MANAGEMENT_ENFORCEMENT.md documentation
- Bumped version to 0.1.1
- Updated all HTML cache parameters

BREAKING: Deployment now blocks if JS changed without cache update
2025-10-24 09:43:20 +13:00
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
33ceefd9b0 fix(scripts): remove 95 accidentally published internal scripts
CRITICAL FIX: Phase 8 commit accidentally added all internal scripts to public repo

In previous commit (6efeca2), git add scripts/ added ALL internal scripts instead of
just removing the 2 project-specific scripts. This exposed internal project code.

REMOVED (95 internal scripts):
- add-*, fix-*, generate-*, migrate-*, seed-*, update-* (document/website scripts)
- import-*, load-*, query-*, verify-* (database scripts)
- audit-*, check-*, validate-* (internal validation scripts)
- archive-*, compare-*, cleanup-* (maintenance scripts)
- monitoring/* (server monitoring scripts)
- sync-instructions-to-db.js, sync-to-public.sh (internal sync scripts)
- install-*, init-koha.js, mongodb-tractatus.service (deployment scripts)

KEPT (1 script):
- scripts/clean-test-db.js (generic test database cleaner)

RESULT: Only framework-relevant scripts remain in public repo

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 22:19:16 +13:00
TheFlow
0e6be3eaf1 refactor: remove website code and fix critical startup crashes (Phase 8)
CRITICAL FIX: Server would CRASH ON STARTUP (multiple import errors)

REMOVED (2 scripts):
1. scripts/framework-watchdog.js
   - Monitored .claude/session-state.json (OUR Claude Code setup)
   - Monitored .claude/token-checkpoints.json (OUR file structure)
   - Implementers won't have our .claude/ directory

2. scripts/init-db.js
   - Created website collections: blog_posts, media_inquiries, case_submissions
   - Created website collections: resources, moderation_queue, users, citations
   - Created website collections: translations, koha_donations
   - Next steps referenced deleted scripts (npm run seed:admin)

REWRITTEN (2 files):

src/models/index.js (29 lines → 27 lines)
- REMOVED imports: Document, BlogPost, MediaInquiry, CaseSubmission, Resource
- REMOVED imports: ModerationQueue, User (all deleted in Phase 2)
- KEPT imports: AuditLog, DeliberationSession, GovernanceLog, GovernanceRule
- KEPT imports: Precedent, Project, SessionState, VariableValue, VerificationLog
- Result: Only framework models exported

src/server.js (284 lines → 163 lines, 43% reduction)
- REMOVED: Imports to deleted middleware (csrf-protection, response-sanitization)
- REMOVED: Stripe webhook handling (/api/koha/webhook)
- REMOVED: Static file caching (for deleted public/ directory)
- REMOVED: Static file serving (public/ deleted in Phase 6)
- REMOVED: CSRF token endpoint
- REMOVED: Website homepage with "auth, documents, blog, admin" references
- REMOVED: Instruction sync (scripts/sync-instructions-to-db.js reference)
- REMOVED: Hardcoded log path (${process.env.HOME}/var/log/tractatus/...)
- REMOVED: Website-specific security middleware
- KEPT: Security headers, rate limiting, CORS, body parsers
- KEPT: API routes, governance services, MongoDB connections
- RESULT: Clean framework-only server

RESULT: Repository can now start without crashes, all imports resolve

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 22:17:02 +13:00
TheFlow
bd262ae48d refactor: reduce public repo to minimal implementation-only resource
REMOVED: 267 non-implementation files (51% reduction)

Categories removed:
- Research documents & case studies (35 files)
- Planning/internal development docs (28 files)
- Website pages & assets (93 files - this is framework code, not website code)
- Audit reports (6 files)
- Non-essential admin UI (11 files)
- Markdown content duplicates (10 files)
- Internal development scripts (96 files)
- Internal setup docs (2 files)

RETAINED: 253 implementation-focused files
- Core framework services (src/)
- Test suite (tests/)
- API documentation (docs/api/)
- Deployment quickstart guide
- Essential admin UI (rule manager, dashboard, hooks dashboard)
- Architecture decision records
- Configuration files

PURPOSE: Public repo is now focused exclusively on developers
implementing Tractatus, not researchers studying it or users visiting
the website. All background/research content available at
https://agenticgovernance.digital

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 21:09:34 +13:00
TheFlow
1906c0be0b docs: update framework to 6 services with PluralisticDeliberationOrchestrator
- Updated all core documentation (introduction, core-concepts, implementation guides)
- Added comprehensive PluralisticDeliberationOrchestrator sections
- Fixed implementation-guide-v1.1.md (BlogCuration → PluralisticDeliberationOrchestrator)
- Updated UI pages (index, researcher, leader) to reflect 6 services
- Enhanced cache busting with unified version script
- FAQ already includes comprehensive value pluralism coverage (Q18-22)

Framework now correctly documents all 6 mandatory services:
1. InstructionPersistenceClassifier
2. CrossReferenceValidator
3. BoundaryEnforcer
4. ContextPressureMonitor
5. MetacognitiveVerifier
6. PluralisticDeliberationOrchestrator (added October 2025)

🤖 Generated with Claude Code
2025-10-12 19:55:44 +13:00