PLAN.md raw

ORLY Strategic Plan

Private planning document. Not for public distribution until the mandate is clear.

Premise

Nostr's adoption stalls because defection rate tracks with adoption. People arrive from hostile platforms, encounter slop and trolling, and leave. The relay ecosystem is fragmented and nobody is doing content quality at the infrastructure level.

ORLY becomes the relay that solves this — not through gatekeeping, but through automated classification that makes the network cleaner for everyone who connects to it. The strategy is stealth-first: demonstrate value through action, let adoption create demand, then open-source when the mandate is undeniable.

Architecture Overview

ORLY becomes an all-in-one deployment:

Anyone who runs orly gets all of this. One binary. One deployment step.

Phase 0: Housekeeping

0.1 — VPS Disk Recovery

The VPS is at 100% (199G/199G). 180GB is consumed by /var/log.

0.2 — Full Logging Audit

Root cause of 0.1: The relay logs at info level things that should be trace/debug. The worst offender is app/publisher.go:180 which logs "ephemeral event kind X did NOT match subscription Y" at log.I for EVERY subscription on EVERY ephemeral event. With 40+ active subscriptions, one ephemeral event produces 40+ log lines. This alone generated 179GB of syslog.

Audit rules:

client connect/disconnect, sync completed, errors that affect service. Target: a few lines per minute under normal operation.

event saves, subscription matches, filter evaluations, auth checks.

routing details, serialization paths, cache hits/misses.

Audit scope (every file with log.I, log.D, log.T calls):

Specific known issues:

0.3 — Repository Setup

0.4 — Symlink Update

Phase 1: Integrate Smesh Into ORLY

1.1 — Embed Smesh as a Subcommand or Service

Smesh is a React/Vite SPA at /home/mleku/src/git.mleku.dev/mleku/smesh. Build output is ~5MB static files.

Approach:

The existing app/web/ (Svelte relay dashboard) remains separate. Smesh is the full client. Two different UIs, two different purposes.

1.2 — Relay Defaults in Smesh

Phase 2: Corpus Crawler

2.1 — Activate and Extend DirectorySpider

The spider already exists at pkg/spider/directory.go. It:

Extend it to:

2.2 — Negentropy Bulk Sync

The negentropy implementation exists at pkg/sync/negentropy/. Use it to:

- Monitor Badger disk usage - Stop syncing when approaching 50% of available disk - Prioritize newer content over older - Prioritize content from pubkeys with higher relay presence

2.3 — Crawler Orchestration

- ORLYCRAWLERENABLED (default: false) - ORLYCRAWLERMAXSTORAGEPERCENT (default: 50) - ORLYCRAWLERSEED_RELAYS (comma-separated bootstrap list) - ORLYCRAWLERSYNC_INTERVAL (default: 1h) - ORLYCRAWLERMAX_RELAYS (default: 100)

2.4 — Outgrow Primal/Damus

Target: accumulate more events than any single relay in the network. The key insight is that most relays only store events from their own users. By aggregating from all of them, ORLY becomes the most complete archive. 100GB of Badger-compressed events is a LOT of nostr content.

Phase 3: AI Content Classifier

3.1 — Classifier Architecture

- Token distribution analysis - Repetition patterns - Stylistic uniformity scores - Context-awareness markers

3.2 — Training Corpus

3.3 — Integration Points

Phase 4: Reputation ACL Driver

4.1 — New ACL Driver: "reputation"

Register via existing RegisterDriver("reputation", ...) pattern.

Per-pubkey state:

4.2 — Progressive Backoff

4.3 — Troll Detection (Phase 2 of classifier)

Phase 5: Flag Note Publisher

5.1 — Automated Publishing

- "This pubkey [npub...] has been flagged as an automated content generator. X of Y recent events scored above 0.9 on AI content detection. Add wss://relay.orly.dev to your relay list to see everything, minus slop."

5.2 — Distribution Strategy

5.3 — Reputation of Flag Notes

Phase 6: Git Hosting

6.1 — Minimal Git HTTP Service

Purpose: host the ORLY source code at git.orly.dev when ready to go public.

Architecture:

6.2 — Integration Into ORLY Binary

6.3 — Timeline

This is the last piece. It activates only when:

Phase 7: Smesh Deep Integration

7.1 — Classifier Visibility

7.2 — Relay Promotion

7.3 — Smesh as Default Client

Execution Order

Phase 0 → VPS housekeeping, repo setup
    ↓
Phase 1 → Smesh integration (one binary, one deploy)
    ↓
Phase 2 → Corpus crawler (bulk sync, outgrow incumbents)
    ↓
Phase 3 → AI classifier (train on corpus, flag AI slop)
    ↓
Phase 4 → Reputation ACL (progressive trust, auto-moderation)
    ↓
Phase 5 → Flag publisher (organic growth via relay hints)
    ↓
Phase 6 → Git hosting (open source when mandate is clear)
    ↓
Phase 7 → Deep integration (smesh + classifier UI)

Each phase is independently valuable. Phase 2 alone makes relay.orly.dev the most complete nostr archive. Phase 3 alone makes it the cleanest. Phase 5 alone drives adoption. They compound.

Infrastructure Notes

VPS: relay.orly.dev

Domain: orly.dev

Source Code

Risk Factors

  1. Classifier accuracy: False positives on humans quoting AI output.

Mitigation: high threshold, progressive trust, never hard-delete.

  1. Storage limits: 100GB may not be enough for "all of nostr".

Mitigation: prioritize by recency and relay rank, evict old low-value content.

  1. Relay blocking: Large relays might rate-limit or block aggressive sync.

Mitigation: respectful sync intervals, negentropy is bandwidth-efficient.

  1. Community reception: Flag notes could be seen as spam themselves.

Mitigation: accuracy is everything. Only flag high-confidence cases. Transparent methodology. Verifiable claims.

  1. Hostile response: Incumbents might actively counter.

Mitigation: stealth-first. By the time it's visible, value is demonstrated.