Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .opencode/skills/documentation-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: documentation-review
description: Validate project documentation against actual implementation
---

# documentation-review

## Goal

Validate project documentation and ensure it matches the actual implementation.

## Behavior

When invoked:

1. **Scan all documentation:**
- `docs/**/*.md`
- `README.md`

2. **Validate links:**

### Internal
- Verify referenced files exist (e.g. `android/sampleApp`, `flutter/sample/`)
- Verify referenced paths in docs resolve correctly

### External
- Verify URLs are reachable (e.g. GitHub, Maven Central, pub.dev)

3. **Verify configuration examples match actual project:**

### Kotlin / Gradle
- Version catalog snippets match `android/gradle/libs.versions.toml`
- `build.gradle.kts` examples match `android/jujubasvg/build.gradle.kts`
- Plugin coordinates match actual publishing config (`io.github.codandotv:jujubaSVG`)

### Flutter
- `pubspec.yaml` snippets match `flutter/jujuba_svg/pubspec.yaml`
- Package installation instructions match current version
- API usage examples match actual public API

4. **Verify documented APIs exist:**
- Kotlin public APIs (e.g. `JujubaSVG`, `JujubaCommander`, `Command`)
- Flutter public APIs (e.g. `JujubaSVGWidget`, `JujubaCommander`)

5. **Verify setup instructions are accurate** (cross-check against `README.md`, build files, `pubspec.yaml`).

6. **Verify release instructions are still valid** (check `mkdocs.yml`, GitHub Actions workflows in `.github/`).

7. **Report results:**

### Errors
Documentation is incorrect or broken (dead links, wrong API names).

### Warnings
Documentation is outdated or incomplete (missing sections, stale version references).

### Suggestions
Recommended improvements (clarify ambiguous steps, add missing examples).
47 changes: 47 additions & 0 deletions .opencode/skills/generate-tests/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: generate-tests
description: Generate tests following the project's existing conventions
---

# generate-tests

## Goal

Generate tests that follow the project's existing conventions.

## Behavior

When invoked:

1. **Detect testing framework:**

### Kotlin / Android
- Check for JUnit 5 (`kotlin("test")`) in `android/jujubasvg/build.gradle.kts`
- Check for additional libraries: `kotlinx-coroutines-test`, `turbine`

### Flutter
- Check for `flutter_test` in `flutter/jujuba_svg/pubspec.yaml`

2. **Analyze existing tests:**
- Kotlin: `android/jujubasvg/src/test/` — examine file names, class structure, assertion style
- Flutter: `flutter/jujuba_svg/test/` — examine file names, widget test patterns, assertion style

3. **Follow current naming conventions:**
- Kotlin: `<Subject>Test.kt` with descriptive test function names
- Flutter: `<subject>_test.dart` with `test()` / `group()` / `expect()`

4. **Generate appropriate test types:**

### Kotlin
- Unit tests for `JujubaCommander`, `Command` execution, SVG node manipulation
- Use `kotlin.test` assertions + `kotlinx.coroutines.test` for coroutine testing
- Use `Turbine` for `Flow`/`Channel` testing

### Flutter
- Unit tests for `JujubaCommander` logic
- Widget tests for `JujubaSVGWidget` rendering
- Use `flutter_test` with `WidgetTester`, `pumpWidget`, `find`, `expect`

5. **Ensure generated tests use the project's assertion style and test architecture:**
- Kotlin: functional/behavioral style matching existing tests
- Flutter: `testWidgets`, group-based organization, `mockito` if used
58 changes: 58 additions & 0 deletions .opencode/skills/minimum-requirements/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: minimum-requirements
description: Automatically determine minimum requirements for consuming the library
---

# minimum-requirements

## Goal

Automatically determine the minimum requirements needed to consume the library.

## Behavior

When invoked:

1. **Detect project type:**
- Check for `android/` directory with Gradle build files → Kotlin Library
- Check for `flutter/` directory with `pubspec.yaml` → Flutter Package

2. **Inspect dependency declarations:**
- `android/gradle/libs.versions.toml` (version catalog)
- `android/gradle/wrapper/gradle-wrapper.properties` (Gradle version)
- `android/build-logic/src/main/kotlin/config/Config.kt` (minSdk, JDK target)
- `flutter/jujuba_svg/pubspec.yaml` (Dart SDK, Flutter version)

3. **Determine minimum supported versions:**

### Kotlin / Android
- Kotlin version: from `libs.versions.toml` (`kotlin`)
- JDK version: from `Config.kt` (`javaCompatibilityVersion`)
- Gradle version: from `gradle-wrapper.properties` (`distributionUrl`)
- Android Gradle Plugin version: from `libs.versions.toml` (`gradle`)
- Min SDK: from `Config.kt` (`MIN_SDK`)

### Flutter
- Dart SDK constraint: from `pubspec.yaml` (`environment.sdk`)
- Flutter dependency: implicit via `sdk: flutter`

4. **Create or update** a `## Minimum Requirements` section inside `README.md`.

### Example output

```md
## Minimum Requirements

### Kotlin Library

- Kotlin 2.1.0+
- JDK 17+
- Gradle 9.0+
- Android Gradle Plugin 8.13.1+
- Android API 22+

### Flutter Package

- Dart ^3.5.0+
- Flutter (latest stable)
```
71 changes: 71 additions & 0 deletions .opencode/skills/release-notes/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: release-notes
description: Generate release notes and prepare the next release
---

# release-notes

## Goal

Generate release notes and prepare the next release.

## Behavior

When invoked:

1. **Detect current version** from:
- `android/jujubasvg/version.properties` (property `VERSION`)
- `flutter/jujuba_svg/pubspec.yaml` (field `version`)

2. **Get latest Git tag:**
```bash
git tag --sort=-v:refname | head -1
```

3. **Analyze unreleased changes:**
```bash
git log <latest-tag>..HEAD --oneline
```

4. **Categorize commits:**

| Bump | Patterns |
|---------|-------------------------------------|
| Major | `breaking`, `BREAKING CHANGE` |
| Minor | `feat` |
| Patch | `fix`, `docs`, `chore`, `refactor`, `test` |

5. **Determine next semantic version** based on categorized commits.

6. **Update version file** (increment in `version.properties` or `pubspec.yaml`).

7. **Create or update `CHANGELOG.md`:**

```md
## X.Y.Z

### Features

- Added ...

### Fixes

- Fixed ...

### Documentation

- Updated ...
```

8. **Generate a release summary** (version, date, highlights).

9. **Prompt the user** to:
```bash
git commit
git tag v<version>
git push && git push --tags
```

10. **Verify publishing metadata:**
- Maven Central: check `android/jujubasvg/build.gradle.kts` for `mavenPublishing` block
- pub.dev: check `flutter/jujuba_svg/pubspec.yaml` for publish configuration
63 changes: 63 additions & 0 deletions .opencode/skills/validate-architecture/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: validate-architecture
description: Verify architectural consistency and dependency rules
---

# validate-architecture

## Goal

Verify architectural consistency and dependency rules.

## Behavior

When invoked:

1. **Detect project structure:**
- Kotlin/Android: modules defined in `android/settings.gradle.kts` (`:jujubasvg`, `:sampleApp`)
- Convention plugins: `android/build-logic/`
- Flutter: package at `flutter/jujuba_svg/`, sample at `flutter/sample/`

2. **Analyze dependencies between modules/packages:**

### Kotlin / Android
- `:sampleApp` depends on `:jujubasvg`
- `:build-logic` provides convention plugins used by both
- No circular dependencies between `:jujubasvg` and `:sampleApp`

### Flutter
- `flutter/sample` depends on `flutter/jujuba_svg` (local path dependency)
- No circular dependencies

3. **Verify architecture rules:**

### Kotlin
- `:jujubasvg` should not depend on `:sampleApp`
- Internal packages should not leak into public API surface
- `explicitApi()` should be enforced (set in convention plugin)

### Gradle Plugins
- Convention plugins should only expose necessary configuration
- Build-logic should not leak into library module classpath

### Flutter
- `lib/core/`, `lib/model/`, `lib/util/` should respect layer separation
- Core logic should not depend on UI widgets

4. **Detect:**

- **Cyclic dependencies** — any module depending on one that depends back on it
- **Forbidden dependencies** — e.g. sample app depending on internal build-logic
- **Unused modules** — modules declared in settings but never referenced
- **Architectural violations** — e.g. Compose UI leaking into pure Kotlin logic

5. **Produce a report:**

### Violations
Critical issues (cyclic deps, forbidden deps).

### Warnings
Potential issues (unused modules, unclear boundaries).

### Recommendations
Suggested improvements (extract shared code, enforce layers).
Loading
Loading