From greenfield
Extracts behavioral specifications from public documentation using a 3-tier search sequence, claim extraction rules, and gap analysis. Useful for researching product behavior.
How this skill is triggered — by the user, by Claude, or both
Slash command
/greenfield:doc-researchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill defines the complete methodology for extracting behavioral specifications from public documentation. Follow it step by step. Every section is normative.
This skill defines the complete methodology for extracting behavioral specifications from public documentation. Follow it step by step. Every section is normative.
Search proceeds from most authoritative to least authoritative. Execute every pattern in each tier before moving to the next tier.
digraph search_sequence {
rankdir=TB;
"Start documentation research" [shape=doublecircle];
"Search Tier 1: Official documentation" [shape=box];
"Traverse full official site structure" [shape=box];
"Search Tier 2: Machine-readable specs" [shape=box];
"Search Tier 3: Community knowledge" [shape=box];
"Diminishing returns?" [shape=diamond];
"Page budget exhausted?" [shape=diamond];
"Write claims file and gaps file" [shape=box];
"Run gap analysis by product type" [shape=box];
"Research complete" [shape=doublecircle];
"Start documentation research" -> "Search Tier 1: Official documentation";
"Search Tier 1: Official documentation" -> "Traverse full official site structure";
"Traverse full official site structure" -> "Search Tier 2: Machine-readable specs";
"Search Tier 2: Machine-readable specs" -> "Search Tier 3: Community knowledge";
"Search Tier 3: Community knowledge" -> "Diminishing returns?";
"Diminishing returns?" -> "Write claims file and gaps file" [label="yes"];
"Diminishing returns?" -> "Page budget exhausted?" [label="no"];
"Page budget exhausted?" -> "Write claims file and gaps file" [label="yes"];
"Page budget exhausted?" -> "Search Tier 3: Community knowledge" [label="no, continue"];
"Write claims file and gaps file" -> "Run gap analysis by product type";
"Run gap analysis by product type" -> "Research complete";
}
official-docs)Execute these search patterns in order. Replace {product} with the target product name and {domain} with the official domain if known.
| # | Search Pattern | Purpose |
|---|---|---|
| 1 | {product} documentation | Main documentation site |
| 2 | {product} API reference | API surface |
| 3 | {product} getting started | Installation, first run, quick setup |
| 4 | {product} configuration reference | Config files, keys, defaults |
| 5 | {product} CLI reference | Commands, flags, arguments |
| 6 | {product} changelog | Version history, behavioral changes |
| 7 | {product} release notes | Feature additions, breaking changes |
| 8 | {product} migration guide | Version-to-version behavioral differences |
| 9 | {product} FAQ | Common behavioral questions and answers |
| 10 | {product} troubleshooting | Error conditions and resolutions |
| 11 | {product} security | Auth, encryption, permissions |
| 12 | site:{domain} {product} | Catch pages not found by keyword search |
After finding the official documentation site, traverse its full structure:
official-docs)Execute the patterns relevant to the target product type. Not all patterns apply to all products.
| # | Search Pattern | Applies When |
|---|---|---|
| 1 | {product} openapi or {product} swagger | Product has a REST API |
| 2 | {product} graphql schema | Product has a GraphQL API |
| 3 | {product} protobuf or {product} grpc | Product uses protocol buffers |
| 4 | {product} json schema | Product defines data formats |
| 5 | {product} man page | Product is a CLI tool on Unix |
| 6 | {product} --help | Product is a CLI tool |
| 7 | {product} wsdl | Product has a SOAP API |
Machine-readable specs are higher value than prose because they are precise and unambiguous. When a machine-readable spec exists, it takes precedence over prose documentation for the same topic.
community-knowledge)| # | Search Pattern | Purpose |
|---|---|---|
| 1 | {product} site:stackoverflow.com | Community Q&A about behavior |
| 2 | {product} site:github.com discussions | Maintainer and community discussions |
| 3 | {product} blog (filter for maintainer blogs) | Design rationale, behavioral explanations |
| 4 | {product} tutorial (filter for expert content) | Practical behavioral descriptions |
Community sources are valuable for:
confirmed)Community sources are NOT authoritative for:
When the same behavioral information appears in multiple sources, prefer:
Retry-After header. If no header is present, wait 30 seconds.gaps.md and move on.api-reference.md).gaps.md with the note "dynamic rendering -- content not extractable via WebFetch."gaps.md.gaps.md.Default limit: 50 pages per agent run. Prioritize Tier 1 official reference pages. If the budget is exhausted before all pages are fetched, record remaining URLs in gaps.md for a follow-up run.
A behavioral claim is a statement that asserts something observable about the target's behavior. You are extracting these from prose and converting them into structured, citable claims.
Extract these claim types:
| Claim Type | What to Look For | Example |
|---|---|---|
| Action-response | "When you do X, Y happens" | Running init creates a config file at ~/.tool/config.json |
| Data format | JSON schemas, field names, types, structures | Response body contains {"id": string, "status": enum} |
| Constraint/limit | Maximums, minimums, quotas, restrictions | File uploads limited to 100MB |
| Default value | What happens when the user does not configure something | Default timeout is 30 seconds |
| Error condition | What triggers an error and what the error looks like | Non-existent resource returns HTTP 404 with {"error": "not_found"} |
| State transition | How the system moves between states | Session moves from active to expired after 24 hours of inactivity |
| Execution sequence | Ordering guarantees, step-by-step processes | Authentication check runs before authorization check |
| Configuration effect | What a config option changes about behavior | Setting DEBUG=true enables verbose logging to stderr |
| Algorithm/processing | How the system transforms data | Passwords are hashed using bcrypt with cost factor 12 |
| Timing value | Timeouts, intervals, durations, TTLs | Rate limit resets every 60 seconds |
Skip these non-claims:
| Skip | Why | Example |
|---|---|---|
| Marketing copy | Not behavioral | "Best-in-class performance" |
| Vague descriptions | Not testable | "Robust security features" |
| Future plans | Not current behavior | "We plan to add WebSocket support" |
| Design motivation | Informational, not normative | "We chose this approach because..." |
| History | Informational | "In previous versions, this worked differently" |
| Redundant restatements | Already extracted | Same claim restated in tutorial after being extracted from API reference |
Documentation contains both normative content (what the product DOES) and informational content (context, history, motivation). Extract only normative content.
Normative indicators -- EXTRACT:
Informational indicators -- SKIP:
When two documentation pages state different things about the same behavior:
- Default timeout is 30 seconds
<!-- cite: source=official-docs, ref=https://docs.example.com/config#timeout, confidence=inferred, agent=doc-researcher -->
<!-- contradiction: https://docs.example.com/quickstart claims 60 seconds -->
/docs/v2/), or version badges.inferred and add a note: "documented for v{X}, target is v{Y}."When the same behavioral claim appears on multiple pages:
corroborated_by to escalate confidence.workspace/public/docs/raw/)One file per topic area. Multiple pages about the same topic merge into one raw file.
# {Topic Name}
## Source
- **URL:** {primary source URL}
- **Additional URLs:** {other pages merged into this file}
- **Fetched:** {ISO 8601 timestamp}
- **Doc version:** {version if identifiable, otherwise "assumed latest"}
## Content Summary
[Concise structured extraction of key information from this topic area.
NOT verbatim reproduction. Organized by subtopic.]
## Key Behavioral Claims
- {claim text}
<!-- cite: source=official-docs, ref={URL}#{section}, confidence={level}, agent=doc-researcher -->
- {claim text}
<!-- cite: source=official-docs, ref={URL}#{section}, confidence={level}, agent=doc-researcher -->
workspace/public/docs/claims/claims-by-topic.md)The primary output. All behavioral claims organized by topic with full provenance.
# Behavioral Claims from Public Documentation
## Metadata
- **Target:** {product name}
- **Agent:** doc-researcher
- **Date:** {ISO 8601}
- **Total claims:** {count}
- **By confidence:** confirmed: {n}, inferred: {n}, assumed: {n}
- **Sources consulted:** {n} documentation pages, {n} community resources
---
## {Topic Area 1}
### CLAIM-DOC-001: {Short Descriptive Title}
{One or two sentences stating the behavioral claim precisely.}
<!-- cite: source={source-type}, ref={URL}, confidence={level}, agent=doc-researcher -->
### CLAIM-DOC-002: {Short Descriptive Title}
{Claim text.}
<!-- cite: source={source-type}, ref={URL}, confidence={level}, agent=doc-researcher -->
---
## {Topic Area 2}
### CLAIM-DOC-003: {Short Descriptive Title}
{Claim text.}
<!-- cite: source={source-type}, ref={URL}, confidence={level}, agent=doc-researcher -->
Claim ID format: CLAIM-DOC-{NNN} where NNN is a zero-padded three-digit sequence. IDs are assigned in the order claims are written and are never reused.
workspace/public/docs/gaps.md)# Documentation Gaps
## Metadata
- **Target:** {product name}
- **Agent:** doc-researcher
- **Date:** {ISO 8601}
- **Topics documented:** {n}
- **Topics expected but missing:** {n}
---
## Missing Documentation
### GAP-001: {Topic}
**Expected:** {what documentation should exist for this topic}
**Found:** {what was actually found, or "No documentation found"}
**Impact:** {what analysis mode or manual effort could fill this gap}
---
## Authenticated Documentation (Skipped)
| URL | Auth Type | Notes |
|-----|-----------|-------|
## Non-English Documentation (Skipped)
| URL | Language | Notes |
|-----|----------|-------|
## Unfetched Pages (Budget Exhausted)
| URL | Reason | Priority |
|-----|--------|----------|
## Documentation Contradictions
| Topic | Page A | Page B | Contradiction |
|-------|--------|--------|---------------|
Stop the research process when ALL of the following are true:
If the page budget (50 pages) is reached before these criteria are met, stop fetching but still write the claims and gaps files from what was gathered. Record the unmet criteria in gaps.md.
After all extraction is complete, assess documentation completeness by comparing what you found against what a complete documentation suite should include for the target product type.
CLI tool:
Web API / REST service:
Library / SDK:
Desktop / mobile application:
For each expected topic that is missing or insufficiently documented, create a GAP entry in gaps.md. Note which other intelligence source (SDK analysis, runtime observation, source code analysis) could fill the gap.
This section restates the rules from the provenance-methodology skill as they apply specifically to documentation research. Follow both this section and the full provenance-methodology skill.
Every time you write a behavioral claim, the very next thing you write is the citation. Do not batch citations. Do not defer them. Write the claim, write the citation, then move on.
<!-- cite: source={source-type}, ref={URL}, confidence={level}, agent=doc-researcher -->
official-docs for: official documentation pages, README files, man pages, API references, changelogs, published standards, RFCscommunity-knowledge for: Stack Overflow answers, GitHub Discussions, third-party blog posts, tutorials by non-maintainers, conference talksconfirmed: Two or more independent sources agree on the same behavioral claim. Example: official docs state a timeout is 30 seconds AND a Stack Overflow answer with maintainer confirmation says the same.inferred: One authoritative source states the claim and nothing contradicts it. This is the most common confidence level for doc-researcher output.assumed: No direct source states this, but it follows from convention or reasoning. Rare for this agent. If you find yourself writing many assumed claims, you may be speculating rather than extracting.When official documentation references a standard or RFC:
official-docs (the documentation itself is the source; the standard is additional context).2plugins reuse this skill
First indexed Jul 8, 2026
npx claudepluginhub earchibald/prime-radiant-marketplace --plugin greenfieldGathers behavioral specifications from community content (tutorials, forums, issues) to fill gaps in official documentation. Use when docs are incomplete.
Collects and ranks multi-source technical information (docs, GitHub, Stack Overflow, papers, blogs) before writing PRDs, ADRs, docs, or articles. Outputs a ranked source dossier to memory/research/.
Researches named libraries, frameworks, SDKs, APIs, and services by walking a 5-tier source ladder from official docs to community threads, citing every claim.