Skip to content

chore: set up agent and contributor experience#31

Draft
ElonPark wants to merge 6 commits into
mainfrom
chore/agent-experience-setup
Draft

chore: set up agent and contributor experience#31
ElonPark wants to merge 6 commits into
mainfrom
chore/agent-experience-setup

Conversation

@ElonPark

Copy link
Copy Markdown
Member

Background (Required)

  • Beyond CLAUDE.md, the PR template, and .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 so swiftformat . 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 test passes in debug (303) and release (295), 0 failures — run to confirm no behavioral change.
  • Issue template YAML syntax validated.
  • Docs/config only: CI's path filter (Package.swift, Sources/**, Tests/**) does not trigger on this PR.

Review Notes

  • The .swiftformat here 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.
  • Follow-up suggestion (separate PR): .coderabbit.yml still says "100 characters per line" while the codebase and .swiftformat use 120.
  • The Tests/KarrotCodableMacrosTests/Extenstions typo fix is split into its own PR to keep this one docs/config-only.

Checklist

  • swift test -c debug and swift test -c release pass (test counts reported above)
  • Changes are covered by tests (N/A — docs/config only)
  • swiftformat . produces no diff
  • Docs updated if the public API changed (N/A)

https://claude.ai/code/session_017SJfRUv3HzmLXAAUCKNVah

ElonPark added 6 commits July 24, 2026 15:01
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
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f652822f-4b9e-4c6e-b701-3c079b128a51

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/agent-experience-setup

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.

❤️ Share

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

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