360 Secure SkillHub
360 安全技能中心

house-rules

面向 clhbid 仓库的写作与评审规则,要求使用 writing-lean 技能组织代码及描述,测试自身行为、保持单一事实来源、采用术语表、按 Arrange-Act-Assert 写规格并伪造时钟。

分类:开发
clhbid
热度 0.00
最近更新 2026-11-04 05:11:19

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add clhbid/agent-context/house-rules
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
house-rules
description
The clhbid house rules. Use when writing, testing or reviewing code, issues or business documents in a clhbid repo.

House rules

Write the code, and everything that describes it, with the writing-lean skill.

  • Test our code, not the dependency. Test the behaviour our code adds, and take the package as given: import its values rather than copying its tables, and leave its behaviour to its own tests.
  • Single source of truth. Take each value from where it is defined: the Tailwind scale (max-w-7xl, not max-w-[1468px]), a shared constant, or the package's own types.
  • Domain terms from the glossary. GLOSSARY.md in clhbid/CLHbid-LiveAuction are the app's single source of truth: read it with the domain-modeling skill, use its terms, not those marked Avoid, and propose a missing term there rather than coining one.
  • Spec style. Set up and tear down in the test framework's hooks. Arrange, act, then assert, opening each section with an Arrange, Act or Assert comment, and assert the whole result, so an extra item fails the test.
  • Fake the clock whenever a spec depends on the time, so it passes at any hour and in any time zone.