Skip to content

Commit 079b88f

Browse files
committed
docs: fix documentation to match implementation
- Replace 'Gemini CLI' with 'OpenCode Framework' - Replace /maintenance with /audit throughout - Remove references to unimplemented commands (/learn, /document, /brainstorm, /cron) - Update directory paths to .knowledge/* structure - Update install.sh to non-interactive mode with --link flag - Fix install URLs to apiad.github.io/opencode - Update agent and subagent tables to match actual implementation
1 parent 9f5df5e commit 079b88f

File tree

8 files changed

+282
-235
lines changed

8 files changed

+282
-235
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
id: audit-documentation-2026-03-27
3+
created: 2026-03-27
4+
type: audit
5+
scope: documentation
6+
status: active
7+
---
8+
9+
# Audit: Documentation
10+
11+
## Executive Summary
12+
13+
**Health: ⚠️ Critical Issues**
14+
15+
The documentation has significant drift from the current implementation. Multiple commands referenced don't exist, directory structures are outdated, and install URLs are inconsistent across files. New users following the docs would encounter broken commands and incorrect paths.
16+
17+
## Architecture Overview
18+
19+
### Documentation Files
20+
- `docs/index.md` β€” Landing page, philosophy, quick start
21+
- `docs/deploy.md` β€” Installation & setup
22+
- `docs/design.md` β€” Architecture & systems
23+
- `docs/develop.md` β€” Contribution guidelines
24+
- `docs/updating.md` β€” Update procedures
25+
- `docs/user-guide.md` β€” Usage walkthrough
26+
- `docs/install.sh` β€” Installer script
27+
28+
### Actual Command Set (`.opencode/commands/`)
29+
```
30+
audit, build, commit, draft, fix, help, investigate,
31+
note, onboard, plan, publish, research, scaffold, todo
32+
```
33+
34+
---
35+
36+
## Findings
37+
38+
### Strengths
39+
- Clean structure with separate concern files
40+
- Good use of YAML frontmatter standards
41+
- README.md accurately reflects two-repo architecture
42+
- Install script is functional and recent
43+
44+
### Concerns
45+
46+
| Area | Severity | Description | Location | Recommendation |
47+
|------|----------|-------------|----------|----------------|
48+
| Directory Structure | **high** | `design.md` shows old dirs (`plans/`, `journal/`, `research/`, `drafts/`) but actual is `.knowledge/plans/`, `.knowledge/log/`, `.knowledge/notes/`, `.knowledge/drafts/` | `docs/design.md:115-127` | Update to show `.knowledge/*` structure |
49+
| Missing Commands | **high** | `/maintenance`, `/document`, `/brainstorm`, `/cron`, `/learn` are documented but don't exist | Multiple docs | Either implement or remove from docs |
50+
| Install URLs | **high** | Inconsistent URLs: `apiad.github.io/starter` vs `apiad.github.io/opencode` | `docs/index.md:39`, `docs/deploy.md:76-91` | Standardize to `apiad.github.io/opencode` |
51+
| CLI Name | **high** | Docs reference `gemini` CLI but actual CLI is `opencode` | `docs/deploy.md:146,157` | Replace all `gemini` with `opencode` |
52+
| Wrong Install Flag | **medium** | `docs/deploy.md` shows `--mode=link` but install.sh uses `--link` | `docs/deploy.md:76,79` | Update to match actual flag syntax |
53+
| Agent-Command Mismatch | **medium** | `design.md` shows agents not in commands, e.g., `query`, `write`, `review` | `docs/design.md:7-17` | Document actual commands or reconcile |
54+
| Missing `/revise` | **low** | Referenced as "legacy" but implementation unclear | `docs/user-guide.md:227` | Clarify if this command exists |
55+
56+
### Technical Debt
57+
58+
1. **Orphaned Plans** β€” Multiple `.knowledge/plans/` files for features that may not be implemented:
59+
- `add-brainstorm-command.md` β€” `/brainstorm` not implemented
60+
- `implement-learn-command.md` β€” `/learn` not implemented
61+
- `implement-maintenance-v2.md` β€” `/maintenance` not implemented
62+
63+
2. **Outdated Terminology**
64+
- "Tier Protocol" in `docs/index.md:49` β€” no corresponding implementation
65+
- "Context Minifier" in `docs/develop.md:75` and `docs/user-guide.md:18` β€” no documented implementation
66+
67+
3. **Install Script Issues**
68+
- Uses `--link` but docs show `--mode=link` and `--mode=copy`
69+
- `REPO_URL` points to `opencode-core` but should document which repo
70+
71+
---
72+
73+
## Recommendations
74+
75+
### Priority 1: Fix Critical Path Issues
76+
77+
1. **Update install URL everywhere** to `https://apiad.github.io/opencode/install.sh`
78+
- `docs/index.md:39`
79+
- `docs/deploy.md:76,79,91`
80+
- `docs/updating.md:14,26,40,52,62,122,156`
81+
82+
2. **Replace CLI name** `gemini` β†’ `opencode` in:
83+
- `docs/deploy.md:146,157`
84+
- Any other occurrences
85+
86+
3. **Fix `--mode=` β†’ `--link`/`--copy`** in `docs/deploy.md:76-79` and `docs/updating.md`
87+
88+
4. **Update directory structure** in `docs/design.md:115-127`:
89+
```diff
90+
- plans/ # Saved execution plans
91+
- journal/ # Daily journal entries (YYYY-MM-DD.yaml)
92+
- research/ # Research artifacts
93+
- drafts/ # Content drafts
94+
+ .knowledge/
95+
+ β”œβ”€β”€ plans/ # Saved execution plans
96+
+ β”œβ”€β”€ notes/ # Research artifacts and notes
97+
+ β”œβ”€β”€ log/ # Daily journal entries (YYYY-MM-DD.yaml)
98+
+ └── drafts/ # Content drafts
99+
```
100+
101+
### Priority 2: Reconcile Command Inventory
102+
103+
5. **Decision needed:** Should these commands be implemented or removed from docs?
104+
- `/maintenance` β€” mentioned in multiple docs
105+
- `/document` β€” referenced in develop.md, user-guide.md
106+
- `/brainstorm` β€” has a plan file
107+
- `/cron` β€” mentioned in user-guide.md
108+
- `/learn` β€” has a plan file
109+
110+
### Priority 3: Cleanup
111+
112+
6. Remove or archive orphaned plan files for unimplemented commands
113+
7. Remove or clarify "Tier Protocol" and "Context Minifier" mentions if no implementation
114+
8. Add `docs/install.sh` usage examples to match actual `--link` flag
115+
116+
---
117+
118+
## Evidence
119+
120+
### Files Referencing Non-Existent Commands
121+
- `docs/develop.md:19` β€” `/maintenance`
122+
- `docs/develop.md:84-106` β€” `/learn`
123+
- `docs/user-guide.md:58-66` β€” `/learn`
124+
- `docs/user-guide.md:38-44` β€” `/brainstorm`
125+
- `docs/user-guide.md:224-232` β€” `/review`
126+
- `docs/user-guide.md:240-252` β€” `/cron`, `/maintenance`
127+
- `docs/index.md:48` β€” `/learn`
128+
- `docs/index.md:53` β€” `/document`
129+
130+
### Install URL Inconsistency
131+
```bash
132+
# docs/index.md:39
133+
curl -fsSL https://apiad.github.io/starter/install.sh | bash
134+
135+
# docs/deploy.md:91
136+
curl -fsSL https://apiad.github.io/starter/install.sh | bash
137+
138+
# README.md:19
139+
curl -fsSL https://apiad.github.io/opencode/install.sh | bash
140+
```

β€Ždocs/deploy.mdβ€Ž

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation & Setup
22

3-
Getting the **Gemini CLI Opinionated Framework** up and running is an automated, interactive process. Whether you're starting a new project or integrating into an existing one, the `install.sh` script is your primary tool.
3+
Getting the **OpenCode Framework** up and running is an automated, non-interactive process. Whether you're starting a new project or integrating into an existing one, the `install.sh` script is your primary tool.
44

55
## Installation Modes
66

@@ -73,13 +73,13 @@ To switch modes, run the installer with the desired mode:
7373

7474
```bash
7575
# Copy to Link
76-
curl -fsSL https://apiad.github.io/opencode/install.sh | bash -s -- --mode=link
76+
curl -fsSL https://apiad.github.io/opencode/install.sh | bash -s -- --link
7777

7878
# Link to Copy
79-
curl -fsSL https://apiad.github.io/opencode/install.sh | bash -s -- --mode=copy
79+
curl -fsSL https://apiad.github.io/opencode/install.sh | bash -s -- --copy
8080
```
8181

82-
The installer will prompt for confirmation when switching modes.
82+
The installer runs non-interactively; use `--link` or `--copy` to specify the mode.
8383

8484
---
8585

@@ -88,7 +88,7 @@ The installer will prompt for confirmation when switching modes.
8888
The fastest way to install or update the framework is to run the following command:
8989

9090
```bash
91-
curl -fsSL https://apiad.github.io/starter/install.sh | bash
91+
curl -fsSL https://apiad.github.io/opencode/install.sh | bash
9292
```
9393

9494
### 1. New Project (Scaffolding)
@@ -97,7 +97,7 @@ Running `install.sh` in an empty directory will:
9797

9898
- Initialize a fresh Git repository.
9999
- Extract the core `.opencode/` framework and configuration files.
100-
- Create the standard project structure (`journal/`, `plans/`, `research/`, `drafts/`).
100+
- Create the standard project structure (`.knowledge/log/`, `.knowledge/plans/`, `.knowledge/notes/`, `.knowledge/drafts/`).
101101
- Initialize baseline files (`README.md`, `CHANGELOG.md`, `tasks.yaml`, `makefile`).
102102
- Perform an initial "feat" commit.
103103

@@ -111,15 +111,15 @@ If run inside an existing project, the script performs a **Surgical Update**:
111111
- `opencode.json`
112112
- `.opencode/style-guide.md`
113113
- **Confirm:** Presents a detailed summary of which files will be **created**, **updated**, or **protected** and waits for your approval.
114-
- **Integrate:** Adds missing directory structures (`journal/`, `plans/`, etc.) if they don't exist.
114+
- **Integrate:** Adds missing directory structures (`.knowledge/log/`, `.knowledge/plans/`, etc.) if they don't exist.
115115
- **Commit:** Automatically creates a descriptive `chore` commit marking the update.
116116

117117
## πŸ› οΈ Prerequisites & Setup
118118

119119
To ensure full functionality, your environment should have:
120120

121121
- **Git:** Required for state management and change detection hooks.
122-
- **Node.js:** Necessary for running the `gemini` CLI.
122+
- **Node.js:** Necessary for running the `opencode` CLI.
123123
- **Python 3.12+:** Required for executing the project's automation scripts in `.opencode/tools/`.
124124
- **uv:** The required Python package and project manager.
125125
- **Make:** Used for project validation and health checks (runs `uv run pytest`).
@@ -143,20 +143,20 @@ Once the installation is complete, follow these steps to orient yourself:
143143
Execute the `/onboard` command to get a high-signal overview of the repository's architecture, standards, and current roadmap.
144144

145145
```bash
146-
gemini /onboard
146+
opencode /onboard
147147
```
148148

149149
### 2. Initialize the Roadmap
150150

151-
Check the current `tasks.yaml` file and use the `/task` command to define your project's initial goals.
151+
Check the current task list and use the `/todo` command to define your project's initial goals.
152152

153153
### 3. Start a New Feature
154154

155155
For your first feature, follow the standard workflow:
156156

157-
- **Research:** `gemini /research [topic]`
158-
- **Plan:** `gemini /plan` (follow the interactive prompts)
159-
- **Implement:** Begin coding once the plan is saved in `plans/`.
157+
- **Research:** `opencode /research [topic]`
158+
- **Plan:** `opencode /plan` (follow the interactive prompts)
159+
- **Implement:** Begin coding once the plan is saved in `.knowledge/plans/`.
160160

161161
---
162162

β€Ždocs/design.mdβ€Ž

Lines changed: 41 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
# Architecture & Systems
22

3-
The **Gemini CLI Opinionated Framework** uses **OpenCode** as its agent orchestration layer. The core framework resides in the `.opencode/` directory.
3+
The **OpenCode Framework** uses **OpenCode** as its agent orchestration layer. The core framework resides in the `.opencode/` directory.
44

55
## πŸ—οΈ The OpenCode Architecture
66

7-
### Primary Agents (`.opencode/agents/`)
7+
### Primary Agents (Modes)
88

99
| Agent | Purpose |
1010
|-------|---------|
11-
| `plan` | Planning workflow - analyzes codebase, generates plans to `plans/` |
12-
| `build` | TCR coding workflow - manages tasks and delegates to builder |
13-
| `query` | Default agent for repo Q&A - invokes subagents as needed |
14-
| `research` | Research campaigns - parallel scout work with writer summaries |
15-
| `brainstorm` | Critical thinking and risk assessment |
16-
| `write` | Prose composition and refinement |
17-
| `review` | Multi-phase editorial review |
11+
| `analyze` | Research, investigation, and audits |
12+
| `plan` | Strategy and architectural design |
13+
| `build` | TCR implementation discipline |
14+
| `release` | Publishing and versioning |
1815

19-
### Subagents (`.opencode/agents/subagents/`)
16+
### Subagents
2017

2118
| Subagent | Purpose |
2219
|----------|---------|
23-
| `builder` | TCR grunt coding (test-driven implementation) |
24-
| `scout` | Web research (parallelizable) |
2520
| `investigator` | Codebase architectural analysis |
26-
| `writer` | Prose refinement |
27-
| `reviewer` | Editorial audits |
28-
| `debugger` | RCA investigation |
21+
| `scout` | Web research (parallelizable) |
22+
| `tester` | Hypothesis validation |
23+
| `drafter` | Content creation |
24+
| `critic` | Prose review |
25+
| `general` | General-purpose coding tasks | |
2926

3027
### Commands (`.opencode/commands/`)
3128

@@ -34,31 +31,31 @@ Commands define structured, multi-phase workflows that automate the development
3431
| Command | Phase | Description |
3532
|---------|-------|-------------|
3633
| `/research` | Discovery | Deep-dive exploration producing Markdown reports |
37-
| `/maintenance` | Discovery | Non-destructive codebase audit |
38-
| `/review` | Discovery | Multi-phase linguistic and structural audit |
34+
| `/audit` | Discovery | Codebase audit for tech debt and architecture |
3935
| `/debug` | Discovery | Scientific, hypothesis-driven forensic investigation |
40-
| `/brainstorm` | Discovery | Interactive critical-thinking sessions |
36+
| `/investigate` | Discovery | Root cause analysis |
4137
| `/plan` | Strategy | Mandatory bridge to execution plans |
42-
| `/task` | Execution | TCR loop and feature branch isolation |
43-
| `/draft` | Execution | Content transformation into finished documents |
44-
| `/document` | Execution | Documentation synchronization |
38+
| `/build` | Execution | TCR loop implementation |
39+
| `/fix` | Execution | Bug fix with regression prevention |
40+
| `/draft` | Execution | Content creation into finished documents |
4541
| `/onboard` | All | Project orientation for new developers |
4642
| `/scaffold` | All | Project initialization with modern tooling |
4743
| `/commit` | Shipping | Conventional commits with grouped changes |
4844
| `/release` | Shipping | Version bump, changelog, git tagging |
49-
| `/issues` | All | GitHub CLI integration |
45+
| `/todo` | All | Task management |
46+
| `/note` | All | Journal entry creation |
5047

5148
### The Unified Lifecycle Flow
5249

5350
The framework enforces a strict architectural boundary between discovering what to do and actually doing it. Data flows unidirectionally:
5451

55-
1. **Discovery:** `/research`, `/maintenance`, `/review`, `/debug` create read-only artifacts
56-
2. **Strategy:** `/plan` generates actionable roadmaps in `plans/`
57-
3. **Execution:** `/task` (code) or `/draft` (prose) perform actual work
52+
1. **Discovery:** `/research`, `/audit`, `/debug` create read-only artifacts in `.knowledge/notes/`
53+
2. **Strategy:** `/plan` generates actionable roadmaps in `.knowledge/plans/`
54+
3. **Execution:** `/build` (code) or `/draft` (prose) perform actual work
5855

5956
## πŸ”„ TCR (Test-Commit-Revert) Protocol
6057

61-
The `/task work` command enforces a high-discipline development lifecycle through a strict TCR loop:
58+
The `/build` command enforces a high-discipline development lifecycle through a strict TCR loop:
6259

6360
1. **Pre-flight Verification:** Ensures a clean `main` branch and passing tests.
6461
2. **Isolation:** All work occurs on an auto-generated, kebab-case feature branch.
@@ -68,29 +65,17 @@ The `/task work` command enforces a high-discipline development lifecycle throug
6865
- **Verify:** If the test fails, the agent is allowed **one quick fix**. If it fails again, the change is **automatically reverted** (`git checkout .`), preserving the last known stable state.
6966
4. **Integration:** Upon completion, the feature branch is merged, the roadmap is updated, and the branch is deleted.
7067

71-
## πŸ“ Procedural Task Management
72-
73-
The `tasks.yaml` file is managed exclusively via the `task` tool:
68+
## πŸ“ Task Management
7469

75-
- **Single source of truth** for project roadmap
76-
- **State lifecycle:** `add` (Todo) β†’ `start` (In Progress) β†’ `archive` (Done)
77-
- **Never edit `tasks.yaml` by hand** β€” always use the task tool
70+
Tasks are managed via the `todowrite` tool within agent sessions:
7871

79-
!!! warning "Migrating from TASKS.md"
80-
If you have an existing `TASKS.md` file, instruct the model to migrate it:
81-
```
82-
/task please migrate from @TASKS
83-
```
72+
- **Visible task list** for both user and agent
73+
- **State lifecycle:** pending β†’ in_progress β†’ completed
74+
- **Priority levels:** high, medium, low
8475

8576
### Usage
8677

87-
```bash
88-
task list # Show all tasks
89-
task add --label "Feature X" --description "..."
90-
task start --task-id G.1
91-
task archive --task-id G.1
92-
task attach-plan --task-id G.1 --plan-path plans/my-plan.md
93-
```
78+
Use the `/todo` command or `todowrite` tool directly to manage tasks.
9479

9580
## πŸ” Scientific Debugging (`/debug`)
9681

@@ -112,18 +97,21 @@ The framework uses a timestamp-based git hook to enforce journaling:
11297
## πŸ“ Directory Structure
11398

11499
```
115-
.opencode/
100+
.opencode/ # Framework runtime (agents, commands, tools)
116101
β”œβ”€β”€ agents/ # Primary agent definitions
117102
β”‚ └── subagents/ # Specialized subagents
118103
β”œβ”€β”€ commands/ # High-level commands
119-
β”œβ”€β”€ tools/ # Utilities (TypeScript tools: task.ts, journal.ts, pre-commit.py)
120-
└── style-guide.md # Prose style rules
121-
122-
plans/ # Saved execution plans
123-
journal/ # Daily journal entries (YYYY-MM-DD.yaml)
124-
research/ # Research artifacts
125-
drafts/ # Content drafts
126-
tasks.yaml # Project roadmap (managed by task tool)
104+
β”œβ”€β”€ tools/ # Utilities (pre-commit.py, etc.)
105+
β”œβ”€β”€ style-guide.md # Prose style rules
106+
└── README.md # Framework self-documentation
107+
108+
.knowledge/
109+
β”œβ”€β”€ plans/ # Saved execution plans
110+
β”œβ”€β”€ notes/ # Research artifacts and analysis notes
111+
β”œβ”€β”€ log/ # Daily journal entries (YYYY-MM-DD.yaml)
112+
└── drafts/ # Content drafts
113+
114+
tasks.yaml # Project roadmap (managed by task tool)
127115
```
128116

129117
## βš™οΈ Technology Stack

0 commit comments

Comments
Β (0)