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
14 changes: 8 additions & 6 deletions .agents/skills/webcpp-build-and-lanes/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ description: "Build and test webcpp: targets (native, wasip2, wasip3, emscripten

# Building and testing webcpp

The rules are in `AGENTS.md`: chapter 1 ("Prerequisites", "The build commands"), chapter 9
(Targets, The Jamfile API, Tests, Lanes, The report, CI), chapter 10 (Process) and chapter 12 (b2
facts). The CI is `.github/workflows/library.yml`, which `ci.yml` and each library call.
How to work is in `AGENTS.md`: chapter 1 ("Prerequisites", "The build commands"), chapter 4
(Targets, The Jamfile API, Lanes, The report, CI) and chapter 6 (b2 facts). How a test is written
and what counts as green are in `CODING-GUIDELINES.md`: chapter 8 (Tests) and chapter 1
(Process). The CI is `.github/workflows/library.yml`, which `ci.yml` and each library call.

## Iterating on one library
```
Expand All @@ -17,19 +18,20 @@ b2 toolset=clang-wasip2 testing.launcher=wasmtime libs/<name>/test libs/<name>/e
b2 toolset=emscripten libs/<name>/test libs/<name>/example # no launcher
b2 declared-targets -d0 && b2 declared-lanes -d0 # what CI will run
```
One toolset per command. Test and example Jamfiles use only the `webcpp.*` rules of chapter 9.
One toolset per command. Test and example Jamfiles use only the `webcpp.*` rules of `AGENTS.md`
chapter 4.

## A lane, as CI runs it
`b2 -a --dump-tests --out-xml=<lane>.xml toolset=<toolset> libs/<name>/test libs/<name>/example`,
then `tools/report/report.py`; b2's exit status is not the verdict. `tools/ci/matrix.py` runs
plan, lane and own lane the CI's way. Parallel lanes use distinct `--build-dir`.

## Green, before asking for a merge (chapter 10)
## Green, before asking for a merge (`CODING-GUIDELINES.md` chapter 1)
1. Every declared lane and own lane from scratch (`b2 -a`), oracle included.
2. `b2 -a doc`.
3. `tools/lint/lint.sh ...` prints `lint: clean`.
4. Every `tools/**/*_test.py` whose subject changed.
5. CI green, the library's and the superproject's.

## When something is odd
Read chapter 12 before debugging b2: most surprises are recorded there.
Read `AGENTS.md` chapter 6 before debugging b2: most surprises are recorded there.
14 changes: 7 additions & 7 deletions .agents/skills/webcpp-docs-site-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: "Write a library's page and Doc Comments, build the site, or prepar

# Docs, site and releases

The rules are in `AGENTS.md`: chapter 7 (Doc Comments and the API reference), chapter 8
(Documentation), chapter 9 ("The site", "CI") and chapter 11 ("The changelog", "Releases"). The
site's own rules are `site/AGENTS.md`, and its specification is the organization's `site`
capability in webcpporg/proposals.
The rules of a Doc Comment are in `CODING-GUIDELINES.md`, chapter 7; the rest is in `AGENTS.md`:
chapter 2 (The API reference), chapter 3 (Documentation), chapter 4 ("The site", "CI") and
chapter 5 ("The changelog", "Releases"). The site's own rules are `site/AGENTS.md`, and its
specification is the organization's `site` capability in webcpporg/proposals.

## A library's page
1. Doc Comments for every public symbol, with the commands chapter 7 allows.
2. The page's sections as chapter 8 lists them; C++ only by include of an example or a tagged region.
1. Doc Comments for every public symbol, with the commands `CODING-GUIDELINES.md` chapter 7 allows.
2. The page's sections as `AGENTS.md` chapter 3 lists them; C++ only by include of an example or a tagged region.
3. Counts by the build's attributes (`{n-tests}` ...), never typed.
4. `b2 -a libs/<name>/doc` passes doc-check and MrDocs strict.

Expand All @@ -21,6 +21,6 @@ capability in webcpporg/proposals.
`b2 site-serve`. The superproject's CI builds and publishes the preview; nothing is published by hand.

## A release
Only when the owner asks, following chapter 11's numbered steps: `b2 check-release`,
Only when the owner asks, following `AGENTS.md` chapter 5's numbered steps: `b2 check-release`,
`b2 whats-new` (the owner approves the highlights), `b2 -a dist`; the tag and the GitHub Release
are the owner's.
13 changes: 7 additions & 6 deletions .agents/skills/webcpp-library-conventions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ description: "Create, review or specify a webcpp library: its names, layout, con

# A webcpp library's conventions

The rules are in `AGENTS.md`: chapter 2 ("The checklist of a new library", "Third-party code"),
chapter 3 (Names), chapter 6 (C++ rules, C libraries, exceptions and RTTI, what the lint
enforces), chapter 7 (Doc Comments). A library's own `AGENTS.md` adds only what is specific to it.
The rules are in `CODING-GUIDELINES.md`: chapter 10 ("The checklist of a new library",
"Third-party code"), chapter 3 (Names), chapters 4 to 6 (the language, C libraries, exceptions and
RTTI), chapter 7 (Doc Comments), chapter 9 (what the lint enforces), and chapter 15 for each
library's design. A library's own `AGENTS.md` adds only what is specific to it.

## New library
1. Choose the kind: own, port (skill `webcpp-port-methodology`) or wrapper.
2. Until the owner makes `webcpporg/<name>`, work in a local `git init` at `libs/<name>`.
3. Write the checklist files of chapter 2: `meta/libraries.json`, `build.jam` (target
3. Write the checklist files of chapter 10: `meta/libraries.json`, `build.jam` (target
`/webcpp/<name>//<name>`), README, `AGENTS.md`, licence files, `doc/changelog.adoc`, CI calling
the superproject's `library.yml`.
4. `<webcpp/<name>/config.hpp>` includes `<webcpp/config.hpp>` first and defines
Expand All @@ -23,6 +24,6 @@ enforces), chapter 7 (Doc Comments). A library's own `AGENTS.md` adds only what
- Names against the table of chapter 3: namespace `webcpp::<name>`, `detail`, macros
`WEBCPP_<NAME>_*`, include guards, error category `webcpp.<name>`, snake_case.
- Errors as values; headers that must compile without exceptions do; allocation as specified.
- What a target lacks is declared, not skipped (chapter 9, "Tests").
- What a target lacks is declared, not skipped (chapter 8).
- Every public symbol documented (skill `webcpp-docs-site-release`).
- The lint: `tools/lint/lint.sh` (chapter 6) prints `lint: clean`.
- The lint: `tools/lint/lint.sh` (chapter 9) prints `lint: clean`.
8 changes: 4 additions & 4 deletions .agents/skills/webcpp-port-methodology/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description: "Port a library from another language into webcpp, or specify such

# Porting a library

The rules are in `AGENTS.md`: chapter 2 ("Choosing"), chapter 4 (Fidelity), chapter 5 (Evidence:
oracle and twins) and chapter 10 ("Porting a library, step by step"). xstate is the model
(`libs/xstate/AGENTS.md`, `libs/xstate/test/oracle/`).
The rules are in `CODING-GUIDELINES.md`: chapter 10 ("Choosing"), chapter 11 (Fidelity), chapter
12 (Evidence: oracle and twins) and chapter 13 ("Porting a library, step by step"). xstate is the
model (`libs/xstate/AGENTS.md`, `libs/xstate/test/oracle/`, and its design in chapter 15).

## Steps
1. Pin the original at an exact release; record it in `meta/libraries.json` (`"port-of"`) and the
library's `AGENTS.md`. Check its licence against chapter 2; keep its notice in
library's `AGENTS.md`. Check its licence against chapter 10; keep its notice in
`LICENSE-<ORIGIN>.txt`.
2. Make `libs/<name>` (skill `webcpp-library-conventions`).
3. Port the original's tests as data-driven cases; write the oracle in `test/oracle/` (the pinned
Expand Down
12 changes: 7 additions & 5 deletions .agents/skills/webcpp-text-and-commits/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ description: "Before writing any file, commit message or proposal text for a web

# Text and commits in webcpp

The rules are in the superproject's `AGENTS.md`, chapter 11 "Commits and text"
(https://github.com/webcpporg/webcpp/blob/main/AGENTS.md). This is a checklist, not a copy.
The rules are in the superproject's `CODING-GUIDELINES.md`, chapter 2 "Commits and text"
(https://github.com/webcpporg/webcpp/blob/main/CODING-GUIDELINES.md), and a changelog's form in its
`AGENTS.md`, chapter 5. This is a checklist, not a copy.

## Before writing a file
1. English only, in files, comments and commit messages.
2. No em dash (U+2014): use a plain dash. No banned word (the regex `veru[s]`, any case).
3. No personal data: no home directory paths (write `/Users/you/` as the placeholder), no
private addresses. Name people only by the identity they publish under.
4. A source file opens with the licence notice of chapter 11, in its language's comment form.
4. A source file opens with the licence notice of chapter 2, in its language's comment form.

## Before committing
1. Commit under your own git identity, a name and address you control (a GitHub noreply address
is fine), as chapter 11 says; never under another person's identity.
is fine), as chapter 2 says; never under another person's identity.
2. No trailer of any kind: no `Co-authored-by`, no `Signed-off-by`, no agent name.
3. Stage explicit paths, never `git add -A`; a submodule's commit is recorded, never its files.
4. Subject: plain, says what the change does, prefixed by the part it touches (`xactor: ...`).
5. Check: `git log -1 --format=%B | git interpret-trailers --parse` prints nothing. A last paragraph
that starts with `word:` (`std::` does) is read as a trailer: start it otherwise.
6. A change a user can see adds its changelog line in the same commit (chapter 11, "The changelog").
6. A change a user can see adds its changelog line in the same commit (`AGENTS.md` chapter 5,
"The changelog").

## Outward actions
Pushing, merging, creating repositories, changing settings and touching credentials belong to the
Expand Down
Loading
Loading