Add AST codemod and LSP rename tools for multi-file refactors
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, rust, typescript
- Ambito
- cli, developer-experience
Direzione di ricerca
The issue names the existing read-only LSP rename in the lsp tool, the session undo mechanism, and the verify/test step as the parts to build on; no source files are named, so locate them first. Decide the design for rename and codemod, including the tree-sitter fallback and rollback, before writing code. Done means the six acceptance criteria pass on the Rust, TypeScript and Python fixtures.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Multi-file refactors are done with grep + edit, one call at a time. The model misses call sites, changes strings that look like identifiers, and leaves imports inconsistent. LSP rename exists as a read-only navigation feature in the lsp tool, but there is no structured rewrite path.
omp routes renames through workspace/willRenameFiles, so re-exports, barrel files and aliased imports update before the file moves. Aider's repo map gives the model a symbol-level view instead of a file list.
Inspiration
- oh-my-pi: LSP wired into every write,
willRenameFiles. - Zed: rename and code actions as first-class operations.
- Aider repo map: ranked symbols, not whole files.
- tree-sitter: language-agnostic queries for structural rewrites.
Proposal
Add two coding tools:
rename- symbol rename through the language server, with a preview of every affected file. Fall back to a tree-sitter query when no server exists, and say which path was used.codemod- a named query + rewrite pair (tree-sitter query, replacement template), with--dry-runproducing a diff, a file/line report, and a test gate before apply.
Both must:
- operate only inside the workspace;
- show the full diff before writing;
- refuse when the query matches zero nodes or more than a configured cap;
- run
verify/testafter apply and roll back on a new failure; - record the operation in the session so
undoworks.
Acceptance criteria
- Rename updates a Rust re-export, a TypeScript barrel file and a Python import in fixtures.
- Codemod dry-run produces a diff and no file change.
- A zero-match or over-cap query refuses with the count.
- A post-apply test failure rolls back every file.
-
undoreverts the whole operation, not one file. - The tool is unavailable in
planand read-only profiles.
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GotinhaAzul/LocalHarness
-
area: ux bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
GotinhaAzul/LocalHarness#198 ·
-
area: tools area: ux enhancement priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
GotinhaAzul/LocalHarness#201 ·
-
area: ux bug priority: P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
GotinhaAzul/LocalHarness#200 ·
-
area: ux bug priority: P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GotinhaAzul/LocalHarness#199 ·
-
area: ux enhancement priority: P2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
GotinhaAzul/LocalHarness#197 ·
Tutte le issue di GotinhaAzul/LocalHarness
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
zed-industries/zed#67561 ·
I maintainer di solito rispondono entro 1 giorno
-
bug has: workaround PR welcome! T: CI/CD
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
chore priority:low ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jdrouet/catapulte#882 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100