Skip to content

Commit 9467b57

Browse files
authored
docs: rewrite apps/docs and packages/cli READMEs (#3)
1 parent d9cfba6 commit 9467b57

2 files changed

Lines changed: 60 additions & 42 deletions

File tree

apps/docs/README.md

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,28 @@
1-
# docs
1+
# regtrace docs
22

3-
This is a Next.js application generated with
4-
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
3+
Documentation site for [regtrace](https://github.com/decimozs/regtrace) built with Next.js and Fumadocs.
54

6-
Run development server:
5+
## Development
76

87
```bash
9-
npm run dev
10-
# or
11-
pnpm dev
12-
# or
13-
yarn dev
8+
bun run --cwd apps/docs dev # dev server at http://localhost:3000
9+
bun run --cwd apps/docs build # production build
10+
bun run --cwd apps/docs start # serve production build
11+
bun run docs:typecheck # typecheck docs source
1412
```
1513

16-
Open http://localhost:3000 with your browser to see the result.
14+
All commands are also available from the repo root via `bun run docs:*`.
1715

18-
## Explore
16+
## What's here
1917

20-
In the project, you can see:
18+
| Path | Content |
19+
|---|---|
20+
| `content/docs/` | All documentation pages (MDX) |
21+
| `content/docs/reference/` | CLI, config, golden set references |
22+
| `content/docs/explanation/` | Architecture, how it works |
23+
| `content/docs/how-to/` | CI integration guides |
24+
| `content/docs/troubleshooting/` | Common issues and fixes |
25+
| `lib/` | Fumadocs content source config |
26+
| `app/` | Next.js pages and layouts |
2127

22-
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23-
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
24-
25-
| Route | Description |
26-
| ------------------------- | ------------------------------------------------------ |
27-
| `app/(home)` | The route group for your landing page and other pages. |
28-
| `app/docs` | The documentation layout and pages. |
29-
| `app/api/search/route.ts` | The Route Handler for search. |
30-
31-
### Fumadocs MDX
32-
33-
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
34-
35-
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
36-
37-
## Learn More
38-
39-
To learn more about Next.js and Fumadocs, take a look at the following
40-
resources:
41-
42-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43-
features and API.
44-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
45-
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
28+
Stat: 99 pages, 0 build errors.

packages/cli/README.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
1-
# cli
1+
# `regtrace` CLI
22

3-
To install dependencies:
3+
The regtrace CLI binary — evaluates LLM outputs against golden-set expectations across Factuality, Format, Tone, and Regression.
4+
5+
## Development
46

57
```bash
6-
bun install
8+
bun install # install workspace deps
9+
bun run --cwd packages/cli test # run 159 tests
10+
bun test -t "test name" # single test by name
711
```
812

9-
To run:
13+
## Build
1014

1115
```bash
12-
bun run index.ts
16+
bun run build # compile + minify → ./regtrace
17+
bun run build --outfile ./myname # custom output path
18+
```
19+
20+
Uses `bun build --compile --minify src/index.ts`. Version injected via `--define __VERSION__`.
21+
22+
## Layout
23+
1324
```
25+
src/
26+
├── cli/ Commander commands (run, init, list, history, watch, baseline)
27+
├── judge/ LLM providers (anthropic, openai, gemini, groq, ollama)
28+
├── metrics/ Evaluators (factuality, format, tone, regression)
29+
├── reports/ Terminal, JSON, markdown reporters + quality gates
30+
├── schema/ Zod v5 schemas (config, golden-set, run-record)
31+
├── storage/ Config/GS loading, JSON/SQLite persistence
32+
├── utils/ Concurrency, env, hashing, logging
33+
└── index.ts Entrypoint
34+
tests/
35+
├── unit/ Unit tests mirrored to src/ structure
36+
├── integration/ cli.test.ts, baseline.test.ts
37+
└── fixtures/ Configs, golden sets, run records
38+
```
39+
40+
## Conventions
41+
42+
- No comments in source. Self-documenting code only.
43+
- Zod v5 for schemas. No `z.infer` — write explicit types.
44+
- `noUncheckedIndexedAccess: true` — always guard array access.
45+
- Biome lint/format: tabs, double quotes.
46+
- CLI output via `src/cli/print.ts` — never raw `console.log`.
47+
48+
## Integration tests
1449

15-
This project was created using `bun init` in bun v1.3.14. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
50+
Spawn `Bun.spawn` child processes with minimal env. Temp dirs under `.test-tmp/`. Two tests have pre-existing stream-race flakiness; CI uses `--retry 2`.

0 commit comments

Comments
 (0)