refactor

Featured

Simplify structure, interfaces or responsibilities while preserving behavior. Use when: a focused refactor is requested; feature changes need their own intent.

Code & Development 434 stars 40 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 97/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Refactor — one structural experiment Refactor changes structure while preserving observable behavior. It performs one caller-selected transformation and reports the result. ## Prompt ```text Refactor billing-service/internal/retry/backoff.go: extract the exponential backoff calculation out of RetryRequest into its own function, no other behavior change. Record a baseline, run go test ./internal/retry/... before and after, and report the diff summary, commands, results, and anything not checked. ``` ## It's working if - The report names the preserved behavior and cites `go test ./internal/retry/...` run both before and after. - `git diff --stat` touches only `internal/retry/backoff.go`, never an unrelated file. - Golden-output hashes get captured and compared byte-for-byte whenever the changed surface produces output, e.g. `sha256sum` before and after. - The report's `behavior not checked` list is present in the output even when empty, naming any surface the gates skipped. ## Procedure 1. Name the preserved behavior, the focused acceptance surface and the concrete structural problem for its callers. Reuse the caller's domain terms and accepted behavioral examples; preserve their meaning through the change. 2. Record an honest baseline, including any reproducible ambient failures. For an evaluation comparing executable behavior, pin the starting source and build its baseline before edits; retain that binary and the comparison inputs. Compare the candidat...

Details

Author
boshu2
Repository
boshu2/agentops
Created
10 months ago
Last Updated
today
Language
Go
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category