Skip to content

docs: add EGM README contracts for every code directory - #128

Merged
ThomasK33 merged 4 commits into
mainfrom
docs/egm-readme-contracts
Oct 29, 2026
Merged

ThomasK33 merged 4 commits into
mainfrom
docs/egm-readme-contracts

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Adds a README contract to every code directory, and a repository blueprint to the root README, so contributors and coding agents can find each package's interface, rules, and side effects without reading all the source. This is a docs-only change: no .go, go.mod, or config file changes.

What changes

  • 16 new READMEs in adapters/, state/, internal/, examples/, and scripts/. Each package README has Overview, Interface, Invariants, Side Effects, and Verification sections, and cites its source as [file:symbol]. Directories without Go files get a short index of their children.
  • 5 example READMEs extended. The existing run guides stay as written. New sections follow them.
  • Root README: a blueprint block before ## Status. It covers the 8 dispatch steps, the root package's exported symbols and rules, links to each child README, cross-package rules and side effects, and the test commands.
  • One edit to existing text: the Linear example linked to #step-5-expose-the-bot-to-slack, which does not exist. It now links to #use-http-instead-of-socket-mode in the Slack tutorial.

The diff adds 2,021 lines and removes 1 across 22 files. Each README stands alone, so you can review them one at a time.

How the content was checked

  1. Workers wrote one top-level directory each, from read-only scans of the source. I then read every file and checked every link and anchor with a script.
  2. A drift review ran 7 read-only checkers in fresh contexts. They compared every claim with the source and listed public symbols or rules that a README left out. I re-checked each finding against the code: 33 were valid and 3 were rejected.
  3. This PR fixes 32 of the 33: 10 wrong statements, 2 wrong references, and 20 gaps. The remaining one is in text that predates this PR and is tracked in docs: fix stale text in the example READMEs and one doc comment #127.

Follow-ups (not in this PR)

The review also found these. This PR documents the current behavior and does not change any code:

Validation

  • go vet ./... passes in all 7 modules.
  • GOFLAGS=-race go test -count=1 ./... passes in all 7 modules. This includes documentation_test.go, which builds the README's <!-- build --> snippet and checks its key phrases. The Postgres and Redis tests ran against Testcontainers.
  • In this workspace, mise run test and mise run vet fail before any test runs because of a local Go toolchain mismatch. So I ran each task's commands directly with Go 1.26.10. CI runs the pinned and minimum Go legs.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

Add a README.md contract to each code directory: adapters, state,
internal, examples, and scripts. Each one has Overview, Interface,
Invariants, Side Effects, and Verification sections that cite the source
as [file:symbol]. Directories without Go files get a short index of their
children.

Add a repository blueprint to the root README, before "Status": the
dispatch steps, the root package's exported symbols and rules, links to
each child contract, cross-package rules and side effects, and the test
commands. Existing README text is kept. The one change to it fixes a
broken tutorial anchor in the Linear example.

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T19:37:29.494961Z 9fe04e1 Manual request
🔒 Security Review ✅ Completed 2026-10-29T19:37:40.112737Z 9fe04e1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0ab9ff4324

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ab9ff4324

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
Comment thread examples/slack-nats-state/README.md Outdated
Comment thread adapters/slack/README.md Outdated
Comment thread adapters/slack/slackapi/README.md Outdated
Comment thread README.md Outdated
Comment thread adapters/slack/slackapi/README.md Outdated
- Root README: deferred dispatch starts the handler before the adapter
  acknowledges, so the two run at the same time; lease renewal happens
  only under deferred dispatch and burst batches.
- adapters/slack and internal/ratelimit: the deadline-bounded retry keeps
  the backoff sleep inside the ack window, but not the HTTP attempts.
- slackapi: limit the POST-to-BaseURL side effect to Call and the typed
  Web API methods, and document the small-limit SplitMarkdown exception.
- State examples: the deferred bot.Shutdown closes the state client
  through State.Shutdown.

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 16dcdfcd69

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16dcdfcd69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread adapters/slack/slackapi/README.md Outdated
Comment thread README.md Outdated
Comment thread adapters/slack/README.md Outdated
- slackapi: a throttling response ends in *RateLimited, not *APIError.
- Root README: ctx bounds the Shutdown waits, so adapters and State can
  shut down while deferred work or listeners still run.
- Adapters and root README: InstallStore.Lookup runs only for deliveries
  routed to an install and for calls that need a token, not for every
  webhook.

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: cb84b59532

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb84b59532

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread adapters/README.md Outdated
Retry returns *RateLimited only when the retry policy or the deadline
check stops it. A context cancelled during a backoff sleep returns the
context error, and a failed HTTP attempt returns its transport error.
Say so in the adapters index, the root README, and the slackapi and
Linear retry rules.

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 9fe04e1043

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9fe04e1043

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 merged commit e93bdb8 into main Oct 29, 2026
2 checks passed
@ThomasK33

Copy link
Copy Markdown
Member Author

Delivery record for this PR:


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant