Add agent context docs (CLAUDE.md, AGENT-USAGE.md) and context-generation guide#478
Draft
kpgalligan wants to merge 3 commits into
Draft
Add agent context docs (CLAUDE.md, AGENT-USAGE.md) and context-generation guide#478kpgalligan wants to merge 3 commits into
kpgalligan wants to merge 3 commits into
Conversation
…generation guide - Root CLAUDE.md: module overview, build/test commands, KMP code guidance - Per-module CLAUDE.md for all 9 modules with API details and editing constraints - AGENT-USAGE.md: consumer guide for using Kermit from other projects - CONTEXT-GENERATION-TIPS.md: how these docs were generated, for reuse in other repos Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…o CLAUDE.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Runs a Claude-based check on each PR to flag code changes that make the CLAUDE.md / AGENT-USAGE.md context stale. External (non-Touchlab) PRs are gated behind the claude-external-pr environment so an org member must approve each run before API spend happens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Documentation aimed at AI coding agents (Claude Code and similar) working in or with this repo — and a guide for the team on producing the same docs in other repos. No source or build changes; 12 new markdown files.
Root
CLAUDE.mdOrientation for an agent landing in the repo: what Kermit is, a table of all 9 gradle modules with the dependency chain, build/test commands and their gotchas (ktlint gate, binary-compat
apiDumprequirement, publish-to-mavenLocal before building samples), and our KMP code guidance:Per-module
CLAUDE.md(9 files)Detailed editing context for each module: key files with real API signatures, source-set / expect-actual structure, and the non-obvious constraints an agent (or new team member) would otherwise trip over — e.g. kermit-io's IO-error recovery behavior that must be preserved, the
os_log.defcinterop constraints in kermit-core, kermit-simple's manualnonKotlinMainwiring, crashlytics/bugsnag being mirror modules that should be edited in pairs, and kermit-koin's deliberately excluded targets.Note: repo-wide policy lives only in the root file — agents read every CLAUDE.md on the path down, so module files carry module-specific facts, not repeated rules.
AGENT-USAGE.mdConsumer-facing guide for an agent adding Kermit to another project: which artifact to depend on for which need, core concepts, working code examples, per-module usage notes including platform restrictions, and the supported path for building a custom logging API on
kermit-core(https://touchlab.co/kermit-custom-logger).CONTEXT-GENERATION-TIPS.mdFor the team: the original prompt used to generate these docs, the refinements made during review, and practical guidance (explore before writing, verify every cited signature against source, what belongs at which level) so the process is repeatable in other repos.
.github/workflows/claude_md_check.yml+ README/CLAUDE.md follow-ups (added after initial draft)AGENT-USAGE.md; rootCLAUDE.mdinstructs Claude to update doc context on meaningful changes (not bug fixes / minor internals).claude-external-prenvironment (required reviewers) so an org member approves the run before any API spend. Setup needed after merge: add theANTHROPIC_API_KEYsecret and create theclaude-external-prenvironment with required reviewers (details in the workflow header comment).Review notes
TEMP_OVERVIEW.mdis now superseded by these docs and contains at least one outdated API example; proposing we delete it in a follow-up.🤖 Generated with Claude Code