Skip to content

Commit 5aa4628

Browse files
committed
docs(user-guide): add comprehensive user guide and integrate with mkdocs
1 parent 3a238bc commit 5aa4628

File tree

5 files changed

+165
-0
lines changed

5 files changed

+165
-0
lines changed

TASKS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Put done tasks into the Archive.
1919
---
2020

2121
## Archive
22+
- [x] Create comprehensive User Guide (`docs/user-guide.md`) based on "The Architect in the Machine" philosophy. (2026-03-11) (See plan: plans/user-guide-integration.md)
2223
- [x] Refine `/plan` command to strictly enforce a non-execution mandate for generated plans. (2026-03-11)
2324
- [x] Integrate MkDocs with Material theme and setup automatic GitHub Pages deployment via CI/CD. (2026-03-11) (See plan: plans/mkdocs-integration.md)
2425
- [x] Create comprehensive project documentation in `docs/` (Overview, Deployment, Design, Development). (2026-03-11)

docs/user-guide.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# User Guide: The Architect in the Machine
2+
3+
Welcome to the **Gemini CLI Opinionated Framework**. This guide is based on the original design philosophy ("The Architect in the Machine") and explains how to use the framework to achieve a high-velocity, AI-assisted development workflow.
4+
5+
The framework is not just a set of scripts; it is a principled system designed to take you from ideation to execution at the fastest responsible speed, without sacrificing safety or maintainability.
6+
7+
---
8+
9+
## 🧠 Principles of Effective AI-Assisted Work
10+
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.
12+
13+
This framework solves this problem by enforcing three core principles:
14+
15+
1. **The important things should be made explicit:** We keep track of everything important in Markdown files. Ideas are committed to `plans/`, research is summarized in `research/`, and all changes are logged in the `journal/`. This physical "long-term memory" prevents the agent from forgetting context.
16+
2. **Resist the urge to guess:** We favor explicit commands over implicit actions. If you want the model to make a plan, you use the `/plan` command, which invokes a carefully crafted workflow rather than relying on the agent's default behavior.
17+
3. **Delegate, delegate, delegate:** We use specialized sub-agents (`planner`, `researcher`, `reporter`, `editor`). These agents run complex, multi-step tasks in private contexts, preventing their internal reasoning (e.g., browsing 20 web pages) from polluting the main session's context window.
18+
19+
---
20+
21+
## 🔍 The Discovery & Strategy Workflow
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.
24+
25+
### `/research`
26+
Your primary tool for gathering external knowledge.
27+
- **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.
28+
- **When to use:** Use this when you need to understand a new library, a technical specification, or gather data for an article.
29+
30+
### `/plan`
31+
Your tool for internal strategy and architectural design.
32+
- **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.
33+
- **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.
34+
35+
---
36+
37+
## 💻 The Software Development Workflow
38+
39+
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.
40+
41+
### `/issues`
42+
Your gateway to GitHub.
43+
- **How it works:** Interfaces with the GitHub CLI to analyze open issues and recommend what to tackle next based on strategic impact.
44+
45+
### `/task`
46+
Your roadmap manager.
47+
- **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.
48+
49+
### `/commit`
50+
Brings order to your version history.
51+
- **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.
52+
53+
### `/release`
54+
Automates the deployment process.
55+
- **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.
56+
57+
---
58+
59+
## ✍️ The Content Creation Workflow
60+
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.
62+
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.
66+
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.
70+
71+
---
72+
73+
## ⚙️ Background Tasks & Maintenance
74+
75+
The real magic of AI-assisted development is what happens when you're not looking or when dealing with technical debt.
76+
77+
### `/cron`
78+
Your background automation layer.
79+
- **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.
80+
81+
### `/maintenance`
82+
Your defense against context rot.
83+
- **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.
84+
85+
---
86+
87+
*This framework is not a "one-size-fits-all" solution; it is a starting point. Every command and subagent is a living document meant to be tweaked to suit your unique mental model.*

journal/2026-03-11.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
- Fixed a `TypeError` in the MkDocs deployment workflow by updating the `mkdocstrings` configuration.
1111
- Corrected the `mkdocstrings` configuration again to use the valid `paths` argument for the Python handler.
1212
- Verified the MkDocs build locally using `uv run` and added the `site/` directory to `.gitignore`.
13+
- Created a comprehensive User Guide (`docs/user-guide.md`) based on "The Architect in the Machine" philosophy and integrated it into the MkDocs navigation.
1314
- Refined the `/plan` command to strictly enforce a non-execution mandate, ensuring plans are only analyzed, verified, and saved.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ plugins:
3737

3838
nav:
3939
- Home: index.md
40+
- User Guide: user-guide.md
4041
- Setup & Deployment: deploy.md
4142
- Architecture & Design: design.md
4243
- Development & Contribution: develop.md

plans/user-guide-integration.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Execution Plan: Comprehensive User Guide Integration
2+
3+
This plan outlines the steps to create a formal User Guide for the Gemini CLI Opinionated Framework, based on the philosophy and workflows described in the `drafts/architect-in-the-machine.md` document.
4+
5+
## Objective
6+
To add a comprehensive `docs/user-guide.md` that detail the framework's core principles, command workflows (Discovery & Strategy, Software Development, Content Creation, Background Tasks), and practical usage examples, while integrating it into the MkDocs navigation.
7+
8+
## Architectural Impact
9+
- **Documentation Enhancement:** Provides a central, user-centric guide to using the framework.
10+
- **Workflow Formalization:** Translates informal blog-post-style drafts into structured documentation.
11+
- **Improved Discoverability:** Integrates new content into the existing MkDocs site navigation.
12+
13+
## File Operations
14+
15+
### Create
16+
- `docs/user-guide.md`: The new user guide content.
17+
18+
### Modify
19+
- `mkdocs.yml`: Add the new page to the navigation.
20+
21+
---
22+
23+
## Step-by-Step Execution
24+
25+
### Step 1: Content Extraction & Structure
26+
Extract the following key elements from `drafts/architect-in-the-machine.md`:
27+
- **Philosophical Principles:**
28+
1. The important things should be made explicit (explicit context).
29+
2. Resist the urge to guess (intentional actions).
30+
3. Delegate (specialized sub-agents).
31+
- **Sub-Agent Roles:** `planner`, `researcher`, `reporter`, `editor`.
32+
- **Context Architecture:** The roles of `journal/`, `plans/`, `research/`, and `TASKS.md`.
33+
34+
### Step 2: Implement `docs/user-guide.md`
35+
Create the file with the following sections:
36+
37+
1. **Introduction:** Briefly explain the "Architect in the Machine" concept and the goal of high-velocity development with AI.
38+
2. **Core Principles:** Detailed section on the three principles mentioned above.
39+
3. **The Discovery & Strategy Workflow:**
40+
- **/research:** Explain its use for external knowledge gathering and synthesis.
41+
- **/plan:** Explain the interactive analysis of the codebase and creation of the execution roadmap.
42+
4. **The Software Development Workflow:**
43+
- **/issues:** How to use the GitHub CLI integration for strategic prioritization.
44+
- **/task:** Managing the `TASKS.md` roadmap.
45+
- **/commit:** The process for creating atomic, Conventional Commits from `git diff`.
46+
- **/release:** Automating versioning, changelogs, and tagging.
47+
5. **The Content Creation Workflow:**
48+
- **/draft:** Detail the multi-phase process (context scan, outline creation, section expansion).
49+
- **/revise:** Explain the structural and linguistic audit process using the `editor` agent and `style-guide.md`.
50+
6. **The Background Tasks Workflow:**
51+
- **/cron:** How to configure and run scheduled natural language tasks via `cron.toml`.
52+
- **/maintenance:** Strategies for managing technical and "contextual" debt.
53+
54+
### Step 3: Update `mkdocs.yml`
55+
Modify the `nav` section to include the User Guide. Suggested placement:
56+
57+
```yaml
58+
nav:
59+
- Home: index.md
60+
- User Guide: user-guide.md
61+
- Setup & Deployment: deploy.md
62+
- Architecture & Design: design.md
63+
- Development & Contribution: develop.md
64+
```
65+
66+
### Step 4: Final Review & Refinement
67+
- Ensure the tone is formal yet accessible.
68+
- Verify that all command descriptions align with their actual implementations.
69+
- Cross-reference with `docs/design.md` and `docs/develop.md` to ensure consistency.
70+
71+
---
72+
73+
## Testing Strategy
74+
1. **Markdown Validation:** Verify that `docs/user-guide.md` follows standard GFM and has no broken links.
75+
2. **MkDocs Integration:** Run `mkdocs build` to ensure the site compiles without errors.

0 commit comments

Comments
 (0)