ratifact 1.0.3__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ratifact-1.0.3 → ratifact-1.0.4}/LEEME.md +2 -1
- {ratifact-1.0.3 → ratifact-1.0.4}/PKG-INFO +1 -1
- {ratifact-1.0.3 → ratifact-1.0.4}/pyproject.toml +1 -1
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/__init__.py +1 -1
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/contexto_documentos.py +8 -9
- ratifact-1.0.4/ratifact/herramientas/decisiones_visibilidad.py +81 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/tareas.py +7 -3
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/tareas_brief.py +41 -6
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/skills/run-task/SKILL.md +1 -1
- {ratifact-1.0.3 → ratifact-1.0.4}/.gitignore +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/LICENSE +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/README.md +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/app.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/archivos.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/build.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/busqueda.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/catalogo.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/cli.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/clientes.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/clientes_toml.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/config.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/delegacion.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/doctor.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/doctor_plataforma.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/doctor_vivos.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/esquema.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/__init__.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/decisiones.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/pendientes_sesiones.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/herramientas/proyectos.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/idioma.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe_delegacion.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe_memoria.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe_tokens.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe_tokens_atribucion.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/informe_tokens_lectura.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/instalacion.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/instalar.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/instalar_extras.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/__init__.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/base.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/codegraph.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/engram.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/gentle_ai.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/integraciones/registro.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/listado.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/migracion_v2.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/modelos.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/plantillas.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/plurales.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/procesos.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/prompts.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/registros.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/retirado.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/rutas.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/upgrade.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/upgrade_aplicar.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/vocabulario.py +0 -0
- {ratifact-1.0.3 → ratifact-1.0.4}/ratifact/workers.py +0 -0
|
@@ -275,7 +275,8 @@ commit por enmienda; al menos uno de los dos campos; una enmienda idéntica dent
|
|
|
275
275
|
no se escribe de nuevo.
|
|
276
276
|
|
|
277
277
|
`read_task(project, id)`: brief de trabajo de una tarea en lugar del archivo completo: frontmatter, spec
|
|
278
|
-
completa (con las enmiendas),
|
|
278
|
+
completa (con las enmiendas), estado vigente de cada decisión aplicable al momento de leer (sin modificar la tarea),
|
|
279
|
+
el bloque relevante según el estado (`changes_requested` → la última Review;
|
|
279
280
|
`in_review`/`failed` → el último resultado; `in_progress` → la última Review si es el último bloque) y un índice de una
|
|
280
281
|
línea (título · rango de líneas · tamaño) de los demás bloques Result/Review, legibles con `read_document` y ese rango.
|
|
281
282
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ratifact
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Local MCP server that turns each repository into the persistent memory of its project: decisions, open items, tasks and sessions in a git repository of their own.
|
|
5
5
|
Project-URL: Homepage, https://github.com/EmaSleal/ratifact
|
|
6
6
|
Project-URL: Repository, https://github.com/EmaSleal/ratifact
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ratifact"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.4"
|
|
4
4
|
description = "Local MCP server that turns each repository into the persistent memory of its project: decisions, open items, tasks and sessions in a git repository of their own."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
No importa submódulos: cada uno se importa por separado (sin ciclos) y `ratifact.cli` / `servidor.py` los cargan en
|
|
5
5
|
orden."""
|
|
6
6
|
|
|
7
|
-
__version__ = "1.0.
|
|
7
|
+
__version__ = "1.0.4" # igual que [project].version de pyproject.toml (tests/test_cli.py lo comprueba)
|
|
@@ -7,6 +7,7 @@ import subprocess
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
9
|
from ratifact import build as _build
|
|
10
|
+
from ratifact import registros as _registros
|
|
10
11
|
from ratifact.app import _ejecutar, herramienta
|
|
11
12
|
from ratifact.busqueda import _resultados
|
|
12
13
|
from ratifact.catalogo import _bloque_pendientes, _es_carpeta_de_registros, _linea, _registros_en, _resolver_id
|
|
@@ -14,11 +15,12 @@ from ratifact.config import (CARPETAS_IGNORADAS, EXT_TEXTO, LIMITE_INDICE, LIMIT
|
|
|
14
15
|
_aviso_alias, _es_repo, _mem, _proyectos, _raiz, _repos, _ruta_segura, _traducir_alias,
|
|
15
16
|
_valor)
|
|
16
17
|
from ratifact.esquema import _bloqueo, _idioma_contenido, _version_esquema
|
|
18
|
+
from ratifact.herramientas.decisiones_visibilidad import _linea_propuestas
|
|
17
19
|
from ratifact.idioma import linea_contenido
|
|
18
20
|
from ratifact.integraciones import registro as _integraciones
|
|
19
21
|
from ratifact.listado import _listado
|
|
20
|
-
from ratifact.registros import
|
|
21
|
-
from ratifact.vocabulario import
|
|
22
|
+
from ratifact.registros import _commit, _escribir_atomico, _leer_registro, _resumen_tareas
|
|
23
|
+
from ratifact.vocabulario import MODOS_V0
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
# ───────────────────────── herramientas ─────────────────────────
|
|
@@ -43,8 +45,6 @@ def list_projects() -> str:
|
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
UMBRAL_INDICE = 5 # cambios en la memoria tras los cuales INDEX.md se considera desactualizado
|
|
46
|
-
|
|
47
|
-
|
|
48
48
|
def _aviso_indice(proyecto: str) -> str:
|
|
49
49
|
"""Si INDEX.md quedó atrás respecto de la memoria, lo dice explícitamente al cargar contexto."""
|
|
50
50
|
mem = _mem(proyecto)
|
|
@@ -71,6 +71,7 @@ def get_context(project: str) -> str:
|
|
|
71
71
|
The first line is `ratifact <build>` (version + content hash of the running server). Below it, a ⚠ line when
|
|
72
72
|
this server process is older than the installation on disk (restart the client) or when the local source it was
|
|
73
73
|
installed from is newer than the installation (reinstall).
|
|
74
|
+
Proposed decisions are listed with their age and oldest items are flagged for a small decision batch.
|
|
74
75
|
At the end, if optional integrations are active (codegraph, gentle-ai, engram…), one line listing them and their
|
|
75
76
|
planning guidance; that guidance is conditional: follow it only if you have their tools."""
|
|
76
77
|
proyecto = project
|
|
@@ -89,11 +90,9 @@ def get_context(project: str) -> str:
|
|
|
89
90
|
indice = mem / "INDEX.md"
|
|
90
91
|
partes.append(indice.read_text(encoding="utf-8") if indice.exists() else "(INDEX.md does not exist)")
|
|
91
92
|
partes.append(_bloque_pendientes(proyecto)) # ADR-026: del catálogo, no abiertas.md
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
partes.append("Proposed decisions awaiting the user's acceptance: "
|
|
96
|
-
+ ", ".join(sorted(propuestas, key=_clave_id)))
|
|
93
|
+
linea_propuestas = _linea_propuestas(mem)
|
|
94
|
+
if linea_propuestas:
|
|
95
|
+
partes.append(linea_propuestas)
|
|
97
96
|
tareas = _resumen_tareas(proyecto)
|
|
98
97
|
if tareas:
|
|
99
98
|
partes.append("# Active code tasks\n" + "\n".join(tareas))
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Renderiza la edad y el estado actual de decisiones citadas por las herramientas."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import datetime as _dt
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from ratifact import registros as _registros
|
|
8
|
+
from ratifact.config import ErrorMemoria, _mem
|
|
9
|
+
from ratifact.registros import _buscar_registro, _clave_id, _leer_registro, _normalizar_id
|
|
10
|
+
from ratifact.vocabulario import DECISIONES
|
|
11
|
+
|
|
12
|
+
UMBRAL_ANTIGUEDAD_PROPUESTA_DIAS = 14
|
|
13
|
+
MAX_PROPUESTAS_ANTIGUAS_A_DECIDIR = 3
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _propuestas_con_antiguedad(mem: Path) -> list[tuple[str, _dt.date | None]]:
|
|
17
|
+
"""Devuelve propuestas de más antiguas a más nuevas; las fechas inválidas quedan al final."""
|
|
18
|
+
propuestas = []
|
|
19
|
+
for ruta in (mem / DECISIONES).glob("ADR-*.md"):
|
|
20
|
+
meta, _ = _leer_registro(ruta)
|
|
21
|
+
if meta.get("status") != "proposed":
|
|
22
|
+
continue
|
|
23
|
+
id_ = "-".join(ruta.stem.split("-", 2)[:2])
|
|
24
|
+
try:
|
|
25
|
+
fecha = _dt.date.fromisoformat(str(meta.get("date", "")))
|
|
26
|
+
except ValueError:
|
|
27
|
+
fecha = None
|
|
28
|
+
propuestas.append((id_, fecha))
|
|
29
|
+
return sorted(propuestas, key=lambda p: (p[1] is None, p[1] or _dt.date.max, _clave_id(p[0])))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _linea_propuestas(mem: Path) -> str:
|
|
33
|
+
"""Renderiza edad y sugerencia de decisión por lote sin alterar los ADR."""
|
|
34
|
+
propuestas = _propuestas_con_antiguedad(mem)
|
|
35
|
+
if not propuestas:
|
|
36
|
+
return ""
|
|
37
|
+
hoy = _registros._ahora().date()
|
|
38
|
+
elementos, antiguas = [], []
|
|
39
|
+
for id_, fecha in propuestas:
|
|
40
|
+
if fecha is None or fecha > hoy:
|
|
41
|
+
elementos.append(id_)
|
|
42
|
+
continue
|
|
43
|
+
dias = (hoy - fecha).days
|
|
44
|
+
elementos.append(f"{id_} ({'today' if dias == 0 else f'{dias} d'})")
|
|
45
|
+
if dias >= UMBRAL_ANTIGUEDAD_PROPUESTA_DIAS:
|
|
46
|
+
antiguas.append(id_)
|
|
47
|
+
linea = "Proposed decisions awaiting the user's acceptance: " + ", ".join(elementos)
|
|
48
|
+
if antiguas:
|
|
49
|
+
lote = ", ".join(antiguas[:MAX_PROPUESTAS_ANTIGUAS_A_DECIDIR])
|
|
50
|
+
cantidad = len(antiguas[:MAX_PROPUESTAS_ANTIGUAS_A_DECIDIR])
|
|
51
|
+
if cantidad == 1:
|
|
52
|
+
linea += f"\nOffer the user to decide the oldest proposal: {lote}"
|
|
53
|
+
else:
|
|
54
|
+
linea += f"\nOffer the user to decide the {cantidad} oldest proposals: {lote}"
|
|
55
|
+
return linea
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _avisos_decisiones(proyecto: str, decisiones: str) -> str:
|
|
59
|
+
"""Informa estados no aceptados sin cambiar el formato guardado en la tarea."""
|
|
60
|
+
avisos = []
|
|
61
|
+
for id_ in decisiones.split(", ") if decisiones else ():
|
|
62
|
+
meta, _ = _leer_registro(_buscar_registro(_mem(proyecto) / DECISIONES, id_))
|
|
63
|
+
estado = meta.get("status", "unknown")
|
|
64
|
+
if estado == "accepted":
|
|
65
|
+
continue
|
|
66
|
+
if estado == "proposed":
|
|
67
|
+
avisos.append(f"⚠ {id_} is proposed; the coding agent will treat it as a reference, not as a rule. "
|
|
68
|
+
"Accept it before starting or clarify in the task notes how to treat it.")
|
|
69
|
+
elif estado == "superseded":
|
|
70
|
+
reemplazo = meta.get("superseded_by", "")
|
|
71
|
+
if reemplazo:
|
|
72
|
+
try:
|
|
73
|
+
reemplazo = _normalizar_id(reemplazo)
|
|
74
|
+
except ErrorMemoria:
|
|
75
|
+
pass
|
|
76
|
+
avisos.append(f"⚠ {id_} is superseded by {reemplazo}; do not treat it as current guidance.")
|
|
77
|
+
else:
|
|
78
|
+
avisos.append(f"⚠ {id_} is superseded; do not treat it as current guidance.")
|
|
79
|
+
else:
|
|
80
|
+
avisos.append(f"⚠ {id_} is {estado}; it is not applicable as current guidance and must not be treated as a rule.")
|
|
81
|
+
return "\n".join(avisos)
|
|
@@ -13,6 +13,7 @@ from ratifact.app import _ejecutar, herramienta
|
|
|
13
13
|
from ratifact.catalogo import _registros_en
|
|
14
14
|
from ratifact.config import ErrorMemoria, _mem, _proyectos, _repos, _valor
|
|
15
15
|
from ratifact.esquema import _bloqueo, _idioma_contenido
|
|
16
|
+
from ratifact.herramientas.decisiones_visibilidad import _avisos_decisiones
|
|
16
17
|
from ratifact.idioma import bloque_idioma
|
|
17
18
|
from ratifact.integraciones import registro as _integraciones
|
|
18
19
|
from ratifact.registros import (_buscar_registro, _commit, _duplicado_reciente, _escribir_registro, _hoy,
|
|
@@ -88,7 +89,8 @@ def create_task(project: str, title: str, goal: str, acceptance_criteria: str, d
|
|
|
88
89
|
In multi-repo projects, `repo` (required) is the folder where the work happens; in single-repo projects it is
|
|
89
90
|
ignored (the response says so).
|
|
90
91
|
It must be self-contained: the coding agent runs it without this chat. `acceptance_criteria`: a verifiable list
|
|
91
|
-
(tests that must pass, observable behavior). `decisions`: applicable ADR ids
|
|
92
|
+
(tests that must pass, observable behavior). `decisions`: applicable ADR ids; non-accepted decisions are identified
|
|
93
|
+
in the response without preventing task creation. `files`: paths likely to be
|
|
92
94
|
touched. The user runs it with /run-task T-NNN.
|
|
93
95
|
`resolves`: pending items the task resolves, comma-separated, each optionally with "(partial)" (e.g.
|
|
94
96
|
"P-036, P-037 (partial)"); they must exist and be open. Stored in the task ("Resolves" section); when the task is
|
|
@@ -151,8 +153,10 @@ def create_task(project: str, title: str, goal: str, acceptance_criteria: str, d
|
|
|
151
153
|
_escribir_registro(ruta, meta, "\n\n".join(secciones))
|
|
152
154
|
sha = _commit(proyecto, [ruta], f"{id_} {titulo} (todo)")
|
|
153
155
|
linea = _integraciones._linea_integraciones(proyecto)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
respuesta = (f"{id_} created · suggested branch {meta['branch']} · commit {sha}\nRun it with: /run-task {id_}"
|
|
157
|
+
+ nota + (f"\n{linea}" if linea else ""))
|
|
158
|
+
avisos = _avisos_decisiones(proyecto, decisiones_norm)
|
|
159
|
+
return respuesta + (f"\n{avisos}" if avisos else "")
|
|
156
160
|
return _ejecutar(f)
|
|
157
161
|
|
|
158
162
|
|
|
@@ -17,8 +17,8 @@ from ratifact.config import MEM, ErrorMemoria, _mem
|
|
|
17
17
|
from ratifact.esquema import _bloqueo, _idioma_contenido
|
|
18
18
|
from ratifact.idioma import bloque_idioma
|
|
19
19
|
from ratifact.registros import (MARCA_DUPLICADO, VENTANA_IDEMPOTENCIA_MINUTOS, _buscar_registro, _commit,
|
|
20
|
-
_escribir_registro, _hoy, _leer_registro)
|
|
21
|
-
from ratifact.vocabulario import TAREAS
|
|
20
|
+
_escribir_registro, _hoy, _leer_registro, _normalizar_id)
|
|
21
|
+
from ratifact.vocabulario import DECISIONES, TAREAS
|
|
22
22
|
|
|
23
23
|
ESTADOS_AMPLIABLES = ("todo", "changes_requested")
|
|
24
24
|
SECCION_ENMIENDAS = "## Amendments"
|
|
@@ -151,13 +151,47 @@ def _relevante(estado: str, bloques: list[tuple[str, int, int]]) -> tuple[str, i
|
|
|
151
151
|
return None
|
|
152
152
|
|
|
153
153
|
|
|
154
|
+
def _decisiones_vigentes(mem, lineas: list[str]) -> list[str]:
|
|
155
|
+
"""Renderiza estados actuales en el brief sin modificar las líneas persistidas."""
|
|
156
|
+
salida = lineas.copy()
|
|
157
|
+
inicio = next((i for i, linea in enumerate(salida) if linea.strip() == "## Applicable decisions"), None)
|
|
158
|
+
if inicio is None:
|
|
159
|
+
return salida
|
|
160
|
+
fin = next((i for i in range(inicio + 1, len(salida)) if salida[i].startswith("## ")), len(salida))
|
|
161
|
+
primera = next((i for i in range(inicio + 1, fin) if salida[i].strip()), None)
|
|
162
|
+
if primera is None:
|
|
163
|
+
return salida
|
|
164
|
+
ultima = next(i for i in range(fin - 1, primera - 1, -1) if salida[i].strip())
|
|
165
|
+
ids = [parte.strip() for parte in "\n".join(salida[primera:ultima + 1]).split(",")]
|
|
166
|
+
normalizados = []
|
|
167
|
+
for id_ in ids:
|
|
168
|
+
try:
|
|
169
|
+
normalizado = _normalizar_id(id_)
|
|
170
|
+
except ErrorMemoria:
|
|
171
|
+
return salida
|
|
172
|
+
if not re.fullmatch(r"ADR-\d+", normalizado):
|
|
173
|
+
return salida
|
|
174
|
+
normalizados.append(normalizado)
|
|
175
|
+
actuales = []
|
|
176
|
+
for id_ in normalizados:
|
|
177
|
+
try:
|
|
178
|
+
ruta = _buscar_registro(mem / DECISIONES, id_)
|
|
179
|
+
except ErrorMemoria:
|
|
180
|
+
actuales.append(f"{id_} (missing)")
|
|
181
|
+
continue
|
|
182
|
+
meta, _ = _leer_registro(ruta)
|
|
183
|
+
actuales.append(f"{id_} ({meta.get('status', 'unknown')})")
|
|
184
|
+
return salida[:primera] + [", ".join(actuales)] + salida[ultima + 1:]
|
|
185
|
+
|
|
186
|
+
|
|
154
187
|
@herramienta
|
|
155
188
|
def read_task(project: str, id: str) -> str:
|
|
156
189
|
"""Working brief of a task, instead of reading the whole file: the frontmatter, the full spec (Goal, Acceptance
|
|
157
190
|
criteria, Resolves, Applicable decisions, Files involved, Out of scope, Notes, Amendments, How to verify), every
|
|
158
|
-
Amendment block, the block relevant to the status in full (changes_requested → latest Review; in_review or
|
|
159
|
-
failed → latest Result block; in_progress → the latest Review it answers)
|
|
160
|
-
|
|
191
|
+
Amendment block, and the block relevant to the status in full (changes_requested → latest Review; in_review or
|
|
192
|
+
failed → latest Result block; in_progress → the latest Review it answers). Applicable decisions show each
|
|
193
|
+
decision's current status at read time. The brief also indexes every other Result/Review block (heading · line
|
|
194
|
+
range · size), readable with read_document and that range."""
|
|
161
195
|
def f():
|
|
162
196
|
ruta = _buscar_registro(_mem(project) / TAREAS, id)
|
|
163
197
|
relativa = f"{MEM}/{ruta.relative_to(_mem(project)).as_posix()}"
|
|
@@ -166,7 +200,8 @@ def read_task(project: str, id: str) -> str:
|
|
|
166
200
|
cuerpo_desde = _fin_frontmatter(lineas)
|
|
167
201
|
fin_spec = next((i for i in range(cuerpo_desde, len(lineas)) if lineas[i].strip() in SECCIONES_RESULTADO),
|
|
168
202
|
len(lineas))
|
|
169
|
-
|
|
203
|
+
spec = _decisiones_vigentes(_mem(project), lineas[:fin_spec])
|
|
204
|
+
partes = [f"(→ {relativa})\n" + "\n".join(spec).rstrip(),
|
|
170
205
|
bloque_idioma(_idioma_contenido(_mem(project)))]
|
|
171
206
|
bloques = _bloques(lineas, fin_spec + 1)
|
|
172
207
|
elegido = _relevante(meta.get("status", ""), bloques)
|
|
@@ -22,7 +22,7 @@ The project name in `ratifact` is in this repository's `CLAUDE.md` / `AGENTS.md`
|
|
|
22
22
|
|
|
23
23
|
Amendments ("### Amendment N" blocks: **Additional criteria** and **Notes**) are part of the spec: they add to the original criteria.
|
|
24
24
|
If the spec has a `repo` field (multi-repo projects), **everything that follows —git, branches, commands and tests— happens inside that folder**, not at the project root.
|
|
25
|
-
3. Read the decisions listed in "Applicable decisions" (`read_document("<project>", "ADR-NNN")`).
|
|
25
|
+
3. Read the decisions listed in "Applicable decisions" (`read_document("<project>", "ADR-NNN")`). `read_task` shows each decision's current status; only `accepted` ones are rules.
|
|
26
26
|
4. Check with `git status` that the working tree is clean. If there are uncommitted changes, **stop** and ask me; do not move or discard them.
|
|
27
27
|
5. Branch (the spec's `branch` field). Check whether it already exists with `git branch --list <branch>`:
|
|
28
28
|
- **It exists** (always for `changes_requested`, often for `failed`): `git switch <branch>` and continue on it. Do not recreate it, rebase it or `--amend` earlier commits: corrections go in new commits.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|