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 commands/griddynamics/rosetta/code-analysis-flowgit clone --depth 1 https://github.com/griddynamics/rosettaWrote 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/commands/griddynamics/rosetta/code-analysis-flow)<a href="https://agentmods.dev/commands/griddynamics/rosetta/code-analysis-flow"><img src="https://agentmods.dev/badge/commands/griddynamics/rosetta/code-analysis-flow.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 | $0.00022 | $0.02619 |
| Opus 5 | $0.00011 | $0.01309 |
| Sonnet 5 | $0.00004 | $0.00524 |
| Haiku 4.5 | $0.00002 | $0.00262 |
Grade A, and why
code-analysis-flow 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 today.
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 — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<code_analysis_flow>
<description_and_purpose>
Problem: Code analysis degrades into transcription, drifts into suggestions/refactors, or stalls when codebase exceeds single-agent context; assumptions and unknowns are silently adopted.
Solution: Thin, sequential workflow that classifies SMALL vs LARGE codebase, delegates analysis to the reverse-engineering skill, must partition LARGE codebases via large-workspace-handling, gates critical/high unknowns through questioning, and optionally extracts requirements via requirements-authoring. Grounded by links, HITL at unknowns and final review.
Validation: Output files exist under docs/<feature>/; every claim traces to code/docs; no generated or suggested implementation; open questions and assumptions are documented; state file reflects phase evidence.
</description_and_purpose>
<workflow_phases>
- All Rosetta prep steps MUST be FULLY completed
- USE SKILL
load-project-context,orchestration,hitl - MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. Module analysis in LARGE codebases runs in parallel via SKILL
large-workspace-handling. - No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping
- Orchestrator trusts skills to own execution internals; coordinates sequence, artifacts, state, and approvals only.
- State file:
agents/TEMP/<FEATURE>/code-analysis-flow-state.mdupdated after each phase. - Documentation principle: ground with links; no code generation, no suggestions, no speculation. See
best_practicesfor sizing and diagram rules. - If
/goalis set repeat phases 4-8 until goal is met. - If task is to extract/document/reverse engineer requirements or specifications from existing app/code:
- This is much more intense per subagent: reclassify SMALL if < 10 source files, otherwise LARGE and MUST USE
large-workspace-handling. - Both orchestrator and subagents MUST USE SKILL
requirements-authoring - Spawn MULTIPLE subagents with each handling one unit of analysis (one module, one community, one screen, one controller, one endpoint, etc) to effectively prevent hallucinations by narrowing scope down for phases
requirements_branchandreview(more agents - less scope each).
- This is much more intense per subagent: reclassify SMALL if < 10 source files, otherwise LARGE and MUST USE
<context_load phase="1" applies="ALL" subagent="discoverer" role="Context gatherer for analysis scope" subagent_required_model="Claude Sonnet 5, GPT-5.6 Terra, Gemini 3.7 Flash">
- Read all lines of
docs/CONTEXT.md,docs/ARCHITECTURE.md,agents/IMPLEMENTATION.md; grep headers ofdocs/CODEMAP.md,docs/TECHSTACK.md,docs/DEPENDENCIES.mdif present. - Input: user analysis request. Output: loaded project context + entry points (APIs, webhooks, CLIs, cron jobs).
- Recommended skills:
load-project-context - Update
code-analysis-flow-state.md.
</context_load>
<scope_and_classify phase="2" applies="ALL" subagent="discoverer" role="Scope and size scanner" subagent_required_model="Claude Sonnet 5, GPT-5.6 Terra, Gemini 3.7 Flash">
- Classify target codebase: LARGE if 100+ files recursively or 4+ modules; otherwise SMALL.
- Identify target scope (repo, module, feature, path glob). Record boundaries and non-goals.
- Input: user request + loaded context. Output:
scope(paths),size(SMALL|LARGE),module-list(LARGE only). - Required skills:
reasoning - Update
code-analysis-flow-state.md.
</scope_and_classify>
<clarify_unknowns phase="3" applies="ALL" type="HITL">
- Surface only critical/high assumptions and unknowns affecting analysis accuracy; skip low and nit-picking.
- Ask up to 10 targeted, MECE, one-decision-per-question batch. Include safe default per question.
- Record resolved answers and unresolved items as assumptions; both are persisted in final output.
- Required skills:
questioning - Update
code-analysis-flow-state.md.
</clarify_unknowns>
<requirements_branch phase="4" applies="ALL" when="user requested requirements reverse-engineering" subagent="architect" role="Requirements engineer extracting intent from code" subagent_required_model="Claude Opus 5, GPT-5.6 Sol, Gemini 3.7 Flash">
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.
- today First seen · 172 lines · 22 tokens per session scan A 8bc20244084f
code-analysis-flow is a command published in the GitHub repository griddynamics/rosetta (342 stars, last pushed today), licensed Apache-2.0. It adds 22 tokens to every session and 2,619 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.
Other commands, from other repositories
OPSX: Apply
Implement tasks from an OpenSpec change (Experimental).
OPSX: Propose
Propose a new change - create it and generate all artifacts in one step.
OPSX: Archive
Archive a completed change in the experimental workflow.
OPSX: Explore
Enter explore mode - think through ideas, investigate problems, clarify requirements.
resolve-conflicts
Resolve merge conflicts on a GitHub PR by merging the base branch into the PR branch in an isolated git worktree, with JSON/markdown-aware conflict resolution.
ship
Commit all changes and push to remote in one operation (combines /commit and /push).