feat: 新增 ponytail_code_quality Skill (SK_0003) + 路径硬编码修复#1
Open
ciskonc wants to merge 3 commits into
Open
Conversation
- 6级决策阶梯(YAGNI→stdlib→原生→已装依赖→一行→最小实现) - 源自 DietrichGebert/ponytail(18.4k star),适配 Trae 无 hooks 架构 - 默认 full 强度,所有模型通用,支持 lite/full/ultra 切换 - 安全边界:auth/crypto/serialization/sql/user_input 5 领域不使用阶梯 - SKILL_REGISTRY 注册 SK_0003,INDEX.md 新增 skill 段指针
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.
概述
本 PR 在 v1.1.0 基础上新增 ponytail_code_quality Skill (SK_0003) 并修复若干路径硬编码问题,提升代码质量规范与跨环境可移植性。
变更内容
1. 新增 ponytail_code_quality Skill (SK_0003)
背景:ponytail 是 DietrichGebert/ponytail(18.4k star)的代码质量规则集,核心理念是"能不写就不写、能复用就复用、能一行就一行"。本 Skill 将其适配到 AOS 体系,为 AI 编写代码时提供决策约束。
核心机制:6 级决策阶梯(按优先级从高到低)
安全边界:以下 5 个领域不使用阶梯,保持严谨实现:
auth(认证授权)crypto(加密解密)serialization(序列化)sql(数据库)user_input(用户输入处理)强度切换:默认
full,用户可通过ponytail lite/ponytail ultra切换新增文件:
03_TOOLS/skills/ponytail_code_quality/SKILL.md(核心指令,95 行)03_TOOLS/skills/ponytail_code_quality/config.json(配置,15 行)03_TOOLS/skills/ponytail_code_quality/gotchas.md(坑点清单,40 行)03_TOOLS/skills/ponytail_code_quality/references/ladder.md(阶梯详解,54 行)注册变更:
00_BOOT/SKILL_REGISTRY.md新增 SK_0003 注册行 + 演化记录04_MEMORY/INDEX.md新增 skill 段指针00_BOOT/SYSTEM_STATE.md追加事件日志2. AGENTS.md 双路径环境改为相对路径
问题:原"双路径环境"章节使用硬编码盘符
d:\AOS\和d:\github\agent-operating-system\,发布到 GitHub 会泄露本地环境信息,且其他用户路径不一致会导致规则失效。修复:改为相对路径
./AOS/和./github/agent-operating-system/,不绑定盘符。3. aos_generate_data.py 移除硬编码路径
问题:
find_aos_root()函数第 50 行有硬编码 fallback 路径列表[Path("D:/AOS"), Path("C:/AOS"), Path("d:/AOS"), Path("c:/AOS")],发布到 GitHub 会泄露盘符假设。修复:改为读取环境变量
AOS_ROOT,用户可自定义。原有 3 级自动检测(命令行参数 → 当前目录 → 脚本所在目录向上查找)保持不变。设计决策
为什么选 ponytail
为什么默认 full 强度
ponytail 官方就是默认 full。经过讨论(见 aos_development 项目下 7 份方案文档),最终在 v3 方案中确定:所有模型通用,不做模型检测,不做评分系统。理由:
ponytail lite测试验证
aos_generate_data.py运行正常,通过脚本所在目录向上查找 AGENTS.md 自动定位根目录aos_check.py全部检查通过文件变更清单
03_TOOLS/skills/ponytail_code_quality/SKILL.md03_TOOLS/skills/ponytail_code_quality/config.json03_TOOLS/skills/ponytail_code_quality/gotchas.md03_TOOLS/skills/ponytail_code_quality/references/ladder.md00_BOOT/SKILL_REGISTRY.md00_BOOT/SYSTEM_STATE.md04_MEMORY/INDEX.mdAGENTS.md03_TOOLS/scripts/aos_generate_data.py合计:3 个 commit,9 个文件,+224/-10 行
不在本 PR 范围
aos_check.py索引检查的路径解析优化(设计脆弱点,非阻塞)后续计划
若本 PR 合并,后续可考虑:
07_EXPORTS/下新增 ponytail 安装说明(面向 v1.0.0 用户).trae/rules/实现 ponytail 自动生效(always-on Rule)相关文档
本次变更的完整讨论过程记录在
01_PROJECTS/aos_development/docs/下(共 7 份方案文档,从 v1 分析到 v3 最终版),因含个人开发笔记未包含在本 PR 中。许可证:MIT License with Additional Terms,与上游一致