Commit graph

11 commits

Author SHA1 Message Date
TheFlow
971690bb64 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
46f3d6e7c6 feat(blog): add Manage Submission modal for publication tracking
Implements comprehensive submission tracking workflow for blog posts
targeting external publications. This feature enables systematic
management of submission packages and progress monitoring.

Frontend:
- Add submission-modal.js with complete modal implementation
- Modal includes publication selector (22 ranked publications)
- 4-item submission checklist (cover letter, pitch, notes, bio)
- Auto-save on blur with success indicators
- Progress bar (0-100%) tracking completion
- Requirements display per publication
- Update blog-validation.js with event handlers
- Update cache versions (HTML, service worker, version.json)

Backend:
- Add GET /api/blog/:id/submissions endpoint
- Add PUT /api/blog/:id/submissions endpoint (upsert logic)
- Implement getSubmissions and updateSubmission controllers
- Fix publications controller to use config helper functions
- Integration with SubmissionTracking MongoDB model

Version: 1.8.4

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 01:55:06 +13:00
TheFlow
9936247bdb refactor: remove website pages from public/
REMOVED: 7 website feature files from public/

Website Pages (4):
- docs-viewer.html - Website documentation viewer
- media-inquiry.html - Media inquiry form
- media-triage-transparency.html - Media triage page
- researcher.html - "For Researchers" landing page

Website Features (3):
- service-worker.js - PWA service worker
- test-pressure-chart.html - Test page
- version.json - Website version tracking

RETAINED in public/:
- Admin UI (4 pages): login, dashboard, rule-manager, hooks-dashboard
- Admin JS (8 files): auth, dashboard, rule manager, hooks, projects
- Framework components: pressure-chart, interactive-diagram, navbar-admin
- Framework demos (5): 27027, boundary, classification, deliberation, tractatus
- CSS/fonts for admin UI
- Architecture diagrams (images/)

PURPOSE: public/ now contains ONLY framework admin UI and demos,
not website pages for the Tractatus project.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 21:34:57 +13:00
TheFlow
9d390da76b 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
3449882285 refactor: rewrite Copilot Q&A in measured, evidence-based tone
Rewrote Copilot governance answer to match the restrained, analytical tone of the leader page, removing overconfident American-style assertions.

Key changes:
- Opening: "creates significant liability exposure" → "raises structural questions about governance"
- Removed dramatic scenarios: "Post-incident: 'How did this get approved?' No audit trail. No answer."
- Removed unvalidated cost claims (£500k-£2M settlements, specific ROI figures)
- Added development context: "proof-of-concept validated in a single project context"
- Changed assertions to observations: "will cause" → "may create", "is" → "raises questions about"
- Removed sales pitch language: "Case closed", "catastrophic liability exposure"
- Added honest limitations: "If your rules are inadequate...Tractatus enforces those inadequacies architecturally"
- Changed CTA: Removed "pro bono offer" for removed "show you exactly where your exposure is"
- Used cautious framing: "Whether this constitutes 'compliance-grade' evidence depends on your regulatory context"

Tone now matches leader page:
- Measured, intellectual engagement
- Evidence-based claims with context
- Acknowledges uncertainty
- Focuses on structural governance questions
- No prescriptive assertions

Version: 1.1.0 → 1.1.1

User feedback: "I like your overconfident American attitude. It has its place on this planet, but not here."

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 14:19:46 +13:00
TheFlow
89114ac126 feat: add Copilot governance Q&A for General Counsel and AI VPs
Added strategically positioned question addressing governance gaps in Copilot deployments for client correspondence:

Question (ID: 2):
"We're deploying Copilot across our organisation for client correspondence—what governance gaps should concern us, and how does Tractatus address them?"

Answer highlights:
- Liability exposure: unauthorised commitments, confidentiality breaches
- Regulatory compliance gaps: GDPR Article 22, SOC 2 CC2.1
- Tractatus as governance layer above Copilot
- Compliance-grade audit trails
- Phased implementation path (observation → soft → hard enforcement)
- Board-ready cost-benefit analysis
- Architectural vs aspirational governance distinction

Target audience: General Counsel, AI Vice President, Executive Leadership
Placement: Second question in Leader section (prominent positioning)
Keywords: copilot, microsoft, client, correspondence, deployment, governance, risk, liability, compliance, audit, general counsel, legal

Version: 1.0.9 → 1.1.0
Files modified:
- public/js/faq.js (new question ~1,400 words)
- public/service-worker.js (version bump)
- public/version.json (changelog update)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 14:09:54 +13:00
TheFlow
869e89f71d docs: update maintenance guide with FAQ modal scrollbar troubleshooting
Added comprehensive troubleshooting section documenting the FAQ modal scrollbar issue resolution (October 2025):

- Root cause: Flexbox height calculation failure in modal context
- Failed approaches: 6+ different CSS/HTML attempts documented
- Working solution: Explicit max-height with inline overflow-y
- Key insight: Explicit inline styles > flexbox in complex modals
- Lessons learned: Diagnose first, stop guessing after 2-3 failures
- Related issues: Pattern may affect other modals using flexbox

Files updated:
- CLAUDE_Tractatus_Maintenance_Guide.md (v2.1.1)
- public/faq.html (lines 578-580: modal structure)
- public/faq.html (lines 295-316: scrollbar CSS)
- public/service-worker.js (version 1.0.8)
- public/version.json (v1.0.8 with changelog)

This documentation will help future sessions avoid multi-hour troubleshooting cycles by understanding the root cause immediately.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 13:54:46 +13:00
TheFlow
f724d34f78 fix: update CSP to allow cdnjs.cloudflare.com resources
## Critical Bug Fix
All CDN resources (marked.js, highlight.js) were blocked by CSP causing:
- FAQ markdown rendering failures
- No syntax highlighting for code blocks
- Plain text display instead of formatted HTML

## Changes Made

### Backend (src/server.js)
Updated helmet CSP configuration to allow cdnjs.cloudflare.com:
- scriptSrc: added https://cdnjs.cloudflare.com
- styleSrc: added https://cdnjs.cloudflare.com
- connectSrc: added https://cdnjs.cloudflare.com (was missing)
- fontSrc: added https://cdnjs.cloudflare.com

### Frontend (nginx production config)
Fixed nginx add_header inheritance issue:
- Duplicated security headers in HTML location block
- Nginx quirk: add_header in location block overrides parent headers
- Both server block AND location block now have full CSP

### Root Cause
Two-part issue:
1. CSP didn't include cdnjs.cloudflare.com (blocking external resources)
2. Nginx HTML location block used add_header, overriding parent security headers

## Testing
Verified with curl:
- Local: CSP headers include cdnjs.cloudflare.com 
- Production: CSP headers include cdnjs.cloudflare.com 

## Version
- Bumped to 1.0.6
- Force update enabled

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 13:01:11 +13:00
TheFlow
be59c6dd52 fix: inline FAQ markdown rendering and add inst_040
## Bug Fixes
- Fixed inline FAQ markdown rendering with error handling
- Added try-catch around marked.parse() for inline FAQs
- Added fallback to plain text with line breaks on parse failure
- Enhanced logging for FAQ rendering diagnostics

## New Instruction (inst_040)
Created rule requiring complete coverage when user says "all":
- "update all pages" means EVERY page, not representative subset
- Must identify complete scope before starting
- Verify ALL items processed before marking complete
- Ask user to prioritize if scope >20 items

## Rationale
User reported inline FAQs showing raw markdown instead of formatted HTML.
Root cause: createInlineFAQItemHTML lacked error handling that was added
to createFAQItemHTML in previous version. Both functions now have consistent
error handling with logging.

User directive: When saying "all", Claude must not choose subset.

## Version
- Bumped to 1.0.5
- Force update enabled
- Synced inst_040 to production

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 12:51:08 +13:00
TheFlow
720594199e fix: FAQ modal scrolling and standardize footers
## FAQ Modal Fixes
- Fix modal scrolling: changed max-h-[85vh] to h-[85vh] with min-h-0
- Added flex-shrink-0 to modal header for proper flex behavior
- Users can now scroll through all 30 FAQ questions (was stuck at 8)
- Enhanced markdown parsing with error handling and fallback

## UI Improvements
- Removed Quick Actions section from FAQ page per user request
- Standardized footer across 7 user-facing pages
- Added Newsletter link under Community section in all footers

## Pages Updated
- faq.html, researcher.html, implementer.html, leader.html
- about.html, media-inquiry.html, case-submission.html

## Version
- Bumped to 1.0.4 with force update enabled
- Service worker cache updated

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 12:46:23 +13:00
TheFlow
f19154c9e6 feat: add version control system and PWA support
Implements cache busting and progressive web app features:

**Version Management:**
- version.json manifest with changelog tracking
- Service worker with automatic update checking (hourly)
- Update notification UI with changelog display
- Configurable forced updates after timeout
- Cache control headers for optimal performance

**PWA Features:**
- manifest.json with app shortcuts
- Apple touch icon support
- "Add to Home Screen" functionality
- Offline support via service worker

**Cache Strategy:**
- HTML: 5-minute cache with revalidation
- CSS/JS: 1-year immutable cache
- Images: 1-year immutable cache
- version.json/service-worker.js: no-cache

**Integration:**
- All main pages updated with PWA meta tags
- Version manager loaded on all user-facing pages
- Production deployment successful

Users who previously visited the site will now automatically receive
update notifications when version changes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:53:29 +13:00