This commit is contained in:
eddiesoehnel committed 2026-08-15 15:05:39 -06:00
1 parent eac3d5dc45
commit 2a2b00733b
83 files changed
+4840

No files matched your search

+93
View File
@@ -0,0 +1,93 @@
---
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.
@@ -0,0 +1,4 @@
interface:
display_name: "Add PaddleNET Subscriber"
short_description: "Safely add a consented subscriber"
default_prompt: "Use $email-list-add-subscriber to add this consented PaddleNET subscriber."
+95
View File
@@ -0,0 +1,95 @@
---
name: email-list-operator
description: Prepare, validate, approve, send, and follow up on PaddleNET broadcast campaigns through the deterministic email-list CLI. Use when a human asks to turn an approved PaddleNET Hub update into a campaign preview, approve and send an exact campaign, or run an already authorized campaign follow-up. Use the separate subscriber add/remove skills for subscriber changes.
---
# PaddleNET Email-List Operator
## Skill Shape
- `service`: bounded campaign preparation, delivery, and authorized follow-up workflow.
## Contract
Prepare a versioned delivery artifact from the approved PaddleNET Hub update, validate it before mutation, record an exact human directive before an initial send, and stop on authorization, rendering, suppression, provider, backup, deployment, or telemetry failure.
## Requires
- A source update in `C:\projects\paddlenet-forge\paddlenet-hub\platform-updates` or an already prepared campaign Markdown file.
- Human review before an initial send and an exact send-and-follow-up directive before authorization.
- The deployed reviewed Git revision, complete private `.env`, and required email-VM CLI access.
- Explicit human instruction before materially changing source wording, sender identity, audience, or the original follow-up subject.
## Ensures
- A versioned campaign Markdown artifact under `campaigns/drafts/` for the reviewed delivery content.
- JSON CLI result and private sanitized receipt for each completed mutation.
- No direct SQLite or telemetry-database mutation.
- At most one scheduled four-day apparent-non-opener follow-up with the original authorized subject.
## Inputs
- Hub update source, campaign Markdown, and reviewed campaign template.
- Exact human directive/reference and authorizer for the initial send.
- Runtime health, Postmark suppression, backup, and Ops Monitor telemetry results.
## State Scope
- `project`: create or update reviewed campaign Markdown, commit and deploy only after the human approves the exact content, and update private runtime state only through the CLI.
Never commit subscriber operations, runtime databases, receipts, raw telemetry, or credentials.
## Workflow
### Phase 1: Prepare the delivery artifact
1. Read the selected Hub update and identify the exact source file used.
2. Create or update `campaigns/drafts/<campaign-id>.md` with required front matter, stable campaign ID, subject, preheader, PaddleNET sender metadata, and the reviewed source-derived body.
3. Run `campaign validate` and `campaign preview`.
4. Present the rendered campaign for human review. Do not send, approve, or schedule a follow-up in this phase.
### Phase 2: Review, commit, deploy, and authorize
1. Apply requested content changes, then rerun validation and preview.
2. After the human approves the exact content and gives a send-and-follow-up directive, commit the campaign artifact, push it, deploy the reviewed revision, update `EMAIL_LIST_GIT_COMMIT`, and rebuild the container.
3. Run `system check --json` and `suppression reconcile --dry-run --json`.
4. Record the exact directive with `campaign approve`.
### Phase 3: Send and schedule
1. Run `campaign send --dry-run --json`; inspect recipient count and exclusions.
2. Run `campaign send --json` only when the approval, campaign hash, template hash, reviewed Git revision, sender, and audience still match.
3. Confirm backup path, accepted/duplicate counts, receipt path, and delivery webhook health.
4. Run `campaign schedule-non-openers <campaign-id> --subject <original-subject> --json` to record the one authorized four-day follow-up.
5. If host cron is not enabled, report that the follow-up is recorded but cannot run unattended.
### Phase 4: Run a due follow-up
1. Run `campaign run-due-followups --dry-run --json` before a due production follow-up when an operator is present.
2. Require Ops Monitor telemetry, original authorization, recipient snapshot, active local status, and current Postmark suppression checks to pass.
3. Stop rather than resend if telemetry is unavailable, no eligible apparent non-openers remain, or any authorization/hash check fails.
## Validation
Before reporting completion, inspect JSON output and private receipt paths. For an initial send, confirm the backup, accepted/duplicate counts, Delivery webhook, and one follow-up schedule. Never expose addresses, tokens, raw telemetry, or private receipts.
## Edge Cases
- Changed campaign or template after approval: stop and require a new review and directive.
- Missing deployed commit or incomplete `.env`: stop before approval or send.
- Suppression conflict: exclude the recipient and reconcile; do not bypass it.
- Placeholder welcome template: do not run welcome processing.
- Cron disabled: schedule may be recorded, but no unattended follow-up occurs.
- Telemetry unavailable: do not send a follow-up.
## Anti-Patterns
Do not use this skill for subscriber add/remove work, directly edit SQLite, bypass dry runs or suppressions, invent authorization, substitute a follow-up subject, send a campaign from an unreviewed Hub file, or commit private runtime data.
## Ratchet Rules
Turn every important operational failure into a regression test, schema rule, fixture, STOP gate, routing example, or documented anti-pattern, then rerun the relevant validation.
## Run Receipt
Record privately: skill name, reviewed Git revision, source Hub file, campaign and template hashes, authorization reference, impact counts, validation, receipt paths, scheduler state, and unresolved risks. Use the final report only for sanitized summaries.
@@ -0,0 +1,4 @@
interface:
display_name: "PaddleNET Email Operator"
short_description: "Prepare and send approved campaigns"
default_prompt: "Use $email-list-operator to prepare this PaddleNET update for review and delivery."
@@ -0,0 +1,87 @@
---
name: email-list-remove-subscriber
description: Remove one email address from the PaddleNET email list through the private, idempotent JSONL inbox and deterministic CLI. Use when a human asks to unsubscribe or suppress a specific address. Do not use for Postmark-managed click unsubscribes, campaign sending, or direct database changes.
---
# Remove PaddleNET Subscriber
## Skill Shape
- `service`: one private subscriber-removal operation.
## Contract
Apply one explicitly requested unsubscribe through the deterministic CLI. Validate before mutation, preserve the removal even when the address is unknown locally, and never send email or change a Postmark subscription directly.
## Requires
- One valid email address.
- Human instruction to remove this exact address.
- A reason when available; otherwise record `human removal request`.
- Authorized access to the production email VM and its Docker CLI.
## Ensures
- One private `unsubscribe` 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 direct SQLite change, campaign send, welcome run, Postmark API call, or Git commit.
## Inputs
- Email address.
- Optional reason, such as `recipient-request`, `manual-cleanup`, or `human removal request`.
## State Scope
- `project`: write one private operation file under `/srv/email-list-system/runtime/inbox/` and let the CLI update private SQLite state.
## Workflow
### Phase 1: Confirm the request
1. Confirm the exact address and capture the available removal reason.
2. Normalize and validate the address through the CLI path; do not guess corrections.
3. Explain only if needed that a local removal prevents later system sends immediately; Postmark click unsubscribes remain managed by Postmark and synchronize separately.
### 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: "unsubscribe"`, the address, reason, and `requested_at` in UTC.
3. Run `subscriber import <private-file> --dry-run --json`.
4. Inspect the planned result without exposing other subscriber data.
### 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: removed, already applied, or removed as an unknown-address suppression.
## Validation
Before finishing, confirm all of the following:
1. The operation is `unsubscribe`, has a unique ID, and has a UTC request time.
2. The dry run completed before the live import.
3. The live result is `unsubscribed`, `suppressed_unknown_address`, or `already_applied`.
4. No campaign, welcome, direct SQLite, or Postmark API command was called.
5. The final report contains no token, raw receipt, or additional subscriber data.
## Edge Cases
- Unknown address: retain a local unsubscribed record and report the safe suppression outcome.
- Replayed operation ID: report `already_applied`; do not create a duplicate.
- Invalid address: stop before creating a private operation.
- Postmark click unsubscribe: do not duplicate it manually unless the human separately requests a local removal; Postmark suppression reconciliation handles provider state.
## Anti-Patterns
Do not reactivate a suppressed address, edit SQLite, commit private data, delete subscriber history, send a confirmation message, or use a campaign command.
## Ratchet Rules
Turn each recurring removal 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, reason category, command results, receipt path, validation outcome, and unresolved risk. Give the human only a sanitized completion summary.
@@ -0,0 +1,4 @@
interface:
display_name: "Remove PaddleNET Subscriber"
short_description: "Safely remove a subscriber"
default_prompt: "Use $email-list-remove-subscriber to remove this PaddleNET subscriber."