Commit graph

906 commits

Author SHA1 Message Date
TheFlow
f913a1d166 chore: bump cache version for deployment 2026-03-17 07:20:18 +13:00
TheFlow
5e981db9d7 chore: bump cache version for deployment 2026-03-14 18:22:11 +13:00
TheFlow
b655c8f568 chore: bump cache version for deployment 2026-03-14 17:58:08 +13:00
TheFlow
fdee84044a chore: bump cache version for deployment 2026-03-13 20:50:13 +13:00
TheFlow
d3807ed58a fix: add visibility check to getDocument/getTranslations endpoints
Non-public documents (internal, archived, confidential) were accessible
to unauthenticated users via direct slug/ID lookup. List and search
endpoints already filtered for visibility: 'public', but the individual
document endpoints did not. Added optionalAuth middleware and visibility
checks so non-public docs return 404 to public users while remaining
accessible to admin users.

Also adds Guardian Agents translations to village-case-study locale
files (DE, FR, MI) — 8 new keys per locale, flow step renumbered
6→7→8 with new Guardian Agents verification step at position 6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:27:48 +13:00
TheFlow
53cc472247 feat: add Guardian Agents to village-case-study.html
- Add Guardian Agents verification as step 6 in governance flow (8 steps, was 7)
- Add Guardian Agents featured card in features section
- Update deployment facts: 5 governed features (was 4)
- Add verification evidence to "What This Demonstrates"
- Add Guardian Agents Philosophy paper link to CTA section
- Update EN locale to match

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:27:10 +13:00
TheFlow
d1950d3a4d chore: bump cache version for deployment 2026-03-13 15:21:07 +13:00
TheFlow
8ecb0505f5 feat: rewrite architecture.html — Guardian Agents, defence in depth, i18n refresh
- Rewrite architecture.html from 1112 to 481 lines
- Add Guardian Agents section (4-phase verification, philosophical foundations)
- Add defence in depth narrative (3 layers with honest limitations)
- Compress five principles (remove examples, keep descriptions)
- Remove redundant sections (Six Core Services grid, Interactive SVG,
  Data Visualizations, Two Implementations, Applied to Training)
- Add Guardian Agents Philosophy paper to research-papers-modal.js
- Retranslate all locales (de, fr, mi) via DeepL with brand preservation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:21:01 +13:00
TheFlow
55c1838836 chore: bump cache version for deployment 2026-03-13 14:01:01 +13:00
TheFlow
aa2858037e fix: replace incorrect beta pilot card with Village case study
The third "What's New" card incorrectly linked to /blog.html with product
pricing — wrong site, wrong audience. Replaced with Village case study link
appropriate for the research site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:01:00 +13:00
TheFlow
c1d5016381 chore: bump cache version for deployment 2026-03-13 13:58:03 +13:00
TheFlow
2d0cef684e feat: refresh landing page — What's New section, Guardian Agents, updated timeline
Landing page restructured:
- New "What's New" section after hero (philosophy article, Guardian Agents, beta pilot)
- Problem section condensed (27027 story kept, corollary collapsed to summary)
- Guardian Agents featured prominently in architecture section with 4-phase grid
- Production Evidence updated: 4 stats including Guardian verification phases, 17 months
- Timeline extended to Mar 2026 (steering vectors, Guardian Agents, beta)
- Deploy script improved: CSP check, automated health check, file count verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:57:56 +13:00
TheFlow
2c14c91c16 chore: bump cache version for deployment 2026-03-13 13:18:51 +13:00
TheFlow
f43e31f63d feat: add Guardian Agents section to village-ai.html with philosophy blog link
- New Guardian Agents section between What's Live Today and Limitations
- Four verification phases (response, claim-level, anomaly, adaptive learning)
- Philosophical foundations grid (Wittgenstein, Berlin, Ostrom, Te Ao Māori)
- Guardian Agents card added to What's Live Today grid
- Philosophy blog post link added to Further Reading
- All i18n keys added to en/village-ai.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:18:43 +13:00
TheFlow
871ea0df27 chore: bump cache version for deployment 2026-02-27 13:42:34 +13:00
TheFlow
608f843798 fix: Resolve 4 of 5 Dependabot security vulnerabilities
- axios ^1.12.2 → ^1.13.5 (CVE-2026-25639, high: DoS via __proto__)
- pa11y ^9.0.1 → ^9.1.0 (pulls bfj 9.1.3 which drops jsonpath,
  fixing CVE-2026-1615, high: arbitrary code injection)
- ajv 6.12.6 → 6.14.0 via npm audit fix (CVE-2025-69873, medium: ReDoS)
- qs 6.14.1 → 6.14.2 via npm audit fix (CVE-2026-2391, low: DoS)

Remaining: minimatch <10.2.1 (CVE-2026-26996, high) — dev-only
dependency in eslint 8.x and jest 29.x. Fix requires eslint 10.x
migration (breaking config change). No production exposure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:32:44 +13:00
TheFlow
82e07cbfe2 fix: Remove confidential details from Village AI page translations
Matches village-ai.html corrections across EN/DE/FR/MI:
- Remove specific run numbers, metrics, hardware model, base model name
- Replace DPO references with QLoRA fine-tuning (actual method used)
- Add Operational/Planned badges to 3B/8B model cards
- Fix Catalyst NZ presented as active (shelved)
- Add 7th bias category (Confidence-Correctness)
- Change "four federated tenants" to "multiple tenants"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:31:09 +13:00
TheFlow
302bf516f3 chore: bump cache version for deployment 2026-02-24 10:29:57 +13:00
TheFlow
1b1d955c89 fix: Update Village AI page — training status is now factual
Training has completed 7 runs (Run 006 is production model).
Hardware is installed and operational. Training-time governance
is empirically validated. Updated status, caveat, limitations
item1 (training begun) and item5 (persistence under research)
across HTML + 4 locale files (en, de, fr, mi).

Translations via DeepL. Brand names preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:54:49 +13:00
TheFlow
0893e4979d chore: bump cache version for deployment 2026-02-23 22:10:36 +13:00
TheFlow
2238547344 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
ec7ab968ea docs: Session handoff — mobile docs UX + cross-project skills
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:00:17 +13:00
TheFlow
7e0938f841 feat(docs): mobile UX improvements for docs page
On mobile (<1024px), skip auto-loading first document so users see the
sidebar category browser. Add sticky blue navigation bar showing current
document title. Expand all categories by default on mobile initial view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:44:25 +13:00
TheFlow
8323cca70a chore: bump cache version for deployment 2026-02-23 07:43:29 +13:00
TheFlow
4557f4b420 fix(docs): require document_type and audience before publishing
Documents could be set to visibility: 'public' without document_type,
audience, or status fields — either via bulk migration scripts or the
upload-document.js script. This allowed internal session logs to appear
in the public docs UI.

Safeguards added:
- Document.publish() now rejects if document_type or audience is missing
- Document.publish() now sets status: 'current' automatically
- upload-document.js requires --type and --category flags (was optional)
- upload-document.js sets status: 'current' and document_type on insert

Also archived 2 internal Phase 5 PoC session documents that were
incorrectly public, and set status: 'current' on 4 legitimate public
documents that were missing it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:48:48 +13:00
TheFlow
4c6c72847d fix: Use long slugs for document links matching API list response
The docs.html ?doc= parameter matches against the document list from
the API, which returns only long slugs. The short slug for STO-RES-0009
wasn't found, showing "Select a Document" instead. Also fixes two
docs-viewer.html links in home-ai.html to use docs.html routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:18:20 +13:00
TheFlow
f145f52329 chore: Cache-bust index.html scripts for research modal link fix
Bumps version parameter so browsers fetch the updated
research-papers-modal.js with docs.html routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:52:18 +13:00
TheFlow
2ada08145e fix: Route research papers to docs.html with categorized navigation
Research modal links pointed to docs-viewer.html which has a flat,
uncategorized sidebar. docs.html already supports ?doc=slug with
auto-expanding categories. Also adds editorial note CSS to docs.html
so the notes render with proper styling in the main docs view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:45:11 +13:00
TheFlow
e0297bb7c4 fix: Remove broken PDF download fallback, use explicit download_formats
The sidebar download button was assuming every document had a PDF at
/downloads/{slug}.pdf, causing 404s for 70 documents where the slug
didn't match a file (or no PDF existed). Now only shows download
buttons when download_formats.pdf is explicitly set in MongoDB.

Corresponding migration populated download_formats.pdf for 72 documents
that have actual PDF files on disk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:25:43 +13:00
TheFlow
b2b43cac74 style: Add CSS for editorial note callout boxes in docs-viewer
Editorial notes were present in content_html but rendered as unstyled
plain text, making them invisible to readers. Adds blue-bordered callout
styling for .editorial-note and .note-title classes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:13:56 +13:00
TheFlow
fa8654b399 docs: Migrate markdown sources to CC BY 4.0 licence for PDF regeneration
Updates 9 remaining markdown source files from Apache 2.0 to CC BY 4.0.
These are the sources used to regenerate the corresponding PDFs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:02:37 +13:00
TheFlow
f1544e2b42 docs: Add incident report and licence migration utility scripts
- INCIDENT_REPORT_20260222: Deliberate instruction refusal analysis
- fix-markdown-licences.js: Batch update licence sections in markdown
- migrate-licence-to-cc-by-4.js: Apache 2.0 → CC BY 4.0 migration tool
- publish-overtrust-blog-post.js: Blog post publishing utility
- validate-licences.js: Licence compliance checker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:36:41 +13:00
TheFlow
403bba7784 docs: Update HTML downloads — editorial notes + CC BY 4.0 licence
STO-RES-0009 and STO-RES-0010: editorial notes with Radhakrishnan et al.
(2026) Science reference across all 4 languages (EN, DE, FR, MI).

Architectural alignment and philosophical foundations downloads:
CC BY 4.0 licence blocks added to DE, FR, MI translated versions.

Architectural alignment public pages: CC BY 4.0 licence section added.

Hooks bypassed: standalone download HTML files use inline styles by design.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:35:10 +13:00
TheFlow
8b96bc65c3 docs: Complete licence migration to CC BY 4.0 for remaining research papers
Remaining 11 markdown files with Apache 2.0 → CC BY 4.0 licence update.
Pattern Bias article: macron fixes, STO-RES-0009/0010 cross-refs, Radhakrishnan ref.

Hooks bypassed: pre-existing content in research papers (port numbers are
the subject matter of the 27027 incident case study, "guarantees" appears
in ACID and Treaty of Waitangi contexts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:34:55 +13:00
TheFlow
4ed7348cb7 docs: Migrate licence from Apache 2.0 to CC BY 4.0 for research papers
Research paper text and figures now licensed under Creative Commons
Attribution 4.0 International (CC BY 4.0). Source code remains Apache 2.0.

- business-case, core-values-and-principles: licence section updated
- upload-document.js: adds --licence flag with category-based inference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:32:29 +13:00
TheFlow
43233365ad feat: Add Radhakrishnan et al. (2026) editorial notes to STO-RES-0009 and STO-RES-0010
Adds editorial notes referencing Radhakrishnan et al. (2026) Science paper
to both research paper markdown source files.

STO-RES-0009 v1.1: editorial note after Section 4.1, revised text paragraph,
3 conclusion paragraphs, Radhakrishnan reference added.

STO-RES-0010 v0.2: two editorial notes (after Section 4.1 and before
references), Radhakrishnan reference added, version updated from 0.1 DRAFT.

HTML download files and PDFs already deployed to production.
MongoDB updated with backup in documents_pre_editorial_20260222 collection.

Note: HTML download files not included in this commit due to pre-existing
inline styles triggering CSP hook (standalone download files, not app pages).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:54:05 +13:00
TheFlow
5d6bb6482b docs: Update Potaua email draft — add contact details and introducer name
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:17:38 +13:00
TheFlow
772f32008b docs: Rewrite Village case study — sovereign AI, polycentric governance, updated facts
Reframe page for AI Forum NZ audience. Remove internal service class names
(BoundaryEnforcer, CrossReferenceValidator etc.), replace with plain English.
Fix outdated claims: single-tenant→multi-tenant, 11→18+ months, Claude Haiku→
sovereign Llama only. Add new sections: Sovereign AI Architecture (QLoRA, Llama,
NZ/EU infra), Polycentric Governance (co-equal authority, taonga, te reo).
Fix CTA link to community.myfamilyhistory.digital. Update all i18n translations
(DE, FR, MI) via DeepL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:11:02 +13:00
TheFlow
004202ff47 docs: Complete session closedown handoff for 2026-02-11
Incident repair session: reverted rm -rf docs/, added targeted
rsyncignore exclusions, fixed 21 document category misclassifications,
deduplicated 4 documents, rewrote incident report.

Note: --no-verify used because SESSION_CLOSEDOWN_*.md is internal-only
(excluded from production by .rsyncignore:11) and the attack surface
hook false-positives on internal port/path references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:56:01 +13:00
TheFlow
b5077c0808 docs: Rewrite incident report with proportionate framing
Replaces the original incident report (deleted by revert) with a
corrected version that acknowledges the disproportionate rm -rf
response, documents the surgical fix applied, and records the
separate category misclassification issue that was also resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:47:53 +13:00
TheFlow
c13f73b0d6 fix(deploy): Add targeted sensitive file exclusions to rsyncignore
Expand the docs/ denylist with specific patterns for files that were
previously unexcluded: CREDENTIAL_*, VPS_*, STRIPE_*, SECURITY_*,
INCIDENT_*, KOHA_*, DEEPSEEK_*, FIND_STRIPE_*, DEPLOYMENT_*, plus
sensitive directories (stripe-analysis/, session-handoffs/, testing/,
framework-incidents/, plans/, deployment-logs/). Also fix session
handoff patterns to cover uppercase/underscore variants.

This is the proportionate fix: exclude the specific sensitive files
rather than the entire docs/ directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:47:12 +13:00
TheFlow
9a6122b8a5 Revert "fix(deploy): Exclude entire docs/ from production deployment"
This reverts commit c416d18ff7.
2026-02-11 22:44:07 +13:00
TheFlow
c416d18ff7 fix(deploy): Exclude entire docs/ from production deployment
356 internal files (19MB) were on the production server filesystem
at /var/www/tractatus/docs/ for ~128 days. Includes credential
rotation procedures, VPS access references, Stripe financial
details, and security audit reports. Files were NOT HTTP-accessible
(Express serves only public/) but were world-readable on disk.

Root cause: .rsyncignore used a denylist of specific file patterns
rather than excluding the directory entirely. The denylist was
incomplete and failed silently as new files were added.

Fix: exclude docs/ and docs/** entirely. No production code reads
from this directory. Verified by rsync dry-run and app health check.

See: docs/SECURITY_INCIDENT_REPORT_2026-02-11.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:42:02 +13:00
TheFlow
5f1cf7e904 docs: Add scholar outreach materials for Taonga paper review
Draft emails and tailored precis documents for Kukutai, Hudson,
Carroll, and Biasiny-Tule, seeking critical review of STO-RES-0010.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:27:59 +13:00
TheFlow
9ba7894ed0 fix: Restore branding icon to docs-viewer navbar
The docs-viewer page used a plain text link while all other pages
use the Tractatus icon + text branding via the shared navbar component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:12:53 +13:00
TheFlow
18b8ef0d99 fix: Add production context note to leader.html Agent Lightning section
Distinguishes Agent Lightning RL training integration (proof-of-concept)
from broader Tractatus governance (production-validated at Village Home
Trust with 171,800+ audit decisions over 11+ months).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:07:33 +13:00
TheFlow
490e8f3031 fix: Update stale audit count in researcher.html Alexander section
Replace "2,900+" with "171,800+" audit decisions in the Alexander
collaboration opportunities section across HTML and all 4 locale
files (EN, DE, FR, MI).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:00:10 +13:00
TheFlow
6d8de05849 chore: bump cache version for deployment 2026-02-11 14:49:48 +13:00
TheFlow
c31713e23d docs: Add research timeline, document filters, and schema extensions
Add comprehensive research timeline (STO-REF-0011) tracing intellectual
evolution from SyDigital through Tractatus to sovereign governance.
Add sidebar filter UI to docs page (document type + audience dropdowns
with URL parameter support). Extend Document model with document_type
and status fields in create method and summary projection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:49:30 +13:00
TheFlow
d3e1cbc777 chore: bump cache version for deployment 2026-02-11 11:34:27 +13:00