Files
2026-08-15 15:05:39 -06:00

34 KiB

Automation-Based Email List System

Important

This public repository is a sanitized reference implementation. Supply real credentials only through environment variables or private runtime configuration. Never commit subscriber data, telemetry exports, databases, receipts containing personal data, or live operational endpoints. Values under operations/examples/ are synthetic fixtures.

A small, open-source, AI-operated email list system for PaddleNet. The human writes an email in Markdown and directs an authorized AI agent to send it and schedule the apparent-non-opener follow-up. From that handoff forward, the AI agent and deterministic scheduled jobs validate, send, monitor, reconcile, and report the campaign without routine human involvement.

This project replaces Listmonk for this specific use case. It intentionally starts with a narrow feature set and keeps components isolated so they can be improved or replaced without redesigning the whole system.

Project Status

Planning and specification stage. The first release should implement only the v1 scope defined below.

Goals

  • Operate from a Git repository rather than a dedicated administration dashboard.
  • Give humans and AI agents the same safe command-line interface.
  • Allow a properly authorized AI agent with persistent terminal access to operate the complete routine workflow.
  • Keep human judgment at the initial authorization boundary and use deterministic scripts for execution.
  • Send broadcast and welcome email through Postmark.
  • Store live subscriber and campaign state safely in SQLite.
  • Reuse the existing PaddleNet telemetry server and its Postmark webhook ingestion.
  • Run as an isolated Docker container on the existing email-list VM.
  • Keep modules small, testable, and replaceable.
  • Produce sanitized, reviewable receipts for important operations.
  • Remain simple enough for one person and AI agents to understand and operate.

Intended Operating Model

The system is designed to remove the human from routine email-list operations after a clear handoff.

Campaign handoff

  1. The human writes the finished email in a Markdown campaign file.
  2. The human tells the AI agent to send that campaign and specifies or accepts the normal apparent-non-opener delay, usually four or five days.
  3. That instruction is the human's authorization for the exact campaign and its configured follow-up. A second human interaction is not normally required.
  4. The AI agent validates the campaign, renders and inspects the preview, checks the audience and suppressions, records the authorization, sends the initial campaign, schedules the follow-up, verifies completion, and writes receipts.
  5. At the scheduled time, the AI agent or cron-triggered command queries telemetry, builds the apparent-non-opener audience, rechecks suppressions, sends the authorized follow-up, and verifies the result.
  6. The AI returns to the human only when a safety check fails, authorization is ambiguous, the content would need a material change, or an operational exception cannot be resolved safely.

Subscriber maintenance

  1. The human adds subscribe or unsubscribe operations to a simple private JSON or JSONL inbox file.
  2. A scheduled cron job reads and validates the file.
  3. The deterministic subscriber command applies each new operation exactly once to SQLite.
  4. A new active subscriber receives the welcome email exactly once.
  5. An unsubscribe is applied before any later campaign batch is allowed to send.
  6. The job archives or marks processed operations and writes a sanitized receipt. Routine processing does not require the human or a live AI session.

This creates two compatible operating modes:

  • AI-operated work: campaign interpretation, command orchestration, scheduling, exception handling, verification, and concise reporting.
  • Deterministic unattended work: cron-triggered imports, welcome sends, suppression reconciliation, due follow-ups, backups, and receipts.

The AI model, agent host, credential mechanism, and exact persistent-access design are intentionally unresolved infrastructure choices. The application exposes a stable CLI and permission boundary so those components can change without changing email-list business logic.

Non-Goals for v1

  • A browser-based administration dashboard.
  • A general-purpose replacement for every Listmonk feature.
  • Complex audience segmentation or personalization.
  • A/B testing.
  • A custom analytics platform.
  • A custom unsubscribe service.
  • Distributed queues, Redis, PostgreSQL, Kubernetes, or a service mesh.
  • Direct AI access to database internals or production secrets.

Operating Principles

  1. Human architect, AI operator. The human authors the content and gives the send-and-schedule directive. That directive authorizes the exact campaign workflow; the AI agent then executes and supervises it through documented deterministic commands.
  2. Review before mutation. Mutating commands provide a plan or dry run, state their impact, verify recorded authorization, and verify the result. Routine steps covered by the original directive do not repeatedly interrupt the human.
  3. Small, single-purpose modules. Business logic, storage, provider integrations, rendering, telemetry access, and receipts remain separate.
  4. Replaceable integrations. Postmark, SQLite, the Markdown renderer, and the telemetry client are accessed through narrow contracts so a future implementation can be swapped in.
  5. Stable schemas and contracts. Structured inputs, command output, database migrations, telemetry responses, and receipts have versioned schemas.
  6. Deterministic execution. AI agents may prepare inputs and choose approved commands, but scripts perform validation, rendering, state changes, sending, and reconciliation.
  7. Idempotency by default. Retrying an import, webhook synchronization, or campaign send must not duplicate a mutation or email.
  8. Private runtime state stays outside Git. Subscriber data, raw telemetry, credentials, production databases, and private logs never enter the public repository.
  9. Prototype for 1X, build for 10X, engineer for 100X. v1 stays small while preserving the boundaries needed to grow safely.
  10. Documentation and tests change with the architecture. New features require tests; schema changes require migrations; architecture changes require documentation updates.

System Overview

The system has four operational areas:

  1. Repository and workstation: campaign Markdown, templates, schemas, deterministic scripts, AI skills, tests, sanitized receipts, and documentation.
  2. Email-list VM: the Dockerized Python application, command-line interface, scheduler entrypoint, SQLite state, backups, and provider adapters.
  3. Postmark: broadcast delivery, welcome-email delivery, delivery suppression, and recipient unsubscribe handling.
  4. Existing telemetry server: receives Postmark webhooks, stores campaign activity, and answers telemetry queries such as apparent non-openers.

See docs/system-map.md for the graphical system and data-flow map.

Sources of Truth

Information Authoritative source Notes
Campaign content Versioned Markdown in Git Approved content is identified by its content hash and Git commit.
Email layout Versioned templates in Git The template version is recorded with each campaign.
Subscriber operational state SQLite on the email-list VM Accessed through commands; never committed to Git.
Delivery suppression Postmark Broadcast Message Stream Reconciled before sending and mirrored locally as needed.
Campaign engagement telemetry Existing telemetry server Receives Postmark webhooks; queried through a narrow adapter.
Campaign send state SQLite on the email-list VM Includes recipient snapshots, attempts, and Postmark identifiers.
Public execution evidence Sanitized receipts in Git Must not contain subscriber addresses or raw private telemetry.

System Components

1. Command-Line Interface

The CLI is the only supported operational interface for humans and AI agents. It should provide:

  • machine-readable --json output;
  • --dry-run for every meaningful mutation;
  • stable exit codes;
  • explicit impact summaries;
  • clear validation errors;
  • idempotent commands;
  • receipts for completed mutations;
  • Windows and Linux path-safe behavior in development and tests.

Proposed command surface:

email-list system check --json

email-list campaign validate <file> --json
email-list campaign preview <file>
email-list campaign approve <file> --json
email-list campaign send <file> --dry-run --json
email-list campaign send <file> --json
email-list campaign status <campaign-id> --json
email-list campaign schedule-non-openers <campaign-id> --after-days 5 --json
email-list campaign run-due-followups --json
email-list campaign resend-non-openers <campaign-id> --dry-run --json

email-list subscriber add <email> --source <source> --dry-run --json
email-list subscriber unsubscribe <email> --reason <reason> --dry-run --json
email-list subscriber status <email> --json
email-list subscriber import <file> --dry-run --json

email-list suppression reconcile --dry-run --json
email-list telemetry sync <campaign-id> --json
email-list backup create --json

2. Campaign Content Module

The human writes email bodies as Markdown in the repository. An AI may edit campaign content only when separately instructed. Campaign metadata uses validated YAML front matter rather than free-form parsing.

Example:

---
schema_version: "1.0"
campaign_id: paddlenet-2026-08-august-update
subject: August from PaddleNet
preheader: New routes, stories, and project updates
from_name: PaddleNet
reply_to: [email protected]
audience: active
---

The campaign ID is stable and unique. Validation rejects missing metadata, unsafe links, unknown audiences, unsupported fields, and duplicate IDs.

3. Rendering and Validation Module

This module:

  • validates campaign front matter against a versioned schema;
  • converts Markdown into HTML;
  • creates a plain-text alternative;
  • merges content with the selected versioned template;
  • verifies required footer content and unsubscribe behavior;
  • checks referenced local media;
  • creates a human-reviewable preview;
  • calculates the content and template hashes used for authorization.

Rendering has no authority to approve or send a campaign.

4. Authorization Guard

The authorization record binds together:

  • campaign ID;
  • campaign content hash;
  • template hash or version;
  • Git commit;
  • audience rule;
  • expected recipient count;
  • human send directive or authorization reference;
  • authorized apparent-non-opener delay and subject strategy;
  • authorizing human and authorization time.

The human's instruction to send the finished Markdown campaign is the authorization event. It may also authorize one scheduled apparent-non-opener follow-up under recorded parameters. Any content, template, audience, or follow-up change outside those parameters invalidates the authorization. Sending without a valid matching authorization fails closed.

Campaign states:

draft -> validated -> approved -> sending -> sent
                                      |
                                      +-> partial
                                      +-> failed

5. Subscriber Module

SQLite is the authoritative store for private subscriber and operational campaign records. SQLite is used instead of individual JSON files because it provides atomic updates, transactions, uniqueness constraints, queries, migrations, and straightforward backups without operating a separate database server.

AI agents do not manipulate SQLite directly. They use the CLI, which accepts structured input and returns JSON.

Minimum subscriber fields:

  • stable subscriber ID;
  • normalized email address;
  • current status;
  • subscription source;
  • consent timestamp and available consent note;
  • subscribed timestamp;
  • unsubscribed or suppressed timestamp;
  • suppression reason;
  • created and updated timestamps.

Minimum statuses:

active
unsubscribed
hard_bounced
spam_complaint
manually_suppressed

Status changes are also recorded as an append-only history. A hard bounce, spam complaint, or unsubscribe takes precedence over an ordinary activation request unless a deliberate, allowed reactivation process is performed.

6. Campaign and Send-State Module

The database stores:

  • campaign identity and lifecycle state;
  • approved content and template hashes;
  • immutable recipient snapshot;
  • per-recipient send state;
  • Postmark request and message identifiers;
  • attempt counts and errors;
  • start, completion, and reconciliation timestamps.

Each campaign-recipient pair is unique. A retry resumes unsent or safely retryable records rather than resending the entire audience.

7. Postmark Adapter

The application uses a narrow email-provider interface. The v1 implementation uses Postmark, but campaign logic must not depend directly on Postmark-specific code.

Responsibilities:

  • submit broadcast batches;
  • send individual welcome emails;
  • attach campaign IDs and useful metadata;
  • return provider message or request identifiers;
  • expose provider errors in normalized form;
  • query or reconcile delivery suppressions before sending.

Postmark's Broadcast Message Stream manages visible unsubscribe links, one-click unsubscribe headers, and delivery suppression in v1. A custom unsubscribe website is intentionally deferred.

8. Telemetry Adapter

The existing telemetry server can receive Postmark campaign events through webhooks. This application does not duplicate that ingestion system. We will duplicate this process used in other domains for accepting telemetry data from Post Mark to the telemetry server.

The telemetry adapter provides a narrow, read-oriented interface for:

  • campaign completion and activity summaries;
  • delivered, opened, clicked, bounced, complained, and unsubscribed events;
  • apparent non-opener selection;
  • reconciliation results needed by the email-list application.

Telemetry responses should use a documented versioned contract. The adapter isolates the rest of the application from the telemetry server's internal database and implementation.

9. Private JSON Operations Inbox

Markdown remains authoritative for campaign content. Subscriber mutations use validated JSON records so deterministic scripts do not interpret prose. The production inbox is a private mounted file such as /data/inbox/subscriber-operations.jsonl; it is never committed to the public repository.

Example subscription operation:

{
  "schema_version": "1.0",
  "operation_id": "subscribe-2026-08-11-example",
  "operation": "subscribe",
  "email": "[email protected]",
  "source": "manual",
  "requested_at": "2026-08-11T18:00:00Z"
}

An unsubscribe uses the same shape with "operation": "unsubscribe" and a reason. An operation ID prevents duplicate processing. Cron may safely reread the file because previously applied operation IDs are skipped. Processed private operation files are archived outside Git according to the retention policy.

10. Receipt Module

Every authorization, import, send, resend, suppression reconciliation, migration, and backup produces an execution receipt.

Public receipts may include:

  • receipt ID;
  • command and software version;
  • campaign ID;
  • content and template hashes;
  • Git commit;
  • counts of considered, excluded, accepted, failed, and completed records;
  • human authorization reference;
  • validation result;
  • timestamps and known limitations.

Public receipts must not include subscriber addresses, credentials, raw provider responses, or private telemetry. Detailed private runtime logs stay on the VM.

11. Migration and Backup Module

  • All database schema changes use numbered, version-controlled migrations.
  • The application records the installed schema version.
  • Production migration requires a current backup and a reviewed dry run or migration plan.
  • A backup is created before campaign sends and migrations.
  • Restore procedures are documented and tested.
  • SQLite and backup files live on a persistent Docker volume outside Git.

12. Scheduler and Automation Entry Point

The application may expose scheduled commands for the VM's existing scheduler or cron mechanism. Scheduling stays outside business logic.

Initial scheduled work:

  • process private JSON/JSONL subscribe and unsubscribe operations;
  • send welcome emails for newly activated subscribers;
  • run authorized apparent-non-opener follow-ups when due;
  • reconcile Postmark suppression state;
  • create or prune backups according to policy;
  • write completion or failure receipts.

The scheduler calls the same CLI commands used interactively; it does not have a second implementation path. Cron is the persistent trigger. An AI agent may create or inspect schedules and handle exceptions, but routine scheduled execution must not depend on the model remaining connected.

13. AI Skill

The repository will contain a focused AI skill built from the established skill template. The skill enables an authorized agent to operate the routine system from the repository and, when granted, through persistent terminal access to the email-list VM. The skill explains:

  • when it applies;
  • required inputs and authoritative sources;
  • which deterministic commands it may call;
  • validation and dry-run requirements;
  • human authorization boundaries;
  • expected receipts;
  • failure and escalation conditions.

The skill must never embed credentials, exceed its granted role, directly edit SQLite, or substitute model judgment for deterministic validation. It may execute production commands only when the deployed agent identity has the corresponding access right and the human directive or scheduled authorization covers the operation.

AI Agent Capability and Access Model

The specific model and agent runtime are not selected yet. The system therefore defines capabilities and permissions rather than depending on one model vendor or hosting design.

With the proper access rights, an AI agent can:

  • read campaign Markdown, templates, schemas, documentation, and prior sanitized receipts;
  • validate and preview the exact human-authored campaign;
  • translate the human's send directive into a recorded campaign authorization;
  • run the initial send through the deterministic CLI;
  • schedule the apparent-non-opener follow-up for the instructed or configured four-to-five-day delay;
  • inspect campaign and telemetry status;
  • run or supervise the due follow-up without returning to the human;
  • inspect subscriber-import, welcome-send, suppression, backup, and health-check receipts;
  • retry explicitly safe operations and resume interrupted sends;
  • diagnose failures and report exceptions;
  • update repository documentation or proposed campaign files through the normal Git workflow when separately authorized.

An AI agent cannot, solely because it has terminal access:

  • create or materially rewrite campaign content without instruction;
  • send a campaign for which no human directive is recorded;
  • expand the audience or follow-up scope beyond the authorization;
  • bypass suppression, schema, backup, authorization, or idempotency checks;
  • read or expose credentials beyond what its execution role needs;
  • directly mutate SQLite or the telemetry database;
  • change production schemas without a migration and required review;
  • silently continue after an unresolved safety or authorization failure.

The likely initial deployment is a persistent AI agent with restricted terminal access to the email-list VM. It should receive only the commands, files, network endpoints, and credentials required by its role. The exact model, persistence mechanism, session lifecycle, terminal broker, and credential delivery remain future infrastructure decisions.

Core Data Contracts

Versioned schemas should cover:

  • campaign front matter;
  • subscriber import operations;
  • CLI JSON results;
  • telemetry queries and responses;
  • sanitized receipts;
  • provider-neutral send results.

Schemas are the stable boundary. Implementations behind them may be replaced.

Core Processes

Create and Send a Campaign

  1. The human creates the finished campaign Markdown in Git.
  2. The human directs the AI agent to send it and schedule the apparent-non-opener follow-up, normally four or five days later.
  3. The AI records that directive as authorization for the exact content, template, audience, and follow-up parameters.
  4. The AI runs deterministic validation, rendering, link, audience, and suppression checks.
  5. If checks pass without requiring a material change, the AI runs the send command; otherwise it returns the exception to the human.
  6. The send command creates an immutable recipient snapshot.
  7. The application reconciles exclusions against current local status and Postmark suppression state.
  8. The Postmark adapter submits safe, idempotent batches.
  9. Per-recipient send state and provider identifiers are recorded.
  10. The AI verifies initial completion, creates the due follow-up schedule, and writes a sanitized receipt.
  11. Postmark delivers the email and sends activity webhooks to the existing telemetry server.

Add Subscribers and Send Welcome Email

  1. The human appends a subscribe record to the private JSON/JSONL operations inbox.
  2. Cron invokes the deterministic import command on schedule.
  3. The command validates the schema, operation ID, address, source, and available consent information.
  4. The new operation is applied transactionally to SQLite exactly once.
  5. The welcome-email command sends exactly once for the newly activated subscriber.
  6. The operation is marked processed or archived privately, and a sanitized receipt is produced.
  7. An AI agent with suitable access can inspect the receipt and handle exceptions, but routine success requires no human or live-agent action.

Unsubscribe and Suppress

  1. Postmark manages the visible one-click unsubscribe flow for broadcast email.
  2. Postmark suppresses the recipient in its Broadcast Message Stream.
  3. The existing telemetry server receives the Postmark subscription-change event.
  4. The email-list application reconciles the change into local subscriber state.
  5. Before every send batch, the application rechecks local status and Postmark suppression state.

Manual administration uses the CLI with a dry run and receipt. The application never sends an unsubscribe-confirmation email.

If the human becomes aware of an unsubscribe outside Postmark, the human appends an unsubscribe record to the same private JSON/JSONL inbox. Cron applies it idempotently on the next run. The cron frequency must be short enough to meet the project's unsubscribe-processing requirement, and pre-send reconciliation remains the final guard.

Resend to Apparent Non-Openers

Open tracking is imperfect, so this audience is explicitly called apparent non-openers.

  1. The original human send directive records the follow-up delay, normally four or five days, and the allowed subject strategy.
  2. Cron invokes the due-followup command at or after the scheduled time.
  3. The AI agent or deterministic workflow queries the existing telemetry server through the telemetry adapter.
  4. The system creates a linked follow-up using only the already authorized content and subject strategy.
  5. It excludes unsubscribed, complained, bounced, suppressed, and newly ineligible recipients.
  6. It validates that the original authorization still covers the follow-up and that no follow-up was already sent.
  7. It permits no more than one apparent-non-opener resend for the original campaign in v1.
  8. It sends through the normal pipeline, verifies completion, and writes a separate receipt without routine human involvement.
  9. Any required material content, audience, timing, or subject change outside the recorded parameters returns to the human for a new directive.

Reconcile Suppressions

  1. Read current local subscriber states.
  2. Read Postmark Broadcast Message Stream suppressions through the provider adapter.
  3. Compare without mutating and produce a reconciliation plan.
  4. Apply only the reviewed allowed changes.
  5. Verify both sides and write a sanitized receipt.

Safety and Reliability Requirements

  • Default mutation commands to a preview or require explicit execution flags.
  • Fail closed when authorization, schema validation, backup, or suppression checks fail.
  • Never send to an address with an unresolved suppression conflict.
  • Normalize email addresses consistently and enforce uniqueness.
  • Use transactions for subscriber changes, recipient snapshots, and send-state transitions.
  • Store timestamps in UTC using ISO 8601.
  • Deduplicate imported operations and telemetry synchronization events.
  • Never log secrets or full subscriber lists.
  • Provide a test-mode Postmark adapter and synthetic fixtures.
  • Support interruption and safe resumption of campaign sends.
  • Bound retries and surface partial failures for human review.
  • Back up before destructive or schema-changing operations.

Privacy and Security Boundaries

Never commit to the public repository:

  • subscriber names or email addresses;
  • production SQLite databases or backups;
  • Postmark or telemetry credentials;
  • raw webhook payloads;
  • private logs;
  • unsanitized subscriber-operation files;
  • session data or access tokens.

Runtime secrets are injected on the VM through environment variables or Docker secrets. The container runs as a non-root user with only the data and configuration it needs. Network access is limited to required Postmark and telemetry endpoints.

Docker Deployment

Docker is appropriate here because the target email-list VM already operates containerized Listmonk applications and the new application benefits from isolated dependencies and a portable, repeatable runtime.

The v1 deployment should use one application container and one persistent volume. It should not introduce an internal database container or queue.

Runtime layout:

/app                       read-only application code
/config                    mounted non-secret configuration
/data/email-list.sqlite    private persistent database
/data/backups/             private database backups
/data/logs/                private operational logs
/data/receipts/            private detailed receipts

The image should include a health check. Deployment documentation must define the image version, environment variables, mounted paths, backup location, update procedure, rollback procedure, and validation command.

Development and Release Process

  1. Work in an isolated development environment, never directly in production.
  2. Inspect repository instructions and current Git state.
  3. Write or update the specification and testing plan.
  4. Implement bounded components with tests.
  5. Run unit, integration, schema, migration, rendering, and safe-resume tests.
  6. Review the change and documentation.
  7. Commit and push through the normal Git workflow.
  8. Deploy the reviewed revision to the VM.
  9. Run health checks and a synthetic or test-mode send.
  10. Validate production behavior and record the release.
  11. Tag the validated release.

Required v1 Tests

  • Campaign schema validation and malformed input rejection.
  • Markdown-to-HTML and plain-text rendering snapshots.
  • Authorization invalidation after content, template, audience, or follow-up parameter changes.
  • Duplicate subscriber and normalized-email handling.
  • Subscriber status precedence and history.
  • Import-operation idempotency.
  • Cron reprocessing of an unchanged JSON/JSONL inbox without duplicate mutations or welcomes.
  • Recipient-snapshot immutability.
  • Duplicate-send prevention and interrupted-send resumption.
  • Partial Postmark batch failure handling.
  • Suppression reconciliation and fail-closed behavior.
  • Telemetry adapter contract tests.
  • Apparent non-opener resend limits and exclusions.
  • Due-followup scheduling, authorized unattended execution, and exception escalation.
  • AI role and command-permission enforcement.
  • Database migration, backup, and restore tests.
  • Secret and private-data exclusion checks for public receipts.
  • Windows and Linux path handling where relevant.

Repository Structure

This repository will use the open-source software/automation profile from repo-template-OPEN. The complete structure should be created through that template's review-and-approval workflow rather than copied mechanically.

Planned project-specific structure:

automation-based-email-list-system/
|-- README.md
|-- AGENTS.md
|-- AUTHOR.md
|-- repository-variables.json
|-- repository.json
|-- LICENSE
|-- CHANGELOG.md
|-- UPDATES.md
|-- VERSION
|-- CONTRIBUTING.md
|-- SECURITY.md
|-- CITATION.cff
|-- docs/
|   |-- README.md
|   |-- architecture.md
|   |-- deployment.md
|   |-- data-model.md
|   |-- system-map.md
|   `-- glossary.md
|-- src/email_list/
|   |-- cli/
|   |-- campaigns/
|   |-- subscribers/
|   |-- authorizations/
|   |-- sending/
|   |-- storage/
|   |-- providers/
|   |-- telemetry/
|   |-- receipts/
|   `-- backups/
|-- campaigns/
|   |-- drafts/
|   `-- sent/
|-- templates/
|-- operations/
|   `-- examples/
|-- schemas/
|-- scripts/
|-- skills/
|-- examples/
|-- receipts/
|-- tasks/
|-- tests/
|-- assets/
|   `-- diagrams/
|-- pyproject.toml
|-- Dockerfile
|-- compose.yaml
|-- .env.example
`-- .gitignore

Real subscriber operations, runtime databases, detailed receipts, logs, backups, generated previews, and secrets remain outside the public repository even when similarly named directories contain schemas, synthetic examples, or sanitized artifacts.

v1 Definition of Done

  • A human and an AI agent can discover and understand the project from the repository entry points.
  • The repository passes the approved repo-template-OPEN software/automation profile validation.
  • A human can finish a Markdown campaign, issue one send-and-schedule directive, and leave routine execution to an authorized AI agent.
  • The AI can validate, send, monitor, schedule, run the due apparent-non-opener follow-up, verify, and report through deterministic commands.
  • Cron can process private JSON/JSONL subscribe and unsubscribe operations without a human or live AI session.
  • A new subscriber receives one welcome email and reprocessing cannot duplicate it.
  • An authorized operator can add or suppress a subscriber through a reviewed deterministic command.
  • Interrupted or retried sends do not duplicate already accepted recipients.
  • Current suppressions are checked before every batch.
  • Welcome email processing is idempotent.
  • Existing telemetry can be queried through the documented adapter contract.
  • One previously authorized resend to apparent non-openers can be completed safely four or five days later without a second routine human approval.
  • Private data and credentials remain outside Git.
  • Migrations, backups, restore, health checks, tests, and deployment procedures are documented and verified.
  • Sanitized campaign and operation receipts are produced.

Deferred Functionality

  • Custom unsubscribe pages and preference centers.
  • Double opt-in workflows unless later required.
  • Multiple lists and complex segmentation.
  • Rich subscriber profiles and personalization.
  • A general-purpose scheduling engine or calendar UI; v1 stores due times and lets cron invoke the deterministic due-followup command.
  • A browser dashboard.
  • A/B testing and automated optimization.
  • Advanced reporting already supplied by Postmark or telemetry.
  • Multiple email providers active at once.
  • Distributed workers and databases.

Open Decisions Before Implementation

  • Confirm the canonical public repository URL and hosting organization.
  • Confirm the open-source license rather than inheriting one from the template.
  • Confirm sender identity, reply-to address, and Postmark Message Stream identifiers.
  • Define the existing telemetry server's query contract and authentication method.
  • Decide whether consent records need more fields for PaddleNet's actual signup sources.
  • Define backup retention and off-VM backup location.
  • Decide the scheduler used on the email-list VM.
  • Confirm the expected maximum list size and normal campaign frequency for batch sizing and operational tests.
  • Select the initial AI model and agent runtime.
  • Define how the AI agent receives persistent terminal access to the email-list VM.
  • Define the agent's Unix user, command allowlist, filesystem access, network access, and credential scope.
  • Decide whether the AI agent remains continuously resident or is awakened by an external scheduler or task runner.
  • Define how a human send directive is captured as a durable authorization record.
  • Choose the default apparent-non-opener delay and approved follow-up subject strategy.

Relationship to Existing Systems

  • Postmark: replaceable delivery and suppression provider behind the provider adapter.
  • Existing telemetry server: replaceable campaign-activity source behind the telemetry adapter.
  • Git host: source control and review mechanism, not a store for private runtime data.
  • Email-list VM: runtime host; deployment details must not leak into business logic.
  • Listmonk: existing neighboring applications on the same VM, not a runtime dependency.

Current Task

After review of this specification, apply repo-template-OPEN through its repository-local planning and approval workflow. Scaffold only the approved software/automation profile and project-specific files, then implement v1 as bounded, tested components.

Repository Guide

The repository now implements the repo-template-OPEN software/automation profile. Start with:

  1. README.md for purpose, architecture, and operating model.
  2. AUTHOR.md and repository-variables.json for verified identity and publication facts.
  3. repository.json for machine-readable entry points and contents.
  4. AGENTS.md for repository safety, routing, and validation rules.
  5. skills.md and the relevant skills/*/SKILL.md for authorized operating workflows.
  6. PUBLICATION_WORKFLOW.md and sanitization-map.md before public-source updates.

Important implementation areas are src/email_list/, docs/, schemas/, templates/, and tests/. Private runtime data, credentials, subscriber operations, databases, backups, detailed receipts, logs, and telemetry remain outside Git.

Validation

python scripts/validate_repository.py .
python -m unittest discover -s tests -p "test_*.py"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/leak-scan.ps1
git diff --check

Version And License

Current version: 0.1.0. See VERSION and CHANGELOG.md.

Licensed under the MIT License. See LICENSE.