mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
docs(agents): 补充文件头治理规则
- 补充 AGENTS.md 中的许可证文件头规则 - 修复新增治理文件自身缺失的文件头
This commit is contained in:
parent
ff553977e3
commit
4153ea59b8
3
.github/workflows/license-header-fix.yml
vendored
3
.github/workflows/license-header-fix.yml
vendored
@ -1,3 +1,6 @@
|
||||
# Copyright (c) 2025-2026 GeWuYou
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# 维护者手动触发的 Apache-2.0 文件头修复流程。
|
||||
name: License Header Fix
|
||||
|
||||
|
||||
17
AGENTS.md
17
AGENTS.md
@ -79,6 +79,23 @@ All AI agents and contributors must follow these rules when writing, reviewing,
|
||||
- The branch naming rule for a new task branch is `<type>/<topic-or-scope>`, where `<type>` should match the intended
|
||||
Conventional Commit category as closely as practical.
|
||||
|
||||
## License Header Rules
|
||||
|
||||
- Repository-maintained source and configuration files that are supported by `scripts/license-header.py` MUST include an
|
||||
Apache-2.0 file header before the task is considered complete.
|
||||
- When creating or modifying supported files, contributors MUST preserve an existing compliant header or add the SPDX
|
||||
header generated by `python3 scripts/license-header.py --fix`.
|
||||
- Before committing changes that add or modify supported source/configuration files, contributors MUST run
|
||||
`python3 scripts/license-header.py --check` and resolve any missing or misplaced headers.
|
||||
- For files with shebang lines, keep the shebang as the first line and place the license header immediately after it.
|
||||
- For XML/MSBuild files with an XML declaration, keep the XML declaration as the first node and place the license header
|
||||
immediately after it.
|
||||
- Do not add project license headers to excluded or third-party areas such as `.agents/**`, `ai-libs/**`,
|
||||
`third-party-licenses/**`, generated snapshots, binary assets, lock files, and generated build output. Treat
|
||||
`scripts/license-header.py` as the authoritative include/exclude policy for this check.
|
||||
- If CI reports a license-header failure, either fix it locally with `python3 scripts/license-header.py --fix` or, for
|
||||
maintainer-owned cleanup, use the manual `License Header Fix` GitHub Actions workflow to create a reviewed repair PR.
|
||||
|
||||
## Repository Boot Skill
|
||||
|
||||
- The repository-maintained Codex boot skill lives at `.codex/skills/gframework-boot/`.
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2025-2026 GeWuYou
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
"""Command entry point for repository license header checks."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user