Skip to content

t1k:agent-creator

FieldValue
Modulet1k-maintainer
Version2.18.3
Effortmedium
ToolsAskUserQuestion, Bash, Edit, Glob, Grep, Read, Write

Keywords: agent, create, frontmatter, maxturn, model, scaffold, update

/t1k:agent-creator
[agent-name]

Create new agent .md files or update existing ones for TheOneKit. Enforces the canonical agent structure.

Canonical field order: name → description → model → maxTurns → color → roles → tools → context → useExactTools → origin → repository → module → protected → version

FieldRequiredNotes
nameYesUniversal t1k- prefix, kebab-case, MUST match filename basename. Core: t1k-{slug}. Kit-wide: t1k-{kit}-{slug}. Module-scoped: t1k-{kit}-{module}-{slug}. See rules/naming-convention.md (SSOT) and references/architecture-rules.md § 0. CI gate validate-agent-prefix.cjs is strict.
descriptionYes| block scalar; 1-sentence intent + 1–3 <example> blocks with <commentary>; total <30 lines, <2KB
modelYeshaiku (cheap fanout/discovery) · sonnet (default) · inherit (parent-pinning) · opus unused
maxTurnsYesSee observed values below; must justify >40 in a comment
colorYes14/14 agents use it — required, not suggested. See color-by-role below
rolesYes[routing-role] registers in routing JSON · none (scalar) = callable by name only · [] = same as none, prefer none
toolsIf fork-eligibleExplicit minimal array [Read, Glob, Bash] — omitting inherits ~70-tool default, breaking useExactTools SSOT
useExactToolsIf fork-contexttrue for agents that run as fork children — parent mirrors tools: array exactly
contextIf fork-contextfork when agent runs as fork child of a skill
originYesHand-stamp on creation — validator enforces pre-merge for new files. Cite memory feedback_origin_marker_handauthor.md.
repositoryYesHand-stamp on creation (same rule)
moduleYesHand-stamp on creation (same rule)
protectedYesHand-stamp on creation (same rule)
versionCI-managedCI injects from module.json. Appears post-release — do NOT hand-edit.

Agents do NOT have keywords: in frontmatter. Keywords live in t1k-activation-{layer}.json only.

Color-by-role convention: blue=t1k-planner/PM/implementer · red=t1k-debugger · green=t1k-tester/git · orange=reviewer · purple=kit/docs · yellow=t1k-brainstormer/simplifier · cyan=t1k-researcher/mcp · magenta=skills

Section titled “Recommended maxTurns (observed from 14 core agents)”
AgentmaxTurnsRole class
t1k-git-manager15utility
t1k-code-simplifier, t1k-docs-manager20utility
t1k-tester, t1k-researcher, t1k-code-reviewer, t1k-project-manager, t1k-brainstormer25reviewer/t1k-planner
t1k-planner, t1k-skills-manager30t1k-planner
t1k-debugger, t1k-fullstack-developer40implementer/t1k-debugger
t1k-kit-developer45kit-implementer

Cap at 50. Must justify >40 with an inline comment.

  1. Opening persona: “You are a {Role Title} …” — see Cognitive Framing
  2. Routing guard (if applicable): scope boundary + delegation targets
  3. Mandatory skills: Ordered table with activation triggers
  4. Constraints: Enforced rules (NEVER/ALWAYS/DO NOT)
  5. Workflow: Numbered steps with verification checkpoints
  6. Output format: Constant-shape markdown template (no variable-cardinality keys in headers)
  7. Domain Agent Orchestration (if applicable): see pattern below
  8. Behavioral Checklist: 6–10 checkbox lines, brutal-honesty framing — MANDATORY for all agents
  9. Module awareness (if applicable): metadata.json has modules / schemaVersion >= 2 conditions

Auto-register (fast path) — never hand-stamp + hand-place

Section titled “Auto-register (fast path) — never hand-stamp + hand-place”

Per rules/replicate-and-automate.md: don’t repeat the manual create-file → stamp-frontmatter → edit-module.json → regen dance. Use the scaffolder:

Terminal window
t1k agent new <name> --module <owner> --model <tier> # haiku | sonnet

It creates the t1k--prefixed agent .md (dash-form name: == basename per rules/naming-convention.md) with stamped frontmatter including an explicit model: tier (NO model: inherit — every kit agent pins a concrete tier per agent-model-tier-rubric), appends to the owning module.json agents[], and regenerates t1k-modules.json (via generate-modules-registry.cjs). You then write the body. Requires CLI ≥ 5.4.0 (t1k --version).

Manual fallback (CLI < 5.4.0): create the agent .md yourself, hand-stamp frontmatter (pin a concrete model: tier), append to module.json agents[], then run node <release-action>/scripts/generate-modules-registry.cjs <kit-root> and stage t1k-modules.json in the SAME commit (rules/module-registry-sync.md).

  1. Ask user for: role name, scope, which kit/layer, key skills
  2. Read 2 existing agents as reference (matching role type)
  3. Draft agent following canonical structure above
  4. Hand-stamp origin frontmatterorigin/repository/module/protected MUST be present on the new file. Validator only checks origin: presence; values may be best-effort (CI overwrites post-merge). See “Required Frontmatter” above.
  5. Post-write check — read the new agent .md back; verify the frontmatter contains origin: with a non-empty value. If absent, re-stamp before proceeding.
  6. Validate using references/validation-checklist.md
  7. If routing needed: update t1k-routing-{layer}.json
  8. If activation needed: update t1k-activation-{layer}.json

Cognitive Framing (MANDATORY — first line of body)

Section titled “Cognitive Framing (MANDATORY — first line of body)”

Format: “You are a {Role Title} who/performing {behavioral description in 1-2 sentences}.”

Examples:

  • “You are a Staff Engineer hunting production bugs — you distrust obvious answers and prove root cause before proposing any fix.”
  • “You are a QA Lead performing systematic verification — you hunt for untested code paths and think like someone burned by production incidents.”
  • “You are a Tech Lead designing system architecture — you optimize for long-term maintainability over short-term convenience.”

Validation: If the opening line does not name a concrete role with a behavioral trait, reject and rewrite.

Domain Agent Orchestration (6/14 agents use this)

Section titled “Domain Agent Orchestration (6/14 agents use this)”

After completing generic implementation, check for domain-specific agents:

**Domain Agent Orchestration:**
1. Use Glob to find `.claude/agents/*-{role}.md`
2. Evaluate which are relevant to the task (engine-specific, module-specific)
3. For relevant domain agents: spawn via Agent tool with implementation context
4. Fan-out cap: `Math.min(matchedCount, 4)` — NEVER spawn unbounded parallel agents
5. If no domain agents found — proceed with generic output only
IF `T1K_FORK_DEPTH` env >= 2: skip Domain Orchestration entirely;
report "domain-agents-skipped: depth-limit-reached" in output.

If an agent may run as a fork child of a skill (verifier, t1k-researcher, t1k-planner, reviewer, t1k-tester, t1k-debugger):

Frontmatter required:

  • tools: [Read, Grep, Glob] (minimal explicit array) — omitting breaks useExactTools SSOT across 13/14 agents
  • useExactTools: true if spawned by context: fork skill

Body required (verifier agents — testers, reviewers, debuggers):

**Anti-Avoidance Checklist (read before every run):**
- No "should work" without evidence — run the command, paste the output.
- No "looks fine to me" without a root-cause sentence.
- No "I'll skip this edge case" without explicit risk justification.
- No "this is unrelated" without a 1-line proof.

Constant-shape Output Format: headers MUST NOT interpolate counts, timestamps, or commit hashes into top-level keys. Variable values go inside leaf nodes.

  • GOOD: ### Files Modified\n[list]
  • BAD: ### Files Modified (3 files, 187 lines): — count busts cache

Recursion guard: If body contains Domain Agent Orchestration, gate with T1K_FORK_DEPTH check. Never reference the gitStatus block — run git status yourself if needed.

See skills/t1k-architecture/references/fork-hygiene.md for parent-side rules.

Severity: Blocker (security/correctness) · High (cache/recursion/cost) · Medium (drift/clarity) · Low (style)

Anti-patternSeverityFix
No recursion guard when Agent/Task tool in tools: arrayBlockerAdd depth check: refuse to spawn self; gate domain orchestration with T1K_FORK_DEPTH
No fan-out cap on domain-agent spawningHighCap at Math.min(N, 4)
Inlining rules/skill-security-boilerplate.md or rules/agent-security-boilerplate.md contentHighAuto-loaded from rules/. Inlining drifts. Current offender: t1k-skills-manager.md:47-56
Volatile content in body (gitStatus, date +, “Last Updated”, live shell `...`)HighMove to a tool call AFTER the static prefix. See architecture-rules.md §E
tools: includes Bash for read-only agentsMediumRead-only agents declare [Read, Glob, Grep] — Bash grants rm, git push --force
maxTurns > 50 without justificationHighCap at 50; add inline comment if >40
Vague persona (“a developer”)MediumConcrete role + behavioral trait — see Cognitive Framing above
roles: [] instead of roles: noneLowPrefer none scalar for no-routing agents
Copy-pasted <example> blocks across agentsMediumEach agent’s examples must be domain-specific for routing disambiguation
Adding origin, module, protected, version with wrong valuesHighorigin/module/protected — hand-stamp exact kit values; version — leave to CI post-release
Verifier agent without Anti-Avoidance ChecklistMediumTesters/reviewers/debuggers MUST include the 4-bullet checklist
Agent body recommends raw rm -rf .claude/BlockerWrap in t1k install --reset / t1k doctor --nuke (CLAUDE.md #10)

Full architecture checklist: references/architecture-rules.md Pre-merge agent checklist: references/validation-checklist.md