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

Aberta Para iniciantes
#14,830 6 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
67/100
Tipo de issue
Refatoração
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
bash, git, shell
Domínio
tooling

Direção de pesquisa

Comece por plugins/source-control/scripts/worktree-claim.sh e avalie o script com base nos quatro critérios mencionados na issue: reutilização de helpers, simplificação, eficiência e abstração. Preserve as saídas, os códigos de saída, os arquivos gravados, o texto exibido, as flags e os nomes exportados. A issue não especifica testes, então examine os chamadores ou verificações relevantes antes de editar. O trabalho estará concluído quando o script listado estiver mais curto e claro, sem alterações de comportamento, e o fragmento do changelog de source-control contiver a entrada ### Changed especificada.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Shell
Estrelas
22
Forks
2
Merge médio
1h 5min
PRs com merge (30d)
969

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de melodic-software/claude-code-plugins

Todas as issues de melodic-software/claude-code-plugins

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.