원클릭으로
sba
Story-Based Architecture conventions for this codebase. Apply when implementing or refactoring use cases.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Story-Based Architecture conventions for this codebase. Apply when implementing or refactoring use cases.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | SBA |
| description | Story-Based Architecture conventions for this codebase. Apply when implementing or refactoring use cases. |
This codebase follows Story-Based Architecture. Every business operation is a self-contained narrative living in a single file. Apply these principles strictly.
Every use case follows the same pattern:
def use_case(args):
# 1. Load: gather all data needed upfront
...
# 2. Validate: check every precondition before any mutation
...
# 3. Execute: perform calculations and mutations
...
Load everything first, validate everything, then mutate. No interleaving unless there is a performance justification.
The behavior of a use case must be visible by reading only that file. Avoid:
Two use cases that look similar might serve different business purposes. Keep them separate. Similar code is not duplication when it can evolve independently.
Sandi Metz: "Duplication is far cheaper than the wrong abstraction."
DRY applies to knowledge, not to code. Hunt and Thomas: "Every piece of knowledge must have a single, unambiguous, authoritative representation."
When something is genuinely shared across use cases, share only the bare minimum and do not over generalize. Keep the boundaries of what is shared minimal in order to avoid dependencies and abstractions that will make the code harder to read.
Files are named after the business operation they perform: place_order.py. Not OrderHandler.py or OrderService.py. Open the file, see the story.
domain folder. Use a meaningful filename. It is ok to reuse the same filename if the knowledge falls in the same domain. For example, if you have two use cases that need to share the same business rules for calculating discounts, you can create a domain/discounts.py file and put the shared logic there.