@hanzlaa/rcode 4.3.3 → 4.4.1
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/CONTRIBUTING.md +1 -1
- package/README.md +28 -5
- package/cli/doctor.js +21 -3
- package/cli/generate-command-skills.cjs +1 -1
- package/cli/index.js +5 -1
- package/cli/install.js +7 -9
- package/cli/postinstall.js +22 -2
- package/cli/uninstall.js +48 -6
- package/dist/rcode.js +202 -203
- package/package.json +13 -23
- package/rcode/agents/rcode-codebase-mapper.md +12 -0
- package/rcode/agents/rcode-phase-researcher.md +13 -0
- package/rcode/agents/rcode-project-researcher.md +32 -0
- package/rcode/agents/rcode-roadmapper.md +15 -0
- package/rcode/agents/rules/planner/common-patterns.md +40 -0
- package/rcode/bin/lib/roadmap.cjs +184 -11
- package/rcode/bin/rcode-hooks.cjs +102 -151
- package/rcode/bin/rcode-tools.cjs +669 -55
- package/rcode/commands/lazy.md +10 -0
- package/rcode/data/intent-table.json +87 -0
- package/rcode/modules/seo.yaml +22 -0
- package/rcode/references/project-types.yaml +75 -0
- package/rcode/references/verb-dictionary.md +1 -1
- package/rcode/skills/SKILLS_INDEX.md +18 -1
- package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +1 -1
- package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/SKILL.md +4 -21
- package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/templates/heartbeat.sh +0 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +60 -1
- package/rcode/skills/core/rcode-init/scripts/__pycache__/rcode_init.cpython-38.pyc +0 -0
- package/rcode/skills/core/rcode-init/scripts/tests/__pycache__/test_rcode_init.cpython-38.pyc +0 -0
- package/rcode/skills/seo/module.yaml +20 -0
- package/rcode/skills/seo/on-page-seo-auditor/SKILL.md +308 -0
- package/rcode/skills/seo/on-page-seo-auditor/references/audit-example.md +109 -0
- package/rcode/skills/seo/on-page-seo-auditor/references/audit-templates.md +427 -0
- package/rcode/skills/seo/on-page-seo-auditor/references/bulk-audit-playbook.md +116 -0
- package/rcode/skills/seo/on-page-seo-auditor/references/scoring-rubric.md +525 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/SKILL.md +94 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/rules/city-matrix-and-pages.md +76 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/rules/monetization.md +70 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/rules/niche-selection.md +60 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/rules/subniche-discovery.md +66 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/templates/service-city-page.md +36 -0
- package/rcode/skills/seo/rank-and-rent-local-seo/templates/subniche-research-prompt.md +34 -0
- package/rcode/skills/seo/seo-audit/SKILL.md +412 -0
- package/rcode/skills/seo/seo-audit/evals/evals.json +136 -0
- package/rcode/skills/seo/seo-audit/references/ai-writing-detection.md +200 -0
- package/rcode/skills/seo/seo-content-factory/SKILL.md +130 -0
- package/rcode/skills/seo/seo-content-factory/rules/agents.md +80 -0
- package/rcode/skills/seo/seo-content-factory/rules/herdr-wave-mapping.md +80 -0
- package/rcode/skills/seo/seo-content-factory/rules/pipeline.md +102 -0
- package/rcode/skills/seo/seo-content-factory/rules/programmatic-pages.md +107 -0
- package/rcode/skills/seo/seo-content-factory/rules/quality-gates.md +68 -0
- package/rcode/skills/seo/seo-content-factory/rules/weekly-cadence.md +61 -0
- package/rcode/skills/seo/seo-content-factory/templates/BACKLOG.md +23 -0
- package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/01-funnel-A1-A4.md +63 -0
- package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/02-fanout-editorial-A5-A6-A8.md +28 -0
- package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/03-fanout-programmatic-A7-A6-A8.md +25 -0
- package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/04-loop-A9-A10.md +34 -0
- package/rcode/skills/seo/seo-content-factory/templates/article.mdx +39 -0
- package/rcode/skills/seo/seo-content-factory/templates/cluster.schema.json +52 -0
- package/rcode/skills/seo/seo-content-factory/templates/content-brief.md +51 -0
- package/rcode/skills/seo/seo-content-factory/templates/jsonld-builders.ts +49 -0
- package/rcode/skills/seo/seo-content-factory/templates/keywords.csv +13 -0
- package/rcode/skills/seo/seo-content-factory/templates/programmatic-page.tsx +58 -0
- package/rcode/skills/seo/seo-content-writer/SKILL.md +263 -0
- package/rcode/skills/seo/seo-content-writer/references/content-structure-templates.md +875 -0
- package/rcode/skills/seo/seo-content-writer/references/instructions-detail.md +239 -0
- package/rcode/skills/seo/seo-content-writer/references/seo-writing-checklist.md +250 -0
- package/rcode/skills/seo/seo-content-writer/references/title-formulas.md +339 -0
- package/rcode/skills/seo/seo-growth-orchestrator/SKILL.md +79 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/backlinks.md +29 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/content-engine.md +27 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/dos-and-donts.md +40 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/goals-protocol.md +34 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/local-seo-stack.md +35 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/mrr-sprint.md +27 -0
- package/rcode/skills/seo/seo-growth-orchestrator/rules/tools.md +19 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/backlink-research.md +29 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/goal-protocol.md +35 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/local-citations.md +24 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/local-city-pages.md +27 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gbp-categories.md +23 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gsc-goldmine.md +27 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/local-review-mining.md +26 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-30day-plan.md +19 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-cut.md +13 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-opportunity-finder.md +17 -0
- package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-role-model.md +18 -0
- package/rcode/skills/seo/seo-site-builder/SKILL.md +149 -0
- package/rcode/skills/seo/seo-site-builder/rules/01-niche-discovery.md +64 -0
- package/rcode/skills/seo/seo-site-builder/rules/02-deep-research.md +164 -0
- package/rcode/skills/seo/seo-site-builder/rules/03-keyword-strategy.md +82 -0
- package/rcode/skills/seo/seo-site-builder/rules/04-content-plan.md +173 -0
- package/rcode/skills/seo/seo-site-builder/rules/05-site-build.md +187 -0
- package/rcode/skills/seo/seo-site-builder/rules/06-yolo.md +127 -0
- package/rcode/skills/seo/seo-site-builder/templates/article-stub.mdx +62 -0
- package/rcode/skills/seo/seo-site-builder/templates/image-prompt.md +97 -0
- package/rcode/skills/seo/seo-site-builder/templates/keyword-export.md +45 -0
- package/rcode/skills/seo/seo-site-builder/templates/niche-scorecard.md +28 -0
- package/rcode/skills/seo/technical-seo-checker/SKILL.md +329 -0
- package/rcode/skills/seo/technical-seo-checker/references/bulk-audit-playbook.md +118 -0
- package/rcode/skills/seo/technical-seo-checker/references/ecommerce-platform-patterns.md +166 -0
- package/rcode/skills/seo/technical-seo-checker/references/http-status-codes.md +705 -0
- package/rcode/skills/seo/technical-seo-checker/references/llm-crawler-handling.md +257 -0
- package/rcode/skills/seo/technical-seo-checker/references/pre-migration-playbook.md +137 -0
- package/rcode/skills/seo/technical-seo-checker/references/robots-txt-reference.md +717 -0
- package/rcode/skills/seo/technical-seo-checker/references/technical-audit-example.md +169 -0
- package/rcode/skills/seo/technical-seo-checker/references/technical-audit-templates.md +436 -0
- package/rcode/templates/settings-hooks.json +4 -0
- package/rcode/workflows/do.md +16 -0
- package/rcode/workflows/execute-sprint.md +22 -0
- package/rcode/workflows/execute.md +17 -3
- package/rcode/workflows/help.md +0 -2
- package/rcode/workflows/new-milestone.md +21 -9
- package/rcode/workflows/new-project-create-roadmap.md +2 -0
- package/rcode/workflows/new-project-roadmap.md +2 -0
- package/rcode/workflows/new-project.md +3 -0
- package/rcode/workflows/plan.md +15 -2
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# AI Writing Detection
|
|
2
|
+
|
|
3
|
+
Words, phrases, and punctuation patterns commonly associated with AI-generated text. Avoid these to ensure writing sounds natural and human.
|
|
4
|
+
|
|
5
|
+
Sources: Grammarly (2025), Microsoft 365 Life Hacks (2025), GPTHuman (2025), Walter Writes (2025), Textero (2025), Plagiarism Today (2025), Rolling Stone (2025), MDPI Blog (2025)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
- Em Dashes: The Primary AI Tell
|
|
11
|
+
- Overused Verbs
|
|
12
|
+
- Overused Adjectives
|
|
13
|
+
- Overused Transitions and Connectors
|
|
14
|
+
- Phrases That Signal AI Writing (Opening Phrases, Transitional Phrases, Concluding Phrases, Structural Patterns)
|
|
15
|
+
- Filler Words and Empty Intensifiers
|
|
16
|
+
- Academic-Specific AI Tells
|
|
17
|
+
- How to Self-Check
|
|
18
|
+
|
|
19
|
+
## Em Dashes: The Primary AI Tell
|
|
20
|
+
|
|
21
|
+
**The em dash (—) has become one of the most reliable markers of AI-generated content.**
|
|
22
|
+
|
|
23
|
+
Em dashes are longer than hyphens (-) and are used for emphasis, interruptions, or parenthetical information. While they have legitimate uses in writing, AI models drastically overuse them.
|
|
24
|
+
|
|
25
|
+
### Why Em Dashes Signal AI Writing
|
|
26
|
+
- AI models were trained on edited books, academic papers, and style guides where em dashes appear frequently
|
|
27
|
+
- AI uses em dashes as a shortcut for sentence variety instead of commas, colons, or parentheses
|
|
28
|
+
- Most human writers rarely use em dashes because they don't exist as a standard keyboard key
|
|
29
|
+
- The overuse is so consistent that it has become the unofficial signature of ChatGPT writing
|
|
30
|
+
|
|
31
|
+
### What To Do Instead
|
|
32
|
+
| Instead of | Use |
|
|
33
|
+
|------------|-----|
|
|
34
|
+
| The results—which were surprising—showed... | The results, which were surprising, showed... |
|
|
35
|
+
| This approach—unlike traditional methods—allows... | This approach, unlike traditional methods, allows... |
|
|
36
|
+
| The study found—as expected—that... | The study found, as expected, that... |
|
|
37
|
+
| Communication skills—both written and verbal—are essential | Communication skills (both written and verbal) are essential |
|
|
38
|
+
|
|
39
|
+
### Guidelines
|
|
40
|
+
- Use commas for most parenthetical information
|
|
41
|
+
- Use colons to introduce explanations or lists
|
|
42
|
+
- Use parentheses for supplementary information
|
|
43
|
+
- Reserve em dashes for rare, deliberate emphasis only
|
|
44
|
+
- If you find yourself using more than one em dash per page, revise
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Overused Verbs
|
|
49
|
+
|
|
50
|
+
| Avoid | Use Instead |
|
|
51
|
+
|-------|-------------|
|
|
52
|
+
| delve (into) | explore, examine, investigate, look at |
|
|
53
|
+
| leverage | use, apply, draw on |
|
|
54
|
+
| optimise | improve, refine, enhance |
|
|
55
|
+
| utilise | use |
|
|
56
|
+
| facilitate | help, enable, support |
|
|
57
|
+
| foster | encourage, support, develop, nurture |
|
|
58
|
+
| bolster | strengthen, support, reinforce |
|
|
59
|
+
| underscore | emphasise, highlight, stress |
|
|
60
|
+
| unveil | reveal, show, introduce, present |
|
|
61
|
+
| navigate | manage, handle, work through |
|
|
62
|
+
| streamline | simplify, make more efficient |
|
|
63
|
+
| enhance | improve, strengthen |
|
|
64
|
+
| endeavour | try, attempt, effort |
|
|
65
|
+
| ascertain | find out, determine, establish |
|
|
66
|
+
| elucidate | explain, clarify, make clear |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Overused Adjectives
|
|
71
|
+
|
|
72
|
+
| Avoid | Use Instead |
|
|
73
|
+
|-------|-------------|
|
|
74
|
+
| robust | strong, reliable, thorough, solid |
|
|
75
|
+
| comprehensive | complete, thorough, full, detailed |
|
|
76
|
+
| pivotal | key, critical, central, important |
|
|
77
|
+
| crucial | important, key, essential, critical |
|
|
78
|
+
| vital | important, essential, necessary |
|
|
79
|
+
| transformative | significant, important, major |
|
|
80
|
+
| cutting-edge | new, advanced, recent, modern |
|
|
81
|
+
| groundbreaking | new, original, significant |
|
|
82
|
+
| innovative | new, original, creative |
|
|
83
|
+
| seamless | smooth, easy, effortless |
|
|
84
|
+
| intricate | complex, detailed, complicated |
|
|
85
|
+
| nuanced | subtle, complex, detailed |
|
|
86
|
+
| multifaceted | complex, varied, diverse |
|
|
87
|
+
| holistic | complete, whole, comprehensive |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Overused Transitions and Connectors
|
|
92
|
+
|
|
93
|
+
| Avoid | Use Instead |
|
|
94
|
+
|-------|-------------|
|
|
95
|
+
| furthermore | also, in addition, and |
|
|
96
|
+
| moreover | also, and, besides |
|
|
97
|
+
| notwithstanding | despite, even so, still |
|
|
98
|
+
| that being said | however, but, still |
|
|
99
|
+
| at its core | essentially, fundamentally, basically |
|
|
100
|
+
| to put it simply | in short, simply put |
|
|
101
|
+
| it is worth noting that | note that, importantly |
|
|
102
|
+
| in the realm of | in, within, regarding |
|
|
103
|
+
| in the landscape of | in, within |
|
|
104
|
+
| in today's [anything] | currently, now, today |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Phrases That Signal AI Writing
|
|
109
|
+
|
|
110
|
+
### Opening Phrases to Avoid
|
|
111
|
+
- "In today's fast-paced world..."
|
|
112
|
+
- "In today's digital age..."
|
|
113
|
+
- "In an era of..."
|
|
114
|
+
- "In the ever-evolving landscape of..."
|
|
115
|
+
- "In the realm of..."
|
|
116
|
+
- "It's important to note that..."
|
|
117
|
+
- "Let's delve into..."
|
|
118
|
+
- "Imagine a world where..."
|
|
119
|
+
|
|
120
|
+
### Transitional Phrases to Avoid
|
|
121
|
+
- "That being said..."
|
|
122
|
+
- "With that in mind..."
|
|
123
|
+
- "It's worth mentioning that..."
|
|
124
|
+
- "At its core..."
|
|
125
|
+
- "To put it simply..."
|
|
126
|
+
- "In essence..."
|
|
127
|
+
- "This begs the question..."
|
|
128
|
+
|
|
129
|
+
### Concluding Phrases to Avoid
|
|
130
|
+
- "In conclusion..."
|
|
131
|
+
- "To sum up..."
|
|
132
|
+
- "By [doing X], you can [achieve Y]..."
|
|
133
|
+
- "In the final analysis..."
|
|
134
|
+
- "All things considered..."
|
|
135
|
+
- "At the end of the day..."
|
|
136
|
+
|
|
137
|
+
### Structural Patterns to Avoid
|
|
138
|
+
- "Whether you're a [X], [Y], or [Z]..." (listing three examples after "whether")
|
|
139
|
+
- "It's not just [X], it's also [Y]..."
|
|
140
|
+
- "Think of [X] as [elaborate metaphor]..."
|
|
141
|
+
- Starting sentences with "By" followed by a gerund: "By understanding X, you can Y..."
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Filler Words and Empty Intensifiers
|
|
146
|
+
|
|
147
|
+
These words often add nothing to meaning. Remove them or find specific alternatives:
|
|
148
|
+
|
|
149
|
+
- absolutely
|
|
150
|
+
- actually
|
|
151
|
+
- basically
|
|
152
|
+
- certainly
|
|
153
|
+
- clearly
|
|
154
|
+
- definitely
|
|
155
|
+
- essentially
|
|
156
|
+
- extremely
|
|
157
|
+
- fundamentally
|
|
158
|
+
- incredibly
|
|
159
|
+
- interestingly
|
|
160
|
+
- naturally
|
|
161
|
+
- obviously
|
|
162
|
+
- quite
|
|
163
|
+
- really
|
|
164
|
+
- significantly
|
|
165
|
+
- simply
|
|
166
|
+
- surely
|
|
167
|
+
- truly
|
|
168
|
+
- ultimately
|
|
169
|
+
- undoubtedly
|
|
170
|
+
- very
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Academic-Specific AI Tells
|
|
175
|
+
|
|
176
|
+
| Avoid | Use Instead |
|
|
177
|
+
|-------|-------------|
|
|
178
|
+
| shed light on | clarify, explain, reveal |
|
|
179
|
+
| pave the way for | enable, allow, make possible |
|
|
180
|
+
| a myriad of | many, numerous, various |
|
|
181
|
+
| a plethora of | many, numerous, several |
|
|
182
|
+
| paramount | very important, essential, critical |
|
|
183
|
+
| pertaining to | about, regarding, concerning |
|
|
184
|
+
| prior to | before |
|
|
185
|
+
| subsequent to | after |
|
|
186
|
+
| in light of | because of, given, considering |
|
|
187
|
+
| with respect to | about, regarding, for |
|
|
188
|
+
| in terms of | regarding, for, about |
|
|
189
|
+
| the fact that | that (or rewrite sentence) |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## How to Self-Check
|
|
194
|
+
|
|
195
|
+
1. Read your text aloud. If phrases sound unnatural in speech, revise them
|
|
196
|
+
2. Ask: "Would I say this in a conversation with a colleague?"
|
|
197
|
+
3. Check for repetitive sentence structures
|
|
198
|
+
4. Look for clusters of the words listed above
|
|
199
|
+
5. Ensure varied sentence lengths (not all similar length)
|
|
200
|
+
6. Verify each intensifier adds genuine meaning
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seo-content-factory
|
|
3
|
+
description: Autonomous SEO content-factory for LeadLyze — a 10-agent pipeline (competitor research → keyword expansion → clustering → briefs → writing → interlinking → programmatic page gen → schema → refresh → opportunity finding) that researches, clusters, writes, interlinks, and ships 2,000+ SEO pages into the Next.js marketing site. Runs in AUTO mode via herdr orchestration. Trigger when the user says "run the content factory", "build SEO pages", "content factory", "auto SEO", "generate 2000 pages", "programmatic SEO", "SEO auto mode", or invokes /seo-factory.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
target: "LeadLyze — the canonical `marketing/` site (Next.js 16 App Router, React 19, Tailwind v4). NOT marketing-v2..v5 (rejected redesigns)."
|
|
7
|
+
composes_with: ["herdr-orchestration", "autonomous-fix-campaign"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# SEO Content Factory
|
|
11
|
+
|
|
12
|
+
**You are not writing articles one page at a time. You are running a repeatable content-production *system*** that continuously discovers, clusters, briefs, writes, interlinks, and ships LeadLyze SEO pages — at the scale of 2,000+ pages — using Claude + Semrush MCP + herdr parallel agents.
|
|
13
|
+
|
|
14
|
+
This skill is the **factory floor**: the conveyor (the 10-agent pipeline), the machines (each agent's contract), and the auto-mode motor (herdr waves + heartbeat). It delegates *parallel-agent mechanics* to `herdr-orchestration` and the *auto-mode loop discipline* to `autonomous-fix-campaign`. **Read both before running in auto mode.**
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
**HARD-TRIGGER words — activate immediately:**
|
|
19
|
+
- `content factory`, `seo factory`, `/seo-factory`
|
|
20
|
+
- "build SEO pages", "generate 2000 pages", "programmatic SEO", "page factory"
|
|
21
|
+
- "auto SEO", "SEO auto mode", "run the SEO pipeline"
|
|
22
|
+
- "interlink the site", "content briefs at scale", "location/industry/comparison pages"
|
|
23
|
+
|
|
24
|
+
**Soft-trigger:** the user wants continuous organic-traffic growth for LeadLyze via *produced pages* (not just advice). For pure local-business / GBP / backlink advisory work, use `seo-growth-orchestrator` instead — this skill is the **production line**, that one is the **strategist**.
|
|
25
|
+
|
|
26
|
+
## Non-Negotiable Hard Rules
|
|
27
|
+
|
|
28
|
+
1. **Composes with `herdr-orchestration` + `autonomous-fix-campaign`.** Every golden rule of those skills applies verbatim: `cld` not `claude`, one worktree+branch per agent, work locally, **never push/deploy without explicit per-campaign consent**, durable backlog committed before wave 1, heartbeat never silent while agents work. Do not re-implement their mechanics here.
|
|
29
|
+
2. **BRIEFS BEFORE PROSE — hard gate.** The Writer agent (Agent 5) NEVER runs for a page that lacks an approved brief artifact on disk (`content/briefs/<slug>.md`). No brief → no article. This is the firewall against generic AI content. See `rules/quality-gates.md`.
|
|
30
|
+
3. **Evidence before generation.** Every keyword that enters the factory carries *real* Semrush/SERP data (volume, KD, intent, a live-SERP check), not an AI guess. AI-estimated volume is a hypothesis to verify, never ground truth.
|
|
31
|
+
4. **Data-driven for scale, MDX for craft.** 2,000 programmatic pages come from a JSON registry + `generateStaticParams` (100 cities × 20 services = 2,000 from ~5 data files) — NOT 2,000 hand-written MDX files. MDX is reserved for the ~100 editorial pages (alternatives, comparisons, cornerstone blog) where prose quality ranks. See `rules/programmatic-pages.md`.
|
|
32
|
+
5. **No duplicate/thin pages ship.** Every generated page passes the indexability gate (unique title+H1+intro, ≥ the cluster's min word floor, real internal links, valid schema) before it lands in the published set. Thin pages get `noindex` until enriched, not shipped raw. See `rules/quality-gates.md`.
|
|
33
|
+
6. **One source of truth per artifact.** Keywords live in `content/seo/keywords.csv`. Clusters in `content/seo/clusters.json`. The link graph in `content/seo/link-map.json`. Agents read/write these canonical files — never private copies that drift.
|
|
34
|
+
|
|
35
|
+
## The Pipeline (10 agents, 3 execution shapes)
|
|
36
|
+
|
|
37
|
+
The 10 agents are **not** 10 equal peers. They form a DAG with three distinct shapes:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
FUNNEL (sequential — each consumes the prior's artifact)
|
|
41
|
+
A1 Competitor Research ─▶ A2 Keyword Expansion ─▶ A3 Sitemap Architect ─▶ A4 Brief Generator
|
|
42
|
+
│
|
|
43
|
+
FAN-OUT (parallel per-cluster — the herdr wave engine) ▼
|
|
44
|
+
┌──────────────┬──────────────┬──────────────┐
|
|
45
|
+
A5 Writer A6 Interlinker A7 Programmatic A8 Schema
|
|
46
|
+
└──────────────┴──────────────┴──────────────┘
|
|
47
|
+
│
|
|
48
|
+
▼ MDX + data registry + routes → marketing
|
|
49
|
+
LOOP (recurring cron — never "done")
|
|
50
|
+
A9 Content Refresh (weekly) A10 Opportunity Finder (daily) ──▶ append to BACKLOG → re-enter A4
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| # | Agent | Shape | Consumes | Produces | Detail |
|
|
54
|
+
|---|-------|-------|----------|----------|--------|
|
|
55
|
+
| 1 | Competitor Research | funnel | seed domains | `competitors.csv` (keyword,type,intent,traffic,funnel) | `rules/agents.md` |
|
|
56
|
+
| 2 | Keyword Expansion | funnel | seeds + competitors.csv | `keywords.csv` (thousands) | `rules/agents.md` |
|
|
57
|
+
| 3 | Sitemap Architect | funnel | keywords.csv | `clusters.json` (hub→spoke tree) | `rules/agents.md` |
|
|
58
|
+
| 4 | Brief Generator | funnel | clusters.json | `briefs/<slug>.md` | `rules/agents.md` |
|
|
59
|
+
| 5 | Content Writer | fan-out | one brief | `content/<type>/<slug>.mdx` | `rules/agents.md` |
|
|
60
|
+
| 6 | Internal Linker | fan-out | all pages + link-map | 10 in + 10 out links/page → `link-map.json` | `rules/agents.md` |
|
|
61
|
+
| 7 | Programmatic Generator | fan-out | clusters.json (data type) | `content/data/*.json` + route templates | `rules/programmatic-pages.md` |
|
|
62
|
+
| 8 | Schema Agent | fan-out | each page | JSON-LD via `src/lib/jsonld.ts` | `rules/programmatic-pages.md` |
|
|
63
|
+
| 9 | Content Refresh | loop (weekly) | GSC + live pages | updated stats/links/examples | `rules/weekly-cadence.md` |
|
|
64
|
+
| 10 | Opportunity Finder | loop (daily) | competitor deltas | new briefs → BACKLOG | `rules/weekly-cadence.md` |
|
|
65
|
+
|
|
66
|
+
Full per-agent prompts (hardened, self-contained, paste-into-pane) live in `templates/agent-prompts/`.
|
|
67
|
+
|
|
68
|
+
## Auto Mode — the Run Loop
|
|
69
|
+
|
|
70
|
+
When the user says "auto" / "run the factory", execute this loop. It is `autonomous-fix-campaign`'s wave engine, specialized for content:
|
|
71
|
+
|
|
72
|
+
**Phase 0 — Setup (orchestrator, once)**
|
|
73
|
+
1. Confirm the heartbeat path with the user (`/loop`, `/schedule` cron, or manual ping) — never claim a wakeup you can't fire. (autonomous-fix-campaign rule 2.)
|
|
74
|
+
2. Confirm push/deploy policy. Default: **local only, no push** until explicitly approved.
|
|
75
|
+
3. Seed the durable backlog: `cp templates/BACKLOG.md <marketing>/.planning/seo-factory/BACKLOG.md`, commit it.
|
|
76
|
+
4. Establish the content layer in marketing if absent (content dirs, route templates, mdx loader) — see `rules/programmatic-pages.md`. Capture `pnpm tsc --noEmit | grep -c "error TS"` baseline.
|
|
77
|
+
|
|
78
|
+
**Phase 1 — Funnel (sequential, orchestrator-run or single agent)**
|
|
79
|
+
Run A1→A2→A3→A4 in order. These are cheap, Semrush-MCP-bound, and each gates the next. Output: `keywords.csv`, `clusters.json`, and a `briefs/` directory. **Do NOT parallelize the funnel** — A3 needs all of A2, A4 needs all of A3.
|
|
80
|
+
|
|
81
|
+
> **First-run default (DECIDED 2026-06-14):** start with **editorial money pages**
|
|
82
|
+
> (alternative + comparison clusters — highest commercial intent) in the first waves, THEN
|
|
83
|
+
> the programmatic service×city/industry engine. Editorial channel uses **`next-mdx-remote`**.
|
|
84
|
+
|
|
85
|
+
**Phase 2 — Fan-out waves (herdr, the volume engine)**
|
|
86
|
+
For each batch of N clusters (3–5 per wave), spin a herdr worktree+pane per cluster and run the **Writer→Interlinker→Schema** sub-chain on that cluster's pages. Programmatic (A7) clusters skip the Writer and run the data-registry path instead. Merge each wave into the integration branch before the next wave forks. Heartbeat every 10–15 min; never go silent. (Full mechanics: `rules/herdr-wave-mapping.md`.)
|
|
87
|
+
|
|
88
|
+
**Phase 3 — Gate + integrate**
|
|
89
|
+
Run the indexability gate (`rules/quality-gates.md`) across the wave's pages. Failures → `noindex` + re-brief, not ship. `pnpm tsc --noEmit` must not exceed baseline. Merge integration branch → master only with explicit user consent.
|
|
90
|
+
|
|
91
|
+
**Phase 4 — Loop (recurring)**
|
|
92
|
+
A9 (weekly refresh) + A10 (daily opportunity finder) append new work to BACKLOG → re-enter Phase 1's A4 for the new briefs. The factory never "finishes" — it idles between waves.
|
|
93
|
+
|
|
94
|
+
## Targets (set expectations honestly)
|
|
95
|
+
|
|
96
|
+
| Window | Pages | Mix |
|
|
97
|
+
|--------|-------|-----|
|
|
98
|
+
| Month 1 | 200 | programmatic location/industry + 20 cornerstone |
|
|
99
|
+
| Month 2 | 500 | + alternative/comparison pages |
|
|
100
|
+
| Month 3 | 1,000+ | + statistics/template/tool/question pages |
|
|
101
|
+
|
|
102
|
+
Programmatic pages can index in weeks; cornerstone editorial is a 60–180 day payoff. Say this to the user — don't promise rankings in 30 days.
|
|
103
|
+
|
|
104
|
+
## Integration (granular skills this factory calls)
|
|
105
|
+
|
|
106
|
+
- **Keyword/cluster mechanics:** `keyword-research`, `serp-analysis`, `competitor-analysis`, `content-gap-analysis`, `claude-seo:seo-cluster`
|
|
107
|
+
- **Writing/on-page:** `seo-content-writer`, `on-page-seo-auditor`, `meta-tags-optimizer`, `claude-seo:seo-content`
|
|
108
|
+
- **Links/schema/build:** `internal-linking-optimizer`, `schema-markup-generator`, `seo-site-builder`, `claude-seo:seo-schema`, `claude-seo:seo-sitemap`
|
|
109
|
+
- **Data:** **Semrush MCP** (`keyword_research`, `organic_research`, `overview_research`, `backlink_research`, `url_research`), GSC via browser/`browser-harness`.
|
|
110
|
+
- **Strategy layer:** `seo-growth-orchestrator` for the judgment/plays around the production.
|
|
111
|
+
|
|
112
|
+
## File References
|
|
113
|
+
- **Pipeline DAG + data contracts**: `rules/pipeline.md`
|
|
114
|
+
- **The 10 agent specs (hardened)**: `rules/agents.md`
|
|
115
|
+
- **herdr wave mapping (fan-out engine)**: `rules/herdr-wave-mapping.md`
|
|
116
|
+
- **Programmatic pages + marketing wiring**: `rules/programmatic-pages.md`
|
|
117
|
+
- **Quality gates (briefs-first, anti-thin, indexability)**: `rules/quality-gates.md`
|
|
118
|
+
- **Weekly cadence + 90-day plan + A9/A10 loop**: `rules/weekly-cadence.md`
|
|
119
|
+
- **Artifact templates**: `templates/` (CSV/JSON/MDX/route/schema)
|
|
120
|
+
- **Paste-ready agent prompts**: `templates/agent-prompts/`
|
|
121
|
+
|
|
122
|
+
## Validation Checklist
|
|
123
|
+
- [ ] Confirmed heartbeat path + push policy with user (Phase 0)
|
|
124
|
+
- [ ] Durable `BACKLOG.md` committed before wave 1
|
|
125
|
+
- [ ] Funnel (A1–A4) ran sequentially; `keywords.csv` + `clusters.json` exist
|
|
126
|
+
- [ ] No Writer ran without a brief on disk (briefs-first gate held)
|
|
127
|
+
- [ ] Programmatic pages use the data registry, not 2,000 MDX files
|
|
128
|
+
- [ ] Every shipped page passed the indexability gate (unique, word floor, links, schema)
|
|
129
|
+
- [ ] `pnpm tsc --noEmit` did not exceed baseline after each wave merge
|
|
130
|
+
- [ ] No push/deploy without explicit user consent
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# The 10 Agents (hardened specs)
|
|
2
|
+
|
|
3
|
+
The user's original prompts were directionally right but too loose to run autonomously.
|
|
4
|
+
These are the hardened versions: each states its **input file**, **output file**, **tools**,
|
|
5
|
+
and **acceptance check**. Paste-ready copies are in `templates/agent-prompts/`.
|
|
6
|
+
|
|
7
|
+
Every agent prompt ends with the same two lines (the factory's discipline):
|
|
8
|
+
> Pull REAL data from Semrush MCP / live SERP before asserting numbers — never invent volume/KD.
|
|
9
|
+
> Write your output to the canonical file path. Do not print results only to chat.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## A1 — Competitor Research (funnel)
|
|
14
|
+
- **In:** seed domains (LeadLyze + 3–5 named competitors, e.g. apollo.io, instantly.ai, lemlist.com).
|
|
15
|
+
- **Tools:** Semrush `organic_research`, `overview_research`, `backlink_research`; `competitor-analysis` skill; web search.
|
|
16
|
+
- **Out:** `.planning/seo-factory/competitors.csv` → `keyword,type,intent,traffic,funnel,source_url,competitor`.
|
|
17
|
+
- **Task:** For each competitor pull top organic pages by traffic. Classify each into `type` ∈ industry / location / alternative / comparison / statistics / template / tool / blog. Tag `intent` and `funnel`. Keep rows where LeadLyze could plausibly compete.
|
|
18
|
+
- **Accept:** ≥200 rows, every row has a real `source_url` and a Semrush-sourced `traffic` estimate.
|
|
19
|
+
|
|
20
|
+
## A2 — Keyword Expansion (funnel)
|
|
21
|
+
- **In:** seeds + `competitors.csv`.
|
|
22
|
+
- **Tools:** Semrush `keyword_research` (broad match, related, questions); `keyword-research` skill.
|
|
23
|
+
- **Out:** `.planning/seo-factory/keywords.csv` (schema in `pipeline.md`).
|
|
24
|
+
- **Task:** Expand each seed across the 8 modifier axes — industry, location, alternative, comparison, template, statistics, question, tool. Pull volume + KD for each from Semrush. Drop volume<10 OR KD>70 unless it's a money term. De-dupe.
|
|
25
|
+
- **Accept:** thousands of rows, each with real volume+kd, `modifier_type` set, no dupes.
|
|
26
|
+
|
|
27
|
+
## A3 — Sitemap Architect (funnel)
|
|
28
|
+
- **In:** `keywords.csv`.
|
|
29
|
+
- **Tools:** `claude-seo:seo-cluster` (SERP-overlap clustering), `serp-analysis`.
|
|
30
|
+
- **Out:** `.planning/seo-factory/clusters.json` (schema in `pipeline.md`) + assigns `cluster_id` back into `keywords.csv`.
|
|
31
|
+
- **Task:** Cluster by SERP overlap into hub-and-spoke topics. Mark each spoke `page_kind: programmatic | editorial` and `type: money | supporting | blog`. Programmatic = high-volume templated dimensions (service×city, service×industry). Editorial = where prose ranks (alternatives, comparisons, cornerstone).
|
|
32
|
+
- **Accept:** every keyword belongs to exactly one cluster; each hub has a hub page + ≥3 spokes; programmatic clusters declare their `dimensions`.
|
|
33
|
+
|
|
34
|
+
## A4 — Content Brief Generator (funnel — the GATE feeder)
|
|
35
|
+
- **In:** one `editorial` cluster from `clusters.json`.
|
|
36
|
+
- **Tools:** `serp-analysis` (read top-5 live SERP pages), `content-gap-analysis`.
|
|
37
|
+
- **Out:** `.planning/seo-factory/briefs/<slug>.md` (template: `content-brief.md`), `status: approved`.
|
|
38
|
+
- **Task:** From the live top-5 SERP, extract the winning structure. Produce: title, meta, search intent, full H2/H3 outline, FAQ block, entities to cover, target internal links (from `link-map`/clusters), CTA, schema type, min word count. **Programmatic clusters skip A4** (they get a data record, not a brief).
|
|
39
|
+
- **Accept:** brief covers every entity the top-5 cover + 1 unique angle LeadLyze can own; marked approved.
|
|
40
|
+
|
|
41
|
+
## A5 — Content Writer (fan-out)
|
|
42
|
+
- **In:** ONE approved `briefs/<slug>.md`. **Refuses to run without it.**
|
|
43
|
+
- **Tools:** `seo-content-writer`, `on-page-seo-auditor`, `meta-tags-optimizer`.
|
|
44
|
+
- **Out:** `src/content/<type>/<slug>.mdx` (template: `article.mdx`).
|
|
45
|
+
- **Task:** Write strictly to the brief. Requirements: original LeadLyze examples + real use cases, ≥1 data table, real statistics (cited), FAQ section, the brief's internal links inline, the meta + frontmatter. **Anti-generic rules (`quality-gates.md`) are mandatory** — no "in today's fast-paced world", no filler intros, no unsupported claims.
|
|
46
|
+
- **Accept:** matches brief outline 1:1, ≥ brief's min words, passes `on-page-seo-auditor`, frontmatter valid.
|
|
47
|
+
|
|
48
|
+
## A6 — Internal Linker (fan-out — highest ROI)
|
|
49
|
+
- **In:** all existing pages (`src/content/**`, `src/data/seo/**`) + `link-map.json`.
|
|
50
|
+
- **Tools:** `internal-linking-optimizer`.
|
|
51
|
+
- **Out:** updates `link-map.json` + injects links into pages.
|
|
52
|
+
- **Task:** For each new page propose ≥10 inbound (from relevant existing pages) + ≥10 outbound, with **keyword-varied anchors** (never the same anchor twice). Prefer same-cluster + hub↔spoke links. Apply edits and record in `link-map.json`.
|
|
53
|
+
- **Accept:** every shipped page has ≥10/≥10; no orphan pages; anchor diversity ratio >0.7.
|
|
54
|
+
|
|
55
|
+
## A7 — Programmatic Page Generator (fan-out — the 2,000-page engine)
|
|
56
|
+
- **In:** `programmatic` clusters from `clusters.json`.
|
|
57
|
+
- **Out:** `src/data/seo/{services,cities,industries}.ts` + route template under `src/app/(seo)/...`. See `programmatic-pages.md`.
|
|
58
|
+
- **Task:** Build the dimension registries (TS, typed) and a single dynamic route per pattern with `generateStaticParams` looping the cross-product. 100 cities × 20 services = 2,000 pages from ~5 files. Each page: Hero, Benefits, Case Studies, Pricing, FAQ, CTA — composed from data, never duplicated boilerplate prose (see thin-content gate).
|
|
59
|
+
- **Accept:** `pnpm build` statically generates the full cross-product; spot-checked pages have unique title/H1/intro; no tsc errors.
|
|
60
|
+
|
|
61
|
+
## A8 — Schema Agent (fan-out)
|
|
62
|
+
- **In:** each generated page.
|
|
63
|
+
- **Tools:** `schema-markup-generator`, `claude-seo:seo-schema`; existing `src/lib/jsonld.ts`.
|
|
64
|
+
- **Out:** JSON-LD injected per page via `jsonld.ts` helpers.
|
|
65
|
+
- **Task:** Emit the right schema per page type — FAQPage, SoftwareApplication, Product, Review/AggregateRating, BreadcrumbList. Extend `src/lib/jsonld.ts` with typed builders; do not hand-write raw `<script>` blobs.
|
|
66
|
+
- **Accept:** every page validates against schema.org; types match page intent.
|
|
67
|
+
|
|
68
|
+
## A9 — Content Refresh (loop — weekly)
|
|
69
|
+
- **In:** `gsc-deltas.csv` (pages losing position over 28 days).
|
|
70
|
+
- **Tools:** GSC via `browser-harness`/Chrome ext, Semrush, `serp-analysis`.
|
|
71
|
+
- **Out:** updated pages + refreshed stats/competitors/links/examples; `lastUpdated` bumped.
|
|
72
|
+
- **Task:** Find decaying pages, diff against current top-3 SERP, update stale stats, add new competitors/links/examples, refresh `dateModified`.
|
|
73
|
+
- **Accept:** each refreshed page's `dateModified` updated + a recorded diff of what changed.
|
|
74
|
+
|
|
75
|
+
## A10 — Opportunity Finder (loop — daily)
|
|
76
|
+
- **In:** competitor organic deltas (keywords they newly rank for that LeadLyze doesn't).
|
|
77
|
+
- **Tools:** Semrush `organic_research` (diff vs last run), web search.
|
|
78
|
+
- **Out:** appends new clusters to `BACKLOG.md` → re-enters A4.
|
|
79
|
+
- **Task:** Daily, find net-new competitor keywords not in `keywords.csv`. Prioritize by volume × intent × winnability. Auto-generate a brief stub for the top N and queue them.
|
|
80
|
+
- **Accept:** new opportunities deduped against `keywords.csv`; top-N briefed and queued, not just listed.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# herdr Wave Mapping — the fan-out engine
|
|
2
|
+
|
|
3
|
+
This is where the factory **composes with `herdr-orchestration` + `autonomous-fix-campaign`**.
|
|
4
|
+
Read both first. This file only adds the *content-specific* mapping: how clusters become
|
|
5
|
+
waves, what each pane runs, and how pages merge back.
|
|
6
|
+
|
|
7
|
+
## The mapping
|
|
8
|
+
|
|
9
|
+
- **1 cluster = 1 worktree = 1 branch = 1 pane.** Not 1 page per pane (too granular) and
|
|
10
|
+
not 1 wave per page-type (too coarse). A cluster is the right unit: it's self-contained
|
|
11
|
+
(shared keyword theme + internal links stay within it), so two agents on two clusters
|
|
12
|
+
rarely touch the same files.
|
|
13
|
+
- **Wave = 3–5 clusters** (herdr 2×2 / 2×3 grid). Per `autonomous-fix-campaign`: merge each
|
|
14
|
+
wave into the **integration branch** (`seo-factory-integration`) before the next forks.
|
|
15
|
+
- **Funnel (A1–A4) is NOT a wave.** It runs once, sequentially, before any fan-out — usually
|
|
16
|
+
the orchestrator runs it directly or as a single `cld` agent. Fan-out waves consume its
|
|
17
|
+
`clusters.json` + `briefs/`.
|
|
18
|
+
|
|
19
|
+
## What a fan-out pane runs (the per-cluster sub-chain)
|
|
20
|
+
|
|
21
|
+
Each pane gets ONE self-contained prompt that runs A5→A6→A8 (or A7→A6→A8 for programmatic)
|
|
22
|
+
for its assigned cluster, in its own worktree:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Editorial cluster pane:
|
|
26
|
+
for each spoke in cluster:
|
|
27
|
+
A5 Writer → src/content/<type>/<slug>.mdx (requires briefs/<slug>.md)
|
|
28
|
+
A6 Interlinker → link the cluster's pages + ≥10/≥10 to existing pages, update link-map.json
|
|
29
|
+
A8 Schema → inject JSON-LD via src/lib/jsonld.ts
|
|
30
|
+
commit each page separately; write progress to .planning/seo-factory/AUDIT-<cluster>.md
|
|
31
|
+
|
|
32
|
+
Programmatic cluster pane:
|
|
33
|
+
A7 → build/extend src/data/seo/<dimension>.ts + the route template
|
|
34
|
+
A6 → wire hub↔spoke + cross-links
|
|
35
|
+
A8 → schema builders for the templated page type
|
|
36
|
+
node --check touched files; commit; record page count
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Per `feedback_no_build_in_child_agents`: **child panes never run `pnpm build`/`tsc`/`dev`/install** —
|
|
40
|
+
they `node --check` only. The orchestrator runs the single central `pnpm tsc --noEmit` after merge.
|
|
41
|
+
|
|
42
|
+
## Worktree setup (per herdr-orchestration §2)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd /home/hanzla/development/teaching/schedule-manager/marketing
|
|
46
|
+
mkdir -p ../seo-worktrees
|
|
47
|
+
for C in cluster-a cluster-b cluster-c cluster-d; do
|
|
48
|
+
git worktree add "../seo-worktrees/$C" -b "seo-$C" seo-factory-integration
|
|
49
|
+
ln -s "$PWD/node_modules" "../seo-worktrees/$C/node_modules" # so node --check resolves
|
|
50
|
+
done
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## The orchestrator loop (per wave)
|
|
54
|
+
|
|
55
|
+
1. Pop 3–5 `pending` clusters from `BACKLOG.md`; mark `in_wave`.
|
|
56
|
+
2. Create worktrees + a herdr tab with one pane per cluster (herdr-orchestration §3).
|
|
57
|
+
3. Launch `cld` in each pane, send the matching `templates/agent-prompts/` prompt with the
|
|
58
|
+
cluster id + slug list filled in.
|
|
59
|
+
4. Heartbeat every 10–15 min (`ScheduleWakeup` under `/loop`, else honest manual ping per
|
|
60
|
+
autonomous-fix-campaign rule 2). **Never silent while panes are `working`.**
|
|
61
|
+
5. On all-`idle`: commit each worktree's `AUDIT-<cluster>.md`, merge `seo-$C` →
|
|
62
|
+
`seo-factory-integration` (keep superset side on conflict), mark clusters `linked`.
|
|
63
|
+
6. Run Phase-3 gates (`quality-gates.md`) + central `pnpm tsc --noEmit` (must not exceed
|
|
64
|
+
baseline). Passing clusters → `shipped`. Failing pages → `noindex` + re-brief.
|
|
65
|
+
7. Next wave forks from the now-updated integration branch.
|
|
66
|
+
|
|
67
|
+
## Conflict surface (low by design)
|
|
68
|
+
|
|
69
|
+
Because clusters are file-disjoint (`src/content/<type>/<slug>.mdx` is unique per spoke),
|
|
70
|
+
the only shared files are `link-map.json` and `src/data/seo/*.ts`. Mitigation:
|
|
71
|
+
- **link-map.json:** each pane writes ONLY its own cluster's keys; merge is a JSON object
|
|
72
|
+
union (orchestrator resolves by keeping both key sets).
|
|
73
|
+
- **src/data/seo/*.ts:** assign each programmatic dimension to ONE pane per wave so two panes
|
|
74
|
+
never append to `cities.ts` simultaneously. If unavoidable, serialize those clusters.
|
|
75
|
+
|
|
76
|
+
## Push / deploy
|
|
77
|
+
|
|
78
|
+
Per all three skills' hard rules + `feedback_no_push_without_consent`: the entire campaign
|
|
79
|
+
runs on local branches. Merge `seo-factory-integration` → `master` and any deploy
|
|
80
|
+
(`make brain`) happen **only on explicit user consent**, never mid-wave.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Pipeline & Data Contracts
|
|
2
|
+
|
|
3
|
+
The factory is a DAG of artifacts on disk. Agents are stateless — they read canonical
|
|
4
|
+
input files and write canonical output files. The files ARE the pipeline; an agent that
|
|
5
|
+
dies mid-wave is restartable because its inputs survived on disk.
|
|
6
|
+
|
|
7
|
+
## Canonical files (single source of truth)
|
|
8
|
+
|
|
9
|
+
Pipeline state lives under `<marketing>/.planning/seo-factory/` (factory working files,
|
|
10
|
+
gitignored except the backlog). Shipped content honors the site's **existing conventions**:
|
|
11
|
+
programmatic data as **typed TS modules in `src/data/`** (the site already stores
|
|
12
|
+
case-studies/faq/features/pricing this way), editorial as **MDX** (the blog `[slug]` shell
|
|
13
|
+
explicitly says "fetch MDX/CMS content by slug").
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
.planning/seo-factory/ # factory working state (orchestrator-owned)
|
|
17
|
+
BACKLOG.md # cluster frontier: pending|briefed|written|linked|shipped
|
|
18
|
+
competitors.csv # A1 → keyword,type,intent,traffic,funnel,source_url,competitor
|
|
19
|
+
keywords.csv # A2 → keyword,parent_seed,modifier_type,volume,kd,intent,funnel,cluster_id
|
|
20
|
+
clusters.json # A3 → hub-and-spoke topic tree (see schema below)
|
|
21
|
+
link-map.json # A6 → { slug: { inbound:[{from,anchor}], outbound:[{to,anchor}] } }
|
|
22
|
+
gsc-deltas.csv # A9/A10 → page,query,clicks,impressions,position,delta_28d
|
|
23
|
+
briefs/<slug>.md # A4 — the brief-before-prose GATE artifact
|
|
24
|
+
|
|
25
|
+
src/data/seo/ # A7 programmatic registries (matches src/data convention)
|
|
26
|
+
services.ts # [{slug,name,benefits,painPoints,...}] typed export
|
|
27
|
+
cities.ts # [{slug,name,region,population,...}]
|
|
28
|
+
industries.ts # [{slug,name,...}]
|
|
29
|
+
src/content/ # A5 editorial MDX (the blog's stated CMS direction)
|
|
30
|
+
blog/<slug>.mdx # cornerstone, statistics, question pages
|
|
31
|
+
alternatives/<slug>.mdx # "<competitor> alternative" money pages
|
|
32
|
+
comparisons/<slug>.mdx # "<x> vs LeadLyze" pages
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Convention rule:** programmatic dimensions are TS (typed, imported by route templates +
|
|
36
|
+
`generateStaticParams`); editorial bodies are MDX (loaded by a small `src/lib/mdx.ts` loader).
|
|
37
|
+
Do NOT introduce a CMS, contentlayer, or a DB — the site is statically generated.
|
|
38
|
+
|
|
39
|
+
## Artifact schemas
|
|
40
|
+
|
|
41
|
+
### keywords.csv (A2 output — the factory's raw material)
|
|
42
|
+
```csv
|
|
43
|
+
keyword,parent_seed,modifier_type,volume,kd,intent,funnel,cluster_id
|
|
44
|
+
lead generation for dentists,lead generation software,industry,720,34,commercial,buy,ind-dentists
|
|
45
|
+
apollo alternative,lead generation software,alternative,2900,61,commercial,buy,alt-apollo
|
|
46
|
+
lead generation dubai,lead generation software,location,480,22,commercial,buy,loc-dubai
|
|
47
|
+
cold email open rate statistics,cold email,statistics,1300,18,informational,learn,stat-coldemail
|
|
48
|
+
```
|
|
49
|
+
- `modifier_type` ∈ `industry | location | alternative | comparison | template | statistics | question | tool | seed`
|
|
50
|
+
- `intent` ∈ `informational | commercial | transactional | navigational`
|
|
51
|
+
- `funnel` ∈ `learn | compare | buy`
|
|
52
|
+
- `cluster_id` assigned by A3, blank from A2.
|
|
53
|
+
|
|
54
|
+
### clusters.json (A3 output — the architecture)
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"hubs": [
|
|
58
|
+
{
|
|
59
|
+
"id": "lead-generation",
|
|
60
|
+
"title": "Lead Generation",
|
|
61
|
+
"hub_page": { "slug": "lead-generation", "type": "money", "keyword": "lead generation software" },
|
|
62
|
+
"spokes": [
|
|
63
|
+
{ "slug": "lead-generation-for-roofers", "type": "money", "keyword": "lead generation for roofers",
|
|
64
|
+
"page_kind": "editorial|programmatic", "min_words": 1200, "cluster_id": "ind-roofers" }
|
|
65
|
+
],
|
|
66
|
+
"page_kind": "programmatic",
|
|
67
|
+
"dimensions": { "service": "lead-generation", "vary_by": "industries.ts" }
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
- `page_kind: programmatic` → A7 generates via TS data registry + route template (no Writer). `editorial` → A4 brief + A5 Writer (MDX).
|
|
73
|
+
- `type` ∈ `money | supporting | blog`.
|
|
74
|
+
|
|
75
|
+
### .planning/seo-factory/briefs/<slug>.md (A4 output — the GATE)
|
|
76
|
+
See `templates/content-brief.md`. No `<slug>.mdx` may be written by A5 unless its brief exists and is marked `status: approved`.
|
|
77
|
+
|
|
78
|
+
### article frontmatter (A5 output)
|
|
79
|
+
See `templates/article.mdx`. Required frontmatter: `title, description, slug, cluster_id, type, keyword, intent, published, schema, internalLinks`.
|
|
80
|
+
|
|
81
|
+
### link-map.json (A6 output — where most SEO wins happen)
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"lead-generation-for-roofers": {
|
|
85
|
+
"inbound": [{ "from": "lead-generation", "anchor": "lead gen for roofing companies" }],
|
|
86
|
+
"outbound": [{ "to": "cold-calling-for-roofers", "anchor": "cold calling scripts for roofers" }]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
Target: ≥10 inbound + ≥10 outbound per page, anchors keyword-varied (never all identical).
|
|
91
|
+
|
|
92
|
+
## Execution shapes (why the DAG matters)
|
|
93
|
+
|
|
94
|
+
- **Funnel (A1–A4): strictly sequential.** A3 needs ALL of A2 to cluster correctly; A4 needs ALL of A3. Parallelizing the funnel produces incoherent clusters. Run it as ONE agent (or the orchestrator directly) end-to-end.
|
|
95
|
+
- **Fan-out (A5–A8): embarrassingly parallel per cluster.** This is the herdr wave engine — one worktree per cluster, Writer→Interlinker→Schema sub-chain. See `herdr-wave-mapping.md`.
|
|
96
|
+
- **Loop (A9–A10): recurring, never terminal.** Cron-shaped. Feed deltas back to A4. See `weekly-cadence.md`.
|
|
97
|
+
|
|
98
|
+
## Restartability
|
|
99
|
+
|
|
100
|
+
Because every stage persists to a canonical file, a crashed wave resumes by re-reading
|
|
101
|
+
the file. The BACKLOG tracks which clusters are `pending | briefed | written | linked |
|
|
102
|
+
shipped` so the orchestrator always knows the frontier after auto-compact.
|