| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 3 | 8 | 0% |
| Commands | 0 | 0 | 0 | — |
| Section tags | 0 | 1 | 3 | 0% |
What each file covers
Sections
0 shared · 3 only in A · 8 only in B- − CLAUDE.md - Guidelines for Kotlin Development
- − Project Guidelines
- − Individual Preferences
- + Compiler Architecture
- + Intro
- + Two Frontends
- + FIR Compilation Phases
- + IR (Intermediate Representation)
- + Inference
- + Commit Guidelines
- + Testing
Commands
neither file has anySection tags
0 shared · 1 only in A · 3 only in B- − agent-behaviour
- + build
- + test
- + git-pr
Line diff
JetBrains/kotlin · CLAUDE.md
@@ −1 @@
1---
2project: Kotlin
3languages: [Kotlin, Java]
4build-system: Gradle
5repository: monorepo
6---
7
8# CLAUDE.md - Guidelines for Kotlin Development
9
10## Project Guidelines
11
12**CRITICAL: @./.ai/guidelines.md guidelines MUST be followed at all times.**
13
14## Individual Preferences
15
16**Local Preferences:** @./.claude/local.md
17
18When asked to update memory, you must update `./.claude/CLAUDE.md` if it is not specified that another file should be modified.
19
JetBrains/kotlin · compiler/AGENTS.md
@@ +1 @@
1# Compiler Architecture
2
3## Intro
4
5Consider reading [fir-basics.md](../docs/fir/fir-basics.md).
6
7## Two Frontends
8
91. **K1/FE 1.0 (Legacy)**: Located in `compiler/frontend/` - uses PSI and BindingContext
102. **K2/FIR (Current)**: Located in `compiler/fir/` - Frontend IR, the new compiler frontend
11
12## FIR Compilation Phases
13
14FIR processes code through sequential phases (see `FirResolvePhase.kt`).
15
16Key invariant: In phase B following phase A, all FIR elements visible in B are resolved to phase A.
17
18## IR (Intermediate Representation)
19
20Located in `compiler/ir/`. Backend IR is used by all targets for:
21- Lowering (transforming code to target-friendly form)
22- Optimization
23- Serialization to klibs
24
25Backend implementations:
26- `compiler/ir/backend.jvm/` - JVM backend
27- `compiler/ir/backend.js/` - JavaScript backend
28- `compiler/ir/backend.wasm/` - WebAssembly backend
29- `kotlin-native/backend.native/`, `native/` - Native backend
30
31## Inference
32
33For type inference implementation details, read [inference.md](../docs/fir/inference.md).
34
35## Commit Guidelines
36
37- **FIR prefix**: When changes are mostly related to FIR (`compiler/fir/`), use `FIR: ` prefix in the commit subject line.
38- **Test-before-fix**: When fixing an issue and adding a test, commit the test data as a separate commit **before** the fix. This helps reviewers see how the fix actually changes semantics (the test will show diagnostic differences in the fix commit).
39
40## Testing
41
42For FIR analysis test data format (directives, diagnostic markers, file structure), see [analysis-tests/AGENTS.md](fir/analysis-tests/AGENTS.md).
@@ −1 +1 @@
1−---
2−project: Kotlin
3−languages: [Kotlin, Java]
4−build-system: Gradle
5−repository: monorepo
6−---
1+# Compiler Architecture
72
8−# CLAUDE.md - Guidelines for Kotlin Development
3+## Intro
94
10−## Project Guidelines
5+Consider reading [fir-basics.md](../docs/fir/fir-basics.md).
116
12−**CRITICAL: @./.ai/guidelines.md guidelines MUST be followed at all times.**
7+## Two Frontends
138
14−## Individual Preferences
9+1. **K1/FE 1.0 (Legacy)**: Located in `compiler/frontend/` - uses PSI and BindingContext
10+2. **K2/FIR (Current)**: Located in `compiler/fir/` - Frontend IR, the new compiler frontend
1511
16−**Local Preferences:** @./.claude/local.md
12+## FIR Compilation Phases
1713
18−When asked to update memory, you must update `./.claude/CLAUDE.md` if it is not specified that another file should be modified.
14+FIR processes code through sequential phases (see `FirResolvePhase.kt`).
1915
16+Key invariant: In phase B following phase A, all FIR elements visible in B are resolved to phase A.
17+
18+## IR (Intermediate Representation)
19+
20+Located in `compiler/ir/`. Backend IR is used by all targets for:
21+- Lowering (transforming code to target-friendly form)
22+- Optimization
23+- Serialization to klibs
24+
25+Backend implementations:
26+- `compiler/ir/backend.jvm/` - JVM backend
27+- `compiler/ir/backend.js/` - JavaScript backend
28+- `compiler/ir/backend.wasm/` - WebAssembly backend
29+- `kotlin-native/backend.native/`, `native/` - Native backend
30+
31+## Inference
32+
33+For type inference implementation details, read [inference.md](../docs/fir/inference.md).
34+
35+## Commit Guidelines
36+
37+- **FIR prefix**: When changes are mostly related to FIR (`compiler/fir/`), use `FIR: ` prefix in the commit subject line.
38+- **Test-before-fix**: When fixing an issue and adding a test, commit the test data as a separate commit **before** the fix. This helps reviewers see how the fix actually changes semantics (the test will show diagnostic differences in the fix commit).
39+
40+## Testing
41+
42+For FIR analysis test data format (directives, diagnostic markers, file structure), see [analysis-tests/AGENTS.md](fir/analysis-tests/AGENTS.md).
