fix: first sync overwrites hand-written rule files

Abierto
#3 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with AgentSyncer._sync_one in src/agentsync/syncer.py and cmd_sync in src/agentsync/cli.py; then find the sync tests and inspect how generator markers and result statuses are handled. Add coverage for an unmanaged hand-written CLAUDE.md and for --force; done means sync skips the unchanged file with an adoption hint by default, while --force overwrites it.

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

Descripción

bug help wanted

AgentSyncer._sync_one in src/agentsync/syncer.py writes over an existing CLAUDE.md, .cursorrules or .aider.conf.yml even when the file has no agentsync marker, so a team's hand-written rules are lost with no backup. Once every generator writes the marker, skip unmanaged files with a "skipped" result and a hint to run rulesync adopt, and add a --force flag to cmd_sync in src/agentsync/cli.py that overwrites them. A test should put a hand-written CLAUDE.md in a project, run sync, and check that the file is unchanged and the result is skipped.

Reproduced with:

$ printf "# My handwritten rules\n- Never touch prod.\n" > CLAUDE.md
$ rulesync init --tools claude_md >/dev/null && rulesync sync | grep CLAUDE
  [~] CLAUDE.md
$ grep -c "Never touch prod" CLAUDE.md; ls -A
0
.agentsync
.gitignore
CLAUDE.md
Lenguaje dominante
Python
Estrellas
1
Forks
3
Merge medio
26 d 1 h
PR fusionados (30 d)
5

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 obielin/agentsync

Todos los issues de obielin/agentsync

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.