xiaohongshu
xiaohongshu
corpus-analysis
Gap detection and knowledge mapping techniques for comparing BRD requirements against corpus coverage. Includes SurrealQL queries for analyzing sources, entities, and topic coverage, plus prioritization frameworks for research task generation.
Full skill instructions
This skill provides methods for analyzing corpus coverage, detecting knowledge gaps, and generating prioritized research tasks.
Analyze how research sources map to planned chapters/sections.
Questions to ask:
SurrealQL query:
-- Count sources per chapter
SELECT chapter, count() as source_count
FROM section->cites->source
GROUP BY chapter
ORDER BY source_count DESC;
Identify which characters, locations, concepts, events are well-documented vs underrepresented.
Questions to ask:
SurrealQL queries:
-- Entity mention frequency
SELECT name, count(<-supports<-source) as source_count
FROM concept
ORDER BY source_count ASC;
-- Characters with sparse descriptions
SELECT name, description, count(<-appears_in<-section) as appearances
FROM character
WHERE length(description) < 100
ORDER BY appearances DESC;
-- Locations not yet introduced
SELECT name, description
FROM location
WHERE introduced = false;
Map topics from BRD against corpus to find coverage gaps.
Questions to ask:
SurrealQL queries:
-- Topics mentioned in sources
SELECT name, count() as mentions
FROM concept<-related_to<-source
GROUP BY name
ORDER BY mentions DESC;
-- Timeline gaps (missing events)
SELECT * FROM event
ORDER BY sequence;
-- Uncited knowledge gaps
SELECT question, context, created_at
FROM knowledge_gap
WHERE resolved = false
ORDER BY created_at ASC;
Evaluate reliability distribution across the corpus.
Questions to ask:
SurrealQL queries:
-- Source reliability distribution
SELECT reliability, count() as count
FROM source
GROUP BY reliability
ORDER BY reliability DESC;
-- Sources by type
SELECT source_type, count() as count
FROM source
GROUP BY source_type;
-- Low-reliability sources supporting key concepts
SELECT
<-supports<-source.title as source_title,
<-supports<-source.reliability as reliability,
name as concept
FROM concept
WHERE <-supports<-source.reliability IN ['low', 'very low'];
Method: Compare BRD sections to corpus entities and sources.
Steps:
Example:
SELECT * FROM concept WHERE name CONTAINS 'wireless' OR name CONTAINS 'Beaulieu'Method: Identify topics mentioned in only one source.
Why it matters: Single-source claims are fragile and hard to verify.
SurrealQL:
-- Topics with only one supporting source
SELECT name, count(<-supports<-source) as source_count
FROM concept
WHERE count(<-supports<-source) = 1;
Method: Check for expected but missing graph edges.
Examples:
->knows-> relationships->located_in-> any section->precedes-> or ->follows-> temporal linksSurrealQL:
-- Characters with no relationships
SELECT name FROM character
WHERE count(->knows->character) = 0;
-- Events with no temporal ordering
SELECT name FROM event
WHERE count(->precedes->event) = 0
AND count(->follows->event) = 0;
Method: Detect chronological gaps or conflicts.
SurrealQL:
-- Events without dates
SELECT name, description
FROM event
WHERE date IS NONE;
-- Sequence gaps (e.g., 1, 2, 5, 6 — missing 3 and 4)
SELECT sequence FROM event
ORDER BY sequence;
Method: Find written sections without source citations.
SurrealQL:
-- Sections with no citations
SELECT * FROM section
WHERE count(->cites->source) = 0;
Use this framework to prioritize research tasks based on impact and urgency.
Criteria:
Examples:
Research task template:
Priority: HIGH
Blocking: [list chapter/section IDs]
Query: [specific research question]
Context: [why this is needed, what we already know]
Success criteria: [what would resolve this gap]
Criteria:
Examples:
Research task template:
Priority: MEDIUM
Blocking: [section ID]
Query: [specific research question]
Fallback: [how to proceed if research fails]
Criteria:
Examples:
Research task template:
Priority: LOW
Enhancement for: [section or theme]
Query: [research question]
**Task**: Research [specific topic]
**Priority**: [HIGH/MEDIUM/LOW]
**Blocks**: [chapter/section IDs]
**Context**:
- BRD requires: [what the BRD says]
- Corpus has: [what we currently know]
- Gap: [what's missing]
**Research questions**:
1. [Specific question 1]
2. [Specific question 2]
**Success criteria**:
- [ ] Found 2+ reliable sources on [topic]
- [ ] Extracted key facts: [list expected facts]
- [ ] Resolved knowledge_gap:[id]
**Search strategy**:
- Academic databases: [keywords]
- Primary sources: [archives, documents]
- Web search: [specific queries]
**Task**: Research [character/entity name]
**Priority**: [HIGH/MEDIUM/LOW]
**Blocks**: [section IDs]
**Context**:
- Mentioned in: [where entity appears in BRD/outline]
- Current knowledge: [what corpus has]
- Needed: [missing details]
**Research questions**:
1. Background/history: [specifics]
2. Relationships: [who/what they connect to]
3. Timeline: [when they appear, key dates]
**Success criteria**:
- [ ] CREATE/UPDATE entity with full description
- [ ] Establish relationships via RELATE statements
- [ ] Add timeline anchors (dates, sequence)
**Sources to check**:
- [Specific books, archives, websites]
**Task**: Research [theme/concept]
**Priority**: [HIGH/MEDIUM/LOW]
**Blocks**: [section IDs]
**Context**:
- BRD theme: [core theme/argument]
- Current support: [sources that touch on this]
- Gap: [missing evidence, examples, or depth]
**Research questions**:
1. [Theoretical/conceptual question]
2. [Evidence/example question]
3. [Counter-argument/complexity question]
**Success criteria**:
- [ ] Found diverse perspectives on [concept]
- [ ] Identified concrete examples/case studies
- [ ] Created concept entity with supporting sources
**Expected outcomes**:
- 3+ sources with varied reliability levels
- Clear link to BRD thesis
-- Get overview of corpus completeness
LET $total_sources = (SELECT count() FROM source)[0].count;
LET $total_characters = (SELECT count() FROM character)[0].count;
LET $total_concepts = (SELECT count() FROM concept)[0].count;
LET $open_gaps = (SELECT count() FROM knowledge_gap WHERE resolved = false)[0].count;
RETURN {
sources: $total_sources,
characters: $total_characters,
concepts: $total_concepts,
open_gaps: $open_gaps,
source_reliability: (SELECT reliability, count() as count FROM source GROUP BY reliability),
chapters_with_citations: (SELECT chapter, count() as cites FROM section->cites->source GROUP BY chapter)
};
-- Find sections with weak source support
SELECT
id,
chapter,
sequence,
count(->cites->source) as citation_count,
word_count
FROM section
WHERE count(->cites->source) < 2
ORDER BY chapter, sequence;
-- Characters without sufficient context
SELECT
name,
count(->knows->character) as relationships,
count(<-appears_in<-section) as appearances,
length(description) as desc_length
FROM character
WHERE count(->knows->character) = 0
OR length(description) < 50
ORDER BY appearances DESC;
CREATE knowledge_gap SET question=..., context=..., resolved=falseWhen performing corpus analysis, provide:
## Corpus Analysis Report
### Coverage Summary
- Total sources: [count]
- Source reliability: [high: X, medium: Y, low: Z]
- Entities extracted: [characters: X, locations: Y, events: Z]
- Open knowledge gaps: [count]
### Gaps by Priority
#### High Priority (Blocking)
1. [Gap description] — Blocks: [sections] — Research: [topic]
2. ...
#### Medium Priority
1. [Gap description] — Blocks: [sections] — Research: [topic]
2. ...
#### Low Priority
1. [Gap description] — Enhancement for: [context]
2. ...
### Recommended Next Action
[Research these high-priority gaps / Continue to plan-write / etc.]
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience