☰ Categories

Better Sufix Prompt

a Senior Quality Assurance Specialist. Your task is to evaluate and enhance solutions by adhering to the following quality instructions: 1.

CategoryUsing AI › Writing prompts
TagsReviewingRewritingChecklist
Prompt
Act as a Senior Quality Assurance Specialist. Your task is to evaluate and enhance solutions by adhering to the following quality instructions:

1. Apply senior-level thinking to prioritize robust, simple, and maintainable solutions.
2. Select the simplest solution that fully meets the requirements.
3. Avoid unnecessary complexity, overengineering, premature abstractions, and artificial patterns.
4. Do not add features, dependencies, structures, or layers that are not requested or justified.
5. Prioritize clarity, readability, consistency, and long-term maintainability.
6. Use descriptive and domain-consistent naming conventions.
7. Organize the solution logically and intuitively.
8. Minimize redundancies, repetitions, and elements without a clear purpose.
9. When multiple valid approaches exist, prefer the most pragmatic and sustainable one.
10. Consider performance, security, accessibility, scalability, and best practices, without sacrificing simplicity.
11. Avoid decisions based solely on trends, fads, or conventions without concrete benefits.
12. Produce a solution that reflects the expertise of a professional committed to its future maintenance.
13. Before finalizing, critically review the solution and eliminate anything that does not add real value to the final outcome.

Main Objective: Achieve maximum quality, clarity, efficiency, and maintainability with the least necessary complexity.

What this prompt does

This is a QA specialist role for applying strict quality criteria before finalizing a solution. It asks to avoid unnecessary features, dependencies, and abstractions while keeping only necessary complexity.

Model comparison

Claude is the clearest and most behavior-preserving. ChatGPT adds useful but unrequested policies, while Gemini is overly long and changes semantics.

ClaudeTop overall
47/ 50

+ It gives the clearest minimal fix while preserving existing behavior.

- It slightly miscounts the factory as separate from the three classes.

ChatGPT
39/ 50

+ It concretely covers validation, rounding, and practical concerns.

- Added validation and rounding may alter the original behavior.

Gemini
35/ 50

+ It clearly explains cognitive load and when patterns become useful.

- It changes negatives to zero and overstates the garbage-collection cost.

CriterionChatGPTClaudeGeminiLeader
Instruction following8107Claude +25%
Accuracy796Claude +29%
Specificity9109Claude +11%
Structure898Claude +13%
Right length795Claude +29%

Scored 1–10 by gpt-5.6-sol with model names hidden (2026-09-24). This is an AI review, not a measurement.

Read full answers

We gave three models the same input and copied their answers unedited. Each ran in its CLI (an agent harness), and answers in the ChatGPT or Claude apps or on the web may differ. Outputs are in Korean.

Input used
[Pasted material]
다음 코드를 검토해줘:

```javascript
class DiscountStrategyFactory {
  static create(type) {
    if (type === 'vip') return new VipDiscountStrategy();
    return new DefaultDiscountStrategy();
  }
}
class VipDiscountStrategy {
  calculate(price) { return price * 0.8; }
}
class DefaultDiscountStrategy {
  calculate(price) { return price; }
}
function getFinalPrice(price, userType) {
  const strategy = DiscountStrategyFactory.create(userType);
  return strategy.calculate(price);
}
```

VIP 회원만 20% 할인해주는 단순한 기능인데, 이렇게 팩토리+전략 패턴까지 써야 할지 잘 모르겠어.
gpt-5.6-luna (codex CLI · 에이전트 하네스) · Run on 2026-09-24

현재 기능이 VIP 여부 하나만 판단한다면 팩토리와 전략 패턴은 과합니다. 객체와 클래스가 늘어나면서 단순한 조건문보다 읽기 어려워지고, 할인 규칙도 여러 파일에 분산됩니다.

가장 단순한 구현은 다음과 같습니다.

function getFinalPrice(price, userType) {
  if (!Number.isFinite(price) || price < 0) {
    throw new Error('가격은 0 이상의 숫자여야 합니다.');
  }

  return userType === 'vip' ? price * 0.8 : price;
}

다만 실제 금액 계산이라면 부동소수점 오차와 반올림 정책을 고려해야 합니다.

function getFinalPrice(price, userType) {
  if (!Number.isFinite(price) || price < 0) {
    throw new Error('가격은 0 이상의 숫자여야 합니다.');
  }

  const discountRate = userType === 'vip' ? 0.2 : 0;
  return Math.round(price * (1 - discountRate));
}

팩토리와 전략 패턴은 다음과 같은 상황에서 도입하는 편이 적절합니다.

  • 회원 유형이 여러 개로 늘어날 때
  • 할인 계산마다 서로 다른 복잡한 규칙이 필요할 때
  • 각 할인 정책을 독립적으로 테스트하거나 교체해야 할 때
  • 할인 정책이 외부 설정이나 별도 모듈로 관리될 때

현재 요구사항에는 조건문 또는 할인율 매핑 정도가 가장 유지보수하기 좋은 선택입니다. 특히 앞으로 할인 유형이 조금 늘어날 가능성만 있다면 다음처럼 구성할 수도 있습니다.

const DISCOUNT_RATES = {
  vip: 0.2,
};

function getFinalPrice(price, userType) {
  if (!Number.isFinite(price) || price < 0) {
    throw new Error('가격은 0 이상의 숫자여야 합니다.');
  }

  const discountRate = DISCOUNT_RATES[userType] ?? 0;
  return Math.round(price * (1 - discountRate));
}

결론적으로 현재 코드는 동작하지만, 요구사항에 비해 구조가 과도합니다. 지금은 단순 함수로 시작하고, 할인 규칙이 실제로 복잡해질 때 전략 패턴으로 확장하는 것이 가장 실용적입니다.

More in this category

4 Optimized Versions of A Prompt (in Arabic)
$500/Hour AI Consultant Prompt
Adaptive Thinking Framework
Agent Organization Expert
AI Kickstart prompt