Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ Manifest.toml
.reports/

# ct-conventions, cloned at the tag pinned in AGENTS.md
.conventions/
.ct-conventions/

# ct-agents, cloned at the tag pinned in AGENTS.md
.ct-agents/
44 changes: 29 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ src/helpers/ # Internal helpers (routing, completion, registry, printing)
src/solve/ # `solve` dispatch: mode detection, descriptive/explicit paths
test/suite/ # Test suite: organised by functionality, not by src/ layout
docs/ # Documentation site (DocumenterVitepress)
.conventions/ # ct-conventions, cloned at the pinned tag (git-ignored)
.ct-conventions/ # ct-conventions, cloned at the pinned tag (git-ignored)
.ct-agents/ # ct-agents, cloned at the pinned tag (git-ignored)
```

There is no `ext/`: optional backends (ADNLPModels, ExaModels, AD) are armed by
Expand All @@ -29,26 +30,26 @@ dependency presence, wired in `src/imports/*.jl`, not weak-dependency extensions

The coding conventions live in
[ct-conventions](https://github.com/control-toolbox/ct-conventions), pinned below to a
SemVer release tag (`vX.Y.Z`). Read them from a local clone in `.conventions/`
(git-ignored, not a submodule). If it is missing, or `git -C .conventions describe --tags`
SemVer release tag (`vX.Y.Z`). Read them from a local clone in `.ct-conventions/`
(git-ignored, not a submodule). If it is missing, or `git -C .ct-conventions describe --tags`
is not the pinned tag, (re)create it:

```bash
rm -rf .conventions
git -c advice.detachedHead=false clone --quiet --depth 1 --branch v0.7.0 https://github.com/control-toolbox/ct-conventions.git .conventions
rm -rf .ct-conventions
git -c advice.detachedHead=false clone --quiet --depth 1 --branch v0.7.1 https://github.com/control-toolbox/ct-conventions.git .ct-conventions
```

**Pinned version: ct-conventions v0.7.0.** Cite rules by identifier (`MOD3`, `TST1`), and
**Pinned version: ct-conventions v0.7.1.** Cite rules by identifier (`MOD3`, `TST1`), and
state the version you applied in plans and reports.

Read in this order:

| File | Content |
| --- | --- |
| [`rules/general.md`](.conventions/rules/general.md) | Rules that hold everywhere — **always read** |
| [`README.md`](.conventions/README.md) | Index of the rule files, one per area (`MOD`, `TYP`, `DIM`, `EXC`, `PERF`, `DOC`, `TST`, `SITE`, `CHG`, `REL`) |
| [`method.md`](.conventions/method.md) | How to work: tests, coverage, docs build, output capture |
| [`plan-template.md`](.conventions/plan-template.md) | Template for a substantial piece of work |
| [`rules/general.md`](.ct-conventions/rules/general.md) | Rules that hold everywhere — **always read** |
| [`README.md`](.ct-conventions/README.md) | Index of the rule files, one per area (`MOD`, `TYP`, `DIM`, `EXC`, `PERF`, `DOC`, `TST`, `SITE`, `CHG`, `REL`) |
| [`method.md`](.ct-conventions/method.md) | How to work: tests, coverage, docs build, output capture |
| [`plan-template.md`](.ct-conventions/plan-template.md) | Template for a substantial piece of work |

How agents behave on these repositories is described in
[ct-agents](https://github.com/control-toolbox/ct-agents). The CI workflows and their
Expand All @@ -70,16 +71,29 @@ trigger labels are described in
- **Structured errors** — seven typed exceptions; pick by the choice rule (`EXC1`).
- **Type stability enforced** — hot paths `@inferred`-clean, verified with JET (`TYP8`, `PERF1`–`PERF5`).
- **1-D is a scalar** — a one-dimensional state/control/variable is a `Number` (`DIM1`).
- **Plan before code** — a local agent proposes a plan ([`plan-template.md`](.conventions/plan-template.md)) and waits for confirmation before working on code. The process for remote agents is still to be defined.
- **Plan before code** — a local agent proposes a plan ([`plan-template.md`](.ct-conventions/plan-template.md)) and waits for confirmation before working on code. The process for remote agents is still to be defined.
- **Docstrings last** — written once the implementation is stable (`DOC1`–`DOC8`).
- **The human merges** — an agent never merges a pull request, except a release PR in `autonomous` mode, and then only with `release.jl merge` (see below).

---

## Recurring tasks

How a recurring task is done lives in [ct-agents](https://github.com/control-toolbox/ct-agents),
pinned below to a SemVer release tag (`vX.Y.Z`). Read it from a local clone in `.ct-agents/`
(git-ignored, not a submodule). If it is missing, or `git -C .ct-agents describe --tags` is
not the pinned tag, (re)create it:

```bash
rm -rf .ct-agents
git -c advice.detachedHead=false clone --quiet --depth 1 --branch v0.2.0 https://github.com/control-toolbox/ct-agents.git .ct-agents
```

**Pinned version: ct-agents v0.2.0.** State it, with the ct-conventions version, in
plans and reports.

- **Release.** When asked, in any language, to prepare a release, follow
[`recipes/release.md`](https://github.com/control-toolbox/ct-agents/blob/main/recipes/release.md)
of ct-agents (rules `REL1`–`REL7`). Read it with
`gh api repos/control-toolbox/ct-agents/contents/recipes/release.md -H "Accept: application/vnd.github.raw"`.
Stable or beta is the human's choice: if the request does not say, ask; never infer it.
[`recipes/release.md`](.ct-agents/recipes/release.md) (rules `REL1`–`REL7`). Stable or
beta is the human's choice: if the request does not say, ask; never infer it. State in
the proposal the versions you apply: ct-agents, ct-conventions, and the commit of the
CTActions clone `release.jl` runs from.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
(`GEN2`) replaces the `markdownlint-disable MD024` comment of this changelog (`CHG2`).
- ct-conventions pinned at `v0.7.0` in `AGENTS.md`: the release rules `REL1`–`REL7` in the
index, and a *Recurring tasks* section pointing to the release recipe of ct-agents.
- ct-agents pinned at `v0.2.0` and ct-conventions at `v0.7.1` in `AGENTS.md`: the recipes (the
release) are read from a git-ignored clone in `.ct-agents/` at that tag, not from `main`
of ct-agents, and the proposal of a release states the versions applied. The clone of the
conventions is now `.ct-conventions/` (it was `.conventions/`), like `.ct-agents/`.

### 📚 Documentation

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ If you want to ask a question, feel free to start a discussion [here](https://gi

## Developer Resources

The [ct-conventions](https://github.com/control-toolbox/ct-conventions) repository (coding rules, method, plan template) is pinned to a SemVer release tag in `AGENTS.md` ("Pinned version"). Read it from a local clone in `.conventions/`, which git ignores; `AGENTS.md` gives the clone command.
The [ct-conventions](https://github.com/control-toolbox/ct-conventions) repository (coding rules, method, plan template) is pinned to a SemVer release tag in `AGENTS.md` ("Pinned version"). Read it from a local clone in `.ct-conventions/`, which git ignores; `AGENTS.md` gives the clone command.

It is not a git submodule: `Pkg.add` on Julia 1.10 fails on a package whose tree contains one (`cannot get submodules without a working tree`). To bump it, change the tag in `AGENTS.md` (the "Pinned version" line and the clone command), then re-clone.
3 changes: 2 additions & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ extend-exclude = [
"*.json",
"*.toml",
"*.svg",
".conventions/",
".ct-conventions/",
".ct-agents/",
]
Loading