You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[PY-OBS-013] When emitting structured output, include the CLI invocation fields defined in the [Structured Logging Baseline](./includes/observability-logging-baseline.include.md#2-required-fields-clis) and never log secrets, tokens, credentials, or raw personal data.
550
+
-[PY-OBS-013] When emitting structured output, include the CLI invocation fields defined in the [Structured Logging Baseline](./includes/observability-baseline.include.md#2-required-fields-clis) and never log secrets, tokens, credentials, or raw personal data.
551
551
-[PY-OBS-014] Prefer event-style logs with stable names:
Logs must be structured (prefer JSON), queryable, and consistent.
557
557
558
-
-[PY-OBS-015] Service/API logs must include the required fields defined in the [Structured Logging Baseline](./includes/observability-logging-baseline.include.md#1-required-fields-services-apis); do not fork or trim that list locally.
558
+
-[PY-OBS-015] Service/API logs must include the required fields defined in the [Structured Logging Baseline](./includes/observability-baseline.include.md#1-required-fields-services-apis); do not fork or trim that list locally.
559
559
-[PY-OBS-016] HTTP metadata (method, path template, status code) and timing/outcome fields from the baseline are mandatory for every request log entry.
560
-
-[PY-OBS-017] Apply the baseline secrecy rules ([section 3](./includes/observability-logging-baseline.include.md#3-sensitive-data--secrecy-rules)): never log secrets, credentials, or raw personal data; mask or truncate payloads when logging is explicitly required.
561
-
-[PY-OBS-018] Use the baseline event taxonomy ([section 4](./includes/observability-logging-baseline.include.md#4-event-naming--taxonomy)) so request/dependency events stay searchable across repos.
560
+
-[PY-OBS-017] Apply the baseline secrecy rules ([section 3](./includes/observability-baseline.include.md#3-sensitive-data--secrecy-rules)): never log secrets, credentials, or raw personal data; mask or truncate payloads when logging is explicitly required.
561
+
-[PY-OBS-018] Use the baseline event taxonomy ([section 4](./includes/observability-baseline.include.md#4-event-naming--taxonomy)) so request/dependency events stay searchable across repos.
562
562
-[PY-OBS-019] Prefer high-signal logs only:
563
563
-[PY-OBS-019a] start/end of request (one each)
564
564
-[PY-OBS-019b] key domain decision points (not every line)
565
565
-[PY-OBS-019c] boundary calls (DB, AWS, HTTP)
566
566
-[PY-OBS-019d] errors (once, with structured context)
567
-
-[PY-OBS-019e] When `DEBUG`/diagnostic logging is enabled, emit a single function/method entry log for every call path, capturing the operation name and a sanitised summary of arguments per the [Structured Logging Baseline §5](./includes/observability-logging-baseline.include.md#5-diagnostics--sampling); never include sensitive data.
567
+
-[PY-OBS-019e] When `DEBUG`/diagnostic logging is enabled, emit a single function/method entry log for every call path, capturing the operation name and a sanitised summary of arguments per the [Structured Logging Baseline §5](./includes/observability-baseline.include.md#5-diagnostics--sampling); never include sensitive data.
568
568
569
-
Log level policy (see also [§5.1 of the baseline](./includes/observability-logging-baseline.include.md#51-log-level-hierarchy)):
569
+
Log level policy (see also [§5.1 of the baseline](./includes/observability-baseline.include.md#51-log-level-hierarchy)):
570
570
571
571
-[PY-OBS-020]`DEBUG`: diagnostic level that **includes trace-like function/method entry logging** (Python's stdlib `logging` lacks a distinct `TRACE` level); only for local/dev or explicitly enabled diagnostics (never required in normal production operation)
572
572
-[PY-OBS-021]`INFO`: normal request lifecycle and major domain events
Copy file name to clipboardExpand all lines: .github/instructions/rust.instructions.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ For Rust CLIs, follow the [CLI Contract](./includes/cli-contract-baseline.includ
199
199
200
200
## 9. Observability 🔭
201
201
202
-
For Rust services and CLIs that produce structured logs, follow the [Structured Logging Baseline](./includes/observability-logging-baseline.include.md).
202
+
For Rust services and CLIs that produce structured logs, follow the [Structured Logging Baseline](./includes/observability-baseline.include.md).
203
203
204
204
### 9.1 Tooling
205
205
@@ -209,23 +209,23 @@ For Rust services and CLIs that produce structured logs, follow the [Structured
209
209
210
210
### 9.2 Required fields
211
211
212
-
-[RS-OBS-004] Service/API logs must include the required fields from [§1 of the baseline](./includes/observability-logging-baseline.include.md#1-required-fields-services-apis-async-workers): `service`, `version`, `environment`, `request_id`, `operation`, `duration_ms`, and `error_code` (on failure).
213
-
-[RS-OBS-005] CLI logs must include the required fields from [§2 of the baseline](./includes/observability-logging-baseline.include.md#2-required-fields-clis): `command`, `args` (sanitised), `exit_code`, `duration_ms`.
212
+
-[RS-OBS-004] Service/API logs must include the required fields from [§1 of the baseline](./includes/observability-baseline.include.md#1-required-fields-services-apis-async-workers): `service`, `version`, `environment`, `request_id`, `operation`, `duration_ms`, and `error_code` (on failure).
213
+
-[RS-OBS-005] CLI logs must include the required fields from [§2 of the baseline](./includes/observability-baseline.include.md#2-required-fields-clis): `command`, `args` (sanitised), `exit_code`, `duration_ms`.
214
214
215
215
### 9.3 Secrecy and safety
216
216
217
-
-[RS-OBS-006] Apply the secrecy rules from [§3 of the baseline](./includes/observability-logging-baseline.include.md#3-sensitive-data--secrecy-rules): never log secrets, tokens, or raw personal data.
217
+
-[RS-OBS-006] Apply the secrecy rules from [§3 of the baseline](./includes/observability-baseline.include.md#3-sensitive-data--secrecy-rules): never log secrets, tokens, or raw personal data.
218
218
-[RS-OBS-007] Use `tracing`'s `skip` or `skip_all` in `#[instrument]` to exclude sensitive fields from spans.
219
219
-[RS-OBS-008] When logging payloads, truncate large bodies and mark with `truncated=true`.
220
220
221
221
### 9.4 Event taxonomy
222
222
223
-
-[RS-OBS-009] Use the event taxonomy from [§4 of the baseline](./includes/observability-logging-baseline.include.md#4-event-naming--taxonomy): stable names like `request.start`, `request.end`, `dependency.call`, `dependency.error`.
223
+
-[RS-OBS-009] Use the event taxonomy from [§4 of the baseline](./includes/observability-baseline.include.md#4-event-naming--taxonomy): stable names like `request.start`, `request.end`, `dependency.call`, `dependency.error`.
224
224
-[RS-OBS-010] Emit both start and end spans/events around expensive boundaries (HTTP calls, DB queries, filesystem IO).
225
225
226
226
### 9.5 Diagnostics
227
227
228
-
-[RS-OBS-011] Default to `info` level; enable `debug`/`trace` only via explicit configuration (`RUST_LOG` or application config). Use `trace` for function/method entry logging (per [§5.1 of the baseline](./includes/observability-logging-baseline.include.md#51-log-level-hierarchy)) and `debug` for coarser diagnostic messages.
228
+
-[RS-OBS-011] Default to `info` level; enable `debug`/`trace` only via explicit configuration (`RUST_LOG` or application config). Use `trace` for function/method entry logging (per [§5.1 of the baseline](./includes/observability-baseline.include.md#51-log-level-hierarchy)) and `debug` for coarser diagnostic messages.
229
229
-[RS-OBS-012] Every exception must trigger exactly one `error!` log entry with `error_code` and correlation identifiers, even if the software can recover.
230
230
-[RS-OBS-013] When `trace` level is enabled, use `#[instrument(level = "trace")]` on all public functions and async boundaries to emit function entry spans automatically.
231
231
@@ -281,7 +281,7 @@ Before shipping Rust code, verify:
281
281
-[RS-CHK-008] No `unwrap()` in library code; justified only in binaries
282
282
-[RS-CHK-009] No anti-patterns from §12 are present
-[TF-OBS-020a] Application logs emitted by Lambda functions, ECS containers, and similar compute must follow the [Structured Logging Baseline](./includes/observability-logging-baseline.include.md) field requirements — this is an infrastructure concern because log retention, parsing, and alerting depend on consistent schemas.
519
+
-[TF-OBS-020a] Application logs emitted by Lambda functions, ECS containers, and similar compute must follow the [Structured Logging Baseline](./includes/observability-baseline.include.md) field requirements — this is an infrastructure concern because log retention, parsing, and alerting depend on consistent schemas.
520
520
-[TF-OBS-021] Ensure logs include correlation identifiers consistently (request id / trace id / account id / region).
521
521
-[TF-OBS-022] Use CloudWatch Logs Insights-friendly fields and stable event names.
Copy file name to clipboardExpand all lines: .github/instructions/typescript.instructions.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -565,7 +565,7 @@ If the system depends on external services (cloud APIs, databases, third-party s
565
565
566
566
### 11.6 Debugging modes 🪲
567
567
568
-
-[TS-ERR-017] Support controlled diagnostics (see also [§5.1 of the baseline](./includes/observability-logging-baseline.include.md#51-log-level-hierarchy) for level hierarchy):
568
+
-[TS-ERR-017] Support controlled diagnostics (see also [§5.1 of the baseline](./includes/observability-baseline.include.md#51-log-level-hierarchy) for level hierarchy):
569
569
-[TS-ERR-017a]`--verbose` increases detail (CLIs)
570
570
-[TS-ERR-017b]`--debug` may include stack traces and enables function/method entry logging (trace-like behaviour; still never secrets)
571
571
-[TS-ERR-018] Diagnostics must not change behaviour, only observability.
@@ -592,11 +592,11 @@ Observability is non-negotiable.
592
592
593
593
### 12.2 Logging
594
594
595
-
-[TS-OBS-004] Prefer structured logs (JSON) and follow the [Structured Logging Baseline](./includes/observability-logging-baseline.include.md) for canonical field definitions.
596
-
-[TS-OBS-005] Service/API logs must include the required metadata from [section 1](./includes/observability-logging-baseline.include.md#1-required-fields-services-apis); do not remove or rename those fields locally.
597
-
-[TS-OBS-006] CLI/worker logs that emit structured output must include the CLI invocation fields from [section 2](./includes/observability-logging-baseline.include.md#2-required-fields-clis).
598
-
-[TS-OBS-007] Apply the secrecy and event taxonomy rules from [sections 3–4](./includes/observability-logging-baseline.include.md#3-sensitive-data--secrecy-rules); never log secrets or personal data, and keep event names (`request.*`, `dependency.*`, etc.) stable for automation.
599
-
-[TS-OBS-007a] When verbose or debug logging is enabled, emit a single function/method entry log for every call path with the operation name and a sanitised summary of arguments per [section 5](./includes/observability-logging-baseline.include.md#5-diagnostics--sampling); never include sensitive payloads.
595
+
-[TS-OBS-004] Prefer structured logs (JSON) and follow the [Structured Logging Baseline](./includes/observability-baseline.include.md) for canonical field definitions.
596
+
-[TS-OBS-005] Service/API logs must include the required metadata from [section 1](./includes/observability-baseline.include.md#1-required-fields-services-apis); do not remove or rename those fields locally.
597
+
-[TS-OBS-006] CLI/worker logs that emit structured output must include the CLI invocation fields from [section 2](./includes/observability-baseline.include.md#2-required-fields-clis).
598
+
-[TS-OBS-007] Apply the secrecy and event taxonomy rules from [sections 3–4](./includes/observability-baseline.include.md#3-sensitive-data--secrecy-rules); never log secrets or personal data, and keep event names (`request.*`, `dependency.*`, etc.) stable for automation.
599
+
-[TS-OBS-007a] When verbose or debug logging is enabled, emit a single function/method entry log for every call path with the operation name and a sanitised summary of arguments per [section 5](./includes/observability-baseline.include.md#5-diagnostics--sampling); never include sensitive payloads.
Copy file name to clipboardExpand all lines: .github/prompts/dev.implement-cli-args-parsing.prompt.md
+4-14Lines changed: 4 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Evaluate and enforce specific CLI argument parsing discipline acros
6
6
7
7
## Goal 🎯
8
8
9
-
Audit every CLI entrypoint and argument parser in this repository against the CLI Contract Baseline and the argument parsing standards defined below. For each entrypoint, report compliance or non-compliance per category, citing concrete evidence (function names, line numbers, code snippets). Where gaps exist, implement fixes immediately using the sensible defaults described in this prompt and the baseline.
9
+
Review every CLI entrypoint and argument parser against the CLI standards below. Report compliance with evidence and fix gaps using the defaults in this prompt and the baseline.
10
10
11
11
## Steps 👣
12
12
@@ -25,21 +25,11 @@ Audit every CLI entrypoint and argument parser in this repository against the CL
25
25
2. Flag manual parsing (`sys.argv`, `os.Args`, `process.argv`) or ad-hoc split logic that bypasses a parser.
26
26
3. Record where validation and default handling occur.
Copy file name to clipboardExpand all lines: .github/prompts/dev.implement-logging.prompt.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Evaluate and enforce specific logging discipline across the codebas
6
6
7
7
## Goal 🎯
8
8
9
-
Audit every Python file in this repository against the logging standards defined below. For each file, report compliance or non-compliance per category, citing concrete evidence (function names, line numbers, code snippets). Where gaps exist, implement fixes immediately using the sensible defaults described in this prompt.
9
+
Review every Python file against the logging standards below. Report compliance with evidence and fix gaps using the defaults in this prompt and the baseline.
10
10
11
11
## Steps 👣
12
12
@@ -25,6 +25,12 @@ Audit every Python file in this repository against the logging standards defined
25
25
26
26
For every file that uses logging (or should but does not), evaluate compliance against the categories below. Report each finding and remediate inline where feasible.
0 commit comments