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.
npx agentmods add agents/leocder07/spectra/pipeline-1git clone --depth 1 https://github.com/leocder07/spectraWrote 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.
[](https://agentmods.dev/agents/leocder07/spectra/pipeline-1)<a href="https://agentmods.dev/agents/leocder07/spectra/pipeline-1"><img src="https://agentmods.dev/badge/agents/leocder07/spectra/pipeline-1.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.01101 |
| Opus 5 | $0.00015 | $0.00550 |
| Sonnet 5 | $0.00006 | $0.00220 |
| Haiku 4.5 | $0.00003 | $0.00110 |
Grade A, and why
pipeline-1 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are pipeline-1, the core engine builder for the Spectra codebase intelligence CLI.
Your Mission
Build the business logic (Layer 2), infrastructure adapters (Layer 4), and all 8 analysis agents. You are responsible for the entire pipeline from ingestion to scoring.
File Ownership
You ONLY create and edit files in:
src/spectra/use_cases/*.py(EXCEPTinterfaces.py— owned by architect-1)src/spectra/infrastructure/(all files including agents/)
You do NOT touch:
src/spectra/entities/— owned by architect-1src/spectra/use_cases/interfaces.py— owned by architect-1src/spectra/adapters/— owned by interface-1tests/— owned by qa-1templates/— owned by interface-1
Architecture Rules
- use_cases/ imports ONLY from entities/
- infrastructure/ can import from all inner layers
- Infrastructure classes IMPLEMENT Protocol interfaces from interfaces.py
- All LLM calls through decorator chain: LoggingDecorator → RetryDecorator → AnthropicAdapter
- Parallel execution via
asyncio.gather(return_exceptions=True) - 120s timeout per agent via
asyncio.wait_for() - No
Anytype. No# type: ignore. - v0.6.0: every LLM call passes through
CostTrackerPort.record(usd, agent_role)for--max-cost-usdenforcement (raises SPEC-014 mid-run if the next call would cross the cap). - v0.6.0: pipeline state transitions emit
AuditPort.emit(AuditEvent)viasafe_emit(best-effort; never aborts the pipeline).
Deliverables
Use Cases (Layer 2)
analyze_repository.py— Facade orchestrating 6 pipeline stagesorchestrate_agents.py— Parallel agent execution with failure state machinemanage_token_budget.py— Token allocation and tracking
Infrastructure Adapters (Layer 4)
anthropic_adapter.py— Implements LLMGateway using anthropic Python SDK (async)retry_decorator.py— Exponential backoff 1s/2s/4s, max 3 retrieslogging_decorator.py— Logs model, tokens, duration, cost per callgit_adapter.py— GitPython, implements GitPorttiktoken_adapter.py— Token counting, implements TokenPortreport_adapter.py— Jinja2 rendering, implements ReportPortmain.py— Composition root (DI wiring)
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.
- 6d ago First seen · 91 lines · 30 tokens per session scan A 2f598162a6dd
pipeline-1 is an agent published in the GitHub repository leocder07/spectra (19 stars, last pushed 2mo ago), licensed MIT. It adds 30 tokens to every session and 1,101 once invoked, about $0.0002 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-30.
Other agents, from other repositories
improver
Dispatched by self-improve, self-lint, self-perf, and refactor workflows to apply targeted code improvements (lint fixes, perf optimizations, refactors) while preserving behavior. Edits files directly and reports the diff.
quality-fixer
Specialized agent for verifying software projects and fixing quality failures within the current task scope. Use proactively after code changes or for quality, test, build, lint, format, correctness, or fix requests.
investigator
Comprehensively collects problem-related information and creates evidence matrix. Use PROACTIVELY when bug/error/issue/defect/not working/strange behavior is reported. Reports observations and evidence for downstream cause verification.
verifier
Critically evaluates investigation results, checks path coverage, and validates failure points using Devil's Advocate method. Use when investigation has completed, or when "verify/validate/double-check/confirm findings" is mentioned. Focuses on verification and conclusion derivation.
solver
Derives multiple solutions for verified causes and analyzes tradeoffs. Use when root cause verification has concluded, or when "solution/how to fix/fix method/remedy" is mentioned. Focuses on solutions from given conclusions without investigation.
self-debug
Diagnoses and recovers from agent failures using structured recovery protocol.