This repo is part of Gatepost, unofficial open-source developer tools for Nigeria's National Digital Postcode. This repo holds the PHP SDK, gatepost/postcode. Today it has the core and the client.
CODING_STANDARDS.mdand the two files it names hold the rules. Cite rule IDs, such asAPI-3, in reviews and commit bodies.CONTEXT.mdis the glossary. Name things with its terms in code, tests, docs and commits.docs/adr/holds the decisions. When a change contradicts an ADR, say so in the pull request.spec/holds the grammar, with its Interface section, and the vectors. The spec wins over code and over these docs.
- If the task needs a public symbol that no Interface section of the spec lists, in
spec/grammar.md,spec/client.mdorspec/field.md, add nothing, not even an internal helper. Stop, and say that a spec change must come first (API-1, CS-8). - Call only the documented NIPOST gateway endpoints.
- Commit only NIPOST's published test codes and synthetic values, such as
FC-01-Z99-ZZ-01. - Sign off each commit with
git commit -s. The person who opens the pull request is the only author. Leave out co-author lines for AI tools. - Change
mainonly through pull requests. Keep the history ofmainand of other people's branches as it is: never force-push to them. - A commit with no sign-off fails the
sign-offjob in CI. If a commit lacks its sign-off, rungit rebase --signoffwith the base branch. Then push to your own branch with--force-with-lease. - Send every call to the gateway through the client. The client limits how many calls run at once.
- Write prose in plain British English, with short sentences in the active voice.
- Some agent tools change a typed backslash-u escape, such as the one for an en dash, into the character itself. Build such characters with code, for example
chr(0x2013)in Python orString.fromCodePoint(0x2013)in TypeScript. In data and prose, writeU+2013.
- A failing test came first, and it passes now.
composer checkpasses. It runs the formatter, linters, tests, vectors, size limits andcheck-tells.- Each user-visible change has a change file.
- A change to the public interface also updates the API dump and the docs.
composer api:dumpwrites the dump todocs/api-dump.md. - Each new domain term is in
CONTEXT.md. - The diff touches only the lines that the task needs.