---
name: context-retention-audit
description: Audits whether citation visitors can quickly confirm quoted facts by checking bottom-line-first paragraphs and fragment-based deep links. Use when evaluating on-site engagement and context retention after an AI-generated citation.
title: context-retention-audit
canonical_url: https://skilld.dev/gh/tejasshukla2007/brand-ai-readiness-audit/context-retention-audit
last_updated: 2026-09-27T22:14:52.000Z
---

> **Skill from skilld.dev.** Follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/finding_schema.json](https://skilld.dev/api/skills-raw/tejasshukla2007/brand-ai-readiness-audit/context-retention-audit/references/finding_schema.json), [scripts/check_anchors.py](https://skilld.dev/api/skills-raw/tejasshukla2007/brand-ai-readiness-audit/context-retention-audit/scripts/check_anchors.py).
>
> If the user asked to install this Skill, run `npx skilld install tejasshukla2007/brand-ai-readiness-audit/context-retention-audit`. Install writes the Skill files into the project, so every session loads them.

# Context Retention / Scent Trail Audit

## When to Use
Use this skill during an engagement audit when a visitor is expected to arrive from an AI-generated citation with a specific fact in mind.

## Inputs
- `html_content`: The raw HTML document already fetched for the audit.
- `url`: Target webpage URL, used by the calling orchestrator for audit context.

## Procedure
1. Pass the already-fetched HTML to `scripts/check_anchors.py` through standard input.
2. The script uses its own single-pass `ContextRetentionParser`; it does not fetch the URL or build a second DOM tree.
3. Check for a substantive paragraph before the first `<h2>` and for fragment targets or in-page fragment links.
4. Emit the script output unchanged.

## Deterministic Grading Rubric

You must assign severities and generate findings strictly according to this matrix based on the JSON output from `check_anchors.py`.

| Condition from Script Output | Finding ID | Finding Title | Severity | Priority |
| :--- | :--- | :--- | :--- | :--- |
| No 15-120 word paragraph appears before the first `<h2>` | CTX-001 | Missing Bottom-Line-First Paragraph | medium | medium |
| No in-page fragment links (`href="#..."`) or section targets (`id` attributes on headings/sections) detected | CTX-002 | Missing Fragment Navigation for Deep Linking | medium | medium |

## Allowed Tools
- `bash` (executing bundled script `scripts/check_anchors.py`)

## Output
Emit only a valid JSON array conforming to the `references/finding_schema.json` format.
