fix: improve navigation on researcher.html page

- Update development context text to clarify progressive stages
- Add prominent CTA buttons for Theoretical Foundations PDFs
- Add navigation button to /architecture.html in Six-Component section
- Add Appendix B: Glossary of Terms to Research Documentation
- Improve button styling for better visibility and accessibility
- Verify implementer.html and leader.html navigation (all working)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TheFlow 2025-10-15 17:10:59 +13:00
parent a8f8d8dbca
commit 3cf9aa9f44
3 changed files with 550 additions and 9 deletions

View file

@ -0,0 +1,195 @@
# Optimal Session Startup: Privacy Analytics Implementation
**Date Created:** 2025-10-15
**Session Purpose:** Implement privacy-preserving analytics (Priority 1 - CRITICAL VALUES)
**Previous Session:** SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md
**Estimated Duration:** 1-2 days
---
## 🚀 RECOMMENDED STARTUP COMMAND
```bash
node scripts/session-init.js
```
**Then immediately review these files:**
1. `SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md` (this session's accomplishments)
2. `SESSION_HANDOFF_2025-10-14_ROADMAP_COPYRIGHT.md` (previous context)
3. `docs/plans/integrated-implementation-roadmap-2025.md` (46% complete roadmap)
---
## 📋 SESSION CONTEXT
**Previous Session Accomplishments:**
- ✅ Fixed PWA install button (now shows helpful feedback + CSP compliant)
- ✅ Verified transparency dashboards (both working)
- ✅ Complete GitHub repository setup:
- CODE_OF_CONDUCT.md (Contributor Covenant v2.1)
- Issue templates (bug, feature, docs)
- GitHub Actions CI workflow (lint + test)
**Git Status:**
- 7 commits ahead of origin/main
- New handoff document untracked: `SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md`
- All other changes committed
**Session Pressure Warning:**
- Previous session ended at HIGH pressure (56.4%)
- Fresh session recommended for optimal focus
---
## 🎯 THIS SESSION'S PRIORITY
### Priority 1: Privacy-Preserving Analytics Implementation
**WHY CRITICAL:** Cannot do public launch without values alignment on privacy (Te Tiriti, CARE Principles)
**TASKS:**
1. **Research & Select Solution** (2-3 hours)
- Recommended: Plausible Analytics
- GDPR compliant by default
- No cookies
- Country-level geolocation only
- Open source
- Self-hosted or cloud options
- Alternatives to consider:
- Fathom Analytics
- Simple Analytics
- Umami (self-hosted)
- Decision criteria:
- ✅ No cookies required
- ✅ No personal data collection
- ✅ Country-level geolocation only (not city/IP)
- ✅ GDPR/CCPA compliant by default
- ✅ Open source preferred
- ✅ Easy integration (<1 day)
- ✅ Reasonable cost (or self-hostable)
2. **Install & Configure** (3-4 hours)
- Self-hosted vs cloud decision
- If self-hosted:
- Deploy on existing VPS (vps-93a693da.vps.ovh.net)
- Set up systemd service
- Configure nginx reverse proxy
- If cloud:
- Sign up for service
- Configure domain
- Get tracking script
- Integration:
- Add script tag to website
- Test tracking
- Verify no cookies set
3. **Transparency Implementation** (2-3 hours)
- Add privacy policy section to footer
- Link to analytics dashboard (if public)
- Explain what we collect and why
- Document in `/privacy.html` or `/about.html`
- Make dashboard public if possible (values alignment)
4. **Testing & Verification** (1-2 hours)
- Confirm no cookies set (browser dev tools)
- Verify data collection scope (check dashboard)
- Test on multiple browsers
- Check performance impact (<100ms)
- Verify GDPR compliance
5. **Deployment** (1 hour)
- Deploy to production
- Test on live site
- Monitor for errors
- Update session handoff
**ESTIMATED TOTAL TIME:** 1-2 days (9-14 hours)
---
## 🔒 FRAMEWORK REMINDERS
**Before starting work:**
1. ✅ Run `node scripts/session-init.js` (already done at startup)
2. ✅ Run pressure check at 50k, 100k, 150k tokens
3. ✅ Use BoundaryEnforcer for values decisions:
- Privacy analytics selection IS a values decision
- User must approve final choice
4. ✅ Use CrossReferenceValidator before major changes
5. ✅ Use InstructionPersistenceClassifier for new directives
**Values Decision Points:**
- Analytics provider selection (user approval required)
- What data to collect (user approval required)
- Dashboard visibility (public vs private - user approval required)
---
## 📁 KEY FILES & LOCATIONS
**Configuration:**
- MongoDB: Port 27017, database `tractatus_dev`
- Application: Node.js/Express, port 9000
- Production: vps-93a693da.vps.ovh.net (Ubuntu, systemd)
**Documentation:**
- Roadmap: `docs/plans/integrated-implementation-roadmap-2025.md`
- Privacy page: `/public/privacy.html` (may need creation)
- Footer template: `/public/js/components/footer.js`
**Handoff Documents:**
- This session: `SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md`
- Previous: `SESSION_HANDOFF_2025-10-14_ROADMAP_COPYRIGHT.md`
---
## 🚨 KNOWN CONSTRAINTS
**Values Alignment:**
- Te Tiriti o Waitangi commitment (Māori data sovereignty)
- CARE Principles (Collective benefit, Authority to control, Responsibility, Ethics)
- No tracking of individuals without explicit consent
- Transparency by default
**Technical Constraints:**
- Must work with existing tech stack (vanilla JS, Tailwind)
- No breaking changes to existing functionality
- Performance budget: <100ms overhead
- CSP compliant (no inline scripts - inst_008)
---
## 📊 SUCCESS CRITERIA
This task is complete when:
1. ✅ Privacy-first analytics solution selected and approved by user
2. ✅ Analytics installed and operational (collecting data)
3. ✅ No cookies set (verified in browser)
4. ✅ Transparency statement added to website
5. ✅ Dashboard accessible (public or private as approved)
6. ✅ Performance impact verified (<100ms)
7. ✅ Deployed to production
8. ✅ Documented in session handoff
---
## 🔄 NEXT PRIORITIES (After This)
**Priority 2:** Draft video walkthrough script (5-10 min)
- Problem → Solution → Demos → Value proposition
- For researchers needing quick overview
**Priority 3:** Soft research outreach
- After video and QA complete
- Personalized emails to research organizations
---
**READY TO START!**
Run the initialization command above, review handoff documents, then begin with analytics research.
Good luck! 🚀

View file

@ -0,0 +1,317 @@
# Session Handoff: GitHub Community Infrastructure + PWA Fixes
**Date:** 2025-10-15
**Session Type:** Bug fixes + Infrastructure + Planning
**Duration:** ~2 hours
**Framework Status:** All 6 services operational
**Session Pressure:** HIGH (56.4% at closedown - recommend fresh session for next tasks)
---
## Session Summary
This session accomplished two major objectives:
1. ✅ **Fixed non-responsive PWA install button** + eliminated CSP violations
2. ✅ **Complete GitHub repository setup** for project maturity signaling
3. ✅ **Verified transparency dashboards** (both working correctly)
---
## Major Accomplishments
### 1. PWA Install Button UX Improvements ✅
**Problem Investigated:**
- User reported "create App to be placed on desktop/mobile" popup not responding when clicked
- Root cause: `installApp()` function in `version-manager.js` silently failed when browser's `beforeinstallprompt` event hadn't fired
**Solution Deployed (commit c5c3ae1):**
- ✅ Added `showInstallUnavailableMessage()` function with helpful user feedback
- ✅ Shows contextual messages:
- "Already Installed" if app is already installed
- "Browser Not Supported" with browser recommendations if prompt unavailable
- ✅ Auto-dismisses after 8 seconds
- ✅ **BONUS:** Fixed ALL CSP violations - removed 5 inline event handlers (`onclick=`)
- ✅ All buttons now use `addEventListener` (fully CSP compliant)
**Files Changed:**
- `public/js/version-manager.js` (+110 lines)
**Deployed to Production:**
- ✅ Verified on https://agenticgovernance.digital (0 inline handlers remaining)
---
### 2. Transparency Dashboards Verification ✅
**Status Check Results:**
**Koha Transparency Dashboard** (`/koha/transparency.html`)
- ✅ API endpoint working: `/api/koha/transparency`
- ✅ Shows: $0 total received, 0 monthly supporters
- ✅ Chart.js visualizations rendering correctly
- ✅ Allocation breakdown (40% dev, 30% hosting, 20% research, 10% community)
**Media Triage Transparency** (`/media-triage-transparency.html`)
- ✅ API endpoint working: `/api/media/triage-stats`
- ✅ Shows: 1 inquiry triaged, 100% human review, 0% auto-responses
- ✅ Urgency/sensitivity distributions functional
- ✅ BoundaryEnforcer metrics displayed
**Conclusion:** Both dashboards fully operational - no action needed.
---
### 3. GitHub Community Infrastructure (Complete) ✅
**Commit:** 7050c8d
**Purpose:** Signal project maturity to researchers and potential contributors
**Files Created:**
**CODE_OF_CONDUCT.md** (48 lines)
- Contributor Covenant v2.1 (industry standard)
- Contact: `conduct@agenticgovernance.digital`
- Downloaded from official source, customized for Tractatus
- Standard enforcement guidelines (correction → warning → temp ban → perm ban)
**Issue Templates** (`.github/ISSUE_TEMPLATE/`)
1. **config.yml** - Disables blank issues, links to Discussions/Docs/Media
2. **bug_report.yml** - Tractatus-specific:
- Dropdown for 6 framework components + website
- Environment details (OS, browser, Node.js version)
- Log output section (auto-formatted shell)
3. **feature_request.yml** - Includes **Values Impact Assessment**:
- Critical for Tractatus governance model
- "Does this involve values decisions?" (Yes/No/Unsure)
- Use case description required
4. **documentation.yml** - Documentation improvement tracking:
- Type: Technical/API/Tutorial/Conceptual/Case Study
- Issue type: Missing/Unclear/Incorrect/Outdated/Typo/Broken link
- Page/section reference
**GitHub Actions CI Workflow** (`.github/workflows/ci.yml`)
- **Triggers:** Push/PR to main/develop branches
- **Jobs:**
1. **Lint:** ESLint (zero warnings policy)
2. **Test:** Jest on Node 18.x + 20.x (matrix)
- Codecov integration for coverage tracking
- Uploads coverage only on Node 20.x
3. (Future: Framework integrity checks, security audit)
**Total:** 6 files, 329 lines added
---
## Git Commits This Session
```
372e9d6 - docs: add session handoff from 2025-10-14 (roadmap + copyright fixes)
7050c8d - feat: add GitHub community infrastructure for project maturity
c5c3ae1 - fix: PWA install button UX improvements and CSP compliance
```
**Branch Status:** 7 commits ahead of origin/main (includes commits from previous session)
---
## Session Pressure Analysis
**Final Pressure:** HIGH (56.4%)
**Breakdown:**
- Token Usage: 51.7% (105,499/200,000)
- Conversation: 100% (message 46)
- Task Complexity: 6.0%
- Error Frequency: 0.0%
**Recommendation:** 🔄 **SUGGEST_CONTEXT_REFRESH**
- Very long conversation - attention may degrade
- Next session should start fresh for optimal focus on Priority 1 (privacy analytics)
**Errors Encountered:**
- API Error 400: Content filter blocked Code of Conduct text generation
- API Error 500: Overloaded (Anthropic servers temporarily overloaded)
- Workaround: Downloaded Contributor Covenant directly via `curl` instead
---
## Next Session Priorities (Ordered)
### Priority 1: Privacy-Preserving Analytics Implementation (1-2 days) - CRITICAL VALUES
**Why Critical:** Cannot do public launch without values alignment on privacy
**Tasks:**
1. Research/select privacy-first analytics solution
- **Recommended:** Plausible Analytics (GDPR compliant, no cookies, open source)
- Alternatives: Fathom, Simple Analytics, Umami
- Requirements:
- No cookies
- No personal data collection
- Country-level geolocation only (not city/IP)
- GDPR/CCPA compliant by default
- Open source preferred
2. Install and configure chosen solution
- Self-hosted vs cloud decision
- Integration with website (script tag)
3. Add transparency statement to website footer
- Link to privacy policy
- Explain what we collect and why
- Link to analytics dashboard (if public)
4. Test and verify
- Confirm no cookies set
- Verify data collection scope
- Check performance impact
**Estimated Time:** 1-2 days
**Blockers:** None
**Prerequisites:** None (can start immediately)
---
### Priority 2: Video Walkthrough Script (1 day)
**Purpose:** Researchers need quick visual overview before deep engagement
**Tasks:**
1. Draft 5-10 minute script covering:
- **Problem** (60-90s): Current AI governance failures, pattern bias
- **Solution** (90-120s): Tractatus structural constraints overview
- **Demos** (180-240s): 27027 incident, BoundaryEnforcer, transparency dashboards
- **Value Proposition** (60-90s): Why researchers should care, collaboration opportunities
2. Review script for:
- Measured tone (match leader.html positioning)
- Technical accuracy
- Clarity for multiple audiences
- Call to action
3. Plan visuals/screen recordings needed
**Estimated Time:** 1 day (script only, not production)
**Blockers:** None
**Prerequisites:** None
---
### Priority 3: Soft Research Outreach (After video + QA)
**Not Yet Started** - depends on video completion and final QA testing
**Tasks:**
- Personalized emails to 5+ research organizations
- Target: Center for AI Safety, AI Accountability Lab, Wharton, etc.
- Include: demos, docs, video, deployment guide links
---
## Key Files & Locations
**New This Session:**
- `CODE_OF_CONDUCT.md` - Contributor Covenant v2.1
- `.github/ISSUE_TEMPLATE/` - 4 templates (bug, feature, docs, config)
- `.github/workflows/ci.yml` - Automated testing and linting
- `public/js/version-manager.js` - PWA fixes (CSP compliant)
**Handoff Documents:**
- This file: `SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md`
- Previous: `SESSION_HANDOFF_2025-10-14_ROADMAP_COPYRIGHT.md`
**Production:**
- Website: https://agenticgovernance.digital (PWA fixes deployed)
- GitHub: https://github.com/AgenticGovernance/tractatus-framework
- Server: vps-93a693da.vps.ovh.net (all services operational)
---
## Technical Status
**Production Environment:**
- ✅ Website live and operational
- ✅ All 6 framework services running
- ✅ PWA install button fixed
- ✅ Transparency dashboards working
- ✅ GitHub community infrastructure in place
**Framework Services:**
- All 6 governance services operational
- Test coverage: 223/223 tests passing
- Performance overhead: <10ms
- Context pressure monitoring: Active
**GitHub Repository:**
- ✅ CODE_OF_CONDUCT.md
- ✅ Issue templates (bug, feature, docs)
- ✅ CI/CD workflow (lint + test)
- ❌ CONTRIBUTING.md (not yet created - optional)
- ❌ Pull request template (not yet created - optional)
---
## Known Issues & Blockers
**None Critical** - System fully operational
**Planning Notes:**
1. Privacy analytics decision needed (Plausible vs alternatives)
2. Video script requires clear narrative structure
3. Research outreach timing depends on QA completion
4. Te Reo Māori consultation ongoing (separate track)
---
## Framework Pressure Status
📊 **Context Pressure: HIGH (56.4%)** (last check: 105,499/200,000 tokens)
- Token Usage: 51.7%
- Conversation Length: 100.0% (message 46)
- Task Complexity: 6.0%
- Error Frequency: 0.0%
- Recommendation: 🔄 Refresh context - start new session
- Next Checkpoint: N/A (session ending)
**Action Taken:** Clean session closedown, handoff document created
---
## Optimal Next Session Startup
**RECOMMENDED STARTUP COMMAND:**
```bash
node scripts/session-init.js
```
This will:
1. Initialize session state and framework
2. Load instruction history (37 active instructions)
3. Run baseline pressure check
4. Verify all 6 framework components
5. Report status
**Then review:**
- This handoff document: `SESSION_HANDOFF_2025-10-15_GITHUB_PWA.md`
- Previous context: `SESSION_HANDOFF_2025-10-14_ROADMAP_COPYRIGHT.md`
- `docs/plans/integrated-implementation-roadmap-2025.md` (46% complete)
**Priority for next session:** Privacy-preserving analytics implementation (Task 2 from roadmap)
---
**Session End Time:** 2025-10-15 ~17:00 UTC
**Next Session:** Start fresh with Priority 1 (privacy analytics)
**Framework Status:** ✅ All systems operational
**Git Status:** ✅ All changes committed (3 commits this session)
**Background Processes:** ✅ Stopped cleanly
**Session Pressure:** 🔄 HIGH - recommend fresh start
---
**Document Control:**
- Created: 2025-10-15
- Session Type: Bug fixes + Infrastructure
- Major Tasks: 3 (PWA fixes, transparency check, GitHub setup)
- Git Commits: 3
- Files Created: 7
- Lines Added: ~439
- Production Deployments: 1 (version-manager.js)
- Status: ✅ COMPLETE - Ready for fresh session

View file

@ -68,7 +68,7 @@
<div class="bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
<p class="text-sm text-amber-900 font-medium mb-2">Development Context</p>
<p class="text-sm text-amber-800">
Tractatus was developed over six months (AprilOctober 2025) in single-project context (this website). Observations derive from direct engagement with Claude Code (Anthropic's Sonnet 4.5 model) across approximately 500 development sessions. This is exploratory research, not controlled study.
Tractatus was developed over six months (AprilOctober 2025) in progressive stages that evolved into a live demonstration of its capabilities in the form of a single-project context (https://agenticgovernance.digital). Observations derive from direct engagement with Claude Code (Anthropic's Sonnet 4.5 model) across approximately 500 development sessions. This is exploratory research, not controlled study.
</p>
</div>
@ -120,11 +120,17 @@
Governance embedded in culture or process erodes over time as systems evolve. Architectural constraints create structural inertia that resists organisational drift. Making governance external to AI runtime creates "accountability infrastructure" that survives individual session variations.
</p>
<p class="text-sm text-gray-600 border-t border-gray-200 pt-3 mt-4">
<a href="/downloads/organizational-theory-foundations-of-the-tractatus-framework.pdf" target="_blank" class="text-amber-700 hover:text-amber-800 font-medium">
View complete organisational theory foundations (PDF) →
<div class="text-sm text-gray-600 border-t border-gray-200 pt-4 mt-4">
<a href="/downloads/organizational-theory-foundations-of-the-tractatus-framework.pdf"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center bg-amber-600 text-white px-5 py-3 rounded-lg font-semibold hover:bg-amber-700 transition shadow-md">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
View Complete Organisational Theory Foundations (PDF)
</a>
</p>
</div>
</div>
</div>
</div>
@ -162,11 +168,17 @@
This approach recognises that <strong>governance isn't solving values conflicts—it's ensuring they're addressed through appropriate deliberative process</strong> rather than AI imposing resolution.
</p>
<p class="text-sm text-gray-600 border-t border-gray-200 pt-3 mt-4">
<a href="/downloads/pluralistic-values-deliberation-plan-v2-DRAFT.pdf" target="_blank" class="text-amber-700 hover:text-amber-800 font-medium">
View pluralistic values deliberation plan (PDF, DRAFT status) →
<div class="text-sm text-gray-600 border-t border-gray-200 pt-4 mt-4">
<a href="/downloads/pluralistic-values-deliberation-plan-v2-DRAFT.pdf"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center bg-amber-600 text-white px-5 py-3 rounded-lg font-semibold hover:bg-amber-700 transition shadow-md">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
View Pluralistic Values Deliberation Plan (PDF, DRAFT)
</a>
</p>
</div>
</div>
</div>
</div>
@ -320,6 +332,16 @@
<div class="text-xs text-gray-600 bg-gray-50 p-3 rounded mt-4">
<strong>Architectural principle:</strong> Services operate external to AI runtime with autonomous triggering. AI doesn't decide "should I check governance rules?"—architecture enforces checking by default. This addresses voluntary compliance problem inherent in prompt-based governance.
</div>
<div class="border-t border-gray-200 pt-4 mt-4">
<a href="/architecture.html"
class="inline-flex items-center bg-blue-600 text-white px-5 py-3 rounded-lg font-semibold hover:bg-blue-700 transition shadow-md">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
View Full System Architecture & Technical Details
</a>
</div>
</div>
</div>
</div>
@ -383,6 +405,13 @@
</svg>
</a>
<a href="/downloads/tractatus-agentic-governance-system-glossary-of-terms.pdf" target="_blank" class="flex items-center justify-between p-4 border border-gray-300 rounded hover:border-amber-500 hover:bg-gray-50 transition">
<span class="font-medium text-gray-900">Appendix B: Glossary of Terms</span>
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
</a>
<a href="/docs.html?category=technical-reference" class="flex items-center justify-between p-4 border border-gray-300 rounded hover:border-amber-500 hover:bg-gray-50 transition">
<span class="font-medium text-gray-900">Complete Technical Documentation</span>
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">