@damenor/agent-docs 0.1.1 → 0.4.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.
- package/README.md +65 -29
- package/dist/index.js +3834 -217
- package/package.json +14 -11
- package/templates/modules/agents/.agents/agents/doc-designer.md +39 -37
- package/templates/modules/agents/.agents/agents/doc-maintainer.md +35 -35
- package/templates/modules/agents/.agents/agents/doc-reviewer.md +55 -46
- package/templates/modules/agents/.agents/agents/doc-writer.md +34 -33
- package/templates/modules/agents/.agents/agents/reviewer.md +114 -100
- package/templates/modules/agents/.agents/skills/doc-design/SKILL.md +176 -174
- package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md +241 -247
- package/templates/modules/agents/.agents/skills/doc-maintain/SKILL.md +205 -195
- package/templates/modules/agents/.agents/skills/doc-maintain/references/triggers.md +171 -165
- package/templates/modules/agents/.agents/skills/doc-review/SKILL.md +245 -240
- package/templates/modules/agents/.agents/skills/doc-review/references/health-checklist.md +115 -112
- package/templates/modules/agents/.agents/skills/doc-scaffold/SKILL.md +164 -157
- package/templates/modules/agents/.agents/skills/doc-scaffold/references/diataxis-quick-ref.md +110 -110
- package/templates/modules/agents/.agents/skills/doc-write/SKILL.md +240 -212
- package/templates/modules/agents/.agents/skills/doc-write/references/adr-format.md +99 -93
- package/templates/modules/agents/.agents/skills/doc-write/references/diataxis-patterns.md +221 -200
- package/templates/base/AGENTS.md +0 -177
- package/templates/base/CHANGELOG.md +0 -86
- package/templates/base/README.md +0 -110
- package/templates/base/docs/CONTEXT.md +0 -111
- package/templates/base/docs/README.md +0 -131
- package/templates/base/docs/adr/TEMPLATE.md +0 -83
- package/templates/modules/design/docs/DESIGN.md +0 -253
- package/templates/modules/explanation/docs/explanation/agent-flow.md +0 -15
- package/templates/modules/explanation/docs/explanation/architecture.md +0 -138
- package/templates/modules/guides/docs/guides/deployment.md +0 -189
- package/templates/modules/guides/docs/guides/runbooks/TEMPLATE.md +0 -86
- package/templates/modules/guides/docs/guides/troubleshooting.md +0 -65
- package/templates/modules/operations/docs/operations/README.md +0 -115
- package/templates/modules/product/docs/product/overview.md +0 -90
- package/templates/modules/product/docs/roadmap.md +0 -80
- package/templates/modules/reference/docs/reference/api.md +0 -131
- package/templates/modules/reference/docs/reference/code-style.md +0 -275
- package/templates/modules/reference/docs/reference/configuration.md +0 -117
- package/templates/modules/reference/docs/reference/infrastructure.md +0 -191
- package/templates/modules/tutorials/docs/tutorials/environment-setup.md +0 -212
- package/templates/modules/tutorials/docs/tutorials/first-task.md +0 -246
- package/templates/modules/tutorials/docs/tutorials/quick-start.md +0 -146
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
---
|
|
2
|
-
created:
|
|
2
|
+
created: '2024-01-15'
|
|
3
3
|
status: active
|
|
4
4
|
type: reference
|
|
5
|
-
tags: [adr, decision,
|
|
5
|
+
tags: [adr, decision, architecture, format]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# ADR Format — Complete Reference
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## What is an ADR
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
An ADR (Architecture Decision Record) is a document that captures an important architectural decision, the context in which it was made, and its consequences. In this project, ADRs use a **minimal format**: title + 1-3 sentences.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## The 3 Mandatory Criteria
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
An ADR is written **ONLY** when **ALL** these conditions are true:
|
|
17
17
|
|
|
18
|
-
### 1.
|
|
18
|
+
### 1. Hard to revert
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- Tiempo significativo de refactorización
|
|
22
|
-
- Migración de datos compleja o riesgosa
|
|
23
|
-
- Cambio que afecta múltiples equipos o servicios
|
|
24
|
-
- Contrato que compromete recursos a largo plazo
|
|
20
|
+
The decision has a high cost if reverted:
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
- Significant refactoring time
|
|
23
|
+
- Complex or risky data migration
|
|
24
|
+
- Change affecting multiple teams or services
|
|
25
|
+
- Contract that commits long-term resources
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
**Not hard to revert**: Renaming a variable, moving a file, changing a CSS color
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
- "¿Por qué usan PostgreSQL y no MongoDB para esto?"
|
|
32
|
-
- "¿Por qué la auth está en un servicio separado?"
|
|
33
|
-
- "¿Por qué no usan el framework estándar del equipo?"
|
|
29
|
+
### 2. Surprising
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
A newcomer to the project wouldn't expect this decision or would need additional context to understand it:
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
- "Why do they use PostgreSQL and not MongoDB for this?"
|
|
34
|
+
- "Why is auth in a separate service?"
|
|
35
|
+
- "Why don't they use the team's standard framework?"
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
- Opción A: Más rápido pero menos mantenible
|
|
41
|
-
- Opción B: Más caro pero más confiable
|
|
42
|
-
- Opción C: Estándar del equipo pero no ideal para este caso
|
|
37
|
+
**Not surprising**: Using Git, having tests, using Tailwind for CSS
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
### 3. Real trade-off
|
|
40
|
+
|
|
41
|
+
There are valid alternatives with genuine advantages and disadvantages:
|
|
42
|
+
|
|
43
|
+
- Option A: Faster but less maintainable
|
|
44
|
+
- Option B: More expensive but more reliable
|
|
45
|
+
- Option C: Team standard but not ideal for this case
|
|
46
|
+
|
|
47
|
+
**Not a real trade-off**: No other reasonable option, or the "alternative" is clearly inferior
|
|
45
48
|
|
|
46
49
|
## Plantilla
|
|
47
50
|
|
|
48
51
|
```markdown
|
|
49
52
|
---
|
|
50
|
-
created:
|
|
53
|
+
created: '2024-01-15'
|
|
51
54
|
status: proposed | accepted | deprecated | superseded-by:ADR-NNN
|
|
52
55
|
type: adr
|
|
53
56
|
tags: [tag1, tag2]
|
|
@@ -56,6 +59,7 @@ tags: [tag1, tag2]
|
|
|
56
59
|
# ADR-NNN: [Título breve de la decisión]
|
|
57
60
|
|
|
58
61
|
[1-3 oraciones explicando:
|
|
62
|
+
|
|
59
63
|
- QUÉ se decidió
|
|
60
64
|
- POR QUÉ (la razón principal)
|
|
61
65
|
- QUÉ ALTERNATIVAS se consideraron brevemente]
|
|
@@ -63,61 +67,61 @@ tags: [tag1, tag2]
|
|
|
63
67
|
<!-- Si se necesita más contexto, crear un archivo en explanation/ vinculado -->
|
|
64
68
|
```
|
|
65
69
|
|
|
66
|
-
##
|
|
70
|
+
## What Qualifies as an ADR — Examples
|
|
67
71
|
|
|
68
|
-
###
|
|
72
|
+
### Yes, qualifies
|
|
69
73
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| No
|
|
79
|
-
|
|
|
74
|
+
| Example | Hard to revert | Surprising | Real trade-off |
|
|
75
|
+
| --------------------------------- | ------------------------------- | ---------------------------------- | ------------------------------ |
|
|
76
|
+
| Modular monolith vs microservices | High rewrite cost | Someone would expect microservices | Scalability vs complexity |
|
|
77
|
+
| Event sourcing for auditing | Fundamental architecture change | Not the typical approach | Consistency vs complexity |
|
|
78
|
+
| PostgreSQL over MongoDB | Data migration + queries | Semi-structured data in relational | ACID vs flexibility |
|
|
79
|
+
| Custom auth vs Auth0 | Change affects all users | Auth0 is the team default | Control vs speed |
|
|
80
|
+
| GraphQL instead of REST | Contract change with clients | REST is the standard | Flexibility vs simplicity |
|
|
81
|
+
| Separate notification service | Multi-team refactor | Seems like same domain | Scalability vs latency |
|
|
82
|
+
| No ORM, raw queries | Requires data layer rewrite | Team uses ORM by default | Performance vs productivity |
|
|
83
|
+
| CQRS for reporting module | Data pattern change | Direct reporting is simpler | Read performance vs complexity |
|
|
80
84
|
|
|
81
|
-
### No
|
|
85
|
+
### No, doesn't qualify
|
|
82
86
|
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
87
|
+
| Example | Why not | Failed criterion |
|
|
88
|
+
| ----------------------------- | --------------------------------- | ---------------------------- |
|
|
89
|
+
| Using Git for version control | It's the industry standard | Not surprising |
|
|
90
|
+
| Adding ESLint to the project | Can be removed in 5 minutes | Not hard to revert |
|
|
91
|
+
| Using React for the frontend | It's the team's obvious choice | Not surprising, no trade-off |
|
|
92
|
+
| Naming variables in English | It's the team convention | No real trade-off |
|
|
93
|
+
| Using dotenv for env vars | It's the standard, easy to change | Fails all 3 criteria |
|
|
94
|
+
| Adding prettier | Removed in one commit | Not hard to revert |
|
|
91
95
|
|
|
92
|
-
##
|
|
96
|
+
## Numbering Convention
|
|
93
97
|
|
|
94
98
|
```
|
|
95
|
-
ADR-001:
|
|
96
|
-
ADR-002:
|
|
99
|
+
ADR-001: Title of the first decision
|
|
100
|
+
ADR-002: Title of the second decision
|
|
97
101
|
ADR-003: ...
|
|
98
102
|
```
|
|
99
103
|
|
|
100
|
-
###
|
|
104
|
+
### Rules
|
|
101
105
|
|
|
102
|
-
- **
|
|
103
|
-
- **
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
+
- **Sequential numbering**: ADR-001, ADR-002, ADR-003...
|
|
107
|
+
- **No gaps**: Don't skip numbers. If an ADR is discarded, mark it as `status: deprecated` but the number is not reused
|
|
108
|
+
- **File prefix**: `docs/adr/001-title-kebab-case.md`
|
|
109
|
+
- **Unique title**: The title must be descriptive and not repeated
|
|
106
110
|
|
|
107
|
-
###
|
|
111
|
+
### File name
|
|
108
112
|
|
|
109
113
|
```
|
|
110
114
|
docs/adr/
|
|
111
|
-
├── TEMPLATE.md #
|
|
112
|
-
├── 001-
|
|
113
|
-
├── 002-postgresql-
|
|
114
|
-
├── 003-event-sourcing-
|
|
115
|
-
└── 004-auth-
|
|
115
|
+
├── TEMPLATE.md # Reusable template
|
|
116
|
+
├── 001-modular-monolith.md
|
|
117
|
+
├── 002-postgresql-over-mongodb.md
|
|
118
|
+
├── 003-event-sourcing-audit.md
|
|
119
|
+
└── 004-custom-auth-vs-auth0.md
|
|
116
120
|
```
|
|
117
121
|
|
|
118
|
-
##
|
|
122
|
+
## Lifecycle
|
|
119
123
|
|
|
120
|
-
###
|
|
124
|
+
### ADR States
|
|
121
125
|
|
|
122
126
|
```
|
|
123
127
|
proposed → accepted → deprecated
|
|
@@ -126,7 +130,7 @@ proposed → accepted → deprecated
|
|
|
126
130
|
|
|
127
131
|
### proposed
|
|
128
132
|
|
|
129
|
-
|
|
133
|
+
The ADR is being discussed. It's not yet the final decision.
|
|
130
134
|
|
|
131
135
|
```yaml
|
|
132
136
|
status: proposed
|
|
@@ -134,7 +138,7 @@ status: proposed
|
|
|
134
138
|
|
|
135
139
|
### accepted
|
|
136
140
|
|
|
137
|
-
|
|
141
|
+
The decision was made and is being implemented.
|
|
138
142
|
|
|
139
143
|
```yaml
|
|
140
144
|
status: accepted
|
|
@@ -142,7 +146,7 @@ status: accepted
|
|
|
142
146
|
|
|
143
147
|
### deprecated
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
The decision no longer applies but is kept for history.
|
|
146
150
|
|
|
147
151
|
```yaml
|
|
148
152
|
status: deprecated
|
|
@@ -150,45 +154,47 @@ status: deprecated
|
|
|
150
154
|
|
|
151
155
|
### superseded
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
A later decision replaces this ADR.
|
|
154
158
|
|
|
155
159
|
```yaml
|
|
156
160
|
status: superseded-by:ADR-005
|
|
157
161
|
```
|
|
158
162
|
|
|
159
|
-
|
|
163
|
+
In the replacing ADR:
|
|
164
|
+
|
|
160
165
|
```yaml
|
|
161
166
|
status: accepted
|
|
162
167
|
supersedes: ADR-003
|
|
163
168
|
```
|
|
164
169
|
|
|
165
|
-
##
|
|
170
|
+
## When to Expand an ADR
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
If an ADR needs more than 3 sentences, create a linked file in `explanation/`:
|
|
168
173
|
|
|
169
174
|
```markdown
|
|
170
|
-
# ADR-003: Event sourcing
|
|
175
|
+
# ADR-003: Event sourcing for audit
|
|
171
176
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
tables
|
|
175
|
-
|
|
177
|
+
We decided to use event sourcing for the audit module because regulatory
|
|
178
|
+
requirements demand an immutable change history. We considered append-only
|
|
179
|
+
tables but event sourcing provides better traceability. See [[explanation/event-sourcing]]
|
|
180
|
+
for detailed context.
|
|
176
181
|
```
|
|
177
182
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
|
189
|
-
| ADRs
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
183
|
+
In `explanation/event-sourcing.md`:
|
|
184
|
+
|
|
185
|
+
- Complete regulatory context
|
|
186
|
+
- Evaluated alternatives with detailed pros/cons
|
|
187
|
+
- Implications for the team and architecture
|
|
188
|
+
- Implementation plan
|
|
189
|
+
|
|
190
|
+
## Common Mistakes
|
|
191
|
+
|
|
192
|
+
| Mistake | Solution |
|
|
193
|
+
| ------------------------------- | ----------------------------------------------------- |
|
|
194
|
+
| Writing ADRs for everything | Only write when all 3 criteria are met |
|
|
195
|
+
| 2-page ADRs | Minimal format: 1-3 sentences. Expand in explanation/ |
|
|
196
|
+
| Inconsistent numbering | Use sequential without gaps |
|
|
197
|
+
| Forgetting to update status | Change `status` when the decision changes |
|
|
198
|
+
| Not linking to explanations | Add wikilinks to explanation/ when necessary |
|
|
199
|
+
| Repeating the same ADR | Search existing ADRs before creating a new one |
|
|
200
|
+
| ADR without alternative context | Always mention what alternatives were considered |
|