cc-codeconductor 0.2.9 → 0.2.10

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 (90) hide show
  1. package/README.md +105 -25
  2. package/dist/index.js +165 -27
  3. package/package.json +1 -1
  4. package/presets/agy/AGENTS.md +354 -0
  5. package/presets/agy/README.md +47 -0
  6. package/presets/agy/hooks.json +30 -0
  7. package/presets/agy/mcp_config.json +3 -0
  8. package/presets/agy/rules/commit-style.md +1 -0
  9. package/presets/agy/rules/graphify.md +14 -0
  10. package/presets/agy/scripts/post-tool.sh +25 -0
  11. package/presets/agy/scripts/pre-tool.sh +56 -0
  12. package/presets/agy/settings.json +8 -0
  13. package/presets/agy/skills/cc-api-contract/SKILL.md +71 -0
  14. package/presets/agy/skills/cc-db-migration/SKILL.md +70 -0
  15. package/presets/agy/skills/cc-feature/SKILL.md +115 -0
  16. package/presets/agy/skills/cc-fix/SKILL.md +124 -0
  17. package/presets/agy/skills/cc-pagespeed/SKILL.md +101 -0
  18. package/presets/agy/skills/cc-refactor/SKILL.md +149 -0
  19. package/presets/agy/skills/cc-review/SKILL.md +142 -0
  20. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +226 -0
  21. package/presets/agy/skills/cc-test-plan/SKILL.md +145 -0
  22. package/presets/agy/skills/commit/SKILL.md +5 -0
  23. package/presets/agy/workflows/cc-api-contract.md +71 -0
  24. package/presets/agy/workflows/cc-db-migration.md +70 -0
  25. package/presets/agy/workflows/cc-feature.md +115 -0
  26. package/presets/agy/workflows/cc-fix.md +124 -0
  27. package/presets/agy/workflows/cc-pagespeed.md +101 -0
  28. package/presets/agy/workflows/cc-refactor.md +149 -0
  29. package/presets/agy/workflows/cc-review.md +142 -0
  30. package/presets/agy/workflows/cc-tdd-cycle.md +226 -0
  31. package/presets/agy/workflows/cc-test-plan.md +145 -0
  32. package/presets/agy/workflows/commit.md +1 -0
  33. package/presets/claude/CLAUDE.md +13 -3
  34. package/presets/claude/claude.json +6 -0
  35. package/presets/claude/commands/cc/pagespeed.md +103 -0
  36. package/presets/claude/settings.json +249 -2
  37. package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
  38. package/presets/claude/skills/find-skills/SKILL.md +142 -0
  39. package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
  40. package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
  41. package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  42. package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  43. package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  44. package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  45. package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  46. package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
  47. package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
  48. package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
  49. package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  50. package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
  51. package/presets/codex/AGENTS.md +19 -14
  52. package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
  53. package/presets/codex/skills/find-skills/SKILL.md +142 -0
  54. package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
  55. package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
  56. package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  57. package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  58. package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  59. package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  60. package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  61. package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
  62. package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
  63. package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
  64. package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  65. package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
  66. package/presets/opencode/README.md +11 -10
  67. package/presets/opencode/commands/cc-pagespeed.md +100 -0
  68. package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
  69. package/presets/opencode/skills/find-skills/SKILL.md +142 -0
  70. package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
  71. package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
  72. package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  73. package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  74. package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  75. package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  76. package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  77. package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
  78. package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
  79. package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
  80. package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  81. package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
  82. package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
  83. package/presets/seo-hotel/settings.json +225 -0
  84. package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
  85. package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
  86. package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
  87. package/src/presets/manifests/agy.yml +36 -2
  88. package/src/presets/manifests/claude.yml +5 -0
  89. package/src/presets/manifests/opencode.yml +4 -0
  90. package/src/presets/models/agy.yml +16 -0
package/README.md CHANGED
@@ -36,6 +36,15 @@ contracts, task cards, and risk-based routing.
36
36
  > a sitemap.xml with rate limiting and SSRF prevention
37
37
  > - `npx cc-codeconductor seo llms --sitemap <url>` — generates a `llms.txt` file
38
38
  > for AI-search readiness from sitemap content
39
+ > - `/cc-pagespeed --url <url>` — audits web performance using the PageSpeed
40
+ > Insights API; applies the 80/20 principle to produce a prioritized report of
41
+ > Core Web Vitals (LCP, TBT, CLS, FCP, TTFB) with framework-specific fixes;
42
+ > requires `PAGESPEED_API_KEY` env var for full CrUX field data (optional but
43
+ > recommended)
44
+ > - `npx cc-codeconductor install preset --target <opencode|claude|codex|all>` —
45
+ > installs the full preset (agents, prompts, skills, commands, settings) for the
46
+ > chosen runner; use `--locale=es` to inject Spanish-aware instructions into
47
+ > agent files, or rely on the locale saved during `init`
39
48
  > - Manual presets for OpenCode, Claude Code, and Codex
40
49
  > - Versioned Agent Contracts
41
50
  > - Routing Policy documentation
@@ -111,7 +120,7 @@ Task Card → Risk Classification → Routing Policy → Conductor Agent → Del
111
120
  ## Current Support (v0.2.0)
112
121
 
113
122
  - OpenCode preset
114
- - Claude Code-compatible preset
123
+ - Claude Code-compatible preset (see [Claude Environment Options & Best Practices](file:///c:/Users/R2D2/Documents/GitHub/codeconductor/docs/claude-env-options.md))
115
124
  - Codex preset
116
125
  - Spring Boot / Kotlin workflow
117
126
  - Python / Django workflow guidance
@@ -144,12 +153,21 @@ npx cc-codeconductor init # detect stack, write .codeconductor/conf
144
153
  npx cc-codeconductor init --force # overwrite existing config
145
154
  npx cc-codeconductor init --global # write to ~/.codeconductor/
146
155
  npx cc-codeconductor init --dry-run # preview without writing
156
+ npx cc-codeconductor init --locale=es # set Spanish as the instruction language
157
+ npx cc-codeconductor init --locale=en # set English (default)
147
158
  ```
148
159
 
149
160
  On first run, `init` copies `council.yml` and `policy.yml` into
150
161
  `.codeconductor/presets/` so you can customize them without touching framework
151
162
  files. `install` reads from there first.
152
163
 
164
+ > [!IMPORTANT]
165
+ >
166
+ > **`--locale` is remembered.** Once you run `init --locale=es`, the value is
167
+ > saved to `.codeconductor/config.yml`. Every subsequent `install preset` will
168
+ > automatically use that locale — no need to repeat the flag. To change it,
169
+ > run `init --locale=en --force` or edit `defaults.locale` in your config.
170
+
153
171
  #### `detect` — detect project stack
154
172
 
155
173
  ```bash
@@ -166,7 +184,39 @@ Detected:
166
184
  - frameworks: ...
167
185
  ```
168
186
 
169
- #### `install` — install council preset
187
+ #### `install preset` — install full agent preset
188
+
189
+ ```bash
190
+ npx cc-codeconductor install preset --target opencode # project-level
191
+ npx cc-codeconductor install preset --target claude
192
+ npx cc-codeconductor install preset --target codex
193
+ npx cc-codeconductor install preset --target all # all targets
194
+
195
+ npx cc-codeconductor install preset --target claude --global # write to ~/.claude/
196
+ npx cc-codeconductor install preset --target all --global
197
+
198
+ npx cc-codeconductor install preset --target claude --locale=es # override locale once
199
+ npx cc-codeconductor install preset --target all --dry-run # preview
200
+ npx cc-codeconductor install preset --target claude --force # overwrite
201
+ ```
202
+
203
+ Locale resolution order (first match wins):
204
+
205
+ 1. `--locale` flag on the command line
206
+ 2. `defaults.locale` in `.codeconductor/config.yml` (set by `init --locale`)
207
+ 3. `en` (built-in default)
208
+
209
+ Files installed per target:
210
+
211
+ | Target | Notable files |
212
+ | ---------- | ---------------------------------------------------------------- |
213
+ | `claude` | `.claude/CLAUDE.md`, `.claude/settings.json`, `.claude/agents/` |
214
+ | `opencode` | `.opencode/agents/`, `.opencode/commands/`, `.opencode/skills/` |
215
+ | `codex` | `.codex/AGENTS.md`, `.codex/skills/`, `.codex/prompts/` |
216
+
217
+ With `--global`, files are written under `~/` instead of `./`.
218
+
219
+ #### `install council` — install council spec
170
220
 
171
221
  ```bash
172
222
  npx cc-codeconductor install council --target opencode # project-level
@@ -182,16 +232,6 @@ npx cc-codeconductor install council --target opencode --dry-run # preview
182
232
  npx cc-codeconductor install council --target opencode --force # overwrite
183
233
  ```
184
234
 
185
- Files generated per target:
186
-
187
- | Target | Files written |
188
- | ---------- | ---------------------------------------------------------------- |
189
- | `opencode` | `.opencode/commands/cc-council.md`, `.opencode/agents/council-*.md` |
190
- | `claude` | `.claude/skills/council/SKILL.md`, `.claude/agents/council-*.md` |
191
- | `codex` | `.codex/config.toml`, `.codex/agents/council_*.toml` |
192
-
193
- With `--global`, the same files are written under `~/` instead of `./`.
194
-
195
235
  #### `install lsp` — install and configure LSP servers
196
236
 
197
237
  ```bash
@@ -226,12 +266,13 @@ Re-generates preset files for the `defaults.target` in your config.
226
266
 
227
267
  ### Global options
228
268
 
229
- | Flag | Description |
230
- | --------------- | ---------------------------------------- |
231
- | `--force` | Overwrite existing files |
232
- | `--dry-run` | Preview actions without writing |
233
- | `--global` | Target home directory instead of project |
234
- | `--output json` | Machine-readable JSON output |
269
+ | Flag | Description |
270
+ | ---------------- | -------------------------------------------------------- |
271
+ | `--force` | Overwrite existing files |
272
+ | `--dry-run` | Preview actions without writing |
273
+ | `--global` | Target home directory instead of project |
274
+ | `--output json` | Machine-readable JSON output |
275
+ | `--locale=en` | Agent instruction language: `en` (default) or `es` |
235
276
 
236
277
  ### Config directory
237
278
 
@@ -239,12 +280,20 @@ Re-generates preset files for the `defaults.target` in your config.
239
280
 
240
281
  ```text
241
282
  .codeconductor/
242
- ├── config.yml # project settings, target, preset versions
283
+ ├── config.yml # project settings, target, locale, preset versions
243
284
  └── presets/
244
285
  ├── council.yml # customizable copy of the council preset
245
286
  └── policy.yml # customizable copy of policy rules
246
287
  ```
247
288
 
289
+ Key fields in `config.yml`:
290
+
291
+ ```yaml
292
+ defaults:
293
+ target: opencode # default runner for install/update
294
+ locale: es # instruction language injected into agent files
295
+ ```
296
+
248
297
  Edit `.codeconductor/presets/council.yml` to add, remove, or reconfigure agents
249
298
  before running `install`.
250
299
 
@@ -260,17 +309,48 @@ src/presets/models/
260
309
  └── codex.yml # model defaults for Codex target
261
310
  ```
262
311
 
263
- Agent template files contain placeholders that are replaced during `install`:
312
+ Agent template files contain placeholders replaced during `install`:
264
313
 
265
- | Placeholder | Description |
266
- | -------------------- | ------------------------------- |
267
- | `{{MODEL_CLAUDE}}` | Model for the Claude provider |
268
- | `{{MODEL_OPENCODE}}` | Model for the OpenCode provider |
269
- | `{{MODEL_CODEX}}` | Model for the Codex provider |
314
+ | Placeholder | Description |
315
+ | ------------------------------ | --------------------------------------------- |
316
+ | `{{MODEL_CLAUDE}}` | Model for the Claude provider |
317
+ | `{{MODEL_OPENCODE}}` | Model for the OpenCode provider |
318
+ | `{{MODEL_CODEX}}` | Model for the Codex provider |
319
+ | `{{LANGUAGE_INSTRUCTIONS}}` | Locale-aware instruction injected by `locale` |
270
320
 
271
321
  To customize models, edit the YAML file for your target before running
272
322
  `install`. Each file maps agent roles to provider-specific model names.
273
323
 
324
+ #### Instruction Language (`--locale`)
325
+
326
+ Agent markdown files (`CLAUDE.md`, `AGENTS.md`, `README.md`) include a
327
+ `{{LANGUAGE_INSTRUCTIONS}}` placeholder that is replaced at install time based
328
+ on the active locale:
329
+
330
+ | Locale | Injected instruction |
331
+ | ------ | -------------------- |
332
+ | `en` | *Prose/docs/code comments: be terse and direct. Prefer concrete nouns over abstract ones. Omit filler phrases. One idea per sentence.* |
333
+ | `es` | *Spanish prose/docs/reports/Markdown: preserve natural Spanish orthography, including accents, `ñ`, `¿`, `¡`, and normal Unicode. The ASCII-only editing preference does not apply to these artifacts.* |
334
+
335
+ The locale is **sticky**: set it once with `init --locale=es` and every
336
+ subsequent `install preset` will use it automatically. Override per-run with
337
+ `install preset --locale=en`.
338
+
339
+ ```bash
340
+ # One-time setup
341
+ npx cc-codeconductor init --locale=es
342
+
343
+ # All future installs use Spanish automatically
344
+ npx cc-codeconductor install preset --target=claude
345
+ npx cc-codeconductor install preset --target=all --global
346
+
347
+ # Override just this run
348
+ npx cc-codeconductor install preset --target=claude --locale=en
349
+
350
+ # Change the saved locale
351
+ npx cc-codeconductor init --locale=en --force
352
+ ```
353
+
274
354
  ---
275
355
 
276
356
  ## Repository Structure
package/dist/index.js CHANGED
@@ -7044,7 +7044,7 @@ function getExitCode(error) {
7044
7044
  // package.json
7045
7045
  var package_default = {
7046
7046
  name: "cc-codeconductor",
7047
- version: "0.2.9",
7047
+ version: "0.2.10",
7048
7048
  description: "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
7049
7049
  keywords: [
7050
7050
  "ai",
@@ -11371,7 +11371,8 @@ var CodeConductorConfigSchema = exports_external.object({
11371
11371
  }),
11372
11372
  defaults: exports_external.object({
11373
11373
  target: exports_external.enum(["opencode", "claude", "codex", "gemini", "cursor", "agy"]),
11374
- overwrite: exports_external.boolean()
11374
+ overwrite: exports_external.boolean(),
11375
+ locale: exports_external.enum(["en", "es"]).optional().default("en")
11375
11376
  }),
11376
11377
  presets: exports_external.object({
11377
11378
  council: exports_external.object({
@@ -11640,7 +11641,8 @@ var DEFAULT_CONFIG = {
11640
11641
  },
11641
11642
  defaults: {
11642
11643
  target: "opencode",
11643
- overwrite: false
11644
+ overwrite: false,
11645
+ locale: "en"
11644
11646
  },
11645
11647
  presets: {
11646
11648
  council: {
@@ -11749,13 +11751,13 @@ function resolveAssets(target) {
11749
11751
  case "cursor":
11750
11752
  return ["agents", "prompts/v0.2.0"];
11751
11753
  case "agy":
11752
- return ["agents", "prompts/v0.2.0"];
11754
+ return ["AGENTS.md", "rules", "workflows", "skills", "prompts/v0.2.0"];
11753
11755
  }
11754
11756
  }
11755
11757
 
11756
11758
  // src/commands/init.command.ts
11757
11759
  async function initCommand(options) {
11758
- const { projectRoot, dryRun, force, global: isGlobal, output } = options;
11760
+ const { projectRoot, dryRun, force, global: isGlobal, output, locale } = options;
11759
11761
  const baseDir = isGlobal ? homedir() : projectRoot;
11760
11762
  try {
11761
11763
  let profile = null;
@@ -11779,7 +11781,8 @@ async function initCommand(options) {
11779
11781
  },
11780
11782
  defaults: {
11781
11783
  target: "opencode",
11782
- overwrite: force
11784
+ overwrite: force,
11785
+ locale
11783
11786
  }
11784
11787
  } : {
11785
11788
  project: {
@@ -11788,7 +11791,8 @@ async function initCommand(options) {
11788
11791
  },
11789
11792
  defaults: {
11790
11793
  target: "opencode",
11791
- overwrite: force
11794
+ overwrite: force,
11795
+ locale
11792
11796
  }
11793
11797
  };
11794
11798
  const presetResolution = profile ? resolvePreset("opencode", profile) : null;
@@ -11904,7 +11908,7 @@ async function fileExists2(path) {
11904
11908
  }
11905
11909
 
11906
11910
  // src/commands/install.command.ts
11907
- import { homedir as homedir2 } from "node:os";
11911
+ import { homedir as homedir3 } from "node:os";
11908
11912
  import { resolve as resolve7 } from "node:path";
11909
11913
 
11910
11914
  // src/domain/council/council-agent.ts
@@ -12312,8 +12316,117 @@ async function writeGeneratedFiles(files, options) {
12312
12316
 
12313
12317
  // src/core/presets/file-copier.ts
12314
12318
  import { mkdir as mkdir4, readdir, readFile as readFile4, stat, writeFile as writeFile4 } from "node:fs/promises";
12319
+ import { homedir as homedir2 } from "node:os";
12315
12320
  import { dirname as dirname3, join as join2, relative, resolve as resolve5 } from "node:path";
12316
12321
 
12322
+ // src/core/i18n/language-instructions.ts
12323
+ var SUPPORTED_LOCALES = ["en", "es"];
12324
+ var LANGUAGE_INSTRUCTIONS = {
12325
+ en: 'Prose/docs/code comments: be terse and direct. Prefer concrete nouns over abstract ones. Omit filler phrases ("note that", "please", "as mentioned"). One idea per sentence.',
12326
+ es: "Spanish prose/docs/reports/Markdown: preserve natural Spanish orthography, including accents, `ñ`, `¿`, `¡`, and normal Unicode. The ASCII-only editing preference does not apply to these artifacts."
12327
+ };
12328
+ var COMMIT_STYLE = {
12329
+ en: `---
12330
+ trigger: always_on
12331
+ description: Rules for generating commit messages using Conventional Commits format
12332
+ ---
12333
+
12334
+ ## Git Commit Messages
12335
+
12336
+ ### Format
12337
+
12338
+ \`\`\`
12339
+ <type>(<scope>): <short description>
12340
+
12341
+ - <detail 1>
12342
+ - <detail 2>
12343
+ \`\`\`
12344
+
12345
+ ### Valid Types
12346
+
12347
+ \`feat\` \`fix\` \`docs\` \`style\` \`refactor\` \`test\` \`chore\` \`perf\` \`ci\` \`build\`
12348
+ \`revert\`
12349
+
12350
+ ### Rules
12351
+
12352
+ - Language: **neutral English** always
12353
+ - Header: maximum 69 characters, no trailing period
12354
+ - Body: concise bullet points, one idea per line
12355
+ - Footer: only for breaking changes or issues
12356
+ - No gerunds ("adding", "fixing")
12357
+ - Use infinitive or imperative ("add", "fix", "update")`,
12358
+ es: `---
12359
+ trigger: always_on
12360
+ description: Reglas para generar mensajes de commit con formato Conventional Commits
12361
+ ---
12362
+
12363
+ ## Git Commit Messages
12364
+
12365
+ ### Formato
12366
+
12367
+ \`\`\`
12368
+ <tipo>(<scope>): <descripcion corta>
12369
+
12370
+ - <detalle 1>
12371
+ - <detalle 2>
12372
+ \`\`\`
12373
+
12374
+ ### Tipos validos
12375
+
12376
+ \`feat\` \`fix\` \`docs\` \`style\` \`refactor\` \`test\` \`chore\` \`perf\` \`ci\` \`build\`
12377
+ \`revert\`
12378
+
12379
+ ### Reglas
12380
+
12381
+ - Idioma: **inglés neutro** siempre
12382
+ - Encabezado: maximo 69 caracteres, sin punto final
12383
+ - Cuerpo: viñetas concisas, una idea por linea
12384
+ - Footer: solo para breaking changes o issues
12385
+ - Sin gerundios ("agregando", "corrigiendo")
12386
+ - Usar infinitivo o imperativo ("agregar", "corregir", "actualizar")`
12387
+ };
12388
+ var COMMIT_WORKFLOW = {
12389
+ en: `---
12390
+ name: commit
12391
+ description: Generates a commit in English following Conventional Commits based on staged changes
12392
+ ---
12393
+
12394
+ // turbo-all
12395
+
12396
+ ## Steps
12397
+
12398
+ 1. View staged changes: \`git diff --cached --stat\`
12399
+ 2. If nothing is staged, suggest \`git add .\` or specific files
12400
+ 3. Get full diff: \`git diff --cached\`
12401
+ 4. Check recent style: \`git log -n 3 --oneline\`
12402
+ 5. Generate message following \`.agents/rules/commit-style.md\`
12403
+ 6. Show proposal and confirm with the user
12404
+ 7. Execute: \`git commit -m "<message>"\`
12405
+ 8. Confirm success: \`git status\``,
12406
+ es: `---
12407
+ name: commit
12408
+ description: Genera un commit en inglés siguiendo Conventional Commits basado en los cambios staged
12409
+ ---
12410
+
12411
+ // turbo-all
12412
+
12413
+ ## Pasos
12414
+
12415
+ 1. Ver cambios staged: \`git diff --cached --stat\`
12416
+ 2. Si no hay nada staged, sugiere \`git add .\` o archivos específicos
12417
+ 3. Obtener diff completo: \`git diff --cached\`
12418
+ 4. Ver estilo reciente: \`git log -n 3 --oneline\`
12419
+ 5. Generar mensaje siguiendo \`.agents/rules/commit-style.md\`
12420
+ 6. Mostrar propuesta y confirmar con el usuario
12421
+ 7. Ejecutar: \`git commit -m "<mensaje>"\`
12422
+ 8. Confirmar éxito: \`git status\``
12423
+ };
12424
+ function getLanguageInstruction(locale) {
12425
+ const key = SUPPORTED_LOCALES.includes(locale) ? locale : "en";
12426
+ return `- ${LANGUAGE_INSTRUCTIONS[key]}`;
12427
+ }
12428
+ var LOCALE_PLACEHOLDER = "{{LANGUAGE_INSTRUCTIONS}}";
12429
+
12317
12430
  // src/core/filesystem/safe-merger.ts
12318
12431
  var MANAGED_BEGIN_MARKER = "<!-- CODECONDUCTOR:BEGIN managed -->";
12319
12432
  var MANAGED_END_MARKER = "<!-- CODECONDUCTOR:END managed -->";
@@ -12410,12 +12523,14 @@ function extractAgentRole(filePath) {
12410
12523
  ];
12411
12524
  return knownRoles.includes(name) ? name : null;
12412
12525
  }
12413
- function renderTemplate(content, modelConfig, filePath) {
12526
+ function renderTemplate(content, modelConfig, filePath, locale = "en") {
12527
+ const cleanLocale = locale === "es" || locale === "en" ? locale : "en";
12528
+ const templatedContent = content.replace(/\{\{COMMIT_STYLE\}\}/g, COMMIT_STYLE[cleanLocale]).replace(/\{\{COMMIT_WORKFLOW\}\}/g, COMMIT_WORKFLOW[cleanLocale]);
12414
12529
  const agentRole = extractAgentRole(filePath);
12415
12530
  if (agentRole && modelConfig.agents[agentRole]) {
12416
12531
  const agentModels = modelConfig.agents[agentRole];
12417
12532
  const targetModel = agentModels[modelConfig.target];
12418
- let result2 = content.replace(/\{\{MODEL\}\}/g, targetModel ?? "").replace(/\{\{MODEL_CLAUDE\}\}/g, agentModels.claude ?? "").replace(/\{\{MODEL_OPENCODE\}\}/g, agentModels.opencode ?? "").replace(/\{\{MODEL_CODEX\}\}/g, agentModels.codex ?? "").replace(/\{\{MODEL_GEMINI\}\}/g, agentModels.gemini ?? "").replace(/\{\{MODEL_CURSOR\}\}/g, agentModels.cursor ?? "");
12533
+ let result2 = templatedContent.replace(/\{\{MODEL\}\}/g, targetModel ?? "").replace(/\{\{MODEL_CLAUDE\}\}/g, agentModels.claude ?? "").replace(/\{\{MODEL_OPENCODE\}\}/g, agentModels.opencode ?? "").replace(/\{\{MODEL_CODEX\}\}/g, agentModels.codex ?? "").replace(/\{\{MODEL_GEMINI\}\}/g, agentModels.gemini ?? "").replace(/\{\{MODEL_CURSOR\}\}/g, agentModels.cursor ?? "").replace(new RegExp(LOCALE_PLACEHOLDER.replace(/[{}]/g, "\\$&"), "g"), getLanguageInstruction(locale));
12419
12534
  if (modelConfig.tools || modelConfig.permissions) {
12420
12535
  result2 = substituteToolNames(result2, modelConfig);
12421
12536
  }
@@ -12431,7 +12546,7 @@ function renderTemplate(content, modelConfig, filePath) {
12431
12546
  "docs",
12432
12547
  "repo-explorer"
12433
12548
  ];
12434
- let result = content;
12549
+ let result = templatedContent;
12435
12550
  for (const role of knownRoles) {
12436
12551
  if (!modelConfig.agents[role])
12437
12552
  continue;
@@ -12445,6 +12560,7 @@ function renderTemplate(content, modelConfig, filePath) {
12445
12560
  }
12446
12561
  }
12447
12562
  }
12563
+ result = result.replace(new RegExp(LOCALE_PLACEHOLDER.replace(/[{}]/g, "\\$&"), "g"), getLanguageInstruction(locale));
12448
12564
  if (modelConfig.tools || modelConfig.permissions) {
12449
12565
  result = substituteToolNames(result, modelConfig);
12450
12566
  }
@@ -12454,12 +12570,12 @@ function substituteToolNames(content, modelConfig) {
12454
12570
  if (!modelConfig.tools && !modelConfig.permissions)
12455
12571
  return content;
12456
12572
  const target = modelConfig.target;
12457
- const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
12573
+ const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
12458
12574
  if (!fmMatch)
12459
12575
  return content;
12460
12576
  const frontmatter = fmMatch[1];
12461
12577
  if (target === "opencode" && modelConfig.permissions) {
12462
- const updatedFrontmatter2 = frontmatter.replace(/^tools:\s*(.+)\n?/m, "");
12578
+ const updatedFrontmatter2 = frontmatter.replace(/^tools:\s*(.+)\r?\n?/m, "");
12463
12579
  return content.replace(fmMatch[0], `---
12464
12580
  ${updatedFrontmatter2}
12465
12581
  ---`);
@@ -12481,7 +12597,7 @@ ${updatedFrontmatter2}
12481
12597
  ${updatedFrontmatter}
12482
12598
  ---`);
12483
12599
  }
12484
- async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTemplate, modelConfig) {
12600
+ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTemplate, modelConfig, locale) {
12485
12601
  if (strategy === "skip") {
12486
12602
  return { src: srcPath, dest: destPath, action: "skipped", dryRun };
12487
12603
  }
@@ -12491,7 +12607,7 @@ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTem
12491
12607
  } catch (e) {
12492
12608
  return { src: srcPath, dest: destPath, action: "error", error: `Cannot read source: ${e}` };
12493
12609
  }
12494
- const incomingContent = isTemplate && modelConfig ? renderTemplate(content, modelConfig, srcPath) : content;
12610
+ const incomingContent = isTemplate && modelConfig ? renderTemplate(content, modelConfig, srcPath, locale) : content;
12495
12611
  let finalContent = incomingContent;
12496
12612
  let action = "written";
12497
12613
  if (strategy === "append") {
@@ -12543,14 +12659,23 @@ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTem
12543
12659
  return { src: srcPath, dest: destPath, action: "error", error: String(e) };
12544
12660
  }
12545
12661
  }
12546
- async function copyFromManifest(manifest, presetsDir, baseDir, isGlobal, dryRun, force, modelConfig = null) {
12662
+ async function copyFromManifest(manifest, presetsDir, baseDir, isGlobal, dryRun, force, modelConfig = null, locale = "en") {
12547
12663
  const results = [];
12548
12664
  for (const entry of manifest.entries) {
12549
12665
  const strategy = isGlobal && entry.globalStrategy ? entry.globalStrategy : entry.strategy;
12550
- const files = await resolveEntryFiles(entry, presetsDir, baseDir);
12666
+ let resolvedBaseDir = baseDir;
12667
+ let resolvedEntry = entry;
12668
+ if (manifest.target === "agy" && isGlobal) {
12669
+ resolvedBaseDir = join2(homedir2(), ".gemini", "config");
12670
+ resolvedEntry = {
12671
+ ...entry,
12672
+ dest: entry.dest.replace(/^\.agents\/?/, "")
12673
+ };
12674
+ }
12675
+ const files = await resolveEntryFiles(resolvedEntry, presetsDir, resolvedBaseDir);
12551
12676
  const isTemplate = entry.template === true;
12552
12677
  for (const { src, dest } of files) {
12553
- results.push(await applySingleFile(src, dest, strategy, force, dryRun, isTemplate, modelConfig));
12678
+ results.push(await applySingleFile(src, dest, strategy, force, dryRun, isTemplate, modelConfig, locale));
12554
12679
  }
12555
12680
  }
12556
12681
  return results;
@@ -12629,7 +12754,7 @@ function getIndividualTargets(target) {
12629
12754
  // src/commands/install.command.ts
12630
12755
  async function installCommand(options) {
12631
12756
  const { target, dryRun, force, global: isGlobal, output, projectRoot } = options;
12632
- const baseDir = isGlobal ? homedir2() : projectRoot;
12757
+ const baseDir = isGlobal ? homedir3() : projectRoot;
12633
12758
  try {
12634
12759
  const runnerTarget = parseRunnerTarget(target);
12635
12760
  const targets = getIndividualTargets(runnerTarget);
@@ -12724,17 +12849,24 @@ async function installCommand(options) {
12724
12849
  }
12725
12850
  async function installPresetCommand(options) {
12726
12851
  const { target, dryRun, force, global: isGlobal, projectRoot } = options;
12727
- const baseDir = isGlobal ? homedir2() : projectRoot;
12852
+ const baseDir = isGlobal ? homedir3() : projectRoot;
12728
12853
  try {
12729
12854
  const runnerTarget = parseRunnerTarget(target);
12730
12855
  const targets = getIndividualTargets(runnerTarget);
12731
12856
  const profile = await detectProject(projectRoot);
12732
12857
  const presetResolution = targets.map((t) => resolvePreset(t, profile));
12858
+ let locale = options.locale ?? "en";
12859
+ if (!options.locale) {
12860
+ const configResult = await loadConfig(projectRoot);
12861
+ if (configResult.success) {
12862
+ locale = configResult.data.defaults.locale ?? "en";
12863
+ }
12864
+ }
12733
12865
  const allFileResults = [];
12734
12866
  for (const t of targets) {
12735
12867
  const manifest = await loadManifest(t);
12736
12868
  const modelConfig = await loadModelConfig(t);
12737
- const results = await copyFromManifest(manifest, PRESETS_DIR, baseDir, isGlobal, dryRun, force, modelConfig);
12869
+ const results = await copyFromManifest(manifest, PRESETS_DIR, baseDir, isGlobal, dryRun, force, modelConfig, locale);
12738
12870
  for (const r of results) {
12739
12871
  allFileResults.push({ target: t, ...r });
12740
12872
  }
@@ -12749,6 +12881,7 @@ async function installPresetCommand(options) {
12749
12881
  targets,
12750
12882
  global: isGlobal,
12751
12883
  dryRun,
12884
+ locale,
12752
12885
  presetResolution,
12753
12886
  fileResults: allFileResults
12754
12887
  }
@@ -12766,7 +12899,7 @@ async function installPresetCommand(options) {
12766
12899
  }
12767
12900
 
12768
12901
  // src/commands/install-lsp.command.ts
12769
- import { homedir as homedir4 } from "node:os";
12902
+ import { homedir as homedir5 } from "node:os";
12770
12903
  import { resolve as resolve8 } from "node:path";
12771
12904
 
12772
12905
  // src/core/lsp/lsp-config-utils.ts
@@ -13011,7 +13144,7 @@ function createOpenCodeLspGenerator() {
13011
13144
  // src/core/lsp/lsp-installer.ts
13012
13145
  import { execFile } from "node:child_process";
13013
13146
  import { access as access5, mkdir as mkdir5 } from "node:fs/promises";
13014
- import { homedir as homedir3 } from "node:os";
13147
+ import { homedir as homedir4 } from "node:os";
13015
13148
  import { join as join4 } from "node:path";
13016
13149
  import { promisify } from "node:util";
13017
13150
  var execFileAsync = promisify(execFile);
@@ -13019,7 +13152,7 @@ var execFileAsync = promisify(execFile);
13019
13152
  class LspInstaller {
13020
13153
  lspBinDir;
13021
13154
  constructor() {
13022
- this.lspBinDir = join4(homedir3(), ".codeconductor", "lsp", "bin");
13155
+ this.lspBinDir = join4(homedir4(), ".codeconductor", "lsp", "bin");
13023
13156
  }
13024
13157
  async checkInstalled(def) {
13025
13158
  try {
@@ -13253,7 +13386,7 @@ function resolveLsps(languages) {
13253
13386
  // src/commands/install-lsp.command.ts
13254
13387
  async function installLspCommand(options) {
13255
13388
  const { target, lang, dryRun, force, global: isGlobal, output, projectRoot } = options;
13256
- const baseDir = isGlobal ? homedir4() : projectRoot;
13389
+ const baseDir = isGlobal ? homedir5() : projectRoot;
13257
13390
  try {
13258
13391
  const runnerTarget = parseRunnerTarget(target);
13259
13392
  const targets = getIndividualTargets(runnerTarget);
@@ -15105,16 +15238,19 @@ Options:
15105
15238
  --global Install to home directory (~/.claude, ~/.opencode, etc.)
15106
15239
  --output, -o Output mode: human or json
15107
15240
  --lang Comma-separated list of languages (e.g., typescript,php,python)
15241
+ --locale Instruction language for agent files: en (default) | es
15108
15242
 
15109
15243
  Examples:
15110
15244
  npx cc-codeconductor init
15111
15245
  npx cc-codeconductor init --global
15246
+ npx cc-codeconductor init --locale=es
15112
15247
  npx cc-codeconductor detect
15113
15248
  npx cc-codeconductor install preset --target opencode
15114
15249
  npx cc-codeconductor install preset --target claude
15115
15250
  npx cc-codeconductor install preset --target codex
15116
15251
  npx cc-codeconductor install preset --target all
15117
15252
  npx cc-codeconductor install preset --target claude --global
15253
+ npx cc-codeconductor install preset --target claude --locale=es
15118
15254
  npx cc-codeconductor install council --target opencode
15119
15255
  npx cc-codeconductor install council --target claude
15120
15256
  npx cc-codeconductor install council --target codex
@@ -15142,7 +15278,8 @@ async function routeCommand(args, projectRoot) {
15142
15278
  dryRun: flags.dryRun,
15143
15279
  force: flags.force,
15144
15280
  global: options.global === true || options.global === "true",
15145
- output: flags.output
15281
+ output: flags.output,
15282
+ locale: options.locale === "es" ? "es" : "en"
15146
15283
  });
15147
15284
  case "detect":
15148
15285
  return detectCommand({
@@ -15177,7 +15314,8 @@ async function routeCommand(args, projectRoot) {
15177
15314
  dryRun: flags.dryRun,
15178
15315
  force: flags.force,
15179
15316
  global: isGlobal,
15180
- output: flags.output
15317
+ output: flags.output,
15318
+ locale: options.locale === "es" ? "es" : options.locale === "en" ? "en" : undefined
15181
15319
  });
15182
15320
  }
15183
15321
  return installCommand({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",