chore: set up agent and contributor experience#31
Draft
ElonPark wants to merge 6 commits into
Draft
Conversation
Commit the house-style SwiftFormat configuration (rule whitelist, 2-space indent, 120-column limit) that PR #30 was formatted with, so formatting is reproducible for contributors and coding agents. Three rules are deliberately left out of the whitelist (isEmpty, wrapIfStatementBodies, elseOnSameLine) to keep `swiftformat .` idempotent on the existing tree: `swiftformat --lint .` reports 0/185 files requiring formatting at this commit. The .editorconfig mirrors the same basics (UTF-8, LF, 2-space indent, final newline) for non-Swift files and editors without SwiftFormat. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Move the tool-neutral content of CLAUDE.md into a new AGENTS.md and extend it with the conventions observed across merged PRs: commit and branch naming, merge strategy, test reporting expectations, label-driven release notes, code style, and testing conventions. CLAUDE.md and GEMINI.md become thin pointers that import AGENTS.md via the `@` syntax supported by Claude Code and Gemini CLI, with a fallback note for tools that do not expand imports. Codex and other agents read AGENTS.md natively, so all agents share one source of truth. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Document the human contributor workflow derived from the conventions observed in merged PRs: prerequisites, build and test expectations, TDD workflow, code style, branch/commit/PR conventions, the CodeRabbit review flow, and how labels drive release notes. Operational details are cross-referenced to AGENTS.md to avoid duplication. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Add form-based bug report and feature request templates. The templates auto-apply the Bug / Feature labels that release-drafter uses for release-note categories. The bug form asks for a minimal reproducible code sample and the JSON payload, which most decoding bug reports need. Extend the PR template with a checklist covering the observed review expectations: both test configurations passing with counts reported, test coverage, a clean swiftformat run, and docs updates for public API changes. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Auto-format Swift files with swiftformat after every Edit/Write, so agents and contributors using Claude Code get the house style applied without a separate step. The swiftlint hook is gated on a committed .swiftlint.yml: the repo intentionally ships no SwiftLint config, and running the default rules with --strict would block edits on pre-existing violations. It activates automatically if a config is added later. Both hooks no-op when the tool is not installed. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Add the swiftformat --lint verification command, note that the committed Claude Code hook auto-formats edited Swift files, and add a Documentation & Provenance section pointing at the feature docs to update on API changes, the SPI-hosted DocC setup, and the upstream projects the AnyCodable / BetterCodable / Resilient modules are ported from. Claude-Session: https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Background (Required)
.coderabbit.yml, the repo had no onboarding assets for AI coding agents (Codex, Gemini CLI) or human contributors. This PR sets up a single canonical instruction file plus contributor docs and tooling configs, derived from the conventions observed across the merged PR history.Changes
.swiftformat+.editorconfig: commit the house-style SwiftFormat configuration (rule whitelist, 2-space indent, 120-column limit) that PR style: apply swiftformat across the codebase #30 was formatted with. Three rules (isEmpty,wrapIfStatementBodies,elseOnSameLine) are deliberately left out of the whitelist soswiftformat .stays idempotent on the existing tree.AGENTS.md: canonical agent instructions — architecture (moved from CLAUDE.md), commands, code style, testing conventions, git/PR conventions, and gotchas.CLAUDE.md/GEMINI.md: thin pointers importing AGENTS.md via@AGENTS.md, so Claude Code, Gemini CLI, and Codex share one source of truth.CONTRIBUTING.md: human contributor guide — setup, TDD workflow, commit/branch/PR conventions, review flow, releases..github/ISSUE_TEMPLATE/: form-based bug report / feature request templates; the auto-applied Bug/Feature labels match the release-drafter categories..github/pull_request_template.md: add a Checklist section..claude/settings.json: PostToolUse hooks that auto-run swiftformat on edited Swift files. The swiftlint hook is gated on a committed.swiftlint.yml(none today), so it stays dormant until one is added.Testing Methods
swiftformat --lint .reports 0/185 files requiring formatting — the committed config is idempotent on the current tree.swift testpasses in debug (303) and release (295), 0 failures — run to confirm no behavioral change.Package.swift,Sources/**,Tests/**) does not trigger on this PR.Review Notes
.swiftformathere is the configuration PR style: apply swiftformat across the codebase #30 described but did not commit; see the file header for the deliberate deviations that keep the tree untouched..coderabbit.ymlstill says "100 characters per line" while the codebase and.swiftformatuse 120.Tests/KarrotCodableMacrosTests/Extenstionstypo fix is split into its own PR to keep this one docs/config-only.Checklist
swift test -c debugandswift test -c releasepass (test counts reported above)swiftformat .produces no diffhttps://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah