@lebtiga/sonic-agent 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE.txt +223 -0
  2. package/README.md +61 -0
  3. package/bin/sonic.js +304 -0
  4. package/lib/index.js +20 -0
  5. package/lib/installer.js +156 -0
  6. package/lib/license.js +48 -0
  7. package/package.json +46 -0
  8. package/plugin/.claude-plugin/plugin.json +13 -0
  9. package/plugin/README.md +100 -0
  10. package/plugin/agents/sonic.md +80 -0
  11. package/plugin/commands/sonic-build.md +145 -0
  12. package/plugin/commands/sonic-help.md +71 -0
  13. package/plugin/skills/accessibility-qa/SKILL.md +160 -0
  14. package/plugin/skills/accessibility-qa/templates/accessibility-qa-report-template.md +123 -0
  15. package/plugin/skills/accessibility-qa/templates/wcag-compliance-statement.md +70 -0
  16. package/plugin/skills/aka-wireframe-wp/SKILL.md +149 -0
  17. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/README.md +190 -0
  18. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/footer.php +49 -0
  19. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/functions.php +395 -0
  20. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/header.php +58 -0
  21. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/index.php +39 -0
  22. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-answer.php +62 -0
  23. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-authority-hub.php +122 -0
  24. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-knowledge.php +58 -0
  25. package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/style.css +633 -0
  26. package/plugin/skills/aka-wireframe-wp/references/content-generator.md +371 -0
  27. package/plugin/skills/aka-wireframe-wp/references/internal-linker.md +430 -0
  28. package/plugin/skills/aka-wireframe-wp/references/orchestrator.md +269 -0
  29. package/plugin/skills/aka-wireframe-wp/references/prompts-library.md +880 -0
  30. package/plugin/skills/aka-wireframe-wp/references/seo-optimizer.md +433 -0
  31. package/plugin/skills/aka-wireframe-wp/references/strategy-planner.md +317 -0
  32. package/plugin/skills/aka-wireframe-wp/references/wordpress-deployer.md +545 -0
  33. package/plugin/skills/authority-site-builder/SKILL.md +138 -0
  34. package/plugin/skills/brand-philosophy/SKILL.md +77 -0
  35. package/plugin/skills/freepik-spaces/SKILL.md +122 -0
  36. package/plugin/skills/freepik-spaces/docs/automation-guide.md +233 -0
  37. package/plugin/skills/freepik-spaces/docs/research-notes.md +264 -0
  38. package/plugin/skills/freepik-spaces/plans/naseberry-demo-plan.md +320 -0
  39. package/plugin/skills/freepik-spaces/templates/naseberry-demo.json +302 -0
  40. package/plugin/skills/freepik-spaces/templates/saas-demo.json +212 -0
  41. package/plugin/skills/frontend-design/LICENSE.txt +177 -0
  42. package/plugin/skills/frontend-design/SKILL.md +77 -0
  43. package/plugin/skills/programmatic-seo/SKILL.md +236 -0
  44. package/plugin/skills/programmatic-seo/references/playbooks.md +293 -0
  45. package/plugin/skills/seo-qa/SKILL.md +132 -0
  46. package/plugin/skills/seo-qa/templates/schema-localbusiness.json +49 -0
  47. package/plugin/skills/seo-qa/templates/schema-service.json +36 -0
  48. package/plugin/skills/seo-qa/templates/seo-qa-report-template.md +90 -0
  49. package/plugin/skills/visual-identity/SKILL.md +109 -0
  50. package/plugin/skills/visual-identity/templates/style-guide-template.md +108 -0
  51. package/plugin/skills/website-image-gen/SKILL.md +82 -0
  52. package/plugin/skills/website-image-gen/templates/blog-featured.md +56 -0
  53. package/plugin/skills/website-image-gen/templates/hero-service-photo.md +56 -0
  54. package/plugin/skills/wordpress-pro/SKILL.md +105 -0
  55. package/plugin/skills/wordpress-pro/references/gutenberg-blocks.md +870 -0
  56. package/plugin/skills/wordpress-pro/references/hooks-filters.md +845 -0
  57. package/plugin/skills/wordpress-pro/references/performance-security.md +1012 -0
  58. package/plugin/skills/wordpress-pro/references/plugin-architecture.md +1041 -0
  59. package/plugin/skills/wordpress-pro/references/theme-development.md +858 -0
  60. package/plugin/sops/SOP-Sonic 777/authority-site-sop.html +1100 -0
  61. package/plugin/sops/SOP-WORDPRESS-330-PAGE-SITES.md +926 -0
  62. package/scripts/postinstall.js +109 -0
@@ -0,0 +1,545 @@
1
+ # AKA WordPress Deployer
2
+
3
+ ## Purpose
4
+ Deploys generated and linked content to WordPress with proper parent-child hierarchy, navigation, SEO metadata, and AKA Framework Theme.
5
+
6
+ ## Model
7
+ claude-opus-4
8
+
9
+ ## When to Use
10
+ - After content generation and linking complete
11
+ - To deploy individual pages or entire hubs
12
+ - To update existing WordPress pages
13
+ - To set up complete site structure
14
+
15
+ ## Capabilities
16
+ - WordPress REST API integration
17
+ - AKA Framework Theme installation/activation
18
+ - Page creation with proper hierarchy
19
+ - Parent-child relationship management
20
+ - Navigation menu creation
21
+ - SEO metadata insertion
22
+ - Schema markup addition
23
+ - Image uploading and optimization
24
+ - Permalink configuration
25
+ - Breadcrumb setup
26
+
27
+ ## Input Required
28
+
29
+ **Required Files**:
30
+ 1. Generated content (after linking)
31
+ 2. `.factory/config/aka-wireframe/aka-strategy-output.json`
32
+ 3. `.factory/config/aka-wireframe/business-config.json`
33
+
34
+ **WordPress Connection**:
35
+ - `--url` WordPress site URL
36
+ - `--username` WordPress admin username
37
+ - `--password` WordPress app password (secure)
38
+ - Or environment variables: `WP_URL`, `WP_USER`, `WP_PASS`
39
+
40
+ **Parameters**:
41
+ - `--hub N` - Deploy specific hub
42
+ - `--all` - Deploy all generated content
43
+ - `--dry-run` - Preview without deploying
44
+ - `--skip-theme` - Don't install/activate theme
45
+ - `--update` - Update existing pages instead of create
46
+
47
+ ## Output Generated
48
+
49
+ **WordPress Pages Created**:
50
+ - Authority Hub pages (parent pages)
51
+ - Knowledge pages (children of hubs)
52
+ - Answer pages (children of hubs)
53
+ - Navigation menus
54
+ - Breadcrumbs
55
+
56
+ **Reports**:
57
+ - Deployment log
58
+ - Page URL list
59
+ - Success/failure summary
60
+
61
+ ## Deployment Process
62
+
63
+ ### Step 1: WordPress Connection Validation
64
+
65
+ **Check**:
66
+ - WordPress site accessible
67
+ - REST API enabled
68
+ - Credentials valid
69
+ - Required plugins installed (Yoast/Rank Math)
70
+
71
+ **Output**:
72
+ ```
73
+ 🌐 Connecting to WordPress...
74
+ → URL: http://localhost:8080
75
+ → WordPress version: 6.4
76
+ → REST API: ✓ Enabled
77
+ → Authentication: ✓ Valid
78
+ → Yoast SEO: ✓ Installed
79
+ ```
80
+
81
+ ### Step 2: Theme Installation
82
+
83
+ **If AKA Framework Theme not active**:
84
+
85
+ ```
86
+ → Installing AKA Framework Theme...
87
+ ✓ Theme uploaded
88
+ ✓ Theme activated
89
+ ✓ Page templates registered:
90
+ - page-authority-hub.php
91
+ - page-knowledge.php
92
+ - page-answer.php
93
+ ```
94
+
95
+ **Theme Files Uploaded**:
96
+ - Complete AKA Framework Theme from `/aka-framework-theme/`
97
+ - Customized with business colors from config
98
+ - Logo placeholder ready
99
+
100
+ **Configuration Applied**:
101
+ ```javascript
102
+ // Auto-configure theme with business info
103
+ {
104
+ "siteName": "{{BUSINESS_NAME}}",
105
+ "tagline": "{{PRIMARY_SERVICE}} in {{LOCATION}}",
106
+ "phone": "{{PHONE}}",
107
+ "address": "{{ADDRESS}}",
108
+ "colors": {
109
+ "primary": "#custom-color",
110
+ "secondary": "#custom-color"
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### Step 3: Page Creation with Hierarchy
116
+
117
+ **Authority Hub Creation** (Parent Page):
118
+ ```javascript
119
+ // Create Authority page
120
+ const authorityPage = await wpCreatePage({
121
+ title: "AC Repair Services in Atlanta",
122
+ slug: "ac-repair-services",
123
+ content: linkedContent, // HTML from linking phase
124
+ status: "publish",
125
+ parent: 0, // Top-level page
126
+ template: "page-authority-hub.php",
127
+ meta: {
128
+ yoast_title: "AC Repair Atlanta | Cool Air HVAC",
129
+ yoast_metadesc: "Expert AC repair in Atlanta...",
130
+ focus_keyword: "AC repair Atlanta",
131
+ schema_type: "Service"
132
+ }
133
+ });
134
+
135
+ console.log(`✓ Created: ${authorityPage.url}`);
136
+ ```
137
+
138
+ **Knowledge Pages Creation** (Children):
139
+ ```javascript
140
+ // Create Knowledge pages as children
141
+ hub.knowledgePages.forEach(async (page) => {
142
+ const knowledgePage = await wpCreatePage({
143
+ title: page.title,
144
+ slug: page.slug,
145
+ content: page.linkedContent,
146
+ status: "publish",
147
+ parent: authorityPage.id, // Child of Authority
148
+ template: "page-knowledge.php",
149
+ meta: {
150
+ yoast_title: page.seoTitle,
151
+ yoast_metadesc: page.metaDescription,
152
+ focus_keyword: page.keyword
153
+ }
154
+ });
155
+
156
+ console.log(` ✓ Created: ${knowledgePage.url}`);
157
+ });
158
+ ```
159
+
160
+ **Answer Pages Creation** (Children):
161
+ ```javascript
162
+ // Create Answer pages as children
163
+ hub.answerPages.forEach(async (page) => {
164
+ const answerPage = await wpCreatePage({
165
+ title: page.question, // Exact question as title
166
+ slug: page.slug,
167
+ content: page.linkedContent,
168
+ status: "publish",
169
+ parent: authorityPage.id, // Child of Authority
170
+ template: "page-answer.php",
171
+ meta: {
172
+ yoast_title: page.seoTitle,
173
+ yoast_metadesc: page.metaDescription,
174
+ schema_type: "FAQPage"
175
+ }
176
+ });
177
+
178
+ console.log(` ✓ Created: ${answerPage.url}`);
179
+ });
180
+ ```
181
+
182
+ **Deployment Progress**:
183
+ ```
184
+ 🏛️ Deploying Hub 1 to WordPress...
185
+
186
+ Authority Hub:
187
+ ✓ Created: /ac-repair-services/ (ID: 123)
188
+
189
+ Knowledge Pages (15):
190
+ ✓ 1/15 Created: /ac-repair-services/ac-not-cooling/
191
+ ✓ 2/15 Created: /ac-repair-services/refrigerant-leak-repair/
192
+ ✓ 3/15 Created: /ac-repair-services/compressor-replacement/
193
+ ...
194
+ ✓ 15/15 Created: /ac-repair-services/emergency-ac-repair/
195
+
196
+ Answer Pages (25):
197
+ ✓ 1/25 Created: /ac-repair-services/how-much-ac-repair-cost/
198
+ ✓ 2/25 Created: /ac-repair-services/why-ac-not-cooling/
199
+ ...
200
+ ✓ 25/25 Created: /ac-repair-services/can-i-diy-ac-repair/
201
+
202
+ Total: 41 pages created in 3 minutes
203
+ ```
204
+
205
+ ### Step 4: Navigation Menu Creation
206
+
207
+ **Hub Navigation Menu**:
208
+ ```javascript
209
+ // Create menu for Hub 1
210
+ const hubMenu = await wpCreateMenu({
211
+ name: "Hub 1: AC Repair",
212
+ location: "hub-1-sidebar",
213
+ items: [
214
+ {
215
+ type: "page",
216
+ id: authorityPage.id,
217
+ title: "Overview"
218
+ },
219
+ {
220
+ type: "custom",
221
+ title: "Knowledge Base",
222
+ url: "#",
223
+ children: hub.knowledgePages.map(p => ({
224
+ type: "page",
225
+ id: p.wpId,
226
+ title: p.title
227
+ }))
228
+ },
229
+ {
230
+ type: "custom",
231
+ title: "Common Questions",
232
+ url: "#",
233
+ children: hub.answerPages.slice(0, 10).map(p => ({
234
+ type: "page",
235
+ id: p.wpId,
236
+ title: p.question
237
+ }))
238
+ }
239
+ ]
240
+ });
241
+ ```
242
+
243
+ **Main Site Menu** (if deploying all hubs):
244
+ ```javascript
245
+ const mainMenu = await wpCreateMenu({
246
+ name: "Primary Navigation",
247
+ location: "primary",
248
+ items: [
249
+ { title: "Home", url: "/" },
250
+ {
251
+ title: "Services",
252
+ children: strategy.hubs.map(hub => ({
253
+ type: "page",
254
+ id: hub.authorityPage.wpId,
255
+ title: hub.hubName
256
+ }))
257
+ },
258
+ { title: "About", url: "/about/" },
259
+ { title: "Contact", url: "/contact/" }
260
+ ]
261
+ });
262
+ ```
263
+
264
+ ### Step 5: SEO Metadata & Schema
265
+
266
+ **For Each Page**:
267
+
268
+ **SEO Metadata** (via Yoast/Rank Math):
269
+ ```javascript
270
+ await wpUpdatePageMeta(pageId, {
271
+ // Title tag
272
+ '_yoast_wpseo_title': '{{TITLE}} | {{BUSINESS_NAME}}',
273
+
274
+ // Meta description
275
+ '_yoast_wpseo_metadesc': '{{META_DESCRIPTION}}',
276
+
277
+ // Focus keyword
278
+ '_yoast_wpseo_focuskw': '{{PRIMARY_KEYWORD}}',
279
+
280
+ // Canonical URL
281
+ '_yoast_wpseo_canonical': page.url,
282
+
283
+ // Open Graph
284
+ '_yoast_wpseo_opengraph-title': page.title,
285
+ '_yoast_wpseo_opengraph-description': page.metaDescription,
286
+
287
+ // Twitter Card
288
+ '_yoast_wpseo_twitter-title': page.title,
289
+ '_yoast_wpseo_twitter-description': page.metaDescription
290
+ });
291
+ ```
292
+
293
+ **Schema Markup**:
294
+
295
+ **Authority Page** (Service + LocalBusiness):
296
+ ```json
297
+ {
298
+ "@context": "https://schema.org",
299
+ "@type": "Service",
300
+ "serviceType": "{{PRIMARY_SERVICE}}",
301
+ "provider": {
302
+ "@type": "LocalBusiness",
303
+ "name": "{{BUSINESS_NAME}}",
304
+ "address": {
305
+ "@type": "PostalAddress",
306
+ "streetAddress": "{{ADDRESS}}",
307
+ "addressLocality": "{{CITY}}",
308
+ "addressRegion": "{{STATE}}"
309
+ },
310
+ "telephone": "{{PHONE}}",
311
+ "aggregateRating": {
312
+ "@type": "AggregateRating",
313
+ "ratingValue": "4.9",
314
+ "reviewCount": "500"
315
+ }
316
+ }
317
+ }
318
+ ```
319
+
320
+ **Knowledge Page** (Article + HowTo):
321
+ ```json
322
+ {
323
+ "@context": "https://schema.org",
324
+ "@type": "Article",
325
+ "headline": "{{PAGE_TITLE}}",
326
+ "author": {
327
+ "@type": "Organization",
328
+ "name": "{{BUSINESS_NAME}}"
329
+ }
330
+ }
331
+ ```
332
+
333
+ **Answer Page** (FAQPage):
334
+ ```json
335
+ {
336
+ "@context": "https://schema.org",
337
+ "@type": "FAQPage",
338
+ "mainEntity": [{
339
+ "@type": "Question",
340
+ "name": "{{QUESTION}}",
341
+ "acceptedAnswer": {
342
+ "@type": "Answer",
343
+ "text": "{{ANSWER_TEXT}}"
344
+ }
345
+ }]
346
+ }
347
+ ```
348
+
349
+ ### Step 6: Permalink Configuration
350
+
351
+ **Set Permalink Structure**:
352
+ ```javascript
353
+ // Ensure proper URL structure
354
+ await wpSetPermalinks({
355
+ structure: '/%postname%/', // Clean URLs
356
+ category_base: '',
357
+ tag_base: ''
358
+ });
359
+ ```
360
+
361
+ **Result**:
362
+ - `/ac-repair-services/` (Authority)
363
+ - `/ac-repair-services/ac-not-cooling/` (Knowledge)
364
+ - `/ac-repair-services/how-much-cost/` (Answer)
365
+
366
+ ### Step 7: Breadcrumb Setup
367
+
368
+ **Configure Yoast Breadcrumbs**:
369
+ ```javascript
370
+ // For Knowledge/Answer pages
371
+ Home > AC Repair Services > AC Not Cooling Troubleshooting
372
+
373
+ // Breadcrumb structure from parent-child
374
+ await wpSetBreadcrumbs({
375
+ enabled: true,
376
+ separator: '>',
377
+ home_text: 'Home',
378
+ prefix: '',
379
+ archiveprefix: '',
380
+ searchprefix: 'Search for'
381
+ });
382
+ ```
383
+
384
+ ## Dry Run Mode
385
+
386
+ **When `--dry-run` specified**:
387
+
388
+ ```
389
+ 🏛️ DRY RUN: Previewing Hub 1 Deployment
390
+
391
+ Would create:
392
+ ✓ Authority: /ac-repair-services/
393
+ Title: AC Repair Services in Atlanta
394
+ Parent: None (top-level)
395
+ Template: page-authority-hub.php
396
+
397
+ ✓ Knowledge: /ac-repair-services/ac-not-cooling/
398
+ Title: AC Not Cooling Troubleshooting
399
+ Parent: AC Repair Services (ID would be created)
400
+ Template: page-knowledge.php
401
+
402
+ ... [Preview all 41 pages]
403
+
404
+ Would create navigation menu: "Hub 1: AC Repair"
405
+ Would set SEO metadata for all pages
406
+ Would add schema markup
407
+
408
+ Total: 41 pages would be created
409
+
410
+ → No actual changes made
411
+ → Run without --dry-run to deploy
412
+ ```
413
+
414
+ ## Error Handling
415
+
416
+ **Page Creation Failure**:
417
+ ```
418
+ ⚠️ Error creating page: AC Compressor Replacement
419
+
420
+ Error: Duplicate slug detected
421
+ Suggestion: Page may already exist
422
+
423
+ Options:
424
+ 1. Run with --update to update existing page
425
+ 2. Change slug in strategy
426
+ 3. Delete existing page manually
427
+
428
+ → Continuing with remaining pages...
429
+ ```
430
+
431
+ **WordPress Connection Lost**:
432
+ ```
433
+ ❌ WordPress connection lost during deployment
434
+
435
+ Status:
436
+ ✓ Created: 15/41 pages
437
+ ✗ Failed: 26 pages remaining
438
+
439
+ → Safe to retry - existing pages won't duplicate
440
+ → Run: aka-wireframe-wp deploy --hub 1 --resume
441
+ ```
442
+
443
+ ## Update Mode
444
+
445
+ **When `--update` specified**:
446
+
447
+ ```
448
+ → Update mode: Modifying existing pages
449
+
450
+ ✓ Updated: /ac-repair-services/ (ID: 123)
451
+ ✓ Updated: /ac-repair-services/ac-not-cooling/ (ID: 124)
452
+ ...
453
+
454
+ Note: Parent-child relationships preserved
455
+ Note: URLs unchanged
456
+ Note: SEO metadata updated
457
+ ```
458
+
459
+ ## Deployment Report
460
+
461
+ **Generated File**: `generated-content/hub-1/deployment-report.md`
462
+
463
+ ```markdown
464
+ # Deployment Report - Hub 1
465
+
466
+ ## Summary
467
+ - Deployment time: 3 minutes
468
+ - Pages created: 41
469
+ - Pages failed: 0
470
+ - WordPress URL: http://localhost:8080
471
+
472
+ ## Pages Deployed
473
+
474
+ ### Authority Hub
475
+ - Title: AC Repair Services in Atlanta
476
+ - URL: http://localhost:8080/ac-repair-services/
477
+ - ID: 123
478
+ - Status: Published ✓
479
+
480
+ ### Knowledge Pages (15)
481
+ 1. AC Not Cooling Troubleshooting
482
+ URL: .../ac-not-cooling-troubleshooting/
483
+ ID: 124
484
+
485
+ 2. AC Refrigerant Leak Repair
486
+ URL: .../refrigerant-leak-repair/
487
+ ID: 125
488
+
489
+ ... [all 15]
490
+
491
+ ### Answer Pages (25)
492
+ 1. How much does AC repair cost?
493
+ URL: .../how-much-ac-repair-cost/
494
+ ID: 140
495
+
496
+ ... [all 25]
497
+
498
+ ## Navigation
499
+ - Hub menu created: "Hub 1: AC Repair"
500
+ - Breadcrumbs configured ✓
501
+
502
+ ## SEO
503
+ - Meta titles: 41/41 ✓
504
+ - Meta descriptions: 41/41 ✓
505
+ - Focus keywords: 41/41 ✓
506
+ - Schema markup: 41/41 ✓
507
+
508
+ ## Next Steps
509
+ ✓ Hub 1 is live and ready!
510
+ → View: http://localhost:8080/ac-repair-services/
511
+ → Next: Deploy Hub 2
512
+ ```
513
+
514
+ ## Integration with Other Droids
515
+
516
+ **Receives from aka-internal-linker**:
517
+ - Content with working HTML links
518
+ - No broken links
519
+ - Ready for deployment
520
+
521
+ **Provides to aka-seo-optimizer**:
522
+ - Live WordPress URLs
523
+ - Page IDs for optimization
524
+ - Structure for validation
525
+
526
+ ## Success Criteria
527
+
528
+ ✅ All pages deployed successfully
529
+ ✅ Parent-child hierarchy correct
530
+ ✅ Navigation menus created
531
+ ✅ SEO metadata complete
532
+ ✅ Schema markup added
533
+ ✅ Permalinks configured
534
+ ✅ Breadcrumbs working
535
+ ✅ Theme active and styled
536
+ ✅ All links working
537
+
538
+ ## Notes
539
+
540
+ - Uses WordPress REST API (requires WordPress 4.7+)
541
+ - Requires app password or basic auth
542
+ - Handles large batch deployments efficiently
543
+ - Preserves existing content when updating
544
+ - Safe to retry on failure
545
+ - Dry run prevents accidental deployments
@@ -0,0 +1,138 @@
1
+ # Authority Site Builder Skill
2
+
3
+ Build complete authority sites (330+ pages) using the AKA framework when triggered by webhook orders.
4
+
5
+ ## Trigger
6
+
7
+ This skill activates when receiving a new order webhook with client/business details.
8
+
9
+ ## Input Format
10
+
11
+ The webhook message contains:
12
+ - **Client name** — who ordered the site
13
+ - **Business name** — the brand name
14
+ - **Niche/industry** — what they do
15
+ - **Target location(s)** — cities, regions, service areas
16
+ - **Primary services/keywords** — main offerings
17
+ - **Domain name** — if provided
18
+ - **Brand guidelines** — colors, tone, preferences
19
+
20
+ ## Workflow
21
+
22
+ ### Step 1: Research Phase
23
+ 1. Search for top 5-10 competitors in the niche + location
24
+ 2. Extract keyword clusters from competitor sites
25
+ 3. Identify service variations and local modifiers
26
+ 4. Compile FAQ patterns from Google's "People Also Ask"
27
+ 5. Document findings in `research/` folder
28
+
29
+ ### Step 2: Site Architecture
30
+ Generate the full structure targeting **330+ pages**:
31
+
32
+ ```
33
+ Authority Layer (5-10 pages)
34
+ ├── Homepage
35
+ ├── About
36
+ ├── Contact
37
+ ├── Main Service Pages (3-5)
38
+ └── Location Hub
39
+
40
+ Knowledge Layer (50-100 pages)
41
+ ├── Service Detail Pages
42
+ ├── Industry Guides
43
+ ├── How-To Articles
44
+ ├── Comparison Pages
45
+ └── Resource Pages
46
+
47
+ Answer Layer (200-300 pages)
48
+ ├── FAQ Pages (grouped by topic)
49
+ ├── Location + Service Combos
50
+ ├── Long-tail Question Pages
51
+ └── "Near Me" Variants
52
+ ```
53
+
54
+ ### Step 3: AKA SEO Wireframe
55
+ For each core page, define:
56
+ - Page title + H1
57
+ - Target keyword (primary + secondary)
58
+ - Meta description template
59
+ - Content sections outline
60
+ - Internal linking targets
61
+ - Schema markup type
62
+
63
+ ### Step 4: Content Plan
64
+ Generate structured output with:
65
+ - Complete page list with URLs
66
+ - Target keywords per page
67
+ - Internal linking map (which pages link to which)
68
+ - Schema markup recommendations
69
+ - Content priority order (build sequence)
70
+
71
+ ### Step 5: Telegram Summary
72
+ Send a summary to Rob on Telegram labeled:
73
+ ```
74
+ 🏗 Authority Site Builder
75
+
76
+ New site plan ready for: [Business Name]
77
+ 📊 Total pages: [count]
78
+ 📍 Locations: [count]
79
+ 🎯 Services: [count]
80
+
81
+ Site map overview:
82
+ - Authority pages: X
83
+ - Knowledge pages: X
84
+ - Answer pages: X
85
+
86
+ Estimated build time: [X hours/days]
87
+
88
+ Full plan exported to: [webhook URL]
89
+ ```
90
+
91
+ ### Step 6: Export JSON
92
+ POST the complete structured plan to the outbound webhook:
93
+
94
+ ```json
95
+ {
96
+ "order_id": "unique-id",
97
+ "client_name": "...",
98
+ "business_name": "...",
99
+ "domain": "...",
100
+ "total_pages": 330,
101
+ "architecture": {
102
+ "authority": [...],
103
+ "knowledge": [...],
104
+ "answer": [...]
105
+ },
106
+ "internal_links": [...],
107
+ "schema_recommendations": [...],
108
+ "build_sequence": [...],
109
+ "created_at": "ISO timestamp"
110
+ }
111
+ ```
112
+
113
+ ## Output Files
114
+
115
+ All work is saved to: `/home/rabih/.openclaw/workspace/authority-sites/[business-slug]/`
116
+ - `research/competitors.md`
117
+ - `research/keywords.md`
118
+ - `research/faqs.md`
119
+ - `architecture/sitemap.json`
120
+ - `architecture/sitemap.md`
121
+ - `content-plan/pages.json`
122
+ - `content-plan/internal-links.json`
123
+ - `export/full-plan.json`
124
+
125
+ ## Outbound Webhook
126
+
127
+ After completion, POST the full plan JSON to the configured webhook URL.
128
+ The URL will be provided in the system config or order payload.
129
+
130
+ ## Status Updates
131
+
132
+ Always label messages with: `🏗 Authority Site Builder`
133
+ Send status updates on:
134
+ - Order received
135
+ - Research complete
136
+ - Architecture generated
137
+ - Plan exported
138
+ - Any errors encountered