# Antigravity Plugin Rules — wiki-superpowers 본 디렉토리는 **Antigravity CLI 환경에 최적화된 rule split** 을 제공한다. **root `rules/` 가 여전히 SSOT 이며**, 본 폴더의 파일은 root rule 의 본문을 의미상 동일하게 유지하되 Antigravity 의 context window / 모델 instruction-following 한계를 고려해 작은 파일로 분할한 사본이다. ## 왜 분할이 필요한가 - [공식 권고 (HumanLayer)](https://www.humanlayer.dev/blog/writing-a-good-claude-md): *"< 300 lines is best, shorter is even better. Frontier thinking LLMs can follow ~150-200 instructions with reasonable consistency."* - [Anthropic Claude Code best practices](https://code.claude.com/docs/en/best-practices): 500줄 초과 파일은 대부분 무시됨. - root `rules/` 중 다음 3개가 임계 초과: - `rules/reporting-standards.md` — 559줄 ❌ - `rules/advisory-depth.md` — 418줄 ❌ - `rules/diagram-standards.md` — 379줄 ❌ - 나머지 root rules 는 300줄 미만 — 분할 불필요. ## 작동 원칙 1. **Root rules 는 변경되지 않는다.** 3개 모델 (Claude / Antigravity / Codex) 공유 SSOT. 2. **Plugin 폴더 파일은 root 의 verbatim split**. 의미를 바꾸지 않는다. 단어를 추가하거나 룰을 약화시키지 않는다. 3. **Antigravity-specific 메모는 각 sub-folder README 에만 추가**. 그 외 sub-file 은 root 본문 그대로. 4. **충돌 시 root 가 우선**. 본 폴더의 내용이 root 와 어긋나면 root 가 진실. ## 폴더 구조 ``` .agents/plugins/wiki-superpowers/rules/ README.md ← 본 파일 (index + 운영 원칙) reporting-standards/ README.md ← scope + Antigravity hook 메모 + sub-file index output-split.md ← root §"Output Split Policy" 발췌 report-template.md ← root §"Report Template" §0~§3 + §3-1 + §5~§8 findings-template.md ← root §4 + §4-1 verification-rules.md ← root §7 advisory-depth/ README.md ← scope + Antigravity 한계 (Stop hook 본문 미수신) 메모 contracts-1-causal-chain.md ← Contract 1 + Why Assumption Surfacing contracts-2-3-4-structure.md ← Contract 2 (옵션 열거) + 3 (Plan Gap) + 4 (Direct-Response) contracts-5-6-citation-grep.md ← Contract 5 (Citation) + 6 (Self-Grep) contract-7-forbidden-words.md ← Contract 7 + Concept Organization Mode diagram-standards/ README.md ← scope + tool 분리 reminder + 8항 self-check principles.md ← §1 The Two Tests + §2 The Question elements.md ← §3 Element Budget + §4 Component Label + §5 Edge Label + §6 Visual Hierarchy structure.md ← §7 Boundary + §8 Callout + §9 Legend + §10 Header/Footer + §11 Source mermaid.md ← §12 Sequence + §13 ER anti-patterns.md ← §15 + §16 ``` ## Antigravity-specific 컨텍스트 (전역 메모) 본 폴더의 sub-rule 을 따를 때 Antigravity 특수 컨텍스트: | 컨텍스트 | 영향 | |---|---| | `Stop` hook 이 `response_text` 미수신 | chat 본문 응답 enforce 불가 — 따라서 `reporting-standards/` 의 §7.1 self-grep 진실성, advisory-depth Contract 7 금지어 검사 등은 **agent self-check 단독 책임** | | PreToolUse hook `wiki_hard_gate.py` 가 `docs/superpowers/specs/*.md` write 만 가로챔 | G1~G4 만 강제 (§7.1 grep 명령 존재 / 금지어 / Verdict 산식 / §4-1 Adversarial Review 존재) | | 도구 이름 = `write_to_file`, `edit_file`, `run_command`, `bash` | 다른 write 도구 사용 시 hook 우회됨 — `str_replace_editor` 등 발견 시 matcher 확장 필요 | | Brain folder (`~/.gemini/antigravity-cli/brain//`) 휘발성 | implementation plan / task / scratch 파일은 영구 산출물 아님 — 최종 보고서는 반드시 `docs/superpowers/specs/` 에 | ## 로딩 패턴 (skill 의 lazy-load 와 동일) - 작업 시작 시 본 폴더의 **README 와 적용 sub-rule 만 로드** (전체 모든 sub-rule 한꺼번에 로드 X). - 예: multi-doc 보고서 작성 → `reporting-standards/` 의 sub-rule 4개. diagram 그리는 작업 → `diagram-standards/`. 그 외는 로드 X. - 모호하면 root `rules/` 를 단일 파일로 로드해 통일된 본문 확인. ## 충돌 / 의문 발생 시 - 본 폴더 sub-file 과 root 가 다르면 **root 진실**. plugin 폴더 sub-file 의 오류로 간주 → 사용자에게 보고. - root 가 갱신되면 plugin 폴더 sub-file 도 같이 업데이트 필요 (현재 수동 동기화). 추후 자동화 후보.