create-agentic-dev-env 0.2.3 → 0.2.4

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/bin/create.js CHANGED
@@ -3,14 +3,16 @@ const fs = require('fs')
3
3
  const path = require('path')
4
4
  const { execSync } = require('child_process')
5
5
 
6
+ console.log(`create-agentic-dev-env v${require('../package.json').version}`)
7
+
6
8
  const name = process.argv[2]
7
9
  if (!name || !/^[a-z0-9][a-z0-9._-]*$/i.test(name)) {
8
- console.error('用法: create-agentic-dev-env <repo-name>')
10
+ console.error('Usage: create-agentic-dev-env <repo-name>')
9
11
  process.exit(1)
10
12
  }
11
13
  const dest = path.resolve(name)
12
14
  if (fs.existsSync(dest)) {
13
- console.error(`${name} 已存在`)
15
+ console.error(`${name} already exists`)
14
16
  process.exit(1)
15
17
  }
16
18
 
@@ -37,10 +39,10 @@ fs.writeFileSync(destPkgPath, JSON.stringify(destPkg, null, 2) + '\n')
37
39
  execSync('git init', { cwd: dest, stdio: 'inherit' })
38
40
 
39
41
  console.log(`
40
- 已建立 ADE repo: ${name}/
42
+ Created ADE repo: ${name}/
41
43
 
42
- 下一步:
43
- 1. ${name}/package.json 的 repository.url
44
- 2. 開始填 knowledge/(服務格式見 knowledge/services/_template.yaml
45
- 3. push 後團隊即可: pnpm dlx "git+ssh://git@github.com/ORG/${name}.git" init
44
+ Next steps:
45
+ 1. Set repository.url in ${name}/package.json
46
+ 2. Start filling knowledge/ (service format: knowledge/services/_template.yaml)
47
+ 3. After pushing, team members run: pnpm dlx "git+ssh://git@github.com/ORG/${name}.git" init
46
48
  `)
package/lib/runner.js CHANGED
@@ -11,7 +11,7 @@ function run(cmd, pkgDir) {
11
11
  if (cmd === 'init') init(process.cwd(), pkgDir)
12
12
  else if (cmd === 'update') update(process.cwd())
13
13
  else {
14
- console.error('用法: init | update')
14
+ console.error('Usage: init | update')
15
15
  process.exit(1)
16
16
  }
17
17
  } catch (e) {
@@ -22,17 +22,17 @@ function run(cmd, pkgDir) {
22
22
 
23
23
  function init(cwd, srcDir) {
24
24
  if (fs.existsSync(path.join(cwd, '.ade.json'))) {
25
- throw new Error('此目錄已 init 過,請改用 update')
25
+ throw new Error('Already initialized here; run update instead')
26
26
  }
27
27
  install(cwd, srcDir)
28
- console.log('ADE init 完成')
28
+ console.log('ADE init done')
29
29
  }
30
30
 
31
31
  function update(cwd) {
32
32
  const cfgPath = path.join(cwd, '.ade.json')
33
- if (!fs.existsSync(cfgPath)) throw new Error('此目錄尚未 init')
33
+ if (!fs.existsSync(cfgPath)) throw new Error('Not initialized here; run init first')
34
34
  const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'))
35
- if (!cfg.source) throw new Error('.ade.json 缺少 sourceADE repo git url),請補上後重試')
35
+ if (!cfg.source) throw new Error('.ade.json is missing source (the ADE repo git url); add it and retry')
36
36
 
37
37
  // pnpm dlx 有快取(預設 ~24h),cli.js 所在的套件目錄可能是舊版內容;
38
38
  // update 的任務是拿最新知識,因此一律無視 pkgDir、自行 clone source
@@ -44,7 +44,7 @@ function update(cwd) {
44
44
  } finally {
45
45
  fs.rmSync(tmp, { recursive: true, force: true })
46
46
  }
47
- console.log('ADE update 完成')
47
+ console.log('ADE update done')
48
48
  }
49
49
 
50
50
  function removeManaged(cwd) {
@@ -65,7 +65,7 @@ function install(cwd, srcDir) {
65
65
  : []
66
66
  for (const d of skillDirs) {
67
67
  if (!d.startsWith('ade-')) {
68
- throw new Error(`skills/${d}: ADE repo skill 目錄必須以 ade- 前綴命名(update 只管理此前綴)`)
68
+ throw new Error(`skills/${d}: skill directories in an ADE repo must be prefixed with ade- (update only manages this prefix)`)
69
69
  }
70
70
  }
71
71
 
@@ -82,7 +82,7 @@ function install(cwd, srcDir) {
82
82
  const e = md.indexOf(END)
83
83
  if (b !== -1 || e !== -1) {
84
84
  if (b === -1 || e === -1 || e < b) {
85
- throw new Error('CLAUDE.md ADE 標記已損壞(BEGIN/END 不成對或順序顛倒),請手動修復後重試')
85
+ throw new Error('ADE markers in CLAUDE.md are corrupted (unpaired or reversed BEGIN/END); fix them manually and retry')
86
86
  }
87
87
  md = md.slice(0, b) + block + md.slice(e + END.length)
88
88
  } else {
@@ -117,7 +117,7 @@ function install(cwd, srcDir) {
117
117
  JSON.stringify({ source: source || prev.source || null, commit }, null, 2) + '\n'
118
118
  )
119
119
  if (!source && !prev.source) {
120
- console.warn('警告: ADE repo package.json 未設定 repository.url,update 將無法運作,請手動補 .ade.json 的 source')
120
+ console.warn('Warning: repository.url is not set in the ADE repo package.json; update will not work — set source in .ade.json manually')
121
121
  }
122
122
  }
123
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentic-dev-env",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Scaffold and manage team Agentic Dev Environment (ADE) knowledge repos",
5
5
  "repository": {
6
6
  "type": "git",