-
Notifications
You must be signed in to change notification settings - Fork 0
Improve README.md, fix coverage reports, add Java warning suppression DSL
#313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7390fe6
Update `config`
alexander-yevsyukov d4cfc73
Bump version -> `2.0.0-SNAPSHOT.444`
alexander-yevsyukov a4fc487
Update depenency reporst
alexander-yevsyukov 50de7f4
Bump Validation in examples
alexander-yevsyukov cf5bf05
Bump Validation in examples
alexander-yevsyukov 739e160
Improve README
alexander-yevsyukov a2231a7
Improve generation of coverage reports
alexander-yevsyukov 7bd1c7f
Add more sections and TOC to README.md
alexander-yevsyukov e2d7cd7
Address Codecov deprecations
alexander-yevsyukov a2c9e58
Populate `project.md`
alexander-yevsyukov 4fe4d1b
Potential fix for pull request finding
alexander-yevsyukov a90c94f
Fail with a message when `jq` is not installed
alexander-yevsyukov 50b35ba
Update dependency reports
alexander-yevsyukov a65ceea
Include `_preview/` dir in Hugo settings search
alexander-yevsyukov bf7ceb5
Use Elvis operator
alexander-yevsyukov b4223b7
Bump Validation -> `2.0.0-SNAPSHOT.443`
alexander-yevsyukov 970718c
Update `config`
alexander-yevsyukov 4678f7b
Update dependency reports
alexander-yevsyukov 68a422f
Suppress warnings for unsigned fields in Java proto types
alexander-yevsyukov 3eb5f29
Use `ProtoJson` for writing `JavaValidationRenderer` settings
alexander-yevsyukov cdfced2
Update dependency reports
alexander-yevsyukov 8026c30
Write settings in `LaunchSpineCompiler.doFirst`
alexander-yevsyukov 6bbba1b
Update dependency reports
alexander-yevsyukov e4d1a6c
Improve `JavaValidationRenderer` settings
alexander-yevsyukov a5b3d05
Update build time
alexander-yevsyukov d170422
Remove unused import
alexander-yevsyukov b570ff4
Update build time
alexander-yevsyukov 2c6a149
Fix proto file layout
alexander-yevsyukov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # JVM Project Requirements | ||
|
|
||
| General requirements for all JVM projects in the Spine SDK organisation. | ||
| Repo-specific `project.md` files link here and add their own context. | ||
|
|
||
| ## Language and build | ||
|
|
||
| - **Languages**: Kotlin (primary), Java (secondary). | ||
| - **Build**: Gradle with Kotlin DSL. | ||
| - **Static analysis**: detekt, ErrorProne, Checkstyle, PMD. | ||
| - **Testing**: JUnit 5, Kotest Assertions, Codecov. | ||
|
|
||
| ## Code review checklist | ||
|
|
||
| **Correctness and safety** | ||
| - Code compiles and passes static analysis (detekt, ErrorProne, Checkstyle, PMD). | ||
| - No reflection or unsafe code unless explicitly approved in scope. | ||
| - No analytics, telemetry, or tracking code. | ||
| - No blocking calls inside coroutines. | ||
|
|
||
| **Kotlin/Java style** | ||
| - Kotlin idioms preferred: extension functions, `when` expressions, data/sealed | ||
| classes, immutable data structures. | ||
| - No `!!` unless provably safe. No unchecked casts. | ||
| - No mutable state without justification. | ||
| - No string duplication — use constants. | ||
|
|
||
| **Tests** | ||
| - New or changed functionality must include tests. | ||
| - Use stubs, not mocks. | ||
| - Prefer [Kotest assertions][kotest-assertions] over JUnit or Google Truth. | ||
|
|
||
| **Versioning** | ||
| - If the repo has `version.gradle.kts`, every PR must include a version bump. | ||
| Flag the absence as a required change. | ||
|
|
||
| [kotest-assertions]: https://kotest.io/docs/assertions/assertions.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| name: copilot-review-request | ||
| description: How to request or re-request a Copilot PR review programmatically — GraphQL botIds is the only reliable path | ||
| metadata: | ||
| type: feedback | ||
| since: 2026-05-25 | ||
| --- | ||
|
|
||
| Use the GraphQL `requestReviews` mutation with `botIds` for both initial | ||
| requests and re-requests: | ||
|
|
||
| ```bash | ||
| gh api graphql -f query=' | ||
| mutation { | ||
| requestReviews(input: { | ||
| pullRequestId: "PR_NODE_ID", | ||
| botIds: ["BOT_kgDOCnlnWA"] | ||
| }) { | ||
| pullRequest { id number } | ||
| } | ||
| }' | ||
| ``` | ||
|
|
||
| - `PR_NODE_ID`: `gh api repos/SpineEventEngine/REPO/pulls/NUMBER --jq '.node_id'` | ||
| - `BOT_kgDOCnlnWA`: fixed node ID for the Copilot PR reviewer bot (stable) | ||
|
|
||
| **Why:** The REST endpoint (`POST .../requested_reviewers` with | ||
| `reviewers[]=Copilot`) silently no-ops on re-requests — it only works for | ||
| the first-ever request on a PR. The GraphQL `userIds` field also fails | ||
| because Copilot is a Bot, not a User. `botIds` is the correct field and | ||
| works for both initial and re-requests. | ||
|
|
||
| **How to apply:** Any time a Copilot review needs to be requested or | ||
| re-requested, use the GraphQL mutation above. Do not use the REST endpoint | ||
| or `@copilot review` comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| name: anthropic-api-caching | ||
| description: Pattern and pricing for adding prompt caching to any direct Anthropic API call. | ||
| metadata: | ||
| type: reference | ||
| since: 2026-05-24 | ||
| --- | ||
|
|
||
| Use this when adding a direct Anthropic API call (GitHub Actions workflow, | ||
| script, or tool) that sends a stable system prompt. | ||
|
|
||
| **Add `cache_control` to the system message block:** | ||
|
|
||
| ```python | ||
| system=[{ | ||
| "type": "text", | ||
| "text": "<stable system prompt — skill definition, shared instructions, etc.>", | ||
| "cache_control": {"type": "ephemeral", "ttl": "1h"} | ||
| }] | ||
| ``` | ||
|
|
||
| Use `ttl: "1h"` for any caller whose requests are spaced more than 5 minutes | ||
| apart (GitHub Actions jobs, scheduled tasks, skill invocations). Use the | ||
| default 5-minute TTL only for tight interactive loops. | ||
|
|
||
| **Pricing (input tokens):** | ||
|
|
||
| | Operation | Cost multiplier | | ||
| |---|---| | ||
| | Cache write (5-min TTL) | 1.25× base input price | | ||
| | Cache write (1-hour TTL) | 2× base input price | | ||
| | Cache read (any TTL) | 0.1× base input price | | ||
|
|
||
| A single cache hit within the TTL window recovers the write premium. Multiple | ||
| hits within the hour make the 2× write cost negligible. | ||
|
|
||
| **Place stable content before dynamic content.** Cache breakpoints apply to | ||
| everything *before* the `cache_control` marker. Dynamic per-request content | ||
| (user query, file diff, current date) must come after the last breakpoint. | ||
|
|
||
| **Monitor hits via the usage object:** | ||
| ```python | ||
| print(response.usage.cache_read_input_tokens) # 0 on miss, >0 on hit | ||
| print(response.usage.cache_creation_input_tokens) # tokens written to cache | ||
| ``` | ||
|
|
||
| **Future:** once direct API calls exist in this org, consider a cache pre-warm | ||
| job triggered on push to `master` — calls the API with `max_tokens: 0` and | ||
| `cache_control: {ttl: "1h"}` so the first session after a config change | ||
| hits rather than writes. | ||
|
|
||
| Related: [[cache-warm-window]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| name: cache-warm-window | ||
| description: How prompt cache entries are shared between sibling-repo sessions and how to maximise overlap. | ||
| metadata: | ||
| type: reference | ||
| since: 2026-05-24 | ||
| --- | ||
|
|
||
| Claude Code sessions share a prompt cache entry when they send byte-identical | ||
| content within the cache TTL window. Because `migrate` copies `CLAUDE.md` and | ||
| `.agents/` verbatim, any two sessions on the same config version share the | ||
| same cache slot — provided they fall within the TTL. | ||
|
|
||
| **TTL in effect for Console OAuth users:** | ||
| - Default: **5 minutes** (applies to all non-subscription auth) | ||
| - With `ENABLE_PROMPT_CACHING_1H=1` in `~/.claude/settings.json`: **1 hour** | ||
|
|
||
| Developers must have `ENABLE_PROMPT_CACHING_1H=1` set, otherwise the | ||
| window is too short for cross-session hits to occur reliably. | ||
| This setting will work ONLY for Claude Code which runs the CLI binary. | ||
| It will not work for JetBrains Air or any other IDE plugin which does not | ||
| run the Claude Code CLI binary. | ||
|
|
||
| **Cache is per Anthropic workspace.** All developers authenticated via the | ||
| same Anthropic organisation Console org share the same cache pool. Do not | ||
| create separate Console workspaces per developer — that would isolate their | ||
| cache entries. | ||
|
|
||
| **Practical impact:** Realistic concurrency is 1–2 sessions at a time. The | ||
| first session after a config change pays the cache-write cost; any session | ||
| starting within the next hour (with 1H TTL) reads from cache at 0.1× cost. | ||
|
|
||
| Related: [[anthropic-api-caching]] |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Project: Validation | ||
|
|
||
| ## Overview | ||
|
|
||
| Validation is a Spine SDK JVM library that provides the project's validation | ||
| model and related integration points. Its role in the organisation is to define | ||
| and expose validation behaviour in a reusable form so other modules can apply | ||
| consistent validation rules and report validation results through a stable API. | ||
|
|
||
| ## Architecture | ||
|
|
||
| This repository is a library module. Its public surface should stay focused on | ||
| validation concepts, rule execution, and result/reporting types that other Spine | ||
| SDK components can depend on without pulling in application-specific behaviour. | ||
| Keep implementation details behind the library boundary, prefer additive changes | ||
| to public APIs, and preserve compatibility for downstream JVM consumers. | ||
|
|
||
| Read [`.agents/jvm-project.md`](jvm-project.md) for build stack, coding style, | ||
| tests, and versioning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <!-- Template — copy to a sibling repo's .agents/project.md and fill in the | ||
| sections below. In the config repo itself this file is a template only. --> | ||
|
|
||
| # Project: <name> | ||
|
|
||
| ## Overview | ||
|
|
||
| *One paragraph: what this repo is, what problem it solves, and its role in the | ||
| Spine SDK organisation.* | ||
|
|
||
| ## Architecture | ||
|
|
||
| *Role in the org: library / tool / Gradle plugin / application. | ||
| Key patterns, public API boundaries, and constraints specific to this repo.* | ||
|
|
||
| <!-- JVM projects: uncomment the line below after seeding this file. | ||
| Read [`.agents/jvm-project.md`](jvm-project.md) for build stack, coding style, tests, and versioning. | ||
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.