@nebulacomponents/citable 1.16.0 → 1.18.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 (142) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +16 -3
  3. package/dist/universal/.agents/skills/citable/SKILL.md +66 -1
  4. package/dist/universal/.agents/skills/citable/VERSION +1 -1
  5. package/dist/universal/.agents/skills/citable/manifest.json +9 -6
  6. package/dist/universal/.agents/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  7. package/dist/universal/.agents/skills/citable/schemas/finding.schema.json +69 -0
  8. package/dist/universal/.agents/skills/citable/schemas/remediation-verification.schema.json +98 -0
  9. package/dist/universal/.agents/skills/citable/schemas/sow.schema.json +92 -0
  10. package/dist/universal/.claude/agents/citable/manifest.json +2 -2
  11. package/dist/universal/.claude/skills/citable/SKILL.md +66 -1
  12. package/dist/universal/.claude/skills/citable/VERSION +1 -1
  13. package/dist/universal/.claude/skills/citable/manifest.json +9 -6
  14. package/dist/universal/.claude/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  15. package/dist/universal/.claude/skills/citable/schemas/finding.schema.json +69 -0
  16. package/dist/universal/.claude/skills/citable/schemas/remediation-verification.schema.json +98 -0
  17. package/dist/universal/.claude/skills/citable/schemas/sow.schema.json +92 -0
  18. package/dist/universal/.cursor/skills/citable/SKILL.md +66 -1
  19. package/dist/universal/.cursor/skills/citable/VERSION +1 -1
  20. package/dist/universal/.cursor/skills/citable/manifest.json +9 -6
  21. package/dist/universal/.cursor/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  22. package/dist/universal/.cursor/skills/citable/schemas/finding.schema.json +69 -0
  23. package/dist/universal/.cursor/skills/citable/schemas/remediation-verification.schema.json +98 -0
  24. package/dist/universal/.cursor/skills/citable/schemas/sow.schema.json +92 -0
  25. package/dist/universal/.gemini/skills/citable/SKILL.md +66 -1
  26. package/dist/universal/.gemini/skills/citable/VERSION +1 -1
  27. package/dist/universal/.gemini/skills/citable/manifest.json +9 -6
  28. package/dist/universal/.gemini/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  29. package/dist/universal/.gemini/skills/citable/schemas/finding.schema.json +69 -0
  30. package/dist/universal/.gemini/skills/citable/schemas/remediation-verification.schema.json +98 -0
  31. package/dist/universal/.gemini/skills/citable/schemas/sow.schema.json +92 -0
  32. package/dist/universal/.github/skills/citable/SKILL.md +66 -1
  33. package/dist/universal/.github/skills/citable/VERSION +1 -1
  34. package/dist/universal/.github/skills/citable/manifest.json +9 -6
  35. package/dist/universal/.github/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  36. package/dist/universal/.github/skills/citable/schemas/finding.schema.json +69 -0
  37. package/dist/universal/.github/skills/citable/schemas/remediation-verification.schema.json +98 -0
  38. package/dist/universal/.github/skills/citable/schemas/sow.schema.json +92 -0
  39. package/dist/universal/.kiro/skills/citable/SKILL.md +66 -1
  40. package/dist/universal/.kiro/skills/citable/VERSION +1 -1
  41. package/dist/universal/.kiro/skills/citable/manifest.json +9 -6
  42. package/dist/universal/.kiro/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  43. package/dist/universal/.kiro/skills/citable/schemas/finding.schema.json +69 -0
  44. package/dist/universal/.kiro/skills/citable/schemas/remediation-verification.schema.json +98 -0
  45. package/dist/universal/.kiro/skills/citable/schemas/sow.schema.json +92 -0
  46. package/dist/universal/.opencode/skills/citable/SKILL.md +66 -1
  47. package/dist/universal/.opencode/skills/citable/VERSION +1 -1
  48. package/dist/universal/.opencode/skills/citable/manifest.json +9 -6
  49. package/dist/universal/.opencode/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  50. package/dist/universal/.opencode/skills/citable/schemas/finding.schema.json +69 -0
  51. package/dist/universal/.opencode/skills/citable/schemas/remediation-verification.schema.json +98 -0
  52. package/dist/universal/.opencode/skills/citable/schemas/sow.schema.json +92 -0
  53. package/dist/universal/.pi/agent/skills/citable/SKILL.md +66 -1
  54. package/dist/universal/.pi/agent/skills/citable/VERSION +1 -1
  55. package/dist/universal/.pi/agent/skills/citable/manifest.json +9 -6
  56. package/dist/universal/.pi/agent/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  57. package/dist/universal/.pi/agent/skills/citable/schemas/finding.schema.json +69 -0
  58. package/dist/universal/.pi/agent/skills/citable/schemas/remediation-verification.schema.json +98 -0
  59. package/dist/universal/.pi/agent/skills/citable/schemas/sow.schema.json +92 -0
  60. package/dist/universal/.qoder/skills/citable/SKILL.md +66 -1
  61. package/dist/universal/.qoder/skills/citable/VERSION +1 -1
  62. package/dist/universal/.qoder/skills/citable/manifest.json +9 -6
  63. package/dist/universal/.qoder/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  64. package/dist/universal/.qoder/skills/citable/schemas/finding.schema.json +69 -0
  65. package/dist/universal/.qoder/skills/citable/schemas/remediation-verification.schema.json +98 -0
  66. package/dist/universal/.qoder/skills/citable/schemas/sow.schema.json +92 -0
  67. package/dist/universal/.rovodev/skills/citable/SKILL.md +66 -1
  68. package/dist/universal/.rovodev/skills/citable/VERSION +1 -1
  69. package/dist/universal/.rovodev/skills/citable/manifest.json +9 -6
  70. package/dist/universal/.rovodev/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  71. package/dist/universal/.rovodev/skills/citable/schemas/finding.schema.json +69 -0
  72. package/dist/universal/.rovodev/skills/citable/schemas/remediation-verification.schema.json +98 -0
  73. package/dist/universal/.rovodev/skills/citable/schemas/sow.schema.json +92 -0
  74. package/dist/universal/.trae/skills/citable/SKILL.md +66 -1
  75. package/dist/universal/.trae/skills/citable/VERSION +1 -1
  76. package/dist/universal/.trae/skills/citable/manifest.json +9 -6
  77. package/dist/universal/.trae/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  78. package/dist/universal/.trae/skills/citable/schemas/finding.schema.json +69 -0
  79. package/dist/universal/.trae/skills/citable/schemas/remediation-verification.schema.json +98 -0
  80. package/dist/universal/.trae/skills/citable/schemas/sow.schema.json +92 -0
  81. package/dist/universal/.trae-cn/skills/citable/SKILL.md +66 -1
  82. package/dist/universal/.trae-cn/skills/citable/VERSION +1 -1
  83. package/dist/universal/.trae-cn/skills/citable/manifest.json +9 -6
  84. package/dist/universal/.trae-cn/skills/citable/schemas/cli-output-envelope.schema.json +30 -0
  85. package/dist/universal/.trae-cn/skills/citable/schemas/finding.schema.json +69 -0
  86. package/dist/universal/.trae-cn/skills/citable/schemas/remediation-verification.schema.json +98 -0
  87. package/dist/universal/.trae-cn/skills/citable/schemas/sow.schema.json +92 -0
  88. package/dist/universal/manifest.json +112 -76
  89. package/package.json +1 -1
  90. package/schemas/cli-output-envelope.schema.json +30 -0
  91. package/schemas/finding.schema.json +69 -0
  92. package/schemas/remediation-verification.schema.json +98 -0
  93. package/schemas/sow.schema.json +92 -0
  94. package/skill/SKILL.md +66 -1
  95. package/src/analysis/behavioral.js +126 -0
  96. package/src/analysis/croAudit.js +302 -0
  97. package/src/analysis/croRoadmap.js +121 -0
  98. package/src/analysis/eeat.js +300 -0
  99. package/src/analysis/funnelAnalysis.js +171 -0
  100. package/src/analysis/iceMatrix.js +205 -0
  101. package/src/analysis/offpage.js +228 -0
  102. package/src/analysis/readiness.js +253 -0
  103. package/src/analysis/saliency.js +119 -0
  104. package/src/analysis/schemaRecommendations.js +173 -0
  105. package/src/analysis/strategicRoadmap.js +148 -0
  106. package/src/cli/index.js +418 -9
  107. package/src/commands/answerEngineReadiness.js +48 -0
  108. package/src/commands/audit.js +2 -2
  109. package/src/commands/auditBacklinks.js +79 -0
  110. package/src/commands/ciWorkflow.js +63 -0
  111. package/src/commands/compatibility.js +205 -0
  112. package/src/commands/context.js +2 -1
  113. package/src/commands/croBacklog.js +182 -0
  114. package/src/commands/croSuite.js +156 -0
  115. package/src/commands/edgeRules.js +80 -4
  116. package/src/commands/edgeSecurity.js +192 -0
  117. package/src/commands/executive.js +6 -0
  118. package/src/commands/executiveCro.js +30 -0
  119. package/src/commands/executiveSearch.js +28 -0
  120. package/src/commands/experimentGuardrails.js +213 -0
  121. package/src/commands/goldenCorpus.js +155 -0
  122. package/src/commands/implementationKit.js +202 -0
  123. package/src/commands/inspectCro.js +67 -0
  124. package/src/commands/inspectEeat.js +53 -0
  125. package/src/commands/planExperiment.js +52 -0
  126. package/src/commands/previewCro.js +241 -0
  127. package/src/commands/prioritize.js +42 -6
  128. package/src/commands/remediate.js +461 -0
  129. package/src/commands/roadmapCmd.js +69 -0
  130. package/src/commands/schemaCmd.js +10 -2
  131. package/src/commands/sowCmd.js +67 -0
  132. package/src/commands/sweep.js +357 -0
  133. package/src/commands/verifyRemediation.js +204 -0
  134. package/src/commands/visualRegression.js +165 -0
  135. package/src/components/index.js +556 -0
  136. package/src/detectors/cro.js +48 -0
  137. package/src/detectors/framework.js +31 -1
  138. package/src/reporting/executiveCroReport.js +731 -0
  139. package/src/reporting/executiveExport.js +175 -1
  140. package/src/reporting/executiveSearchReport.js +704 -0
  141. package/src/sow/admissibilityGate.js +194 -0
  142. package/src/sow/generateSow.js +762 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebulacomponents/citable",
3
- "version": "1.16.0",
3
+ "version": "1.18.0",
4
4
  "description": "Production-grade SEO, AEO, and GEO agent skill with auditable detection, claim governance, evidence validation, and multi-agent installation.",
5
5
  "keywords": [
6
6
  "seo",
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "citable://schemas/cli-output-envelope.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "CLI JSON output envelope",
5
+ "description": "Stable envelope for every `citable <command> --json` output. Consumers read `citable_output_schema` for envelope compatibility and read command data from `result`. The envelope version changes only on breaking envelope changes; command payloads evolve backward-compatibly inside result.",
6
+ "type": "object",
7
+ "required": ["citable_output_schema", "tool_version", "generated_at", "result"],
8
+ "properties": {
9
+ "citable_output_schema": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+$",
12
+ "description": "Envelope contract version. 1.0 is the initial stable contract."
13
+ },
14
+ "tool_version": {
15
+ "type": "string",
16
+ "description": "Citable package version that produced the output."
17
+ },
18
+ "command": {
19
+ "type": ["string", "null"],
20
+ "description": "Top-level command that produced this output."
21
+ },
22
+ "generated_at": {
23
+ "type": "string",
24
+ "description": "ISO-8601 timestamp of when the output was generated."
25
+ },
26
+ "result": {
27
+ "description": "Command-specific payload. Structure is defined per command and evolves backward-compatibly within an envelope major version."
28
+ }
29
+ }
30
+ }
@@ -257,6 +257,75 @@
257
257
  }
258
258
  }
259
259
  },
260
+ "provenance": {
261
+ "type": "object",
262
+ "required": [
263
+ "detector_version",
264
+ "tool_version",
265
+ "evidence_source",
266
+ "methodology",
267
+ "revalidation_required"
268
+ ],
269
+ "properties": {
270
+ "detector_version": {
271
+ "type": "integer",
272
+ "minimum": 1
273
+ },
274
+ "tool_version": {
275
+ "type": "string"
276
+ },
277
+ "source_url": {
278
+ "type": [
279
+ "string",
280
+ "null"
281
+ ]
282
+ },
283
+ "source_file": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "evidence_selector": {
290
+ "type": [
291
+ "string",
292
+ "null"
293
+ ]
294
+ },
295
+ "evidence_source": {
296
+ "type": "string",
297
+ "enum": [
298
+ "dom_parse",
299
+ "registry",
300
+ "registry+dom_parse",
301
+ "controlled_observation",
302
+ "configuration"
303
+ ]
304
+ },
305
+ "viewport": {
306
+ "type": [
307
+ "string",
308
+ "null"
309
+ ]
310
+ },
311
+ "viewport_note": {
312
+ "type": [
313
+ "string",
314
+ "null"
315
+ ]
316
+ },
317
+ "methodology": {
318
+ "type": "string"
319
+ },
320
+ "revalidation_required": {
321
+ "type": "string",
322
+ "enum": [
323
+ "on_next_audit",
324
+ "human_review_before_action"
325
+ ]
326
+ }
327
+ }
328
+ },
260
329
  "status": {
261
330
  "type": "object",
262
331
  "required": [
@@ -0,0 +1,98 @@
1
+ {
2
+ "$id": "citable://schemas/remediation-verification.schema.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Remediation verification record",
5
+ "description": "Closed-loop evidence that a detector finding was addressed: before-run finding, applied patch, re-run detector result, and verdict. Proves only that the detector no longer reports the same subject; it never proves a conversion or outcome guarantee.",
6
+ "type": "object",
7
+ "required": [
8
+ "verification_id", "timestamp", "status", "tool_version",
9
+ "source_run_id", "detector_id", "subject", "verdict",
10
+ "provenance", "limitations"
11
+ ],
12
+ "properties": {
13
+ "verification_id": { "type": "string", "pattern": "^VR-[0-9]{14,20}-[a-z0-9]{2,8}$" },
14
+ "timestamp": { "type": "string" },
15
+ "status": { "type": "string", "enum": ["verified", "not_resolved", "blocked", "patch_refused"] },
16
+ "tool_version": { "type": "string" },
17
+ "repository_commit": { "type": ["string", "null"] },
18
+ "source_run_id": { "type": ["string", "null"], "minLength": 1 },
19
+ "recheck_run_id": { "type": ["string", "null"] },
20
+ "detector_id": { "type": ["string", "null"] },
21
+ "subject": {
22
+ "type": ["object", "null"],
23
+ "properties": {
24
+ "type": { "type": "string" },
25
+ "identifier": { "type": ["string", "null"] }
26
+ }
27
+ },
28
+ "verdict": {
29
+ "type": "object",
30
+ "required": ["resolved"],
31
+ "properties": {
32
+ "resolved": { "type": "boolean" },
33
+ "before_finding_ids": { "type": "array", "items": { "type": "string" } },
34
+ "after_finding_ids": { "type": "array", "items": { "type": "string" } },
35
+ "new_regressions": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "required": ["finding_id", "detector_id", "severity", "summary"],
40
+ "properties": {
41
+ "finding_id": { "type": "string" },
42
+ "detector_id": { "type": "string" },
43
+ "severity": { "type": "string" },
44
+ "summary": { "type": "string" }
45
+ }
46
+ }
47
+ },
48
+ "resolution_definition": {
49
+ "type": "string",
50
+ "description": "States the exact resolution criterion used; detector absence is not an outcome guarantee."
51
+ }
52
+ }
53
+ },
54
+ "patch": {
55
+ "type": ["object", "null"],
56
+ "properties": {
57
+ "target_file": { "type": "string" },
58
+ "framework": { "type": ["string", "null"] },
59
+ "patcher_class": { "type": ["string", "null"] },
60
+ "confidence": { "type": ["number", "null"] },
61
+ "validation_passed": { "type": "boolean" },
62
+ "applied": { "type": "boolean" },
63
+ "refusal_reason": { "type": ["string", "null"] },
64
+ "rollback_snapshot": { "type": ["string", "null"] },
65
+ "before_sha256": { "type": ["string", "null"] },
66
+ "after_sha256": { "type": ["string", "null"] }
67
+ }
68
+ },
69
+ "provenance": {
70
+ "type": "object",
71
+ "required": ["command", "recheck_target", "detectors_run"],
72
+ "properties": {
73
+ "command": { "type": "string" },
74
+ "recheck_target": { "type": ["string", "null"] },
75
+ "detectors_run": { "type": "array", "items": { "type": "string" } },
76
+ "detectors_skipped": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "detector_id": { "type": "string" },
82
+ "reason": { "type": "string" }
83
+ }
84
+ }
85
+ },
86
+ "recheck_errors": { "type": "array", "items": { "type": "string" } },
87
+ "recheck_warnings": { "type": "array", "items": { "type": "string" } }
88
+ }
89
+ },
90
+ "limitations": {
91
+ "type": "array",
92
+ "items": { "type": "string" },
93
+ "minItems": 1
94
+ },
95
+ "bundle_dir": { "type": ["string", "null"] },
96
+ "bundle_checksums": { "type": "object" }
97
+ }
98
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "citable://schemas/sow.schema.json",
4
+ "title": "Enterprise Statement of Work (SOW)",
5
+ "type": "object",
6
+ "required": [
7
+ "sow_id",
8
+ "version",
9
+ "title",
10
+ "client",
11
+ "supplier",
12
+ "effective_date",
13
+ "executive_scope",
14
+ "admissibility_gate",
15
+ "work_packages",
16
+ "deliverables",
17
+ "acceptance_criteria",
18
+ "traceability_matrix"
19
+ ],
20
+ "properties": {
21
+ "sow_id": { "type": "string" },
22
+ "version": { "type": "string" },
23
+ "title": { "type": "string" },
24
+ "client": {
25
+ "type": "object",
26
+ "required": ["name", "contact"],
27
+ "properties": {
28
+ "name": { "type": "string" },
29
+ "contact": { "type": "string" }
30
+ }
31
+ },
32
+ "supplier": {
33
+ "type": "object",
34
+ "required": ["name", "contact"],
35
+ "properties": {
36
+ "name": { "type": "string" },
37
+ "contact": { "type": "string" }
38
+ }
39
+ },
40
+ "effective_date": { "type": "string" },
41
+ "term_days": { "type": "integer" },
42
+ "executive_scope": {
43
+ "type": "object",
44
+ "required": ["business_objective", "in_scope_properties", "in_scope_systems"],
45
+ "properties": {
46
+ "business_objective": { "type": "string" },
47
+ "in_scope_properties": { "type": "array", "items": { "type": "string" } },
48
+ "in_scope_systems": { "type": "array", "items": { "type": "string" } },
49
+ "channels": { "type": "array", "items": { "type": "string" } },
50
+ "geographies": { "type": "array", "items": { "type": "string" } }
51
+ }
52
+ },
53
+ "admissibility_gate": {
54
+ "type": "object",
55
+ "required": ["total_findings_evaluated", "admitted_count", "refused_count"],
56
+ "properties": {
57
+ "total_findings_evaluated": { "type": "integer" },
58
+ "admitted_count": { "type": "integer" },
59
+ "refused_count": { "type": "integer" },
60
+ "refusal_log": { "type": "array" }
61
+ }
62
+ },
63
+ "work_packages": { "type": "array" },
64
+ "deliverables": { "type": "array" },
65
+ "acceptance_criteria": { "type": "array" },
66
+ "traceability_matrix": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "object",
70
+ "required": [
71
+ "finding_id",
72
+ "recommendation",
73
+ "sow_requirement_id",
74
+ "deliverable_id",
75
+ "acceptance_test_id",
76
+ "owner",
77
+ "evidence_id"
78
+ ],
79
+ "properties": {
80
+ "finding_id": { "type": "string" },
81
+ "recommendation": { "type": "string" },
82
+ "sow_requirement_id": { "type": "string" },
83
+ "work_package_id": { "type": "string" },
84
+ "deliverable_id": { "type": "string" },
85
+ "acceptance_test_id": { "type": "string" },
86
+ "owner": { "type": "string" },
87
+ "evidence_id": { "type": "string" }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
package/skill/SKILL.md CHANGED
@@ -7,7 +7,7 @@ description: >
7
7
  generative engine optimization, structured data governance, claim substantiation,
8
8
  crawler policy, entity consistency, content discoverability, or wants a site audited
9
9
  for how search and AI systems will retrieve, understand, cite, or recommend it.
10
- version: 1.16.0
10
+ version: 1.18.0
11
11
  ---
12
12
 
13
13
  # Citable — evidence and change control for search and AI citation readiness
@@ -88,7 +88,13 @@ prefer running it over re-deriving its checks by hand:
88
88
  citable init # initialize .citable/ (non-destructive)
89
89
  citable audit [scope] --target <dir|url> [--base-url <url>] [--ref-date YYYY-MM-DD]
90
90
  citable plan-audit --target <dir|url> [--base-url <url>]
91
+ citable sweep technical --target <dir|url> # Technical SEO sweep + Core Web Vitals metrics
91
92
  citable inspect <page> --target <dir|url>
93
+ citable inspect eeat <page> --target <dir|url> # On-page content analysis & 0-5 E-E-A-T score
94
+ citable inspect readiness <page> --target <dir|url> # Answer-engine readiness (Perplexity, Copilot, ChatGPT)
95
+ citable audit backlinks --input <file> # Off-page authority assessment & toxic domain identification
96
+ citable prioritize matrix [--run <run-id>] # Impact/Effort/Confidence (ICE) scoring matrix
97
+ citable roadmap [generate|show] # 30/90/180-day strategic milestone roadmap
92
98
  citable map-claims --target <dir|url> [--write]
93
99
  citable substantiate [--write]
94
100
  citable schema --target <dir|url>
@@ -109,6 +115,8 @@ citable monitor [runA runB] [--webhook <url>] [--min-severity <sev>] # observat
109
115
  citable report dashboard [--last N] [--since <run-id>] # cross-run evidence trend (Markdown + HTML)
110
116
  citable report share-of-voice [--last N] [--since <run-id>] # competitor citation share (Markdown + HTML)
111
117
  citable report consensus [--last N] [--since <run-id>] # canonical discovery consensus matrix (Markdown + HTML)
118
+ citable report search [--target <dir|url>] [--run <id>] [--format md|html|json] # Enterprise Search Intelligence Briefing (19 pillars, evidence-traceable)
119
+ citable report cro [--target <dir|url>] [--input <file>] [--format md|html|json] # Enterprise CRO & Journey Briefing (25 pillars: observations vs hypotheses vs causation)
112
120
  citable metrics import --provider <name> --input <csv|json>
113
121
  citable connect status
114
122
  citable connect configure --provider <gsc|ga4|wordpress|webflow> --connection-id <id> --property-id <id> [--credential-env <name>] [--write]
@@ -138,9 +146,29 @@ citable corpus evaluate --input <acceptance-corpus.json>
138
146
  citable corpus publish --input <acceptance-corpus.json> --output <public-corpus.json>
139
147
  citable corpus receipt --run <run-id> [--input <execution-context.json>]
140
148
  citable corpus compare-receipts <receipt-a.json> <receipt-b.json>
149
+ citable corpus benchmark [--corpus <dir>] [--output <report.json>] # labeled golden fixtures → per-detector precision/recall gate
141
150
  citable artifacts export <run-id> --output <directory>
142
151
  citable artifacts verify --input <directory>
143
152
  citable artifacts import --input <directory>
153
+ citable inspect cro <page> --target <dir|url> # CRO readiness: CTAs, forms, payment-wallet vs authentication readiness, modeled saliency indices
154
+ citable cro [--target <dir|url>] [--funnel <id>] # Full CRO intelligence suite: funnel, ATF clarity, trust, cognitive load, ICE matrix, roadmap
155
+ citable cro backlog [--target <dir|url>] # Prioritized A/B experiment backlog with falsifiable hypotheses & guardrails
156
+ citable cro roadmap [--target <dir|url>] # 30/90/180-day CRO strategic roadmap tied to measurable conversion outcomes
157
+ citable sweep technical [--target <dir|url>] # Technical SEO sweep with Core Web Vitals readiness metrics (LCP, INP, CLS)
158
+ citable inspect eeat <page> --target <dir|url> # On-page E-E-A-T evaluation on a 0-5 rubric scale
159
+ citable inspect readiness <page> --target <dir|url> # Answer-engine readiness across Perplexity, Bing Copilot, ChatGPT
160
+ citable audit backlinks --input <backlinks.json> # Off-page authority assessment and toxic domain identification
161
+ citable prioritize matrix # Impact/Effort/Confidence (ICE) scoring matrix for findings & roadmap
162
+ citable roadmap strategic # 30/90/180-day strategic milestone horizons with KPI linkages
163
+ citable preview cro <page> [--export <file.html>] # split-screen before/remediated sandbox (layout-contract checked; accessibility-aware)
164
+ citable remediate --finding <id> [--target <file>] [--write] # production-safe patch: framework detection, unified diff, static validation, confidence gate, rollback snapshot; semantic copy changes always refuse automated write
165
+ citable verify remediation --run <run-id> --finding <id> [--target <file>] [--apply] # closed loop: re-run the detector and emit a before/after evidence bundle (schema remediation-verification)
166
+ citable verify page <page> --target <dir|url> # all detectors scoped to one page; pass = no detector currently reports it, never an outcome guarantee
167
+ citable check experiment <id> [--observed-control N --observed-variant N --days-running N] # SRM, stopping, power, contamination; lifecycle: planned|running|inconclusive|validated
168
+ citable compatibility # Node engine, optional adapters, browser, framework, registries, edge size limits
169
+ citable kit export --run <run-id> --finding <id> [--target <file>] # customer-ready implementation kit (finding, diff, evidence, acceptance tests, deployment, limitations)
170
+ citable sow generate [--target <dir|url>] [--budget <amount>] [--format md|html|json] [--output <path>] # Enterprise SOW from findings with 6-gate admissibility & 7-column traceability
171
+ citable sow validate <sow.json> # Validate SOW schema, admissibility gates, and complete traceability matrix
144
172
  ```
145
173
 
146
174
  Audit scopes: `technical seo aeo geo architecture entity claims evidence schema
@@ -194,6 +222,43 @@ monitoring interpretation.
194
222
  Use `commands/field-validation.md` for acceptance-corpus authorization,
195
223
  sanitization, publication refusal, reproducibility, and evidence boundaries.
196
224
 
225
+ ## CRO remediation loop (audit → explain → remediate → verify → hand off)
226
+
227
+ The CRO suite completes the loop. Rules that govern every step:
228
+
229
+ 1. **Safe patches only.** `remediate --write` is gated on framework detection,
230
+ static structural validation, idempotency, and an explicit confidence
231
+ threshold. Semantic microcopy replacements are refused for automated write
232
+ (fact ≠ inference): they require a human editorial decision. Every write
233
+ creates a rollback snapshot under `.citable/remediation/snapshots/`.
234
+ 2. **A written patch is not a verified repair.** Run
235
+ `verify remediation --run <run-id> --finding <id>`. Resolution means the
236
+ detector no longer reports the same subject — never a conversion guarantee.
237
+ The verification bundle is schema-validated
238
+ (`schemas/remediation-verification.schema.json`).
239
+ 3. **Payment wallets ≠ authentication.** Apple Pay/Google Pay/PayPal are
240
+ payment methods; WebAuthn/passkeys are account authentication. Report them
241
+ separately (`inspect cro` returns `payment_wallet_readiness` and
242
+ `authentication_readiness`). Never use "biometric readiness" as a claim.
243
+ 4. **Modeled indices are labeled.** Friction Surface Area, CTA Conspicuity
244
+ Index, and gaze-path ordering are heuristic indices over captured DOM
245
+ conditions — not observed user behavior and not revenue estimates. Slide
246
+ decks and kits must keep measured (deterministic findings) and modeled
247
+ (indices, projections) in separate, labeled categories. No latency,
248
+ speed, or "percentage eliminated" figure may be stated without a
249
+ documented measurement methodology.
250
+ 5. **Referral fragments are untrusted input.** ScentBeacon-style components
251
+ may match referrer/`:~:text=` against a fixed allowlist to detect the
252
+ referral state; raw values are never rendered, persisted, or transmitted.
253
+ Dynamic claim text must come from registry-bound developer props.
254
+ 6. **Experiments carry guardrails.** `check experiment` reports SRM, stopping
255
+ early, underpowered samples, contamination, and unsupported revenue
256
+ attribution, and derives one lifecycle of `planned`, `running`,
257
+ `inconclusive`, or `validated` — never "winner".
258
+ 7. **Machine-readable output is a contract.** `--json` wraps every command
259
+ payload in the `citable_output_schema` 1.0 envelope
260
+ (`schemas/cli-output-envelope.schema.json`).
261
+
197
262
  ## Command workflows
198
263
 
199
264
  Detailed per-command workflows live in `commands/`. Follow them; they define
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Analyze behavioral interaction evidence across funnels, sessions, cohorts, and interaction signals.
3
+ */
4
+ export function analyzeBehavioralTelemetry(telemetryData = {}) {
5
+ const sessions = telemetryData.sessions || telemetryData.metrics || {};
6
+ const cohorts = telemetryData.cohorts || {};
7
+ const interactions = telemetryData.interactions || {};
8
+ const funnelSteps = telemetryData.funnel || [];
9
+
10
+ const findings = [];
11
+ const frictionIndicators = [];
12
+
13
+ // 1. Mobile vs Desktop Cohort Divergence
14
+ const mobileCr = cohorts.mobile?.conversion_rate ?? null;
15
+ const desktopCr = cohorts.desktop?.conversion_rate ?? null;
16
+
17
+ let cohortDivergence = null;
18
+ if (mobileCr !== null && desktopCr !== null && desktopCr > 0) {
19
+ const ratio = mobileCr / desktopCr;
20
+ cohortDivergence = {
21
+ mobile_cr: mobileCr,
22
+ desktop_cr: desktopCr,
23
+ mobile_to_desktop_ratio: Math.round(ratio * 100) / 100,
24
+ };
25
+
26
+ if (ratio < 0.5) {
27
+ frictionIndicators.push({
28
+ type: 'mobile_conversion_gap',
29
+ severity: 'high',
30
+ evidence: `Mobile conversion rate (${(mobileCr * 100).toFixed(1)}%) is under half of desktop (${(desktopCr * 100).toFixed(1)}%)`,
31
+ hypothesis: 'Mobile friction (virtual keyboard effort, diminutive tap targets, or slow paint) impedes mobile buyers',
32
+ });
33
+ }
34
+ }
35
+
36
+ // 2. Scroll Depth vs CTA Placement
37
+ const p50Scroll = interactions.scroll_depth_p50_pct ?? interactions.median_scroll_depth ?? null;
38
+ const ctaPosition = interactions.primary_cta_vertical_pct ?? null;
39
+
40
+ if (p50Scroll !== null && ctaPosition !== null) {
41
+ if (ctaPosition > p50Scroll) {
42
+ frictionIndicators.push({
43
+ type: 'buried_cta',
44
+ severity: 'high',
45
+ evidence: `Primary CTA is positioned at ${ctaPosition}% page depth, but median user scroll depth is only ${p50Scroll}%`,
46
+ hypothesis: 'Over 50% of visitors never view the primary conversion CTA before abandoning',
47
+ });
48
+ }
49
+ }
50
+
51
+ // 3. Rage Clicks and Dead Clicks
52
+ const rageClicks = interactions.rage_click_rate_pct ?? interactions.rage_clicks_count ?? 0;
53
+ const deadClicks = interactions.dead_click_rate_pct ?? interactions.dead_clicks_count ?? 0;
54
+
55
+ if (rageClicks > 3 || rageClicks > 50) {
56
+ frictionIndicators.push({
57
+ type: 'rage_clicks',
58
+ severity: 'high',
59
+ evidence: `Elevated rage click frequency (${rageClicks}) indicates user frustration with unresponsive or broken interactive elements`,
60
+ hypothesis: 'Interactive components fail to provide immediate visual feedback or fail on tap',
61
+ });
62
+ }
63
+
64
+ if (deadClicks > 5 || deadClicks > 80) {
65
+ frictionIndicators.push({
66
+ type: 'dead_clicks',
67
+ severity: 'medium',
68
+ evidence: `High dead click count (${deadClicks}): users attempt to click static elements perceived as interactive`,
69
+ hypothesis: 'Visual affordances mislead users into clicking non-actionable elements',
70
+ });
71
+ }
72
+
73
+ // 4. Funnel Drop-off Analysis
74
+ const funnelDropOffs = [];
75
+ if (Array.isArray(funnelSteps) && funnelSteps.length >= 2) {
76
+ for (let i = 0; i < funnelSteps.length - 1; i++) {
77
+ const curr = funnelSteps[i];
78
+ const next = funnelSteps[i + 1];
79
+ const dropOffRate = curr.visitors > 0 ? Math.round(((curr.visitors - next.visitors) / curr.visitors) * 100) : 0;
80
+ funnelDropOffs.push({
81
+ from_step: curr.name || `Step ${i + 1}`,
82
+ to_step: next.name || `Step ${i + 2}`,
83
+ drop_off_pct: dropOffRate,
84
+ retained_visitors: next.visitors,
85
+ });
86
+
87
+ if (dropOffRate > 70) {
88
+ frictionIndicators.push({
89
+ type: 'steep_funnel_leak',
90
+ severity: 'critical',
91
+ evidence: `Severe drop-off between ${curr.name} and ${next.name} (${dropOffRate}% abandon rate)`,
92
+ hypothesis: `Significant cognitive load, price shock, or friction barrier encountered at ${curr.name}`,
93
+ });
94
+ }
95
+ }
96
+ }
97
+
98
+ // 5. Form Field Abandonment Peak
99
+ const fieldAbandons = interactions.form_field_abandonment || [];
100
+ let peakAbandonField = null;
101
+ if (fieldAbandons.length > 0) {
102
+ fieldAbandons.sort((a, b) => b.abandon_count - a.abandon_count);
103
+ peakAbandonField = fieldAbandons[0];
104
+ frictionIndicators.push({
105
+ type: 'form_field_bottleneck',
106
+ severity: 'high',
107
+ evidence: `Peak form abandonment occurs on field "${peakAbandonField.field_name}" (${peakAbandonField.abandon_count} drop-offs)`,
108
+ hypothesis: `Field "${peakAbandonField.field_name}" creates high friction or privacy resistance; consider making optional or eliminating`,
109
+ });
110
+ }
111
+
112
+ return {
113
+ fact_status: 'observed_behavioral_telemetry',
114
+ summary: {
115
+ total_friction_indicators: frictionIndicators.length,
116
+ critical_indicators: frictionIndicators.filter((i) => i.severity === 'critical').length,
117
+ high_indicators: frictionIndicators.filter((i) => i.severity === 'high').length,
118
+ cohort_divergence: cohortDivergence,
119
+ },
120
+ funnel_drop_offs: funnelDropOffs,
121
+ friction_indicators: frictionIndicators,
122
+ limitations: [
123
+ 'Behavioral signals indicate correlation and user interaction bottlenecks; causal mechanisms must be verified via controlled A/B experiments.',
124
+ ],
125
+ };
126
+ }