@exchanet/enet 1.0.4 → 1.0.6

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.
@@ -0,0 +1,136 @@
1
+ # METHOD REFLEX — Agent Instructions
2
+ > Universal Modular Architecture · v1.0.0 · @exchanet
3
+
4
+ ---
5
+
6
+ ## YOUR PRIMARY DIRECTIVE / TU DIRECTIVA PRINCIPAL
7
+
8
+ You are building a modular application using Method REFLEX. Every module you create must be self-describing via a `manifest.json` file. The manifest is written **before any code**. The system reads manifests to automatically generate the Admin Panel, dashboard, and settings UI. You never manually wire backend logic to the Admin Panel — the manifest does it.
9
+
10
+ Estás construyendo una aplicación modular usando Method REFLEX. Cada módulo que crees debe ser auto-descriptivo a través de un archivo `manifest.json`. El manifest se escribe **antes de cualquier código**. El sistema lee los manifests para generar automáticamente el Panel Admin, dashboard y UI de configuración. Nunca cablearás manualmente la lógica backend al Panel Admin — el manifest lo hace.
11
+
12
+ **If a module has no manifest, it does not exist.**
13
+ **Si un módulo no tiene manifest, no existe.**
14
+
15
+ ---
16
+
17
+ ## ABSOLUTE RULES / REGLAS ABSOLUTAS
18
+
19
+ 1. **No manifest = module does not exist.** Core rejects modules without valid `manifest.json`.
20
+ 2. **Manifest before code.** Complete manifest before any handler, model, or component.
21
+ 3. **Zero hardcoded configuration.** Every configurable value lives in `manifest.settings`, read via `context.settings.get("key")`.
22
+ 4. **Core has no business logic.** Domain logic lives in modules only.
23
+ 5. **Admin Panel is a renderer.** Never code it to show a specific module — modules declare capabilities, Admin Panel renders them.
24
+ 6. **A module is complete only when the Admin Panel reflects it correctly.**
25
+ 7. **Removing a module folder requires zero code changes elsewhere.**
26
+
27
+ ---
28
+
29
+ ## WORKFLOW / FLUJO DE TRABAJO
30
+
31
+ ### Starting a new project / Nuevo proyecto:
32
+ 1. Ask for spectech if not provided (stack, database, deploy target)
33
+ 2. Declare the architecture you will build
34
+ 3. **Wait for confirmation before writing any code**
35
+ 4. Build Core → Manifest schema → Modules → Admin Panel
36
+
37
+ ### Adding a module / Añadir un módulo:
38
+ 1. Write complete `manifest.json` (all settings + capabilities + hooks)
39
+ 2. Validate against `manifest.schema.json`
40
+ 3. Implement all handlers referenced in manifest
41
+ 4. Place in modules directory (Core discovers automatically)
42
+ 5. Boot system and verify module appears in Admin Panel
43
+ 6. Build custom UI components only if manifest declares a `component` field
44
+
45
+ ### When you cannot complete a manifest / Cuando no puedes completar un manifest:
46
+
47
+ **STOP. Ask the user:**
48
+
49
+ ```
50
+ "I cannot complete the manifest for [module name] because I don't understand
51
+ [specific aspect]. Before I continue, I need you to clarify: [specific question]"
52
+
53
+ "No puedo completar el manifest de [nombre del módulo] porque no entiendo
54
+ [aspecto específico]. Antes de continuar, necesito que aclares: [pregunta específica]"
55
+ ```
56
+
57
+ Do not proceed. Do not create a partial manifest. Do not make assumptions. Wait.
58
+ No continúes. No crees un manifest parcial. No hagas suposiciones. Espera.
59
+
60
+ ---
61
+
62
+ ## MANIFEST FORMAT / FORMATO DEL MANIFEST
63
+
64
+ ```json
65
+ {
66
+ "id": "module-id",
67
+ "name": "Human Name",
68
+ "version": "1.0.0",
69
+ "type": "functional",
70
+ "section": "admin-section",
71
+ "dependencies": [],
72
+ "hooks": { "event.name": "ClassName.method" },
73
+ "settings": {
74
+ "key": {
75
+ "type": "integer|string|boolean|select",
76
+ "label": "Label",
77
+ "default": null,
78
+ "ui": "slider|toggle|text|select"
79
+ }
80
+ },
81
+ "capabilities": [
82
+ { "type": "view", "label": "Label", "data": "ClassName.method" },
83
+ { "type": "action", "label": "Label", "handler": "ClassName.method", "dangerous": false },
84
+ { "type": "metric", "label": "Label", "data": "ClassName.method" },
85
+ { "type": "widget", "label": "Label", "data": "ClassName.method", "component": "ComponentName" }
86
+ ]
87
+ }
88
+ ```
89
+
90
+ ---
91
+
92
+ ## WHAT THE CORE MUST IMPLEMENT / QUÉ DEBE IMPLEMENTAR EL CORE
93
+
94
+ - Module discovery — scan modules dir for valid manifests
95
+ - Manifest validation — reject invalid manifests with clear errors (never silent)
96
+ - Dependency resolution — boot in correct order
97
+ - Handler registry — map `ClassName.method` references to implementations
98
+ - Hook system — dispatch events to declared handlers
99
+ - Settings store — persistent, namespaced by module ID, initialized from defaults
100
+ - REFLEX engine — read all manifests, build Admin nav, dashboard, settings schemas
101
+ - Admin API — standard endpoints (same in every project, every stack)
102
+
103
+ ```
104
+ GET /api/admin/manifest-registry
105
+ GET /api/admin/navigation
106
+ GET /api/admin/settings/:moduleId
107
+ POST /api/admin/settings/:moduleId
108
+ GET /api/admin/dashboard
109
+ POST /api/admin/action/:moduleId/:actionId
110
+ GET /api/admin/health
111
+ ```
112
+
113
+ **The Core has ZERO business logic. / El Core tiene CERO lógica de negocio.**
114
+
115
+ ---
116
+
117
+ ## COMPLETION CHECKLIST / CHECKLIST DE COMPLETITUD
118
+
119
+ Before marking any module complete / Antes de marcar cualquier módulo como completo:
120
+
121
+ - [ ] `manifest.json` valid / válido
122
+ - [ ] All declared handlers implemented / Todos los handlers declarados implementados
123
+ - [ ] Zero hardcoded values — all settings use `context.settings.get()` / Cero hardcoded
124
+ - [ ] Module appears in Admin Panel navigation / El módulo aparece en la navegación del Panel Admin
125
+ - [ ] All views render with data / Todas las vistas renderizan con datos
126
+ - [ ] All actions execute correctly / Todas las acciones ejecutan correctamente
127
+ - [ ] Dangerous actions show confirmation dialog / Las acciones peligrosas muestran diálogo
128
+ - [ ] All metrics show in dashboard / Todas las métricas aparecen en el dashboard
129
+ - [ ] All settings render and save correctly / Todos los settings renderizan y guardan
130
+ - [ ] Adding this module required zero Core changes / Añadir el módulo requirió cero cambios en el Core
131
+ - [ ] Removing module folder removes it completely from Admin Panel / Eliminar la carpeta lo elimina del Panel Admin
132
+
133
+ ---
134
+
135
+ *For full documentation / Para documentación completa: `METHOD.md`*
136
+ *Method REFLEX v1.0.0 · @exchanet · MIT*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exchanet/enet",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "enet — exchanet methods manager. Install, scaffold and manage AI coding methods.",
5
5
  "bin": {
6
6
  "enet": "src/index.js"
@@ -4,25 +4,11 @@ import path from 'path'
4
4
  export const AGENTS = {
5
5
  cursor: {
6
6
  name: 'Cursor',
7
- signals: ['.cursor'],
7
+ signals: ['.cursor/rules', '.cursor'],
8
8
  installDir: '.cursor/rules',
9
9
  filename: 'enet-{id}.md',
10
10
  configNote: 'Rule auto-applies to all files (alwaysApply: true)'
11
11
  },
12
- windsurf: {
13
- name: 'Windsurf',
14
- signals: ['.windsurfrules', '.windsurf'],
15
- installDir: '.',
16
- filename: '.windsurfrules',
17
- configNote: 'Appended to .windsurfrules'
18
- },
19
- copilot: {
20
- name: 'GitHub Copilot',
21
- signals: ['.github/copilot-instructions.md', '.github'],
22
- installDir: '.github',
23
- filename: 'copilot-instructions.md',
24
- configNote: 'Written to .github/copilot-instructions.md'
25
- },
26
12
  antigravity: {
27
13
  name: 'Antigravity (Google)',
28
14
  signals: ['.agent/rules', '.agent'],
@@ -37,6 +23,20 @@ export const AGENTS = {
37
23
  filename: 'CLAUDE.md',
38
24
  configNote: 'Written to CLAUDE.md — Claude Code reads this file automatically'
39
25
  },
26
+ windsurf: {
27
+ name: 'Windsurf',
28
+ signals: ['.windsurfrules', '.windsurf'],
29
+ installDir: '.',
30
+ filename: '.windsurfrules',
31
+ configNote: 'Appended to .windsurfrules'
32
+ },
33
+ copilot: {
34
+ name: 'GitHub Copilot',
35
+ signals: ['.github/copilot-instructions.md'],
36
+ installDir: '.github',
37
+ filename: 'copilot-instructions.md',
38
+ configNote: 'Written to .github/copilot-instructions.md'
39
+ },
40
40
  generic: {
41
41
  name: 'Generic Agent',
42
42
  signals: [],