@qubiit/lmagent 2.5.0

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.
Files changed (155) hide show
  1. package/.editorconfig +18 -0
  2. package/AGENTS.md +169 -0
  3. package/CLAUDE.md +122 -0
  4. package/CONTRIBUTING.md +90 -0
  5. package/LICENSE +21 -0
  6. package/README.md +195 -0
  7. package/config/commands.yaml +194 -0
  8. package/config/levels.yaml +135 -0
  9. package/config/models.yaml +192 -0
  10. package/config/settings.yaml +405 -0
  11. package/config/tools-extended.yaml +534 -0
  12. package/config/tools.yaml +437 -0
  13. package/docs/assets/logo.png +0 -0
  14. package/docs/commands.md +132 -0
  15. package/docs/customization-guide.md +445 -0
  16. package/docs/getting-started.md +154 -0
  17. package/docs/how-to-start.md +242 -0
  18. package/docs/navigation-index.md +227 -0
  19. package/docs/usage-guide.md +113 -0
  20. package/install.js +1044 -0
  21. package/package.json +35 -0
  22. package/pyproject.toml +182 -0
  23. package/rules/_bootstrap.md +138 -0
  24. package/rules/agents-ia.md +607 -0
  25. package/rules/api-design.md +337 -0
  26. package/rules/automations-n8n.md +646 -0
  27. package/rules/code-style.md +570 -0
  28. package/rules/documentation.md +98 -0
  29. package/rules/security.md +316 -0
  30. package/rules/stack.md +395 -0
  31. package/rules/testing.md +326 -0
  32. package/rules/workflow.md +353 -0
  33. package/scripts/create_skill.js +300 -0
  34. package/scripts/validate_skills.js +283 -0
  35. package/skills/ai-agent-engineer/SKILL.md +394 -0
  36. package/skills/ai-agent-engineer/references/agent-patterns.md +149 -0
  37. package/skills/api-designer/SKILL.md +429 -0
  38. package/skills/api-designer/references/api-standards.md +13 -0
  39. package/skills/architect/SKILL.md +285 -0
  40. package/skills/architect/references/c4-model.md +133 -0
  41. package/skills/automation-engineer/SKILL.md +352 -0
  42. package/skills/automation-engineer/references/n8n-patterns.md +127 -0
  43. package/skills/backend-engineer/SKILL.md +261 -0
  44. package/skills/backend-engineer/assets/fastapi-project-structure.yaml +74 -0
  45. package/skills/backend-engineer/references/debugging-guide.md +174 -0
  46. package/skills/backend-engineer/references/design-patterns.md +208 -0
  47. package/skills/backend-engineer/scripts/scaffold_backend.py +313 -0
  48. package/skills/bmad-methodology/SKILL.md +202 -0
  49. package/skills/bmad-methodology/references/scale-adaptive-levels.md +141 -0
  50. package/skills/browser-agent/SKILL.md +502 -0
  51. package/skills/browser-agent/scripts/playwright_setup.ts +16 -0
  52. package/skills/code-reviewer/SKILL.md +306 -0
  53. package/skills/code-reviewer/references/code-review-checklist.md +16 -0
  54. package/skills/data-engineer/SKILL.md +474 -0
  55. package/skills/data-engineer/assets/pg-monitoring-queries.sql +154 -0
  56. package/skills/data-engineer/references/index-strategy.md +128 -0
  57. package/skills/data-engineer/scripts/backup_postgres.py +221 -0
  58. package/skills/devops-engineer/SKILL.md +547 -0
  59. package/skills/devops-engineer/references/ci-cd-patterns.md +265 -0
  60. package/skills/devops-engineer/scripts/docker_healthcheck.py +125 -0
  61. package/skills/document-generator/SKILL.md +746 -0
  62. package/skills/document-generator/references/pdf-generation.md +22 -0
  63. package/skills/frontend-engineer/SKILL.md +532 -0
  64. package/skills/frontend-engineer/references/accessibility-guide.md +146 -0
  65. package/skills/frontend-engineer/scripts/audit_bundle.py +144 -0
  66. package/skills/git-workflow/SKILL.md +374 -0
  67. package/skills/git-workflow/references/git-flow.md +25 -0
  68. package/skills/mcp-builder/SKILL.md +471 -0
  69. package/skills/mcp-builder/references/mcp-server-guide.md +23 -0
  70. package/skills/mobile-engineer/SKILL.md +502 -0
  71. package/skills/mobile-engineer/references/platform-guidelines.md +160 -0
  72. package/skills/orchestrator/SKILL.md +246 -0
  73. package/skills/orchestrator/references/methodology-routing.md +117 -0
  74. package/skills/orchestrator/references/persona-mapping.md +85 -0
  75. package/skills/orchestrator/references/routing-logic.md +110 -0
  76. package/skills/performance-engineer/SKILL.md +549 -0
  77. package/skills/performance-engineer/references/caching-patterns.md +181 -0
  78. package/skills/performance-engineer/scripts/profile_endpoint.py +170 -0
  79. package/skills/product-manager/SKILL.md +488 -0
  80. package/skills/product-manager/references/prioritization-frameworks.md +126 -0
  81. package/skills/prompt-engineer/SKILL.md +433 -0
  82. package/skills/prompt-engineer/references/prompt-patterns.md +158 -0
  83. package/skills/qa-engineer/SKILL.md +441 -0
  84. package/skills/qa-engineer/references/testing-strategy.md +166 -0
  85. package/skills/qa-engineer/scripts/run_coverage.py +147 -0
  86. package/skills/scrum-master/SKILL.md +225 -0
  87. package/skills/scrum-master/references/sprint-ceremonies.md +159 -0
  88. package/skills/security-analyst/SKILL.md +390 -0
  89. package/skills/security-analyst/references/owasp-top10.md +188 -0
  90. package/skills/security-analyst/scripts/audit_security.py +242 -0
  91. package/skills/seo-auditor/SKILL.md +523 -0
  92. package/skills/seo-auditor/references/seo-checklist.md +17 -0
  93. package/skills/spec-driven-dev/SKILL.md +342 -0
  94. package/skills/spec-driven-dev/references/phase-gates.md +107 -0
  95. package/skills/supabase-expert/SKILL.md +602 -0
  96. package/skills/supabase-expert/references/supabase-patterns.md +19 -0
  97. package/skills/swe-agent/SKILL.md +311 -0
  98. package/skills/swe-agent/references/trajectory-format.md +134 -0
  99. package/skills/systematic-debugger/SKILL.md +512 -0
  100. package/skills/systematic-debugger/references/debugging-guide.md +12 -0
  101. package/skills/tech-lead/SKILL.md +409 -0
  102. package/skills/tech-lead/references/code-review-checklist.md +111 -0
  103. package/skills/technical-writer/SKILL.md +631 -0
  104. package/skills/technical-writer/references/doc-templates.md +218 -0
  105. package/skills/testing-strategist/SKILL.md +476 -0
  106. package/skills/testing-strategist/references/testing-pyramid.md +16 -0
  107. package/skills/ux-ui-designer/SKILL.md +419 -0
  108. package/skills/ux-ui-designer/references/design-system-foundation.md +168 -0
  109. package/skills_overview.txt +94 -0
  110. package/templates/PROJECT_KICKOFF.md +284 -0
  111. package/templates/SKILL_TEMPLATE.md +131 -0
  112. package/templates/USAGE.md +95 -0
  113. package/templates/agent-python/README.md +71 -0
  114. package/templates/agent-python/agent.py +272 -0
  115. package/templates/agent-python/config.yaml +76 -0
  116. package/templates/agent-python/prompts/system.md +109 -0
  117. package/templates/agent-python/requirements.txt +7 -0
  118. package/templates/automation-n8n/README.md +14 -0
  119. package/templates/automation-n8n/webhook-handler.json +57 -0
  120. package/templates/backend-node/Dockerfile +12 -0
  121. package/templates/backend-node/README.md +15 -0
  122. package/templates/backend-node/package.json +30 -0
  123. package/templates/backend-node/src/index.ts +19 -0
  124. package/templates/backend-node/src/routes.ts +7 -0
  125. package/templates/backend-node/tsconfig.json +22 -0
  126. package/templates/backend-python/Dockerfile +11 -0
  127. package/templates/backend-python/README.md +78 -0
  128. package/templates/backend-python/app/core/config.py +12 -0
  129. package/templates/backend-python/app/core/database.py +12 -0
  130. package/templates/backend-python/app/main.py +17 -0
  131. package/templates/backend-python/app/routers/__init__.py +1 -0
  132. package/templates/backend-python/app/routers/health.py +7 -0
  133. package/templates/backend-python/requirements-dev.txt +6 -0
  134. package/templates/backend-python/requirements.txt +4 -0
  135. package/templates/backend-python/tests/test_health.py +9 -0
  136. package/templates/checkpoint.yaml +117 -0
  137. package/templates/database/README.md +474 -0
  138. package/templates/frontend-react/README.md +446 -0
  139. package/templates/plan.yaml +320 -0
  140. package/templates/session.yaml +125 -0
  141. package/templates/spec.yaml +229 -0
  142. package/templates/tasks.yaml +330 -0
  143. package/workflows/bugfix-backend.md +380 -0
  144. package/workflows/documentation.md +232 -0
  145. package/workflows/generate-prd.md +320 -0
  146. package/workflows/ideation.md +396 -0
  147. package/workflows/new-agent-ia.md +497 -0
  148. package/workflows/new-automation.md +374 -0
  149. package/workflows/new-feature.md +290 -0
  150. package/workflows/optimize-performance.md +373 -0
  151. package/workflows/resolve-github-issue.md +524 -0
  152. package/workflows/security-review.md +291 -0
  153. package/workflows/spec-driven.md +476 -0
  154. package/workflows/testing-strategy.md +296 -0
  155. package/workflows/third-party-integration.md +277 -0
@@ -0,0 +1,78 @@
1
+ # LMAgent Backend Python Template
2
+
3
+ Template de proyecto FastAPI con la estructura y configuración recomendada por LMAgent.
4
+
5
+ ## Estructura
6
+
7
+ ```
8
+ backend-python/
9
+ ├── app/
10
+ │ ├── __init__.py
11
+ │ ├── main.py # Entry point FastAPI
12
+ │ ├── config.py # Configuración con Pydantic Settings
13
+ │ ├── routers/ # Endpoints API
14
+ │ │ ├── __init__.py
15
+ │ │ ├── health.py # Health check
16
+ │ │ └── v1/ # API v1
17
+ │ │ ├── __init__.py
18
+ │ │ └── users.py # Ejemplo: users endpoints
19
+ │ ├── services/ # Lógica de negocio
20
+ │ │ ├── __init__.py
21
+ │ │ └── user_service.py
22
+ │ ├── repositories/ # Acceso a datos
23
+ │ │ ├── __init__.py
24
+ │ │ └── user_repository.py
25
+ │ ├── models/ # SQLModel models
26
+ │ │ ├── __init__.py
27
+ │ │ └── user.py
28
+ │ ├── schemas/ # Pydantic schemas
29
+ │ │ ├── __init__.py
30
+ │ │ └── user.py
31
+ │ └── core/ # Utilidades compartidas
32
+ │ ├── __init__.py
33
+ │ ├── database.py # Database connection
34
+ │ └── exceptions.py # Custom exceptions
35
+ ├── tests/
36
+ │ ├── conftest.py # Fixtures de pytest
37
+ │ └── test_health.py
38
+ ├── Dockerfile
39
+ ├── requirements.txt
40
+ ├── requirements-dev.txt
41
+ └── pyproject.toml
42
+ ```
43
+
44
+ ## Quick Start
45
+
46
+ ```bash
47
+ # Crear entorno virtual
48
+ python -m venv venv
49
+ source venv/bin/activate # Linux/Mac
50
+ # venv\Scripts\activate # Windows
51
+
52
+ # Instalar dependencias
53
+ pip install -r requirements.txt
54
+ pip install -r requirements-dev.txt
55
+
56
+ # Configurar variables de entorno
57
+ cp .env.example .env
58
+ # Editar .env con tus valores
59
+
60
+ # Ejecutar en desarrollo
61
+ uvicorn app.main:app --reload
62
+
63
+ # Ejecutar tests
64
+ pytest --cov=app
65
+ ```
66
+
67
+ ## Dependencias Principales
68
+
69
+ - **FastAPI**: Framework web async
70
+ - **SQLModel**: ORM + validación
71
+ - **Pydantic**: Validación de datos
72
+ - **Uvicorn**: Servidor ASGI
73
+ - **Redis**: Cache
74
+ - **pytest**: Testing
75
+
76
+ ## Patrones de Código
77
+
78
+ Ver `rules/code-style.md` y `personas/backend-engineer.md` para guías detalladas.
@@ -0,0 +1,12 @@
1
+ from pydantic_settings import BaseSettings
2
+
3
+ class Settings(BaseSettings):
4
+ PROJECT_NAME: str = "LMAgent Project"
5
+ API_V1_STR: str = "/api/v1"
6
+ DATABASE_URL: str = "sqlite:///./dev.db"
7
+
8
+ class Config:
9
+ case_sensitive = True
10
+ env_file = ".env"
11
+
12
+ settings = Settings()
@@ -0,0 +1,12 @@
1
+ from sqlmodel import SQLModel, create_engine, Session
2
+ from app.core.config import settings
3
+
4
+ connect_args = {"check_same_thread": False} if "sqlite" in settings.DATABASE_URL else {}
5
+ engine = create_engine(settings.DATABASE_URL, echo=True, connect_args=connect_args)
6
+
7
+ def get_session():
8
+ with Session(engine) as session:
9
+ yield session
10
+
11
+ def init_db():
12
+ SQLModel.metadata.create_all(engine)
@@ -0,0 +1,17 @@
1
+ from fastapi import FastAPI
2
+ from app.core.config import settings
3
+ from app.routers import health
4
+ # from app.routers.v1 import users # Uncomment when created
5
+
6
+ app = FastAPI(
7
+ title=settings.PROJECT_NAME,
8
+ openapi_url=f"{settings.API_V1_STR}/openapi.json"
9
+ )
10
+
11
+ app.include_router(health.router, tags=["health"])
12
+ # app.include_router(users.router, prefix=f"{settings.API_V1_STR}/users", tags=["users"])
13
+
14
+ @app.on_event("startup")
15
+ def on_startup():
16
+ from app.core.database import init_db
17
+ init_db()
@@ -0,0 +1 @@
1
+ from . import health
@@ -0,0 +1,7 @@
1
+ from fastapi import APIRouter
2
+
3
+ router = APIRouter()
4
+
5
+ @router.get("/health", status_code=200)
6
+ def health_check():
7
+ return {"status": "ok"}
@@ -0,0 +1,6 @@
1
+ pytest>=7.4.0
2
+ pytest-cov>=4.1.0
3
+ httpx>=0.24.1
4
+ black>=23.3.0
5
+ isort>=5.12.0
6
+ mypy>=1.4.1
@@ -0,0 +1,4 @@
1
+ fastapi>=0.100.0
2
+ uvicorn>=0.23.0
3
+ sqlmodel>=0.0.8
4
+ pydantic-settings>=2.0.0
@@ -0,0 +1,9 @@
1
+ from fastapi.testclient import TestClient
2
+ from app.main import app
3
+
4
+ client = TestClient(app)
5
+
6
+ def test_health_check():
7
+ response = client.get("/health")
8
+ assert response.status_code == 200
9
+ assert response.json() == {"status": "ok"}
@@ -0,0 +1,117 @@
1
+ # Checkpoint & Backup System
2
+ # LMAgent Framework v3.0 - Ultra-Robust State Persistence
3
+ #
4
+ # Este archivo define el sistema de checkpoints automáticos y backups
5
+ # para garantizar que NUNCA se pierda el estado del proyecto.
6
+ #
7
+ # UBICACIÓN: .lmagent/checkpoints/ (directorio)
8
+
9
+ ---
10
+
11
+ # ═══════════════════════════════════════════════════════════════════════════
12
+ # SISTEMA DE CHECKPOINTS AUTOMÁTICOS
13
+ # ═══════════════════════════════════════════════════════════════════════════
14
+ #
15
+ # El agente debe crear un checkpoint en estos momentos:
16
+ #
17
+ # 1. FASE COMPLETADA
18
+ # - Después de aprobar spec.yaml → checkpoint "phase_specify_complete"
19
+ # - Después de aprobar plan.yaml → checkpoint "phase_plan_complete"
20
+ # - Después de crear tasks.yaml → checkpoint "phase_tasks_complete"
21
+ # - Después de verificar → checkpoint "phase_verify_complete"
22
+ #
23
+ # 2. TASK COMPLETADA
24
+ # - Después de completar cada task → checkpoint "task_T00X_complete"
25
+ #
26
+ # 3. DECISIÓN IMPORTANTE
27
+ # - Después de decisiones arquitectónicas → checkpoint "decision_DXXX"
28
+ #
29
+ # 4. SESIÓN FINALIZADA
30
+ # - Cuando el usuario cierra la sesión → checkpoint "session_X_end"
31
+
32
+ # ═══════════════════════════════════════════════════════════════════════════
33
+ # ESTRUCTURA DE CHECKPOINT
34
+ # ═══════════════════════════════════════════════════════════════════════════
35
+
36
+ checkpoint:
37
+ id: "chk_20260123_143052" # Formato: chk_YYYYMMDD_HHMMSS
38
+ created_at: "2026-01-23T14:30:52"
39
+ trigger: "task_complete" # phase_complete | task_complete | decision | session_end | manual
40
+
41
+ # Qué disparó este checkpoint
42
+ trigger_details:
43
+ type: "task"
44
+ id: "T002"
45
+ title: "Crear endpoint GET /users"
46
+
47
+ # Snapshot del estado completo
48
+ state_snapshot:
49
+ current_phase: "implement"
50
+ spec_status: "approved"
51
+ plan_status: "approved"
52
+ tasks_total: 15
53
+ tasks_completed: 2
54
+ tasks_in_progress: 1
55
+ tasks_pending: 12
56
+ current_task_id: "T003"
57
+
58
+ # Archivos que cambiaron desde el último checkpoint
59
+ changed_files:
60
+ - path: "src/models/user.py"
61
+ action: "created"
62
+ - path: "src/api/users.py"
63
+ action: "modified"
64
+ - path: "tests/test_users.py"
65
+ action: "created"
66
+
67
+ # Resumen en lenguaje natural (para que cualquier LLM entienda rápido)
68
+ summary: |
69
+ Fase: Implementación
70
+ Completé: T002 - Endpoint GET /users
71
+ Creé: user.py, users.py, test_users.py
72
+ Próximo: T003 - Endpoint POST /users
73
+ Tests passing: 5/5
74
+
75
+ # ═══════════════════════════════════════════════════════════════════════════
76
+ # INSTRUCCIONES PARA EL AGENTE
77
+ # ═══════════════════════════════════════════════════════════════════════════
78
+ #
79
+ # 🤖 CREAR CHECKPOINT:
80
+ #
81
+ # Después de cada milestone significativo, ejecuta:
82
+ #
83
+ # ```python
84
+ # checkpoint = {
85
+ # "id": f"chk_{datetime.now().strftime('%Y%m%d_%H%M%S')}",
86
+ # "created_at": datetime.now().isoformat(),
87
+ # "trigger": "task_complete", # o el trigger correspondiente
88
+ # "trigger_details": {...},
89
+ # "state_snapshot": {...},
90
+ # "changed_files": [...],
91
+ # "summary": "..."
92
+ # }
93
+ #
94
+ # # Guardar en .lmagent/checkpoints/chk_YYYYMMDD_HHMMSS.yaml
95
+ # ```
96
+ #
97
+ # 🤖 RECUPERAR DE CHECKPOINT:
98
+ #
99
+ # Si el usuario dice "algo salió mal" o "volver atrás":
100
+ #
101
+ # 1. Listar checkpoints: ls .lmagent/checkpoints/
102
+ # 2. Mostrar últimos 5 al usuario
103
+ # 3. El usuario elige uno
104
+ # 4. Leer ese checkpoint y restaurar el estado
105
+ #
106
+ # ═══════════════════════════════════════════════════════════════════════════
107
+ # POLÍTICA DE RETENCIÓN
108
+ # ═══════════════════════════════════════════════════════════════════════════
109
+ #
110
+ # Mantener:
111
+ # - Últimos 20 checkpoints de tasks
112
+ # - Todos los checkpoints de fases (nunca borrar)
113
+ # - Últimos 10 checkpoints de sesión
114
+ #
115
+ # Limpiar automáticamente cuando hay más de 50 checkpoints totales.
116
+ #
117
+ # ═══════════════════════════════════════════════════════════════════════════