Unified Development Plan — Auctor Production Readiness
Quick Reference
| Phase | Group | Parallel With | Owns (files/dirs) | What It Does | Size |
|---|---|---|---|---|---|
| 1 | 1A | 1B, 1C | frontend/app/api/mcp/route.ts, frontend/package.json | Fix production build failure | S |
| 1 | 1B | 1A, 1C | frontend/src/mastra/workflows/content-engine-workflows.ts (publish status only) | Fix published_stub → real publish status | S |
| 1 | 1C | 1A, 1B | frontend/src/content-engine/services/competitor-crawl.ts, frontend/src/content-engine/db/repositories.ts (owned-domain sync path only) | Fix owned-domain sync to write our_page documents | S |
| 2 | 2A | 2B, 2C | frontend/skills-seed/consul-voice/, frontend/skills-seed/draft-structure/, frontend/skills-seed/brief-writing/, frontend/skills-seed/seo-checklist/ | Author 4 priority skills (voice, structure, SEO, briefs) | L |
| 2 | 2B | 2A, 2C | frontend/skills-seed/content-planning/, frontend/skills-seed/competitive-analysis/, frontend/skills-seed/serp-interpretation/ | Author 3 research & planning skills | M |
| 2 | 2C | 2A, 2B | frontend/skills-seed/cms-publishing/, frontend/skills-seed/post-publish-ops/, frontend/scripts/seed-skills.ts | Author 2 publishing skills + seed script | M |
| 3 | 3A | — | CLAUDE.md | Integration verification script + CLAUDE.md update | M |
Executive Summary
Auctor is a content engine that drives a full pipeline—strategy → brief → draft → publish—for the Consul website. All 3 workflows, 42 MCP tools, HITL gates, SEO validation, and Consul publishing are implemented and wired. However, the system cannot launch: the production build is broken, the data pipeline is empty, all 9 agent skills are missing, and several status/classification bugs make the operator experience misleading.
This playbook resolves the code-level blockers across 3 phases with a maximum of 3 parallel agents per phase (7 total work units). Phase 1 fixes the 3 code bugs that block any launch. Phase 2 authors the 9 skills the agent needs for quality output and creates a seed script. Phase 3 updates CLAUDE.md with lessons learned and produces a verification checklist. After all 3 phases, the operator still needs to perform manual steps (API keys, competitor crawls, data population) documented in the Done section.
Key decisions made during synthesis:
- Documents 4 and 6 are identical—treated as a single source (5 unique audits total).
- All 5 audits agree on the build failure, empty data pipeline, missing skills, and no image pipeline. The image pipeline is explicitly deferred to post-launch (text-first publishing).
- Audits 2 & 3 report
ANTHROPIC_API_KEYas missing; Audits 4 & 5 say "likely set" (agent sessions exist). Resolution: treat as an operational verification step, not a code fix. - The
extraction_configsmigration (0003) is flagged by Audit 3 only. Resolution: include as a manual step since it's a single SQL file, not a code change.
Phase 1: Critical Code Fixes
What This Phase Accomplishes
Unblocks the production build, fixes misleading publish status, and corrects document classification for owned-domain content. These are the 3 code-level P0 blockers that every audit identified.
Parallel Groups
All 3 groups run simultaneously. They touch completely different files.
Dashboard
| Group | Status | Key Files |
|---|---|---|
| 1A: Fix Production Build | ☐ | frontend/app/api/mcp/route.ts, frontend/package.json |
| 1B: Fix Publish Status | ☐ | frontend/src/mastra/workflows/content-engine-workflows.ts |
| 1C: Fix Owned-Domain Sync | ☐ | frontend/src/content-engine/services/competitor-crawl.ts, frontend/src/content-engine/db/repositories.ts |
Group 1A: Fix Production Build
Parallel With: 1B, 1C Depends On: Nothing Size: S
Prompt
1# [Phase 1, Group 1A]: Fix Production Build Failure
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a Next.js 16 content engine (TypeScript, pnpm monorepo).
10The production build (`pnpm build`) fails because `frontend/app/api/mcp/route.ts`
11imports `@mastra/mcp` and `fetch-to-node`, but these packages are not present in
12`frontend/node_modules` despite being declared in `frontend/package.json` and
13`pnpm-lock.yaml`.
14
15**Tech stack:** Next.js 16.1.6, pnpm workspace, TypeScript, Mastra framework.
16
17**Note:** `frontend/next.config.mjs` sets `typescript.ignoreBuildErrors = true`,
18so TypeScript errors won't break the build — but the missing module resolution does.
19
20## Your Task
21
22Fix the production build so `pnpm build` passes. There are two valid approaches
23(investigate and choose the best one):
24
25**Option A — Install the missing packages:**
26Check if `@mastra/mcp` and `fetch-to-node` are declared in `frontend/package.json`.
27If yes, the issue may be a pnpm install problem. Run `pnpm install` in the
28frontend directory and verify the packages resolve. If they install correctly,
29the build should pass.
30
31**Option B — Remove or gate the route:**
32If the packages cannot be installed (e.g., they don't exist in the registry,
33version conflicts, etc.), remove or conditionally exclude
34`frontend/app/api/mcp/route.ts` from the production build. Options include:
35- Wrapping the route in a dynamic import with a try/catch
36- Moving the route behind an environment flag
37- Removing the route entirely if it's not launch-critical
38 (the MCP server is used for tool exposure but is not required for the
39 core content pipeline: strategy → brief → draft → publish)
40
41The `/api/mcp` route failure also poisons sibling API routes in the
42content-engine namespace (they return 500). Fixing this route unblocks
43ALL content-engine API routes.
44
45## Scope
46
47**You own:**
48- `frontend/app/api/mcp/route.ts`
49- `frontend/package.json` (only dependency additions/removals for the MCP route)
50
51**Do NOT touch:**
52- Any file in `frontend/src/mastra/workflows/` (owned by Group 1B)
53- Any file in `frontend/src/content-engine/services/competitor-crawl.ts` (owned by Group 1C)
54- Any file in `frontend/src/content-engine/db/repositories.ts` (owned by Group 1C)
55- Any workflow, tool, or agent definition files
56
57## Requirements
58
591. `pnpm build` passes with exit code 0.
602. If Option A: `@mastra/mcp` and `fetch-to-node` resolve correctly in node_modules.
613. If Option B: The `/api/mcp` route either doesn't exist or gracefully handles
62 the missing dependency without crashing sibling routes.
634. All existing content-engine API routes (`/api/content-engine/*`) must not
64 return 500 errors caused by this route's compilation failure.
655. No regressions to `pnpm test:frontend` (currently 21 files, 43 tests passing).
66
67## Patterns to Follow
68
69- Check `frontend/package.json` for the dependency declarations first.
70- Check `pnpm-lock.yaml` to see if the packages have valid resolution entries.
71- If gating the route, use Next.js dynamic import patterns:
72 ```typescript
73 // Example: lazy load with fallback
74 export async function POST(req: Request) {
75 try {
76 const { MCPServer } = await import('@mastra/mcp');
77 // ... route logic
78 } catch {
79 return new Response('MCP server not available', { status: 503 });
80 }
81 }Verification
Before you're done, run and fix any failures:
1cd frontend && pnpm install
2pnpm build
3pnpm test:frontendAll checks must pass before you consider your work complete.
1##### Verify
2
3```bash
4cd frontend && pnpm build
5pnpm test:frontendDiff Review
- Must see:
frontend/app/api/mcp/route.tschanged or removed - Must verify:
pnpm buildexits 0; no 500 errors on/api/content-engine/readiness - Red flag: Agent modified workflow files, tool definitions, or agent configs
Group 1B: Fix Publish Status Semantics
Parallel With: 1A, 1C Depends On: Nothing Size: S
Prompt
1# [Phase 1, Group 1B]: Fix Publish Status Mismatch
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a content engine with a 6-step draft production workflow.
10The final step is called `publishStubStep` — but it actually performs a REAL
11publish to `consul.posts` via `publishDraftToConsul()`. Despite this, the
12workflow saves the draft status as `published_stub`, which is misleading.
13Operators cannot tell whether content was actually published.
14
15**Tech stack:** TypeScript, Mastra workflows with structured step definitions.
16
17**Key file:** `frontend/src/mastra/workflows/content-engine-workflows.ts`
18The `publishStubStep` is defined around lines 1117-1172. It:
191. Calls `publishDraftToConsul()` which writes to `consul.posts`, `consul.post_keywords`,
20 `consul.post_validations`, and `consul.post_relationships` — this is a REAL publish.
212. Then updates the draft status to `published_stub` — this is WRONG.
22
23The indexing provider IS stubbed (`StubIndexingProvider` in `runtime.ts`), but
24the Consul publish itself is real. The status should reflect that content was
25published, while noting that indexing is still manual.
26
27## Your Task
28
291. Rename `publishStubStep` to `publishStep` (or `publishToConsulStep`).
302. Change the draft status from `published_stub` to `published`.
313. Update the step's `id` field from `'publish-stub-step'` to `'publish-step'`
32 (or `'publish-to-consul-step'`).
334. Search for any references to `published_stub` as a status string or
34 `publish-stub-step` as a step ID throughout the codebase and update them.
35 Common locations:
36 - Dashboard page (`frontend/app/(app)/content/dashboard/page.tsx`) — may count
37 `published_stub` in pipeline metrics
38 - Draft review components
39 - Type definitions
40 - Workflow step references in the strategy or brief workflows
41
42## Scope
43
44**You own:**
45- `frontend/src/mastra/workflows/content-engine-workflows.ts` (the publishStubStep
46 and any references to the old status/step-id in this file)
47- Any file that references the string `published_stub` or `publish-stub-step`
48 (search the entire `frontend/` directory)
49
50**Do NOT touch:**
51- `frontend/app/api/mcp/route.ts` (owned by Group 1A)
52- `frontend/src/content-engine/services/competitor-crawl.ts` (owned by Group 1C)
53- `frontend/src/content-engine/db/repositories.ts` (owned by Group 1C for the
54 owned-domain sync fix — but you MAY read this file to understand the publish flow)
55- The actual `publishDraftToConsul()` function implementation (it works correctly)
56- `frontend/src/content-engine/runtime.ts` (the StubIndexingProvider is intentional
57 for now — do NOT change it)
58
59## Requirements
60
611. The step is renamed from `publishStubStep` to a name that reflects real publishing.
622. The step ID is updated from `publish-stub-step` to match the new name.
633. Draft status after successful publish is `published` (not `published_stub`).
644. All references to the old status string and step ID across the codebase are updated.
655. The dashboard and any pipeline views that filter/count by status still work
66 correctly with the new `published` status.
676. No changes to the actual publish logic in `publishDraftToConsul()`.
687. No changes to the `StubIndexingProvider` — indexing remains stubbed.
69
70## Patterns to Follow
71
72Use `grep -r "published_stub" frontend/src/ frontend/app/ frontend/components/`
73to find all references before making changes.
74
75Use `grep -r "publish-stub-step" frontend/src/ frontend/app/ frontend/components/`
76to find all step ID references.
77
78The workflow step pattern in this codebase looks like:
79```typescript
80const publishStep = createStep({
81 id: 'publish-step',
82 // ...
83});Draft statuses used elsewhere include: draft, in_review, pending_human_review,
approved, ready_to_publish. The new published status should fit this pattern.
Verification
Before you're done, run and fix any failures:
1cd frontend
2grep -r "published_stub" src/ app/ components/ # Should return 0 results
3grep -r "publish-stub-step" src/ app/ components/ # Should return 0 results
4grep -r "publish.step\|publish-step\|publishStep\|published" src/mastra/workflows/ # Confirm new naming
5pnpm test:frontendAll checks must pass before you consider your work complete.
1##### Verify
2
3```bash
4cd frontend
5grep -r "published_stub" src/ app/ components/
6grep -r "publish-stub-step" src/ app/ components/
7pnpm test:frontendDiff Review
- Must see:
published_stubreplaced withpublishedin workflow file; step renamed - Must verify: Zero grep hits for
published_stubandpublish-stub-stepacross codebase - Red flag: Agent changed
publishDraftToConsul()logic, modified the indexing provider, or touched/api/mcp/route.ts
Group 1C: Fix Owned-Domain Document Classification
Parallel With: 1A, 1B Depends On: Nothing Size: S
Prompt
1# [Phase 1, Group 1C]: Fix Owned-Domain Sync Document Classification
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a content engine. When an operator registers their own
10domain (e.g., consul.ai) via `/api/content-engine/site/register-domain`, the
11system crawls the site using the competitor crawl infrastructure. The problem:
12`syncCompetitorPagesToDocuments()` writes ALL crawled pages as
13`document_class: 'competitor_page'` — even when the crawled domain is the
14operator's own site. This means first-party content gets classified as
15competitor content, and the agent can't find it when looking for `our_page`
16documents.
17
18**Tech stack:** TypeScript, Supabase/Postgres, document classification system.
19
20**Key files:**
21- `frontend/src/content-engine/services/competitor-crawl.ts` — contains
22 `syncCompetitorPagesToDocuments()` and the crawl orchestration
23- `frontend/src/content-engine/db/repositories.ts` — contains document CRUD
24 and the `buildConsulPostDocument()` function (which correctly creates `our_page` docs)
25- `frontend/app/api/content-engine/site/register-domain/route.ts` — the API
26 route that triggers owned-domain registration
27
28**Data model context:**
29- `auctor.documents` has a `document_class` field with values: `our_page`,
30 `competitor_page`, `serp`, `ai_overview`, `brand_voice`
31- `auctor.site_targets` has the operator's owned domain
32- `auctor.competitor_domains` stores both competitor AND owned domains
33 (owned domain is marked via relationship to site_target)
34
35## Your Task
36
37Fix the owned-domain sync path so that when the operator's own domain is crawled,
38the resulting documents are classified as `our_page` instead of `competitor_page`.
39
40**Approach:**
411. In `syncCompetitorPagesToDocuments()` (or its caller), check whether the
42 domain being synced matches the site target's owned domain.
432. If it matches, set `document_class: 'our_page'` instead of `'competitor_page'`.
443. The check should query `auctor.site_targets` to get the owned domain, or
45 accept a parameter indicating whether this is an owned-domain sync.
46
47**Alternative approach (simpler):**
481. In the `/api/content-engine/site/register-domain` route handler, after the
49 competitor crawl completes, run an UPDATE query to reclassify the documents
50 from `competitor_page` to `our_page` for the owned domain.
51
52Choose whichever approach is cleaner given the existing code structure.
53
54## Scope
55
56**You own:**
57- `frontend/src/content-engine/services/competitor-crawl.ts`
58 (specifically the `syncCompetitorPagesToDocuments()` function and any helpers)
59- `frontend/src/content-engine/db/repositories.ts`
60 (only the document classification logic — do NOT modify `publishDraftToConsul()`)
61- `frontend/app/api/content-engine/site/register-domain/route.ts`
62
63**Do NOT touch:**
64- `frontend/app/api/mcp/route.ts` (owned by Group 1A)
65- `frontend/src/mastra/workflows/content-engine-workflows.ts` (owned by Group 1B)
66- Any workflow, tool, or agent definition files
67- The `publishDraftToConsul()` function
68- The competitor crawl logic itself (Firecrawl integration, sitemap discovery, etc.)
69
70## Requirements
71
721. When the owned domain is crawled via site registration, resulting documents
73 have `document_class: 'our_page'`.
742. When a competitor domain is crawled, resulting documents still have
75 `document_class: 'competitor_page'` (no regression).
763. The `listDocumentsByClass('our_page')` query returns the owned-domain
77 documents after sync.
784. Existing `our_page` documents from Consul post sync (`buildConsulPostDocument()`)
79 are not affected.
805. The fix handles the case where the owned domain was already crawled
81 (existing `competitor_page` docs should be reclassified).
82
83## Patterns to Follow
84
85The codebase uses Supabase client for DB operations:
86```typescript
87const { data, error } = await supabase
88 .from('documents')
89 .update({ document_class: 'our_page' })
90 .eq('source_domain', ownedDomain)
91 .eq('document_class', 'competitor_page');Check how site_targets is queried elsewhere in the codebase for the owned domain pattern.
Verification
Before you're done, run and fix any failures:
1cd frontend
2# Verify no regressions
3pnpm test:frontend
4# Search for the fix
5grep -n "our_page" src/content-engine/services/competitor-crawl.ts
6grep -n "our_page" src/content-engine/db/repositories.tsAll checks must pass before you consider your work complete.
1##### Verify
2
3```bash
4cd frontend
5pnpm test:frontend
6grep -n "our_page" src/content-engine/services/competitor-crawl.tsDiff Review
- Must see: Logic that checks owned domain and sets
document_class: 'our_page' - Must verify: Competitor domains still produce
competitor_pageclassification - Red flag: Agent modified workflow definitions, publish logic, or MCP route
Phase 1 → Phase 2 Transition
State After Phase 1:
pnpm buildpasses (1A merged)- Content-engine API routes no longer return 500 from MCP compilation failure
- Published drafts show status
publishedinstead ofpublished_stub(1B merged) - Owned-domain crawl produces
our_pagedocuments (1C merged) - The core content pipeline (strategy → brief → draft → publish) is code-complete
CLAUDE.md Update:
Add the following to the project's CLAUDE.md before starting Phase 2:
1## Lessons from Phase 1
2
3### Build
4- The `/api/mcp` route uses `@mastra/mcp` and `fetch-to-node`. If these packages
5 are unavailable, the route must gracefully degrade — a single broken API route
6 poisons all sibling routes in Next.js.
7- Always run `pnpm build` after dependency changes, not just `pnpm dev`.
8
9### Status naming
10- Draft statuses: draft → in_review → pending_human_review → approved →
11 ready_to_publish → published
12- The old `published_stub` status has been removed. Use `published`.
13- The step is now called `publishStep` (or `publishToConsulStep`), not `publishStubStep`.
14
15### Document classification
16- Owned-domain pages must be classified as `our_page`, not `competitor_page`.
17- The sync path checks `site_targets` to determine the owned domain.
18- `competitor_page` is only for actual competitor domains.Phase 2: Skills Authoring
What This Phase Accomplishes
Authors all 9 agent skills as markdown files. Without these, the agent gets empty strings instead of brand voice rules, content structure guidelines, and SEO checklists — producing generic, low-quality output. The skills are created in a frontend/skills-seed/ directory within the repo, with a seed script that copies them to the workspace.
Parallel Groups
All 3 groups run simultaneously. Each group owns a distinct set of skill directories.
Dashboard
| Group | Status | Key Files |
|---|---|---|
| 2A: Priority Skills | ☐ | frontend/skills-seed/consul-voice/, draft-structure/, brief-writing/, seo-checklist/ |
| 2B: Research Skills | ☐ | frontend/skills-seed/content-planning/, competitive-analysis/, serp-interpretation/ |
| 2C: Publishing Skills + Seed Script | ☐ | frontend/skills-seed/cms-publishing/, post-publish-ops/, frontend/scripts/seed-skills.ts |
Group 2A: Author Priority Skills (Voice, Structure, SEO, Briefs)
Parallel With: 2B, 2C Depends On: Phase 1 complete (build passes) Size: L
Prompt
1# [Phase 2, Group 2A]: Author Priority Skills — Voice, Structure, SEO, Briefs
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a content engine that produces blog content for Consul
10(consul.ai), a B2B SaaS product for CEOs and founders. The agent uses a
11skills system — markdown files loaded via `readSkill()` — to get domain
12knowledge during workflow execution. Currently ALL 9 skills are EMPTY. The
13agent gets empty strings instead of the knowledge it needs.
14
15**Previous phases established:**
16- Phase 1 fixed the production build, publish status, and document classification.
17- The codebase builds and the content pipeline is code-complete.
18- The skills catalog service reads from `{workspaceRoot}/skills/{skill-id}/SKILL.md`.
19- Each skill needs YAML frontmatter (name, description, version, tags) and a
20 markdown body with the actual knowledge/instructions.
21
22**How skills are used:**
23- `consul-voice` is loaded by the WRITER and EDITOR agents during draft production.
24 It defines brand voice, tone rules, and writing style for Consul content.
25- `draft-structure` is loaded by the WRITER agent. It defines article structure
26 requirements, section patterns, and formatting rules.
27- `seo-checklist` is loaded by the WRITER and the SEO VALIDATION step. It defines
28 the SEO requirements the agent must satisfy.
29- `brief-writing` is loaded by the BRIEF GENERATION agent. It defines the brief
30 format, required sections, and quality criteria.
31
32**About Consul (the brand):**
33- Consul is a B2B SaaS AI assistant for CEOs and founders
34- Target audience: CEOs, founders, and operators evaluating AI-powered executive assistance
35- Brand positioning: high-trust, practical, operator-focused
36- Editorial rules from the strategy directive:
37 - "Avoid generic AI platitudes"
38 - "Prefer concrete examples"
39 - "Optimize for programmatic SEO without sounding templated"
40 - EEAT: "Cite real operator pain", "Favor decision frameworks over fluff",
41 "Reserve 20% for human experience and proof"
42
43**SEO validation rules (from `seo-validator.ts`):**
44The agent must know these to produce passing content:
451. Meta title: 40-65 characters
462. Meta description: 120-160 characters
473. Heading hierarchy: H1 only at top, H2-H4 thereafter
484. Primary keyword presence: 3+ mentions
495. Keyword density: 0.4%-2.5%
506. Content length: 600+ words (or content type minimum)
517. Internal links: 4+ minimum (to existing consul.ai pages)
528. Schema graph: Must have BlogPosting/FAQPage/WebPage
539. Slug format: valid URL slug (lowercase, hyphens, no special chars)
5410. Structural compliance: FAQ blocks + minimum length per content type
55
56## Your Task
57
58Create 4 skill files, each as a self-contained markdown document with YAML
59frontmatter. These are the highest-priority skills — the ones that most
60directly impact output quality.
61
62### Skill 1: `consul-voice`
63
64Create `frontend/skills-seed/consul-voice/SKILL.md`
65
66This skill defines Consul's brand voice and writing style. It must cover:
67- **Tone:** Authoritative but approachable. Expert peer, not lecturer.
68 Write as if advising a fellow CEO over coffee.
69- **Language rules:**
70 - Never use em-dashes (—). Use periods, commas, or semicolons instead.
71 - Never use "leverage" as a verb. Use "use" or "apply".
72 - Never use "cutting-edge", "game-changing", "revolutionary", or similar
73 hyperbolic adjectives.
74 - Avoid passive voice. Prefer direct, active constructions.
75 - Never start sentences with "In today's fast-paced..." or similar clichés.
76 - Use "you" and "your" to address the reader directly.
77 - Prefer short sentences. Mix 8-word and 20-word sentences. Average: 14 words.
78- **Structure rules:**
79 - Lead with the insight or action, not background.
80 - Every section must answer "so what?" for the reader.
81 - Use concrete numbers, examples, and scenarios over abstract claims.
82 - Cite real operator pain points, not hypothetical ones.
83 - Reserve ~20% of content for human experience, proof, and real-world examples.
84- **Things to avoid:**
85 - Generic AI platitudes ("AI is transforming the way we...")
86 - Templated-sounding content (vary sentence structure and openers)
87 - Unsubstantiated claims without examples or data
88 - Overly formal or academic tone
89 - Bulleted lists as a crutch (use sparingly, prefer prose)
90
91### Skill 2: `draft-structure`
92
93Create `frontend/skills-seed/draft-structure/SKILL.md`
94
95This skill defines article structure requirements:
96- **Content type structures:**
97 - Blog post (1200-2000 words): H1 title → intro (hook + thesis, 100-150 words) →
98 3-5 H2 sections (each 200-400 words) → FAQ section (3-5 questions) → conclusion
99 with CTA
100 - Comparison (1500-2500 words): H1 title → intro with comparison framework →
101 criteria-based H2 sections → comparison table → recommendation → FAQ → conclusion
102 - Pillar page (2500-4000 words): H1 title → comprehensive intro → 5-8 H2
103 sections with H3 subsections → internal link hub → FAQ → conclusion
104 - How-to/Guide (1500-2500 words): H1 title → problem statement → step-by-step
105 H2 sections → troubleshooting tips → FAQ → conclusion
106- **Heading hierarchy:**
107 - Exactly 1 H1 (the title, at the top)
108 - H2 for major sections
109 - H3-H4 for subsections (never skip levels)
110 - Include primary keyword in H1 and at least 1 H2
111- **Required elements:**
112 - Introduction: Must hook with a specific pain point or insight in the first sentence
113 - FAQ section: 3-5 questions in valid FAQ block format
114 - Internal links: 4+ links to existing consul.ai blog posts (woven naturally into prose)
115 - Schema graph: BlogPosting (default), FAQPage (if FAQ present), WebPage (for pillar)
116 - CTA: Clear call-to-action at the end, relevant to the content topic
117- **Image markers:** Use `[IMAGE: description]` format for image placement
118 suggestions. Place at least 1 after the intro and 1 mid-article.
119
120### Skill 3: `seo-checklist`
121
122Create `frontend/skills-seed/seo-checklist/SKILL.md`
123
124This skill is the SEO requirements reference:
125- **Blocking requirements (ALL must pass to publish):**
126 1. Meta title: 40-65 characters, includes primary keyword, compelling
127 2. Meta description: 120-160 characters, includes primary keyword, has CTA
128 3. Heading hierarchy: Single H1 at top, H2-H4 only thereafter, no skipped levels
129 4. Primary keyword presence: 3+ natural mentions in body text
130 5. Keyword density: 0.4%-2.5% of total word count
131 6. Content length: 600+ words minimum (see content type minimums in draft-structure)
132 7. Internal links: 4+ links to existing consul.ai pages
133 8. Schema graph: Valid BlogPosting, FAQPage, or WebPage JSON-LD
134 9. Slug format: lowercase, hyphenated, no special characters, includes keyword
135 10. Structural compliance: FAQ blocks present (3-5 questions), content meets
136 type-specific minimum length
137- **Warning checks (improve but don't block):**
138 - Image markers: at least 1 per 500 words
139 - External links: 2+ authoritative external references
140 - Readability: Flesch reading ease 50-70 (professional but accessible)
141 - Content depth: addresses search intent comprehensively
142 - FAQ quality: questions match "People Also Ask" patterns
143- **Keyword integration guidelines:**
144 - Primary keyword in: H1, meta title, meta description, first 100 words,
145 at least 1 H2, URL slug
146 - Secondary keywords: distributed naturally through H2s and body
147 - Avoid keyword stuffing: no more than 2.5% density
148 - Use semantic variations and related terms
149
150### Skill 4: `brief-writing`
151
152Create `frontend/skills-seed/brief-writing/SKILL.md`
153
154This skill defines brief format and quality criteria:
155- **Brief structure:**
156 - Content angle: The specific thesis or perspective (not just the topic)
157 - Target keyword: Primary keyword and 3-5 secondary keywords
158 - Search intent: What the reader is trying to accomplish
159 - Outline: H2 section titles with 1-sentence description of each
160 - Keyword mapping: Which keywords appear in which sections
161 - Competitor differentiation: How this content differs from top-ranking results
162 - Internal link targets: 4+ existing consul.ai pages to reference
163 - External references: Key sources to cite for credibility
164 - Voice requirements: Specific voice/tone notes for this piece
165 - Content type: blog_post, comparison, pillar, how_to, guide
166 - Target word count: Based on content type and competitive analysis
167- **Quality criteria for a good brief:**
168 - Angle is specific and defensible (not "everything about X")
169 - Differentiator is real (not "we'll cover it better")
170 - Internal links reference actual existing consul.ai pages
171 - Outline sections each have a clear purpose and keyword assignment
172 - Voice requirements are specific to this piece, not generic
173
174## Scope
175
176**You own:** (create these files)
177- `frontend/skills-seed/consul-voice/SKILL.md`
178- `frontend/skills-seed/draft-structure/SKILL.md`
179- `frontend/skills-seed/seo-checklist/SKILL.md`
180- `frontend/skills-seed/brief-writing/SKILL.md`
181
182**Do NOT touch:**
183- Any files in `frontend/skills-seed/content-planning/` (owned by Group 2B)
184- Any files in `frontend/skills-seed/competitive-analysis/` (owned by Group 2B)
185- Any files in `frontend/skills-seed/serp-interpretation/` (owned by Group 2B)
186- Any files in `frontend/skills-seed/cms-publishing/` (owned by Group 2C)
187- Any files in `frontend/skills-seed/post-publish-ops/` (owned by Group 2C)
188- `frontend/scripts/seed-skills.ts` (owned by Group 2C)
189- Any existing source code files
190
191## Requirements
192
1931. Each SKILL.md file has valid YAML frontmatter with: name, description, version
194 (use `1.0.0`), and tags (array of relevant strings).
1952. `consul-voice` covers tone, language rules (including no em-dashes), structure
196 principles, and things to avoid. Minimum 800 words.
1973. `draft-structure` covers all 4 content types with specific word counts, heading
198 patterns, and required elements. Minimum 600 words.
1994. `seo-checklist` lists all 10 blocking checks with exact thresholds matching
200 the SEO validator code. Minimum 500 words.
2015. `brief-writing` defines the brief format with all required sections and quality
202 criteria. Minimum 400 words.
2036. All skills reference Consul-specific context (B2B SaaS, CEO audience, consul.ai domain).
2047. Skills are written as instructions TO the agent (imperative: "Write in...",
205 "Always include...", "Never use...").
206
207## Patterns to Follow
208
209YAML frontmatter format:
210```yaml
211---
212name: "Consul Voice & Tone"
213description: "Brand voice rules, writing style, and tone guidelines for Consul content"
214version: "1.0.0"
215tags: ["voice", "tone", "writing-style", "brand"]
216---Body format: Use markdown with H2 sections. Write as direct instructions to the agent.
Verification
Before you're done, run and fix any failures:
1# Verify all 4 files exist and have frontmatter
2for skill in consul-voice draft-structure seo-checklist brief-writing; do
3 echo "--- $skill ---"
4 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "EXISTS" || echo "MISSING"
5 head -5 "frontend/skills-seed/$skill/SKILL.md"
6 wc -w "frontend/skills-seed/$skill/SKILL.md"
7doneAll 4 files must exist with valid frontmatter and meet the minimum word counts.
1##### Verify
2
3```bash
4for skill in consul-voice draft-structure seo-checklist brief-writing; do
5 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "$skill: OK" || echo "$skill: MISSING"
6 wc -w "frontend/skills-seed/$skill/SKILL.md"
7doneDiff Review
- Must see: 4 SKILL.md files with YAML frontmatter in
frontend/skills-seed/ - Must verify:
consul-voiceincludes the no-em-dash rule;seo-checklistthresholds match validator (40-65 meta title, 0.4-2.5% density, 4+ internal links, etc.) - Red flag: Agent created files outside
frontend/skills-seed/, or modified source code
Group 2B: Author Research & Planning Skills
Parallel With: 2A, 2C Depends On: Phase 1 complete Size: M
Prompt
1# [Phase 2, Group 2B]: Author Research & Planning Skills
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a content engine for Consul (consul.ai), a B2B SaaS AI
10assistant for CEOs and founders. The agent uses skills (markdown files loaded
11via `readSkill()`) for domain knowledge during workflow execution.
12
13**Previous phases established:**
14- Phase 1 fixed the production build, publish status, and document classification.
15- The skills catalog reads from `{workspaceRoot}/skills/{skill-id}/SKILL.md`.
16- Each skill needs YAML frontmatter (name, description, version, tags) and a
17 markdown body.
18
19**How these skills are used:**
20- `competitive-analysis` is loaded during the `competitiveIntelligenceStep` of the
21 strategy workflow. It guides how the agent analyzes competitor content, identifies
22 gaps, and scores threats.
23- `serp-interpretation` is loaded during the `searchLandscapeStep`. It guides how
24 the agent reads SERP data, identifies ranking patterns, and spots opportunities.
25- `content-planning` is loaded during the `contentStrategyStep`. It guides how the
26 agent creates plan items with target keywords, content types, and priority.
27
28**Data available to the agent during these steps:**
29- Competitor documents and extractions (content, metadata, structure)
30- Summary nodes (page/cluster/domain-level summaries)
31- Graph edges (covers_topic, targets_keyword, links_to, competes_on_keyword)
32- Tracked keywords with metrics (volume, difficulty, CPC, intent)
33- SERP snapshots and rankings
34- Domain rankings and threat scores
35
36## Your Task
37
38Create 3 skill files for the research and planning phase of the content pipeline.
39
40### Skill 1: `competitive-analysis`
41
42Create `frontend/skills-seed/competitive-analysis/SKILL.md`
43
44Cover:
45- How to analyze competitor content (structure, depth, angle, gaps)
46- Threat scoring methodology (content overlap, keyword competition, authority)
47- Gap identification (topics competitors cover that we don't, and vice versa)
48- Differentiation strategy (how to create content that outperforms competitors)
49- Using graph edges and summary nodes to map competitive landscape
50- Prioritizing which competitors to focus on
51
52### Skill 2: `serp-interpretation`
53
54Create `frontend/skills-seed/serp-interpretation/SKILL.md`
55
56Cover:
57- How to read SERP features (featured snippets, PAA, knowledge panels)
58- Identifying search intent from SERP layout
59- Ranking pattern analysis (what top results have in common)
60- Opportunity signals (weak results, outdated content, thin content in top positions)
61- AI overview tracking and implications for content strategy
62- Using SERP data to inform content type selection
63
64### Skill 3: `content-planning`
65
66Create `frontend/skills-seed/content-planning/SKILL.md`
67
68Cover:
69- Creating plan items with: target keyword, content type, rationale, priority,
70 estimated impact, internal link targets
71- Content type selection criteria:
72 - blog_post: informational queries, thought leadership, 1200-2000 words
73 - comparison: "vs" and "best" queries, decision-stage, 1500-2500 words
74 - pillar: broad topic hubs, link magnets, 2500-4000 words
75 - how_to: procedural queries, problem-solving, 1500-2500 words
76 - guide: comprehensive reference, educational, 1500-2500 words
77- Prioritization framework: search volume × (1 / difficulty) × business relevance
78- Topic clustering: grouping keywords by intent and assigning to content pieces
79- Internal linking strategy: how to plan link targets for each new piece
80- Calendar scheduling: cadence recommendations and seasonal considerations
81
82## Scope
83
84**You own:** (create these files)
85- `frontend/skills-seed/competitive-analysis/SKILL.md`
86- `frontend/skills-seed/serp-interpretation/SKILL.md`
87- `frontend/skills-seed/content-planning/SKILL.md`
88
89**Do NOT touch:**
90- `frontend/skills-seed/consul-voice/` (owned by Group 2A)
91- `frontend/skills-seed/draft-structure/` (owned by Group 2A)
92- `frontend/skills-seed/seo-checklist/` (owned by Group 2A)
93- `frontend/skills-seed/brief-writing/` (owned by Group 2A)
94- `frontend/skills-seed/cms-publishing/` (owned by Group 2C)
95- `frontend/skills-seed/post-publish-ops/` (owned by Group 2C)
96- `frontend/scripts/seed-skills.ts` (owned by Group 2C)
97- Any existing source code files
98
99## Requirements
100
1011. Each SKILL.md has valid YAML frontmatter: name, description, version (`1.0.0`), tags.
1022. `competitive-analysis` covers gap identification, threat scoring, and
103 differentiation. Minimum 500 words.
1043. `serp-interpretation` covers SERP features, intent analysis, and opportunity
105 signals. Minimum 500 words.
1064. `content-planning` covers plan item creation, content type selection, and
107 prioritization. Minimum 600 words.
1085. All skills reference Consul's B2B SaaS context and CEO audience.
1096. Skills are written as instructions TO the agent (imperative mood).
110
111## Patterns to Follow
112
113YAML frontmatter format:
114```yaml
115---
116name: "Competitive Analysis"
117description: "How to analyze competitor content and identify strategic gaps"
118version: "1.0.0"
119tags: ["competitive-analysis", "research", "strategy"]
120---Verification
Before you're done, run and fix any failures:
1for skill in competitive-analysis serp-interpretation content-planning; do
2 echo "--- $skill ---"
3 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "EXISTS" || echo "MISSING"
4 head -5 "frontend/skills-seed/$skill/SKILL.md"
5 wc -w "frontend/skills-seed/$skill/SKILL.md"
6doneAll 3 files must exist with valid frontmatter and meet minimum word counts.
1##### Verify
2
3```bash
4for skill in competitive-analysis serp-interpretation content-planning; do
5 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "$skill: OK" || echo "$skill: MISSING"
6 wc -w "frontend/skills-seed/$skill/SKILL.md"
7doneDiff Review
- Must see: 3 SKILL.md files with frontmatter in correct directories
- Must verify: Content is Consul-specific (not generic SEO advice); instructions are in imperative mood
- Red flag: Agent created files in Group 2A or 2C directories, or modified source code
Group 2C: Author Publishing Skills + Seed Script
Parallel With: 2A, 2B Depends On: Phase 1 complete Size: M
Prompt
1# [Phase 2, Group 2C]: Author Publishing Skills + Seed Script
2
3## Context
4
5You are working in an isolated workspace. Other agents are working in parallel
6on other parts of the codebase — you cannot see their work.
7Do not modify files outside your designated scope.
8
9**Project:** Auctor is a content engine for Consul (consul.ai). The agent uses
10skills (markdown files in `{workspaceRoot}/skills/{skill-id}/SKILL.md`) for
11domain knowledge. You're authoring the 2 publishing skills and creating a script
12to install all 9 skills from the repo into the workspace.
13
14**Previous phases established:**
15- Phase 1 fixed the production build, publish status, and document classification.
16- The workspace root defaults to:
17 `~/Library/Application Support/com.auctor.desktop/workspace/`
18- The skills catalog reads from `{workspaceRoot}/skills/{skill-id}/SKILL.md`
19- 7 other skills are being authored by parallel agents in:
20 `frontend/skills-seed/{skill-id}/SKILL.md`
21
22**How these skills are used:**
23- `cms-publishing` is loaded during the `publishStep` (formerly publishStubStep).
24 It guides the final publish preparation.
25- `post-publish-ops` is loaded after publishing. It guides post-publish tasks
26 like indexing, monitoring, and performance tracking.
27
28**Consul CMS publishing context:**
29- Publishes to `consul.posts` via Supabase
30- Fields: slug, title, content (markdown), excerpt, meta_title, meta_description,
31 schema_graph (JSON-LD), faq_blocks, canonical_url, content_type, author_id
32 (consul-team), category (ai-assistant default), reading_time, word_count,
33 seo_score, cta
34- Also writes: `consul.post_keywords`, `consul.post_validations`, `consul.post_relationships`
35- Canonical URL pattern: `https://consul.ai/blog/{slug}`
36- Content types: article, comparison, pillar, workflow
37- Indexing is currently stubbed (manual URL submission to Google Search Console)
38
39## Your Task
40
41### Part 1: Author 2 skill files
42
43#### Skill 1: `cms-publishing`
44
45Create `frontend/skills-seed/cms-publishing/SKILL.md`
46
47Cover:
48- Pre-publish checklist: SEO score must be 10/10, all blocking checks pass
49- Content field preparation: meta title, meta description, excerpt, slug format
50- Schema graph requirements: valid BlogPosting/FAQPage/WebPage JSON-LD
51- Internal link verification: all 4+ internal links must resolve to real consul.ai pages
52- Category assignment: use `ai-assistant` as default, override when content
53 fits `productivity`, `email-management`, or `scheduling`
54- Author assignment: use `consul-team` as default
55- CTA preparation: must be relevant to the content topic
56- Canonical URL: `https://consul.ai/blog/{slug}`
57- Content type mapping: blog_post→article, comparison→comparison, pillar→pillar,
58 how_to→workflow, guide→article
59
60#### Skill 2: `post-publish-ops`
61
62Create `frontend/skills-seed/post-publish-ops/SKILL.md`
63
64Cover:
65- URL submission: manually submit to Google Search Console (indexing API is stubbed)
66- Performance monitoring: check GSC for impressions/clicks after 48-72 hours
67- Content quality check: verify the published page renders correctly on consul.ai
68- Internal linking audit: verify that other pages link back to the new content
69 where relevant
70- Keyword tracking: monitor tracked keyword positions for the target keyword
71- Update cycle: plan content freshness updates based on performance data
72- Social distribution: share published content through appropriate channels
73
74### Part 2: Create the seed script
75
76Create `frontend/scripts/seed-skills.ts`
77
78This script copies all 9 skills from `frontend/skills-seed/` to the workspace:
79
80```typescript
81// Script: seed-skills.ts
82// Usage: npx tsx frontend/scripts/seed-skills.ts
83//
84// Copies skill files from frontend/skills-seed/{skill-id}/SKILL.md
85// to {workspaceRoot}/skills/{skill-id}/SKILL.md
86//
87// Workspace root defaults to:
88// ~/Library/Application Support/com.auctor.desktop/workspace/
89// Override with AUCTOR_WORKSPACE_ROOT env var.The script must:
- Determine workspace root (env var or default path)
- List all skill directories in
frontend/skills-seed/ - For each, create the target directory and copy SKILL.md
- Report what was installed
- Not overwrite existing skills unless a
--forceflag is passed
Scope
You own: (create these files)
frontend/skills-seed/cms-publishing/SKILL.mdfrontend/skills-seed/post-publish-ops/SKILL.mdfrontend/scripts/seed-skills.ts
Do NOT touch:
frontend/skills-seed/consul-voice/(owned by Group 2A)frontend/skills-seed/draft-structure/(owned by Group 2A)frontend/skills-seed/seo-checklist/(owned by Group 2A)frontend/skills-seed/brief-writing/(owned by Group 2A)frontend/skills-seed/competitive-analysis/(owned by Group 2B)frontend/skills-seed/serp-interpretation/(owned by Group 2B)frontend/skills-seed/content-planning/(owned by Group 2B)- Any existing source code files
- The skills catalog code (
frontend/src/content-engine/skills/catalog.ts)
Requirements
- Each SKILL.md has valid YAML frontmatter: name, description, version (
1.0.0), tags. cms-publishingcovers all pre-publish checks and field preparation. Min 400 words.post-publish-opscovers monitoring, indexing, and update cycles. Min 400 words.seed-skills.tsis a standalone script runnable withnpx tsx.- Seed script handles missing workspace directory gracefully (create if needed).
- Seed script skips existing skills unless
--forceis passed. - Seed script logs each skill installed with path.
Patterns to Follow
YAML frontmatter:
1---
2name: "CMS Publishing"
3description: "Pre-publish preparation and CMS field requirements for Consul"
4version: "1.0.0"
5tags: ["publishing", "cms", "consul"]
6---Script pattern (Node.js with fs):
1import { existsSync, mkdirSync, copyFileSync, readdirSync } from 'fs';
2import { join, resolve } from 'path';
3import { homedir } from 'os';Verification
Before you're done, run and fix any failures:
1# Check skill files
2for skill in cms-publishing post-publish-ops; do
3 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "$skill: OK" || echo "$skill: MISSING"
4 wc -w "frontend/skills-seed/$skill/SKILL.md"
5done
6
7# Check seed script exists and compiles
8test -f "frontend/scripts/seed-skills.ts" && echo "seed-skills.ts: OK" || echo "MISSING"
9npx tsx --help > /dev/null 2>&1 && echo "tsx available" || echo "tsx not available"All files must exist and meet word counts.
1##### Verify
2
3```bash
4for skill in cms-publishing post-publish-ops; do
5 test -f "frontend/skills-seed/$skill/SKILL.md" && echo "$skill: OK" || echo "$skill: MISSING"
6done
7test -f "frontend/scripts/seed-skills.ts" && echo "seed script: OK" || echo "MISSING"Diff Review
- Must see: 2 SKILL.md files +
seed-skills.tsscript - Must verify: Seed script reads from
skills-seed/and writes to workspace; script has--forceflag - Red flag: Agent modified skills catalog code or created files in other groups' directories
Phase 2 → Phase 3 Transition
State After Phase 2:
- All 9 skills authored as markdown files in
frontend/skills-seed/ - Seed script available at
frontend/scripts/seed-skills.ts - Skills are ready to be installed to the workspace via the seed script
- The agent will now have brand voice rules, structure guidelines, SEO checklists, and all other domain knowledge it needs
CLAUDE.md Update:
Add the following to CLAUDE.md before starting Phase 3:
1## Skills System
2
3### Authoring
4- Skills live in `frontend/skills-seed/{skill-id}/SKILL.md` (repo source of truth)
5- Install to workspace with: `npx tsx frontend/scripts/seed-skills.ts`
6- Use `--force` to overwrite existing skills
7
8### Available Skills
9- consul-voice: Brand voice, tone, no-em-dash rule, writing style
10- draft-structure: Article structure by content type, heading hierarchy, required elements
11- seo-checklist: 10 blocking SEO checks with exact thresholds
12- brief-writing: Brief format, required sections, quality criteria
13- content-planning: Plan item creation, content type selection, prioritization
14- competitive-analysis: Gap identification, threat scoring, differentiation
15- serp-interpretation: SERP features, intent analysis, opportunity signals
16- cms-publishing: Pre-publish checklist, field preparation, CMS mapping
17- post-publish-ops: Indexing, monitoring, update cycles
18
19### Conventions
20- Skills use YAML frontmatter (name, description, version, tags)
21- Body is markdown with H2 sections
22- Written as instructions TO the agent (imperative mood)
23- All reference Consul's B2B SaaS context and CEO audiencePhase 3: Integration Verification & CLAUDE.md
What This Phase Accomplishes
Creates the final CLAUDE.md with all lessons learned and produces a verification checklist that the operator runs to confirm end-to-end readiness.
Dashboard
| Group | Status | Key Files |
|---|---|---|
| 3A: CLAUDE.md + Verification | ☐ | CLAUDE.md, frontend/scripts/verify-launch-readiness.sh |
Group 3A: CLAUDE.md + Launch Verification Script
Parallel With: None (final phase) Depends On: Phase 1 and Phase 2 complete Size: M
Prompt
1# [Phase 3, Group 3A]: CLAUDE.md + Launch Verification Script
2
3## Context
4
5You are working in an isolated workspace. This is the final phase — all code
6fixes and skill authoring are complete.
7
8**Project:** Auctor is a content engine for Consul (consul.ai). The codebase
9has been through 2 phases of fixes:
10- Phase 1 fixed: production build (MCP route), publish status (published_stub →
11 published), and owned-domain document classification (competitor_page → our_page)
12- Phase 2 authored: all 9 agent skills and a seed script
13
14**What still needs manual operator action (NOT code changes):**
151. Add API keys to `.env`: ANTHROPIC_API_KEY, FIRECRAWL_API_KEY, DATAFORSEO_LOGIN,
16 DATAFORSEO_PASSWORD
172. Apply database migration 0003 (`frontend/drizzle/0003_extraction_configs.sql`)
183. Run `npx tsx frontend/scripts/seed-skills.ts` to install skills to workspace
194. Run competitor crawls for top 5 competitors
205. Build summary nodes and graph edges from existing documents
216. Run keyword metrics collection
227. Execute a full end-to-end test: strategy → brief → draft → publish
23
24## Your Task
25
26### Part 1: Create CLAUDE.md
27
28Create a comprehensive `CLAUDE.md` at the repository root with:
29- Project overview (what Auctor is, tech stack)
30- Key architectural decisions
31- File ownership map (which directories contain what)
32- Common commands (build, test, lint, seed skills)
33- Known limitations and deferred items
34- Lessons from Phase 1 and Phase 2 (included below)
35- Convention rules for future development
36
37### Part 2: Create launch verification script
38
39Create `frontend/scripts/verify-launch-readiness.sh` — a bash script that
40performs every automated check possible to confirm launch readiness:
41
421. `pnpm build` passes
432. `pnpm test:frontend` passes
443. All 9 skill files exist in skills-seed directory
454. No remaining references to `published_stub` in codebase
465. No remaining references to `publish-stub-step` in codebase
476. `.env` contains required keys (check for variable names, not values)
487. Backend `/health` returns 200
49
50## Scope
51
52**You own:**
53- `CLAUDE.md` (repository root)
54- `frontend/scripts/verify-launch-readiness.sh`
55
56**Do NOT touch:**
57- Any source code files
58- Any skill files (already authored)
59- `frontend/package.json` or any config files
60
61## Requirements
62
631. `CLAUDE.md` is comprehensive, covering project overview, architecture,
64 commands, conventions, and known limitations.
652. CLAUDE.md includes all Phase 1 and Phase 2 lessons (provided in context).
663. Verification script is executable (`chmod +x`).
674. Script outputs clear PASS/FAIL for each check.
685. Script exits with code 1 if any critical check fails.
69
70## Content for CLAUDE.md
71
72Include these lessons learned:
73
74### Phase 1 Lessons
75- The `/api/mcp` route uses `@mastra/mcp` and `fetch-to-node`. If unavailable,
76 the route must degrade gracefully — one broken API route poisons all siblings.
77- Always run `pnpm build` after dependency changes, not just `pnpm dev`.
78- Draft statuses: draft → in_review → pending_human_review → approved →
79 ready_to_publish → published. No `published_stub`.
80- Owned-domain pages = `our_page`. Competitor pages = `competitor_page`. The sync
81 path checks `site_targets` to determine classification.
82
83### Phase 2 Lessons
84- Skills live in `frontend/skills-seed/` and install to workspace via seed script.
85- The agent gets empty strings for missing skills — always install before running workflows.
86- 9 skills: consul-voice, draft-structure, seo-checklist, brief-writing,
87 content-planning, competitive-analysis, serp-interpretation, cms-publishing, post-publish-ops.
88
89### Known Limitations (deferred)
90- Image pipeline: not implemented. Use text-first publishing; add images manually.
91- Google Indexing API: stubbed. Submit URLs manually via Search Console.
92- Post-publish monitoring: stubbed. Check GSC manually.
93- Desktop bootstrap: not validated for this launch. Web-only.
94- `frontend/next.config.mjs` sets `typescript.ignoreBuildErrors = true`.
95- Lint: 92 errors and 15 warnings remain. Concentrated in ContentEngine files.
96
97## Patterns to Follow
98
99CLAUDE.md structure:
100```markdown
101# Project Name
102
103## Overview
104## Architecture
105## Getting Started
106## Key Commands
107## File Structure
108## Conventions
109## Known Limitations
110## Lessons LearnedVerification script pattern:
1#!/bin/bash
2set -euo pipefail
3
4PASS=0
5FAIL=0
6
7check() {
8 local name="$1"
9 shift
10 if "$@" > /dev/null 2>&1; then
11 echo "✅ PASS: $name"
12 ((PASS++))
13 else
14 echo "❌ FAIL: $name"
15 ((FAIL++))
16 fi
17}Verification
Before you're done, run and fix any failures:
1# Check files exist
2test -f "CLAUDE.md" && echo "CLAUDE.md: OK" || echo "MISSING"
3test -f "frontend/scripts/verify-launch-readiness.sh" && echo "verify script: OK" || echo "MISSING"
4
5# Check script is executable
6test -x "frontend/scripts/verify-launch-readiness.sh" && echo "executable: OK" || echo "NOT EXECUTABLE"
7
8# Check CLAUDE.md has key sections
9grep -q "## Overview" CLAUDE.md && echo "has overview" || echo "missing overview"
10grep -q "published_stub" CLAUDE.md && echo "has phase 1 lessons" || echo "missing lessons"
11grep -q "skills-seed" CLAUDE.md && echo "has phase 2 lessons" || echo "missing lessons"All files must exist and contain required sections.
1##### Verify
2
3```bash
4test -f "CLAUDE.md" && echo "OK" || echo "MISSING"
5test -f "frontend/scripts/verify-launch-readiness.sh" && echo "OK" || echo "MISSING"
6chmod +x frontend/scripts/verify-launch-readiness.shDiff Review
- Must see:
CLAUDE.mdat repo root with architecture and lessons; verification script - Must verify: CLAUDE.md covers all phase lessons; script checks for
published_stubabsence - Red flag: Agent modified any source code files
Done
The entire plan is complete when:
Automated Checks
1# Run the verification script created in Phase 3
2./frontend/scripts/verify-launch-readiness.sh
3
4# Or manually:
5cd frontend && pnpm build # Must pass (Phase 1A)
6cd frontend && pnpm test:frontend # Must pass
7
8# Confirm Phase 1B
9grep -r "published_stub" frontend/src/ frontend/app/ frontend/components/
10# Must return 0 results
11
12# Confirm Phase 1C
13grep -n "our_page" frontend/src/content-engine/services/competitor-crawl.ts
14# Must show owned-domain classification logic
15
16# Confirm Phase 2
17ls frontend/skills-seed/*/SKILL.md | wc -l
18# Must show 9
19
20# Confirm Phase 3
21test -f CLAUDE.md && echo "OK"Manual Steps (operator performs after all phases)
These are NOT code changes — they're operational setup:
-
Add API keys to
.env:ANTHROPIC_API_KEY=sk-ant-...(required for ALL agent operations)FIRECRAWL_API_KEY=fc-...(required for competitor crawling)DATAFORSEO_LOGIN=...(required for keyword metrics)DATAFORSEO_PASSWORD=...- Optional:
GSC_CLIENT_EMAIL,GSC_PRIVATE_KEY,GSC_SITE_URL,GA4_PROPERTY_ID
-
Apply migration 0003:
1-- Run in Supabase SQL editor 2-- File: frontend/drizzle/0003_extraction_configs.sql -
Install skills to workspace:
1npx tsx frontend/scripts/seed-skills.ts -
Populate data pipeline:
1# Run competitor crawls (after FIRECRAWL_API_KEY is set) 2curl -X POST http://localhost:3001/api/content-engine/competitors/crawl 3 4# Build summaries + graph 5# (via API or MCP tool calls) 6 7# Run keyword metrics (after DATAFORSEO is set) 8# (via API or MCP tool calls) -
End-to-end validation: Run one full cycle: strategy → approve plan item → brief → approve brief → draft → review → publish → verify in
consul.posts
Appendix A: Analysis Report
What The 5 Unique Audits Agreed On
(Note: Documents 4 and 6 are identical — 5 unique audits, not 6.)
Unanimous (5/5):
- Production build is broken by
/api/mcp/route.tsimports - All 9 agent skills are empty/missing
- Data pipeline is completely empty (0 crawled pages, 0 keyword metrics, 0 summaries, 0 graph edges)
- No image upload pipeline exists
- Indexing provider is stubbed
- Publishing to
consul.postsis implemented and real - SEO validator is complete with 10 blocking checks
- All 3 workflows (strategy, brief, draft) are structurally implemented
- 33 competitor domains registered but never crawled
- 178 keywords tracked but not enriched
Majority (3-4/5):
published_stubstatus is misleading (Audits 4, 5, 6 call it P0; Audits 2, 3 don't mention it)- Owned-domain sync writes
competitor_pageinstead ofour_page(Audits 4, 5, 6 call it P0) - Migration 0003 not applied (Audit 3 identifies explicitly; others mention generally)
pnpm linthas 92 errors, 15 warnings (Audits 4, 5 measured; others don't)
Where They Diverged
| Issue | Audit 2 | Audit 3 | Audit 4 | Audit 5 |
|---|---|---|---|---|
ANTHROPIC_API_KEY | Missing (P0) | Likely OK (sessions exist) | Likely OK but editor logs it missing | Missing from shell env |
| Skills content | Lists all 9 as empty | Says "unverified" for consul-voice | Mentions skill/tool mismatch | Same as Audit 4 |
| Desktop launch | Not discussed | Not discussed | P2, defer | Launch blocker for desktop claim |
| Lint debt | Not discussed | Not discussed | P1 (accept or reduce) | Launch risk |
Resolution:
ANTHROPIC_API_KEY: Treated as operational verification, not code fix. The key may exist in.envbut not in all runtime contexts. Added to manual checklist.- Skills: All 9 authored from scratch — both "empty" and "unverified" cases are resolved.
- Desktop: Deferred. This playbook is web-only.
- Lint: Deferred. Not a code fix for this plan.
What Was Missing
| Gap | Resolution |
|---|---|
| No concrete skill content was provided by any audit | Phase 2 authors all 9 skills with Consul-specific content |
| No seed script to install skills | Phase 2C creates seed-skills.ts |
| No CLAUDE.md for future agents | Phase 3 creates comprehensive CLAUDE.md |
| No automated verification script | Phase 3 creates verify-launch-readiness.sh |
| Migration 0003 application | Added to manual checklist (single SQL file, not a code change) |
| Desktop port configuration (3000 vs 3001 vs 3100) | Deferred — web-only launch |
Appendix B: Recovery
Agent went off-track
Check the diff — if it touched files outside its ownership, reject the branch and re-run. Key ownership boundaries:
- Group 1A: ONLY
frontend/app/api/mcp/route.tsandfrontend/package.json - Group 1B: ONLY files containing
published_stuborpublish-stub-step - Group 1C: ONLY
competitor-crawl.ts,repositories.ts(sync path), andregister-domainroute - Groups 2A/2B/2C: ONLY files within their assigned
frontend/skills-seed/subdirectories (plus seed script for 2C) - Group 3A: ONLY
CLAUDE.mdandverify-launch-readiness.sh
Tests fail after merge
- Identify which test(s) fail and which phase likely caused it.
- Spin up a new agent with the failing test output and the relevant phase's prompt.
- Scope: "Fix the test failure caused by [specific change]. Only modify files within [ownership scope]."
Build fails after merge
Most likely cause: Phase 1A's fix didn't fully resolve the MCP route issue.
- Check
pnpm buildoutput for the specific error. - Re-run Group 1A with the error message appended to the prompt.
Skills don't load in the agent
- Verify skills were installed:
ls ~/Library/Application\ Support/com.auctor.desktop/workspace/skills/ - If empty, run:
npx tsx frontend/scripts/seed-skills.ts --force - If seed script fails, manually copy from
frontend/skills-seed/to workspace.