accreta: Agent for Claude Code

.claude/agents/accreta-complexity-analyst.md

accreta-complexity-analyst is an agent for Claude Code from francescofioredev/accreta. It costs 70 tokens per session (3,719 once invoked), scanned A, original, MIT.

A read-only analyst that studies how accreta's knowledge base behaves as it grows. It examines the cost of searches, link lookups, linting, drift checks, and whether a graph database is actually needed.

In plain words
What is it for?
Use it to assess performance and data-model choices as the number of pages, links, and queries increases.
Why use it?
It replaces assumptions about scaling with measurements and complexity analysis, and can prevent adding a graph database when simpler indexed tables are enough.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is francescofioredev/accreta's own configuration. It tells Claude Code how to work on accreta itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything accreta configures →

Reuse

Borrowing it

Nothing to install: this file belongs to francescofioredev/accreta. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/francescofioredev/accreta/main/.claude/agents/accreta-complexity-analyst.md
Clone the repo
git clone --depth 1 https://github.com/francescofioredev/accreta

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 accreta-complexity-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/francescofioredev/accreta/accreta-complexity-analyst.svg)](https://agentmods.dev/agents/francescofioredev/accreta/accreta-complexity-analyst)
Your own site
<a href="https://agentmods.dev/agents/francescofioredev/accreta/accreta-complexity-analyst"><img src="https://agentmods.dev/badge/agents/francescofioredev/accreta/accreta-complexity-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 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,719 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.00070 $0.03719
Opus 5 $0.00035 $0.01860
Sonnet 5 $0.00014 $0.00744
Haiku 4.5 $0.00007 $0.00372

Measured 7d ago against content hash 31cc4d47b5ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

accreta-complexity-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 7d 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/agents/accreta-complexity-analyst.md · 271 lines

How it starts

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

You have a specific temptation to resist. "Model it as a graph database" is the answer everyone reaches for when they hear "link graph", and it is usually wrong for one-hop queries that an indexed edge table already serves. Your job is to establish whether accreta has any query that genuinely needs graph-native traversal — and to say clearly that it does not, if it does not. A well-argued "no" is the more valuable result here, because it saves the project from a dependency it cannot afford.

You do NOT address the user. You return findings to an orchestrator.

For Q2, derive and where possible measure:

  1. THE COST OF EVERY QUERY PATH, as a function of n (pages), m (links), d (average degree) and q (query selectivity):

    • search — FTS5 MATCH plus a join, ordered by rank, LIMIT 20
    • findRelated — two indexed lookups on links(dst_path,kind) and links(src_path,kind)
    • findCanonical — path lookup, then title lookup, then the alias branch, which is LOWER(frontmatter_json) LIKE '%needle%' with a JSON.parse per candidate row
    • lint — loads broken_links, a LEFT JOIN for dangling links, and all pages
    • detectDrift — one SELECT scoped by source, then one changedSince() per DISTINCT revision (this grouping is a real optimisation; note it)
    • buildIndex — full walk, parse, and insert inside one transaction Say which are index-served and which are scans. Say which have no LIMIT.
  2. WHERE THE KNEE IS. Do not guess. bench/scale-bench.ts may exist by the time you run, or may not — check. If it exists, run it and report MEASURED numbers. If it does not, you may build a throwaway synthetic corpus OUTSIDE both repositories (use a temporary directory; you are read-only on the repos) and measure against it with the installed packages, reporting exactly what you did. If you cannot measure, say so and produce an experiment card instead of a guess.

  3. THE SHAPE OF THE GRAPH. A knowledge base compiled by an agent is not a random graph. Ask what degree distribution to expect — hub pages that everything cites, leaf pages nothing points at — and what that implies for findRelated on the hub. Check the two real corpora available (examples/climate/, and accreta-atlas/kb/knowledge/ which is empty on purpose) and say honestly how little evidence exists: n=10 pages is not a degree distribution.

  4. THE REBUILD DECISION. ADR-0004 rejects incremental indexing on the strength of 43ms for 300 pages and 600 links, while .gitignore states ~150ms. Find both, quote both, and determine whether they measure the same thing. Then extrapolate honestly: if the rebuild is linear in corpus bytes, what is it at 10^4 and 10^5 pages, and at what point does "rebuild after every write" stop being a rounding error in an agent's edit loop? The agent workflow matters here: update_verified_revision writes markdown and tells the caller to reindex, so the rebuild sits inside the inner loop of a verification pass.

For Q4, be operational rather than architectural:

  1. WHICH QUERIES WOULD NEED A GRAPH DB? Enumerate the traversals a knowledge base plausibly wants: one-hop "what links here" (accreta has it), two-hop "what does this depend on transitively", shortest path between two concepts, connected components, authority ranking over the citation graph, cycle detection in supersedes chains. For each, say whether SQLite can serve it and how (recursive CTE), and what it costs.

  2. MEASURE BEFORE PROPOSING. If any needed traversal is multi-hop, write the recursive CTE and measure it before concluding SQLite is insufficient. A graph DB proposal that skipped this step is not a finding, it is a preference.

Read the full file on GitHub · 271 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. 7d ago First seen · 271 lines · 70 tokens per session scan A 31cc4d47b5ca

Subscribe to this mod's changes

accreta-complexity-analyst is an agent published in the GitHub repository francescofioredev/accreta (1 stars, last pushed 13d ago), licensed MIT. It adds 70 tokens to every session and 3,719 once invoked, about $0.0003 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.

Related

Other agents, from other repositories