@damenor/agent-docs 0.4.0 → 0.4.1

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/dist/index.js CHANGED
@@ -770,7 +770,7 @@ var labels = {
770
770
  stackCommandsHeader: "Comandos probables",
771
771
  // ── Convenciones ──
772
772
  conventionsTitle: "Convenios obligatorios",
773
- convLang: "**Idioma**: C\xF3digo en **ingl\xE9s**. Comentarios y docs en **espa\xF1ol**.",
773
+ convLang: "**Idioma del proyecto**: La documentaci\xF3n est\xE1 configurada en **{{PROJECT_LANGUAGE_LABEL}}** ({{PROJECT_LANGUAGE_CODE}}). Genera y actualiza toda la documentaci\xF3n en {{PROJECT_LANGUAGE_LABEL}}, independientemente del idioma en que te hable el usuario. El c\xF3digo fuente sigue en ingl\xE9s.",
774
774
  convNaming: "**Nombramiento**: [convenci\xF3n de nombres \u2014 ej. camelCase variables/funciones, PascalCase componentes]",
775
775
  convStructure: "**Estructura**: [convenci\xF3n \u2014 ej. feature-based folders]",
776
776
  convTesting: "**Testing**: Todo c\xF3digo nuevo DEBE incluir tests.",
@@ -932,7 +932,7 @@ var labels2 = {
932
932
  stackCommandsHeader: "Probable Commands",
933
933
  // ── Conventions ──
934
934
  conventionsTitle: "Mandatory Conventions",
935
- convLang: "**Language**: Code in **English**. Comments and docs in **English**.",
935
+ convLang: "**Project Language**: Documentation is configured in **{{PROJECT_LANGUAGE_LABEL}}** ({{PROJECT_LANGUAGE_CODE}}). Generate and update all documentation in {{PROJECT_LANGUAGE_LABEL}}, regardless of the language the user speaks to you. Source code remains in English.",
936
936
  convNaming: "**Naming**: [naming convention \u2014 e.g. camelCase variables/functions, PascalCase components]",
937
937
  convStructure: "**Structure**: [convention \u2014 e.g. feature-based folders]",
938
938
  convTesting: "**Testing**: All new code MUST include tests.",
@@ -1162,9 +1162,12 @@ tags: [${t("fmTags")}]
1162
1162
  md += `| ${t("stackRowJava")} | ${t("stackRowJavaEco")} | ${t("stackRowJavaCmds")} |
1163
1163
 
1164
1164
  `;
1165
+ const LANG_LABELS = { es: "espa\xF1ol", en: "English" };
1166
+ const langLabel = LANG_LABELS[options.language] ?? options.language;
1167
+ const langCode = options.language;
1165
1168
  md += `### ${t("conventionsTitle")}
1166
1169
  `;
1167
- md += `1. ${t("convLang")}
1170
+ md += `1. ${t("convLang").replaceAll("{{PROJECT_LANGUAGE_LABEL}}", langLabel).replaceAll("{{PROJECT_LANGUAGE_CODE}}", langCode)}
1168
1171
  `;
1169
1172
  md += `2. ${t("convNaming")}
1170
1173
  `;
@@ -1374,6 +1377,9 @@ var labels3 = {
1374
1377
  bizTermsTerm: "T\xE9rmino",
1375
1378
  bizTermsDef: "Definici\xF3n",
1376
1379
  bizTermsNotes: "Notas",
1380
+ projectLangTerm: "Idioma del proyecto",
1381
+ projectLangDef: "{{PROJECT_LANGUAGE_LABEL}} ({{PROJECT_LANGUAGE_CODE}}) \u2014 Idioma oficial de la documentaci\xF3n generada por el CLI",
1382
+ projectLangNotes: "Ver AGENTS.md \xA7 Stack y convenciones",
1377
1383
  techTermsTitle: "T\xE9rminos t\xE9cnicos internos",
1378
1384
  techTermsTerm: "T\xE9rmino",
1379
1385
  techTermsDef: "Definici\xF3n",
@@ -1426,6 +1432,9 @@ var labels4 = {
1426
1432
  bizTermsTerm: "Term",
1427
1433
  bizTermsDef: "Definition",
1428
1434
  bizTermsNotes: "Notes",
1435
+ projectLangTerm: "Project language",
1436
+ projectLangDef: "{{PROJECT_LANGUAGE_LABEL}} ({{PROJECT_LANGUAGE_CODE}}) \u2014 Official documentation language set by the CLI",
1437
+ projectLangNotes: "See AGENTS.md \xA7 Stack and Conventions",
1429
1438
  techTermsTitle: "Internal Technical Terms",
1430
1439
  techTermsTerm: "Term",
1431
1440
  techTermsDef: "Definition",
@@ -1461,6 +1470,10 @@ function generate2(options) {
1461
1470
  const labels31 = loadLabels("context", options.language);
1462
1471
  const t = (key) => labels31[key] || `[${key}]`;
1463
1472
  const today = options.date || (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
1473
+ const LANG_LABELS = { es: "Espa\xF1ol", en: "English" };
1474
+ const langLabel = LANG_LABELS[options.language] ?? options.language;
1475
+ const langCode = options.language;
1476
+ const projectLangDef = t("projectLangDef").replaceAll("{{PROJECT_LANGUAGE_LABEL}}", langLabel).replaceAll("{{PROJECT_LANGUAGE_CODE}}", langCode);
1464
1477
  let md = `---
1465
1478
  created: "2025-01-01"
1466
1479
  updated: "${today}"
@@ -1500,6 +1513,7 @@ ${t("introGap")}
1500
1513
 
1501
1514
  | ${t("bizTermsTerm")} | ${t("bizTermsDef")} | ${t("bizTermsNotes")} |
1502
1515
  |---------|-----------|-------|
1516
+ | **${t("projectLangTerm")}** | ${projectLangDef} | ${t("projectLangNotes")} |
1503
1517
  | **[T\xE9rmino]** | [definici\xF3n] | [notas] |
1504
1518
 
1505
1519
  ## ${t("techTermsTitle")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damenor/agent-docs",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI para generar documentación profesional para proyectos con agentes AI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,4 +51,4 @@ You are the documentation maintainer. Your job is to keep `docs/` synchronized w
51
51
  - If the change is minor (typo, reorder), do not update docs
52
52
  - If the change is significant, update ALL affected docs
53
53
  - Always update the `updated:` frontmatter on each modified file
54
- - Content in Spanish, technical terms in English
54
+ - Content in the project's documentation language (see AGENTS.md), technical terms in English
@@ -44,7 +44,7 @@ You are an expert technical writer. Your ONLY job is to write and update the pro
44
44
 
45
45
  ## Rules
46
46
 
47
- - Content in **Spanish**, technical terms in **English**
47
+ - Content in the **project's documentation language** (see AGENTS.md), technical terms in **English**
48
48
  - NEVER write empty placeholders (TODO, TBD) — if you don't have information, ask
49
49
  - Each file must be useful on its own
50
50
  - Cross-reference with wikilinks where relevant
@@ -3,7 +3,8 @@ name: doc-write
3
3
  description: >
4
4
  Writes documentation following Diátaxis + ADR + CONTEXT conventions.
5
5
  Classifies content by type before writing, generates ADRs when applicable,
6
- and keeps CONTEXT.md updated. All content in English with technical
6
+ and keeps CONTEXT.md updated. All content in the project's documentation language
7
+ (as defined in AGENTS.md § Stack and Conventions), with technical
7
8
  terms kept in English.
8
9
  TRIGGER: When the user says "write doc", "document X", "create ADR",
9
10
  "update CONTEXT", "new documentation", or any documentation file
@@ -91,7 +92,7 @@ Write for:
91
92
  - **Humans**: Clarity, examples, logical flow
92
93
  - **AI agents**: Consistent structure, terms defined in CONTEXT.md, clear cross-references
93
94
 
94
- ### RULE #7: Content in English
95
+ ### RULE #7: Content in the project's documentation language
95
96
 
96
97
  ```
97
98
  ✅ "To configure the authentication middleware..."