METTAPRACTICE
Help Donate Sign in Sign up

Technical White Paper

Metta Practice as a bot-assisted social wiki.

A compact technical overview of a community system where conversation, publishing, wiki improvement, and transparent AI-assisted review share one governance model.

Abstract

Metta Practice is a server-rendered community application for studying and practicing metta, or loving-kindness, with a shared book, blog, library/wiki, feed, bulletin, chat, and contribution review system. Its core technical idea is simple: treat public writing and improvements as a unified review queue, make criteria visible to contributors, and let a bounded bot account draft support and editorial feedback while a human Steward keeps final authority.

System model

The application is an Express and SQLite service mounted at /community. It uses plain server-rendered HTML, progressive JavaScript, and no frontend build step. The public book, blog, library pages, contribution forms, chat rooms, feed, and Steward console all share one data store and one authentication/session layer.

The design intentionally keeps the stack legible. A future maintainer can trace a request from server.js, through query helpers in db.js, to markup in views.js, with browser behavior in public/js/app.js and styles in public/css/community.css.

Social wiki pattern

Traditional wiki editing is not the front door. The front door is social: posts, chat, blog drafts, reading groups, questions, and source sharing. Wiki behavior appears wherever public knowledge can be improved. The book accepts edit/source/example/correction suggestions. The library treats every item as a page with improvement suggestions. Blog posts can be reviewed, commented on, and later improved through the same criteria.

Transparent review

The review system rejects hidden scores. Reviews use visible status, revision level, summary, requested changes, and checklist language. Good submissions are accepted. Promising but incomplete submissions are returned as needs work with concrete revision notes. Off-topic, unsafe, unsupported, or low-quality work is marked not a fit.

The boundary is especially important for medical and psychological topics: personal experience is allowed, credible medical voices can be cited, but the site does not publish advice that presents metta as a cure or substitute for professional support.

Metta Bot

Metta Bot is not an invisible automation. It is a real user account, labeled as a bot, with scoped tokens, audit logs, policy versions, heartbeat monitoring, and a human Metta Steward who can overrule it. The bot can participate in ordinary chat rooms, draft editorial reviews, and answer site or practice questions within clear boundaries.

This preserves one mental model: bot actions are site actions by a visible account. Users can invite the bot to rooms, message it directly, and see review drafts or outcomes through normal contribution surfaces.

Security and governance boundaries

The system uses HttpOnly cookie sessions, same-origin and CSRF checks, scoped bot bearer tokens, rate limits, sanitized rendering, no hidden admin impersonation mode, file upload allowlists, and image magic-byte validation. Uploaded member HTML is iframe-constrained and direct-navigation blocked. Production secrets and the SQLite database are locked down with restrictive file permissions.

Testing strategy

The QA suite has four layers: deterministic unit-style checks, regression flows, human-like persona tests, and security smoke tests. The persona suite includes a normal user, a high-quality contributor, and a low-quality contributor whose submissions should enter review and be rejected or returned by the bot/Steward loop. Disposable production QA artifacts are marked and cleaned by script.

Research value

The project is a practical prototype for human-AI community governance: a small domain, visible norms, transparent editorial criteria, ordinary social interaction, and bounded automation. The interesting claim is not that AI replaces moderation or scholarship, but that a bot can become a named, auditable participant in a collaborative knowledge community.