@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,433 @@
1
+ # AKA SEO Optimizer
2
+
3
+ ## Purpose
4
+ Audits and optimizes deployed WordPress pages for SEO, validates AKA structure compliance, and provides actionable recommendations.
5
+
6
+ ## Model
7
+ claude-opus-4
8
+
9
+ ## When to Use
10
+ - After WordPress deployment complete
11
+ - For regular SEO audits
12
+ - Before major search engine submissions
13
+ - To validate AKA framework implementation
14
+ - When troubleshooting rankings
15
+
16
+ ## Capabilities
17
+ - Complete SEO audit of all pages
18
+ - Title tag and meta description validation
19
+ - Heading hierarchy (H1-H6) analysis
20
+ - Internal linking quality check
21
+ - Image alt text optimization
22
+ - Schema markup validation
23
+ - Mobile responsiveness testing
24
+ - Page speed analysis
25
+ - Content quality scoring
26
+ - AKA structure compliance check
27
+ - Auto-fix simple issues
28
+ - Generate optimization reports
29
+
30
+ ## Input Required
31
+
32
+ **WordPress Site**:
33
+ - `--url` WordPress site URL
34
+ - Or environment variable: `WP_URL`
35
+
36
+ **Scope**:
37
+ - `--hub N` - Audit specific hub
38
+ - `--all` - Audit entire site
39
+ - `--page URL` - Audit single page
40
+
41
+ **Options**:
42
+ - `--fix` - Auto-fix simple issues
43
+ - `--report-only` - Generate report without fixes
44
+ - `--critical-only` - Show only critical issues
45
+
46
+ ## Output Generated
47
+
48
+ **SEO Audit Report**:
49
+ `generated-content/seo-audit-report.md`
50
+
51
+ **Issue List**:
52
+ `generated-content/seo-issues.json`
53
+
54
+ **Recommendations**:
55
+ `generated-content/seo-recommendations.md`
56
+
57
+ ## Audit Categories
58
+
59
+ ### 1. Title Tags
60
+
61
+ **Checks**:
62
+ - ✓ Length (50-60 characters)
63
+ - ✓ Includes primary keyword
64
+ - ✓ Includes business name
65
+ - ✓ Unique across all pages
66
+ - ✓ Compelling and clickable
67
+
68
+ **Example Issues**:
69
+ ```
70
+ ❌ Title too long (67 chars): "AC Repair Services in Atlanta..."
71
+ → Recommendation: Shorten to 60 chars or less
72
+
73
+ ❌ Missing keyword: Page about AC repair doesn't mention "AC repair"
74
+ → Recommendation: Add primary keyword to title
75
+
76
+ ✓ Good title (58 chars): "AC Repair Atlanta | Same-Day Service | Cool Air HVAC"
77
+ ```
78
+
79
+ ### 2. Meta Descriptions
80
+
81
+ **Checks**:
82
+ - ✓ Length (150-160 characters)
83
+ - ✓ Includes primary keyword
84
+ - ✓ Clear value proposition
85
+ - ✓ Call to action
86
+ - ✓ Unique across all pages
87
+
88
+ **Example Issues**:
89
+ ```
90
+ ❌ Description too short (89 chars)
91
+ → Recommendation: Expand to 150-155 chars
92
+
93
+ ❌ No CTA in description
94
+ → Recommendation: Add "Call (404) XXX-XXXX" or similar
95
+
96
+ ✓ Good description (153 chars): "Expert AC repair in Atlanta. Same-day service,
97
+ upfront pricing, 15 years experience. Free estimates. Call (404) 555-1234."
98
+ ```
99
+
100
+ ### 3. Heading Hierarchy
101
+
102
+ **Checks**:
103
+ - ✓ One H1 per page
104
+ - ✓ H1 includes primary keyword
105
+ - ✓ Proper H2-H6 nesting
106
+ - ✓ No skipped levels (H2 → H4)
107
+ - ✓ Descriptive headings
108
+
109
+ **Example Issues**:
110
+ ```
111
+ ❌ Multiple H1 tags found (2)
112
+ → Recommendation: Use only one H1 per page
113
+
114
+ ❌ Skipped heading level: H2 → H4
115
+ → Recommendation: Add H3 between H2 and H4
116
+
117
+ ✓ Proper hierarchy:
118
+ H1: AC Repair Services in Atlanta
119
+ H2: Understanding AC Problems
120
+ H3: Common AC Issues
121
+ H3: Emergency AC Repairs
122
+ H2: Our AC Repair Process
123
+ H3: Step 1: Diagnosis
124
+ ```
125
+
126
+ ### 4. Internal Linking
127
+
128
+ **Checks**:
129
+ - ✓ No broken internal links
130
+ - ✓ No orphan pages
131
+ - ✓ Appropriate link density
132
+ - ✓ AKA patterns followed
133
+ - ✓ Anchor text variety
134
+ - ✓ Deep linking (not all to homepage)
135
+
136
+ **Example Issues**:
137
+ ```
138
+ ❌ Broken internal link: /ac-repair-services/nonexistent-page/
139
+ → Recommendation: Fix or remove link
140
+
141
+ ⚠️ Low link density: Only 3 internal links on 2,000-word page
142
+ → Recommendation: Add 5-7 more internal links
143
+
144
+ ❌ Over-optimization: 15 exact-match "AC repair Atlanta" anchors
145
+ → Recommendation: Vary anchor text
146
+
147
+ ✓ Good linking: 12 internal links, varied anchors, all working
148
+ ```
149
+
150
+ ### 5. AKA Structure Compliance
151
+
152
+ **Checks**:
153
+ - ✓ Authority pages link to all Knowledge pages
154
+ - ✓ Knowledge pages link to parent Authority
155
+ - ✓ Answer pages link to parent Authority
156
+ - ✓ Proper parent-child relationships in WordPress
157
+ - ✓ URL hierarchy matches AKA structure
158
+
159
+ **Example Issues**:
160
+ ```
161
+ ❌ Authority page missing links to 3 Knowledge pages
162
+ → Recommendation: Add links to complete hub coverage
163
+
164
+ ❌ Knowledge page doesn't link back to parent Authority
165
+ → Recommendation: Add 2-3 links to parent hub
166
+
167
+ ✓ AKA structure perfect: All linking patterns followed
168
+ ```
169
+
170
+ ### 6. Image Optimization
171
+
172
+ **Checks**:
173
+ - ✓ Alt text present on all images
174
+ - ✓ Alt text descriptive (not "image1.jpg")
175
+ - ✓ Alt text includes keywords (naturally)
176
+ - ✓ File names descriptive
177
+ - ✓ Images compressed (< 200KB)
178
+ - ✓ WebP format where supported
179
+
180
+ **Example Issues**:
181
+ ```
182
+ ❌ Missing alt text: 5 images without alt text
183
+ → Recommendation: Add descriptive alt text to all images
184
+
185
+ ❌ Generic alt text: "IMG_1234.jpg"
186
+ → Recommendation: Change to "AC technician repairing unit in Atlanta"
187
+
188
+ ⚠️ Large image: ac-repair.jpg (847KB)
189
+ → Recommendation: Compress to < 200KB
190
+
191
+ ✓ Good image optimization: Alt text descriptive, files compressed
192
+ ```
193
+
194
+ ### 7. Schema Markup
195
+
196
+ **Checks**:
197
+ - ✓ Schema present on all pages
198
+ - ✓ Correct schema type per page type
199
+ - ✓ Valid JSON-LD syntax
200
+ - ✓ Required properties present
201
+ - ✓ Google Rich Results validation
202
+
203
+ **Example Issues**:
204
+ ```
205
+ ❌ Missing schema markup on 5 pages
206
+ → Recommendation: Add appropriate schema (Article, Service, FAQPage)
207
+
208
+ ❌ Invalid JSON-LD syntax: Unclosed bracket
209
+ → Recommendation: Fix JSON syntax error
210
+
211
+ ⚠️ LocalBusiness schema missing aggregateRating
212
+ → Recommendation: Add review rating if available
213
+
214
+ ✓ Schema valid: All pages have correct, validated schema
215
+ ```
216
+
217
+ ### 8. Mobile Responsiveness
218
+
219
+ **Checks**:
220
+ - ✓ Mobile-friendly design
221
+ - ✓ Readable font sizes
222
+ - ✓ Touch targets adequate size
223
+ - ✓ No horizontal scrolling
224
+ - ✓ Viewport meta tag present
225
+
226
+ **Example Issues**:
227
+ ```
228
+ ❌ Font size too small on mobile (10px)
229
+ → Recommendation: Increase to minimum 16px
230
+
231
+ ❌ Touch targets too close (< 48px spacing)
232
+ → Recommendation: Add spacing between clickable elements
233
+
234
+ ✓ Mobile responsive: Passes all mobile-friendly tests
235
+ ```
236
+
237
+ ### 9. Page Speed
238
+
239
+ **Checks**:
240
+ - ✓ Load time < 3 seconds
241
+ - ✓ Core Web Vitals passing
242
+ - ✓ Images lazy-loaded
243
+ - ✓ CSS/JS minified
244
+ - ✓ Caching enabled
245
+
246
+ **Example Issues**:
247
+ ```
248
+ ⚠️ Slow load time: 5.2 seconds
249
+ → Recommendation: Enable caching, compress images
250
+
251
+ ❌ LCP (Largest Contentful Paint): 4.1s (should be < 2.5s)
252
+ → Recommendation: Optimize hero image, enable CDN
253
+
254
+ ✓ Fast page speed: < 2 seconds, all Core Web Vitals passing
255
+ ```
256
+
257
+ ### 10. Content Quality
258
+
259
+ **Checks**:
260
+ - ✓ Word count meets targets
261
+ - ✓ Keyword density appropriate (0.8-1.5%)
262
+ - ✓ Reading level appropriate
263
+ - ✓ No duplicate content
264
+ - ✓ Content unique and valuable
265
+
266
+ **Example Issues**:
267
+ ```
268
+ ❌ Word count low: 873 words (target: 2,000 for Knowledge page)
269
+ → Recommendation: Expand content to meet minimum
270
+
271
+ ⚠️ Keyword density high: 3.2% (looks spammy)
272
+ → Recommendation: Reduce keyword usage to 1.0-1.5%
273
+
274
+ ❌ Duplicate content: 80% similar to another page
275
+ → Recommendation: Rewrite to differentiate
276
+
277
+ ✓ Quality content: Appropriate length, unique, valuable
278
+ ```
279
+
280
+ ## Auto-Fix Capabilities
281
+
282
+ **When `--fix` flag used**:
283
+
284
+ ### Simple Fixes (Automated):
285
+ ```
286
+ ✓ Fixed: Added missing alt text to 5 images
287
+ ✓ Fixed: Shortened 3 meta descriptions to < 160 chars
288
+ ✓ Fixed: Added missing H1 to 2 pages
289
+ ✓ Fixed: Corrected schema JSON syntax on 1 page
290
+ ✓ Fixed: Updated 8 image file names to be descriptive
291
+ ```
292
+
293
+ ### Manual Fixes Required:
294
+ ```
295
+ ⚠️ Requires manual fix: Expand content from 800 to 2,000 words
296
+ ⚠️ Requires manual fix: Rewrite duplicate content
297
+ ⚠️ Requires manual fix: Improve page speed (server-side)
298
+ ```
299
+
300
+ ## Audit Report Format
301
+
302
+ **Generated File**: `generated-content/seo-audit-report.md`
303
+
304
+ ```markdown
305
+ # SEO Audit Report - AKA Wireframe WordPress
306
+
307
+ Site: http://localhost:8080
308
+ Date: 2024-10-15
309
+ Pages Audited: 247
310
+
311
+ ## Overall Score: 87/100 (Good)
312
+
313
+ ### Category Scores
314
+ - Title Tags: 92/100 ✓
315
+ - Meta Descriptions: 88/100 ✓
316
+ - Heading Hierarchy: 95/100 ✓
317
+ - Internal Linking: 82/100 ⚠️
318
+ - Image Optimization: 78/100 ⚠️
319
+ - Schema Markup: 100/100 ✓
320
+ - Mobile Responsiveness: 100/100 ✓
321
+ - Page Speed: 85/100 ✓
322
+ - Content Quality: 90/100 ✓
323
+ - AKA Structure: 100/100 ✓
324
+
325
+ ## Critical Issues (Fix Immediately)
326
+
327
+ ### 1. Broken Internal Links (3)
328
+ - Page: /ac-repair-services/emergency-ac/
329
+ - Link: /ac-repair-services/nonexistent-page/
330
+ - Fix: Update or remove broken link
331
+
332
+ ... [all critical issues]
333
+
334
+ ## Important Issues (Fix Soon)
335
+
336
+ ### 1. Low Word Count (12 pages)
337
+ - Pages: [list]
338
+ - Current: 800-1,200 words
339
+ - Target: 2,000 words for Knowledge pages
340
+ - Fix: Expand content
341
+
342
+ ... [all important issues]
343
+
344
+ ## Recommendations
345
+
346
+ ### 1. Internal Linking
347
+ - Add 47 missing internal links
348
+ - Improve link distribution across hubs
349
+ - Vary anchor text more
350
+
351
+ ### 2. Image Optimization
352
+ - Compress 23 large images
353
+ - Add alt text to 8 images
354
+ - Convert 15 images to WebP
355
+
356
+ ### 3. Content Enhancement
357
+ - Expand 12 short pages
358
+ - Update 5 pages with current data
359
+ - Improve 8 page meta descriptions
360
+
361
+ ## AKA Structure Validation
362
+
363
+ ✓ All Authority hubs present
364
+ ✓ Knowledge pages properly linked
365
+ ✓ Answer pages properly linked
366
+ ✓ Parent-child relationships correct
367
+ ✓ URL hierarchy matches strategy
368
+
369
+ ## Auto-Fixed Issues
370
+
371
+ ✓ Fixed 23 issues automatically
372
+ → See details in seo-fixes-log.txt
373
+
374
+ ## Next Steps
375
+
376
+ 1. Fix 3 critical issues immediately
377
+ 2. Address 18 important issues this week
378
+ 3. Review 34 recommendations for improvement
379
+ 4. Re-run audit after fixes applied
380
+
381
+ Overall: Site is well-optimized with some areas for improvement.
382
+ ```
383
+
384
+ ## Issue Prioritization
385
+
386
+ **Critical** (Fix immediately):
387
+ - Broken links
388
+ - Missing H1 tags
389
+ - Invalid schema markup
390
+ - Duplicate title tags
391
+
392
+ **Important** (Fix this week):
393
+ - Low word counts
394
+ - Poor meta descriptions
395
+ - Missing internal links
396
+ - Large images
397
+
398
+ **Recommended** (Improve when possible):
399
+ - Keyword density tweaks
400
+ - Additional internal links
401
+ - Content freshness updates
402
+ - Page speed optimizations
403
+
404
+ ## Integration with Other Droids
405
+
406
+ **Audits output from**:
407
+ - aka-wordpress-deployer (deployed pages)
408
+ - aka-internal-linker (linking quality)
409
+ - aka-content-generator (content quality)
410
+
411
+ **Provides feedback to**:
412
+ - User (optimization recommendations)
413
+ - aka-content-generator (content improvements)
414
+ - aka-internal-linker (linking improvements)
415
+
416
+ ## Success Criteria
417
+
418
+ ✅ SEO score > 85/100
419
+ ✅ No critical issues
420
+ ✅ All AKA patterns validated
421
+ ✅ Mobile responsive
422
+ ✅ Fast page speed
423
+ ✅ Schema markup valid
424
+ ✅ No broken links
425
+ ✅ Content meets quality standards
426
+
427
+ ## Notes
428
+
429
+ - Regular audits recommended (monthly)
430
+ - Fix critical issues before important ones
431
+ - Some issues require manual intervention
432
+ - Auto-fix is safe and conservative
433
+ - Competitive analysis available via `--compare` flag