Skip to content

Commit 1d41976

Browse files
committed
Initialize plan, task, and journal for /learn command
1 parent 6059a36 commit 1d41976

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

TASKS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Put done tasks into the Archive.
1818

1919
## Active Tasks
2020

21+
- [ ] Implement the new `/learn` command and specialized learning agent to automate technology exploration and skill codification. (See plan: plans/implement-learn-command.md)
22+
2123
---
2224

2325
## Archive

journal/2026-03-20.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
[2026-03-20T10:01:39] - docs: update /debug and /task workflows with scientific investigation and TCR details
1515
[2026-03-20T10:19:25] - feat(docs): update install.sh to generate generic boilerplate for scaffolding files
1616
[2026-03-20T10:26:46] - chore(release): version 0.18.0
17+
[2026-03-20T12:01:05] - Plan and task created for /learn command implementation.

plans/implement-learn-command.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Plan: Implement `/learn` Command and `learn.md` Agent
2+
3+
## Objective
4+
Implement a new `/learn` command and a specialized `learn.md` agent to automate the process of exploring new technologies, experimenting with them, and codifying that knowledge into reusable "skills" within the project.
5+
6+
## Architectural Impact
7+
- **New Workflow**: Introduces a structured learning lifecycle (Research -> Experiment -> Codify).
8+
- **Knowledge Management**: Systematically populates `.gemini/skills/` with vetted information and idiomatic examples.
9+
- **Agent Specialization**: Adds a `learner` agent to the existing suite of specialized agents (`planner`, `researcher`, etc.).
10+
11+
## Step-by-Step Execution
12+
13+
14+
### Step 1: Create the Command Definition
15+
16+
Create `.gemini/commands/learn.toml`:
17+
- **Description**: "Explore and master a new library or topic, generating a permanent project skill."
18+
- **Prompt**: Direct the agent to initialize the `learn` agent with the provided library/topic name.
19+
20+
### Step 2: Create the Learning Agent
21+
22+
Consult `cli_help` to determine the exact expected structure for a skill.
23+
24+
Create `.gemini/agents/learn.md` with a high-discipline system prompt:
25+
- **Tools Required**: `google_web_search`, `web_fetch`, `read_file`, `write_file`, `list_directory`, `ask_user`, and the `learner` subagent.
26+
- **Phase 1: Environment Audit**: Check if the library is already installed (e.g., checking `pyproject.toml`, `package.json`, or using `pip show`).
27+
- **Phase 2: Research and Mapping**:
28+
- Use `google_web_search` and `web_fetch` to identify core concepts, API surface, and common patterns.
29+
- **Survey local source files briefly** to see if the library is already being used or if there are specific integration points.
30+
- **Phase 3: User Approval (Checkpoint)**: Present a structured "Learning Map" to the user for approval before proceeding.
31+
- **Phase 4: Grounded Experimentation**:
32+
- Use the `learner` subagent to write and run small test scripts.
33+
- Verify "gotchas," performance quirks, and idiomatic usage through actual code execution.
34+
- **Phase 5: Skill Generation**:
35+
- Create `.gemini/skills/<skill-name>/SKILL.md` and optional `reference-*.md` files.
36+
- Populate with a concise reference, common patterns, and links to example scripts.
37+
- **Phase 6: Asset Management & Cleanup**:
38+
- Move successful experiment scripts to the skill's assets folder.
39+
- Delete temporary files and artifacts.
40+
41+
### Step 3: Align with Project Standards
42+
- Ensure the agent follows idiomatic preferences according to the language/framework/etc, but also aligned with the current project idioms if present.
43+
44+
## Testing Strategy
45+
1. **Initial Run**: Execute `/learn httpx`.
46+
2. **Verification of Approval**: Ensure the agent stops and presents a structured "Learning Map" including local context if relevant.
47+
3. **Skill Validation**: Check that `.gemini/skills/httpx/SKILL.md` is created correctly.
48+
4. **Asset Check**: Verify that the skill directory contains at least one working example script.
49+
5. **Cleanliness**: Ensure no temporary experiment files remain in the root directory.

0 commit comments

Comments
 (0)