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/init-workspace-flow-patternsgit clone --depth 1 https://github.com/griddynamics/rosettaWhat 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.00016 | $0.01090 |
| Opus 5 | $0.00008 | $0.00545 |
| Sonnet 5 | $0.00003 | $0.00218 |
| Haiku 4.5 | $0.00002 | $0.00109 |
Grade A, and why
init-workspace-flow-patterns 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<init_workspace_flow_patterns>
<description_and_purpose> Extract recurring code structures into explicit reusable pattern templates. Without them, agents reinvent conventions per task. Proof: docs/PATTERNS/ contains INDEX.md, per-module files, and CHANGES.md referenced by downstream coding tasks. Use workhorse model to handle large amounts of content cheaper and faster. </description_and_purpose>
<workflow_context>
- Phase 5 of 9 in init-workspace-flow
- Input: CODEMAP, source code
- Output: docs/PATTERNS/ (INDEX.md, per-module files, CHANGES.md)
- Prerequisite: Phase 3 complete (CODEMAP exists) </workflow_context>
<phase_steps>
- Read state and CODEMAP
- Execute multi-agent pattern extraction
- Update state, log gaps </phase_steps>
<read_state step="5.1">
- Read
agents/init-workspace-flow-state.md - Confirm Phase 3 complete and CODEMAP exists
- Read state.mode for dual-mode behavior </read_state>
<execute_extraction step="5.2" subagent="built-in" role="Senior pattern analyst extracting reusable conventions" subagent_recommended_model="claude-sonnet-5, gpt-5.6-terra-medium, gemini-3.7-flash-high">
Act as a senior pattern architect — recovers reusable structural conventions from code. Codebases accumulate implicit recurring structures that drift without formal documentation. Extract them into explicit reusable templates so agents and contributors produce consistent code. Requires CODEMAP.md on disk.
<core_concepts>
- All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed
- USE SKILL
reverse-engineering— apply "Would we rebuild this?" test: pattern = recurring structure surviving a from-scratch rewrite; one-off = historical accident - Pattern qualifies only if found in 2+ places
- INDEX.md and CHANGES.md must be possible to grep by md headers (top 3 levels). Must not use tables. Instructions ask to grep files to populate list of those items in context.
- Limit OVERALL to 10-15 most important patterns, limit reading samples up to 2 files per pattern.
</core_concepts>
Orchestration: Read CODEMAP, identify distinct modules; spawn built-in subagent per module scope for pattern extraction; merge subagent results into docs/PATTERNS/ structure; deduplicate patterns found across modules.
<extraction_process>
- Read CODEMAP.md — scope extraction per module
- if not enough use shell to list recursively all files with minimal output parameters
- list interesting targets folders/files with extensions, folder filters (excluding caches, builds, noise, etc)
- this listing itself gives enough information on what is the most common
- Dual-mode:
- CHECK-EXISTS: read docs/PATTERNS/ and INDEX.md
- IDENTIFY-GAPS: compare existing patterns against codebase
- CREATE-OR-UPDATE: install = create all; upgrade = add missing only
- PRESERVE-HUMAN: never overwrite human-curated content
- REPORT-CHANGES: log to CHANGES.md
- Per pattern file (docs/PATTERNS/*.md):
- Name: short identifier (e.g., "REST Controller Endpoint")
- Description: what it solves, when to use
- Template/Example: generalizable code skeleton with extension-point comments
- Write docs/PATTERNS/INDEX.md — all patterns with one-line descriptions, one header per each pattern
## Pattern Name - short description - Write docs/PATTERNS/CHANGES.md — created/updated/skipped, one header per each change
## [YYYY-MM-DD] Brief changes made - If state.composite = true, extract per sub-repository; top-level INDEX.md references sub-repo folders
</extraction_process>
<extraction_validation_checklist>
- INDEX.md lists all pattern files
- CHANGES.md tracks all actions taken
- No human-curated content overwritten in upgrade mode </extraction_validation_checklist>
</execute_extraction>
<update_state step="5.3">
- Write Phase 5 completion to
agents/init-workspace-flow-state.md - Update PATTERNS row in file inventory
- Log gaps for Phase 8 </update_state>
<validation_checklist>
- docs/PATTERNS/INDEX.md exists and lists all extracted pattern files
- Every CODEMAP module has pattern coverage or explicit skip reason
- State file shows Phase 5 complete
- Upgrade mode: no human-curated patterns overwritten </validation_checklist>
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 · 100 lines · 16 tokens per session scan A dbf6a9c0a1d8
init-workspace-flow-patterns is a command published in the GitHub repository griddynamics/rosetta (342 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 1,090 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
full-review-gate
Perform a comprehensive repository code review in an isolated worktree. Fix P0/P1 findings and ship them as a PR targeting the current branch.
implement-fastapi-routes
The file docstring contains a description of the FastAPI routes we need to implement. Implement these routes.
OPSX: Propose
Propose a new change - create it and generate all artifacts in one step.
deploy-setup
Wire CI + secrets for a fresh storefront. Run once after /init-store before the first push to main.
init-store
Clone the canonical Hydrogen starter, brand it, pin @commerce-atoms/agents, and create the first commit.
deploy-check
Pre-flight verification before pushing to main. Reproduces the CI gates locally so the push doesn't fail in production.