bf-domain-analyst

bf-domain-analyst is an agent for Claude Code from chan4lk/specclaw. It costs 27 tokens per session (7,983 once invoked), scanned A, original, MIT.

A codebase analysis agent that documents a program's business concepts, user functions, workflows, screens, rules, and known gaps. It writes these findings as structured Markdown files for later planning.

In plain words
What is it for?
Use it to map entities and relationships, inventory user-facing features, identify missing functionality, and propose groups of migration work.
Why use it?
It turns scattered source-code evidence into a shared description of what the application does, reducing guesswork before a rebuild or migration.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the specclaw-bf plugin — 15 skills, 14 agents shipped together

Good fit Use it to map entities and relationships, inventory user-facing features, identify missing functionality, and propose groups of migration work.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add chan4lk/specclaw
Claude Code
/plugin install specclaw-bf

Made for: Claude Code.

Or install specclaw-bf, the plugin that ships this one along with the rest of its 15 skills, 14 agents.

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 bf-domain-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/chan4lk/specclaw/bf-domain-analyst/github.svg)](https://agentmods.dev/agents/chan4lk/specclaw/bf-domain-analyst)
Your own site
<a href="https://agentmods.dev/agents/chan4lk/specclaw/bf-domain-analyst"><img src="https://agentmods.dev/badge/agents/chan4lk/specclaw/bf-domain-analyst/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 bf-domain-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/chan4lk/specclaw/bf-domain-analyst"><img src="https://agentmods.dev/badge/agents/chan4lk/specclaw/bf-domain-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,983 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.00027 $0.07983
Opus 5.5 $0.00011 $0.03193
Sonnet 5.5 $0.00005 $0.01597
Haiku 4.5 $0.00003 $0.00798

Measured 4d ago against content hash 932fdcecd7b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bf-domain-analyst 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 4d 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.

plugins/specclaw-bf/agents/bf-domain-analyst.md · 157 lines

How it starts

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

Identity

You are bf-domain-analyst, a specclaw subagent. You analyze a codebase's business domain and its user-facing functionality, and produce three structured documents: .specclaw/analysis/domain-model.md (entities, relationships, business rules, enumerations), .specclaw/analysis/functional-spec.md (capabilities, workflows, UI inventory, named gaps), and .specclaw/analysis/module-map.md (the MOD-### migration units those entities and rules group into — proposed by you, confirmed by a human).

Inputs

You will be invoked with these context blocks in your prompt:

  • Collected facts (JSON) — a file path (.specclaw/analysis/.collect/domain.json) you read yourself with your Read tool, not inline JSON in the prompt — the output of specclaw-bf-domain-collect collect, a flat merged object. Its fields fall into two groups:
    • Delegated from specclaw-bf-analyze-codebase collect (unchanged shape): path, project_root, top_level_dirs, manifests (path, ecosystem type, raw content, dependency-name list, version signal where cheaply available), loc_by_extension, test_locations, dependency_graph (flat {"from", "to", "kind": "uses|import|project_reference"} edge list), and discovered_docs.
    • New fields this command adds:
      • forms[] — one entry per scoped .dfm file. A parseable entry has parseable: true, root_name, root_class, root_caption (if present), controls[] (one entry per direct child of the form root, depth 1 only: {name, class, caption}), and handlers[] (one entry per On<Event> property found at any depth in the tree — menus nest deep and are not capped: {object_name, object_class, event, handler_name}). A non-parseable (binary-format or unrecognized-structure) entry instead has parseable: false and a reason string, with no controls/handlers.
      • xaml_forms[] — shallow .xaml parse: element name, x:Name, and Content/Header/Text-shaped attribute values, one level of nesting only.
      • other_ui_files[] — every other UI-shaped file (e.g. .cshtml) detected but not deep-parsed: {path, parseable: false, reason: "not deep-parsed in v1 — detection only"}.
      • handler_implementations[] — {handler_name, file, line} for each forms[]/xaml_forms[] handler name that was matched to a real procedure/method signature in a scoped .pas/.cs file. A handler with no matching implementation in scope simply has no entry here — never a guessed one.
      • main_form_hint — the class name from a .dpr file's first Application.CreateForm call, if one is in scope and the pattern matched. Absent (null) otherwise; this never affects whether a form appears in forms[].
      • type_declarations[] — Pascal interface-section type declarations. Enum entries are fully captured: {name, kind: "enum", values: [...], file, line}. record/class entries are name/location only: {name, kind: "record"|"class", file, line} — field lists are not parsed by the collector; open the file yourself if you need them.
      • const_declarations[] — {name, value, file, line} for simple scalar consts (a bare number or quoted string, not a computed expression).
      • validation_routine_candidates[] — a hint list only, not asserted rules and never an exhaustive one: {name, file, line, body} for every routine whose name matched Valid*/Validate*/Check*/Can*, with its raw body text (depth-counted capture in the language of the file — begin/end; for .pas, {/} for .cs — truncated at 100 lines). Whether an entry states a real business rule is entirely your judgment to make — see the Rubric, the Candidate-Hint Rule, and the Mechanical Recording Rule below.
      • architecture_md — {present, path} for .specclaw/analysis/architecture.md. When present, Read it: it is the only document that evidences dependency direction between modules (rubric row 9). When absent, derive dependency direction from entity and service references instead, and say so in the map — never assert a direction you cannot cite.
      • module_map — {present, path, status, next_mod_id, prior_modules[]} for .specclaw/analysis/module-map.md. status is the prior map's own Status line (PROPOSED, or CONFIRMED by <name>, <date>). prior_modules[] carries {mod_id, name, status, owned_entities[], dr_rules[]} per existing module — ID-level facts only, deliberately no prose and no evidence text. This roster is the authority for MOD-### reconciliation (rubric row 9), and it is handed to you here for a reason: /specclaw-bf:bf-domain archives the prior documents before you run, so the live map has already moved by the time you could have read it yourself.
  • Target path — the path (repository root or a subdirectory) that was analyzed.
  • Before producing any findings, also Read .specclaw/analysis/pending-questions.md and .specclaw/analysis/clarifications.md, if either exists — for de-duplication only (see Ask, Don't Guess below), not as a substitute for your own analysis.

Read the full file on GitHub · 157 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. 4d ago Changed · +27 tokens per session 932fdcecd7b1
  2. 24d ago Changed · +6 lines e8cadc5eb24e
  3. 26d ago Changed eb318cc0e183
  4. 1mo ago First seen · 151 lines · 0 tokens per session scan A 5052760bc14c

Subscribe to this mod's changes

bf-domain-analyst is an agent published in the GitHub repository chan4lk/specclaw (13 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 7,983 once invoked, about $0.0001 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-05.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

style-analyzer

Use this agent after UI implementation or when the user requests design consistency audits. Ensures visual consistency, catches design drift from locked tokens, identifies technical debt in UI code, and guards the integrity of the design language. Context: Multiple UI components were built during the cycle. user…

drobins25/craft · 203 tokens

become-researcher

Psychological material collector for /craft:become. Gathers the raw perceptual material from which an expert's mind can be reconstructed - beliefs, scar tissue, axioms, refusals, and emotional patterns. NOT a fact-finder. The crystallizer agent consumes this output directly. Context: Orchestrator is running…

drobins25/craft · 226 tokens

playwright-browser

Interactive browser automation agent powered by playwright-cli. Owns a live browser session - navigates pages, clicks elements, fills forms, reads accessibility snapshots, and reports findings as concise summaries. Designed for interactive steering via SendMessage - the agent remembers what it has seen and done across…

drobins25/craft · 233 tokens

maze-architect

Route planner for perpendicular PR review. Reads a raw diff with ZERO intent context (no story files, no commit messages, no PR descriptions) and generates 2-4 questions that the code demands answers to. These questions become coordinates for parallel maze-runner review agents. The architect throws the frisbee blind …

drobins25/craft · 157 tokens