---
name: opportunity-sequences
description: Reconcile bounded Lightfield opportunity-sequence work through Hermes using two sealed playbooks and three Product MCP operations.
visibility: public
allowed-tools:
  - Read
  - Bash
  - mcp__sellable__opportunity_sequence_next_page
  - mcp__sellable__opportunity_sequence_enroll
  - mcp__sellable__opportunity_sequence_record
---

# Opportunity Sequences

Hermes is the reasoner and copy generator. Product MCP is the authority for
eligibility, source identity, output validation, append-only Lightfield events,
and the current Opportunity projection. Python is only the private local
journal. This skill never sends prospect outreach.

## Sealed inputs

Read these files from this skill directory before doing any work:

- `references/outbound-multichannel-v2.md`
- `references/positive-reply-to-agreed-meeting-v1.md`

Accept only these immutable references:

- `outbound-multichannel@2#540a5213fee2ba62d8c54d9f92a5f32d5e27fc232f6b3b81a7e12ccb13b56034`
- `positive-reply-to-agreed-meeting@1#6083f2db0e859a81e78456ae6677658abb937636c420bee16407c942a25ca5ff`

Refuse if a file is missing, its declared hash differs, its `contract-json`
block differs from the step table, or Product returns another playbook hash.
Do not repair, reinterpret, activate, migrate, edit, or publish a playbook.

## Modes

- Ordinary invocation or `run`: perform one bounded reconciliation page.
- `status`: run only `journal.py status`; do not call Product MCP.
- Authenticated explicit `replay <notification-attempt-id>`: run only the
  journal replay transition. It must retain the existing Lightfield call
  request identity and create no Lightfield task.
- Authenticated explicit `rebuild <snapshot.json>`: accept only the bounded
  caller-built snapshot assembled from the sealed playbooks and Product MCP
  reads. Python never fetches Lightfield.

The journal lives at
`/opt/data/.sellable-agent/admin-runtime/opportunity-sequences`. Use
`scripts/journal.py --root <that-path>`. Never print the database or private
configuration.

## One bounded run

1. Start one journal run with a stable run ID. Read its cursor/checkpoint and
   notification status. An `emission_started` or `uncertain` notification is a
   visible blocker for ordinary retry; never claim Slack transport exactly-once.
2. Call `opportunity_sequence_next_page` once, with `limit: 25` and only the
   opaque continuation or checkpoint returned by the server/journal. Preserve
   every server reason code, source event ID, source fingerprint, work token,
   candidate token, continuation, and checkpoint without inventing selectors.
3. Admit each returned semantic item locally. Select an enrollment only from a
   server-returned `enrollment_candidate`, then call
   `opportunity_sequence_enroll` with exactly its `candidateToken`. A replay is
   success; a typed refusal remains visible and is not broadened.
4. For each returned `due_work` or exact inbound-transition work item, load the
   one playbook matching the server reference. Use the exact step row and the
   bounded server packet as evidence. Generate one real editable artifact with
   this exact shape:

```json
{
  "playbook_ref": "playbook-id@version#sha256",
  "playbook_hash": "64 lowercase hex characters",
  "step_id": "stable step id",
  "source_event_ids": ["ordered server source id"],
  "source_fingerprint": "64 lowercase hex characters",
  "artifact_type": "email | linkedin | call_request | same_channel_reply",
  "target": {"contact_id": "server contact id", "channel": "email | linkedin | phone", "address": "server address when present"},
  "due_at": "server timezone-aware ISO timestamp",
  "voicemail_policy": "required for call_request: context_only_max_15s_then_email | context_social_proof_max_30s_then_email | do_not_leave",
  "subject": "required only for email",
  "body": "nonempty editable real copy",
  "rationale_summary": "short evidence-grounded rationale"
}
```

   Preserve the exact target, due time, source ordering, and fingerprint. The
   body must be specific, editable copy—not `TODO`, `TBD`, canned filler, a
   placeholder, or a claim that anything was sent/called. Keep body at most
   4,000 characters, email subject at most 200, and rationale at most 600.
   For a call request, copy the exact step `voicemail_policy`. Only `call_1`
   permits a context-only voicemail of at most 15 seconds and only `call_3`
   permits a context-plus-social-proof voicemail of at most 30 seconds; both
   direct attention to the paired next email and never ask for a callback.
    `call_2` and `call_4` use `do_not_leave`.
    Refuse the stale outbound-v1 reference, an omitted/mismatched policy, or any
    third voicemail opportunity.
5. Check every declared field above before mutation. Call
   `opportunity_sequence_record` only with the server `workToken` and the one
   typed output. Product re-reads the source and is the executable authority;
   stale/refused output is not patched locally or retried unchanged.
6. Persist only the returned semantic IDs, page progress, local attempt result,
   notification state, and proposal evidence. Advance a cursor/checkpoint only
   after all admitted items for that page reach an honest local terminal. A
   continuation means the next cron run resumes it; an empty page is success.
7. Return one compact summary: pages/items, enrollment/draft/call-request
   counts, retained server reason codes, cursor/checkpoint state, uncertain
   notifications, and proposal status. A call request is Lightfield semantic
   work summarized by native Hermes delivery; it is not a completed call.

## Call-request notification honesty

For a recorded call request, journal one notification attempt tied to the
existing Lightfield call-request identity. Transition only
`prepared -> emission_started -> observed|uncertain`. Native Hermes delivery
may mention the private configured operator in its normal summary, but this
skill does not call Slack and stores no display-name lookup. If observation is
missing after emission starts, report `uncertain` and stop ordinary retry.
Explicit replay creates a new notification attempt referencing the same Lightfield request.

## Proposal-only improvement

Aggregate only bounded confirmed event history. A successor proposal must be a
Markdown diff that names the active playbook source hash, evidence window and
high-water marks, sample counts, affected steps, expected improvement, risks,
and rollback. Small or stale samples remain observations. Save only proposal
evidence in the journal. Never edit/publish/activate a playbook, migrate an
enrollment, optimize toward unconfirmed events, or authorize a send.

## Refusals

Refuse direct Lightfield/HTTP/Slack transports, a fourth sequence tool,
model-authored opportunity/contact selectors, unsupported playbooks or steps,
empty/canned/placeholder copy, send claims, `--no-agent`, blind notification
retry, multiple active enrollment, auto-promotion, and any prospect send.
