Skip to content

Commit 9554834

Browse files
committed
docs: update documentation to reflect TCR protocol and task isolation principles
1 parent ff0d582 commit 9554834

File tree

4 files changed

+49
-15
lines changed

4 files changed

+49
-15
lines changed

docs/design.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Commands define structured, multi-phase workflows that automate the development
2020
- **`/research`:** A deep-dive exploration that produces exhaustive reports in the `research/` directory.
2121
- **`/debug`:** Activates a forensic investigation mode for root-cause analysis.
2222
- **`/docs`:** Analyzes the codebase and project state to update the documentation suite.
23+
- **`/task`:** The primary execution engine, managing `TASKS.md` and enforcing the strict TCR (Test-Commit-Revert) loop and feature branch isolation.
24+
25+
### 🔌 Synergistic Validation
26+
The `/task` command works in tandem with the `make.py` hook to ensure a "no-regression" policy. While `/task` enforces testing during the Red-Green-Verify cycle, the `make.py` hook provides a final, infrastructure-level check after every turn. If any turn (manual or automated) results in broken code, the framework immediately detects it, ensuring that the repository's "last known state" is always stable.
2327

2428
### 3. Specialized Agents (`.gemini/agents/`)
2529
Instead of a single "do-it-all" AI, the framework delegates tasks to specialized sub-agents with restricted toolsets and focused personas (e.g., `planner`, `debugger`, `editor`, `reporter`). This ensures higher reliability and more consistent results.

docs/develop.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,25 @@ Before proposing a change, use the `/research` command to gather context, analyz
1212
### 2. Strategic Planning
1313
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`.
1414

15-
### 3. Execution & Validation
16-
- **Incremental Implementation:** Break features into small, testable commits.
17-
- **Continuous Validation:** After every implementation turn, the framework automatically runs the `makefile`. Do not attempt to bypass this process.
18-
- **Journaling:** A brief, one-line technical log must be added to the daily journal for every significant turn.
15+
### 3. Execution & Validation (TCR Protocol)
16+
The `/task work` command implements a strict **TCR (Test-Commit-Revert)** protocol to ensure high-velocity, high-quality code.
17+
18+
#### **Phase 1: Pre-flight Verification**
19+
The agent verifies that the working tree is clean, the current branch is `main`, and `make test` passes as a baseline.
20+
21+
#### **Phase 2: Task Isolation**
22+
A dedicated feature branch (e.g., `feature/task-name`) is auto-generated and checked out. All subsequent work for this task occurs here.
23+
24+
#### **Phase 3: The Red-Green-Verify Loop**
25+
For every granular step of the implementation:
26+
1. **Red:** Write a failing test and verify failure with `make test`.
27+
2. **Green:** Implement the minimal code to pass.
28+
3. **Verify:** Run `make test`.
29+
- **Pass:** `git commit` the step.
30+
- **Fail:** Attempt one quick fix; if it still fails, **revert** to the last green state (`git checkout .`).
31+
32+
#### **Phase 4: Integration**
33+
Once all steps are complete, a final test run is performed. Upon user approval, the branch is merged back to `main` and the roadmap in `TASKS.md` is updated.
1934

2035
## ✅ Testing & Quality Standards
2136

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ The framework is built on the belief that AI is most effective when it is constr
1212
The agent is mandated to challenge ideas before implementing them. It identifies technical flaws, security risks, or redundant logic, acting as a "peer reviewer" in real-time.
1313

1414
### 2. Strategy-First (Research -> Plan -> Execute)
15-
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.
15+
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.
1616

1717
### 3. Validation-as-Truth
1818
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.
1919

20+
### 4. Task Isolation (Feature Branching)
21+
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.
22+
2023
## 🚀 Quick Start
2124

2225
The fastest way to bootstrap a new project or integrate the framework into an existing one is to run the following command in your terminal:

docs/user-guide.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,33 @@ Brings order to your version history.
5454
Automates the deployment process.
5555
- **How it works:** Verifies workspace integrity (clean git tree, passing tests via `make`), analyzes commit history to propose the next version bump, drafts a `CHANGELOG.md` entry, and publishes the final tag to GitHub.
5656

57-
---
57+
## 🔄 A Full Feature Development Walkthrough
5858

59-
## ✍️ The Content Creation Workflow
59+
A complete, principled development cycle follows the **Research -> Plan -> Execute** lifecycle.
6060

61-
The framework is uniquely suited for writing high-quality documentation and long-form articles, built on the same cognitive foundation as the development path.
61+
### **Step 1: Research with `/research`**
62+
You are integrating a new authentication library. You start by researching the technical requirements.
63+
- The `researcher` subagent gathers documentation and synthesizes it into `research/auth-library-deep-dive.md`.
6264

63-
### `/draft`
64-
Turns research into structured prose.
65-
- **How it works:** Performs a deep scan of `research/` and `plans/` to identify key themes. It collaboratively generates a Markdown outline. Once approved, the `reporter` subagent expands the outline section-by-section, drawing directly from your validated research to ensure evidence-based writing.
65+
### **Step 2: Strategy with `/plan`**
66+
Once you understand the requirements, you trigger the `/plan` command.
67+
- The `planner` subagent analyzes the codebase and generates `plans/implement-auth.md`, mapping out the specific architectural changes and testing strategy.
6668

67-
### `/revise`
68-
Provides professional editing and polish.
69-
- **How it works:** Uses the `editor` subagent to perform a structural and linguistic audit based on your `.gemini/style-guide.md`. It identifies logical gaps and awkward phrasing, presenting specific improvements for you to review interactively.
69+
### **Step 3: Execute with `/task work`**
70+
The approved plan is linked to a task. You trigger the execution:
71+
- **Pre-flight:** The agent verifies the tree is clean on `main`.
72+
- **Isolation:** A `feature/auth-integration` branch is created.
73+
- **Loop (Red-Green-Verify):**
74+
1. Agent writes a failing `test_auth_logic.py`.
75+
2. Agent implements the minimal logic to pass.
76+
3. Agent runs `make test`. If successful, the step is committed.
77+
4. The loop repeats for every granular step.
7078

71-
---
79+
### **Step 4: Review & Integrate**
80+
After all steps pass, the agent presents the final work. Upon your approval, it merges back to `main` and cleans up the feature branch.
81+
82+
### **Step 5: Document & Release with `/docs` & `/release`**
83+
Finally, use `/docs` to update the technical documentation and `/release` to publish the new version.
7284

7385
## ⚙️ Background Tasks & Maintenance
7486

0 commit comments

Comments
 (0)