Skip to content

Commit b5c19ef

Browse files
committed
**fix(docs): update punctuation for clarity and consistency across documentation**
- **General Changes:** - Replaced inconsistent usage of em dashes (—) with en dashes (–) or hyphens (-) across multiple documentation files for clarity and uniformity. - Standardized punctuation in lists, sentences, and headers across documentation. - **Specific Updates:** - `CONTRIBUTING.md`: Adjusted punctuation in code, project layout, and contribution guidelines for consistency. - `CODE_OF_CONDUCT.md`: Reworded sentences for smoother readability and updated em dash usage. - `COMPATIBILITY.md`: Refined formatting in the driver and backend setup sections by replacing em dashes. - `DATABASE.md`: Removed redundant `-id` suffix from foreign key descriptions for simplification. - `.idea/jsonSchemas.xml`: Added schema reference for GitHub issue template configuration. - `.idea/dictionaries/project.xml`: Added terms like "gradeway" and "gradienttim" to the custom project dictionary. - `ARCHITECTURE.md`: Clarified role vs. group definitions and updated punctuation for better readability. - `README.md`, `CLAUDE.md`: Standardized hyphens in navigation links and descriptions for uniform writing style. - `CommonGradeway.kt`: Consolidated comments and replaced `stopKoin()` with `koin.close()` for proper Koin cleanup.
1 parent 18c8574 commit b5c19ef

11 files changed

Lines changed: 95 additions & 88 deletions

File tree

‎.claude/skills/sync-translation-keys/SKILL.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,29 @@ block body), it prints a warning to stderr rather than silently misreporting.
3131

3232
**REMOVE**: just delete those lines, no replacement needed.
3333

34-
**ADD**: for each missing key, don't invent wording from scratch — read the call site
34+
**ADD**: for each missing key, don't invent wording from scratch - read the call site
3535
in the `.kt` file to see exactly which `Component.text(...)` args are passed and in
3636
what order (that's your `<arg:N>` count), then find the closest analogous *existing*
37-
key in `en.properties` (same suffix — e.g. `clearPermissions.success` for a new
37+
key in `en.properties` (same suffix - e.g. `clearPermissions.success` for a new
3838
`clearAttributes.success`, `permission.add.invalidType` for a new
3939
`*.attributeTypeNotRegistered`) and copy its exact tag structure
4040
(`<prefix>`, `<red>`/`<gray>`/`<green>`, `<primary>`/`<secondary>`), only swapping the
4141
noun/arg indices. Insert the new line at the position matching the code's declaration
4242
order within its command group, not at the end of the file.
4343

4444
Watch for two recurring patterns in this codebase:
45-
- A key's args don't always map 1:1 to its name — e.g. some `invalidUuid`/`invalidName`
45+
46+
- A key's args don't always map 1:1 to its name - e.g. some `invalidUuid`/`invalidName`
4647
keys only reference `<arg:1>` and leave `<arg:0>` (the `idOrName`) unused in the
4748
message text. Match what the call site actually passes, not what seems intuitive.
4849
- The generic-helper keys (`setPermission`, `clearAttributes`, etc.) are shared across
49-
`group`/`player`/`role` — when one is missing for one entity type, check whether
50+
`group`/`player`/`role` - when one is missing for one entity type, check whether
5051
the identical suffix already exists for a sibling entity type and mirror its wording
5152
exactly, only swapping the entity noun (player/role/group).
5253

5354
## After editing
5455

55-
Re-run the script — both `REMOVE` and `ADD` should be empty, with no warnings on
56+
Re-run the script - both `REMOVE` and `ADD` should be empty, with no warnings on
5657
stderr. Also spot-check for duplicate keys:
5758
`grep -oP '^gradeway\.[a-zA-Z0-9._]+(?==)' en.properties | sort | uniq -d` should print
5859
nothing.

‎.idea/dictionaries/project.xml‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/jsonSchemas.xml‎

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ARCHITECTURE.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Architecture: Player, Role & Group model
22

33
Gradeway's permission model has three core entities: **Player**, **Role**, and **Group**. If you've used LuckPerms or a
4-
similar plugin before, the naming here is a common source of confusion — in particular, **Gradeway's "group" is a
4+
similar plugin before, the naming here is a common source of confusion – in particular, **Gradeway's "group" is a
55
different concept as a LuckPerms "group"**. This document explains what each entity actually is, how they relate, and
66
how permissions and weight are resolved.
77

@@ -14,7 +14,7 @@ For the underlying table layout, see [DATABASE.md](./DATABASE.md).
1414
| A "group" (e.g. `admin`, `default`) assigned to a user, with permissions, weight, and inheritance | **Role** |
1515
| Group inheritance (`parent` groups) | **Role** parents (`RoleParentEntity`) |
1616
| A user's "primary group" | A player's **primary role** (`primaryRoleId`) |
17-
| (no real equivalent) | **Group** — see below |
17+
| (no real equivalent) | **Group** - see below |
1818

1919
In other words: what you assign to a player, give permissions to, weight, and chain via inheritance is called a **Role**
2020
in Gradeway, not a Group. Gradeway's **Group** is a separate, coarser concept: a container that a set of roles can
@@ -29,20 +29,20 @@ A `PlayerEntity` represents a single Minecraft player (keyed by UUID). A player
2929

3030
- its own directly assigned permissions, permission templates, and attributes
3131
- an explicit `weight` (`-1` means "not set", see [Weight resolution](#weight-resolution))
32-
- any number of assigned **roles**, via `PlayerRoleEntity` — each assignment can be paused (`pausedAt`), time-limited
32+
- any number of assigned **roles**, via `PlayerRoleEntity` - each assignment can be paused (`pausedAt`), time-limited
3333
(`untilAt`), and one of them can be flagged as the player's **primary role**
3434
(`primaryRoleId` on the player)
3535

3636
Source: `core-api/.../entity/player/PlayerEntity.kt`, `PlayerRoleEntity.kt`.
3737

3838
### Role
3939

40-
A `RoleEntity` is the thing you actually assign to players to grant them permissions — this is the concept LuckPerms
40+
A `RoleEntity` is the thing you actually assign to players to grant them permissions – this is the concept LuckPerms
4141
calls a "group". A role has:
4242

4343
- its own permissions, permission templates, and attributes
4444
- a `weight`, used to decide priority when a player has multiple roles (e.g., for prefix/suffix selection or precedence)
45-
- **parent roles** (`RoleParentEntity`) — a role inherits its parents' permissions and attributes recursively, the same
45+
- **parent roles** (`RoleParentEntity`) - a role inherits its parents' permissions and attributes recursively, the same
4646
way LuckPerms group inheritance works
4747
- membership in any number of **groups** (`RoleGroupEntity`)
4848

@@ -67,9 +67,9 @@ Source: `core-api/.../entity/group/GroupEntity.kt`, `RoleService.kt`.
6767
Key points:
6868

6969
- A player can hold many roles at once; one may be flagged **primary**.
70-
- A role can have multiple parent roles, and parents can themselves have parents — inheritance is resolved recursively.
70+
- A role can have multiple parent roles, and parents can themselves have parents – inheritance is resolved recursively.
7171
- A role can belong to multiple groups, and a group can contain multiple roles. This is a plain many-to-many
72-
association, not a hierarchy — groups don't nest and don't inherit from each other.
72+
association, not a hierarchy – groups don't nest and don't inherit from each other.
7373
- Groups sit "beside" roles, not above players. A player is never a member of a group directly.
7474

7575
## Weight resolution
@@ -88,11 +88,11 @@ each level:
8888
`PermissionService.getEffective{Role,Player}Permissions` compute the full, flattened permission set:
8989

9090
- **Effective role permissions**: the role's own enabled permissions, plus permissions from its assigned permission
91-
templates, plus permissions from every group it belongs to, plus permissions inherited from its parent roles —
91+
templates, plus permissions from every group it belongs to, plus permissions inherited from its parent roles –
9292
recursively.
9393
- **Effective player permissions**: the player's own enabled permissions, plus permissions from their assigned
9494
templates, plus the effective permissions of every *active* role assigned to them (active meaning not paused and not
9595
expired). Each role's effective permissions already fold in its groups and parent chain as described above.
9696

9797
Results are cached per entity (`gradeway.caches.*EffectivePermissions`) and invalidated on any change to a player, role,
98-
group, permission, or template — see `CommonPermissionService.invalidateFor`.
98+
group, permission, or template - see `CommonPermissionService.invalidateFor`.

‎CLAUDE.md‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project
66

7-
Gradeway is a work-in-progress Minecraft permission gateway ("gateway" — a LuckPerms-style permission/role/group system)
7+
Gradeway is a work-in-progress Minecraft permission gateway ("gateway" – a LuckPerms-style permission/role/group system)
88
written in Kotlin, designed to run across multiple Minecraft server platforms (Bukkit, Paper, BungeeCord, Velocity)
99
sharing one database-backed permission model.
1010

@@ -22,33 +22,33 @@ sharing one database-backed permission model.
2222
```
2323

2424
CI (`.github/workflows/`) runs `detekt`, `spotlessCheck`, `:core-common:test`, then `:core-common:build`, in that order,
25-
against JDK 25 —
25+
against JDK 25 -
2626
mirror that sequence locally before considering work done.
2727

2828
Tests use `kotlin.test` on JUnit Platform with backtick-quoted test names (`` fun `isUuid accepts valid uuids`() ``).
2929
New tests belong under `core-common/src/test`; other modules have no test sources yet.
3030

31-
Spotless enforces the license header from `.assets/LICENSE_HEADER` on every `.kt` file — new files need it,
31+
Spotless enforces the license header from `.assets/LICENSE_HEADER` on every `.kt` file - new files need it,
3232
`spotlessApply` will add it automatically.
3333

3434
## Module layout
3535

36-
- `core-api` — pure interfaces/data model, no implementation logic. Defines `Driver`,
36+
- `core-api` - pure interfaces/data model, no implementation logic. Defines `Driver`,
3737
`*Manager`/`*Service` interfaces, entities (`PlayerEntity`, `RoleEntity`, `GroupEntity`,
3838
`PermissionEntity`, attribute types, etc.), the KSP processor, and config data classes. Almost everything here is
3939
meant to be implemented elsewhere.
40-
- `core-common` — the actual engine: `Common`-prefixed implementations of every `core-api`
40+
- `core-common` - the actual engine: `Common`-prefixed implementations of every `core-api`
4141
interface (e.g. `CommonPermissionService` implements `PermissionService`,
4242
`CommonDriverManager` implements `DriverManager`), Exposed table definitions (`database/models/**`), Cloud command
4343
builders (`commands/**`), and the migration strategy for importing from LuckPerms. This is the module platform plugins
4444
depend on and the only one with meaningful test coverage.
45-
- `driver-database-*` / `driver-messaging-redis` — standalone driver plugins for a single backend (Postgres, MySQL,
45+
- `driver-database-*` / `driver-messaging-redis` - standalone driver plugins for a single backend (Postgres, MySQL,
4646
MariaDB, SQLite, SQL Server, Oracle, H2, Redis). Each driver module compiles against `core-api` only (`compileOnly`),
4747
not `core-common`, and is shaded into its own fat jar via the Shadow plugin, dropped into a `drivers/` folder the
4848
running plugin scans.
49-
- `plugin-bukkit-shared` — code shared between `plugin-bukkit` and `plugin-paper` (plugin messaging driver/broker,
49+
- `plugin-bukkit-shared` - code shared between `plugin-bukkit` and `plugin-paper` (plugin messaging driver/broker,
5050
connection listener, custom `PermissibleBase`).
51-
- `plugin-bukkit`, `plugin-paper`, `plugin-bungeecord`, `plugin-velocity` — the actual platform entry points
51+
- `plugin-bukkit`, `plugin-paper`, `plugin-bungeecord`, `plugin-velocity` - the actual platform entry points
5252
(`GradewayPlugin`/`GradewayVelocity`), each wiring a `CommonGradeway<TheirPlatformConfig>`
5353
to platform APIs (command manager, audiences, permission providers, connection listeners).
5454

@@ -67,40 +67,40 @@ depending on their client libraries. The full loop:
6767
3. At runtime, `CommonDriverManager` (`core-common/.../managers/CommonDriverManager.kt`) scans a
6868
`drivers/` directory next to the plugin data folder, opens each jar as a `ZipFile`, reads
6969
`driver.json`, loads the class via a dedicated `URLClassLoader`, and instantiates it.
70-
4. Platform-specific drivers that need direct access to a platform object (e.g. a Bukkit
70+
4. Platform-specific drivers that need direct access to a platform object (e.g., a Bukkit
7171
`JavaPlugin` for plugin-messaging) skip the jar-scanning path and are registered directly via
7272
`DriverManager.registerDriver(...)` (see `GradewayPlugin.onEnable()`).
7373

7474
When adding a new database/messaging backend, follow the pattern of an existing
7575
`driver-database-*` module: `ksp(project(":core-api"))` + `compileOnly(project(":core-api"))`, implement the adapter,
7676
shade third-party client deps via the Shadow plugin, and disable the plain `jar` task in favor of `shadowJar`.
7777

78-
### Dependency injection & lifecycle
78+
### Dependency injection and lifecycle
7979

8080
`CommonGradeway<TPlatformConfig>` (`core-common/.../CommonGradeway.kt`) is the root object each platform plugin
8181
constructs and owns. It uses Koin (`startKoin`/`stopKoin`) to wire every
8282
`Common*` implementation to its `core-api` interface, generic over the platform's own config type
83-
(`BukkitPlatformConfig`, `VelocityPlatformConfig`, etc. — see `ConfigManager<TPlatformConfig>`). Lifecycle is explicit
83+
(`BukkitPlatformConfig`, `VelocityPlatformConfig`, etc. - see `ConfigManager<TPlatformConfig>`). Lifecycle is explicit
8484
and ordered: `load()` starts Koin and loads configs → drivers → languages → messaging → confirmations; `enable()`/
8585
`disable()` toggle databases and messaging without tearing down Koin; `unload()` reverses `load()` and calls
86-
`stopKoin()` (not `koin.close()` — `stopKoin()`
86+
`stopKoin()` (not `koin.close()` - `stopKoin()`
8787
also deregisters from Koin's global context, which a plain `close()` doesn't, so a second
88-
`load()` in the same JVM — e.g. a plugin disable/enable cycle — would otherwise fail with
88+
`load()` in the same JVM - e.g., a plugin disable/enable cycle - would otherwise fail with
8989
`KoinApplicationAlreadyStartedException`). `GradewayState` gates re-entrant calls (`allowLoad`/
9090
`allowUnload`).
9191

9292
### Error handling
9393

9494
Manager/service methods that can fail return Arrow's `Either<Throwable, T>`, composed with
95-
`either { ... }` / `raise(...)` blocks rather than thrown exceptions — follow this convention for new manager/service
95+
`either { ... }` / `raise(...)` blocks rather than thrown exceptions - follow this convention for new manager/service
9696
code instead of introducing exceptions or nullable-return error signaling.
9797

9898
### Persistence
9999

100100
Exposed (`org.jetbrains.exposed`) DAO/DSL over JDBC. Tables live in
101101
`core-common/.../database/models/**`, one file per entity, generally paired with a "reference"
102102
type in `core-api` (e.g. `RoleEntity`/`RoleReference`) used to pass around an identity without pulling in the full row.
103-
Migrations are handled by `MigrationManager`/`MigrationStrategy` — the existing `LuckPermsMigrationStrategy` is the
103+
Migrations are handled by `MigrationManager`/`MigrationStrategy` - the existing `LuckPermsMigrationStrategy` is the
104104
reference implementation for importing another plugin's data.
105105

106106
### Commands
@@ -117,7 +117,7 @@ attributes, shared across role/group/player) live in
117117
`SuggestionProcessor.passThrough()` because id suggestions are UUIDs, not the name text the user typed, which the
118118
default filtering processor would incorrectly exclude.
119119

120-
User-facing text is never hardcoded — commands send `Component.translatable("gradeway...")` keys resolved against
120+
User-facing text is never hardcoded - commands send `Component.translatable("gradeway...")` keys resolved against
121121
`core-common/src/main/resources/languages/en.properties`. After touching any command builder, use the
122122
**sync-translation-keys** skill to reconcile added/removed
123123
`Component.translatable` keys against `en.properties`, including the `$entityType`-templated keys used by the generic

‎CODE_OF_CONDUCT.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Examples of unacceptable behavior include:
2222
- Trolling, insulting or derogatory comments, and personal or political attacks
2323
- Public or private harassment
2424
- Publishing others' private information, such as a physical or email address, without their explicit permission
25-
- Other conduct which could reasonably be considered inappropriate in a professional setting
25+
- Other conduct that could reasonably be considered inappropriate in a professional setting
2626

2727
## Scope
2828

29-
This Code of Conduct applies within all project spaces — the GitHub repository (issues, pull requests, discussions) and
30-
the project's Discord server — and also applies when an individual is officially representing the project in public
29+
This Code of Conduct applies within all project spaces – the GitHub repository (issues, pull requests, discussions) and
30+
the project's Discord server – and also applies when an individual is officially representing the project in public
3131
spaces.
3232

3333
## Enforcement

‎COMPATIBILITY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
| H2 | Database | `driver-database-h2` |
2323
| Redis | Messaging | `driver-messaging-redis` |
2424

25-
Every backend builds into its own driver jar. Drop the ones you need into the `drivers/` folder next to the plugin —
25+
Every backend builds into its own driver jar. Drop the ones you need into the `drivers/` folder next to the plugin -
2626
only the client libraries for the drivers you actually use get loaded.

0 commit comments

Comments
 (0)