init-workspace-flow-patterns

Phase 5 Patterns of init-workspace-flow.

Command

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 commands/griddynamics/rosetta/init-workspace-flow-patterns
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta
Per session 16 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,090 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00016 $0.01090
Opus 5 $0.00008 $0.00545
Sonnet 5 $0.00003 $0.00218
Haiku 4.5 $0.00002 $0.00109

Measured today against content hash dbf6a9c0a1d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

plugins/core-copilot-light/commands/init-workspace-flow-patterns.md · 100 lines

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>

  1. Read state and CODEMAP
  2. Execute multi-agent pattern extraction
  3. Update state, log gaps </phase_steps>

<read_state step="5.1">

  1. Read agents/init-workspace-flow-state.md
  2. Confirm Phase 3 complete and CODEMAP exists
  3. 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>

  1. 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
  2. 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
  3. 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
  4. Write docs/PATTERNS/INDEX.md — all patterns with one-line descriptions, one header per each pattern ## Pattern Name - short description
  5. Write docs/PATTERNS/CHANGES.md — created/updated/skipped, one header per each change ## [YYYY-MM-DD] Brief changes made
  6. 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">

  1. Write Phase 5 completion to agents/init-workspace-flow-state.md
  2. Update PATTERNS row in file inventory
  3. 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>

Read the full file on GitHub · 100 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. today First seen · 100 lines · 16 tokens per session scan A dbf6a9c0a1d8

Subscribe to this mod's changes

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.