Skip to content

docs: comprehensive documentation overhaul for AI agents and developers#86

Merged
fredcamaral merged 5 commits intodevelopfrom
ai-readable-improvement
Apr 1, 2026
Merged

docs: comprehensive documentation overhaul for AI agents and developers#86
fredcamaral merged 5 commits intodevelopfrom
ai-readable-improvement

Conversation

@gandalf-at-lerian
Copy link
Copy Markdown
Contributor

Summary

Comprehensive documentation overhaul covering all five key documentation files, bringing them to state-of-the-art quality for both AI coding agents and human developers.

Changes

CLAUDE.md (593 lines — rewritten)

  • Verified all file paths against current develop branch
  • Confirmed all Makefile targets exist and are documented accurately
  • Added Quick Start section at the top (inverted pyramid structure)
  • Removed redundancy between sections
  • Updated code patterns and examples to reflect develop branch state
  • Fixed Go version accuracy (go.mod 1.26.0, CI pins 1.26.1)
  • Fixed interface names: AuditLogRepository, M2MProvider, IdempotencyRepository

AGENTS.md (175 lines — new file, replaced symlink)

  • Universal entry point for ANY AI coding agent (Claude Code, Cursor, Copilot, Codex, Gemini, OpenCode, etc.)
  • Standalone and self-contained — agents can start contributing after reading just this file
  • Covers: Project Identity, Quick Start, Architecture, Commands, Conventions, Testing, Multi-Tenancy security, PR Standards, Key Files, Forbidden Patterns

llms.txt (62 lines — new file)

  • Follows the llmstxt.org specification
  • Structured index: Documentation, AI Agent Guides, Architecture, API, Configuration, Development, Optional
  • All 28+ referenced paths verified to exist

README.md (237 lines — improved)

  • More compelling for open-source developers and community
  • Added Prerequisites section
  • Improved Getting Started with complete clone-to-running flow
  • Added Contributing section with concrete instructions
  • Fixed infrastructure ports table (verified against docker-compose.yml)
  • Updated migration count to current state

docs/PROJECT_RULES.md (411 lines — improved)

  • Added missing patterns: syncer, cross-adapters, object storage, systemplane
  • Fixed stale file references
  • Added missing libraries (go-pdf/fpdf, go-playground/validator)
  • Added missing Make targets (test-e2e-discovery, test-e2e-dashboard, coverage-unit)
  • Added dedicated sections for Object Storage and Systemplane
  • Fixed interface names per CodeRabbit review
  • Condensed PDF library migration notes

Stats

  • 5 files changed, 843 insertions(+), 740 deletions(-)
  • Every file path and Makefile target verified against the codebase

- CLAUDE.md (593 lines): rewritten with verified file paths, accurate
  Makefile targets, Quick Start section, updated code patterns from
  develop branch
- AGENTS.md (175 lines): standalone universal AI agent entry point
  (replaced symlink), covers architecture, commands, conventions,
  security patterns, and forbidden practices
- llms.txt (62 lines): new file following llmstxt.org spec, structured
  index of all documentation and codebase resources
- README.md (237 lines): improved for open-source developers, added
  prerequisites, contributing guide, fixed infrastructure ports,
  updated migration count
- PROJECT_RULES.md (411 lines): added missing patterns (syncer,
  cross-adapters, object storage, systemplane), fixed stale references,
  added missing libraries and Make targets
- Fix AuditRepository → AuditLogRepository
- Fix M2M → M2MProvider
- Fix IdempotencyService → IdempotencyRepository
- Condense PDF library migration notes (CodeRabbit feedback)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Walkthrough

Added and reorganized project documentation: new AGENTS.md and llms.txt; major rewrites to CLAUDE.md and README.md; updates to docs/PROJECT_RULES.md. Changes expand quick-starts, architecture/bounded-context guidance, coding/testing conventions, multi-tenancy rules, infra/migrations, and CI/tooling. No code or exported APIs changed.

Changes

Cohort / File(s) Summary
Agent & Index Docs
AGENTS.md, llms.txt
Added AI-agent quick reference and project documentation index. Includes architecture overview, per-context conventions, commands, health-checks, and links to key docs. Review for accuracy of architecture/command snippets.
Primary Guides (major rewrites)
CLAUDE.md, README.md
Substantive rewrites: new Quick Start workflows, expanded architecture with bounded contexts, updated infra/migration counts, testing tiers/coverage, CI commands, and project metadata. Verify commands, migration numbers, OpenAPI paths, and referenced files.
Project Rules
docs/PROJECT_RULES.md
Refined service/layout conventions, added services/syncer pattern, extended shared-kernel ports list, updated dependency versions and runtime infra notes. Confirm dependency versions and new shared-port names/locations.
Misc docs/metadata
LICENSE.md (badge link updated in README), config/.config-map.example (referenced), cmd/..., docs/...
README and other docs now reference additional files and paths (config examples, cmd layout, generated OpenAPI). Ensure referenced artifacts exist and paths are correct.

(Note: cohorts group related documentation edits; many README/CLAUDE references point to other repo files—validate those targets.)

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—a comprehensive documentation overhaul across five key files for AI agents and developers.
Description check ✅ Passed The description is comprehensive, well-structured, and covers the key changes across all five documentation files with specific details and statistics.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@lerian-studio
Copy link
Copy Markdown
Contributor

Consider updating CHANGELOG.md to document this change. If this change doesn't need a changelog entry, add the skip-changelog label.

@lerian-studio
Copy link
Copy Markdown
Contributor

This PR is very large (5 files, 1583 lines changed). Consider breaking it into smaller PRs for easier review.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Line 591: Update the stale metadata string "Last Updated: March 2026" to
reflect the PR date by replacing it with the current date (e.g., "Last Updated:
April 1, 2026" or "Last Updated: April 2026") so the document header is
accurate; locate the exact text "Last Updated: March 2026" in CLAUDE.md and edit
that line accordingly.

In `@README.md`:
- Line 175: Change the phrase "Full stack journey tests" to use a hyphenated
compound adjective: replace "Full stack journey tests against running services"
with "Full-stack journey tests against running services" so the README uses
correct compound-modifier punctuation for the phrase found as "Full stack
journey tests" in the README content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: af3ff91e-014a-4d56-8f10-5d45cc39c9f1

📥 Commits

Reviewing files that changed from the base of the PR and between e5342b0 and fa3bf4e.

📒 Files selected for processing (6)
  • AGENTS.md
  • AGENTS.md
  • CLAUDE.md
  • README.md
  • docs/PROJECT_RULES.md
  • llms.txt

- CLAUDE.md: update Last Updated from March 2026 to April 2026
- README.md: hyphenate 'Full-stack' compound adjective
@lerian-studio
Copy link
Copy Markdown
Contributor

Consider updating CHANGELOG.md to document this change. If this change doesn't need a changelog entry, add the skip-changelog label.

@lerian-studio
Copy link
Copy Markdown
Contributor

This PR is very large (5 files, 1583 lines changed). Consider breaking it into smaller PRs for easier review.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Line 22: The CLAUDE.md toolchain claim is out of sync with go.mod; either
remove the "toolchain: 1.26.1" reference from CLAUDE.md or add a matching
toolchain directive to go.mod. To fix, open CLAUDE.md and delete or update the
"toolchain: 1.26.1" text, or open go.mod and add a toolchain directive matching
the doc (e.g., a "toolchain" line for 1.26.1) so the documented toolchain and
the go directive ("go 1.26.0") are consistent.

In `@README.md`:
- Line 99: Replace the vague sentence "Swagger UI is accessible in development
mode" with a precise URL path by stating the exact endpoint where Swagger is
served (for example: "Swagger UI is available at http://localhost:4018/swagger"
or whichever route your app exposes), and if applicable add a short note about
env-specific availability (e.g., "accessible at /swagger only when
NODE_ENV=development"); update the README line that currently reads "The API is
available at `http://localhost:4018`. Swagger UI is accessible in development
mode." to include the exact path.
- Line 105: The README references a non-existent file
config/.config-map.example; either correct the path or point to the actual
config example file. Open README.md, find the sentence containing
`config/.config-map.example` and replace it with the correct file location or
remove the reference and link to the existing config example (or add the missing
file under config/ with the expected name). Ensure the updated reference matches
the repository's actual filename and format so the README points to a valid
resource.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bb119f73-d39a-489a-a746-7a26f89cea7d

📥 Commits

Reviewing files that changed from the base of the PR and between fa3bf4e and b05ef8a.

📒 Files selected for processing (2)
  • CLAUDE.md
  • README.md

@lerian-studio
Copy link
Copy Markdown
Contributor

Consider updating CHANGELOG.md to document this change. If this change doesn't need a changelog entry, add the skip-changelog label.

@lerian-studio
Copy link
Copy Markdown
Contributor

This PR is very large (5 files, 1583 lines changed). Consider breaking it into smaller PRs for easier review.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Line 265: The docs incorrectly call protected(resource, actions...) a
"higher-order function"; update the wording to say it's a closure field on the
Routes struct (Routes.Protected) rather than a standalone function and note that
it is initialized at runtime by RegisterRoutes in internal/bootstrap/routes.go
(see the Protected func field declaration and its initialization in
RegisterRoutes). Adjust the sentence in CLAUDE.md to explicitly reference the
closure field name ("Protected" on Routes) and that contributors should look in
internal/bootstrap/routes.go for its initialization.
- Around line 439-441: Update the wording around the package references to avoid
confusion: clarify that "commons/assert" and "commons/runtime" are provided by
the external lib-commons library and that `pkg/assert` and `pkg/runtime` are
shorthand references used in the docs (not local pkg/ imports); likewise clarify
`commons/systemplane` origin. Edit the lines mentioning "referred to as
`pkg/assert`" and "`pkg/runtime`" so they explicitly state they are
documentation shorthand mapping to the lib-commons import paths (e.g.,
lib-commons/commons/assert, lib-commons/commons/runtime) rather than implying
files under a local pkg/ directory.

In `@README.md`:
- Line 184: The README contains conflicting statements about Swagger UI
location: replace or reconcile the sentence "Swagger UI is accessible at the
service root" with a clear statement that Swagger UI is served at
/swagger/index.html (e.g., "When running in development mode, Swagger UI is
accessible at http://localhost:4018/swagger/index.html") and, if desired, add a
short note about the root path behavior (e.g., whether the root redirects to
/swagger/index.html or not) so both the explicit URL and the root behavior are
unambiguous.
- Line 72: The README currently says "Go 1.26+" while CLAUDE.md's go.mod uses
"go 1.26.0" and the Docker table uses "golang:1.26.1-alpine", causing
inconsistent precision; pick a single canonical Go version (recommend 1.26.1 to
match Docker) and update all references so they match exactly: change the README
entry "Go 1.26+" to "Go 1.26.1", update CLAUDE.md's go.mod `go 1.26.0` to `go
1.26.1` (or vice-choose the agreed patch level), and ensure the Docker table
string `golang:1.26.1-alpine` remains consistent with the chosen version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0182fe33-ed2b-47d4-823e-8bac6b25a7aa

📥 Commits

Reviewing files that changed from the base of the PR and between b05ef8a and 12ed48c.

📒 Files selected for processing (2)
  • CLAUDE.md
  • README.md

@gandalf-at-lerian
Copy link
Copy Markdown
Contributor Author

@coderabbitai resolve

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
CLAUDE.md (1)

265-265: ⚠️ Potential issue | 🟡 Minor

Clarify protected(...) usage on Line 265: it is a Routes.Protected closure field, not a standalone function.

Current wording can send readers to the wrong place during implementation/debugging.

Suggested wording
-- Route registration uses `protected(resource, actions...)` higher-order function
+- Route registration uses `routes.Protected(resource, actions...)` (closure field on `Routes`, initialized by `RegisterRoutes` in `internal/bootstrap/routes.go`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 265, The sentence "Route registration uses
`protected(resource, actions...)` higher-order function" is misleading; update
it to state that `protected` is the `Routes.Protected` closure field on the
`Routes` type rather than a standalone higher-order function, so readers look up
`Routes.Protected` (the closure field) when implementing or debugging route
registration.
README.md (1)

105-105: ⚠️ Potential issue | 🟡 Minor

Possible broken config example reference on Line 105.

config/.config-map.example was previously flagged as missing; if it still doesn’t exist, onboarding instructions are broken. Please verify and either update the path or point to the existing config example file.

#!/bin/bash
# Verify whether the referenced config example file exists (current branch).
fd -t f --hidden --strip-cwd-prefix 'config-map.example'
fd -t f --hidden --strip-cwd-prefix '\.config-map\.example'

Expected: one of these commands should return the file referenced in docs; otherwise docs should be corrected.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 105, The README references config/.config-map.example
which may not exist; verify its presence in the repo (e.g., using the provided
fd commands) and either update the README line "config/.config-map.example" to
the correct existing path (for example config/config-map.example or
.config-map.example) or add/restore the missing example file under config with
the expected name; ensure the README text ("For production, override via
environment variables... See [`config/.config-map.example`]") matches the actual
file name you confirm.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@CLAUDE.md`:
- Line 265: The sentence "Route registration uses `protected(resource,
actions...)` higher-order function" is misleading; update it to state that
`protected` is the `Routes.Protected` closure field on the `Routes` type rather
than a standalone higher-order function, so readers look up `Routes.Protected`
(the closure field) when implementing or debugging route registration.

In `@README.md`:
- Line 105: The README references config/.config-map.example which may not
exist; verify its presence in the repo (e.g., using the provided fd commands)
and either update the README line "config/.config-map.example" to the correct
existing path (for example config/config-map.example or .config-map.example) or
add/restore the missing example file under config with the expected name; ensure
the README text ("For production, override via environment variables... See
[`config/.config-map.example`]") matches the actual file name you confirm.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8ca5575d-5bf4-4089-9fbd-30bc0bb2bbbf

📥 Commits

Reviewing files that changed from the base of the PR and between 12ed48c and ce8e023.

📒 Files selected for processing (2)
  • CLAUDE.md
  • README.md

@gandalf-at-lerian
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

✅ Actions performed

Comments resolved and changes approved.

@fredcamaral fredcamaral merged commit f91ea62 into develop Apr 1, 2026
1 check passed
@fredcamaral fredcamaral deleted the ai-readable-improvement branch April 1, 2026 17:41
@lerian-studio-midaz-push-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.3.0-beta.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants