@ryuenn3123/agentic-senior-core 4.0.3 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.agent-context/prompts/compact-natural-mode.md +100 -0
  2. package/.agent-context/prompts/init-project.md +1 -0
  3. package/.agent-context/prompts/refactor.md +1 -0
  4. package/.agent-context/review-checklists/pr-checklist.md +1 -0
  5. package/.agent-context/rules/api-docs.md +14 -0
  6. package/.agent-context/rules/api-versioning.md +93 -0
  7. package/.agent-context/rules/architecture.md +10 -0
  8. package/.agent-context/rules/background-jobs.md +93 -0
  9. package/.agent-context/rules/config-and-flags.md +79 -0
  10. package/.agent-context/rules/database-design.md +32 -0
  11. package/.agent-context/rules/frontend-architecture.md +35 -0
  12. package/.agent-context/rules/migrations.md +84 -0
  13. package/.agent-context/rules/naming-conv.md +6 -3
  14. package/.agent-context/rules/observability.md +69 -0
  15. package/.agent-context/rules/resilience.md +78 -0
  16. package/.agent-context/rules/security.md +28 -0
  17. package/AGENTS.md +13 -15
  18. package/README.md +102 -91
  19. package/benchmarks/README.md +40 -0
  20. package/benchmarks/compact-natural-mode/fixtures.mjs +359 -0
  21. package/benchmarks/compact-natural-mode/scorer.mjs +331 -0
  22. package/benchmarks/runtime-token-saver/fixtures.mjs +613 -0
  23. package/bin/agentic-senior-core.js +6 -0
  24. package/bin/ascx.js +23 -0
  25. package/lib/cli/adaptive-context/catalog.mjs +428 -0
  26. package/lib/cli/adaptive-context/file-signals.mjs +100 -0
  27. package/lib/cli/adaptive-context/implications.mjs +44 -0
  28. package/lib/cli/adaptive-context.mjs +365 -0
  29. package/lib/cli/ascx/adapters/git-diff.mjs +223 -0
  30. package/lib/cli/ascx/adapters/git-status.mjs +145 -0
  31. package/lib/cli/ascx/adapters/npm-test.mjs +120 -0
  32. package/lib/cli/ascx/fixture-evaluator.mjs +180 -0
  33. package/lib/cli/ascx/formatter.mjs +46 -0
  34. package/lib/cli/ascx/lexer.mjs +113 -0
  35. package/lib/cli/ascx/runtime.mjs +188 -0
  36. package/lib/cli/ascx/tee-writer.mjs +38 -0
  37. package/lib/cli/ascx/token-estimate.mjs +15 -0
  38. package/lib/cli/commands/context.mjs +140 -0
  39. package/lib/cli/commands/init.mjs +2 -1
  40. package/lib/cli/commands/optimize.mjs +143 -2
  41. package/lib/cli/commands/upgrade.mjs +2 -0
  42. package/lib/cli/compiler.mjs +9 -0
  43. package/lib/cli/token-optimization.mjs +161 -6
  44. package/lib/cli/utils.mjs +15 -1
  45. package/package.json +11 -5
  46. package/scripts/adaptive-context/fixtures.mjs +188 -0
  47. package/scripts/adaptive-context-benchmark.mjs +9 -0
  48. package/scripts/ascx-runtime-token-saver-benchmark.mjs +9 -0
  49. package/scripts/audit-cache-layer-contract.mjs +5 -0
  50. package/scripts/audit-caching-scope-hygiene.mjs +5 -0
  51. package/scripts/clean-local-artifacts.mjs +0 -1
  52. package/scripts/compact-natural-mode-benchmark.mjs +9 -0
  53. package/scripts/frontend-usability-audit.mjs +5 -8
  54. package/scripts/release-gate/static-checks.mjs +7 -7
  55. package/scripts/validate/config.mjs +1 -2
  56. package/scripts/validate/coverage-checks.mjs +1 -42
  57. package/scripts/validate.mjs +11 -7
  58. package/scripts/migrate-rule-format/id-prefix-table.mjs +0 -37
  59. package/scripts/migrate-rule-format/parse-legacy.mjs +0 -180
  60. package/scripts/migrate-rule-format/render-new.mjs +0 -169
  61. package/scripts/migrate-rule-format/roundtrip-validate.mjs +0 -89
  62. package/scripts/migrate-rule-format.mjs +0 -192
  63. package/scripts/v3-purge-audit.mjs +0 -236
@@ -0,0 +1,100 @@
1
+ # Compact Natural Mode
2
+
3
+ Status: active default response contract.
4
+
5
+ Use this prompt for final user-facing replies after the task-specific rule, prompt, checklist, and validation work is complete.
6
+
7
+ ## Purpose
8
+
9
+ Write the smallest complete answer that still lets the next developer act correctly.
10
+
11
+ Compact means high signal. It does not mean broken grammar, dialect, clipped fragments, or hiding evidence.
12
+
13
+ ## Always Remove
14
+
15
+ - greetings, affirmations, and repeated restatements
16
+ - narration about what you are about to do
17
+ - generic closing offers
18
+ - padding paragraphs that add no new technical content
19
+ - repeated summaries of the same decision
20
+
21
+ ## Always Preserve
22
+
23
+ - exact commands
24
+ - exact file paths and line numbers
25
+ - exact error messages, assertions, exit codes, and stack-trace highlights
26
+ - validation status, including tests not run
27
+ - assumptions, scope qualifiers, blockers, risks, and next actions
28
+ - destructive-operation warnings
29
+ - breaking changes and migration notes
30
+
31
+ ## Task Shapes
32
+
33
+ Use natural prose inside these shapes. Omit fields that do not apply, except safety fields.
34
+
35
+ Debug/root cause:
36
+
37
+ ```text
38
+ Root Cause: <one sentence>
39
+ Evidence: <exact error, command output, or file:line>
40
+ Fix: <exact command or code direction>
41
+ Next: <verification step>
42
+ ```
43
+
44
+ Test failure:
45
+
46
+ ```text
47
+ Failed: <test name>
48
+ Expected/Got: <value> / <value>
49
+ At: <file:line>
50
+ Evidence: <exact assertion or root error>
51
+ Fix direction: <one sentence>
52
+ ```
53
+
54
+ Code review finding:
55
+
56
+ ```text
57
+ [critical|warn|nit] <file>:<line> - <concern>. <requested change>
58
+ ```
59
+
60
+ Implementation/refactor summary:
61
+
62
+ ```text
63
+ Changed: <what changed>
64
+ Reason: <why>
65
+ Behavior: <changed, unchanged, or not verified>
66
+ Validation: <what ran or was not run>
67
+ Risk: <only if relevant>
68
+ ```
69
+
70
+ Destructive command:
71
+
72
+ ```text
73
+ WARNING: <what this destroys and whether it is reversible>
74
+ Command: <exact command>
75
+ Precondition: <what must be true before running>
76
+ ```
77
+
78
+ Security finding:
79
+
80
+ ```text
81
+ Severity: <critical|high|medium|low>
82
+ Class: <vulnerability class>
83
+ Location: <file:line>
84
+ Impact: <who or what is affected>
85
+ Evidence: <exact code, behavior, or command output>
86
+ Remediation: <specific fix direction>
87
+ Validation: <how to prove it is fixed>
88
+ ```
89
+
90
+ Planning/architecture may be longer. Keep decision, rationale, alternatives, tradeoffs, assumptions, and open questions visible.
91
+
92
+ ## Second-Pass Check
93
+
94
+ Before finalizing:
95
+
96
+ 1. Remove any sentence that adds no new technical content.
97
+ 2. Confirm mandatory evidence atoms remain exact.
98
+ 3. Confirm assumptions and validation gaps are visible.
99
+ 4. Confirm the answer has a decision or next action when the user asked for one.
100
+ 5. Confirm the tone is natural professional writing.
@@ -46,6 +46,7 @@ If the user specifies a framework, runtime, or architecture constraint, the agen
46
46
  - Set up configuration, validation, error handling, observability, health checks, and persistence only when they fit the approved runtime and project scope.
47
47
  - Every file must follow [naming conventions](../rules/naming-conv.md).
48
48
  - Every module must follow [architecture.md](../rules/architecture.md).
49
+ - New code must pass the natural implementation pass in [architecture.md](../rules/architecture.md): start with the simplest correct flow, add complexity only when the requirement or repo evidence needs it, and do not add files or layers for small tasks.
49
50
  - Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md).
50
51
  - Use official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly.
51
52
  - Do not assemble a framework project from scratch by habit when official setup commands create the supported structure. Manual assembly is allowed only for tiny prototypes, educational demos, unusual repo constraints, or a documented architecture reason.
@@ -20,6 +20,7 @@ Before editing:
20
20
  Refactor rules:
21
21
  - Improve clarity, boundaries, naming, validation, error handling, tests, and docs.
22
22
  - Prioritize maintainability over compressed one-liners.
23
+ - Apply the natural implementation pass from architecture.md: keep the main flow traceable, use early returns where they reduce nesting, and avoid helper chains that only make the code look abstract.
23
24
  - Do not choose a stack, framework, library, or topology from offline assumptions.
24
25
  - Keep module boundaries explicit and project-specific.
25
26
  - Split large files when the split makes the flow easier to understand.
@@ -27,6 +27,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
27
27
  - [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
28
28
  - [ ] Readability over brevity for maintainability
29
29
  - [ ] Complexity budget was applied: equivalent behavior uses fewer moving parts without losing validation, error handling, fallbacks, accessibility, tests, or security boundaries.
30
+ - [ ] Natural implementation pass was applied: the main flow is traceable, names are domain-specific, helpers carry real meaning, and compact code did not hide safeguards.
30
31
  - [ ] Controllers, route handlers, and transport adapters do not contain business policy, raw queries, or cross-resource orchestration.
31
32
  - [ ] Services or use cases own business flow, transaction boundaries, and mutation safety.
32
33
  - [ ] Repositories or adapters own persistence/external IO details without hiding business decisions.
@@ -3,6 +3,7 @@ id_prefix: API
3
3
  domain: api-docs
4
4
  priority: high
5
5
  scope: backend
6
+ last_validated: 2026-05-17
6
7
  applies_to:
7
8
  - backend
8
9
  - fullstack
@@ -61,6 +62,7 @@ keywords:
61
62
  6. Do not write "see code" as the contract.
62
63
  7. Do not expose generic `object` or `any` contract shapes when the boundary can be typed.
63
64
  8. Public error shapes must be safe, stable, and documented.
65
+ 9. Versioning, deprecation, and support-window obligations for any public surface live in `api-versioning.md`; load it together with this rule when authoring or reviewing a versioned contract change [REF:VER-001].
64
66
 
65
67
  ## API-006: Human Writing Standard (Mandatory)
66
68
 
@@ -107,3 +109,15 @@ keywords:
107
109
  3. Separate facts from assumptions explicitly.
108
110
  4. End major explanations with a clear next action.
109
111
  5. Read the text out loud before shipping. If it sounds robotic, rewrite it.
112
+
113
+ ## API-012: Idempotency as Runtime Invariant
114
+
115
+ 1. Side-effect-producing endpoints (a `POST` that creates a resource, a `PUT` or `PATCH` that mutates a resource, a request that issues a charge, a request that triggers a downstream notification) must accept an idempotency identifier on retry. The identifier is a caller-supplied key on each logical attempt; the producer commits the effect once and stores enough state to recognize the same key.
116
+ 2. The server must return the original response on duplicate submissions of the same idempotency identifier within a documented retention window. The retention window must be long enough to cover the platform's worst-case retry interval (network retry plus client-side retry plus operator-driven replay) and is recorded in the API contract per endpoint, not picked at random per call site.
117
+ 3. The idempotency identifier scope must be documented: per caller, per resource, per tenant, or globally. A scope mismatch (one tenant's key colliding with another's) is a data-leak bug, not a load-balancing edge case.
118
+ 4. The contract must distinguish three duplicate outcomes: replay-of-same-success (return the original 2xx response unchanged), replay-after-permanent-failure (return the original 4xx response unchanged), and replay-with-different-payload-under-same-key (reject with a clear error so the caller does not silently overwrite the recorded result with a new request body).
119
+ 5. Storage for idempotency state must be durable across process restarts; in-memory caches are not sufficient on multi-instance deployments. The store may be the same database, a separate key-value store, or a platform-equivalent dedup layer, provided durability and lookup latency are recorded.
120
+ 6. Reject "the database's primary-key constraint will catch duplicates" as a substitute for an idempotency layer; primary-key collisions surface as 5xx-shaped errors that callers retry, which makes the problem worse.
121
+ 7. Reject silent acceptance of duplicate side-effect-producing requests without a key. A caller that retried without a key gets a 400-class response that names the missing key, not a second charge.
122
+ 8. Authority for the rules above includes IETF RFC 9110 for HTTP method idempotency semantics and successor specifications for the `Idempotency-Key` request header where the platform standardizes one. Verify the current standardization status at audit time, because the header has been a draft and an RFC at different points in its history.
123
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
@@ -0,0 +1,93 @@
1
+ ---
2
+ id_prefix: VER
3
+ domain: api-versioning
4
+ priority: high
5
+ scope: api
6
+ last_validated: 2026-05-17
7
+ applies_to:
8
+ - backend
9
+ - fullstack
10
+ keywords:
11
+ - api-versioning
12
+ - deprecation
13
+ - breaking-changes
14
+ - support-window
15
+ - sunset
16
+ - migration
17
+ ---
18
+
19
+ # API Versioning Boundary
20
+
21
+ A public API surface is a contract with callers the producer does not control. Versioning safety is the property that the producer can evolve the contract without silently breaking those callers, and that callers can recognize and respond to evolution before it forces an outage. Vendor names that may appear in commentary (API gateways, contract registries, deprecation-tracking platforms) are not authority for this rule.
22
+
23
+ ## VER-001: Single versioning strategy per surface (Mandatory)
24
+
25
+ 1. Each public API surface (a service's HTTP endpoints, a service's RPC methods, a published event schema, a CLI's command shape, a published SDK) must adopt one versioning strategy and apply it consistently. Acceptable strategies include URL-path versioning, header-based versioning, content-negotiation, schema-driven versioning where the schema carries the version, and date-based versioning. The choice belongs to the surface, not to the developer of the moment.
26
+ 2. Reject mixed strategies on the same surface (path-versioned for some endpoints and header-versioned for others; date-versioned for queries and unversioned for mutations). The mix forces every caller to learn two rules where one is sufficient.
27
+ 3. The strategy and its current supported version range must be documented in the surface's contract documentation, not inferred from example URLs or sample headers.
28
+
29
+ ## VER-002: Define breaking and non-breaking changes (Mandatory)
30
+
31
+ 1. The following are breaking changes regardless of strategy:
32
+ - Removing or renaming a request field, a response field, an endpoint, an RPC method, an event type, or a CLI command.
33
+ - Tightening request validation (a value previously accepted is now rejected; a previously optional field is now required).
34
+ - Changing the default value or default behavior of an existing field, parameter, or operation.
35
+ - Changing the type, units, encoding, or semantic meaning of an existing field.
36
+ - Changing the documented error semantics (status code, error code, or error shape) of an existing endpoint.
37
+ 2. The following are non-breaking changes:
38
+ - Adding a new optional request field with a documented default behavior when the field is absent.
39
+ - Adding a new response field that older clients can ignore, on a surface whose contract permits unknown fields (most modern HTTP and event surfaces do; verify per surface).
40
+ - Adding a new endpoint, RPC method, event type, or CLI command.
41
+ - Adding a new optional header with a documented absent-default.
42
+ 3. Any change that is breaking by the definition above must use the surface's versioning strategy or wait for the next major version. Reject silent breaking changes (a field type narrowed without a version bump; a status code changed without a version bump).
43
+
44
+ ## VER-003: Deprecation discipline (Mandatory)
45
+
46
+ 1. A deprecation announces, while the deprecated path is still functional, that callers must migrate. Deprecation must include all of the following before the deprecated path can be removed:
47
+ - A documented sunset date or replacement-criterion that callers can plan against.
48
+ - In-band signaling on the deprecated path, using the platform's standardized mechanism where one exists. For HTTP surfaces, RFC 9745 (the `Deprecation` header) and RFC 8594 (the `Sunset` header) are the current standardized mechanisms; signal with both where the platform and clients support them, and document the in-band signal in the contract documentation. Adoption of these specifications is uneven, so out-of-band communication is acceptable when the in-band channel is unavailable, provided the out-of-band path is documented and reaches affected callers.
49
+ - A migration guide published in the same release that begins deprecation, that names the replacement and shows at least one example transformation per use case the deprecated path supported.
50
+ - Telemetry that tracks remaining traffic on the deprecated path, broken down by caller identity where the surface supports identifying callers, so the producer knows when removal is safe.
51
+ 2. Reject silent removal of an endpoint, field, or method that has not gone through deprecation. "We checked our analytics and nobody used it" is not deprecation; it is an unannounced breaking change with extra steps.
52
+ 3. The sunset date must respect the surface's documented support window (VER-004); a sunset announced today and effective tomorrow is not a sunset, it is a removal.
53
+
54
+ ## VER-004: Support windows (Mandatory)
55
+
56
+ 1. Each public API surface must publish an explicit support window: how long after a new major version ships will the previous major version continue to receive bug fixes, security fixes, and uptime guarantees. The window must be expressed in calendar time (months or years), not in subjective terms.
57
+ 2. The producer must continue to operate prior versions within the support window even when the producer prefers callers had migrated. Removing a still-supported version is a breach of the published contract.
58
+ 3. End-of-life must be announced before the support window expires, with sufficient lead time for callers to migrate. The lead time required depends on the caller population (an internal service may migrate in a sprint; a public SDK with mobile-app callers may need a year because of app-store update cycles); the producer must document the assumption.
59
+ 4. Reject "we will remove it when we feel like it" as a support policy. Reject removing an endpoint, field, or method while it is still inside its published support window.
60
+
61
+ ## VER-005: Additive evolution as default (Mandatory)
62
+
63
+ 1. The default response to a feature request that touches an existing surface is to evolve additively: add a new optional field, a new endpoint, a new optional behavior triggered by an explicit opt-in. Reach for a new major version only when additive evolution costs more than client migration would cost (a fundamental shape change, a security correction that cannot coexist with the old shape, a deprecated dependency removal that callers must follow).
64
+ 2. A new major version is itself a contract that incurs all of VER-001, VER-002, VER-003, and VER-004; it is not a license to ship unannounced breaking changes under a new path.
65
+ 3. Reject `/v2/` (or platform-equivalent) path forks that duplicate the previous version's codebase without a deprecation telemetry plan, a sunset date for the prior version, and a migration guide. A new path without these is two codebases the producer must maintain in parallel forever.
66
+ 4. The producer must not run a `/v1/` and a `/v2/` indefinitely on the same surface in the absence of a sunset plan; that pattern doubles operational cost and dilutes the contract.
67
+
68
+ ## VER-006: Compatibility testing (Mandatory)
69
+
70
+ 1. Every release that touches a public surface must run a compatibility check against the surface's previous supported versions: previously valid requests still validate, previously valid responses still parse against published schemas, previously documented error shapes still surface for the same error conditions.
71
+ 2. The compatibility check must run in CI, not as a manual pre-release step. Reject "we test compatibility manually before release"; manual compatibility checks miss regressions in less-trafficked endpoints.
72
+ 3. The compatibility check's failure must block the release, not file a follow-up ticket.
73
+
74
+ ## VER-007: Reject these bad habits
75
+
76
+ 1. Reject changes that are breaking by VER-002 but ship without a version bump or a deprecation cycle.
77
+ 2. Reject deprecation banners in release notes that have no in-band signal on the deprecated path.
78
+ 3. Reject sunset dates that are not enforced; a producer who keeps the deprecated path alive past sunset trains callers to ignore future sunsets.
79
+ 4. Reject `/v2/` forks of an existing surface that the producer cannot show a migration plan for.
80
+ 5. Reject contract documentation that lists endpoints without naming the version they belong to.
81
+
82
+ ## VER-008: Citations and freshness
83
+
84
+ Authority sources for the rules in this file:
85
+
86
+ - IETF RFC 9745: standardized HTTP `Deprecation` response header for in-band deprecation signaling. Adoption is uneven across clients and intermediaries, so pair with out-of-band documentation.
87
+ - IETF RFC 8594: standardized HTTP `Sunset` response header for in-band sunset-date signaling. Same adoption caveat as RFC 9745.
88
+ - IETF RFC 9457: problem-detail responses for HTTP errors; authority for keeping error semantics stable across versions.
89
+ - OpenAPI Specification (current major version): authority for declaring HTTP surface versioning in machine-readable form when the surface uses HTTP.
90
+ - AsyncAPI Specification (current major version): authority for declaring event-driven surface versioning when the surface publishes events.
91
+
92
+ Vendor-specific API gateways, contract registries, and deprecation-tracking platforms are illustrative implementations of the rules above; they are not authority. The mechanism is platform-specific; the contract obligations above are not.
93
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
@@ -143,3 +143,13 @@ keywords:
143
143
  1. Import through a module's public API instead of reaching into internal files.
144
144
  2. Keep contracts explicit at boundaries between modules.
145
145
  3. If a new developer cannot find the full flow of a feature in one clear area, the structure is too diffuse.
146
+
147
+ ## ARCH-013: Natural Implementation Pass
148
+
149
+ 1. Treat "human-readable" code as code that a maintainer can trace, test, and change safely. Do not optimize for looking hand-written at the expense of behavior.
150
+ 2. Write new code and refactors as a clear sequence of intent: validate the input, name the domain state, perform the operation, then return or report the outcome.
151
+ 3. Prefer early returns for invalid, empty, or unauthorized paths when they reduce nesting and make the happy path easier to follow.
152
+ 4. Keep functions focused on one responsibility, but do not create tiny helper chains unless the helper names a real domain condition, removes repeated logic, or makes the main flow easier to read.
153
+ 5. Avoid dense one-liners, nested ternaries, speculative classes, factories, interfaces, design patterns, and extra layers when direct code preserves the same guarantees.
154
+ 6. Match the local project style before introducing a new pattern. Do not make code generic enough to fit any product.
155
+ 7. Run a final naturalness pass before completion: domain names are specific, booleans expose state or permission, comments explain why only, edge cases are explicit, and simplification did not remove validation, error handling, fallbacks, accessibility, tests, security boundaries, or observability.
@@ -0,0 +1,93 @@
1
+ ---
2
+ id_prefix: JOB
3
+ domain: background-jobs
4
+ priority: high
5
+ scope: backend
6
+ last_validated: 2026-05-17
7
+ applies_to:
8
+ - backend
9
+ - fullstack
10
+ keywords:
11
+ - background-jobs
12
+ - workers
13
+ - queues
14
+ - schedules
15
+ - poison-message
16
+ - backpressure
17
+ ---
18
+
19
+ # Background Jobs Boundary
20
+
21
+ A background job is any code path that runs outside a synchronous user request: scheduled tasks, queued asynchronous work, long-lived consumers of a recurring stream, and one-shot operational tasks. The rules below treat these shapes as different. Vendor names that may appear in commentary (queue platforms, scheduler services, stream-processing runtimes) are not authority for this rule.
22
+
23
+ ## JOB-001: Pick the right job shape (Mandatory)
24
+
25
+ 1. Before adding a job, classify it: scheduled (time-driven, fires at intervals or on a calendar), queued (request-driven asynchronous follow-up to user action), recurring stream (continuous consumer of an event stream), or one-shot operational task (manually triggered or run-to-completion). Use the simplest shape that fits.
26
+ 2. Reject using one shape for everything. A scheduled task that polls a queue is not a queue worker. A queue worker is not a stream consumer. A one-shot operational task is not a permanent scheduled job.
27
+ 3. Reject "fire-and-forget" jobs without observability into success rate, retry rate, and lag. A job that the system cannot detect failing is not a job; it is a hope.
28
+
29
+ ## JOB-002: Job ownership and runbook (Mandatory)
30
+
31
+ Every job, regardless of shape, must record the following before it ships:
32
+
33
+ 1. An owner (team or role) accountable for the job's success.
34
+ 2. An expected runtime budget under normal load.
35
+ 3. A documented failure outcome: what happens if the job fails partially, fails completely, runs late, or runs twice.
36
+ 4. A runbook entry, or platform-equivalent operational note, that names the alert thresholds, the recovery steps, and the data the operator needs to investigate a failure.
37
+
38
+ A job that lacks any of the above is a defect waiting for an incident.
39
+
40
+ ## JOB-003: Idempotency (Mandatory)
41
+
42
+ 1. Every job must be idempotent at the job level: a job that ran partially and was retried, or that was scheduled twice for the same input, must converge to the same final state. The system must not double-charge, double-write, double-notify, or double-grant.
43
+ 2. Idempotency must be enforced on the side of the job that holds the durable record (the database row, the external API's idempotency key acceptance, the event-store dedup key), not only on the side that emits the trigger.
44
+ 3. The job must distinguish "I already did this" (success, no further work) from "the input changed" (treat as a new request) using a stable input identifier; a re-emission of the same logical work must collapse to a single committed effect.
45
+ 4. Reject jobs whose only protection against double-execution is "the queue is configured exactly-once". Treat queue delivery guarantees as best-effort and enforce idempotency in the application.
46
+
47
+ ## JOB-004: Long-running and durable execution (Mandatory)
48
+
49
+ 1. A long-running job must extend its lease, visibility timeout, or platform-equivalent ownership token while it is still doing useful work, so its mid-flight progress does not get re-dispatched to a second worker.
50
+ 2. A long-running job must checkpoint progress to durable storage at intervals that bound replay cost: a process crash must not require redoing more work than the platform's documented loss tolerance allows.
51
+ 3. A long-running job must handle graceful shutdown: when the runtime signals termination (deploy, scaling event, host eviction), the job must stop at the next checkpoint, mark its lease as relinquishable, and exit within the platform's drain window.
52
+ 4. Reject long-running jobs that hold an in-memory buffer with no checkpoint, that ignore graceful-shutdown signals, or that allow a duplicate worker to start when their lease expires without serializing on a durable lock.
53
+
54
+ ## JOB-005: Poison messages and dead letters (Mandatory)
55
+
56
+ 1. Every queue or stream consumer must define a maximum attempt count. After that count, the message must be moved to a dead-letter destination, not retried indefinitely.
57
+ 2. The dead-letter destination must be observable: an alert threshold on its size, an inspectable record per entry, and a documented human recovery path that takes the operator from "alert" to "decided to replay, edit, or discard".
58
+ 3. Replays out of the dead-letter destination must respect job-level idempotency: the original handler must not double-apply effects when a dead-letter message is replayed alongside an already-succeeded retry.
59
+ 4. Reject infinite retries on a poison input. Reject silent message drops with no dead-letter or audit trail. Reject dead-letter destinations that no human is alerted on.
60
+
61
+ ## JOB-006: Time, schedules, and fan-out (Mandatory)
62
+
63
+ 1. Schedule definitions and time-of-event fields must be stored in a timezone-unambiguous form (UTC for storage, with the original timezone retained as metadata when the schedule is meaningful in a local calendar). Naive local-time storage of a moment that crosses a daylight-saving transition is forbidden.
64
+ 2. Where a schedule applies to many entities (per-customer billing run, per-tenant report generation, per-device sync), the implementation must stagger fan-out with jitter so the entities do not all execute on the same instant; the platform's queue and downstream APIs see a smoothed load curve, not a thundering herd.
65
+ 3. Schedules that depend on a calendar (month-end, billing-cycle) must specify the resolution rule for ambiguous calendar dates (the 31st of a 30-day month, the leap day) at design time, not at the first failure.
66
+ 4. Reject schedules whose timezone is implicit. Reject coordinated fan-out that treats every entity as urgent at the same wall-clock instant.
67
+
68
+ ## JOB-007: Backpressure (Mandatory)
69
+
70
+ 1. A queue or stream consumer that cannot keep up must shed load, throttle producers, or expose its lag, not silently grow until memory or storage is exhausted.
71
+ 2. The consumer must expose its current lag, its rejection or shed rate, and its in-flight count as telemetry; the operator must be able to answer "is the consumer slow, the producer fast, or is the queue full?" without reading the queue directly.
72
+ 3. Where the producer is a user request, backpressure must be communicated synchronously to the user (a throttle, a delayed acknowledgement, a queued-for-later response with a tracking identifier), not silently absorbed and lost.
73
+ 4. Reject implementations where the only response to overload is "scale the worker pool"; scaling is a remediation, not a substitute for explicit backpressure.
74
+
75
+ ## JOB-008: Reject these bad habits
76
+
77
+ 1. Reject scheduled jobs that polling-loop through a database table that should have been a queue.
78
+ 2. Reject queue workers that bake business state into the queue payload because no durable record exists.
79
+ 3. Reject stream consumers that hold long-lived in-memory aggregates without a checkpoint and replay strategy.
80
+ 4. Reject "one-shot" operational tasks that have shipped to production three times; if a task is re-run regularly, it is a recurring job and needs the JOB-002 fields.
81
+ 5. Reject "the queue handles retries for us" as the entire retry strategy; pair it with idempotency and a dead-letter destination.
82
+
83
+ ## JOB-009: Citations and freshness
84
+
85
+ Authority and background reading for the rules in this file:
86
+
87
+ - IETF RFC 3339: authority for the wire shape of timezone-aware timestamps used in job payloads.
88
+ - Cron expression specifications and the platform scheduler's documentation: authority for the schedule grammar in use; verify behavior on daylight-saving transitions and leap days against the platform's current major version, because behavior on these edge cases varies between schedulers and between versions of the same scheduler.
89
+ - AWS Well-Architected Reliability Pillar (REL05) and Google SRE Workbook chapters on overload and addressing cascading failures: background reading on backpressure, dead-letter queues, and graceful degradation as deployment-architecture concerns.
90
+ - Job-platform documentation for the runtime in use: authority for visibility-timeout semantics, lease extension, retry-with-backoff defaults, and dead-letter-queue conventions.
91
+
92
+ Vendor-specific job platforms (queue services, stream processors, scheduler services) are illustrative implementations of the outcomes above; they are not authority. Use the platform-appropriate mechanism that exists in the deployed runtime.
93
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
@@ -0,0 +1,79 @@
1
+ ---
2
+ id_prefix: CFG
3
+ domain: config-and-flags
4
+ priority: high
5
+ scope: backend
6
+ last_validated: 2026-05-17
7
+ applies_to:
8
+ - backend
9
+ - frontend
10
+ - fullstack
11
+ keywords:
12
+ - configuration
13
+ - feature-flags
14
+ - kill-switch
15
+ - environment
16
+ - secrets
17
+ - rollout
18
+ ---
19
+
20
+ # Configuration and Feature Flags Boundary
21
+
22
+ Configuration is data that the application reads to decide how to run. Feature flags are configuration whose value is a decision about behavior, evaluated per request, per user, or per tenant. The two rules sets below treat them as different, because their lifetimes, audiences, and failure modes are different. Vendor names that may appear in commentary (configuration providers, feature-flag platforms, secret managers) are not authority for this rule.
23
+
24
+ ## CFG-001: Configuration sources (Mandatory)
25
+
26
+ 1. The application must read all configuration values from one of: process environment, runtime configuration injected by the deploy platform, a documented configuration file outside the source tree, or a secret manager. Constants embedded in source code are forbidden when the value is environment-specific (URLs, hostnames, credentials, region identifiers, tenant identifiers, model identifiers).
27
+ 2. The application must validate every configuration value at startup. A missing required value, a malformed value, or a value outside the documented range must abort startup with a readable error that names the field and the source. Lazy validation that surfaces in a request handler an hour later is forbidden.
28
+ 3. The application must distinguish "no configuration" from "configuration loaded with empty value"; the two cannot be the same code path. A missing key must abort startup; an explicit empty value is a configured choice.
29
+ 4. Configuration that influences security or correctness (allowed origins, signing keys, allow-lists, billing thresholds) must come from a controlled source the operator can audit. The application must record at startup which configuration source supplied the value, without printing the value itself when it is sensitive.
30
+ 5. Reject environment-specific constants in code (`if env === "prod"`, hard-coded production hostnames, production-only API endpoints behind a comment). Branch on capability flags or configuration values instead. Reject treating a build-time constant as a substitute for runtime configuration when the same artifact is shipped to multiple environments.
31
+
32
+ ## CFG-002: Secret handling (Mandatory)
33
+
34
+ 1. Secrets must be retrieved through the platform's secret manager, runtime injection, or environment variables sourced from a controlled secret store. Static secrets in source, in repository configuration, in container images, or in plaintext configuration files are forbidden.
35
+ 2. Secrets must not be logged, included in error responses, included in telemetry payloads, or embedded in any structured event. Identifiers that name the secret (key id, version, source) are acceptable; the secret value is not.
36
+ 3. Secret rotation must be a runtime event the application handles without redeploy on platforms that support it; on platforms that do not, the redeploy procedure must explicitly re-read secrets, not cache them across deploys.
37
+ 4. Reject treating a secret as a feature flag and a feature flag as a secret. Secrets and behavioral flags have different audit, rotation, and exposure rules; collapsing them violates both.
38
+
39
+ ## CFG-003: Feature flag taxonomy (Mandatory)
40
+
41
+ 1. Every feature flag must declare its type before it is used:
42
+ - Release flags: short-lived, gate the rollout of new code; removed after the rollout completes.
43
+ - Operational kill switches: long-lived, allow an operator to disable a code path during an incident; removed only when the gated code path is removed.
44
+ - Experiment flags: assign users into variants and feed the assignment into analytics; removed when the experiment concludes.
45
+ - Entitlement flags: gate a capability behind a permission, plan, license, or tenant attribute; live for the lifetime of the capability.
46
+ 2. The mechanism that evaluates each flag type may differ. Reject one mechanism that mixes release flags, kill switches, experiment flags, and entitlement flags without distinguishing them, because the right rollout, audit, and removal disciplines differ.
47
+ 3. Every flag must record: the flag's type, its owner, its removal criterion (concrete, measurable), and an expiry date. A flag past its expiry without a documented extension is technical debt, not a feature; the audit must surface it.
48
+
49
+ ## CFG-004: Flag evaluation safety (Mandatory)
50
+
51
+ 1. Every flag evaluation must define a safe default that the system uses when the flag service is unreachable, the value cannot be parsed, or the evaluation context is missing. The safe default must not enable destructive, billable, or irrecoverable behavior.
52
+ 2. Flag evaluation must not block a request on a remote call by default; the application must read from a locally cached value with bounded staleness, or the flag platform must run a sidecar with a documented refresh interval, so a flag-service outage cannot turn into a request-handler outage.
53
+ 3. The application must record the flag value used for a given request decision (in a structured event, not a free-text log) so the operator can answer, after the fact, "which variant did this user see?". The recorded value must not include any secret payload that the flag carries.
54
+ 4. Reject flag evaluations that have no safe default, that block synchronously on a remote call from a hot request path, or that cannot be reproduced in telemetry.
55
+
56
+ ## CFG-005: Environment branching (Mandatory)
57
+
58
+ 1. The application must not branch business logic on the name of the environment. `if env === "prod"` and its variants are forbidden; the correct branch is on a configuration value or a capability flag whose name describes the capability, not the environment that happens to enable it.
59
+ 2. Configuration profiles per environment are acceptable when they are explicit data (a `production.yaml` file the deploy platform selects, a parameter store path scoped per environment) rather than embedded conditionals in code.
60
+ 3. Reject conditionals that quietly disable safety checks in non-production environments and re-enable them in production. The check belongs in code; configuration controls thresholds, allow-lists, or capability flags, not whether the check exists.
61
+
62
+ ## CFG-006: Reject these bad habits
63
+
64
+ 1. Reject configuration values that exist only as comments in source ("set this to your production URL").
65
+ 2. Reject feature flags older than their declared expiry that nobody owns.
66
+ 3. Reject "stub the flag for tests" patterns that bypass the flag mechanism in non-test code paths.
67
+ 4. Reject configuration validators that only run in development.
68
+ 5. Reject deploy procedures that ship a new mandatory configuration field without a deploy-ordering note that pairs the new field with the code that requires it.
69
+
70
+ ## CFG-007: Citations and freshness
71
+
72
+ Authority sources for the rules in this file:
73
+
74
+ - The Twelve-Factor App, Section III "Config": authority for the principle that environment-specific configuration is data, not source.
75
+ - OWASP ASVS sections on secret management and credential storage: authority for what counts as a secret, how it must be stored, and how it must not be logged or transmitted.
76
+ - Continuous-delivery and feature-flag literature on flag taxonomy and lifecycle (release flags vs operational kill switches vs experiment flags vs entitlement flags): authority for the multi-type discipline above.
77
+
78
+ Vendor-specific configuration providers, secret managers, and feature-flag platforms are illustrative implementations of the outcomes above; they are not authority. Use the platform-appropriate mechanism that exists in the deployed runtime.
79
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
@@ -3,6 +3,7 @@ id_prefix: DATA
3
3
  domain: database-design
4
4
  priority: high
5
5
  scope: data
6
+ last_validated: 2026-05-17
6
7
  applies_to:
7
8
  - backend
8
9
  - fullstack
@@ -40,3 +41,34 @@ Use the data store, ORM, migration tool, and query style already chosen by the p
40
41
  8. Record explicit decisions for delete semantics (hard delete, soft delete, append-only audit), tenant isolation (none, row-level with `tenant_id` plus row-level security, schema-per-tenant), and normalize-vs-denormalize trade-off for read-heavy or sparse data. Default to the simplest fit, but make the choice explicit in data docs rather than letting it become a side effect of the first migration.
41
42
  9. Cross-domain persistence must respect ownership boundaries. Independent services must not share database tables as an integration contract; modular monoliths may share one database only when module ownership and access paths stay explicit.
42
43
  10. Docs must record entity ownership, relationships, constraints, data lifecycle, migration risk, and assumptions to validate.
44
+
45
+ ## DATA-003: Money and time
46
+
47
+ 1. Monetary amounts must be stored as a fixed-precision integer in the smallest unit of the currency (for example, the smallest indivisible unit defined by the currency's standard subdivision), or as a decimal type with explicit precision and scale matched to the currency's accounting requirements. The chosen representation must be recorded in the data model docs alongside the column it applies to.
48
+ 2. Floating-point types (`float`, `double`, `real`, or platform equivalent) are forbidden for monetary columns. Floating-point arithmetic introduces rounding artifacts that compound across aggregation, settlement, and reconciliation; the cost of correcting them after the fact is higher than the cost of using the right type up front.
49
+ 3. Currency-bearing columns must record the currency code on the same row, not implicitly through the column or the table; an amount without a stored currency is not a quantity, it is a defect waiting for a multi-currency feature.
50
+ 4. Timestamps that represent a real-world moment must be stored in UTC. Timezone information that the user or the source system supplied may be retained as separate metadata when the local calendar is meaningful, but the canonical instant is UTC.
51
+ 5. Naive timestamp storage (a timestamp type with no timezone offset, or a string without an explicit timezone designator) is forbidden for any field that represents a real-world moment. Timestamps that record a wall-clock value (a recurring event in a local calendar, a scheduled time-of-day) are not real-world moments and may use a date or local-time type, but the choice must be explicit, not the default that fell out of the migration tool.
52
+ 6. Conversion to local time must occur only at presentation boundaries (formatted output, user-facing UI, exported reports). Application logic, queries, and inter-service messages must operate on the UTC value.
53
+ 7. Reject floating-point types for monetary columns. Reject naive timestamps for fields that represent a real-world moment. Reject ambiguous "string of digits" amount columns when the database offers a precise numeric type.
54
+
55
+ ## DATA-004: Concurrency and write conflicts
56
+
57
+ 1. Resources that can be edited by independent owners (the same row reachable by multiple users, the same aggregate reachable by multiple sessions, the same record reachable by overlapping batch jobs) must carry an optimistic-concurrency token: a monotonic version column, an `ETag`-style content hash, an updated-at timestamp combined with a precondition, or platform-equivalent compare-and-set primitive.
58
+ 2. The token must travel with the read response so the next write can submit it as a precondition. A write that lacks the token must be rejected, not silently treated as the latest version.
59
+ 3. The conflict response must be explicit and machine-actionable. For HTTP surfaces, an HTTP 409 response is the canonical signal; the response body must include the current state of the resource (or a stable reference the caller can fetch to retrieve it) and a conflict reason the caller can render to the user. The response shape must be documented in the API contract.
60
+ 4. The conflict-resolution strategy must be recorded per resource: prompt the user to merge, retry on a fresh read, drop the change, or escalate to a server-side merge function. "Retry forever" is not a strategy; it must have a bounded attempt count and a documented fallback.
61
+ 5. For workflows where overlapping edits are expected (collaborative documents, multi-step forms with parallel reviewers), use a change-tracking model that captures intent (operations, deltas, change requests) rather than only final-state writes; final-state writes against shared resources without a token are the failure mode this rule prevents.
62
+ 6. Reject implicit last-write-wins on shared mutable resources. Reject "we will solve it when conflicts happen" as a substitute for an explicit token. Reject conflict responses that do not include the current state and a reason the caller can act on.
63
+
64
+ ## DATA-005: Citations and freshness
65
+
66
+ Authority sources for the additions in [REF:DATA-003] and [REF:DATA-004]:
67
+
68
+ - ISO 4217: authority for currency codes and the standardized minor-unit count per currency. Verify the current edition for currency additions and minor-unit changes; the standard is updated periodically.
69
+ - ISO 8601 (and IETF RFC 3339 as the wire-shape profile): authority for timezone-aware timestamp representations.
70
+ - IETF RFC 9110 sections on conditional requests and the `412 Precondition Failed` and `409 Conflict` semantics: authority for the HTTP-side conflict-response shape referenced in [REF:DATA-004].
71
+ - IETF RFC 7232: authority for `ETag` and `If-Match` precondition mechanics on HTTP surfaces.
72
+
73
+ Vendor-specific decimal types, time-handling libraries, and conflict-detection frameworks are illustrative implementations of the rules above; they are not authority. Use the platform-appropriate mechanism that exists in the deployed runtime.
74
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
@@ -3,6 +3,7 @@ id_prefix: FE
3
3
  domain: frontend-architecture
4
4
  priority: high
5
5
  scope: ui
6
+ last_validated: 2026-05-17
6
7
  applies_to:
7
8
  - frontend
8
9
  - fullstack
@@ -107,6 +108,14 @@ Load this rule for UI-facing work. Keep the loaded surface small.
107
108
  4. Keep component states recognizable across hover, focus, loading, success, empty, and error.
108
109
  5. Do not let repeated surfaces share one visual treatment by habit; repetition needs a product reason.
109
110
 
111
+ ## FE-012: Data State Surface
112
+
113
+ 1. Every data-displaying surface must explicitly handle, with distinct UI, the period before any data has arrived for the first time, the case where the result set is empty by query or by absence, the case where prior data is visible while new data fetches in the background, recoverable error, and limited-connectivity or cached-fallback when the product operates outside continuous network coverage.
114
+ 2. The surface must not collapse multiple data states into a single generic spinner, a single generic empty illustration, or a single generic error message; each state carries different operator and user information and must be distinguishable at a glance.
115
+ 3. Do not treat a stale-while-revalidate refresh as a loading state; show the prior data with a visible freshness indicator and update in place when the new result arrives.
116
+ 4. Status changes between these states must be announced to assistive technology through the platform's accessible-status mechanism, per WCAG 2.2 status-message guidance, so non-visual users learn that the surface moved from loading to populated, populated to empty, or populated to error.
117
+ 5. Reject "spinner everywhere" as the default UI for any non-trivial data surface. Reject empty states that look identical to error states. Reject error states that do not name a recovery path.
118
+
110
119
  ## FE-013: Background and Wallpaper Discipline
111
120
 
112
121
  1. Background lines, grids, scanlines, noise, glows, blobs, abstract logos, calibration marks, and decorative geometry are invalid as wallpaper.
@@ -132,3 +141,29 @@ Load this rule for UI-facing work. Keep the loaded surface small.
132
141
 
133
142
  1. Use component kits or headless primitives for behavior and accessibility when they fit. Replace library-default visual language with project-specific composition, tokens, motion, state treatment, and morphology.
134
143
  2. Keep design-intent flexible: lock user goals, accessibility, production readiness, forbidden patterns, and approved continuity; keep exact palette primitives, font families, radius/shadow values, component skins, candidate signature moves, and external website inspiration flexible until evidence or approval locks them. Convert references into product-fit rules; do not copy layout, palette, component skin, brand posture, or visual metaphor.
144
+
145
+ ## FE-017: Interactivity Priority
146
+
147
+ 1. Components that require client-side state, event handling, or interactive behavior must be the smallest unit that genuinely needs them. Wrapping, layout, narrative, and content-presentation components must remain server-rendered or static unless they themselves manage state or handle events.
148
+ 2. The interactive boundary must be drawn deliberately. Promoting a wrapper to client-side just to host a deeper child's interactivity is a defect.
149
+ 3. Use the platform's primitive for interactivity-priority hints (component-level interactivity boundaries, partial hydration, islands, or the framework equivalent) rather than a global default that hydrates everything.
150
+ 4. Operationally, measure responsiveness through Interaction to Next Paint (INP) or the platform's current Core Web Vitals threshold; a regression in INP that originates from over-eager interactivity is a defect, not a runtime cost to accept.
151
+ 5. Reject "make the whole page interactive so this one button works". Reject promoting a layout component to interactive without a recorded reason. Reject defaulting to a heavyweight client-side runtime when the surface is read-only.
152
+
153
+ ## FE-018: Internationalization as Layout
154
+
155
+ 1. Direction-sensitive spacing, alignment, and positioning must use direction-agnostic properties: CSS logical properties (`margin-inline-start`, `padding-block-end`, `inset-inline`, `border-inline-end`) or the framework or design-token equivalent. Physical-direction properties (`margin-left`, `padding-right`, `left`, `border-right`) are forbidden in shared layout code that may render in any locale.
156
+ 2. Icons must be classified at design time as direction-conveying (arrows, send/forward, undo/redo, slider handles, chevrons that imply navigation) or object-representing (a magnifying glass, a clock face, a brand mark). Direction-conveying icons must mirror with layout direction; object-representing icons must not. Decisions must be recorded in the icon system, not improvised per use.
157
+ 3. Plan a documented text-expansion budget for the project's target locales: short labels in some languages expand by 30 to 100 percent versus English, and the layout must absorb that growth without truncation, overflow, or breaking visual hierarchy. Record the assumed budget per surface and verify representative long-string fixtures during review.
158
+ 4. Bidirectional content (mixed left-to-right and right-to-left runs in a single string) must use the platform's bidi isolation primitive so a single embedded token cannot reorder surrounding content.
159
+ 5. Reject hardcoded physical-direction properties in shared codebases. Reject icon mirroring decisions left to per-component improvisation. Reject "we will fix it when we localize" as a substitute for a documented expansion budget.
160
+
161
+ ## FE-019: Theme as Context
162
+
163
+ 1. A theme switch is a change in lighting and surface model, not a color inversion. The same brand color does not produce the same perceptual result against a high-luminance surface as against a low-luminance surface; tokens must be re-derived per theme, not algebraically inverted.
164
+ 2. Elevation and depth must be expressible without depending on drop-shadows alone. Drop-shadows lose contrast at low surface luminance; depth tokens must combine surface-color shifts, border treatments, or platform-equivalent material cues so the elevation hierarchy remains legible across themes.
165
+ 3. Brand colors carried across themes must be individually verified against the active theme's contrast floor. Two colors with identical chroma can pass contrast on one theme and fail on another; per-theme verification is mandatory and cannot be substituted with a single light-mode test.
166
+ 4. Theme tokens must include explicit mappings for status (success, warning, error, info), focus-visible, and disabled states per theme. A token that exists only on one theme is incomplete.
167
+ 5. Reject color inversion as a substitute for a re-derived theme. Reject reliance on drop-shadows as the sole elevation cue. Reject deferring per-theme contrast verification to runtime.
168
+ 6. Authority for the perceptually-uniform color reasoning above is illustrative across modern color-science work; the OKLCH color space is one example of a perceptually-uniform space and may be used to express tokens, but it is not required. The universal fallback for delivery is sRGB; on platforms or surfaces where wide-gamut delivery is supported and verified, wider color spaces may be used. Verify the platform's current color-management capabilities at audit time.
169
+ <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->