@ryuenn3123/agentic-senior-core 4.3.2 → 4.3.5

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 (48) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +56 -222
  2. package/.agent-context/rules/api-docs.md +17 -126
  3. package/.agent-context/rules/api-versioning.md +9 -86
  4. package/.agent-context/rules/architecture.md +18 -136
  5. package/.agent-context/rules/background-jobs.md +9 -85
  6. package/.agent-context/rules/config-and-flags.md +8 -71
  7. package/.agent-context/rules/database-design.md +9 -65
  8. package/.agent-context/rules/docker-runtime.md +9 -62
  9. package/.agent-context/rules/efficiency-vs-hype.md +7 -37
  10. package/.agent-context/rules/error-handling.md +8 -33
  11. package/.agent-context/rules/event-driven.md +8 -34
  12. package/.agent-context/rules/frontend-architecture.md +22 -140
  13. package/.agent-context/rules/git-workflow.md +8 -77
  14. package/.agent-context/rules/microservices.md +8 -36
  15. package/.agent-context/rules/migrations.md +8 -76
  16. package/.agent-context/rules/observability.md +7 -60
  17. package/.agent-context/rules/performance.md +8 -28
  18. package/.agent-context/rules/realtime.md +7 -22
  19. package/.agent-context/rules/resilience.md +9 -69
  20. package/.agent-context/rules/security.md +9 -64
  21. package/.agent-context/rules/testing.md +8 -34
  22. package/AGENTS.md +11 -18
  23. package/README.md +1 -1
  24. package/lib/cli/adaptive-context/catalog.mjs +1 -6
  25. package/lib/cli/commands/audit-design-anti-repeat.mjs +26 -185
  26. package/lib/cli/commands/init/project-context.mjs +0 -41
  27. package/lib/cli/commands/init.mjs +12 -41
  28. package/lib/cli/commands/upgrade.mjs +12 -35
  29. package/lib/cli/compiler.mjs +5 -81
  30. package/lib/cli/preflight.mjs +0 -21
  31. package/lib/cli/project-scaffolder/constants.mjs +1 -1
  32. package/lib/cli/project-scaffolder/design-contract.mjs +3 -45
  33. package/lib/cli/project-scaffolder/prompt-builders.mjs +18 -161
  34. package/lib/cli/project-scaffolder/storage.mjs +0 -9
  35. package/lib/cli/project-scaffolder.mjs +0 -1
  36. package/package.json +1 -1
  37. package/scripts/frontend-usability-audit.mjs +4 -45
  38. package/scripts/release-gate/constants.mjs +1 -0
  39. package/scripts/release-gate/static-checks.mjs +0 -36
  40. package/scripts/validate/config.mjs +20 -144
  41. package/scripts/validate/coverage-checks.mjs +2 -12
  42. package/scripts/validate/file-structure.mjs +165 -0
  43. package/scripts/validate/markdown-content.mjs +109 -0
  44. package/scripts/validate/project-metadata.mjs +166 -0
  45. package/scripts/validate.mjs +42 -435
  46. package/.agent-context/prompts/research-design.md +0 -160
  47. package/lib/cli/commands/upgrade/design-intent-seed.mjs +0 -46
  48. package/lib/cli/project-scaffolder/design-contract/research-dossier-migration.mjs +0 -190
@@ -2,40 +2,15 @@
2
2
  id_prefix: ERR
3
3
  domain: error-handling
4
4
  priority: high
5
- scope: all-tasks
6
- applies_to:
7
- - backend
8
- - frontend
9
- - fullstack
10
- keywords:
11
- - error-handling
12
- - err
13
- - error
14
- - handling
15
- - boundary
16
- - reject
5
+ scope: backend
6
+ applies_to: [backend, frontend, fullstack]
7
+ keywords: [error-handling, errors, exception]
17
8
  ---
18
9
 
19
10
  # Error Handling Boundary
20
11
 
21
- Use the target language and framework's normal error model. Do not invent a custom exception architecture from this repo.
22
-
23
- ## ERR-001: Reject these failure patterns
24
-
25
- 1. swallowed errors
26
- 2. generic errors that erase the domain cause
27
- 3. client-facing leaks of stack traces, secrets, SQL, infrastructure details, or provider internals
28
- 4. retries without transient-failure evidence, limits, backoff, and a clear final outcome
29
- 5. logs that say only "something failed" without action, target, actor, or trace context
30
-
31
- ## ERR-002: Backend API error rules
32
-
33
- 1. Use the framework's normal centralized error boundary or middleware for HTTP/API responses.
34
- 2. Do not return raw exception messages, stack traces, SQL, provider payloads, file paths, secrets, or infrastructure details to callers.
35
- 3. Public API errors must use a stable JSON shape with at least `code` and `message`; include `details` only when the data is safe, documented, and useful to the caller. HTTP APIs may use an RFC 9457 Problem Details-style shape when it fits the project contract.
36
- 4. Domain and validation errors should keep machine-readable codes so tests, clients, and operators can distinguish expected failures from defects.
37
- 5. API boundary errors should include a safe correlation or trace identifier when observability exists, while protected logs keep the internal exception, actor, target, and trace context.
38
- 6. Distributed systems should preserve trace context across ingress and egress using the project's tracing standard, such as W3C Trace Context or OpenTelemetry propagation.
39
- 7. Prefer structured logging (key/value or JSON) over free-text strings, record at least one business metric per non-trivial operation alongside system metrics, and propagate correlation/trace IDs across async, queue, and worker boundaries.
40
- 8. Distinguish error reporting from error recovery. For calls to unreliable upstreams, record the recovery strategy: retry with backoff and jitter, circuit-breaker thresholds and reset behavior, fallback path (cached value, default, degraded mode), and partial-failure semantics for batch operations (per-item success/failure rather than all-or-nothing). "Catch and log" is reporting, not recovery.
41
- 9. At boundaries, validate early, return safe user-facing errors, and keep machine-readable error context for operators and callers.
12
+ ## ERR-001: Execution Rules
13
+ 1. Fail fast on invalid input.
14
+ 2. Do not leak stack traces to clients. Log them securely.
15
+ 3. Use standardized machine-readable error codes (RFC 9457).
16
+ 4. Distinguish client errors (4xx) from server errors (5xx).
@@ -3,40 +3,14 @@ id_prefix: EVT
3
3
  domain: event-driven
4
4
  priority: medium
5
5
  scope: backend
6
- applies_to:
7
- - backend
8
- - fullstack
9
- keywords:
10
- - event-driven
11
- - evt
12
- - events
13
- - consumers
14
- - outbox
15
- - consistency
6
+ applies_to: [backend, fullstack]
7
+ keywords: [event-driven, events, kafka, rabbitmq]
16
8
  ---
17
9
 
18
- # Event Boundary
10
+ # Event Driven Boundary
19
11
 
20
- Do not add event-driven architecture because it sounds modern. Use it only when the product or repo shows a real async boundary.
21
-
22
- ## EVT-001: Event Boundary and Hard Delivery Rules
23
-
24
- 1. Use events when multiple independent consumers must react to the same fact.
25
- 2. Use events when synchronous coupling would harm reliability, latency, or ownership.
26
- 3. Use events when audit history, fan-out, or eventual consistency is a real requirement.
27
- 4. Use events only when the team can operate retries, monitoring, and failure recovery.
28
- 5. Reject events when a direct call, database transaction, or simple module boundary is enough.
29
- 6. Events describe facts that already happened.
30
- 7. Payloads are versioned, typed, and documented.
31
- 8. Producers do not know consumer internals.
32
- 9. Consumers are idempotent.
33
- 10. Retries are bounded and dead-letter or recovery behavior is defined.
34
- 11. Transactional publishing uses an outbox or equivalent safety pattern when data consistency matters.
35
- 12. Dual-write flows that update local state and publish a message must use a transactional outbox or document an equivalent atomicity and replay strategy.
36
-
37
- ## EVT-002: Event Recovery and Catalogs
38
-
39
- 1. Distributed transactions and two-phase commit are not the default recovery model; prefer local transactions plus saga, choreography, orchestration, or explicit compensating actions when consistency crosses service boundaries.
40
- 2. Message handlers must record processed message identifiers or use another duplicate-detection strategy when the delivery model can retry or redeliver.
41
- 3. Event catalogs or docs identify producer, consumers, ownership, and schema evolution rules.
42
- 4. If event tooling is unresolved, recommend a current project-fit broker or managed service from official docs before implementation.
12
+ ## EVT-001: Execution Rules
13
+ 1. Events must be immutable.
14
+ 2. Consumers must be idempotent.
15
+ 3. Handle out-of-order events securely.
16
+ 4. Always implement Dead Letter Queues (DLQ) for poison messages.
@@ -4,169 +4,51 @@ domain: frontend-architecture
4
4
  priority: high
5
5
  scope: ui
6
6
  last_validated: 2026-05-17
7
- applies_to:
8
- - frontend
9
- - fullstack
10
- keywords:
11
- - frontend-architecture
12
- - fe
13
- - ui
14
- - design
15
- - interaction
16
- - boundaries
7
+ applies_to: [frontend, fullstack]
8
+ keywords: [frontend-architecture, fe, ui, engineering]
17
9
  ---
18
10
 
19
- # Frontend Design and Interaction Boundaries
11
+ # Frontend Engineering Invariants (Tier 2)
20
12
 
21
- Load this rule for UI-facing work. Keep the loaded surface small.
22
-
23
- ## FE-001: Activation
24
-
25
- 1. Use this rule for UI, UX, page, screen, component, layout, landing, dashboard, form, onboarding, animation, interaction, redesign, visual refresh, responsive fix, hierarchy fix, and frontend deliverables inside fullstack or backend work.
26
-
27
- ## FE-002: Authority
28
-
29
- 1. Use current repo evidence, the active brief, and current project docs as valid style context.
30
- 2. Treat `.agent-context/` as design governance authority.
31
- 3. Treat `README.md` as public and developer overview, setup, usage, and user-facing context only when design or architecture rules conflict.
32
- 4. Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.
33
- 5. Research current official docs before adding a new UI, animation, scroll, 3D, canvas, charting, icon, styling, or primitive library.
34
- 6. Use the current date as the freshness anchor for design research. Trend and category-default claims should come from the newest relevant evidence, preferably material published or updated within the last 24 months. Older sources are acceptable only as labeled durable principles, not proof that a direction is currently modern.
35
- 7. Treat user-provided concepts as first-class constraints. Adapt research to support, refine, or challenge the concept with evidence; do not override it with trend defaults unless a concrete product, accessibility, technical, or evidence conflict is recorded.
36
- 8. Keep research vocabulary internal. Evidence, dossier, anchor, category-code, morphology, rename-test, and freshness labels may guide decisions, but must not appear in UI copy, public-facing docs, or final user-facing rationale unless the user explicitly asks for the research trace.
37
- 9. Dynamic UI Foundation: do not hardcode shadcn/ui, Tailwind-only, native-only, or any component library as the universal answer, and do not avoid them out of guardrail fear when they fit. Tailwind-first is valid when the stack, token model, and team workflow support it; pure Tailwind, vanilla CSS, shadcn/ui, or any kit is not neutral by itself. Modern primitives, motion/canvas/WebGL helpers, charting libraries, and styling tools are valid when product evidence, accessibility, runtime constraints, and official docs support them.
38
- 10. For fresh projects, prefer official framework scaffolders or setup commands when official docs show they produce the current supported shape. Build files manually only when approved architecture, repo constraints, or learning/prototype scope makes that better.
39
- 11. Keep design continuity opt-in. Repo evidence outranks memory residue.
40
-
41
- ## FE-003: Required Design Contract
42
-
43
- 1. Before UI code, create or refine `docs/DESIGN.md` and `docs/design-intent.json`.
44
- 2. The contract must record `motionPaletteDecision`, `designFlexibilityPolicy`, `conceptualAnchor`, `derivedTokenLogic`, `aiSafeUiAudit`, `designExecutionPolicy`, `designExecutionHandoff`, `reviewRubric`, `contextHygiene`, `libraryResearchStatus`, and `libraryDecisions[]`.
45
-
46
- ## FE-004: Anti-Generic UI Gate
47
-
48
- 1. Do not ship interchangeable dashboard chrome, balanced card grids, centered marketing shells, generic component-kit surfaces, generic abstract logos, or nonfunctional background decoration unless the product earns them.
49
- 2. For new screens or broad redesigns, make at least three at-a-glance product-specific signals visible. Signals may be data treatment, iconography, state language, motion behavior, spatial structure, typography, material logic, or color behavior.
50
- 3. Use the rename test: if the UI can be renamed to another product category without changing composition, palette, iconography, and motion language, revise before implementation is considered complete.
51
- 4. Use the old-design regression test for broad redesigns: if the UI reads as the previous design with fewer details, removed animation, simplified sections, or a new palette on the same composition, revise before implementation is considered complete.
52
-
53
- ## FE-005: Dynamic Anchor Gate
54
-
55
- 1. If the user gives no current-task visual research or reference, do not count old UI, existing design docs, or scaffold seeds as research.
56
- 2. Choose one high-variance non-software conceptual anchor before UI code.
57
- 3. Internally reject the safest dashboard, portal, card-grid, admin-shell, or minimalist-web-app mental model.
58
- 4. Do not let the fallback anchor become a generic place metaphor. Avoid room, darkroom, counting room, control room, war room, studio, lab, cockpit, and command center unless the product actually depends on that place model; prefer product-specific artifacts, workflows, custody chains, instruments, data behaviors, material systems, editorial systems, service rituals, or interaction mechanisms over "where the UI lives".
59
- 5. Record one real-world anchor reference, one signature motion behavior, and one typographic decision with role contrast.
60
- 6. Derive typography, spacing, morphology, motion, and responsive recomposition from that anchor.
61
- 7. Translate the anchor into workflow, hierarchy, density, typography, state behavior, and interaction before using literal artifacts. Do not turn anchor artifacts into required chrome, wallpaper, decorative props, or component-kit theme objects without a named product function.
62
- 8. Reject anchors described only by generic quality words such as modern, clean, premium, expressive, minimal, or bold.
63
-
64
- ## FE-006: Motion, Palette, and 3D
65
-
66
- 1. Product categories are heuristics, not style presets.
67
- 2. Choose motion density from task, content density, brand intent, device budget, performance, and accessibility.
68
- 3. Map states before coding: default, hover, focus-visible, active, disabled, loading, empty, error, success, transition.
69
- 4. Distinguish motion (visual continuity between states) from interaction design (state machines, focus transfer on route/modal/error transitions, optimistic updates where safe, skeleton shapes that match real content, `aria-live` for status, keyboard paths, scroll-driven progressive disclosure). Record at least one interaction-design decision per major flow alongside motion choices.
70
- 5. Prefer visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.
71
- 6. Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, cyber-neon terminals, or uniform card surfaces without product evidence.
72
- 7. Treat motion, 3D, WebGL, canvas, scroll choreography, and animation libraries as first-class options.
73
-
74
- ## FE-007: Zero-Based Redesign
75
-
76
- 1. If the user asks for a redesign from zero, treat existing UI as behavioral/content evidence only.
77
- 2. Discard prior palette, typography, hero composition, navigation placement, component morphology, motion signature, and image framing unless the user requests continuity.
78
- 3. Rewrite or materially update both design docs before coding.
79
- 4. Change primary composition, content hierarchy, interaction model, and responsive information architecture.
80
- 5. Reject palette swaps, dark-mode flips, and restyled heroes.
81
- 6. Reject implementations that remove animation, media, depth, or interaction density merely to reduce complexity when the request calls for a more distinctive experience.
82
-
83
- ## FE-008: Responsive Mutation
84
-
85
- 1. Responsive quality is not scale-only.
86
- 2. Mobile must prioritize the first decisive action.
87
- 3. Tablet must regroup surfaces instead of shrinking desktop.
88
- 4. Desktop may expose more context but must not become interchangeable admin chrome (see [REF:FE-004]).
89
- 5. At least one major surface must change position, grouping, priority, or disclosure strategy between mobile and desktop.
90
- 6. Prefer container queries, dynamic viewport units, support-checked selectors, subgrid, popover, or disclosure primitives when they simplify recomposition and fallbacks are clear.
13
+ Load this rule for UI-facing engineering work. This file contains strict engineering constraints.
91
14
 
92
15
  ## FE-009: Accessibility
93
-
94
- 1. WCAG 2.2 AA is the hard floor.
95
- 2. APCA is advisory perceptual tuning only.
96
- 3. Hard checks include focus visibility, focus appearance, target size, keyboard access, accessible authentication, color-only meaning, and dynamic status/state access.
97
- 4. Fix accessibility issues without flattening the UI into generic safe chrome unless no expressive safe option remains (see [REF:FE-004]).
16
+ 1. WCAG 2.2 AA is the hard floor. APCA is advisory perceptual tuning only.
17
+ 2. Hard checks: focus visibility, target size, keyboard access, color-only meaning.
98
18
 
99
19
  ## FE-010: CSS Production Hardening
100
-
101
- 1. Plan overflow, wrapping, truncation, empty, loading, error, and extreme-content behavior before declaring a layout complete.
102
- 2. Prefer `min()`, `max()`, `clamp()`, stable aspect ratios, container-relative sizing, OKLCH, and tinted neutrals for new tokens when supported; preserve existing design-system tokens.
103
- 3. Prefer composition primitives that match content meaning: named `grid-template-areas` for editorial regions, subgrid for nested alignment across siblings, container queries for component-level responsiveness independent of viewport, and explicit stacking context (`isolation: isolate`) when overlap or z-depth carries meaning. Do not default to flex column when content has structure that grid expresses better.
104
- 4. Treat recursive card nesting, uniform radius everywhere, shadow on every surface, arbitrary spacing, gray text on saturated color, and library-default skins as drift signals requiring product rationale.
20
+ 1. Plan overflow, wrapping, truncation, empty, loading, and error behavior.
21
+ 2. Prefer logical composition primitives (container queries, subgrid).
105
22
 
106
23
  ## FE-011: Implementation Boundaries
107
-
108
24
  1. Follow the shipped project stack and current repo patterns.
109
- 2. Do not hardcode Zustand, React Query, smart/dumb component doctrine, or framework-specific architecture as universal design law.
110
- 3. Keep structure feature-oriented when it improves maintainability.
111
- 4. Keep component states recognizable across hover, focus, loading, success, empty, and error.
112
- 5. Do not let repeated surfaces share one visual treatment by habit; repetition needs a product reason.
25
+ 2. Do not hardcode Zustand, React Query, smart/dumb component doctrine.
113
26
 
114
27
  ## FE-012: Data State Surface
115
-
116
- 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.
117
- 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.
118
- 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.
119
- 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.
120
- 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.
28
+ 1. Explicitly handle empty, loading, error, and offline states.
29
+ 2. Reject "spinner everywhere".
121
30
 
122
31
  ## FE-013: Background and Wallpaper Discipline
123
-
124
- 1. Background lines, grids, scanlines, noise, glows, blobs, abstract logos, calibration marks, and decorative geometry are invalid as wallpaper.
125
- 2. Do not use grid or line backgrounds as first-output filler.
126
- 3. Use them only for a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
127
- 4. Measurement, calibration, crop, map, route, and inspection marks are task-bound overlays or control affordances.
128
- 5. They must not become the page background, hero backdrop, or default visual texture.
129
- 6. When a conceptual anchor (see [REF:FE-005]) and a forbidden visual motif conflict, the forbidden motif wins; translate the anchor into layout, hierarchy, density, typography, state behavior, materials, and interaction instead of literal decorative texture.
32
+ 1. Decorative geometry are invalid as wallpaper.
33
+ 2. Use grids/lines only for specific functional roles (alignment, map, crop).
130
34
 
131
35
  ## FE-014: Production Content Policy
132
-
133
- 1. Production UI must read as ship-ready: no visible testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels unless they are intentional product states.
134
- 2. User-facing workflows need an operable UI path; terminal-only core flows are valid only for CLI, developer-tool, or runbook products.
36
+ 1. No visible testing, demo, sample, placeholder, lorem, or TODO labels in production UI.
135
37
 
136
38
  ## FE-015: Motion Implementation Budget
137
-
138
- 1. Omit rich motion or spatial UI only after naming the product-fit reason and the replacement interaction quality.
139
- 2. For new screens or broad redesigns, research the expressive implementation path instead of defaulting to static native CSS. Use native or already-installed tools only when they can still deliver the chosen ambition, or when a concrete blocker is documented. Do not downshift because adding a package feels inconvenient; downshift only for a concrete product-fit, accessibility, security, compatibility, device, maintenance, or measured performance reason.
140
- 3. Prefer micro-interactions in 150-300ms, layout transitions in 300-500ms, transform/opacity for high-frequency motion, explicit easing, bounded stagger, and reduced-motion alternatives unless evidence changes the budget.
141
- 4. Keep reduced-motion, keyboard, loading, performance, mobile, and non-3D fallbacks explicit.
39
+ 1. Keep reduced-motion, keyboard, loading, performance, and mobile fallbacks explicit.
142
40
 
143
41
  ## FE-016: Library and Design-Intent Discipline
144
-
145
- 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.
146
- 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.
42
+ 1. Use component kits or headless primitives for behavior and accessibility when they fit.
147
43
 
148
44
  ## FE-017: Interactivity Priority
149
-
150
- 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.
151
- 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.
152
- 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.
153
- 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.
154
- 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.
45
+ 1. The interactive boundary must be drawn deliberately. Keep client-side state boundaries small.
46
+ 2. Measure responsiveness through Interaction to Next Paint (INP).
155
47
 
156
48
  ## FE-018: Internationalization as Layout
157
-
158
- 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.
159
- 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.
160
- 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.
161
- 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.
162
- 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.
49
+ 1. Direction-sensitive spacing, alignment, and positioning must use CSS logical properties (e.g., `margin-inline-start`).
50
+ 2. Plan a documented text-expansion budget for target locales.
163
51
 
164
52
  ## FE-019: Theme as Context
165
-
166
- 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.
167
- 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.
168
- 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.
169
- 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.
170
- 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.
171
- 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.
172
- <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
53
+ 1. A theme switch is a change in lighting and surface model, not a color inversion. Re-derive tokens per theme.
54
+ 2. Brand colors carried across themes must be individually verified against the active theme's contrast floor.
@@ -2,83 +2,14 @@
2
2
  id_prefix: GIT
3
3
  domain: git-workflow
4
4
  priority: medium
5
- scope: governance
6
- applies_to:
7
- - backend
8
- - frontend
9
- - fullstack
10
- keywords:
11
- - git-workflow
12
- - git
13
- - commit
14
- - branch
15
- - pull-request
16
- - gitignore
5
+ scope: all-tasks
6
+ applies_to: [backend, frontend, fullstack]
7
+ keywords: [git-workflow, git, commit, pr]
17
8
  ---
18
9
 
19
- # Git Workflow - Clean History, Atomic Commits
10
+ # Git Workflow Boundary
20
11
 
21
- Your git log is a changelog. If it reads like gibberish, your team is lost.
22
-
23
- ## GIT-001: Commit Message Format (Conventional Commits Enforced)
24
-
25
- 1. Use Conventional Commits for every commit: `<type>(<scope>): <description>`.
26
- 2. Use the optional body to explain WHY, not WHAT.
27
- 3. Use the optional footer for breaking changes and issue references.
28
- 4. Use only the strict types set: `feat` for new feature, `fix` for bug fix, `refactor` for code restructuring with no behavior change, `docs` for documentation only, `test` for adding or fixing tests, `chore` for build, CI, config, or dependencies, `perf` for performance improvement, `style` for formatting and semicolons with no logic change, and `ci` for CI/CD changes.
29
- 5. Type is mandatory. No commits without a type prefix.
30
- 6. Scope is required for module or feature changes. Use the module or feature name.
31
- 7. Description must use imperative mood: "add", not "added" or "adds".
32
- 8. Keep the subject line at max 72 characters.
33
- 9. Body explains WHY; the diff shows what.
34
- 10. Reject banned commit messages: `fix bug`, `updates`, `WIP`, `asdf`, `misc changes`, `working now`, `final fix`, and `fix fix fix`.
35
-
36
- ## GIT-002: Branching Model and Merge Strategy
37
-
38
- 1. Keep `main` production-ready; its purpose is production-ready code, and its merge strategy is merge commit or squash according to project policy.
39
- 2. Use `develop` as an integration branch only when the project uses GitFlow; its purpose is integration.
40
- 3. Name feature branches with the pattern `<type>/<ticket-id>-<short-description>`.
41
- 4. Example branch names include `feat/AUTH-123-jwt-refresh`, `fix/PAY-456-checkout-race-condition`, `refactor/USER-789-extract-validation`, and `chore/INFRA-101-upgrade-node-20`.
42
- 5. Branch from `main`, or from `develop` when using GitFlow.
43
- 6. Keep branches short-lived, max 2-3 days.
44
- 7. Rebase on `main` before creating a PR; do not merge main into your branch.
45
- 8. Delete the branch after merge.
46
-
47
- ## GIT-003: Pull Request Standards
48
-
49
- 1. Keep PR size reviewable: small is 1-100 lines changed and ideal because it is easy to review; medium is 100-300 and acceptable, split if possible; large is 300-500 and needs justification; massive is 500+ and must be split into smaller PRs. Treat these thresholds as the PR size verdict.
50
- 2. Split a PR when it touches more than 5 files across different modules; it is doing too much.
51
- 3. PR descriptions must follow the PR Description Template: What, Why, How, Testing, and Screenshots when the change affects UI.
52
- 4. What gives a brief description of what the PR does.
53
- 5. Why explains why the change is needed and links to the issue or ticket.
54
- 6. How gives the high-level approach and mentions non-obvious design decisions.
55
- 7. Testing lists unit tests, integration tests when applicable, and manual testing steps.
56
- 8. Every PR needs at least 1 approval, author resolves all comments before merge, CI must pass lint, test, and build, no `// TODO` appears without a linked issue, and production code contains no `console.log` debugging statements.
57
-
58
- ## GIT-004: Commit Atomicity
59
-
60
- 1. Each commit must be a complete, working unit.
61
- 2. Reject banned sequences where a feature commit is followed by fix imports, fix typos, or other fix-up commits needed to make the previous commit work.
62
- 3. Prefer one complete working commit for a cohesive module, such as model, service, controller, and tests for user registration.
63
- 4. Split into logical chunks only when each chunk compiles and passes tests independently.
64
- 5. Every commit on `main` should compile, pass lint, and pass tests.
65
- 6. Use interactive rebase (`git rebase -i`) to squash fix-up commits before merging.
66
-
67
- ## GIT-005: .gitignore Standards
68
-
69
- 1. Ignore dependency and cache directories: `node_modules/`, `vendor/`, `venv/`, `__pycache__/`, `.gradle/`, and `target/`.
70
- 2. Ignore environment files: `.env`, `.env.local`, and `.env.*.local`.
71
- 3. Ignore IDE and OS artifacts: `.idea/`, `.vscode/settings.json`, `*.swp`, `*.swo`, `.DS_Store`, and `Thumbs.db`.
72
- 4. Ignore build output: `dist/`, `build/`, `out/`, `*.min.js`, and `*.min.css`.
73
- 5. Ignore logs: `*.log` and `npm-debug.log*`.
74
- 6. Commit configuration templates and formatter or linter config: `.env.example`, `.editorconfig`, `.prettierrc`, `.eslintrc.*`, and `tsconfig.json`.
75
- 7. Commit standard development commands and environments when they are part of the project contract: `docker-compose.yml`, `Makefile`, or `Taskfile`.
76
-
77
- ## GIT-006: Git Health Check
78
-
79
- 1. Before pushing, verify all commits follow Conventional Commits format.
80
- 2. Before pushing, verify there are no fixup commits; squash them.
81
- 3. Before pushing, verify the branch is rebased on latest main.
82
- 4. Before pushing, verify CI passes locally: lint, test, and build.
83
- 5. Before pushing, verify there are no secrets in any commit; check with `git log -p | grep -i "password\|secret\|key"`.
84
- 6. Before pushing, verify there are no merge commits in the feature branch; rebase instead.
12
+ ## GIT-001: Execution Rules
13
+ 1. Enforce .gitignore standards. NEVER commit .env or secrets.
14
+ 2. Write semantic commit messages (feat:, fix:, chore:).
15
+ 3. Keep commits atomic and focused.
@@ -3,42 +3,14 @@ id_prefix: SVC
3
3
  domain: microservices
4
4
  priority: medium
5
5
  scope: backend
6
- applies_to:
7
- - backend
8
- - fullstack
9
- keywords:
10
- - microservices
11
- - svc
12
- - monolith
13
- - contracts
6
+ applies_to: [backend, fullstack]
7
+ keywords: [microservices, monolith]
14
8
  ---
15
9
 
16
- # Service Boundary Rule
10
+ # Microservices Boundary
17
11
 
18
- The agent must infer the right topology from the user brief, repo evidence, team/runtime constraints, and live official docs when technology choices matter.
19
-
20
- ## SVC-001: Monolith Boundary
21
-
22
- 1. Do not ask for or force "monolith vs microservices" as an init default.
23
- 2. Do not start with microservices by fashion, fear, or habit.
24
- 3. Use a single deployable system when one team or one delivery stream owns most changes.
25
- 4. Use a single deployable system when feature boundaries can stay clear inside one repo/process.
26
- 5. Use a single deployable system when synchronous data consistency is more valuable than distributed autonomy.
27
- 6. Use a single deployable system when observability, CI/CD, and operational maturity are still forming.
28
- 7. Keep feature/domain boundaries explicit.
29
- 8. Do not let one giant shared module become the real architecture.
30
- 9. Keep contracts clear between modules.
31
- 10. Refactor toward cleaner seams before extracting services.
32
-
33
- ## SVC-002: Service Split Boundary and Hard Rules
34
-
35
- 1. Split a service only when current evidence justifies the operational cost.
36
- 2. Valid split signals include independent deploy cadence that is already painful; materially different scale, latency, security, or compliance needs in one domain; stable ownership boundaries plus repeated coupling causing delivery risk; failure isolation as a real product or business requirement; and service contract plus data ownership documentation before extraction.
37
- 3. Hard rules: each service owns its data boundary.
38
- 4. Public service contracts must be documented before implementation or extraction.
39
- 5. Cross-service calls need timeout, retry, idempotency, observability, and recovery behavior.
40
- 6. Independent services must not use shared tables as their integration contract; communicate through documented APIs, events, or async workflows owned by the source domain.
41
- 7. Avoid synchronous call chains that turn services into a distributed monolith.
42
- 8. Critical cross-service mutations should prefer local transactions plus outbox, saga, choreography, orchestration, or compensating actions over two-phase commit by default.
43
- 9. Prefer incremental extraction over rewrites.
44
- 10. If the evidence is unclear, document the uncertainty and keep the topology agent-recommended instead of pretending an offline default is correct.
12
+ ## SVC-001: Execution Rules
13
+ 1. Default to modular monoliths unless scale explicitly dictates microservices.
14
+ 2. Independent services must own their data. NO shared databases.
15
+ 3. Cross-service calls must have timeouts and retries.
16
+ 4. Prefer async choreographies over distributed two-phase commits.
@@ -1,84 +1,16 @@
1
1
  ---
2
2
  id_prefix: MIG
3
3
  domain: migrations
4
- priority: critical
4
+ priority: high
5
5
  scope: data
6
- last_validated: 2026-05-17
7
- applies_to:
8
- - backend
9
- - fullstack
10
- keywords:
11
- - migrations
12
- - schema
13
- - ddl
14
- - expand-contract
15
- - backfill
16
- - rollback
6
+ applies_to: [backend, fullstack]
7
+ keywords: [migrations, schema, database]
17
8
  ---
18
9
 
19
10
  # Migrations Boundary
20
11
 
21
- A schema or data-shape change that touches live traffic is a deployment with two moving parts: the schema and the code that depends on it. Migrations safety is the property that the user-facing operation continues to succeed during, and after, the change, regardless of which side ships first or which side rolls back. Vendor-specific online-migration tools that may appear in commentary are illustrative; the authority is the safety invariants below.
22
-
23
- ## MIG-001: Hard rules (Mandatory)
24
-
25
- 1. Every schema change that touches live data must be decomposed into expansion steps (additive, non-breaking, independently deployable) and contraction steps (removal of old structures), with at least one production deployment between phases. Single-step schema changes that simultaneously add and remove are forbidden on hot data.
26
- 2. The deploy ordering invariant must hold across the entire migration: code that requires the new schema must not deploy before the migration that introduces it, and code that requires the old schema must not deploy after the migration that removes it. The ordering must be documented in the migration ticket and verified by the deploy procedure.
27
- 3. A migration must be reversible, or it must carry a documented forward-only recovery plan. "We will figure it out" is not a recovery plan.
28
- 4. Reject migrations that lack a rollback or recovery plan. Reject deploy procedures that allow a code revert to land while the schema is still in the new shape, or vice versa, without an explicit compensating step.
29
-
30
- ## MIG-002: Lock posture (Mandatory)
31
-
32
- 1. Any DDL operation expected to hold an exclusive or share lock for longer than the service's acceptable request-latency threshold must use the platform's online or non-blocking migration mechanism. The threshold is the service's own latency budget, not a fixed number of rows or a fixed wall-clock duration.
33
- 2. Where the platform supports a two-phase mechanism for constraints (for example, validate-without-lock followed by an asynchronous validate, or platform-equivalent concurrent index creation), use it instead of a single locking statement. The implementation must record which phase is run in which deploy.
34
- 3. Long-running statements must run with an explicit statement timeout or lock-wait timeout, so a stuck DDL cannot hold a global lock indefinitely.
35
- 4. Reject DDL inside long-running transactions that also contain unrelated work. Reject foreign-key or check-constraint additions on hot tables in a single locking statement when the platform offers a non-blocking variant.
36
-
37
- ## MIG-003: Backfills (Mandatory)
38
-
39
- 1. Backfills are separate from DDL. The DDL adds the column, table, or index in its safe shape (nullable, no-default, or non-unique, as appropriate); the backfill populates or repairs data in idempotent, resumable batches.
40
- 2. A backfill job must be idempotent: rerunning the job, including from an arbitrary mid-progress checkpoint, must converge to the same final state without double-writing or double-charging.
41
- 3. A backfill job must be resumable. The job must record progress on a durable cursor so a process restart, deploy, or worker rotation does not require restarting from the beginning.
42
- 4. A backfill job must be observable. It must emit progress, throughput, and error-rate telemetry; an operator must be able to answer "how far has the backfill progressed?" without reading the data store directly.
43
- 5. A backfill job must be throttleable. It must respect the platform's load on the source data store, and an operator must be able to slow or pause it during incidents without losing progress.
44
- 6. Reject "backfill in the migration script". Reject backfill jobs that do not record progress, that cannot be paused, or that have no completion criterion.
45
-
46
- ## MIG-004: Risk documentation (Mandatory)
47
-
48
- Every migration ticket or change record must capture, at change time, the following:
49
-
50
- 1. Estimated runtime on production-equivalent data volume.
51
- 2. Lock posture: which locks the operation acquires, on which objects, for how long, and which queries it will block.
52
- 3. Data volume estimate: rows or bytes touched.
53
- 4. Rollback plan or, if forward-only, the recovery plan with explicit data-loss exposure.
54
- 5. Deploy-ordering note: which application version range is safe with the old schema, which with the new, and which with both. Both-compatible windows are required for any change that touches a request path.
55
- 6. Backfill plan, if any: what data is rewritten, in what batch shape, with what idempotency key.
56
- 7. Verification step: the post-migration check the operator runs to confirm the schema, the data, and the application all match the intended end state.
57
-
58
- A change that ships without these fields is not a migration; it is a defect waiting to happen.
59
-
60
- ## MIG-005: Boundary safety (Mandatory)
61
-
62
- 1. Cross-service migrations must coordinate the schema change with the downstream consumers. A producer that drops a field before downstream consumers stop reading it is a breaking change disguised as a migration.
63
- 2. Event payload schemas, message contracts, and shared cache shapes are subject to the same expand-contract discipline as relational schemas. Producers add the new shape first, consumers learn to read both, then producers retire the old shape.
64
- 3. Reject "we control all consumers" as a substitute for the expand-contract discipline; consumers include retried events from before the deploy, mobile clients with stale code, and parallel-running canaries.
65
-
66
- ## MIG-006: Reject these bad habits
67
-
68
- 1. Reject one-shot DDL that adds and removes structures in the same deploy on hot data.
69
- 2. Reject migrations that take an exclusive lock on a hot table without a non-blocking alternative tested first.
70
- 3. Reject backfills baked into the migration transaction so the transaction cannot complete in time.
71
- 4. Reject "feature-flag the schema" patterns where two code paths read or write incompatible shapes against the same column without an explicit migration plan.
72
- 5. Reject migration tickets that omit the risk-documentation fields above.
73
- 6. Reject claims of reversibility that are not actually exercised on a non-production environment before production deploy.
74
-
75
- ## MIG-007: Citations and freshness
76
-
77
- Authority sources for the rules in this file:
78
-
79
- - The expand-contract or parallel-change pattern in mainstream continuous-delivery and database-refactoring literature: authority for the multi-phase deploy discipline.
80
- - Database engine documentation for the platform in use: authority for which DDL operations are non-blocking, which require a rewrite, which acquire what locks, and which support a two-phase validate. Verify the platform's current major-version documentation at audit time, because lock posture changes between major versions of the same engine.
81
- - IETF RFC 7807 and successor problem-detail specifications: authority for how a write that hits a deploy-ordering window should communicate its rejection to the caller.
82
-
83
- Vendor-specific online-migration tools (in any database ecosystem) are illustrative implementations of the lock-posture and backfill rules above; they are not authority. Use the platform-appropriate mechanism that exists in the deployed engine version.
84
- <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
12
+ ## MIG-001: Execution Rules
13
+ 1. Schema changes MUST have a versioned migration.
14
+ 2. Migrations must be reversible (down-migrations) or have a recovery plan.
15
+ 3. Never modify past migrations once merged. Create a new one.
16
+ 4. Use concurrent index builds in production.
@@ -3,67 +3,14 @@ id_prefix: OBS
3
3
  domain: observability
4
4
  priority: high
5
5
  scope: backend
6
- last_validated: 2026-05-17
7
- applies_to:
8
- - backend
9
- - fullstack
10
- keywords:
11
- - observability
12
- - telemetry
13
- - logs
14
- - metrics
15
- - traces
16
- - slo
17
- - alerts
6
+ applies_to: [backend, fullstack]
7
+ keywords: [observability, telemetry, logs, metrics]
18
8
  ---
19
9
 
20
10
  # Observability Boundary
21
11
 
22
- Observability is the property of a system that lets an operator answer, after the fact, which user, which code path, and which dependency caused a given outcome, using signals captured at runtime. Treat metrics, logs, and traces as derived views over structured per-request events; the underlying obligation is that the captured events are enough to reconstruct what happened, regardless of which storage shape a vendor calls a "pillar".
23
-
24
- ## OBS-001: Hard rules (Mandatory)
25
-
26
- 1. Every request, job, and message-handler invocation must emit a structured event that carries: a stable request or correlation identifier, the operation name, the upstream caller identity, the downstream dependencies it touched, the outcome status, and the duration. The event payload must be machine-parseable, not a free-text log line.
27
- 2. Trace context must propagate across every in-process and cross-process boundary the system controls. The system must not drop or rewrite an inbound trace identifier; it must extend it.
28
- 3. Logs, metrics, and traces must share the same correlation identifier so an operator can pivot between them without manual joining.
29
- 4. Configuration of telemetry destinations, sampling rates, and log levels must come from runtime configuration; the system must not require a code change to redirect signals or to raise verbosity during an incident.
30
- 5. The system must redact or omit secrets, tokens, full request and response bodies, and personal data from logs, metric labels, span attributes, and error reports. Identifiers, counts, sizes, and shapes are acceptable.
31
- 6. The system must expose a documented health surface that distinguishes liveness, readiness, and startup where the runtime supports it. A `200 OK` that does not check critical dependencies is not a readiness signal.
32
-
33
- ## OBS-002: Reject these bad habits
34
-
35
- 1. Reject metric label cardinality that is unbounded by design. User identifiers, request identifiers, full URLs, raw query strings, and session identifiers must not be metric labels; they belong in event attributes that the storage tier can index without exploding cardinality.
36
- 2. Reject vendor-proprietary instrumentation when an open standard provides equivalent coverage. Where the platform supports it, prefer instrumentation that exports through W3C Trace Context and OpenTelemetry semantic conventions so the backend storage choice can change without re-instrumenting the application.
37
- 3. Reject substituting one signal for another. Do not parse free-text logs to derive metrics that should have been recorded as metrics. Do not search free-text logs to reconstruct call graphs that should have been recorded as traces. Each signal type carries different sampling, retention, and indexing trade-offs; collapsing them hides those trade-offs.
38
- 4. Reject logging of full request bodies, headers containing authorization material, raw uploads, decrypted secrets, plaintext tokens, and direct personal identifiers. A log line that would leak a credential if forwarded to a third-party storage provider is a defect.
39
- 5. Reject paging humans for symptoms that have no documented user impact. Do not page on raw resource utilization, on a single failed request, or on a single retry; page on a sustained breach of a documented service-level objective whose error budget has been spent.
40
- 6. Reject "happy-path-only" telemetry. Error paths, retries, fallbacks, throttles, circuit transitions, and degraded-mode fallbacks must emit events of equal or higher fidelity than the success path; a system that is loud only when healthy is observable only when it is fine.
41
- 7. Reject silent drops. The telemetry pipeline itself must report when it sheds events, drops spans, or rate-limits log output, so an operator can distinguish "no events" from "events lost".
42
-
43
- ## OBS-003: SLOs and alerts (Mandatory)
44
-
45
- 1. Every alert that pages a human must be backed by a documented service-level objective expressed in user-facing terms (availability of a journey, latency of a critical interaction, freshness of a derived dataset). Alerts without an SLO and an explicit error-budget intent are noise.
46
- 2. SLO definitions must record: the user journey or contract being measured, the success criterion (status, latency threshold, freshness threshold), the measurement window, the target attainment, and the agreed action when the error budget burns at an elevated rate.
47
- 3. Multi-window, multi-burn-rate alerting (or platform equivalent) is preferred so a fast burn pages quickly without amplifying flapping on slow burns. Single-threshold alerting on a raw counter is acceptable only when no error budget can be defined for the signal.
48
- 4. Alert routing must distinguish actionable alerts (paged human required to recover the user journey) from informational alerts (record-only, dashboard-only). Pager rotations must not receive informational alerts.
49
- 5. Telemetry retention windows must cover at least one full SLO measurement window plus the longest documented incident-investigation window the team commits to.
50
- 6. Reject alerts whose runbook is "investigate the dashboard". Every actionable alert needs a documented next step that a non-author on-call can execute.
51
-
52
- ## OBS-004: Audit and forensics (Mandatory)
53
-
54
- 1. Security-relevant events (authentication outcomes, authorization decisions, privilege changes, data exports, configuration changes, key rotations) must be emitted on a separate, append-only event stream with stricter retention and access controls than operational telemetry.
55
- 2. Audit events must record: who acted, what was acted upon, when, from which network identity, and the outcome. Source identity must come from the authenticated principal, not from a self-reported value in the request body.
56
- 3. Audit-event storage must remain readable when the application's primary database is unavailable, or the audit event must be considered untrustworthy.
57
- 4. Reject mixing audit events into the same low-retention, broadly readable channel as operational logs.
58
-
59
- ## OBS-005: Citations and freshness
60
-
61
- Authority sources for the rules in this file:
62
-
63
- - W3C Trace Context (W3C Recommendation): the canonical contract for propagating `traceparent` and `tracestate` across boundaries. Verify the current Recommendation when authoring instrumentation that crosses an organizational boundary.
64
- - OpenTelemetry semantic conventions: the open-standard set of attribute names for traces, metrics, and logs across HTTP, RPC, messaging, and database operations. Use the version current at audit time; older fixed snapshots drift.
65
- - RFC 5424 (The Syslog Protocol): authority for severity ordering when mapping log levels onto a transport that requires it.
66
- - OWASP ASVS: requirements for security-relevant audit logging, including the events listed above as audit-stream candidates.
67
-
68
- These citations are illustrative anchors, not vendor endorsements. Vendor names that may appear in commentary (for example, the names of trace backends, log aggregators, or APM products) are not authority for this rule.
69
- <!-- DURABILITY CHECK: Rule relies exclusively on architectural invariants and relative operational thresholds. Valid beyond standard tooling lifecycles. -->
12
+ ## OBS-001: Execution Rules
13
+ 1. Emit telemetry for failures, degraded states, and security events.
14
+ 2. Inject correlation IDs on inbound requests and propagate them downstream.
15
+ 3. Do not log PII, secrets, or credentials.
16
+ 4. Measure latency, traffic, errors, and saturation.