Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Commit 41f78be

Browse files
committed
general: T8595: add AGENTS.md
1 parent c274fc2 commit 41f78be

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AGENTS.md

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AGENTS.md
2+
3+
## Project purpose
4+
OCaml validator, completion-helper, and operational-mode wrapper binaries that the VyOS CLI invokes at runtime. Validators are referenced from XML interface definitions (`<validator name='numeric' .../>`, `<validator name='url' .../>`, etc.); `vyos-op-run` is the privileged wrapper that looks up and executes operational mode commands on behalf of operator-level users.
5+
6+
## Tech stack
7+
- OCaml; `dune` 2.0 build system; `opam` package metadata in `vyos-utils.opam`.
8+
- Build deps: `ocamlfind`, `dune >= 2.0`, `pcre2`, `fileutils`, `containers`, `logs`, `fmt`, `yojson`, `mustache`.
9+
- Debian packaging in `debian/` (`debhelper >= 9`, `quilt`).
10+
11+
## Build / test / run
12+
- Local: `opam install . --deps-only` then `dune build -p vyos-utils`.
13+
- Debian: `dpkg-buildpackage -us -uc -b` produces the `vyos-utils` `.deb`.
14+
- No `dune runtest` suite in tree; validators are exercised in `vyos-1x` smoketests.
15+
16+
## Repository layout
17+
- `src/` — OCaml sources for `validate_value`, validators (`file_path`, `numeric`, `url`), completion helpers (`list_interfaces`), and `vyos_op_run` (operational mode command wrapper).
18+
- `dune-project`, `vyos-utils.opam` — build and package metadata.
19+
- `debian/` — packaging.
20+
- `.github/workflows/``check-pr-conflicts.yml`, `pr-mirror-repo-sync.yml`, `trigger-rebuild-repo-package.yml` delegate to `vyos/.github` reusables; `cla-check.yml` delegates to `vyos/vyos-cla-signatures`.
21+
22+
## Cross-repo context
23+
- Listed in `VyOS-Networks/vyos-build-packages/repos.toml` as one of the 14 canonical source packages baked into VyOS images by `vyos/vyos-build`.
24+
- Validator binaries are referenced from XML in `vyos/vyos-1x/interface-definitions/` — that is the runtime consumer.
25+
- Live consumer of the generation-1 mirror pipeline (`pr-mirror-repo-sync.yml@current`) — one of only four repos confirmed live (`vyos-1x`, `vyos-build`, `vyos-utils`, `vyos1x-config`).
26+
27+
## Conventions
28+
- Commit / PR title: `component: T12345: description` (Phorge ID mandatory).
29+
- Default branch `current`. License GPL-2.0 in tree; opam declares `MIT` (note the discrepancy if redistributing).
30+
- Reusable workflows pinned as `uses: vyos/.github/.github/workflows/<X>.yml@current`.
31+
32+
## Mirror relationship
33+
Canonical side. Mirror twin: `VyOS-Networks/vyos-utils` (force-pushed from this repo by the mirror pipeline). Only edit the `vyos/*` side; the VyOS-Networks subpage links back here.
34+
35+
## Notes for future contributors
36+
- Keep dune deps minimal; this binary is on the hot path of every CLI commit.
37+
- New validator? Wire it into `vyos-1x` XML and add a smoketest there.
38+
- LICENSE/opam license mismatch (GPL-2.0 vs MIT) is worth resolving on any non-trivial change.

0 commit comments

Comments
 (0)