@softspark/ai-toolkit 4.0.1 → 4.2.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/AGENTS.md CHANGED
@@ -348,7 +348,7 @@ Security expert. Use for OWASP Top 10, CVE analysis, security audits, penetratio
348
348
 
349
349
  ### `seo-specialist`
350
350
 
351
- Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews
351
+ Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews, topical authority, chunk architecture, semantic triples, query fan out
352
352
 
353
353
  **Tools:** `Read, Write, Edit, Bash, Grep, Glob`
354
354
 
@@ -436,7 +436,7 @@ Specialized agent personas — apply their expertise for relevant tasks:
436
436
  - **search-specialist**: Information retrieval and search optimization specialist. Trigger words: search, query, semantic search, information retrieval, relevance, ranking, search optimization
437
437
  - **security-architect**: Proactive security design expert. Use for Threat Modeling, architecture security reviews, and designing secure systems (AuthN/AuthZ, Crypto).
438
438
  - **security-auditor**: Security expert. Use for OWASP Top 10, CVE analysis, security audits, penetration testing, vulnerability assessment, hardening. Triggers: security, owasp, cve, vulnerability, audit, hardening, penetration, pentest, injection test, api security.
439
- - **seo-specialist**: Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews
439
+ - **seo-specialist**: Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews, topical authority, chunk architecture, semantic triples, query fan out
440
440
  - **system-governor**: The Guardian of the Constitution. Validates all evolutionary changes and enforces immutable rules. Has VETO power.
441
441
  - **tech-lead**: Technical authority for code quality, architecture patterns, and stack decisions. Use for code reviews, technological disputes, and standards enforcement.
442
442
  - **technical-researcher**: Deep technical investigation and multi-source research synthesis specialist. Trigger words: technical research, feasibility study, root cause analysis, API investigation, compatibility research, comparison matrix, synthesize, aggregate, report, executive summary, gap analysis, findings, multi-source, cross-reference
package/CHANGELOG.md CHANGED
@@ -7,6 +7,70 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.2.0 - SEO GEO pipeline and release gate hardening (2026-05-07)
11
+
12
+ Minor release. Adds AI pipeline, content citability, and topical authority guidance to `seo-validate` from PR #9 by @fakenso, and keeps the release gate fixes prepared for v4.1.1 in the same unreleased train.
13
+
14
+ ### Added
15
+
16
+ - **SEO AI pipeline reference** - Added `app/skills/seo-validate/reference/ai-pipeline.md` covering the Prepare/Retrieve/Signal/Serve pipeline, ranking signals, Query Fan Out, and format routing.
17
+ - **Content citability reference** - Added `app/skills/seo-validate/reference/content-citability.md` covering chunk architecture, semantic triples, hedging patterns, decision frameworks, contrast patterns, negative definitions, freshness, and E-E-A-T.
18
+ - **Topical authority scope** - Added `--scope topical` to `seo-validate`, with checks for pillar/cluster structure, internal link density, generic anchors, orphan pages, ID-based slugs, and keyword cannibalization.
19
+ - **Expanded GEO guidance** - Expanded Category 6 from INFO-only guidance to INFO/WARN heuristics for chunk boundaries, author quality, and freshness. Updated `seo-specialist` with AI pipeline, multi-platform SEO, and topical authority responsibilities.
20
+
21
+ ### Fixed
22
+
23
+ - **URL rule registration test** - Replaced the live `raw.githubusercontent.com` dependency with a local fixture path guarded by `AI_TOOLKIT_TEST_MODE=1`, keeping production URL fetching HTTPS-only while making the full Bats suite hermetic.
24
+ - **Release validation gate** - Updated CI and `prepublishOnly` to run `python3 scripts/validate.py --strict`, matching the release preparation SOP.
25
+
26
+ ### Verification
27
+
28
+ - `npm test`: 1047/1047 passing.
29
+ - `python3 scripts/validate.py --strict`: 0 errors, 0 warnings.
30
+ - `python3 scripts/audit_skills.py --ci`: HIGH 0, WARN 0.
31
+ - `python3 scripts/evaluate_skills.py`: 107/107 passing.
32
+
33
+ ---
34
+
35
+ ## v4.1.0 — Default `output-mode: concise` propagated to all editors (2026-05-06)
36
+
37
+ Minor release. Adds a global `output-mode: concise` directive that propagates to every editor config produced by ai-toolkit. Reduces token usage and removes preamble/filler from assistant responses across Claude Code, Cursor, Windsurf, Cline, Roo Code, Augment, Codex, Antigravity, GitHub Copilot, Gemini CLI, and Aider.
38
+
39
+ ### Added
40
+
41
+ - **`app/rules/output-mode.md`** — auto-injected into `~/.claude/CLAUDE.md` (global) and project-local `CLAUDE.md` via the existing `inject_rules()` mechanism on every `ai-toolkit install` / `ai-toolkit update`.
42
+ - **`rule_output_mode()` in `scripts/dir_rules_shared.py`** — registered in `STANDARD_RULES`, so directory-based generators (Cursor `.mdc`, Windsurf, Cline, Roo, Augment, Codex, Antigravity) emit a dedicated `ai-toolkit-output-mode.md` file alongside the other six standard rules.
43
+ - **Output Mode block in `scripts/generator_base.render_generator()`** — single-file editor outputs (`GEMINI.md`, `.github/copilot-instructions.md`, `.cursorrules`, Aider `CONVENTIONS.md`) now include the directive between TOOLKIT markers.
44
+
45
+ ### Directives
46
+
47
+ The `concise` mode applies these rules to assistant responses:
48
+
49
+ - No preamble — skip "I'll now…", "Sure, let me…", "Great question!"
50
+ - Lead with the result; explanation only if asked or non-obvious.
51
+ - Max 3 sentences per closed question.
52
+ - Tables and lists over prose for comparisons, steps, values.
53
+ - No trailing summaries when the diff or output already shows what changed.
54
+ - Drop filler adjectives ("nice", "great", "powerful", "robust").
55
+ - Cite as `path:line`, not paragraphs of location prose.
56
+ - Escalate to verbose only for architecture / RFC / ADR / trade-off documents or explicit user request.
57
+
58
+ ### Changed
59
+
60
+ - **Standard rule count for directory-based generators: 6 → 7**. Tests updated: `tests/test_generators.bats` (count assertions in two cases bumped from 6/8 to 7/9).
61
+
62
+ ### How to opt out
63
+
64
+ - Per-session: `/brand-voice default` (or `/brand-voice strict` for tighter)
65
+ - Per-project: edit `output-mode:` value in project's `CLAUDE.md` or strip the `<!-- TOOLKIT:output-mode -->` block manually
66
+ - Re-install without rules: `ai-toolkit install --skip rules`
67
+
68
+ ### Why
69
+
70
+ User feedback after v4.0.x consolidation: asked for a hook-like mechanism to enforce concise responses. The `brand-voice` skill already had `concise`/`strict` modes (shipped v3.2.0) but activation required per-project opt-in. This release flips the default to opt-out — every editor that consumes ai-toolkit configs now sees the directive immediately after install/update.
71
+
72
+ ---
73
+
10
74
  ## v4.0.1 — CI hotfix: README "What You Get" table counts (2026-05-06)
11
75
 
12
76
  Patch release. Fixes CI failure on v4.0.0 main branch — three `tests/test_metadata_contracts.bats` cases failed because the `What You Get` table in `README.md` and the skill type table in `kb/reference/architecture-overview.md` still referenced pre-consolidation counts (32 task / 32 hybrid / 48 knowledge).
package/README.md CHANGED
@@ -14,28 +14,14 @@
14
14
 
15
15
  ---
16
16
 
17
- ## What's New in v4.0.1
17
+ ## What's New in v4.2.0
18
18
 
19
- CI hotfix for v4.0.0. Corrects skill subtype counts in `README.md` "What You Get" table and `kb/reference/architecture-overview.md` (hybrid 32 → 30, knowledge 48 → 45). The metadata contract tests caught the drift on CI; v4.0.0 release path missed three count locations. No skill catalog changes — see v4.0.0 below for the actual consolidation.
19
+ SEO/GEO release focused on AI citation readiness and stricter release gates.
20
20
 
21
- ## What's New in v4.0.0
22
-
23
- **Breaking release.** Skill catalog consolidated from 112 107: removes 5 redundant skills, merges their substantive knowledge into the surviving targets. Eliminates `/skills` truncation and removes overlap that confused agent dispatch.
24
-
25
- - **`/search` removed** — `/research-mastery` is the superset (KB → MCP/Context7 → web with hierarchy of truth). Local Grep/Glob fallback is now part of `/research-mastery`.
26
- - **`/teams` removed** — `/workflow` covers the same scenarios without the experimental `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` flag.
27
- - **`plan-writing` knowledge skill removed** — estimation patterns (T-shirt sizing, cone of uncertainty) and pre-mortem rules are now part of `/plan`.
28
- - **`debugging-tactics` knowledge skill removed** — Iron Law, 4-phase methodology, and "5 Whys" are now part of `/debug`.
29
- - **`hive-mind` knowledge skill removed** — consensus voting and aggregation merged into `/swarm`.
30
-
31
- ### Migration
32
-
33
- | Before | After |
34
- |--------|-------|
35
- | `/search <query>` | `/research-mastery <query>` |
36
- | `/teams <preset>` | `/workflow <type>` |
37
- | Agent `skills: plan-writing` | Agent `skills: plan` |
38
- | Agent `skills: debugging-tactics` | Agent `skills: debug` |
21
+ - **AI pipeline guidance**: `seo-validate` now includes Google AI pipeline, Query Fan Out, and content citability references.
22
+ - **Topical authority checks**: new `--scope topical` covers cluster structure, internal links, orphan pages, slugs, and cannibalization.
23
+ - **Expanded GEO heuristics**: Category 6 now checks chunk boundaries, hedging, decision frameworks, freshness, and author quality.
24
+ - **Release gate parity**: CI and `prepublishOnly` now run strict validation, and the URL rule test is hermetic.
39
25
 
40
26
  See [CHANGELOG.md](CHANGELOG.md) for full history.
41
27
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-toolkit",
3
3
  "description": "Professional-grade Claude Code toolkit with persona presets, skill security auditor, expanded lifecycle hooks, experimental opt-in plugin packs, benchmark harvesting, and multi-tool support.",
4
- "version": "4.0.1",
4
+ "version": "4.2.0",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seo-specialist
3
- description: "Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews"
3
+ description: "Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews, topical authority, chunk architecture, semantic triples, query fan out"
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  model: sonnet
6
6
  color: cyan
@@ -9,7 +9,7 @@ skills: clean-code, seo-validate
9
9
 
10
10
  # SEO + GEO Specialist
11
11
 
12
- Optimization for both classical search engines AND generative engines (ChatGPT, Claude, Perplexity, Google AI Overviews, Gemini).
12
+ Optimization for both classical search engines AND generative engines (ChatGPT, Claude, Perplexity, Google AI Overviews, Gemini, Google AI Mode).
13
13
 
14
14
  ## Expertise
15
15
  - Technical SEO
@@ -18,6 +18,10 @@ Optimization for both classical search engines AND generative engines (ChatGPT,
18
18
  - Structured data (Schema.org)
19
19
  - SEO auditing
20
20
  - **Generative Engine Optimization (GEO)** — being cited by LLM-based answer engines
21
+ - **Google AI pipeline** — understanding the 4-stage Prepare/Retrieve/Signal/Serve pipeline and 7 ranking signals
22
+ - **Query Fan Out** — 95% of AI retrieval sub-queries have zero MSV; topical coverage matters more than keyword volume
23
+ - **Probabilistic ranking** — no deterministic "position 1"; optimize for citation probability across personas and contexts
24
+ - **Topical authority** — pillar + cluster architecture, orphan page detection, keyword cannibalization
21
25
 
22
26
  ## Responsibilities
23
27
 
@@ -39,6 +43,28 @@ Optimization for both classical search engines AND generative engines (ChatGPT,
39
43
  - Knowledge graph
40
44
  - Breadcrumbs
41
45
 
46
+ ### AI Pipeline Optimization
47
+ - **Chunk architecture** — design each H2 section as a self-contained ~375-word answer unit (≤500 tokens); each H3 is a separate chunk candidate
48
+ - **Semantic triple authoring** — Subject → Predicate → Object factual statements over marketing prose ("toughness: H3, dimensions: 160×200 cm" vs "exceptional quality")
49
+ - **Opinionated content** — clear declarative recommendations over hedged language ("we recommend X for Y" not "X may be worth considering")
50
+ - **Decision frameworks** — "if X → choose Y" constructions, the most-cited AI pattern
51
+ - **Contrast and comparison** — Jetstream signal: explicit "X vs Y", "unlike X, Y does…" patterns boost AI citation probability
52
+ - **Negative definitions** — "not recommended for Z" covers AI exclusion sub-queries
53
+ - **Freshness management** — refresh key pages before the 13-week threshold; update `dateModified` in JSON-LD AND visible text
54
+
55
+ ### Topical Authority & Cluster Design
56
+ - **Pillar + cluster architecture** — one comprehensive pillar page linking to focused cluster articles per topic
57
+ - **Internal linking** — ~1 contextual link per 800 chars, descriptive anchor text (never "click here")
58
+ - **Orphan page detection** — every content page needs at least one inbound internal link
59
+ - **Keyword cannibalization** — identify and consolidate pages competing for the same primary keyword
60
+ - **Natural-language URLs** — 5–7 descriptive words; ID-based slugs lose ~11.4% AI citation rate
61
+
62
+ ### Multi-Platform SEO
63
+ - **Video metadata** — YouTube title, description, and chapters function as SEO signals; shorts/Reels appear in Google SERP carousels
64
+ - **Visual search** — unique product images + contextual alt text for Google Lens and Circle to Search; avoid stock-only imagery
65
+ - **Social SEO** — Reddit, Quora, Wykop presence for Google's Hidden Gems algorithm; authentic participation, not spam
66
+ - **Hook-first video** — first 3 seconds determine retention (Instagram measures it explicitly); no logo intros or "hi, my name is…" openings
67
+
42
68
  ## Technical Checklist
43
69
 
44
70
  ### Meta Tags
@@ -155,13 +181,18 @@ Goal: get cited by ChatGPT, Claude, Perplexity, Gemini, and Google AI Overviews
155
181
 
156
182
  ### GEO audit checklist
157
183
  - [ ] First sentence of every page answers the page's title as a question
184
+ - [ ] Each H2 section is ≤375 words (chunk boundary); longer sections split with H3
185
+ - [ ] No hedging language ("may be", "worth considering", "for many people") in recommendation contexts — replaced with declarative stance
186
+ - [ ] At least one decision framework ("if X → choose Y") per guide or category page
187
+ - [ ] At least one explicit contrast ("X vs Y", "unlike X, Y…") per comparison page
188
+ - [ ] At least one negative definition ("not recommended for…") per product or category page
158
189
  - [ ] At least one comparison table OR numbered list per long-form page
159
- - [ ] Author block with name + role + LinkedIn / GitHub / ORCID
160
- - [ ] Schema.org `Article` with `author`, `datePublished`, `dateModified`
190
+ - [ ] Author block with real name (not "Admin"), role, and ≥30 words of bio
191
+ - [ ] Schema.org `Article` with `author` (`Person` + `sameAs`), `datePublished`, `dateModified`
161
192
  - [ ] Schema.org `FAQPage` for any page with Q/A structure
193
+ - [ ] `dateModified` updated AND visible "Updated: [date]" text present
162
194
  - [ ] `llms.txt` at site root with curated canonical URLs
163
195
  - [ ] Page contains at least 3 unique data points (numbers, dates, version strings)
164
- - [ ] Date visible to the user, not just in metadata
165
196
  - [ ] No paywall / login wall on indexable content
166
197
  - [ ] No JavaScript-only content for primary value (LLM crawlers often skip JS)
167
198
  - [ ] Internal links use claim-as-anchor, not "click here"
@@ -0,0 +1,28 @@
1
+ # Output Mode
2
+
3
+ `output-mode: concise`
4
+
5
+ Default response mode for this project is **concise**. The `brand-voice` skill (when present in ai-toolkit) auto-loads its `concise` rules; assistants without that skill should still apply the directives below.
6
+
7
+ ## Concise Mode Directives
8
+
9
+ - **No preamble.** Skip "I'll now...", "Sure, let me...", "Great question!" and similar warm-ups. Start with the answer.
10
+ - **Lead with the result.** Conclusion or output first; explanation only if asked or non-obvious.
11
+ - **Max 3 sentences per closed question.** Yes/no, single-fact, or "where is X" answers stay under three sentences.
12
+ - **Tables and lists over prose** when comparing options, listing steps, or showing values.
13
+ - **No trailing summaries.** If the diff or output already shows what changed, do not restate it.
14
+ - **Drop filler adjectives.** No "nice", "great", "powerful", "robust" unless the user asked for evaluation.
15
+ - **Cite file paths as `path:line`** instead of paragraphs describing where things live.
16
+ - **Reserve longer prose** for: architecture proposals, trade-off analyses, plans with risks. Everything else: terse.
17
+
18
+ ## When to escalate to verbose
19
+
20
+ - User explicitly asks: "explain in detail", "walk me through", "give me the full picture".
21
+ - Reporting a non-obvious failure mode where missing context would mislead.
22
+ - Architecture / RFC / ADR / trade-off documents — those have their own structure.
23
+
24
+ ## How to override
25
+
26
+ - Per-session: `/brand-voice default` (or `/brand-voice strict` for even tighter)
27
+ - Per-project: change this rule's `output-mode:` value in the project's `CLAUDE.md`
28
+ - Permanent removal: re-run `ai-toolkit install --skip rules` or strip the `<!-- TOOLKIT:output-mode -->` block manually
@@ -6,7 +6,7 @@ effort: medium
6
6
  disable-model-invocation: true
7
7
  context: fork
8
8
  agent: seo-specialist
9
- argument-hint: "[path] [--scope full|technical|content|performance|geo|rendering] [--severity high|warn|info] [--framework auto|next|nuxt|astro|gatsby|sveltekit|remix|angular|vue|react-spa|vite-spa|cra|static] [--rendering auto|csr|ssr|ssg|isr|hybrid] [--output markdown|json]"
9
+ argument-hint: "[path] [--scope full|technical|content|performance|geo|rendering|topical] [--severity high|warn|info] [--framework auto|next|nuxt|astro|gatsby|sveltekit|remix|angular|vue|react-spa|vite-spa|cra|static] [--rendering auto|csr|ssr|ssg|isr|hybrid] [--output markdown|json]"
10
10
  allowed-tools: Read, Grep, Glob, Bash
11
11
  ---
12
12
 
@@ -14,7 +14,7 @@ allowed-tools: Read, Grep, Glob, Bash
14
14
 
15
15
  $ARGUMENTS
16
16
 
17
- Scan a codebase for SEO issues using pattern-matching heuristics. Detects W3C/HTML violations, meta tag gaps, structured data problems, hreflang errors, Core Web Vitals risks (LCP/INP/CLS), resource-hint misuse, above-the-fold anti-patterns, GEO gaps, SPA/CSR/SSG crawlability problems, technical SEO misconfigurations, and accessibility-for-SEO issues. Read-only — never modifies files.
17
+ Scan a codebase for SEO issues using pattern-matching heuristics. Detects W3C/HTML violations, meta tag gaps, structured data problems, hreflang errors, Core Web Vitals risks (LCP/INP/CLS), resource-hint misuse, above-the-fold anti-patterns, GEO gaps (chunk architecture, hedging language, decision frameworks, semantic triples, freshness), topical authority gaps (pillar/cluster structure, orphan pages, cannibalization), SPA/CSR/SSG crawlability problems, technical SEO misconfigurations, and accessibility-for-SEO issues. Read-only — never modifies files.
18
18
 
19
19
  **Standards basis**: W3C HTML5 Recommendation, W3C WCAG 2.2, Schema.org vocabulary, IETF RFC 5646 (BCP 47 language tags) for hreflang, web.dev Core Web Vitals thresholds (LCP <2.5s, INP <200ms, CLS <0.1), Google Search Central crawlability guidelines, and emerging GEO (Generative Engine Optimization) practices.
20
20
 
@@ -26,6 +26,7 @@ Scan a codebase for SEO issues using pattern-matching heuristics. Detects W3C/HT
26
26
  /seo-validate --scope rendering # Only SPA/CSR/SSG crawlability checks
27
27
  /seo-validate --scope performance # Only Core Web Vitals static signals
28
28
  /seo-validate --scope geo # Only GEO (Generative Engine Optimization)
29
+ /seo-validate --scope topical # Only topical authority and cluster architecture
29
30
  /seo-validate --severity high # Filter to HIGH findings only
30
31
  /seo-validate --framework next # Force framework (skip auto-detection)
31
32
  /seo-validate --rendering csr # Force rendering-mode interpretation
@@ -33,12 +34,13 @@ Scan a codebase for SEO issues using pattern-matching heuristics. Detects W3C/HT
33
34
  ```
34
35
 
35
36
  **Scopes:**
36
- - `full` (default) — all 9 categories
37
+ - `full` (default) — all 10 categories
37
38
  - `technical` — HTML semantics, hreflang, CWV, rendering, technical SEO (categories 1, 4, 5, 7, 8)
38
39
  - `content` — meta/OG, structured data, GEO, a11y-for-SEO (categories 2, 3, 6, 9)
39
40
  - `performance` — only CWV static signals (category 5)
40
- - `geo` — only GEO (category 6)
41
+ - `geo` — only GEO / citability checks (category 6)
41
42
  - `rendering` — only category 7 (SPA/CSR/SSG crawlability) — useful for migration audits
43
+ - `topical` — only topical authority and cluster architecture (category 10)
42
44
 
43
45
  **Severity filtering:** `--severity high` shows only HIGH, `--severity warn` shows HIGH+WARN, `--severity info` shows all. Default: all.
44
46
 
@@ -273,20 +275,30 @@ See: [reference/core-web-vitals.md](reference/core-web-vitals.md)
273
275
 
274
276
  ### Category 6: GEO (Generative Engine Optimization)
275
277
 
276
- Content structure for AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Bing Copilot). **All findings here are severity `INFO`** — emerging practice, not penalty-causing.
278
+ Content structure for AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Bing Copilot, Google AI Mode). **Most findings here are severity `INFO` or `WARN`** — guidance based on measured citation patterns, not penalty-causing.
279
+
280
+ Google's retrieval stage splits content into chunks of ≤500 tokens (~375 words). Each section must be a self-contained answer unit. See [reference/ai-pipeline.md](reference/ai-pipeline.md) for the full 4-stage pipeline and 7 ranking signals. See [reference/content-citability.md](reference/content-citability.md) for chunk anatomy, semantic triples, and hedging patterns.
277
281
 
278
282
  | Pattern | Severity | Confidence | Description |
279
283
  |---------|----------|------------|-------------|
280
284
  | No `FAQPage` schema on FAQ-style content | INFO | heuristic | Highly extractable by LLMs |
281
285
  | No `speakable` schema on summary content | INFO | heuristic | Voice/audio answer engines |
282
- | Long paragraphs (>400 words) without sub-headings | INFO | heuristic | Harder for LLMs to extract |
286
+ | H2 section body exceeds ~375 words without an H3 sub-heading | WARN | heuristic | Exceeds single chunk boundary (~500 tokens); AI cannot extract cleanly — split with H3 |
287
+ | First paragraph under a heading exceeds 60 words before a concrete fact, number, or direct recommendation | INFO | heuristic | AI extracts first 2–3 sentences as the answer; preamble displaces the answer |
288
+ | Hedging language in recommendation or product context: "may be", "might be", "could be", "worth considering", "for many", "for most people" | INFO | heuristic | AI skips hedged claims; Jetstream signal rewards declarative recommendations (see [content-citability.md](reference/content-citability.md)) |
289
+ | No decision framework ("if X → choose Y" / "for X, use Y") in guide or category content | INFO | heuristic | Decision frameworks are the most-cited AI construction; covers Jetstream cross-attention signal |
290
+ | No contrast or comparison ("X vs Y", "unlike X", "in contrast to X") in content with comparative headings | INFO | heuristic | Jetstream directly rewards explicit contrasts; absence reduces AI citation probability |
291
+ | No negative definition ("not recommended for", "not suitable for", "avoid if") on product or category pages | INFO | heuristic | Covers AI exclusion sub-queries ("which product is not for stomach sleepers?") |
292
+ | Author name uses generic placeholder: "Admin", "Team", "Staff", "Editor", or no author at all | WARN | heuristic | E-E-A-T Experience signal requires a real named author; generic names suppressed by Google Bury Rules |
293
+ | Author block contains fewer than 30 words of bio text near the author name | INFO | heuristic | LLM answer engines use author credentials as an authority signal; stub bios do not qualify |
294
+ | Article `dateModified` (JSON-LD or `<time>`) is older than 13 weeks with no visible update notice | WARN | heuristic | 50% of top AI-cited content updated within 13 weeks (Blyskall, 40M AI Overviews study); stale content drops from citation pools |
283
295
  | Missing explicit citation/source markup (`<cite>`, author bylines) | INFO | heuristic | LLM answer engines prefer attributable sources |
284
296
  | No `<q>` or quote schema on quoted content | INFO | heuristic | Aids AI extraction |
285
297
  | No Q&A structure on how-to content | INFO | heuristic | LLMs favor structured Q&A |
286
298
  | Heavy reliance on `<div>` over semantic HTML | INFO | heuristic | Semantic HTML improves AI parsing |
287
299
  | Key facts hidden behind JS interactions (tabs, accordions) | INFO | heuristic | LLMs see initial DOM only |
288
300
 
289
- See: [reference/geo-guidelines.md](reference/geo-guidelines.md)
301
+ See: [reference/geo-guidelines.md](reference/geo-guidelines.md), [reference/content-citability.md](reference/content-citability.md), [reference/ai-pipeline.md](reference/ai-pipeline.md)
290
302
 
291
303
  ---
292
304
 
@@ -385,6 +397,23 @@ Accessibility ↔ SEO overlap. WCAG compliance improves ranking signals.
385
397
 
386
398
  ---
387
399
 
400
+ ### Category 10: Topical Authority & Cluster Architecture
401
+
402
+ Topical authority is the degree to which a domain is recognised as an expert source across an entire topic, not just individual pages. AI retrieval (Gecko Score / semantic embedding) rewards domains with deep, interlinked coverage. Classical SEO also benefits — Senuto's study of 212K phrases across 7,200 semantic groups showed topical coverage dominates top-10 rankings independently of individual technical metrics.
403
+
404
+ | Pattern | Severity | Confidence | Description |
405
+ |---------|----------|------------|-------------|
406
+ | Long-form page (>800 words) has internal link density below 1 link per 800 characters of body text | WARN | heuristic | Google's internal linking guideline: ~1 contextual internal link per 800 chars; low density = weak cluster signal |
407
+ | Internal link uses generic anchor text: "click here", "read more", "here", "this page", "learn more" | WARN | definitive | Anchor text is a topical signal; descriptive claim-based anchors transfer semantic context to the linked page |
408
+ | Page >2,000 words with no outbound internal links to topically related pages | INFO | heuristic | Pillar pages must link out to cluster articles; absence breaks the pillar→cluster signal and reduces Gecko relevance |
409
+ | Page has >500 words of indexable content with zero detected inbound internal links (orphan page) | WARN | heuristic | Orphan pages receive minimal crawl budget and no authority pass-through; every content page needs at least one inbound link |
410
+ | Content page URL slug contains numeric IDs, UUIDs, or is purely numeric (e.g., `/post/12345`, `/p/abc-uuid`) | WARN | heuristic | Natural-language slugs (5–7 descriptive words) show +11.4% AI citation rate vs. ID-based URLs (Blyskall study) |
411
+ | Two or more pages on the same domain target the same primary keyword in H1 and title | WARN | heuristic | Keyword cannibalization: pages compete against each other, diluting authority; consolidate into pillar + cluster |
412
+
413
+ **Topical authority strategy note:** Query Fan Out means AI generates 50+ sub-queries per user question, 95% of which have zero Monthly Search Volume in any keyword tool. Covering a topic with a pillar + cluster architecture answers the full sub-query space that keyword tools cannot see. See [reference/ai-pipeline.md](reference/ai-pipeline.md).
414
+
415
+ ---
416
+
388
417
  ## Output Format
389
418
 
390
419
  ```markdown
@@ -393,7 +422,7 @@ Accessibility ↔ SEO overlap. WCAG compliance improves ranking signals.
393
422
  ### Summary
394
423
  | Metric | Value |
395
424
  |--------|-------|
396
- | Scope | full / technical / content / performance / geo / rendering |
425
+ | Scope | full / technical / content / performance / geo / rendering / topical |
397
426
  | Framework detected | next / nuxt / astro / gatsby / sveltekit / remix / angular / vue / react-spa / vite-spa / cra / static |
398
427
  | Rendering mode | csr / ssr / ssg / isr / hybrid |
399
428
  | Files scanned | N |
@@ -445,7 +474,7 @@ See: reference/spa-ssg-patterns.md#react-spa-migration
445
474
  - **Standards citation**: Every HIGH/WARN finding must cite a W3C/Schema.org/RFC/web.dev reference.
446
475
  - **Skip non-source files**: Binary files, lock files (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`), vendored directories (`node_modules/`, `vendor/`, `.git/`, `dist/`, `build/`, `out/`, `.next/`, `.nuxt/`, `.svelte-kit/`, `public/build/`).
447
476
  - **No false confidence**: Label heuristic findings clearly; above-the-fold detection is always heuristic.
448
- - **GEO is INFO-only**: Never flag GEO findings as HIGH/WARN — it is emerging practice.
477
+ - **GEO severity**: Category 6 findings may be WARN (chunk size, author quality, freshness) or INFO (hedging, frameworks, contrast, bio) see table. Never raise GEO findings to HIGH.
449
478
  - **SPA HIGH bar**: Only flag Category 7 HIGH when the app is clearly a content site (has public routes with meaningful content). Auth-gated apps (dashboards, admin panels) should stay at WARN/INFO since SEO is not a concern.
450
479
  - **Noscript is not a substitute for SSR/SSG**: `<noscript>` catches only the "no-JS" case, not the "crawler without JS execution" case — don't upgrade a CSR HIGH to WARN just because noscript exists.
451
480
  - **No auto-fix in v1**: Fixing SEO issues requires design/content decisions beyond pattern matching.
@@ -454,7 +483,9 @@ See: reference/spa-ssg-patterns.md#react-spa-migration
454
483
 
455
484
  - [reference/w3c-guidelines.md](reference/w3c-guidelines.md) — HTML5 semantic requirements, meta tag specs, language tag rules.
456
485
  - [reference/core-web-vitals.md](reference/core-web-vitals.md) — LCP/INP/CLS thresholds, resource hints, above-the-fold heuristic, per-framework image components.
457
- - [reference/geo-guidelines.md](reference/geo-guidelines.md) — GEO principles, `speakable` schema, citation/source markup, AI-extractable content structure.
486
+ - [reference/geo-guidelines.md](reference/geo-guidelines.md) — GEO principles, `speakable` schema, citation/source markup, AI-extractable content structure, chunk anatomy, 13-week freshness strategy.
458
487
  - [reference/geo-aeo-patterns.md](reference/geo-aeo-patterns.md) — AEO (Answer Engine Optimization): `FAQPage`/`HowTo`/`QAPage` schema, `llms.txt`, AI bot `robots.txt` directives, E-E-A-T signals, automated grep patterns for Category 6.
488
+ - [reference/content-citability.md](reference/content-citability.md) — Chunk architecture, semantic triples, opinionated vs hedging language, decision frameworks, contrast patterns, negative definitions, justified superlatives, grep patterns.
489
+ - [reference/ai-pipeline.md](reference/ai-pipeline.md) — Google's 4-stage AI pipeline (Prepare/Retrieve/Signal/Serve), 7 ranking signals (Gecko, Jetstream, PCTR, Freshness, BM25, Base, Boost/Bury), Query Fan Out, probabilistic ranking, format routing.
459
490
  - [reference/schema-types.md](reference/schema-types.md) — Schema.org JSON-LD templates (Article, FAQ, BreadcrumbList, Organization, Product, LocalBusiness) with required properties.
460
491
  - [reference/spa-ssg-patterns.md](reference/spa-ssg-patterns.md) — Rendering-mode decision tree, SPA pitfalls, per-framework detection patterns, prerendering strategies.
@@ -0,0 +1,204 @@
1
+ # Google AI Pipeline
2
+
3
+ Reference for `seo-validate` — understanding how Google processes content for AI Search. Informs Category 6 (GEO) and Category 10 (Topical Authority) findings.
4
+
5
+ Source: Piotr Smargol, Indygo Agency — SEO Copywriting 2026.
6
+
7
+ ---
8
+
9
+ ## 1. The Four-Stage Pipeline
10
+
11
+ Every query in Google AI Search (AI Overviews, AI Mode, and classical SERPs) passes through the same pipeline. The presentation layer differs; the engine is the same.
12
+
13
+ ```
14
+ User Query
15
+
16
+
17
+ ┌─────────────────────────────────────────────────┐
18
+ │ Stage 1: PREPARE │
19
+ │ NLU — synonym mapping — intent classification │
20
+ │ Query Fan Out (synthetic sub-queries) │
21
+ └─────────────────────────────────────────────────┘
22
+
23
+
24
+ ┌─────────────────────────────────────────────────┐
25
+ │ Stage 2: RETRIEVE │
26
+ │ Content divided into chunks (≤500 tokens) │
27
+ │ Layout parsed — embeddings computed (Gecko) │
28
+ └─────────────────────────────────────────────────┘
29
+
30
+
31
+ ┌─────────────────────────────────────────────────┐
32
+ │ Stage 3: SIGNAL │
33
+ │ 7 ranking signals applied per chunk candidate │
34
+ └─────────────────────────────────────────────────┘
35
+
36
+
37
+ ┌─────────────────────────────────────────────────┐
38
+ │ Stage 4: SERVE │
39
+ │ Gemini 2.5 Flash generates the final answer │
40
+ │ Inline source citations added │
41
+ └─────────────────────────────────────────────────┘
42
+ ```
43
+
44
+ **Key implication for copywriters:** AI does not read your article — it extracts a chunk and pastes it as an answer. Each section must be a self-contained answer unit. If the answer is scattered across the article, AI cannot assemble it.
45
+
46
+ ---
47
+
48
+ ## 2. The Seven Ranking Signals
49
+
50
+ Google applies seven signals to decide which chunk from which source appears in the answer.
51
+
52
+ ### Signal 1 — Base Ranking
53
+ Classical relevance algorithm (PageRank descendants). SEO fundamentals still matter. High-authority domains get a floor advantage, but content structure can compensate.
54
+
55
+ **Copywriter implication:** Standard on-page SEO (title, H1, internal linking) remains the foundation.
56
+
57
+ ---
58
+
59
+ ### Signal 2 — Gecko Score (Semantic Embedding Similarity)
60
+ Gecko is Google's embedding model. It measures how semantically close your chunk is to the user's query — not keyword overlap, but meaning overlap. A chunk about "mattress firmness" will score well for "which mattress is best for back pain" even without that exact phrase.
61
+
62
+ **Copywriter implication:** Cover the topic from multiple angles and personas. Topical depth beats keyword density. A single cluster of related articles scores higher than one over-optimised page.
63
+
64
+ ---
65
+
66
+ ### Signal 3 — Jetstream (Cross-Attention)
67
+ Jetstream is the model's ability to understand context, contrasts, negations, and comparisons within a chunk. It specifically rewards:
68
+
69
+ - `X vs Y` comparisons
70
+ - Negations: "not recommended for…", "avoid if…", "unlike X…"
71
+ - Conditional statements: "best for…", "ideal for…", "if X, choose Y"
72
+ - Contrast phrases: "in contrast to X, Y does…", "unlike foam, latex…"
73
+
74
+ **Copywriter implication:** These constructions are not just reader-friendly — they are a direct Jetstream signal. Content with explicit comparisons and decision frameworks is over-represented in AI citations.
75
+
76
+ ---
77
+
78
+ ### Signal 4 — BM25 (Keyword Matching)
79
+ The classic TF-IDF/BM25 algorithm is still active. Exact keyword matches in headings and early paragraphs contribute. Not dominant, but present.
80
+
81
+ **Copywriter implication:** Include the primary keyword in H2 headings and in the first sentence of each section. Do not keyword-stuff — BM25 has diminishing returns and Gecko penalises unnatural density.
82
+
83
+ ---
84
+
85
+ ### Signal 5 — PCTR (Predicted Click-Through Rate)
86
+ Google estimates how likely users are to click your result based on historical CTR patterns for that title format, topic, and position. High PCTR boosts a chunk's probability of being included in the AI answer.
87
+
88
+ **Copywriter implication:** Title and meta description quality directly affects AI citation probability — not just traditional click traffic. Use benefit-led titles. Avoid clickbait (Google's AI pipeline detects and suppresses it). Brand at the end of the title.
89
+
90
+ ---
91
+
92
+ ### Signal 6 — Freshness
93
+ Content age is weighted by topic type:
94
+
95
+ | Topic type | Freshness weight |
96
+ |---|---|
97
+ | Breaking news | Dominant — stale content is excluded |
98
+ | Technology / AI / tools | High — 13-week threshold observed |
99
+ | Evergreen how-to | Moderate — update signals matter |
100
+ | Historical / definitions | Low — accuracy over recency |
101
+
102
+ **The 13-week rule:** Research across top AI-cited content shows 50% of cited results were published or updated within the last 13 weeks. Evergreen pages that are not refreshed drop out of AI citation pools gradually.
103
+
104
+ **Copywriter implication:** Add visible `dateModified` to all indexable pages. Refresh key articles before the 13-week threshold. Use "Updated: [date]" visible to users, not just in JSON-LD.
105
+
106
+ ---
107
+
108
+ ### Signal 7 — Boost/Bury Rules
109
+ Manual editorial adjustments applied by Google. Certain sources are systematically boosted (e.g., Reddit, YouTube, Wikipedia, government and academic domains). Certain patterns are buried (AI-generated content without human editing, thin content, pages without authors).
110
+
111
+ **Copywriter implication:** Named authors with bylines and bios protect content from Bury Rules. Generic AI-generated text without editorial review is actively suppressed.
112
+
113
+ ---
114
+
115
+ ## 3. Query Fan Out
116
+
117
+ When a user submits a query, the AI does not search only for that query. It generates dozens of synthetic sub-queries internally and retrieves candidate chunks for each.
118
+
119
+ ```
120
+ User query: "which laptop for remote work"
121
+
122
+ ┌──────────┴──────────┐
123
+ ▼ ▼
124
+ "best laptops remote work 2026" "lightweight laptop long battery"
125
+ │ │
126
+ ▼ ▼
127
+ "MacBook vs ThinkPad remote" "quiet fan laptop home office"
128
+ │ │
129
+ ▼ ▼
130
+ "budget laptop for Zoom" "laptop under 1000 remote work"
131
+
132
+
133
+ "best keyboard laptop coding"
134
+ … (50+ more sub-queries)
135
+ ```
136
+
137
+ ### The 95% problem
138
+
139
+ **95% of these sub-queries have zero Monthly Search Volume** in Semrush, Ahrefs, Senuto, or any keyword tool. Classical keyword research shows only 5% of the actual retrieval surface.
140
+
141
+ **Copywriter implication:**
142
+ - Stop optimising for a single phrase per page.
143
+ - Cover the topic from multiple persona angles: beginner vs expert, budget vs premium, use case A vs use case B.
144
+ - Answer implicit sub-questions within the same article using H2/H3 sections.
145
+ - Cluster architecture (pillar + cluster articles) is the structural response to Query Fan Out.
146
+
147
+ ---
148
+
149
+ ## 4. Probabilistic Ranking
150
+
151
+ In classical SEO, "position 1" was deterministic — the same for every user. In AI Search, ranking is probabilistic: two users sending the identical query can receive different answers.
152
+
153
+ AI personalises based on:
154
+ - Search history and session context
155
+ - Location and language
156
+ - Inferred demographic profile
157
+ - Device type
158
+ - Stochastic variation in model generation
159
+
160
+ **Implication:** There is no single position to win. There is a **probability of being cited**. Maximise that probability by:
161
+ 1. Covering the topic from multiple perspectives (different personas, contexts, formats).
162
+ 2. Being present in multiple chunk positions within a long article (each H2 is a citation candidate).
163
+ 3. Publishing cluster articles that address sub-queries individually.
164
+ 4. Maintaining freshness so your chunk stays in the retrieval pool.
165
+
166
+ ---
167
+
168
+ ## 5. Format Routing
169
+
170
+ The AI routes queries to content formats. If your format does not match the query type, you lose — even with superior content.
171
+
172
+ | Query pattern | Optimal content format | Schema signal |
173
+ |---|---|---|
174
+ | `how to X` | Numbered step-by-step tutorial | `HowTo` |
175
+ | `X vs Y` | Side-by-side comparison table | `Article` + table markup |
176
+ | `show me X` | Visual: image gallery or video | Image alt + video schema |
177
+ | `latest / best X in [year]` | Freshly updated article with date | `Article` + `dateModified` |
178
+ | `reviews of X` / `what do people think of X` | UGC aggregation or forum discussion | `Review`, `AggregateRating` |
179
+ | `what is X` | Definition paragraph + entity context | `Article` with entity-first opening |
180
+ | `X for [persona]` | Persona-targeted guide | `Article` + `FAQPage` |
181
+ | `is X worth it` | Opinionated recommendation with evidence | `Article` with author + data |
182
+
183
+ **Copywriter implication:** Before writing, determine the dominant query pattern for the page's topic. Structure the page to match that format. Mismatched format = invisible to AI routing.
184
+
185
+ ---
186
+
187
+ ## 6. The Two-Audience Reality
188
+
189
+ | Audience | Wins with | Metric |
190
+ |---|---|---|
191
+ | Fast AI (simple information queries) | Structured chunks, direct answers, semantic triples | AI citation probability |
192
+ | Human readers (purchase decisions, complex topics) | Narrative, trust signals, social proof, UGC | Engagement, conversion |
193
+
194
+ **Strategy:** Pages must serve both simultaneously. Chunk-optimised structure aids AI extraction without harming human readability — they are the same discipline (clear headings, direct answers, no filler).
195
+
196
+ ---
197
+
198
+ ## References
199
+
200
+ - Google Search Central — How Google Search works: https://developers.google.com/search/docs/fundamentals/how-search-works
201
+ - Google Gecko embedding model: https://research.google/pubs/gecko-versatile-text-embeddings-distilled-from-large-language-models/
202
+ - Blyskall study — 40M AI Overviews results, backlink vs content signals: referenced in SEO Copywriting 2026 (Smargol, Indygo Agency)
203
+ - Senuto topical authority study — 212K phrases, 7,200 semantic groups
204
+ - Google AI Mode announcement (March 2025): https://blog.google/products/search/google-ai-mode-search/
@@ -0,0 +1,372 @@
1
+ # Content Citability Patterns
2
+
3
+ Reference for `seo-validate` Category 6 (GEO). Covers the structural and linguistic patterns that maximise AI citation probability. Companion to [geo-guidelines.md](geo-guidelines.md) and [ai-pipeline.md](ai-pipeline.md).
4
+
5
+ Source: Piotr Smargol, Indygo Agency — SEO Copywriting 2026.
6
+
7
+ ---
8
+
9
+ ## 1. Chunk Architecture
10
+
11
+ ### The 500-token boundary
12
+
13
+ Google's retrieval stage splits content into chunks of **maximum 500 tokens (~375 words)**. AI does not summarise your article — it extracts one chunk and uses it as the answer. If the answer to a question is distributed across multiple sections or buried after a long preamble, AI cannot assemble it.
14
+
15
+ **Rules:**
16
+ - Each H2 section should stay within ~375 words.
17
+ - If a section exceeds this, split with an H3 sub-heading — each H3 becomes its own chunk candidate.
18
+ - Never put the answer at the end of a section after a long setup.
19
+
20
+ ### Anatomy of a citable chunk
21
+
22
+ Every section should follow this structure:
23
+
24
+ ```
25
+ H2: [Question or keyword-rich title]
26
+
27
+ ├── Direct answer — 2–3 sentences. No preamble. The fact first.
28
+
29
+ ├── Elaboration — data, context, nuance. 3–5 sentences.
30
+
31
+ ├── Visual element — list, table, or code block.
32
+
33
+ └── TL;DR (optional, for long sections) — 1-sentence summary.
34
+ ```
35
+
36
+ ### Before / after examples
37
+
38
+ **Before (unchunkable):**
39
+ ```
40
+ H2: Choosing the Right Mattress
41
+
42
+ When you're looking for a new mattress, there are many factors to consider.
43
+ The market offers a wide variety of options, and it can be overwhelming to
44
+ navigate. Let's explore the key aspects you should think about before making
45
+ a purchase decision, because getting this right is important for your sleep
46
+ quality and long-term health. After all, we spend a third of our lives in bed.
47
+
48
+ Eventually, firmness is one of the most important factors. For people under
49
+ 70 kg, a softer H1–H2 rating works well.
50
+ ```
51
+ *Problem: answer buried after 80-word preamble; AI extracts the preamble as the "answer".*
52
+
53
+ **After (chunk-optimised):**
54
+ ```
55
+ H2: How to Choose Mattress Firmness by Body Weight
56
+
57
+ Match firmness to your weight: under 70 kg → H1 or H2; 70–90 kg → H3;
58
+ over 90 kg → H4. Higher body weight needs firmer support to maintain
59
+ spinal alignment.
60
+
61
+ | Weight | Recommended firmness |
62
+ |--------|----------------------|
63
+ | < 70 kg | H1–H2 (soft–medium) |
64
+ | 70–90 kg | H3 (medium-firm) |
65
+ | > 90 kg | H4 (firm) |
66
+
67
+ **TL;DR:** Firmness = body weight ÷ 10, rounded up to the nearest H-rating.
68
+ ```
69
+ *Result: AI extracts the first two sentences as the answer; table is bonus precision.*
70
+
71
+ ---
72
+
73
+ ## 2. Semantic Triples
74
+
75
+ ### What they are
76
+
77
+ A semantic triple is the simplest factual statement AI can parse without inference or guessing:
78
+
79
+ ```
80
+ Subject → Predicate → Object
81
+ ```
82
+
83
+ LLMs are trained on structured knowledge graphs built from triples. Content written as triples is extracted with high confidence and low hallucination risk.
84
+
85
+ ### Triple structure
86
+
87
+ | Component | Role | Example |
88
+ |---|---|---|
89
+ | Subject | What/who is described | "Premium Mattress" |
90
+ | Predicate | Property or relationship | "has firmness rating" |
91
+ | Object | Value or target | "H3" |
92
+
93
+ Assembled: "The Premium Mattress has a firmness rating of H3."
94
+
95
+ ### Stacking triples
96
+
97
+ One product/topic should generate multiple triples covering all queryable properties:
98
+
99
+ ```
100
+ Product X → has firmness → H3
101
+ Product X → measures → 160 × 200 cm
102
+ Product X → has height → 22 cm
103
+ Product X → is ideal for → side sleepers weighing 70–90 kg
104
+ Product X → is not recommended for → stomach sleepers
105
+ Product X → pairs with → slatted base with max 5 cm gap
106
+ ```
107
+
108
+ Each triple answers a different AI sub-query. Six triples = six citation opportunities.
109
+
110
+ ### Marketing prose vs semantic triples
111
+
112
+ | Style | Example | AI extractable? |
113
+ |---|---|---|
114
+ | Marketing prose | "Our exceptional collection will enchant you with its elegance and superior comfort." | No — zero extractable facts |
115
+ | Semantic triples | "Firmness: H3. Dimensions: 160×200 cm. Height: 22 cm. Ideal for side sleepers, 70–90 kg. Not recommended for stomach sleepers." | Yes — 5 distinct facts |
116
+
117
+ **Rule:** Every product description, category page, and guide should contain a minimum of three semantic triples in the opening paragraph or a specification table.
118
+
119
+ ### Grep patterns
120
+
121
+ ```
122
+ # Detect marketing filler (high prose density, low factual density)
123
+ Pattern: \b(exceptional|extraordinary|unique|enchant|fascinate|remarkable|unparalleled|outstanding)\b
124
+ Files: *.html, *.md, *.tsx, *.jsx, *.vue, *.svelte, *.astro
125
+ Flag: marketing superlative without associated factual triple
126
+ ```
127
+
128
+ ---
129
+
130
+ ## 3. Opinionated Content vs Hedging Language
131
+
132
+ ### Why AI skips hedged claims
133
+
134
+ AI answer engines extract concrete statements to synthesise answers. A hedged claim ("this might be a good choice for many people") cannot be used as a direct answer to "which mattress should I buy?" AI silently passes over it.
135
+
136
+ **Google's Jetstream signal explicitly rewards** opinionated, declarative content over neutral, hedged content.
137
+
138
+ ### Hedging patterns to eliminate
139
+
140
+ | Hedging phrase | Why it fails | Replacement |
141
+ |---|---|---|
142
+ | "may be a good choice" | Cannot be cited as a recommendation | "We recommend X for Y" |
143
+ | "might work well for" | Conditional — AI skips | "Works best for" |
144
+ | "worth considering" | No stance | "Our top pick for Z is X" |
145
+ | "for many people" | Undefined persona | "for side sleepers weighing 70–90 kg" |
146
+ | "could be ideal" | Speculative | "Is ideal for" |
147
+ | "one option is" | Non-committal | "Choose X if you need Y" |
148
+ | "it depends" (without resolution) | No extractable answer | "It depends on your weight: under 70 kg → H2, over 90 kg → H4" |
149
+
150
+ ### Opinionated writing rules
151
+
152
+ 1. **Take a position.** "We recommend X for Y" over "X is worth considering."
153
+ 2. **Name the persona.** "Ideal for side sleepers weighing 70–90 kg" over "suitable for most users."
154
+ 3. **Justify the claim.** AI cites "best for back pain because H3 stabilises the lumbar spine" — not "best for back pain" alone.
155
+ 4. **Use first-person plural for brand voice.** "We tested X and found…" establishes E-E-A-T Experience signal.
156
+
157
+ ### Grep patterns for hedging detection
158
+
159
+ ```
160
+ # High-priority hedging (recommendation context)
161
+ Pattern: \b(may be|might be|could be|worth considering|for many|for most people|it depends)\b
162
+ Files: *.html, *.md, *.tsx, *.jsx, *.vue, *.astro
163
+ Context: within 50 words of product name, category heading, or recommendation heading
164
+ Severity: INFO
165
+ ```
166
+
167
+ ---
168
+
169
+ ## 4. Decision Frameworks
170
+
171
+ ### Why they dominate AI citations
172
+
173
+ "If X → choose Y" is the most frequently cited construction in AI Search. It directly answers the user's decision-making intent, requires no interpretation, and maps cleanly to Query Fan Out sub-queries ("which X for Y?").
174
+
175
+ ### Formats
176
+
177
+ **Conditional (if/then):**
178
+ ```
179
+ If you sleep on your side → choose H2–H3 firmness.
180
+ If you share a bed with a partner of significantly different weight → choose a split mattress.
181
+ If you have chronic lower back pain → choose H3 with lumbar zone reinforcement.
182
+ ```
183
+
184
+ **Use-case mapping:**
185
+ ```
186
+ For home office video calls → prioritise battery life and weight under 1.5 kg.
187
+ For graphic design work → prioritise display colour gamut (>95% DCI-P3).
188
+ For travel → prioritise weight and keyboard quality for extended typing.
189
+ ```
190
+
191
+ **Elimination framework (negative definition):**
192
+ ```
193
+ NOT for: stomach sleepers, children under 12, anyone over 100 kg.
194
+ ```
195
+
196
+ ### Placement
197
+
198
+ Decision frameworks belong:
199
+ - In H2 "How to Choose" or "Which X for You" sections.
200
+ - In product/category opening paragraphs (chunk position 1).
201
+ - In FAQ answers (each answer = one framework).
202
+ - In comparison tables (column "Best for:").
203
+
204
+ ### Grep patterns
205
+
206
+ ```
207
+ # Detect absence of decision framework in guide/category pages
208
+ Detect: (?i)<h[2-3][^>]*>(how to choose|which .* for|guide to|best .* for)
209
+ Then check: (?i)\bif\b.{1,50}\b(choose|select|pick|go with|opt for)\b OR (?i)\bfor .{3,30}\b(choose|recommend|ideal|best)\b
210
+ Flag if: guide heading found, no decision framework pattern within 500 words
211
+ Severity: INFO
212
+ ```
213
+
214
+ ---
215
+
216
+ ## 5. Contrast Patterns (Jetstream Signal)
217
+
218
+ Contrasts and comparisons are a direct Jetstream (cross-attention) signal. Content with explicit "X vs Y" structures is over-represented in AI answers for comparative queries.
219
+
220
+ ### Contrast constructions
221
+
222
+ | Construction | Example |
223
+ |---|---|
224
+ | `X vs Y` heading | "Foam vs Latex Mattress: Which is Better?" |
225
+ | "Unlike X, Y…" | "Unlike foam, latex responds instantly to movement." |
226
+ | "In contrast to X…" | "In contrast to bonnell springs, pocket springs isolate motion." |
227
+ | "X is better than Y for Z" | "Latex is better than foam for hot sleepers because it has open-cell structure." |
228
+ | "Compared to X, Y offers…" | "Compared to H2 firmness, H3 provides 40% more lumbar support." |
229
+ | Comparison table | Explicit columns for two or more options |
230
+
231
+ ### When to use contrasts
232
+
233
+ - Every product category page should contain at least one "Category A vs Category B" section or table.
234
+ - Blog guides should compare at least two options before making a recommendation.
235
+ - Product descriptions should contrast with the alternative ("unlike [competitor type], this product…").
236
+
237
+ ### Grep patterns
238
+
239
+ ```
240
+ # Detect comparative content missing contrast constructions
241
+ Detect: (?i)\b(vs|versus|compare|comparison|difference between|X or Y)\b in headings/titles
242
+ Then check: (?i)(unlike|in contrast|compared to|better than|vs|versus) in body text
243
+ Then check: <table present in the content
244
+ Flag if: comparative heading found, no contrast language AND no comparison table
245
+ Severity: INFO
246
+ ```
247
+
248
+ ---
249
+
250
+ ## 6. Negative Definitions
251
+
252
+ Defining who/what a product is NOT for is a high-value signal for two reasons:
253
+
254
+ 1. **AI exclusion queries:** "which mattress is not for stomach sleepers" — only content with explicit negative definitions answers this.
255
+ 2. **Targeting precision:** Narrow persona definition increases citation probability for the right audience query.
256
+
257
+ ### Patterns
258
+
259
+ ```
260
+ Not recommended for: stomach sleepers, children under 12, bodyweight over 120 kg.
261
+ Not suitable for: use on adjustable bases without rigid slat support.
262
+ Avoid if: you prefer a cloud-soft feel — this mattress is designed for firm support.
263
+ This product is not designed for: outdoor use, temperatures below 5°C.
264
+ ```
265
+
266
+ ### Placement
267
+
268
+ - Product descriptions: one "Not recommended for:" block near the persona definition.
269
+ - Category pages: "Who this category is NOT for" subsection.
270
+ - FAQ: "Is X right for me?" answer should include negative persona.
271
+
272
+ ### Grep patterns
273
+
274
+ ```
275
+ # Check product/category pages for negative definition
276
+ Detect: (?i)(not recommended for|not suitable for|avoid if|not designed for|not ideal for)
277
+ Flag if: product or category page (detected by Product schema or URL pattern) has no negative definition
278
+ Severity: INFO
279
+ ```
280
+
281
+ ---
282
+
283
+ ## 7. Justified Superlatives
284
+
285
+ Superlatives without justification are ignored by AI ("best mattress" is marketing noise). Superlatives with evidence are cited.
286
+
287
+ ### Formula
288
+
289
+ ```
290
+ [Superlative claim] + [specific reason] + [evidence or data]
291
+ ```
292
+
293
+ ### Examples
294
+
295
+ | Bad (ignored) | Good (citable) |
296
+ |---|---|
297
+ | "The best mattress for back pain" | "The best mattress for back pain because H3 firmness maintains neutral lumbar alignment — validated by our customer data showing 78% pain reduction after 30 days." |
298
+ | "Most durable laptop battery" | "Longest real-world battery life in the under-1.5 kg category — 14.2 hours in our standardised office test." |
299
+ | "Premium quality" | "Premium build: aluminium chassis, ISO military-grade drop rating (MIL-STD-810H), 3-year warranty." |
300
+
301
+ ### Rule
302
+
303
+ Every superlative must be followed within the same sentence by "because", "with", "achieving", or a colon introducing a specific measurement.
304
+
305
+ ---
306
+
307
+ ## 8. The 13-Week Freshness Threshold
308
+
309
+ Research shows 50% of top AI-cited content was published or updated within the last 13 weeks (Blyskall, 40M AI Overviews results). After 13 weeks without a visible update, citation probability drops.
310
+
311
+ ### Freshness strategy
312
+
313
+ | Action | Frequency | Priority pages |
314
+ |---|---|---|
315
+ | Full content review and update | Every 12 weeks | Top-traffic pillar pages |
316
+ | Date + minor fact refresh | Every 13 weeks | High-competition cluster articles |
317
+ | Add new FAQ or data point | On new data availability | Product pages, comparison guides |
318
+ | Update `dateModified` in JSON-LD AND visible text | On every meaningful change | All indexable pages |
319
+
320
+ ### Visible freshness signals
321
+
322
+ Both are required:
323
+ 1. JSON-LD `dateModified` field.
324
+ 2. Visible "Updated: [date]" or "Last reviewed: [date]" text near the article byline.
325
+
326
+ JSON-LD alone is insufficient — AI engines parse visible text; users trust visible dates.
327
+
328
+ ---
329
+
330
+ ## 9. Author E-E-A-T (Experience Signal)
331
+
332
+ Google's most important E-E-A-T shift in 2025 was elevating **Experience** — content from someone who actually used the product, visited the place, or performed the task. This signal is impossible for pure AI generation to replicate.
333
+
334
+ ### Author requirements for citability
335
+
336
+ | Requirement | Implementation | AI signal |
337
+ |---|---|---|
338
+ | Real name (not "Admin" or "Team") | `<span class="author">Jane Doe</span>` + `Person` schema | Identity trust |
339
+ | Role/credentials in bio | ≥30 words of bio near author name | Expertise signal |
340
+ | `Person` schema with `sameAs` | LinkedIn, GitHub, ORCID, or personal site URL | Authoritativeness |
341
+ | First-person experience language | "I tested…", "In our lab…", "After 6 months of use…" | Experience signal |
342
+ | Date visible to user | "Published [date] · Updated [date]" | Freshness + trust |
343
+
344
+ ### Author schema
345
+
346
+ ```json
347
+ {
348
+ "@context": "https://schema.org",
349
+ "@type": "Article",
350
+ "author": {
351
+ "@type": "Person",
352
+ "name": "Jane Doe",
353
+ "jobTitle": "Senior Product Tester",
354
+ "sameAs": [
355
+ "https://linkedin.com/in/janedoe",
356
+ "https://github.com/janedoe"
357
+ ]
358
+ },
359
+ "datePublished": "2026-03-01",
360
+ "dateModified": "2026-04-20"
361
+ }
362
+ ```
363
+
364
+ ---
365
+
366
+ ## References
367
+
368
+ - Blyskall study — 40M AI Overviews, backlinks vs content structure signals
369
+ - Smargol, P. (2026). SEO Copywriting 2026. Indygo Agency. https://indygo.agency
370
+ - Aggarwal et al. (2023). GEO: Generative Engine Optimization. Princeton/Georgia Tech. https://arxiv.org/abs/2311.09735
371
+ - Google E-E-A-T: https://developers.google.com/search/docs/fundamentals/creating-helpful-content
372
+ - See also: [ai-pipeline.md](ai-pipeline.md), [geo-guidelines.md](geo-guidelines.md), [geo-aeo-patterns.md](geo-aeo-patterns.md)
@@ -1,8 +1,10 @@
1
1
  # GEO — Generative Engine Optimization
2
2
 
3
- Reference for `seo-validate` Category 6. Structuring content so AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Bing Copilot, Claude) can extract, cite, and quote it accurately.
3
+ Reference for `seo-validate` Category 6. Structuring content so AI answer engines (ChatGPT, Perplexity, Google AI Overviews, Bing Copilot, Claude, Google AI Mode) can extract, cite, and quote it accurately.
4
4
 
5
- GEO is emerging practice, not a ranking algorithm with known penalties. **All findings in Category 6 are severity `INFO`** — guidance, not enforcement.
5
+ GEO patterns have measurable impact on AI citation probability. **Category 6 findings are `WARN` (chunk size, author quality, freshness) or `INFO` (hedging, frameworks, contrast, bio)** — guidance based on citation research, not penalty-causing.
6
+
7
+ See [ai-pipeline.md](ai-pipeline.md) for Google's 4-stage pipeline and 7 ranking signals. See [content-citability.md](content-citability.md) for chunk anatomy, semantic triples, and hedging patterns.
6
8
 
7
9
  ## Core Principles
8
10
 
@@ -224,17 +226,124 @@ These don't render content for crawlers at all. **Category 7 (rendering) superse
224
226
 
225
227
  ---
226
228
 
229
+ ## Chunk Architecture
230
+
231
+ Google's retrieval stage (Stage 2 of the pipeline — see [ai-pipeline.md](ai-pipeline.md)) splits content into chunks of ≤500 tokens (~375 words). AI does not read your article — it extracts one chunk and uses it as the answer. If the answer is distributed across multiple sections or buried after a long preamble, AI cannot assemble it.
232
+
233
+ **The 375-word rule:** Each H2 section should stay within ~375 words. If a section runs longer, add an H3 — each H3 becomes its own independent chunk candidate.
234
+
235
+ ### Anatomy of a citable chunk
236
+
237
+ ```
238
+ H2: [Question or keyword-rich heading]
239
+
240
+ ├── Direct answer — 2–3 sentences. Fact first. No preamble.
241
+
242
+ ├── Elaboration — data, context, nuance. 3–5 sentences.
243
+
244
+ ├── Visual element — list, table, or code block.
245
+
246
+ └── TL;DR (optional) — 1-sentence summary for long sections.
247
+ ```
248
+
249
+ ### Before / after
250
+
251
+ **Before (unchunkable):**
252
+ ```
253
+ H2: Choosing the Right Mattress
254
+
255
+ When you're looking for a new mattress, there are many factors to consider.
256
+ The market offers a wide variety of options, and it can be overwhelming...
257
+ [70 words of preamble]
258
+ Eventually, firmness is one of the most important factors...
259
+ ```
260
+ *AI extracts the preamble as the "answer" — zero information.*
261
+
262
+ **After (chunk-optimised):**
263
+ ```
264
+ H2: How to Choose Mattress Firmness by Body Weight
265
+
266
+ Match firmness to your weight: under 70 kg → H1–H2; 70–90 kg → H3; over 90 kg → H4.
267
+ Higher body weight needs firmer support to maintain spinal alignment.
268
+
269
+ | Weight | Firmness |
270
+ |-----------|-----------|
271
+ | < 70 kg | H1–H2 |
272
+ | 70–90 kg | H3 |
273
+ | > 90 kg | H4 |
274
+ ```
275
+ *AI extracts the first two sentences. Table is precision bonus.*
276
+
277
+ ---
278
+
279
+ ## Semantic Triples vs Marketing Prose
280
+
281
+ AI answer engines parse content as Subject → Predicate → Object triples. Marketing prose requires inference; triples require none — lower hallucination risk, higher citation frequency.
282
+
283
+ | Style | Example | AI extractable? |
284
+ |---|---|---|
285
+ | Marketing prose | "Our exceptional collection will enchant you with its elegance." | No — zero extractable facts |
286
+ | Semantic triples | "Firmness: H3. Dimensions: 160×200 cm. Ideal for: side sleepers, 70–90 kg. Not for: stomach sleepers." | Yes — 4 distinct facts |
287
+
288
+ Each triple answers a different AI sub-query. Six triples on a product page = six citation opportunities.
289
+
290
+ ---
291
+
292
+ ## Opinionated Content
293
+
294
+ AI skips hedged claims. "This may be a good choice for many people" cannot be used as an answer to "which mattress should I buy?" Google's Jetstream signal explicitly rewards declarative, opinionated content.
295
+
296
+ **Hedging to eliminate → replacement:**
297
+
298
+ | Hedging | Replacement |
299
+ |---|---|
300
+ | "may be a good choice" | "We recommend X for Y" |
301
+ | "worth considering" | "Our top pick for Z is X" |
302
+ | "for many people" | "for side sleepers weighing 70–90 kg" |
303
+ | "it depends" | "It depends on your weight: under 70 kg → H2, over 90 kg → H4" |
304
+
305
+ **Rule:** Every guide and product page must take a position. Recommendation + named persona + justification = citable.
306
+
307
+ ---
308
+
309
+ ## The 13-Week Freshness Rule
310
+
311
+ 50% of top AI-cited content was published or updated within the last 13 weeks (Blyskall, 40M AI Overviews results). After 13 weeks without a visible update, citation probability drops.
312
+
313
+ **Both signals required:**
314
+ 1. `dateModified` in JSON-LD — machine-readable freshness signal.
315
+ 2. Visible "Updated: [date]" near the byline — AI engines parse visible text; users trust visible dates.
316
+
317
+ JSON-LD alone is insufficient.
318
+
319
+ **Refresh strategy:**
320
+
321
+ | Action | Interval |
322
+ |---|---|
323
+ | Full content review + update | Every 12 weeks for top pillar pages |
324
+ | Date + minor fact refresh | Every 13 weeks for cluster articles |
325
+ | Add new FAQ or data point | On new data availability for product pages |
326
+
327
+ ---
328
+
227
329
  ## Checklist (Category 6 findings)
228
330
 
331
+ - [ ] Each H2 section is ≤375 words; sections exceeding this have an H3 sub-heading.
332
+ - [ ] First paragraph under each heading is ≤60 words before a concrete fact or recommendation.
333
+ - [ ] No hedging language ("may be", "worth considering", "for many") in recommendation contexts.
334
+ - [ ] At least one decision framework ("if X → choose Y") per guide or category page.
335
+ - [ ] At least one explicit contrast ("X vs Y", "unlike X") per comparison page.
336
+ - [ ] At least one negative definition ("not recommended for…") per product or category page.
337
+ - [ ] Author block: real name (not "Admin"), ≥30-word bio, `Person` schema with `sameAs`.
338
+ - [ ] `dateModified` in JSON-LD AND visible "Updated: [date]" text present.
229
339
  - [ ] FAQ-style content uses `FAQPage` schema.
230
340
  - [ ] Summary content uses `speakable` schema.
231
- - [ ] Paragraphs >400 words are broken up with sub-headings.
232
341
  - [ ] Citations use `<cite>` and author bylines.
233
342
  - [ ] Quoted content uses `<blockquote>`/`<q>` with `cite` attr.
234
343
  - [ ] How-to content uses `<ol>` + `HowTo` schema.
235
344
  - [ ] Comparative data uses `<table>` with proper headers.
236
345
  - [ ] Glossary content uses `<dl>`/`<dt>`/`<dd>`.
237
- - [ ] Semantic HTML (`<article>`, `<section>`, `<main>`, `<nav>`, `<aside>`) is used over `<div>`.
346
+ - [ ] Semantic HTML (`<article>`, `<section>`, `<main>`) used over `<div>`.
238
347
  - [ ] Critical content is NOT hidden behind tabs/accordions (except native `<details>`).
239
348
 
240
349
  ---
package/llms-full.txt CHANGED
@@ -215,7 +215,7 @@
215
215
  - **search-specialist**: Information retrieval and search optimization specialist. Trigger words: search, query, semantic search, information retrieval, relevance, ranking, search optimization
216
216
  - **security-architect**: Proactive security design expert. Use for Threat Modeling, architecture security reviews, and designing secure systems (AuthN/AuthZ, Crypto).
217
217
  - **security-auditor**: Security expert. Use for OWASP Top 10, CVE analysis, security audits, penetration testing, vulnerability assessment, hardening. Triggers: security, owasp, cve, vulnerability, audit, hardening, penetration, pentest, injection test, api security.
218
- - **seo-specialist**: Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews
218
+ - **seo-specialist**: Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews, topical authority, chunk architecture, semantic triples, query fan out
219
219
  - **system-governor**: The Guardian of the Constitution. Validates all evolutionary changes and enforces immutable rules. Has VETO power.
220
220
  - **tech-lead**: Technical authority for code quality, architecture patterns, and stack decisions. Use for code reviews, technological disputes, and standards enforcement.
221
221
  - **technical-researcher**: Deep technical investigation and multi-source research synthesis specialist. Trigger words: technical research, feasibility study, root cause analysis, API investigation, compatibility research, comparison matrix, synthesize, aggregate, report, executive summary, gap analysis, findings, multi-source, cross-reference
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.1",
2
+ "version": "4.2.0",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "description": "AI coding toolkit: 107 skills, 44 agents, 12-editor write-through (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex, opencode), machine-enforced safety constitution, SARIF audit, signed npm provenance.",
5
5
  "keywords": [
6
6
  "claude",
@@ -41,7 +41,7 @@
41
41
  "ai-toolkit": "bin/ai-toolkit.js"
42
42
  },
43
43
  "scripts": {
44
- "prepublishOnly": "npm run generate:all && python3 scripts/validate.py && npm test",
44
+ "prepublishOnly": "npm run generate:all && python3 scripts/validate.py --strict && npm test",
45
45
  "test": "bats tests/ --jobs 4 --no-parallelize-within-files",
46
46
  "validate": "python3 scripts/validate.py",
47
47
  "evaluate": "python3 scripts/evaluate_skills.py",
@@ -105,6 +105,25 @@ def rule_quality_standards() -> str:
105
105
  """
106
106
 
107
107
 
108
+ def rule_output_mode() -> str:
109
+ return """\
110
+ # Output Mode
111
+
112
+ `output-mode: concise`
113
+
114
+ Default response mode is **concise**. The `brand-voice` skill (when present) auto-loads concise rules; assistants without that skill should still apply the directives below.
115
+
116
+ * No preamble — skip "I'll now...", "Sure, let me...", "Great question!" Start with the answer.
117
+ * Lead with the result — conclusion or output first; explanation only if asked or non-obvious.
118
+ * Max 3 sentences per closed question — yes/no, single-fact, or "where is X" answers stay under three sentences.
119
+ * Tables and lists over prose — when comparing options, listing steps, or showing values.
120
+ * No trailing summaries — if the diff or output already shows what changed, do not restate it.
121
+ * Drop filler adjectives — no "nice", "great", "powerful", "robust" unless the user asked for evaluation.
122
+ * Cite as `path:line` — instead of paragraphs describing where things live.
123
+ * Escalate to verbose only for: architecture / RFC / ADR / trade-off documents, or when the user asks for detail.
124
+ """
125
+
126
+
108
127
  def rule_agents_and_skills() -> str:
109
128
  """Full listing of agents and skills — same content all platforms get."""
110
129
  agents_count, skills_count = count_agents_and_skills()
@@ -142,6 +161,7 @@ STANDARD_RULES: dict[str, callable] = {
142
161
  f"{PREFIX}security.md": rule_security,
143
162
  f"{PREFIX}workflow.md": rule_workflow,
144
163
  f"{PREFIX}quality-standards.md": rule_quality_standards,
164
+ f"{PREFIX}output-mode.md": rule_output_mode,
145
165
  }
146
166
 
147
167
 
@@ -142,6 +142,23 @@ def render_generator(config: dict) -> None:
142
142
  print()
143
143
  print_toolkit_end()
144
144
 
145
+ # Default output mode directive — applies to every editor that loads this file
146
+ print()
147
+ print("<!-- TOOLKIT:output-mode START -->")
148
+ print("<!-- Auto-injected by ai-toolkit. Re-run to update. -->")
149
+ print()
150
+ print("# Output Mode")
151
+ print()
152
+ print("`output-mode: concise`")
153
+ print()
154
+ print("Default response mode is **concise**. Skip preamble, lead with the result, "
155
+ "max 3 sentences per closed question, prefer tables/lists over prose, no "
156
+ "trailing summaries, drop filler adjectives, cite as `path:line`. Escalate "
157
+ "to verbose only for architecture / RFC / ADR / trade-off documents or when "
158
+ "the user asks for detail.")
159
+ print()
160
+ print("<!-- TOOLKIT:output-mode END -->")
161
+
145
162
  # Registered custom rules from ~/.softspark/ai-toolkit/rules/
146
163
  if RULES_DIR.is_dir():
147
164
  for rule_file in sorted(RULES_DIR.glob("*.md")):
@@ -9,6 +9,9 @@ Stdlib-only — no external dependencies.
9
9
  from __future__ import annotations
10
10
 
11
11
  import ssl
12
+ import json
13
+ import os
14
+ from pathlib import Path
12
15
  import urllib.error
13
16
  import urllib.request
14
17
 
@@ -34,6 +37,13 @@ def fetch_url(url: str) -> bytes:
34
37
  f"Only HTTPS URLs are supported (got: {url.split('://')[0]}://)"
35
38
  )
36
39
 
40
+ fixture_map = os.environ.get("AI_TOOLKIT_TEST_URL_FIXTURE_MAP")
41
+ if fixture_map and os.environ.get("AI_TOOLKIT_TEST_MODE") == "1":
42
+ fixtures = json.loads(fixture_map)
43
+ fixture_path = fixtures.get(url)
44
+ if fixture_path:
45
+ return Path(fixture_path).read_bytes()
46
+
37
47
  ctx = ssl.create_default_context()
38
48
  with urllib.request.urlopen(url, timeout=_FETCH_TIMEOUT, context=ctx) as resp:
39
49
  data = resp.read(_FETCH_MAX_BYTES)