Files
2nd/10_Wiki/Topic_Programming/Architecture/Bottom-Up-Approach.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

5.9 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-bottom-up-approach Bottom Up Approach 10_Wiki/Topics verified self
Bottom-Up Design
Bottom-Up vs Top-Down
Composition-First Design
none A 0.9 applied
design
methodology
top-down
bottom-up
architecture
2026-05-10 pending
language framework
Polyglot Methodology

Bottom Up Approach

매 한 줄

"매 bottom-up = 매 작은 building block 부터 만들고 합쳐 system 으로 키우는 composition-first 접근.". 매 top-down 이 spec → decompose 인 반면, bottom-up 은 primitive → compose. 매 2026 modern 실무는 hybrid (meet-in-the-middle) — 매 spike/prototype 은 bottom-up, architecture 는 top-down, 매 LLM-driven 합성에서 bottom-up 의 compositional reasoning 이 다시 부상.

매 핵심

매 distinction

  • Top-down: 매 high-level spec → subsystem → module → function. 매 known-domain 적합.
  • Bottom-up: 매 primitive utility → combinator → application. 매 unknown-domain / discovery 적합.
  • Meet-in-the-middle: 매 양쪽 동시 → 중간에서 만남.
  • Outside-in (TDD): 매 acceptance test → unit — 매 top-down 변형.

매 strengths

  • Reusability: 매 primitive 가 여러 system 에 공통.
  • Testability: 매 작은 unit 부터 100% covered.
  • Discoverability: 매 unknown territory 에서 "뭐가 가능한지" 발견.
  • Compositional: 매 functional programming, Lisp, Forth 의 핵심.

매 weaknesses

  • No big picture: 매 individual unit 우수해도 system 일관성 부재 가능.
  • YAGNI risk: 매 안 쓰일 primitive 까지 만들 수 있음.
  • Integration debt: 매 끝에 가서야 합쳐지는 surprise.

매 응용

  1. Functional libraries: 매 Lodash, Ramda — combinator 가 primitive.
  2. Forth / Concatenative langs: 매 word 정의 후 합성.
  3. Embedded firmware: 매 driver → HAL → app.
  4. ML pipeline: 매 ops → layers → model.
  5. Spike / discovery prototype: 매 architecture 모르는 phase.

💻 패턴

Functional combinator (bottom-up)

-- primitives
add1 :: Int -> Int
add1 x = x + 1

double :: Int -> Int
double x = x * 2

-- composition (no top-level spec needed)
addThenDouble :: Int -> Int
addThenDouble = double . add1

-- application emerges by composing
process :: [Int] -> [Int]
process = map (double . add1) . filter (> 0)

Lisp — define primitives, then compose

(defun double (x) (* x 2))
(defun increment (x) (+ x 1))
(defun process (xs)
  (mapcar (lambda (x) (double (increment x)))
          (remove-if-not #'plusp xs)))

Embedded — HAL up

// 1. register-level primitive
void gpio_set_high(uint32_t pin) { GPIO_BSRR = 1u << pin; }

// 2. driver
void led_on(led_t led) { gpio_set_high(led.pin); }

// 3. application
void heartbeat(void) {
    while (1) { led_on(STATUS_LED); delay_ms(500); led_off(STATUS_LED); delay_ms(500); }
}

React UI — primitive components up

// 1. atoms
const Button = ({ children, ...props }) => <button className="btn" {...props}>{children}</button>;
const Input  = ({ ...props }) => <input className="input" {...props} />;

// 2. molecules
const SearchBox = () => (
  <div className="search">
    <Input placeholder="Search..." />
    <Button>Go</Button>
  </div>
);

// 3. page (emerges)
const HomePage = () => <header><Logo /><SearchBox /></header>;

Spike-driven discovery

# Day 1 — bottom-up exploration before architecture exists
def parse_log_line(s): ...           # primitive
def filter_errors(lines): ...        # combinator
def aggregate_by_minute(lines): ...
def render_chart(buckets): ...
# After 2 days you SEE the pipeline → THEN write architecture doc

LLM compositional planning (modern bottom-up)

# Claude tool-use bottom-up: define small tools, let model compose
tools = [
    {"name": "search_db", "description": "..."},
    {"name": "render_chart", "description": "..."},
    {"name": "send_email", "description": "..."},
]
# Model receives high-level task and composes a plan from primitives
client.messages.create(
    model="claude-opus-4-7",
    tools=tools,
    messages=[{"role": "user", "content": "Send a weekly sales summary"}],
)

Forth — concatenative composition

: SQUARE  DUP * ;            \ primitive
: CUBE    DUP SQUARE * ;     \ compose
: AREA    SQUARE 3.14159 * ; \ compose with literal

매 결정 기준

상황 Approach
Domain unknown / spike Bottom-up
Spec frozen, deadline Top-down
Reusable library Bottom-up
End-to-end product Hybrid (meet in middle)
TDD acceptance Outside-in (top-down variant)
LLM tool-using agent Bottom-up primitives, top-down task

기본값: hybrid — 매 architecture skeleton (top-down) + 매 primitive layer (bottom-up) → 매 meet middle.

🔗 Graph

🤖 LLM 활용

언제: unknown domain spike, library design, primitive 조합 탐색, agentic tool composition. 언제 X: regulated/safety system 의 spec-driven part — 매 top-down 우선.

안티패턴

  • Pure bottom-up without integration plan: 매 primitive 100개 + 통합 안 됨 = 0 가치.
  • Premature primitives: 매 안 쓰일 utility 양산 (YAGNI 위반).
  • Bottom-up for legally-specified systems: 매 spec drift → compliance fail.
  • Skipping integration tests: 매 unit 모두 green 인데 system fail.

🧪 검증 / 중복

  • Verified (Abelson&Sussman SICP 1985, Forth dictionary docs, "Out of the Tar Pit" 2006).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — bottom-up vs top-down, composition patterns, hybrid default