Interactive Field Guide Skill
What this skill produces
The default output is a self-contained HTML file (~110KB) with sidebar nav, full-text ⌘K search, click-to-expand drawers, a clickable SVG ecosystem map, a 2×2 strategic positioning matrix, and structured analysis across up to 22 parts.
Alternative output: a concise markdown research brief (when the user explicitly requests "brief", "markdown summary", or chooses brief at the end of Discovery mode).
Quality bar: Every fact must have a [Source: X] citation. Every judgment must be falsifiable. Every report must include explicit counter-consensus framing. Matches Net Interest, Stratechery, and CB Insights research standards.
Operating principle: this skill is a suite, not a single tool. It supports 6 operational modes and 7 analytical personas. Always resolve mode + persona + output format BEFORE generating.
Outputs are designed for sharing. Treat every artifact as something the user might forward to a colleague, post publicly, or use in a stakeholder presentation. They must be free of any conversation-participant's personal context (see Critical Rule 7).
Step 0 — Resolve operation parameters
Before doing anything, classify the user's request along three dimensions.
0a. Detect mode (what kind of operation)
| User intent / trigger phrases | Mode |
|---|---|
| "analyze X", "research X", "make a field guide on X", "study X" | Generate (default) |
| "help me think through X first", "do a discovery on X", "research dialogue", "before we generate" | Discovery |
| "review my analysis", "critique this report", "find weaknesses in X" + user provides existing analysis | Critique |
| "update my [old report]", "refresh with latest data", "let's revisit X", "复盘 my X report" + reference to prior guide | Refresh |
| "compare X and Y", "X vs Y", "head-to-head on X / Y" | Compare |
| "expand part [topic]", "deep dive on [specific subsection]", "drill into [topic from prior guide]" | Drill-down |
0b. Detect persona (analytical lens)
| User signal | Persona |
|---|---|
| (default for stocks / public companies) | Tier 2 Investor |
| (default for industry / sector analyses) | Industry Strategist |
| "as CEO", "founder POV", "operator view" | CEO |
| "venture investor", "early-stage VC", "fund-returner perspective" | Tier 1 Investor |
| "technical view", "engineer POV", "architecture analysis" | Engineer / Builder |
| "as competitor", "if I were [rival]", "adversarial view" | Competitor |
| "what could kill this", "disruption risk", "5-year obsolescence scan" | Disruption Scout |
0c. Detect output format
Default: HTML field guide (interactive, 110KB).
Override to markdown research brief when:
- User explicitly says "brief", "markdown summary", "just the research foundation", "no HTML"
- User chose "brief only" at the end of Discovery dialogue
- Critique mode (always markdown; HTML doesn't apply)
0d. Decide: proceed immediately, or ask first?
Proceed immediately and announce when:
- Mode is clearly stated or strongly implied
- Persona is the topic-type default (Tier 2 for stocks, Industry Strategist for sectors)
- Output format is HTML (default)
- Topic is concrete (specific company, industry, ecosystem)
In this case, briefly tell the user: "Got it — running [mode] on [topic] with [persona] lens, output as [format]. Proceeding." Then execute. The user can interrupt if you've misread their intent.
Ask one concise clarifying question and WAIT for response when:
- Mode is ambiguous between Generate and Discovery
- User said "compare" but only named one entity
- User said "refresh" but didn't provide the prior report
- User said "drill into [vague subsection]" with no parent guide referenced
- Persona is unusual for the topic type (e.g. CEO persona on a public company they don't run)
Phrase the question as a single short ask: "To make sure I read this right — [specific clarifying question]?" Wait for the user's reply before proceeding.
Do not invent a function call name (e.g. avoid "AskUserQuestion()"). Just ask in plain text.
Step 1 — Load mode workflow
Read references/modes.md and find the section for the resolved mode. Each mode has its own multi-step workflow with specific dialogue patterns, output format, and validation rules.
Step 2 — Load persona lens
Read references/personas.md and find the section for the resolved persona. Each persona defines:
- Obsessive questions the analysis must answer
- Prioritized source tiers
- Topical emphasis (which themes to expand vs compress)
- Tone and rhetorical framing
Note: personas describe the LENS, not specific section numbers. Map the persona's emphasis topics onto whatever 22-part structure is current in references/structure.md.
Step 3 — Load shared references
For modes producing HTML output (Generate / Refresh / Compare / Drill-down), load:
references/structure.md— 22-part menu with skip rules by topic typereferences/content-strategy.md— sourcing standards (Tier 1-3), counter-consensus framework, falsifiability rulesreferences/data-schemas.md— JS object schemas + component HTML patternsreferences/pitfalls.md— known pitfalls + 9-check validation script (includes Template Wiring, Personalization Leakage, Accordion Double-binding)
For modes producing markdown output (Critique, Discovery brief-only), load only:
references/content-strategy.mdreferences/pitfalls.md
Step 4 — Execute workflow
Follow the mode's workflow step by step. Apply the persona's lens at each judgment point. Use assets/template.html as the rendering base for HTML outputs — surgically replace pre-populated content; do NOT rebuild from scratch (see Critical Rule 6 below).
Step 5 — Validate
For HTML outputs: run the 11-check validation script from references/pitfalls.md. Iterate up to 3 times to fix issues. Only deliver after passing all 11 checks.
Mandatory visibility: output the 11-check results as a visible code block in the response to the user, in the form:
=== 11-check validation results ===
1. Template instruction strip: ✓
2. Placeholder strip: ✓
...
11. Reverse grep (HTML→JS): ✓
=== Result: 11/11 passed, OK to deliver ===
The visibility requirement (Rule 10a) prevents silent skipping — if the validation block is missing from the response, the user knows something was bypassed.
The 11 checks cover:
- Template instruction strip
- Placeholder strip
- JS validity (static syntax)
- ID consistency (CN_NODES / data-id / DETAIL_DATA)
- Constellation count
- Sidebar consistency
- Template wiring integrity (added v3.0.1)
- Personalization leakage (added v3.0.2)
- Accordion event handler integrity (added v3.0.2)
- 9b. JS ↔ HTML ID matching (added v3.1.1): zero orphan IDs
- Runtime execution sanity (added v3.1.1): use node
vmsandbox to catch TypeError / ReferenceError / infinite loops at script init - Reverse grep — HTML→JS (added v3.1.1): when removing HTML elements, verify no remaining JS reference to that ID/class
Plus Rule 10 production contract: ≥15 Parts, 5 hard-floor interactions working, TOC visible (sidebar + top-nav + progress-bar), continuous Roman numerals, Part Coverage Audit present.
For markdown outputs (Critique, brief): self-review against content-strategy.md standards — every claim sourced, every judgment falsifiable, counter-consensus angle present. Also run personalization leakage check (#8).
Step 6 — Deliver (cross-platform)
Detect the runtime environment and write the output appropriately:
Filename convention:
- Generate / Discovery / Drill-down:
<topic-slug>-field-guide.html(or.mdfor brief) - Refresh:
<topic-slug>-field-guide-refresh-<YYYY-MM-DD>.html - Compare:
<topic-A>-vs-<topic-B>-comparison.html - Critique:
<topic-slug>-critique.md
Filename must NOT contain personal names (no `klay-bytedanc