| name | duplication-audit |
| description | Audit for duplicated workflows and parallel call sequences that will drift—same orchestration in two modules, duplicate parsing/validation, identical decorator and context-manager bodies. Use when reviewing refactors, merge conflicts, or "keep these in sync" code. Read-only report; documents intentional asymmetry. |
| disable-model-invocation | true |
Duplication audit
Audit ownership
I own: parallel workflows, copy-pasted orchestration, mergeable identical blocks.
I don't own: thin wrappers (→ indirection-audit), file splits (→ file-responsibility-audit).
Read: CONVENTIONS.md.
Hunt targets
- Parallel orchestration — same step sequence in 2+ entrypoints.
- Fixed:
component.py + base.py render → reactive/render.py reactive_render_bundle.
- Duplicate parsing/validation — two ways to answer the same question.
- Fixed:
client_has_mounted_manifest vs manifest parse → MountedManifest.is_present.
- Decorator ergonomics — mutation recording must stay one code path.
- Canonical:
@mutates → MutationTracker.record only (no parallel context manager).
Intentional asymmetry (document, don't merge blindly)
| Path | Difference | Example |
|---|
| Class render | Pre-invalidate before primary | invalidate_before_primary=True |
| Instance render | Invalidate inside oob_swaps | invalidate_before_primary=False |
Flag as documented divergence if asymmetry is required; merge candidate if behavior should match.
Process
- List entrypoints for the scope (public methods, route handlers,
render() paths).
- For each pair sharing nouns (
render, invalidate, parse, load), diff call sequences.
- Grep repeated 5+ line blocks:
rg -n 'warn_reactive_render_without_client|mark_render_consumed|reactive_render_bundle' pyjinhx/
- Classify: merge candidate | documented divergence | unrelated.
Checklist
Report
Use CONVENTIONS template. Severity: P1 for orchestration drift risk; P3 for minor repeated literals.