azclaude-copilot 0.3.1 → 0.3.2

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 (3) hide show
  1. package/README.md +3 -3
  2. package/bin/cli.js +30 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -430,7 +430,7 @@ azclaude-copilot/
430
430
  ├── DOCS.md <- full user guide
431
431
  ├── SECURITY.md <- security policy + architecture
432
432
  ├── tests/
433
- │ └── test-features.sh ← 1055 tests
433
+ │ └── test-features.sh ← 1058 tests
434
434
  ```
435
435
 
436
436
  ---
@@ -456,11 +456,11 @@ The runner is stateless. These files ARE the state.
456
456
 
457
457
  ## Verified
458
458
 
459
- 1055 tests. Every template, command, capability, agent, and CLI feature verified.
459
+ 1058 tests. Every template, command, capability, agent, and CLI feature verified.
460
460
 
461
461
  ```bash
462
462
  bash tests/test-features.sh
463
- # Results: 1055 passed, 0 failed, 1055 total
463
+ # Results: 1058 passed, 0 failed, 1058 total
464
464
  ```
465
465
 
466
466
  ---
package/bin/cli.js CHANGED
@@ -341,11 +341,20 @@ function installCommands(projectDir, cfg) {
341
341
  for (const cmd of COMMANDS) {
342
342
  const src = path.join(TEMPLATE_DIR, 'commands', `${cmd}.md`);
343
343
  const dst = path.join(commandsDir, `${cmd}.md`);
344
- if (!fs.existsSync(dst) && fs.existsSync(src)) {
344
+ if (!fs.existsSync(src)) continue;
345
+ if (!fs.existsSync(dst)) {
345
346
  fs.copyFileSync(src, dst);
346
347
  ok(`/${cmd} installed`);
347
- } else if (fs.existsSync(dst)) {
348
- info(`/${cmd} already exists skipping`);
348
+ } else if (forceUpdate) {
349
+ // --update: overwrite with latest template
350
+ const srcContent = fs.readFileSync(src, 'utf8');
351
+ const dstContent = fs.readFileSync(dst, 'utf8');
352
+ if (srcContent !== dstContent) {
353
+ fs.copyFileSync(src, dst);
354
+ ok(`/${cmd} updated (--update)`);
355
+ }
356
+ } else {
357
+ info(`/${cmd} already exists — skipping (use --update to refresh)`);
349
358
  }
350
359
  }
351
360
  }
@@ -374,6 +383,13 @@ function installSkills(projectDir, cfg) {
374
383
  if (fs.existsSync(subSrc)) copyDir(subSrc, path.join(dstDir, sub));
375
384
  }
376
385
  ok(`${skill} skill installed (auto-invoked by model)`);
386
+ } else if (forceUpdate && fs.existsSync(src)) {
387
+ const srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
388
+ const dstContent = fs.readFileSync(dst, 'utf8');
389
+ if (srcContent !== dstContent) {
390
+ fs.writeFileSync(dst, srcContent);
391
+ ok(`${skill} skill updated (--update)`);
392
+ }
377
393
  } else if (fs.existsSync(dst)) {
378
394
  info(`${skill} skill already exists — skipping`);
379
395
  }
@@ -409,10 +425,18 @@ function installAgents(projectDir, cfg) {
409
425
  for (const agent of AGENTS) {
410
426
  const src = path.join(TEMPLATE_DIR, 'agents', `${agent}.md`);
411
427
  const dst = path.join(agentsDir, `${agent}.md`);
412
- if (!fs.existsSync(dst) && fs.existsSync(src)) {
428
+ if (!fs.existsSync(src)) continue;
429
+ if (!fs.existsSync(dst)) {
413
430
  const content = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
414
431
  fs.writeFileSync(dst, content);
415
432
  ok(`${agent} agent installed`);
433
+ } else if (forceUpdate) {
434
+ const srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
435
+ const dstContent = fs.readFileSync(dst, 'utf8');
436
+ if (srcContent !== dstContent) {
437
+ fs.writeFileSync(dst, srcContent);
438
+ ok(`${agent} agent updated (--update)`);
439
+ }
416
440
  }
417
441
  }
418
442
  }
@@ -1018,12 +1042,14 @@ if (process.argv[2] === 'copilot') {
1018
1042
  }
1019
1043
 
1020
1044
  const fullInstall = process.argv.includes('--full');
1045
+ const forceUpdate = process.argv.includes('--update');
1021
1046
  const projectDir = process.cwd();
1022
1047
  const cli = detectCLI();
1023
1048
 
1024
1049
  console.log('\n════════════════════════════════════════════════');
1025
1050
  console.log(' AZCLAUDE — AI Coding Environment');
1026
1051
  console.log(` CLI: ${cli.name} → installing to ${cli.cfg}/`);
1052
+ if (forceUpdate) console.log(' Mode: --update (refreshing all templates)');
1027
1053
  console.log('════════════════════════════════════════════════\n');
1028
1054
 
1029
1055
  // ── Detect conflicting installations ─────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "AI coding environment — 26 commands, 8 skills, 7 agents, memory, reflexes, evolution. Install once, works on any stack.",
5
5
  "bin": {
6
6
  "azclaude": "./bin/cli.js",