with one click
eiffel-design-scan
// Read-only design scanner. Finds abstraction, MI, and generics improvement opportunities in Eiffel libraries. Produces structured report. Use with /eiffel.design-scan command.
// Read-only design scanner. Finds abstraction, MI, and generics improvement opportunities in Eiffel libraries. Produces structured report. Use with /eiffel.design-scan command.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | eiffel-design-scan |
| description | Read-only design scanner. Finds abstraction, MI, and generics improvement opportunities in Eiffel libraries. Produces structured report. Use with /eiffel.design-scan command. |
| allowed-tools | Read, Grep, Glob, Bash, Task |
Purpose: Scan an Eiffel library to discover design improvement opportunities in three categories: missing abstractions, multiple inheritance candidates, and generics candidates. This is READ-ONLY ā no source files are modified.
/eiffel.design-scan <library-path>
Example:
/eiffel.design-scan d:\prod\simple_sorter
If no path provided, ask user: "Which library? Provide the full path (e.g., d:\prod\simple_sorter)"
<library-path>/
āāā .eiffel-workflow/
ā āāā evidence/
ā āāā design-scan.md ā OUTPUT (the only file written)
āāā src/
ā āāā *.e ā SCANNED (read-only)
āāā test/
ā āāā *.e ā SCANNED (read-only)
āāā <library>.ecf ā SCANNED (read-only)
These principles from ISE EiffelBase guide every finding:
[G -> COMPARABLE] means "this class needs ordering"Read every .e file in <library-path>/src/. For each class, record:
Build a mental model of the class hierarchy and feature landscape.
Efficiency: Use Grep to locate structural elements quickly before deep-reading:
# Find all class declarations
grep -rn "^class\|^deferred class\|^expanded class" <library-path>/src/
# Find all inherit clauses
grep -rn "^inherit" <library-path>/src/
# Find all generic parameters
grep -rn "class.*\[" <library-path>/src/
# Find deferred features
grep -rn "deferred$\|deferred " <library-path>/src/
Scan for these patterns:
A1: Duplicate Feature Signatures
A2: Deep Inheritance Chains
A3: Template Method Candidates
< generates <=, >, >=)A4: Missing Contracts on Shared Behavior
For each finding, record:
Category: A1/A2/A3/A4
Classes: [list]
Features: [list with line numbers]
Description: [what the abstraction would capture]
Effort: [number of features to extract]
Scan for these patterns:
M1: Missing ITERABLE
new_cursor for across loop compatibilityM2: Duplicated Cross-Cutting Concerns
M3: Missing Standard Parents
< but don't inherit COMPARABLEhash_code but don't inherit HASHABLEout but could benefit from CUSTOM_OUTPUTM4: Monolithic Classes
For each finding, record:
Category: M1/M2/M3/M4
Class: [target class]
Proposed Parent: [parent class name and role]
Features Affected: [list with line numbers]
Conflicts: [potential name clashes to resolve]
Scan for these patterns:
G1: Concrete Types Where Generic Would Be Safer
ANY for element typesG2: Missing Constraints on Existing Generics
[G] where [G -> COMPARABLE] needed because < is used on G[G] where [G -> HASHABLE] needed because hash_code is called on Gdetachable separate for SCOOP compatibilityG3: like Current Candidates
like CurrentG4: Type Parameter Extraction
For each finding, record:
Category: G1/G2/G3/G4
Class: [target class]
Current Type: [concrete type being used]
Proposed Parameter: [G/K/V with constraint]
Features Affected: [list with line numbers]
Client Impact: [files that would need updating]
Create directory if needed:
mkdir -p <library-path>/.eiffel-workflow/evidence
Write <library-path>/.eiffel-workflow/evidence/design-scan.md:
# Design Scan: <library-name>
# Date: [timestamp]
# Classes scanned: [count]
# Source files: [count]
## Summary
| Category | Findings | High | Medium | Low |
|----------|----------|------|--------|-----|
| Abstraction | [n] | [n] | [n] | [n] |
| MI | [n] | [n] | [n] | [n] |
| Generics | [n] | [n] | [n] | [n] |
| **Total** | **[n]** | **[n]** | **[n]** | **[n]** |
## Findings
| # | Priority | Category | Classes | Opportunity | Effort | Suggested Skill |
|---|----------|----------|---------|-------------|--------|-----------------|
| 1 | HIGH | abstract | A, B | Extract deferred X | 3 features | /eiffel.abstract |
| 2 | MEDIUM | mi | C | Add ITERABLE parent | 1 feature | /eiffel.mi |
| 3 | LOW | generics | D | Parameterize on G | 5 features | /eiffel.generify |
## Detailed Findings
### Finding 1: [title]
**Priority:** HIGH
**Category:** abstract
**Classes:** [class names with file paths]
**Description:** [what the opportunity is and why it matters]
**Evidence:**
- [class]:line [n]: [feature signature]
- [class]:line [n]: [feature signature]
**Suggested Action:** /eiffel.abstract targeting [classes]
**Effort:** [n] features to extract
[... repeat for each finding ...]
## Recommended Order
1. [Finding #] ā [why first: highest impact / unblocks others]
2. [Finding #] ā [why second]
3. ...
Design scan COMPLETE for: <library-path>
Report: <library-path>/.eiffel-workflow/evidence/design-scan.md
Findings: [n] total ([n] HIGH, [n] MEDIUM, [n] LOW)
- Abstraction opportunities: [n]
- MI opportunities: [n]
- Generics opportunities: [n]
Do NOT blindly list next steps. The report speaks for itself ā the user can read it and decide what to act on. Only mention a specific skill if the user asks "what now?"
This skill focuses ONLY on: <library-path>
DO NOT:
DO:
<library-path>/.eiffel-workflow/skill-improvements.md ā do NOT modify skills mid-workflow