Skip to content

Commit 4291638

Browse files
committed
docs(core): update documentation suite for v0.19.0 improvements
1 parent 6dc2763 commit 4291638

File tree

5 files changed

+50
-21
lines changed

5 files changed

+50
-21
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The `.gemini/commands/` directory defines specialized workflows that automate ev
5858

5959
### 🔍 Phase 1: Planning & Discovery
6060
* **`/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/`.
6162
* **`/plan`**: The **Architectural Bridge**. This interactive workflow translates ideas into actionable execution plans:
6263
* **Phase 1 (Clarification):** The agent interviews you to resolve ambiguities before planning.
6364
* **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:
107108

108109
## ⚓ The Hook System
109110

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:
111112

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.
116119

117120
## 📄 License & Contribution
118121

docs/design.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,27 @@ The project's "brain" resides in the `.gemini/` directory, which is organized in
88

99
### 1. The Hook System (`.gemini/hooks/`)
1010

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.
1212

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.
1826

1927
### 2. The Script Utility System (`.gemini/scripts/`)
2028

2129
Helper scripts that standardize framework operations across different environments.
2230

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.
2432

2533
### 3. The Command System (`.gemini/commands/`)
2634

@@ -29,6 +37,7 @@ Commands define structured, multi-phase workflows that automate the development
2937
- **`/plan`:** An interactive workflow that transitions between clarification, analysis, and strategy generation.
3038
- **`/research`:** A deep-dive exploration that produces exhaustive reports in the `research/` directory.
3139
- **`/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.
3241
- **`/document`:** Analyzes the codebase and project state to update the documentation suite.
3342
- **`/task`:** The primary execution engine, managing `TASKS.md` and enforcing the **strict TCR (Test-Commit-Revert) loop** and feature branch isolation.
3443

@@ -68,7 +77,8 @@ Instead of a single "do-it-all" AI, the framework delegates tasks to specialized
6877

6978
- **`planner`:** Responsible for high-level architectural design and roadmap generation.
7079
- **`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.
7282
- **`reporter` / `editor`:** Content generation and refinement specialists.
7383

7484
### 5. The Skill System (`.gemini/skills/`)
@@ -78,7 +88,7 @@ The framework's permanent knowledge base. Each skill is a directory containing:
7888
- **`reference-*.md`:** Granular documentation for specific learning objectives.
7989
- **`assets/`:** Idiomatic, verified code examples and experiment scripts.
8090

81-
### 4. State Management
91+
### 6. State Management
8292

8393
The framework maintains internal state to optimize operations and ensure continuity:
8494

docs/develop.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,19 @@ Failure to do this will block your commit or turn execution.
5656

5757
## ✅ Testing & Quality Standards
5858

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.
6263

6364
## 🧠 Codifying Knowledge with Skills
6465

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:
6667

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`)
6872

6973
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.
7074

@@ -75,9 +79,9 @@ description: <concise-summary-for-autonomous-activation>
7579
---
7680
```
7781

78-
### 2. Asset Management
82+
### 3. Asset Management
7983

80-
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.
8185

8286
## 🌲 Git & Source Control
8387

docs/user-guide.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ Your gateway to GitHub.
6060
- **How it works:** Interfaces with the GitHub CLI to analyze open issues and recommend what to tackle next based on strategic impact.
6161

6262

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.
73+
6374
### `/task`
6475

6576
Your roadmap manager.

journal/2026-03-20.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
[2026-03-20T12:56:15] - Migrated tests to pytest, then cleaned up tests and makefile to finalize /learn command
2424
[2026-03-20T13:01:58] - Updated comprehensive documentation suite to include the new /learn command, grounded learning philosophy, and skill codification system
2525
[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

Comments
 (0)