imsd-messages/AGENTS.md
Jorijn van der Graaf 3d635a6f9d
project: the repository skeleton
The SMS app for imsd's net.catcrafts.IMS1.Messaging interface starts
here: the licence (GPL-3.0-only), FUNDING.yml, README and AGENTS, a
project.cpp with the three build products (imsd-messages-core: std and
Crafter.DB; imsd-messages-bus: GLib; the imsd-messages executable),
their module units as stubs, the version constant, the bundled Noto Sans
font with its OFL text, and the first test. This commit is the base every
later range is reviewed against.

Tested: crafter-build builds the three products and --version answers,
crafter-build test passes the one test, lint and format --check are clean
on every text rule and on the AST rules for the eleven files without a
global module fragment; the four files that include gio/gio.h are not
parsed by the lint driver's libclang (no C++ standard library on its
include path: 'type_traits' file not found), which is a Crafter.Build
matter.
2026-10-17 23:14:00 +02:00

2.4 KiB

AGENTS.md — working on imsd-messages

For coding agents and anyone changing imsd-messages: what the repository contains, how it is built and tested, and the conventions a change follows. The README is for users. Where this file and the code disagree, the code is right and this file has a bug — fix it in the same change.

1. What imsd-messages is

An SMS app for Linux phones (postmarketOS on the Fairphone 6 first; Plasma Mobile and Phosh) whose only transport is imsd's D-Bus interface net.catcrafts.IMS1.Messaging (system bus, object /net/catcrafts/IMS1). imsd receives texts over IMS and keeps each one under /var/lib/imsd/sms/ until the app deletes it; the app subscribes to imsd's signals, imports the stored messages into its own database and deletes imsd's copy. The interface is documented in imsd's AGENTS.md §8.4 and §7.9.

2. Repository layout

Path What it is
project.cpp The build description for Crafter.Build: three products (below) and the tests.
interfaces/ImsdMessages*.cppm imsd-messages-core: std + Crafter.DB, no GLib, no window — numbers, time, the model, word wrap, the store, the sync logic.
interfaces/ImsdMessages.Bus*.cppm imsd-messages-bus: GLib/GDBus — imsd's dictionaries, the client, notifications, the app's own bus name.
implementations/main.cpp The executable imsd-messages.
tests/<Name>/main.cpp One test per directory, declared in project.cpp.
assets/ The bundled font (Noto Sans, OFL 1.1).
packaging/ Desktop entry, metainfo, icon, the sysroot and flatpak scripts.

3. Building and testing

crafter-build                 # the executable
crafter-build test            # every test
crafter-build lint            # the house-style rules (Crafter.LintRules)
crafter-build format --check  # what CI gates on

A test is an ordinary int main(): exit 0 passes. Tests link the core (and the bus library where they need GLib) and never need a bus, a phone or a GPU.

4. Making changes

  • Commit messages: subject area: what changes, the body says why; no AI attribution trailers; every commit GPG-signed with the repository's configured identity.
  • format, lint and test green before a push; every push goes through the fp6 project's /prepush gates.
  • Every source file starts with the two SPDX lines and a blank line.