Files
automation-based-email-list…/skills/email-list-add-subscriber/SKILL.md
T

93 lines
4.5 KiB
Markdown
Raw Normal View History

2026-08-15 15:05:39 -06:00
---
name: email-list-add-subscriber
description: Add one consented subscriber to the PaddleNET email list through the private, idempotent JSONL inbox and deterministic CLI. Use when a human asks to add a specific email address and provides its source and available consent information. Do not use for an initial bulk-list import, campaign sending, or welcome-email processing.
---
# Add PaddleNET Subscriber
## Skill Shape
- `service`: one private subscriber-add operation.
## Contract
Add at most one explicitly requested, consented email address through the deterministic CLI. Validate before mutation, preserve private data outside Git, and never send a campaign or welcome email as part of this skill.
## Requires
- One valid email address.
- Subscription source and available consent information.
- Authorized access to the production email VM and its Docker CLI.
- Human instruction to add this exact address.
Stop and ask for missing source or consent information. Route an approved initial list import to the campaign/operator workflow; it requires separate review and `--no-welcome`.
## Ensures
- One private `subscribe` JSONL operation with a new operation ID and UTC request time.
- A completed dry run before any mutation.
- A sanitized CLI result and private receipt for a completed import.
- No Git commit, direct SQLite change, campaign send, welcome run, or Postmark API call.
## Inputs
- Email address.
- Source, such as `event-signup`, `website-form`, or `manual-consent`.
- Available consent timestamp and note; state any unknown detail rather than inventing it.
## State Scope
- `project`: write one private operation file under `/srv/email-list-system/runtime/inbox/` and let the CLI update private SQLite state.
Never store the address, consent note, operation file, receipt, or runtime output in Git, campaign Markdown, or a final public report.
## Workflow
### Phase 1: Confirm the request
1. Confirm the exact address, source, and available consent information.
2. Normalize and validate the address through the CLI path; do not guess corrections.
3. Stop if the request is an initial list import, lacks consent/source details, or asks to reactivate a suppressed address.
### Phase 2: Plan the private operation
1. Run `email-list system check --json` on the email VM.
2. Create one private JSONL record with `schema_version: "1.0"`, a new unique `operation_id`, `operation: "subscribe"`, the address, source, consent fields when available, and `requested_at` in UTC.
3. Run `subscriber import <private-file> --dry-run --json`.
4. Inspect the result. Expected outcomes are a planned first subscription, an idempotent existing operation, or a visible block caused by an existing terminal suppression.
### Phase 3: Apply and report
1. Run `subscriber import <private-file> --json` only after the dry run is valid.
2. Inspect the JSON result and private receipt path.
3. Report only a sanitized status: added, already active, already applied, or blocked by suppression. Do not report the address or consent note back unless the human supplied it in the current request and needs confirmation.
## Validation
Before finishing, confirm all of the following:
1. The operation is `subscribe`, has a unique ID, and includes source and UTC request time.
2. The dry run completed before the live import.
3. The live result is one expected idempotent outcome.
4. No `welcome run` or campaign command was called.
5. The final report contains no token, raw receipt, or additional subscriber data.
## Edge Cases
- Existing active address: report `already_active`; do not create a duplicate.
- Replayed operation ID: report `already_applied`; do not create a duplicate.
- Existing unsubscribe, bounce, complaint, or manual suppression: report the block; never reactivate through this skill.
- Invalid address or missing source: stop before creating a private operation.
- Placeholder welcome template: the addition may remain welcome-eligible, but this skill does not run welcomes.
## Anti-Patterns
Do not edit SQLite, commit subscriber data, import a bulk list, use `--no-welcome` for an ordinary new addition, call Postmark directly, or send any email from this skill.
## Ratchet Rules
Turn each recurring intake failure into a durable guardrail: a required-input rule, JSONL fixture, validation check, STOP gate, or documented anti-pattern. Rerun the dry-run path after changing the skill.
## Run Receipt
Record privately: skill name, operation ID, source category, command results, receipt path, validation outcome, and unresolved risk. Give the human only a sanitized completion summary.