@hanzlaa/rcode 4.3.2 → 4.4.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 (130) hide show
  1. package/AGENTS.md +1 -1
  2. package/CONTRIBUTING.md +2 -1
  3. package/README.md +45 -10
  4. package/cli/doctor.js +21 -3
  5. package/cli/index.js +5 -1
  6. package/cli/install.js +16 -2
  7. package/cli/postinstall.js +1 -1
  8. package/cli/uninstall.js +48 -6
  9. package/dist/rcode.js +178 -174
  10. package/package.json +12 -22
  11. package/rcode/agents/rcode-codebase-mapper.md +12 -0
  12. package/rcode/agents/rcode-phase-researcher.md +13 -0
  13. package/rcode/agents/rcode-project-researcher.md +32 -0
  14. package/rcode/agents/rcode-roadmapper.md +15 -0
  15. package/rcode/agents/rules/planner/common-patterns.md +40 -0
  16. package/rcode/bin/lib/roadmap.cjs +184 -11
  17. package/rcode/bin/rcode-hooks.cjs +303 -14
  18. package/rcode/bin/rcode-tools.cjs +669 -55
  19. package/rcode/commands/lens-audit.md +8 -6
  20. package/rcode/data/intent-table.json +87 -0
  21. package/rcode/modules/seo.yaml +22 -0
  22. package/rcode/references/project-types.yaml +75 -0
  23. package/rcode/skills/SKILLS_INDEX.md +20 -2
  24. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/SKILL.md +16 -21
  25. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/rules/backlog-building.md +13 -0
  26. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/rules/merge-strategy.md +17 -0
  27. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/rules/orchestrator-rhythm.md +9 -0
  28. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/rules/wave-design.md +21 -0
  29. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/templates/heartbeat.sh +0 -0
  30. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +60 -1
  31. package/rcode/skills/core/rcode-lazy/SKILL.md +149 -0
  32. package/rcode/skills/seo/module.yaml +20 -0
  33. package/rcode/skills/seo/on-page-seo-auditor/SKILL.md +308 -0
  34. package/rcode/skills/seo/on-page-seo-auditor/references/audit-example.md +109 -0
  35. package/rcode/skills/seo/on-page-seo-auditor/references/audit-templates.md +427 -0
  36. package/rcode/skills/seo/on-page-seo-auditor/references/bulk-audit-playbook.md +116 -0
  37. package/rcode/skills/seo/on-page-seo-auditor/references/scoring-rubric.md +525 -0
  38. package/rcode/skills/seo/rank-and-rent-local-seo/SKILL.md +94 -0
  39. package/rcode/skills/seo/rank-and-rent-local-seo/rules/city-matrix-and-pages.md +76 -0
  40. package/rcode/skills/seo/rank-and-rent-local-seo/rules/monetization.md +70 -0
  41. package/rcode/skills/seo/rank-and-rent-local-seo/rules/niche-selection.md +60 -0
  42. package/rcode/skills/seo/rank-and-rent-local-seo/rules/subniche-discovery.md +66 -0
  43. package/rcode/skills/seo/rank-and-rent-local-seo/templates/service-city-page.md +36 -0
  44. package/rcode/skills/seo/rank-and-rent-local-seo/templates/subniche-research-prompt.md +34 -0
  45. package/rcode/skills/seo/seo-audit/SKILL.md +412 -0
  46. package/rcode/skills/seo/seo-audit/evals/evals.json +136 -0
  47. package/rcode/skills/seo/seo-audit/references/ai-writing-detection.md +200 -0
  48. package/rcode/skills/seo/seo-content-factory/SKILL.md +130 -0
  49. package/rcode/skills/seo/seo-content-factory/rules/agents.md +80 -0
  50. package/rcode/skills/seo/seo-content-factory/rules/herdr-wave-mapping.md +80 -0
  51. package/rcode/skills/seo/seo-content-factory/rules/pipeline.md +102 -0
  52. package/rcode/skills/seo/seo-content-factory/rules/programmatic-pages.md +107 -0
  53. package/rcode/skills/seo/seo-content-factory/rules/quality-gates.md +68 -0
  54. package/rcode/skills/seo/seo-content-factory/rules/weekly-cadence.md +61 -0
  55. package/rcode/skills/seo/seo-content-factory/templates/BACKLOG.md +23 -0
  56. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/01-funnel-A1-A4.md +63 -0
  57. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/02-fanout-editorial-A5-A6-A8.md +28 -0
  58. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/03-fanout-programmatic-A7-A6-A8.md +25 -0
  59. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/04-loop-A9-A10.md +34 -0
  60. package/rcode/skills/seo/seo-content-factory/templates/article.mdx +39 -0
  61. package/rcode/skills/seo/seo-content-factory/templates/cluster.schema.json +52 -0
  62. package/rcode/skills/seo/seo-content-factory/templates/content-brief.md +51 -0
  63. package/rcode/skills/seo/seo-content-factory/templates/jsonld-builders.ts +49 -0
  64. package/rcode/skills/seo/seo-content-factory/templates/keywords.csv +13 -0
  65. package/rcode/skills/seo/seo-content-factory/templates/programmatic-page.tsx +58 -0
  66. package/rcode/skills/seo/seo-content-writer/SKILL.md +263 -0
  67. package/rcode/skills/seo/seo-content-writer/references/content-structure-templates.md +875 -0
  68. package/rcode/skills/seo/seo-content-writer/references/instructions-detail.md +239 -0
  69. package/rcode/skills/seo/seo-content-writer/references/seo-writing-checklist.md +250 -0
  70. package/rcode/skills/seo/seo-content-writer/references/title-formulas.md +339 -0
  71. package/rcode/skills/seo/seo-growth-orchestrator/SKILL.md +79 -0
  72. package/rcode/skills/seo/seo-growth-orchestrator/rules/backlinks.md +29 -0
  73. package/rcode/skills/seo/seo-growth-orchestrator/rules/content-engine.md +27 -0
  74. package/rcode/skills/seo/seo-growth-orchestrator/rules/dos-and-donts.md +40 -0
  75. package/rcode/skills/seo/seo-growth-orchestrator/rules/goals-protocol.md +34 -0
  76. package/rcode/skills/seo/seo-growth-orchestrator/rules/local-seo-stack.md +35 -0
  77. package/rcode/skills/seo/seo-growth-orchestrator/rules/mrr-sprint.md +27 -0
  78. package/rcode/skills/seo/seo-growth-orchestrator/rules/tools.md +19 -0
  79. package/rcode/skills/seo/seo-growth-orchestrator/templates/backlink-research.md +29 -0
  80. package/rcode/skills/seo/seo-growth-orchestrator/templates/goal-protocol.md +35 -0
  81. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-citations.md +24 -0
  82. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-city-pages.md +27 -0
  83. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gbp-categories.md +23 -0
  84. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gsc-goldmine.md +27 -0
  85. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-review-mining.md +26 -0
  86. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-30day-plan.md +19 -0
  87. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-cut.md +13 -0
  88. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-opportunity-finder.md +17 -0
  89. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-role-model.md +18 -0
  90. package/rcode/skills/seo/seo-site-builder/SKILL.md +149 -0
  91. package/rcode/skills/seo/seo-site-builder/rules/01-niche-discovery.md +64 -0
  92. package/rcode/skills/seo/seo-site-builder/rules/02-deep-research.md +164 -0
  93. package/rcode/skills/seo/seo-site-builder/rules/03-keyword-strategy.md +82 -0
  94. package/rcode/skills/seo/seo-site-builder/rules/04-content-plan.md +173 -0
  95. package/rcode/skills/seo/seo-site-builder/rules/05-site-build.md +187 -0
  96. package/rcode/skills/seo/seo-site-builder/rules/06-yolo.md +127 -0
  97. package/rcode/skills/seo/seo-site-builder/templates/article-stub.mdx +62 -0
  98. package/rcode/skills/seo/seo-site-builder/templates/image-prompt.md +97 -0
  99. package/rcode/skills/seo/seo-site-builder/templates/keyword-export.md +45 -0
  100. package/rcode/skills/seo/seo-site-builder/templates/niche-scorecard.md +28 -0
  101. package/rcode/skills/seo/technical-seo-checker/SKILL.md +329 -0
  102. package/rcode/skills/seo/technical-seo-checker/references/bulk-audit-playbook.md +118 -0
  103. package/rcode/skills/seo/technical-seo-checker/references/ecommerce-platform-patterns.md +166 -0
  104. package/rcode/skills/seo/technical-seo-checker/references/http-status-codes.md +705 -0
  105. package/rcode/skills/seo/technical-seo-checker/references/llm-crawler-handling.md +257 -0
  106. package/rcode/skills/seo/technical-seo-checker/references/pre-migration-playbook.md +137 -0
  107. package/rcode/skills/seo/technical-seo-checker/references/robots-txt-reference.md +717 -0
  108. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-example.md +169 -0
  109. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-templates.md +436 -0
  110. package/rcode/templates/settings-hooks.json +16 -1
  111. package/rcode/workflows/do.md +17 -0
  112. package/rcode/workflows/enable-hooks.md +3 -2
  113. package/rcode/workflows/execute-sprint.md +22 -0
  114. package/rcode/workflows/execute.md +17 -3
  115. package/rcode/workflows/lens-audit.md +49 -8
  116. package/rcode/workflows/new-milestone.md +21 -9
  117. package/rcode/workflows/new-project-create-roadmap.md +2 -0
  118. package/rcode/workflows/new-project-roadmap.md +2 -0
  119. package/rcode/workflows/new-project.md +3 -0
  120. package/rcode/workflows/plan.md +15 -2
  121. package/server/dashboard.js +6 -2
  122. package/server/lib/api.js +35 -20
  123. package/server/lib/html/client/components/OrchPanel.js +43 -2
  124. package/server/lib/html/client/components/dashboard/InProgress.js +5 -4
  125. package/server/lib/html/client/components/shared.js +14 -0
  126. package/server/lib/html/client/orchestrator.js +13 -0
  127. package/server/lib/html/client/views/KanbanView.js +33 -4
  128. package/server/lib/html/css.js +57 -3
  129. package/server/lib/scanner.js +40 -4
  130. package/server/orchestrator.js +42 -0
@@ -0,0 +1,169 @@
1
+ # Technical SEO Checker — Worked Example & Checklist
2
+
3
+ Referenced from [SKILL.md](https://github.com/aaron-he-zhu/seo-geo-claude-skills/blob/main/optimize/technical-seo-checker/SKILL.md).
4
+
5
+ ---
6
+
7
+ ## Worked Example
8
+
9
+ **User**: "Check the technical SEO of cloudhosting.com"
10
+
11
+ **Output**:
12
+
13
+ ```markdown
14
+ # Technical SEO Audit Report
15
+
16
+ **Domain**: cloudhosting.com
17
+ **Audit Date**: 2024-09-15
18
+ **Pages Analyzed**: 312
19
+
20
+ ## Crawlability Analysis
21
+
22
+ ### Robots.txt Review
23
+
24
+ **URL**: cloudhosting.com/robots.txt
25
+ **Status**: Found
26
+
27
+ | Check | Status | Notes |
28
+ |-------|--------|-------|
29
+ | File exists | ✅ | 200 response |
30
+ | Valid syntax | ⚠️ | Wildcard pattern `Disallow: /*?` too aggressive — blocks faceted pages |
31
+ | Sitemap declared | ❌ | No Sitemap directive in robots.txt |
32
+ | Important pages blocked | ⚠️ | /pricing/ blocked by `Disallow: /pricing` rule |
33
+ | Assets blocked | ✅ | CSS/JS accessible |
34
+
35
+ **Issues Found**:
36
+ - Sitemap URL not declared in robots.txt
37
+ - `/pricing/` inadvertently blocked — high-value commercial page
38
+
39
+ ### XML Sitemap Review
40
+
41
+ **Sitemap URL**: cloudhosting.com/sitemap.xml
42
+ **Status**: Found (not referenced in robots.txt)
43
+
44
+ | Check | Status | Notes |
45
+ |-------|--------|-------|
46
+ | Sitemap exists | ✅ | Valid XML, 287 URLs |
47
+ | Only indexable URLs | ❌ | 23 noindex URLs included |
48
+ | Includes lastmod | ⚠️ | All dates set to 2023-01-01 — not accurate |
49
+
50
+ **Crawlability Score**: 5/10
51
+
52
+ ## Performance Analysis
53
+
54
+ ### Core Web Vitals
55
+
56
+ | Metric | Mobile | Desktop | Target | Status |
57
+ |--------|--------|---------|--------|--------|
58
+ | LCP (Largest Contentful Paint) | 4.8s | 2.1s | <2.5s | ❌ Mobile / ✅ Desktop |
59
+ | FID (First Input Delay) | 45ms | 12ms | <100ms | ✅ / ✅ |
60
+ | CLS (Cumulative Layout Shift) | 0.24 | 0.08 | <0.1 | ❌ Mobile / ✅ Desktop |
61
+ | INP (Interaction to Next Paint) | 380ms | 140ms | <200ms | ❌ Mobile / ✅ Desktop |
62
+
63
+ ### Additional Performance Metrics
64
+
65
+ | Metric | Value | Status |
66
+ |--------|-------|--------|
67
+ | Time to First Byte (TTFB) | 1,240ms | ❌ |
68
+ | Page Size | 3.8MB | ❌ |
69
+ | Requests | 94 | ⚠️ |
70
+
71
+ **LCP Issues**:
72
+ - Uncompressed hero image (2.4MB PNG): Convert to WebP, est. save 1.9MB
73
+ - No CDN detected: TTFB 1,240ms from origin server
74
+
75
+ **CLS Issues**:
76
+ - Ad banner at top of page injects without reserved height (0.18 shift contribution)
77
+
78
+ **Performance Score**: 3/10
79
+
80
+ ## Security Analysis
81
+
82
+ ### HTTPS Status
83
+
84
+ | Check | Status | Notes |
85
+ |-------|--------|-------|
86
+ | SSL certificate valid | ✅ | Expires: 2025-03-22 |
87
+ | HTTPS enforced | ⚠️ | http://cloudhosting.com returns 200 instead of 301 redirect |
88
+ | Mixed content | ❌ | 7 images loaded over HTTP on /features/ page |
89
+ | HSTS enabled | ❌ | Header not present |
90
+
91
+ **Security Score**: 5/10
92
+
93
+ ## Structured Data Analysis
94
+
95
+ ### Schema Markup Found
96
+
97
+ | Schema Type | Pages | Valid | Errors |
98
+ |-------------|-------|-------|--------|
99
+ | Organization | 1 (homepage) | ✅ | None |
100
+ | Article | 0 | — | Missing on 48 blog posts |
101
+ | Product | 0 | — | Missing on 5 plan pages |
102
+ | FAQ | 0 | — | Missing on 12 pages with FAQ content |
103
+
104
+ **Structured Data Score**: 3/10
105
+
106
+ ## Overall Technical Health: 42/100
107
+
108
+ ```
109
+ Score Breakdown:
110
+ █████░░░░░ Crawlability: 5/10
111
+ ██████░░░░ Indexability: 6/10
112
+ ███░░░░░░░ Performance: 3/10
113
+ ██████░░░░ Mobile: 6/10
114
+ █████░░░░░ Security: 5/10
115
+ ██████░░░░ URL Structure: 6/10
116
+ ███░░░░░░░ Structured Data: 3/10
117
+ ```
118
+
119
+ ## Priority Issues
120
+
121
+ ### 🔴 Critical (Fix Immediately)
122
+ 1. **Mobile LCP 4.8s (target <2.5s)** — Compress hero image to WebP (est. save 1.9MB) and implement a CDN to reduce TTFB from 1,240ms to <400ms.
123
+
124
+ ### 🟡 Important (Fix Soon)
125
+ 2. **HTTP not redirecting to HTTPS** — Add 301 redirect from http:// to https:// and enable HSTS header. 7 mixed-content images on /features/ need URL updates.
126
+
127
+ ### 🟢 Minor (Optimize)
128
+ 3. **No Article/FAQ schema on blog posts** — Add Article schema to 48 blog posts and FAQ schema to 12 FAQ pages for rich result eligibility.
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Technical SEO Checklist
134
+
135
+ ```markdown
136
+ ### Crawlability
137
+ - [ ] robots.txt is valid and not blocking important content
138
+ - [ ] XML sitemap exists and is submitted to ~~search console
139
+ - [ ] No crawl errors in ~~search console
140
+ - [ ] No redirect chains or loops
141
+
142
+ ### Indexability
143
+ - [ ] Important pages are indexable
144
+ - [ ] Canonical tags are correct
145
+ - [ ] No duplicate content issues
146
+ - [ ] Pagination is handled correctly
147
+
148
+ ### Performance
149
+ - [ ] Core Web Vitals pass
150
+ - [ ] Page speed under 3 seconds
151
+ - [ ] Images are optimized
152
+ - [ ] JS/CSS are minified
153
+
154
+ ### Mobile
155
+ - [ ] Mobile-friendly test passes
156
+ - [ ] Viewport is configured
157
+ - [ ] Touch elements are properly sized
158
+
159
+ ### Security
160
+ - [ ] HTTPS is enforced
161
+ - [ ] SSL certificate is valid
162
+ - [ ] No mixed content
163
+ - [ ] Security headers present
164
+
165
+ ### Structure
166
+ - [ ] URLs are clean and descriptive
167
+ - [ ] Site architecture is logical
168
+ - [ ] Internal linking is strong
169
+ ```
@@ -0,0 +1,436 @@
1
+ # Technical SEO Checker — Output Templates
2
+
3
+ Detailed output templates for technical-seo-checker steps 1-9. Referenced from [SKILL.md](https://github.com/aaron-he-zhu/seo-geo-claude-skills/blob/main/optimize/technical-seo-checker/SKILL.md).
4
+
5
+ ---
6
+
7
+ ## Step 1: Audit Crawlability
8
+
9
+ ```markdown
10
+ ## Crawlability Analysis
11
+
12
+ ### Robots.txt Review
13
+
14
+ **URL**: [domain]/robots.txt
15
+ **Status**: [Found/Not Found/Error]
16
+
17
+ **Current Content**:
18
+ ```
19
+ [robots.txt content]
20
+ ```
21
+
22
+ | Check | Status | Notes |
23
+ |-------|--------|-------|
24
+ | File exists | ✅/❌ | [notes] |
25
+ | Valid syntax | ✅/⚠️/❌ | [errors found] |
26
+ | Sitemap declared | ✅/❌ | [sitemap URL] |
27
+ | Important pages blocked | ✅/⚠️/❌ | [blocked paths] |
28
+ | Assets blocked | ✅/⚠️/❌ | [CSS/JS blocked?] |
29
+ | Correct user-agents | ✅/⚠️/❌ | [notes] |
30
+
31
+ **Issues Found**:
32
+ - [Issue 1]
33
+ - [Issue 2]
34
+
35
+ **Recommended robots.txt**:
36
+ ```
37
+ User-agent: *
38
+ Allow: /
39
+ Disallow: /admin/
40
+ Disallow: /private/
41
+
42
+ Sitemap: https://example.com/sitemap.xml
43
+ ```
44
+
45
+ ---
46
+
47
+ ### XML Sitemap Review
48
+
49
+ **Sitemap URL**: [URL]
50
+ **Status**: [Found/Not Found/Error]
51
+
52
+ | Check | Status | Notes |
53
+ |-------|--------|-------|
54
+ | Sitemap exists | ✅/❌ | [notes] |
55
+ | Valid XML format | ✅/⚠️/❌ | [errors] |
56
+ | In robots.txt | ✅/❌ | [notes] |
57
+ | Submitted to ~~search console | ✅/⚠️/❌ | [notes] |
58
+ | URLs count | [X] | [appropriate?] |
59
+ | Only indexable URLs | ✅/⚠️/❌ | [notes] |
60
+ | Includes priority | ✅/⚠️ | [notes] |
61
+ | Includes lastmod | ✅/⚠️ | [accurate?] |
62
+
63
+ **Issues Found**:
64
+ - [Issue 1]
65
+
66
+ ---
67
+
68
+ ### Crawl Budget Analysis
69
+
70
+ | Factor | Status | Impact |
71
+ |--------|--------|--------|
72
+ | Crawl errors | [X] errors | [Low/Med/High] |
73
+ | Duplicate content | [X] pages | [Low/Med/High] |
74
+ | Thin content | [X] pages | [Low/Med/High] |
75
+ | Redirect chains | [X] found | [Low/Med/High] |
76
+ | Orphan pages | [X] found | [Low/Med/High] |
77
+
78
+ **Crawlability Score**: [X]/10
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Step 2: Audit Indexability
84
+
85
+ ```markdown
86
+ ## Indexability Analysis
87
+
88
+ ### Index Status Overview
89
+
90
+ | Metric | Count | Notes |
91
+ |--------|-------|-------|
92
+ | Pages in sitemap | [X] | |
93
+ | Pages indexed | [X] | [source: site: search] |
94
+ | Index coverage ratio | [X]% | [good if >90%] |
95
+
96
+ ### Index Blockers Check
97
+
98
+ | Blocker Type | Found | Pages Affected |
99
+ |--------------|-------|----------------|
100
+ | noindex meta tag | [X] | [list or "none"] |
101
+ | noindex X-Robots | [X] | [list or "none"] |
102
+ | Robots.txt blocked | [X] | [list or "none"] |
103
+ | Canonical to other | [X] | [list or "none"] |
104
+ | 4xx/5xx errors | [X] | [list or "none"] |
105
+ | Redirect loops | [X] | [list or "none"] |
106
+
107
+ ### Canonical Tags Audit
108
+
109
+ | Check | Status | Notes |
110
+ |-------|--------|-------|
111
+ | Canonicals present | ✅/⚠️/❌ | [X]% of pages |
112
+ | Self-referencing | ✅/⚠️/❌ | [notes] |
113
+ | Consistent (HTTP/HTTPS) | ✅/⚠️/❌ | [notes] |
114
+ | Consistent (www/non-www) | ✅/⚠️/❌ | [notes] |
115
+ | No conflicting signals | ✅/⚠️/❌ | [notes] |
116
+
117
+ ### Duplicate Content Issues
118
+
119
+ | Issue Type | Count | Examples |
120
+ |------------|-------|----------|
121
+ | Exact duplicates | [X] | [URLs] |
122
+ | Near duplicates | [X] | [URLs] |
123
+ | Parameter duplicates | [X] | [URLs] |
124
+ | WWW/non-WWW | [X] | [notes] |
125
+ | HTTP/HTTPS | [X] | [notes] |
126
+
127
+ **Indexability Score**: [X]/10
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Step 3: Audit Site Speed & Core Web Vitals
133
+
134
+ ```markdown
135
+ ## Performance Analysis
136
+
137
+ ### Core Web Vitals
138
+
139
+ | Metric | Mobile | Desktop | Target | Status |
140
+ |--------|--------|---------|--------|--------|
141
+ | LCP (Largest Contentful Paint) | [X]s | [X]s | <2.5s | ✅/⚠️/❌ |
142
+ | FID (First Input Delay) | [X]ms | [X]ms | <100ms | ✅/⚠️/❌ |
143
+ | CLS (Cumulative Layout Shift) | [X] | [X] | <0.1 | ✅/⚠️/❌ |
144
+ | INP (Interaction to Next Paint) | [X]ms | [X]ms | <200ms | ✅/⚠️/❌ |
145
+
146
+ ### Additional Performance Metrics
147
+
148
+ | Metric | Value | Status |
149
+ |--------|-------|--------|
150
+ | Time to First Byte (TTFB) | [X]ms | ✅/⚠️/❌ |
151
+ | First Contentful Paint (FCP) | [X]s | ✅/⚠️/❌ |
152
+ | Speed Index | [X] | ✅/⚠️/❌ |
153
+ | Total Blocking Time | [X]ms | ✅/⚠️/❌ |
154
+ | Page Size | [X]MB | ✅/⚠️/❌ |
155
+ | Requests | [X] | ✅/⚠️/❌ |
156
+
157
+ ### Performance Issues
158
+
159
+ **LCP Issues**:
160
+ - [Issue]: [Impact] - [Solution]
161
+ - [Issue]: [Impact] - [Solution]
162
+
163
+ **CLS Issues**:
164
+ - [Issue]: [Impact] - [Solution]
165
+
166
+ **Resource Loading**:
167
+ | Resource Type | Count | Size | Issues |
168
+ |---------------|-------|------|--------|
169
+ | Images | [X] | [X]MB | [notes] |
170
+ | JavaScript | [X] | [X]MB | [notes] |
171
+ | CSS | [X] | [X]KB | [notes] |
172
+ | Fonts | [X] | [X]KB | [notes] |
173
+
174
+ ### Optimization Recommendations
175
+
176
+ **High Impact**:
177
+ 1. [Recommendation] - Est. improvement: [X]s
178
+ 2. [Recommendation] - Est. improvement: [X]s
179
+
180
+ **Medium Impact**:
181
+ 1. [Recommendation]
182
+ 2. [Recommendation]
183
+
184
+ **Performance Score**: [X]/10
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Step 4: Audit Mobile-Friendliness
190
+
191
+ ```markdown
192
+ ## Mobile Optimization Analysis
193
+
194
+ ### Mobile-Friendly Test
195
+
196
+ | Check | Status | Notes |
197
+ |-------|--------|-------|
198
+ | Mobile-friendly overall | ✅/❌ | [notes] |
199
+ | Viewport configured | ✅/❌ | [viewport tag] |
200
+ | Text readable | ✅/⚠️/❌ | Font size: [X]px |
201
+ | Tap targets sized | ✅/⚠️/❌ | [notes] |
202
+ | Content fits viewport | ✅/❌ | [notes] |
203
+ | No horizontal scroll | ✅/❌ | [notes] |
204
+
205
+ ### Responsive Design Check
206
+
207
+ | Element | Desktop | Mobile | Issues |
208
+ |---------|---------|--------|--------|
209
+ | Navigation | [status] | [status] | [notes] |
210
+ | Images | [status] | [status] | [notes] |
211
+ | Forms | [status] | [status] | [notes] |
212
+ | Tables | [status] | [status] | [notes] |
213
+ | Videos | [status] | [status] | [notes] |
214
+
215
+ ### Mobile-First Indexing
216
+
217
+ | Check | Status | Notes |
218
+ |-------|--------|-------|
219
+ | Mobile version has all content | ✅/⚠️/❌ | [notes] |
220
+ | Mobile has same structured data | ✅/⚠️/❌ | [notes] |
221
+ | Mobile has same meta tags | ✅/⚠️/❌ | [notes] |
222
+ | Mobile images have alt text | ✅/⚠️/❌ | [notes] |
223
+
224
+ **Mobile Score**: [X]/10
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Step 5: Audit Security & HTTPS
230
+
231
+ ```markdown
232
+ ## Security Analysis
233
+
234
+ ### HTTPS Status
235
+
236
+ | Check | Status | Notes |
237
+ |-------|--------|-------|
238
+ | SSL certificate valid | ✅/❌ | Expires: [date] |
239
+ | HTTPS enforced | ✅/❌ | [redirects properly?] |
240
+ | Mixed content | ✅/⚠️/❌ | [X] issues |
241
+ | HSTS enabled | ✅/⚠️ | [notes] |
242
+ | Certificate chain | ✅/⚠️/❌ | [notes] |
243
+
244
+ ### Security Headers
245
+
246
+ | Header | Present | Value | Recommended |
247
+ |--------|---------|-------|-------------|
248
+ | Content-Security-Policy | ✅/❌ | [value] | [recommendation] |
249
+ | X-Frame-Options | ✅/❌ | [value] | DENY or SAMEORIGIN |
250
+ | X-Content-Type-Options | ✅/❌ | [value] | nosniff |
251
+ | X-XSS-Protection | ✅/❌ | [value] | 1; mode=block |
252
+ | Referrer-Policy | ✅/❌ | [value] | [recommendation] |
253
+
254
+ **Security Score**: [X]/10
255
+ ```
256
+
257
+ ---
258
+
259
+ ## Step 6: Audit URL Structure
260
+
261
+ ```markdown
262
+ ## URL Structure Analysis
263
+
264
+ ### URL Pattern Review
265
+
266
+ | Check | Status | Notes |
267
+ |-------|--------|-------|
268
+ | HTTPS URLs | ✅/⚠️/❌ | [X]% HTTPS |
269
+ | Lowercase URLs | ✅/⚠️/❌ | [notes] |
270
+ | No special characters | ✅/⚠️/❌ | [notes] |
271
+ | Readable/descriptive | ✅/⚠️/❌ | [notes] |
272
+ | Appropriate length | ✅/⚠️/❌ | Avg: [X] chars |
273
+ | Keywords in URLs | ✅/⚠️/❌ | [notes] |
274
+ | Consistent structure | ✅/⚠️/❌ | [notes] |
275
+
276
+ ### URL Issues Found
277
+
278
+ | Issue Type | Count | Examples |
279
+ |------------|-------|----------|
280
+ | Dynamic parameters | [X] | [URLs] |
281
+ | Session IDs in URLs | [X] | [URLs] |
282
+ | Uppercase characters | [X] | [URLs] |
283
+ | Special characters | [X] | [URLs] |
284
+ | Very long URLs (>100) | [X] | [URLs] |
285
+
286
+ ### Redirect Analysis
287
+
288
+ | Check | Status | Notes |
289
+ |-------|--------|-------|
290
+ | Redirect chains | [X] found | [max chain length] |
291
+ | Redirect loops | [X] found | [URLs] |
292
+ | 302 → 301 needed | [X] found | [URLs] |
293
+ | Broken redirects | [X] found | [URLs] |
294
+
295
+ **URL Score**: [X]/10
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Step 7: Audit Structured Data
301
+
302
+ > **CORE-EEAT alignment**: Schema markup quality maps to O05 (Schema Markup) in the CORE-EEAT benchmark. See [content-quality-auditor](https://github.com/aaron-he-zhu/seo-geo-claude-skills/blob/main/cross-cutting/content-quality-auditor/SKILL.md) for full content quality audit.
303
+
304
+ ```markdown
305
+ ## Structured Data Analysis
306
+
307
+ ### Schema Markup Found
308
+
309
+ | Schema Type | Pages | Valid | Errors |
310
+ |-------------|-------|-------|--------|
311
+ | [Type 1] | [X] | ✅/❌ | [errors] |
312
+ | [Type 2] | [X] | ✅/❌ | [errors] |
313
+
314
+ ### Validation Results
315
+
316
+ **Errors**:
317
+ - [Error 1]: [affected pages] - [solution]
318
+ - [Error 2]: [affected pages] - [solution]
319
+
320
+ **Warnings**:
321
+ - [Warning 1]: [notes]
322
+
323
+ ### Missing Schema Opportunities
324
+
325
+ | Page Type | Current Schema | Recommended |
326
+ |-----------|----------------|-------------|
327
+ | Blog posts | [current] | Article + FAQ |
328
+ | Products | [current] | Product + Review |
329
+ | Homepage | [current] | Organization |
330
+
331
+ **Structured Data Score**: [X]/10
332
+ ```
333
+
334
+ ---
335
+
336
+ ## Step 8: Audit International SEO (if applicable)
337
+
338
+ ```markdown
339
+ ## International SEO Analysis
340
+
341
+ ### Hreflang Implementation
342
+
343
+ | Check | Status | Notes |
344
+ |-------|--------|-------|
345
+ | Hreflang tags present | ✅/❌ | [notes] |
346
+ | Self-referencing | ✅/⚠️/❌ | [notes] |
347
+ | Return tags present | ✅/⚠️/❌ | [notes] |
348
+ | Valid language codes | ✅/⚠️/❌ | [notes] |
349
+ | x-default tag | ✅/⚠️ | [notes] |
350
+
351
+ ### Language/Region Targeting
352
+
353
+ | Language | URL | Hreflang | Status |
354
+ |----------|-----|----------|--------|
355
+ | [en-US] | [URL] | [tag] | ✅/⚠️/❌ |
356
+ | [es-ES] | [URL] | [tag] | ✅/⚠️/❌ |
357
+
358
+ **International Score**: [X]/10
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Step 9: Generate Technical Audit Summary
364
+
365
+ ```markdown
366
+ # Technical SEO Audit Report
367
+
368
+ **Domain**: [domain]
369
+ **Audit Date**: [date]
370
+ **Pages Analyzed**: [X]
371
+
372
+ ## Overall Technical Health: [X]/100
373
+
374
+ ```
375
+ Score Breakdown:
376
+ ████████░░ Crawlability: 8/10
377
+ ███████░░░ Indexability: 7/10
378
+ █████░░░░░ Performance: 5/10
379
+ ████████░░ Mobile: 8/10
380
+ █████████░ Security: 9/10
381
+ ██████░░░░ URL Structure: 6/10
382
+ █████░░░░░ Structured Data: 5/10
383
+ ```
384
+
385
+ ## Critical Issues (Fix Immediately)
386
+
387
+ 1. **[Issue]**: [Impact]
388
+ - Affected: [pages/scope]
389
+ - Solution: [specific fix]
390
+ - Priority: 🔴 Critical
391
+
392
+ 2. **[Issue]**: [Impact]
393
+ - Affected: [pages/scope]
394
+ - Solution: [specific fix]
395
+ - Priority: 🔴 Critical
396
+
397
+ ## High Priority Issues
398
+
399
+ 1. **[Issue]**: [Solution]
400
+ 2. **[Issue]**: [Solution]
401
+
402
+ ## Medium Priority Issues
403
+
404
+ 1. **[Issue]**: [Solution]
405
+ 2. **[Issue]**: [Solution]
406
+
407
+ ## Quick Wins
408
+
409
+ These can be fixed quickly for immediate improvement:
410
+
411
+ 1. [Quick fix 1]
412
+ 2. [Quick fix 2]
413
+ 3. [Quick fix 3]
414
+
415
+ ## Implementation Roadmap
416
+
417
+ ### Week 1: Critical Fixes
418
+ - [ ] [Task 1]
419
+ - [ ] [Task 2]
420
+
421
+ ### Week 2-3: High Priority
422
+ - [ ] [Task 1]
423
+ - [ ] [Task 2]
424
+
425
+ ### Week 4+: Optimization
426
+ - [ ] [Task 1]
427
+ - [ ] [Task 2]
428
+
429
+ ## Monitoring Recommendations
430
+
431
+ Set up alerts for:
432
+ - Core Web Vitals drops
433
+ - Crawl error spikes
434
+ - Index coverage changes
435
+ - Security issues
436
+ ```
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up.",
2
+ "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up. prompt-router (UserPromptSubmit) is advisory — emits additionalContext to nudge toward the right rcode command; never blocks.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
@@ -67,6 +67,21 @@
67
67
  {
68
68
  "type": "command",
69
69
  "command": "node .rcode/bin/rcode-hooks.cjs cost-track"
70
+ },
71
+ {
72
+ "type": "command",
73
+ "command": "node .rcode/bin/rcode-hooks.cjs stop"
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "UserPromptSubmit": [
79
+ {
80
+ "matcher": "",
81
+ "hooks": [
82
+ {
83
+ "type": "command",
84
+ "command": "node .rcode/bin/rcode-hooks.cjs prompt-router"
70
85
  }
71
86
  ]
72
87
  }
@@ -156,6 +156,7 @@ Apply this guard BEFORE the routing table below:
156
156
  | "sprint planning", "plan the sprint" | `HAS_EPICS=false` | `/rcode-create-epics-and-stories` first | Sprints draw stories from epics. No epics = no stories to schedule. |
157
157
  | "create stories", "epics" | `HAS_PRD=false` | `/rcode-create-prd` first | Epics decompose a milestone. Milestone needs PRD. |
158
158
  | "create milestones", "roadmap" | `HAS_PRD=false` | `/rcode-create-prd` first | Roadmap is derived from PRD success metrics. |
159
+ | "run the content factory", "cluster keywords", "brief location pages", "audit my SEO" | `HAS_PRD=false` | `/rcode-new-project` | SEO work requires project context — keyword strategy and content architecture are anchored to a specific domain/PROJECT.md |
159
160
 
160
161
  When the guard fires, print a clear message:
161
162
 
@@ -290,6 +291,7 @@ Evaluate `$QUESTION` against these routing rules. Apply the **first matching** r
290
291
  | Validate an idea, "working backwards", "press release", "PRFAQ", "is this worth building" | `/rcode-prfaq` | Stress-test concept before committing sprint capacity |
291
292
  | Brainstorm, generate ideas, "explore options", "what could we do" | `/rcode-brainstorm` | Structured ideation before planning |
292
293
  | Audit code quality, "review changes", "karpathy", "check my diff", "too complex" | `/rcode-review --karpathy` | 4-principle code audit against recent diff |
294
+ | Make it simpler, "be lazy", "lazy mode", "simplest solution", "yagni", "over-engineered", "kam code likho" | `/rcode-lazy` | Generative simplicity lens — YAGNI before code is written (rcode-trim removes bloat after the fact) |
293
295
  | Walk through a change, "checkpoint", "explain this diff", "human review" | `/rcode-checkpoint-preview` | Human-in-the-loop diff walkthrough |
294
296
  | Exploring, researching, comparing, or "how does X work" | `/rcode-research-phase` | Domain research before planning |
295
297
  | Scope unclear, conflicting UIs/options, "which one", "better UX", "still have confusion", "how should X look", brainstorming vision | `/rcode-discuss-phase` | Decisions not yet locked — gather before planning |
@@ -316,6 +318,21 @@ Evaluate `$QUESTION` against these routing rules. Apply the **first matching** r
316
318
  | Completing a milestone, shipping, releasing | `/rcode-complete-milestone` | Milestone lifecycle |
317
319
  | Drift / out-of-date / "verify docs vs code" / "audit feature docs" / "fill out existing PRD/epics/stories" | `/rcode-feature-drift` | Detects PRD↔epics↔stories↔code drift; --fix patches trivial items |
318
320
  | General audit / re-audit / extend / fill out / expand an existing artifact | `/rcode-audit` | Unified audit entry — picks artifact type and re-runs |
321
+ > **SEO route guard:** Skills in this block assume a project context exists (`.planning/PROJECT.md`). If absent, the `HAS_PRD` check in `<step name="check_project">` redirects to `/rcode-new-project`.
322
+
323
+ | **— SEO / Content intent —** | | |
324
+ | "audit my SEO", "why am I not ranking", "traffic dropped", "ranking dropped", "seo recovery", "crawl errors" | `/rcode-do` → `seo-audit` | Full technical + on-page + content audit across the site |
325
+ | "per-page audit", "audit this page", "score this URL", "on-page audit" | `/rcode-do` → `on-page-seo-auditor` | Single-page scored report with fix priorities |
326
+ | "core web vitals", "cwv fix", "technical seo", "crawl budget", "indexation", "mobile usability", "site speed" | `/rcode-do` → `technical-seo-checker` | Technical SEO: CWV, crawl, indexing, mobile, speed, architecture, redirects |
327
+ | "keyword research", "cluster keywords", "topic map", "keyword clustering", "find keywords" | `/rcode-do` → `seo-growth-orchestrator` (delegates to `claude-seo:seo-cluster`) | Strategy orchestrator produces cluster map from seed keywords |
328
+ | "content brief", "write SEO content", "blog post", "seo article", "content with E-E-A-T" | `/rcode-do` → `seo-content-writer` | E-E-A-T-aware prose generation with brief adherence checks |
329
+ | "content factory", "programmatic pages", "scale content", "brief location pages", "brief service pages", "run the content factory" | `/rcode-do` → `seo-content-factory` | 10-agent pipeline: competitor research → expansion → clustering → briefs → writing → interlinking → programmatic gen → schema → refresh |
330
+ | "build seo site", "build affiliate site", "niche site", "build content site", "seo site scaffold" | `/rcode-do` → `seo-site-builder` | End-to-end site scaffold with SEO architecture baked in |
331
+ | "local seo", "google business profile", "gbp", "citations", "nap audit", "rank-and-rent" | `/rcode-do` → `rank-and-rent-local-seo` (delegates to `claude-seo:seo-local`) | Local niche selection, city×service matrix, GBP signals, NAP, citations |
332
+ | "schema markup", "structured data", "rich results", "json-ld", "faq schema" | `/rcode-do` → `claude-seo:seo-schema` | Schema generation and validation for all supported types |
333
+ | "ai search", "geo seo", "llms.txt", "ai overviews", "perplexity", "chatgpt visibility", "aeo" | `/rcode-do` → `claude-seo:seo-geo` | GEO/AEO optimization: entity disambiguation, AI answer targeting, llms.txt |
334
+ | "backlinks", "link building", "guest posts", "link acquisition", "digital pr" | `/rcode-do` → `seo-growth-orchestrator` | Backlink acquisition play within the 5-play growth strategy |
335
+ | **— end SEO block —** | | |
319
336
  | A specific, actionable, small task (add feature, fix typo, update config) | `/rcode-quick` | Self-contained, single executor |
320
337
  | Market/discovery/greenfield question (from classify) | `/rcode-council` | Needs multi-perspective discovery |
321
338
 
@@ -1,7 +1,7 @@
1
1
  # Workflow: rcode-enable-hooks
2
2
 
3
3
  <purpose>
4
- Merge rcode opt-in hooks from settings-hooks.json into .claude/settings.json. Creates settings.json if missing. Enables all 8 guardrails: pre-edit (read-before-edit check), pre-workflow (command hint), post-commit (format validation), bash-guard (blocks dangerous commands), pre-compact (refreshes HANDOFF.json before context compaction), stop-verify (syntax-checks files changed during the response), cost-track (logs measured token usage to .rcode/telemetry/cost.jsonl), and compact-nudge (advises /rcode-trim or /clear after many edits).
4
+ Merge rcode opt-in hooks from settings-hooks.json into .claude/settings.json. Creates settings.json if missing. Enables all 9 guardrails: pre-edit (read-before-edit check), pre-workflow (command hint), post-commit (format validation), bash-guard (blocks dangerous commands), pre-compact (refreshes HANDOFF.json before context compaction), stop-verify (syntax-checks files changed during the response), cost-track (logs measured token usage to .rcode/telemetry/cost.jsonl), compact-nudge (advises /rcode-trim or /clear after many edits), and prompt-router (proactive nudge toward the right rcode command for long-term memory consistency).
5
5
  </purpose>
6
6
 
7
7
 
@@ -44,7 +44,7 @@ If `.claude/` directory does not exist, create it first.
44
44
 
45
45
  ## Step 3 — Merge hooks
46
46
 
47
- For each hook type (`PreToolUse`, `PostToolUse`):
47
+ For each hook type (`PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`, `UserPromptSubmit`):
48
48
 
49
49
  - If the hook type does not exist in the current settings.json, add it.
50
50
  - If it exists, append the new matchers and hook commands (avoid duplicates by checking for exact command matches).
@@ -86,6 +86,7 @@ Enabled guardrails:
86
86
  • stop-verify: Syntax-checks files changed during the response
87
87
  • cost-track: Logs measured token usage to .rcode/telemetry/cost.jsonl
88
88
  • compact-nudge: Advises /rcode-trim or /clear after many edits
89
+ • prompt-router: Nudges toward the matching /rcode-* command and /rcode-memory-update so work lands in .rcode/state.json (toggle via prompt_nudge in .rcode/config.yaml: every|once-per-intent|when-stale|off)
89
90
 
90
91
  To disable, remove the hooks section from .claude/settings.json or edit .rcode/templates/settings-hooks.json and re-run.
91
92
  ```