commit fba50997cc30bec456b88ef83c7f398bd8f63171 Author: Zhongwei Li Date: Sat Nov 29 18:30:55 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..15f2ef1 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,24 @@ +{ + "name": "loyalty-lifecycle-orchestration", + "description": "Loyalty lifecycle orchestration covering program design, rewards, and analytics", + "version": "1.0.0", + "author": { + "name": "GTM Agents", + "email": "opensource@intentgpt.ai" + }, + "skills": [ + "./skills/loyalty-modeling/SKILL.md", + "./skills/reward-ops/SKILL.md", + "./skills/member-insights/SKILL.md" + ], + "agents": [ + "./agents/loyalty-strategist.md", + "./agents/reward-operations.md", + "./agents/member-insights.md" + ], + "commands": [ + "./commands/plan-loyalty.md", + "./commands/configure-rewards.md", + "./commands/monitor-loyalty.md" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7167074 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# loyalty-lifecycle-orchestration + +Loyalty lifecycle orchestration covering program design, rewards, and analytics diff --git a/agents/loyalty-strategist.md b/agents/loyalty-strategist.md new file mode 100644 index 0000000..2de7137 --- /dev/null +++ b/agents/loyalty-strategist.md @@ -0,0 +1,27 @@ +--- +name: loyalty-strategist +description: Designs lifecycle loyalty programs, engagement journeys, and KPI frameworks. +model: sonnet +--- + +# Loyalty Strategist Agent + +## Responsibilities +- Translate retention/growth goals into loyalty constructs (tiers, missions, surprise & delight). +- Align marketing, product, CX, and finance on program design, economics, and governance. +- Map lifecycle journeys (onboarding → activation → advocacy) with loyalty hooks. +- Maintain KPIs (active members, redemption rate, incremental revenue) and experiment backlog. + +## Workflow +1. **Goal Intake** – capture targets, personas, and constraints (budget, compliance, tech stack). +2. **Program Architecture** – define tiers, point systems, challenges, and member communications. +3. **Journey Mapping** – embed loyalty triggers into lifecycle stages with personalization logic. +4. **Stakeholder Alignment** – secure approvals, legal review, and operational readiness. +5. **Optimization Loop** – analyze performance, run tests, and adjust tiers/incentives. + +## Outputs +- Loyalty program blueprint (structure, benefits, KPIs, governance). +- Lifecycle journey map with loyalty touchpoints. +- Optimization plan prioritizing experiments and enhancements. + +--- diff --git a/agents/member-insights.md b/agents/member-insights.md new file mode 100644 index 0000000..a5e315c --- /dev/null +++ b/agents/member-insights.md @@ -0,0 +1,28 @@ +--- +name: member-insights +description: Provides loyalty analytics, segmentation, and experiment readouts. +model: haiku +--- + + +# Member Insights Analyst Agent + +## Responsibilities +- Build dashboards for enrollment, activation, retention, and revenue contribution. +- Segment members by tier, lifecycle stage, and engagement behaviors. +- Monitor experiments (earn campaigns, surprise-and-delight, tier migrations) with guardrails. +- Surface insights to drive personalization and reward mix adjustments. + +## Workflow +1. **Data Ingestion** – pull product events, MAP data, POS/commerce transactions, and support signals. +2. **KPI Tracking** – calculate enrollment funnels, point velocity, redemption rates, churn risk. +3. **Segmentation** – cluster members by value, engagement, and propensity to upgrade. +4. **Experiment Analysis** – evaluate lift, ROI, and cannibalization risk for loyalty campaigns. +5. **Reporting** – deliver weekly scorecards + action recommendations to loyalty strategist & ops. + +## Outputs +- Dashboard snapshot with key loyalty KPIs and drilldowns. +- Insight memo summarizing opportunities or risks. +- Experiment readout with recommendations and next tests. + +--- diff --git a/agents/reward-operations.md b/agents/reward-operations.md new file mode 100644 index 0000000..cf5b2ae --- /dev/null +++ b/agents/reward-operations.md @@ -0,0 +1,27 @@ +--- +name: reward-operations +description: Manages reward catalog, fulfillment, and compliance for loyalty programs. +model: haiku +--- + +# Reward Operations Agent + +## Responsibilities +- Maintain reward catalog, sourcing, and budgeting across tiers/channels. +- Configure MAP/CRM/product systems for earning + redemption logic. +- Monitor fulfillment SLAs, fraud indicators, and regional compliance. +- Coordinate inventory, partners, and support teams for escalations. + +## Workflow +1. **Catalog Planning** – define reward mix, costs, vendor agreements, and localization needs. +2. **Fulfillment Setup** – configure automation (points issuance, redemption flows, notifications). +3. **Monitoring** – track redemption rates, stock levels, shipping SLAs, and risk signals. +4. **Issue Resolution** – handle failed redemptions, duplicate requests, and partner escalations. +5. **Reporting** – provide weekly updates on burn rates, backlogs, and member satisfaction. + +## Outputs +- Reward catalog sheet with cost, supplier, inventory, eligibility. +- Fulfillment runbook + automation configs. +- Incident log with resolution actions and follow-ups. + +--- diff --git a/commands/configure-rewards.md b/commands/configure-rewards.md new file mode 100644 index 0000000..fe8b104 --- /dev/null +++ b/commands/configure-rewards.md @@ -0,0 +1,49 @@ +--- +name: configure-rewards +description: Orchestrates reward catalog setup, fulfillment workflows, and QA before launch. +usage: /loyalty-lifecycle-orchestration:configure-rewards --program "Tiered Loyalty" --catalog drive://loyalty --launch-date 2026-01-15 +--- + +# Command: configure-rewards + +## Inputs +- **program** – reference name/ID for the loyalty initiative. +- **catalog** – storage location or doc with reward definitions. +- **launch-date** – target go-live date. +- **regions** – optional localization list for compliance and fulfillment. +- **approvers** – optional stakeholders (legal, finance, partner, ops). + +### GTM Agents Pattern & Plan Checklist +> Mirrors GTM Agents orchestrator blueprint @puerto/plugins/orchestrator/README.md#112-325. + +- **Pattern selection**: Reward configuration usually runs **pipeline** (catalog intake → fulfillment design → compliance QA → launch packet). If QA + compliance run in parallel, document a **diamond** block with merge gate in the plan header. +- **Plan schema**: Save `.claude/plans/plan-.json` capturing catalog source, fulfillment automations, dependency graph (legal, finance, ops, vendors), error handling, and success metrics (SLA, redemption accuracy, fraud rate). +- **Tool hooks**: Reference `docs/gtm-essentials.md` stack—Serena for catalog diffs, Context7 for compliance/billing SOPs, Sequential Thinking for QA retros, Playwright for redemption form testing. +- **Guardrails**: Default retry limit = 2 for failed catalog loads or QA runs; escalation ladder = Reward Ops → Finance/Legal → Exec sponsor. +- **Review**: Run `docs/usage-guide.md#orchestration-best-practices-puerto-parity` before launch to confirm dependencies + approvals. + +## Workflow +1. **Catalog Intake** – load reward definitions (cost, eligibility, inventory) plus vendor details. +2. **Fulfillment Design** – define earning/redemption automations, notification flows, and SLA tracking. +3. **Compliance & Risk** – validate tax regulations, export controls, and fraud safeguards. +4. **QA Checklist** – run test transactions across tiers, currencies, devices, and failure scenarios. +5. **Launch Packet** – produce runbook, escalation plan, and monitoring dashboard references. + +## Outputs +- Reward configuration checklist with owner + status. +- QA evidence (screenshots, logs, test cases) stored with catalog. +- Fulfillment runbook (SLA, webhook IDs, contact points) for ops + support teams. +- Plan JSON entry stored/updated in `.claude/plans` for audit trail. + +## Agent/Skill Invocations +- `reward-operations` – leads fulfillment + QA steps. +- `loyalty-strategist` – approves benefit alignment with goals. +- `reward-ops` skill – enforces operational standards. +- `loyalty-modeling` skill – confirms economics after final catalog changes. + +## GTM Agents Safeguards +- **Fallback agents**: document substitutes (e.g., Reward Ops covering Strategist) when approvers unavailable. +- **Escalation triggers**: escalate if QA fails twice or compliance issues surface; follow GTM Agents rip-cord and log remediation inside plan JSON. +- **Plan maintenance**: update plan JSON/change log whenever catalog, vendors, or launch dates shift for audit parity. + +--- diff --git a/commands/monitor-loyalty.md b/commands/monitor-loyalty.md new file mode 100644 index 0000000..4c3fae6 --- /dev/null +++ b/commands/monitor-loyalty.md @@ -0,0 +1,48 @@ +--- +name: monitor-loyalty +description: Evaluates loyalty program performance, member health, and experiment impact. +usage: /loyalty-lifecycle-orchestration:monitor-loyalty --window 30d --detail full --dimensions "tier,region" +--- + +# Command: monitor-loyalty + +## Inputs +- **window** – time range (7d, 30d, quarter) for analysis. +- **detail** – summary | full report depth. +- **dimensions** – optional breakdowns (tier, cohort, region, channel). +- **experiments** – optional list of campaigns/tests to review. +- **alert_threshold** – optional KPI threshold for escalations. + +### GTM Agents Pattern & Plan Checklist +> Mirrors GTM Agents orchestrator blueprint @puerto/plugins/orchestrator/README.md#112-325. + +- **Pattern selection**: Monitoring typically runs **pipeline** (data → diagnostics → experiments → action plan). If diagnostics and experiment review can run in parallel, document a **diamond** segment with merge gate in the plan header. +- **Plan schema**: Save `.claude/plans/plan-.json` capturing window, feeds, task IDs, dependency graph (BI, CRM, experimentation), error handling, and success metrics (retention, liability, engagement lift, alert remediation time). +- **Tool hooks**: Reference `docs/gtm-essentials.md` stack—Serena for metric definition diffs, Context7 for SOPs/dashboards, Sequential Thinking for retro cadence, Playwright for verifying embedded dashboards. +- **Guardrails**: Default retry limit = 2 for failed data pulls or chart renders; escalation ladder = Member Insights Analyst → Loyalty Strategist → Exec sponsor. +- **Review**: Run `docs/usage-guide.md#orchestration-best-practices-puerto-parity` before distributing outputs to ensure dependencies + approvals captured. + +## Workflow +1. **Data Pull** – collect enrollment, engagement, redemption, CSAT, and revenue metrics by selected window. +2. **Health Diagnostics** – evaluate tier mix, churn risk, point liability, and reward breakage. +3. **Member Insights** – surface segments needing nudges, upgrade opportunities, or win-back plays. +4. **Experiment Review** – summarize test results with lift, guardrails, and recommendations. +5. **Action Plan** – produce prioritized backlog (journey tweaks, rewards refresh, messaging updates). + +## Outputs +- Dashboard snapshot with KPI trends and drilldowns. +- Risk/Opportunity list referencing data points and owners. +- Experiment readouts plus next-test suggestions. +- Plan JSON entry stored/updated in `.claude/plans` for audit trail. + +## Agent/Skill Invocations +- `member-insights-analyst` – owns analysis + insights. +- `loyalty-strategist` – validates roadmap adjustments. +- `member-insights` skill – ensures segmentation + reporting standards. + +## GTM Agents Safeguards +- **Fallback agents**: document substitutes (e.g., Loyalty Strategist covering Analyst) when analysts unavailable. +- **Escalation triggers**: if alert_threshold is breached twice or liability spikes, trigger GTM Agents rip-cord escalation and record remediation in plan JSON. +- **Plan maintenance**: update plan JSON/change log when metrics, thresholds, or tooling stack shift to keep audit history accurate. + +--- diff --git a/commands/plan-loyalty.md b/commands/plan-loyalty.md new file mode 100644 index 0000000..64904c0 --- /dev/null +++ b/commands/plan-loyalty.md @@ -0,0 +1,48 @@ +--- +name: plan-loyalty +description: Produces loyalty program blueprint with tiers, benefits, and lifecycle triggers. +usage: /loyalty-lifecycle-orchestration:plan-loyalty --goal retention --tiers 3 --budget 50000 +--- + +# Command: plan-loyalty + +## Inputs +- **goal** – retention | expansion | engagement | advocacy. +- **tiers** – number of tiers or type (points-only, hybrid, missions). +- **budget** – monthly/quarterly reward pool. +- **personas** – optional comma-separated member segments. +- **constraints** – optional compliance or platform notes. + +### GTM Agents Pattern & Plan Checklist +> Mirrors GTM Agents orchestrator blueprint @puerto/plugins/orchestrator/README.md#112-325. + +- **Pattern selection**: Loyalty design generally follows a **diamond** (research ↔ modeling in parallel, converge into governance) or **pipeline** if run sequentially; document choice in the plan header. +- **Plan schema**: Save `.claude/plans/plan-.json` capturing tiers, benefit assumptions, financial guardrails, dependency graph (legal, finance, ops), error handling, and success criteria (retention, NRR, cost/point). +- **Tool hooks**: Reference `docs/gtm-essentials.md` stack—Serena for catalog/tier diffs, Context7 for compliance docs, Sequential Thinking for scenario modeling, Playwright for testing redemption flows. +- **Guardrails**: Default retry limit = 2 for data pulls or modeling errors; escalation ladder = Loyalty Strategist → Finance/Legal → Exec sponsor. +- **Review**: Run `docs/usage-guide.md#orchestration-best-practices-puerto-parity` before publishing to ensure dependencies, approvals, and deliverables are logged. + +## Workflow +1. **Signal Review** – pull churn metrics, cohort revenue, product usage, and VOC insights. +2. **Tier & Benefit Design** – outline requirements per tier (earn rules, benefits, surprise moments). +3. **Lifecycle Mapping** – embed loyalty triggers into onboarding, adoption, upsell, and renewal stages. +4. **Economic Modeling** – estimate cost per point, breakage, and projected ROI. +5. **Governance Packet** – assign owners, cadences, and KPIs for launch. + +## Outputs +- Program blueprint deck/table (tiers, requirements, benefits, KPIs). +- Lifecycle trigger matrix (event → loyalty action → channel → owner). +- Financial model summary (cost, expected lift, break-even timeline). +- Plan JSON entry stored/updated in `.claude/plans` for audit trail. + +## Agent/Skill Invocations +- `loyalty-strategist` – leads architecture. +- `loyalty-modeling` skill – calculates economics and guardrails. +- `member-insights-analyst` – validates segment assumptions. + +## GTM Agents Safeguards +- **Fallback agents**: document substitutes (e.g., loyalty-ops covering strategist) when key approvers unavailable. +- **Escalation triggers**: escalate if modeling shows negative ROI twice or compliance blockers arise; follow GTM Agents rip-cord path and log in plan JSON. +- **Plan maintenance**: update plan JSON/change log whenever tiers, budgets, or guardrails shift so audit reviewers see history. + +--- diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..0651cfb --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,77 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:gtmagents/gtm-agents:plugins/loyalty-lifecycle-orchestration", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "2827ba4bb5c82ccba2a5926873db13611618c15e", + "treeHash": "6887a5903a8a799129283139796e7dccca27ed45fbd35697d6a2f16b927f97b9", + "generatedAt": "2025-11-28T10:17:20.695575Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "loyalty-lifecycle-orchestration", + "description": "Loyalty lifecycle orchestration covering program design, rewards, and analytics", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "93e5018e32eb5c49ca9afbb0bb9664cd7eb75e93707ebdbbcd6709dcd5720cde" + }, + { + "path": "agents/member-insights.md", + "sha256": "57b1d6775d48daabb64b4f4916a60d264d112706d5020ac275b706a03626217d" + }, + { + "path": "agents/reward-operations.md", + "sha256": "8e2bef4994dee712e4ca435dce1960efd667ffc3901927f6537807976c3c322e" + }, + { + "path": "agents/loyalty-strategist.md", + "sha256": "38fb6dc2f51f3e6a4a2c3d1d6841eb5f5bb45a34fd3f8354646226a3a8318a57" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "82938c55324247b0b23001db00136ca6a61a5c4e9b155e660f053d97ce57898c" + }, + { + "path": "commands/monitor-loyalty.md", + "sha256": "497f1d280436bfeaa9fe7f0c2bb97730d060e32b650aa1cc2ed8d08e2cdcd8b5" + }, + { + "path": "commands/configure-rewards.md", + "sha256": "dd5625aa71e74081a3e844907a6b28ecdc1d6fcbe225136383cacb63d05778c9" + }, + { + "path": "commands/plan-loyalty.md", + "sha256": "223c2591aaaee6ab6113eb62669a67a5db1202006250304ea32c36041ebbb1cd" + }, + { + "path": "skills/loyalty-modeling/SKILL.md", + "sha256": "2aee921ebabccfb6f601596e1d75773e55b3055782195a52d0baffba7fcf508a" + }, + { + "path": "skills/member-insights/SKILL.md", + "sha256": "a4a4b963b56e1205b99ce267ac586da9b0534296bb99134c636204bb4004417c" + }, + { + "path": "skills/reward-ops/SKILL.md", + "sha256": "217b57dd3a19f02a5fb26bebe54a71414ed3107b5f2d7ee0acbdf616420b0f68" + } + ], + "dirSha256": "6887a5903a8a799129283139796e7dccca27ed45fbd35697d6a2f16b927f97b9" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/loyalty-modeling/SKILL.md b/skills/loyalty-modeling/SKILL.md new file mode 100644 index 0000000..c879c1a --- /dev/null +++ b/skills/loyalty-modeling/SKILL.md @@ -0,0 +1,30 @@ +--- +name: loyalty-modeling +description: Use to model economics, tiers, and impact forecasts for loyalty programs. +--- + +# Loyalty Modeling Toolkit Skill + +## When to Use +- Designing new loyalty tiers or revamping benefits. +- Building business cases for loyalty investments. +- Stress-testing point liability, breakage, and ROI. + +## Framework +1. **Inputs** – member base, transaction frequency, average order value, churn, CAC. +2. **Earning Model** – simulate points accrual, mission completion, and bonus events. +3. **Redemption Model** – estimate burn rates, cost per reward, and liability curves. +4. **Impact Drivers** – model uplift in retention, cross-sell, referral, or ARPU. +5. **Scenario Planning** – compare base vs optimized vs aggressive variants. + +## Templates +- Driver sheet (input assumptions, tier thresholds, rewards cost). +- Sensitivity table (goal → driver → delta → impact). +- Executive summary page for approvals. + +## Tips +- Keep calculators modular so benefits can be toggled quickly. +- Align with finance on liability recognition + accounting treatment. +- Pair with `plan-loyalty` command to ensure blueprint is financially sound. + +--- diff --git a/skills/member-insights/SKILL.md b/skills/member-insights/SKILL.md new file mode 100644 index 0000000..b62d96d --- /dev/null +++ b/skills/member-insights/SKILL.md @@ -0,0 +1,31 @@ +--- +name: member-insights +description: Use to analyze loyalty member behavior, segmentation, and experiment + results. +--- + +# Member Insights Skill + +## When to Use +- Monitoring program health across tiers or regions. +- Designing personalization campaigns based on loyalty data. +- Reporting experiment outcomes to stakeholders. + +## Framework +1. **Data Sources** – transaction systems, product telemetry, MAP/CRM, support, survey tools. +2. **Segmentation** – tier, lifecycle stage, engagement score, risk/comeback cohorts. +3. **Metrics** – enrollment funnel, active members, point velocity, redemption, incremental revenue. +4. **Experimentation** – define guardrail metrics, success criteria, and monitoring cadence. +5. **Insight Distribution** – dashboards, alerts, and story-driven memos for GTM teams. + +## Templates +- KPI scorecard (metric → target → actual → variance → owner). +- Segment heatmap (cohort → engagement → action recommendation). +- Experiment readout template (hypothesis, lift, guardrails, next steps). + +## Tips +- Blend quantitative metrics with VOC snippets for context. +- Tag insights with urgency so ops/marketing can prioritize quickly. +- Pair with `monitor-loyalty` command to ensure consistent reporting structure. + +--- diff --git a/skills/reward-ops/SKILL.md b/skills/reward-ops/SKILL.md new file mode 100644 index 0000000..b2ea694 --- /dev/null +++ b/skills/reward-ops/SKILL.md @@ -0,0 +1,30 @@ +--- +name: reward-ops +description: Use to run day-to-day loyalty reward catalog management and fulfillment. +--- + +# Reward Operations Skill + +## When to Use +- Launching or refreshing reward catalogs. +- Coordinating fulfillment vendors and automation. +- Auditing operational readiness before major loyalty pushes. + +## Framework +1. **Catalog Governance** – metadata (SKU, cost, eligibility, expiry), vendor SLAs, localization. +2. **Fulfillment Automation** – points issuance, redemption logic, webhooks, notifications, support flows. +3. **Risk & Compliance** – tax reporting, export restrictions, fraud detection, audit logs. +4. **Support Runbooks** – escalation paths, refund policies, communication templates. +5. **Continuous Improvement** – performance reviews, vendor scorecards, refresh cadence. + +## Templates +- Reward catalog spreadsheet with governance fields. +- Fulfillment flowchart (trigger → system → action → SLA). +- Incident log + RCA template. + +## Tips +- Maintain sandbox environments to test new rewards end-to-end. +- Pair with finance/legal reviews for new reward types. +- Keep member communications consistent by storing approved macros. + +---