gemcode 0.3.77__tar.gz → 0.3.80__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. {gemcode-0.3.77/src/gemcode.egg-info → gemcode-0.3.80}/PKG-INFO +133 -30
  2. {gemcode-0.3.77 → gemcode-0.3.80}/README.md +132 -29
  3. {gemcode-0.3.77 → gemcode-0.3.80}/pyproject.toml +1 -1
  4. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/agent.py +42 -1
  5. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/autotune.py +17 -3
  6. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/cli.py +48 -2
  7. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/config.py +9 -0
  8. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/evals/harness.py +74 -20
  9. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/ide_protocol.py +8 -0
  10. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/ide_stdio.py +143 -10
  11. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/invoke.py +21 -5
  12. gemcode-0.3.80/src/gemcode/multimodal_input.py +144 -0
  13. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/repl_commands.py +137 -1
  14. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/repl_slash.py +376 -3
  15. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/trust.py +5 -0
  16. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tui/input_handler.py +8 -42
  17. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tui/scrollback.py +15 -1
  18. {gemcode-0.3.77 → gemcode-0.3.80/src/gemcode.egg-info}/PKG-INFO +133 -30
  19. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode.egg-info/SOURCES.txt +5 -0
  20. gemcode-0.3.80/tests/test_eval_harness_layout.py +32 -0
  21. gemcode-0.3.80/tests/test_ide_stdio_attachments.py +42 -0
  22. gemcode-0.3.80/tests/test_multimodal_input.py +64 -0
  23. gemcode-0.3.80/tests/test_repl_slash.py +241 -0
  24. gemcode-0.3.80/tests/test_slash_completion_registry.py +49 -0
  25. gemcode-0.3.77/tests/test_repl_slash.py +0 -86
  26. {gemcode-0.3.77 → gemcode-0.3.80}/LICENSE +0 -0
  27. {gemcode-0.3.77 → gemcode-0.3.80}/MANIFEST.in +0 -0
  28. {gemcode-0.3.77 → gemcode-0.3.80}/setup.cfg +0 -0
  29. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/__init__.py +0 -0
  30. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/__main__.py +0 -0
  31. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/audit.py +0 -0
  32. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/autocompact.py +0 -0
  33. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/callbacks.py +0 -0
  34. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/capability_routing.py +0 -0
  35. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/checkpoints.py +0 -0
  36. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/compaction.py +0 -0
  37. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/computer_use/__init__.py +0 -0
  38. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/computer_use/browser_computer.py +0 -0
  39. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/context_budget.py +0 -0
  40. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/context_warning.py +0 -0
  41. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/credentials.py +0 -0
  42. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/curated_memory.py +0 -0
  43. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/dynamic_policy.py +0 -0
  44. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/hitl_session.py +0 -0
  45. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/hooks.py +0 -0
  46. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/intent_classifier.py +0 -0
  47. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/interactions.py +0 -0
  48. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/kaira_daemon.py +0 -0
  49. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/learning.py +0 -0
  50. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/limits.py +0 -0
  51. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/live_audio_engine.py +0 -0
  52. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/logging_config.py +0 -0
  53. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/mcp_loader.py +0 -0
  54. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/memory/__init__.py +0 -0
  55. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/memory/embedding_memory_service.py +0 -0
  56. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/memory/file_memory_service.py +0 -0
  57. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/modality_tools.py +0 -0
  58. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/model_errors.py +0 -0
  59. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/model_routing.py +0 -0
  60. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/openapi_loader.py +0 -0
  61. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/output_styles.py +0 -0
  62. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/paths.py +0 -0
  63. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/permissions.py +0 -0
  64. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/plugins/__init__.py +0 -0
  65. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/plugins/terminal_hooks_plugin.py +0 -0
  66. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/plugins/tool_recovery_plugin.py +0 -0
  67. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/policy_profile.py +0 -0
  68. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/pricing.py +0 -0
  69. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/prompt_suggestions.py +0 -0
  70. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/__init__.py +0 -0
  71. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/config.py +0 -0
  72. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/deps.py +0 -0
  73. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/engine.py +0 -0
  74. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/stop_hooks.py +0 -0
  75. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/token_budget.py +0 -0
  76. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/query/transitions.py +0 -0
  77. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/refine.py +0 -0
  78. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/review_agent.py +0 -0
  79. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/rules.py +0 -0
  80. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/session_runtime.py +0 -0
  81. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/session_store.py +0 -0
  82. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/skills.py +0 -0
  83. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/slash_commands.py +0 -0
  84. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/thinking.py +0 -0
  85. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tool_prompt_manifest.py +0 -0
  86. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tool_registry.py +0 -0
  87. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tool_result_store.py +0 -0
  88. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/__init__.py +0 -0
  89. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/bash.py +0 -0
  90. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/browser.py +0 -0
  91. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/curated_memory.py +0 -0
  92. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/edit.py +0 -0
  93. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/filesystem.py +0 -0
  94. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/notebook.py +0 -0
  95. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/notes.py +0 -0
  96. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/repo_map.py +0 -0
  97. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/search.py +0 -0
  98. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/shell.py +0 -0
  99. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/shell_gate.py +0 -0
  100. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/skills.py +0 -0
  101. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/subtask.py +0 -0
  102. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/tasks.py +0 -0
  103. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/think.py +0 -0
  104. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/todo.py +0 -0
  105. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/web.py +0 -0
  106. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools/web_search.py +0 -0
  107. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tools_inspector.py +0 -0
  108. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tui/spinner.py +0 -0
  109. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tui/welcome_banner.py +0 -0
  110. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/tui/welcome_rich.py +0 -0
  111. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/version.py +0 -0
  112. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/vertex.py +0 -0
  113. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/web/__init__.py +0 -0
  114. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/web/sse_adapter.py +0 -0
  115. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/web/terminal_repl.py +0 -0
  116. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/web/web_sse_compat.py +0 -0
  117. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode/workspace_hints.py +0 -0
  118. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode.egg-info/dependency_links.txt +0 -0
  119. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode.egg-info/entry_points.txt +0 -0
  120. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode.egg-info/requires.txt +0 -0
  121. {gemcode-0.3.77 → gemcode-0.3.80}/src/gemcode.egg-info/top_level.txt +0 -0
  122. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_add_dir.py +0 -0
  123. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_agent_instruction.py +0 -0
  124. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_autocompact.py +0 -0
  125. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_capability_routing.py +0 -0
  126. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_checkpoint_diff_command.py +0 -0
  127. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_cli_init.py +0 -0
  128. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_computer_use_permissions.py +0 -0
  129. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_context_budget.py +0 -0
  130. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_context_warning.py +0 -0
  131. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_credentials.py +0 -0
  132. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_interactive_permission_ask.py +0 -0
  133. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_kaira_scheduler.py +0 -0
  134. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_modality_tools.py +0 -0
  135. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_model_error_retry.py +0 -0
  136. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_model_errors.py +0 -0
  137. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_model_routing.py +0 -0
  138. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_output_styles_and_rules.py +0 -0
  139. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_paths.py +0 -0
  140. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_permissions.py +0 -0
  141. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_prompt_suggestions.py +0 -0
  142. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_repl_commands.py +0 -0
  143. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_skills.py +0 -0
  144. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_slash_commands.py +0 -0
  145. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_thinking_config.py +0 -0
  146. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_token_budget.py +0 -0
  147. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_tool_context_circulation.py +0 -0
  148. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_tools.py +0 -0
  149. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_tools_inspector.py +0 -0
  150. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_web_sse_adapter.py +0 -0
  151. {gemcode-0.3.77 → gemcode-0.3.80}/tests/test_workspace_hints.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gemcode
3
- Version: 0.3.77
3
+ Version: 0.3.80
4
4
  Summary: Local-first coding agent on Google Gemini + ADK
5
5
  Author: GemCode Contributors
6
6
  License: Apache License
@@ -197,32 +197,82 @@ This document is the **authoritative reference** for CLI behavior, configuration
197
197
 
198
198
  ## Table of contents
199
199
 
200
- 1. [Architecture](#architecture)
201
- 2. [Requirements and install](#requirements-and-install)
202
- 3. [First run](#first-run)
203
- 4. [CLI commands](#cli-commands)
204
- 5. [Main CLI flags](#main-cli-flags)
205
- 6. [The `.gemcode/` directory](#the-gemcode-directory)
206
- 7. [Project context: `GEMINI.md`](#project-context-geminimd)
207
- 8. [Function tools (catalog)](#function-tools-catalog)
208
- 9. [REPL: slash commands](#repl-slash-commands)
209
- 10. [GemSkills](#gemskills)
210
- 11. [Output styles and rules](#output-styles-and-rules)
211
- 12. [Checkpoints, diff, and rewind](#checkpoints-diff-and-rewind)
212
- 13. [Multi-root workspaces (`/add-dir`)](#multi-root-workspaces-add-dir)
213
- 14. [Model routing and thinking](#model-routing-and-thinking)
214
- 15. [Capabilities](#capabilities)
215
- 16. [Permissions and interactive approval](#permissions-and-interactive-approval)
216
- 17. [Hooks](#hooks)
217
- 18. [Token budget, context, and compaction](#token-budget-context-and-compaction)
218
- 19. [MCP](#mcp)
219
- 20. [IDE bridge: `gemcode ide --stdio`](#ide-bridge-gemcode-ide-stdio)
220
- 21. [Eval harness and autotune](#eval-harness-and-autotune)
221
- 22. [Kaira scheduler](#kaira-scheduler)
222
- 23. [Live audio](#live-audio)
223
- 24. [Related components](#related-components)
224
- 25. [Environment variables](#environment-variables)
225
- 26. [Development and release](#development-and-release)
200
+ 1. [What GemCode is (detailed)](#what-gemcode-is-detailed)
201
+ 2. [Architecture](#architecture)
202
+ 3. [Requirements and install](#requirements-and-install)
203
+ 4. [First run](#first-run)
204
+ 5. [CLI commands](#cli-commands)
205
+ 6. [Main CLI flags](#main-cli-flags)
206
+ 7. [The `.gemcode/` directory](#the-gemcode-directory)
207
+ 8. [Project context: `GEMINI.md`](#project-context-geminimd)
208
+ 9. [Function tools (catalog)](#function-tools-catalog)
209
+ 10. [REPL: slash commands](#repl-slash-commands)
210
+ 11. [GemSkills](#gemskills)
211
+ 12. [Curated memory](#curated-memory)
212
+ 13. [Workspace trust](#workspace-trust)
213
+ 14. [Output styles and rules](#output-styles-and-rules)
214
+ 15. [Checkpoints, diff, and rewind](#checkpoints-diff-and-rewind)
215
+ 16. [Multi-root workspaces (`/add-dir`)](#multi-root-workspaces-add-dir)
216
+ 17. [Model routing and thinking](#model-routing-and-thinking)
217
+ 18. [Capabilities](#capabilities)
218
+ 19. [Permissions and interactive approval](#permissions-and-interactive-approval)
219
+ 20. [Hooks](#hooks)
220
+ 21. [Token budget, context, and compaction](#token-budget-context-and-compaction)
221
+ 22. [MCP](#mcp)
222
+ 23. [IDE bridge: `gemcode ide --stdio`](#ide-bridge-gemcode-ide-stdio)
223
+ 24. [Eval harness and autotune](#eval-harness-and-autotune)
224
+ 25. [Kaira scheduler](#kaira-scheduler)
225
+ 26. [Live audio](#live-audio)
226
+ 27. [Related components](#related-components)
227
+ 28. [Environment variables](#environment-variables)
228
+ 29. [Development and release](#development-and-release)
229
+
230
+ ---
231
+
232
+ ## What GemCode is (detailed)
233
+
234
+ **GemCode** is a single Python package that exposes a **`gemcode`** CLI. Every invocation is anchored to a **project root** (`-C`, default current directory). From there it:
235
+
236
+ - Builds a **GemCodeConfig** (model, capabilities, permissions, limits, paths).
237
+ - Optionally loads **MCP** toolsets from `.gemcode/mcp.json`.
238
+ - Constructs an ADK **Runner** with a root **LlmAgent** whose **system instruction** aggregates: global behavior, `GEMINI.md`, capability sections, tool manifest, optional **output style** and **rules**, the **skills manifest** (metadata only), and any **session-loaded GemSkills** (full bodies after `/gemskill`).
239
+ - Persists conversation state in **SQLite** (`.gemcode/sessions.sqlite`) keyed by **`--session`** / REPL session id.
240
+
241
+ ### Modes of use
242
+
243
+ | Mode | How | Best for |
244
+ |------|-----|----------|
245
+ | **One-shot CLI** | `gemcode -C repo "prompt"` | Scripts, CI-style runs, quick questions. |
246
+ | **REPL** | `gemcode -C repo` (TTY, no prompt arg) | Long sessions, slash commands, exploration. |
247
+ | **TUI** | Same as REPL with `GEMCODE_TUI=1` (default when supported) | Scrollback, styled output, slash **completion menu**. |
248
+ | **IDE** | VS Code extension → `gemcode ide --stdio` | Editor-native Chat, diff apply, proposals. |
249
+ | **Kaira** | `gemcode kaira` | Background queue of independent agent jobs. |
250
+ | **Live audio** | `gemcode live-audio` | Voice → Gemini Live (separate from file-editing REPL). |
251
+
252
+ ### “Memory” in GemCode (three different things)
253
+
254
+ | Mechanism | Where | Purpose |
255
+ |-----------|--------|---------|
256
+ | **Session history** | `sessions.sqlite` | Full turn-by-turn chat for a session id. |
257
+ | **Curated memory** | `GEMCODE_MEMORY.md`, `GEMCODE_USER.md` (under `.gemcode/`) | Small, **human-approved** facts injected when memory features are on; distinct from noisy auto-memory. |
258
+ | **Embedding memory** | `memories.jsonl` + ADK hooks (when enabled) | Retrieval-oriented storage when **`GEMCODE_ENABLE_MEMORY`** (and related) are on. |
259
+
260
+ Use **`/curated`** in the REPL to preview the curated snapshot; tools such as **`read_curated_memory`** / **`remember_fact`** operate on that layer.
261
+
262
+ ### GemSkills at a glance (four ways)
263
+
264
+ | Mechanism | Effect |
265
+ |-----------|--------|
266
+ | **`/create gemskill <name> [description]`** | Creates **`.gemcode/skills/<name>/SKILL.md`** scaffold (new skill on disk). |
267
+ | **`/gemskill <name>`** | **Pins** the skill’s **full body** into the **system instruction** for the **current session** (until `/gemskill clear`, new session, or resume). Rebuilds the runner. |
268
+ | **`/append gemskill <name> <request>`** | One model turn instructed to **edit** that skill file according to `<request>`. |
269
+ | **`/skill <name>`**, **`/<name>`**, or tools **`load_skill`** | **One-shot** turn: inject expanded skill into the **user message** for that turn only (does not pin to system prompt). |
270
+
271
+ The built-in **`batch`** skill is manual-only (`disable_model_invocation`); use **`/batch <goal>`** to run it.
272
+
273
+ ### Slash completion
274
+
275
+ The REPL and TUI use a **canonical** command list for Tab completion (`repl_commands.SLASH_COMMANDS`). Some spellings (e.g. `/quit`, `/logs`, `/embed`) still work in **`process_repl_slash`** but may not appear as separate menu rows—see descriptions in **`/help`**.
226
276
 
227
277
  ---
228
278
 
@@ -280,6 +330,18 @@ Non-interactive environments (CI, pipes) must set `GOOGLE_API_KEY` explicitly an
280
330
  | `gemcode kaira` | Stdin-line → queued jobs scheduler (see [Kaira](#kaira-scheduler)). |
281
331
  | `gemcode ide --stdio` | **JSONL IDE protocol** on stdin/stdout for editor extensions (hidden entry; used by VS Code). |
282
332
 
333
+ **Files with a prompt (multimodal):** attach one or more files Gemini can read (images, **PDF**, audio, video, plain text, etc.) for that message only:
334
+
335
+ ```bash
336
+ gemcode -C . --attach ./screenshot.png "Why does this UI look wrong?"
337
+ gemcode -C . --attach ./report.pdf "What are the main conclusions?"
338
+ gemcode -C . --image a.png --image b.png "Compare these two layouts"
339
+ ```
340
+
341
+ (`--image` is an alias of `--attach`.)
342
+
343
+ In the **REPL / TUI**, queue files for the **next** message: `/attach path/to.pdf` (repeat for multiple), then type your question. Use `/attach list`, `/attach clear`. Aliases: `/image`, `/img`, `/file`.
344
+
283
345
  ---
284
346
 
285
347
  ## Main CLI flags
@@ -299,6 +361,7 @@ Non-interactive environments (CI, pipes) must set `GOOGLE_API_KEY` explicitly an
299
361
  | `--tool-combination-mode` | Gemini 3 **tool context circulation**: `deep_research\|always\|never\|auto`. |
300
362
  | `--mcp` | Load MCP toolsets from `.gemcode/mcp.json` (requires `pip install -e ".[mcp]"`). |
301
363
  | `--max-llm-calls` | Cap model↔tool iterations (`RunConfig.max_llm_calls`). |
364
+ | `--attach PATH` | Attach file(s) for **this** CLI message only (repeat flag). Gemini-supported MIME (e.g. images, PDF, audio, video). Default max ~20 MiB each (`GEMCODE_MAX_ATTACHMENT_BYTES`). Alias: `--image`. |
302
365
 
303
366
  Kaira and `live-audio` accept overlapping options (project root, `--yes`, research/embeddings, etc.); run `gemcode kaira -h` / `gemcode live-audio -h` for full lists.
304
367
 
@@ -311,6 +374,7 @@ State is **project-local** (unless noted).
311
374
  | Path / artifact | Purpose |
312
375
  |-----------------|---------|
313
376
  | `sessions.sqlite` | ADK session service: conversation history for `--session` ids. |
377
+ | `GEMCODE_MEMORY.md`, `GEMCODE_USER.md` | **Curated memory** (see [Curated memory](#curated-memory)). |
314
378
  | `audit.log` | JSONL audit: tool usage, model usage, terminal reasons, optional tool-use summaries. |
315
379
  | `tool-results/` | Offloaded large tool outputs; references like `tool_result:<sha256>`. |
316
380
  | `artifacts/` | File artifacts (ADK `FileArtifactService`). |
@@ -421,10 +485,16 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
421
485
 
422
486
  | Command | Purpose |
423
487
  |---------|---------|
488
+ | `/attach <path>`, `/attach list`, `/attach clear` | Queue file(s) for the **next** message (Gemini multimodal). Aliases: **`/image`**, **`/img`**, **`/file`**. |
489
+ | `/trust`, `/trust on`, `/trust off` | Show, grant, or revoke **workspace trust** for the project root (stored in `~/.gemcode/trust.json`; required for file/shell/git tools). |
424
490
  | `/init` \| `/init force` | Analyze the repo and generate or overwrite `GEMINI.md`. |
425
491
  | `/cost` | Token usage and estimated cost for the session. |
426
492
  | `/notes`, `/notes clear`, `/notes edit` | View, clear, or edit `.gemcode/notes.md`. |
427
- | `/create gemskill <name> [description]` | Scaffold `.gemcode/skills/<name>/SKILL.md`. |
493
+ | `/create gemskill <name> [description]` | **Create** a new GemSkill (scaffold `SKILL.md`). |
494
+ | `/gemskill <name>` | **Load** an existing skill into the **session system prompt** (until `/gemskill clear` or new session). |
495
+ | `/gemskill list` \| `/gemskill clear` | List skills or unload all session-loaded skills. |
496
+ | `/append gemskill <name> <request>` | **Iterate** the skill file: model edits `SKILL.md` per your request. |
497
+ | `/curated` | Show **curated memory** snapshot (`.gemcode/GEMCODE_MEMORY.md`, `GEMCODE_USER.md`). |
428
498
  | `/style`, `/style <name>\|off` | List or activate **output styles** (`.gemcode/output-styles/*.md`). |
429
499
  | `/rules` | Show **rule** files from `.gemcode/rules/` (with path gating). |
430
500
  | `/diff`, `/diff last`, `/diff cp_…` | Git diff, or **checkpoint → workspace** diff. |
@@ -437,7 +507,7 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
437
507
  | Command | Purpose |
438
508
  |---------|---------|
439
509
  | `/help` | Short help. |
440
- | `/status` | Model, capabilities, thinking, limits, risk/context telemetry. |
510
+ | `/status` | Model, capabilities, thinking, limits, risk/context telemetry; **`loaded_skills`** (session-pinned GemSkills from `/gemskill`). |
441
511
  | `/config` | Dump active config fields. |
442
512
  | `/session`, `/session list`, `/session name`, `/session resume`, `/session new` | Session management; `/clear` aliases `/session new`. |
443
513
  | `/compact`, `/compact <focus>` | Force context compaction / summarization. |
@@ -445,6 +515,12 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
445
515
  | `/context` | Context pressure and token breakdown (includes styles, rules, skills manifest, touched paths). |
446
516
  | `/audit [N]` | Tail of `audit.log`. |
447
517
  | `/tools` | Tool inventory for current config. |
518
+ | `/tools smoke` | Declaration compile check only (lists failures). |
519
+ | `/eval`, `/eval llm` | **Eval harness**: tool smoke + `pytest` if a `tests/` tree exists; optional LLM golden prompts (costs tokens). Writes `.gemcode/evals/last_eval.json`. |
520
+ | `/autotune init <tag>` | Create git branch `autotune/<tag>` (requires a git repo). |
521
+ | `/autotune eval`, `… llm` | Run eval and append `.gemcode/evals/autotune_ledger.jsonl`. |
522
+ | `/login` | How to run **`gemcode login`** (API key is set outside the REPL). |
523
+ | `/live-audio` | How to run **`gemcode live-audio`** (mic → Gemini Live). |
448
524
  | `/doctor` | Environment sanity check. |
449
525
  | `/version` | Version string. |
450
526
  | `/exit` | Leave the REPL. |
@@ -462,6 +538,7 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
462
538
  |---------|---------|
463
539
  | `/computer`, `/computer on\|off`, `/computer url` | Browser automation (Playwright). |
464
540
  | `/research`, `/research on\|off` | Deep research tools. |
541
+ | `/maps`, `/maps on\|off` | Maps **grounding** toggle (runner rebuild). |
465
542
  | `/embeddings on\|off` | Semantic search tool. |
466
543
  | `/caps`, `/caps …` | View or bulk-toggle capabilities. |
467
544
  | `/memory`, `/memory on\|off` | Persistent memory. |
@@ -496,7 +573,33 @@ The TUI (when `GEMCODE_TUI=1` and terminal supports it) provides **slash complet
496
573
  - **Discovery:** Only **metadata** (name + description) is preloaded into context for token efficiency. Full body loads **on demand** via `/skill <name>`, `/<name>`, or tools `load_skill` / `list_skills`.
497
574
  - **Built-in:** **`batch`** — parallel large-change workflow (map → units → `run_subtask` → verify). Exposed as `/batch <goal>`; not auto-invoked by the model (`disable_model_invocation`).
498
575
 
499
- Use **`/create gemskill <name>`** to scaffold a new skill directory.
576
+ - **`/create gemskill <name>`** create a new skill directory.
577
+ - **`/gemskill <name>`** — pin the full skill body into the system prompt for this session.
578
+ - **`/append gemskill <name> <text>`** — one-shot turn for the model to revise that skill on disk.
579
+
580
+ ---
581
+
582
+ ## Curated memory
583
+
584
+ **Curated memory** is a small, **intentional** text layer separate from raw session logs or embedding retrieval:
585
+
586
+ - **Project facts:** `.gemcode/GEMCODE_MEMORY.md` (conventions, commands, architecture notes the team wants the agent to see).
587
+ - **User preferences (per project):** `.gemcode/GEMCODE_USER.md`.
588
+
589
+ Legacy filenames **`.gemcode/MEMORY.md`** and **`.gemcode/USER.md`** are still read if the new names are absent.
590
+
591
+ Content is **sanitized** before append (length and sensitivity heuristics). The REPL command **`/curated`** prints a bounded snapshot of what would be injected. When the **memory** capability is enabled, curated material can be combined with broader memory tools—see **`remember_fact`**, **`read_curated_memory`** in the [function tools](#function-tools-catalog) table.
592
+
593
+ ---
594
+
595
+ ## Workspace trust
596
+
597
+ File, shell, and related tools require the **project root** to be **trusted**. Trust is stored in **`~/.gemcode/trust.json`** (path configurable via **`GEMCODE_HOME`**), not inside the repo.
598
+
599
+ - **`/trust`** — show whether the current root is trusted.
600
+ - **`/trust on`** / **`/trust off`** — grant or revoke trust for **`cfg.project_root`**.
601
+
602
+ Without trust, mutating and shell tools remain blocked even if **`--yes`** is set—this reduces accidental execution when the cwd is wrong (e.g. home directory).
500
603
 
501
604
  ---
502
605
 
@@ -8,32 +8,82 @@ This document is the **authoritative reference** for CLI behavior, configuration
8
8
 
9
9
  ## Table of contents
10
10
 
11
- 1. [Architecture](#architecture)
12
- 2. [Requirements and install](#requirements-and-install)
13
- 3. [First run](#first-run)
14
- 4. [CLI commands](#cli-commands)
15
- 5. [Main CLI flags](#main-cli-flags)
16
- 6. [The `.gemcode/` directory](#the-gemcode-directory)
17
- 7. [Project context: `GEMINI.md`](#project-context-geminimd)
18
- 8. [Function tools (catalog)](#function-tools-catalog)
19
- 9. [REPL: slash commands](#repl-slash-commands)
20
- 10. [GemSkills](#gemskills)
21
- 11. [Output styles and rules](#output-styles-and-rules)
22
- 12. [Checkpoints, diff, and rewind](#checkpoints-diff-and-rewind)
23
- 13. [Multi-root workspaces (`/add-dir`)](#multi-root-workspaces-add-dir)
24
- 14. [Model routing and thinking](#model-routing-and-thinking)
25
- 15. [Capabilities](#capabilities)
26
- 16. [Permissions and interactive approval](#permissions-and-interactive-approval)
27
- 17. [Hooks](#hooks)
28
- 18. [Token budget, context, and compaction](#token-budget-context-and-compaction)
29
- 19. [MCP](#mcp)
30
- 20. [IDE bridge: `gemcode ide --stdio`](#ide-bridge-gemcode-ide-stdio)
31
- 21. [Eval harness and autotune](#eval-harness-and-autotune)
32
- 22. [Kaira scheduler](#kaira-scheduler)
33
- 23. [Live audio](#live-audio)
34
- 24. [Related components](#related-components)
35
- 25. [Environment variables](#environment-variables)
36
- 26. [Development and release](#development-and-release)
11
+ 1. [What GemCode is (detailed)](#what-gemcode-is-detailed)
12
+ 2. [Architecture](#architecture)
13
+ 3. [Requirements and install](#requirements-and-install)
14
+ 4. [First run](#first-run)
15
+ 5. [CLI commands](#cli-commands)
16
+ 6. [Main CLI flags](#main-cli-flags)
17
+ 7. [The `.gemcode/` directory](#the-gemcode-directory)
18
+ 8. [Project context: `GEMINI.md`](#project-context-geminimd)
19
+ 9. [Function tools (catalog)](#function-tools-catalog)
20
+ 10. [REPL: slash commands](#repl-slash-commands)
21
+ 11. [GemSkills](#gemskills)
22
+ 12. [Curated memory](#curated-memory)
23
+ 13. [Workspace trust](#workspace-trust)
24
+ 14. [Output styles and rules](#output-styles-and-rules)
25
+ 15. [Checkpoints, diff, and rewind](#checkpoints-diff-and-rewind)
26
+ 16. [Multi-root workspaces (`/add-dir`)](#multi-root-workspaces-add-dir)
27
+ 17. [Model routing and thinking](#model-routing-and-thinking)
28
+ 18. [Capabilities](#capabilities)
29
+ 19. [Permissions and interactive approval](#permissions-and-interactive-approval)
30
+ 20. [Hooks](#hooks)
31
+ 21. [Token budget, context, and compaction](#token-budget-context-and-compaction)
32
+ 22. [MCP](#mcp)
33
+ 23. [IDE bridge: `gemcode ide --stdio`](#ide-bridge-gemcode-ide-stdio)
34
+ 24. [Eval harness and autotune](#eval-harness-and-autotune)
35
+ 25. [Kaira scheduler](#kaira-scheduler)
36
+ 26. [Live audio](#live-audio)
37
+ 27. [Related components](#related-components)
38
+ 28. [Environment variables](#environment-variables)
39
+ 29. [Development and release](#development-and-release)
40
+
41
+ ---
42
+
43
+ ## What GemCode is (detailed)
44
+
45
+ **GemCode** is a single Python package that exposes a **`gemcode`** CLI. Every invocation is anchored to a **project root** (`-C`, default current directory). From there it:
46
+
47
+ - Builds a **GemCodeConfig** (model, capabilities, permissions, limits, paths).
48
+ - Optionally loads **MCP** toolsets from `.gemcode/mcp.json`.
49
+ - Constructs an ADK **Runner** with a root **LlmAgent** whose **system instruction** aggregates: global behavior, `GEMINI.md`, capability sections, tool manifest, optional **output style** and **rules**, the **skills manifest** (metadata only), and any **session-loaded GemSkills** (full bodies after `/gemskill`).
50
+ - Persists conversation state in **SQLite** (`.gemcode/sessions.sqlite`) keyed by **`--session`** / REPL session id.
51
+
52
+ ### Modes of use
53
+
54
+ | Mode | How | Best for |
55
+ |------|-----|----------|
56
+ | **One-shot CLI** | `gemcode -C repo "prompt"` | Scripts, CI-style runs, quick questions. |
57
+ | **REPL** | `gemcode -C repo` (TTY, no prompt arg) | Long sessions, slash commands, exploration. |
58
+ | **TUI** | Same as REPL with `GEMCODE_TUI=1` (default when supported) | Scrollback, styled output, slash **completion menu**. |
59
+ | **IDE** | VS Code extension → `gemcode ide --stdio` | Editor-native Chat, diff apply, proposals. |
60
+ | **Kaira** | `gemcode kaira` | Background queue of independent agent jobs. |
61
+ | **Live audio** | `gemcode live-audio` | Voice → Gemini Live (separate from file-editing REPL). |
62
+
63
+ ### “Memory” in GemCode (three different things)
64
+
65
+ | Mechanism | Where | Purpose |
66
+ |-----------|--------|---------|
67
+ | **Session history** | `sessions.sqlite` | Full turn-by-turn chat for a session id. |
68
+ | **Curated memory** | `GEMCODE_MEMORY.md`, `GEMCODE_USER.md` (under `.gemcode/`) | Small, **human-approved** facts injected when memory features are on; distinct from noisy auto-memory. |
69
+ | **Embedding memory** | `memories.jsonl` + ADK hooks (when enabled) | Retrieval-oriented storage when **`GEMCODE_ENABLE_MEMORY`** (and related) are on. |
70
+
71
+ Use **`/curated`** in the REPL to preview the curated snapshot; tools such as **`read_curated_memory`** / **`remember_fact`** operate on that layer.
72
+
73
+ ### GemSkills at a glance (four ways)
74
+
75
+ | Mechanism | Effect |
76
+ |-----------|--------|
77
+ | **`/create gemskill <name> [description]`** | Creates **`.gemcode/skills/<name>/SKILL.md`** scaffold (new skill on disk). |
78
+ | **`/gemskill <name>`** | **Pins** the skill’s **full body** into the **system instruction** for the **current session** (until `/gemskill clear`, new session, or resume). Rebuilds the runner. |
79
+ | **`/append gemskill <name> <request>`** | One model turn instructed to **edit** that skill file according to `<request>`. |
80
+ | **`/skill <name>`**, **`/<name>`**, or tools **`load_skill`** | **One-shot** turn: inject expanded skill into the **user message** for that turn only (does not pin to system prompt). |
81
+
82
+ The built-in **`batch`** skill is manual-only (`disable_model_invocation`); use **`/batch <goal>`** to run it.
83
+
84
+ ### Slash completion
85
+
86
+ The REPL and TUI use a **canonical** command list for Tab completion (`repl_commands.SLASH_COMMANDS`). Some spellings (e.g. `/quit`, `/logs`, `/embed`) still work in **`process_repl_slash`** but may not appear as separate menu rows—see descriptions in **`/help`**.
37
87
 
38
88
  ---
39
89
 
@@ -91,6 +141,18 @@ Non-interactive environments (CI, pipes) must set `GOOGLE_API_KEY` explicitly an
91
141
  | `gemcode kaira` | Stdin-line → queued jobs scheduler (see [Kaira](#kaira-scheduler)). |
92
142
  | `gemcode ide --stdio` | **JSONL IDE protocol** on stdin/stdout for editor extensions (hidden entry; used by VS Code). |
93
143
 
144
+ **Files with a prompt (multimodal):** attach one or more files Gemini can read (images, **PDF**, audio, video, plain text, etc.) for that message only:
145
+
146
+ ```bash
147
+ gemcode -C . --attach ./screenshot.png "Why does this UI look wrong?"
148
+ gemcode -C . --attach ./report.pdf "What are the main conclusions?"
149
+ gemcode -C . --image a.png --image b.png "Compare these two layouts"
150
+ ```
151
+
152
+ (`--image` is an alias of `--attach`.)
153
+
154
+ In the **REPL / TUI**, queue files for the **next** message: `/attach path/to.pdf` (repeat for multiple), then type your question. Use `/attach list`, `/attach clear`. Aliases: `/image`, `/img`, `/file`.
155
+
94
156
  ---
95
157
 
96
158
  ## Main CLI flags
@@ -110,6 +172,7 @@ Non-interactive environments (CI, pipes) must set `GOOGLE_API_KEY` explicitly an
110
172
  | `--tool-combination-mode` | Gemini 3 **tool context circulation**: `deep_research\|always\|never\|auto`. |
111
173
  | `--mcp` | Load MCP toolsets from `.gemcode/mcp.json` (requires `pip install -e ".[mcp]"`). |
112
174
  | `--max-llm-calls` | Cap model↔tool iterations (`RunConfig.max_llm_calls`). |
175
+ | `--attach PATH` | Attach file(s) for **this** CLI message only (repeat flag). Gemini-supported MIME (e.g. images, PDF, audio, video). Default max ~20 MiB each (`GEMCODE_MAX_ATTACHMENT_BYTES`). Alias: `--image`. |
113
176
 
114
177
  Kaira and `live-audio` accept overlapping options (project root, `--yes`, research/embeddings, etc.); run `gemcode kaira -h` / `gemcode live-audio -h` for full lists.
115
178
 
@@ -122,6 +185,7 @@ State is **project-local** (unless noted).
122
185
  | Path / artifact | Purpose |
123
186
  |-----------------|---------|
124
187
  | `sessions.sqlite` | ADK session service: conversation history for `--session` ids. |
188
+ | `GEMCODE_MEMORY.md`, `GEMCODE_USER.md` | **Curated memory** (see [Curated memory](#curated-memory)). |
125
189
  | `audit.log` | JSONL audit: tool usage, model usage, terminal reasons, optional tool-use summaries. |
126
190
  | `tool-results/` | Offloaded large tool outputs; references like `tool_result:<sha256>`. |
127
191
  | `artifacts/` | File artifacts (ADK `FileArtifactService`). |
@@ -232,10 +296,16 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
232
296
 
233
297
  | Command | Purpose |
234
298
  |---------|---------|
299
+ | `/attach <path>`, `/attach list`, `/attach clear` | Queue file(s) for the **next** message (Gemini multimodal). Aliases: **`/image`**, **`/img`**, **`/file`**. |
300
+ | `/trust`, `/trust on`, `/trust off` | Show, grant, or revoke **workspace trust** for the project root (stored in `~/.gemcode/trust.json`; required for file/shell/git tools). |
235
301
  | `/init` \| `/init force` | Analyze the repo and generate or overwrite `GEMINI.md`. |
236
302
  | `/cost` | Token usage and estimated cost for the session. |
237
303
  | `/notes`, `/notes clear`, `/notes edit` | View, clear, or edit `.gemcode/notes.md`. |
238
- | `/create gemskill <name> [description]` | Scaffold `.gemcode/skills/<name>/SKILL.md`. |
304
+ | `/create gemskill <name> [description]` | **Create** a new GemSkill (scaffold `SKILL.md`). |
305
+ | `/gemskill <name>` | **Load** an existing skill into the **session system prompt** (until `/gemskill clear` or new session). |
306
+ | `/gemskill list` \| `/gemskill clear` | List skills or unload all session-loaded skills. |
307
+ | `/append gemskill <name> <request>` | **Iterate** the skill file: model edits `SKILL.md` per your request. |
308
+ | `/curated` | Show **curated memory** snapshot (`.gemcode/GEMCODE_MEMORY.md`, `GEMCODE_USER.md`). |
239
309
  | `/style`, `/style <name>\|off` | List or activate **output styles** (`.gemcode/output-styles/*.md`). |
240
310
  | `/rules` | Show **rule** files from `.gemcode/rules/` (with path gating). |
241
311
  | `/diff`, `/diff last`, `/diff cp_…` | Git diff, or **checkpoint → workspace** diff. |
@@ -248,7 +318,7 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
248
318
  | Command | Purpose |
249
319
  |---------|---------|
250
320
  | `/help` | Short help. |
251
- | `/status` | Model, capabilities, thinking, limits, risk/context telemetry. |
321
+ | `/status` | Model, capabilities, thinking, limits, risk/context telemetry; **`loaded_skills`** (session-pinned GemSkills from `/gemskill`). |
252
322
  | `/config` | Dump active config fields. |
253
323
  | `/session`, `/session list`, `/session name`, `/session resume`, `/session new` | Session management; `/clear` aliases `/session new`. |
254
324
  | `/compact`, `/compact <focus>` | Force context compaction / summarization. |
@@ -256,6 +326,12 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
256
326
  | `/context` | Context pressure and token breakdown (includes styles, rules, skills manifest, touched paths). |
257
327
  | `/audit [N]` | Tail of `audit.log`. |
258
328
  | `/tools` | Tool inventory for current config. |
329
+ | `/tools smoke` | Declaration compile check only (lists failures). |
330
+ | `/eval`, `/eval llm` | **Eval harness**: tool smoke + `pytest` if a `tests/` tree exists; optional LLM golden prompts (costs tokens). Writes `.gemcode/evals/last_eval.json`. |
331
+ | `/autotune init <tag>` | Create git branch `autotune/<tag>` (requires a git repo). |
332
+ | `/autotune eval`, `… llm` | Run eval and append `.gemcode/evals/autotune_ledger.jsonl`. |
333
+ | `/login` | How to run **`gemcode login`** (API key is set outside the REPL). |
334
+ | `/live-audio` | How to run **`gemcode live-audio`** (mic → Gemini Live). |
259
335
  | `/doctor` | Environment sanity check. |
260
336
  | `/version` | Version string. |
261
337
  | `/exit` | Leave the REPL. |
@@ -273,6 +349,7 @@ In interactive mode, lines starting with `/` are **slash commands** (see `repl_c
273
349
  |---------|---------|
274
350
  | `/computer`, `/computer on\|off`, `/computer url` | Browser automation (Playwright). |
275
351
  | `/research`, `/research on\|off` | Deep research tools. |
352
+ | `/maps`, `/maps on\|off` | Maps **grounding** toggle (runner rebuild). |
276
353
  | `/embeddings on\|off` | Semantic search tool. |
277
354
  | `/caps`, `/caps …` | View or bulk-toggle capabilities. |
278
355
  | `/memory`, `/memory on\|off` | Persistent memory. |
@@ -307,7 +384,33 @@ The TUI (when `GEMCODE_TUI=1` and terminal supports it) provides **slash complet
307
384
  - **Discovery:** Only **metadata** (name + description) is preloaded into context for token efficiency. Full body loads **on demand** via `/skill <name>`, `/<name>`, or tools `load_skill` / `list_skills`.
308
385
  - **Built-in:** **`batch`** — parallel large-change workflow (map → units → `run_subtask` → verify). Exposed as `/batch <goal>`; not auto-invoked by the model (`disable_model_invocation`).
309
386
 
310
- Use **`/create gemskill <name>`** to scaffold a new skill directory.
387
+ - **`/create gemskill <name>`** create a new skill directory.
388
+ - **`/gemskill <name>`** — pin the full skill body into the system prompt for this session.
389
+ - **`/append gemskill <name> <text>`** — one-shot turn for the model to revise that skill on disk.
390
+
391
+ ---
392
+
393
+ ## Curated memory
394
+
395
+ **Curated memory** is a small, **intentional** text layer separate from raw session logs or embedding retrieval:
396
+
397
+ - **Project facts:** `.gemcode/GEMCODE_MEMORY.md` (conventions, commands, architecture notes the team wants the agent to see).
398
+ - **User preferences (per project):** `.gemcode/GEMCODE_USER.md`.
399
+
400
+ Legacy filenames **`.gemcode/MEMORY.md`** and **`.gemcode/USER.md`** are still read if the new names are absent.
401
+
402
+ Content is **sanitized** before append (length and sensitivity heuristics). The REPL command **`/curated`** prints a bounded snapshot of what would be injected. When the **memory** capability is enabled, curated material can be combined with broader memory tools—see **`remember_fact`**, **`read_curated_memory`** in the [function tools](#function-tools-catalog) table.
403
+
404
+ ---
405
+
406
+ ## Workspace trust
407
+
408
+ File, shell, and related tools require the **project root** to be **trusted**. Trust is stored in **`~/.gemcode/trust.json`** (path configurable via **`GEMCODE_HOME`**), not inside the repo.
409
+
410
+ - **`/trust`** — show whether the current root is trusted.
411
+ - **`/trust on`** / **`/trust off`** — grant or revoke trust for **`cfg.project_root`**.
412
+
413
+ Without trust, mutating and shell tools remain blocked even if **`--yes`** is set—this reduces accidental execution when the cwd is wrong (e.g. home directory).
311
414
 
312
415
  ---
313
416
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gemcode"
7
- version = "0.3.77"
7
+ version = "0.3.80"
8
8
  description = "Local-first coding agent on Google Gemini + ADK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -27,11 +27,49 @@ from gemcode.limits import make_before_model_limits_callback, make_before_model_
27
27
  from gemcode.thinking import build_thinking_config
28
28
  from gemcode.tools import build_function_tools
29
29
  from gemcode.tool_prompt_manifest import build_tool_manifest
30
- from gemcode.skills import build_skill_manifest_text
30
+ from gemcode.skills import (
31
+ build_skill_manifest_text,
32
+ expand_skill_text,
33
+ list_supporting_files,
34
+ load_skill,
35
+ )
31
36
  from gemcode.output_styles import build_output_style_section
32
37
  from gemcode.rules import build_rules_section
33
38
 
34
39
 
40
+ def _build_session_loaded_skills_section(cfg: GemCodeConfig) -> str:
41
+ """Full bodies for GemSkills the user loaded with /gemskill (session-scoped)."""
42
+ names = list(getattr(cfg, "session_loaded_skill_names", None) or [])
43
+ if not names:
44
+ return ""
45
+ sid = getattr(cfg, "session_skill_expand_session_id", None) or ""
46
+ chunks: list[str] = []
47
+ seen: set[str] = set()
48
+ for raw in names:
49
+ sk_name = (raw or "").strip().lower()
50
+ if not sk_name or sk_name in seen:
51
+ continue
52
+ seen.add(sk_name)
53
+ s = load_skill(cfg.project_root, sk_name)
54
+ if s is None:
55
+ continue
56
+ expanded = expand_skill_text(s, arguments="", session_id=sid)
57
+ files = list_supporting_files(s)
58
+ head = f"### GemSkill: `/{s.meta.name}` (loaded for this session)\n\n"
59
+ chunk = head + expanded
60
+ if files:
61
+ chunk += f"\n\nSupporting files: {', '.join(files)}"
62
+ chunks.append(chunk)
63
+ if not chunks:
64
+ return ""
65
+ return (
66
+ "## Loaded GemSkills (this session)\n"
67
+ "The user explicitly loaded these skills with `/gemskill`. Follow their workflows "
68
+ "when the task matches their purpose; do not force them on unrelated requests.\n\n"
69
+ + "\n\n---\n\n".join(chunks)
70
+ )
71
+
72
+
35
73
  def build_global_instruction() -> str:
36
74
  """Global instruction applied to the entire agent tree (via ADK plugin)."""
37
75
  return (
@@ -888,6 +926,9 @@ You have two tools to persist project insights across sessions (auto-memory styl
888
926
  skill_manifest = build_skill_manifest_text(cfg.project_root)
889
927
  if skill_manifest:
890
928
  base = f"{base}\n\n{skill_manifest}"
929
+ loaded_skills = _build_session_loaded_skills_section(cfg)
930
+ if loaded_skills:
931
+ base = f"{base}\n\n{loaded_skills}"
891
932
  extra = _load_gemini_md(cfg.project_root)
892
933
  if extra.strip():
893
934
  return f"{base}\n\n## Project instructions (GEMINI.md)\n{extra}"
@@ -3,8 +3,9 @@ from __future__ import annotations
3
3
  import subprocess
4
4
  import time
5
5
  from pathlib import Path
6
- from typing import Any
6
+ from typing import Any, Iterable
7
7
 
8
+ from gemcode.config import GemCodeConfig
8
9
  from gemcode.evals.harness import run_eval_suite, write_eval_record
9
10
 
10
11
 
@@ -47,11 +48,24 @@ def init_autotune(*, project_root: Path, tag: str) -> dict[str, Any]:
47
48
  return {"status": "created", "branch": branch}
48
49
 
49
50
 
50
- def run_autotune_eval(*, project_root: Path, include_llm: bool, model: str | None = None) -> dict[str, Any]:
51
+ def run_autotune_eval(
52
+ *,
53
+ project_root: Path,
54
+ include_llm: bool,
55
+ model: str | None = None,
56
+ session_cfg: GemCodeConfig | None = None,
57
+ extra_tools: Iterable[Any] | None = None,
58
+ ) -> dict[str, Any]:
51
59
  """
52
60
  Run eval suite and persist last result to .gemcode/evals/last_eval.json.
53
61
  """
54
- res = run_eval_suite(project_root=project_root, include_llm=include_llm, model=model)
62
+ res = run_eval_suite(
63
+ project_root=project_root,
64
+ include_llm=include_llm,
65
+ model=model,
66
+ session_cfg=session_cfg,
67
+ extra_tools=extra_tools,
68
+ )
55
69
  meta = {
56
70
  "ts": time.time(),
57
71
  "git_sha": _git_head_sha(project_root),