This document outlines the protocols, coding conventions, testing rules, and commit message standards for AI agents cooperating on the Amber Framework.
All agent sessions must maintain a concurrency-safe, LLM-efficient project memory using the ajourn tool.
- Startup: Run
ajourn startupas the very first step of any session. - Persistence: Log "Knowledge Deltas" using
ajourn log -m "..." -t "...". - Standard Tags/Vocabulary:
DEC(Decision): Architectural, design, or procedural decisions.RAT(Rationale): Explanations for specific code patterns, fixes, or designs.GOT(Gotchas): Non-obvious quirks of the codebase, compilers, or platform.PRB(Problems): Blockers, failing specs, or compilation errors.USR(User Requests): Directly mapped requirements or constraints from the user.
- FHS & Safety: Avoid direct modifications to system files unless necessary. Keep dependencies scoped within
shard.yml. - Fail Fast: Check preconditions early in functions; return or raise early on invalid states.
- Strict Typing: Rigorously leverage the Crystal type system. Avoid generic
Any/Objectwhere possible. - Formatting: Format all codebase changes using
crystal tool formatbefore committing. - No Nil Assertions: Do not use
.not_nil!unless absolutely necessary. Handlenilconditions safely using conditional blocks (if,unless) or rescue/fallback blocks.
- Location: All tests must reside in the
./specfolder. - Structure:
- Treat
describeas a noun or situation (e.g.,describe HTTP::Request). - Treat
itas a statement about state or how an operation changes state (e.g.,it "returns the parsed URL").
- Treat
- Test Isolation: Ensure specs run fast, run locally, and do not introduce cross-test state leakage.
- Mocking & Services: Ensure external dependencies (like Redis) are properly configured or stubbed.
Commits must match the template specified in .gitmessage and include explicit AI attribution headers:
- Format:
Commit Title Here Eg. Redirect user to the requested page after login Issue: Add relevant links to issue/story/card and any other important references # Why is this change necessary? * [Explanation] # How does it address the issue * [Explanation] # What side effects does this change have? * [Explanation] Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>