{
  "markdown": "# Gemini Workspace History\n\nPersistent session continuity for the Gemini CLI.\n\nGemini Workspace History is a Gemini CLI extension designed to provide continuity between AI-assisted coding sessions within a specific workspace. It solves \"context amnesia\" by automatically restoring the latest technical summary at the start of every session and archiving transcripts at the end.\n\n## Key Features\n\n- **Context Restoration:** Automatic injection of the latest session summary (`active-context.md`) into the current context.\n- **Session Archiving:** Automatic Gzip compression of session transcripts for long-term history.\n- **Controlled Exit:** Custom `close-workspace` command ensures a high-quality summary is generated before closing.\n- **Workspace Summarizer Skill:** A dedicated skill to assist in generating and managing session summaries.\n- **Local Storage:** All history (summaries, compressed transcripts, and active context) is kept within the project's `.gemini-workspace-history/` directory.\n\n## Getting Started\n\n### Installation\n\nTo use this extension in your project, link it to your Gemini CLI:\n\n```bash\ngemini extension link .\n```\n\n### Usage Workflow\n\n1. **Start:** When you start a new session (`gemini`), the `on-start.js` hook identifies the latest summary and prepares `active-context.md`.\n2. **Work:** The Gemini CLI automatically loads `active-context.md` into your session context.\n3. **End:** Use the `/close-workspace` (or your custom command name) to summarize your work and exit cleanly.\n\n### Commands\n\n- `/close-workspace`: Prompts the agent to write a structured technical summary of the current session and then saves it to `.gemini-workspace-history/` using standard tools before exiting. This is the recommended way to end a session to ensure continuity.\n\n## Under the Hood\n\n### Directory Structure\n\nThe extension maintains all its data in the `.gemini-workspace-history/` directory:\n- `active-context.md`: The summary currently being injected into the session.\n- `session-YYYY-MM-DD-HH-mm.json.gz`: Compressed session transcripts.\n- `summary-YYYY-MM-DD-HH-mm.md`: Individual session summaries.\n\n### Technical Implementation\n\n- **Lifecycle Hooks:**\n    - `SessionStart`: Executes `hooks/on-start.js` to prepare the active context from the most recent session summary and history.\n    - `SessionEnd`: Executes `hooks/on-end.js` to archive the session transcript as a compressed Gzipped JSON file.\n- **Context Injection:** The `gemini-extension.json` manifest is configured with `contextFileName: \".gemini-workspace-history/active-context.md\"`, which the CLI uses to automatically include the file in every session.\n- **Hooks Configuration:** Lifecycle hooks are managed via `hooks/hooks.json`.\n- **Skills:** Includes the `workspace-summarizer` skill to help maintain session continuity.\n\n## Development\n\n### Running Tests\n\nTo verify the extension's functionality and path resolution:\n\n```bash\nnpm test\n```\n\n### Version Management\n\nThe project uses a strict versioning policy. Every PR must include a version bump, which is verified by the automated test suite.\n\nTo increment the patch version based on the latest git tag:\n\n```bash\nnpm run bump\n```\n\nThis command will update both `package.json` and `gemini-extension.json` to the next patch version (e.g., `0.1.2` -> `0.1.3`).\n",
  "bytes": 3304,
  "sha": "11377627e58572f9295308f27cb9d5fcb54dd8f78e4e5ee49f55c2ba823cd75b",
  "repo_slug": "msiweka/gemini-workspace-history",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_msiweka_gemini_workspace_history_a6894806/readme"
}