agents-united 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +673 -0
  3. package/dist/cli.d.ts +5 -0
  4. package/dist/cli.js +4789 -0
  5. package/dist/cli.js.map +1 -0
  6. package/package.json +77 -0
  7. package/registry/agents/orchestrator-business.md +188 -0
  8. package/registry/agents/orchestrator-design.md +168 -0
  9. package/registry/agents/orchestrator-engineering.md +183 -0
  10. package/registry/agents/orchestrator-marketing.md +228 -0
  11. package/registry/agents/orchestrator-research.md +196 -0
  12. package/registry/agents/orchestrator-security.md +190 -0
  13. package/registry/agents/orchestrator-system-architecture.md +171 -0
  14. package/registry/agents/orchestrator-universal.md +168 -0
  15. package/registry/agents/subagent-accessibility-lead.md +47 -0
  16. package/registry/agents/subagent-ai-model-architect.md +97 -0
  17. package/registry/agents/subagent-android-architect.md +47 -0
  18. package/registry/agents/subagent-appsec-penetration-tester.md +189 -0
  19. package/registry/agents/subagent-backend-architect.md +360 -0
  20. package/registry/agents/subagent-business-panel-experts.md +126 -0
  21. package/registry/agents/subagent-cloud-infrastructure-architect.md +126 -0
  22. package/registry/agents/subagent-cloud-security-architect.md +221 -0
  23. package/registry/agents/subagent-code-reviewer.md +193 -0
  24. package/registry/agents/subagent-compliance-grc-specialist.md +147 -0
  25. package/registry/agents/subagent-cross-platform-specialist.md +47 -0
  26. package/registry/agents/subagent-data-engineer.md +46 -0
  27. package/registry/agents/subagent-database-administrator.md +141 -0
  28. package/registry/agents/subagent-deep-research.md +94 -0
  29. package/registry/agents/subagent-design-ops-lead.md +121 -0
  30. package/registry/agents/subagent-design-researcher.md +133 -0
  31. package/registry/agents/subagent-design-systems-architect.md +134 -0
  32. package/registry/agents/subagent-designer-toolkit-expert.md +363 -0
  33. package/registry/agents/subagent-devops-engineer.md +423 -0
  34. package/registry/agents/subagent-distributed-systems-architect.md +47 -0
  35. package/registry/agents/subagent-e2e-tester.md +60 -0
  36. package/registry/agents/subagent-financial-analyst.md +119 -0
  37. package/registry/agents/subagent-finops-cost-engineer.md +98 -0
  38. package/registry/agents/subagent-frontend-architect.md +368 -0
  39. package/registry/agents/subagent-interaction-designer.md +302 -0
  40. package/registry/agents/subagent-ios-architect.md +46 -0
  41. package/registry/agents/subagent-legal-contract-analyst.md +108 -0
  42. package/registry/agents/subagent-lifecycle-email-specialist.md +46 -0
  43. package/registry/agents/subagent-literature-patent-analyst.md +78 -0
  44. package/registry/agents/subagent-market-intelligence-analyst.md +110 -0
  45. package/registry/agents/subagent-marketing-campaign-specialist.md +80 -0
  46. package/registry/agents/subagent-marketing-content-strategist.md +184 -0
  47. package/registry/agents/subagent-marketing-conversion-specialist.md +79 -0
  48. package/registry/agents/subagent-marketing-creative-designer.md +93 -0
  49. package/registry/agents/subagent-marketing-growth-strategist.md +137 -0
  50. package/registry/agents/subagent-ml-platform-engineer.md +95 -0
  51. package/registry/agents/subagent-operations-strategist.md +85 -0
  52. package/registry/agents/subagent-paid-acquisition-specialist.md +47 -0
  53. package/registry/agents/subagent-plg-strategist.md +46 -0
  54. package/registry/agents/subagent-prototype-tester.md +140 -0
  55. package/registry/agents/subagent-qa-automation-lead.md +63 -0
  56. package/registry/agents/subagent-repo-index.md +180 -0
  57. package/registry/agents/subagent-security-engineer.md +134 -0
  58. package/registry/agents/subagent-seo-specialist.md +46 -0
  59. package/registry/agents/subagent-socratic-mentor.md +105 -0
  60. package/registry/agents/subagent-statistical-analyst.md +132 -0
  61. package/registry/agents/subagent-sysops-sre-lead.md +84 -0
  62. package/registry/agents/subagent-system-architect.md +122 -0
  63. package/registry/agents/subagent-ui-designer.md +149 -0
  64. package/registry/agents/subagent-ux-strategist.md +88 -0
  65. package/registry/bundles.json +1386 -0
  66. package/registry/rules/AGENTS.md +41 -0
  67. package/registry/rules/CLAUDE.md +12 -0
  68. package/registry/rules/CURSOR.md +12 -0
  69. package/registry/rules/GEMINI.md +41 -0
  70. package/registry/rules/clean-code-and-architecture.md +25 -0
  71. package/registry/rules/domain-modeling-and-adr.md +27 -0
  72. package/registry/rules/git-guardrails.md +19 -0
  73. package/registry/rules/multi-agent-coordination.md +33 -0
  74. package/registry/rules/quality-aesthetics-accessibility.md +29 -0
  75. package/registry/rules/skill-attribution.md +27 -0
  76. package/registry/rules/test-driven-development.md +41 -0
  77. package/registry/skills/ab-test-setup/SKILL.md +150 -0
  78. package/registry/skills/accessibility-audit/SKILL.md +150 -0
  79. package/registry/skills/ad-attribution-modeling/SKILL.md +206 -0
  80. package/registry/skills/ad-creative-design/SKILL.md +27 -0
  81. package/registry/skills/ai-prototype-refactoring/SKILL.md +29 -0
  82. package/registry/skills/architecture-design/SKILL.md +141 -0
  83. package/registry/skills/azure-infrastructure-bicep/SKILL.md +28 -0
  84. package/registry/skills/backend-api-design/SKILL.md +151 -0
  85. package/registry/skills/chaos-engineering/SKILL.md +41 -0
  86. package/registry/skills/churn-prevention-playbook/SKILL.md +181 -0
  87. package/registry/skills/ci-cd-pipeline-automation/SKILL.md +40 -0
  88. package/registry/skills/clickable-prototype-spec/SKILL.md +150 -0
  89. package/registry/skills/code-refactoring/SKILL.md +135 -0
  90. package/registry/skills/component-library-management/SKILL.md +150 -0
  91. package/registry/skills/component-playground-setup/SKILL.md +150 -0
  92. package/registry/skills/content-calendar-strategy/SKILL.md +150 -0
  93. package/registry/skills/conversion-funnel-optimization/SKILL.md +150 -0
  94. package/registry/skills/copywriting-frameworks/SKILL.md +150 -0
  95. package/registry/skills/database-design/SKILL.md +135 -0
  96. package/registry/skills/dependency-management/SKILL.md +142 -0
  97. package/registry/skills/design-handoff-spec/SKILL.md +150 -0
  98. package/registry/skills/design-ops-workflow/SKILL.md +150 -0
  99. package/registry/skills/design-system-governance/SKILL.md +150 -0
  100. package/registry/skills/design-system-tokens/SKILL.md +150 -0
  101. package/registry/skills/design-tokens-management/SKILL.md +150 -0
  102. package/registry/skills/design-version-control/SKILL.md +150 -0
  103. package/registry/skills/diagnosing-bugs/SKILL.md +45 -0
  104. package/registry/skills/docker-deployment/SKILL.md +144 -0
  105. package/registry/skills/domain-modeling/SKILL.md +52 -0
  106. package/registry/skills/email-drip-sequences/SKILL.md +181 -0
  107. package/registry/skills/email-marketing-automation/SKILL.md +150 -0
  108. package/registry/skills/finishing-a-development-branch/SKILL.md +132 -0
  109. package/registry/skills/frontend-component-design/SKILL.md +153 -0
  110. package/registry/skills/git-guardrails/SKILL.md +41 -0
  111. package/registry/skills/google-ads-optimization/SKILL.md +27 -0
  112. package/registry/skills/graphql-schema-design/SKILL.md +146 -0
  113. package/registry/skills/grill-me/SKILL.md +57 -0
  114. package/registry/skills/grill-with-docs/SKILL.md +84 -0
  115. package/registry/skills/growth-experiment-design/SKILL.md +150 -0
  116. package/registry/skills/handoff/SKILL.md +44 -0
  117. package/registry/skills/hf-model-evaluation/SKILL.md +84 -0
  118. package/registry/skills/interaction-pattern-library/SKILL.md +150 -0
  119. package/registry/skills/interactive-prototype-builder/SKILL.md +157 -0
  120. package/registry/skills/local-llm-inference/SKILL.md +77 -0
  121. package/registry/skills/maestro-mobile-testing/SKILL.md +40 -0
  122. package/registry/skills/marketing-creative-design/SKILL.md +186 -0
  123. package/registry/skills/mcp-setup/SKILL.md +370 -0
  124. package/registry/skills/meta-ad-creative-testing/SKILL.md +26 -0
  125. package/registry/skills/micro-interaction-design/SKILL.md +150 -0
  126. package/registry/skills/microservices-architecture/SKILL.md +141 -0
  127. package/registry/skills/mobile-android-design/SKILL.md +40 -0
  128. package/registry/skills/mobile-first-design/SKILL.md +150 -0
  129. package/registry/skills/mobile-ios-design/SKILL.md +40 -0
  130. package/registry/skills/mobile-platform-offline-validate/SKILL.md +41 -0
  131. package/registry/skills/modal-serverless-python/SKILL.md +81 -0
  132. package/registry/skills/onboarding-cro/SKILL.md +185 -0
  133. package/registry/skills/paid-acquisition-ppc/SKILL.md +171 -0
  134. package/registry/skills/performance-optimization/SKILL.md +141 -0
  135. package/registry/skills/playwright-best-practices/SKILL.md +39 -0
  136. package/registry/skills/product-launch-playbook/SKILL.md +150 -0
  137. package/registry/skills/programmatic-seo/SKILL.md +213 -0
  138. package/registry/skills/rag-vector-pipeline/SKILL.md +84 -0
  139. package/registry/skills/react-best-practices/SKILL.md +40 -0
  140. package/registry/skills/receiving-code-review/SKILL.md +130 -0
  141. package/registry/skills/replicate-model-inference/SKILL.md +76 -0
  142. package/registry/skills/requesting-code-review/SKILL.md +137 -0
  143. package/registry/skills/responsive-design-audit/SKILL.md +150 -0
  144. package/registry/skills/runpod-gpu-orchestration/SKILL.md +85 -0
  145. package/registry/skills/schema-markup-strategy/SKILL.md +194 -0
  146. package/registry/skills/security-audit/SKILL.md +139 -0
  147. package/registry/skills/seo-audit/SKILL.md +150 -0
  148. package/registry/skills/signup-flow-cro/SKILL.md +150 -0
  149. package/registry/skills/social-media-campaign/SKILL.md +150 -0
  150. package/registry/skills/state-driven-ui-animation/SKILL.md +150 -0
  151. package/registry/skills/subagent-driven-development/SKILL.md +135 -0
  152. package/registry/skills/supabase-backend-architecture/SKILL.md +28 -0
  153. package/registry/skills/systematic-debugging/SKILL.md +138 -0
  154. package/registry/skills/technical-documentation/SKILL.md +136 -0
  155. package/registry/skills/technical-seo-audit/SKILL.md +27 -0
  156. package/registry/skills/telemetry-monitoring/SKILL.md +40 -0
  157. package/registry/skills/test-driven-development/SKILL.md +135 -0
  158. package/registry/skills/to-spec/SKILL.md +48 -0
  159. package/registry/skills/to-tickets/SKILL.md +47 -0
  160. package/registry/skills/turso-distributed-sqlite/SKILL.md +27 -0
  161. package/registry/skills/ui-component-spec/SKILL.md +150 -0
  162. package/registry/skills/usability-testing-protocol/SKILL.md +150 -0
  163. package/registry/skills/user-flow-mapping/SKILL.md +150 -0
  164. package/registry/skills/user-journey-mapping/SKILL.md +150 -0
  165. package/registry/skills/vector-database-design/SKILL.md +84 -0
  166. package/registry/skills/vercel-deploy-best-practices/SKILL.md +28 -0
  167. package/registry/skills/viral-referral-loops/SKILL.md +209 -0
  168. package/registry/workflows/workflow-agency-ad-creative-sprint.md +50 -0
  169. package/registry/workflows/workflow-agency-brand-design-system.md +50 -0
  170. package/registry/workflows/workflow-agency-client-pitch-proposal.md +50 -0
  171. package/registry/workflows/workflow-agency-cro-funnel-teardown.md +50 -0
  172. package/registry/workflows/workflow-agency-full-campaign.md +58 -0
  173. package/registry/workflows/workflow-agency-seo-content-engine.md +50 -0
  174. package/registry/workflows/workflow-analyze.md +60 -0
  175. package/registry/workflows/workflow-api-contract-design.md +48 -0
  176. package/registry/workflows/workflow-app-store-release.md +48 -0
  177. package/registry/workflows/workflow-brainstorm.md +60 -0
  178. package/registry/workflows/workflow-build.md +60 -0
  179. package/registry/workflows/workflow-business-panel.md +60 -0
  180. package/registry/workflows/workflow-cleanup.md +60 -0
  181. package/registry/workflows/workflow-deploy-staging.md +49 -0
  182. package/registry/workflows/workflow-design-code.md +60 -0
  183. package/registry/workflows/workflow-design-ops--handoff.md +60 -0
  184. package/registry/workflows/workflow-design-ops--plan-sprint.md +60 -0
  185. package/registry/workflows/workflow-design-ops--setup-workflow.md +60 -0
  186. package/registry/workflows/workflow-design-orchestrate.md +60 -0
  187. package/registry/workflows/workflow-design-systems--audit-system.md +60 -0
  188. package/registry/workflows/workflow-design-systems--create-component.md +60 -0
  189. package/registry/workflows/workflow-design-systems--tokenize.md +60 -0
  190. package/registry/workflows/workflow-diagnose.md +45 -0
  191. package/registry/workflows/workflow-e2e-testing.md +49 -0
  192. package/registry/workflows/workflow-email-drip-sequence.md +65 -0
  193. package/registry/workflows/workflow-estimate.md +60 -0
  194. package/registry/workflows/workflow-explain.md +60 -0
  195. package/registry/workflows/workflow-frontend-audit.md +49 -0
  196. package/registry/workflows/workflow-git.md +60 -0
  197. package/registry/workflows/workflow-grill.md +51 -0
  198. package/registry/workflows/workflow-implement.md +61 -0
  199. package/registry/workflows/workflow-incident-triage.md +49 -0
  200. package/registry/workflows/workflow-interaction-design--design-interaction.md +60 -0
  201. package/registry/workflows/workflow-interaction-design--error-flow.md +60 -0
  202. package/registry/workflows/workflow-interaction-design--map-states.md +60 -0
  203. package/registry/workflows/workflow-marketing-audit.md +60 -0
  204. package/registry/workflows/workflow-marketing-campaign-builder.md +60 -0
  205. package/registry/workflows/workflow-marketing-content-pipeline.md +60 -0
  206. package/registry/workflows/workflow-marketing-growth-experiment.md +60 -0
  207. package/registry/workflows/workflow-marketing-launch.md +60 -0
  208. package/registry/workflows/workflow-marketing-panel.md +60 -0
  209. package/registry/workflows/workflow-ml-eval.md +51 -0
  210. package/registry/workflows/workflow-mobile-build.md +49 -0
  211. package/registry/workflows/workflow-onboarding-funnel-cro.md +65 -0
  212. package/registry/workflows/workflow-paid-acquisition-campaign.md +65 -0
  213. package/registry/workflows/workflow-paid-campaign-launch.md +47 -0
  214. package/registry/workflows/workflow-plan.md +60 -0
  215. package/registry/workflows/workflow-prototyping-testing--evaluate.md +60 -0
  216. package/registry/workflows/workflow-prototyping-testing--experiment.md +60 -0
  217. package/registry/workflows/workflow-prototyping-testing--prototype-plan.md +60 -0
  218. package/registry/workflows/workflow-prototyping-testing--test-plan.md +60 -0
  219. package/registry/workflows/workflow-rag-pipeline-deploy.md +53 -0
  220. package/registry/workflows/workflow-recommend.md +60 -0
  221. package/registry/workflows/workflow-research.md +60 -0
  222. package/registry/workflows/workflow-review.md +60 -0
  223. package/registry/workflows/workflow-seo-audit-pipeline.md +47 -0
  224. package/registry/workflows/workflow-seo-content-pipeline.md +65 -0
  225. package/registry/workflows/workflow-serverless-gpu-deploy.md +52 -0
  226. package/registry/workflows/workflow-spec-panel.md +60 -0
  227. package/registry/workflows/workflow-spec.md +44 -0
  228. package/registry/workflows/workflow-test.md +60 -0
  229. package/registry/workflows/workflow-troubleshoot.md +60 -0
  230. package/registry/workflows/workflow-ui-design--color-palette.md +60 -0
  231. package/registry/workflows/workflow-ui-design--design-screen.md +60 -0
  232. package/registry/workflows/workflow-ui-design--responsive-audit.md +60 -0
  233. package/registry/workflows/workflow-ui-design--type-system.md +60 -0
  234. package/registry/workflows/workflow-ux-strategy--benchmark.md +60 -0
  235. package/registry/workflows/workflow-ux-strategy--frame-problem.md +60 -0
  236. package/registry/workflows/workflow-ux-strategy--strategize.md +60 -0
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: churn-prevention-playbook
3
+ description: Production-grade Churn Prevention Playbook for customer health
4
+ scoring, early warning detection, automated retention workflows, and exit
5
+ survey salvage offers.
6
+ metadata:
7
+ author: agents-united
8
+ version: 2.0.0
9
+ icon: 🛡️
10
+ disable-slash-command: true
11
+ ---
12
+
13
+ # Customer Churn Prevention Playbook & Retention Automation
14
+
15
+ ## Overview & Purpose
16
+ The Churn Prevention Playbook provides an enterprise framework for detecting at-risk customer accounts, executing automated retention interventions, and mitigating voluntary and involuntary subscription churn in SaaS businesses.
17
+
18
+ Following this skill models multi-factor customer health scores (login frequency, feature depth, support ticket sentiment, billing status), orchestrates proactive automated interventions, structures cancellation exit flows with tailored salvage offers, and automates smart dunning for failed recurring payments.
19
+
20
+ ## Execution Triggers & Prerequisites
21
+ ### Execution Triggers
22
+ - Monthly customer or revenue churn rate exceeding target threshold (> 2.0% monthly MRR churn).
23
+ - Customer health score declining into the "At Risk" tier (< 50/100).
24
+ - User initiating subscription cancellation flow in billing settings.
25
+ - Payment gateway returning invoice charge failures (`invoice.payment_failed`).
26
+
27
+ ### Prerequisites
28
+ - Billing gateway integration (Stripe, Chargebee, Paddle).
29
+ - User product analytics tracking login timestamps and key feature usage events.
30
+ - In-app notification and email outreach communication channels.
31
+ - Clean git working directory.
32
+
33
+ ## Input & Output Requirements
34
+ ### Inputs
35
+ | Parameter | Type | Required | Description |
36
+ |---|---|---|---|
37
+ | `health_score_weights` | Object | Yes | Weights for usage, logins, tickets, seat utilization |
38
+ | `at_risk_threshold` | Number | Optional | Score cutoff for at-risk classification (default: 50) |
39
+ | `salvage_discount_rules`| Array<Object> | Yes | Exit flow offer policies (e.g. 50% off 2 months, pause plan) |
40
+ | `dunning_retry_schedule`| Array<Number> | Optional | Retry delays in days: `[1, 3, 5, 7]` |
41
+ | `cancellation_reasons` | Array<String> | Yes | Categorized exit survey reasons |
42
+
43
+ ### Outputs
44
+ | Artifact | Path / Format | Description |
45
+ |---|---|---|
46
+ | Retention Strategy Spec | `docs/churn-prevention-playbook/retention-spec.md` | Health scoring models, salvage offers, dunning rules |
47
+ | Health Score Engine | `src/services/retention/HealthScoreCalculator.ts` | Multi-factor health score calculation algorithm |
48
+ | Stripe Webhook Handler | `src/api/webhooks/stripe-retention-handler.ts` | Dunning and cancellation event processor |
49
+ | Cohort Churn Report | `reports/churn-prevention-playbook/churn-analysis.json` | Gross vs Net MRR churn and salvage conversion rate |
50
+
51
+ ## Step-by-Step Execution Runbook
52
+
53
+ ### Phase 1: Customer Health Score Algorithm & Early Warning Telemetry
54
+ 1. Formulate composite Customer Health Score formula ($0 - 100$):
55
+ $$\text{Health Score} = 0.35 \times \text{Usage Velocity} + 0.25 \times \text{Login Frequency} + 0.20 \times \text{Seat Utilization} + 0.20 \times \text{Support Sentiment}$$
56
+ 2. Classify customer accounts into 3 tiers:
57
+ - Green (Healthy): Score 75 - 100 (prime candidates for expansion/upsell).
58
+ - Yellow (Neutral / Stagnant): Score 50 - 74 (needs proactive engagement).
59
+ - Red (At-Risk): Score < 50 (immediate retention trigger).
60
+ 3. Schedule daily cron job calculating health score across all active accounts.
61
+
62
+ ### Phase 2: Proactive Automated Intervention & Re-Engagement Triggers
63
+ 1. Trigger automated re-engagement playbook when an account drops into Red (< 50):
64
+ - Trigger 1: Send personalized "How can we help?" email from Customer Success Lead.
65
+ - Trigger 2: Display in-app banner offering 1-on-1 workflow optimization call.
66
+ - Trigger 3: Alert dedicated account executive in Slack/CRM if account ARR > $5,000.
67
+ 2. Provide curated feature recommendation guides matching the account's unutilized modules.
68
+
69
+ ### Phase 3: Cancellation Exit Flow & Salvage Offer Deflection Architecture
70
+ 1. Design multi-step cancellation flow in account billing settings:
71
+ - Step 1: Categorized exit survey (Cost, Missing Feature, Buggy/Hard to Use, Not Using Enough, Switching).
72
+ - Step 2: Dynamic salvage deflection offer matched to selected reason:
73
+ - Reason "Too Expensive" -> Offer 50% discount for next 3 billing cycles.
74
+ - Reason "Not using enough right now" -> Offer 1-click 60-day Subscription Pause.
75
+ - Reason "Missing Feature" -> Connect directly to Product Roadmap & Beta access.
76
+ - Step 3: Final confirmation with loss aversion reminder (e.g. "You will lose access to 14 active agent workflows").
77
+
78
+ ### Phase 4: Involuntary Churn & Smart Dunning Payment Retry Engine
79
+ 1. Listen for Stripe `invoice.payment_failed` webhook events.
80
+ 2. Trigger automated dunning sequence:
81
+ - Day 0: Soft decline email prompting credit card update + in-app billing grace period banner.
82
+ - Day 3: Smart retry attempt 1 via payment gateway.
83
+ - Day 5: Urgent payment failed notice + SMS / push notification.
84
+ - Day 7: Final retry attempt before account downgrade to free tier.
85
+ 3. Keep user workspace read-only during 14-day grace period to prevent data loss and encourage reactivation.
86
+
87
+ ### Phase 5: Post-Churn Exit Survey Analysis & Win-Back Cadence
88
+ 1. Log all completed cancellations with full survey metadata into analytics warehouse.
89
+ 2. Enroll cancelled accounts into automated 60-day win-back nurture sequence:
90
+ - Day 30: Product update newsletter featuring major newly shipped features.
91
+ - Day 60: Exclusive reactivation incentive offer ($100 credit on restart).
92
+ 3. Generate monthly churn cohort report at `reports/churn-prevention-playbook/churn-analysis.json`.
93
+ 4. Commit churn prevention engine to repository.
94
+ ```bash
95
+ git add src/services/retention/ docs/churn-prevention-playbook/
96
+ git commit -m "feat(churn-prevention-playbook): implement customer health score and retention automation"
97
+ ```
98
+
99
+ ## Code & Configuration Exemplars
100
+
101
+ ### Exemplar 1: TypeScript Customer Health Score & Risk Classifier
102
+ ```typescript
103
+ export interface AccountTelemetry {
104
+ accountId: string;
105
+ daysSinceLastLogin: number;
106
+ monthlyWorkflowRuns: number;
107
+ seatsUsed: number;
108
+ seatsPurchased: number;
109
+ openNegativeTickets: number;
110
+ }
111
+
112
+ export function calculateCustomerHealthScore(telemetry: AccountTelemetry): { score: number; tier: 'green' | 'yellow' | 'red' } {
113
+ // Login factor (0-100)
114
+ const loginScore = Math.max(0, 100 - (telemetry.daysSinceLastLogin * 10));
115
+ // Usage factor (0-100)
116
+ const usageScore = Math.min(100, telemetry.monthlyWorkflowRuns * 5);
117
+ // Seat utilization factor (0-100)
118
+ const seatScore = telemetry.seatsPurchased > 0 ? (telemetry.seatsUsed / telemetry.seatsPurchased) * 100 : 50;
119
+ // Support sentiment penalty
120
+ const supportPenalty = telemetry.openNegativeTickets * 20;
121
+
122
+ const rawScore = (0.35 * usageScore) + (0.25 * loginScore) + (0.20 * seatScore) + 20 - supportPenalty;
123
+ const score = Math.max(0, Math.min(100, Math.round(rawScore)));
124
+
125
+ let tier: 'green' | 'yellow' | 'red' = 'green';
126
+ if (score < 50) tier = 'red';
127
+ else if (score < 75) tier = 'yellow';
128
+
129
+ return { score, tier };
130
+ }
131
+ ```
132
+
133
+ ### Exemplar 2: Stripe Billing Webhook & Dunning Handler
134
+ ```typescript
135
+ export interface StripeInvoiceEvent {
136
+ id: string;
137
+ customer: string;
138
+ attempt_count: number;
139
+ amount_due: number;
140
+ }
141
+
142
+ export async function handleInvoicePaymentFailed(event: StripeInvoiceEvent): Promise<string> {
143
+ const { customer, attempt_count, amount_due } = event;
144
+ console.log(`[Dunning] Payment failed for customer ${customer}, attempt #${attempt_count}, amount: $${amount_due / 100}`);
145
+
146
+ if (attempt_count === 1) {
147
+ // Dispatch immediate soft dunning notification
148
+ return 'dunning_soft_notification_sent';
149
+ } else if (attempt_count >= 4) {
150
+ // Final failure: transition account to grace period / read-only
151
+ return 'account_restricted_grace_period';
152
+ }
153
+ return 'retry_scheduled';
154
+ }
155
+ ```
156
+
157
+ ## Edge Cases & Error Recovery Procedures
158
+
159
+ ### Scenario A: Repeated Dunning Retries Triggering Customer Bank Card Blocks
160
+ 1. **Diagnosis**: Firing payment retries too rapidly (e.g. multiple times in 24 hours) triggers bank fraud flags.
161
+ 2. **Recovery Protocol**:
162
+ - Step 1: Enforce exponential backoff retry schedule (Days 1, 3, 5, 8).
163
+ - Step 2: Check card decline codes (`insufficient_funds` vs `stolen_card` vs `expired_card`); do not retry stolen cards.
164
+ - Step 3: Prompt user for alternative payment method (PayPal, secondary card, ACH).
165
+
166
+ ### Scenario B: Cancellation Deflection Discount Exploited by Active Customers
167
+ 1. **Diagnosis**: Paying customers discover that visiting cancellation page awards automatic 50% discount.
168
+ 2. **Recovery Protocol**:
169
+ - Step 1: Limit discount salvage offers to accounts that have never received a discount in the prior 12 months.
170
+ - Step 2: Require a minimum 3-month account age before discount offers are unlocked in the cancellation modal.
171
+ - Step 3: Implement admin logging and threshold alerts if salvage claim rate exceeds 15% of cancellation attempts.
172
+
173
+ ## Verification & Validation Checklist
174
+ - [ ] Frontmatter conforms strictly to `author: "agents-united"` and `version: "2.0.0"`.
175
+ - [ ] All 7 mandatory sections present with explicit headers.
176
+ - [ ] Step-by-Step Execution Runbook body contains >= 50 lines.
177
+ - [ ] Customer Health Score formula and Red/Yellow/Green tier cutoffs defined.
178
+ - [ ] Exit flow salvage deflection logic and smart dunning retry engine detailed.
179
+ - [ ] Code exemplars provided with valid syntax fencing.
180
+ - [ ] Zero dummy placeholder strings or unpopulated template markers present.
181
+ - [ ] Project build, test suite, and doctor check pass 100% cleanly.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: ci-cd-pipeline-automation
3
+ description: Automates CI/CD delivery pipelines, GitHub Actions workflows,
4
+ container builds, and staging preview deployments.
5
+ metadata:
6
+ author: Agents United Core Team
7
+ version: 1.0.0
8
+ source: https://github.com/NeoAnthropocene/agents-united
9
+ icon: 🚀
10
+ disable-slash-command: true
11
+ ---
12
+
13
+ # CI/CD Pipeline Automation Playbook
14
+
15
+ ## Overview & Purpose
16
+ `ci-cd-pipeline-automation` guides AI agents in crafting, optimizing, and maintaining Continuous Integration and Continuous Delivery (CI/CD) pipelines across GitHub Actions, GitLab CI, and Docker container workflows.
17
+
18
+ ## Rules & Constraints
19
+ 1. **Never hardcode secrets** in workflow files; always use secrets management (`${{ secrets.GITHUB_TOKEN }}`).
20
+ 2. **Always pin container base images** to specific tags or SHA hashes rather than `latest`.
21
+ 3. **Use dependency caching** (`actions/setup-node` cache, Docker layer caching) to optimize build times.
22
+ 4. **Implement automated status checks** as pull request merge gates.
23
+
24
+ ## Step-by-Step Execution Runbook
25
+
26
+ ### Phase 1 — Workflow Scaffolding
27
+ - Create `.github/workflows/ci.yml` for pull request linting, testing, and building.
28
+ - Set up multi-runner job matrices for parallel execution.
29
+
30
+ ### Phase 2 — Container Build Optimization
31
+ - Create multi-stage `Dockerfile` to separate build dependencies from minimal runtime images.
32
+ - Validate build cache arguments.
33
+
34
+ ### Phase 3 — Staging & Release Verification
35
+ - Configure deployment steps with rollback handling on non-zero exit codes.
36
+
37
+ ## Verification Checklist
38
+ - [ ] Workflow YAML validated for correct syntax.
39
+ - [ ] Secrets appropriately referenced.
40
+ - [ ] Build & test status gates configured.
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: clickable-prototype-spec
3
+ description: Production-grade Clickable Prototype Spec playbook for design
4
+ operations, UX systems, and growth strategy.
5
+ metadata:
6
+ author: agents-united
7
+ version: 2.0.0
8
+ icon: 🖱️
9
+ disable-slash-command: true
10
+ ---
11
+
12
+ # Clickable Prototype Spec
13
+
14
+ ## Overview & Purpose
15
+ The Clickable Prototype Spec skill provides a deterministic framework for executing clickable prototype spec processes in modern software products.
16
+
17
+ Following this skill ensures high usability, visual consistency, rapid iteration, and complete cross-functional team alignment.
18
+
19
+ ## Execution Triggers & Prerequisites
20
+ ### Execution Triggers
21
+ - Direct request to execute Clickable Prototype Spec tasks.
22
+ - Auditing existing product assets or workflows.
23
+ - Standardizing clickable-prototype-spec procedures across team projects.
24
+ - Preparing design handoffs or growth campaign launches.
25
+
26
+ ### Prerequisites
27
+ - Project workspace configured with design system tokens or component libraries.
28
+ - Target UI design specification or growth experiment hypothesis.
29
+ - Testing and linting tools operational.
30
+ - Clean git working directory.
31
+
32
+ ## Input & Output Requirements
33
+ ### Inputs
34
+ | Parameter | Type | Required | Description |
35
+ |---|---|---|---|
36
+ | `target_scope` | String | Yes | Target UI component, page, or campaign scope |
37
+ | `config` | Object | Optional | Specific parameters and threshold configurations |
38
+ | `output_dir` | Directory Path | Optional | Destination directory for generated artifacts |
39
+ | `strict_mode` | Boolean | Optional | Enforce strict zero-warning validation |
40
+
41
+ ### Outputs
42
+ | Artifact | Path / Format | Description |
43
+ |---|---|---|
44
+ | Specification Document | `docs/clickable-prototype-spec/spec.md` | Full specification and guidelines document |
45
+ | Component / Asset Files | `src/clickable-prototype-spec/*` | Implemented design tokens, components, or campaign assets |
46
+ | Audit Report | `reports/clickable-prototype-spec/summary.json` | Health check and audit metric results |
47
+
48
+ ## Step-by-Step Execution Runbook
49
+
50
+ ### Phase 1: Pre-Execution Discovery & Workspace Analysis
51
+ 1. Inspect workspace repository to locate relevant UI components, tokens, or campaign assets.
52
+ ```bash
53
+ find src/ docs/ -maxdepth 3 -type f
54
+ ```
55
+ 2. Analyze domain requirements and classify core UI elements, interaction flows, or growth metrics.
56
+ 3. Establish baseline quality metrics and target benchmarks.
57
+ 4. Verify working tree status to ensure clean git workspace.
58
+ ```bash
59
+ git status --short
60
+ ```
61
+ 5. Formulate initial execution plan.
62
+
63
+ ### Phase 2: Input Contract Validation & Strategy Selection
64
+ 1. Validate input parameters against technical feasibility and design system guidelines.
65
+ 2. Select implementation pattern matching component or campaign architecture.
66
+ 3. Establish verification rules and accessibility / conversion thresholds.
67
+ 4. Formulate atomic step-by-step execution sequence.
68
+ 5. Create temporary working directory if needed.
69
+
70
+ ### Phase 3: Core Step-by-Step Implementation Execution
71
+ 1. Author primary specification document at `docs/clickable-prototype-spec/spec.md`.
72
+ 2. Generate code, token, or layout implementation files.
73
+ ```bash
74
+ npm run typecheck
75
+ ```
76
+ 3. Apply automated formatting and linting tools.
77
+ 4. Execute unit or visual regression tests.
78
+ ```bash
79
+ npm test
80
+ ```
81
+ 5. Refactor asset structure for optimal performance and maintainability.
82
+
83
+ ### Phase 4: Verification, Testing & Quality Gate Checking
84
+ 1. Run full project verification suite.
85
+ ```bash
86
+ npm run typecheck && npm test && npm run build
87
+ ```
88
+ 2. Verify zero lint errors, type warnings, or broken references.
89
+ 3. Execute CLI health doctor check.
90
+ ```bash
91
+ node dist/cli.js doctor
92
+ ```
93
+ 4. Assert all acceptance criteria are satisfied.
94
+
95
+ ### Phase 5: Post-Execution Cleanup & Artifact Generation
96
+ 1. Generate execution summary report at `reports/clickable-prototype-spec/summary.md`.
97
+ 2. Clean up temporary build artifacts and scratch files.
98
+ 3. Commit generated files to git repository.
99
+ ```bash
100
+ git add docs/clickable-prototype-spec/ reports/clickable-prototype-spec/
101
+ git commit -m "feat(clickable-prototype-spec): implement Clickable Prototype Spec playbook artifacts"
102
+ ```
103
+ 4. Publish documentation for team review.
104
+
105
+ ## Code & Configuration Exemplars
106
+
107
+ ### Exemplar 1: Clickable Prototype Spec Configuration Specification
108
+ ```yaml
109
+ version: "2.0.0"
110
+ metadata:
111
+ skill: "clickable-prototype-spec"
112
+ author: "agents-united"
113
+ rules:
114
+ strictValidation: true
115
+ reporting:
116
+ format: "json"
117
+ output: "reports/clickable-prototype-spec/summary.json"
118
+ ```
119
+
120
+ ### Exemplar 2: Clickable Prototype Spec Helper Module
121
+ ```typescript
122
+ export function runClickablePrototypeSpec(scope: string): boolean {
123
+ console.log('Running Clickable Prototype Spec on:', scope);
124
+ return true;
125
+ }
126
+ ```
127
+
128
+ ## Edge Cases & Error Recovery Procedures
129
+
130
+ ### Scenario A: Validation Failure in Clickable Prototype Spec
131
+ 1. **Diagnosis**: Specification or code asset fails validation rules in clickable-prototype-spec.
132
+ 2. **Recovery Protocol**:
133
+ - Step 1: Inspect error log at reports directory.
134
+ - Step 2: Correct non-compliant syntax or structure.
135
+ - Step 3: Re-run verification pipeline.
136
+
137
+ ### Scenario B: Missing Resource for Clickable Prototype Spec
138
+ 1. **Diagnosis**: Target design token or configuration asset missing from workspace.
139
+ 2. **Recovery Protocol**:
140
+ - Step 1: Generate baseline resource file from standard template.
141
+ - Step 2: Update configuration references.
142
+ - Step 3: Resume runbook execution.
143
+
144
+ ## Verification & Validation Checklist
145
+ - [ ] Frontmatter conforms strictly to `author: "agents-united"` and `version: "2.0.0"`.
146
+ - [ ] All 7 mandatory sections present with explicit headers.
147
+ - [ ] Step-by-Step Execution Runbook body contains >= 50 lines.
148
+ - [ ] Code exemplars provided with valid syntax fencing.
149
+ - [ ] Zero dummy placeholder strings or unpopulated template markers present.
150
+ - [ ] Project build, test suite, and doctor check pass 100% cleanly.
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: code-refactoring
3
+ description: Production-grade Code Refactoring playbook for safely modernizing
4
+ legacy codebases with zero regressions.
5
+ metadata:
6
+ author: agents-united
7
+ version: 2.0.0
8
+ icon: ♻️
9
+ disable-slash-command: true
10
+ ---
11
+
12
+ # Systematic Code Refactoring & Tech Debt Remediation
13
+
14
+ ## Overview & Purpose
15
+ The Systematic Code Refactoring & Tech Debt Remediation skill provides a deterministic, battle-tested framework for executing code-refactoring processes across the Agents United multi-agent ecosystem.
16
+
17
+ Following this skill ensures high quality, zero-regression execution, rigorous testing gates, and seamless cross-functional team alignment.
18
+
19
+ ## Execution Triggers & Prerequisites
20
+ ### Execution Triggers
21
+ - Direct request or workflow step invoking code-refactoring.
22
+ - Auditing, implementing, or standardizing code-refactoring procedures.
23
+ - Addressing technical debt, architectural reviews, or production readiness gates.
24
+ - Preparing pull requests or automated release validations.
25
+
26
+ ### Prerequisites
27
+ - Active project repository workspace with version control configured.
28
+ - Operational testing, typechecking, and build toolchains.
29
+ - Domain requirements, architectural constraints, or user stories defined.
30
+ - Clean git working tree before beginning execution.
31
+
32
+ ## Input & Output Requirements
33
+ ### Inputs
34
+ | Parameter | Type | Required | Description |
35
+ |---|---|---|---|
36
+ | `target_scope` | String | Yes | Target module, service, component, or file path |
37
+ | `config` | Object | Optional | Specific domain configurations, thresholds, and options |
38
+ | `output_dir` | Directory Path | Optional | Destination directory for generated artifacts and reports |
39
+ | `strict_mode` | Boolean | Optional | Enforce strict zero-warning validation and high test coverage |
40
+
41
+ ### Outputs
42
+ | Artifact | Path / Format | Description |
43
+ |---|---|---|
44
+ | Specification Document | `docs/code-refactoring/spec.md` | Full technical specification and architectural plan |
45
+ | Implementation Files | `src/code-refactoring/*` | Production-ready source code, tests, and configurations |
46
+ | Execution Report | `reports/code-refactoring/summary.json` | Verification metrics, test results, and audit summary |
47
+
48
+ ## Step-by-Step Execution Runbook
49
+
50
+ ### Phase 1: Code Smell Detection & Dependency Mapping
51
+ 1. Identify refactoring targets using static analysis: Cyclomatic complexity > 15, file length > 500 lines.
52
+ 2. Classify code smells: God objects, shotgun surgery, deep nesting, duplicate logic, primitive obsession.
53
+ 3. Map caller graph and downstream consumer dependencies using AST analysis / grep.
54
+ 4. Verify existing automated test suite coverage on the target module before touching code.
55
+ 5. If coverage is < 80%, author characterization tests to capture current behavior first.
56
+
57
+ ### Phase 2: Refactoring Strategy & Safety Boundary Formulation
58
+ 1. Select appropriate Martin Fowler refactoring patterns: Extract Method, Replace Conditional with Polymorphism, Introduce Parameter Object.
59
+ 2. Establish the Strangler Fig pattern for large-scale module replacements.
60
+ 3. Define clear interface boundaries to encapsulate internal structural changes.
61
+ 4. Ensure all operations maintain immutability and eliminate global mutable state.
62
+ 5. Create dedicated refactoring branch in git.
63
+
64
+ ### Phase 3: Incremental Micro-Refactoring Execution
65
+ 1. Perform micro-transformations in tiny, atomic commits (one refactoring step per commit).
66
+ 2. Extract nested helper functions and replace magic strings/numbers with typed enums/constants.
67
+ 3. Migrate imperative loops to declarative, strongly-typed pipeline operations.
68
+ 4. Inject dependencies explicitly to eliminate hidden hardcoded singleton coupling.
69
+ 5. Run unit test suite immediately after each micro-refactor.
70
+
71
+ ### Phase 4: Regression Testing & Performance Benchmark Validation
72
+ 1. Run complete test suite (npm test) and typechecker (npm run typecheck).
73
+ 2. Run regression benchmark to verify memory allocation and CPU cycles have not degraded.
74
+ 3. Perform static linting to ensure no dead code or unreferenced imports remain.
75
+ 4. Inspect git diff to confirm only structural refactorings occurred with zero accidental logic shifts.
76
+ 5. Verify 100% test pass rate.
77
+
78
+ ### Phase 5: Code Review & Documentation Sync
79
+ 1. Document architectural improvements in pull request summary.
80
+ 2. Update internal JSDoc comments and module architecture diagrams.
81
+ 3. Squash intermediate commits into logical, readable conventional commits.
82
+ 4. Merge refactored branch to main.
83
+ 5. Monitor application telemetry for regression anomalies.
84
+
85
+ ## Code & Configuration Exemplars
86
+
87
+ ### Exemplar 1: Systematic Code Refactoring & Tech Debt Remediation Configuration & Specification
88
+ ```yaml
89
+ // Before: Nested callback anti-pattern with mutation
90
+ // After: Pure pipeline with immutable transformations
91
+ export function processTransactions(txs: readonly Transaction[]): TransactionReport {
92
+ return txs
93
+ .filter(isValidTransaction)
94
+ .map(normalizeCurrency)
95
+ .reduce(aggregateTotals, initialReport);
96
+ }
97
+ ```
98
+
99
+ ### Exemplar 2: Systematic Code Refactoring & Tech Debt Remediation TypeScript Type Contract
100
+ ```typescript
101
+ export interface RefactorPlan {
102
+ targetModule: string;
103
+ codeSmell: 'long-method' | 'god-class' | 'feature-envy' | 'duplicate-logic' | 'primitive-obsession';
104
+ testCoverageBefore: number;
105
+ safetyChecklist: {
106
+ unitTestsPassing: boolean;
107
+ typesEnforced: boolean;
108
+ behaviorPreserved: boolean;
109
+ };
110
+ }
111
+ ```
112
+
113
+ ## Edge Cases & Error Recovery Procedures
114
+
115
+ ### Scenario A: Validation Failure in Systematic Code Refactoring & Tech Debt Remediation
116
+ 1. **Diagnosis**: Static analysis, typechecking, or unit tests fail validation rules during execution.
117
+ 2. **Recovery Protocol**:
118
+ - Step 1: Inspect detailed error log output in test/build terminal.
119
+ - Step 2: Formulate targeted hypothesis and isolate failing line or assertion.
120
+ - Step 3: Implement surgical code fix and re-run verification suite.
121
+
122
+ ### Scenario B: Missing or Incompatible Dependency
123
+ 1. **Diagnosis**: Required toolchain binary or library dependency is missing from the environment.
124
+ 2. **Recovery Protocol**:
125
+ - Step 1: Verify `package.json` engine requirements and local environment versions.
126
+ - Step 2: Install required peer dependencies cleanly with lockfile sync.
127
+ - Step 3: Resume runbook from Phase 1.
128
+
129
+ ## Verification & Validation Checklist
130
+ - [ ] Frontmatter conforms strictly to `author: "agents-united"` and `version: "2.0.0"`.
131
+ - [ ] All 7 mandatory sections present with explicit headers.
132
+ - [ ] Step-by-Step Execution Runbook body contains >= 50 lines.
133
+ - [ ] Code exemplars provided with valid syntax fencing.
134
+ - [ ] Zero dummy placeholder strings or unpopulated template markers present.
135
+ - [ ] Project build, test suite, and doctor check pass 100% cleanly.
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: component-library-management
3
+ description: Production-grade Component Library Management playbook for design
4
+ operations, UX systems, and growth strategy.
5
+ metadata:
6
+ author: agents-united
7
+ version: 2.0.0
8
+ icon: 📚
9
+ disable-slash-command: true
10
+ ---
11
+
12
+ # Component Library Management
13
+
14
+ ## Overview & Purpose
15
+ The Component Library Management skill provides a deterministic framework for executing component library management processes in modern software products.
16
+
17
+ Following this skill ensures high usability, visual consistency, rapid iteration, and complete cross-functional team alignment.
18
+
19
+ ## Execution Triggers & Prerequisites
20
+ ### Execution Triggers
21
+ - Direct request to execute Component Library Management tasks.
22
+ - Auditing existing product assets or workflows.
23
+ - Standardizing component-library-management procedures across team projects.
24
+ - Preparing design handoffs or growth campaign launches.
25
+
26
+ ### Prerequisites
27
+ - Project workspace configured with design system tokens or component libraries.
28
+ - Target UI design specification or growth experiment hypothesis.
29
+ - Testing and linting tools operational.
30
+ - Clean git working directory.
31
+
32
+ ## Input & Output Requirements
33
+ ### Inputs
34
+ | Parameter | Type | Required | Description |
35
+ |---|---|---|---|
36
+ | `target_scope` | String | Yes | Target UI component, page, or campaign scope |
37
+ | `config` | Object | Optional | Specific parameters and threshold configurations |
38
+ | `output_dir` | Directory Path | Optional | Destination directory for generated artifacts |
39
+ | `strict_mode` | Boolean | Optional | Enforce strict zero-warning validation |
40
+
41
+ ### Outputs
42
+ | Artifact | Path / Format | Description |
43
+ |---|---|---|
44
+ | Specification Document | `docs/component-library-management/spec.md` | Full specification and guidelines document |
45
+ | Component / Asset Files | `src/component-library-management/*` | Implemented design tokens, components, or campaign assets |
46
+ | Audit Report | `reports/component-library-management/summary.json` | Health check and audit metric results |
47
+
48
+ ## Step-by-Step Execution Runbook
49
+
50
+ ### Phase 1: Pre-Execution Discovery & Workspace Analysis
51
+ 1. Inspect workspace repository to locate relevant UI components, tokens, or campaign assets.
52
+ ```bash
53
+ find src/ docs/ -maxdepth 3 -type f
54
+ ```
55
+ 2. Analyze domain requirements and classify core UI elements, interaction flows, or growth metrics.
56
+ 3. Establish baseline quality metrics and target benchmarks.
57
+ 4. Verify working tree status to ensure clean git workspace.
58
+ ```bash
59
+ git status --short
60
+ ```
61
+ 5. Formulate initial execution plan.
62
+
63
+ ### Phase 2: Input Contract Validation & Strategy Selection
64
+ 1. Validate input parameters against technical feasibility and design system guidelines.
65
+ 2. Select implementation pattern matching component or campaign architecture.
66
+ 3. Establish verification rules and accessibility / conversion thresholds.
67
+ 4. Formulate atomic step-by-step execution sequence.
68
+ 5. Create temporary working directory if needed.
69
+
70
+ ### Phase 3: Core Step-by-Step Implementation Execution
71
+ 1. Author primary specification document at `docs/component-library-management/spec.md`.
72
+ 2. Generate code, token, or layout implementation files.
73
+ ```bash
74
+ npm run typecheck
75
+ ```
76
+ 3. Apply automated formatting and linting tools.
77
+ 4. Execute unit or visual regression tests.
78
+ ```bash
79
+ npm test
80
+ ```
81
+ 5. Refactor asset structure for optimal performance and maintainability.
82
+
83
+ ### Phase 4: Verification, Testing & Quality Gate Checking
84
+ 1. Run full project verification suite.
85
+ ```bash
86
+ npm run typecheck && npm test && npm run build
87
+ ```
88
+ 2. Verify zero lint errors, type warnings, or broken references.
89
+ 3. Execute CLI health doctor check.
90
+ ```bash
91
+ node dist/cli.js doctor
92
+ ```
93
+ 4. Assert all acceptance criteria are satisfied.
94
+
95
+ ### Phase 5: Post-Execution Cleanup & Artifact Generation
96
+ 1. Generate execution summary report at `reports/component-library-management/summary.md`.
97
+ 2. Clean up temporary build artifacts and scratch files.
98
+ 3. Commit generated files to git repository.
99
+ ```bash
100
+ git add docs/component-library-management/ reports/component-library-management/
101
+ git commit -m "feat(component-library-management): implement Component Library Management playbook artifacts"
102
+ ```
103
+ 4. Publish documentation for team review.
104
+
105
+ ## Code & Configuration Exemplars
106
+
107
+ ### Exemplar 1: Component Library Management Configuration Specification
108
+ ```yaml
109
+ version: "2.0.0"
110
+ metadata:
111
+ skill: "component-library-management"
112
+ author: "agents-united"
113
+ rules:
114
+ strictValidation: true
115
+ reporting:
116
+ format: "json"
117
+ output: "reports/component-library-management/summary.json"
118
+ ```
119
+
120
+ ### Exemplar 2: Component Library Management Helper Module
121
+ ```typescript
122
+ export function runComponentLibraryManagement(scope: string): boolean {
123
+ console.log('Running Component Library Management on:', scope);
124
+ return true;
125
+ }
126
+ ```
127
+
128
+ ## Edge Cases & Error Recovery Procedures
129
+
130
+ ### Scenario A: Validation Failure in Component Library Management
131
+ 1. **Diagnosis**: Specification or code asset fails validation rules in component-library-management.
132
+ 2. **Recovery Protocol**:
133
+ - Step 1: Inspect error log at reports directory.
134
+ - Step 2: Correct non-compliant syntax or structure.
135
+ - Step 3: Re-run verification pipeline.
136
+
137
+ ### Scenario B: Missing Resource for Component Library Management
138
+ 1. **Diagnosis**: Target design token or configuration asset missing from workspace.
139
+ 2. **Recovery Protocol**:
140
+ - Step 1: Generate baseline resource file from standard template.
141
+ - Step 2: Update configuration references.
142
+ - Step 3: Resume runbook execution.
143
+
144
+ ## Verification & Validation Checklist
145
+ - [ ] Frontmatter conforms strictly to `author: "agents-united"` and `version: "2.0.0"`.
146
+ - [ ] All 7 mandatory sections present with explicit headers.
147
+ - [ ] Step-by-Step Execution Runbook body contains >= 50 lines.
148
+ - [ ] Code exemplars provided with valid syntax fencing.
149
+ - [ ] Zero dummy placeholder strings or unpopulated template markers present.
150
+ - [ ] Project build, test suite, and doctor check pass 100% cleanly.