privacy
Audit and maintain privacy compliance for MUDdown. Covers the privacy policy, data collection practices, cookie/storage usage, and compliance testing.
- License 许可
- MIT
- 所属仓库
- MUDdown/MUDdown
- 最近更新
- 2026-08-06
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- privacy
- description
- Audit and maintain privacy compliance for MUDdown. Covers the privacy policy, data collection practices, cookie/storage usage, and compliance testing.
03 SKILL.md 正文
Privacy Skill
You are auditing or modifying code that affects user data collection, storage, or disclosure for the MUDdown project. The privacy policy lives at apps/website/src/pages/privacy.astro and compliance tests at packages/server/tests/privacy-compliance.test.ts.
What We Collect
| Data | Where Stored | When |
|---|---|---|
| OAuth provider profile (username, email) | SQLite identity_links table |
On OAuth sign-in |
| Account display name | SQLite accounts table |
On account creation |
| Character data (name, class, room, inventory, equipment, HP, XP) | SQLite characters table |
During gameplay |
| Session token | SQLite auth_sessions + HTTP-only cookie |
On OAuth sign-in |
| UI preferences (inventory mode, overlay position) | Browser localStorage |
Client-side only |
What We Do NOT Collect
- Passwords — OAuth-only authentication, no credential storage
- IP addresses — Not logged or stored
- Analytics / telemetry — No tracking scripts, pixels, or beacons
- Email communications — No marketing emails sent
Cookies
One cookie, set only on OAuth login:
| Name | Flags | Max-Age | Purpose |
|---|---|---|---|
muddown_session |
HttpOnly; SameSite=Lax; Secure (HTTPS) |
7 days (604800s) | Session authentication |
Source: packages/server/src/auth.ts — SESSION_DURATION_MS constant and Set-Cookie header.
localStorage Keys
| Key | Value | Purpose |
|---|---|---|
muddown_inv_mode |
"off" | "persistent" | "overlay" |
Inventory panel display mode |
muddown_inv_pos |
{top, left, width, height} JSON |
Inventory overlay panel screen position |
muddown_hint_mode |
"off" | "persistent" | "overlay" |
Hint panel display mode |
muddown_hint_pos |
{top, left, width, height} JSON |
Hint overlay panel screen position |
These never leave the browser. Source: apps/website/src/pages/play.astro.
Compliance Tests
packages/server/tests/privacy-compliance.test.ts automatically verifies:
- Session cookie has
HttpOnly,SameSite=Lax, andSecureflags - Session duration is 7 days
- No password columns in database schema
- No password hashing libraries in auth code
- OAuth providers match documented providers
- No analytics/tracking scripts in website source
- Only documented
localStoragekeys are used - Only
muddown_sessioncookie is set server-side
Run: cd packages/server && npm test or npx turbo run test
Privacy Impact Checklist
When adding a feature that touches user data, verify:
- New data stored? → Update the privacy policy ("Collection" and "Retention" sections) and the compliance test.
- New cookie? → Update the "Cookies and Local Storage" section in the privacy policy and add to the compliance test's allowed cookies list.
- New localStorage key? → Add to the allowed keys in the compliance test and mention in the privacy policy.
- New third-party service? → Update the "Sharing" section and add no-tracking assertions.
- New API that sends user data externally? → Document in the privacy policy's sharing section.
- Removing a data practice? → Update the privacy policy to remove the claim and adjust tests.
File Locations
| File | Purpose |
|---|---|
apps/website/src/pages/privacy.astro |
Privacy policy page (public-facing) |
packages/server/tests/privacy-compliance.test.ts |
Automated compliance tests |
packages/server/src/auth.ts |
Cookie settings, OAuth flow, session management |
packages/server/src/db/sqlite.ts |
Database schema (what columns exist) |
packages/server/src/db/types.ts |
Database interface (what operations are supported) |
apps/website/src/pages/play.astro |
Client-side localStorage usage |
04 同仓库更多 Skills
testing
Write and maintain tests for MUDdown packages. Covers vitest for the server and parser, fixture helpers, world integrity tests, and testing conventions.
room-creation
Create and modify MUDdown room files. Covers the Markdown+YAML structure, frontmatter fields, container blocks, bidirectional exits, item/NPC references, lighting, and region organization.
persistence
Work with the database abstraction layer and account/character/world persistence. Covers the GameDatabase interface, SQLite adapter, save/load lifecycle, auth sessions, and testing patterns.
osc8-bridge
Add or modify OSC 8 hyperlink capabilities in the telnet bridge — NEW-ENVIRON (RFC 1572) negotiation, Mudlet/Fado/MudForge `send:` URIs, and per-scheme tooltip/menu metadata. Covers the capability pipeline from telnet negotiation through renderer output, the sanitization contract, and the word-wrap invariant.
oauth-provider
Add a new OAuth/OIDC identity provider to MUDdown. Covers the shared type, auth switch statements, server config, login page button, env vars, tests, and local verification.
npc-creation
Create and modify NPCs with branching dialogue trees for MUDdown. Covers the JSON format, dialogue node structure, location binding, mood/narrative fields, and the talk command flow.