diff --git a/CHANGELOG.md b/CHANGELOG.md index a28990c8..717f331c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,13 @@ Releases up to 2.63.0 are listed in - Two templates no longer state rules that contradict each other ([#2137]) - Nine pairs of rules in different templates no longer contradict ([#2138]) - Seven rules a second agent review found conflicting or over-broad are fixed ([#2140]) +- Five rules shortened past their meaning get their conditions back ([#2144]) [#2136]: https://github.com/solid-ai-dev/solid-ai-templates/pull/2136 [#2137]: https://github.com/solid-ai-dev/solid-ai-templates/pull/2137 [#2138]: https://github.com/solid-ai-dev/solid-ai-templates/pull/2138 [#2140]: https://github.com/solid-ai-dev/solid-ai-templates/pull/2140 +[#2144]: https://github.com/solid-ai-dev/solid-ai-templates/pull/2144 ## [3.0.0] - 2026-10-19 diff --git a/templates/backend/api.md b/templates/backend/api.md index cbcf3009..29a8db30 100644 --- a/templates/backend/api.md +++ b/templates/backend/api.md @@ -53,7 +53,7 @@ ## Backward compatibility - Release a new major version for every breaking change: a removed or - renamed response field, a changed field type, a new auth scheme + renamed response field, a changed field type, a switched auth scheme - Treat as breaking, too, a changed verb or path, wire protocol or Content-Type, and business logic that changes observable results - Never bump the version for an additive change (MUST NOT): a new optional diff --git a/templates/backend/edge.md b/templates/backend/edge.md index 1fd7f1db..8f7bc4dc 100644 --- a/templates/backend/edge.md +++ b/templates/backend/edge.md @@ -4,7 +4,8 @@ Rules for the reverse proxy, load balancer or gateway in front of an application exposed to untrusted networks. The edge terminates TLS, routes -and shields the application; keep business logic out of it. +and shields the application; keep business logic out of it. A gateway +inside a service mesh follows the microservices rules instead. ## TLS termination diff --git a/templates/backend/microservices.md b/templates/backend/microservices.md index fb489612..8ab10841 100644 --- a/templates/backend/microservices.md +++ b/templates/backend/microservices.md @@ -24,7 +24,8 @@ Do not apply this template to a monolith or a single-service project. blocks independent deployment - Limit shared libraries to cross-cutting infrastructure (logging, tracing, HTTP client config) (MUST); never domain logic -- Merge two services that keep changing together +- Treat two services that keep changing together as likely one service, + and review whether to merge them ## Inter-service communication @@ -50,8 +51,8 @@ Choose the style by the interaction: cannot be both consistent and highly available (CAP) - Copy read-only data across boundaries by events, never by joins across service databases -- Use the outbox pattern so a database write and its event publish are - atomic +- Use the outbox pattern so a database write and its event record commit + together; a relay publishes the event afterwards ## Distributed transactions diff --git a/templates/backend/webhooks.md b/templates/backend/webhooks.md index 7acb275e..27830a53 100644 --- a/templates/backend/webhooks.md +++ b/templates/backend/webhooks.md @@ -22,7 +22,7 @@ messaging rules for idempotency, retries, DLQs and backpressure. ## Respond fast - Return 2xx within the provider's timeout: acknowledge, then process - asynchronously, never inline on the request path + asynchronously; never run heavy work inline on the request path - Persist or enqueue the event before responding so an acknowledged event is never lost diff --git a/templates/frontend/quality.md b/templates/frontend/quality.md index 1b37b391..13a4684e 100644 --- a/templates/frontend/quality.md +++ b/templates/frontend/quality.md @@ -14,17 +14,19 @@ - Separate data fetching and state (container) from rendering (presentational); give presentational components only props and no side - effects + effects (SHOULD) - Expose related sub-components that share implicit state as a compound component (``, ``, ``) rather than drill props + (SHOULD) - Subscribe to external state (store, event bus, WebSocket) through one - subscription point, and unsubscribe on unmount + subscription point, and unsubscribe on unmount (SHOULD) - Wrap a third-party library (analytics, maps, payment SDK) behind a thin project-owned interface; never scatter its calls across components + (SHOULD) - Apply a mutation's expected result at once and roll back on failure; - document the rollback path -- Never connect components through an event bus; share state or lift it - up instead + document the rollback path (SHOULD) +- Avoid connecting components through an event bus; share state or lift + it up instead (SHOULD NOT) ## State management diff --git a/tests/baselines/template-quality.txt b/tests/baselines/template-quality.txt index 16e11f0e..5ce3dffa 100644 --- a/tests/baselines/template-quality.txt +++ b/tests/baselines/template-quality.txt @@ -8,7 +8,7 @@ templates/backend/auth.md 98.6 templates/backend/caching.md 100.0 templates/backend/concurrency.md 98.1 templates/backend/database.md 100.0 -templates/backend/edge.md 97.9 +templates/backend/edge.md 97.5 templates/backend/errors.md 99.3 templates/backend/features.md 100.0 templates/backend/grpc.md 96.1