Commit graph

14 commits

Author SHA1 Message Date
TheFlow
5557126f6a feat: eliminate all GitHub references from agenticgovernance.digital
- Created /source-code.html — sovereign hosting landing page explaining
  why we left GitHub, how to access the code, and the sovereignty model
- Navbar: GitHub link → Source Code link (desktop + mobile)
- Footer: GitHub link → Source Code link
- Docs sidebar: GitHub section → Source Code section with sovereign repo
- Implementer page: all repository links point to /source-code.html,
  clone instructions updated, CI/CD code example genericised
- FAQ: GitHub Discussions button → Contact Us with email icon
- FAQ content: all 4 locales (en/de/fr/mi) rewritten to remove
  GitHub Actions YAML, GitHub URLs, and GitHub-specific patterns
- faq.js fallback content: same changes as locale files
- agent-lightning integration page: updated to source-code.html
- Project model: example URL changed from GitHub to Codeberg
- All locale files updated: navbar.github → navbar.source_code,
  footer GitHub → source_code, FAQ button text updated in 4 languages

Zero GitHub references remain in any HTML, JS, or JSON file
(only github-dark.min.css theme name in highlight.js CDN reference).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 18:14:26 +13:00
TheFlow
8f22d0336c feat: Add company website links to navbar and footer
- Add 'Company' section to footer with MySovereignty website links
  - Link to main website (mysovereignty.digital)
  - Link to Village Ecosystem page
  - Link to About Us page
- Add 'Company' section to navbar mobile menu
  - Link to main website (mysovereignty.digital)
- Update footer grid layout: md:grid-cols-4 → md:grid-cols-2 lg:grid-cols-5
- Include translations for all 3 languages (EN, DE, FR)
  - EN: Company
  - DE: Unternehmen
  - FR: Entreprise

Files modified:
- public/js/components/footer.js (lines 52-62)
- public/js/components/navbar.js (lines 110-116)
- public/locales/en/common.json
- public/locales/de/common.json
- public/locales/fr/common.json

Tested locally on port 9000 - all links functional, translations verified.
2025-11-24 13:12:44 +13:00
TheFlow
3c278c7ade feat: Add Phase 2 newsletter enhancements and email templates
Phase 2 Implementation:
- Add RSS feed discovery links to footer (Subscribe section)
- Create email templates (base-template.html, research-updates-content.html)
- Add comprehensive newsletter sending implementation plan
- Fix CSP check to exclude email-templates directory

Email templates use inline styles for cross-client compatibility
(Gmail, Outlook, Apple Mail) and are excluded from CSP checks.

Next steps: Install dependencies (handlebars, @sendgrid/mail),
implement EmailService, controller methods, and admin UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 11:13:15 +13:00
TheFlow
2e3ce0a2fc feat: Add comprehensive visitor retention system
Implemented RSS feeds, newsletter subscriptions, email templates, and admin UI
to encourage repeat visits from self-selected visitors.

## RSS Feeds
- Created RSS 2.0 feed generation (main + topic-specific)
- Endpoints: /feed.xml and /feed/:topic.xml
- Added getPublished() and getPublishedByTag() to BlogPost model

## Newsletter Subscriptions
- Created reusable newsletter modal component
- Added to index, researcher, implementer, leader pages
- Interest selection: research, implementation, governance, project-updates
- Added newsletter trigger button to footer
- Uses existing /api/newsletter/subscribe endpoint

## Email Templates
- Created comprehensive specifications for 4 newsletter tiers
- Research Updates (monthly) - scholarly audience
- Implementation Notes (bi-weekly) - practitioners
- Governance Discussions (sporadic) - stakeholders
- Project Updates (quarterly) - general audience
- Documented template variables, design guidelines

## Admin UI
- Enhanced newsletter management with "Send Newsletter" section
- Tier selection, subject/preview input, JSON content editor
- Preview/test/send buttons (UI ready, email service TBD)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 10:42:43 +13:00
TheFlow
07fcaa2e8f feat(compliance): add GDPR compliance page with trilingual support
Implements comprehensive GDPR compliance documentation explaining how the
Tractatus Framework enforces data protection through architectural constraints
rather than policy documents.

Key features:
- 8 sections covering GDPR Articles 5, 6, 15-22, 25, 32, 33
- Framework positioning: BoundaryEnforcer, CrossReferenceValidator, PluralisticDeliberationOrchestrator
- Full trilingual support (EN/DE/FR) via DeepL API (322 translations)
- Footer links and i18n integration across all languages
- Professional translations for legal accuracy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 10:26:57 +13:00
TheFlow
836421cf92 fix(i18n): ensure contact modal displays in correct language when opened
Fixed issue where clicking "Kontakt" in German mode showed English contact form.

Changes:
- Re-apply translations when modal opens (ensures current language is used)
- Use translated "submitting" text for sending state (DE: "Senden...", FR: "Envoi en cours...")
- Use translated submit button text when re-enabled
- Remove duplicate success message text

Now clicking "Kontakt" in DE mode or "Nous contacter" in FR mode correctly shows the modal in that language.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 18:37:40 +13:00
TheFlow
a1c4a2e1f8 feat(i18n): add multilingual support to Contact Us modal and fix translations
**Contact Modal:**
- Added complete DE/FR translations for contact form
- Added 17 data-i18n attributes to modal elements
- Form labels, buttons, messages now translate
- Languages: EN, DE (Nachricht senden), FR (Envoyer le message)

**Fixed Translations:**
- media-inquiry.json: Fixed "Your Name" → "Ihr Name" (DE), "Votre nom" (FR)
- common.json: Added contact_modal section with all form text

**Translations Added:**
- Modal heading, description, all form labels
- Inquiry type options (general, partnership, technical, feedback)
- Submit/cancel buttons, success/error messages
- Dynamic "Sending..." text (Senden.../Envoi en cours...)

**Technical:**
- Contact modal in footer.js now fully i18n-enabled
- Uses window.I18n.translations for dynamic content
- All text translates when language selector is used

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 16:57:47 +13:00
TheFlow
efab76e13c feat(crm): implement unified contact form system
Complete CRM foundation with contact modal in footer

Backend:
- Contact.model.js: Full CRUD model with statistics tracking
- contact.controller.js: Submit, list, assign, respond, update, delete
- contact.routes.js: Public submission + admin management endpoints
- routes/index.js: Mount contact routes at /api/contact

Frontend:
- footer.js: Replace mailto link with Contact Us modal button
- Contact modal: Form with type, name, email, org, subject, message
- CSRF protection: Extracts token from cookie (like newsletter)
- Rate limiting: formRateLimiter (5/min)
- Validation: Input sanitization + required fields
- UX: Success/error messages, auto-close on success

Admin UI:
- navbar-admin.js: New 'CRM & Communications' section
- Links: Contact Management, Case Submissions, Media Inquiries

Foundation for multi-project CRM across tractatus, family-history, sydigital

Next: Build /admin/contact-management.html page
2025-10-24 16:56:21 +13:00
TheFlow
a992d411b9 feat(researcher): WCAG compliance, Berlin/Weil foundations, fixed footer i18n
- Full WCAG accessibility: ARIA attributes (aria-expanded, aria-controls), keyboard navigation (Enter/Space)
- Reframed research context: Berlin/Weil as primary intellectual foundation (moral pluralism, categorical imperative)
- Bibliography with proper academic citations: Weil (The Need for Roots, Gravity and Grace), Berlin (Four Essays on Liberty)
- Fixed footer i18n: Implemented recursive deepMerge() to preserve nested translation objects
- Root cause: Shallow merge {...obj1, ...obj2} was overwriting entire footer object from common.json
- Consolidated all footer translations in common.json, removed from page-specific files
- Mobile optimization: 44px/48px touch targets, touch-action: manipulation, responsive design
- Progressive enhancement: <noscript> fallback for JavaScript-disabled users
- Version 1.3.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 23:56:37 +13:00
TheFlow
60f239c0bf refactor: deep cleanup - remove all website code from framework repo
REMOVED: 77 website-specific files from src/ and public/

Website Models (9):
- Blog, CaseSubmission, Document, Donation, MediaInquiry,
  ModerationQueue, NewsletterSubscription, Resource, User

Website Services (6):
- BlogCuration, MediaTriage, Koha, ClaudeAPI, ClaudeMdAnalyzer,
  AdaptiveCommunicationOrchestrator

Website Controllers (9):
- blog, cases, documents, koha, media, newsletter, auth, admin, variables

Website Routes (10):
- blog, cases, documents, koha, media, newsletter, auth, admin, test, demo

Website Middleware (4):
- auth, csrf-protection, file-security, response-sanitization

Website Utils (3):
- document-section-parser, jwt, markdown

Website JS (36):
- Website components, docs viewers, page features, i18n, Koha

RETAINED Framework Code:
- 6 core services (Boundary, ContextPressure, CrossReference,
  InstructionPersistence, Metacognitive, PluralisticDeliberation)
- 4 support services (AnthropicMemoryClient, MemoryProxy,
  RuleOptimizer, VariableSubstitution)
- 9 framework models (governance, audit, deliberation, project state)
- 3 framework controllers (rules, projects, audit)
- 7 framework routes (rules, governance, projects, audit, hooks, sync)
- 6 framework middleware (error, validation, security, governance)
- Minimal admin UI (rule manager, dashboard, hooks dashboard)
- Framework demos and documentation

PURPOSE: Tractatus-framework repo is now PURELY framework code.
All website/project code remains in internal repo only.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 21:22:40 +13:00
TheFlow
d0700a6f92 fix(values): remove prohibited 'guarantee' language from user-facing content
VIOLATION: Using absolute assurance language violates inst_017
- README.md: "architectural AI safety guarantees" → "enforcement"
- README.md: "guarantees transparency" → "provides transparency"
- public/index.html meta: "guarantees" → "enforcement"
- public/about.html CTA: "architectural guarantees" → "constraints"
- public/js/components/footer.js: "guarantees" → "enforcement"
- public/js/faq.js (5 instances): "guarantees" → "enforcement/constraints"
- public/locales/en/*.json (3 files): "guarantees" → "enforcement/constraints"
- scripts/seed-first-blog-post.js: "safety guarantees" → "safety constraints"

RESULT: All user-facing "guarantee" language removed
- Production website now compliant with inst_017
- No absolute assurance claims in public content
- Framework documentation still pending (hook blocked markdown edits)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 15:19:25 +13:00
TheFlow
c4f4403236 feat(i18n): add footer and privacy page translations (en/de/fr)
SUMMARY:
Implemented complete internationalization for footer component and
privacy page across English, German, and French languages.

CHANGES:

1. Privacy Page Translations (3 files):
   - Created locales/en/privacy.json (baseline)
   - Created locales/de/privacy.json (German - Datenschutzerklärung)
   - Created locales/fr/privacy.json (French - Politique de confidentialité)
   - All 11 sections + Te Tiriti fully translated

2. Footer i18n Enhancement:
   - Rewrote footer.js with data-i18n attributes
   - Added languageChanged event listener for dynamic updates
   - Expanded homepage.json footer translations (en/de/fr)
   - Footer now auto-translates with language selection

3. Privacy Page Integration:
   - Added data-page="privacy" attribute to HTML
   - Added data-i18n to all content sections (header + 11 sections)
   - Integrated with existing language-selector.js component
   - Updated i18n-simple.js pageMap to recognize privacy page

4. Bug Fix:
   - Fixed SessionStart hook error in .claude/settings.local.json
   - Changed from $CLAUDE_PROJECT_DIR to absolute path
   - Hook now runs successfully at session start

BENEFITS:
- Better UX for international users (German, French speakers)
- Legal compliance (privacy policy in native languages)
- Consistent language experience across entire site
- Leverages existing language persistence (localStorage)

INTEGRATION:
- Works with existing language-selector.js (flag icons: 🇬🇧 🇩🇪 🇫🇷)
- Language preference persists across all pages
- Zero duplication - integrates with existing i18n system

WCAG COMPLIANCE:
✓ Maintains semantic HTML structure
✓ Preserves WCAG AA contrast ratios
✓ All links remain accessible and distinguishable
✓ German and French translations maintain accessibility standards

FRAMEWORK COMPLIANCE:
✓ Zero CSP violations - uses data-i18n attributes only
✓ No inline scripts or styles
✓ Follows existing Tractatus i18n patterns

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 14:44:14 +13:00
TheFlow
52cbbb1e3a style(ui): update theme, branding, and GitHub repository links
Update UI across all pages with:
- New favicon and brand icons (favicon-new.svg, tractatus-icon-new.svg)
- Theme CSS integration (tractatus-theme.min.css)
- Correct GitHub repository links (AgenticGovernance/tractatus)
- PWA manifest updates
- Consistent branding colors and gradients

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 12:48:29 +13:00
TheFlow
de0b117516 feat: add multi-currency support and privacy policy to Koha system
Multi-Currency Implementation:
- Add currency configuration with 10 supported currencies (NZD, USD, EUR, GBP, AUD, CAD, JPY, CHF, SGD, HKD)
- Create client-side and server-side currency utilities for conversion and formatting
- Implement currency selector UI component with auto-detection and localStorage persistence
- Update Donation model to store multi-currency transactions with NZD equivalents
- Update Koha service to handle currency conversion and exchange rate tracking
- Update donation form UI to display prices in selected currency
- Update transparency dashboard to show donations with currency indicators
- Update Stripe setup documentation with currency_options configuration guide

Privacy Policy:
- Create comprehensive privacy policy page (GDPR compliant)
- Add shared footer component with privacy policy link
- Update all Koha pages with footer component

Technical Details:
- Exchange rates stored at donation time for historical accuracy
- All donations tracked in both original currency and NZD for transparency
- Base currency: NZD (New Zealand Dollar)
- Uses Stripe currency_options for monthly subscriptions
- Dynamic currency for one-time donations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 15:17:23 +13:00