Skip to content

Instantly share code, notes, and snippets.

@matejaputic
Created April 28, 2026 05:18
Show Gist options
  • Select an option

  • Save matejaputic/07078c287cdab700311c409fbfa0d523 to your computer and use it in GitHub Desktop.

Select an option

Save matejaputic/07078c287cdab700311c409fbfa0d523 to your computer and use it in GitHub Desktop.
tech-research Deep Software Research Skill for Pi Coding Agent

Subagent Role Contracts

Each template below is a complete, self-contained contract for one research role. If you were dispatched here by tech-research, read only the section matching your role — you DO NOT need to read SKILL.md. The orchestrator already analyzed the question and chose your parameters.

Universal Output Contract

Every subagent MUST return two sections in their report:

A. Quantitative Signals Table

Each row: metric name, raw value, baseline/reference point, interpretation.

Baselines contextualize raw numbers — "500 stars" means nothing alone; "500 stars — top 5% for Rust ORMs" is actionable. Derive baselines from:

  • Category norms discovered during research (e.g., "popular Rust web frameworks have 2k-15k stars")
  • Peer comparison (versus other candidates in the same search)
  • Temporal trends (e.g., "200 issues/month, up from 50/month 6 months ago")
  • Industry thresholds (e.g., ">90% issue close rate is excellent, <50% is concerning")

B. Qualitative Assessment

Narrative analysis of intangible factors. Every claim MUST cite specific evidence: URL, username, date, quote, or data point. NO ungrounded assertions.

Use the format:

  • Claim → evidence (URL or specific data) → implication for the research question
  • Each qualitative finding must state confidence level: High (multiple corroborating sources), Medium (1-2 credible sources), Low (inference from indirect signals)

Budget Guidance

Subagents operate under context and tool-call constraints. Stay within these bounds:

Role Max tool calls Notes
Developer Sentiment 8-10 3-4 web_search, 3 read for deep-reading, 1-2 github searches
DeepWiki 5-7 Max 5 ask_question calls; use multi-repo queries when comparing
Web Intelligence 6-8 3-4 web_search, 2-3 read for deep-reading
Repo Quality 8 per repo Combine searches where possible; max 3 repos in depth

If comparing >3 candidates, focus depth on the top 3 based on initial signals (stars, recent activity, download counts). Mention remaining candidates briefly.


Developer Sentiment Subagent

Role contract — self-contained. DO NOT read SKILL.md.

Parameters you will receive from the orchestrator:

  • RESEARCH_QUESTION — the topic to investigate
  • SENTIMENT_QUERIES — pre-crafted search queries

Tools: web_search, github search_issues, github search_prs, read

Scope boundary: When researching a specific repo, focus on cross-repo mentions — discussions in other repos, Reddit, HN, forums, and blogs that reference the target. Do NOT query the target repo's own issues/PRs (that's a separate subagent's job).

Step 1: Search Developer Communities

Execute web searches scoped to developer discussion platforms. Elaborate, re-interpret, and re-contextualize RESEARCH_QUESTION with several distinct perspectives to enhance search coverage.

  1. Reddit: web_search for "[topic] site:reddit.com", "[topic] site:reddit.com inurl:r/programming", etc. — developer experience posts, comparison threads
  2. Hacker News: web_search for "[topic] site:news.ycombinator.com" — technical discussions, developer experience, praise, and gripes, etc.
  3. Forums/Blogs: web_search for "[topic] developer experience", "[topic] migration", "[topic] discussions", "[topic] inurl:forum", "[topic] inurl:thread", etc.
  4. GitHub Discussions: web_search for "[topic] site:github.com/discussions", etc.
  5. GitHub Issues: github search_issues with repo:[relevant-repo] [topic keywords] — real bug reports, feature requests, developer frustrations
  6. GitHub PRs: github search_prs for adoption patterns — PRs migrating from one tool to another

Step 2: Deep-Read Promising Results

Use read to fetch full content from the most promising URLs (Reddit threads, HN discussions, detailed blog posts). Extract specific quotes, usernames, dates, and context.

Step 3: Report

Return findings following the Universal Output Contract:

A. Quantitative Signals Table:

Metric Value Baseline Interpretation
Mention count (Reddit) N posts vs peer topics
Mention count (HN) N posts vs peer topics
Sentiment ratio +N / -N / ~N positive/negative/neutral
Most recent discussion date recency of community interest
GitHub issues mentioning topic N developer engagement level

B. Qualitative Assessment:

  • Developer pain points — with source URL and date
  • Migration stories — who moved from/to what, and why (with citations)
  • Community enthusiasm or fatigue signals
  • Notable endorsements or warnings from recognized developers
  • Each finding with confidence level (High/Medium/Low)

DeepWiki Subagent

Role contract — self-contained. DO NOT read SKILL.md.

Parameters you will receive from the orchestrator:

  • RESEARCH_QUESTION — the topic to investigate
  • REPO_LIST — one or more owner/repo strings
  • CUSTOM_QUESTIONS — optional topic-specific questions

Tools: mcp__deepwiki_ask_question, read

IMPORTANT: Do NOT use mcp__deepwiki_read_wiki_structure or mcp__deepwiki_read_wiki_contents. Always use mcp__deepwiki_ask_question directly — it provides faster, more focused answers without needing to browse the wiki structure first.

Step 1: Ask Targeted Questions

Call mcp__deepwiki_ask_question with focused questions:

  • "What is the overall architecture of this repository?"
  • "What are the core APIs and how do they work?"
  • "What design patterns does this codebase use?"
  • "How does [specific feature] work internally?"
  • CUSTOM_QUESTIONS — specific to the research topic

If comparing repos, ask parallel questions to enable direct comparison.

Step 1b: Fallback if DeepWiki Returns No Results

If mcp__deepwiki_ask_question returns empty, unhelpful, or generic results for a repo:

  1. Use read on https://github.com/{owner}/{repo} to browse the repo landing page and README
  2. Use read on key source directories (e.g., https://github.com/{owner}/{repo}/tree/main/src) to understand structure
  3. Synthesize findings from direct source inspection instead

Step 2: Report

Return findings following the Universal Output Contract:

A. Quantitative Signals Table:

Metric Value Baseline Interpretation
Codebase modules/packages N vs similar projects complexity indicator
Dependency count N vs peer projects supply chain surface
API surface area N exports/endpoints breadth of interface
Architecture layers N structural complexity

B. Qualitative Assessment:

  • Architectural patterns used — and whether they follow conventional modern best practices (with DeepWiki evidence)
  • Code organization quality — module boundaries, separation of concerns
  • Abstraction quality — leaky abstractions, over-engineering, or well-designed interfaces
  • Idiomatic usage — does it follow language/ecosystem conventions?
  • Each finding grounded in specific DeepWiki references with cited evidence
  • Confidence level per finding (high/medium/low)

Comparison (if applicable)

Aspect Repo A Repo B
Architecture [finding] [finding]
API Design [finding] [finding]
Code Quality [finding] [finding]

Web Intelligence Subagent

Role contract — self-contained. DO NOT read SKILL.md.

Parameters you will receive from the orchestrator:

  • RESEARCH_QUESTION — the topic to investigate
  • TOPIC — keyword form for search queries
  • CURRENT_YEAR — for recency-scoped searches

Tools: web_search, read

Step 1: Search

Execute web_search queries:

  1. "[TOPIC] comparison [CURRENT_YEAR]"
  2. "[TOPIC] benchmark performance"
  3. "[TOPIC] vs [ALTERNATIVE] pros cons"
  4. "[TOPIC] official documentation"
  5. "[TOPIC] tutorial getting started [CURRENT_YEAR]"

Step 2: Deep-Read

Use read to fetch full content from the most authoritative results — official docs, detailed benchmarks, well-researched comparison articles. Extract concrete data points.

Step 3: Report

Return findings following the Universal Output Contract:

A. Quantitative Signals Table:

Metric Value Baseline Interpretation
pypi downloads / npm weekly downloads / crates.io downloads N vs peer packages adoption level
Bundle size N KB vs alternatives
Benchmark result N ops/sec vs alternatives, with methodology
Version release frequency N/year maintenance cadence
Documentation coverage qualitative

B. Qualitative Assessment:

  • Expert recommendations — with author credentials and URL
  • Comparative analysis conclusions from authoritative sources — cited
  • Known limitations or gotchas documented in official or third-party sources — cited
  • Each finding with confidence level (High/Medium/Low)

Sources

  • Title — what was extracted
  • Title — what was extracted

Repo Quality Assessment Subagent

Role contract — self-contained. DO NOT read SKILL.md.

Parameters you will receive from the orchestrator:

  • RESEARCH_QUESTION — the topic to investigate
  • REPO_LIST — one or more owner/repo strings to evaluate

Tools: github repo_view, github search_issues, github search_prs, read

Scope boundary: You own all queries scoped to the target repo itself — its issues, PRs, metadata, and source. Cross-repo mentions and community sentiment are handled by the Developer Sentiment subagent.

Mission

Systematically mine GitHub data to assess repository health, code quality, maintenance status, and community standards. Follow the 5-step protocol below for each repo in REPO_LIST.

Step 1 — Repo Metadata

For each repo, use github repo_view to collect:

  • Stars, forks, watchers
  • Description, topics/tags
  • License type
  • Last push date

Step 2 — Maintenance Health

Use github search_issues and search_prs:

  • Recent issue activity: repo:{owner}/{repo} is:issue created:>YYYY-MM-DD (last 90 days)
  • Issue responsiveness: repo:{owner}/{repo} is:issue is:closed ratio vs repo:{owner}/{repo} is:issue is:open
  • Stale issues: repo:{owner}/{repo} is:issue is:open updated:<YYYY-MM-DD (no activity 6+ months)
  • PR merge rate: repo:{owner}/{repo} is:pr is:merged vs repo:{owner}/{repo} is:pr is:closed
  • Recent PR activity: repo:{owner}/{repo} is:pr created:>YYYY-MM-DD (last 90 days)
  • Release cadence: search for release-related PRs or tags

Step 3 — Code Quality Signals

Use read to inspect repo contents via GitHub URLs:

  • CI config: check .github/workflows/ — has CI?
  • Linting/formatting config: .eslintrc, biome.json, .prettierrc, rustfmt.toml, etc.
  • Type safety: tsconfig.json strict mode
  • Test presence: test/, __tests__/, spec/ directories
  • Dependency health: package.json / Cargo.toml

Step 4 — Community & Standards

Use github search_issues, search_prs, and read:

  • Contributing guidelines: CONTRIBUTING.md, CODE_OF_CONDUCT.md
  • Issue templates: .github/ISSUE_TEMPLATE/
  • PR review culture: repo:{owner}/{repo} is:pr is:merged review:approved
  • Documentation quality: README completeness, API docs, examples
  • Security practices: repo:{owner}/{repo} is:issue label:security, Dependabot/Renovate PRs

Step 5 — Report

Return findings following the Universal Output Contract:

A. Quantitative Signals Table (for each repo):

Metric Value Baseline Rating
Stars N "Top X% for [category]" or vs peers
Last commit date "<30d=Active, 30-180d=Maintained, >180d=Stale, >365d=Abandoned"
Issue close rate N% ">80% excellent, 50-80% adequate, <50% concerning"
Median issue response time Nd "<7d=responsive, 7-30d=moderate, >30d=slow"
PR merge rate N% vs peer repos
Open issues (stale >6mo) N "<10% of total=healthy, >30%=warning"
Has CI Y/N expected for production-grade
Has linting/formatting Y/N expected for modern projects
Has type checking (strict) Y/N expected for TS projects
Test directory present Y/N expected for any serious project
License type permissive preferred for most use cases
CONTRIBUTING.md Y/N expected for community projects
Release cadence N/year vs peer repos

B. Qualitative Assessment:

  • Maintainer engagement patterns — with evidence (specific issue/PR links)
  • PR review culture — with evidence
  • Documentation completeness — with evidence
  • Security posture — with evidence
  • Each finding with confidence level (High/Medium/Low)

Flag explicitly:

  • No license
  • Abandoned (no commits in 12+ months)
  • No tests
  • Known security issues

Green flags to highlight:

  • Regular release cadence
  • Responsive maintainers
  • Strict typing / verification
  • Comprehensive CI

When comparing multiple candidates, output a ranked comparison table with per-dimension ratings.

name tech-research
description Comprehensive technical research by combining multiple intelligence sources — Developer Sentiment (Reddit, HN, forums, GitHub discussions via web_search/github/read), DeepWiki (AI-powered GitHub repository analysis), Web Intelligence (docs, benchmarks, blogs via web_search/read), and Repo Quality Assessment (systematic GitHub repository health evaluation via github/read). Dispatches parallel subagents for each source and synthesizes findings into a unified report with quantitative comparison matrix and ranked recommendations. Use when evaluating technologies, comparing libraries/frameworks, researching GitHub repos, gauging developer sentiment, or investigating technical architecture decisions. Trigger phrases include "tech research", "research this technology", "compare libraries", "evaluate framework", "investigate repo".

Tech Research

Orchestrate multi-source technical research by dispatching parallel subagents to gather intelligence from developer communities (via web search and GitHub), GitHub repositories (via DeepWiki), the web (via search and URL fetching), and repository health metrics (via GitHub API). Synthesize all findings into a single actionable report with quantitative comparison matrix and ranked recommendations.

When to Use

  • "Find a high-quality tool/framework that does X"
  • Evaluating a technology, library, or framework for adoption
  • Comparing alternatives (e.g., "Zustand vs Jotai vs Redux")
  • Investigating a GitHub repo's architecture and community reception
  • Gauging developer sentiment on a new API, tool, or announcement

Research Sources

Source Tools What It Provides Best For
Developer Sentiment web_search, github (search_issues, search_prs), read Real developer opinions from Reddit, HN, forums, GitHub issues/PRs Sentiment, expert discovery, pain points, migration stories
DeepWiki mcp__deepwiki_ask_question AI-powered repo analysis, architecture, API docs. ONLY use mpc__deepwiki_ask_question — NEVER use mcp__deepwiki_read_wiki_structure or mcp__deepwiki_read_wiki_contents (they return massive dumps that easily exceed context limits) Understanding codebases, comparing repo internals
Web Intelligence web_search, read Official docs, blog posts, benchmarks, tutorials Facts, performance data, official announcements
Repo Quality Assessment github repo_view, github search_issues, github search_prs, read Maintenance health, code quality signals, community standards, release cadence Systematic evaluation and ranked comparison of candidate repositories

Source Degradation

All sources use always-available tools (web_search, github, read, mcp__deepwiki_ask_question). DeepWiki requires knowing the owner/repo — skip it if no specific repo is identified. If any source returns no useful results, note the gap in the report and proceed with remaining sources.

Minimum viable research: At least one source must return results. If all sources fail, report the failures and suggest the user refine their query.

Developer Sentiment Query Strategies

Expert/Community Discovery

  • web_search for "[topic] site:reddit.com" and "[topic] site:news.ycombinator.com"
  • github search_issues for discussions mentioning the topic in relevant repos
  • read to fetch promising Reddit/HN URLs for full thread content

Technology Selection

  • web_search for comparison posts: "[X] vs [Y] reddit", "[X] vs [Y] experience"
  • github search_prs for adoption patterns: PRs migrating from one tool to another

Repo Quality Assessment Protocol

Systematic GitHub mining procedure for evaluating candidate repositories:

Step 1 — Repo Metadata (via github repo_view)

  • Stars, forks, watchers as baseline popularity signals
  • Default branch, description, topics/tags
  • License type (permissive vs copyleft vs none)
  • Last push date — staleness indicator

Step 2 — Maintenance Health (via github search_issues + search_prs)

  • Recent issue activity: repo:{owner}/{repo} is:issue created:>YYYY-MM-DD (last 90 days) — volume
  • Issue responsiveness: is:issue is:closed ratio vs is:issue is:open — maintainer responsiveness
  • Stale issues: repo:{owner}/{repo} is:issue is:open updated:<YYYY-MM-DD (no activity 6+ months) — abandonment signal
  • PR merge rate: repo:{owner}/{repo} is:pr is:merged vs is:pr is:closed — how welcoming to contributions
  • Recent PR activity: repo:{owner}/{repo} is:pr created:>YYYY-MM-DD (last 90 days) — active development signal
  • Release cadence: search for release-related PRs or tags

Step 3 — Code Quality Signals (via read on repo URLs)

  • CI config: read https://github.com/{owner}/{repo}/blob/main/.github/workflows/ — has CI?
  • Linting/formatting config: look for .eslintrc, biome.json, .prettierrc, rustfmt.toml, etc.
  • Type safety: tsconfig.json strict mode, type coverage
  • Test presence: read repo structure for test/, __tests__/, spec/ directories
  • Dependency health: read package.json / Cargo.toml — outdated deps, pinning strategy

Step 4 — Community & Standards (via github search_issues + search_prs)

  • Contributing guidelines: check for CONTRIBUTING.md, CODE_OF_CONDUCT.md
  • Issue templates: check .github/ISSUE_TEMPLATE/
  • PR review culture: repo:{owner}/{repo} is:pr is:merged review:approved — PRs require reviews?
  • Documentation quality: README completeness, API docs, examples
  • Security practices: repo:{owner}/{repo} is:issue label:security or label:CVE, Dependabot/Renovate PRs

Step 5 — Ranking Criteria (synthesized by subagent)

  • Assign qualitative ratings (Active/Maintained/Stale/Abandoned) based on last push + issue/PR activity
  • Flag red flags: no license, no CI, no tests, zero recent activity, massive open issue backlog
  • Flag green flags: regular releases, responsive maintainers, strict typing, comprehensive CI
  • Output a structured comparison table when evaluating multiple candidates

Workflow

Three phases: Analyze the research question into per-source sub-queries, Dispatch parallel subagents, and Synthesize findings into a unified report.

1. Analyze the Research Question

Break the user's question into sub-queries for each source:

  • Developer Sentiment query: Developer opinions, community sentiment, pain points, migration stories
  • DeepWiki query: Repository architecture, API design, code quality (requires owner/repo)
  • Web Intelligence query: Official docs, benchmarks, comparisons, recent announcements
  • Repo Quality Assessment query: Maintenance health, code quality signals, community standards

Deduplication boundary: When researching a specific repo, the Sentiment subagent searches for mentions of the repo in other repos and communities (cross-repo signal). The Repo Quality subagent owns all queries scoped to the target repo itself. This avoids duplicate github searches.

Not every research task needs all 4 sources. Select sources based on the question:

Research Type Sentiment DeepWiki Web Intel Repo Quality
"Should we use library X?" Yes Yes (if OSS) Yes Yes
"What are devs saying about X?" Yes No Maybe No
"How does repo X work internally?" No Yes Maybe Maybe
"Compare X vs Y performance" Maybe Yes (both) Yes Yes (both)
"What's new in framework X?" Yes No Yes No

2. Dispatch Research Subagents

Use the OMP task tool to dispatch up to 4 parallel subagents. Each subagent reads its role contract from references/subagent_templates.md — DO NOT inline the full template into the dispatch prompt. The context field MUST include the universal output contract (see subagent_templates.md). All subagents MUST use agent: "task"explore agents lack access to github and mcp_deepwiki_* tools required by these roles.

Use the task tool with the following structure:

Shared context — include the research question and the Universal Output Contract (from references/subagent_templates.md). Add the constraint: "DO NOT read SKILL.md — your assignment is self-contained."

Per-subagent assignment — each assignment MUST:

  1. Tell the subagent to read skill://tech-research/references/subagent_templates.md and follow the section matching its role
  2. Provide the role-specific parameters (queries, repo list, topic keywords, etc.)

Subagent dispatch summary:

Task ID Role Key Parameters
SentimentResearch Developer Sentiment Subagent RESEARCH_QUESTION, SENTIMENT_QUERIES
DeepWikiResearch DeepWiki Subagent RESEARCH_QUESTION, REPO_LIST, CUSTOM_QUESTIONS
WebIntelResearch Web Intelligence Subagent RESEARCH_QUESTION, TOPIC, CURRENT_YEAR
RepoQualityResearch Repo Quality Assessment Subagent RESEARCH_QUESTION, REPO_LIST

3. Synthesize and Report

After all subagents return, merge findings into a unified report:

  • TL;DR — 2-3 sentence executive summary with clear recommendation
  • Master Comparison Matrix — Merge all subagent quantitative tables into one unified table, one row per candidate, columns grouped by source
  • Developer Sentiment — Key opinions with source attribution and URLs
  • Repository Analysis (from DeepWiki) — Architecture, code quality, API design, maintenance status
  • Web Intelligence — Official docs, benchmarks, blog insights, announcements
  • Repository Quality Assessment — Health metrics, code quality signals, maintenance ratings per repo
  • Qualitative Synthesis — Cross-referenced narrative combining all subagent assessments, noting where sources agree/disagree, with all citations preserved
  • Ranked Recommendation — Ordered list of candidates with explicit rationale citing specific quantitative thresholds and qualitative evidence
  • Limitations — What couldn't be verified, including skipped sources and why

Tips

  • DeepWiki accepts up to 10 repos in a single query for comparisons
  • Include current year in web search queries for recent results
  • Launch subagents in parallel to minimize total research time
  • When comparing alternatives, always include the Repo Quality Assessment source for systematic evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment