Skip to content

Commit fa235cc

Browse files
buenaflorclaude
andauthored
chore: Add AGENTS.md, CLAUDE.md symlink, and Claude Code settings (#515)
Add agent-facing documentation covering build commands, quality gate, repository structure, KMP conventions, and commit attribution. Add Claude Code project settings with Gradle, git, and GitHub CLI permissions tailored for Kotlin Multiplatform development. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 07a2b59 commit fa235cc

3 files changed

Lines changed: 120 additions & 0 deletions

File tree

.claude/settings.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(ls:*)",
5+
"Bash(pwd:*)",
6+
"Bash(file:*)",
7+
"Bash(stat:*)",
8+
"Bash(wc:*)",
9+
"Bash(tree:*)",
10+
11+
"Bash(git pull:*)",
12+
"Bash(git add:*)",
13+
"Bash(git commit:*)",
14+
"Bash(git push:*)",
15+
"Bash(git status:*)",
16+
"Bash(git log:*)",
17+
"Bash(git diff:*)",
18+
"Bash(git show:*)",
19+
"Bash(git branch:*)",
20+
"Bash(git remote:*)",
21+
"Bash(git tag:*)",
22+
"Bash(git stash list:*)",
23+
"Bash(git rev-parse:*)",
24+
"Bash(git fetch:*)",
25+
"Bash(git ls-files:*)",
26+
"Bash(git blame:*)",
27+
28+
"Bash(gh pr view:*)",
29+
"Bash(gh pr list:*)",
30+
"Bash(gh pr checks:*)",
31+
"Bash(gh pr diff:*)",
32+
"Bash(gh issue view:*)",
33+
"Bash(gh issue list:*)",
34+
"Bash(gh run view:*)",
35+
"Bash(gh run list:*)",
36+
"Bash(gh run logs:*)",
37+
"Bash(gh repo view:*)",
38+
"Bash(gh api:*)",
39+
40+
"Bash(./gradlew tasks:*)",
41+
"Bash(./gradlew dependencies:*)",
42+
"Bash(./gradlew build:*)",
43+
"Bash(./gradlew clean:*)",
44+
"Bash(./gradlew test:*)",
45+
"Bash(./gradlew detekt:*)",
46+
"Bash(./gradlew spotlessKotlinCheck:*)",
47+
"Bash(./gradlew spotlessApply:*)",
48+
"Bash(./gradlew apiCheck:*)",
49+
"Bash(./gradlew koverXmlReport:*)",
50+
"Bash(./gradlew dokkaHtmlMultiModule:*)",
51+
"Bash(./gradlew publishToMavenLocal:*)",
52+
"Bash(./gradlew --stop:*)",
53+
"Bash(make:*)",
54+
55+
"WebFetch(domain:docs.sentry.io)",
56+
"WebFetch(domain:develop.sentry.dev)",
57+
"WebFetch(domain:kotlinlang.org)",
58+
"WebFetch(domain:developer.android.com)",
59+
"WebFetch(domain:docs.github.com)",
60+
"WebFetch(domain:cli.github.com)",
61+
62+
"Skill(sentry-skills:agents-md)"
63+
],
64+
"deny": []
65+
}
66+
}

AGENTS.MD

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# AGENTS.md
2+
3+
Sentry Kotlin Multiplatform (KMP) SDK and Gradle Plugin.
4+
5+
## Build
6+
7+
- **Build tool**: Gradle via `./gradlew`
8+
- **Format**: `./gradlew spotlessApply`
9+
- **Lint**: `./gradlew detekt`
10+
- **Test**: `./gradlew build` (builds and runs tests)
11+
- **API check**: `./gradlew apiCheck` (binary compatibility)
12+
- **Full CI**: `make compile` (runs apiCheck, detekt, build, samples)
13+
14+
## Quality Gate
15+
16+
Before committing, ensure these pass:
17+
```bash
18+
./gradlew spotlessApply
19+
./gradlew detekt
20+
./gradlew build
21+
./gradlew apiCheck
22+
```
23+
24+
## Repository Structure
25+
26+
```
27+
├── sentry-kotlin-multiplatform/ # Core KMP SDK
28+
│ └── src/
29+
│ ├── commonMain/ # Shared API & expect declarations
30+
│ ├── commonJvmMain/ # Shared JVM + Android code
31+
│ ├── androidMain/ # Android actual implementations
32+
│ ├── jvmMain/ # JVM actual implementations
33+
│ ├── appleMain/ # Shared Apple (iOS/macOS/tvOS/watchOS)
34+
│ ├── iosMain/ # iOS-specific
35+
│ └── commonTvWatchMacOsMain/ # tvOS/watchOS/macOS-specific
36+
├── sentry-kotlin-multiplatform-gradle-plugin/ # Optional Gradle Plugin
37+
├── sentry-samples/ # Sample apps (CocoaPods & SPM)
38+
└── buildSrc/ # Build configuration (Config.kt)
39+
```
40+
41+
## Key Conventions
42+
43+
- **expect/actual pattern**: Shared API in `commonMain`, platform implementations in `androidMain`, `appleMain`, `jvmMain`, etc.
44+
- **Public API docs**: All public classes/properties in `commonMain` must have KDoc (enforced by detekt)
45+
- **Formatting**: Spotless with ktlint — run `./gradlew spotlessApply` before committing
46+
- **Detekt config**: `config/detekt/detekt.yml`
47+
48+
## Commit Attribution
49+
50+
AI commits MUST include:
51+
```
52+
Co-Authored-By: (the agent model's name and attribution byline)
53+
```

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

0 commit comments

Comments
 (0)