测试与安全

adopt-better-result

dmmulroy/better-result

Adopt better-result in an existing TypeScript codebase. Use for a repository-wide error-handling audit and proposal, or for implementing a named vertical slice with TaggedError and Result.

  • 564 次安装
  • 2000 星标
  • 收录于

安装命令

npx skills add https://github.com/dmmulroy/better-result --skill adopt-better-result

SKILL.md

Adopt better-result

Start with evidence, then work at the scale named by the user.

Choose the branch

  • Audit branch: Use when the user requests a repository-wide audit or proposal, or has not named an implementation slice. Complete the audit branch before changing production code.
  • Named-slice branch: Use when the user explicitly requests implementation of a function, module, boundary, or previously proposed slice. Limit evidence collection to that slice and its propagation path.

An approved slice from the audit branch continues through the named-slice branch.

Audit branch: repository-wide proposal

1. Establish the repository and API facts

Read the repository instructions, package manifests, source layout, test commands, and architecture documentation. Determine whether better-result is installed and which version/API is available. Prefer installed types and source over remembered APIs.

Map every production-code area before studying individual failures. Exclude generated and vendored code from the audit; inspect tests for intended behavior.