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.
- package/LICENSE +21 -0
- package/README.md +673 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +4789 -0
- package/dist/cli.js.map +1 -0
- package/package.json +77 -0
- package/registry/agents/orchestrator-business.md +188 -0
- package/registry/agents/orchestrator-design.md +168 -0
- package/registry/agents/orchestrator-engineering.md +183 -0
- package/registry/agents/orchestrator-marketing.md +228 -0
- package/registry/agents/orchestrator-research.md +196 -0
- package/registry/agents/orchestrator-security.md +190 -0
- package/registry/agents/orchestrator-system-architecture.md +171 -0
- package/registry/agents/orchestrator-universal.md +168 -0
- package/registry/agents/subagent-accessibility-lead.md +47 -0
- package/registry/agents/subagent-ai-model-architect.md +97 -0
- package/registry/agents/subagent-android-architect.md +47 -0
- package/registry/agents/subagent-appsec-penetration-tester.md +189 -0
- package/registry/agents/subagent-backend-architect.md +360 -0
- package/registry/agents/subagent-business-panel-experts.md +126 -0
- package/registry/agents/subagent-cloud-infrastructure-architect.md +126 -0
- package/registry/agents/subagent-cloud-security-architect.md +221 -0
- package/registry/agents/subagent-code-reviewer.md +193 -0
- package/registry/agents/subagent-compliance-grc-specialist.md +147 -0
- package/registry/agents/subagent-cross-platform-specialist.md +47 -0
- package/registry/agents/subagent-data-engineer.md +46 -0
- package/registry/agents/subagent-database-administrator.md +141 -0
- package/registry/agents/subagent-deep-research.md +94 -0
- package/registry/agents/subagent-design-ops-lead.md +121 -0
- package/registry/agents/subagent-design-researcher.md +133 -0
- package/registry/agents/subagent-design-systems-architect.md +134 -0
- package/registry/agents/subagent-designer-toolkit-expert.md +363 -0
- package/registry/agents/subagent-devops-engineer.md +423 -0
- package/registry/agents/subagent-distributed-systems-architect.md +47 -0
- package/registry/agents/subagent-e2e-tester.md +60 -0
- package/registry/agents/subagent-financial-analyst.md +119 -0
- package/registry/agents/subagent-finops-cost-engineer.md +98 -0
- package/registry/agents/subagent-frontend-architect.md +368 -0
- package/registry/agents/subagent-interaction-designer.md +302 -0
- package/registry/agents/subagent-ios-architect.md +46 -0
- package/registry/agents/subagent-legal-contract-analyst.md +108 -0
- package/registry/agents/subagent-lifecycle-email-specialist.md +46 -0
- package/registry/agents/subagent-literature-patent-analyst.md +78 -0
- package/registry/agents/subagent-market-intelligence-analyst.md +110 -0
- package/registry/agents/subagent-marketing-campaign-specialist.md +80 -0
- package/registry/agents/subagent-marketing-content-strategist.md +184 -0
- package/registry/agents/subagent-marketing-conversion-specialist.md +79 -0
- package/registry/agents/subagent-marketing-creative-designer.md +93 -0
- package/registry/agents/subagent-marketing-growth-strategist.md +137 -0
- package/registry/agents/subagent-ml-platform-engineer.md +95 -0
- package/registry/agents/subagent-operations-strategist.md +85 -0
- package/registry/agents/subagent-paid-acquisition-specialist.md +47 -0
- package/registry/agents/subagent-plg-strategist.md +46 -0
- package/registry/agents/subagent-prototype-tester.md +140 -0
- package/registry/agents/subagent-qa-automation-lead.md +63 -0
- package/registry/agents/subagent-repo-index.md +180 -0
- package/registry/agents/subagent-security-engineer.md +134 -0
- package/registry/agents/subagent-seo-specialist.md +46 -0
- package/registry/agents/subagent-socratic-mentor.md +105 -0
- package/registry/agents/subagent-statistical-analyst.md +132 -0
- package/registry/agents/subagent-sysops-sre-lead.md +84 -0
- package/registry/agents/subagent-system-architect.md +122 -0
- package/registry/agents/subagent-ui-designer.md +149 -0
- package/registry/agents/subagent-ux-strategist.md +88 -0
- package/registry/bundles.json +1386 -0
- package/registry/rules/AGENTS.md +41 -0
- package/registry/rules/CLAUDE.md +12 -0
- package/registry/rules/CURSOR.md +12 -0
- package/registry/rules/GEMINI.md +41 -0
- package/registry/rules/clean-code-and-architecture.md +25 -0
- package/registry/rules/domain-modeling-and-adr.md +27 -0
- package/registry/rules/git-guardrails.md +19 -0
- package/registry/rules/multi-agent-coordination.md +33 -0
- package/registry/rules/quality-aesthetics-accessibility.md +29 -0
- package/registry/rules/skill-attribution.md +27 -0
- package/registry/rules/test-driven-development.md +41 -0
- package/registry/skills/ab-test-setup/SKILL.md +150 -0
- package/registry/skills/accessibility-audit/SKILL.md +150 -0
- package/registry/skills/ad-attribution-modeling/SKILL.md +206 -0
- package/registry/skills/ad-creative-design/SKILL.md +27 -0
- package/registry/skills/ai-prototype-refactoring/SKILL.md +29 -0
- package/registry/skills/architecture-design/SKILL.md +141 -0
- package/registry/skills/azure-infrastructure-bicep/SKILL.md +28 -0
- package/registry/skills/backend-api-design/SKILL.md +151 -0
- package/registry/skills/chaos-engineering/SKILL.md +41 -0
- package/registry/skills/churn-prevention-playbook/SKILL.md +181 -0
- package/registry/skills/ci-cd-pipeline-automation/SKILL.md +40 -0
- package/registry/skills/clickable-prototype-spec/SKILL.md +150 -0
- package/registry/skills/code-refactoring/SKILL.md +135 -0
- package/registry/skills/component-library-management/SKILL.md +150 -0
- package/registry/skills/component-playground-setup/SKILL.md +150 -0
- package/registry/skills/content-calendar-strategy/SKILL.md +150 -0
- package/registry/skills/conversion-funnel-optimization/SKILL.md +150 -0
- package/registry/skills/copywriting-frameworks/SKILL.md +150 -0
- package/registry/skills/database-design/SKILL.md +135 -0
- package/registry/skills/dependency-management/SKILL.md +142 -0
- package/registry/skills/design-handoff-spec/SKILL.md +150 -0
- package/registry/skills/design-ops-workflow/SKILL.md +150 -0
- package/registry/skills/design-system-governance/SKILL.md +150 -0
- package/registry/skills/design-system-tokens/SKILL.md +150 -0
- package/registry/skills/design-tokens-management/SKILL.md +150 -0
- package/registry/skills/design-version-control/SKILL.md +150 -0
- package/registry/skills/diagnosing-bugs/SKILL.md +45 -0
- package/registry/skills/docker-deployment/SKILL.md +144 -0
- package/registry/skills/domain-modeling/SKILL.md +52 -0
- package/registry/skills/email-drip-sequences/SKILL.md +181 -0
- package/registry/skills/email-marketing-automation/SKILL.md +150 -0
- package/registry/skills/finishing-a-development-branch/SKILL.md +132 -0
- package/registry/skills/frontend-component-design/SKILL.md +153 -0
- package/registry/skills/git-guardrails/SKILL.md +41 -0
- package/registry/skills/google-ads-optimization/SKILL.md +27 -0
- package/registry/skills/graphql-schema-design/SKILL.md +146 -0
- package/registry/skills/grill-me/SKILL.md +57 -0
- package/registry/skills/grill-with-docs/SKILL.md +84 -0
- package/registry/skills/growth-experiment-design/SKILL.md +150 -0
- package/registry/skills/handoff/SKILL.md +44 -0
- package/registry/skills/hf-model-evaluation/SKILL.md +84 -0
- package/registry/skills/interaction-pattern-library/SKILL.md +150 -0
- package/registry/skills/interactive-prototype-builder/SKILL.md +157 -0
- package/registry/skills/local-llm-inference/SKILL.md +77 -0
- package/registry/skills/maestro-mobile-testing/SKILL.md +40 -0
- package/registry/skills/marketing-creative-design/SKILL.md +186 -0
- package/registry/skills/mcp-setup/SKILL.md +370 -0
- package/registry/skills/meta-ad-creative-testing/SKILL.md +26 -0
- package/registry/skills/micro-interaction-design/SKILL.md +150 -0
- package/registry/skills/microservices-architecture/SKILL.md +141 -0
- package/registry/skills/mobile-android-design/SKILL.md +40 -0
- package/registry/skills/mobile-first-design/SKILL.md +150 -0
- package/registry/skills/mobile-ios-design/SKILL.md +40 -0
- package/registry/skills/mobile-platform-offline-validate/SKILL.md +41 -0
- package/registry/skills/modal-serverless-python/SKILL.md +81 -0
- package/registry/skills/onboarding-cro/SKILL.md +185 -0
- package/registry/skills/paid-acquisition-ppc/SKILL.md +171 -0
- package/registry/skills/performance-optimization/SKILL.md +141 -0
- package/registry/skills/playwright-best-practices/SKILL.md +39 -0
- package/registry/skills/product-launch-playbook/SKILL.md +150 -0
- package/registry/skills/programmatic-seo/SKILL.md +213 -0
- package/registry/skills/rag-vector-pipeline/SKILL.md +84 -0
- package/registry/skills/react-best-practices/SKILL.md +40 -0
- package/registry/skills/receiving-code-review/SKILL.md +130 -0
- package/registry/skills/replicate-model-inference/SKILL.md +76 -0
- package/registry/skills/requesting-code-review/SKILL.md +137 -0
- package/registry/skills/responsive-design-audit/SKILL.md +150 -0
- package/registry/skills/runpod-gpu-orchestration/SKILL.md +85 -0
- package/registry/skills/schema-markup-strategy/SKILL.md +194 -0
- package/registry/skills/security-audit/SKILL.md +139 -0
- package/registry/skills/seo-audit/SKILL.md +150 -0
- package/registry/skills/signup-flow-cro/SKILL.md +150 -0
- package/registry/skills/social-media-campaign/SKILL.md +150 -0
- package/registry/skills/state-driven-ui-animation/SKILL.md +150 -0
- package/registry/skills/subagent-driven-development/SKILL.md +135 -0
- package/registry/skills/supabase-backend-architecture/SKILL.md +28 -0
- package/registry/skills/systematic-debugging/SKILL.md +138 -0
- package/registry/skills/technical-documentation/SKILL.md +136 -0
- package/registry/skills/technical-seo-audit/SKILL.md +27 -0
- package/registry/skills/telemetry-monitoring/SKILL.md +40 -0
- package/registry/skills/test-driven-development/SKILL.md +135 -0
- package/registry/skills/to-spec/SKILL.md +48 -0
- package/registry/skills/to-tickets/SKILL.md +47 -0
- package/registry/skills/turso-distributed-sqlite/SKILL.md +27 -0
- package/registry/skills/ui-component-spec/SKILL.md +150 -0
- package/registry/skills/usability-testing-protocol/SKILL.md +150 -0
- package/registry/skills/user-flow-mapping/SKILL.md +150 -0
- package/registry/skills/user-journey-mapping/SKILL.md +150 -0
- package/registry/skills/vector-database-design/SKILL.md +84 -0
- package/registry/skills/vercel-deploy-best-practices/SKILL.md +28 -0
- package/registry/skills/viral-referral-loops/SKILL.md +209 -0
- package/registry/workflows/workflow-agency-ad-creative-sprint.md +50 -0
- package/registry/workflows/workflow-agency-brand-design-system.md +50 -0
- package/registry/workflows/workflow-agency-client-pitch-proposal.md +50 -0
- package/registry/workflows/workflow-agency-cro-funnel-teardown.md +50 -0
- package/registry/workflows/workflow-agency-full-campaign.md +58 -0
- package/registry/workflows/workflow-agency-seo-content-engine.md +50 -0
- package/registry/workflows/workflow-analyze.md +60 -0
- package/registry/workflows/workflow-api-contract-design.md +48 -0
- package/registry/workflows/workflow-app-store-release.md +48 -0
- package/registry/workflows/workflow-brainstorm.md +60 -0
- package/registry/workflows/workflow-build.md +60 -0
- package/registry/workflows/workflow-business-panel.md +60 -0
- package/registry/workflows/workflow-cleanup.md +60 -0
- package/registry/workflows/workflow-deploy-staging.md +49 -0
- package/registry/workflows/workflow-design-code.md +60 -0
- package/registry/workflows/workflow-design-ops--handoff.md +60 -0
- package/registry/workflows/workflow-design-ops--plan-sprint.md +60 -0
- package/registry/workflows/workflow-design-ops--setup-workflow.md +60 -0
- package/registry/workflows/workflow-design-orchestrate.md +60 -0
- package/registry/workflows/workflow-design-systems--audit-system.md +60 -0
- package/registry/workflows/workflow-design-systems--create-component.md +60 -0
- package/registry/workflows/workflow-design-systems--tokenize.md +60 -0
- package/registry/workflows/workflow-diagnose.md +45 -0
- package/registry/workflows/workflow-e2e-testing.md +49 -0
- package/registry/workflows/workflow-email-drip-sequence.md +65 -0
- package/registry/workflows/workflow-estimate.md +60 -0
- package/registry/workflows/workflow-explain.md +60 -0
- package/registry/workflows/workflow-frontend-audit.md +49 -0
- package/registry/workflows/workflow-git.md +60 -0
- package/registry/workflows/workflow-grill.md +51 -0
- package/registry/workflows/workflow-implement.md +61 -0
- package/registry/workflows/workflow-incident-triage.md +49 -0
- package/registry/workflows/workflow-interaction-design--design-interaction.md +60 -0
- package/registry/workflows/workflow-interaction-design--error-flow.md +60 -0
- package/registry/workflows/workflow-interaction-design--map-states.md +60 -0
- package/registry/workflows/workflow-marketing-audit.md +60 -0
- package/registry/workflows/workflow-marketing-campaign-builder.md +60 -0
- package/registry/workflows/workflow-marketing-content-pipeline.md +60 -0
- package/registry/workflows/workflow-marketing-growth-experiment.md +60 -0
- package/registry/workflows/workflow-marketing-launch.md +60 -0
- package/registry/workflows/workflow-marketing-panel.md +60 -0
- package/registry/workflows/workflow-ml-eval.md +51 -0
- package/registry/workflows/workflow-mobile-build.md +49 -0
- package/registry/workflows/workflow-onboarding-funnel-cro.md +65 -0
- package/registry/workflows/workflow-paid-acquisition-campaign.md +65 -0
- package/registry/workflows/workflow-paid-campaign-launch.md +47 -0
- package/registry/workflows/workflow-plan.md +60 -0
- package/registry/workflows/workflow-prototyping-testing--evaluate.md +60 -0
- package/registry/workflows/workflow-prototyping-testing--experiment.md +60 -0
- package/registry/workflows/workflow-prototyping-testing--prototype-plan.md +60 -0
- package/registry/workflows/workflow-prototyping-testing--test-plan.md +60 -0
- package/registry/workflows/workflow-rag-pipeline-deploy.md +53 -0
- package/registry/workflows/workflow-recommend.md +60 -0
- package/registry/workflows/workflow-research.md +60 -0
- package/registry/workflows/workflow-review.md +60 -0
- package/registry/workflows/workflow-seo-audit-pipeline.md +47 -0
- package/registry/workflows/workflow-seo-content-pipeline.md +65 -0
- package/registry/workflows/workflow-serverless-gpu-deploy.md +52 -0
- package/registry/workflows/workflow-spec-panel.md +60 -0
- package/registry/workflows/workflow-spec.md +44 -0
- package/registry/workflows/workflow-test.md +60 -0
- package/registry/workflows/workflow-troubleshoot.md +60 -0
- package/registry/workflows/workflow-ui-design--color-palette.md +60 -0
- package/registry/workflows/workflow-ui-design--design-screen.md +60 -0
- package/registry/workflows/workflow-ui-design--responsive-audit.md +60 -0
- package/registry/workflows/workflow-ui-design--type-system.md +60 -0
- package/registry/workflows/workflow-ux-strategy--benchmark.md +60 -0
- package/registry/workflows/workflow-ux-strategy--frame-problem.md +60 -0
- package/registry/workflows/workflow-ux-strategy--strategize.md +60 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: user-flow-mapping
|
|
3
|
+
description: Production-grade User Flow Mapping playbook for design operations,
|
|
4
|
+
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
|
+
# User Flow Mapping
|
|
13
|
+
|
|
14
|
+
## Overview & Purpose
|
|
15
|
+
The User Flow Mapping skill provides a deterministic framework for executing user flow mapping 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 User Flow Mapping tasks.
|
|
22
|
+
- Auditing existing product assets or workflows.
|
|
23
|
+
- Standardizing user-flow-mapping 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/user-flow-mapping/spec.md` | Full specification and guidelines document |
|
|
45
|
+
| Component / Asset Files | `src/user-flow-mapping/*` | Implemented design tokens, components, or campaign assets |
|
|
46
|
+
| Audit Report | `reports/user-flow-mapping/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/user-flow-mapping/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/user-flow-mapping/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/user-flow-mapping/ reports/user-flow-mapping/
|
|
101
|
+
git commit -m "feat(user-flow-mapping): implement User Flow Mapping playbook artifacts"
|
|
102
|
+
```
|
|
103
|
+
4. Publish documentation for team review.
|
|
104
|
+
|
|
105
|
+
## Code & Configuration Exemplars
|
|
106
|
+
|
|
107
|
+
### Exemplar 1: User Flow Mapping Configuration Specification
|
|
108
|
+
```yaml
|
|
109
|
+
version: "2.0.0"
|
|
110
|
+
metadata:
|
|
111
|
+
skill: "user-flow-mapping"
|
|
112
|
+
author: "agents-united"
|
|
113
|
+
rules:
|
|
114
|
+
strictValidation: true
|
|
115
|
+
reporting:
|
|
116
|
+
format: "json"
|
|
117
|
+
output: "reports/user-flow-mapping/summary.json"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Exemplar 2: User Flow Mapping Helper Module
|
|
121
|
+
```typescript
|
|
122
|
+
export function runUserFlowMapping(scope: string): boolean {
|
|
123
|
+
console.log('Running User Flow Mapping on:', scope);
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Edge Cases & Error Recovery Procedures
|
|
129
|
+
|
|
130
|
+
### Scenario A: Validation Failure in User Flow Mapping
|
|
131
|
+
1. **Diagnosis**: Specification or code asset fails validation rules in user-flow-mapping.
|
|
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 User Flow Mapping
|
|
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,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: user-journey-mapping
|
|
3
|
+
description: Production-grade User Journey Mapping 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
|
+
# User Journey Mapping
|
|
13
|
+
|
|
14
|
+
## Overview & Purpose
|
|
15
|
+
The User Journey Mapping skill provides a deterministic framework for executing user journey mapping 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 User Journey Mapping tasks.
|
|
22
|
+
- Auditing existing product assets or workflows.
|
|
23
|
+
- Standardizing user-journey-mapping 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/user-journey-mapping/spec.md` | Full specification and guidelines document |
|
|
45
|
+
| Component / Asset Files | `src/user-journey-mapping/*` | Implemented design tokens, components, or campaign assets |
|
|
46
|
+
| Audit Report | `reports/user-journey-mapping/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/user-journey-mapping/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/user-journey-mapping/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/user-journey-mapping/ reports/user-journey-mapping/
|
|
101
|
+
git commit -m "feat(user-journey-mapping): implement User Journey Mapping playbook artifacts"
|
|
102
|
+
```
|
|
103
|
+
4. Publish documentation for team review.
|
|
104
|
+
|
|
105
|
+
## Code & Configuration Exemplars
|
|
106
|
+
|
|
107
|
+
### Exemplar 1: User Journey Mapping Configuration Specification
|
|
108
|
+
```yaml
|
|
109
|
+
version: "2.0.0"
|
|
110
|
+
metadata:
|
|
111
|
+
skill: "user-journey-mapping"
|
|
112
|
+
author: "agents-united"
|
|
113
|
+
rules:
|
|
114
|
+
strictValidation: true
|
|
115
|
+
reporting:
|
|
116
|
+
format: "json"
|
|
117
|
+
output: "reports/user-journey-mapping/summary.json"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Exemplar 2: User Journey Mapping Helper Module
|
|
121
|
+
```typescript
|
|
122
|
+
export function runUserJourneyMapping(scope: string): boolean {
|
|
123
|
+
console.log('Running User Journey Mapping on:', scope);
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Edge Cases & Error Recovery Procedures
|
|
129
|
+
|
|
130
|
+
### Scenario A: Validation Failure in User Journey Mapping
|
|
131
|
+
1. **Diagnosis**: Specification or code asset fails validation rules in user-journey-mapping.
|
|
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 User Journey Mapping
|
|
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,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vector-database-design
|
|
3
|
+
description: Designing vector database schemas, HNSW index parameter tuning,
|
|
4
|
+
metadata filtering, and collection partitioning on Qdrant, Pinecone, and
|
|
5
|
+
Chroma.
|
|
6
|
+
metadata:
|
|
7
|
+
author: Qdrant & Pinecone Community / agents-united
|
|
8
|
+
version: 2.0.0
|
|
9
|
+
license: MIT
|
|
10
|
+
icon: 🎯
|
|
11
|
+
disable-slash-command: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Vector Database Design Playbook
|
|
15
|
+
|
|
16
|
+
## Overview & Purpose
|
|
17
|
+
`vector-database-design` outlines schema architectures, HNSW index parameter tuning, payload filtering optimization, and multi-tenant partitioning strategies across modern vector databases (Qdrant, Pinecone, Chroma).
|
|
18
|
+
|
|
19
|
+
## When to Trigger
|
|
20
|
+
Trigger this skill whenever:
|
|
21
|
+
- Designing new vector database collection schemas and dimensionality configurations.
|
|
22
|
+
- Tuning HNSW indexing parameters (`m`, `ef_construct`, `ef_search`) for speed vs. recall balance.
|
|
23
|
+
- Setting up payload metadata indexing for low-latency pre-filtering in multi-tenant environments.
|
|
24
|
+
- Partitioning collections across namespaces or tenant IDs to guarantee strict data isolation.
|
|
25
|
+
|
|
26
|
+
## Input & Output Requirements
|
|
27
|
+
- **Inputs**: Embedding dimension size (e.g. 1536, 768), expected vector count, distance metric (Cosine, Dot, Euclidean), and metadata filtering query requirements.
|
|
28
|
+
- **Outputs**: Collection creation scripts, payload index definitions, connection pool configurations, and query latency benchmarks.
|
|
29
|
+
|
|
30
|
+
## Step-by-Step Execution Runbook
|
|
31
|
+
|
|
32
|
+
### Phase 1 — Schema Architecture & Distance Metric Selection
|
|
33
|
+
- Align vector distance metric with the training objective of the embedding model (Cosine distance for normalized embeddings).
|
|
34
|
+
- Allocate vector dimensionality strictly matching embedding model output.
|
|
35
|
+
|
|
36
|
+
### Phase 2 — HNSW Parameter Tuning & Payload Indexing
|
|
37
|
+
- Configure HNSW graph parameters: set `m=16` (edges per node) and `ef_construct=128` for high build-time quality.
|
|
38
|
+
- Create payload indexes on categorical and filterable metadata fields (e.g. `tenant_id`, `created_at`, `category`).
|
|
39
|
+
|
|
40
|
+
### Phase 3 — Verification & Latency Benchmarking
|
|
41
|
+
- Measure vector ingestion throughput and run concurrent search queries.
|
|
42
|
+
- Verify that filtered searches achieve < 50ms p95 latency at 1M+ vectors scale.
|
|
43
|
+
|
|
44
|
+
## Edge Cases & Boundary Conditions
|
|
45
|
+
- **High-Dimensionality Memory Overhead**: Use scalar or product quantization (SQ/PQ) in Qdrant/Pinecone to reduce RAM footprint by up to 75% with < 2% recall loss.
|
|
46
|
+
- **Extreme Payload Imbalance**: Avoid indexing high-cardinality unique text strings in payload indexes.
|
|
47
|
+
- **Cross-Tenant Data Leakage**: Enforce tenant ID filters at the query level or use separate namespaces per customer.
|
|
48
|
+
|
|
49
|
+
## Error Recovery & Fallbacks
|
|
50
|
+
- If vector insertion fails due to timeout during large batch upserts, split payloads into smaller batches of 256-512 vectors.
|
|
51
|
+
- If search recall drops below 95%, increase `ef_search` from 64 to 128.
|
|
52
|
+
|
|
53
|
+
## Code Exemplars & Patterns
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from qdrant_client import QdrantClient
|
|
57
|
+
from qdrant_client.models import Distance, VectorParams, HnswConfigDiff, PayloadSchemaType
|
|
58
|
+
|
|
59
|
+
client = QdrantClient(url="http://localhost:6333")
|
|
60
|
+
|
|
61
|
+
# 1. Create collection with tuned HNSW parameters
|
|
62
|
+
client.create_collection(
|
|
63
|
+
collection_name="enterprise_docs",
|
|
64
|
+
vectors_config=VectorParams(size=1536, distance=Distance.COSINE),
|
|
65
|
+
hnsw_config=HnswConfigDiff(
|
|
66
|
+
m=16,
|
|
67
|
+
ef_construct=128,
|
|
68
|
+
full_scan_threshold=10000,
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# 2. Create payload indexes for fast pre-filtering
|
|
73
|
+
client.create_payload_index(
|
|
74
|
+
collection_name="enterprise_docs",
|
|
75
|
+
field_name="tenant_id",
|
|
76
|
+
field_schema=PayloadSchemaType.KEYWORD
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
client.create_payload_index(
|
|
80
|
+
collection_name="enterprise_docs",
|
|
81
|
+
field_name="created_at",
|
|
82
|
+
field_schema=PayloadSchemaType.INTEGER
|
|
83
|
+
)
|
|
84
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-deploy-best-practices
|
|
3
|
+
description: Next.js and frontend deployment optimization on Vercel, Edge
|
|
4
|
+
Middleware, Incremental Static Regeneration (ISR), Server Actions, and Preview
|
|
5
|
+
environments.
|
|
6
|
+
metadata:
|
|
7
|
+
author: Agents United Frontend Group
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
license: MIT
|
|
10
|
+
icon: ▲
|
|
11
|
+
disable-slash-command: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Vercel Deployment Best Practices Playbook
|
|
15
|
+
|
|
16
|
+
## Overview & Purpose
|
|
17
|
+
`vercel-deploy-best-practices` provides production deployment and configuration guidelines for Next.js, Remix, and static web applications hosted on Vercel.
|
|
18
|
+
|
|
19
|
+
## Core Directives & Standards
|
|
20
|
+
1. **Edge Middleware Routing** — Keep Edge Middleware execution < 25ms by avoiding heavy libraries or un-cached external network calls.
|
|
21
|
+
2. **Incremental Static Regeneration (ISR)** — Configure `revalidate` intervals or on-demand revalidation (`revalidatePath`, `revalidateTag`) for dynamic content caching.
|
|
22
|
+
3. **Environment Variable Hierarchy** — Separate `Development`, `Preview`, and `Production` environment variables securely with branch-specific overrides.
|
|
23
|
+
4. **Vercel Web Analytics & Speed Insights** — Integrate `@vercel/analytics` and `@vercel/speed-insights` for real-user Core Web Vitals monitoring.
|
|
24
|
+
5. **Serverless Function Concurrency** — Configure max duration limits and memory allocations in `vercel.json` to prevent billing surprises.
|
|
25
|
+
|
|
26
|
+
## Verification Checklist
|
|
27
|
+
- [ ] Preview deployments generate isolated database branch previews when paired with Neon/Supabase.
|
|
28
|
+
- [ ] Zero unhandled Server Action errors in production logs.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: viral-referral-loops
|
|
3
|
+
description: Production-grade Viral Referral Loops playbook for double-sided
|
|
4
|
+
incentive architectures, K-factor viral loop equations, in-app share
|
|
5
|
+
mechanics, and fraud-resistant referral engines.
|
|
6
|
+
metadata:
|
|
7
|
+
author: agents-united
|
|
8
|
+
version: 2.0.0
|
|
9
|
+
icon: 🔄
|
|
10
|
+
disable-slash-command: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Viral Referral Loops & Product-Led Organic Expansion Architecture
|
|
14
|
+
|
|
15
|
+
## Overview & Purpose
|
|
16
|
+
The Viral Referral Loops skill provides a comprehensive mathematical and product engineering framework for designing, implementing, and scaling high-velocity referral loops in product-led growth (PLG) SaaS platforms.
|
|
17
|
+
|
|
18
|
+
Following this skill designs double-sided reward incentives, contextual trigger timing (leveraging the peak-end rule and satisfaction milestones), seamless modal and clipboard share interactions, server-side fraud prevention mechanisms, and mathematical tracking of viral coefficient ($K$-factor) and cycle time ($c_t$).
|
|
19
|
+
|
|
20
|
+
## Execution Triggers & Prerequisites
|
|
21
|
+
### Execution Triggers
|
|
22
|
+
- Designing customer referral programs to lower blended Customer Acquisition Cost (CAC).
|
|
23
|
+
- Engineering viral product loops (collaboration invites, public share links, powered-by badges).
|
|
24
|
+
- Optimizing referral conversion rates from invitation sent to referee account activation.
|
|
25
|
+
- Implementing fraud detection rules for self-referrals and reward gaming.
|
|
26
|
+
|
|
27
|
+
### Prerequisites
|
|
28
|
+
- Product analytics tracking user engagement events and milestone completions.
|
|
29
|
+
- Relational database schema supporting referral links, attribution tokens, and ledger credits.
|
|
30
|
+
- Transactional email / notification service for sending referee invitation alerts.
|
|
31
|
+
- Clean git working directory.
|
|
32
|
+
|
|
33
|
+
## Input & Output Requirements
|
|
34
|
+
### Inputs
|
|
35
|
+
| Parameter | Type | Required | Description |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| `incentive_type` | String | Yes | `double_sided_credit`, `extended_trial`, `feature_unlock`, `revenue_share` |
|
|
38
|
+
| `referrer_reward` | Number | Yes | Value granted to existing user upon successful referee activation |
|
|
39
|
+
| `referee_reward` | Number | Yes | Value granted to invited user upon signup |
|
|
40
|
+
| `target_k_factor` | Number | Optional | Target viral coefficient (e.g. 0.35) |
|
|
41
|
+
| `qualification_criteria`| String | Yes | Milestone referee must hit before reward is unlocked (e.g. `first_project_run`) |
|
|
42
|
+
|
|
43
|
+
### Outputs
|
|
44
|
+
| Artifact | Path / Format | Description |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| Viral Loop Spec Spec | `docs/viral-referral-loops/referral-spec.md` | Formulas, user journey diagrams, reward tiers |
|
|
47
|
+
| Referral Modal Component | `src/components/referral/ReferralModal.tsx` | Share links, social intents, reward tracker |
|
|
48
|
+
| Referral Engine Service | `src/services/growth/referral-engine.ts` | Token generation, attribution, fraud validation |
|
|
49
|
+
| Viral Analytics Report | `reports/viral-referral-loops/k-factor-summary.json`| $K$-factor, cycle time, and invite conversion stats |
|
|
50
|
+
|
|
51
|
+
## Step-by-Step Execution Runbook
|
|
52
|
+
|
|
53
|
+
### Phase 1: Mathematical Modeling & Double-Sided Incentive Structuring
|
|
54
|
+
1. Formulate the Viral Coefficient equation:
|
|
55
|
+
$$K = i \times c$$
|
|
56
|
+
where $i$ is the average number of invitations sent per user, and $c$ is the conversion rate of each invitation into an active user.
|
|
57
|
+
2. Formulate the Viral Cycle Time ($c_t$) minimization target: reducing the time from user signup to sending invitations directly multiplies organic user growth rate.
|
|
58
|
+
3. Structure double-sided reward mechanics: align incentives so both parties win (e.g. "$25 in API credits for you, $25 for your friend upon their first build").
|
|
59
|
+
4. Establish reward qualification thresholds: require referees to achieve a meaningful product action before distributing credits to eliminate bot abuse.
|
|
60
|
+
|
|
61
|
+
### Phase 2: Contextual In-App Trigger Identification
|
|
62
|
+
1. Identify high-satisfaction moments in the product journey to present referral prompts:
|
|
63
|
+
- Immediately after completing a successful build or workflow run.
|
|
64
|
+
- Upon receiving a positive NPS/CSAT score (rating 9 or 10).
|
|
65
|
+
- After saving significant compute hours or achieving milestone productivity goals.
|
|
66
|
+
2. Avoid presenting referral modals during onboarding setup, high-friction configuration tasks, or error states.
|
|
67
|
+
|
|
68
|
+
### Phase 3: Frictionless Share Modal & One-Click Social Intent Implementation
|
|
69
|
+
1. Generate unique, short, human-readable referral codes and URLs (e.g. `https://agents-united.dev/join?ref=alex2026`).
|
|
70
|
+
2. Build responsive referral modal offering:
|
|
71
|
+
- 1-Click "Copy Link" button with instant visual tooltip confirmation.
|
|
72
|
+
- Pre-populated social share intents for Twitter/X, LinkedIn, and WhatsApp.
|
|
73
|
+
- Direct email invitation input box supporting comma-separated teammate invites.
|
|
74
|
+
3. Include real-time reward ledger showing "Pending", "Earned", and "Redeemed" reward statuses.
|
|
75
|
+
|
|
76
|
+
### Phase 4: Fraud Prevention, Attribution Cookies & Ledger Security
|
|
77
|
+
1. Set 30-day first-party referral tracking cookie on landing page visits from referral links.
|
|
78
|
+
2. Implement strict fraud defense guardrails:
|
|
79
|
+
- IP rate-limiting and device fingerprint hashing to detect self-referrals.
|
|
80
|
+
- Domain matching checks: disallow referring users within the same enterprise workspace domain if rewards are personal credits.
|
|
81
|
+
- Hold period: place rewards in pending state for 48 hours to prevent payment chargeback abuse.
|
|
82
|
+
3. Record all credit accruals and redemptions in an immutable ledger database table.
|
|
83
|
+
|
|
84
|
+
### Phase 5: K-Factor Analytics & Viral Funnel Optimization
|
|
85
|
+
1. Instrument telemetry events: `referral_modal_viewed`, `referral_link_copied`, `invite_sent`, `referee_landed`, `referee_activated`, `reward_unlocked`.
|
|
86
|
+
2. Calculate weekly cohort $K$-factor and channel conversion metrics.
|
|
87
|
+
3. Run A/B tests on share modal headlines, reward descriptions, and trigger placement timing.
|
|
88
|
+
4. Compile performance summary at `reports/viral-referral-loops/k-factor-summary.json`.
|
|
89
|
+
5. Commit referral loop components to repository.
|
|
90
|
+
```bash
|
|
91
|
+
git add src/components/referral/ src/services/growth/ docs/viral-referral-loops/
|
|
92
|
+
git commit -m "feat(viral-referral-loops): implement double-sided referral engine and fraud guardrails"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Code & Configuration Exemplars
|
|
96
|
+
|
|
97
|
+
### Exemplar 1: TypeScript Referral Token Generation & Attribution Service
|
|
98
|
+
```typescript
|
|
99
|
+
import crypto from 'node:crypto';
|
|
100
|
+
|
|
101
|
+
export interface ReferralAttribution {
|
|
102
|
+
referrerId: string;
|
|
103
|
+
refereeId: string;
|
|
104
|
+
referralCode: string;
|
|
105
|
+
status: 'pending' | 'qualified' | 'rewarded' | 'flagged';
|
|
106
|
+
createdAt: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function generateReferralCode(userId: string): string {
|
|
110
|
+
const hash = crypto.createHash('sha256').update(userId).digest('hex').slice(0, 8);
|
|
111
|
+
return `AU-${hash.toUpperCase()}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function validateReferralLegitimacy(referrerIp: string, refereeIp: string, referrerDomain: string, refereeEmail: string): boolean {
|
|
115
|
+
// Reject identical IP address self-referral attempts
|
|
116
|
+
if (referrerIp === refereeIp && process.env.NODE_ENV === 'production') {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
// Reject internal domain match if corporate domain
|
|
120
|
+
const refereeDomain = refereeEmail.split('@')[1]?.toLowerCase();
|
|
121
|
+
const genericDomains = ['gmail.com', 'yahoo.com', 'outlook.com', 'icloud.com'];
|
|
122
|
+
if (refereeDomain && !genericDomains.includes(refereeDomain) && refereeDomain === referrerDomain.toLowerCase()) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Exemplar 2: TypeScript React Referral Share Modal Component
|
|
130
|
+
```typescript
|
|
131
|
+
import React, { useState } from 'react';
|
|
132
|
+
|
|
133
|
+
export interface ReferralModalProps {
|
|
134
|
+
referralCode: string;
|
|
135
|
+
earnedCreditsUsd: number;
|
|
136
|
+
pendingCount: number;
|
|
137
|
+
isOpen: boolean;
|
|
138
|
+
onClose: () => void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function ReferralModal({ referralCode, earnedCreditsUsd, pendingCount, isOpen, onClose }: ReferralModalProps): React.JSX.Element | null {
|
|
142
|
+
const [copied, setCopied] = useState(false);
|
|
143
|
+
if (!isOpen) return null;
|
|
144
|
+
|
|
145
|
+
const shareUrl = `https://agents-united.dev/join?ref=${referralCode}`;
|
|
146
|
+
|
|
147
|
+
const handleCopy = () => {
|
|
148
|
+
navigator.clipboard.writeText(shareUrl);
|
|
149
|
+
setCopied(true);
|
|
150
|
+
setTimeout(() => setCopied(false), 2000);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">
|
|
155
|
+
<div className="bg-white rounded-2xl max-w-md w-full p-6 shadow-2xl">
|
|
156
|
+
<h2 className="text-xl font-bold text-gray-900 mb-2">Give $25, Get $25</h2>
|
|
157
|
+
<p className="text-sm text-gray-600 mb-6">
|
|
158
|
+
Invite teammates or friends. When they execute their first workflow, you both get $25 in compute credits.
|
|
159
|
+
</p>
|
|
160
|
+
<div className="flex items-center gap-2 bg-gray-100 p-2 rounded-lg mb-6">
|
|
161
|
+
<input type="text" readOnly value={shareUrl} className="bg-transparent text-sm w-full outline-none px-2 text-gray-700 font-mono" />
|
|
162
|
+
<button onClick={handleCopy} className="bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold px-4 py-2 rounded-md transition-colors">
|
|
163
|
+
{copied ? 'Copied!' : 'Copy'}
|
|
164
|
+
</button>
|
|
165
|
+
</div>
|
|
166
|
+
<div className="flex justify-between items-center bg-blue-50 p-4 rounded-xl mb-6">
|
|
167
|
+
<div>
|
|
168
|
+
<div className="text-xs text-blue-700 font-medium">Earned Credits</div>
|
|
169
|
+
<div className="text-xl font-bold text-blue-900">${earnedCreditsUsd}</div>
|
|
170
|
+
</div>
|
|
171
|
+
<div>
|
|
172
|
+
<div className="text-xs text-blue-700 font-medium">Pending Invites</div>
|
|
173
|
+
<div className="text-xl font-bold text-blue-900">{pendingCount}</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
<button onClick={onClose} className="w-full text-center text-sm font-medium text-gray-500 hover:text-gray-700 py-2">
|
|
177
|
+
Close
|
|
178
|
+
</button>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Edge Cases & Error Recovery Procedures
|
|
186
|
+
|
|
187
|
+
### Scenario A: Referral Link Clicked by Existing Active User
|
|
188
|
+
1. **Diagnosis**: An existing user clicks an invitation link expecting a bonus credit.
|
|
189
|
+
2. **Recovery Protocol**:
|
|
190
|
+
- Step 1: Detect that the user already has an active account upon landing on the auth page.
|
|
191
|
+
- Step 2: Display polite message explaining that referral credits apply exclusively to new accounts.
|
|
192
|
+
- Step 3: Redirect user to their own referral dashboard to invite others instead.
|
|
193
|
+
|
|
194
|
+
### Scenario B: Referral Attribution Cookie Blocked by Safari ITP or Brave
|
|
195
|
+
1. **Diagnosis**: Browser privacy features wipe 30-day tracking cookie before user finishes signup.
|
|
196
|
+
2. **Recovery Protocol**:
|
|
197
|
+
- Step 1: Provide fallback manual promo code entry box on final signup step.
|
|
198
|
+
- Step 2: Store referral attribution token in server-side session state alongside anonymous visitor ID.
|
|
199
|
+
- Step 3: Re-associate attribution upon signup completion via server-side session matching.
|
|
200
|
+
|
|
201
|
+
## Verification & Validation Checklist
|
|
202
|
+
- [ ] Frontmatter conforms strictly to `author: "agents-united"` and `version: "2.0.0"`.
|
|
203
|
+
- [ ] All 7 mandatory sections present with explicit headers.
|
|
204
|
+
- [ ] Step-by-Step Execution Runbook body contains >= 50 lines.
|
|
205
|
+
- [ ] Viral coefficient $K$-factor and cycle time equations documented.
|
|
206
|
+
- [ ] Fraud defense rules (IP checks, domain validation, hold period) detailed.
|
|
207
|
+
- [ ] Code exemplars provided with valid syntax fencing.
|
|
208
|
+
- [ ] Zero dummy placeholder strings or unpopulated template markers present.
|
|
209
|
+
- [ ] Project build, test suite, and doctor check pass 100% cleanly.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Agency Multi-Channel Ad Creative Sprint"
|
|
3
|
+
description: "Rapid multi-variant ad copywriting, banner layout generation, and A/B test matrix construction across Meta, Google, and LinkedIn."
|
|
4
|
+
bundle: "digital-agency"
|
|
5
|
+
estimatedDuration: "45-90m"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Workflow: Agency Multi-Channel Ad Creative Sprint
|
|
9
|
+
|
|
10
|
+
## Overview & Scope
|
|
11
|
+
Coordinates rapid ad creative authoring, visual layout composition, and copy variant generation across paid social and search channels.
|
|
12
|
+
|
|
13
|
+
## Execution Flowchart
|
|
14
|
+
```mermaid
|
|
15
|
+
graph TD
|
|
16
|
+
Start([Brief Intake]) --> P1[Phase 1: Angle & Hook Formulation]
|
|
17
|
+
P1 --> P2[Phase 2: Copywriting & Aspect Ratio Layouts]
|
|
18
|
+
P2 --> Gate1{"Visual Quality & Token Conformance?"}
|
|
19
|
+
Gate1 -->|Fail| P2
|
|
20
|
+
Gate1 -->|Pass| P3[Phase 3: Creative Matrix Review & Export]
|
|
21
|
+
P3 --> Done([Sprint Complete])
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Required Tool Inputs & Context
|
|
25
|
+
- Target ICP pain points & value propositions
|
|
26
|
+
- Aspect ratio specifications (1:1, 9:16, 16:9, 1.91:1)
|
|
27
|
+
- MCP Stitch / Figma integration or native image assets
|
|
28
|
+
|
|
29
|
+
## Phase 1: Context & Hooks
|
|
30
|
+
- Determine 3 core angles (Pain-led, Feature-led, Social Proof-led).
|
|
31
|
+
- Structure hook variations for each angle.
|
|
32
|
+
|
|
33
|
+
## Phase 2: Copy & Creative Generation
|
|
34
|
+
- Write primary text, headlines (under 40 chars), and CTA button copy.
|
|
35
|
+
- Generate asset layouts adhering to brand color tokens.
|
|
36
|
+
|
|
37
|
+
## Phase 3: Verification & Export
|
|
38
|
+
- Validate visual hierarchy, legibility on mobile, and ad network policy compliance.
|
|
39
|
+
- Export ready-to-launch creative matrix in markdown/JSON.
|
|
40
|
+
|
|
41
|
+
## Phase Transition Criteria & Deterministic Verification Gates
|
|
42
|
+
| Transition | Prerequisites | Verification Command / Gate | Success Criteria |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| Phase 1 -> Phase 2 | Angles formulated | `node dist/cli.js doctor` | Doctor health check succeeds with 0 errors |
|
|
45
|
+
| Phase 2 -> Phase 3 | Layouts generated | `npm test` | Format and dimension checks pass 100% |
|
|
46
|
+
| Phase 3 -> Completion | Final matrix reviewed | `npm run build` | All assets formatted and validated |
|
|
47
|
+
|
|
48
|
+
## Validation Checkpoints & Automated Rollback Protocols
|
|
49
|
+
- **Validation Checkpoint 1**: Ad copy conforms to advertising platform compliance guidelines.
|
|
50
|
+
- **Automated Rollback Protocol**: Re-generate copy variants if headline exceeds character constraints.
|