testgen-flow-gap-and-contradiction-analysis

testgen-flow-gap-and-contradiction-analysis is a command for Claude Code from griddynamics/rosetta. It costs 24 tokens per session (2,042 once invoked), scanned A, original, Apache-2.0.

An analysis step that compares issue-tracker information with wiki documentation to find missing details, contradictions, vague statements, and inconsistencies.

In plain words
What is it for?
Use it to produce a categorized gap and risk report that guides clarification questions and requirements writing.
Why use it?
It exposes requirement problems before they become misleading specifications or incomplete tests.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents.

Good fit Use it to produce a categorized gap and risk report that guides clarification questions and requirements writing.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/griddynamics/rosetta/testgen-flow-gap-and-contradiction-analysis
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.

Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

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 testgen-flow-gap-and-contradiction-analysis

README.md
[![agentmods](https://agentmods.dev/badge/commands/griddynamics/rosetta/testgen-flow-gap-and-contradiction-analysis.svg)](https://agentmods.dev/commands/griddynamics/rosetta/testgen-flow-gap-and-contradiction-analysis)
Your own site
<a href="https://agentmods.dev/commands/griddynamics/rosetta/testgen-flow-gap-and-contradiction-analysis"><img src="https://agentmods.dev/badge/commands/griddynamics/rosetta/testgen-flow-gap-and-contradiction-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,042 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.00024 $0.02042
Opus 5 $0.00012 $0.01021
Sonnet 5 $0.00005 $0.00408
Haiku 4.5 $0.00002 $0.00204

Measured 4d ago against content hash 74a31a3d4893, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

testgen-flow-gap-and-contradiction-analysis 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 4d 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.

plugins/core-copilot-light/commands/testgen-flow-gap-and-contradiction-analysis.md · 145 lines

How it starts

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

<testgen_flow_gap_and_contradiction_analysis>

<description_and_purpose> Analyze the Issue Tracker ticket and Wiki documentation to identify contradictions, gaps, ambiguities, and inconsistencies that need clarification before requirements generation. </description_and_purpose>

<workflow_context>

  • Phase 2 of 7 in testgen-flow
  • Input: raw-data.md from Phase 1
  • Output: analysis.md with categorized contradictions, gaps, ambiguities, risk assessment
  • Required skills: qa-knowledge (gap_analysis mode)
  • Prerequisite: Phase 0, Phase 1 complete </workflow_context>

<phase_steps>

  1. Load raw data
  2. Run gap and contradiction analysis
  3. Create analysis document
  4. Update state file </phase_steps>

<load_raw_data step="2.1">

  1. Read plans/testgen-{TICKET-KEY}/raw-data.md completely
  2. Extract key sections: ticket description and acceptance criteria, labels, components, priority, each Wiki page content, comments from both sources
  3. Failure paths:
    • raw-data.md missing: stop Phase 2, record Phase 2 blocked: raw-data.md missing in testgen-state.md, and ask user to rerun Phase 1.
    • raw-data.md exists but key sections empty (no ticket description / no Wiki content): record the empty sections as gaps for Phase 3 to surface, and proceed — do not silently fabricate content.
    • raw-data.md corrupt / unparseable: stop Phase 2, record the parse error, and ask user to inspect the file. </load_raw_data>

<run_analysis step="2.2" subagent="architect" role="Requirements gap analyst">

  1. USE SKILL qa-knowledge (gap_analysis mode, general multi-source variant). The mode is analysis-only and EMITS categorized findings into this phase's <analysis_document_contract> artifact; it never invents the artifact shape or path.
  2. Sources to analyze: Issue Tracker ticket data + Wiki page data from raw-data.md.
  3. Identify contradictions, gaps, ambiguities per the mode's detection catalogs — contradiction (value-mismatch / logic-conflict / requirement-conflict), gap (functional / non-functional / data / business-logic / dependency), and ambiguity (vague-term) probes. This phase does NOT restate the taxonomies; it invokes them through the mode and OWNS the output document below.
  4. Cross-reference ticket vs Wiki for information present only in one source (single-source case → skip-with-note). </run_analysis>

<create_analysis_document step="2.3">

Create plans/testgen-{TICKET-KEY}/analysis.md. The qa-knowledge gap_analysis mode EMITS its categorized findings into the phase-owned document contract below — this phase OWNS the full skeleton, section list, and risk-assessment artifact shape; the mode supplies the finding entries.

Precondition (mode produced findings): step 2.2 invoked the gap_analysis mode and produced categorized findings (or an explicit zero-issues result). If the mode could not run, apply <failure_handling> "gap_analysis produced no findings" — do NOT fabricate a partial analysis.

<analysis_document_contract>

The document has these sections in order; empty finding sections carry No issues found (never silently omitted). Per-entry shapes: C[N] (Type / Source 1 / Source 2 / Impact / Needs Clarification), G[N] (Type / Context / Missing Information / Impact / Suggested Question), A[N] (Source / Vague Statement / Possible Interpretations ≥2 / Clarification Needed). Risk tiers are exactly three (High / Medium / Low) — no fourth tier. Phase 3 priority mapping (so the downstream P0/P1 signal is unambiguous): a High finding whose Impact is "blocks implementation" → Phase 3 P0 (MUST answer); Medium (impacts quality) → P1; Low (minor clarification) → P2/P3. Phase 3 classifies a question's priority from the finding's tier + its stated Impact, not from a tier name alone.

# Analysis - [TICKET-KEY]

**Analyzed**: [DateTime]
**Sources**: [Issue Tracker ticket + Wiki pages analyzed]

---

## Executive Summary
- **Total Issues Found**: [Count]
- **Contradictions**: [Count]  · **Gaps**: [Count]  · **Ambiguities**: [Count]
- **Severity**: [High / Medium / Low]
- **Recommendation**: [Can proceed with clarifications / Needs major rework]

## 1. Contradictions
[None found OR C[N] entries]

## 2. Gaps
[None found OR G[N] entries]

## 3. Ambiguities
[None found OR A[N] entries]

## 4. Cross-Reference Analysis
[Findings OR `Skipped — only one source available (<name>); no cross-reference possible.`]

## 5. Positive Findings
[Well-documented areas / strengths]

## 6. Risk Assessment
**High Risk** (blocks implementation): [Issue ID — why blocking]
**Medium Risk** (impacts quality): [Issue ID — impact]
**Low Risk** (minor clarification): [Issue ID — minor impact]

## 7. Next Steps
1. Generate clarification questions (Phase 3)
2. Total questions expected: [Estimate based on issues found]
3. Recommended: Review with [Stakeholder role] before proceeding

## Analysis Metadata
- **Ticket Fields Analyzed**: [List key fields]
- **Wiki Pages Analyzed**: [Count and titles]
- **Analysis Duration**: [Time spent]
- **Manual Review**: [Areas requiring human judgment]

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 24 tokens per session scan A 74a31a3d4893

Subscribe to this mod's changes

testgen-flow-gap-and-contradiction-analysis is a command published in the GitHub repository griddynamics/rosetta (343 stars, last pushed 3d ago), licensed Apache-2.0. It adds 24 tokens to every session and 2,042 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.