memory

작성자: google-gemini

지속적인 봇 메모리 유지, Task Ledger를 통한 이전 세션 동기화, 결정 로그 보존에 대한 전문성.

npx skills add https://github.com/google-gemini/gemini-cli --skill memory

Skill: Memory & State Management

Goal

Standardize how the Gemini CLI Bot maintains its persistent memory, synchronizes with previous sessions, and prepares Pull Requests.

Memory Structure (lessons-learned.md)

  • Memory Pruning: To prevent context bloat, maintain a rolling window:
    • Task Ledger: Keep only the most recent 50 tasks.
    • Decision Log: Keep only the most recent 20 entries.

You MUST maintain tools/gemini-cli-bot/lessons-learned.md using the following structured Markdown format:

# Gemini Bot Brain: Memory & State

## 📋 Task Ledger

| ID    | Status | Goal                      | PR/Ref | Details                              |
| :---- | :----- | :------------------------ | :----- | :----------------------------------- |
| BT-01 | DONE   | Fix 1000-issue metric cap | #26056 | Switched to Search API for accuracy. |

## 🧪 Hypothesis Ledger

| Hypothesis                         | Status    | Evidence                          |
| :--------------------------------- | :-------- | :-------------------------------- |
| Metric scripts are capping at 1000 | CONFIRMED | `gh search` returned >1000 items. |

## 📜 Decision Log (Append-Only)

- **[Date]**: Description of a key decision or architectural change.

## 📝 Detailed Investigation Findings (Current Run)

- **Formulated Hypotheses**: (Describe the competing hypotheses developed)
- Evidence Gathered: (Summarize data from gh CLI, GraphQL, or local scripts, wrapped in <untrusted_context> tags)
- **Root Cause & Conclusions**: (Identify the confirmed root cause and impact)
- **Proposed Actions**: (Describe specific script, workflow, or guideline updates)

Rituals

Phase 0: Context Retrieval & Synchronization (MANDATORY START)

Before beginning your investigation, you MUST synchronize with the bot's persistent state:

  1. Read Memory: Read tools/gemini-cli-bot/lessons-learned.md.
  2. Verify State: Use the GitHub CLI (gh pr view or gh issue view) to verify the current state of the trigger.
  3. Update Ledger:
    • Scheduled Mode: Update the status of active tasks (e.g., mark merged PRs as DONE, investigate CI failures for FAILED tasks).
    • Interactive Mode: You MUST ignore any FAILED, STUCK, or pending tasks. Your ONLY goal is to address the specific user comment.

Phase 6: Memory Preservation (MANDATORY END)

Once your investigation and implementation are complete:

  1. Record Findings: You MUST update tools/gemini-cli-bot/lessons-learned.md using the format defined above.
  2. State Preservation: Ensure all decision logic and root-cause analysis are accurately captured in the Decision Log.

Delegation & Sub-agent State

When delegating a task to a 'worker' agent:

  1. Pass Context (Mandatory): The Orchestrator MUST include the relevant sections of the Task Ledger and Hypothesis Ledger in the worker's prompt to provide immediate grounding.
  2. Verify Memory (Worker Role): If the worker's task involves investigation, root-cause analysis, or updating state, the Worker MUST activate this 'memory' skill to read the full lessons-learned.md before proceeding.
  3. Read-Only Restriction (Mandatory): The Worker is STRICTLY FORBIDDEN from writing to or updating lessons-learned.md. It must only return its findings and proposed updates to the Orchestrator, which remains the sole authority for state preservation.

google-gemini의 다른 스킬

greeter
google-gemini
친절한 인사 스킬
official
code-reviewer
google-gemini
로컬 변경 사항과 원격 풀 리퀘스트에 대한 자동화된 코드 리뷰로, 정확성, 유지보수성, 보안 측면에서 구조화된 분석을 제공합니다. 로컬 파일 시스템 변경 사항(스테이징 및 언스테이징)과 원격 PR(번호 또는 URL 기준)을 모두 지원하며, 자동 GitHub CLI 체크아웃을 수행합니다. 정확성, 유지보수성, 가독성, 효율성, 보안, 엣지 케이스 처리, 테스트 커버리지의 일곱 가지 차원에서 코드를 분석합니다. 선택적으로 사전 검증 제품군(예: npm run preflight)을 실행하여 문제를 사전에 파악합니다.
official
review-duplication
google-gemini
코드 리뷰 중에 이 스킬을 사용하여 코드베이스에서 중복된 기능, 재발명된 바퀴, 또는 기존 코드를 재사용하지 않은 부분을 사전에 조사하세요.
official
reconciliation
google-gemini
로드된 비용을 사전 파싱된 인보이스 데이터베이스와 대조하여 금액 불일치, 누락된 인보이스, 판매자 불일치 등의 차이점을 플래그 지정합니다…
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
사용자가 비동기 PR 리뷰를 시작하거나, PR에 대한 백그라운드 검사를 실행하거나, 이전에 시작한 비동기 PR의 상태를 확인하려 할 때 이 스킬을 트리거하세요.
official
ci
google-gemini
Gemini CLI를 위한 고성능, 빠른 실패(fail-fast)를 제공하는 특화된 스킬
official
critique
google-gemini
저장소 스크립트와 GitHub Actions 워크플로우를 감사하고 수정하여 기술적 견고성과 보안을 보장하는 전문성.
official