| name | refactor |
| description | Simplify Gradient docs, schema, profile, or harness structure without changing
semantics. Trigger: /refactor.
|
| argument-hint | [--base <branch>] [--scope <path>] [--report-only] [--apply] |
/refactor
Refactor only when the change makes Gradient's contracts clearer or removes
real duplication. Do not polish adjacent prose for taste.
Repo Hotspots
docs/module-contracts.md: source for stable responsibilities and minimum
contracts.
docs/architecture.md: source for lifecycle and module boundaries.
schemas/gradient.schema.json: source for profile shape.
profiles/*.yaml: public-safe examples of deployment differences.
- Harness files under
.agents/skills/ once installed.
Rules
- Preserve accepted decisions in
docs/decision-log.md.
- Preserve public-safe boundaries.
- Do not turn profiles into customer forks.
- Delete stale duplication before adding a new abstraction.
- For schema changes, keep examples and docs aligned.
Gate
The load-bearing ship gate is ./scripts/validate.sh, plus reviewer
judgment for lifecycle semantics in docs/architecture.md and
docs/module-contracts.md when docs change.
Output
Name the simplification, files touched, semantic invariant preserved, and gate
evidence.