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: docs/design.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,30 @@ Helper scripts that standardize framework operations across different environmen
32
32
33
33
### 3. The Command System (`.gemini/commands/`)
34
34
35
-
Commands define structured, multi-phase workflows that automate the development lifecycle. Each command is a TOML file containing specific instructions and context for the agent.
35
+
Commands define structured, multi-phase workflows that automate the development lifecycle. They are strictly categorized by their role in the Unified Lifecycle Flow.
36
36
37
-
-**`/plan`:** An interactive workflow that transitions between clarification, analysis, and strategy generation.
38
-
-**`/research`:** A deep-dive exploration that produces exhaustive reports in the `research/` directory.
39
-
-**`/debug`:** Activates a **forensic investigation mode** using a scientific, hypothesis-driven workflow.
-**`/maintenance`:** A non-destructive codebase audit generating a 'Maintenance Report Card'.
40
+
-**`/review`:** A multi-phase linguistic and structural audit of a document, producing a sidecar `.review.md` file.
41
+
-**`/debug`:** A scientific, hypothesis-driven forensic investigation ending in a Root Cause Analysis (RCA) report.
40
42
-**`/learn`:** A grounded learning lifecycle for mastering new technologies and codifying them into project skills.
41
-
-**`/document`:** Analyzes the codebase and project state to update the documentation suite.
43
+
44
+
#### Phase 2: Strategy (The Bridge)
45
+
-**`/plan`:** The mandatory bridge. An interactive workflow that transitions between clarification, analysis of discovery artifacts, and strategy generation. It produces a persistent Markdown plan in `plans/`.
46
+
47
+
#### Phase 3: Execution (Side-Effects)
42
48
-**`/task`:** The primary execution engine, managing `TASKS.md` and enforcing the **strict TCR (Test-Commit-Revert) loop** and feature branch isolation.
49
+
-**`/draft`:** The content execution engine, transforming plans or `.review.md` reports into finished Markdown documents.
50
+
-**`/document`:** Analyzes the codebase and project state to update the documentation suite.
51
+
52
+
### 🔄 The Unified Lifecycle Flow
53
+
54
+
The framework enforces a strict architectural boundary between discovering what to do and actually doing it. Data flows unidirectionally:
Before proposing a change, you must gather context and identify risks. Use the specialized discovery commands:
17
+
-**`/research`**: For domain knowledge and external libraries.
18
+
-**`/maintenance`**: To audit the codebase for technical debt.
19
+
-**`/debug`**: To perform a root-cause analysis (RCA) on a bug.
20
+
-**`/review`**: To audit a document's structure and prose.
10
21
11
-
Before proposing a change, use the `/research` command to gather context, analyze the current codebase, and identify potential risks.
22
+
*Crucially, these commands are read-only; they produce artifacts (`research/`, `*.review.md`), not code changes.*
12
23
13
-
### 2. Strategic Planning
24
+
### 2. Strategic Planning (The Bridge)
14
25
15
-
A feature is not considered "active" until a persistent Markdown plan has been created in the `plans/` directory. Use the `/plan` command to generate this strategy and synchronize it with `TASKS.md`.
26
+
A feature or fix is not considered "active" until a persistent Markdown plan has been created in the `plans/` directory. Use the `/plan` command to synthesize the artifacts generated in Phase 1 into an actionable strategy, and synchronize it with `TASKS.md`.
16
27
17
-
### 3. Execution & Validation (The TCR Protocol)
28
+
### 3. Execution & Validation (Side-Effects)
18
29
19
-
The `/task` command is the primary tool for repository execution. It supports multiple actions to manage the project roadmap:
30
+
Once a plan is approved, you move to execution. This is the **only** phase where files are modified.
20
31
32
+
#### For Code: The TCR Protocol
33
+
The `/task` command is the primary tool for repository execution:
21
34
-**`/task create`**: Adds a new task to `TASKS.md`.
22
35
-**`/task work on ...`**: Implements a strict **TCR (Test-Commit-Revert)** protocol to ensure high-velocity, high-quality code.
23
36
-**`/task report`**: Provides a summary of the roadmap and current priorities.
Copy file name to clipboardExpand all lines: docs/index.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
@@ -16,15 +16,18 @@ The agent is mandated to challenge ideas before implementing them. It identifies
16
16
17
17
All significant work must be preceded or accompanied by a structured journal entry. The framework enforces this via a **timestamp-based pre-commit hook**, ensuring that the project's history is an accurate, human-and-AI-readable audit trail of intent and execution.
18
18
19
-
### 3. Strategy-First (Research -> Plan -> Execute)
19
+
### 3. Strategy-First (Discovery -> Plan -> Execute)
20
20
21
-
Every non-trivial change follows a strict, non-negotiable lifecycle. The agent first researches the domain, proposes a detailed implementation plan, obtains user approval, and only then begins writing code. This is enforced by the **TCR (Test-Commit-Revert)** protocol, ensuring a "Green-only" development path.
21
+
Every non-trivial change follows a strict, non-negotiable lifecycle.
22
+
1.**Discovery & Audit:** The agent first researches the domain (`/research`), audits the codebase (`/maintenance`, `/review`), or investigates bugs (`/debug`) without modifying anything.
23
+
2.**Strategy:** A detailed implementation plan is proposed (`/plan`) based on discovery artifacts and requires user approval.
24
+
3.**Execution:** Only then does the agent begin writing code (`/task`) or content (`/draft`). This is enforced by the **TCR (Test-Commit-Revert)** protocol, ensuring a "Green-only" development path.
22
25
23
-
### 3. Validation-as-Truth
26
+
### 4. Validation-as-Truth
24
27
25
28
The `makefile` is the ultimate source of truth for project health. Automated hooks ensure that every agent action is followed by a validation run (linting, testing, formatting) to prevent regressions.
26
29
27
-
### 4. Task Isolation (Feature Branching)
30
+
### 5. Task Isolation (Feature Branching)
28
31
29
32
All development work is strictly performed on dedicated, auto-generated feature branches. This keeps the `main` branch protected and always in a deployable state, while providing a clean, granular history for every task.
Copy file name to clipboardExpand all lines: docs/user-guide.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,14 @@ This framework solves this problem by enforcing three core principles:
18
18
19
19
---
20
20
21
-
## 🔍 The Discovery & Strategy Workflow
21
+
## 🔍 Phase 1: Discovery & Audit
22
22
23
-
The most critical phase of any project occurs before you write a single line of code. This framework moves away from impulsive execution toward a deliberate, architected approach.
23
+
The most critical phase of any project occurs before you write a single line of code. This phase uses read-only commands to gather information safely.
24
+
25
+
### `/research`
26
+
27
+
Your tool for deep domain exploration.
28
+
-**How it works:** Gathers documentation and synthesizes it into `research/` reports.
24
29
25
30
### `/debug`
26
31
@@ -29,6 +34,12 @@ Your primary tool for forensic, scientific investigation.
29
34
-**How it works:** When a bug is detected, the `/debug` command implements a principled approach to problem-solving using the specialized `debugger` subagent. It moves through four distinct phases: Context Analysis, Hypothesis Formulation, Isolated Testing on a temporary branch (`debug/hyp-*`), and finally a Synthesis of the findings into a **Root Cause Analysis (RCA)** report.
30
35
-**Why it works:** It forces the agent to identify the root cause *before* attempting a fix, preventing "guess-and-check" coding that can lead to regressions.
31
36
37
+
---
38
+
39
+
## 🌉 Phase 2: Strategy & Planning
40
+
41
+
Once you have gathered discovery artifacts, you must synthesize them into an actionable strategy.
42
+
32
43
### `/plan`
33
44
34
45
Your tool for internal strategy and architectural design.
@@ -54,7 +65,7 @@ Your tool for rapid project orientation.
54
65
55
66
---
56
67
57
-
## 💻 The Software Development Workflow
68
+
## 🚀 Phase 3: Execution & Implementation
58
69
59
70
Once you have a solid strategy in `plans/`, you can move into execution. These commands eliminate the friction of context-switching between your IDE and terminal.
60
71
@@ -91,13 +102,14 @@ Automates the deployment process.
91
102
92
103
## 🔄 A Full Feature Development Walkthrough
93
104
94
-
A complete, principled development cycle follows the **Research -> Plan -> Execute** lifecycle.
105
+
A complete, principled development cycle follows the **Discovery -> Plan -> Execute** lifecycle.
95
106
96
-
### **Step 1: Research with `/research`**
107
+
### **Step 1: Discovery with `/research`, `/maintenance`, or `/review`**
97
108
98
-
You are integrating a new authentication library. You start by researching the technical requirements.
109
+
Before acting, you must gather context. For example, if you are integrating a new authentication library, you start by researching the technical requirements.
99
110
100
111
- The `researcher` subagent gathers documentation and synthesizes it into `research/auth-library-deep-dive.md`.
112
+
- Alternatively, you might run `/maintenance` to audit the codebase or `/review` to audit a document. In all cases, a read-only artifact is produced.
0 commit comments