Skip to content

Commit 46069c8

Browse files
committed
docs: added Quickstart.md
1 parent 6a42b50 commit 46069c8

2 files changed

Lines changed: 188 additions & 0 deletions

File tree

Quickstart.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Small Harness Quickstart
2+
3+
This guide is for the first 20 minutes with Small Harness. It focuses on the
4+
top three things you can do immediately: understand a repo, make a safe edit,
5+
and tune Small Harness to the best model available on your machine.
6+
7+
## Before You Start
8+
9+
You need Rust and at least one OpenAI-compatible local backend. Ollama is the
10+
fastest first path:
11+
12+
```bash
13+
brew install ollama
14+
brew services start ollama
15+
ollama pull qwen2.5-coder:7b
16+
```
17+
18+
Then run Small Harness from the project you want to work in:
19+
20+
```bash
21+
cargo run --release
22+
```
23+
24+
On first run, the setup wizard creates `agent.config.json`. For the quickest
25+
local setup, choose:
26+
27+
```text
28+
backend: ollama
29+
profile: mac-mini-16gb
30+
model override: blank
31+
approval policy: dangerous-only
32+
tool mode: auto
33+
```
34+
35+
## 1. Understand A Codebase Fast
36+
37+
Small Harness is most useful when you let it inspect files directly instead of
38+
pasting code into chat. Start with a broad map, then ask narrower questions.
39+
40+
Try:
41+
42+
```text
43+
Give me a concise map of this repo. Focus on the entry points, core modules,
44+
and where configuration lives.
45+
```
46+
47+
Then:
48+
49+
```text
50+
Find the code path for slash commands and explain how a new command should be
51+
added.
52+
```
53+
54+
Useful commands:
55+
56+
```text
57+
/config show the active backend, model, tools, workspace, and history
58+
/tools show enabled tools and whether adaptive tool selection is on
59+
/context show prompt budget and active tool schemas
60+
```
61+
62+
What to look for:
63+
64+
- Small Harness should use read/search/list tools only when needed.
65+
- With `toolSelection: "auto"`, ordinary chat should avoid sending tool schemas.
66+
- The answer should cite concrete files and functions, not just guess.
67+
68+
## 2. Make A Safe Local Edit
69+
70+
Small Harness can edit files, but the best workflow is to ask for a small,
71+
reviewable change and let approvals show you exactly what will happen.
72+
73+
Try:
74+
75+
```text
76+
Add a short comment above the function that dispatches slash commands explaining
77+
that new commands should be registered in both COMMANDS and dispatch.
78+
```
79+
80+
Then inspect what happened:
81+
82+
```bash
83+
git diff
84+
cargo test
85+
```
86+
87+
Useful commands:
88+
89+
```text
90+
/session show current model, approval policy, session file, and tokens
91+
/new start a clean conversation
92+
/export current markdown
93+
```
94+
95+
Good habits:
96+
97+
- Ask for one focused change at a time.
98+
- Prefer exact files, functions, or tests when you know them.
99+
- Keep `approvalPolicy` at `dangerous-only` or `always` until you trust a model.
100+
- Use `git diff` as the source of truth before committing.
101+
102+
## 3. Tune The Best Local Model
103+
104+
Different local models vary a lot. Small Harness can probe model capabilities,
105+
cache the results, benchmark latency, and recommend the best cached fit.
106+
107+
Run:
108+
109+
```text
110+
/doctor --deep
111+
/bench
112+
/capabilities
113+
```
114+
115+
If you have multiple backends running, probe them all:
116+
117+
```text
118+
/capabilities refresh all
119+
```
120+
121+
Then ask for a recommendation:
122+
123+
```text
124+
/autotune
125+
```
126+
127+
Apply the recommendation to the current session:
128+
129+
```text
130+
/autotune apply
131+
```
132+
133+
What Small Harness is checking:
134+
135+
- model listing
136+
- streaming responses
137+
- usage chunks
138+
- native tool calls
139+
- inline JSON fallback for small models
140+
- first-token latency
141+
- estimated output tokens per second
142+
143+
By default, `/autotune` prefers local backends. To let OpenRouter compete with
144+
local models, use:
145+
146+
```text
147+
/autotune --cloud
148+
```
149+
150+
## A Good First Session
151+
152+
Here is a simple sequence that exercises the whole product:
153+
154+
```text
155+
/config
156+
Give me a concise map of this repo.
157+
/doctor --deep
158+
/bench
159+
/capabilities
160+
/autotune
161+
Find one small README improvement and propose the exact diff before editing.
162+
```
163+
164+
After the edit:
165+
166+
```bash
167+
git diff
168+
cargo fmt --all -- --check
169+
cargo test
170+
```
171+
172+
## Where Things Are Saved
173+
174+
Small Harness keeps local state under `.sessions/`:
175+
176+
```text
177+
.sessions/
178+
history.jsonl input history
179+
*.jsonl session transcripts
180+
doctor/ deep doctor JSON and Markdown reports
181+
evals/ eval suite JSON and Markdown reports
182+
capabilities/ per-model capability and benchmark cache
183+
```
184+
185+
That local cache is what powers `/capabilities` and `/autotune`.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<p align="center">
1212
<a href="#quick-install">Quick Install</a> &middot;
13+
<a href="Quickstart.md">Quickstart</a> &middot;
1314
<a href="#getting-started">Getting Started</a> &middot;
1415
<a href="#features">Features</a> &middot;
1516
<a href="#backends">Backends</a> &middot;
@@ -77,6 +78,8 @@ cargo run --release
7778
Build a standalone binary with `cargo build --release` — it lands at
7879
`target/release/small-harness` (~5 MB).
7980

81+
For a guided first session, read [Quickstart.md](Quickstart.md).
82+
8083
By default Small Harness talks to Ollama at `http://localhost:11434/v1`. To
8184
target LM Studio, MLX, or llama.cpp instead, set `BACKEND=lm-studio`,
8285
`BACKEND=mlx`, or `BACKEND=llamacpp` before running, or use `/backend` once

0 commit comments

Comments
 (0)