Skip to content

Commit 7a1280b

Browse files
committed
Add MkDocs docs site and GitHub Pages deployment
1 parent 4d3e379 commit 7a1280b

17 files changed

Lines changed: 974 additions & 1 deletion

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- uses: astral-sh/setup-uv@v5
23+
24+
- name: Install docs dependencies
25+
run: uv sync --extra docs
26+
27+
- name: Build docs
28+
run: |
29+
uv run --no-sync mkdocs build --clean
30+
touch site/.nojekyll
31+
32+
- name: Deploy to gh-pages
33+
uses: peaceiris/actions-gh-pages@v4
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./site
37+
publish_branch: gh-pages
38+
force_orphan: true
39+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ build/
2525
dist/
2626
*.egg-info/
2727
.codexopt/
28+
site/

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CodexOpt
22

3+
[![Docs](https://img.shields.io/badge/docs-mkdocs-blue)](https://superagenticai.github.io/CodexOpt/)
4+
35
CodexOpt: Optimize your Agents.MD and Skills for Codex with GEPA
46

57
## Demo Repo
@@ -9,6 +11,15 @@ Want to see CodexOpt on a small, intentionally messy repository with sample
911

1012
- Demo: https://github.com/SuperagenticAI/codexopt-demo
1113

14+
## Documentation
15+
16+
- Docs site: https://superagenticai.github.io/CodexOpt/
17+
- Docs source: [`docs/`](/Users/shashi/oss/CodexOpt/docs)
18+
19+
View the published documentation:
20+
21+
- https://superagenticai.github.io/CodexOpt/
22+
1223
CodexOpt is a lightweight Python CLI to improve Codex instruction assets with a repeatable loop:
1324

1425
1. Scan instruction files.

assets/codexopt_favicon.png

3.35 KB
Loading

assets/codexopt_logo.png

1.42 MB
Loading

docs/assets/codexopt_favicon.png

3.35 KB
Loading

docs/assets/codexopt_logo.png

1.42 MB
Loading

docs/benchmarking.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Benchmarking
2+
3+
CodexOpt computes a `0.0` to `1.0` score per file and records detailed feedback.
4+
5+
## What Gets Scored
6+
7+
### `AGENTS.md`
8+
9+
Signals include:
10+
11+
- too short or too long
12+
- token heaviness
13+
- empty files
14+
- contradictory guidance
15+
- duplicate lines
16+
- missing workflow guidance
17+
- missing verification guidance
18+
- missing output-format guidance
19+
- weak repo or task alignment
20+
21+
### `SKILL.md`
22+
23+
Signals include:
24+
25+
- missing frontmatter
26+
- missing `name` or `description`
27+
- overly long frontmatter fields
28+
- weak trigger clarity
29+
- weak workflow guidance
30+
- weak verification guidance
31+
- weak repo or task alignment
32+
33+
## Evidence-aware Feedback
34+
35+
If `task_files` or `issue_files` are configured, benchmark output includes:
36+
37+
- task file count
38+
- issue file count
39+
- criterion-level sub-scores
40+
- natural-language feedback
41+
42+
## Example
43+
44+
```bash
45+
codexopt --config codexopt.yaml benchmark
46+
```
47+
48+
Typical output:
49+
50+
```text
51+
overall_score: 0.6150
52+
task_files: 1
53+
issue_files: 1
54+
- agents: /path/to/AGENTS.md
55+
score=0.4700 issues=contradictions, duplicate_lines, missing_output_contract
56+
```
57+

docs/configuration.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Configuration
2+
3+
CodexOpt reads `codexopt.yaml` by default.
4+
5+
## Example Config
6+
7+
```yaml
8+
version: 1
9+
targets:
10+
agents_files:
11+
- AGENTS.md
12+
- "**/AGENTS.md"
13+
- "**/AGENTS.override.md"
14+
skills_globs:
15+
- ".codex/skills/**/SKILL.md"
16+
- "**/.codex/skills/**/SKILL.md"
17+
exclude_globs:
18+
- ".git/**"
19+
- ".codexopt/**"
20+
- ".venv/**"
21+
- "node_modules/**"
22+
- "reference/**"
23+
output:
24+
root_dir: ".codexopt"
25+
evidence:
26+
task_files: []
27+
issue_files: []
28+
optimization:
29+
engine: "heuristic"
30+
min_apply_delta: 0.01
31+
max_metric_calls: 60
32+
reflection_model: null
33+
```
34+
35+
## Sections
36+
37+
### `targets`
38+
39+
Controls where CodexOpt looks for instruction assets.
40+
41+
- `agents_files`: glob patterns for `AGENTS.md`
42+
- `skills_globs`: glob patterns for `SKILL.md`
43+
- `exclude_globs`: paths to ignore during discovery
44+
45+
### `output`
46+
47+
Controls artifact location.
48+
49+
- `root_dir`: where runs, state, and backups are written
50+
51+
### `evidence`
52+
53+
Optional files that improve benchmarking and optimization quality.
54+
55+
- `task_files`: markdown or JSON task lists
56+
- `issue_files`: markdown or JSON issue / review exports
57+
58+
These do not yet execute full task simulations. They influence scoring and feedback.
59+
60+
### `optimization`
61+
62+
- `engine`: `heuristic` or `gepa`
63+
- `min_apply_delta`: minimum score gain required to keep a candidate
64+
- `max_metric_calls`: GEPA search budget
65+
- `reflection_model`: required when using GEPA
66+
67+
## Using a Non-default Config
68+
69+
`--config` is a global option and must appear before the subcommand:
70+
71+
```bash
72+
codexopt --config codexopt.yaml benchmark
73+
codexopt --config codexopt.yaml optimize agents --file AGENTS.md
74+
```
75+

docs/demo.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Demo Repository
2+
3+
The companion demo repo is available here:
4+
5+
- <https://github.com/SuperagenticAI/codexopt-demo>
6+
7+
It contains:
8+
9+
- a noisy and contradictory `AGENTS.md`
10+
- several intentionally messy `SKILL.md` files
11+
- `tasks.md` for task evidence
12+
- `issues.md` for recurring feedback themes
13+
14+
## Why Use the Demo?
15+
16+
The demo shows CodexOpt on a small repo where instruction problems are easy to see:
17+
18+
- duplicate rules
19+
- contradiction
20+
- missing frontmatter
21+
- unnecessary verbosity
22+
23+
## Typical Demo Flow
24+
25+
```bash
26+
cd /path/to/codexopt-demo
27+
codexopt --config codexopt.gepa.example.yaml benchmark
28+
codexopt --config codexopt.gepa.example.yaml optimize agents --engine heuristic --file AGENTS.md
29+
codexopt --config codexopt.gepa.example.yaml optimize skills --engine heuristic --glob ".codex/skills/**/SKILL.md"
30+
codexopt --config codexopt.gepa.example.yaml report --output codexopt-report.md
31+
```
32+
33+
## Cross-reference
34+
35+
If you are reading the demo first, the main project lives here:
36+
37+
- <https://github.com/SuperagenticAI/CodexOpt>
38+

0 commit comments

Comments
 (0)