You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,7 @@ The `.gemini/commands/` directory defines specialized workflows that automate ev
58
58
59
59
### 🔍 Phase 1: Planning & Discovery
60
60
***`/research <topic>`**: A deep, 3-phase investigation (Planning -> Data Gathering -> Reporting) that produces exhaustive Markdown reports in the `research/` directory. **Crucial for gathering technical requirements and state-of-the-art context.**
61
+
***`/learn <topic>`**: A grounded learning lifecycle (Audit -> Strategic Mapping -> Execution -> Codification) for mastering new technologies and building a permanent, machine-readable knowledge base in `.gemini/skills/`.
61
62
***`/plan`**: The **Architectural Bridge**. This interactive workflow translates ideas into actionable execution plans:
62
63
***Phase 1 (Clarification):** The agent interviews you to resolve ambiguities before planning.
63
64
***Phase 2 (Agentic Analysis):** A specialized `planner` subagent scans the codebase and generates a detailed technical strategy.
@@ -107,12 +108,14 @@ This framework shines when you combine these commands into cohesive workflows:
107
108
108
109
## ⚓ The Hook System
109
110
110
-
The framework uses a robust hook system (`.gemini/hooks/`) that synchronizes the agent with your project state:
111
+
The framework uses a dual-layer hook system to synchronize the agent with your project state:
111
112
112
-
***`session.py`**: Initializes the environment and provides a project summary.
113
-
***`journal.py`**: Ensures a journal entry exists for the current date (`journal/YYYY-MM-DD.md`).
114
-
***`make.py`**: Automatically runs `make` after critical agent actions to prevent regressions.
115
-
***`cron.py`**: Synchronizes `cron.toml` tasks with **systemd user timers**.
113
+
***`session.py` / `welcome.py`**: Initialize the environment, provide a project summary, and check for environment readiness.
114
+
***`log.py`**: Provides a comprehensive, structured audit trail of every agent turn and tool execution.
115
+
***`notify.py`**: Sends a desktop notification and sound when the agent completes its work, minimizing downtime.
116
+
***`cron.py`**: Synchronizes repetitive tasks with **systemd user timers**.
117
+
***`pre-commit.py` (Git Hook)**: Enforces daily journaling and timestamp-based validation before any code changes are finalized.
118
+
***`journal.py` (Script)**: The dedicated utility for correctly formatting and appending new journal entries.
Copy file name to clipboardExpand all lines: docs/design.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,27 @@ The project's "brain" resides in the `.gemini/` directory, which is organized in
8
8
9
9
### 1. The Hook System (`.gemini/hooks/`)
10
10
11
-
Hooks are Python-based scripts that intercept the Gemini CLI turn lifecycle. They are the framework's primary enforcement mechanism.
11
+
The framework uses a dual-layer hook system to enforce standards and automate workflows.
12
12
13
-
-**`welcome.py`:** Initializes the session and provides a project summary to the agent. It also checks for the presence of the pre-commit hook and alerts the user if missing.
14
-
-**`pre-commit.py`:** Enforces the mandatory daily journaling and **timestamp-based validation** before any code changes are finalized.
15
-
-**`make.py`:** Automatically runs the `makefile` (tests/linting) to prevent regressions.
16
-
-**`notify.py`:** Sends a desktop notification after each agent turn is successfully completed and validated.
17
-
-**`utils.py`:** Provides a shared set of utilities for git status analysis and communication with the CLI.
13
+
#### **A. Gemini CLI Lifecycle Hooks**
14
+
These scripts are registered in `.gemini/settings.json` and intercept the turn-by-turn lifecycle of the agent.
15
+
16
+
-**`session.py` / `welcome.py`:** Initialize the session, provide a project summary, and check for environment readiness (e.g., verifying if Git hooks are installed).
17
+
-**`log.py`:** Provides a comprehensive audit trail of every interaction, logging structured markers for `BeforeAgent`, `AfterModel`, and `AfterTool` events.
18
+
-**`notify.py`:** Sends a desktop notification and plays a system sound once the agent completes its turn, ensuring the user is alerted when the agent is waiting for input.
19
+
-**`cron.py`:** Synchronizes the `cron.toml` task definitions with **systemd user timers** for background execution.
20
+
21
+
#### **B. Git Hooks**
22
+
These are linked to the repository's `.git/hooks/` directory and manage the finality of changes.
23
+
24
+
-**`pre-commit.py`:** The primary enforcement mechanism. It performs **timestamp-based validation**, ensuring that a journal entry exists for the current date and that its timestamp is newer than any modified files. It also serves as the trigger for project-wide health checks.
25
+
-**`utils.py`:** A shared Python library providing common functions for git analysis, hook decisions, and communication with the Gemini CLI.
18
26
19
27
### 2. The Script Utility System (`.gemini/scripts/`)
20
28
21
29
Helper scripts that standardize framework operations across different environments.
22
30
23
-
-**`journal.py`:** A dedicated script to correctly format and append new journal entries (`[timestamp ISO] - description`). This ensures consistency and prevents AI hallucinations of dates or formats.
31
+
-**`journal.py`:** A dedicated script to correctly format and append new journal entries (`[timestamp ISO] - description`). This is the **only recommended way** to update the journal, as it ensures temporal consistency for the `pre-commit.py` hook.
24
32
25
33
### 3. The Command System (`.gemini/commands/`)
26
34
@@ -29,6 +37,7 @@ Commands define structured, multi-phase workflows that automate the development
29
37
-**`/plan`:** An interactive workflow that transitions between clarification, analysis, and strategy generation.
30
38
-**`/research`:** A deep-dive exploration that produces exhaustive reports in the `research/` directory.
31
39
-**`/debug`:** Activates a **forensic investigation mode** using a scientific, hypothesis-driven workflow.
40
+
-**`/learn`:** A grounded learning lifecycle for mastering new technologies and codifying them into project skills.
32
41
-**`/document`:** Analyzes the codebase and project state to update the documentation suite.
33
42
-**`/task`:** The primary execution engine, managing `TASKS.md` and enforcing the **strict TCR (Test-Commit-Revert) loop** and feature branch isolation.
34
43
@@ -68,7 +77,8 @@ Instead of a single "do-it-all" AI, the framework delegates tasks to specialized
68
77
69
78
-**`planner`:** Responsible for high-level architectural design and roadmap generation.
70
79
-**`debugger`:** A forensic investigation specialist using a scientific, hypothesis-driven workflow.
71
-
-**`learner`:** A "Grounded Learning Specialist" who master new technologies by writing, executing, and documenting code experiments.
80
+
-**`learner`:** A "Grounded Learning Specialist" who masters new technologies by writing, executing, and documenting code experiments.
81
+
-**`researcher`:** Optimized for deep information gathering and multi-source synthesis.
72
82
-**`reporter` / `editor`:** Content generation and refinement specialists.
73
83
74
84
### 5. The Skill System (`.gemini/skills/`)
@@ -78,7 +88,7 @@ The framework's permanent knowledge base. Each skill is a directory containing:
78
88
-**`reference-*.md`:** Granular documentation for specific learning objectives.
79
89
-**`assets/`:** Idiomatic, verified code examples and experiment scripts.
80
90
81
-
### 4. State Management
91
+
### 6. State Management
82
92
83
93
The framework maintains internal state to optimize operations and ensure continuity:
Copy file name to clipboardExpand all lines: docs/develop.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,15 +56,19 @@ Failure to do this will block your commit or turn execution.
56
56
57
57
## ✅ Testing & Quality Standards
58
58
59
-
-**Agent-Driven Validation:** This project does **not** maintain a traditional suite of unit or integration tests (e.g., in a `tests/` directory). Instead, it relies on high-discipline agent execution and **Grounded Experimentation** to verify behavior.
60
-
-**Source of Truth:** The `makefile` is the central definition of project health.
61
-
-**TCR Protocol:** The primary mechanism for ensuring "Green-only" development is the mandatory **Test-Commit-Revert** loop during task execution.
59
+
-**Agent-Driven Validation:** This project maintains a **minimalist, transient testing philosophy**. Instead of a static suite of thousands of unit tests, it relies on high-discipline agent execution and **Grounded Experimentation** to verify behavior in real-time.
60
+
-**On-the-Fly Verification:** During the mandatory TCR (Test-Commit-Revert) loop, the agent is required to write specific, temporary test cases (e.g., `test_feature_x.py`) that verify the granular step being implemented.
61
+
-**Source of Truth:** The `makefile` is the central definition of project health. Even if it initially points to an empty `test` target, it serves as the hook point for the agent's automated validation.
62
+
-**The TCR Mandate:** The primary mechanism for ensuring "Green-only" development is the mandatory **Test-Commit-Revert** loop. If a change fails its temporary verification, it is instantly reverted, ensuring the `main` branch remains a "known-good" state.
62
63
63
64
## 🧠 Codifying Knowledge with Skills
64
65
65
-
The `/learn` command is the primary tool for expanding the project's knowledge base. All generated skills must adhere to the following structure:
66
+
The `/learn` command is the primary tool for expanding the project's long-term memory. When mastering a new technology, follow this workflow:
66
67
67
-
### 1. Mandatory Frontmatter (`SKILL.md`)
68
+
### 1. Grounded Learning Lifecycle
69
+
The agent follows a 4-phase process: **Audit** (environment check), **Strategic Mapping** (learning objectives), **Execution** (real-world experimentation), and **Codification**.
70
+
71
+
### 2. Mandatory Frontmatter (`SKILL.md`)
68
72
69
73
The root `SKILL.md` file **must** include a YAML block at the top. This allows the framework to autonomously recognize and activate the skill in future sessions.
Move all successful experiment scripts and idiomatic examples to the `assets/` subdirectory within the skill folder.
84
+
All successful experiment scripts and idiomatic examples generated during the `/learn` phase should be moved to the `assets/` subdirectory within the skill folder. These serve as verified reference points for future agent turns.
Copy file name to clipboardExpand all lines: docs/user-guide.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,17 @@ Your gateway to GitHub.
60
60
-**How it works:** Interfaces with the GitHub CLI to analyze open issues and recommend what to tackle next based on strategic impact.
61
61
62
62
63
+
### `/learn`
64
+
65
+
Your tool for mastering new technologies and codifying them into project skills.
66
+
67
+
-**How it works:** Implements a "Grounded Learning" philosophy through a 4-phase lifecycle:
68
+
1.**Environment Audit:** Automatically detects if the library is already installed or has local integration points.
69
+
2.**Strategic Mapping:** Researches the topic and defines 3-5 granular Learning Objectives (the "Learning Map"). **Requires user approval via `ask_user`.**
70
+
3.**Grounded Execution:** The specialized `learner` sub-agent performs real-world experiments (writing and running scripts) to verify "gotchas," performance, and idiomatic patterns.
71
+
4.**Skill Codification:** Consolidates all findings into a permanent project skill in `.gemini/skills/<name>/`, including a mandatory `SKILL.md` file and reference documents.
72
+
-**Why it works:** It transforms ephemeral research into a permanent, machine-readable knowledge base that future agents can autonomously activate.
Copy file name to clipboardExpand all lines: journal/2026-03-20.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,4 @@
23
23
[2026-03-20T12:56:15] - Migrated tests to pytest, then cleaned up tests and makefile to finalize /learn command
24
24
[2026-03-20T13:01:58] - Updated comprehensive documentation suite to include the new /learn command, grounded learning philosophy, and skill codification system
25
25
[2026-03-20T13:04:06] - Release version 0.19.0
26
+
[2026-03-20T13:22:29] - docs(core): update documentation suite for v0.19.0 improvements
0 commit comments