Skip to content

Commit bb8c0ea

Browse files
authored
Merge pull request #111 from cheonjaeung/cheon/ai-guidelines
Improve AI agents guideline
2 parents cb05765 + b107d51 commit bb8c0ea

1 file changed

Lines changed: 37 additions & 8 deletions

File tree

AGENTS.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Guidelines for AI Agents
22

3+
## Overview
4+
5+
This project is a compose multiplatform library to provide advanced grid layout features.
6+
See `README.md` file and `docs/` directory for more details.
7+
38
## Core Rules
49

510
- Update documentation when the feature is added, removed or changed.
611
- Verify changes by running tests after making changes.
7-
- Run `./gradlew apiDump` when the public API is changed.
12+
- Run `./gradlew :grid:apiDump` when the public API is changed.
813
- Annotate new public APIs with `@ExperimentalGridApi`.
914

1015
## Project Structure
1116

1217
- `grid/`: The main library module.
18+
- `api/`: Public API binary compatibility declaration files. Used by the binary compatibility validator to detect breaking API changes.
1319
- `src/commonMain/`: Main source code for the library.
1420
- `src/androidMain/`: Android specific source code.
1521
- `src/test/`: Unit tests and snapshot tests.
@@ -20,11 +26,34 @@
2026
- `ios/`: Xcode project for iOS sample application.
2127
- `docs/`: Documentation.
2228

23-
## Commands
29+
## Common Commands
30+
31+
- `./gradlew :grid:build`: Build project.
32+
- `./gradlew :grid:test`: Run all test cases.
33+
- `./gradlew :grid:testDebugUnitTest --tests "TestClassName"`: Run specific tests.
34+
- `./gradlew :grid:verifyPaparazziDebug`: Run only snapshot tests.
35+
- `./gradlew :grid:recordPaparazziDebug`: Update and create new snapshots.
36+
- `./gradlew :grid:apiDump`: Update public API binary compatibility. The result is generated in `grid/api/` directory.
37+
38+
## Key Files
39+
40+
**Library Development**
41+
42+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/Grid.kt`: Public layout composables.
43+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/SequentialGridMeasurePolicy.kt`: Core measurement and placing logic of sequential grid (`HorizontalGrid` and `VerticalGrid`).
44+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/GridScopeModifiers.kt`: Custom modifiers of sequential grid (`HorizontalGrid` and `VerticalGrid`).
45+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/BoxGridMeasurePolicy.kt`: Core measurement and placing logic of `BoxGrid`.
46+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/BoxGridScopeModifiers.kt`: Custom modifiers of `BoxGrid`.
47+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/ExtendedGridCells.kt`: Declarations of extended grid cell managements.
48+
- `grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/ExperimentalGridApi.kt`: Marker annotation for new experimental APIs.
49+
50+
**Testing**
51+
52+
- `grid/src/test/snapshots/images/`: Recorded snapshots generated by `./gradlew :grid:recordPaparazziDebug`.
53+
- `grid/build/paparazzi/failures/`: Failed snapshot test result output directory.
54+
55+
**Build Configurations**
2456

25-
- `./gradlew build`: Build project.
26-
- `./gradlew test`: Run all test cases.
27-
- `./gradlew testDebugUnitTest --tests "TestClassName"`: Run specific tests.
28-
- `./gradlew verifyPaparazziDebug`: Run only snapshot tests.
29-
- `./gradlew recordPaparazziDebug`: Update and create new snapshots.
30-
- `./gradlew apiDump`: Update public API binary compatibility.
57+
- `build.gradle.kts`: The project root build script, contains shared build logics.
58+
- `grid/build.gradle.kts`: Library specific build script, contains dependencies and build logics.
59+
- `gradle/libs.versions.toml`: Core file for dependency management.

0 commit comments

Comments
 (0)