ce-compound: line-number citations go stale quickly, and are checked against the working tree even when it holds unrelated changes

Abierto
#2,083 0 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, typescript

Línea de trabajo

Start with skills/ce-compound/references/research.md Phase 1 and grounding-validation.md, then inspect validate-doc-claims.py to see how it handles paths and citation line suffixes. Trace how capture and refresh choose the tree used for code-behavior citations. Done when citations prefer symbol anchors where possible, verification uses and identifies the intended base tree, and refresh recognizes citations that still match the default branch.

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

Descripción

ce-compound's capture step asks the drafter to "cite file:line alongside the claim" from the current tree (skills/ce-compound/references/research.md, Phase 1 draft step), and grounding-validation.md says code-behavior claims verify against the local working tree. This causes two problems.

  1. Line numbers go stale whenever lines are added or removed above them. In one repo using ce-compound, a single refresh pull request updated 70 learnings, most of them only to move line numbers, and a second branch existed just to update one learning's citations again. Neither change corrected anything a reader needed. The code had moved, and the numbers had not. validate-doc-claims.py strips :line suffixes before checking, so nothing flags a stale number until someone reads it.

  2. The working tree is not always the tree the learning will merge into. In a GitButler workspace, or any checkout with other unmerged work applied, the working tree includes changes that are not part of the learning's pull request. In one session, a capture wrote line numbers that were 4-7 lines off from the base branch, and a refresh investigation recommended "correcting" about ten citations that were right on the base branch to the working-tree values. On an ordinary feature branch this does not arise, because the learning merges with the code it cites.

Suggested changes:

  • Prefer symbol anchors (function, class, or config key names) over line numbers when citing code in a learning, and keep file:line for cases where no symbol identifies the spot.
  • When HEAD is not the default branch's tip, verify code-behavior citations against the merge base or the default branch, as validate-doc-claims.py already does for paths, and state which tree was used.
  • In refresh, do not classify a citation as drifted when it matches the default branch.
Lenguaje dominante
TypeScript
Estrellas
25.6k
Forks
2.1k
Merge medio
3 h 57 min
PR fusionados (30 d)
170

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 EveryInc/compound-engineering-plugin

Todos los issues de EveryInc/compound-engineering-plugin

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.