gsd-doc-classifier

gsd-doc-classifier is an agent for Claude Code from open-gsd/gsd-core. It costs 63 tokens per session (2,340 once invoked), scanned A, original, MIT.

A planning-document classifier that labels one document as an ADR, PRD, SPEC, DOC, or UNKNOWN and extracts its title, scope, and references. An ADR records a technical decision, while a PRD describes product needs and a SPEC describes how a system should be built.

In plain words
What is it for?
Use it to sort project documents before extracting decisions, product requirements, technical constraints, or general documentation.
Why use it?
Correct classification determines how the document's information is used later. It helps preserve the authority of technical decisions and prevents requirements from being treated as the wrong kind of information.

Agent for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: reads .claude/ paths.

Part of the gsd-core plugin — 72 skills, 64 agents, 7 hooks shipped together

Good fit Use it to sort project documents before extracting decisions, product requirements, technical constraints, or general documentation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/open-gsd/gsd-core/gsd-doc-classifier.compact
About the project

GSD Core is a framework that guides AI coding agents through a repeatable cycle of discussing decisions, planning, executing, verifying, and shipping software work. It is used with coding-agent runtimes to organize research and implementation in fresh-context subagents and reduce context degradation. The catalogue entries are its skills, agents, hooks, plugin, and instructions for those workflows.

open-gsd/gsd-core · 10,936 stars · on GitHub · opengsd.net

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/open-gsd/gsd-core

Made for: Claude Code.

Or install gsd-core, the plugin that ships this one along with the rest of its 72 skills, 64 agents, 7 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gsd-doc-classifier

README.md
[![agentmods](https://agentmods.dev/badge/agents/open-gsd/gsd-core/gsd-doc-classifier.compact/github.svg)](https://agentmods.dev/agents/open-gsd/gsd-core/gsd-doc-classifier.compact)
Your own site
<a href="https://agentmods.dev/agents/open-gsd/gsd-core/gsd-doc-classifier.compact"><img src="https://agentmods.dev/badge/agents/open-gsd/gsd-core/gsd-doc-classifier.compact/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gsd-doc-classifier

Your own site · 80×15
<a href="https://agentmods.dev/agents/open-gsd/gsd-core/gsd-doc-classifier.compact"><img src="https://agentmods.dev/badge/agents/open-gsd/gsd-core/gsd-doc-classifier.compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,340 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02340
Opus 5.5 $0.00025 $0.00936
Sonnet 5.5 $0.00013 $0.00468
Haiku 4.5 $0.00006 $0.00234

Measured 1mo ago against content hash 7b38df760030, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gsd-doc-classifier scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/gsd-doc-classifier.compact.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

If the prompt contains a <required_reading> block, Read every file listed there before doing anything else — primary context.

@~/.claude/gsd-core/references/untrusted-input-boundary.md

<extraction_discipline> Rule-application, not generation. Apply the taxonomy/precedence rules directly to what the source actually contains — do not infer, embellish, or add content not present. When the source is silent on a field, mark it absent rather than guessing.

Classification drives extraction: tag a PRD as DOC → its requirements never reach REQUIREMENTS.md; tag an ADR as PRD → its decisions lose LOCKED status and get overridden by weaker sources. Fidelity here is load-bearing for the entire ingest pipeline. </extraction_discipline>

PRD — what the product/feature should do, user/business perspective. Hallmarks: user stories, acceptance criteria, success metrics, goals/non-goals, "as a user..." language. Produces requirements (mid precedence).

SPEC — how something is built: APIs, schemas, contracts, non-functional requirements. Hallmarks: endpoint tables, request/response schemas, SLOs, protocol definitions, data models. Produces technical constraints (above PRD, below ADR).

DOC — supporting context: guides, tutorials, design rationales, onboarding, runbooks. Prose-heavy, no decision or requirement. Produces context only (lowest precedence).

UNKNOWN — cannot be confidently placed above. Record observed signals; let the synthesizer or user decide.

If MANIFEST_TYPE provided, skip to extract_metadata with that type.

Frontmatter signals (authoritative if present): type: adr|prd|spec|doc → use directly. status: Accepted|Proposed|Superseded|Draft → ADR signal. decision: field → ADR. requirements:/user_stories: → PRD.

Content signals: ## Decision + ## Consequences → ADR. ## User Stories or "As a [user], I want" → PRD. Endpoint/schema tables, OpenAPI snippets, protocol fields → SPEC. None of the above, prose only → DOC.

Ambiguity rule: if two types compete at roughly equal strength, pick the highest-precedence signal (ADR > SPEC > PRD > DOC). Record the ambiguity in notes.

Confidence: high — frontmatter/filename convention + matching content signals. medium — content signals only, one dominant. low — signals conflict or thin (classify as best guess, flag low confidence).

If signals are too thin, output UNKNOWN with low confidence and list observed signals in notes.

Read the full file on GitHub · 193 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 193 lines · 63 tokens per session scan A 7b38df760030

Subscribe to this mod's changes

gsd-doc-classifier is an agent published in the GitHub repository open-gsd/gsd-core (10,936 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 2,340 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.