Internal Linking Stinger
Forge status: stages 1-6 complete (Topic, Research, Distillation, References, Guides, final authorship). Stage 7 (registration/deployment sync) has not run. Every factual claim below traces to references/research/raw/ via the distillation at references/research/distilled-internal-linking.md; the two structural exceptions are the composite anchor-scoring weights and the URL-to-slug matching heuristic in references/scripts/link-graph.py, both explicitly flagged as this Stinger's own engineering judgment calls in that script's docstring, not sourced numbers.
You are equipping internal-linking-worker-bee, part of the Website
Auditor by Legion Code Inc. plugin. Full scope and acceptance criteria:
prd-011-internal-linking.
This pair's research archive is unusually deep for this plugin: five raw
sources specifically on link-graph mechanics (graph-theoretic methodology,
a practitioner audit checklist, PageRank-mechanics worked math with
concrete thresholds, and an anchor-text-quality rubric), plus two
tangential sources retained for narrow, explicitly-scoped relevance. Use
that depth. Do not fall back to generic "check your internal links" advice
when the archive gives you BFS mechanics, a real power-iteration formula,
and a four-dimension anchor rubric to apply instead.
Purpose
Build a directed internal link graph from site-data/ (already crawled,
read-only) and produce the run's 03-seo/internal-linking.md sub-audit:
which pages are orphaned, how many clicks from a defined entry-point set
every page sits at, how strong each page's inbound anchor-text signal is
(and whether any anchor text is cannibalized across destinations), and how
link equity is structurally distributed across the site via an
internal-PageRank-style proxy. Also produces a short deep-linking handoff
summary for technical-seo-worker-bee so that Bee does not re-derive the
graph.
When to use
- Wave W5 of every audit run, once
site-crawler-worker-bee has finished
writing site-data/
- Any time a downstream Bee (
technical-seo-worker-bee,
audit-scoring-worker-bee) needs a link-graph fact and should read this
Stinger's output rather than re-deriving it
- Diagnosing why an important page is not ranking or not getting indexed
when the cause might be structural (buried too deep, orphaned, starved
of equity) rather than a content problem
When not to use
- Crawling the site or fetching a page not already in
site-data/. This
Stinger never crawls; that is site-crawler-worker-bee's job
(PRD-007). A link pointing outside site-data/ is reported as
external or uncrawled, never fetched.
- Judging copy quality, reading level, or ICP relevancy of a page's
content. That is
content-semantics-stinger's scope.
- Judging external backlink profile or off-site authority. The equity
computation here is internal-graph-only by construction (see guide 4);
it explicitly excludes external backlinks.
- Re-deriving the full internal link graph inside
technical-seo-worker-bee's
deep-linking sub-check. Read this Stinger's handoff summary instead.
Procedure
- Confirm
site-data/ is populated (read-only), then build the graph and
compute every metric in one deterministic pass via
references/scripts/link-graph.py. See
guides/01-graph-construction-and-orphan-detection.md.
- Cross-reference the script's orphan candidates against every other
known-URL source available to the run and classify each by reachability
state before recommending a fix; report dead-ends as a separate, less
severe finding. See
guides/01-graph-construction-and-orphan-detection.md.
- Define the entry-point set explicitly (never homepage-only by default)
and interpret the BFS click-depth output, including path diversity and
unreachable pages, against the site's own navigation philosophy. See
guides/02-click-depth-bfs.md.
- Score every page's inbound anchor-text profile across the four cited
dimensions (generic ratio, diversity, topical relevance, length), both
all-inbound and contextual-only, and resolve any anchor-text
cannibalization found. See
guides/03-anchor-text-scoring.md.
- Interpret the internal-PageRank-style equity distribution: classify
every page, compute the Gini-coefficient distribution shape, and state
the computation's explicit boundary (no external backlinks, no
link-context quality, no history, not Google's real ranking layers)
every time this section is used. See
guides/04-link-equity-pagerank.md.
- Assemble
03-seo/internal-linking.md from
references/templates/internal-linking-report-template.md, fill the
findings-register rows with the mandatory numeric value, evidence
pointer, and one-line justification per row, log any
rejected/reframed candidate, and produce the deep-linking handoff
summary for technical-seo-worker-bee. See
guides/05-report-assembly-and-handoff.md.
References map
references/research/distilled-internal-linking.md, load when a claim
needs verification, a specific threshold's provenance needs checking, or
a dispute needs settling. This is the single most load-bearing file in
this Stinger; it names exactly which numbers are single-vendor
heuristics versus corroborated across sources.
references/research/raw/, load when tracing a distilled claim back to
its primary source, or when the distillation's citation feels thin and
you want the original context.
references/scripts/link-graph.py, run once per audit after
site-data/ is complete; do not hand-compute BFS depth, anchor scores,
or PageRank-style equity, this script exists so those numbers are
reproducible. Its docstring carries the full grounding note per number
it produces, including which two things (composite-score weights,
URL-to-slug matching) are this Stinger's own judgment call rather than a
sourced figure.
references/templates/internal-linking-report-template.md, load when
assembling 03-seo/internal-linking.md; mirrors the script's JSON
output field for field.
references/templates/edge-record-template.md, load when inspecting or
hand-verifying a specific edge rather than the full graph.
references/templates/deep-linking-handoff-summary-template.md, load
when producing the summary technical-seo-worker-bee reads instead of
re-deriving the graph.
guides/01-graph-construction-and-orphan-detection.md through
guides/05-report-assembly-and-handoff.md, load in order for a full
pass; each maps to one section of the report template.
Related bees and stingers
- content-semantics-stinger - Subjective
copy interpretation and reading-level scoring for the same crawled page
set. Runs alongside this Stinger in wave W5; the two do not overlap in
scope (content quality vs. link structure) and neither duplicates the
other's output.
- technical-seo-stinger - Owns the run's
broader technical-SEO sub-audit, including a deep-linking sub-check that
reads this Stinger's handoff summary rather than re-deriving the graph.
- icp-positioning-stinger - Owns the run's
ICP and conversion-action taxonomy, referenced (not duplicated) when
this Stinger judges which under-served pages are "important per
strategy" in the equity-flow section.
- site-crawler-stinger - Produces the
site-data/ this Stinger reads read-only. This Stinger never crawls;
if site-data/ is incomplete or missing, that is a site-crawler
dependency gap, not something to work around here.
- internal-linking-worker-bee -
this Stinger's paired Bee.
Critical Directive
- You must read all files and context contained within your skill.
- In the event your core knowledge does not provide sufficient guidance you must make every attempt to search the internet, related knowledge base documentation files, and other available resources to supplement your knowledge prior to proceeding with your task.
- Additional related skills can be found here:
Ship Gate
Ship Gate removed: research-only stinger, produces no committable code.
This Stinger's output is a findings report (03-seo/internal-linking.md)
written to the target audit workspace outside this repository; it never
proposes a diff or a commit to this plugin's own tracked source, so the
security-stinger / quality-stinger / github-repo-health-stinger close-out
sequence does not apply.
1---2name: internal-linking-stinger3description: Internal link-graph analysis: orphan-page detection, click-depth via BFS, four-dimension anchor-text scoring plus cannibalization detection, internal-PageRank-style equity flow. Wave W5.4license: AGPL-3.0-only5---67# Internal Linking Stinger89> **Forge status:** stages 1-6 complete (Topic, Research, Distillation, References, Guides, final authorship). Stage 7 (registration/deployment sync) has not run. Every factual claim below traces to `references/research/raw/` via the distillation at `references/research/distilled-internal-linking.md`; the two structural exceptions are the composite anchor-scoring weights and the URL-to-slug matching heuristic in `references/scripts/link-graph.py`, both explicitly flagged as this Stinger's own engineering judgment calls in that script's docstring, not sourced numbers.1011You are equipping **internal-linking-worker-bee**, part of the Website12Auditor by Legion Code Inc. plugin. Full scope and acceptance criteria:13[prd-011-internal-linking](../../library/requirements/backlog/prd-011-internal-linking/prd-011-internal-linking-index.md).1415This pair's research archive is unusually deep for this plugin: five raw16sources specifically on link-graph mechanics (graph-theoretic methodology,17a practitioner audit checklist, PageRank-mechanics worked math with18concrete thresholds, and an anchor-text-quality rubric), plus two19tangential sources retained for narrow, explicitly-scoped relevance. Use20that depth. Do not fall back to generic "check your internal links" advice21when the archive gives you BFS mechanics, a real power-iteration formula,22and a four-dimension anchor rubric to apply instead.2324## Purpose2526Build a directed internal link graph from `site-data/` (already crawled,27read-only) and produce the run's `03-seo/internal-linking.md` sub-audit:28which pages are orphaned, how many clicks from a defined entry-point set29every page sits at, how strong each page's inbound anchor-text signal is30(and whether any anchor text is cannibalized across destinations), and how31link equity is structurally distributed across the site via an32internal-PageRank-style proxy. Also produces a short deep-linking handoff33summary for `technical-seo-worker-bee` so that Bee does not re-derive the34graph.3536## When to use3738- Wave W5 of every audit run, once `site-crawler-worker-bee` has finished39 writing `site-data/`40- Any time a downstream Bee (`technical-seo-worker-bee`,41 `audit-scoring-worker-bee`) needs a link-graph fact and should read this42 Stinger's output rather than re-deriving it43- Diagnosing why an important page is not ranking or not getting indexed44 when the cause might be structural (buried too deep, orphaned, starved45 of equity) rather than a content problem4647## When not to use4849- Crawling the site or fetching a page not already in `site-data/`. This50 Stinger never crawls; that is `site-crawler-worker-bee`'s job51 (PRD-007). A link pointing outside `site-data/` is reported as52 external or uncrawled, never fetched.53- Judging copy quality, reading level, or ICP relevancy of a page's54 content. That is `content-semantics-stinger`'s scope.55- Judging external backlink profile or off-site authority. The equity56 computation here is internal-graph-only by construction (see guide 4);57 it explicitly excludes external backlinks.58- Re-deriving the full internal link graph inside `technical-seo-worker-bee`'s59 deep-linking sub-check. Read this Stinger's handoff summary instead.6061## Procedure62631. Confirm `site-data/` is populated (read-only), then build the graph and64 compute every metric in one deterministic pass via65 `references/scripts/link-graph.py`. See66 `guides/01-graph-construction-and-orphan-detection.md`.672. Cross-reference the script's orphan candidates against every other68 known-URL source available to the run and classify each by reachability69 state before recommending a fix; report dead-ends as a separate, less70 severe finding. See `guides/01-graph-construction-and-orphan-detection.md`.713. Define the entry-point set explicitly (never homepage-only by default)72 and interpret the BFS click-depth output, including path diversity and73 unreachable pages, against the site's own navigation philosophy. See74 `guides/02-click-depth-bfs.md`.754. Score every page's inbound anchor-text profile across the four cited76 dimensions (generic ratio, diversity, topical relevance, length), both77 all-inbound and contextual-only, and resolve any anchor-text78 cannibalization found. See `guides/03-anchor-text-scoring.md`.795. Interpret the internal-PageRank-style equity distribution: classify80 every page, compute the Gini-coefficient distribution shape, and state81 the computation's explicit boundary (no external backlinks, no82 link-context quality, no history, not Google's real ranking layers)83 every time this section is used. See `guides/04-link-equity-pagerank.md`.846. Assemble `03-seo/internal-linking.md` from85 `references/templates/internal-linking-report-template.md`, fill the86 findings-register rows with the mandatory numeric value, evidence87 pointer, and one-line justification per row, log any88 rejected/reframed candidate, and produce the deep-linking handoff89 summary for `technical-seo-worker-bee`. See90 `guides/05-report-assembly-and-handoff.md`.9192## References map9394- `references/research/distilled-internal-linking.md`, load when a claim95 needs verification, a specific threshold's provenance needs checking, or96 a dispute needs settling. This is the single most load-bearing file in97 this Stinger; it names exactly which numbers are single-vendor98 heuristics versus corroborated across sources.99- `references/research/raw/`, load when tracing a distilled claim back to100 its primary source, or when the distillation's citation feels thin and101 you want the original context.102- `references/scripts/link-graph.py`, run once per audit after103 `site-data/` is complete; do not hand-compute BFS depth, anchor scores,104 or PageRank-style equity, this script exists so those numbers are105 reproducible. Its docstring carries the full grounding note per number106 it produces, including which two things (composite-score weights,107 URL-to-slug matching) are this Stinger's own judgment call rather than a108 sourced figure.109- `references/templates/internal-linking-report-template.md`, load when110 assembling `03-seo/internal-linking.md`; mirrors the script's JSON111 output field for field.112- `references/templates/edge-record-template.md`, load when inspecting or113 hand-verifying a specific edge rather than the full graph.114- `references/templates/deep-linking-handoff-summary-template.md`, load115 when producing the summary `technical-seo-worker-bee` reads instead of116 re-deriving the graph.117- `guides/01-graph-construction-and-orphan-detection.md` through118 `guides/05-report-assembly-and-handoff.md`, load in order for a full119 pass; each maps to one section of the report template.120121## Related bees and stingers122123- [content-semantics-stinger](../content-semantics-stinger) - Subjective124 copy interpretation and reading-level scoring for the same crawled page125 set. Runs alongside this Stinger in wave W5; the two do not overlap in126 scope (content quality vs. link structure) and neither duplicates the127 other's output.128- [technical-seo-stinger](../technical-seo-stinger) - Owns the run's129 broader technical-SEO sub-audit, including a deep-linking sub-check that130 reads this Stinger's handoff summary rather than re-deriving the graph.131- [icp-positioning-stinger](../icp-positioning-stinger) - Owns the run's132 ICP and conversion-action taxonomy, referenced (not duplicated) when133 this Stinger judges which under-served pages are "important per134 strategy" in the equity-flow section.135- [site-crawler-stinger](../site-crawler-stinger) - Produces the136 `site-data/` this Stinger reads read-only. This Stinger never crawls;137 if `site-data/` is incomplete or missing, that is a `site-crawler`138 dependency gap, not something to work around here.139- [internal-linking-worker-bee](../../agents/internal-linking-worker-bee.md) -140 this Stinger's paired Bee.141142## Critical Directive143144- You must read all files and context contained within your skill.145- In the event your core knowledge does not provide sufficient guidance you must make every attempt to search the internet, related knowledge base documentation files, and other available resources to supplement your knowledge prior to proceeding with your task.146- Additional related skills can be found here:147 - [technical-seo-stinger](../technical-seo-stinger) - Deep-linking sub-check consumer of this Stinger's handoff summary.148 - [content-semantics-stinger](../content-semantics-stinger) - Sibling wave-W5 Stinger, subjective copy quality rather than link structure.149 - [icp-positioning-stinger](../icp-positioning-stinger) - ICP and conversion-action taxonomy referenced when judging "important per strategy" pages.150151## Ship Gate152153Ship Gate removed: research-only stinger, produces no committable code.154This Stinger's output is a findings report (`03-seo/internal-linking.md`)155written to the target audit workspace outside this repository; it never156proposes a diff or a commit to this plugin's own tracked source, so the157security-stinger / quality-stinger / github-repo-health-stinger close-out158sequence does not apply.