Skip to content

docs(agent): add repository-local engineering Skills#59

Merged
ULookup merged 30 commits into
3.0-devfrom
feat/55-agent-engineering-skills
Jul 16, 2026
Merged

docs(agent): add repository-local engineering Skills#59
ULookup merged 30 commits into
3.0-devfrom
feat/55-agent-engineering-skills

Conversation

@ULookup

@ULookup ULookup commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Primary Issue

Closes #55

Target Version

3.0-dev

Scope

本 PR 建立仅服务于编码 Agent 的仓库级工程治理体系:新增根 AGENTS.md 路由、九个 .agents/skills/chatnow-* Skill 及架构/测试 references、Issue Forms、PR 模板、纯 Go policy CLI、单元测试和受信任 GitHub Actions 门禁。

Non-goals

不修改 ChatNow 生产服务行为、协议、数据模型或部署拓扑;不引入全仓 C++ 格式化;不允许 Agent 自动合并、操作生产环境或使用真实凭据;不建立第二套测试框架。

Architecture Impact

No,因为本 PR 只新增 Agent 工程治理结构,不改变生产服务边界、状态所有权或基础设施拓扑。

Core-flow Impact

No,因为 HTTP、消息投递、ACK、认证、媒体和在线状态等 IM 核心业务链路均未改变。

Updated Skills

新增并验证:

  • .agents/skills/chatnow-orienting/
  • .agents/skills/chatnow-developing/
  • .agents/skills/chatnow-testing/
  • .agents/skills/chatnow-creating-issues/
  • .agents/skills/chatnow-submitting-pull-requests/
  • .agents/skills/chatnow-using-git/
  • .agents/skills/chatnow-verifying-changes/
  • .agents/skills/chatnow-securing-changes/
  • .agents/skills/chatnow-maintaining-documentation/

架构或 core-flow 发生变化时,根路由、相关 Skill 和 policy 均要求在同一 PR 同步修改受影响的 Skill/reference。

RED Evidence

Skill 文档在创建前分别使用无 Skill 的新鲜上下文压力场景,观察到缺少 Issue-first、版本线、严格重启式 TDD、证据分级、安全边界、完整 PR 合同或同 PR Skill 同步等失败;验证与文档 Skill 还通过审计性 remove/restore 提交证明缺失时的失败。

Policy validator 均先运行聚焦 Go 测试并观察缺失 API 或行为断言失败。例如:

cd tests && go test ./pkg/agentpolicy -run 'TestValidatePullRequest|TestValidateSkillSync' -count=1
undefined: PullRequestInput
undefined: ValidateSkillSync
FAIL

最终自审发现模板缺少 Full-diff Self-review 时,聚焦测试实际返回:

pull request template missing "## Full-diff Self-review"
violation rules = [], want exactly [PR_FULL_DIFF_SELF_REVIEW_REQUIRED]
FAIL

GREEN Evidence

最新 HEAD 上执行:

cd tests && make test-agent-policy
ok chatnow-tests/pkg/agentpolicy
ok chatnow-tests/cmd/agent-policy

九个 Skill 分别执行 quick_validate.py,均输出 Skill is valid!。真实分支全部提交标题也通过 agent-policy commits

Regression Verification

最新 HEAD 上执行并检查完整输出:

cd tests && go vet ./cmd/agent-policy ./pkg/agentpolicy
cd tests && go test ./... -count=1
git diff --check origin/3.0-dev...HEAD

结果均为 exit 0。Issue Form、PR 模板、Skill tree、branch、commit、Issue、PR 与 Skill-sync 契约测试全部包含在 Go 回归中。

Security and Compatibility

Security:workflow 从 PR base SHA 构建可信 policy binary,之后才 checkout head,并且不使用 pull_request_target 或执行 head 提供的 policy 程序;敏感信息扫描未发现凭据或私钥。

Compatibility:不改变生产 API、wire、配置、数据或运行时语义;只新增 Agent 工程工件和 CI policy。

Migration:无需数据或服务迁移。合入后新 Issue/PR 使用新增模板与门禁。

Unverified Items

  • actionlint:NOT RUN,本机未安装;GitHub Actions 将在当前 Draft PR 上解析并运行 workflow。
  • 当前 HEAD 的 GitHub CI:failed。既有 build job 缺少 odb 和 brpc headers,日志为 /bin/sh: odb: not foundbrpc/server.h: No such file or directory;本 PR 未修改 CMake、C++ 或 .github/workflows/ci.yml,不在 Issue engineering: add repository-local Agent engineering Skills #55 范围内修复该基线。
  • BVT、Functional、Scenario、Performance:因 build 失败而 skipped,未宣称通过。
  • Agent Policy workflow:本次 bootstrap PR 未产生对应 check;合入 base 后才可为后续 PR 提供受信任 base policy binary。
  • Reliability:当前仓库没有可执行目录或 Make target,未发明命令或成功结果。

Rollback Plan

若 policy 阻断正常工程流程或 Skill 路由出现错误,由人类批准后回退本 PR 的 Agent 工件提交,并重新运行现有 CI;无生产数据、协议或服务状态需要回滚。禁止 Agent 自行合入或执行破坏性 Git 操作。

Stacked PR Dependencies

Dependency:None,所依赖的当前纯 Go 测试架构已在 3.0-dev

Final target version:3.0-dev

Merge order:None。

After predecessor merge:None。

Full-diff Self-review

Base and range:origin/3.0-dev...HEAD,merge-base 等于最新 origin/3.0-dev

Verdict:已审查全部 53 个变更文件,范围仅包含 Issue #55 的九个 Skills/references、根路由、Agent 设计/计划、GitHub 模板/workflow 和 Go policy;未发现无关生产代码、生成文件、敏感信息、语言契约冲突或缺失的架构/core-flow Skill 同步。

Agent Acknowledgements

  • 已执行完整差异自审,并核对 Issue 范围与非目标。
  • 已同步所有受 mandatory workflow 影响的 Skill、模板和 policy。
  • 已如实记录本地不可用项及待运行 CI,保持 Draft。
  • 不会自行合入;合入必须由人类批准。

ULookup added 30 commits July 16, 2026 17:46
@ULookup
ULookup marked this pull request as ready for review July 16, 2026 10:07
@ULookup ULookup linked an issue Jul 16, 2026 that may be closed by this pull request
@ULookup
ULookup merged commit 15f6eae into 3.0-dev Jul 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

engineering: add repository-local Agent engineering Skills

1 participant