Skip to content

Commit 00accfb

Browse files
committed
Docs: add llms.txt support and agent guidance
1 parent 73bf826 commit 00accfb

5 files changed

Lines changed: 91 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `dp3/`: core Python package (processing engine, API, CLI utilities).
5+
- `modules/`: example app-specific modules/plugins.
6+
- `config/`: example/default configuration.
7+
- `install/` and `docker/`: deployment and container setup.
8+
- `tests/`: unit/integration tests (`tests/test_common`, `tests/test_api`, `tests/test_config`).
9+
- `docs/` and `mkdocs.yml`: documentation sources.
10+
11+
## Build, Test, and Development Commands
12+
- `python -m venv venv && source venv/bin/activate`: local virtualenv.
13+
- `pip install --editable ".[dev]"`: install for platform development.
14+
- `pre-commit install`: enable formatting/linting hooks.
15+
- `docker compose up -d --build`: start MongoDB, RabbitMQ, Redis for local runs/tests.
16+
- `APP_NAME=my_app CONF_DIR=config dp3 api`: run API process.
17+
- `dp3 worker my_app config 0`: run a worker process.
18+
- `dp3 check <config_dir>`: validate configuration with detailed errors.
19+
20+
## Documentation
21+
- When adding or changing user-visible features, configuration, CLI behavior, deployment flow, or extension points, update the relevant docs in `docs/` and `mkdocs.yml` as part of the same change.
22+
- Prefer keeping how-to guides, concept pages, and configuration reference pages aligned with code changes.
23+
24+
## Coding Style & Naming Conventions
25+
- Formatting: Black with 100-char line length.
26+
- Linting: Ruff (with auto-fix in pre-commit).
27+
- Keep module/function names descriptive; prefer `snake_case` for Python identifiers.
28+
- Follow existing package layout under `dp3/` and test naming under `tests/`.
29+
30+
## Testing Guidelines
31+
- Framework: `unittest`.
32+
- Common tests:
33+
`python -m unittest discover -s tests/test_common -v`
34+
- API tests (with config):
35+
`CONF_DIR=tests/test_config python -m unittest discover -s tests/test_api -v`
36+
- Add tests next to related area (`tests/test_common`, `tests/test_api`, or `tests/modules`).
37+
38+
## Commit & Pull Request Guidelines
39+
- Commit messages use concise scope + summary, often `Scope: message`, e.g.
40+
`Docs: update callback registrar docstring` or `DB: fix unpacking of fulltext filters`.
41+
- Use `Breaking` or similar marker when removing/deprecating behavior, e.g.
42+
`API - Breaking: Removed deprecated parameter.`
43+
- PRs should include: summary, rationale, test evidence, linked issues/PRs when relevant, and a note on documentation updates when user-visible behavior changed.
44+
45+
## Configuration & Services
46+
- Local runtime depends on MongoDB, RabbitMQ, and Redis (provided via `docker-compose.yml`).
47+
- Use `CONF_DIR` to point to config sets (e.g. `tests/test_config` for test runs).

docs/howto/extending.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To see the changes made to the documentation page locally, a local instance of `
2222
You can install all the required packages using:
2323

2424
```shell
25-
pip install -r requirements.doc.txt
25+
pip install -r requirements.dev.txt
2626
```
2727

2828
After installing, you can use the following `mkdocs` commands:

dp3/template/app/AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Guidelines
2+
3+
This is an app built on the DP3 platform; for guides, concepts, best practices
4+
- docs index for quick reference: https://cesnet.github.io/dp3/llms.txt
5+
- human-readable docs at: https://cesnet.github.io/dp3/
6+
7+
## Common commands
8+
9+
- Start local services: `docker compose up -d --build`
10+
- Run the API: `APP_NAME={{DP3_APP}} CONF_DIR=config dp3 api`
11+
- Run a worker: `dp3 worker {{DP3_APP}} config 0`
12+
- Validate configuration: `dp3 check config`
13+
14+
## Project notes
15+
16+
- Application configuration lives in `config/`.
17+
- Custom modules can be added under `modules/`.
18+
- When changing configuration, validate it with `dp3 check config`.

mkdocs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,29 @@ plugins:
137137
merge_init_into_class: true
138138
show_signature_annotations: true
139139
separate_signature: true
140+
# Generate llms.txt and llms-full.txt for LLM-friendly documentation access
141+
- llmstxt:
142+
markdown_description: >-
143+
DP3 is a configurable data processing platform for building applications
144+
around entities, attributes, modules, hooks, and processing pipelines.
145+
The documentation covers getting started, extending deployments and
146+
modules, architecture concepts, and configuration reference material.
147+
sections:
148+
Overview:
149+
- index.md: Introduction to DP3
150+
How-to guides:
151+
- howto/*.md
152+
Concepts:
153+
- architecture.md
154+
- data_model.md
155+
- history_management.md
156+
- modules.md
157+
- hooks.md
158+
Reference:
159+
- api.md
160+
- configuration/*.md
161+
- scripts.md
162+
- grafana_plugin.md
140163

141164
watch:
142165
- dp3

requirements.dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
mkdocs>=1.0.3
1+
mkdocs>=1.6
22
mkdocs-gen-files>=0.4
33
mkdocs-literate-nav>=0.6
4+
mkdocs-llmstxt
45
mkdocs-macros-plugin==1.5.0
56
mkdocs-material==9.0.12
67
mkdocs-section-index>=0.3

0 commit comments

Comments
 (0)