sessions
Use aiwg sessions to manage the normalized session catalog, imports, analytics, and authorized forensic evidence with versioned JSON
Discover research papers via semantic search with automated gap analysis and PRISMA-compliant documentation
$ npx -y skills add jmagly/aiwg --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/research-discoverContext preview
What this command does when you run it.
Discover research papers via semantic search with automated gap analysis and PRISMA-compliant documentation
description: Discover research papers via semantic search with automated gap analysis and PRISMA-compliant documentation category: research-management argument-hint: <query> [--preregister] [--citation-network] [--refine-from <session>] [--limit <count>] allowed-tools: Bash, Read, Write, Grep, Glob model: claude-sonnet-4-6
Execute semantic search for research papers, perform automated gap analysis, and generate PRISMA-compliant search strategies. Connects to Semantic Scholar API to find, rank, and analyze academic papers relevant to user query.
When invoked with `/research-discover <query> [options]`:
1. **Validate** search query and parameters 2. **Construct** Semantic Scholar API query with filters 3. **Execute** API search with rate limiting and error handling 4. **Rank** results by relevance, citations, venue tier, and recency 5. **Analyze** gaps in research coverage 6. **Generate** PRISMA-compliant search strategy 7. **Save** results and create acquisition queue
# Check query length and format QUERY="$1" if [ -z "$QUERY" ]; then echo "Error: Query cannot be empty" echo "Usage: aiwg research discover \"your research topic\"" exit 1 fi # Warn if query too broad WORD_COUNT=$(echo "$QUERY" | wc -w) if [ "$WORD_COUNT" -lt 3 ]; then echo "Warning: Query may be too broad. Consider adding specificity." echo "Example: 'OAuth2 security best practices' instead of 'OAuth'" fi
Build Semantic Scholar API request:
// API query construction
const apiQuery = {
query: sanitizeQuery(userQuery),
limit: options.limit || 100,
fields: [
'paperId',
'title',
'authors',
'year',
'venue',
'citationCount',
'doi',
'abstract',
'url',
'isOpenAccess'
],
sort: 'relevance',
...(options.yearRange && {
yearRange: parseYearRange(options.yearRange)
}),
...(options.venue && {
venue: options.venue
})
};**Security Note**: API keys must be loaded from environment variables or secure configuration files, never hardcoded.
bash <<'EOF'
# Load API configuration
API_KEY=$(grep 'semantic_scholar_api_key' .aiwg/research/config.yaml | awk '{print $2}')
# Construct API request
QUERY="OAuth2 security best practices"
LIMIT=100
# Execute with rate limiting (100 req/5 min)
curl -s \
-H "x-api-key: ${API_KEY}" \
"https://api.semanticscholar.org/graph/v1/paper/search?query=${QUERY}&limit=${LIMIT}&fields=paperId,title,authors,year,venue,citationCount,doi,abstract,url" \
| jq . > .aiwg/research/discovery/search-results-$(date +%s).json
EOF**Error Handling**:
Apply ranking algorithm (per BR-RF-D-002):
// Ranking weights
const WEIGHTS = {
relevance: 0.40, // Semantic similarity to query
citations: 0.30, // Impact proxy (log-scaled)
venueTier: 0.20, // A*/A/B/C conference/journal ranking
recency: 0.10 // Publication year (configurable)
};
// Compute composite score
function rankPaper(paper, query) {
const relevanceScore = computeSemanticSimilarity(paper, query);
const citationScore = Math.log10(paper.citationCount + 1) / Math.log10(1000); // Normalize
const venueScore = getVenueTier(paper.venue); // A*=1.0, A=0.8, B=0.6, C=0.4
const recencyScore = (paper.year - 1990) / (new Date().getFullYear() - 1990);
return (
relevanceScore * WEIGHTS.relevance +
citationScore * WEIGHTS.citations +
venueScore * WEIGHTS.venueTier +
recencyScore * WEIGHTS.recency
);
}Identify under-researched topics (per BR-RF-D-003):
// Gap detection algorithm
function detectGaps(papers) {
// Cluster papers by topic using citation relationships
const clusters = clusterByCitations(papers);
// Identify sparse clusters (<5 papers)
const underResearched = clusters.filter(c => c.papers.length < 5);
// Flag contradictory findings (>50% disagreement)
const contradictory = findContradictions(papers);
// Suggest missing integrations (concepts never co-occurring)
const missingIntegrations = findMissingCombinations(papers);
return {
underResearchedTopics: underResearched.map(c => c.topic),
contradictoryFindings: contradictory,
missingIntegrationsReusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Repo: jmagly/aiwg
Use aiwg sessions to manage the normalized session catalog, imports, analytics, and authorized forensic evidence with versioned JSON
Route plain-language dataset work to governed AIWG dataset orchestration
Guide schema discovery, authoring, validation, compatibility, and projections
**Date**: 2026-01-25 **Status**: Complete **Owner**: Requirements Analyst **Team**: Research Framework
Acquire research papers from acquisition queue, download PDFs, validate integrity, and organize artifacts
Package, version, and backup research artifacts following OAIS standards