profiles-tdd

profiles-tdd is a command for Claude Code from Kastalien-Research/thoughtbox. It costs 29 tokens per session (3,421 once invoked), scanned A, original, MIT.

A test-first workflow for adding named profiles to agents. A profile connects an agent identity with a specialised way of working.

In plain words
What is it for?
Use it to build profile types, a profile registry, identity integration, profile prompts, and initial thought context.
Why use it?
It gives different agents consistent roles and prepares them with relevant context before they handle tasks.

Command for Claude Code

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.

agentmods
npx agentmods add commands/kastalien-research/thoughtbox/profiles-tdd
Clone the repo
git clone --depth 1 https://github.com/Kastalien-Research/thoughtbox

Made for: Claude Code.

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 profiles-tdd

README.md
[![agentmods](https://agentmods.dev/badge/commands/kastalien-research/thoughtbox/profiles-tdd.svg)](https://agentmods.dev/commands/kastalien-research/thoughtbox/profiles-tdd)
Your own site
<a href="https://agentmods.dev/commands/kastalien-research/thoughtbox/profiles-tdd"><img src="https://agentmods.dev/badge/commands/kastalien-research/thoughtbox/profiles-tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,421 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00029 $0.03421
Opus 5 $0.00015 $0.01710
Sonnet 5 $0.00006 $0.00684
Haiku 4.5 $0.00003 $0.00342

Measured 2d ago against content hash 3a26e339db13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

profiles-tdd 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 2d 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.

.claude/commands/development/profiles-tdd.md · 382 lines

How it starts

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

/profiles-tdd

Strict TDD workflow for implementing hierarchical agent roles (SPEC-HUB-002). Profiles bind mental models to agent identities, enabling behavioral specialization. Follows the same TDD discipline as /hub-tdd and /multi-agent-tdd.

Variables

RESUME: $ARGUMENTS (default: auto-detected from .profiles-tdd/state.json)

Module Order (dependency-driven)

# Module Test Count Type Depends On Files
1 profile-types 0 Pure types new src/hub/profiles-types.ts, mod src/hub/hub-types.ts
2 profiles-registry 8 New (TDD) M1 new src/hub/profiles-registry.ts
3 identity-profiles 6 Hybrid M1, M2 mod src/hub/identity.ts
4 profile-prompt 5 New (TDD) M2 mod src/hub/hub-handler.ts
5 thought-priming 7 New (TDD) M2, M4 new src/hub/profile-primer.ts, mod src/gateway/gateway-handler.ts
6 hub-integration 6 Integration M1–M5 test file only
Total 32

Expected Test Counts Per Module

{
  "profiles-registry": { "count": 8, "ids": "T-PR2-1..8", "files": ["profiles-registry.test.ts"] },
  "identity-profiles": { "count": 6, "ids": "T-IP-1..6", "files": ["identity-profiles.test.ts"] },
  "profile-prompt": { "count": 5, "ids": "T-PP-1..5", "files": ["profile-prompt.test.ts"] },
  "thought-priming": { "count": 7, "ids": "T-TP-1..7", "files": ["thought-priming.test.ts"] },
  "hub-integration": { "count": 6, "ids": "T-PI-1..6", "files": ["profiles-integration.test.ts"] }
}

Profile Definitions (authoritative)

Profile Mental Models Primary Goal
MANAGER decomposition, pre-mortem, five-whys Delegation and team coordination
ARCHITECT decomposition, trade-off-matrix, abstraction-laddering Structural design
DEBUGGER five-whys, rubber-duck, assumption-surfacing Root cause analysis
SECURITY adversarial-thinking, pre-mortem Risk and vulnerability detection

Read the full file on GitHub · 382 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. 2d ago First seen · 382 lines · 29 tokens per session scan A 3a26e339db13

Subscribe to this mod's changes

profiles-tdd is a command published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 3,421 once invoked, about $0.0001 per session on Opus 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-03.