python-docstring-style
Python docstring style (flashdreams)
House style distilled from flashdreams/. Match it when adding or editing Python code so agent output is indistinguishable from human-written code.
File header
Every .py file starts with the concise two-line SPDX header, then a blank
line, then the module docstring, then a blank line, then imports.
# SPDX-FileCopyrightText: Copyright (c) <YEAR> NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""Block KV cache for causal attention with a fixed-size local window."""
<YEAR> is the current calendar year, not a hardcoded literal. Before stamping the header into a brand-new file, look up today's date (the agent host's clock, the system context, or date +%Y in a shell) and substitute it. The conversation's training-cutoff year is not the source of truth — emit e.g. Copyright (c) 2027 … if the file is being created in 2027.
When editing an existing file, leave the existing year alone — the SPDX year reflects when the file was first authored, not when it was last touched. Only update the year if the file genuinely had no header before, or you're explicitly asked to refresh copyright years across the tree.