Altair Code Header
When creating or editing Python or C++ code for Altair.Zheng, add a standard header comment before the code you introduce.
Apply these rules:
- For a new Python or C++ source file, add the header at the top of the file.
- For a substantial newly added top-level function, class, or standalone code block in an existing file, add the header immediately above that block when no equivalent header already exists nearby.
- If an equivalent header already exists for the file or block, do not add a second header block. Update the existing header instead.
- Do not add this header for tiny one-line edits inside an existing documented block unless the user explicitly asks for it everywhere.
- Use the current local datetime at edit time in
YYYY/MM/DD HH:mm:ss. - Always set
@AuthortoAltair.Zheng. - Default
@versionto1.0unless the user asks for another value. @Descriptionmust describe the purpose of the new file or newly introduced code block. For edits in an existing file, summarize the newly added or materially changed behavior instead of leaving it blank.- Write
@Descriptionin Chinese whenever the context allows. Only use English when the surrounding codebase, user request, or project convention clearly requires English. - On the first creation, use
@Descriptionfor the initial purpose summary. - On the second and later modifications of the same file or code block, update
@Dateto the current edit time and append a new Chinese history line directly below the existing description lines. - Use
@Description1for the first later modification,@Description2for the next one, and continue incrementing in order without renumbering existing entries. - Each appended
@DescriptionNline should describe only that specific modification, not repeat the original file purpose. @Commentsshould contain the most relevant run, build, or test command for that file or block when it can be inferred safely from the file type or nearby project context.- If an exact command cannot be inferred safely, write a short guidance note in
@Commentsinstead of fabricating a command. - Preserve the exact field alignment shown below.
- When both a project rule and this skill apply, emit only one header comment block.
Use these templates.
For Python:
'''
@Date : 2025/12/06 16:42:18
@Author : Altair.Zheng
@version : 1.0
@Description : 用中文简要说明这段文件或代码块的作用。
@Description1 : 用中文说明这一次修改新增或调整了什么。
@Comments : Add the relevant run/test command or a short execution note.
'''
For C++:
/*
@Date : 2025/12/06 16:42:18
@Author : Altair.Zheng
@version : 1.0
@Description : 用中文简要说明这段文件或代码块的作用。
@Description1 : 用中文说明这一次修改新增或调整了什么。
@Comments : Add the relevant build/run/test command or a short execution note.
*/
If the target file has language-specific style constraints, keep the same fields and alignment while using valid native comment syntax.