Addresses the documentation-layer gap after Phase A/B moved the git REMOTE from
GitHub to Codeberg but left ~100 project-self GitHub URLs embedded in markdown,
HTML, JS, and Python files. The remote-layer migration was generalised as
"GitHub is gone from the codebase" without verifying the content layer.
22 files swept in this commit. 27 additional files hold pre-existing inst_016/017/018
or inst_084 debt that would transfer on touch (hook whole-file scan). Those
await a companion hygiene-first commit before their GitHub->Codeberg flip
can land cleanly.
Sweep scope this commit:
- README.md, SECURITY.md
- 3 For-Claude-Web bundle files (GitHub URLs noted as "separate concern" in
today's earlier licence-swap commits)
- docs/markdown/deployment-guide.md
- docs/AUTOMATED_SYNC_SETUP, PLURALISM_CHECKLIST, github/AGENT_LIGHTNING_README
- docs/business-intelligence/governance-bi-tools
- docs/outreach/EXECUTIVE-BRIEF-BI-GOVERNANCE (+ v2)
- docs/research/ARCHITECTURAL-SAFEGUARDS-*
- email-templates/README.md, base-template.html
- 3 scripts/seed-*-blog-post.js (blog-seeding scripts)
- scripts/upload-document.js
- SESSION_HANDOFF_2025-10-23_FRAMEWORK_ANALYSIS.md
- SECURITY_INCIDENT_POST_MORTEM_2025-10-21.md
Pattern swaps (longest-first):
github.com/AgenticGovernance/tractatus-framework/issues -> codeberg.org/mysovereignty/tractatus-framework/issues
github.com/AgenticGovernance/tractatus-framework/discussions -> .../issues (Codeberg has no discussions feature)
github.com/AgenticGovernance/tractatus-framework.git -> codeberg.org/mysovereignty/tractatus-framework.git
github.com/AgenticGovernance/tractatus-framework -> codeberg.org/mysovereignty/tractatus-framework
git@github.com:AgenticGovernance/... -> git@codeberg.org:mysovereignty/...
github.com/AgenticGovernance/tractatus (old org/repo path) -> codeberg.org/mysovereignty/tractatus-framework
AgenticGovernance/tractatus-framework (bare) -> mysovereignty/tractatus-framework
Hook validator update (scripts/hook-validators/validate-credentials.js):
PROTECTED_VALUES.github_org: 'AgenticGovernance' -> 'mysovereignty'
PROTECTED_VALUES.license: 'Apache License 2.0' -> EUPL-1.2 long form
URL detection regex: /github\.com\/.../ -> /codeberg\.org\/.../
Placeholder checks + error messages updated to reflect Codeberg as
authoritative post-migration host. Key names (e.g. `github_org`) retained
for backward compatibility with validate-file-edit.js.
Held back from this commit (27 files total, documented reasons):
11 historical session handoffs / closedown docs / incident reports
(2025-10 through 2026-02) — modifying them rewrites the record to contain
URLs that did not exist at the time of writing, AND ownership of their
pre-existing inst_084 exposures transfers on touch.
8 live-content docs with pre-existing inst_084 debt (port/API-endpoint/
file-path exposures): docs/markdown/case-studies.md, technical-architecture,
introduction-to-the-tractatus-framework, implementation-guide-v1.1,
docs/plans/integrated-implementation-roadmap-2025, docs/governance/*,
docs/ANTHROPIC_*, docs/GOVERNANCE_SERVICE_*, docs/RESEARCH_DOCUMENTATION_*,
deployment-quickstart/*.
8 live-content docs with pre-existing inst_016/017/018 debt:
CHANGELOG.md, CONTRIBUTING.md, docs/LAUNCH_ANNOUNCEMENT, LAUNCH_CHECKLIST,
PHASE_4_REPOSITORY_ANALYSIS, PHASE_6_SUMMARY, docs/plans/research-enhancement-
roadmap-2025, docs/case-studies/pre-publication-audit-oct-2025.
Also NOT in this commit (separate concerns):
- scripts/add-inst-084-github-url-protection.js (detection-rule logic needs
framework-level decision on post-migration semantics).
- .claude/* (framework state).
- docs/PRODUCTION_DOCUMENTS_EXPORT.json (DB dump).
- package-lock.json (npm sponsor URLs, third-party).
- .git/config embedded credentials (requires out-of-band rotation on both
remote hosts + auth-strategy decision; user-action task).
Context: today's EUPL-1.2 sweep closed the licence-text-content layer
(5c386d0d / 6d49bfbf / ab0a6af4 / 4c1a26e8). This commit starts closing the
matching vendor-URL-content layer. Next: hygiene-first pass on the 16
live-content docs held back, then a second URL-flip pass on them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Fix HTML rendering in emails (triple braces for raw HTML in base template)
- Add missing email content templates (project-updates, implementation-notes, governance-discussions)
- Simplify SMTP port detection to respect .env configuration
- Exclude email-templates from CSP validation (inline styles required for email clients)
- Restore EMAIL_FROM to newsletter@agenticgovernance.digital
All templates now exist, emails render correctly, and ProtonBridge integration is complete.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements privacy-preserving synchronization of production audit logs
to development for comprehensive governance research analysis.
Backend Components:
- SyncMetadata.model.js: Track sync state and statistics
- audit-sanitizer.util.js: Privacy sanitization utility
- Redacts credentials, API keys, user identities
- Sanitizes file paths and violation content
- Preserves statistical patterns for research
- sync-prod-audit-logs.js: CLI sync script
- Incremental sync with deduplication
- Dry-run mode for testing
- Configurable date range
- AuditLog.model.js: Enhanced schema with environment tracking
- environment field (development/production/staging)
- sync_metadata tracking (original_id, synced_from, etc.)
- New indexes for cross-environment queries
- audit.controller.js: New /api/admin/audit-export endpoint
- Privacy-sanitized export for cross-environment sync
- Environment filter support in getAuditLogs
- MemoryProxy.service.js: Environment tagging in auditDecision()
- Tags new logs with NODE_ENV or override
- Sets is_local flag for tracking
Frontend Components:
- audit-analytics.html: Environment filter dropdown
- audit-analytics.js: Environment filter query parameter handling
Research Benefits:
- Combine dev and prod governance statistics
- Longitudinal analysis across environments
- Validate framework consistency
- Privacy-preserving data sharing
Security:
- API-based export (not direct DB access)
- Admin-only endpoints with JWT authentication
- Comprehensive credential redaction
- One-way sync (production → development)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements core BI analytics capabilities for governance ROI measurement:
- Activity classifier utility for automatic event categorization
* Detects activity type (client communication, infrastructure, etc.)
* Calculates risk level, stakeholder impact, data sensitivity
* Computes business impact scores (0-100)
- Enhanced audit controller with BI analytics endpoints
* Cost avoidance calculator with user-configurable factors
* Framework maturity scoring (0-100 scale)
* Team performance comparison (AI vs human)
* Activity type breakdown and ROI projections
- New API routes for cost configuration (GET/POST /api/admin/cost-config)
- Hook validator enhancement
* Automatic activity classification on governance decisions
* MongoDB audit logging with BI context fields
* Business impact scoring for blocked actions
Status: Research prototype v1.0
Note: Cost factors are illustrative placeholders requiring validation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
Implements architectural enforcement to prevent framework fade (voluntary
compliance failures). This addresses Case Study #27028 where AI skipped
session-init.js despite explicit CRITICAL warnings while implementing
anti-fade enforcement mechanisms.
## New Components
### Hook Validators (scripts/hook-validators/)
- validate-file-edit.js: Pre-Edit enforcement (CSP, conflicts, boundaries)
- validate-file-write.js: Pre-Write enforcement (overwrites, boundaries)
- check-token-checkpoint.js: Prevents checkpoint fade at 50k/100k/150k
### Documentation
- CONTINUOUS_ENFORCEMENT_ARCHITECTURE.md: Technical architecture
- BOOTSTRAPPING_SOLUTION.md: Solves auto-run session-init problem
- PRE_APPROVED_COMMANDS.md: Extracted from CLAUDE.md (context reduction)
- Case Study #27028: Framework fade during anti-fade implementation
### Session Initialization Enhancement
- scripts/session-init.js: Added Section 8 (Hook Architecture Status)
- Reports hook validator installation and pre-approved commands
### CLAUDE.md Reduction (Not Committed - .gitignored)
- Reduced from 235 lines to 86 lines (63% reduction)
- Philosophy: "If it can be enforced in code, it should not be documented"
## Key Findings
Case Study #27028 proved documentation-based governance fundamentally
cannot work. AI skipped session-init.js despite "⚠️ CRITICAL" warning
while actively implementing anti-fade enforcement. This validates the
thesis that architectural enforcement (code that runs automatically)
is the only viable solution.
## Next Steps
Bootstrapping solution required: session-init.js needs automatic
invocation on continued sessions. Without this, framework fade will
recur. Options documented in BOOTSTRAPPING_SOLUTION.md.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>