cc-codeconductor 0.2.9 → 0.3.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 (143) hide show
  1. package/README.md +105 -25
  2. package/dist/index.js +662 -291
  3. package/package.json +1 -1
  4. package/presets/agy/AGENTS.md +365 -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 +47 -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/android/SKILL.md +119 -0
  38. package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
  39. package/presets/claude/skills/find-skills/SKILL.md +142 -0
  40. package/presets/claude/skills/laravel-specialist/SKILL.md +264 -0
  41. package/presets/claude/skills/laravel-specialist/references/eloquent.md +351 -0
  42. package/presets/claude/skills/laravel-specialist/references/livewire.md +512 -0
  43. package/presets/claude/skills/laravel-specialist/references/queues.md +423 -0
  44. package/presets/claude/skills/laravel-specialist/references/routing.md +362 -0
  45. package/presets/claude/skills/laravel-specialist/references/testing.md +522 -0
  46. package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
  47. package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
  48. package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  49. package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  50. package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  51. package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  52. package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  53. package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
  54. package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
  55. package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
  56. package/presets/claude/skills/php-pro/SKILL.md +208 -0
  57. package/presets/claude/skills/php-pro/references/async-patterns.md +412 -0
  58. package/presets/claude/skills/php-pro/references/laravel-patterns.md +377 -0
  59. package/presets/claude/skills/php-pro/references/modern-php-features.md +323 -0
  60. package/presets/claude/skills/php-pro/references/symfony-patterns.md +466 -0
  61. package/presets/claude/skills/php-pro/references/testing-quality.md +466 -0
  62. package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  63. package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
  64. package/presets/codex/AGENTS.md +38 -14
  65. package/presets/codex/skills/android/SKILL.md +119 -0
  66. package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
  67. package/presets/codex/skills/find-skills/SKILL.md +142 -0
  68. package/presets/codex/skills/laravel-specialist/SKILL.md +264 -0
  69. package/presets/codex/skills/laravel-specialist/references/eloquent.md +351 -0
  70. package/presets/codex/skills/laravel-specialist/references/livewire.md +512 -0
  71. package/presets/codex/skills/laravel-specialist/references/queues.md +423 -0
  72. package/presets/codex/skills/laravel-specialist/references/routing.md +362 -0
  73. package/presets/codex/skills/laravel-specialist/references/testing.md +522 -0
  74. package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
  75. package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
  76. package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  77. package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  78. package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  79. package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  80. package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  81. package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
  82. package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
  83. package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
  84. package/presets/codex/skills/php-pro/SKILL.md +208 -0
  85. package/presets/codex/skills/php-pro/references/async-patterns.md +412 -0
  86. package/presets/codex/skills/php-pro/references/laravel-patterns.md +377 -0
  87. package/presets/codex/skills/php-pro/references/modern-php-features.md +323 -0
  88. package/presets/codex/skills/php-pro/references/symfony-patterns.md +466 -0
  89. package/presets/codex/skills/php-pro/references/testing-quality.md +466 -0
  90. package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  91. package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
  92. package/presets/opencode/README.md +11 -10
  93. package/presets/opencode/agents/orchestrator.md +121 -1
  94. package/presets/opencode/agents/reviewer.md +31 -0
  95. package/presets/opencode/commands/cc-pagespeed.md +100 -0
  96. package/presets/opencode/prompts/v0.3.0/architect.md +221 -0
  97. package/presets/opencode/prompts/v0.3.0/docs.md +189 -0
  98. package/presets/opencode/prompts/v0.3.0/implementer.md +162 -0
  99. package/presets/opencode/prompts/v0.3.0/orchestrator.md +360 -0
  100. package/presets/opencode/prompts/v0.3.0/repo-explorer.md +110 -0
  101. package/presets/opencode/prompts/v0.3.0/reviewer.md +225 -0
  102. package/presets/opencode/prompts/v0.3.0/task-coach.md +155 -0
  103. package/presets/opencode/prompts/v0.3.0/tester.md +251 -0
  104. package/presets/opencode/skills/android/SKILL.md +119 -0
  105. package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
  106. package/presets/opencode/skills/find-skills/SKILL.md +142 -0
  107. package/presets/opencode/skills/laravel-specialist/SKILL.md +264 -0
  108. package/presets/opencode/skills/laravel-specialist/references/eloquent.md +351 -0
  109. package/presets/opencode/skills/laravel-specialist/references/livewire.md +512 -0
  110. package/presets/opencode/skills/laravel-specialist/references/queues.md +423 -0
  111. package/presets/opencode/skills/laravel-specialist/references/routing.md +362 -0
  112. package/presets/opencode/skills/laravel-specialist/references/testing.md +522 -0
  113. package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
  114. package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
  115. package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  116. package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  117. package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  118. package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  119. package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  120. package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
  121. package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
  122. package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
  123. package/presets/opencode/skills/php-pro/SKILL.md +208 -0
  124. package/presets/opencode/skills/php-pro/references/async-patterns.md +412 -0
  125. package/presets/opencode/skills/php-pro/references/laravel-patterns.md +377 -0
  126. package/presets/opencode/skills/php-pro/references/modern-php-features.md +323 -0
  127. package/presets/opencode/skills/php-pro/references/symfony-patterns.md +466 -0
  128. package/presets/opencode/skills/php-pro/references/testing-quality.md +466 -0
  129. package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  130. package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
  131. package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
  132. package/presets/seo-hotel/settings.json +225 -0
  133. package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
  134. package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
  135. package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
  136. package/src/presets/manifests/agy.yml +38 -3
  137. package/src/presets/manifests/claude.yml +8 -2
  138. package/src/presets/manifests/codex.yml +3 -2
  139. package/src/presets/manifests/cursor.yml +3 -2
  140. package/src/presets/manifests/gemini.yml +3 -2
  141. package/src/presets/manifests/opencode.yml +7 -2
  142. package/src/presets/models/agy.yml +16 -0
  143. package/src/presets/models/opencode.yml +6 -6
package/dist/index.js CHANGED
@@ -77,24 +77,24 @@ var require_identity = __commonJS((exports) => {
77
77
  var SCALAR = Symbol.for("yaml.scalar");
78
78
  var SEQ = Symbol.for("yaml.seq");
79
79
  var NODE_TYPE = Symbol.for("yaml.node.type");
80
- var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
81
- var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
82
- var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
83
- var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
84
- var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
85
- var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
86
- function isCollection(node) {
87
- if (node && typeof node === "object")
88
- switch (node[NODE_TYPE]) {
80
+ var isAlias = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === ALIAS;
81
+ var isDocument = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === DOC;
82
+ var isMap = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === MAP;
83
+ var isPair = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === PAIR;
84
+ var isScalar = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SCALAR;
85
+ var isSeq = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SEQ;
86
+ function isCollection(node2) {
87
+ if (node2 && typeof node2 === "object")
88
+ switch (node2[NODE_TYPE]) {
89
89
  case MAP:
90
90
  case SEQ:
91
91
  return true;
92
92
  }
93
93
  return false;
94
94
  }
95
- function isNode(node) {
96
- if (node && typeof node === "object")
97
- switch (node[NODE_TYPE]) {
95
+ function isNode(node2) {
96
+ if (node2 && typeof node2 === "object")
97
+ switch (node2[NODE_TYPE]) {
98
98
  case ALIAS:
99
99
  case MAP:
100
100
  case SCALAR:
@@ -103,7 +103,7 @@ var require_identity = __commonJS((exports) => {
103
103
  }
104
104
  return false;
105
105
  }
106
- var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
106
+ var hasAnchor = (node2) => (isScalar(node2) || isCollection(node2)) && !!node2.anchor;
107
107
  exports.ALIAS = ALIAS;
108
108
  exports.DOC = DOC;
109
109
  exports.MAP = MAP;
@@ -128,98 +128,98 @@ var require_visit = __commonJS((exports) => {
128
128
  var BREAK = Symbol("break visit");
129
129
  var SKIP = Symbol("skip children");
130
130
  var REMOVE = Symbol("remove node");
131
- function visit(node, visitor) {
131
+ function visit(node2, visitor) {
132
132
  const visitor_ = initVisitor(visitor);
133
- if (identity.isDocument(node)) {
134
- const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
133
+ if (identity.isDocument(node2)) {
134
+ const cd = visit_(null, node2.contents, visitor_, Object.freeze([node2]));
135
135
  if (cd === REMOVE)
136
- node.contents = null;
136
+ node2.contents = null;
137
137
  } else
138
- visit_(null, node, visitor_, Object.freeze([]));
138
+ visit_(null, node2, visitor_, Object.freeze([]));
139
139
  }
140
140
  visit.BREAK = BREAK;
141
141
  visit.SKIP = SKIP;
142
142
  visit.REMOVE = REMOVE;
143
- function visit_(key, node, visitor, path) {
144
- const ctrl = callVisitor(key, node, visitor, path);
143
+ function visit_(key, node2, visitor, path) {
144
+ const ctrl = callVisitor(key, node2, visitor, path);
145
145
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
146
146
  replaceNode(key, path, ctrl);
147
147
  return visit_(key, ctrl, visitor, path);
148
148
  }
149
149
  if (typeof ctrl !== "symbol") {
150
- if (identity.isCollection(node)) {
151
- path = Object.freeze(path.concat(node));
152
- for (let i = 0;i < node.items.length; ++i) {
153
- const ci = visit_(i, node.items[i], visitor, path);
150
+ if (identity.isCollection(node2)) {
151
+ path = Object.freeze(path.concat(node2));
152
+ for (let i = 0;i < node2.items.length; ++i) {
153
+ const ci = visit_(i, node2.items[i], visitor, path);
154
154
  if (typeof ci === "number")
155
155
  i = ci - 1;
156
156
  else if (ci === BREAK)
157
157
  return BREAK;
158
158
  else if (ci === REMOVE) {
159
- node.items.splice(i, 1);
159
+ node2.items.splice(i, 1);
160
160
  i -= 1;
161
161
  }
162
162
  }
163
- } else if (identity.isPair(node)) {
164
- path = Object.freeze(path.concat(node));
165
- const ck = visit_("key", node.key, visitor, path);
163
+ } else if (identity.isPair(node2)) {
164
+ path = Object.freeze(path.concat(node2));
165
+ const ck = visit_("key", node2.key, visitor, path);
166
166
  if (ck === BREAK)
167
167
  return BREAK;
168
168
  else if (ck === REMOVE)
169
- node.key = null;
170
- const cv = visit_("value", node.value, visitor, path);
169
+ node2.key = null;
170
+ const cv = visit_("value", node2.value, visitor, path);
171
171
  if (cv === BREAK)
172
172
  return BREAK;
173
173
  else if (cv === REMOVE)
174
- node.value = null;
174
+ node2.value = null;
175
175
  }
176
176
  }
177
177
  return ctrl;
178
178
  }
179
- async function visitAsync(node, visitor) {
179
+ async function visitAsync(node2, visitor) {
180
180
  const visitor_ = initVisitor(visitor);
181
- if (identity.isDocument(node)) {
182
- const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
181
+ if (identity.isDocument(node2)) {
182
+ const cd = await visitAsync_(null, node2.contents, visitor_, Object.freeze([node2]));
183
183
  if (cd === REMOVE)
184
- node.contents = null;
184
+ node2.contents = null;
185
185
  } else
186
- await visitAsync_(null, node, visitor_, Object.freeze([]));
186
+ await visitAsync_(null, node2, visitor_, Object.freeze([]));
187
187
  }
188
188
  visitAsync.BREAK = BREAK;
189
189
  visitAsync.SKIP = SKIP;
190
190
  visitAsync.REMOVE = REMOVE;
191
- async function visitAsync_(key, node, visitor, path) {
192
- const ctrl = await callVisitor(key, node, visitor, path);
191
+ async function visitAsync_(key, node2, visitor, path) {
192
+ const ctrl = await callVisitor(key, node2, visitor, path);
193
193
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
194
194
  replaceNode(key, path, ctrl);
195
195
  return visitAsync_(key, ctrl, visitor, path);
196
196
  }
197
197
  if (typeof ctrl !== "symbol") {
198
- if (identity.isCollection(node)) {
199
- path = Object.freeze(path.concat(node));
200
- for (let i = 0;i < node.items.length; ++i) {
201
- const ci = await visitAsync_(i, node.items[i], visitor, path);
198
+ if (identity.isCollection(node2)) {
199
+ path = Object.freeze(path.concat(node2));
200
+ for (let i = 0;i < node2.items.length; ++i) {
201
+ const ci = await visitAsync_(i, node2.items[i], visitor, path);
202
202
  if (typeof ci === "number")
203
203
  i = ci - 1;
204
204
  else if (ci === BREAK)
205
205
  return BREAK;
206
206
  else if (ci === REMOVE) {
207
- node.items.splice(i, 1);
207
+ node2.items.splice(i, 1);
208
208
  i -= 1;
209
209
  }
210
210
  }
211
- } else if (identity.isPair(node)) {
212
- path = Object.freeze(path.concat(node));
213
- const ck = await visitAsync_("key", node.key, visitor, path);
211
+ } else if (identity.isPair(node2)) {
212
+ path = Object.freeze(path.concat(node2));
213
+ const ck = await visitAsync_("key", node2.key, visitor, path);
214
214
  if (ck === BREAK)
215
215
  return BREAK;
216
216
  else if (ck === REMOVE)
217
- node.key = null;
218
- const cv = await visitAsync_("value", node.value, visitor, path);
217
+ node2.key = null;
218
+ const cv = await visitAsync_("value", node2.value, visitor, path);
219
219
  if (cv === BREAK)
220
220
  return BREAK;
221
221
  else if (cv === REMOVE)
222
- node.value = null;
222
+ node2.value = null;
223
223
  }
224
224
  }
225
225
  return ctrl;
@@ -242,32 +242,32 @@ var require_visit = __commonJS((exports) => {
242
242
  }
243
243
  return visitor;
244
244
  }
245
- function callVisitor(key, node, visitor, path) {
245
+ function callVisitor(key, node2, visitor, path) {
246
246
  if (typeof visitor === "function")
247
- return visitor(key, node, path);
248
- if (identity.isMap(node))
249
- return visitor.Map?.(key, node, path);
250
- if (identity.isSeq(node))
251
- return visitor.Seq?.(key, node, path);
252
- if (identity.isPair(node))
253
- return visitor.Pair?.(key, node, path);
254
- if (identity.isScalar(node))
255
- return visitor.Scalar?.(key, node, path);
256
- if (identity.isAlias(node))
257
- return visitor.Alias?.(key, node, path);
247
+ return visitor(key, node2, path);
248
+ if (identity.isMap(node2))
249
+ return visitor.Map?.(key, node2, path);
250
+ if (identity.isSeq(node2))
251
+ return visitor.Seq?.(key, node2, path);
252
+ if (identity.isPair(node2))
253
+ return visitor.Pair?.(key, node2, path);
254
+ if (identity.isScalar(node2))
255
+ return visitor.Scalar?.(key, node2, path);
256
+ if (identity.isAlias(node2))
257
+ return visitor.Alias?.(key, node2, path);
258
258
  return;
259
259
  }
260
- function replaceNode(key, path, node) {
260
+ function replaceNode(key, path, node2) {
261
261
  const parent = path[path.length - 1];
262
262
  if (identity.isCollection(parent)) {
263
- parent.items[key] = node;
263
+ parent.items[key] = node2;
264
264
  } else if (identity.isPair(parent)) {
265
265
  if (key === "key")
266
- parent.key = node;
266
+ parent.key = node2;
267
267
  else
268
- parent.value = node;
268
+ parent.value = node2;
269
269
  } else if (identity.isDocument(parent)) {
270
- parent.contents = node;
270
+ parent.contents = node2;
271
271
  } else {
272
272
  const pt = identity.isAlias(parent) ? "alias" : "scalar";
273
273
  throw new Error(`Cannot replace node with ${pt} parent`);
@@ -407,9 +407,9 @@ var require_directives = __commonJS((exports) => {
407
407
  let tagNames;
408
408
  if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {
409
409
  const tags = {};
410
- visit.visit(doc.contents, (_key, node) => {
411
- if (identity.isNode(node) && node.tag)
412
- tags[node.tag] = true;
410
+ visit.visit(doc.contents, (_key, node2) => {
411
+ if (identity.isNode(node2) && node2.tag)
412
+ tags[node2.tag] = true;
413
413
  });
414
414
  tagNames = Object.keys(tags);
415
415
  } else
@@ -444,9 +444,9 @@ var require_anchors = __commonJS((exports) => {
444
444
  function anchorNames(root) {
445
445
  const anchors = new Set;
446
446
  visit.visit(root, {
447
- Value(_key, node) {
448
- if (node.anchor)
449
- anchors.add(node.anchor);
447
+ Value(_key, node2) {
448
+ if (node2.anchor)
449
+ anchors.add(node2.anchor);
450
450
  }
451
451
  });
452
452
  return anchors;
@@ -629,20 +629,20 @@ var require_Alias = __commonJS((exports) => {
629
629
  } else {
630
630
  nodes = [];
631
631
  visit.visit(doc, {
632
- Node: (_key, node) => {
633
- if (identity.isAlias(node) || identity.hasAnchor(node))
634
- nodes.push(node);
632
+ Node: (_key, node2) => {
633
+ if (identity.isAlias(node2) || identity.hasAnchor(node2))
634
+ nodes.push(node2);
635
635
  }
636
636
  });
637
637
  if (ctx)
638
638
  ctx.aliasResolveCache = nodes;
639
639
  }
640
640
  let found = undefined;
641
- for (const node of nodes) {
642
- if (node === this)
641
+ for (const node2 of nodes) {
642
+ if (node2 === this)
643
643
  break;
644
- if (node.anchor === this.source)
645
- found = node;
644
+ if (node2.anchor === this.source)
645
+ found = node2;
646
646
  }
647
647
  return found;
648
648
  }
@@ -689,22 +689,22 @@ var require_Alias = __commonJS((exports) => {
689
689
  return src;
690
690
  }
691
691
  }
692
- function getAliasCount(doc, node, anchors2) {
693
- if (identity.isAlias(node)) {
694
- const source = node.resolve(doc);
692
+ function getAliasCount(doc, node2, anchors2) {
693
+ if (identity.isAlias(node2)) {
694
+ const source = node2.resolve(doc);
695
695
  const anchor = anchors2 && source && anchors2.get(source);
696
696
  return anchor ? anchor.count * anchor.aliasCount : 0;
697
- } else if (identity.isCollection(node)) {
697
+ } else if (identity.isCollection(node2)) {
698
698
  let count = 0;
699
- for (const item of node.items) {
699
+ for (const item of node2.items) {
700
700
  const c = getAliasCount(doc, item, anchors2);
701
701
  if (c > count)
702
702
  count = c;
703
703
  }
704
704
  return count;
705
- } else if (identity.isPair(node)) {
706
- const kc = getAliasCount(doc, node.key, anchors2);
707
- const vc = getAliasCount(doc, node.value, anchors2);
705
+ } else if (identity.isPair(node2)) {
706
+ const kc = getAliasCount(doc, node2.key, anchors2);
707
+ const vc = getAliasCount(doc, node2.value, anchors2);
708
708
  return Math.max(kc, vc);
709
709
  }
710
710
  return 1;
@@ -789,10 +789,10 @@ var require_createNode = __commonJS((exports) => {
789
789
  value = value.toJSON();
790
790
  }
791
791
  if (!value || typeof value !== "object") {
792
- const node2 = new Scalar.Scalar(value);
792
+ const node3 = new Scalar.Scalar(value);
793
793
  if (ref)
794
- ref.node = node2;
795
- return node2;
794
+ ref.node = node3;
795
+ return node3;
796
796
  }
797
797
  tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
798
798
  }
@@ -800,14 +800,14 @@ var require_createNode = __commonJS((exports) => {
800
800
  onTagObj(tagObj);
801
801
  delete ctx.onTagObj;
802
802
  }
803
- const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value);
803
+ const node2 = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value);
804
804
  if (tagName)
805
- node.tag = tagName;
805
+ node2.tag = tagName;
806
806
  else if (!tagObj.default)
807
- node.tag = tagObj.tag;
807
+ node2.tag = tagObj.tag;
808
808
  if (ref)
809
- ref.node = node;
810
- return node;
809
+ ref.node = node2;
810
+ return node2;
811
811
  }
812
812
  exports.createNode = createNode;
813
813
  });
@@ -865,10 +865,10 @@ var require_Collection = __commonJS((exports) => {
865
865
  this.add(value);
866
866
  else {
867
867
  const [key, ...rest] = path;
868
- const node = this.get(key, true);
869
- if (identity.isCollection(node))
870
- node.addIn(rest, value);
871
- else if (node === undefined && this.schema)
868
+ const node2 = this.get(key, true);
869
+ if (identity.isCollection(node2))
870
+ node2.addIn(rest, value);
871
+ else if (node2 === undefined && this.schema)
872
872
  this.set(key, collectionFromPath(this.schema, rest, value));
873
873
  else
874
874
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
@@ -878,25 +878,25 @@ var require_Collection = __commonJS((exports) => {
878
878
  const [key, ...rest] = path;
879
879
  if (rest.length === 0)
880
880
  return this.delete(key);
881
- const node = this.get(key, true);
882
- if (identity.isCollection(node))
883
- return node.deleteIn(rest);
881
+ const node2 = this.get(key, true);
882
+ if (identity.isCollection(node2))
883
+ return node2.deleteIn(rest);
884
884
  else
885
885
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
886
886
  }
887
887
  getIn(path, keepScalar) {
888
888
  const [key, ...rest] = path;
889
- const node = this.get(key, true);
889
+ const node2 = this.get(key, true);
890
890
  if (rest.length === 0)
891
- return !keepScalar && identity.isScalar(node) ? node.value : node;
891
+ return !keepScalar && identity.isScalar(node2) ? node2.value : node2;
892
892
  else
893
- return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;
893
+ return identity.isCollection(node2) ? node2.getIn(rest, keepScalar) : undefined;
894
894
  }
895
895
  hasAllNullValues(allowScalar) {
896
- return this.items.every((node) => {
897
- if (!identity.isPair(node))
896
+ return this.items.every((node2) => {
897
+ if (!identity.isPair(node2))
898
898
  return false;
899
- const n = node.value;
899
+ const n = node2.value;
900
900
  return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
901
901
  });
902
902
  }
@@ -904,18 +904,18 @@ var require_Collection = __commonJS((exports) => {
904
904
  const [key, ...rest] = path;
905
905
  if (rest.length === 0)
906
906
  return this.has(key);
907
- const node = this.get(key, true);
908
- return identity.isCollection(node) ? node.hasIn(rest) : false;
907
+ const node2 = this.get(key, true);
908
+ return identity.isCollection(node2) ? node2.hasIn(rest) : false;
909
909
  }
910
910
  setIn(path, value) {
911
911
  const [key, ...rest] = path;
912
912
  if (rest.length === 0) {
913
913
  this.set(key, value);
914
914
  } else {
915
- const node = this.get(key, true);
916
- if (identity.isCollection(node))
917
- node.setIn(rest, value);
918
- else if (node === undefined && this.schema)
915
+ const node2 = this.get(key, true);
916
+ if (identity.isCollection(node2))
917
+ node2.setIn(rest, value);
918
+ else if (node2 === undefined && this.schema)
919
919
  this.set(key, collectionFromPath(this.schema, rest, value));
920
920
  else
921
921
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
@@ -1454,16 +1454,16 @@ var require_stringify = __commonJS((exports) => {
1454
1454
  }
1455
1455
  return tagObj;
1456
1456
  }
1457
- function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {
1457
+ function stringifyProps(node2, tagObj, { anchors: anchors$1, doc }) {
1458
1458
  if (!doc.directives)
1459
1459
  return "";
1460
1460
  const props = [];
1461
- const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;
1461
+ const anchor = (identity.isScalar(node2) || identity.isCollection(node2)) && node2.anchor;
1462
1462
  if (anchor && anchors.anchorIsValid(anchor)) {
1463
1463
  anchors$1.add(anchor);
1464
1464
  props.push(`&${anchor}`);
1465
1465
  }
1466
- const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
1466
+ const tag = node2.tag ?? (tagObj.default ? null : tagObj.tag);
1467
1467
  if (tag)
1468
1468
  props.push(doc.directives.tagString(tag));
1469
1469
  return props.join(" ");
@@ -1485,15 +1485,15 @@ var require_stringify = __commonJS((exports) => {
1485
1485
  }
1486
1486
  }
1487
1487
  let tagObj = undefined;
1488
- const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
1489
- tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
1490
- const props = stringifyProps(node, tagObj, ctx);
1488
+ const node2 = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
1489
+ tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node2));
1490
+ const props = stringifyProps(node2, tagObj, ctx);
1491
1491
  if (props.length > 0)
1492
1492
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
1493
- const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
1493
+ const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node2, ctx, onComment, onChompKeep) : identity.isScalar(node2) ? stringifyString.stringifyString(node2, ctx, onComment, onChompKeep) : node2.toString(ctx, onComment, onChompKeep);
1494
1494
  if (!props)
1495
1495
  return str;
1496
- return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
1496
+ return identity.isScalar(node2) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
1497
1497
  ${ctx.indent}${str}`;
1498
1498
  }
1499
1499
  exports.createStringifyContext = createStringifyContext;
@@ -1754,8 +1754,8 @@ var require_addPairToJSMap = __commonJS((exports) => {
1754
1754
  if (identity.isNode(key) && ctx?.doc) {
1755
1755
  const strCtx = stringify.createStringifyContext(ctx.doc, {});
1756
1756
  strCtx.anchors = new Set;
1757
- for (const node of ctx.anchors.keys())
1758
- strCtx.anchors.add(node.anchor);
1757
+ for (const node2 of ctx.anchors.keys())
1758
+ strCtx.anchors.add(node2.anchor);
1759
1759
  strCtx.inFlow = true;
1760
1760
  strCtx.inStringifyKey = true;
1761
1761
  const strKey = key.toString(strCtx);
@@ -2051,8 +2051,8 @@ var require_YAMLMap = __commonJS((exports) => {
2051
2051
  }
2052
2052
  get(key, keepScalar) {
2053
2053
  const it = findPair(this.items, key);
2054
- const node = it?.value;
2055
- return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;
2054
+ const node2 = it?.value;
2055
+ return (!keepScalar && identity.isScalar(node2) ? node2.value : node2) ?? undefined;
2056
2056
  }
2057
2057
  has(key) {
2058
2058
  return !!findPair(this.items, key);
@@ -2316,9 +2316,9 @@ var require_float = __commonJS((exports) => {
2316
2316
  format: "EXP",
2317
2317
  test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
2318
2318
  resolve: (str) => parseFloat(str),
2319
- stringify(node) {
2320
- const num = Number(node.value);
2321
- return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
2319
+ stringify(node2) {
2320
+ const num = Number(node2.value);
2321
+ return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2);
2322
2322
  }
2323
2323
  };
2324
2324
  var float = {
@@ -2327,11 +2327,11 @@ var require_float = __commonJS((exports) => {
2327
2327
  tag: "tag:yaml.org,2002:float",
2328
2328
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
2329
2329
  resolve(str) {
2330
- const node = new Scalar.Scalar(parseFloat(str));
2330
+ const node2 = new Scalar.Scalar(parseFloat(str));
2331
2331
  const dot = str.indexOf(".");
2332
2332
  if (dot !== -1 && str[str.length - 1] === "0")
2333
- node.minFractionDigits = str.length - dot - 1;
2334
- return node;
2333
+ node2.minFractionDigits = str.length - dot - 1;
2334
+ return node2;
2335
2335
  },
2336
2336
  stringify: stringifyNumber.stringifyNumber
2337
2337
  };
@@ -2345,11 +2345,11 @@ var require_int = __commonJS((exports) => {
2345
2345
  var stringifyNumber = require_stringifyNumber();
2346
2346
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
2347
2347
  var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
2348
- function intStringify(node, radix, prefix) {
2349
- const { value } = node;
2348
+ function intStringify(node2, radix, prefix) {
2349
+ const { value } = node2;
2350
2350
  if (intIdentify(value) && value >= 0)
2351
2351
  return prefix + value.toString(radix);
2352
- return stringifyNumber.stringifyNumber(node);
2352
+ return stringifyNumber.stringifyNumber(node2);
2353
2353
  }
2354
2354
  var intOct = {
2355
2355
  identify: (value) => intIdentify(value) && value >= 0,
@@ -2358,7 +2358,7 @@ var require_int = __commonJS((exports) => {
2358
2358
  format: "OCT",
2359
2359
  test: /^0o[0-7]+$/,
2360
2360
  resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),
2361
- stringify: (node) => intStringify(node, 8, "0o")
2361
+ stringify: (node2) => intStringify(node2, 8, "0o")
2362
2362
  };
2363
2363
  var int = {
2364
2364
  identify: intIdentify,
@@ -2375,7 +2375,7 @@ var require_int = __commonJS((exports) => {
2375
2375
  format: "HEX",
2376
2376
  test: /^0x[0-9a-fA-F]+$/,
2377
2377
  resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
2378
- stringify: (node) => intStringify(node, 16, "0x")
2378
+ stringify: (node2) => intStringify(node2, 16, "0x")
2379
2379
  };
2380
2380
  exports.int = int;
2381
2381
  exports.intHex = intHex;
@@ -2721,9 +2721,9 @@ var require_float2 = __commonJS((exports) => {
2721
2721
  format: "EXP",
2722
2722
  test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
2723
2723
  resolve: (str) => parseFloat(str.replace(/_/g, "")),
2724
- stringify(node) {
2725
- const num = Number(node.value);
2726
- return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
2724
+ stringify(node2) {
2725
+ const num = Number(node2.value);
2726
+ return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2);
2727
2727
  }
2728
2728
  };
2729
2729
  var float = {
@@ -2732,14 +2732,14 @@ var require_float2 = __commonJS((exports) => {
2732
2732
  tag: "tag:yaml.org,2002:float",
2733
2733
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
2734
2734
  resolve(str) {
2735
- const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
2735
+ const node2 = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
2736
2736
  const dot = str.indexOf(".");
2737
2737
  if (dot !== -1) {
2738
2738
  const f = str.substring(dot + 1).replace(/_/g, "");
2739
2739
  if (f[f.length - 1] === "0")
2740
- node.minFractionDigits = f.length;
2740
+ node2.minFractionDigits = f.length;
2741
2741
  }
2742
- return node;
2742
+ return node2;
2743
2743
  },
2744
2744
  stringify: stringifyNumber.stringifyNumber
2745
2745
  };
@@ -2775,13 +2775,13 @@ var require_int2 = __commonJS((exports) => {
2775
2775
  const n = parseInt(str, radix);
2776
2776
  return sign === "-" ? -1 * n : n;
2777
2777
  }
2778
- function intStringify(node, radix, prefix) {
2779
- const { value } = node;
2778
+ function intStringify(node2, radix, prefix) {
2779
+ const { value } = node2;
2780
2780
  if (intIdentify(value)) {
2781
2781
  const str = value.toString(radix);
2782
2782
  return value < 0 ? "-" + prefix + str.substr(1) : prefix + str;
2783
2783
  }
2784
- return stringifyNumber.stringifyNumber(node);
2784
+ return stringifyNumber.stringifyNumber(node2);
2785
2785
  }
2786
2786
  var intBin = {
2787
2787
  identify: intIdentify,
@@ -2790,7 +2790,7 @@ var require_int2 = __commonJS((exports) => {
2790
2790
  format: "BIN",
2791
2791
  test: /^[-+]?0b[0-1_]+$/,
2792
2792
  resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),
2793
- stringify: (node) => intStringify(node, 2, "0b")
2793
+ stringify: (node2) => intStringify(node2, 2, "0b")
2794
2794
  };
2795
2795
  var intOct = {
2796
2796
  identify: intIdentify,
@@ -2799,7 +2799,7 @@ var require_int2 = __commonJS((exports) => {
2799
2799
  format: "OCT",
2800
2800
  test: /^[-+]?0[0-7_]+$/,
2801
2801
  resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),
2802
- stringify: (node) => intStringify(node, 8, "0")
2802
+ stringify: (node2) => intStringify(node2, 8, "0")
2803
2803
  };
2804
2804
  var int = {
2805
2805
  identify: intIdentify,
@@ -2816,7 +2816,7 @@ var require_int2 = __commonJS((exports) => {
2816
2816
  format: "HEX",
2817
2817
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
2818
2818
  resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
2819
- stringify: (node) => intStringify(node, 16, "0x")
2819
+ stringify: (node2) => intStringify(node2, 16, "0x")
2820
2820
  };
2821
2821
  exports.int = int;
2822
2822
  exports.intBin = intBin;
@@ -2917,13 +2917,13 @@ var require_timestamp = __commonJS((exports) => {
2917
2917
  const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
2918
2918
  return sign === "-" ? num(-1) * res : res;
2919
2919
  }
2920
- function stringifySexagesimal(node) {
2921
- let { value } = node;
2920
+ function stringifySexagesimal(node2) {
2921
+ let { value } = node2;
2922
2922
  let num = (n) => n;
2923
2923
  if (typeof value === "bigint")
2924
2924
  num = (n) => BigInt(n);
2925
2925
  else if (isNaN(value) || !isFinite(value))
2926
- return stringifyNumber.stringifyNumber(node);
2926
+ return stringifyNumber.stringifyNumber(node2);
2927
2927
  let sign = "";
2928
2928
  if (value < 0) {
2929
2929
  sign = "-";
@@ -3305,12 +3305,12 @@ var require_Document = __commonJS((exports) => {
3305
3305
  if (assertCollection(this.contents))
3306
3306
  this.contents.addIn(path, value);
3307
3307
  }
3308
- createAlias(node, name) {
3309
- if (!node.anchor) {
3308
+ createAlias(node2, name) {
3309
+ if (!node2.anchor) {
3310
3310
  const prev = anchors.anchorNames(this);
3311
- node.anchor = !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
3311
+ node2.anchor = !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
3312
3312
  }
3313
- return new Alias.Alias(node.anchor);
3313
+ return new Alias.Alias(node2.anchor);
3314
3314
  }
3315
3315
  createNode(value, replacer, options) {
3316
3316
  let _replacer = undefined;
@@ -3338,11 +3338,11 @@ var require_Document = __commonJS((exports) => {
3338
3338
  schema: this.schema,
3339
3339
  sourceObjects
3340
3340
  };
3341
- const node = createNode.createNode(value, tag, ctx);
3342
- if (flow && identity.isCollection(node))
3343
- node.flow = true;
3341
+ const node2 = createNode.createNode(value, tag, ctx);
3342
+ if (flow && identity.isCollection(node2))
3343
+ node2.flow = true;
3344
3344
  setAnchors();
3345
- return node;
3345
+ return node2;
3346
3346
  }
3347
3347
  createPair(key, value, options = {}) {
3348
3348
  const k = this.createNode(key, null, options);
@@ -3872,11 +3872,11 @@ var require_resolve_block_seq = __commonJS((exports) => {
3872
3872
  continue;
3873
3873
  }
3874
3874
  }
3875
- const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
3875
+ const node2 = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
3876
3876
  if (ctx.schema.compat)
3877
3877
  utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
3878
- offset = node.range[2];
3879
- seq.items.push(node);
3878
+ offset = node2.range[2];
3879
+ seq.items.push(node2);
3880
3880
  }
3881
3881
  seq.range = [bs.offset, offset, commentEnd ?? offset];
3882
3882
  return seq;
@@ -4167,12 +4167,12 @@ var require_compose_collection = __commonJS((exports) => {
4167
4167
  }
4168
4168
  const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
4169
4169
  const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
4170
- const node = identity.isNode(res) ? res : new Scalar.Scalar(res);
4171
- node.range = coll.range;
4172
- node.tag = tagName;
4170
+ const node2 = identity.isNode(res) ? res : new Scalar.Scalar(res);
4171
+ node2.range = coll.range;
4172
+ node2.tag = tagName;
4173
4173
  if (tag?.format)
4174
- node.format = tag.format;
4175
- return node;
4174
+ node2.format = tag.format;
4175
+ return node2;
4176
4176
  }
4177
4177
  exports.composeCollection = composeCollection;
4178
4178
  });
@@ -4704,11 +4704,11 @@ var require_compose_node = __commonJS((exports) => {
4704
4704
  function composeNode(ctx, token, props, onError) {
4705
4705
  const atKey = ctx.atKey;
4706
4706
  const { spaceBefore, comment, anchor, tag } = props;
4707
- let node;
4707
+ let node2;
4708
4708
  let isSrcToken = true;
4709
4709
  switch (token.type) {
4710
4710
  case "alias":
4711
- node = composeAlias(ctx, token, onError);
4711
+ node2 = composeAlias(ctx, token, onError);
4712
4712
  if (anchor || tag)
4713
4713
  onError(token, "ALIAS_PROPS", "An alias node must not specify any properties");
4714
4714
  break;
@@ -4716,17 +4716,17 @@ var require_compose_node = __commonJS((exports) => {
4716
4716
  case "single-quoted-scalar":
4717
4717
  case "double-quoted-scalar":
4718
4718
  case "block-scalar":
4719
- node = composeScalar.composeScalar(ctx, token, tag, onError);
4719
+ node2 = composeScalar.composeScalar(ctx, token, tag, onError);
4720
4720
  if (anchor)
4721
- node.anchor = anchor.source.substring(1);
4721
+ node2.anchor = anchor.source.substring(1);
4722
4722
  break;
4723
4723
  case "block-map":
4724
4724
  case "block-seq":
4725
4725
  case "flow-collection":
4726
4726
  try {
4727
- node = composeCollection.composeCollection(CN, ctx, token, props, onError);
4727
+ node2 = composeCollection.composeCollection(CN, ctx, token, props, onError);
4728
4728
  if (anchor)
4729
- node.anchor = anchor.source.substring(1);
4729
+ node2.anchor = anchor.source.substring(1);
4730
4730
  } catch (error) {
4731
4731
  const message = error instanceof Error ? error.message : String(error);
4732
4732
  onError(token, "RESOURCE_EXHAUSTION", message);
@@ -4738,24 +4738,24 @@ var require_compose_node = __commonJS((exports) => {
4738
4738
  isSrcToken = false;
4739
4739
  }
4740
4740
  }
4741
- node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
4742
- if (anchor && node.anchor === "")
4741
+ node2 ?? (node2 = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
4742
+ if (anchor && node2.anchor === "")
4743
4743
  onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
4744
- if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
4744
+ if (atKey && ctx.options.stringKeys && (!identity.isScalar(node2) || typeof node2.value !== "string" || node2.tag && node2.tag !== "tag:yaml.org,2002:str")) {
4745
4745
  const msg = "With stringKeys, all keys must be strings";
4746
4746
  onError(tag ?? token, "NON_STRING_KEY", msg);
4747
4747
  }
4748
4748
  if (spaceBefore)
4749
- node.spaceBefore = true;
4749
+ node2.spaceBefore = true;
4750
4750
  if (comment) {
4751
4751
  if (token.type === "scalar" && token.source === "")
4752
- node.comment = comment;
4752
+ node2.comment = comment;
4753
4753
  else
4754
- node.commentBefore = comment;
4754
+ node2.commentBefore = comment;
4755
4755
  }
4756
4756
  if (ctx.options.keepSourceTokens && isSrcToken)
4757
- node.srcToken = token;
4758
- return node;
4757
+ node2.srcToken = token;
4758
+ return node2;
4759
4759
  }
4760
4760
  function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
4761
4761
  const token = {
@@ -4764,19 +4764,19 @@ var require_compose_node = __commonJS((exports) => {
4764
4764
  indent: -1,
4765
4765
  source: ""
4766
4766
  };
4767
- const node = composeScalar.composeScalar(ctx, token, tag, onError);
4767
+ const node2 = composeScalar.composeScalar(ctx, token, tag, onError);
4768
4768
  if (anchor) {
4769
- node.anchor = anchor.source.substring(1);
4770
- if (node.anchor === "")
4769
+ node2.anchor = anchor.source.substring(1);
4770
+ if (node2.anchor === "")
4771
4771
  onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
4772
4772
  }
4773
4773
  if (spaceBefore)
4774
- node.spaceBefore = true;
4774
+ node2.spaceBefore = true;
4775
4775
  if (comment) {
4776
- node.comment = comment;
4777
- node.range[2] = end;
4776
+ node2.comment = comment;
4777
+ node2.range[2] = end;
4778
4778
  }
4779
- return node;
4779
+ return node2;
4780
4780
  }
4781
4781
  function composeAlias({ options }, { offset, source, end }, onError) {
4782
4782
  const alias = new Alias.Alias(source.substring(1));
@@ -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.3.0",
7048
7048
  description: "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
7049
7049
  keywords: [
7050
7050
  "ai",
@@ -7098,6 +7098,230 @@ var package_default = {
7098
7098
  }
7099
7099
  };
7100
7100
 
7101
+ // src/core/detection/detectors/node.ts
7102
+ async function detectNode(rootDir) {
7103
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7104
+ const signals = [];
7105
+ if (await fileExists2(rootDir, "package.json")) {
7106
+ signals.push("package.json");
7107
+ }
7108
+ if (await fileExists2(rootDir, "node_modules")) {
7109
+ signals.push("node_modules/");
7110
+ }
7111
+ return signals;
7112
+ }
7113
+ async function detectBun(rootDir) {
7114
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7115
+ const signals = [];
7116
+ if (await fileExists2(rootDir, "bun.lockb")) {
7117
+ signals.push("bun.lockb");
7118
+ }
7119
+ if (await fileExists2(rootDir, "bun.lock")) {
7120
+ signals.push("bun.lock");
7121
+ }
7122
+ return signals;
7123
+ }
7124
+ // src/core/detection/detectors/backend.ts
7125
+ async function detectSpring(rootDir) {
7126
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7127
+ const signals = [];
7128
+ if (await fileExists2(rootDir, "build.gradle") || await fileExists2(rootDir, "build.gradle.kts")) {
7129
+ signals.push("build.gradle");
7130
+ }
7131
+ if (await fileExists2(rootDir, "pom.xml")) {
7132
+ signals.push("pom.xml");
7133
+ }
7134
+ return signals;
7135
+ }
7136
+ async function detectDjango(rootDir) {
7137
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7138
+ const signals = [];
7139
+ if (await fileExists2(rootDir, "manage.py")) {
7140
+ signals.push("manage.py");
7141
+ }
7142
+ if (await fileExists2(rootDir, "requirements.txt")) {
7143
+ signals.push("requirements.txt");
7144
+ }
7145
+ return signals;
7146
+ }
7147
+ async function detectFastApi(rootDir) {
7148
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7149
+ const { join } = await import("node:path");
7150
+ const { readFile } = await import("node:fs/promises");
7151
+ const signals = [];
7152
+ if (await fileExists2(rootDir, "requirements.txt")) {
7153
+ try {
7154
+ const content = await readFile(join(rootDir, "requirements.txt"), "utf-8");
7155
+ if (content.includes("fastapi")) {
7156
+ signals.push("fastapi-requirements");
7157
+ }
7158
+ } catch {}
7159
+ }
7160
+ if (await fileExists2(rootDir, "pyproject.toml")) {
7161
+ try {
7162
+ const content = await readFile(join(rootDir, "pyproject.toml"), "utf-8");
7163
+ if (content.includes("fastapi")) {
7164
+ signals.push("fastapi-pyproject");
7165
+ }
7166
+ } catch {}
7167
+ }
7168
+ for (const filename of ["main.py", "app.py", "app/main.py", "app/app.py"]) {
7169
+ if (await fileExists2(rootDir, filename)) {
7170
+ try {
7171
+ const content = await readFile(join(rootDir, filename), "utf-8");
7172
+ if (content.includes("FastAPI") && content.includes("fastapi")) {
7173
+ signals.push(`${filename}-fastapi`);
7174
+ }
7175
+ } catch {}
7176
+ }
7177
+ }
7178
+ return signals;
7179
+ }
7180
+ async function detectPhp(rootDir) {
7181
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7182
+ const signals = [];
7183
+ if (await fileExists2(rootDir, "composer.json")) {
7184
+ signals.push("composer.json");
7185
+ }
7186
+ if (await fileExists2(rootDir, "artisan")) {
7187
+ signals.push("artisan");
7188
+ }
7189
+ try {
7190
+ const { readdir } = await import("node:fs/promises");
7191
+ const entries = await readdir(rootDir, { withFileTypes: true });
7192
+ const hasPhpFiles = entries.some((entry) => entry.isFile() && entry.name.endsWith(".php"));
7193
+ if (hasPhpFiles) {
7194
+ signals.push("*.php");
7195
+ }
7196
+ } catch {}
7197
+ return signals;
7198
+ }
7199
+ async function detectGenericBackend(rootDir) {
7200
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7201
+ const { readdir } = await import("node:fs/promises");
7202
+ const signals = [];
7203
+ if (await fileExists2(rootDir, "go.mod")) {
7204
+ signals.push("go.mod");
7205
+ }
7206
+ if (await fileExists2(rootDir, "Cargo.toml")) {
7207
+ signals.push("Cargo.toml");
7208
+ }
7209
+ if (await fileExists2(rootDir, "Gemfile")) {
7210
+ signals.push("Gemfile");
7211
+ }
7212
+ try {
7213
+ const entries = await readdir(rootDir, { withFileTypes: true });
7214
+ const hasCsProj = entries.some((entry) => entry.isFile() && entry.name.endsWith(".csproj"));
7215
+ if (hasCsProj) {
7216
+ signals.push("*.csproj");
7217
+ }
7218
+ } catch {}
7219
+ return signals;
7220
+ }
7221
+ // src/core/detection/detectors/frontend.ts
7222
+ async function detectAstro(rootDir) {
7223
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7224
+ const signals = [];
7225
+ if (await fileExists2(rootDir, "astro.config.mjs") || await fileExists2(rootDir, "astro.config.ts")) {
7226
+ signals.push("astro.config");
7227
+ }
7228
+ return signals;
7229
+ }
7230
+ async function detectNext(rootDir) {
7231
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7232
+ const { join } = await import("node:path");
7233
+ const { readFile } = await import("node:fs/promises");
7234
+ const signals = [];
7235
+ if (await fileExists2(rootDir, "next.config.js") || await fileExists2(rootDir, "next.config.mjs") || await fileExists2(rootDir, "next.config.ts")) {
7236
+ signals.push("next.config");
7237
+ }
7238
+ if (await fileExists2(rootDir, "package.json")) {
7239
+ try {
7240
+ const content = await readFile(join(rootDir, "package.json"), "utf-8");
7241
+ const pkg = JSON.parse(content);
7242
+ if (pkg.dependencies?.next || pkg.devDependencies?.next) {
7243
+ signals.push("package.json-next");
7244
+ }
7245
+ } catch {}
7246
+ }
7247
+ return signals;
7248
+ }
7249
+ async function detectGenericFrontend(rootDir) {
7250
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7251
+ const { join } = await import("node:path");
7252
+ const { readFile } = await import("node:fs/promises");
7253
+ const signals = [];
7254
+ if (await fileExists2(rootDir, "index.html")) {
7255
+ signals.push("index.html");
7256
+ }
7257
+ if (await fileExists2(rootDir, "vite.config.js") || await fileExists2(rootDir, "vite.config.ts")) {
7258
+ signals.push("vite.config");
7259
+ }
7260
+ if (await fileExists2(rootDir, "webpack.config.js")) {
7261
+ signals.push("webpack.config.js");
7262
+ }
7263
+ if (await fileExists2(rootDir, "package.json")) {
7264
+ try {
7265
+ const content = await readFile(join(rootDir, "package.json"), "utf-8");
7266
+ const pkg = JSON.parse(content);
7267
+ const frontendDeps = ["react", "vue", "svelte", "solid-js", "angular", "@angular/core"];
7268
+ const hasFrontendDep = frontendDeps.some((dep) => pkg.dependencies?.[dep] || pkg.devDependencies?.[dep]);
7269
+ if (hasFrontendDep) {
7270
+ signals.push("package.json-frontend");
7271
+ }
7272
+ } catch {}
7273
+ }
7274
+ return signals;
7275
+ }
7276
+ // src/core/detection/detectors/monorepo.ts
7277
+ async function detectMonorepo(rootDir) {
7278
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7279
+ const { join } = await import("node:path");
7280
+ const { readFile } = await import("node:fs/promises");
7281
+ const signals = [];
7282
+ if (await fileExists2(rootDir, "pnpm-workspace.yaml")) {
7283
+ signals.push("pnpm-workspace.yaml");
7284
+ }
7285
+ if (await fileExists2(rootDir, "lerna.json")) {
7286
+ signals.push("lerna.json");
7287
+ }
7288
+ if (await fileExists2(rootDir, "go.work")) {
7289
+ signals.push("go.work");
7290
+ }
7291
+ if (await fileExists2(rootDir, "package.json")) {
7292
+ try {
7293
+ const content = await readFile(join(rootDir, "package.json"), "utf-8");
7294
+ const pkg = JSON.parse(content);
7295
+ if (pkg.workspaces) {
7296
+ signals.push("package.json-workspaces");
7297
+ }
7298
+ } catch {}
7299
+ }
7300
+ if (await fileExists2(rootDir, "Cargo.toml")) {
7301
+ try {
7302
+ const content = await readFile(join(rootDir, "Cargo.toml"), "utf-8");
7303
+ if (content.includes("[workspace]")) {
7304
+ signals.push("Cargo.toml-workspace");
7305
+ }
7306
+ } catch {}
7307
+ }
7308
+ return signals;
7309
+ }
7310
+ // src/core/detection/detectors/android.ts
7311
+ async function detectAndroid(rootDir) {
7312
+ const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7313
+ const signals = [];
7314
+ if (await fileExists2(rootDir, "AndroidManifest.xml") || await fileExists2(rootDir, "app/src/main/AndroidManifest.xml")) {
7315
+ signals.push("AndroidManifest.xml");
7316
+ }
7317
+ if (await fileExists2(rootDir, "settings.gradle") || await fileExists2(rootDir, "settings.gradle.kts")) {
7318
+ signals.push("settings.gradle");
7319
+ }
7320
+ if (await fileExists2(rootDir, "gradlew")) {
7321
+ signals.push("gradlew");
7322
+ }
7323
+ return signals;
7324
+ }
7101
7325
  // src/core/detection/project-detector.ts
7102
7326
  async function detectProject(rootDir) {
7103
7327
  const signals = [];
@@ -7138,12 +7362,68 @@ async function detectProject(rootDir) {
7138
7362
  languages.push("php");
7139
7363
  runtimes.push("php");
7140
7364
  packageManagers.push("composer");
7365
+ if (phpSignals.includes("artisan")) {
7366
+ frameworks.push("laravel");
7367
+ }
7141
7368
  }
7142
7369
  const astroSignals = await detectAstro(rootDir);
7143
7370
  if (astroSignals.length > 0) {
7144
7371
  signals.push(...astroSignals);
7145
7372
  frameworks.push("astro");
7146
7373
  }
7374
+ const nextSignals = await detectNext(rootDir);
7375
+ if (nextSignals.length > 0) {
7376
+ signals.push(...nextSignals);
7377
+ languages.push("javascript", "typescript");
7378
+ runtimes.push("node");
7379
+ frameworks.push("nextjs");
7380
+ }
7381
+ const fastapiSignals = await detectFastApi(rootDir);
7382
+ if (fastapiSignals.length > 0) {
7383
+ signals.push(...fastapiSignals);
7384
+ languages.push("python");
7385
+ runtimes.push("python");
7386
+ frameworks.push("fastapi");
7387
+ }
7388
+ const monorepoSignals = await detectMonorepo(rootDir);
7389
+ if (monorepoSignals.length > 0) {
7390
+ signals.push(...monorepoSignals);
7391
+ }
7392
+ const androidSignals = await detectAndroid(rootDir);
7393
+ if (androidSignals.includes("AndroidManifest.xml")) {
7394
+ signals.push(...androidSignals);
7395
+ languages.push("kotlin", "java");
7396
+ runtimes.push("android");
7397
+ frameworks.push("android");
7398
+ }
7399
+ const genericBackendSignals = await detectGenericBackend(rootDir);
7400
+ if (genericBackendSignals.length > 0 && !frameworks.includes("django") && !frameworks.includes("fastapi") && !frameworks.includes("spring")) {
7401
+ signals.push(...genericBackendSignals);
7402
+ frameworks.push("backend");
7403
+ if (genericBackendSignals.includes("go.mod")) {
7404
+ languages.push("go");
7405
+ runtimes.push("go");
7406
+ }
7407
+ if (genericBackendSignals.includes("Cargo.toml")) {
7408
+ languages.push("rust");
7409
+ runtimes.push("rust");
7410
+ }
7411
+ if (genericBackendSignals.includes("Gemfile")) {
7412
+ languages.push("ruby");
7413
+ runtimes.push("ruby");
7414
+ }
7415
+ if (genericBackendSignals.includes("*.csproj")) {
7416
+ languages.push("csharp");
7417
+ runtimes.push("dotnet");
7418
+ }
7419
+ }
7420
+ const genericFrontendSignals = await detectGenericFrontend(rootDir);
7421
+ if (genericFrontendSignals.length > 0 && !frameworks.includes("astro") && !frameworks.includes("nextjs")) {
7422
+ signals.push(...genericFrontendSignals);
7423
+ frameworks.push("frontend");
7424
+ languages.push("javascript", "typescript");
7425
+ runtimes.push("node");
7426
+ }
7147
7427
  const uniqueSignals = [...new Set(signals)];
7148
7428
  return {
7149
7429
  rootDir,
@@ -7173,74 +7453,6 @@ function calculateConfidence(profile) {
7173
7453
  }
7174
7454
  return "low";
7175
7455
  }
7176
- async function detectNode(rootDir) {
7177
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7178
- const signals = [];
7179
- if (await fileExists2(rootDir, "package.json")) {
7180
- signals.push("package.json");
7181
- }
7182
- if (await fileExists2(rootDir, "node_modules")) {
7183
- signals.push("node_modules/");
7184
- }
7185
- return signals;
7186
- }
7187
- async function detectBun(rootDir) {
7188
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7189
- const signals = [];
7190
- if (await fileExists2(rootDir, "bun.lockb")) {
7191
- signals.push("bun.lockb");
7192
- }
7193
- if (await fileExists2(rootDir, "bun.lock")) {
7194
- signals.push("bun.lock");
7195
- }
7196
- return signals;
7197
- }
7198
- async function detectSpring(rootDir) {
7199
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7200
- const signals = [];
7201
- if (await fileExists2(rootDir, "build.gradle") || await fileExists2(rootDir, "build.gradle.kts")) {
7202
- signals.push("build.gradle");
7203
- }
7204
- if (await fileExists2(rootDir, "pom.xml")) {
7205
- signals.push("pom.xml");
7206
- }
7207
- return signals;
7208
- }
7209
- async function detectDjango(rootDir) {
7210
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7211
- const signals = [];
7212
- if (await fileExists2(rootDir, "manage.py")) {
7213
- signals.push("manage.py");
7214
- }
7215
- if (await fileExists2(rootDir, "requirements.txt")) {
7216
- signals.push("requirements.txt");
7217
- }
7218
- return signals;
7219
- }
7220
- async function detectAstro(rootDir) {
7221
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7222
- const signals = [];
7223
- if (await fileExists2(rootDir, "astro.config.mjs") || await fileExists2(rootDir, "astro.config.ts")) {
7224
- signals.push("astro.config");
7225
- }
7226
- return signals;
7227
- }
7228
- async function detectPhp(rootDir) {
7229
- const { fileExists: fileExists2 } = await Promise.resolve().then(() => (init_safety(), exports_safety));
7230
- const signals = [];
7231
- if (await fileExists2(rootDir, "composer.json")) {
7232
- signals.push("composer.json");
7233
- }
7234
- try {
7235
- const { readdir } = await import("node:fs/promises");
7236
- const entries = await readdir(rootDir, { withFileTypes: true });
7237
- const hasPhpFiles = entries.some((entry) => entry.isFile() && entry.name.endsWith(".php"));
7238
- if (hasPhpFiles) {
7239
- signals.push("*.php");
7240
- }
7241
- } catch {}
7242
- return signals;
7243
- }
7244
7456
 
7245
7457
  // src/commands/detect.command.ts
7246
7458
  async function detectCommand(options) {
@@ -11371,7 +11583,8 @@ var CodeConductorConfigSchema = exports_external.object({
11371
11583
  }),
11372
11584
  defaults: exports_external.object({
11373
11585
  target: exports_external.enum(["opencode", "claude", "codex", "gemini", "cursor", "agy"]),
11374
- overwrite: exports_external.boolean()
11586
+ overwrite: exports_external.boolean(),
11587
+ locale: exports_external.enum(["en", "es"]).optional().default("en")
11375
11588
  }),
11376
11589
  presets: exports_external.object({
11377
11590
  council: exports_external.object({
@@ -11640,7 +11853,8 @@ var DEFAULT_CONFIG = {
11640
11853
  },
11641
11854
  defaults: {
11642
11855
  target: "opencode",
11643
- overwrite: false
11856
+ overwrite: false,
11857
+ locale: "en"
11644
11858
  },
11645
11859
  presets: {
11646
11860
  council: {
@@ -11697,10 +11911,17 @@ async function writeConfig(projectRoot, config = {}, force = false) {
11697
11911
  }
11698
11912
 
11699
11913
  // src/core/presets/preset-resolver.ts
11700
- var CURRENT_PRESET_VERSION = "v0.2.0";
11914
+ var CURRENT_PRESET_VERSION = "v0.3.0";
11701
11915
  function resolvePreset(target, profile) {
11702
11916
  const stack = resolveStack(profile);
11703
- const architecture = profile.signals.length > 0 ? "single-project" : "unknown";
11917
+ const isMonorepo = profile.signals.some((s) => [
11918
+ "pnpm-workspace.yaml",
11919
+ "lerna.json",
11920
+ "go.work",
11921
+ "package.json-workspaces",
11922
+ "Cargo.toml-workspace"
11923
+ ].includes(s));
11924
+ const architecture = isMonorepo ? "monorepo" : profile.signals.length > 0 ? "single-project" : "unknown";
11704
11925
  const warnings = [];
11705
11926
  if (profile.confidence === "low") {
11706
11927
  warnings.push("Detection confidence is low; review the selected preset before applying it.");
@@ -11730,6 +11951,20 @@ function resolveStack(profile) {
11730
11951
  return "django";
11731
11952
  if (profile.frameworks.includes("astro"))
11732
11953
  return "astro";
11954
+ if (profile.frameworks.includes("nextjs"))
11955
+ return "nextjs";
11956
+ if (profile.frameworks.includes("fastapi"))
11957
+ return "fastapi";
11958
+ if (profile.frameworks.includes("backend"))
11959
+ return "backend";
11960
+ if (profile.frameworks.includes("frontend"))
11961
+ return "frontend";
11962
+ if (profile.frameworks.includes("android"))
11963
+ return "android";
11964
+ if (profile.frameworks.includes("laravel"))
11965
+ return "laravel";
11966
+ if (profile.runtimes.includes("php"))
11967
+ return "php";
11733
11968
  if (profile.runtimes.includes("bun"))
11734
11969
  return "bun";
11735
11970
  if (profile.runtimes.includes("node"))
@@ -11739,23 +11974,23 @@ function resolveStack(profile) {
11739
11974
  function resolveAssets(target) {
11740
11975
  switch (target) {
11741
11976
  case "opencode":
11742
- return ["opencode.jsonc", "agents", "commands", "prompts/v0.2.0", "skills"];
11977
+ return ["opencode.jsonc", "agents", "commands", "prompts/v0.3.0", "skills"];
11743
11978
  case "claude":
11744
- return ["CLAUDE.md", "settings.json", "commands", "skills", "agents", "prompts/v0.2.0"];
11979
+ return ["CLAUDE.md", "settings.json", "commands", "skills", "agents", "prompts/v0.3.0"];
11745
11980
  case "codex":
11746
- return ["AGENTS.md", "skills", "prompts/v0.2.0"];
11981
+ return ["AGENTS.md", "skills", "prompts/v0.3.0"];
11747
11982
  case "gemini":
11748
- return ["agents", "prompts/v0.2.0"];
11983
+ return ["agents", "prompts/v0.3.0"];
11749
11984
  case "cursor":
11750
- return ["agents", "prompts/v0.2.0"];
11985
+ return ["agents", "prompts/v0.3.0"];
11751
11986
  case "agy":
11752
- return ["agents", "prompts/v0.2.0"];
11987
+ return ["AGENTS.md", "rules", "workflows", "skills", "prompts/v0.3.0"];
11753
11988
  }
11754
11989
  }
11755
11990
 
11756
11991
  // src/commands/init.command.ts
11757
11992
  async function initCommand(options) {
11758
- const { projectRoot, dryRun, force, global: isGlobal, output } = options;
11993
+ const { projectRoot, dryRun, force, global: isGlobal, output, locale } = options;
11759
11994
  const baseDir = isGlobal ? homedir() : projectRoot;
11760
11995
  try {
11761
11996
  let profile = null;
@@ -11779,7 +12014,8 @@ async function initCommand(options) {
11779
12014
  },
11780
12015
  defaults: {
11781
12016
  target: "opencode",
11782
- overwrite: force
12017
+ overwrite: force,
12018
+ locale
11783
12019
  }
11784
12020
  } : {
11785
12021
  project: {
@@ -11788,7 +12024,8 @@ async function initCommand(options) {
11788
12024
  },
11789
12025
  defaults: {
11790
12026
  target: "opencode",
11791
- overwrite: force
12027
+ overwrite: force,
12028
+ locale
11792
12029
  }
11793
12030
  };
11794
12031
  const presetResolution = profile ? resolvePreset("opencode", profile) : null;
@@ -11904,7 +12141,7 @@ async function fileExists2(path) {
11904
12141
  }
11905
12142
 
11906
12143
  // src/commands/install.command.ts
11907
- import { homedir as homedir2 } from "node:os";
12144
+ import { homedir as homedir3 } from "node:os";
11908
12145
  import { resolve as resolve7 } from "node:path";
11909
12146
 
11910
12147
  // src/domain/council/council-agent.ts
@@ -12312,8 +12549,117 @@ async function writeGeneratedFiles(files, options) {
12312
12549
 
12313
12550
  // src/core/presets/file-copier.ts
12314
12551
  import { mkdir as mkdir4, readdir, readFile as readFile4, stat, writeFile as writeFile4 } from "node:fs/promises";
12552
+ import { homedir as homedir2 } from "node:os";
12315
12553
  import { dirname as dirname3, join as join2, relative, resolve as resolve5 } from "node:path";
12316
12554
 
12555
+ // src/core/i18n/language-instructions.ts
12556
+ var SUPPORTED_LOCALES = ["en", "es"];
12557
+ var LANGUAGE_INSTRUCTIONS = {
12558
+ 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.',
12559
+ 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."
12560
+ };
12561
+ var COMMIT_STYLE = {
12562
+ en: `---
12563
+ trigger: always_on
12564
+ description: Rules for generating commit messages using Conventional Commits format
12565
+ ---
12566
+
12567
+ ## Git Commit Messages
12568
+
12569
+ ### Format
12570
+
12571
+ \`\`\`
12572
+ <type>(<scope>): <short description>
12573
+
12574
+ - <detail 1>
12575
+ - <detail 2>
12576
+ \`\`\`
12577
+
12578
+ ### Valid Types
12579
+
12580
+ \`feat\` \`fix\` \`docs\` \`style\` \`refactor\` \`test\` \`chore\` \`perf\` \`ci\` \`build\`
12581
+ \`revert\`
12582
+
12583
+ ### Rules
12584
+
12585
+ - Language: **neutral English** always
12586
+ - Header: maximum 69 characters, no trailing period
12587
+ - Body: concise bullet points, one idea per line
12588
+ - Footer: only for breaking changes or issues
12589
+ - No gerunds ("adding", "fixing")
12590
+ - Use infinitive or imperative ("add", "fix", "update")`,
12591
+ es: `---
12592
+ trigger: always_on
12593
+ description: Reglas para generar mensajes de commit con formato Conventional Commits
12594
+ ---
12595
+
12596
+ ## Git Commit Messages
12597
+
12598
+ ### Formato
12599
+
12600
+ \`\`\`
12601
+ <tipo>(<scope>): <descripcion corta>
12602
+
12603
+ - <detalle 1>
12604
+ - <detalle 2>
12605
+ \`\`\`
12606
+
12607
+ ### Tipos validos
12608
+
12609
+ \`feat\` \`fix\` \`docs\` \`style\` \`refactor\` \`test\` \`chore\` \`perf\` \`ci\` \`build\`
12610
+ \`revert\`
12611
+
12612
+ ### Reglas
12613
+
12614
+ - Idioma: **inglés neutro** siempre
12615
+ - Encabezado: maximo 69 caracteres, sin punto final
12616
+ - Cuerpo: viñetas concisas, una idea por linea
12617
+ - Footer: solo para breaking changes o issues
12618
+ - Sin gerundios ("agregando", "corrigiendo")
12619
+ - Usar infinitivo o imperativo ("agregar", "corregir", "actualizar")`
12620
+ };
12621
+ var COMMIT_WORKFLOW = {
12622
+ en: `---
12623
+ name: commit
12624
+ description: Generates a commit in English following Conventional Commits based on staged changes
12625
+ ---
12626
+
12627
+ // turbo-all
12628
+
12629
+ ## Steps
12630
+
12631
+ 1. View staged changes: \`git diff --cached --stat\`
12632
+ 2. If nothing is staged, suggest \`git add .\` or specific files
12633
+ 3. Get full diff: \`git diff --cached\`
12634
+ 4. Check recent style: \`git log -n 3 --oneline\`
12635
+ 5. Generate message following \`.agents/rules/commit-style.md\`
12636
+ 6. Show proposal and confirm with the user
12637
+ 7. Execute: \`git commit -m "<message>"\`
12638
+ 8. Confirm success: \`git status\``,
12639
+ es: `---
12640
+ name: commit
12641
+ description: Genera un commit en inglés siguiendo Conventional Commits basado en los cambios staged
12642
+ ---
12643
+
12644
+ // turbo-all
12645
+
12646
+ ## Pasos
12647
+
12648
+ 1. Ver cambios staged: \`git diff --cached --stat\`
12649
+ 2. Si no hay nada staged, sugiere \`git add .\` o archivos específicos
12650
+ 3. Obtener diff completo: \`git diff --cached\`
12651
+ 4. Ver estilo reciente: \`git log -n 3 --oneline\`
12652
+ 5. Generar mensaje siguiendo \`.agents/rules/commit-style.md\`
12653
+ 6. Mostrar propuesta y confirmar con el usuario
12654
+ 7. Ejecutar: \`git commit -m "<mensaje>"\`
12655
+ 8. Confirmar éxito: \`git status\``
12656
+ };
12657
+ function getLanguageInstruction(locale) {
12658
+ const key = SUPPORTED_LOCALES.includes(locale) ? locale : "en";
12659
+ return `- ${LANGUAGE_INSTRUCTIONS[key]}`;
12660
+ }
12661
+ var LOCALE_PLACEHOLDER = "{{LANGUAGE_INSTRUCTIONS}}";
12662
+
12317
12663
  // src/core/filesystem/safe-merger.ts
12318
12664
  var MANAGED_BEGIN_MARKER = "<!-- CODECONDUCTOR:BEGIN managed -->";
12319
12665
  var MANAGED_END_MARKER = "<!-- CODECONDUCTOR:END managed -->";
@@ -12410,12 +12756,14 @@ function extractAgentRole(filePath) {
12410
12756
  ];
12411
12757
  return knownRoles.includes(name) ? name : null;
12412
12758
  }
12413
- function renderTemplate(content, modelConfig, filePath) {
12759
+ function renderTemplate(content, modelConfig, filePath, locale = "en") {
12760
+ const cleanLocale = locale === "es" || locale === "en" ? locale : "en";
12761
+ const templatedContent = content.replace(/\{\{COMMIT_STYLE\}\}/g, COMMIT_STYLE[cleanLocale]).replace(/\{\{COMMIT_WORKFLOW\}\}/g, COMMIT_WORKFLOW[cleanLocale]);
12414
12762
  const agentRole = extractAgentRole(filePath);
12415
12763
  if (agentRole && modelConfig.agents[agentRole]) {
12416
12764
  const agentModels = modelConfig.agents[agentRole];
12417
12765
  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 ?? "");
12766
+ 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
12767
  if (modelConfig.tools || modelConfig.permissions) {
12420
12768
  result2 = substituteToolNames(result2, modelConfig);
12421
12769
  }
@@ -12431,7 +12779,7 @@ function renderTemplate(content, modelConfig, filePath) {
12431
12779
  "docs",
12432
12780
  "repo-explorer"
12433
12781
  ];
12434
- let result = content;
12782
+ let result = templatedContent;
12435
12783
  for (const role of knownRoles) {
12436
12784
  if (!modelConfig.agents[role])
12437
12785
  continue;
@@ -12445,6 +12793,7 @@ function renderTemplate(content, modelConfig, filePath) {
12445
12793
  }
12446
12794
  }
12447
12795
  }
12796
+ result = result.replace(new RegExp(LOCALE_PLACEHOLDER.replace(/[{}]/g, "\\$&"), "g"), getLanguageInstruction(locale));
12448
12797
  if (modelConfig.tools || modelConfig.permissions) {
12449
12798
  result = substituteToolNames(result, modelConfig);
12450
12799
  }
@@ -12454,12 +12803,12 @@ function substituteToolNames(content, modelConfig) {
12454
12803
  if (!modelConfig.tools && !modelConfig.permissions)
12455
12804
  return content;
12456
12805
  const target = modelConfig.target;
12457
- const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
12806
+ const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
12458
12807
  if (!fmMatch)
12459
12808
  return content;
12460
12809
  const frontmatter = fmMatch[1];
12461
12810
  if (target === "opencode" && modelConfig.permissions) {
12462
- const updatedFrontmatter2 = frontmatter.replace(/^tools:\s*(.+)\n?/m, "");
12811
+ const updatedFrontmatter2 = frontmatter.replace(/^tools:\s*(.+)\r?\n?/m, "");
12463
12812
  return content.replace(fmMatch[0], `---
12464
12813
  ${updatedFrontmatter2}
12465
12814
  ---`);
@@ -12481,7 +12830,7 @@ ${updatedFrontmatter2}
12481
12830
  ${updatedFrontmatter}
12482
12831
  ---`);
12483
12832
  }
12484
- async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTemplate, modelConfig) {
12833
+ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTemplate, modelConfig, locale) {
12485
12834
  if (strategy === "skip") {
12486
12835
  return { src: srcPath, dest: destPath, action: "skipped", dryRun };
12487
12836
  }
@@ -12491,7 +12840,7 @@ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTem
12491
12840
  } catch (e) {
12492
12841
  return { src: srcPath, dest: destPath, action: "error", error: `Cannot read source: ${e}` };
12493
12842
  }
12494
- const incomingContent = isTemplate && modelConfig ? renderTemplate(content, modelConfig, srcPath) : content;
12843
+ const incomingContent = isTemplate && modelConfig ? renderTemplate(content, modelConfig, srcPath, locale) : content;
12495
12844
  let finalContent = incomingContent;
12496
12845
  let action = "written";
12497
12846
  if (strategy === "append") {
@@ -12543,14 +12892,23 @@ async function applySingleFile(srcPath, destPath, strategy, force, dryRun, isTem
12543
12892
  return { src: srcPath, dest: destPath, action: "error", error: String(e) };
12544
12893
  }
12545
12894
  }
12546
- async function copyFromManifest(manifest, presetsDir, baseDir, isGlobal, dryRun, force, modelConfig = null) {
12895
+ async function copyFromManifest(manifest, presetsDir, baseDir, isGlobal, dryRun, force, modelConfig = null, locale = "en") {
12547
12896
  const results = [];
12548
12897
  for (const entry of manifest.entries) {
12549
12898
  const strategy = isGlobal && entry.globalStrategy ? entry.globalStrategy : entry.strategy;
12550
- const files = await resolveEntryFiles(entry, presetsDir, baseDir);
12899
+ let resolvedBaseDir = baseDir;
12900
+ let resolvedEntry = entry;
12901
+ if (manifest.target === "agy" && isGlobal) {
12902
+ resolvedBaseDir = join2(homedir2(), ".gemini", "config");
12903
+ resolvedEntry = {
12904
+ ...entry,
12905
+ dest: entry.dest.replace(/^\.agents\/?/, "")
12906
+ };
12907
+ }
12908
+ const files = await resolveEntryFiles(resolvedEntry, presetsDir, resolvedBaseDir);
12551
12909
  const isTemplate = entry.template === true;
12552
12910
  for (const { src, dest } of files) {
12553
- results.push(await applySingleFile(src, dest, strategy, force, dryRun, isTemplate, modelConfig));
12911
+ results.push(await applySingleFile(src, dest, strategy, force, dryRun, isTemplate, modelConfig, locale));
12554
12912
  }
12555
12913
  }
12556
12914
  return results;
@@ -12629,7 +12987,7 @@ function getIndividualTargets(target) {
12629
12987
  // src/commands/install.command.ts
12630
12988
  async function installCommand(options) {
12631
12989
  const { target, dryRun, force, global: isGlobal, output, projectRoot } = options;
12632
- const baseDir = isGlobal ? homedir2() : projectRoot;
12990
+ const baseDir = isGlobal ? homedir3() : projectRoot;
12633
12991
  try {
12634
12992
  const runnerTarget = parseRunnerTarget(target);
12635
12993
  const targets = getIndividualTargets(runnerTarget);
@@ -12724,17 +13082,24 @@ async function installCommand(options) {
12724
13082
  }
12725
13083
  async function installPresetCommand(options) {
12726
13084
  const { target, dryRun, force, global: isGlobal, projectRoot } = options;
12727
- const baseDir = isGlobal ? homedir2() : projectRoot;
13085
+ const baseDir = isGlobal ? homedir3() : projectRoot;
12728
13086
  try {
12729
13087
  const runnerTarget = parseRunnerTarget(target);
12730
13088
  const targets = getIndividualTargets(runnerTarget);
12731
13089
  const profile = await detectProject(projectRoot);
12732
13090
  const presetResolution = targets.map((t) => resolvePreset(t, profile));
13091
+ let locale = options.locale ?? "en";
13092
+ if (!options.locale) {
13093
+ const configResult = await loadConfig(projectRoot);
13094
+ if (configResult.success) {
13095
+ locale = configResult.data.defaults.locale ?? "en";
13096
+ }
13097
+ }
12733
13098
  const allFileResults = [];
12734
13099
  for (const t of targets) {
12735
13100
  const manifest = await loadManifest(t);
12736
13101
  const modelConfig = await loadModelConfig(t);
12737
- const results = await copyFromManifest(manifest, PRESETS_DIR, baseDir, isGlobal, dryRun, force, modelConfig);
13102
+ const results = await copyFromManifest(manifest, PRESETS_DIR, baseDir, isGlobal, dryRun, force, modelConfig, locale);
12738
13103
  for (const r of results) {
12739
13104
  allFileResults.push({ target: t, ...r });
12740
13105
  }
@@ -12749,6 +13114,7 @@ async function installPresetCommand(options) {
12749
13114
  targets,
12750
13115
  global: isGlobal,
12751
13116
  dryRun,
13117
+ locale,
12752
13118
  presetResolution,
12753
13119
  fileResults: allFileResults
12754
13120
  }
@@ -12766,7 +13132,7 @@ async function installPresetCommand(options) {
12766
13132
  }
12767
13133
 
12768
13134
  // src/commands/install-lsp.command.ts
12769
- import { homedir as homedir4 } from "node:os";
13135
+ import { homedir as homedir5 } from "node:os";
12770
13136
  import { resolve as resolve8 } from "node:path";
12771
13137
 
12772
13138
  // src/core/lsp/lsp-config-utils.ts
@@ -13011,7 +13377,7 @@ function createOpenCodeLspGenerator() {
13011
13377
  // src/core/lsp/lsp-installer.ts
13012
13378
  import { execFile } from "node:child_process";
13013
13379
  import { access as access5, mkdir as mkdir5 } from "node:fs/promises";
13014
- import { homedir as homedir3 } from "node:os";
13380
+ import { homedir as homedir4 } from "node:os";
13015
13381
  import { join as join4 } from "node:path";
13016
13382
  import { promisify } from "node:util";
13017
13383
  var execFileAsync = promisify(execFile);
@@ -13019,7 +13385,7 @@ var execFileAsync = promisify(execFile);
13019
13385
  class LspInstaller {
13020
13386
  lspBinDir;
13021
13387
  constructor() {
13022
- this.lspBinDir = join4(homedir3(), ".codeconductor", "lsp", "bin");
13388
+ this.lspBinDir = join4(homedir4(), ".codeconductor", "lsp", "bin");
13023
13389
  }
13024
13390
  async checkInstalled(def) {
13025
13391
  try {
@@ -13253,7 +13619,7 @@ function resolveLsps(languages) {
13253
13619
  // src/commands/install-lsp.command.ts
13254
13620
  async function installLspCommand(options) {
13255
13621
  const { target, lang, dryRun, force, global: isGlobal, output, projectRoot } = options;
13256
- const baseDir = isGlobal ? homedir4() : projectRoot;
13622
+ const baseDir = isGlobal ? homedir5() : projectRoot;
13257
13623
  try {
13258
13624
  const runnerTarget = parseRunnerTarget(target);
13259
13625
  const targets = getIndividualTargets(runnerTarget);
@@ -15105,16 +15471,19 @@ Options:
15105
15471
  --global Install to home directory (~/.claude, ~/.opencode, etc.)
15106
15472
  --output, -o Output mode: human or json
15107
15473
  --lang Comma-separated list of languages (e.g., typescript,php,python)
15474
+ --locale Instruction language for agent files: en (default) | es
15108
15475
 
15109
15476
  Examples:
15110
15477
  npx cc-codeconductor init
15111
15478
  npx cc-codeconductor init --global
15479
+ npx cc-codeconductor init --locale=es
15112
15480
  npx cc-codeconductor detect
15113
15481
  npx cc-codeconductor install preset --target opencode
15114
15482
  npx cc-codeconductor install preset --target claude
15115
15483
  npx cc-codeconductor install preset --target codex
15116
15484
  npx cc-codeconductor install preset --target all
15117
15485
  npx cc-codeconductor install preset --target claude --global
15486
+ npx cc-codeconductor install preset --target claude --locale=es
15118
15487
  npx cc-codeconductor install council --target opencode
15119
15488
  npx cc-codeconductor install council --target claude
15120
15489
  npx cc-codeconductor install council --target codex
@@ -15142,7 +15511,8 @@ async function routeCommand(args, projectRoot) {
15142
15511
  dryRun: flags.dryRun,
15143
15512
  force: flags.force,
15144
15513
  global: options.global === true || options.global === "true",
15145
- output: flags.output
15514
+ output: flags.output,
15515
+ locale: options.locale === "es" ? "es" : "en"
15146
15516
  });
15147
15517
  case "detect":
15148
15518
  return detectCommand({
@@ -15177,7 +15547,8 @@ async function routeCommand(args, projectRoot) {
15177
15547
  dryRun: flags.dryRun,
15178
15548
  force: flags.force,
15179
15549
  global: isGlobal,
15180
- output: flags.output
15550
+ output: flags.output,
15551
+ locale: options.locale === "es" ? "es" : options.locale === "en" ? "en" : undefined
15181
15552
  });
15182
15553
  }
15183
15554
  return installCommand({