CtrlK
BlogDocsLog inGet started
Tessl Logo

evilissimo/modular-software-design

Use before implementing or refactoring software when the task requires designing module boundaries, APIs, layers, abstractions, services, repositories, adapters, or architecture. Helps coding agents reduce total system complexity by creating deep modules, hiding implementation knowledge, avoiding leakage and pass-through APIs, comparing alternative designs, documenting interfaces before coding, and critiquing existing architecture.

93

1.13x
Quality

94%

Does it follow best practices?

Impact

93%

1.13x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-1/

Loyalty Discount Refactor

Problem/Feature Description

A commerce service currently computes loyalty discounts inline in three request handlers. Product wants to add seasonal promotions, employee discounts, and a premium-member rule next quarter. The team needs a small refactor proposal and implementation sketch so handlers can apply discounts without each handler learning all discount sequencing and edge cases.

Create the design and a minimal Python implementation sketch for the chosen approach. Do not build a full application; focus on the boundary that callers should use and enough code to demonstrate it.

Output Specification

Produce design_brief.md, discounts.py, and architecture_result.md.

Input Files

=============== FILE: current_handlers.py ===============

def preview_cart(cart, user, promo_code):
    subtotal = sum(item.price * item.qty for item in cart.items)
    if user.loyalty_years > 2:
        subtotal *= 0.95
    if promo_code == "SPRING":
        subtotal *= 0.90
    return {"subtotal": subtotal}

def checkout(cart, user, promo_code):
    subtotal = sum(item.price * item.qty for item in cart.items)
    if user.loyalty_years > 2:
        subtotal *= 0.95
    if promo_code == "SPRING":
        subtotal *= 0.90
    charge_card(user.card, subtotal)
    return {"charged": subtotal}

def quote_subscription(cart, user, promo_code):
    subtotal = sum(item.price * item.qty for item in cart.items)
    if user.loyalty_years > 2:
        subtotal *= 0.95
    if promo_code == "SPRING":
        subtotal *= 0.90
    return {"monthly_quote": subtotal}

evals

scenario-1

criteria.json

task.md

README.md

SKILL.md

tile.json