Skip to content

Commit 4c2e09e

Browse files
eddimanclaude
andcommitted
fix: repair docs site build — replace symlink with path config, create missing pages
The docs site never built after the monorepo consolidation. The symlink (site/docs -> ../docs) caused Docusaurus SSG to crash — it partially processes excluded directories through symlinks, hitting MDX-incompatible content in reference/. Additionally, the sidebar referenced 5 files that didn't exist. - Replace docs symlink with `path: '../docs'` in docusaurus.config.ts - Create getting-started/* pages (installation, telegram-setup, setup-wizard, first-message) - Create docs/intro.md as docs landing page and docs/development/contributing.md - Fix sidebar: setup-wizard-internals → setup-wizard - Move deploy workflow from site/.github/ to .github/ (GitHub Actions only reads repo root) - Update baseUrl/projectName from adjutant-docs to adjutant - Exclude reference/web/plans/README.md from Docusaurus build - Fix homepage link /docs/intro → /docs/ - Update docs/README.md index with memory, news, troubleshooting guides Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5ad0488 commit 4c2e09e

15 files changed

Lines changed: 451 additions & 2875 deletions

File tree

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Deploy Docs
33
on:
44
push:
55
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'site/**'
69
workflow_dispatch:
710

811
permissions:
@@ -17,13 +20,17 @@ concurrency:
1720
jobs:
1821
build:
1922
runs-on: ubuntu-latest
23+
defaults:
24+
run:
25+
working-directory: site
2026
steps:
2127
- uses: actions/checkout@v4
2228

2329
- uses: actions/setup-node@v4
2430
with:
2531
node-version: 20
2632
cache: npm
33+
cache-dependency-path: site/package-lock.json
2734

2835
- run: npm ci
2936
- run: npm run build
@@ -32,7 +39,7 @@ jobs:
3239

3340
- uses: actions/upload-pages-artifact@v3
3441
with:
35-
path: build
42+
path: site/build
3643

3744
deploy:
3845
environment:

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ adjutant/ # Monorepo
7373
│ └── package.json
7474
7575
├── site/ # Docusaurus documentation site
76-
│ ├── docs -> ../docs # Symlink to source of truth
76+
│ ├── (reads ../docs via config) # path: '../docs' in docusaurus.config.ts
7777
│ ├── docusaurus.config.ts
7878
│ ├── sidebars.ts
7979
│ └── package.json

docs/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,35 @@ Adjutant is a persistent autonomous agent framework that runs on your local mach
44

55
---
66

7+
## Getting Started
8+
9+
| Document | What it covers |
10+
|----------|---------------|
11+
| [Installation](getting-started/installation.md) | Prerequisites, clone, install, shell alias |
12+
| [Telegram Setup](getting-started/telegram-setup.md) | Create a bot, get your chat ID |
13+
| [Setup Wizard](getting-started/setup-wizard.md) | Run `adjutant setup`, backend selection, repair mode |
14+
| [First Message](getting-started/first-message.md) | Start the listener, send your first message |
15+
16+
Or read the [comprehensive guide](guides/getting-started.md) for all steps on one page.
17+
18+
---
19+
720
## Guides
821

922
For people using Adjutant.
1023

1124
| Document | What it covers |
1225
|----------|---------------|
13-
| [Getting Started](guides/getting-started.md) | Install, setup wizard, send your first message |
1426
| [Configuration](guides/configuration.md) | `adjutant.yaml`, `.env`, identity files (`soul.md`, `heart.md`, `registry.md`) |
1527
| [Commands](guides/commands.md) | All Telegram slash commands and `adjutant` CLI subcommands |
28+
| [Backends](guides/backends.md) | Choosing, configuring, and switching LLM backends (OpenCode / Claude CLI) |
1629
| [Knowledge Bases](guides/knowledge-bases.md) | Creating, structuring, and querying knowledge bases |
1730
| [Schedules](guides/schedules.md) | Cron-based scheduled jobs, KB operations, registry management |
1831
| [Autonomy](guides/autonomy.md) | Autonomous pulse/review cycles, notification budget, dry-run mode |
1932
| [Lifecycle](guides/lifecycle.md) | Start, stop, pause, kill, recover, and update |
20-
| [Backends](guides/backends.md) | Choosing, configuring, and switching LLM backends (OpenCode / Claude CLI) |
33+
| [Memory](guides/memory.md) | Long-term memory: `/remember`, `/forget`, `/recall`, `/digest` |
34+
| [News](guides/news.md) | News briefing pipeline: sources, filters, delivery |
35+
| [Troubleshooting](guides/troubleshooting.md) | Common issues and fixes |
2136

2237
---
2338

@@ -43,11 +58,12 @@ For people extending or contributing to Adjutant.
4358

4459
| Document | What it covers |
4560
|----------|---------------|
61+
| [Contributing](development/contributing.md) | Dev setup, code conventions, project structure |
4662
| [Adaptor Guide](development/adaptor-guide.md) | How to build a new messaging backend (Slack, Discord, CLI, etc.) |
4763
| [Plugin Guide](development/plugin-guide.md) | How to add a new capability script |
64+
| [Backend Guide](development/backend-guide.md) | Working with the backend abstraction, adding call sites, testing |
4865
| [Setup Wizard Internals](development/setup-wizard.md) | `adjutant setup` implementation: steps, dry-run, prompt helpers |
4966
| [Testing](development/testing.md) | Running the test suite, tier overview, isolation model |
50-
| [Backend Guide](development/backend-guide.md) | Working with the backend abstraction, adding call sites, testing |
5167

5268
---
5369

docs/development/contributing.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
## Development setup
4+
5+
```bash
6+
git clone https://github.com/eddiman/adjutant.git
7+
cd adjutant
8+
python3 -m venv .venv
9+
.venv/bin/pip install -e ".[dev]"
10+
```
11+
12+
## Dev commands
13+
14+
```bash
15+
.venv/bin/pytest tests/ -q # run tests
16+
.venv/bin/mypy src/adjutant/ --strict # type check
17+
.venv/bin/ruff check src/ tests/ # lint
18+
```
19+
20+
## Code conventions
21+
22+
- **LLM calls**: `get_backend().run()` — never call backends directly.
23+
- **Imports**: stdlib, then third-party, then local, alphabetical within each group.
24+
- **Logging**: `adj_log("component", "msg")` — no `print()`.
25+
- **Paths**: `get_adj_dir()` — never hardcode.
26+
- **Capabilities**: return string or raise, no stdout.
27+
- **Tests**: every module gets `tests/unit/test_<module>.py`.
28+
29+
## Project structure
30+
31+
```
32+
src/adjutant/
33+
├── cli.py # CLI dispatcher (Click)
34+
├── core/ # Backend protocol, config, env, logging, paths
35+
├── lib/ # HTTP client, NDJSON/JSON parsers
36+
├── lifecycle/ # Pause/resume/restart, cron jobs, self-update
37+
├── capabilities/ # KB, memory, schedule, screenshot, search, vision
38+
├── messaging/ # Dispatch + Telegram adaptor
39+
├── news/ # News fetch, analyze, briefing pipeline
40+
├── observability/ # Journal rotation, status, usage tracking
41+
└── setup/ # Setup wizard, install, repair, uninstall
42+
```
43+
44+
See [Architecture Overview](../architecture/overview.md) for detailed diagrams and the [Backend Guide](backend-guide.md) for working with the LLM abstraction.
45+
46+
## Adding a new capability
47+
48+
Follow the [Plugin Guide](plugin-guide.md) for step-by-step instructions on adding capability modules.
49+
50+
## Adding a new messaging backend
51+
52+
Follow the [Adaptor Guide](adaptor-guide.md) to implement a new messaging channel (Slack, Discord, CLI, etc.).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# First Message
2+
3+
With setup complete, start the Telegram listener and verify Adjutant is working.
4+
5+
## Start the listener
6+
7+
```bash
8+
adjutant start
9+
```
10+
11+
The Telegram listener starts in the background. Verify it's running:
12+
13+
```bash
14+
adjutant status
15+
```
16+
17+
You should see `Adjutant is up and running.` and the listener's PID.
18+
19+
## Send a message
20+
21+
Open Telegram and send a message to your bot. Try these:
22+
23+
| Message | What happens |
24+
|---------|-------------|
25+
| `/status` | Adjutant replies with its current operational state |
26+
| `/help` | Lists all available slash commands |
27+
| `/models` | Shows available LLM models |
28+
| `What time is it?` | A natural language question routed to the LLM backend |
29+
30+
That's it. Adjutant is running.
31+
32+
## Next steps
33+
34+
- **Configure what Adjutant knows about you**[Configuration](../guides/configuration.md)
35+
- **See all commands**[Commands](../guides/commands.md)
36+
- **Add a knowledge base**[Knowledge Bases](../guides/knowledge-bases.md)
37+
- **Understand start/stop/pause**[Lifecycle](../guides/lifecycle.md)
38+
- **Set up autonomous cycles**[Autonomy](../guides/autonomy.md)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Installation
2+
3+
## Prerequisites
4+
5+
Before installing, make sure you have:
6+
7+
- **macOS or Linux**
8+
- **Python 3.11+**`python3 --version` to check
9+
- **An LLM backend** — either [OpenCode](https://opencode.ai) or [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code)
10+
- **curl** (installed on every macOS/Linux system by default)
11+
12+
Check your backend is working:
13+
14+
```bash
15+
# OpenCode
16+
opencode --version
17+
18+
# Or Claude Code CLI
19+
claude --version
20+
```
21+
22+
## Install
23+
24+
Clone the repository to any location you like — Adjutant can live anywhere:
25+
26+
```bash
27+
git clone https://github.com/eddiman/adjutant.git /path/to/adjutant
28+
cd /path/to/adjutant
29+
python3 -m venv .venv
30+
.venv/bin/pip install -e .
31+
```
32+
33+
This installs the `adjutant` CLI entry point into `.venv/bin/adjutant`. Add it to your shell profile (adjust the path to match where you cloned):
34+
35+
```bash
36+
echo 'alias adjutant="/path/to/adjutant/.venv/bin/adjutant"' >> ~/.zshrc
37+
source ~/.zshrc
38+
```
39+
40+
The setup wizard will ask for the install path and write it to `adjutant.yaml`. Adjutant resolves its own location from that file — no hardcoded paths required.
41+
42+
## Auto-start on boot (macOS)
43+
44+
To keep Adjutant running across reboots, use `adjutant startup` which installs a LaunchAgent. See [Lifecycle](../guides/lifecycle.md) for details.
45+
46+
## Next step
47+
48+
[Create a Telegram bot](telegram-setup.md) to give Adjutant a messaging channel.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Setup Wizard
2+
3+
Run the interactive setup wizard to configure your Adjutant installation:
4+
5+
```bash
6+
adjutant setup
7+
```
8+
9+
## Wizard steps
10+
11+
The wizard walks through seven steps:
12+
13+
1. **Prerequisites** — verifies dependencies are in place (Python, backend CLI, curl)
14+
2. **Install path** — confirms where Adjutant lives on disk
15+
3. **Backend** — choose between OpenCode and Claude Code CLI (see [Backends](../guides/backends.md))
16+
4. **Identity** — creates your `soul.md`, `heart.md`, and `registry.md` files (see [Configuration](../guides/configuration.md))
17+
5. **Messaging** — prompts for your Telegram bot token and chat ID, writes them to `.env`
18+
6. **Features** — optional news briefing, screenshot, vision, and search configuration
19+
7. **Service** — installs the shell alias and optionally sets up auto-start on boot
20+
21+
## Backend selection
22+
23+
During step 3, the wizard asks which LLM backend to use:
24+
25+
| Backend | Best for |
26+
|---------|----------|
27+
| **OpenCode** | Vision support, model listing, session resume |
28+
| **Claude Code CLI** | Cost tracking, permission allowlists |
29+
30+
You can switch backends later by editing `adjutant.yaml` — see [Backends](../guides/backends.md).
31+
32+
## Repair mode
33+
34+
If something needs fixing after initial setup, re-run in repair mode:
35+
36+
```bash
37+
adjutant setup --repair
38+
```
39+
40+
Repair mode runs health checks and offers to fix each issue found.
41+
42+
## Dry-run mode
43+
44+
Preview what the wizard would do without making changes:
45+
46+
```bash
47+
adjutant setup --dry-run
48+
```
49+
50+
For implementation details, see [Setup Wizard Internals](../development/setup-wizard.md).
51+
52+
## Next step
53+
54+
[Send your first message](first-message.md) to verify everything is working.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Telegram Setup
2+
3+
Adjutant communicates through Telegram. You need a bot token and your chat ID.
4+
5+
## Create a bot
6+
7+
1. Open Telegram and search for `@BotFather`
8+
2. Send `/newbot`
9+
3. Follow the prompts — choose a name and username for your bot
10+
4. BotFather will give you a token that looks like `123456789:ABCdefGHIjklMNOpqrsTUVwxyz` — save it
11+
12+
## Get your chat ID
13+
14+
1. Start a conversation with your new bot (click Start or send any message)
15+
2. Open this URL in your browser, replacing `YOUR_TOKEN` with your token:
16+
```
17+
https://api.telegram.org/botYOUR_TOKEN/getUpdates
18+
```
19+
3. Find `"chat":{"id":123456789}` in the response — that number is your chat ID
20+
21+
## Security notes
22+
23+
- Your bot token is stored in `.env` (never committed to git)
24+
- Only messages from your chat ID are processed — unknown senders are logged and ignored
25+
- Rate limiting (configurable, default 10 messages/min) prevents abuse
26+
27+
## Next step
28+
29+
[Run the setup wizard](setup-wizard.md) to configure Adjutant with your credentials.

docs/intro.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
slug: /
3+
---
4+
5+
# Introduction
6+
7+
Adjutant is a persistent autonomous agent framework that runs on your local machine. It listens for messages through Telegram, routes them through a backend-agnostic dispatcher, and responds via LLM-powered reasoning or built-in commands.
8+
9+
## What Adjutant does
10+
11+
- **Conversational AI** — send natural-language messages via Telegram; Adjutant responds using OpenCode or Claude Code CLI as its reasoning backend.
12+
- **Knowledge bases** — register directories as queryable knowledge bases. Adjutant reads, writes, and searches them on your behalf.
13+
- **Scheduled jobs** — define cron-based tasks that run autonomously and notify you of results.
14+
- **Autonomous cycles** — periodic pulse and review operations let Adjutant act proactively, within configurable notification budgets.
15+
- **Long-term memory** — a structured memory system that persists facts, preferences, and decisions across conversations.
16+
- **News briefings** — aggregated, LLM-ranked news from Hacker News, Reddit, and RSS feeds.
17+
- **Screenshots and vision** — capture and analyze web pages or images.
18+
- **Web search** — Brave Search API integration for real-time web queries.
19+
20+
## Dual-backend architecture
21+
22+
Adjutant supports two LLM backends, switchable via configuration:
23+
24+
| | OpenCode | Claude Code CLI |
25+
|---|---|---|
26+
| Vision/images | Yes | No |
27+
| Model listing | Yes | No |
28+
| Cost tracking | No | Yes |
29+
| Process reaping | Yes | No |
30+
| Permission modes | N/A | skip / allowlist |
31+
32+
Both backends share the same protocol — all capabilities work identically regardless of which backend is active. See [Backends](guides/backends.md) for setup and switching.
33+
34+
## Quick start
35+
36+
1. [Install Adjutant](getting-started/installation.md)
37+
2. [Create a Telegram bot](getting-started/telegram-setup.md)
38+
3. [Run the setup wizard](getting-started/setup-wizard.md)
39+
4. [Send your first message](getting-started/first-message.md)

site/docs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)