uctm 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/init.mjs CHANGED
@@ -2,19 +2,19 @@ import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync } from
2
2
  import { join, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { homedir } from 'node:os';
5
- import { AGENT_FILES, CLAUDE_MD_SECTION } from './constants.mjs';
5
+ import { AGENT_FILES, getAgentsSrcDir, getClaudeMdSection } from './constants.mjs';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const AGENTS_SRC = join(__dirname, '..', 'agents');
9
8
 
10
9
  const green = (s) => `\x1b[32m${s}\x1b[0m`;
11
10
  const dim = (s) => `\x1b[2m${s}\x1b[0m`;
12
11
 
13
- function copyAgents(destDir) {
12
+ function copyAgents(destDir, lang) {
13
+ const srcDir = getAgentsSrcDir(lang);
14
14
  mkdirSync(destDir, { recursive: true });
15
15
  let count = 0;
16
16
  for (const file of AGENT_FILES) {
17
- const src = join(AGENTS_SRC, file);
17
+ const src = join(srcDir, file);
18
18
  if (!existsSync(src)) continue;
19
19
  copyFileSync(src, join(destDir, file));
20
20
  count++;
@@ -41,38 +41,43 @@ function ensureWorksDir(projectDir) {
41
41
  return true;
42
42
  }
43
43
 
44
- function updateClaudeMd(projectDir) {
44
+ function updateClaudeMd(projectDir, lang) {
45
+ const section = getClaudeMdSection(lang);
45
46
  const claudeMdPath = join(projectDir, 'CLAUDE.md');
46
47
  if (existsSync(claudeMdPath)) {
47
48
  const content = readFileSync(claudeMdPath, 'utf8');
48
- if (content.includes('Agent 호출 규칙') || content.includes('agent-flow.md')) {
49
+ if (content.includes('Agent 호출 규칙') || content.includes('Agent Invocation Rules') || content.includes('agent-flow.md')) {
49
50
  return false;
50
51
  }
51
- writeFileSync(claudeMdPath, content.trimEnd() + '\n\n' + CLAUDE_MD_SECTION);
52
+ writeFileSync(claudeMdPath, content.trimEnd() + '\n\n' + section);
52
53
  } else {
53
- writeFileSync(claudeMdPath, '# CLAUDE.md\n\n' + CLAUDE_MD_SECTION);
54
+ writeFileSync(claudeMdPath, '# CLAUDE.md\n\n' + section);
54
55
  }
55
56
  return true;
56
57
  }
57
58
 
58
- export function init(isGlobal) {
59
+ export function init(isGlobal, lang) {
60
+ const exampleTag = lang === 'ko'
61
+ ? `[추가기능] Add a hello world feature`
62
+ : `[new-feature] Add a hello world feature`;
63
+
59
64
  if (isGlobal) {
60
65
  const globalDir = join(homedir(), '.claude', 'agents');
61
- const count = copyAgents(globalDir);
62
- console.log(`\n Installing to ${dim('~/.claude/agents/')} ...`);
66
+ const count = copyAgents(globalDir, lang);
67
+ console.log(`\n Installing to ${dim('~/.claude/agents/')} (${lang}) ...`);
63
68
  console.log(` ${green('✓')} ${count} agent files copied`);
64
69
  console.log(`\n ${dim('Next steps:')}`);
65
70
  console.log(` 1. Open any project and run ${dim("'claude'")}`);
66
- console.log(` 2. Type: ${dim('[추가기능] Add a hello world feature')}\n`);
71
+ console.log(` 2. Type: ${dim(exampleTag)}\n`);
67
72
  return;
68
73
  }
69
74
 
70
75
  const projectDir = process.cwd();
71
76
  const destDir = join(projectDir, '.claude', 'agents');
72
77
 
73
- console.log(`\n Installing to ${dim('.claude/agents/')} ...`);
78
+ console.log(`\n Installing to ${dim('.claude/agents/')} (${lang}) ...`);
74
79
 
75
- const count = copyAgents(destDir);
80
+ const count = copyAgents(destDir, lang);
76
81
  console.log(` ${green('✓')} ${count} agent files copied`);
77
82
 
78
83
  if (ensureRouterConfig(projectDir)) {
@@ -81,7 +86,7 @@ export function init(isGlobal) {
81
86
  console.log(` ${dim('-')} .agent/router_rule_config.json already exists`);
82
87
  }
83
88
 
84
- if (updateClaudeMd(projectDir)) {
89
+ if (updateClaudeMd(projectDir, lang)) {
85
90
  console.log(` ${green('✓')} CLAUDE.md updated`);
86
91
  } else {
87
92
  console.log(` ${dim('-')} CLAUDE.md already has agent rules`);
@@ -95,5 +100,5 @@ export function init(isGlobal) {
95
100
 
96
101
  console.log(`\n ${dim('Next steps:')}`);
97
102
  console.log(` 1. Run ${dim("'claude'")} to start Claude Code`);
98
- console.log(` 2. Type: ${dim('[추가기능] Add a hello world feature')}\n`);
103
+ console.log(` 2. Type: ${dim(exampleTag)}\n`);
99
104
  }
package/lib/update.mjs CHANGED
@@ -2,15 +2,22 @@ import { existsSync, copyFileSync, mkdirSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { homedir } from 'node:os';
5
- import { AGENT_FILES } from './constants.mjs';
5
+ import { AGENT_FILES, getAgentsSrcDir } from './constants.mjs';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const AGENTS_SRC = join(__dirname, '..', 'agents');
9
8
 
10
9
  const green = (s) => `\x1b[32m${s}\x1b[0m`;
11
10
  const dim = (s) => `\x1b[2m${s}\x1b[0m`;
11
+ const red = (s) => `\x1b[31m${s}\x1b[0m`;
12
12
 
13
- export function update(isGlobal) {
13
+ export function update(isGlobal, lang) {
14
+ if (!lang) {
15
+ console.error(`\n ${red('Error:')} --lang is required for update.`);
16
+ console.error(` Usage: uctm update --lang ko|en ${isGlobal ? '--global' : ''}\n`);
17
+ process.exit(1);
18
+ }
19
+
20
+ const srcDir = getAgentsSrcDir(lang);
14
21
  const destDir = isGlobal
15
22
  ? join(homedir(), '.claude', 'agents')
16
23
  : join(process.cwd(), '.claude', 'agents');
@@ -22,14 +29,14 @@ export function update(isGlobal) {
22
29
 
23
30
  let count = 0;
24
31
  for (const file of AGENT_FILES) {
25
- const src = join(AGENTS_SRC, file);
32
+ const src = join(srcDir, file);
26
33
  if (!existsSync(src)) continue;
27
34
  copyFileSync(src, join(destDir, file));
28
35
  count++;
29
36
  }
30
37
 
31
38
  const label = isGlobal ? '~/.claude/agents/' : '.claude/agents/';
32
- console.log(`\n Updating ${dim(label)} ...`);
39
+ console.log(`\n Updating ${dim(label)} (${lang}) ...`);
33
40
  console.log(` ${green('✓')} ${count} agent files updated`);
34
41
  console.log(` ${dim('-')} CLAUDE.md, router_rule_config.json untouched\n`);
35
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uctm",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Universal Claude Task Manager — SDD-based task pipeline subagent system for Claude Code CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,8 @@
9
9
  "files": [
10
10
  "bin/",
11
11
  "lib/",
12
- "agents/",
12
+ "agents/ko/",
13
+ "agents/en/",
13
14
  ".agent/"
14
15
  ],
15
16
  "engines": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes