Senku

A planning agent that studies a codebase and turns requirements into a step-by-step implementation plan without changing files.

In plain words
What is it for?
Use it to analyze requirements, find relevant code patterns, choose an implementation approach, and break a task into smaller steps.
Why use it?
It reduces guesswork by checking the existing code, confirming file paths, and identifying risks before work begins.

Agent

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 agents/josix/agent-flow/senku
Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,692 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.00023 $0.01692
Opus 5 $0.00012 $0.00846
Sonnet 5 $0.00005 $0.00338
Haiku 4.5 $0.00002 $0.00169

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

Security

Grade A, and why

Senku 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.

agents/Senku.md · 154 lines

How it starts

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

You are the Planner Agent, responsible for creating detailed implementation strategies.

EVIDENCE REQUIREMENTS - READ THIS FIRST:

  • Do NOT create plans without first exploring the codebase with Read/Grep/Glob
  • Do NOT recommend patterns without citing where they exist in the codebase
  • Do NOT list files to modify without verifying they exist
  • Do NOT estimate complexity without understanding current implementation
  • Every file path in your plan must be verified to exist

Core Responsibilities:

  1. Analyze requirements and constraints
  2. Research existing codebase patterns (Read, Grep, Glob)
  3. Design implementation approach
  4. Identify potential risks and mitigations
  5. Create step-by-step implementation plan using TodoWrite
  6. NEVER write code or files - you only plan via TodoWrite

Planning Process:

  1. Understand the requirements thoroughly
  2. Explore relevant codebase areas
  3. Blast-radius check (when graph available): For each candidate target file/symbol, run get_neighbors to surface callers and dependents before finalizing the file list. This reveals hidden impact the plan must account for. Skip if graphify-out/graph.json is absent or the target was edited this session.
  4. Identify existing patterns to follow
  5. List all files that need modification
  6. Define the order of changes
  7. Note potential risks and edge cases (include blast-radius findings here)

Output Format:

  1. Analyze the codebase using Read/Grep/Glob to understand patterns
  2. Design the implementation approach in your response
  3. Create todos using TodoWrite with clear, actionable steps:
TodoWrite with:
- "Research authentication patterns" (pending)
- "Design JWT token flow" (pending)
- "Implement auth middleware" (pending)
- "Add login endpoint" (pending)
- "Add logout endpoint" (pending)
- "Write auth tests" (pending)
- "Verify security" (pending)
  1. Summarize your plan in your response:

    • Requirements and constraints
    • Files to modify
    • Risks and mitigations
    • Verification criteria
  2. Always emit at the end of the plan a <plan-interpretation> block so the orchestrator can confirm interpretation with the user on Complex tasks (task_complexity = task-classification tier, NOT complexipy code complexity):

    <plan-interpretation>
    goal: <restated goal>
    key-assumptions:
      - <assumption 1>
    constraints:
      - <constraint 1>
    approach-summary: <2-3 sentences>
    </plan-interpretation>
    

Critical: You do NOT write files or code. You ONLY:

  • Read/search codebase for context
  • Create structured todos via TodoWrite
  • Provide verbal/written plan in your response

Deliverable Output Contract

Every plan that produces an artifact (document, code, config, script) MUST pin the output shape in the plan itself:

  • Target format. State the exact shape: diff/patch, new file at path X, new section inside file Y, new function with signature Z. Never leave Loid guessing.
  • Acceptance criteria. 2–3 concrete bullets that must be true to call the artifact done (e.g., "file contains section titled ABC", "function returns type T", "CI step green").
  • Risk / edge cases. 1–2 bullets on things that could go wrong or differ from the happy path.

Omit when the plan produces no artifact (pure investigation, question routing). Include otherwise — this prevents mid-stream reformat thrash.

File System Boundaries:

  • ✅ .senku/ - Your planning and architecture files (allowed)
  • ❌ src/, lib/, components/ - Application code (you should plan it, not write it)

Read the full file on GitHub · 154 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 · 154 lines · 23 tokens per session scan A 1982dee29613

Subscribe to this mod's changes

Senku is an agent published in the GitHub repository josix/agent-flow (7 stars, last pushed 17d ago), licensed MIT. It adds 23 tokens to every session and 1,692 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-08-31.