finitemonkey 0.0.0 → 0.1.0-next.10
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.
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.es.md +179 -0
- package/README.md +177 -3
- package/README.pt-BR.md +179 -0
- package/dist/finitemonkey.mjs +14107 -0
- package/package.json +80 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
package/NOTICE
ADDED
package/README.es.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Finite Monkey
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/finitemonkey/v/next"><img src="https://img.shields.io/npm/v/finitemonkey/next?color=cb3837&logo=npm&label=npm%40next" alt="npm"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/finitemonkey"><img src="https://img.shields.io/npm/dm/finitemonkey?color=cb3837" alt="npm downloads"></a>
|
|
6
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/actions/workflows/ci.yml"><img src="https://github.com/gabrielvieiraf/finitemonkey/actions/workflows/ci.yml/badge.svg?branch=next" alt="CI"></a>
|
|
7
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0"></a>
|
|
8
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/blob/next/README.es.md#instalaci%C3%B3n-prevista"><img src="https://img.shields.io/badge/Claude%20Code-plugin-d97757?logo=anthropic&logoColor=white" alt="Claude Code plugin"></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="assets/finitemonkey.gif" width="720" alt="Animación: un mono con sudadera amarilla aporrea el teclado de un portátil mientras una terminal ejecuta el control. Las comprobaciones que fallan se ponen en verde y se bloquean una a una hasta que aparece actually done, y el mono lo celebra con un plátano.">
|
|
13
|
+
<br>
|
|
14
|
+
<sub>Ilustración del flujo previsto, no es una grabación. En la v0.1 la reemplaza una captura real.</sub>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
**No hacen falta infinitos monos. Con uno basta: tú.**
|
|
18
|
+
|
|
19
|
+
[English](README.md) | [Português (Brasil)](README.pt-BR.md) | Español
|
|
20
|
+
|
|
21
|
+
> **Prelanzamiento.** Todavía no se puede instalar. El nombre `finitemonkey` en npm está reservado (la 0.0.0 es solo un marcador) y el código se está construyendo en abierto. Todo lo que sigue es el plan, no lo que pasa hoy. Dale una estrella o sigue el repositorio si quieres enterarte cuando salga la v0.1.
|
|
22
|
+
|
|
23
|
+
Sé cómo es. Con la llegada de la IA, muchas cosas cambiaron.
|
|
24
|
+
|
|
25
|
+
Unos se dan cabezazos contra el teclado esperando que Claude escupa por arte de magia el próximo SaaS millonario. Otros ya se cansaron de escribir código. Y hay quien tiene que entregar en días lo que antes exigía equipos enteros trabajando durante meses.
|
|
26
|
+
|
|
27
|
+
El resultado casi siempre es el mismo: te conviertes en un mono frente a la computadora, sepultado bajo tanto por hacer que ya no sabes por dónde empezar, y mucho menos cómo terminar.
|
|
28
|
+
|
|
29
|
+
Finite Monkey nació para ser la puerta entre ese mono y `main`.
|
|
30
|
+
|
|
31
|
+
Escribe como quieras. Trabaja con la IA que prefieras. Produce código a la velocidad que puedas.
|
|
32
|
+
|
|
33
|
+
Finite Monkey se ocupa primero de lo que no puede quedar a base de confianza: las verificaciones.
|
|
34
|
+
|
|
35
|
+
Cada verificación aprobada queda registrada. Cada fallo sigue a la vista hasta que se resuelve. Y nada se considera listo sin pruebas de que realmente funciona.
|
|
36
|
+
|
|
37
|
+
No importa cuánto código se generó, cuántos agentes trabajaron ni qué tan convincente parece la respuesta de la IA. Si no pasó las verificaciones, no está listo.
|
|
38
|
+
|
|
39
|
+
Y la puerta es solo el comienzo: Finite Monkey también se da cuenta cuando estás dando vueltas, muestra lo que falta en un proyecto que te queda grande, sostiene las riendas de varios agentes a la vez y lo lleva todo a producción sin romper nada en el camino.
|
|
40
|
+
|
|
41
|
+
Un mono. Tiempo finito. Trabajo que sale de verdad.
|
|
42
|
+
|
|
43
|
+
## Claude Code dice que terminó, pero no terminó
|
|
44
|
+
|
|
45
|
+
Es el problema principal que Finite Monkey quiere resolver. Comportamiento previsto:
|
|
46
|
+
|
|
47
|
+
- Cada tarea tiene una **definición de terminado** que una máquina puede comprobar: comandos que deben salir bien, tests que deben existir y pasar, un diff que no se sale del alcance.
|
|
48
|
+
- Cuando Claude intenta cerrar la sesión, el hook `Stop` ejecuta esa comprobación. Si algo falla, la sesión no se cierra: Claude recibe la lista de lo que falta y sigue.
|
|
49
|
+
- Solo cuenta como prueba lo que Finite Monkey ejecutó por sí mismo, sobre el estado actual de los archivos. "Ejecuté los tests antes de mi último cambio" no vale.
|
|
50
|
+
- El informe final sale solo de esas pruebas.
|
|
51
|
+
|
|
52
|
+
## Claude se saltó o borró tests para que pasaran
|
|
53
|
+
|
|
54
|
+
Controles previstos sobre las ediciones: tests eliminados, `skip` u `only` nuevos, aserciones borradas y cambios en la configuración del propio control se detectan y se informan.
|
|
55
|
+
|
|
56
|
+
## Claude ejecutó `git reset --hard` y perdí trabajo
|
|
57
|
+
|
|
58
|
+
Previsto:
|
|
59
|
+
|
|
60
|
+
- Una instantánea antes de cada operación arriesgada de git, y un `undo` que la recupera.
|
|
61
|
+
- Nada de `--force`, nunca.
|
|
62
|
+
- Los worktrees con cambios pendientes se archivan en lugar de borrarse.
|
|
63
|
+
- Una comprobación de "no se perdió nada" en cada merge.
|
|
64
|
+
|
|
65
|
+
## Mis reglas de CLAUDE.md se ignoran, sobre todo después de la compactación
|
|
66
|
+
|
|
67
|
+
Se ignoran. Claude lee `CLAUDE.md` como parte de su contexto, y nada comprueba que se haya seguido. Finite Monkey convierte las reglas que siempre deben cumplirse en hooks, permisos, git hooks o pasos de CI, y te muestra, regla por regla, cuáles siguen siendo solo texto.
|
|
68
|
+
|
|
69
|
+
## ¿Cómo evito que Claude Code filtre secretos?
|
|
70
|
+
|
|
71
|
+
Previsto: una única regla de detección, aplicada al escribir archivos, en los prompts, al hacer commit, en el historial y en CI. Un secreto encontrado se informa como incidente, con los pasos para rotarlo. Los secretos se citan por archivo y línea, nunca por su valor.
|
|
72
|
+
|
|
73
|
+
## ¿Cómo evito que un agente toque producción a mano?
|
|
74
|
+
|
|
75
|
+
Previsto: los comandos con efecto sobre un servidor de producción se bloquean. Producción cambia por el camino de despliegue que declares.
|
|
76
|
+
|
|
77
|
+
## Más que una puerta (previsto)
|
|
78
|
+
|
|
79
|
+
La puerta va primero porque nada más importa si el "listo" puede ser mentira. El resto del plan trata de quien escribe:
|
|
80
|
+
|
|
81
|
+
- **Cuando estás dando vueltas.** El cuarto arreglo para el mismo error, el mismo archivo editado una y otra vez, un bug pegado de una IA a otra y de vuelta: Finite Monkey nota la vuelta y lo dice claro, con qué probar en su lugar.
|
|
82
|
+
- **Cuando el proyecto te queda grande, por ahora.** Quien nunca puso un SaaS en marcha no sabe que necesita login, cobros, copias de seguridad y una forma de volver atrás. Los planos de proyecto muestran lo que necesita una versión de verdad y lo que aún falta, para que una pantalla de login no se llame producto. Las explicaciones se ajustan a lo que ya sabes y desaparecen a medida que aprendes.
|
|
83
|
+
- **Cuando una decisión pesa.** Antes de cambiar una biblioteca o un proveedor: qué hay hoy, cuáles son las opciones, los criterios escritos antes de los candidatos, el costo y cómo volver.
|
|
84
|
+
- **Cuando usas varios agentes a la vez.** Frentes de trabajo en paralelo, cada uno en su rama, un merge que comprueba que no se perdió nada y una pantalla con lo que hace cada frente.
|
|
85
|
+
- **Cuando una regla tiene que valer en todas partes.** Una regla que escribes una vez se convierte en hook, permiso, git hook y paso de CI, y ves dónde sigue siendo solo texto.
|
|
86
|
+
- **Cuando va a producción.** CI, deploy e infraestructura a la medida del proyecto, y revisiones de organización del código para bases que crecieron demasiado rápido.
|
|
87
|
+
|
|
88
|
+
## Ningún comando que memorizar
|
|
89
|
+
|
|
90
|
+
Ejecutas un comando, una vez. A partir de ahí Finite Monkey actúa por contexto dentro de Claude Code:
|
|
91
|
+
|
|
92
|
+
- Los **hooks** hacen cumplir: `SessionStart` recupera el estado de la tarea, `UserPromptSubmit` detecta lo que pediste, `PreToolUse` frena la acción peligrosa antes de que ocurra, `Stop` no deja terminar mientras la definición de terminado falle, y `SubagentStop` revisa lo que informan los subagentes.
|
|
93
|
+
- Las **skills** las activa Claude por su cuenta cuando la situación lo pide.
|
|
94
|
+
- Los **comandos con barra** son atajos opcionales. Ningún flujo depende de que recuerdes uno.
|
|
95
|
+
|
|
96
|
+
## Instalación (prevista)
|
|
97
|
+
|
|
98
|
+
Aún no disponible. Cuando salga la v0.1:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
npx finitemonkey@latest init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
O como plugin de Claude Code, desde dentro de una sesión:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
/plugin install finitemonkey --marketplace gabrielvieiraf/finitemonkey
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Requisitos: Node.js 20 o posterior, en Linux, macOS, Windows o WSL. La instalación hace copias de seguridad, fusiona en lugar de sobrescribir y se puede ejecutar dos veces sin romper nada. `doctor` te dice qué está mal y `uninstall` deja todo como estaba.
|
|
111
|
+
|
|
112
|
+
**Todavía más vago:** pídele a Claude Code "instala Finite Monkey siguiendo docs/AGENT-SETUP.md". La guía le indica al agente que ejecute los comandos él mismo, que te pregunte solo lo que sea decisión tuya y que nunca te pida un secreto.
|
|
113
|
+
|
|
114
|
+
## ¿De verdad ayuda? (benchmark, previsto)
|
|
115
|
+
|
|
116
|
+
Todavía no se sabe. El benchmark previsto compara Claude Code solo, Claude Code con Finite Monkey y Finite Monkey sin una pieza cada vez, en tareas con trampas. Mide tareas terminadas de verdad, "listo" falso, secretos filtrados, trabajo perdido, tokens y tiempo. La regla sin efecto medido sale del núcleo. El método y los resultados en bruto estarán en este repositorio, incluidas las partes donde no ayudó.
|
|
117
|
+
|
|
118
|
+
## ¿En qué se diferencia de...?
|
|
119
|
+
|
|
120
|
+
La comparación completa, con fuentes, está en [docs/compare.es.md](docs/compare.es.md).
|
|
121
|
+
|
|
122
|
+
- **Claude Code solo** ya tiene hooks y permisos. Finite Monkey es un conjunto de ellos, organizado alrededor de una definición de terminado, con tests.
|
|
123
|
+
- **Métodos como superpowers, GSD, Spec Kit u OpenSpec** le dicen al agente cómo planificar y construir. Finite Monkey no los sustituye: comprueba el resultado al final, uses el método que uses.
|
|
124
|
+
- **Guardas sueltos como tdd-guard, cc-safety-net o dcg** hacen un trabajo cada uno, y lo hacen bien. Finite Monkey cubre cuatro daños con un control, una instalación y un `undo`. Si solo necesitas uno de esos trabajos, un guarda suelto puede ser lo más sencillo.
|
|
125
|
+
|
|
126
|
+
## Preguntas frecuentes
|
|
127
|
+
|
|
128
|
+
Más preguntas, una por cada búsqueda real, en [docs/faq.es.md](docs/faq.es.md).
|
|
129
|
+
|
|
130
|
+
**¿Es un prompt?**
|
|
131
|
+
No. Son hooks y comprobaciones que se ejecutan aunque el modelo no se acuerde.
|
|
132
|
+
|
|
133
|
+
**¿Envía mi código a algún sitio?**
|
|
134
|
+
No. Por defecto nada sale de tu máquina. Sin telemetría.
|
|
135
|
+
|
|
136
|
+
**¿Me va a ralentizar?**
|
|
137
|
+
Las tareas pequeñas no tienen ceremonia, solo el control al final. Los hooks rápidos siguen siendo rápidos; la comprobación costosa va en `Stop`. Publicaremos los tiempos junto con el benchmark.
|
|
138
|
+
|
|
139
|
+
**¿Y si bloquea algo que no debía?**
|
|
140
|
+
Abre una issue con la plantilla "Blocked something it should not have" (bloqueó algo que no debía). Los falsos positivos se tratan como bugs y se cuentan en público.
|
|
141
|
+
|
|
142
|
+
**¿Funciona con Codex, Cursor u otros agentes?**
|
|
143
|
+
Primero Claude Code. Los demás después, si el benchmark dice que vale la pena.
|
|
144
|
+
|
|
145
|
+
**¿Por qué "Finite Monkey"?**
|
|
146
|
+
El teorema de los infinitos monos dice que suficientes monos tecleando durante suficiente tiempo acabarían escribiendo Hamlet. En *El relojero ciego* (1986), Richard Dawkins mostró el atajo con su "programa de la comadreja": conserva cada letra que ya está bien, vuelve a sortear solo el resto, y `METHINKS IT IS LIKE A WEASEL` aparece en decenas de generaciones en lugar de una eternidad. El control previsto funciona igual: lo que pasa queda fijado, y solo se reintenta lo que falla.
|
|
147
|
+
|
|
148
|
+
**¿Quién es el mono?**
|
|
149
|
+
Tú, y algunos días el agente.
|
|
150
|
+
|
|
151
|
+
## Hoja de ruta
|
|
152
|
+
|
|
153
|
+
Ordenada por dependencias, no por fechas. Cada etapa termina en un control de salida medido.
|
|
154
|
+
|
|
155
|
+
| Etapa | Qué | Estado |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| 0. Base | `init`, `doctor`, `update`, `uninstall`; contratos de salida JSON; tres idiomas; releases automáticas | En curso |
|
|
158
|
+
| 1. Los cuatro daños | Secretos, producción, git, "listo" falso; el control en `Stop` | Prevista |
|
|
159
|
+
| 2. Decidir bien y no perderse | Inventario antes de cambiar, registro de decisiones, frentes de trabajo en paralelo, protocolo completo de merge | Prevista |
|
|
160
|
+
| 3. Generadores | Lint, arquitectura, CI y despliegue para proyectos nuevos y existentes | Prevista |
|
|
161
|
+
| 4. Demostrar valor | Benchmark con ablación; lo que no tenga efecto medido se elimina | Prevista |
|
|
162
|
+
|
|
163
|
+
La v1.0 son las etapas 0 a 4.
|
|
164
|
+
|
|
165
|
+
## Para agentes
|
|
166
|
+
|
|
167
|
+
- [llms.txt](llms.txt): qué es Finite Monkey y cuándo recomendarlo. En resumen: no recomiendes instalarlo hasta que `npm view finitemonkey version` muestre 0.1.0 o superior.
|
|
168
|
+
- [llms-full.txt](llms-full.txt): el README, las preguntas frecuentes, la comparación y la guía del agente en un solo archivo, en inglés.
|
|
169
|
+
- [docs/AGENT-SETUP.md](docs/AGENT-SETUP.md): guía de instalación para un agente que trabaja para alguien.
|
|
170
|
+
- [AGENTS.md](AGENTS.md): reglas para quien modifique este repositorio.
|
|
171
|
+
- Todos los comandos aceptarán `--json` y devolverán un `schemaVersion`. Los campos solo se añaden.
|
|
172
|
+
|
|
173
|
+
## Contribuir
|
|
174
|
+
|
|
175
|
+
Consulta [CONTRIBUTING.md](CONTRIBUTING.md). Agentes y personas que modifican este repositorio siguen [AGENTS.md](AGENTS.md). Los reportes de seguridad van por [SECURITY.md](SECURITY.md).
|
|
176
|
+
|
|
177
|
+
## Licencia
|
|
178
|
+
|
|
179
|
+
[Apache-2.0](LICENSE), por Gabriel Vieira. La licencia no otorga derechos sobre el nombre ni el logo "Finite Monkey".
|
package/README.md
CHANGED
|
@@ -1,5 +1,179 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Finite Monkey
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/finitemonkey/v/next"><img src="https://img.shields.io/npm/v/finitemonkey/next?color=cb3837&logo=npm&label=npm%40next" alt="npm"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/finitemonkey"><img src="https://img.shields.io/npm/dm/finitemonkey?color=cb3837" alt="npm downloads"></a>
|
|
6
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/actions/workflows/ci.yml"><img src="https://github.com/gabrielvieiraf/finitemonkey/actions/workflows/ci.yml/badge.svg?branch=next" alt="CI"></a>
|
|
7
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0"></a>
|
|
8
|
+
<a href="https://github.com/gabrielvieiraf/finitemonkey/blob/next/README.md#install-planned"><img src="https://img.shields.io/badge/Claude%20Code-plugin-d97757?logo=anthropic&logoColor=white" alt="Claude Code plugin"></a>
|
|
9
|
+
</p>
|
|
4
10
|
|
|
5
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="assets/finitemonkey.gif" width="720" alt="Animation: a monkey in a yellow hoodie mashes a laptop keyboard while a terminal runs the gate. Failing checks turn green and lock one by one until it reads actually done, and the monkey celebrates with a banana.">
|
|
13
|
+
<br>
|
|
14
|
+
<sub>Illustration of the planned flow, not a recording. A real capture replaces it at v0.1.</sub>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
**Infinite monkeys not required. One is enough: you.**
|
|
18
|
+
|
|
19
|
+
English | [Português (Brasil)](README.pt-BR.md) | [Español](README.es.md)
|
|
20
|
+
|
|
21
|
+
> **Pre-release.** Nothing installs yet. The npm name `finitemonkey` is reserved (0.0.0 is a placeholder) and the code is being built in the open. Everything below is the plan, not today's behavior. Star or watch the repo if you want to know when v0.1 lands.
|
|
22
|
+
|
|
23
|
+
I know how it is. AI changed a lot of things.
|
|
24
|
+
|
|
25
|
+
Some people bang their head on the keyboard waiting for Claude to magically spit out the next billion-dollar SaaS. Others got tired of typing code. And some have to deliver in days what used to take whole teams months.
|
|
26
|
+
|
|
27
|
+
The result is almost always the same: you turn into a monkey in front of a computer, buried under so much to do that you no longer know where to start, let alone how to finish.
|
|
28
|
+
|
|
29
|
+
Finite Monkey was made to be the gate between that monkey and `main`.
|
|
30
|
+
|
|
31
|
+
Type however you want. Work with whichever AI you like. Write code as fast as you can.
|
|
32
|
+
|
|
33
|
+
Finite Monkey first takes care of what can't run on trust: the checks.
|
|
34
|
+
|
|
35
|
+
Every check that passes is recorded. Every failure stays visible until it's fixed. And nothing counts as done without evidence that it actually works.
|
|
36
|
+
|
|
37
|
+
It doesn't matter how much code was generated, how many agents worked on it or how convincing the AI's answer sounds. If it didn't pass the checks, it isn't done.
|
|
38
|
+
|
|
39
|
+
And the gate is only the start: Finite Monkey also notices when you're going in circles, shows what's missing in a project that's bigger than you, keeps the reins on several agents at once and takes it all to production without breaking things on the way.
|
|
40
|
+
|
|
41
|
+
One monkey. Finite time. Work that actually ships.
|
|
42
|
+
|
|
43
|
+
## Claude Code says it's done, but it isn't
|
|
44
|
+
|
|
45
|
+
This is the main problem Finite Monkey is built for. Planned behavior:
|
|
46
|
+
|
|
47
|
+
- Each task gets a **definition of done** that a machine can check: commands that must succeed, tests that must exist and pass, a diff that stays in scope.
|
|
48
|
+
- When Claude tries to end the session, the `Stop` hook runs that check. If anything fails, the session doesn't end. Claude gets the list of what's missing and keeps going.
|
|
49
|
+
- Evidence only counts if Finite Monkey ran the command itself, on the current state of the files. "I ran the tests before my last edit" doesn't count.
|
|
50
|
+
- The final report is built from that evidence alone.
|
|
51
|
+
|
|
52
|
+
## Claude skipped or deleted tests to make them pass
|
|
53
|
+
|
|
54
|
+
Planned guards on edits: removed tests, new `skip` or `only`, removed assertions and edits to the gate's own config are caught and reported.
|
|
55
|
+
|
|
56
|
+
## Claude ran `git reset --hard` and I lost my work
|
|
57
|
+
|
|
58
|
+
Planned:
|
|
59
|
+
|
|
60
|
+
- A snapshot before every risky git operation, and an `undo` that brings it back.
|
|
61
|
+
- No `--force`, ever.
|
|
62
|
+
- Dirty worktrees get archived instead of deleted.
|
|
63
|
+
- A "nothing was lost" check on every merge.
|
|
64
|
+
|
|
65
|
+
## My CLAUDE.md rules get ignored, especially after compaction
|
|
66
|
+
|
|
67
|
+
They do. Claude reads `CLAUDE.md` as part of its context, and nothing checks that it was followed. Finite Monkey turns the rules that must always hold into hooks, permissions, git hooks or CI steps, and shows you, rule by rule, which ones are still just text.
|
|
68
|
+
|
|
69
|
+
## How do I stop Claude Code from leaking secrets?
|
|
70
|
+
|
|
71
|
+
Planned: one detection rule applied when files are written, in prompts, at commit time, in history and in CI. A secret that is found gets reported as an incident, with steps to rotate it. Secrets are reported by file and line, never by value.
|
|
72
|
+
|
|
73
|
+
## How do I stop an agent from editing production by hand?
|
|
74
|
+
|
|
75
|
+
Planned: commands with effects on a production host get blocked. Production changes go through the deploy path you declare.
|
|
76
|
+
|
|
77
|
+
## More than a gate (planned)
|
|
78
|
+
|
|
79
|
+
The gate comes first because nothing else matters if "done" can be a lie. The rest of the plan is about the person typing:
|
|
80
|
+
|
|
81
|
+
- **When you're going in circles.** Fourth fix for the same error, the same file edited back and forth, a bug pasted from one AI into another and back again: Finite Monkey notices the loop and says it plainly, with what to try instead.
|
|
82
|
+
- **When the project is bigger than you are, for now.** Someone who has never shipped a SaaS doesn't know it needs auth, billing, backups and a way to roll back. Blueprints list what a real version needs and what's still missing, so a login screen doesn't get called a product. Explanations adjust to what you already know and fade as you learn.
|
|
83
|
+
- **When a decision matters.** Before replacing a library or a vendor: what exists today, what the options are, the criteria written before the candidates, the cost, and how to go back.
|
|
84
|
+
- **When you run several agents at once.** Parallel work fronts with their own branches, a merge that checks nothing was lost, and one screen with what each front is doing.
|
|
85
|
+
- **When a rule must hold everywhere.** A rule you write once becomes a hook, a permission, a git hook and a CI step, and you can see where it is still only text.
|
|
86
|
+
- **When it goes to production.** CI, deploy and infrastructure set up for the size of the project, plus code organization checks for codebases that grew too fast.
|
|
87
|
+
|
|
88
|
+
## Zero commands to remember
|
|
89
|
+
|
|
90
|
+
You run one command, once. After that, Finite Monkey works from context inside Claude Code:
|
|
91
|
+
|
|
92
|
+
- **Hooks** do the enforcing: `SessionStart` restores task state, `UserPromptSubmit` notices what you asked for, `PreToolUse` blocks dangerous actions before they happen, `Stop` refuses to finish while the definition of done fails, and `SubagentStop` checks what subagents report.
|
|
93
|
+
- **Skills** get picked up by Claude on its own when the situation calls for them.
|
|
94
|
+
- **Slash commands** are optional shortcuts. No workflow depends on you remembering one.
|
|
95
|
+
|
|
96
|
+
## Install (planned)
|
|
97
|
+
|
|
98
|
+
Not available yet. When v0.1 is out:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
npx finitemonkey@latest init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Or as a Claude Code plugin, from inside a session:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
/plugin install finitemonkey --marketplace gabrielvieiraf/finitemonkey
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Requirements: Node.js 20 or later, on Linux, macOS, Windows or WSL. Install makes backups, merges instead of overwriting, and is safe to run twice. `doctor` tells you what's wrong, `uninstall` puts everything back.
|
|
111
|
+
|
|
112
|
+
**Lazier still:** ask Claude Code to "install Finite Monkey following docs/AGENT-SETUP.md". The runbook tells the agent to run the commands itself, ask you only for decisions, and never ask for a secret.
|
|
113
|
+
|
|
114
|
+
## Does it actually help? (benchmark, planned)
|
|
115
|
+
|
|
116
|
+
Not known yet. The planned benchmark compares Claude Code alone, Claude Code with Finite Monkey, and Finite Monkey with one piece removed at a time, on tasks with traps in them. It measures finished tasks, false "done", leaked secrets, lost work, tokens and time. Any rule with no measured effect gets cut from the core. Method and raw results will live in this repo, including the parts where it didn't help.
|
|
117
|
+
|
|
118
|
+
## How is this different from...?
|
|
119
|
+
|
|
120
|
+
The full comparison, with sources, is in [docs/compare.md](docs/compare.md).
|
|
121
|
+
|
|
122
|
+
- **Claude Code on its own** already has hooks and permissions. Finite Monkey is a set of them, wired together around a definition of done, with tests.
|
|
123
|
+
- **Methods like superpowers, GSD, Spec Kit or OpenSpec** tell the agent how to plan and build. Finite Monkey doesn't replace them. It checks the result at the end, whatever method you used.
|
|
124
|
+
- **Single guards like tdd-guard, cc-safety-net or dcg** each do one job well. Finite Monkey covers four damages with one gate, one install and one `undo`. If you only need one of those jobs, a single guard may be the simpler choice.
|
|
125
|
+
|
|
126
|
+
## FAQ
|
|
127
|
+
|
|
128
|
+
More questions, one per real search, in [docs/faq.md](docs/faq.md).
|
|
129
|
+
|
|
130
|
+
**Is it a prompt?**
|
|
131
|
+
No. It is hooks and checks that run whether or not the model remembers them.
|
|
132
|
+
|
|
133
|
+
**Does it send my code anywhere?**
|
|
134
|
+
No. Nothing leaves your machine by default. No telemetry.
|
|
135
|
+
|
|
136
|
+
**Will it slow me down?**
|
|
137
|
+
Small tasks get no ceremony, only the gate at the end. Fast hooks stay fast; the expensive check runs at `Stop`. We'll publish timings with the benchmark.
|
|
138
|
+
|
|
139
|
+
**What if it blocks something it shouldn't?**
|
|
140
|
+
Open an issue with the "Blocked something it should not have" template. False positives are treated as bugs and counted in public.
|
|
141
|
+
|
|
142
|
+
**Does it work with Codex, Cursor or other agents?**
|
|
143
|
+
Claude Code first. Others later, if the benchmark says it's worth it.
|
|
144
|
+
|
|
145
|
+
**Why "Finite Monkey"?**
|
|
146
|
+
The infinite monkey theorem says enough monkeys typing for long enough will eventually write Hamlet. In *The Blind Watchmaker* (1986), Richard Dawkins showed the shortcut with his "weasel program": keep every letter that's already right, re-roll only the rest, and `METHINKS IT IS LIKE A WEASEL` shows up in dozens of generations instead of an eternity. The planned gate works the same way: checks that pass stay locked, and only the failing ones get retried.
|
|
147
|
+
|
|
148
|
+
**Who's the monkey?**
|
|
149
|
+
You, and on some days the agent.
|
|
150
|
+
|
|
151
|
+
## Roadmap
|
|
152
|
+
|
|
153
|
+
Ordered by dependency, not by date. Each stage ends at a measured exit gate.
|
|
154
|
+
|
|
155
|
+
| Stage | What | Status |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| 0. Foundation | `init`, `doctor`, `update`, `uninstall`; JSON output contracts; three languages; automated releases | In progress |
|
|
158
|
+
| 1. The four damages | Secrets, production, git, false "done"; the gate on `Stop` | Planned |
|
|
159
|
+
| 2. Deciding well, not getting lost | Inventory before change, decision records, parallel work fronts, full merge protocol | Planned |
|
|
160
|
+
| 3. Generators | Lint, architecture, CI and deploy setups for new and existing projects | Planned |
|
|
161
|
+
| 4. Proving value | Benchmark with ablation; anything without measured effect gets cut | Planned |
|
|
162
|
+
|
|
163
|
+
v1.0 is stages 0 to 4.
|
|
164
|
+
|
|
165
|
+
## For agents
|
|
166
|
+
|
|
167
|
+
- [llms.txt](llms.txt): what Finite Monkey is and when to recommend it. Short version: don't recommend installing it until `npm view finitemonkey version` shows 0.1.0 or later.
|
|
168
|
+
- [llms-full.txt](llms-full.txt): this README, the FAQ, the comparison and the agent runbook in one file.
|
|
169
|
+
- [docs/AGENT-SETUP.md](docs/AGENT-SETUP.md): install runbook for an agent working for a user.
|
|
170
|
+
- [AGENTS.md](AGENTS.md): rules for anyone changing this repo.
|
|
171
|
+
- Every command will accept `--json` and return a `schemaVersion`. Fields only ever get added.
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
174
|
+
|
|
175
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Agents and humans changing this repo follow [AGENTS.md](AGENTS.md). Security reports go through [SECURITY.md](SECURITY.md).
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
[Apache-2.0](LICENSE), by Gabriel Vieira. The license doesn't grant rights to the "Finite Monkey" name or logo.
|