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
2 changes: 1 addition & 1 deletion .agents/documentation-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
## Avoid widows, runts, orphans, or rivers

Agents should **AVOID** text flow patters illustrated
on [this diagram](widow-runt-orphan-river.jpg).
on [this diagram](widow-runt-orphan.jpg).

[todo-comments]: https://github.com/SpineEventEngine/documentation/wiki/TODO-comments
46 changes: 46 additions & 0 deletions .agents/skills/writer/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: writer
description: Write, edit, and restructure user-facing and developer-facing documentation. Use when asked to create/update docs such as `README.md`, `docs/**`, and other Markdown documentation; when drafting tutorials, guides, troubleshooting pages, or migration notes; and when improving inline API documentation (KDoc) and examples.
---

# Write documentation (repo-specific)

## Decide the target and audience

- Identify the target reader: end user, contributor, maintainer, or tooling/automation.
- Identify the task type: new doc, update, restructure, or documentation audit.
- Identify the acceptance criteria: “what is correct when the reader is done?”

## Choose where the content should live

- Prefer updating an existing doc over creating a new one.
- Place content in the most discoverable location:
- `README.md`: project entry point and “what is this?”.
- `docs/`: longer-form docs (follow existing conventions in that tree).
- Source KDoc: API usage, examples, and semantics that belong with the code.

## Follow local documentation conventions

- Follow `.agents/documentation-guidelines.md` and `.agents/documentation-tasks.md`.
- Use fenced code blocks for commands and examples; format file/dir names as code.
- Avoid widows, runts, orphans, and rivers by reflowing paragraphs when needed.

## Make docs actionable

- Prefer steps the reader can execute (commands + expected outcome).
- Prefer concrete examples over abstract descriptions.
- Include prerequisites (versions, OS, environment) when they are easy to miss.
- Use consistent terminology (match code identifiers and existing docs).

## KDoc-specific guidance

- For public/internal APIs, include at least one example snippet demonstrating common usage.
- When converting from Javadoc/inline comments to KDoc:
- Remove HTML like `<p>` and preserve meaning.
- Prefer short paragraphs and blank lines over HTML formatting.

## Validate changes

- For code changes, follow `.agents/running-builds.md`.
- For documentation-only changes in Kotlin/Java sources, prefer `./gradlew dokka`.

5 changes: 5 additions & 0 deletions .agents/skills/writer/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
interface:
display_name: "Writer"
short_description: "Write and update user/developer docs"
default_prompt: "Write or revise documentation in this repository (for example: README.md, docs/**, CONTRIBUTING.md, and API documentation/KDoc). Follow local documentation guidelines in .agents/*.md, keep changes concise and actionable, and include concrete examples and commands where appropriate."

23 changes: 23 additions & 0 deletions .agents/skills/writer/assets/templates/doc-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Title

## Goal

State what the reader will accomplish.

## Prerequisites

- List versions/tools the reader needs.

## Steps

1. Do the first thing.
2. Do the next thing.

## Verify

Show how the reader can confirm success.

## Troubleshooting

- Common failure: likely cause → fix.

11 changes: 11 additions & 0 deletions .agents/skills/writer/assets/templates/kdoc-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
````kotlin
/**
* Explain what this API does in one sentence.
*
* ## Example
* ```kotlin
* // Show the typical usage pattern.
* val result = doThing()
* ```
*/
````
13 changes: 13 additions & 0 deletions .agents/skills/writer/assets/templates/kotlin-java-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{< code-tabs langs="Kotlin, Java">}}

{{< code-tab lang="Kotlin" >}}
```kotlin
```
{{< /code-tab >}}

{{< code-tab lang="Java" >}}
```java
```
{{< /code-tab >}}

{{< /code-tabs >}}
Binary file added .agents/widow-runt-orphan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORMAL_GIT_HUB_PAGES_AUTHOR: developers@spine.io
# https://docs.github.com/en/actions/reference/environment-variables
REPO_SLUG: ${{ github.repository }} # e.g. SpineEventEngine/core-java
REPO_SLUG: ${{ github.repository }} # e.g. SpineEventEngine/core-jvm
GOOGLE_APPLICATION_CREDENTIALS: ./maven-publisher.json
NPM_TOKEN: ${{ secrets.NPM_SECRET }}
9 changes: 3 additions & 6 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ val grGitVersion = "4.1.1"
* This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
* used by the project.
*/
val kotlinEmbeddedVersion = "2.2.21"
val kotlinEmbeddedVersion = "2.3.10"

/**
* The version of Guava used in `buildSrc`.
*
* Always use the same version as the one specified in [io.spine.dependency.lib.Guava].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
val guavaVersion = "33.4.8-jre"
val guavaVersion = "33.5.0-jre"

/**
* The version of ErrorProne Gradle plugin.
Expand All @@ -103,7 +103,7 @@ val errorPronePluginVersion = "4.2.0"
* @see <a href="https://github.com/google/protobuf-gradle-plugin/releases">
* Protobuf Gradle Plugins Releases</a>
*/
val protobufPluginVersion = "0.9.5"
val protobufPluginVersion = "0.9.6"

/**
* The version of Dokka Gradle Plugins.
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ fun Project.configureTaskDependencies() {
"compileTestFixturesKotlin".dependOn("kspTestFixturesKotlin")
"javadocJar".dependOn(dokkaGeneratePublicationJavadoc)
"htmlDocsJar".dependOn(dokkaGenerate)

"kspTestKotlin".dependOn("launchTestSpineCompiler")
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object Kotlin : DependencyWithBom() {
* depend on Gradle and the version of embedded Kotlin.
*/
@Suppress("MemberVisibilityCanBePrivate") // used directly from the outside.
const val runtimeVersion = "2.2.21"
const val runtimeVersion = "2.3.10"

override val version = runtimeVersion
override val group = "org.jetbrains.kotlin"
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.lib
)
object Protobuf {
const val group = "com.google.protobuf"
const val version = "4.33.1"
const val version = "4.34.0"

/**
* The Java library with Protobuf data types.
Expand Down Expand Up @@ -64,7 +64,7 @@ object Protobuf {
*
* When changing the version, also change the version used in the `build.gradle.kts`.
*/
const val version = "0.9.5"
const val version = "0.9.6"
const val id = "com.google.protobuf"
const val lib = "$group:protobuf-gradle-plugin:$version"
}
Expand Down
16 changes: 9 additions & 7 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName", "unused")
object Base {
const val version = "2.0.0-SNAPSHOT.382"
const val versionForBuildScript = "2.0.0-SNAPSHOT.382"
const val version = "2.0.0-SNAPSHOT.385"
const val versionForBuildScript = "2.0.0-SNAPSHOT.385"
const val group = Spine.group
const val artifact = "spine-base"
const val lib = "$group:$artifact:$version"
const val format = "$group:spine-format:$version"
const val libForBuildScript = "$group:$artifact:$versionForBuildScript"
const val annotations = "$group:spine-annotations:$version"
private const val prefix = "spine"
const val libModule = "$prefix-base"
const val lib = "$group:$libModule:$version"
const val libForBuildScript = "$group:$libModule:$versionForBuildScript"
const val annotations = "$group:$prefix-annotations:$version"
const val environment = "$group:$prefix-environment:$version"
const val format = "$group:$prefix-format:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object BaseTypes {
const val version = "2.0.0-SNAPSHOT.211"
const val version = "2.0.0-SNAPSHOT.223"
const val group = Spine.group
const val artifact = "spine-base-types"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Change {
const val version = "2.0.0-SNAPSHOT.200"
const val version = "2.0.0-SNAPSHOT.206"
const val group = Spine.group
const val artifact = "spine-change"
const val lib = "$group:$artifact:$version"
Expand Down
39 changes: 28 additions & 11 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@

package io.spine.dependency.local

import io.spine.dependency.Dependency

/**
* Dependencies on the Spine Compiler modules.
*
* To use a locally published ProtoData version instead of the version from a public plugin
* To use a locally published Compiler version instead of the version from a public plugin
* registry, set the `COMPILER_VERSION` and/or the `COMPILER_DF_VERSION` environment variables
* and stop the Gradle daemons so that Gradle observes the env change:
* ```
Expand All @@ -56,9 +58,9 @@ package io.spine.dependency.local
"ConstPropertyName" /* We use custom convention for artifact properties. */,
"MemberVisibilityCanBePrivate" /* The properties are used directly by other subprojects. */,
)
object Compiler {
object Compiler : Dependency() {
const val pluginGroup = Spine.group
const val group = "io.spine.tools"
override val group = "io.spine.tools"
const val pluginId = "io.spine.compiler"

/**
Expand All @@ -67,22 +69,22 @@ object Compiler {
const val module = "io.spine.tools:compiler"

/**
* The version of ProtoData dependencies.
* The version of the Compiler dependencies.
*/
val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.031"
override val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.039"

/**
* The distinct version of ProtoData used by other build tools.
* The distinct version of the Compiler used by other build tools.
*
* When ProtoData is used both for building the project and as a part of the Project's
* transitional dependencies, this is the version used to build the project itself.
* When the Compiler is used both for building the project and as a part of the Project's
* transitive dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.031"
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.039"

/**
* The artifact for the ProtoData Gradle plugin.
* The artifact for the Compiler Gradle plugin.
*/
val pluginLib: String

Expand Down Expand Up @@ -129,6 +131,21 @@ object Compiler {
val testlib
get() = "$group:compiler-testlib:$version"

override val modules: List<String>
get() = listOf(
api,
backend,
params,
protocPlugin,
gradleApi,
cliApi,
jvm,
fatCli,
testlib
).map {
it.split(":").let { (group, artifact) -> "$group:$artifact" }
}

/**
* An env variable storing a custom [version].
*/
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ package io.spine.dependency.local

// For backward compatibility.
@Suppress("unused")
@Deprecated("Use `CoreJvm` instead.", ReplaceWith("CoreJvm"))
typealias CoreJava = CoreJvm

/**
* Dependencies on `core-java` modules.
* Dependencies on `core-jvm` modules.
*
* See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-jvm/).
* See [`SpineEventEngine/core-jvm`](https://github.com/SpineEventEngine/core-jvm/).
*/
@Suppress("ConstPropertyName", "unused")
object CoreJvm {
const val group = Spine.group
const val version = "2.0.0-SNAPSHOT.346"
const val version = "2.0.0-SNAPSHOT.371"

const val coreArtifact = "spine-core"
const val clientArtifact = "spine-client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package io.spine.dependency.local
/**
* Dependencies on the CoreJvm Compiler artifacts.
*
* See [mc-java](https://github.com/SpineEventEngine/core-jvm-compiler).
* See [CoreJvm Compiler](https://github.com/SpineEventEngine/core-jvm-compiler).
*/
@Suppress(
"MemberVisibilityCanBePrivate" /* `pluginLib()` is used by subprojects. */,
Expand All @@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.032"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.054"

/**
* The version to be used for integration tests.
*/
const val version = "2.0.0-SNAPSHOT.032"
const val version = "2.0.0-SNAPSHOT.054"

/**
* The ID of the Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object ModelCompiler {
const val version = "2.0.0-SNAPSHOT.133"
const val version = "2.0.0-SNAPSHOT.200"
const val group = Spine.toolsGroup
const val artifact = "spine-model-compiler"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
package io.spine.dependency.local

/**
* Dependencies on smaller Spine modules.
* Defines Maven groups for the Spine SDK artifacts.
*/
@Suppress("unused", "ConstPropertyName")
object Spine {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Time {
const val version = "2.0.0-SNAPSHOT.220"
const val version = "2.0.0-SNAPSHOT.232"
const val group = Spine.group
const val artifact = "spine-time"
const val lib = "$group:$artifact:$version"
Expand Down
Loading
Loading