Files
2nd/10_Wiki/Topic_General/General Knowledge
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
..

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit
wiki-2026-0508-readme README — General Knowledge 10_Wiki/Topics verified self
P-REINFORCE-AUTO-698D8B
none A 0.95 applied
readme
index
meta
2026-05-10 pending

README — General Knowledge

매 한 줄

"매 cross-domain knowledge 의 hub". 매 General Knowledge folder 는 narrowly-scoped 도메인에 fit 하지 않은 wiki note 의 catch-all index — game design, web platform, ML theory, neuroscience 가 cross-pollinate 한다.

매 핵심

매 폴더 목적

  • 매 cross-domain note 의 home — 매 specific topic folder (AI_and_ML, Programming) 에 fit 하지 않은 entry.
  • 매 case study + concept primer 의 mix.
  • 매 canonical 문서 + redirect 문서 의 coexist.

매 분류 체계

  • 매 status: verified (canonical), duplicate (redirect), merged (filename-level redirect), needs_review (pending cleanup).
  • 매 canonical_id: self (own canonical) or external canonical slug.
  • 매 frontmatter 의 일관된 schema — id, title, category, status, canonical_id, aliases, source_trust_level.

매 응용

  1. Game design knowledge base — Albion Online, Clash Royale, Diablo 2 의 case study.
  2. Web platform primer — OffscreenCanvas, SharedArrayBuffer 의 깊이 있는 reference.
  3. Cognitive science index — Dopamine Signaling, Mycological Horror 의 cross-cut topic.

💻 패턴

패턴 1: Frontmatter linting

import yaml
import frontmatter
from pathlib import Path

REQUIRED = {"id", "title", "category", "status", "canonical_id"}

def lint_folder(folder: Path):
    issues = []
    for md in folder.glob("*.md"):
        post = frontmatter.load(md)
        missing = REQUIRED - set(post.metadata.keys())
        if missing:
            issues.append((md.name, f"missing: {missing}"))
    return issues

for name, issue in lint_folder(Path("./General Knowledge")):
    print(f"{name}: {issue}")

패턴 2: Duplicate detection (title similarity)

from rapidfuzz import fuzz
from pathlib import Path
import frontmatter

def find_dupes(folder: Path, threshold=85):
    titles = []
    for md in folder.glob("*.md"):
        post = frontmatter.load(md)
        titles.append((md.name, post.metadata.get("title", "")))

    pairs = []
    for i, (n1, t1) in enumerate(titles):
        for n2, t2 in titles[i+1:]:
            score = fuzz.ratio(t1, t2)
            if score >= threshold:
                pairs.append((n1, n2, score))
    return pairs
import re
import networkx as nx
from pathlib import Path

LINK_RE = re.compile(r"\[\[([^\]]+)\]\]")

def build_graph(folder: Path) -> nx.DiGraph:
    g = nx.DiGraph()
    for md in folder.glob("*.md"):
        text = md.read_text()
        for target in LINK_RE.findall(text):
            g.add_edge(md.stem, target.split("|")[0])
    return g

g = build_graph(Path("./General Knowledge"))
print(f"nodes={g.number_of_nodes()} edges={g.number_of_edges()}")
print("orphans:", [n for n in g.nodes if g.in_degree(n) == 0])

패턴 4: Redirect resolution

def resolve(slug: str, index: dict[str, dict]) -> str:
    seen = set()
    cur = slug
    while cur in index and index[cur].get("status") in ("duplicate", "merged"):
        if cur in seen:
            raise ValueError(f"redirect cycle at {cur}")
        seen.add(cur)
        cur = index[cur].get("canonical_id") or index[cur].get("redirect_to")
    return cur

패턴 5: Reinforcement scheduler

from datetime import date, timedelta

def needs_reinforcement(meta: dict, today: date = date.today()) -> bool:
    last = date.fromisoformat(meta["last_reinforced"])
    score = float(meta.get("confidence_score", 0.9))
    interval = timedelta(days=30 if score >= 0.9 else 14)
    return today - last > interval

매 결정 기준

상황 Approach
새 note 의 fit folder 가 명확 specific folder 에 add (not General Knowledge)
cross-domain note General Knowledge
Korean title duplicate REDIRECT to English canonical
stub / placeholder redirect to README

기본값: domain-specific folder 우선, fallback 만 General Knowledge.

🔗 Graph

  • 부모: Wiki Index · 10_Wiki/Topics
  • 변형: AI_and_ML/README · Programming & Language/README

🤖 LLM 활용

언제: cross-domain question 의 routing, knowledge graph 구축, reinforcement scheduling. 언제 X: 매 specific domain 의 deep query — domain folder 의 직접 lookup 우선.

안티패턴

  • Catch-all dumping: 매 note 가 specific folder 의 candidate 인데 General Knowledge 에 dump — graph 의 fragmentation.
  • Redirect chain: 매 redirect → redirect → canonical 의 multi-hop. 매 single-hop 으로 flatten.
  • Stale frontmatter: 매 last_reinforced 의 90+일 미갱신 — reinforcement loop 의 break.

🧪 검증 / 중복

  • Verified (folder ls + frontmatter lint).
  • 신뢰도 A (meta-doc, self-describing).

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — README 의 substantive content 화