Skip to content

Commit ed019bc

Browse files
committed
docs: enhance installation and setup documentation with detailed project scaffolding and integration steps
1 parent f8acf8d commit ed019bc

File tree

5 files changed

+60
-2
lines changed

5 files changed

+60
-2
lines changed

docs/deploy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ curl -fsSL https://apiad.github.io/starter/install.sh | bash
1111
```
1212

1313
### 1. New Project (Scaffolding)
14+
1415
Running `install.sh` in an empty directory will:
16+
1517
- Initialize a fresh Git repository.
1618
- Extract the core `.gemini/` framework and configuration files.
1719
- Create the standard project structure (`journal/`, `plans/`, `research/`, `drafts/`).
1820
- Initialize baseline files (`README.md`, `CHANGELOG.md`, `TASKS.md`, `makefile`).
1921
- Perform an initial "feat" commit.
2022

2123
### 2. Existing Project (Integration)
24+
2225
If run inside an existing project, the script will:
26+
2327
- **Validate:** Ensure you have a clean Git working tree.
2428
- **Analyze:** Identify which framework files are missing or need updating.
2529
- **Confirm:** Present a summary of all proposed changes and wait for your approval.
@@ -29,6 +33,7 @@ If run inside an existing project, the script will:
2933
## 🛠️ Prerequisites
3034

3135
To ensure full functionality, your environment should have:
36+
3237
- **Git:** Required for state management and change detection hooks.
3338
- **Node.js:** Necessary for running the `gemini` CLI.
3439
- **Python 3.10+:** Required for executing the project's automation hooks (`.gemini/hooks/`).
@@ -39,17 +44,21 @@ To ensure full functionality, your environment should have:
3944
Once the installation is complete, follow these steps to orient yourself:
4045

4146
### 1. Run Onboarding
47+
4248
Execute the `/onboard` command to get a high-signal overview of the repository's architecture, standards, and current roadmap.
4349

4450
```bash
4551
gemini /onboard
4652
```
4753

4854
### 2. Initialize the Roadmap
55+
4956
Check the current `TASKS.md` file and use the `/task` command to define your project's initial goals.
5057

5158
### 3. Start a New Feature
59+
5260
For your first feature, follow the standard workflow:
61+
5362
- **Research:** `gemini /research [topic]`
5463
- **Plan:** `gemini /plan` (follow the interactive prompts)
5564
- **Implement:** Begin coding once the plan is saved in `plans/`.

docs/design.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,37 @@ The **Gemini CLI Opinionated Framework** is not just a collection of scripts; it
77
The project's "brain" resides in the `.gemini/` directory, which is organized into four primary systems:
88

99
### 1. The Hook System (`.gemini/hooks/`)
10+
1011
Hooks are Python-based scripts that intercept the Gemini CLI turn lifecycle. They are the framework's primary enforcement mechanism.
12+
1113
- **`session.py`:** Initializes the session and provides a project summary to the agent.
1214
- **`journal.py`:** Enforces the mandatory daily journaling requirement for all significant changes.
1315
- **`make.py`:** Automatically runs the `makefile` (tests/linting) to prevent regressions.
1416
- **`cron.py`:** Synchronizes the project's background tasks with systemd user timers.
1517
- **`utils.py`:** Provides a shared set of utilities for git status analysis and communication with the CLI.
1618

1719
### 2. The Command System (`.gemini/commands/`)
20+
1821
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.
22+
1923
- **`/plan`:** An interactive workflow that transitions between clarification, analysis, and strategy generation.
2024
- **`/research`:** A deep-dive exploration that produces exhaustive reports in the `research/` directory.
2125
- **`/debug`:** Activates a forensic investigation mode for root-cause analysis.
2226
- **`/docs`:** Analyzes the codebase and project state to update the documentation suite.
2327
- **`/task`:** The primary execution engine, managing `TASKS.md` and enforcing the strict TCR (Test-Commit-Revert) loop and feature branch isolation.
2428

2529
### 🔌 Synergistic Validation
30+
2631
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.
2732

2833
### 3. Specialized Agents (`.gemini/agents/`)
34+
2935
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.
3036

3137
### 4. State Management
38+
3239
The framework maintains internal state to optimize operations and ensure continuity:
40+
3341
- **`.gemini/last_make_run`**: Stores the timestamp of the last successful validation, allowing the framework to skip redundant tests.
3442
- **`.gemini/last_journal_update`**: Tracks when the journal was last updated to intelligently enforce the journaling requirement.
3543
- **`.gemini/settings.json`**: Configures the framework's global behavior and hook execution order.

docs/develop.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,37 @@ The **Gemini CLI Opinionated Framework** enforces a high-discipline development
77
Every non-trivial change must follow this strict three-phase process:
88

99
### 1. Research & Analysis
10+
1011
Before proposing a change, use the `/research` command to gather context, analyze the current codebase, and identify potential risks.
1112

1213
### 2. Strategic Planning
14+
1315
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`.
1416

1517
### 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.
18+
19+
The `/task work on ...` command implements a strict **TCR (Test-Commit-Revert)** protocol to ensure high-velocity, high-quality code.
1720

1821
#### **Phase 1: Pre-flight Verification**
22+
1923
The agent verifies that the working tree is clean, the current branch is `main`, and `make test` passes as a baseline.
2024

2125
#### **Phase 2: Task Isolation**
26+
2227
A dedicated feature branch (e.g., `feature/task-name`) is auto-generated and checked out. All subsequent work for this task occurs here.
2328

2429
#### **Phase 3: The Red-Green-Verify Loop**
30+
2531
For every granular step of the implementation:
32+
2633
1. **Red:** Write a failing test and verify failure with `make test`.
2734
2. **Green:** Implement the minimal code to pass.
2835
3. **Verify:** Run `make test`.
2936
- **Pass:** `git commit` the step.
3037
- **Fail:** Attempt one quick fix; if it still fails, **revert** to the last green state (`git checkout .`).
3138

3239
#### **Phase 4: Integration**
40+
3341
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.
3442

3543
## ✅ Testing & Quality Standards
@@ -41,17 +49,21 @@ Once all steps are complete, a final test run is performed. Upon user approval,
4149
## 🌲 Git & Source Control
4250

4351
### 1. Clean Working Tree
52+
4453
The framework requires a clean working tree for critical actions. Commit often to avoid merge conflicts or large, unmanageable diffs.
4554

4655
### 2. Conventional Commits
56+
4757
All commit messages must follow the [Conventional Commits](https://www.conventionalcommits.org/) standard:
58+
4859
- **`feat:`**: A new feature for the user.
4960
- **`fix:`**: A bug fix for the user.
5061
- **`docs:`**: Documentation-only changes.
5162
- **`chore:`**: Maintenance, dependencies, or internal tooling updates.
5263
- **`refactor:`**: Code changes that neither fix a bug nor add a feature.
5364

5465
### 3. Commit Scoping
66+
5567
When possible, provide a scope to the commit message (e.g., `feat(onboard): add documentation discovery`).
5668

5769
## ✍️ Documentation Style

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ This project is more than just a template; it is a structured environment that e
99
The framework is built on the belief that AI is most effective when it is constrained by rigorous engineering standards and empowered by deep project context. We operate on three fundamental pillars:
1010

1111
### 1. Critical Cognitive Partnership
12+
1213
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.
1314

1415
### 2. Strategy-First (Research -> Plan -> Execute)
16+
1517
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.
1618

1719
### 3. Validation-as-Truth
20+
1821
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.
1922

2023
### 4. Task Isolation (Feature Branching)
24+
2125
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.
2226

2327
## 🚀 Quick Start

docs/user-guide.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The framework is not just a set of scripts; it is a principled system designed t
88

99
## 🧠 Principles of Effective AI-Assisted Work
1010

11-
The most pressing limitation of modern LLMs is context saturation. When you work on a single project for a long time, the model can lose track of important details, leading to hallucinations or drift.
11+
The most pressing limitation of modern LLMs is context saturation. When you work on a single project for a long time, the model can lose track of important details, leading to hallucinations or drift.
1212

1313
This framework solves this problem by enforcing three core principles:
1414

@@ -23,12 +23,16 @@ This framework solves this problem by enforcing three core principles:
2323
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.
2424

2525
### `/research`
26+
2627
Your primary tool for gathering external knowledge.
28+
2729
- **How it works:** When triggered, the `researcher` subagent scours the web for technical documentation, APIs, or case studies. It synthesizes this data into granular summaries saved in the `research/` directory.
2830
- **When to use:** Use this when you need to understand a new library, a technical specification, or gather data for an article.
2931

3032
### `/plan`
33+
3134
Your tool for internal strategy and architectural design.
35+
3236
- **How it works:** The `planner` subagent conducts a thorough analysis of your codebase and journal. After clarifying the goal with you interactively, it produces a comprehensive Markdown plan in the `plans/` directory.
3337
- **Crucial Rule:** The `/plan` command *never* executes the code. It maps the territory and provides a step-by-step execution roadmap for you to approve first.
3438

@@ -39,35 +43,50 @@ Your tool for internal strategy and architectural design.
3943
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.
4044

4145
### `/issues`
46+
4247
Your gateway to GitHub.
48+
4349
- **How it works:** Interfaces with the GitHub CLI to analyze open issues and recommend what to tackle next based on strategic impact.
4450

51+
4552
### `/task`
53+
4654
Your roadmap manager.
55+
4756
- **How it works:** Manages a living `TASKS.md` document. Use it to `create` new tasks, `work` on existing ones, or `report` on the project's current status.
4857

4958
### `/commit`
59+
5060
Brings order to your version history.
61+
5162
- **How it works:** Instead of monolithic "WIP" commits, this command analyzes your `git diff` and logically groups modifications into cohesive units. It proposes a series of atomic, Conventional Commits (e.g., separating a feature update from a documentation tweak) for your approval.
5263

5364
### `/release`
65+
5466
Automates the deployment process.
67+
5568
- **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.
5669

5770
## 🔄 A Full Feature Development Walkthrough
5871

5972
A complete, principled development cycle follows the **Research -> Plan -> Execute** lifecycle.
6073

6174
### **Step 1: Research with `/research`**
75+
6276
You are integrating a new authentication library. You start by researching the technical requirements.
77+
6378
- The `researcher` subagent gathers documentation and synthesizes it into `research/auth-library-deep-dive.md`.
6479

6580
### **Step 2: Strategy with `/plan`**
81+
6682
Once you understand the requirements, you trigger the `/plan` command.
83+
6784
- The `planner` subagent analyzes the codebase and generates `plans/implement-auth.md`, mapping out the specific architectural changes and testing strategy.
6885

6986
### **Step 3: Execute with `/task work`**
87+
7088
The approved plan is linked to a task. You trigger the execution:
89+
7190
- **Pre-flight:** The agent verifies the tree is clean on `main`.
7291
- **Isolation:** A `feature/auth-integration` branch is created.
7392
- **Loop (Red-Green-Verify):**
@@ -77,21 +96,27 @@ The approved plan is linked to a task. You trigger the execution:
7796
4. The loop repeats for every granular step.
7897

7998
### **Step 4: Review & Integrate**
99+
80100
After all steps pass, the agent presents the final work. Upon your approval, it merges back to `main` and cleans up the feature branch.
81101

82102
### **Step 5: Document & Release with `/docs` & `/release`**
103+
83104
Finally, use `/docs` to update the technical documentation and `/release` to publish the new version.
84105

85106
## ⚙️ Background Tasks & Maintenance
86107

87108
The real magic of AI-assisted development is what happens when you're not looking or when dealing with technical debt.
88109

89110
### `/cron`
111+
90112
Your background automation layer.
113+
91114
- **How it works:** Uses the `cron.toml` file to define scheduled tasks via systemd user timers. You can schedule natural language prompts (e.g., "Scour the web for new developments in X") to run overnight, ensuring your knowledge base is fresh by morning.
92115

93116
### `/maintenance`
117+
94118
Your defense against context rot.
119+
95120
- **How it works:** Performs a comprehensive audit of the codebase to identify technical debt, outdated implementations, or deviations between code and documentation. It presents a detailed refactoring plan for your approval before making any changes, ensuring the repository remains a clean environment for the AI to operate within.
96121

97122
---

0 commit comments

Comments
 (0)