Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .cursor/rules/devtrail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DevTrail - Cursor Rules

> **Read and follow the rules in [DEVTRAIL.md](../../DEVTRAIL.md).**
> That file contains all DevTrail documentation governance rules for this project.

## Agent Identity

When working on this project, identify yourself as: `cursor-v1.0` (or your version).

---

*DevTrail v2.0.0 | [Strange Days Tech](https://strangedays.tech) — Because every change tells a story.*
158 changes: 104 additions & 54 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# DevTrail - Documentation Rules
# DevTrail - Cursor Configuration

> No significant change without a documented trace.
## Agent Identity

## Language Configuration
When working on this project, identify yourself as: `cursor-v1.0` (or your version).

<!-- devtrail:begin -->
# DevTrail - Documentation Governance Rules

> Read and follow these rules when working on this project.
> For complete rules: `.devtrail/00-governance/AGENT-RULES.md`

## 1. Fundamental Principle

> **"No significant change without a documented trace."**

## 2. Language Configuration

Check `.devtrail/config.yml` for the project's language setting:

Expand All @@ -11,12 +23,15 @@ language: en # Options: en, es (default: en)
```

**Template paths based on language:**
- `en` (default): `.devtrail/templates/TEMPLATE-*.md`
- `es`: `.devtrail/templates/i18n/es/TEMPLATE-*.md`

| Language | Template Path |
|----------|---------------|
| `en` (default) | `.devtrail/templates/TEMPLATE-*.md` |
| `es` | `.devtrail/templates/i18n/es/TEMPLATE-*.md` |

If the config file doesn't exist or `language` is not set, use English (`en`) as default.

## Documentation Reporting
## 3. Documentation Reporting

At the end of each task, you MUST report your DevTrail documentation status:

Expand All @@ -35,82 +50,111 @@ DevTrail: No documentation required (minor change / <10 lines)
DevTrail: Documentation pending - review required
```

This transparency helps users verify compliance with DevTrail rules.
## 4. Agent Identity

- **Identify yourself** with your platform and version
- **Declare** your confidence level in decisions: `high | medium | low`
- **Record** your identification in the `agent:` field of the metadata

## Identity
## 5. Git Operations

You are an agent working on this project under DevTrail.
- Identify yourself as: `cursor-v1.0`
- Record your identification in the `agent:` field of metadata
- Declare confidence level: `high | medium | low`
> **CRITICAL: Never commit directly to `main` branch.**

## When to Document
All changes must go through feature/fix branches and Pull Requests.

### Branch Prefixes

| Prefix | Purpose |
|--------|---------|
| `feature/` or `feat/` | New features |
| `fix/` | Bug fixes |
| `hotfix/` | Urgent production fixes |
| `docs/` | Documentation only |
| `refactor/` | Code refactoring |
| `test/` | Test changes |

### Conventional Commits

| Prefix | Use Case |
|--------|----------|
| `feat:` | New feature |
| `fix:` | Bug fix |
| `docs:` | Documentation only |
| `refactor:` | No behavior change |
| `chore:` | Maintenance |

## 6. When to Document

### MANDATORY (create document)

| Situation | Action |
|-----------|--------|
| >10 lines of business logic code | Create AILOG |
| Decision between alternatives | Create AIDEC |
| Security/authentication | AILOG + `risk_level: high` |
| Personal data (PII) | AILOG + request ETH |
| External integration | Create AILOG |
| Public API/DB change | Create AILOG |
| >10 lines of code in business logic | Create AILOG |
| Decision between technical alternatives | Create AIDEC |
| Changes in security/authentication | Create AILOG + mark `risk_level: high` |
| Personal data (GDPR/PII) | Create AILOG + request ETH |
| Integration with external service | Create AILOG |
| Change in public API or DB schema | Create AILOG |

### DO NOT DOCUMENT

**DO NOT document**: whitespace, typos, credentials.
- Trivial changes (whitespace, typos, formatting)
- Sensitive information (credentials, tokens, API keys)

## Naming Convention
## 7. File Naming Convention

```
[TYPE]-[YYYY-MM-DD]-[NNN]-[description].md
```

Example: `AILOG-2025-01-27-001-implement-oauth.md`
**Example**: `AILOG-2025-01-27-001-implement-oauth.md`

## Required Metadata
## 8. Minimum Metadata

```yaml
---
id: AILOG-2025-01-27-001
title: Brief description
status: accepted
created: 2025-01-27
agent: cursor-v1.0
agent: your-agent-id-v1.0
confidence: high | medium | low
review_required: true | false
risk_level: low | medium | high | critical
---
```

## Autonomy Limits
## 9. Autonomy Limits

| Type | Autonomy |
|------|----------|
| AILOG | Create freely |
| AIDEC | Create freely |
| ETH | Draft only → human approves |
| ADR | Create → requires review |
| REQ | Propose → human validates |
| TDE | Identify yes, prioritize no |
| Type | Agent can do | Requires human |
|------|----------|----------------|
| **AILOG** | Create freely | - |
| **AIDEC** | Create freely | - |
| **ETH** | Create draft | Approval |
| **ADR** | Create draft | Review |
| **REQ** | Propose | Validation |
| **INC** | Contribute analysis | Conclusions |
| **TDE** | Identify | Prioritize |

## Documentation Map (DevTrail)
## 10. Documentation Map

```
.devtrail/
├── 00-governance/ ← Policies (load if in doubt)
│ ├── AGENT-RULES.md # Detailed rules
│ └── DOCUMENTATION-POLICY.md
├── 01-requirements/ ← REQ-*.md
├── 02-design/decisions/ ← ADR-*.md
├── 04-testing/ ← TES-*.md
├── 05-operations/incidents/← INC-*.md
├── 06-evolution/technical-debt/ ← TDE-*.md
├── 00-governance/ ← POLICIES AND RULES
├── 01-requirements/ ← REQ-*.md
├── 02-design/decisions/ ← ADR-*.md
├── 03-implementation/ ← Implementation guides
├── 04-testing/ ← TES-*.md
├── 05-operations/incidents/ ← INC-*.md
├── 06-evolution/technical-debt/← TDE-*.md
├── 07-ai-audit/
│ ├── agent-logs/ ← AILOG-*.md (create here)
│ ├── decisions/ ← AIDEC-*.md (create here)
│ └── ethical-reviews/ ← ETH-*.md
└── templates/ ← Templates (load when creating)
│ ├── agent-logs/ ← AILOG-*.md
│ ├── decisions/ ← AIDEC-*.md
│ └── ethical-reviews/ ← ETH-*.md
└── templates/ ← Templates (load when creating)
```

## When to Load More
## 11. When to Load Templates

| Need to | Load |
|---------|------|
Expand All @@ -120,14 +164,20 @@ risk_level: low | medium | high | critical
| Naming questions | `.devtrail/00-governance/DOCUMENTATION-POLICY.md` |
| Autonomy questions | `.devtrail/00-governance/AGENT-RULES.md` |

## Human Review
## 12. Quick Type Reference

Mark `review_required: true` when:
- `confidence: low`
- `risk_level: high | critical`
- Security decisions
- Irreversible changes
| Prefix | Name | Location |
|--------|------|----------|
| `AILOG` | AI Action Log | `.devtrail/07-ai-audit/agent-logs/` |
| `AIDEC` | AI Decision | `.devtrail/07-ai-audit/decisions/` |
| `ETH` | Ethical Review | `.devtrail/07-ai-audit/ethical-reviews/` |
| `ADR` | Architecture Decision Record | `.devtrail/02-design/decisions/` |
| `REQ` | Requirement | `.devtrail/01-requirements/` |
| `TES` | Test Plan | `.devtrail/04-testing/` |
| `INC` | Incident Post-mortem | `.devtrail/05-operations/incidents/` |
| `TDE` | Technical Debt | `.devtrail/06-evolution/technical-debt/` |
<!-- devtrail:end -->

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v2.0.0 | [Strange Days Tech](https://strangedays.tech) — Because every change tells a story.*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/AGENT-RULES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Rules for AI Agents - DevTrail

> This document defines the rules that all AI agents must follow when working on projects under DevTrail.
Expand Down Expand Up @@ -179,4 +179,4 @@

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/DOCUMENTATION-POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ See also [ADR-2025-01-20-001] for architectural context.

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/GIT-BRANCHING-STRATEGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ git push -u origin fix/accidental-commits
---

*DevTrail v1.0.0 | Last updated: 2025-01-30*
*[Enigmora](https://enigmora.com) — Because every change tells a story.*
*[Strange Days Tech](https://strangedays.tech) — Because every change tells a story.*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/PRINCIPLES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Guiding Principles - DevTrail

> These principles guide all documentation decisions in the project.
Expand Down Expand Up @@ -74,4 +74,4 @@

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/i18n/es/AGENT-RULES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Reglas para Agentes IA - DevTrail

> Este documento define las reglas que todos los agentes de IA deben seguir cuando trabajan en proyectos bajo DevTrail.
Expand Down Expand Up @@ -181,4 +181,4 @@

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/i18n/es/DOCUMENTATION-POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ Ver también [ADR-2025-01-20-001] para contexto arquitectónico.

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/i18n/es/GIT-BRANCHING-STRATEGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ git push -u origin fix/commits-accidentales
---

*DevTrail v1.0.0 | Última actualización: 2025-01-30*
*[Enigmora](https://enigmora.com) — Porque cada cambio cuenta una historia.*
*[Strange Days Tech](https://strangedays.tech) — Porque cada cambio cuenta una historia.*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/i18n/es/PRINCIPLES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Principios Guía - DevTrail

> Estos principios guían todas las decisiones de documentación en el proyecto.
Expand Down Expand Up @@ -76,4 +76,4 @@

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/00-governance/i18n/es/QUICK-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ Marcar `review_required: true` cuando:

---

*DevTrail v1.0.0 | [Enigmora](https://enigmora.com)*
*DevTrail v1.0.0 | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/QUICK-REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DevTrail - Quick Reference

> One-page reference for AI agents and developers.
Expand Down Expand Up @@ -167,4 +167,4 @@

---

*DevTrail v2.0.0 | [Handbook](https://enigmora.github.io/devtrail/) | [Enigmora](https://enigmora.com)*
*DevTrail v2.0.0 | [GitHub](https://github.com/StrangeDaysTech/devtrail) | [Strange Days Tech](https://strangedays.tech)*
2 changes: 1 addition & 1 deletion .devtrail/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DevTrail Configuration
# https://github.com/enigmora/devtrail-framework
# https://github.com/StrangeDaysTech/devtrail

# Language setting for templates and documentation
# Supported values: en, es
Expand Down
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-ADR.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ supersedes: []
|------|--------|--------|
| YYYY-MM-DD | [agent/human] | Initial creation |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-AIDEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ related: []

---

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-AILOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ related: []

---

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-ETH.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ approved_date: null
| Decision | [APPROVED/REJECTED/CONDITIONAL] |
| Conditions | [If applicable] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-INC.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ resolved_date: null
| Review date | [YYYY-MM-DD] |
| Status | [Draft/Reviewed/Closed] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-REQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ validated_date: null
| Status | [Validated/Rejected/Modified] |
| Comments | [Validator notes] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-TDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ Impact │ │ │
| Assigned to | [Team/Person] |
| Comments | [Notes] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/TEMPLATE-TES.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ related: []
| Date | [YYYY-MM-DD] |
| Comments | [Notes] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-ADR.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ supersedes: []
|-------|-------|--------|
| YYYY-MM-DD | [agente/humano] | Creación inicial |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-AIDEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ related: []

---

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-AILOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ related: []

---

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-ETH.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ approved_date: null
| Decisión | [APROBADO/RECHAZADO/CONDICIONAL] |
| Condiciones | [Si aplica] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-INC.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ resolved_date: null
| Fecha de revisión | [YYYY-MM-DD] |
| Estado | [Borrador/Revisado/Cerrado] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-REQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ validated_date: null
| Estado | [Validado/Rechazado/Modificado] |
| Comentarios | [Notas del validador] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-TDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ Impacto │ │ │
| Asignado a | [Equipo/Persona] |
| Comentarios | [Notas] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
2 changes: 1 addition & 1 deletion .devtrail/templates/i18n/es/TEMPLATE-TES.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ related: []
| Fecha | [YYYY-MM-DD] |
| Comentarios | [Notas] |

<!-- Template: DevTrail | https://enigmora.com -->
<!-- Template: DevTrail | https://strangedays.tech -->
Loading
Loading