@nebulacomponents/citable 1.18.2 → 1.20.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.
- package/CHANGELOG.md +64 -0
- package/README.md +12 -1
- package/dist/universal/.agents/skills/citable/SKILL.md +11 -2
- package/dist/universal/.agents/skills/citable/VERSION +1 -1
- package/dist/universal/.agents/skills/citable/manifest.json +19 -13
- package/dist/universal/.agents/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.agents/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.agents/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.agents/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.agents/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.agents/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.agents/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.agents/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.agents/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.agents/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.agents/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.agents/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.agents/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.agents/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.claude/agents/citable/manifest.json +2 -2
- package/dist/universal/.claude/skills/citable/SKILL.md +11 -2
- package/dist/universal/.claude/skills/citable/VERSION +1 -1
- package/dist/universal/.claude/skills/citable/manifest.json +19 -13
- package/dist/universal/.claude/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.claude/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.claude/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.claude/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.claude/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.claude/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.claude/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.claude/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.claude/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.claude/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.claude/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.claude/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.claude/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.claude/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.cursor/skills/citable/SKILL.md +11 -2
- package/dist/universal/.cursor/skills/citable/VERSION +1 -1
- package/dist/universal/.cursor/skills/citable/manifest.json +19 -13
- package/dist/universal/.cursor/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.cursor/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.cursor/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.cursor/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.cursor/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.cursor/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.cursor/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.cursor/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.cursor/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.cursor/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.cursor/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.cursor/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.cursor/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.cursor/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.gemini/skills/citable/SKILL.md +11 -2
- package/dist/universal/.gemini/skills/citable/VERSION +1 -1
- package/dist/universal/.gemini/skills/citable/manifest.json +19 -13
- package/dist/universal/.gemini/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.gemini/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.gemini/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.gemini/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.gemini/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.gemini/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.gemini/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.gemini/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.gemini/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.gemini/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.gemini/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.gemini/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.gemini/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.gemini/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.github/skills/citable/SKILL.md +11 -2
- package/dist/universal/.github/skills/citable/VERSION +1 -1
- package/dist/universal/.github/skills/citable/manifest.json +19 -13
- package/dist/universal/.github/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.github/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.github/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.github/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.github/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.github/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.github/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.github/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.github/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.github/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.github/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.github/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.github/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.github/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.kiro/skills/citable/SKILL.md +11 -2
- package/dist/universal/.kiro/skills/citable/VERSION +1 -1
- package/dist/universal/.kiro/skills/citable/manifest.json +19 -13
- package/dist/universal/.kiro/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.kiro/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.kiro/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.kiro/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.kiro/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.kiro/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.kiro/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.kiro/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.kiro/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.kiro/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.kiro/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.kiro/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.kiro/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.kiro/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.opencode/skills/citable/SKILL.md +11 -2
- package/dist/universal/.opencode/skills/citable/VERSION +1 -1
- package/dist/universal/.opencode/skills/citable/manifest.json +19 -13
- package/dist/universal/.opencode/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.opencode/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.opencode/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.opencode/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.opencode/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.opencode/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.opencode/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.opencode/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.opencode/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.opencode/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.opencode/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.opencode/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.opencode/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.opencode/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.pi/agent/skills/citable/SKILL.md +11 -2
- package/dist/universal/.pi/agent/skills/citable/VERSION +1 -1
- package/dist/universal/.pi/agent/skills/citable/manifest.json +19 -13
- package/dist/universal/.pi/agent/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.pi/agent/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.pi/agent/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.pi/agent/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.pi/agent/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.pi/agent/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.pi/agent/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.pi/agent/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.pi/agent/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.qoder/skills/citable/SKILL.md +11 -2
- package/dist/universal/.qoder/skills/citable/VERSION +1 -1
- package/dist/universal/.qoder/skills/citable/manifest.json +19 -13
- package/dist/universal/.qoder/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.qoder/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.qoder/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.qoder/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.qoder/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.qoder/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.qoder/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.qoder/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.qoder/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.qoder/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.qoder/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.qoder/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.qoder/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.qoder/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.rovodev/skills/citable/SKILL.md +11 -2
- package/dist/universal/.rovodev/skills/citable/VERSION +1 -1
- package/dist/universal/.rovodev/skills/citable/manifest.json +19 -13
- package/dist/universal/.rovodev/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.rovodev/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.rovodev/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.rovodev/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.rovodev/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.rovodev/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.rovodev/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.rovodev/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.rovodev/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.rovodev/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.rovodev/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.rovodev/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.rovodev/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.rovodev/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.trae/skills/citable/SKILL.md +11 -2
- package/dist/universal/.trae/skills/citable/VERSION +1 -1
- package/dist/universal/.trae/skills/citable/manifest.json +19 -13
- package/dist/universal/.trae/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.trae/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.trae/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.trae/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.trae/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.trae/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.trae/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.trae/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.trae/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.trae/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.trae/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.trae/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.trae/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.trae/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/.trae-cn/skills/citable/SKILL.md +11 -2
- package/dist/universal/.trae-cn/skills/citable/VERSION +1 -1
- package/dist/universal/.trae-cn/skills/citable/manifest.json +19 -13
- package/dist/universal/.trae-cn/skills/citable/schemas/action-plan.schema.json +38 -1
- package/dist/universal/.trae-cn/skills/citable/schemas/audit-coverage.schema.json +118 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/browser-evidence-plan.schema.json +186 -3
- package/dist/universal/.trae-cn/skills/citable/schemas/browser-network-events.schema.json +142 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/browser-runtime-events.schema.json +112 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/browser-state-observations.schema.json +97 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/collection-result.schema.json +35 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/config.schema.json +2 -0
- package/dist/universal/.trae-cn/skills/citable/schemas/cro-report.schema.json +8 -1
- package/dist/universal/.trae-cn/skills/citable/schemas/finding.schema.json +105 -2
- package/dist/universal/.trae-cn/skills/citable/schemas/remediation-verification.schema.json +12 -1
- package/dist/universal/.trae-cn/skills/citable/schemas/run.schema.json +15 -2
- package/dist/universal/.trae-cn/skills/citable/schemas/search-report.schema.json +8 -1
- package/dist/universal/.trae-cn/skills/citable/schemas/summary.schema.json +41 -0
- package/dist/universal/manifest.json +232 -160
- package/package.json +1 -1
- package/schemas/action-plan.schema.json +38 -1
- package/schemas/audit-coverage.schema.json +118 -0
- package/schemas/browser-evidence-plan.schema.json +186 -3
- package/schemas/browser-network-events.schema.json +142 -0
- package/schemas/browser-runtime-events.schema.json +112 -0
- package/schemas/browser-state-observations.schema.json +97 -0
- package/schemas/collection-result.schema.json +35 -0
- package/schemas/config.schema.json +2 -0
- package/schemas/cro-report.schema.json +8 -1
- package/schemas/finding.schema.json +105 -2
- package/schemas/remediation-verification.schema.json +12 -1
- package/schemas/run.schema.json +15 -2
- package/schemas/search-report.schema.json +8 -1
- package/schemas/summary.schema.json +41 -0
- package/skill/SKILL.md +11 -2
- package/src/acceptance/reproducibility.js +5 -25
- package/src/analysis/croRoadmap.js +3 -3
- package/src/analysis/strategicRoadmap.js +3 -3
- package/src/artifacts/interchange.js +2 -6
- package/src/cli/index.js +15 -3
- package/src/commands/actionPlan.js +46 -5
- package/src/commands/applyRemediation.js +5 -5
- package/src/commands/audit.js +75 -8
- package/src/commands/ciWorkflow.js +7 -2
- package/src/commands/compareSnapshots.js +155 -47
- package/src/commands/connect.js +24 -4
- package/src/commands/context.js +41 -2
- package/src/commands/croSuite.js +51 -13
- package/src/commands/delivery.js +7 -7
- package/src/commands/governance.js +9 -10
- package/src/commands/implementationKit.js +2 -1
- package/src/commands/init.js +8 -1
- package/src/commands/previewCro.js +1 -1
- package/src/commands/prioritize.js +3 -2
- package/src/commands/reviews.js +31 -5
- package/src/commands/roadmapCmd.js +7 -13
- package/src/commands/sweep.js +15 -2
- package/src/commands/verifyRemediation.js +94 -19
- package/src/connectors/collectionResult.js +80 -0
- package/src/connectors/ga4.js +46 -11
- package/src/connectors/gsc.js +41 -6
- package/src/connectors/index.js +1 -1
- package/src/connectors/webflow.js +140 -10
- package/src/connectors/wordpress.js +92 -8
- package/src/crawler/fetch.js +220 -24
- package/src/crawler/resourceValidity.js +119 -0
- package/src/crawler/sitemap.js +435 -16
- package/src/crawler/sitemapCollector.js +364 -0
- package/src/crawler/urlIdentity.js +97 -0
- package/src/detectors/agent.js +11 -0
- package/src/detectors/ans.js +16 -1
- package/src/detectors/arch.js +6 -0
- package/src/detectors/claim.js +9 -0
- package/src/detectors/crawl.js +7 -0
- package/src/detectors/cro.js +21 -0
- package/src/detectors/cwv.js +4 -0
- package/src/detectors/entity.js +7 -0
- package/src/detectors/evd.js +9 -0
- package/src/detectors/framework.js +28 -2
- package/src/detectors/geoReco.js +16 -0
- package/src/detectors/hreflang.js +3 -0
- package/src/detectors/lifeMeas.js +9 -0
- package/src/detectors/link.js +6 -1
- package/src/detectors/page.js +11 -0
- package/src/detectors/schemaData.js +16 -1
- package/src/detectors/tech.js +34 -3
- package/src/evidence/coverage.js +448 -0
- package/src/evidence/determination.js +157 -0
- package/src/evidence/downstream.js +110 -0
- package/src/evidence/hashes.js +109 -0
- package/src/evidence/run.js +68 -8
- package/src/extractor/page.js +29 -2
- package/src/extractor/site.js +298 -50
- package/src/observations/browser/correlation.js +83 -0
- package/src/observations/browser/networkCollector.js +413 -0
- package/src/observations/browser/runtimeEventCollector.js +337 -0
- package/src/observations/browser/sanitizer.js +322 -0
- package/src/observations/browser/stateCollector.js +386 -0
- package/src/observations/browserJourney.js +131 -3
- package/src/reporting/executiveCroReport.js +37 -14
- package/src/reporting/executiveExport.js +45 -16
- package/src/reporting/executiveSearchReport.js +57 -23
- package/src/reporting/report.js +56 -9
- package/src/shared/epistemicLanguage.js +86 -0
- package/src/shared/evidenceSourceResolver.js +48 -17
- package/src/shared/htmlEscape.js +8 -4
- package/src/shared/runPackageVerifier.js +99 -8
- package/src/shared/verifiedRunLoader.js +129 -0
- package/src/sow/generateSow.js +1 -1
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
} from '../shared/htmlEscape.js';
|
|
30
30
|
import { extractHostname } from '../shared/domainUtils.js';
|
|
31
31
|
import { validateAgainst } from '../shared/schemaValidator.js';
|
|
32
|
+
import { assertEpistemicLanguage, hasVerifiedEvidenceScope } from '../shared/epistemicLanguage.js';
|
|
32
33
|
|
|
33
34
|
function formatVal(v, suffix = '') {
|
|
34
35
|
if (v === null || v === undefined) return 'NOT OBSERVED';
|
|
@@ -522,13 +523,20 @@ export async function buildExecutiveCroReport(root, options = {}) {
|
|
|
522
523
|
|
|
523
524
|
const generationProvenance = {
|
|
524
525
|
generated_at: generatedAt,
|
|
525
|
-
generator_version: '1.
|
|
526
|
+
generator_version: '1.19.0',
|
|
526
527
|
generation_mode: resolved.generation_mode,
|
|
527
528
|
source_type: resolved.source_type,
|
|
528
529
|
source_identifier: resolved.source_identifier,
|
|
529
530
|
source_findings_count: findings.length,
|
|
530
531
|
integrity_hash: resolved.integrity_hash,
|
|
531
532
|
synthetic_evidence: isSample,
|
|
533
|
+
package_verified: resolved.package_verified === true,
|
|
534
|
+
integrity_mode: resolved.integrity_mode || 'unknown',
|
|
535
|
+
legacy: resolved.legacy === true,
|
|
536
|
+
coverage_status: resolved.coverage_status || 'indeterminate',
|
|
537
|
+
determination_status: resolved.determination_status || 'indeterminate',
|
|
538
|
+
evaluated: resolved.coverage?.populations?.evaluated ?? null,
|
|
539
|
+
eligible: resolved.coverage?.populations?.eligible ?? null,
|
|
532
540
|
};
|
|
533
541
|
|
|
534
542
|
const report = {
|
|
@@ -542,7 +550,7 @@ export async function buildExecutiveCroReport(root, options = {}) {
|
|
|
542
550
|
epistemological_framework: {
|
|
543
551
|
observation: 'Raw empirical facts measured directly from DOM geometry, HTTP status, or analytics telemetry',
|
|
544
552
|
hypothesis: 'Testable causal explanations predicting why the observed friction occurs',
|
|
545
|
-
causation: '
|
|
553
|
+
causation: 'No current causal outcome is established; controlled A/B experiment evidence is required',
|
|
546
554
|
unknowns: 'Gaps in telemetry or attribution that require further instrumentation before forming hypotheses',
|
|
547
555
|
},
|
|
548
556
|
pillars: {
|
|
@@ -588,7 +596,11 @@ export async function buildExecutiveCroReport(root, options = {}) {
|
|
|
588
596
|
/**
|
|
589
597
|
* Render CRO Executive Report as GitHub-flavored Markdown
|
|
590
598
|
*/
|
|
591
|
-
export function renderCroReportMarkdown(report) {
|
|
599
|
+
export function renderCroReportMarkdown(report, evidenceContext = null) {
|
|
600
|
+
const context = evidenceContext || report.generation_provenance || {};
|
|
601
|
+
const verifiedScope = hasVerifiedEvidenceScope(context);
|
|
602
|
+
const causalEvidenceVerified = verifiedScope && context.causal_evidence_verified === true;
|
|
603
|
+
const evidenceRegisterTitle = `${verifiedScope ? 'Verified Conversion Evidence Register' : 'Conversion Evidence Register (scope-limited; verified status not established)'}`;
|
|
592
604
|
const p = report.pillars;
|
|
593
605
|
const ds = report.decision_summary;
|
|
594
606
|
const lines = [
|
|
@@ -597,7 +609,7 @@ export function renderCroReportMarkdown(report) {
|
|
|
597
609
|
`- **Client / Property**: \`${sanitizeForMarkdown(report.client_name)}\` (\`${sanitizeForMarkdown(report.target_domain)}\`)`,
|
|
598
610
|
`- **Generated At**: \`${report.generated_at}\``,
|
|
599
611
|
`- **Conversion Readiness Index**: **${report.overall_conversion_readiness} / 100**`,
|
|
600
|
-
`- **Evidence Register Traceability**: ${report.evidence_register.length}
|
|
612
|
+
`- **Evidence Register Traceability**: ${report.evidence_register.length} evidence references (authority and scope recorded below)`,
|
|
601
613
|
`- **Generation Mode**: \`${report.generation_provenance.generation_mode}\`${report.generation_provenance.synthetic_evidence ? ' *(Synthetic Demo Evidence)*' : ''}`,
|
|
602
614
|
``,
|
|
603
615
|
`> **Scientific Epistemology & Governance Notice**: Citable enforces a strict separation between **Observable Facts**, **Predictive Hypotheses**, and **Causal Evidence**. In adherence to empirical governance, **no conversion rates, ARR lift, or metric improvements are guaranteed**.`,
|
|
@@ -613,8 +625,8 @@ export function renderCroReportMarkdown(report) {
|
|
|
613
625
|
`*(Testable causal predictions requiring validation under controlled experimentation)*`,
|
|
614
626
|
...ds.evidence_supported_hypotheses.map((h) => `- [ ] **[HYPOTHESIS]** ${sanitizeForMarkdown(h)}`),
|
|
615
627
|
``,
|
|
616
|
-
`### 3. Causal Findings (Verified Under Controlled Experiments)`,
|
|
617
|
-
`*(Demonstrated metric shifts under A/B testing with Sample Ratio Mismatch guardrails)*`,
|
|
628
|
+
`### 3. ${causalEvidenceVerified ? 'Causal Findings (Verified Under Controlled Experiments)' : 'Causal Findings (Causal Evidence Not Established)'}`,
|
|
629
|
+
`*(${causalEvidenceVerified ? 'Demonstrated metric shifts under A/B testing with Sample Ratio Mismatch guardrails' : 'No current causal outcome is established from this report; controlled experiment evidence is required'})*`,
|
|
618
630
|
...ds.causal_findings.map((c) => `- [=] **[CAUSAL]** ${sanitizeForMarkdown(c)}`),
|
|
619
631
|
``,
|
|
620
632
|
`### 4. Critical Unresolved Unknowns (Measurement Gaps)`,
|
|
@@ -694,7 +706,7 @@ export function renderCroReportMarkdown(report) {
|
|
|
694
706
|
`- **Evidence Link**: \`${p[15].data.evidence_ref}\``,
|
|
695
707
|
...(p[15].data.top_customer_objections || []).map((o) => `- "${sanitizeForMarkdown(o)}"`),
|
|
696
708
|
``,
|
|
697
|
-
`## 15.
|
|
709
|
+
`## 15. ${evidenceRegisterTitle}`,
|
|
698
710
|
`| Evidence ID | Source Channel | Methodology | Confidence | Observation Date |`,
|
|
699
711
|
`| :--- | :--- | :--- | :--- | :--- |`,
|
|
700
712
|
...report.evidence_register.map((e) => `| **${e.evidence_id}** | \`${escapeMarkdownTableCell(e.source)}\` | ${escapeMarkdownTableCell((e.methodology || '').slice(0, 50))}... | \`${e.confidence_level}\` | ${e.observation_date} |`),
|
|
@@ -720,16 +732,24 @@ export function renderCroReportMarkdown(report) {
|
|
|
720
732
|
``,
|
|
721
733
|
];
|
|
722
734
|
|
|
723
|
-
|
|
735
|
+
const rendered = lines.join('\n');
|
|
736
|
+
assertEpistemicLanguage(rendered, { ...context, package_verified: context.package_verified === true });
|
|
737
|
+
return rendered;
|
|
724
738
|
}
|
|
725
739
|
|
|
726
740
|
/**
|
|
727
741
|
* Render CRO Executive Report as Standalone Enterprise HTML
|
|
728
742
|
*/
|
|
729
|
-
export function renderCroReportHtml(report) {
|
|
743
|
+
export function renderCroReportHtml(report, evidenceContext = null) {
|
|
730
744
|
const p = report.pillars;
|
|
731
745
|
const ds = report.decision_summary;
|
|
732
|
-
|
|
746
|
+
const context = evidenceContext || report.generation_provenance || {};
|
|
747
|
+
const verifiedScope = hasVerifiedEvidenceScope(context);
|
|
748
|
+
const causalEvidenceVerified = verifiedScope && context.causal_evidence_verified === true;
|
|
749
|
+
const evidenceRegisterTitle = verifiedScope
|
|
750
|
+
? 'Verified Conversion Evidence Register'
|
|
751
|
+
: 'Conversion Evidence Register (scope-limited; verified status not established)';
|
|
752
|
+
const rendered = `<!DOCTYPE html>
|
|
733
753
|
<html lang="en">
|
|
734
754
|
<head>
|
|
735
755
|
<meta charset="UTF-8">
|
|
@@ -817,13 +837,13 @@ export function renderCroReportHtml(report) {
|
|
|
817
837
|
|
|
818
838
|
<div class="epistemic-box" style="border-left: 4px solid var(--accent-light);">
|
|
819
839
|
<span class="epistemic-tag badge-causal">Causal Findings</span>
|
|
820
|
-
<p style="font-size:12px; color:var(--muted); margin: 0 0 8px 0;"
|
|
840
|
+
<p style="font-size:12px; color:var(--muted); margin: 0 0 8px 0;">${causalEvidenceVerified ? 'Statistically verified outcomes under controlled A/B experiments with SRM checks.' : 'Causal evidence is not established; controlled A/B experiment evidence is required.'}</p>
|
|
821
841
|
<ul>
|
|
822
842
|
${ds.causal_findings.map((c) => `<li>${escapeHtml(c)}</li>`).join('')}
|
|
823
843
|
</ul>
|
|
824
844
|
</div>
|
|
825
845
|
|
|
826
|
-
<h2 class="section-title"
|
|
846
|
+
<h2 class="section-title">${evidenceRegisterTitle} (${report.evidence_register.length} Observations)</h2>
|
|
827
847
|
<table>
|
|
828
848
|
<thead>
|
|
829
849
|
<tr>
|
|
@@ -858,6 +878,8 @@ export function renderCroReportHtml(report) {
|
|
|
858
878
|
</div>
|
|
859
879
|
</body>
|
|
860
880
|
</html>`;
|
|
881
|
+
assertEpistemicLanguage(rendered, { ...context, package_verified: context.package_verified === true });
|
|
882
|
+
return rendered;
|
|
861
883
|
}
|
|
862
884
|
|
|
863
885
|
/**
|
|
@@ -865,15 +887,16 @@ export function renderCroReportHtml(report) {
|
|
|
865
887
|
*/
|
|
866
888
|
export async function exportExecutiveCroReport(root, options = {}) {
|
|
867
889
|
const report = await buildExecutiveCroReport(root, options);
|
|
890
|
+
const evidenceContext = report.generation_provenance;
|
|
868
891
|
const format = options.format || 'markdown';
|
|
869
892
|
let content = '';
|
|
870
893
|
|
|
871
894
|
if (format === 'html' || format === 'html-brief') {
|
|
872
|
-
content = renderCroReportHtml(report);
|
|
895
|
+
content = renderCroReportHtml(report, evidenceContext);
|
|
873
896
|
} else if (format === 'json') {
|
|
874
897
|
content = JSON.stringify(report, null, 2);
|
|
875
898
|
} else {
|
|
876
|
-
content = renderCroReportMarkdown(report);
|
|
899
|
+
content = renderCroReportMarkdown(report, evidenceContext);
|
|
877
900
|
}
|
|
878
901
|
|
|
879
902
|
let outputPath = null;
|
|
@@ -3,6 +3,9 @@ import path from "node:path";
|
|
|
3
3
|
import { readJson } from "../shared/io.js";
|
|
4
4
|
import { exportExecutiveSearchReport, buildExecutiveSearchReport, renderSearchReportMarkdown, renderSearchReportHtml } from "./executiveSearchReport.js";
|
|
5
5
|
import { exportExecutiveCroReport, buildExecutiveCroReport, renderCroReportMarkdown, renderCroReportHtml } from "./executiveCroReport.js";
|
|
6
|
+
import { downstreamEnvelope } from '../evidence/downstream.js';
|
|
7
|
+
import { loadVerifiedRun } from '../shared/verifiedRunLoader.js';
|
|
8
|
+
import { assertEpistemicLanguage, evidenceScopeStatement } from '../shared/epistemicLanguage.js';
|
|
6
9
|
|
|
7
10
|
export {
|
|
8
11
|
exportExecutiveSearchReport,
|
|
@@ -78,7 +81,7 @@ export async function exportExecutiveReport(root, runId, {
|
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
const runsDir = path.join(root, ".citable", "runs");
|
|
81
|
-
let targetRun = runId;
|
|
84
|
+
let targetRun = runId && fs.existsSync(path.join(root, '.citable', 'runs', runId)) ? runId : null;
|
|
82
85
|
|
|
83
86
|
if (!targetRun && fs.existsSync(runsDir)) {
|
|
84
87
|
const runs = fs.readdirSync(runsDir).filter((d) => !d.startsWith("."));
|
|
@@ -86,23 +89,41 @@ export async function exportExecutiveReport(root, runId, {
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
let summary = {
|
|
89
|
-
counts: { critical: 0, high:
|
|
92
|
+
counts: { critical: 0, high: 0, medium: 0, low: 0 },
|
|
90
93
|
posture: { retrieval: "eligible", support: "suitable", citation: "observed" },
|
|
94
|
+
coverage_status: 'indeterminate',
|
|
95
|
+
determination_status: 'indeterminate',
|
|
91
96
|
};
|
|
92
97
|
let findings = [];
|
|
98
|
+
let coverage = null;
|
|
99
|
+
let packageVerified = false;
|
|
93
100
|
|
|
94
101
|
if (targetRun) {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
102
|
+
const loaded = loadVerifiedRun(path.join(runsDir, targetRun), { requireCompletedExecution: false, allowLegacy: true, requireCoverage: false });
|
|
103
|
+
summary = loaded.summary || summary;
|
|
104
|
+
findings = loaded.findings;
|
|
105
|
+
coverage = loaded.coverage;
|
|
106
|
+
packageVerified = loaded.verified === true && loaded.integrity_mode === 'sealed';
|
|
107
|
+
summary.coverage_status = loaded.coverage_status;
|
|
108
|
+
summary.determination_status = loaded.determination_status;
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
const evidence = downstreamEnvelope(coverage);
|
|
112
|
+
summary.coverage_status = evidence.coverage_status;
|
|
113
|
+
summary.determination_status = evidence.determination_status;
|
|
114
|
+
summary.coverage = {
|
|
115
|
+
...evidence.evidence_scope,
|
|
116
|
+
limitations: evidence.limitations,
|
|
117
|
+
};
|
|
118
|
+
|
|
105
119
|
let content = "";
|
|
120
|
+
const evidenceNotice = `Evidence determination: ${summary.determination_status} (coverage: ${summary.coverage_status}; evaluated ${summary.coverage.evaluated ?? 0} of ${summary.coverage.eligible ?? 'unknown'} eligible). ${summary.coverage.limitations.join('; ') || evidenceScopeStatement({
|
|
121
|
+
coverage_status: summary.coverage_status,
|
|
122
|
+
determination_status: summary.determination_status,
|
|
123
|
+
evaluated: summary.coverage.evaluated,
|
|
124
|
+
eligible: summary.coverage.eligible,
|
|
125
|
+
package_verified: packageVerified,
|
|
126
|
+
})}`;
|
|
106
127
|
|
|
107
128
|
if (format === "html-brief") {
|
|
108
129
|
content = `<!DOCTYPE html>
|
|
@@ -136,6 +157,7 @@ export async function exportExecutiveReport(root, runId, {
|
|
|
136
157
|
<div class="disclosure">
|
|
137
158
|
<strong>Regulatory & Governance Notice:</strong> Citable measures observable retrieval suitability, source extraction fidelity, and external AI citation outcomes. Citable does not guarantee search crawling, indexing, ranking, citation, recommendation, or conversion.
|
|
138
159
|
</div>
|
|
160
|
+
<p class="disclosure"><strong>${evidenceNotice}</strong></p>
|
|
139
161
|
|
|
140
162
|
<div class="kpi-grid">
|
|
141
163
|
<div class="kpi-card"><div>Critical Risks</div><div class="kpi-val ${(summary.counts?.critical || 0) > 0 ? "crit" : "healthy"}">${summary.counts?.critical || 0}</div></div>
|
|
@@ -150,10 +172,7 @@ export async function exportExecutiveReport(root, runId, {
|
|
|
150
172
|
<tr><th>Detector</th><th>Severity</th><th>Summary</th><th>Required Remediation</th></tr>
|
|
151
173
|
</thead>
|
|
152
174
|
<tbody>
|
|
153
|
-
${(findings.length > 0 ? findings : [
|
|
154
|
-
{ detector_id: "CRO-015", severity: "low", summary: "Mobile touch target below 44px on primary CTA", remediation: "Increase button min-height to 48px" },
|
|
155
|
-
{ detector_id: "GEO-008", severity: "high", summary: "Attribution distortion in AI search citation", remediation: "Corroborate claims directly on landing page" },
|
|
156
|
-
]).map((f) => `
|
|
175
|
+
${(findings.length > 0 ? findings : [{ detector_id: "—", severity: "informational", summary: evidenceNotice, remediation: "Collect sufficient evidence before drawing a site-wide determination" }]).map((f) => `
|
|
157
176
|
<tr>
|
|
158
177
|
<td><code>${f.detector_id}</code></td>
|
|
159
178
|
<td><span class="badge badge-${f.severity}">${f.severity.toUpperCase()}</span></td>
|
|
@@ -174,11 +193,13 @@ export async function exportExecutiveReport(root, runId, {
|
|
|
174
193
|
- **High Severity Findings**: ${summary.counts?.high || 0}
|
|
175
194
|
- **Medium Severity Findings**: ${summary.counts?.medium || 0}
|
|
176
195
|
|
|
196
|
+
> **${evidenceNotice}** Findings remain limited to the evaluated evidence scope.
|
|
197
|
+
|
|
177
198
|
> Citable does not guarantee crawling, indexing, ranking, citation, or conversion.
|
|
178
199
|
|
|
179
200
|
<!-- slide -->
|
|
180
201
|
## Prioritized Action Items
|
|
181
|
-
${findings.slice(0, 5).map((f) => `- **[${f.detector_id}]** (${f.severity}): ${f.summary}`).join("\n") ||
|
|
202
|
+
${findings.slice(0, 5).map((f) => `- **[${f.detector_id}]** (${f.severity}): ${f.summary}`).join("\n") || `- No determination established from the available evidence (${summary.determination_status || 'indeterminate'}).`}
|
|
182
203
|
`;
|
|
183
204
|
} else if (format === "slides") {
|
|
184
205
|
const fsa = findings.reduce((acc, f) => {
|
|
@@ -263,7 +284,7 @@ ${findings.slice(0, 5).map((f) => `- **[${f.detector_id}]** (${f.severity}): ${f
|
|
|
263
284
|
<h2>Prioritized Remediations</h2>
|
|
264
285
|
<p>Every finding maps directly to a production-ready, accessible Nebula Component:</p>
|
|
265
286
|
<div style="background:#1e293b; border-radius:0.75rem; padding:1.5rem; border:1px solid #334155;">
|
|
266
|
-
${findings.slice(0, 4).map((f) => `<div style="padding:0.5rem 0; border-bottom:1px solid #334155; font-size:1.1rem;"><strong>[${f.detector_id || "CRO"}]</strong>: ${f.summary || "Conversion action friction"}</div>`).join("") ||
|
|
287
|
+
${findings.slice(0, 4).map((f) => `<div style="padding:0.5rem 0; border-bottom:1px solid #334155; font-size:1.1rem;"><strong>[${f.detector_id || "CRO"}]</strong>: ${f.summary || "Conversion action friction"}</div>`).join("") || `<p>No determination established from the available evidence (${summary.determination_status || 'indeterminate'}).</p>`}
|
|
267
288
|
</div>
|
|
268
289
|
<div style="margin-top:1.5rem; font-family:monospace; background:#0f172a; padding:1rem; border-radius:0.5rem; border:1px solid #334155; color:#38bdf8;">
|
|
269
290
|
$ npx @nebulacomponents/citable remediate --finding CRO-007 --write
|
|
@@ -300,6 +321,14 @@ ${findings.slice(0, 5).map((f) => `- **[${f.detector_id}]** (${f.severity}): ${f
|
|
|
300
321
|
fs.writeFileSync(path.resolve(root, output), content, "utf8");
|
|
301
322
|
}
|
|
302
323
|
|
|
324
|
+
const languageContext = {
|
|
325
|
+
coverage_status: summary.coverage_status,
|
|
326
|
+
determination_status: summary.determination_status,
|
|
327
|
+
evaluated: summary.coverage.evaluated,
|
|
328
|
+
eligible: summary.coverage.eligible,
|
|
329
|
+
package_verified: packageVerified,
|
|
330
|
+
};
|
|
331
|
+
assertEpistemicLanguage(content, languageContext);
|
|
303
332
|
return {
|
|
304
333
|
format,
|
|
305
334
|
client_name: clientName,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
} from '../shared/htmlEscape.js';
|
|
32
32
|
import { extractHostname } from '../shared/domainUtils.js';
|
|
33
33
|
import { validateAgainst } from '../shared/schemaValidator.js';
|
|
34
|
+
import { assertEpistemicLanguage, hasVerifiedEvidenceScope } from '../shared/epistemicLanguage.js';
|
|
34
35
|
|
|
35
36
|
function formatVal(v, suffix = '') {
|
|
36
37
|
if (v === null || v === undefined) return 'NOT OBSERVED';
|
|
@@ -613,13 +614,20 @@ export async function buildExecutiveSearchReport(root, options = {}) {
|
|
|
613
614
|
|
|
614
615
|
const generationProvenance = {
|
|
615
616
|
generated_at: generatedAt,
|
|
616
|
-
generator_version: '1.
|
|
617
|
+
generator_version: '1.19.0',
|
|
617
618
|
generation_mode: resolved.generation_mode,
|
|
618
619
|
source_type: resolved.source_type,
|
|
619
620
|
source_identifier: resolved.source_identifier,
|
|
620
621
|
source_findings_count: findings.length,
|
|
621
622
|
integrity_hash: resolved.integrity_hash,
|
|
622
623
|
synthetic_evidence: isSample,
|
|
624
|
+
package_verified: resolved.package_verified === true,
|
|
625
|
+
integrity_mode: resolved.integrity_mode || 'unknown',
|
|
626
|
+
legacy: resolved.legacy === true,
|
|
627
|
+
coverage_status: resolved.coverage_status || 'indeterminate',
|
|
628
|
+
determination_status: resolved.determination_status || 'indeterminate',
|
|
629
|
+
evaluated: resolved.coverage?.populations?.evaluated ?? null,
|
|
630
|
+
eligible: resolved.coverage?.populations?.eligible ?? null,
|
|
623
631
|
};
|
|
624
632
|
|
|
625
633
|
const report = {
|
|
@@ -667,7 +675,15 @@ export async function buildExecutiveSearchReport(root, options = {}) {
|
|
|
667
675
|
/**
|
|
668
676
|
* Render Search Executive Report as GitHub-flavored Markdown
|
|
669
677
|
*/
|
|
670
|
-
export function renderSearchReportMarkdown(report) {
|
|
678
|
+
export function renderSearchReportMarkdown(report, evidenceContext = null) {
|
|
679
|
+
const context = evidenceContext || report.generation_provenance || {};
|
|
680
|
+
const verifiedScope = hasVerifiedEvidenceScope(context);
|
|
681
|
+
const scopedValue = (value) => {
|
|
682
|
+
if (!verifiedScope && typeof value === 'string' && /\b(?:verified|clean|resolved|optimal|passed)\b|(?:verified_source|clean_profile)/i.test(value)) return 'NOT ESTABLISHED';
|
|
683
|
+
return value;
|
|
684
|
+
};
|
|
685
|
+
const scopedFormat = (value, suffix = '') => scopedValue(formatVal(value, suffix));
|
|
686
|
+
const evidenceRegisterTitle = `${verifiedScope ? 'Verified Evidence Register' : 'Evidence Register (scope-limited; verified status not established)'} (Traceability Engine)`;
|
|
671
687
|
const p = report.pillars;
|
|
672
688
|
const lines = [
|
|
673
689
|
`# ${sanitizeForMarkdown(report.report_title)}`,
|
|
@@ -675,7 +691,7 @@ export function renderSearchReportMarkdown(report) {
|
|
|
675
691
|
`- **Client / Property**: \`${sanitizeForMarkdown(report.client_name)}\` (\`${sanitizeForMarkdown(report.target_domain)}\`)`,
|
|
676
692
|
`- **Generated At**: \`${report.generated_at}\``,
|
|
677
693
|
`- **Overall Search & AEO Readiness Score**: **${report.overall_readiness_score} / 100**`,
|
|
678
|
-
`- **Evidence Register Traceability**: ${report.evidence_register.length}
|
|
694
|
+
`- **Evidence Register Traceability**: ${report.evidence_register.length} evidence references (authority and scope recorded below)`,
|
|
679
695
|
`- **Generation Mode**: \`${report.generation_provenance.generation_mode}\`${report.generation_provenance.synthetic_evidence ? ' *(Synthetic Demo Evidence)*' : ''}`,
|
|
680
696
|
``,
|
|
681
697
|
`> **Operating Premise & Governance Notice**: This executive report presents observable technical search infrastructure, content extraction posture, and controlled citation behavior. In adherence to Citable governance principles, **no search ranking, AI citation, or conversion outcomes are guaranteed**.`,
|
|
@@ -684,7 +700,7 @@ export function renderSearchReportMarkdown(report) {
|
|
|
684
700
|
`## Executive Decision Summary (Traceable Conclusions)`,
|
|
685
701
|
``,
|
|
686
702
|
`### 1. Confirmed Findings (Deterministic Observations)`,
|
|
687
|
-
...report.decision_summary.confirmed_findings.map((f) => `- [x] **[
|
|
703
|
+
...report.decision_summary.confirmed_findings.map((f) => `- [x] **[OBSERVED]** ${sanitizeForMarkdown(f)}`),
|
|
688
704
|
``,
|
|
689
705
|
`### 2. Inferred Opportunities (Modeled Projections)`,
|
|
690
706
|
...report.decision_summary.inferred_opportunities.map((o) => `- [ ] **[OPPORTUNITY]** ${sanitizeForMarkdown(o)}`),
|
|
@@ -703,13 +719,13 @@ export function renderSearchReportMarkdown(report) {
|
|
|
703
719
|
`- **Evidence Link**: \`${p[1].data.evidence_ref}\``,
|
|
704
720
|
`- **Google Organic Indexing**: ${formatVal(p[1].data.google_organic?.indexed_status).toUpperCase()}`,
|
|
705
721
|
`- **Google AI Overviews**: ${formatVal(p[1].data.google_ai_overviews?.inclusion_rate_pct, '%')} inclusion rate (Risk: \`${formatVal(p[1].data.google_ai_overviews?.risk_exposure)}\`)`,
|
|
706
|
-
`- **AI Engine Presence**: Perplexity (\`${
|
|
722
|
+
`- **AI Engine Presence**: Perplexity (\`${scopedFormat(p[1].data.ai_answer_engines?.perplexity)}\`), ChatGPT (\`${scopedFormat(p[1].data.ai_answer_engines?.chatgpt_search)}\`), Copilot (\`${scopedFormat(p[1].data.ai_answer_engines?.copilot)}\`)`,
|
|
707
723
|
``,
|
|
708
724
|
`## 2. Technical Search Infrastructure & Core Web Vitals`,
|
|
709
725
|
`- **Evidence Link**: \`${p[2].data.evidence_ref}\``,
|
|
710
|
-
`- **Crawlability & Canonicals**: ${
|
|
711
|
-
`- **LCP Readiness**: ${
|
|
712
|
-
`- **CLS Readiness**: ${
|
|
726
|
+
`- **Crawlability & Canonicals**: ${scopedFormat(p[2].data.canonical_integrity).toUpperCase()}`,
|
|
727
|
+
`- **LCP Readiness**: ${scopedFormat(p[2].data.core_web_vitals?.lcp_status).toUpperCase()} (${formatVal(p[2].data.core_web_vitals?.render_blocking_scripts)} render-blocking assets)`,
|
|
728
|
+
`- **CLS Readiness**: ${scopedFormat(p[2].data.core_web_vitals?.cls_status).toUpperCase()} (${formatVal(p[2].data.core_web_vitals?.unsized_images)} unsized images)`,
|
|
713
729
|
``,
|
|
714
730
|
`## 3. Organic Performance & Search Intent Analysis`,
|
|
715
731
|
`- **Evidence Link**: \`${p[3].data.evidence_ref}\``,
|
|
@@ -724,7 +740,7 @@ export function renderSearchReportMarkdown(report) {
|
|
|
724
740
|
``,
|
|
725
741
|
`## 5. AEO Readiness Assessment (Answer Engine Optimization)`,
|
|
726
742
|
`- **Evidence Link**: \`${p[5].data.evidence_ref}\``,
|
|
727
|
-
`- **Overall AEO Readiness Score**: **${formatVal(p[5].data.readiness_score)} / 100** (${
|
|
743
|
+
`- **Overall AEO Readiness Score**: **${formatVal(p[5].data.readiness_score)} / 100** (${scopedFormat(p[5].data.status).toUpperCase()})`,
|
|
728
744
|
`- **Direct Answer Density**: ${formatVal(p[5].data.direct_extract_density)}`,
|
|
729
745
|
``,
|
|
730
746
|
`## 6. GEO Assessment (Generative Engine Optimization)`,
|
|
@@ -743,7 +759,7 @@ export function renderSearchReportMarkdown(report) {
|
|
|
743
759
|
`## 8. Entity & Knowledge Graph Integrity`,
|
|
744
760
|
`- **Evidence Link**: \`${p[8].data.evidence_ref}\``,
|
|
745
761
|
`- **Organization Node Resolved**: ${p[8].data.organization_node_resolved ? 'YES' : 'NO'}`,
|
|
746
|
-
`- **External Corroboration**: ${
|
|
762
|
+
`- **External Corroboration**: ${scopedFormat(p[8].data.wikidata_corroboration).toUpperCase()}`,
|
|
747
763
|
``,
|
|
748
764
|
`## 9. Structured-Data & Schema Architecture`,
|
|
749
765
|
`- **Evidence Link**: \`${p[9].data.evidence_ref}\``,
|
|
@@ -753,12 +769,12 @@ export function renderSearchReportMarkdown(report) {
|
|
|
753
769
|
`## 10. Competitive Search Intelligence & Share of Voice`,
|
|
754
770
|
`- **Evidence Link**: \`${p[10].data.evidence_ref}\``,
|
|
755
771
|
`- **1st-Party Citation Share**: **${formatVal(p[10].data.first_party_citation_share_pct, '%')}** vs Competitors (${formatVal(p[10].data.top_competitor_share_pct, '%')})`,
|
|
756
|
-
`- **Primary Gap**: ${
|
|
772
|
+
`- **Primary Gap**: ${scopedFormat(p[10].data.primary_authority_gap)}`,
|
|
757
773
|
``,
|
|
758
774
|
`## 11. Backlink & Off-Page Authority Profile`,
|
|
759
775
|
`- **Evidence Link**: \`${p[11].data.evidence_ref}\``,
|
|
760
776
|
`- **Referring Domains**: ${formatVal(p[11].data.referring_domains)} (Authority Score: ${formatVal(p[11].data.authority_score)}/100)`,
|
|
761
|
-
`- **Toxic Domains**: ${formatVal(p[11].data.toxic_domain_count)} flagged (\`${
|
|
777
|
+
`- **Toxic Domains**: ${formatVal(p[11].data.toxic_domain_count)} flagged (\`${scopedFormat(p[11].data.disavow_recommendation)}\`)`,
|
|
762
778
|
``,
|
|
763
779
|
`## 12. Search Demand & Addressable Market Opportunity`,
|
|
764
780
|
];
|
|
@@ -782,11 +798,11 @@ export function renderSearchReportMarkdown(report) {
|
|
|
782
798
|
`- **Assisted Conversions Share**: ${formatVal(p[13].data.assisted_conversions_share_pct, '%')}`,
|
|
783
799
|
``,
|
|
784
800
|
`## 14. Measurement Integrity & Analytics Instrumentation`,
|
|
785
|
-
`- **GA4 & GSC**: ${formatVal(p[14].data.ga4_instrumentation).toUpperCase()} / ${formatVal(p[14].data.gsc_property_binding).toUpperCase()}`,
|
|
801
|
+
`- **GA4 & GSC**: ${formatVal(scopedValue(p[14].data.ga4_instrumentation)).toUpperCase()} / ${formatVal(scopedValue(p[14].data.gsc_property_binding)).toUpperCase()}`,
|
|
786
802
|
`- **Consent Mode Data Loss**: ${formatVal(p[14].data.consent_mode_v2_loss_pct, '%')}`,
|
|
787
803
|
`- **Limitations**: ${(p[14].data.known_limitations || []).map((l) => sanitizeForMarkdown(l)).join('; ')}`,
|
|
788
804
|
``,
|
|
789
|
-
`## 15.
|
|
805
|
+
`## 15. ${evidenceRegisterTitle}`,
|
|
790
806
|
`| Evidence ID | Source | Methodology | Confidence | Observation Date |`,
|
|
791
807
|
`| :--- | :--- | :--- | :--- | :--- |`,
|
|
792
808
|
...report.evidence_register.map((e) => `| **${e.evidence_id}** | \`${escapeMarkdownTableCell(e.source)}\` | ${escapeMarkdownTableCell((e.methodology || '').slice(0, 50))}... | \`${e.confidence_level}\` | ${e.observation_date} |`),
|
|
@@ -806,15 +822,30 @@ export function renderSearchReportMarkdown(report) {
|
|
|
806
822
|
``
|
|
807
823
|
);
|
|
808
824
|
|
|
809
|
-
|
|
825
|
+
const rendered = lines.join('\n');
|
|
826
|
+
assertEpistemicLanguage(rendered, { ...context, package_verified: context.package_verified === true });
|
|
827
|
+
return rendered;
|
|
810
828
|
}
|
|
811
829
|
|
|
812
830
|
/**
|
|
813
831
|
* Render Search Executive Report as Standalone Enterprise HTML
|
|
814
832
|
*/
|
|
815
|
-
export function renderSearchReportHtml(report) {
|
|
833
|
+
export function renderSearchReportHtml(report, evidenceContext = null) {
|
|
816
834
|
const p = report.pillars;
|
|
817
|
-
|
|
835
|
+
const context = evidenceContext || report.generation_provenance || {};
|
|
836
|
+
const verifiedScope = hasVerifiedEvidenceScope(context);
|
|
837
|
+
const evidenceRegisterTitle = verifiedScope
|
|
838
|
+
? 'Verified Evidence Register'
|
|
839
|
+
: 'Evidence Register (scope-limited; verified status not established)';
|
|
840
|
+
const readinessLabel = verifiedScope ? (report.overall_readiness_score >= 70 ? 'Strong observed posture' : 'Needs optimization') : 'Not established';
|
|
841
|
+
const cwvLabel = verifiedScope && p[2].data.core_web_vitals?.render_blocking_scripts === 0 ? 'No flagged blockers' : 'Not established';
|
|
842
|
+
const scopedFormat = (value, suffix = '') => {
|
|
843
|
+
const rendered = formatVal(value, suffix);
|
|
844
|
+
return !verifiedScope && typeof rendered === 'string' && /\b(?:verified|clean|resolved|optimal|passed)\b|(?:verified_source|clean_profile)/i.test(rendered)
|
|
845
|
+
? 'NOT ESTABLISHED'
|
|
846
|
+
: rendered;
|
|
847
|
+
};
|
|
848
|
+
const rendered = `<!DOCTYPE html>
|
|
818
849
|
<html lang="en">
|
|
819
850
|
<head>
|
|
820
851
|
<meta charset="UTF-8">
|
|
@@ -861,12 +892,12 @@ export function renderSearchReportHtml(report) {
|
|
|
861
892
|
<div class="card">
|
|
862
893
|
<div style="font-size:12px; color:var(--muted); text-transform:uppercase;">Composite Search Readiness</div>
|
|
863
894
|
<div class="card-num">${report.overall_readiness_score} / 100</div>
|
|
864
|
-
<span class="badge ${report.overall_readiness_score >= 70 ? 'badge-success' : 'badge-warning'}">${
|
|
895
|
+
<span class="badge ${verifiedScope && report.overall_readiness_score >= 70 ? 'badge-success' : 'badge-warning'}">${readinessLabel}</span>
|
|
865
896
|
</div>
|
|
866
897
|
<div class="card">
|
|
867
898
|
<div style="font-size:12px; color:var(--muted); text-transform:uppercase;">AEO Direct Extraction</div>
|
|
868
899
|
<div class="card-num">${formatVal(p[5].data.readiness_score)}</div>
|
|
869
|
-
<span class="badge badge-success">${
|
|
900
|
+
<span class="badge badge-success">${scopedFormat(p[5].data.status).toUpperCase()}</span>
|
|
870
901
|
</div>
|
|
871
902
|
<div class="card">
|
|
872
903
|
<div style="font-size:12px; color:var(--muted); text-transform:uppercase;">E-E-A-T Quality Score</div>
|
|
@@ -876,11 +907,11 @@ export function renderSearchReportHtml(report) {
|
|
|
876
907
|
<div class="card">
|
|
877
908
|
<div style="font-size:12px; color:var(--muted); text-transform:uppercase;">Core Web Vitals Blockers</div>
|
|
878
909
|
<div class="card-num">${formatVal(p[2].data.core_web_vitals?.render_blocking_scripts)}</div>
|
|
879
|
-
<span class="badge ${p[2].data.core_web_vitals?.render_blocking_scripts === 0 ? 'badge-success' : 'badge-danger'}">${
|
|
910
|
+
<span class="badge ${verifiedScope && p[2].data.core_web_vitals?.render_blocking_scripts === 0 ? 'badge-success' : 'badge-danger'}">${cwvLabel}</span>
|
|
880
911
|
</div>
|
|
881
912
|
</div>
|
|
882
913
|
|
|
883
|
-
<h2 class="section-title"
|
|
914
|
+
<h2 class="section-title">${evidenceRegisterTitle} (${report.evidence_register.length} Observations)</h2>
|
|
884
915
|
<table>
|
|
885
916
|
<thead>
|
|
886
917
|
<tr>
|
|
@@ -915,6 +946,8 @@ export function renderSearchReportHtml(report) {
|
|
|
915
946
|
</div>
|
|
916
947
|
</body>
|
|
917
948
|
</html>`;
|
|
949
|
+
assertEpistemicLanguage(rendered, { ...context, package_verified: context.package_verified === true });
|
|
950
|
+
return rendered;
|
|
918
951
|
}
|
|
919
952
|
|
|
920
953
|
/**
|
|
@@ -922,15 +955,16 @@ export function renderSearchReportHtml(report) {
|
|
|
922
955
|
*/
|
|
923
956
|
export async function exportExecutiveSearchReport(root, options = {}) {
|
|
924
957
|
const report = await buildExecutiveSearchReport(root, options);
|
|
958
|
+
const evidenceContext = report.generation_provenance;
|
|
925
959
|
const format = options.format || 'markdown';
|
|
926
960
|
let content = '';
|
|
927
961
|
|
|
928
962
|
if (format === 'html' || format === 'html-brief') {
|
|
929
|
-
content = renderSearchReportHtml(report);
|
|
963
|
+
content = renderSearchReportHtml(report, evidenceContext);
|
|
930
964
|
} else if (format === 'json') {
|
|
931
965
|
content = JSON.stringify(report, null, 2);
|
|
932
966
|
} else {
|
|
933
|
-
content = renderSearchReportMarkdown(report);
|
|
967
|
+
content = renderSearchReportMarkdown(report, evidenceContext);
|
|
934
968
|
}
|
|
935
969
|
|
|
936
970
|
let outputPath = null;
|
package/src/reporting/report.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { assertEpistemicLanguage, evidenceScopeStatement } from '../shared/epistemicLanguage.js';
|
|
2
|
+
|
|
1
3
|
const SEV_ORDER = { critical: 0, high: 1, medium: 2, low: 3, informational: 4, experimental: 5 };
|
|
2
4
|
|
|
3
5
|
const RETRIEVAL_NAMESPACES = new Set(['TECH', 'CRAWL', 'LINK', 'HREFLANG']);
|
|
@@ -39,7 +41,7 @@ function citationPosture(promptResults, targetOrigin) {
|
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
export function summarize(findings, { detectorsRun = [], detectorsSkipped = [], promptResults = [], targetOrigin = null } = {}) {
|
|
44
|
+
export function summarize(findings, { detectorsRun = [], detectorsSkipped = [], promptResults = [], targetOrigin = null, coverage = null } = {}) {
|
|
43
45
|
const bySeverity = {};
|
|
44
46
|
const byNamespace = {};
|
|
45
47
|
const byDiscipline = { seo: 0, aeo: 0, geo: 0 };
|
|
@@ -51,6 +53,18 @@ export function summarize(findings, { detectorsRun = [], detectorsSkipped = [],
|
|
|
51
53
|
for (const d of f.discipline) byDiscipline[d] = (byDiscipline[d] || 0) + 1;
|
|
52
54
|
if (f.classification.deterministic) deterministic++;
|
|
53
55
|
}
|
|
56
|
+
const coverageIncomplete = coverage && coverage.coverage_status !== 'complete';
|
|
57
|
+
const posture = {
|
|
58
|
+
retrieval_eligibility: readinessPosture(findings, detectorsRun, detectorsSkipped, RETRIEVAL_NAMESPACES),
|
|
59
|
+
source_extraction_and_support: readinessPosture(findings, detectorsRun, detectorsSkipped, SOURCE_NAMESPACES),
|
|
60
|
+
observed_citation_behavior: citationPosture(promptResults, targetOrigin),
|
|
61
|
+
};
|
|
62
|
+
if (coverageIncomplete) {
|
|
63
|
+
for (const key of ['retrieval_eligibility', 'source_extraction_and_support']) {
|
|
64
|
+
posture[key].result = 'qualified';
|
|
65
|
+
posture[key].coverage_status = coverage.coverage_status;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
54
68
|
return {
|
|
55
69
|
total: findings.length,
|
|
56
70
|
deterministic_observations: deterministic,
|
|
@@ -58,15 +72,22 @@ export function summarize(findings, { detectorsRun = [], detectorsSkipped = [],
|
|
|
58
72
|
by_severity: bySeverity,
|
|
59
73
|
by_namespace: byNamespace,
|
|
60
74
|
by_discipline: byDiscipline,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
75
|
+
coverage: coverage ? {
|
|
76
|
+
status: coverage.coverage_status,
|
|
77
|
+
populations: coverage.populations,
|
|
78
|
+
stop_reason: coverage.stop_reason,
|
|
79
|
+
} : null,
|
|
80
|
+
posture,
|
|
66
81
|
};
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
export function renderMarkdownReport({ findings, manifest, summary, detectorsSkipped = [] }) {
|
|
84
|
+
export function renderMarkdownReport({ findings, manifest, summary, detectorsSkipped = [], coverage = null, verifiedRun = null }) {
|
|
85
|
+
// Only the verified loader can establish package integrity. Manifest flags
|
|
86
|
+
// are part of the package input and therefore cannot establish their own
|
|
87
|
+
// trustworthiness when this renderer is called directly.
|
|
88
|
+
const packageVerified = verifiedRun?.verified === true
|
|
89
|
+
&& verifiedRun?.integrity_mode === 'sealed'
|
|
90
|
+
&& typeof verifiedRun?.verification_version === 'string';
|
|
70
91
|
const lines = [];
|
|
71
92
|
lines.push(`# Citable audit report`);
|
|
72
93
|
lines.push('');
|
|
@@ -85,10 +106,18 @@ export function renderMarkdownReport({ findings, manifest, summary, detectorsSki
|
|
|
85
106
|
lines.push(`| Total findings | ${summary.total} |`);
|
|
86
107
|
lines.push(`| Deterministic observations | ${summary.deterministic_observations} |`);
|
|
87
108
|
lines.push(`| Heuristic / semantic findings | ${summary.semantic_or_heuristic} |`);
|
|
109
|
+
if (coverage) {
|
|
110
|
+
lines.push(`| Coverage status | ${coverage.coverage_status} |`);
|
|
111
|
+
lines.push(`| Evaluated resources | ${coverage.populations.evaluated} of ${coverage.populations.discovered - coverage.populations.excluded} eligible |`);
|
|
112
|
+
}
|
|
88
113
|
for (const [sev, n] of Object.entries(summary.by_severity).sort((a, b) => SEV_ORDER[a[0]] - SEV_ORDER[b[0]])) {
|
|
89
114
|
lines.push(`| ${sev} | ${n} |`);
|
|
90
115
|
}
|
|
91
116
|
lines.push('');
|
|
117
|
+
if (coverage && coverage.coverage_status !== 'complete') {
|
|
118
|
+
lines.push(`> Coverage status: **${coverage.coverage_status}**. This report describes the observed corpus and does not establish a complete site-wide determination.`);
|
|
119
|
+
lines.push('');
|
|
120
|
+
}
|
|
92
121
|
lines.push('## Separate eligibility and observation states');
|
|
93
122
|
lines.push('');
|
|
94
123
|
lines.push('| Dimension | Result | Evidence |');
|
|
@@ -132,8 +161,26 @@ export function renderMarkdownReport({ findings, manifest, summary, detectorsSki
|
|
|
132
161
|
lines.push('');
|
|
133
162
|
}
|
|
134
163
|
if (findings.length === 0) {
|
|
135
|
-
|
|
164
|
+
const population = coverage?.populations?.evaluated ?? 0;
|
|
165
|
+
lines.push(population > 0
|
|
166
|
+
? `No findings were produced for the ${population} successfully evaluated resource(s). Absence of findings is not proof of eligibility — see skipped and incomplete checks above.`
|
|
167
|
+
: evidenceScopeStatement({
|
|
168
|
+
coverage_status: coverage?.coverage_status || 'indeterminate',
|
|
169
|
+
determination_status: summary?.posture?.source_extraction_and_support?.result === 'pass' ? 'supported' : 'indeterminate',
|
|
170
|
+
evaluated: 0,
|
|
171
|
+
eligible: coverage?.populations?.eligible ?? 0,
|
|
172
|
+
legacy: !coverage,
|
|
173
|
+
}));
|
|
136
174
|
lines.push('');
|
|
137
175
|
}
|
|
138
|
-
|
|
176
|
+
const rendered = lines.join('\n');
|
|
177
|
+
assertEpistemicLanguage(rendered, {
|
|
178
|
+
coverage_status: coverage?.coverage_status || 'indeterminate',
|
|
179
|
+
determination_status: coverage?.coverage_status === 'complete' ? 'supported' : 'indeterminate',
|
|
180
|
+
evaluated: coverage?.populations?.evaluated ?? 0,
|
|
181
|
+
eligible: coverage?.populations?.eligible ?? 0,
|
|
182
|
+
package_verified: packageVerified,
|
|
183
|
+
legacy: verifiedRun?.legacy === true || !coverage,
|
|
184
|
+
});
|
|
185
|
+
return rendered;
|
|
139
186
|
}
|