refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조

에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Antigravity Agent
2026-07-11 11:05:56 +09:00
parent 6549ead309
commit c24165b8bc
6193 changed files with 1717 additions and 31 deletions
@@ -0,0 +1,153 @@
---
id: wiki-2026-0508-vfunction
title: vFunction
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [virtual function, 가상 함수, vFunction.com]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [oop, polymorphism, architecture, modernization]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: cpp
framework: none
---
# vFunction
## 매 한 줄
> **"매 dispatch 의 runtime 의 resolve"**. 매 term 의 two meanings — (1) C++ `virtual` function (vtable-based dynamic dispatch), (2) vFunction.com (AI-driven Java monolith → microservices modernization platform). 매 context 의 disambiguate.
## 매 핵심
### 매 (1) Virtual function (C++)
- **vtable**: 매 class per — function pointer table.
- **vptr**: 매 instance per — vtable 의 pointer.
- **Dispatch**: `obj->fn()``obj->vptr[fn_index]()` (one extra indirection).
- **Cost**: ~1-2 ns per call, 매 inlining 의 block.
- **Override**: derived class 의 same signature 의 redefine.
### 매 (2) vFunction.com platform
- **Static + dynamic analysis**: 매 Java/.NET monolith 의 scan.
- **Domain extraction**: AI 의 bounded context 의 cluster.
- **Refactor recommendation**: 매 service boundary + dead code + TCO.
- **2025 update**: Claude/GPT-5 backed reasoning, 매 Spring Boot extraction template.
### 매 응용 (vfunc C++)
1. Strategy pattern.
2. Plugin/driver interface.
3. Mock injection 의 testing.
### 매 응용 (vFunction.com)
1. Legacy Java EE → microservice migration.
2. Technical debt quantification.
3. Architectural drift detection.
## 💻 패턴
### Virtual function (modern C++20)
```cpp
struct Shape {
virtual ~Shape() = default;
virtual double area() const = 0; // pure virtual
};
struct Circle : Shape {
double r;
explicit Circle(double r) : r(r) {}
double area() const override { return 3.14159 * r * r; }
};
double total(std::span<const std::unique_ptr<Shape>> shapes) {
double s = 0;
for (auto& sh : shapes) s += sh->area(); // dynamic dispatch
return s;
}
```
### Devirtualization hint (final)
```cpp
struct FastCircle final : Shape { // final → compiler 의 devirtualize
double area() const override final { return 3.14; }
};
```
### CRTP (static polymorphism, vfunc 의 X)
```cpp
template<class Derived>
struct Shape {
double area() const { return static_cast<const Derived*>(this)->area_impl(); }
};
struct Square : Shape<Square> {
double s;
double area_impl() const { return s * s; } // zero overhead
};
```
### Rust (trait object, vfunc analog)
```rust
trait Shape { fn area(&self) -> f64; }
struct Circle { r: f64 }
impl Shape for Circle { fn area(&self) -> f64 { 3.14 * self.r * self.r } }
fn total(shapes: &[Box<dyn Shape>]) -> f64 {
shapes.iter().map(|s| s.area()).sum() // dyn dispatch via vtable
}
```
### vFunction.com workflow (concept)
```yaml
# .vfunction/config.yaml
target: java/spring-boot
analyze:
paths: [src/main/java]
exclude: [test, generated]
extract:
strategy: domain-driven
min-cohesion: 0.7
recommendations:
- service-boundaries
- dead-code
- dependency-cycles
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Runtime polymorphism, OOP | virtual function |
| Hot loop, type known | CRTP / template |
| Plugin boundary | virtual + dyn lib |
| Legacy Java refactor | vFunction.com |
| Greenfield modular | DDD + bounded context |
**기본값**: virtual function 의 default OOP, CRTP 의 perf-critical.
## 🔗 Graph
- 부모: [[Object-Oriented-Programming]] · [[Polymorphism]]
- Adjacent: [[Legacy Modernization]]
## 🤖 LLM 활용
**언제**: legacy code 의 virtual function chain 의 analyze, 매 modernization scope 의 estimate.
**언제 X**: 매 micro-optimization decision (devirtualize 의 X) — 매 profiler 의 use.
## ❌ 안티패턴
- **Virtual everything**: 매 every method 의 virtual, 의 cost + 의 hard 의 reason. Final 의 default.
- **Diamond inheritance**: 매 multiple virtual base, 의 composition 의 prefer.
- **Virtual destructor 의 forget**: base class polymorphic, 의 leak.
- **vFunction 의 silver bullet**: tool 의 recommendation 의 blindly 의 apply, 의 domain understanding 의 first.
## 🧪 검증 / 중복
- Verified (ISO C++ standard, Stroustrup "Tour of C++" 3rd, vfunction.com docs 2025).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — full vFunction (virtual + platform) entry |