azclaude-copilot 0.2.2 → 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.
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 ← 1048 tests
433
+ │ └── test-features.sh ← 1055 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
- 1048 tests. Every template, command, capability, agent, and CLI feature verified.
459
+ 1055 tests. Every template, command, capability, agent, and CLI feature verified.
460
460
 
461
461
  ```bash
462
462
  bash tests/test-features.sh
463
- # Results: 1048 passed, 0 failed, 1048 total
463
+ # Results: 1055 passed, 0 failed, 1055 total
464
464
  ```
465
465
 
466
466
  ---
package/bin/cli.js CHANGED
@@ -417,6 +417,46 @@ function installAgents(projectDir, cfg) {
417
417
  }
418
418
  }
419
419
 
420
+ // ─── Capability Reference Verification ───────────────────────────────────────
421
+
422
+ function verifyCapabilityReferences(projectDir, cfg) {
423
+ const dirsToScan = [
424
+ path.join(projectDir, cfg, 'commands'),
425
+ path.join(projectDir, cfg, 'agents'),
426
+ ];
427
+ const capPattern = /capabilities\/[^\s)}\]"'`,]+/g;
428
+ let checked = 0, missing = 0;
429
+ const seen = new Set();
430
+
431
+ for (const dir of dirsToScan) {
432
+ if (!fs.existsSync(dir)) continue;
433
+ const files = fs.readdirSync(dir).filter(f => f.endsWith('.md'));
434
+ for (const file of files) {
435
+ const content = fs.readFileSync(path.join(dir, file), 'utf8');
436
+ const matches = content.match(capPattern);
437
+ if (!matches) continue;
438
+ for (const ref of matches) {
439
+ const key = ref;
440
+ if (seen.has(key)) continue;
441
+ seen.add(key);
442
+ checked++;
443
+ // Resolve relative to cfg dir (e.g. .claude/capabilities/shared/tdd.md)
444
+ const resolved = path.join(projectDir, cfg, ref);
445
+ if (!fs.existsSync(resolved)) {
446
+ warn(`Capability ref not found: ${ref} (in ${path.basename(dir)}/${file})`);
447
+ missing++;
448
+ }
449
+ }
450
+ }
451
+ }
452
+
453
+ if (checked > 0 && missing === 0) {
454
+ ok(`Capability references verified — ${checked} refs, all resolve`);
455
+ } else if (missing > 0) {
456
+ warn(`Capability references: ${missing}/${checked} missing — fix or remove stale refs`);
457
+ }
458
+ }
459
+
420
460
  // ─── Rules File (CLAUDE.md / GEMINI.md / AGENTS.md) ──────────────────────────
421
461
 
422
462
  function installRulesFile(projectDir, cfg, rulesFile) {
@@ -986,6 +1026,23 @@ console.log(' AZCLAUDE — AI Coding Environment');
986
1026
  console.log(` CLI: ${cli.name} → installing to ${cli.cfg}/`);
987
1027
  console.log('════════════════════════════════════════════════\n');
988
1028
 
1029
+ // ── Detect conflicting installations ─────────────────────────────────────────
1030
+ const CLI_DIRS = ['.claude', '.gemini', '.opencode', '.codex', '.cursor'];
1031
+ const existing = CLI_DIRS.filter(d => {
1032
+ const p = path.join(projectDir, d);
1033
+ return fs.existsSync(p) && fs.statSync(p).isDirectory() && d !== cli.cfg;
1034
+ }).filter(d => {
1035
+ // Only flag dirs that have AZCLAUDE content (commands/ or settings)
1036
+ const p = path.join(projectDir, d);
1037
+ return fs.existsSync(path.join(p, 'commands')) || fs.existsSync(path.join(p, 'settings.local.json'));
1038
+ });
1039
+
1040
+ if (existing.length > 0) {
1041
+ warn(`Found AZCLAUDE in other CLI directories: ${existing.join(', ')}`);
1042
+ warn(`Installing to ${cli.cfg}/ — the other directories may be stale.`);
1043
+ warn(`Consider removing stale dirs: ${existing.map(d => `rm -rf ${d}`).join(', ')}`);
1044
+ }
1045
+
989
1046
  verifyIntegrity(projectDir, cli.cfg, cli);
990
1047
 
991
1048
  // Hooks: project-scoped by default (settings.local.json), global as fallback
@@ -1011,6 +1068,9 @@ if (!fs.existsSync(evolLogPath)) {
1011
1068
  try { fs.writeFileSync(evolLogPath, header); } catch (_) {}
1012
1069
  }
1013
1070
 
1071
+ // ── Post-install capability reference verification ───────────────────────────
1072
+ verifyCapabilityReferences(projectDir, cli.cfg);
1073
+
1014
1074
  // ── Post-install boundary check (warn if collisions detected) ────────────────
1015
1075
  const postInstallValidator = path.join(projectDir, cli.cfg, 'scripts', 'validate-boundaries.sh');
1016
1076
  if (fs.existsSync(postInstallValidator)) {
package/bin/copilot.js CHANGED
@@ -36,9 +36,11 @@ if (args[0] && SUBCOMMANDS.includes(args[0].toLowerCase())) {
36
36
  process.exit(r.status || 0);
37
37
  }
38
38
 
39
- const projectDir = path.resolve(args[0] || '.');
40
- const intentArg = args[1] || '';
41
- const maxSessions = parseInt(args[2] || '20', 10);
39
+ const deepMode = args.includes('--deep');
40
+ const filteredArgs = args.filter(a => a !== '--deep');
41
+ const projectDir = path.resolve(filteredArgs[0] || '.');
42
+ const intentArg = filteredArgs[1] || '';
43
+ const maxSessions = parseInt(filteredArgs[2] || '20', 10);
42
44
 
43
45
  if (args.includes('--help') || args.includes('-h')) {
44
46
  console.log(`
@@ -57,6 +59,7 @@ if (args.includes('--help') || args.includes('-h')) {
57
59
 
58
60
  Options:
59
61
  --help, -h Show this help
62
+ --deep Enable deep audit mode (content accuracy, UX, links, a11y)
60
63
  max-sessions Maximum sessions before stopping (default: 20)
61
64
  `);
62
65
  process.exit(0);
@@ -177,6 +180,15 @@ for (let session = 1; session <= maxSessions; session++) {
177
180
  prompt += `\n\nOriginal intent: ${intent}`;
178
181
  prompt += `\n\nSession ${session}/${maxSessions}.`;
179
182
 
183
+ if (deepMode) {
184
+ prompt += '\n\nDEEP MODE: After code audit passes, also run:';
185
+ prompt += '\n1. Content accuracy audit — verify facts, percentages, links against source material';
186
+ prompt += '\n2. UX heuristic check — scroll depth, navigation efficiency, mobile responsiveness';
187
+ prompt += '\n3. Link validation — verify all internal/external links resolve';
188
+ prompt += '\n4. Accessibility audit — screen reader flow, focus order, color contrast';
189
+ prompt += '\nDo NOT declare COPILOT_COMPLETE until deep checks pass.';
190
+ }
191
+
180
192
  if (resuming || session > 1) {
181
193
  // Parse plan.md for milestone progress
182
194
  if (fs.existsSync(planPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
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",
@@ -107,6 +107,19 @@ Issues:
107
107
 
108
108
  ---
109
109
 
110
+ ## Content Audit (educational/documentation projects only)
111
+
112
+ Detect: `ls **/course* **/exam* **/quiz* **/lesson* knowledge/ docs/courses/ 2>/dev/null`
113
+
114
+ If educational content detected:
115
+ 1. **Weight/percentage validation** — compare any stated percentages against source material
116
+ 2. **Internal link check** — verify all markdown links resolve to existing files/anchors
117
+ 3. **Content completeness** — check each section has substantive content (not just headers)
118
+ 4. **Consistency check** — domain names, numbering, terminology used consistently
119
+ 5. **Scroll depth warning** — flag any single page with 3000+ words (suggest splitting)
120
+
121
+ ---
122
+
110
123
  ## Completion Rule
111
124
 
112
125
  **ExitPlanMode**
@@ -127,6 +127,11 @@ Skip if project has < 10 files or < 5 commits.
127
127
 
128
128
  Load `capabilities/shared/quality-check.md` and run the full environment check.
129
129
 
130
+ Verify all capability file references in commands and agents resolve to existing files:
131
+ - Grep all `.claude/commands/*.md` and `.claude/agents/*.md` for `capabilities/` references
132
+ - Check each referenced path exists under `.claude/`
133
+ - Warn on any missing references — stale refs cause silent load failures
134
+
130
135
  **TaskUpdate → completed** for Run quality check.
131
136
 
132
137
  All ✓ required before printing "Setup complete."