跳到正文
cccskills
免费在 GitHub 公开

add-assertion

Add new assertion function with comprehensive tests following TDD

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md1.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Add an assertion

Repository paths are relative to the repository root. Establish the assertion name, arguments, success and failure behavior, and messages from the request and sibling assertions; ask only for missing decisions. Record acceptance criteria and test inventory in .tasks/YYYY-MM-DD-add-assertion-name.md for nontrivial work.

  1. Study the matching implementation under src/assert/ and tests under tests/unit/assert/, including parameter validation, return codes, and message checks. src/assert/index.sh lists assertion modules.
  2. Use focused RED, minimal GREEN, then REFACTOR for basic success, expected failure, and relevant edge cases (empty values, special characters, malformed input). Use assert_assertion_passes, assert_assertion_fails, or assert_assertion_fails_with from src/assert/assertions.sh where appropriate. Match existing output comparisons when needed; there is no assert_fails.
  3. If adding a module, source it from src/assert/index.sh. Expose the public function through the existing module-loading pattern. Preserve Bash 3.0 parse compatibility and the existing public contract.
  4. Document the public assertion's arguments, returns, and example in user-facing docs, update CHANGELOG, and complete the task file when used. Add code comments only for a constraint the code cannot express.
  5. The main session runs the canonical quality gate once after the entire change set; delegates run only assigned focused checks. Verify success, failure, edge cases, module loading, and documentation before handing off.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Analyze test coverage and identify untested code paths

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

commit

免费

Stage and commit changes using conventional commits format

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

fix-test

免费

Debug and fix failing tests systematically

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

Measure process costs and fork budgets when changing startup, per-file, per-test, parallel workers, reporting, or coverage paths; use for fork census and performance comparisons.

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

gh-issue

免费

Fetch GitHub issue, create branch, plan and implement with TDD, then open PR

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

gh-issues

免费

Walk over all open GitHub issues that are unassigned or assigned to the current user, and process each one via the /gh-issue skill, sequentially.

中文简介正在准备中。当前显示原文说明。

TypedDevs/bashunit4362026年10月18日 更新

查看 TypedDevs 的全部技能

报告此技能的问题