Skip to content

Commit e2ef9bd

Browse files
Merge pull request #544 from SpineEventEngine/add-config
Add Validation docs to the site
2 parents 2cffcb9 + 7ecbe33 commit e2ef9bd

125 files changed

Lines changed: 7048 additions & 677 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/_TOC.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Table of Contents
2+
3+
1. [Quick Reference Card](quick-reference-card.md)
4+
2. [JVM project requirements](jvm-project.md) — language, build, and review checklist shared by all JVM repos
5+
3. [Coding guidelines](coding-guidelines.md)
6+
4. [Documentation & comments](documentation-guidelines.md)
7+
5. [Documentation tasks](documentation-tasks.md)
8+
6. [Running builds](running-builds.md)
9+
7. [Version policy](version-policy.md)
10+
8. [Project structure expectations](project-structure-expectations.md)
11+
9. [Testing](testing.md)
12+
10. [Safety rules](safety-rules.md)
13+
11. [Advanced safety rules](advanced-safety-rules.md)
14+
12. [Refactoring guidelines](refactoring-guidelines.md)
15+
13. [Common tasks](common-tasks.md)
16+
14. [Team memory](memory/MEMORY.md)
17+
15. [Task plans](tasks/README.md)
18+
16. [Java to Kotlin conversion](skills/java-to-kotlin/SKILL.md)
19+
17. [Dependency update](skills/dependency-update/SKILL.md)
20+
18. [Documentation review](skills/review-docs/SKILL.md)
21+
19. [Pre-PR checklist](skills/pre-pr/SKILL.md)
22+
20. [Kotlin code review](skills/kotlin-review/SKILL.md)
23+
21. [Dependency audit](skills/dependency-audit/SKILL.md)

.agents/advanced-safety-rules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 🚨 Advanced safety rules
2+
3+
- Do **not** auto-update external dependencies without explicit request.
4+
- Do **not** inject analytics or telemetry code.
5+
- Flag any usage of unsafe constructs (e.g., reflection, I/O on the main thread).
6+
- Avoid generating blocking calls inside coroutines.

.agents/coding-guidelines.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# 🧾 Coding guidelines
2+
3+
## Core principles
4+
5+
- Adhere to [Spine Event Engine Documentation][spine-docs] for coding style.
6+
- Generate code that compiles cleanly and passes static analysis.
7+
- Respect existing architecture, naming conventions, and project structure.
8+
- Write clear, incremental commits with descriptive messages.
9+
- Include automated tests for any code change that alters functionality.
10+
11+
## Kotlin best practices
12+
13+
### ✅ Prefer
14+
- **Kotlin idioms** over Java-style approaches:
15+
- Extension functions
16+
- `when` expressions
17+
- Smart casts
18+
- Data classes and sealed classes
19+
- Immutable data structures
20+
- **Simple nouns** over composite nouns (`user` > `userAccount`)
21+
- **Generic parameters** over explicit variable types (`val list = mutableList<Dependency>()`)
22+
- **Java interop annotations** only when needed (`@file:JvmName`, `@JvmStatic`)
23+
- **Kotlin DSL** for Gradle files
24+
25+
### ❌ Avoid
26+
- Mutable data structures
27+
- Java-style verbosity (builders with setters)
28+
- Redundant null checks (`?.let` misuse)
29+
- Using `!!` unless clearly justified
30+
- Type names in variable names (`userObject`, `itemList`)
31+
- String duplication (use constants in companion objects)
32+
- Mixing Groovy and Kotlin DSLs in build logic
33+
- Reflection unless specifically requested
34+
35+
## Text formatting
36+
- ✅ Replace double empty lines with a single empty line in the code.
37+
- ✅ Remove trailing space characters in the code.
38+
39+
[spine-docs]: https://github.com/SpineEventEngine/documentation/wiki

.agents/common-tasks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 📋 Common tasks
2+
3+
- **Adding a new dependency**: Update relevant files in `buildSrc` directory.
4+
- **Creating a new module**: Follow existing module structure patterns.
5+
- **Documentation**: Use KDoc style for public and internal APIs.
6+
- **Testing**: Create comprehensive tests using Kotest assertions.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Documentation & comments
2+
3+
## Commenting guidelines
4+
- Avoid inline comments in production code unless necessary.
5+
- Inline comments are helpful in tests.
6+
- When using TODO comments, follow the format on the [dedicated page][todo-comments].
7+
- File and directory names should be formatted as code.
8+
9+
## Avoid widows, runts, orphans, or rivers
10+
11+
Agents should **AVOID** text flow patters illustrated
12+
on [this diagram](widow-runt-orphan.jpg).
13+
14+
[todo-comments]: https://github.com/SpineEventEngine/documentation/wiki/TODO-comments

.agents/documentation-tasks.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 📄 Documentation tasks
2+
3+
1. Ensure all public and internal APIs have KDoc examples.
4+
2. Add in-line code blocks for clarity in tests.
5+
3. Convert inline API comments in Java to KDoc in Kotlin:
6+
```java
7+
// Literal string to be inlined whenever a placeholder references a non-existent argument.
8+
private final String missingArgumentMessage = "[MISSING ARGUMENT]";
9+
```
10+
transforms to:
11+
```kotlin
12+
/**
13+
* Literal string to be inlined whenever a placeholder references a non-existent argument.
14+
*/
15+
private val missingArgumentMessage = "[MISSING ARGUMENT]"
16+
```
17+
18+
4. Javadoc -> KDoc conversion tasks:
19+
- Remove `<p>` tags in the line with text: `"<p>This"` -> `"This"`.
20+
- Replace `<p>` with empty line if the tag is the only text in the line.

.agents/jvm-project.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# JVM Project Requirements
2+
3+
General requirements for all JVM projects in the Spine SDK organisation.
4+
Repo-specific `project.md` files link here and add their own context.
5+
6+
## Language and build
7+
8+
- **Languages**: Kotlin (primary), Java (secondary).
9+
- **Build**: Gradle with Kotlin DSL.
10+
- **Static analysis**: detekt, ErrorProne, Checkstyle, PMD.
11+
- **Testing**: JUnit 5, Kotest Assertions, Codecov.
12+
13+
## Code review checklist
14+
15+
**Correctness and safety**
16+
- Code compiles and passes static analysis (detekt, ErrorProne, Checkstyle, PMD).
17+
- No reflection or unsafe code unless explicitly approved in scope.
18+
- No analytics, telemetry, or tracking code.
19+
- No blocking calls inside coroutines.
20+
21+
**Kotlin/Java style**
22+
- Kotlin idioms preferred: extension functions, `when` expressions, data/sealed
23+
classes, immutable data structures.
24+
- No `!!` unless provably safe. No unchecked casts.
25+
- No mutable state without justification.
26+
- No string duplication — use constants.
27+
28+
**Tests**
29+
- New or changed functionality must include tests.
30+
- Use stubs, not mocks.
31+
- Prefer [Kotest assertions][kotest-assertions] over JUnit or Google Truth.
32+
33+
**Versioning**
34+
- If the repo has `version.gradle.kts`, every PR must include a version bump.
35+
Flag the absence as a required change.
36+
37+
[kotest-assertions]: https://kotest.io/docs/assertions/assertions.html

.agents/memory/MEMORY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Team memory index
2+
3+
One line per memory. Scan at the start of every session.
4+
See [README.md](README.md) for the format and routing rules.
5+
6+
## Feedback (validated patterns & corrections)
7+
8+
- [copilot-review-request](feedback/copilot-review-request.md) — GraphQL `requestReviews` with `botIds: ["BOT_kgDOCnlnWA"]`; REST endpoint silently no-ops on re-requests.
9+
10+
## Project (durable context & rationale)
11+
12+
*(no entries yet)*
13+
14+
## Reference (external systems)
15+
16+
- [cache-warm-window](reference/cache-warm-window.md) — How prompt cache entries are shared between sibling-repo sessions and how to maximise overlap.
17+
- [anthropic-api-caching](reference/anthropic-api-caching.md) — Pattern and pricing for adding prompt caching to any direct Anthropic API call.

.agents/memory/README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Team memory — `.agents/memory/`
2+
3+
Validated patterns, durable project context, and pointers to external
4+
systems. Checked into git so the whole team — and any agent working in
5+
this repo — benefits from accumulated knowledge.
6+
7+
This complements Claude Code's built-in per-developer auto-memory:
8+
team-shareable knowledge lives here; personal preferences and ephemeral
9+
state live in the auto-memory.
10+
11+
## Layout
12+
13+
.agents/memory/
14+
├── MEMORY.md # Index — scan at start of every session
15+
├── README.md # This file — read when adding/updating memories
16+
├── feedback/ # Validated patterns & corrections
17+
├── project/ # Durable project context & rationale
18+
└── reference/ # External systems & resources
19+
20+
One file per memory. Filename = the memory's kebab-case slug.
21+
22+
## File format
23+
24+
---
25+
name: tests-no-db-mocks
26+
description: One-line summary — used to surface relevance, so be specific.
27+
metadata:
28+
type: feedback # feedback | project | reference
29+
since: 2026-05-19 # date added (ISO)
30+
---
31+
32+
<one-paragraph rule or fact>
33+
34+
**Why:** <reason — incident, constraint, team convention>
35+
36+
**How to apply:** <when this kicks in; what to do or avoid>
37+
38+
Related: [[other-memory-slug]]
39+
40+
`Why:` and `How to apply:` are required for `feedback` and `project`
41+
memories — they let future readers judge edge cases. `reference`
42+
memories may be shorter (link + one-line purpose).
43+
44+
Link related memories with `[[slug]]` (the target file's `name:`).
45+
46+
## Routing — repo vs. auto-memory
47+
48+
| Kind of fact | Goes to |
49+
|---|---|
50+
| Personal preference, role, style | auto-memory (`user`) |
51+
| Personal habit feedback | auto-memory (`feedback`) |
52+
| Team coding/test/PR rule | **`feedback/`** |
53+
| Durable project rationale | **`project/`** |
54+
| Ephemeral project state (freezes, OOO, deadlines) | auto-memory (`project`) — would rot in git |
55+
| Team-shared external resource | **`reference/`** |
56+
| Personal external resource | auto-memory (`reference`) |
57+
58+
**Litmus test:** *would a teammate joining the project next month benefit
59+
from knowing this?* If no, it belongs in auto-memory.
60+
61+
## Write protocol
62+
63+
1. Write the file **uncommitted** in the working tree.
64+
2. **Surface the change** in the same turn so the human can review.
65+
3. **Do not auto-commit** memory edits as part of an unrelated PR — memory
66+
changes should be reviewable on their own.
67+
4. **Correct in place** when an existing memory turns out wrong; `git blame`
68+
carries the history.
69+
5. **Propose deletion explicitly** when a memory has gone stale, rather
70+
than silently editing it out.
71+
72+
## Updating the index
73+
74+
After adding or removing a memory file, update `MEMORY.md`. One line under
75+
the matching section:
76+
77+
- [slug](category/slug.md) — description from frontmatter
78+
79+
Keep the index short — long descriptions belong in the file body.
80+
81+
## Anti-patterns — do not store
82+
83+
- Anything derivable from the code (module structure, paths, conventions
84+
visible in source). Use `grep` / `Read`.
85+
- Recent-activity summaries or PR lists — `git log` is authoritative.
86+
- Fix recipes for specific bugs — the commit message belongs in the commit.
87+
- Anything already documented in `.agents/` reference docs — keep one
88+
source of truth.
89+
- Personal preferences (see routing).

.agents/memory/feedback/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)