feat(observability): logging standard covers every process type, not just API calls#3
Merged
Conversation
…just API calls The logging guidance skewed LLM/API-call-centric (tokens, cost, task_type) while jobs, consumers, pipelines, state machines, and process lifecycle had no concrete required events. Now: - docs/LOGGING_STANDARD.md: per-process-type event catalog (requests, external calls, background jobs, queue consumers, batch/ETL stages, lifecycle, state transitions, retries/fallbacks, caches) with minimum fields and anti-patterns (failure-only logging, start-without-end, counts-without-reasons) - templates/logging_setup.py: log_operation context manager — paired <name>_completed/<name>_failed with duration_ms for any operation - observability-check: operation telemetry beyond external calls, job/run correlation ids, long-running-process legibility step, missing-heartbeat failure mode; report block extended - observability-reviewer agent: catalog-driven scope, new job/consumer/ pipeline lifecycle category, success-silence flagged - CLAUDE.template.md principle 3 generalized to every process type - bootstrap installs LOGGING_STANDARD.md; kit_version 1.1.0 -> 1.2.0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LxEwyqF1KjEPpQKqM5tSrv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The kit's logging guidance skewed LLM/API-call-centric: the only itemized field requirements anywhere were tokens/cost/task_type, CLAUDE.template.md's logging principle specified only model calls, and nothing stated what a background job, queue consumer, batch stage, state machine, or the process lifecycle must emit. This PR makes the logging instructions complete and useful for every process type:
docs/LOGGING_STANDARD.md(new) — per-process-type event catalog with minimum required fields: requests, external calls (LLM as one case), background jobs (start/progress/terminal with items processed/skipped/failed, overlap detection), queue consumers (per-message outcome, retries, dead-lettering), batch/ETL stages (rows in/out, per-record skip reasons), process lifecycle (startup/shutdown, supervised task exits), state transitions, retries/fallbacks, caches/pools — plus the anti-patterns (failure-only logging, start-without-end, counts-without-reasons, prose events).templates/logging_setup.py— newlog_operationcontext manager: paired<name>_completed/<name>_failedevents withduration_msfor any operation, re-raising on error. Makes the universal rule ("every significant operation logs outcome + duration") a one-liner.observability-checkskill — telemetry step broadened beyond external calls; new long-running-process legibility step; job/run IDs treated as correlation context; missing-heartbeat failure mode (absence ofjob_completedis the alert); report block extended.observability-revieweragent — reads the catalog first; new job/consumer/pipeline lifecycle category; flags success-silent operations (indistinguishable from never-ran).CLAUDE.template.mdprinciple 3 generalized — model-call fields become the additional LLM requirement, not the whole rule.LOGGING_STANDARD.mdinto new projects; README tree/catalog updated;kit_version1.1.0 → 1.2.0 sokit-updateoffers this to adopted projects.Spec citation
What was tested
templates/logging_setup.pycompiles (py_compile),kit.yamlparses, changed skill/agent files have valid frontmatter.Risk and rollback
Risk: low — documentation, a new additive template helper, and checklist wording; no hooks or gate semantics change. Adopted projects see nothing until they run
kit-update.Rollback: revert the PR.
Docs
releaseskillFollow-ups
🤖 Generated with Claude Code
https://claude.ai/code/session_01LxEwyqF1KjEPpQKqM5tSrv
Generated by Claude Code