Simplify the worktree-claim.sh source-control plugin code

Abierto Apto para principiantes
#14,830 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
67/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, git, shell
Área
tooling

Línea de trabajo

Empieza con plugins/source-control/scripts/worktree-claim.sh y revísalo según los cuatro criterios indicados en el issue: reutilización de helpers, simplificación, eficiencia y abstracción. Conserva sus salidas, códigos de salida, archivos escritos, texto mostrado, flags y nombres exportados. El issue no identifica pruebas concretas, así que inspecciona los llamadores o las comprobaciones pertinentes antes de editar. El objetivo se cumple cuando el script indicado es más corto y claro sin cambiar su comportamiento, y el fragmento del changelog de source-control incluye la entrada ### Changed especificada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Agent Brief

Type: Task
Summary: Simplify these 1 files without changing their behavior (part of the /simplify epic).

Current behavior:
The files below work as they do on main. Their code changes; what they do does not.

Desired behavior:
Review the files through /simplify's four checks (reuse of existing helpers, simplification, efficiency, right level of abstraction), using subagents if useful, and apply the fixes. The files end up shorter and clearer, and whatever runs them gets the same results.

Files:

  • plugins/source-control/scripts/worktree-claim.sh

Key interfaces:

  • Outputs, exit codes, written files and printed messages of these files: unchanged.
  • Command-line flags, exported names and anything another file calls: unchanged.

Acceptance criteria:

  • Behavior is unchanged: same outputs, exit codes, written files, printed text, command-line flags and exported names; no listed file renamed, moved or deleted.
  • The diff edits only the listed files, the lines of a test that assert on them when the change breaks that assertion, and changelog fragments.
  • The pull request stays within 400 changed lines and 15 hand-edited files (generated shared copies and changelog fragments not counted); anything beyond goes under ## Follow-ups in the pull request body.
  • ci-status is green.
  • Each touched plugin (source-control) has a fragment from scripts/new-changelog-fragment.sh <plugin> patch whose body is ### Changed and the line "Internal simplification, no behavior change."

Out of scope:

  • Moving code between files or deduping across them: the sub-epic's restructuring pass does that after these chunks merge.
  • Tests beyond the asserted lines a change breaks, eval cases, fixtures, and skill and agent text.
  • Files listed in other chunks.
  • These eval and fixture files, which read the listed files' names, flags or printed text; the behavior rule keeps them accurate:
    • plugins/source-control/evals/worktree-enter-runs-claim-gate/graders/claim-gate-ran.md
Lenguaje dominante
Shell
Estrellas
22
Forks
2
Merge medio
1 h 5 min
PR fusionados (30 d)
969

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de melodic-software/claude-code-plugins

Todos los issues de melodic-software/claude-code-plugins

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.