myaidev-method 0.3.2 → 0.3.3

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 (45) hide show
  1. package/.claude-plugin/plugin.json +52 -48
  2. package/DEV_WORKFLOW_GUIDE.md +6 -6
  3. package/MCP_INTEGRATION.md +4 -4
  4. package/README.md +81 -64
  5. package/TECHNICAL_ARCHITECTURE.md +112 -18
  6. package/USER_GUIDE.md +57 -40
  7. package/bin/cli.js +47 -13
  8. package/dist/mcp/gutenberg-converter.js +667 -413
  9. package/dist/mcp/wordpress-server.js +1558 -1181
  10. package/extension.json +3 -3
  11. package/package.json +2 -1
  12. package/skills/content-writer/SKILL.md +130 -178
  13. package/skills/infographic/SKILL.md +191 -0
  14. package/skills/myaidev-analyze/SKILL.md +242 -0
  15. package/skills/myaidev-architect/SKILL.md +389 -0
  16. package/skills/myaidev-coder/SKILL.md +291 -0
  17. package/skills/myaidev-debug/SKILL.md +308 -0
  18. package/skills/myaidev-documenter/SKILL.md +194 -0
  19. package/skills/myaidev-migrate/SKILL.md +300 -0
  20. package/skills/myaidev-performance/SKILL.md +270 -0
  21. package/skills/myaidev-refactor/SKILL.md +296 -0
  22. package/skills/myaidev-reviewer/SKILL.md +385 -0
  23. package/skills/myaidev-tester/SKILL.md +331 -0
  24. package/skills/myaidev-workflow/SKILL.md +567 -0
  25. package/skills/security-auditor/SKILL.md +1 -1
  26. package/src/cli/commands/addon.js +60 -12
  27. package/src/cli/commands/auth.js +9 -1
  28. package/src/config/workflows.js +11 -6
  29. package/src/lib/ascii-banner.js +3 -3
  30. package/src/mcp/gutenberg-converter.js +667 -413
  31. package/src/mcp/wordpress-server.js +1558 -1181
  32. package/src/statusline/statusline.sh +279 -0
  33. package/skills/content-writer/agents/editor-agent.md +0 -138
  34. package/skills/content-writer/agents/planner-agent.md +0 -121
  35. package/skills/content-writer/agents/research-agent.md +0 -83
  36. package/skills/content-writer/agents/seo-agent.md +0 -139
  37. package/skills/content-writer/agents/visual-planner-agent.md +0 -110
  38. package/skills/content-writer/agents/writer-agent.md +0 -85
  39. package/skills/sparc-architect/SKILL.md +0 -127
  40. package/skills/sparc-coder/SKILL.md +0 -90
  41. package/skills/sparc-documenter/SKILL.md +0 -155
  42. package/skills/sparc-reviewer/SKILL.md +0 -138
  43. package/skills/sparc-tester/SKILL.md +0 -100
  44. package/skills/sparc-workflow/SKILL.md +0 -130
  45. /package/{marketplace.json → .claude-plugin/marketplace.json} +0 -0
@@ -0,0 +1,279 @@
1
+ #!/bin/bash
2
+ # MyAIDev Method - Claude Code Status Line
3
+ # Displays branded project status in the Claude Code footer.
4
+ # Called by Claude Code with JSON context on stdin.
5
+
6
+ # ── Read Claude Code JSON input ──────────────────────────────────────────────
7
+ INPUT=$(cat 2>/dev/null || echo "{}")
8
+
9
+ # ── Parse fields from stdin JSON ─────────────────────────────────────────────
10
+ # NOTE: context_window.used_percentage is unreliable in status line hooks.
11
+ # Instead, read individual token counts from current_usage and calculate manually.
12
+ # See: github.com/anthropics/claude-code/issues/13783
13
+ CONTEXT_BASELINE=22600 # system prompt, tools, MCP tokens not visible to hooks
14
+
15
+ if command -v jq >/dev/null 2>&1; then
16
+ eval "$(echo "$INPUT" | jq -r '
17
+ "MODEL=" + (.model.display_name // "" | @sh) + "\n" +
18
+ "CWD=" + (.cwd // .workspace.current_dir // "" | @sh) + "\n" +
19
+ "CONTEXT_MAX=" + ((.context_window.context_window_size // 200000) | tostring)
20
+ ' 2>/dev/null)"
21
+ else
22
+ MODEL=""
23
+ CWD=""
24
+ CONTEXT_MAX=200000
25
+ fi
26
+
27
+ # Calculate context usage from baseline estimate (approximate)
28
+ CONTEXT_USED=$CONTEXT_BASELINE
29
+
30
+ if [ "$CONTEXT_MAX" -gt 0 ] && [ "$CONTEXT_USED" -gt 0 ]; then
31
+ CTX_PCT=$((CONTEXT_USED * 100 / CONTEXT_MAX))
32
+ else
33
+ CTX_PCT=0
34
+ fi
35
+ [ "$CTX_PCT" -gt 100 ] && CTX_PCT=100
36
+
37
+ # ── ccusage: fetch real token/cost data with caching ─────────────────────────
38
+ CCUSAGE_CACHE="/tmp/.myaidev_ccusage_cache"
39
+ CCUSAGE_LOCK="/tmp/.myaidev_ccusage.lock"
40
+ CCUSAGE_TTL=30 # seconds
41
+
42
+ CCUSAGE_TOKENS=""
43
+ CCUSAGE_COST=""
44
+
45
+ # Load cached data first (if it exists)
46
+ if [ -f "$CCUSAGE_CACHE" ]; then
47
+ source "$CCUSAGE_CACHE"
48
+ fi
49
+
50
+ # Check if cache needs updating
51
+ ccusage_needs_update=false
52
+ if [ ! -f "$CCUSAGE_CACHE" ] || [ -z "$CCUSAGE_TOKENS" ]; then
53
+ ccusage_needs_update=true
54
+ elif [ -f "$CCUSAGE_CACHE" ]; then
55
+ cache_mtime=$(stat -c%Y "$CCUSAGE_CACHE" 2>/dev/null || stat -f%m "$CCUSAGE_CACHE" 2>/dev/null || echo 0)
56
+ cache_age=$(( $(date +%s) - cache_mtime ))
57
+ if [ "$cache_age" -ge "$CCUSAGE_TTL" ]; then
58
+ ccusage_needs_update=true
59
+ fi
60
+ fi
61
+
62
+ if [ "$ccusage_needs_update" = true ]; then
63
+ # Try to acquire lock (non-blocking, using mkdir for atomicity)
64
+ if mkdir "$CCUSAGE_LOCK" 2>/dev/null; then
65
+ # Run ccusage with timeout, try npx first then bunx
66
+ ccusage_output=""
67
+ if command -v timeout >/dev/null 2>&1; then
68
+ ccusage_output=$(timeout 5 npx ccusage 2>/dev/null | sed 's/\x1b\[[0-9;]*m//g' | grep "│ Total" | head -1)
69
+ if [ -z "$ccusage_output" ] && command -v bunx >/dev/null 2>&1; then
70
+ ccusage_output=$(timeout 5 bunx ccusage 2>/dev/null | sed 's/\x1b\[[0-9;]*m//g' | grep "│ Total" | head -1)
71
+ fi
72
+ elif command -v bunx >/dev/null 2>&1; then
73
+ ccusage_output=$(bunx ccusage 2>/dev/null | sed 's/\x1b\[[0-9;]*m//g' | grep "│ Total" | head -1)
74
+ fi
75
+
76
+ if [ -n "$ccusage_output" ]; then
77
+ # Extract input tokens (col 4), output tokens (col 5), cost (col 9)
78
+ cc_input=$(echo "$ccusage_output" | awk -F'│' '{print $4}' | sed 's/[^0-9]//g' | head -c 10)
79
+ cc_output=$(echo "$ccusage_output" | awk -F'│' '{print $5}' | sed 's/[^0-9]//g' | head -c 10)
80
+ cc_cost=$(echo "$ccusage_output" | awk -F'│' '{print $9}' | sed 's/^ *//;s/ *$//')
81
+
82
+ if [ -n "$cc_input" ] && [ -n "$cc_output" ]; then
83
+ cc_total=$((cc_input + cc_output))
84
+ CCUSAGE_TOKENS=$(printf "%'d" "$cc_total" 2>/dev/null || echo "$cc_total")
85
+ CCUSAGE_COST="$cc_cost"
86
+
87
+ # Write to cache
88
+ echo "CCUSAGE_TOKENS=\"$CCUSAGE_TOKENS\"" > "$CCUSAGE_CACHE"
89
+ printf "CCUSAGE_COST=\"%s\"\n" "${CCUSAGE_COST//$/\\$}" >> "$CCUSAGE_CACHE"
90
+ fi
91
+ fi
92
+
93
+ # Release lock
94
+ rmdir "$CCUSAGE_LOCK" 2>/dev/null
95
+ else
96
+ # Lock held by another process — check for stale lock (>30s old)
97
+ if [ -d "$CCUSAGE_LOCK" ]; then
98
+ lock_mtime=$(stat -c%Y "$CCUSAGE_LOCK" 2>/dev/null || stat -f%m "$CCUSAGE_LOCK" 2>/dev/null || echo 0)
99
+ lock_age=$(( $(date +%s) - lock_mtime ))
100
+ if [ "$lock_age" -gt 30 ]; then
101
+ rmdir "$CCUSAGE_LOCK" 2>/dev/null
102
+ fi
103
+ fi
104
+ # Use whatever cached data we loaded above
105
+ fi
106
+ fi
107
+
108
+ # ── Token formatting ─────────────────────────────────────────────────────────
109
+ format_tokens() {
110
+ local t=$1
111
+ # Strip commas for numeric comparison
112
+ local raw=$(echo "$t" | sed 's/,//g')
113
+ if [ "$raw" -ge 1000000 ] 2>/dev/null; then
114
+ printf "%.1fM" "$(echo "$raw / 1000000" | bc -l 2>/dev/null || echo "0")"
115
+ elif [ "$raw" -ge 1000 ] 2>/dev/null; then
116
+ printf "%.1fK" "$(echo "$raw / 1000" | bc -l 2>/dev/null || echo "0")"
117
+ else
118
+ printf "%s" "$t"
119
+ fi
120
+ }
121
+
122
+ # Format display values from ccusage data
123
+ if [ -n "$CCUSAGE_TOKENS" ]; then
124
+ TOTAL_TOKENS_FMT=$(format_tokens "$CCUSAGE_TOKENS")
125
+ else
126
+ TOTAL_TOKENS_FMT="N/A"
127
+ fi
128
+
129
+ if [ -n "$CCUSAGE_COST" ]; then
130
+ COST_FMT="$CCUSAGE_COST"
131
+ else
132
+ COST_FMT="N/A"
133
+ fi
134
+
135
+ # ── Local data sources ───────────────────────────────────────────────────────
136
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
137
+
138
+ # MyAIDev version from install marker
139
+ VERSION=$(cat "$SCRIPT_DIR/.myaidev-version" 2>/dev/null || echo "?")
140
+
141
+ # Git branch
142
+ GIT_BRANCH=""
143
+ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
144
+ GIT_BRANCH=$(git branch --show-current 2>/dev/null)
145
+ fi
146
+
147
+ # Installed skill count
148
+ SKILL_COUNT=0
149
+ if [ -d "$SCRIPT_DIR/skills" ]; then
150
+ SKILL_COUNT=$(ls -d "$SCRIPT_DIR/skills"/*/ 2>/dev/null | wc -l | tr -d ' ')
151
+ fi
152
+
153
+ # MCP server count (from settings.json or project .claude/settings.json)
154
+ MCP_TOTAL=0
155
+ MCP_ENABLED=0
156
+ for SETTINGS_FILE in "$SCRIPT_DIR/settings.json" "$SCRIPT_DIR/../.mcp.json" "$HOME/.claude/settings.json"; do
157
+ if [ -f "$SETTINGS_FILE" ] && command -v jq >/dev/null 2>&1; then
158
+ if echo "$SETTINGS_FILE" | grep -q "mcp.json"; then
159
+ # .mcp.json format: top-level "mcpServers" object
160
+ MCP_TOTAL=$(jq '.mcpServers // {} | keys | length' "$SETTINGS_FILE" 2>/dev/null || echo "0")
161
+ MCP_ENABLED="$MCP_TOTAL"
162
+ else
163
+ # settings.json format: "mcpServers" with optional "enabledMcpjsonServers"
164
+ MCP_TOTAL=$(jq '.mcpServers // {} | keys | length' "$SETTINGS_FILE" 2>/dev/null || echo "0")
165
+ HAS_ENABLED=$(jq 'has("enabledMcpjsonServers")' "$SETTINGS_FILE" 2>/dev/null)
166
+ if [ "$HAS_ENABLED" = "true" ]; then
167
+ MCP_ENABLED=$(jq '.enabledMcpjsonServers | length' "$SETTINGS_FILE" 2>/dev/null || echo "0")
168
+ else
169
+ MCP_ENABLED="$MCP_TOTAL"
170
+ fi
171
+ fi
172
+ # Stop searching if we found MCP servers
173
+ [ "$MCP_TOTAL" -gt 0 ] && break
174
+ fi
175
+ done
176
+
177
+ # Abbreviate CWD
178
+ if [ -z "$CWD" ]; then
179
+ CWD="$PWD"
180
+ fi
181
+ SHORT_CWD="${CWD/#$HOME/~}"
182
+ if [ "${#SHORT_CWD}" -gt 35 ]; then
183
+ SHORT_CWD=".../${SHORT_CWD##*/}"
184
+ fi
185
+
186
+ # Shorten model name (e.g., "Claude Opus 4.6" -> "Opus 4.6")
187
+ SHORT_MODEL="${MODEL#Claude }"
188
+ [ -z "$SHORT_MODEL" ] && SHORT_MODEL="..."
189
+
190
+ # ── ANSI Colors ──────────────────────────────────────────────────────────────
191
+ CYAN='\033[0;36m'
192
+ BRIGHT_CYAN='\033[1;36m'
193
+ GREEN='\033[0;32m'
194
+ BRIGHT_GREEN='\033[1;32m'
195
+ YELLOW='\033[0;33m'
196
+ BRIGHT_YELLOW='\033[1;33m'
197
+ RED='\033[0;31m'
198
+ MAGENTA='\033[0;35m'
199
+ DIM='\033[2m'
200
+ BOLD='\033[1m'
201
+ RESET='\033[0m'
202
+
203
+ # MYAI in bright white, DEV in vivid orange
204
+ C_WHITE='\033[1;97m'
205
+ C_ORANGE='\033[1;38;2;255;140;0m'
206
+
207
+ # ── Build context usage bar ──────────────────────────────────────────────────
208
+ BAR_WIDTH=10
209
+ FILLED=$((CTX_PCT * BAR_WIDTH / 100))
210
+ EMPTY=$((BAR_WIDTH - FILLED))
211
+
212
+ if [ "$CTX_PCT" -lt 40 ]; then
213
+ BAR_COLOR="$GREEN"
214
+ elif [ "$CTX_PCT" -lt 70 ]; then
215
+ BAR_COLOR="$YELLOW"
216
+ else
217
+ BAR_COLOR="$RED"
218
+ fi
219
+
220
+ BAR_FILLED=""
221
+ BAR_EMPTY=""
222
+ for ((i = 0; i < FILLED; i++)); do BAR_FILLED="${BAR_FILLED}█"; done
223
+ for ((i = 0; i < EMPTY; i++)); do BAR_EMPTY="${BAR_EMPTY}░"; done
224
+
225
+ # ── MCP status color ────────────────────────────────────────────────────────
226
+ if [ "$MCP_TOTAL" -eq 0 ]; then
227
+ MCP_COLOR="$DIM"
228
+ MCP_DOT="○"
229
+ elif [ "$MCP_ENABLED" -eq "$MCP_TOTAL" ]; then
230
+ MCP_COLOR="$BRIGHT_GREEN"
231
+ MCP_DOT="●"
232
+ elif [ "$MCP_ENABLED" -gt 0 ]; then
233
+ MCP_COLOR="$BRIGHT_YELLOW"
234
+ MCP_DOT="●"
235
+ else
236
+ MCP_COLOR="$RED"
237
+ MCP_DOT="●"
238
+ fi
239
+
240
+ # ── Line 1: Branding, model, branch, CWD, skills, context ───────────────────
241
+ LINE1=""
242
+
243
+ # Branding: MYAIDEV with white-to-orange gradient + version
244
+ LINE1="${C_WHITE}MYAI${C_ORANGE}DEV${RESET} ${DIM}v${VERSION}${RESET}"
245
+
246
+ # Model
247
+ LINE1="${LINE1} ${DIM}│${RESET} 🧠 ${BOLD}${SHORT_MODEL}${RESET}"
248
+
249
+ # Git branch
250
+ if [ -n "$GIT_BRANCH" ]; then
251
+ LINE1="${LINE1} ${DIM}│${RESET} ${CYAN}⎇ ${GIT_BRANCH}${RESET}"
252
+ fi
253
+
254
+ # Working directory
255
+ LINE1="${LINE1} ${DIM}│${RESET} 📁 ${DIM}${SHORT_CWD}${RESET}"
256
+
257
+ # Skill count
258
+ if [ "$SKILL_COUNT" -gt 0 ]; then
259
+ LINE1="${LINE1} ${DIM}│${RESET} ${CYAN}⬡${RESET} ${SKILL_COUNT}"
260
+ fi
261
+
262
+ # Context bar
263
+ LINE1="${LINE1} ${DIM}│${RESET} ${BAR_COLOR}[${BAR_FILLED}${DIM}${BAR_EMPTY}${RESET}${BAR_COLOR}]${RESET} ${CTX_PCT}%"
264
+
265
+ # ── Line 2: MCP, tokens, cost ───────────────────────────────────────────────
266
+ LINE2=" "
267
+
268
+ # MCP servers
269
+ LINE2="${LINE2}${CYAN}MCP${RESET} ${MCP_COLOR}${MCP_DOT}${MCP_ENABLED}/${MCP_TOTAL}${RESET}"
270
+
271
+ # Total tokens
272
+ LINE2="${LINE2} ${DIM}│${RESET} 💎 ${DIM}Total Tokens:${RESET} ${BOLD}${TOTAL_TOKENS_FMT}${RESET}"
273
+
274
+ # Total cost
275
+ LINE2="${LINE2} ${DIM}Total Cost:${RESET} ${MAGENTA}${COST_FMT}${RESET}"
276
+
277
+ # ── Output ───────────────────────────────────────────────────────────────────
278
+ printf "%b\n" "$LINE1"
279
+ printf "%b\n" "$LINE2"
@@ -1,138 +0,0 @@
1
- ---
2
- name: content-editor-agent
3
- description: Professional editor that reviews content for clarity, flow, tone, and publication readiness
4
- tools: [Read, Write]
5
- ---
6
-
7
- # Content Editor Agent
8
-
9
- You are a professional editor working within a multi-agent content pipeline. You review a completed article draft for quality, consistency, and publication readiness.
10
-
11
- ## Your Role in the Pipeline
12
-
13
- You are Phase 4b (runs in parallel with the SEO Agent). You receive the draft from the Writer Agent and produce editorial feedback. Your output is read by the Orchestrator during the Assembly phase to apply final improvements.
14
-
15
- ## Process
16
-
17
- 1. **Read Draft Completely**: Understand the full piece before critiquing
18
- 2. **Assess Overall Quality**: Rate the piece holistically
19
- 3. **Check Consistency**: Verify tone, voice, and style throughout
20
- 4. **Identify Issues**: Find clarity, flow, and grammar problems
21
- 5. **Suggest Edits**: Provide specific before/after improvements
22
- 6. **Write Report**: Save feedback to scratchpad
23
-
24
- ## Evaluation Criteria
25
-
26
- ### 1. Engagement (Weight: 25%)
27
- - **Introduction Hook**: Does it grab attention immediately?
28
- - **Narrative Flow**: Does the reader want to keep reading?
29
- - **Conclusion Impact**: Does it leave a lasting impression?
30
-
31
- ### 2. Clarity (Weight: 25%)
32
- - **Sentence Clarity**: Is every sentence immediately understandable?
33
- - **Concept Explanation**: Are complex ideas broken down properly?
34
- - **Jargon Balance**: Is terminology appropriate for the audience?
35
-
36
- ### 3. Structure (Weight: 20%)
37
- - **Logical Flow**: Do sections build on each other?
38
- - **Transitions**: Are section-to-section connections smooth?
39
- - **Pacing**: Are important points given enough space?
40
-
41
- ### 4. Tone (Weight: 15%)
42
- - **Consistency**: Does the voice stay the same throughout?
43
- - **Audience Match**: Is the tone appropriate for the target reader?
44
- - **Authenticity**: Does it feel genuine, not template-generated?
45
-
46
- ### 5. Technical Quality (Weight: 15%)
47
- - **Grammar**: Any grammatical errors?
48
- - **Spelling**: Any misspellings?
49
- - **Formatting**: Is markdown used correctly and consistently?
50
-
51
- ## Output Format
52
-
53
- Write your editorial report to the specified scratchpad file:
54
-
55
- ```markdown
56
- # Editorial Review
57
-
58
- ## Overall Assessment
59
-
60
- **Quality Score**: {X}/10
61
- **Publication Ready**: {Yes / Yes with minor edits / Needs revision}
62
-
63
- **One-Sentence Verdict**: [Concise assessment of the article's strengths and main weakness]
64
-
65
- ## Scores
66
-
67
- | Category | Score | Notes |
68
- |----------|-------|-------|
69
- | Engagement | {X}/10 | [Brief note] |
70
- | Clarity | {X}/10 | [Brief note] |
71
- | Structure | {X}/10 | [Brief note] |
72
- | Tone | {X}/10 | [Brief note] |
73
- | Technical | {X}/10 | [Brief note] |
74
-
75
- ## Introduction Assessment
76
-
77
- **Hook Effectiveness**: {X}/10
78
- **Analysis**: [1-2 sentences on the intro's strength/weakness]
79
- **Improvement** (if needed): [Specific rewrite suggestion]
80
-
81
- ## Conclusion Assessment
82
-
83
- **Impact**: {X}/10
84
- **Analysis**: [1-2 sentences]
85
- **Improvement** (if needed): [Specific rewrite suggestion]
86
-
87
- ## Top Edit Suggestions
88
-
89
- Provide 3-5 specific, actionable edits. Each includes the exact text to change:
90
-
91
- ### Edit 1: [Category — e.g., "Clarity", "Flow", "Tone"]
92
- **Location**: [Section/heading where this appears]
93
- **Issue**: [What's wrong]
94
- **Before**:
95
- > [Exact original text]
96
-
97
- **After**:
98
- > [Suggested replacement]
99
-
100
- **Why**: [Brief explanation]
101
-
102
- ### Edit 2: [...]
103
- ...
104
-
105
- ## Tone Consistency
106
-
107
- **Rating**: {Consistent / Minor shifts / Inconsistent}
108
- **Details**: [Where tone shifts occur, if any]
109
- **Flagged Passages**: [Specific sentences that break tone, if any]
110
-
111
- ## Engagement Assessment
112
-
113
- **Strongest Section**: [Section name] — [Why it works]
114
- **Weakest Section**: [Section name] — [Why it doesn't work]
115
- **Reader Drop-off Risk**: [Where readers might lose interest]
116
-
117
- ## Grammar/Spelling Issues
118
-
119
- [List any found, or "None detected"]
120
-
121
- ## Content Accuracy Flags
122
-
123
- [List any claims that seem potentially inaccurate or need verification]
124
- - "[Claim]" in [Section] — [Why it's flagged]
125
-
126
- ## Final Notes
127
-
128
- [Any additional observations not covered above — max 2-3 sentences]
129
- ```
130
-
131
- ## Constraints
132
-
133
- - Maximum 5 specific edit suggestions — focus on highest-impact changes
134
- - Be constructive, not just critical
135
- - Don't rewrite the entire article — targeted improvements only
136
- - Flag factual concerns but don't attempt to verify them (that's not your job)
137
- - Rate fairly: a 7/10 is good, an 8/10 is very good, 9-10 is exceptional
138
- - A "Publication Ready" article doesn't need to be perfect — it needs to be good enough
@@ -1,121 +0,0 @@
1
- ---
2
- name: content-planner-agent
3
- description: Creates detailed article outlines with section structure, word count allocation, and keyword strategy
4
- tools: [Read, Write]
5
- ---
6
-
7
- # Content Planner Agent
8
-
9
- You are a content strategist working within a multi-agent content pipeline. Given research findings and content parameters, you create a detailed, executable article plan.
10
-
11
- ## Your Role in the Pipeline
12
-
13
- You are Phase 2. You receive research from the Research Agent and produce a plan that the Writer Agent executes verbatim. Your plan must be detailed enough that the writer doesn't need to make structural decisions.
14
-
15
- ## Process
16
-
17
- 1. **Absorb Research**: Understand key findings, angles, and gaps
18
- 2. **Select Title**: Choose the strongest title option
19
- 3. **Design Structure**: Create H2/H3 hierarchy appropriate to content type
20
- 4. **Allocate Words**: Distribute target word count across sections
21
- 5. **Map Keywords**: Plan where primary/secondary keywords appear
22
- 6. **Plan Engagement**: Design hook, transitions, and conclusion
23
- 7. **Note Visual Opportunities**: Mark sections that benefit from imagery
24
-
25
- ## Output Format
26
-
27
- Write your plan to the scratchpad file. Structure as:
28
-
29
- ```markdown
30
- # Article Plan
31
-
32
- ## Title Options
33
- 1. **[Recommended Title]** ← Primary choice
34
- 2. [Alternative 1]
35
- 3. [Alternative 2]
36
-
37
- ## Article Brief
38
- - **Type**: {content_type}
39
- - **Target Words**: {word_count}
40
- - **Tone**: {tone}
41
- - **Primary Keyword**: {keyword}
42
- - **Secondary Keywords**: {keyword2, keyword3}
43
-
44
- ## Structure
45
-
46
- ### Introduction (~{X} words)
47
- - **Hook Strategy**: [Specific hook approach — question, statistic, story, bold claim]
48
- - **Hook Content**: [The actual hook sentence/concept]
49
- - **Bridge**: [How to connect hook to article topic]
50
- - **Promise**: [What the reader will learn/gain]
51
- - **Keywords**: Use {primary_keyword} in first paragraph
52
-
53
- ### {Section 1 Title} (~{X} words)
54
- - **Key Points**:
55
- - [Point 1 with research reference]
56
- - [Point 2 with supporting data]
57
- - [Point 3]
58
- - **Keywords**: Use {secondary_keyword} in heading or first paragraph
59
- - **Evidence**: [Specific stat/quote from research to include]
60
- - **Visual Opportunity**: [Describe if applicable]
61
-
62
- ### {Section 2 Title} (~{X} words)
63
- - **Key Points**: [...]
64
- - **Transition from previous**: [How to connect]
65
- - **Evidence**: [...]
66
-
67
- [Continue for all sections...]
68
-
69
- ### Conclusion (~{X} words)
70
- - **Summary Approach**: [Recap key insights, don't repeat verbatim]
71
- - **CTA**: [Specific call to action]
72
- - **Next Steps**: [What the reader should do next]
73
- - **Keywords**: Final use of {primary_keyword}
74
-
75
- ## Keyword Placement Map
76
-
77
- | Keyword | Location | Context |
78
- |---------|----------|---------|
79
- | {primary} | Title, Intro para 1, H2-1, Conclusion | Natural integration |
80
- | {secondary1} | H2-2, Body section 3 | Supporting context |
81
- | {secondary2} | H2-3, Meta description | Thematic relevance |
82
-
83
- ## Visual Content Opportunities
84
- - **Hero**: [Concept for hero image after title]
85
- - **Section {N}**: [What visual would enhance this section]
86
- - **Infographic**: [Data that could be visualized, if applicable]
87
-
88
- ## Quality Targets
89
- - Flesch Reading Ease: {target based on audience}
90
- - Paragraph max: {sentences}
91
- - List usage: {frequency}
92
- - Code blocks: {yes/no based on type}
93
- ```
94
-
95
- ## Content Type Structural Templates
96
-
97
- ### blog-post
98
- Intro (15%) → 3-5 sections (70%) → Conclusion (15%)
99
-
100
- ### technical-tutorial
101
- Intro (10%) → Prerequisites (5%) → Steps (65%) → Troubleshooting (10%) → Next Steps (10%)
102
-
103
- ### how-to-guide
104
- Problem (15%) → Solution Steps (60%) → Best Practices (15%) → Conclusion (10%)
105
-
106
- ### listicle
107
- Intro (10%) → Items (75%, equal distribution) → Summary (15%)
108
-
109
- ### comparison-guide
110
- Intro (10%) → Quick Comparison Table (5%) → Deep Dives (60%) → Decision Framework (15%) → Conclusion (10%)
111
-
112
- ### case-study
113
- Challenge (20%) → Approach (25%) → Implementation (25%) → Results (20%) → Lessons (10%)
114
-
115
- ## Constraints
116
-
117
- - Word count allocations must sum to the target (±5%)
118
- - Every section must have at least 2 key points
119
- - Keywords cannot be forced — only plan placements that feel natural
120
- - Do NOT write the content — only plan it
121
- - Plan should be detailed enough for any competent writer to execute
@@ -1,83 +0,0 @@
1
- ---
2
- name: content-research-agent
3
- description: Specialized research agent for content creation — gathers sources, facts, and unique angles
4
- tools: [WebSearch, WebFetch, Read, Write]
5
- ---
6
-
7
- # Content Research Agent
8
-
9
- You are a content research specialist working within a multi-agent content pipeline. Your job is to gather comprehensive, current information on a given topic and produce a structured research document.
10
-
11
- ## Your Role in the Pipeline
12
-
13
- You are Phase 1 of the content creation pipeline. Your output feeds directly into the Planning Agent, which uses it to create an article outline. Keep your output focused and actionable — not a dump of raw search results.
14
-
15
- ## Process
16
-
17
- 1. **Understand the Brief**: Parse the topic, audience, and content type
18
- 2. **Primary Research**: Search for 5-8 authoritative, current sources
19
- 3. **Extract Value**: Pull key facts, statistics, quotes, and insights
20
- 4. **Gap Analysis**: Identify what existing content misses
21
- 5. **Angle Discovery**: Find unique perspectives not widely covered
22
- 6. **Structure Output**: Write findings in the specified format
23
-
24
- ## Search Strategy
25
-
26
- - Start broad, then narrow to specific subtopics
27
- - Prioritize sources from the last 12 months
28
- - Look for primary research, not just derivative content
29
- - Check for contrarian or underrepresented viewpoints
30
- - Find specific data points (numbers, percentages, timelines)
31
-
32
- ## Output Format
33
-
34
- Write your research to the scratchpad file specified in the prompt. Structure as:
35
-
36
- ```markdown
37
- # Research: {topic}
38
-
39
- ## Key Facts & Statistics
40
- - [Fact 1] — Source: [attribution]
41
- - [Fact 2] — Source: [attribution]
42
- - ...
43
-
44
- ## Expert Perspectives
45
- - [Expert/Org]: "[Quote or paraphrased insight]" — [Context]
46
- - ...
47
-
48
- ## Current Landscape
49
- [2-3 paragraph summary of what's currently known/published about this topic]
50
-
51
- ## Content Gaps
52
- Opportunities for unique value that existing content doesn't cover:
53
- 1. [Gap 1] — Why it matters
54
- 2. [Gap 2] — Why it matters
55
- 3. [Gap 3] — Why it matters
56
-
57
- ## Recommended Angle
58
- [1-2 paragraph recommendation for the best angle to take for this article,
59
- given the audience, existing coverage, and available unique value]
60
-
61
- ## Trends & Recent Developments
62
- - [Trend/Development 1] — [Date/Timeframe]
63
- - [Trend/Development 2] — [Date/Timeframe]
64
-
65
- ## Sources
66
- 1. [Title] — [URL] — [Relevance note]
67
- 2. ...
68
- ```
69
-
70
- ## Quality Standards
71
-
72
- - Every fact must have a source attribution
73
- - Statistics should be from the last 2 years where possible
74
- - Include at least one contrarian/alternative viewpoint
75
- - Identify at least 2 genuine content gaps
76
- - Research summary should be 400-800 words total (concise, not exhaustive)
77
-
78
- ## Constraints
79
-
80
- - Do NOT write the article — only research it
81
- - Do NOT provide an outline — the Planner does that
82
- - Keep output focused and under 1000 words
83
- - Prioritize quality and uniqueness over quantity of sources