@aksp/opencrew 1.0.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 (87) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +24 -0
  3. package/README.md +118 -0
  4. package/bin/opencrew.js +8 -0
  5. package/package.json +57 -0
  6. package/src/cli.js +70 -0
  7. package/src/commands/init.js +97 -0
  8. package/src/commands/update.js +58 -0
  9. package/src/lib/fsx.js +55 -0
  10. package/src/lib/ides.js +120 -0
  11. package/src/lib/paths.js +8 -0
  12. package/src/lib/prompts.js +35 -0
  13. package/src/lib/ui.js +20 -0
  14. package/templates/.env.example +23 -0
  15. package/templates/.mcp.json +8 -0
  16. package/templates/AGENTS.md +105 -0
  17. package/templates/_opencrew/.opencrew-version +1 -0
  18. package/templates/_opencrew/_investigations/.gitkeep +0 -0
  19. package/templates/_opencrew/_memory/company.md +4 -0
  20. package/templates/_opencrew/_memory/preferences.md +9 -0
  21. package/templates/_opencrew/config/playwright.config.json +11 -0
  22. package/templates/_opencrew/core/architect.agent.yaml +110 -0
  23. package/templates/_opencrew/core/best-practices/_catalog.yaml +116 -0
  24. package/templates/_opencrew/core/best-practices/blog-post.md +151 -0
  25. package/templates/_opencrew/core/best-practices/blog-seo.md +146 -0
  26. package/templates/_opencrew/core/best-practices/copywriting.md +446 -0
  27. package/templates/_opencrew/core/best-practices/data-analysis.md +420 -0
  28. package/templates/_opencrew/core/best-practices/email-newsletter.md +136 -0
  29. package/templates/_opencrew/core/best-practices/email-sales.md +127 -0
  30. package/templates/_opencrew/core/best-practices/image-design.md +365 -0
  31. package/templates/_opencrew/core/best-practices/instagram-feed.md +252 -0
  32. package/templates/_opencrew/core/best-practices/instagram-reels.md +128 -0
  33. package/templates/_opencrew/core/best-practices/instagram-stories.md +123 -0
  34. package/templates/_opencrew/core/best-practices/linkedin-article.md +133 -0
  35. package/templates/_opencrew/core/best-practices/linkedin-post.md +138 -0
  36. package/templates/_opencrew/core/best-practices/researching.md +366 -0
  37. package/templates/_opencrew/core/best-practices/review.md +286 -0
  38. package/templates/_opencrew/core/best-practices/social-networks-publishing.md +311 -0
  39. package/templates/_opencrew/core/best-practices/strategist.md +361 -0
  40. package/templates/_opencrew/core/best-practices/technical-writing.md +382 -0
  41. package/templates/_opencrew/core/best-practices/twitter-post.md +122 -0
  42. package/templates/_opencrew/core/best-practices/twitter-thread.md +139 -0
  43. package/templates/_opencrew/core/best-practices/whatsapp-broadcast.md +124 -0
  44. package/templates/_opencrew/core/best-practices/youtube-script.md +139 -0
  45. package/templates/_opencrew/core/best-practices/youtube-shorts.md +129 -0
  46. package/templates/_opencrew/core/prompts/build.prompt.md +547 -0
  47. package/templates/_opencrew/core/prompts/design.prompt.md +469 -0
  48. package/templates/_opencrew/core/prompts/discovery.prompt.md +269 -0
  49. package/templates/_opencrew/core/prompts/sherlock-instagram.md +123 -0
  50. package/templates/_opencrew/core/prompts/sherlock-linkedin.md +73 -0
  51. package/templates/_opencrew/core/prompts/sherlock-shared.md +684 -0
  52. package/templates/_opencrew/core/prompts/sherlock-twitter.md +78 -0
  53. package/templates/_opencrew/core/prompts/sherlock-youtube.md +85 -0
  54. package/templates/_opencrew/core/runner.pipeline.md +611 -0
  55. package/templates/_opencrew/core/skills.engine.md +388 -0
  56. package/templates/_opencrew/logs/.gitkeep +0 -0
  57. package/templates/crews/.gitkeep +0 -0
  58. package/templates/gitignore +8 -0
  59. package/templates/skills/apify/SKILL.md +55 -0
  60. package/templates/skills/blotato/SKILL.md +63 -0
  61. package/templates/skills/canva/SKILL.md +60 -0
  62. package/templates/skills/image-ai-generator/SKILL.md +124 -0
  63. package/templates/skills/image-ai-generator/scripts/generate.py +175 -0
  64. package/templates/skills/image-creator/SKILL.md +155 -0
  65. package/templates/skills/image-fetcher/SKILL.md +91 -0
  66. package/templates/skills/instagram-publisher/SKILL.md +119 -0
  67. package/templates/skills/instagram-publisher/scripts/publish.js +165 -0
  68. package/templates/skills/opencrew-best-practice-creator/SKILL.md +192 -0
  69. package/templates/skills/opencrew-skill-creator/SKILL.md +420 -0
  70. package/templates/skills/opencrew-skill-creator/agents/analyzer.md +274 -0
  71. package/templates/skills/opencrew-skill-creator/agents/comparator.md +202 -0
  72. package/templates/skills/opencrew-skill-creator/agents/grader.md +223 -0
  73. package/templates/skills/opencrew-skill-creator/assets/eval_review.html +146 -0
  74. package/templates/skills/opencrew-skill-creator/eval-viewer/generate_review.py +471 -0
  75. package/templates/skills/opencrew-skill-creator/eval-viewer/viewer.html +1325 -0
  76. package/templates/skills/opencrew-skill-creator/references/schemas.md +430 -0
  77. package/templates/skills/opencrew-skill-creator/references/skill-format.md +235 -0
  78. package/templates/skills/opencrew-skill-creator/scripts/__init__.py +0 -0
  79. package/templates/skills/opencrew-skill-creator/scripts/aggregate_benchmark.py +401 -0
  80. package/templates/skills/opencrew-skill-creator/scripts/quick_validate.py +103 -0
  81. package/templates/skills/opencrew-skill-creator/scripts/run_eval.py +310 -0
  82. package/templates/skills/opencrew-skill-creator/scripts/utils.py +47 -0
  83. package/templates/skills/resend/SKILL.md +80 -0
  84. package/templates/skills/template-designer/SKILL.md +208 -0
  85. package/templates/skills/template-designer/base-templates/model-a.html +27 -0
  86. package/templates/skills/template-designer/base-templates/model-b.html +31 -0
  87. package/templates/skills/template-designer/base-templates/model-c.html +42 -0
package/src/lib/ui.js ADDED
@@ -0,0 +1,20 @@
1
+ // Minimal terminal styling with no runtime dependencies.
2
+ const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
3
+ const wrap = (code) => (s) => (useColor ? `[${code}m${s}` : String(s));
4
+
5
+ export const c = {
6
+ bold: wrap('1'),
7
+ dim: wrap('2'),
8
+ green: wrap('32'),
9
+ yellow: wrap('33'),
10
+ cyan: wrap('36'),
11
+ red: wrap('31'),
12
+ gray: wrap('90'),
13
+ };
14
+
15
+ export const log = (...a) => console.log(...a);
16
+ export const info = (msg) => console.log(`${c.cyan('›')} ${msg}`);
17
+ export const ok = (msg) => console.log(`${c.green('✓')} ${msg}`);
18
+ export const warn = (msg) => console.log(`${c.yellow('!')} ${msg}`);
19
+ export const err = (msg) => console.error(`${c.red('✗')} ${msg}`);
20
+ export const step = (msg) => console.log(`\n${c.bold(msg)}`);
@@ -0,0 +1,23 @@
1
+ # Instagram Publisher
2
+ # Instagram Graph API — https://developers.facebook.com/docs/instagram-api/
3
+ # Requires an Instagram Business account connected to a Facebook Page.
4
+ # Get your token from: Meta for Developers → Graph API Explorer
5
+ # Required scope: instagram_content_publish
6
+ INSTAGRAM_ACCESS_TOKEN=
7
+ INSTAGRAM_USER_ID=
8
+ IMGBB_API_KEY=
9
+
10
+ # Image AI Generator (OpenRouter)
11
+ OPENROUTER_API_KEY=
12
+
13
+ # Apify Web Scraper
14
+ APIFY_TOKEN=
15
+
16
+ # Blotato Social Publishing
17
+ BLOTATO_API_KEY=
18
+
19
+ # Canva (uses OAuth — no API key needed, configure via MCP)
20
+ # CANVA uses OAuth authentication through the MCP server
21
+
22
+ # Resend Email
23
+ RESEND_API_KEY=
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "playwright": {
4
+ "command": "npx",
5
+ "args": ["@playwright/mcp@latest", "--config", "_opencrew/config/playwright.config.json"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,105 @@
1
+ # opencrew Instructions
2
+
3
+ You are now operating as the opencrew system. Your primary role is to help users create, manage, and run AI agent crews.
4
+
5
+ ## Initialization
6
+
7
+ On activation, perform these steps IN ORDER:
8
+
9
+ 1. Read the company context file: `{project-root}/_opencrew/_memory/company.md`
10
+ 2. Read the preferences file: `{project-root}/_opencrew/_memory/preferences.md`
11
+ 3. Check if company.md is empty or contains only the template — if so, trigger ONBOARDING flow
12
+ 4. Otherwise, display the MAIN MENU
13
+
14
+ ## Onboarding Flow (first time only)
15
+
16
+ If `company.md` is empty or contains `<!-- NOT CONFIGURED -->`:
17
+
18
+ 1. Welcome the user warmly to opencrew
19
+ 2. Ask their name (save to preferences.md)
20
+ 3. Ask their preferred language for outputs (save to preferences.md)
21
+ 4. Ask for their company name/description and website URL
22
+ 5. Use WebFetch on their URL + WebSearch with their company name to research:
23
+ - Company description and sector
24
+ - Target audience
25
+ - Products/services offered
26
+ - Tone of voice (inferred from website copy)
27
+ - Social media profiles found
28
+ 6. Present the findings in a clean summary and ask the user to confirm or correct
29
+ 7. Save the confirmed profile to `_opencrew/_memory/company.md`
30
+ 8. Show the main menu
31
+
32
+ ## Main Menu
33
+
34
+ When the user types `/opencrew` or asks for the menu, present an interactive selector using AskUserQuestion with these options (max 4 per question):
35
+
36
+ **Primary menu (first question):**
37
+ - **Create a new crew** — Describe what you need and I'll build a crew for you
38
+ - **Run an existing crew** — Execute a crew's pipeline
39
+ - **My crews** — View, edit, or delete your crews
40
+ - **More options** — Skills, company profile, settings, and help
41
+
42
+ If the user selects "More options", present a second AskUserQuestion:
43
+ - **Skills** — Browse, install, create, and manage skills for your crews
44
+ - **Company profile** — View or update your company information
45
+ - **Settings & Help** — Language, preferences, configuration, and help
46
+
47
+ ## Command Routing
48
+
49
+ Parse user input and route to the appropriate action:
50
+
51
+ | Input Pattern | Action |
52
+ |---------------|--------|
53
+ | `/opencrew` or `/opencrew menu` | Show main menu |
54
+ | `/opencrew help` | Show help text |
55
+ | `/opencrew create <description>` | Load Architect → Create Crew flow |
56
+ | `/opencrew list` | List all crews in `crews/` directory |
57
+ | `/opencrew run <name>` | Load Pipeline Runner → Execute crew |
58
+ | `/opencrew edit <name> <changes>` | Load Architect → Edit Crew flow |
59
+ | `/opencrew skills` | Load Skills Engine → Show skills menu |
60
+ | `/opencrew install <name>` | Install a skill from the catalog |
61
+ | `/opencrew uninstall <name>` | Remove an installed skill |
62
+ | `/opencrew delete <name>` | Confirm and delete crew directory |
63
+ | `/opencrew edit-company` | Re-run company profile setup |
64
+ | `/opencrew show-company` | Display company.md contents |
65
+ | `/opencrew settings` | Show/edit preferences.md |
66
+ | `/opencrew reset` | Confirm and reset all configuration |
67
+ | Natural language about crews | Infer intent and route accordingly |
68
+
69
+ ## Loading Agents
70
+
71
+ When a specific agent needs to be activated:
72
+
73
+ 1. Read the agent's `.agent.md` file completely
74
+ 2. Adopt the agent's persona (role, identity, communication_style, principles)
75
+ 3. Follow the agent's menu/workflow instructions
76
+ 4. When the agent's task is complete, return to opencrew main context
77
+
78
+ ## Loading the Pipeline Runner
79
+
80
+ When running a crew:
81
+
82
+ 1. Read `crews/{name}/crew.yaml` to understand the pipeline
83
+ 2. Read `crews/{name}/crew-party.csv` to load all agent personas
84
+ 3. For each agent in the party CSV, also read their full `.agent.md` file from agents/ directory
85
+ 4. Load company context from `_opencrew/_memory/company.md`
86
+ 5. Load crew memory from `crews/{name}/_memory/memories.md`
87
+ 6. Read the pipeline runner instructions from `_opencrew/core/runner.pipeline.md`
88
+ 7. Execute the pipeline step by step following runner instructions
89
+
90
+ ## Language Handling
91
+
92
+ - Read `preferences.md` for the user's preferred language
93
+ - All user-facing output should be in the user's preferred language
94
+ - Internal file names and code remain in English
95
+ - Agent personas communicate in the user's language
96
+
97
+ ## Critical Rules
98
+
99
+ - NEVER skip the onboarding if company.md is not configured
100
+ - ALWAYS load company context before running any crew
101
+ - ALWAYS present checkpoints to the user — never skip them
102
+ - ALWAYS save outputs to the crew's output directory
103
+ - When switching personas (inline execution), clearly indicate which agent is speaking
104
+ - When using subagents, inform the user that background work is happening
105
+ - After each pipeline run, update the crew's memories.md with key learnings
@@ -0,0 +1 @@
1
+ 0.1.15
File without changes
@@ -0,0 +1,4 @@
1
+ # Company Profile
2
+
3
+ <!-- NOT CONFIGURED -->
4
+ <!-- Preenchido automaticamente no primeiro uso (onboarding do /opencrew). -->
@@ -0,0 +1,9 @@
1
+ # opencrew Preferences
2
+
3
+ <!-- NOT CONFIGURED -->
4
+ <!-- Preenchido automaticamente no onboarding. -->
5
+
6
+ - **User Name:**
7
+ - **Output Language:**
8
+ - **IDEs:**
9
+ - **Date Format:** YYYY-MM-DD
@@ -0,0 +1,11 @@
1
+ {
2
+ "browser": {
3
+ "browserName": "chromium",
4
+ "isolated": false,
5
+ "userDataDir": "_opencrew/_browser_profile",
6
+ "launchOptions": {
7
+ "headless": true,
8
+ "channel": "chrome"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,110 @@
1
+ # SHARED — applies to ALL IDEs. Do not add IDE-specific logic here.
2
+ # For IDE-specific behavior: templates/ide-templates/{ide}/ only.
3
+ agent:
4
+ webskip: false
5
+ metadata:
6
+ id: "_opencrew/core/architect"
7
+ name: Arquiteto
8
+ title: Crew Architect
9
+ icon: 🧠
10
+ crew: core
11
+ hasSidecar: false
12
+
13
+ persona:
14
+ role: >
15
+ Crew Architecture Specialist who designs multi-agent teams and
16
+ automated pipelines. Translates business needs into optimized
17
+ crew configurations with the right agents, workflows, and skills.
18
+ identity: >
19
+ Strategic systems thinker who sees organizations as interconnected
20
+ workflows. Has an instinct for breaking complex processes into
21
+ clear agent responsibilities. Patient with non-technical users,
22
+ always explains decisions in plain language. Believes the best
23
+ crew is the simplest one that gets the job done.
24
+ communication_style: >
25
+ Clear and structured. Uses numbered lists and visual separators
26
+ to organize information. Asks one question at a time. Confirms
27
+ understanding before proceeding. Speaks naturally — never instructs
28
+ the user like a form ("reply with a number", "type yes to confirm").
29
+ Just presents options and lets the user respond however they want.
30
+ principles:
31
+ - YAGNI — never create agents that aren't strictly necessary
32
+ - Each agent must have exactly one clear responsibility
33
+ - Pipelines must have checkpoints at every user decision point
34
+ - Default to the simplest pipeline that achieves the goal
35
+ - "Path safety: Never use Bash mkdir to create directories. Always use the Write tool to create files — it creates parent directories automatically and avoids Windows/Bash path separator conflicts (backslash vs forward slash)."
36
+
37
+ discussion: true
38
+
39
+ menu:
40
+ - trigger: CS or fuzzy match on create-crew or create
41
+ description: "[CS] Create a new crew from natural language description"
42
+ action: create-crew
43
+
44
+ - trigger: ES or fuzzy match on edit-crew or edit or modify
45
+ description: "[ES] Edit an existing crew"
46
+ action: edit-crew
47
+
48
+ - trigger: LS or fuzzy match on list-crews or list or my crews
49
+ description: "[LS] List all crews"
50
+ action: list-crews
51
+
52
+ - trigger: DS or fuzzy match on delete-crew or delete or remove
53
+ description: "[DS] Delete a crew"
54
+ action: delete-crew
55
+
56
+ workflows:
57
+ create-crew: |
58
+ ## Create Crew
59
+
60
+ The create flow is now handled by the phased orchestration system.
61
+ See the SKILL.md entry point for the full phased flow:
62
+ Discovery → Investigation → Design → Template Selection (optional) → Build
63
+
64
+ Each phase is a separate prompt in `_opencrew/core/prompts/`:
65
+ - `discovery.prompt.md` — Phase 1: Intelligent wizard
66
+ - `sherlock-*.md` — Phase 2: Investigation (optional)
67
+ - `design.prompt.md` — Phase 3: Crew architecture (includes optional Phase G.5: Template Selection)
68
+ - `build.prompt.md` — Phase 4: File generation + validation
69
+
70
+ The SKILL.md orchestrator dispatches each phase as a subagent.
71
+
72
+ edit-crew: |
73
+ ## Edit Crew Workflow
74
+
75
+ 1. Ask which crew to edit (list available crews if not specified).
76
+ If only 1 crew exists, add "Cancel" as a second option. If 0 crews, inform user directly.
77
+ 2. Read the crew's crew.yaml to understand current structure
78
+ 3. Ask what changes the user wants
79
+ 4. **If the user asks to edit/define/change the visual template or identity of a design agent:**
80
+ - Read and follow `skills/template-designer/SKILL.md`
81
+ - If `template-reference.html` and `visual-identity.md` already exist in the crew's `pipeline/data/`, load them as the starting point
82
+ 5. Modify the relevant files (agent .md files, pipeline steps, crew.yaml)
83
+ 6. Present summary of changes
84
+ 7. Confirm with user
85
+
86
+ list-crews: |
87
+ ## List Crews Workflow
88
+
89
+ 1. Read all directories in crews/
90
+ 2. For each, read crew.yaml to get name, description, icon, agent count
91
+ 3. Present as a formatted list:
92
+ ```
93
+ Your Crews:
94
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
+ 📋 my-crew
96
+ My Crew Description
97
+ 3 agents | Last run: never
98
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
99
+ ```
100
+ 4. If no crews exist, suggest creating one
101
+
102
+ delete-crew: |
103
+ ## Delete Crew Workflow
104
+
105
+ 1. Ask which crew to delete (list available if not specified).
106
+ If only 1 crew exists, add "Cancel" as a second option. If 0 crews, inform user directly.
107
+ 2. Show crew details (name, agents, output count)
108
+ 3. Confirm deletion with explicit "Are you sure?" presented as a numbered list (1. Yes, delete / 2. No, cancel)
109
+ 4. If confirmed, delete the entire crews/{code}/ directory
110
+ 5. Confirm deletion
@@ -0,0 +1,116 @@
1
+ # Best Practices Catalog
2
+ # The Architect reads this file to discover which best-practices are available.
3
+ # Read the full file only for best-practices relevant to the crew being created.
4
+
5
+ catalog:
6
+ # === Discipline Best Practices ===
7
+ - id: copywriting
8
+ name: "Copywriting & Persuasive Writing"
9
+ whenToUse: "Creating agents that write persuasive copy, hooks, CTAs, social media captions, sales content, or viral angles."
10
+ file: copywriting.md
11
+
12
+ - id: researching
13
+ name: "Research & Data Collection"
14
+ whenToUse: "Creating agents that research topics, collect data from the web, verify facts, or produce structured research briefs."
15
+ file: researching.md
16
+
17
+ - id: review
18
+ name: "Content Review & Quality Control"
19
+ whenToUse: "Creating agents that evaluate content quality, score against criteria, or produce structured APPROVE/REJECT verdicts."
20
+ file: review.md
21
+
22
+ - id: image-design
23
+ name: "Visual Design & Image Creation"
24
+ whenToUse: "Creating agents that design graphics, carousel slides, social media visuals, or HTML/CSS templates for rendering."
25
+ file: image-design.md
26
+
27
+ - id: social-networks-publishing
28
+ name: "Social Networks Publishing"
29
+ whenToUse: "Creating agents that publish content to Instagram, LinkedIn, X/Twitter, YouTube, or other social platforms."
30
+ file: social-networks-publishing.md
31
+
32
+ - id: strategist
33
+ name: "Strategy & Editorial Planning"
34
+ whenToUse: "Creating agents that plan content strategy, editorial calendars, competitive positioning, or audience segmentation."
35
+ file: strategist.md
36
+
37
+ - id: technical-writing
38
+ name: "Technical & Long-Form Writing"
39
+ whenToUse: "Creating agents that write articles, blog posts, documentation, tutorials, white papers, or educational content."
40
+ file: technical-writing.md
41
+
42
+ - id: data-analysis
43
+ name: "Data Analysis & Interpretation"
44
+ whenToUse: "Creating agents that interpret metrics, extract insights, benchmark performance, or produce analytical reports."
45
+ file: data-analysis.md
46
+
47
+ # === Platform Best Practices ===
48
+ - id: instagram-feed
49
+ name: "Instagram Feed & Carousels"
50
+ whenToUse: "Creating agents that produce Instagram feed posts, carousels, or static image content for Instagram."
51
+ file: instagram-feed.md
52
+
53
+ - id: instagram-reels
54
+ name: "Instagram Reels"
55
+ whenToUse: "Creating agents that produce Instagram Reels or short-form vertical video for Instagram."
56
+ file: instagram-reels.md
57
+
58
+ - id: instagram-stories
59
+ name: "Instagram Stories"
60
+ whenToUse: "Creating agents that produce Instagram Stories or ephemeral 24-hour content."
61
+ file: instagram-stories.md
62
+
63
+ - id: linkedin-post
64
+ name: "LinkedIn Post"
65
+ whenToUse: "Creating agents that produce LinkedIn posts, text updates, or document carousels for LinkedIn."
66
+ file: linkedin-post.md
67
+
68
+ - id: linkedin-article
69
+ name: "LinkedIn Article"
70
+ whenToUse: "Creating agents that produce LinkedIn articles or long-form professional content."
71
+ file: linkedin-article.md
72
+
73
+ - id: twitter-post
74
+ name: "Twitter/X Post"
75
+ whenToUse: "Creating agents that produce tweets, quote tweets, or single posts for X/Twitter."
76
+ file: twitter-post.md
77
+
78
+ - id: twitter-thread
79
+ name: "Twitter/X Thread"
80
+ whenToUse: "Creating agents that produce Twitter/X threads or multi-tweet narratives."
81
+ file: twitter-thread.md
82
+
83
+ - id: youtube-script
84
+ name: "YouTube Video Script"
85
+ whenToUse: "Creating agents that produce YouTube video scripts or long-form video content."
86
+ file: youtube-script.md
87
+
88
+ - id: youtube-shorts
89
+ name: "YouTube Shorts"
90
+ whenToUse: "Creating agents that produce YouTube Shorts or short-form vertical video for YouTube."
91
+ file: youtube-shorts.md
92
+
93
+ - id: email-newsletter
94
+ name: "Email Newsletter"
95
+ whenToUse: "Creating agents that produce email newsletters or recurring subscriber content."
96
+ file: email-newsletter.md
97
+
98
+ - id: email-sales
99
+ name: "Sales Email"
100
+ whenToUse: "Creating agents that produce sales emails, cold outreach, or direct response email campaigns."
101
+ file: email-sales.md
102
+
103
+ - id: blog-post
104
+ name: "Blog Post"
105
+ whenToUse: "Creating agents that produce blog posts, articles, or long-form content marketing."
106
+ file: blog-post.md
107
+
108
+ - id: blog-seo
109
+ name: "Blog Post (SEO)"
110
+ whenToUse: "Creating agents that produce SEO-optimized blog posts or search-targeted content."
111
+ file: blog-seo.md
112
+
113
+ - id: whatsapp-broadcast
114
+ name: "WhatsApp Broadcast"
115
+ whenToUse: "Creating agents that produce WhatsApp broadcast messages or conversational marketing content."
116
+ file: whatsapp-broadcast.md
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: "Blog Post"
3
+ platform: "blog"
4
+ content_type: "post"
5
+ description: "Long-form blog posts optimized for readability, engagement, and clear value delivery with structured subheadings"
6
+ whenToUse: |
7
+ Creating agents that produce blog posts, articles, or long-form content marketing.
8
+ constraints:
9
+ optimal_word_count: "1500-2500"
10
+ title_max_chars: 70
11
+ meta_description_chars: 160
12
+ subheading_frequency: "every 200-300 words"
13
+ version: "1.0.0"
14
+ ---
15
+
16
+ ## Compact Rules
17
+
18
+ 1. Keep blog posts between 1,500-2,500 words for optimal depth and retention.
19
+ 2. Structure for mobile readability with 3-4 line paragraphs maximum.
20
+ 3. Insert descriptive subheadings every 200-300 words for scannability.
21
+ 4. Include at least 3 internal links and 2 external links naturally.
22
+ 5. Add a visual break (image, callout, list) every 300 words.
23
+ 6. Keep titles under 70 characters, front-loading the key concept.
24
+ 7. Write 150-160 character meta descriptions summarizing the value proposition.
25
+ 8. Hook the reader in the first 2-3 sentences (no dictionary definitions).
26
+ 9. Use 3-6 H2 sections to break down major points.
27
+ 10. Bold key phrases and takeaways within paragraphs.
28
+ 11. Write in the second person ("you") to connect directly with the reader.
29
+ 12. Conclude with a specific, actionable CTA (not generic questions).
30
+ 13. Maintain a consistent publishing cadence of 1-2 posts per week.
31
+ 14. Never publish thin content under 800 words or unbroken walls of text.
32
+
33
+ <!-- End Compact Rules. Full reference below. -->
34
+
35
+ ## Platform Rules
36
+
37
+ - Average time on page is the strongest engagement signal. Blog posts that keep readers scrolling for 3-5 minutes outperform those that get abandoned in the first 30 seconds. Structure and readability directly determine this metric.
38
+ - Posts between 1,500-2,500 words hit the optimal balance of depth and retention. Below 800 words, content is perceived as thin and struggles to rank. Above 3,000 words, completion rates drop unless the topic demands exhaustive coverage.
39
+ - Mobile readability is non-negotiable. Over 60% of blog traffic comes from mobile devices. Long paragraphs, wide images, and dense formatting that work on desktop become unreadable walls on small screens.
40
+ - Subheadings serve as a scannable table of contents. Studies show 73% of readers scan blog posts rather than reading word by word. If the subheadings alone do not convey the article's value, the structure needs reworking.
41
+ - Internal linking keeps readers on site and distributes page authority. Posts with 3+ internal links to related content have higher average session duration and lower bounce rates.
42
+ - External links to authoritative sources (research, industry leaders, official documentation) increase credibility and can positively impact search ranking when linking to genuinely relevant resources.
43
+ - Publishing consistency builds audience expectation and return visits. A regular cadence (1-2 posts per week) outperforms sporadic publishing bursts followed by silence.
44
+ - Visual breaks every 300 words prevent fatigue: images, callout boxes, bullet lists, or blockquotes. Unbroken text spanning more than 300 words causes readers to disengage.
45
+
46
+ ## Content Structure
47
+
48
+ ### Blog Post Architecture
49
+
50
+ 1. **Title** — Under 70 characters. Clearly communicates what the reader will learn or gain. Front-load the key topic. Avoid vague or overly clever titles that sacrifice clarity for creativity.
51
+ 2. **Meta description** — 150-160 characters. Summarizes the post's value proposition in one sentence. This appears in search results and social shares — it is a second headline.
52
+ 3. **Intro hook (2-3 sentences)** — Open with a surprising stat, bold claim, relatable problem, or a story that places the reader in a scenario. Then state exactly what the post will deliver.
53
+ 4. **Body sections (3-6 H2 sections)** — Each section covers one major point with its own H2 subheading. Sections are 200-300 words each with H3 sub-sections for deeper breakdowns.
54
+ 5. **Conclusion (3-5 sentences)** — Summarize the key takeaways in 1-2 sentences, then deliver a clear CTA: read a related post, download a resource, leave a comment, or try a specific action.
55
+
56
+ ### Section-Level Structure
57
+
58
+ - **H2 subheading** — Descriptive, scannable, and self-contained. A reader should understand the section's value from the heading alone.
59
+ - **Opening sentence** — State the section's key point immediately. Do not build up to the insight.
60
+ - **Supporting content** — Evidence, examples, data, or step-by-step instructions. Use bullet points for lists of 3+ items.
61
+ - **Transition** — Final sentence bridges to the next section or reinforces the section's takeaway.
62
+
63
+ ### Effective Post Formats
64
+
65
+ - **How-to guide**: "How to [achieve X]: A Step-by-Step Guide"
66
+ - **Listicle**: "7 [Things] That [Outcome] (and How to Use Them)"
67
+ - **Problem/Solution**: "Why [Problem Exists] and What to Do About It"
68
+ - **Lessons learned**: "What I Learned From [Experience]: [N] Key Takeaways"
69
+ - **Comparison**: "[Option A] vs. [Option B]: Which Is Right for [Audience]?"
70
+
71
+ ## Writing Guidelines
72
+
73
+ - **Hook the reader in the first 2-3 sentences or lose them.** Open with a stat, question, bold claim, or relatable scenario. Never start with a dictionary definition or generic background. "Content marketing is important" loses readers. "87% of blog posts get zero organic traffic" keeps them.
74
+ - Write in short paragraphs: 3-4 lines maximum on desktop, which translates to 2-3 lines on mobile. Single-sentence paragraphs are powerful for emphasis.
75
+ - Bold key phrases and takeaways within paragraphs so scanners can extract value without reading every word.
76
+ - Use bullet points and numbered lists for any sequence of 3+ items. Lists are easier to scan than inline comma-separated items.
77
+ - Subheadings every 200-300 words. Each H2 should read like a mini-headline that a scanner would click on if presented independently.
78
+ - Write in second person ("you") to create direct connection with the reader. First person ("I/we") works for personal stories and experience-based authority.
79
+ - Include at least one visual break (image, callout box, blockquote, or list) every 300 words. Continuous text blocks cause reader fatigue and increase bounce rate.
80
+ - End with a specific, actionable CTA. "What do you think?" is weak. "Try implementing [technique] this week and comment below with your results" is strong.
81
+ - Include 3+ internal links to related content on your site and 2+ external links to authoritative sources. Link naturally within context, not in a dumped list at the end.
82
+ - Write the title last, after you know what the post delivers. Front-load the most important keyword or concept in the first 40 characters.
83
+
84
+ ## Output Format
85
+
86
+ ```
87
+ === TITLE ===
88
+ [Under 70 characters — clear, specific, keyword front-loaded]
89
+
90
+ === META DESCRIPTION ===
91
+ [150-160 characters — summarizes the post's value proposition in one sentence]
92
+
93
+ === INTRO ===
94
+ [Hook — surprising stat, bold claim, relatable problem, or opening story. 1-2 sentences.]
95
+
96
+ [Promise — exactly what the reader will learn or gain from this post. 1 sentence.]
97
+
98
+ === BODY ===
99
+ ## [H2 Section 1 Title]
100
+ [200-300 words — one major point with evidence, examples, or steps. Include bullet points or visuals where appropriate.]
101
+
102
+ ## [H2 Section 2 Title]
103
+ [200-300 words — one major point with evidence, examples, or steps.]
104
+
105
+ ### [H3 Subsection if needed]
106
+ [Deeper breakdown of a specific aspect — 100-150 words.]
107
+
108
+ ## [H2 Section 3 Title]
109
+ [200-300 words — one major point with evidence, examples, or steps.]
110
+
111
+ ## [H2 Section 4 Title]
112
+ [200-300 words — one major point with evidence, examples, or steps.]
113
+
114
+ [Continue for 3-6 H2 sections total]
115
+
116
+ === CONCLUSION ===
117
+ [Key takeaway summary — 1-2 sentences.]
118
+
119
+ [CTA — specific, actionable ask. 1-2 sentences.]
120
+
121
+ === POST NOTES ===
122
+ Target word count: [1500-2500]
123
+ Internal links needed: [3+ with suggested anchor text]
124
+ External links needed: [2+ to authoritative sources]
125
+ Visual breaks: [List of suggested image/callout placements]
126
+ ```
127
+
128
+ ## Quality Criteria
129
+
130
+ - [ ] Title is under 70 characters and clearly communicates the post's value
131
+ - [ ] Meta description is 150-160 characters and serves as a compelling second headline
132
+ - [ ] Intro hooks the reader in the first 2-3 sentences with a stat, bold claim, or relatable scenario
133
+ - [ ] Post contains 3-6 H2 sections, each covering one major point
134
+ - [ ] Subheadings appear every 200-300 words and are scannable as a standalone outline
135
+ - [ ] Paragraphs are 3-4 lines maximum with key phrases bolded
136
+ - [ ] At least one visual break (image, callout, list, or blockquote) every 300 words
137
+ - [ ] 3+ internal links and 2+ external links are included with natural anchor text
138
+ - [ ] Total word count is between 1,500-2,500 words
139
+ - [ ] Conclusion ends with a specific, actionable CTA (not generic "What do you think?")
140
+
141
+ ## Anti-Patterns
142
+
143
+ - **Walls of text** — Paragraphs exceeding 5-6 lines on desktop become impenetrable on mobile. Readers bounce rather than parse dense blocks. Short paragraphs and visual breaks are not optional — they are structural requirements for retention.
144
+ - **No subheadings** — A 2,000-word post without H2/H3 subheadings is functionally a wall of text. Scanners (73% of readers) cannot extract value and leave. Subheadings serve as both navigation and content promises.
145
+ - **Clickbait titles that do not deliver** — "This One Trick Changed Everything" followed by generic advice destroys trust. The reader feels deceived, bounces quickly, and never returns. High bounce rates also signal low quality to search engines.
146
+ - **Thin content under 800 words** — Short posts struggle to provide sufficient depth, rank poorly for competitive keywords, and signal low effort. If the topic can be covered in 500 words, it may be better as a social post than a blog article.
147
+ - **No conclusion or CTA** — Posts that simply stop after the last body section feel incomplete. The reader has invested 3-5 minutes and receives no guidance on what to do next. Every post needs a clear ending and next step.
148
+ - **Dictionary definition openings** — Starting with "[Topic] is defined as..." is the most common sign of filler content. It adds no value, wastes the most important real estate in the post, and signals that the writer has nothing original to say.
149
+ - **Link dumping** — Placing all internal and external links in a list at the bottom of the post rather than weaving them naturally into the content. Contextual links are clicked more and provide more value to the reader.
150
+ - **No visual breaks** — Continuous text for 500+ words without an image, list, callout, or blockquote causes reading fatigue. Even well-written content gets abandoned when it is visually monotonous.
151
+ - **Writing for search engines instead of humans** — Unnaturally forcing keywords into every sentence makes content awkward and unpleasant to read. Write for clarity first; optimize for search second.