|
| 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.* |
0 commit comments