Files
code-crispies/.wave/pipelines/audit-consolidate.yaml
Michael Czechowski ab6dabd542
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
fix(ci): correct image digest separator
2026-04-30 12:20:26 +02:00

75 lines
2.2 KiB
YAML

kind: WavePipeline
metadata:
name: audit-consolidate
description: "Detect redundant implementations and architectural drift"
release: true
skills:
- software-design
input:
source: cli
example: "internal/pipeline — check for redundant patterns"
schema:
type: string
description: "Package or directory scope to analyze, or empty for full codebase"
steps:
- id: scan
persona: navigator
model: claude-haiku
workspace:
mount:
- source: ./
target: /project
mode: readonly
exec:
type: prompt
source: |
Scan for redundant implementations and architectural drift.
Scope: {{ input }}
## What to Look For
1. **Duplicate logic**: Functions doing the same thing in different packages.
Search for similar function signatures and bodies.
2. **Parallel abstractions**: Multiple interfaces or types representing
the same concept (e.g., two different error types for the same domain).
3. **Inconsistent patterns**: Same operation done differently in different
places (e.g., file reading with os.ReadFile in one place, io.ReadAll in another).
4. **Dead abstractions**: Interfaces with only one implementation,
wrapper types that add no value.
5. **Package boundary violations**: Packages reaching into each other's
internals instead of using proper interfaces.
6. **Naming inconsistencies**: Same concept with different names across
packages (e.g., "workspace" vs "workdir" vs "cwd").
## Analysis
For each finding:
- List the affected file:line locations
- Explain what's redundant or inconsistent
- Propose a consolidation strategy
- Assess effort (trivial/small/medium/large) and risk
Produce a structured assessment.
output_artifacts:
- name: assessment
path: .wave/output/assessment.json
type: json
retry:
policy: patient
max_attempts: 2
handover:
contract:
type: json_schema
source: .wave/output/assessment.json
schema_path: .wave/contracts/improvement-assessment.schema.json
on_failure: retry