azclaude-copilot 0.7.13 → 0.7.15

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.
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "azclaude",
11
11
  "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 42 commands, 10 auto-invoked skills, 15 specialized agents, 5 hooks, a real-time pipeline visualizer, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
12
- "version": "0.7.13",
12
+ "version": "0.7.15",
13
13
  "source": {
14
14
  "source": "github",
15
15
  "repo": "haytamAroui/AZ-CLAUDE-COPILOT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude",
3
- "version": "0.7.13",
3
+ "version": "0.7.15",
4
4
  "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 42 commands, 10 auto-invoked skills, 15 specialized agents, 5 hooks, a real-time pipeline visualizer, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
5
5
  "author": {
6
6
  "name": "haytamAroui",
package/README.md CHANGED
@@ -637,11 +637,11 @@ AZCLAUDE is a lazy-loaded environment of 48 capability modules. It only loads wh
637
637
 
638
638
  ## Verified
639
639
 
640
- 1996 tests. Every template, command, capability, agent, hook, and CLI feature verified.
640
+ 2024 tests. Every template, command, capability, agent, hook, and CLI feature verified.
641
641
 
642
642
  ```bash
643
643
  bash tests/test-features.sh
644
- # Results: 1996 passed, 0 failed, 1996 total
644
+ # Results: 2024 passed, 0 failed, 2024 total
645
645
  ```
646
646
 
647
647
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.7.13",
3
+ "version": "0.7.15",
4
4
  "description": "AI coding environment — 42 commands, 10 skills, 15 agents, real-time visualizer, memory, reflexes, evolution. Install: npx azclaude-copilot@latest, then open Claude Code.",
5
5
  "bin": {
6
6
  "azclaude": "bin/cli.js",
@@ -211,9 +211,14 @@ Load `capabilities/shared/context-relay.md` for relay protocol and role-based fi
211
211
  7. **Model routing** — read `Model Recommendation` from each Team Spec. Pass it as `model: "{value}"` on the Task/Agent call. If absent, fall back to the agent's frontmatter `model:` field. Model selection varies per milestone — always use the actual recommendation, not a hardcoded assumption.
212
212
  8. Spawn each builder via Task with `isolation: "worktree"` and `model: "{from Team Spec}"` in the same message (true parallel)
213
213
  9. Include worktree rules + **test scope** (`Test scope: {test-dir}`) in every parallel prompt
214
- 10. **Merge-on-complete**: as each agent reports done, merge its branch immediately (don't wait for all)
215
- 11. After each merge: check if newly-unblocked milestones existdispatch them immediately
216
- 12. If `max_parallel <= 3` or merge conflicts detected: fall back to batch-merge (wait for all, then merge)
214
+ 10. **Mid-flight control** while agents run, monitor their partial progress reports via SendMessage:
215
+ - Agent reports progress (not final result) + new information changes the spec `SendMessage({ to: agentId, message: "Revised scope: ..." })`
216
+ - Agent appears stuck (no output for 3+ turns after dispatch) → `SendMessage({ to: agentId, message: "Status check what's blocking you?" })`
217
+ - Scope needs adjusting due to a sibling agent's discovery → `SendMessage` with revised file list before the affected agent reaches that file
218
+ - Agent reports a blocker it cannot resolve → `SendMessage` with the resolution, or redirect to a different approach
219
+ 11. **Merge-on-complete**: as each agent reports final result (not partial), merge its branch immediately (don't wait for all)
220
+ 12. After each merge: check if newly-unblocked milestones exist → dispatch them immediately
221
+ 13. If `max_parallel <= 3` or merge conflicts detected: fall back to batch-merge (wait for all, then merge)
217
222
 
218
223
  **Sequential dispatch (single milestone OR overlapping files):**
219
224
 
@@ -36,7 +36,8 @@ If `$ARGUMENTS` contains `--deep`:
36
36
 
37
37
  ---
38
38
 
39
- **EnterPlanMode**read and think only. No file modifications until Step 4.
39
+ Call the `EnterPlanMode` tool NOW this enforces read-only mode at the kernel level.
40
+ No file edits are possible until you call `ExitPlanMode` at Step 4: Approval Gate.
40
41
 
41
42
  ---
42
43
 
@@ -6,7 +6,7 @@ description: >
6
6
  "port still in use", "EADDRINUSE", "address already in use", "stop all servers",
7
7
  "kill background processes", "clean up ports".
8
8
  Safe by design — only kills processes bound to TCP ports, never MCP servers (stdio, no ports).
9
- argument-hint: "[port number | --all (default) | --ports 3000,8080]"
9
+ argument-hint: "[port number | --all | --ports 3000,8080]"
10
10
  disable-model-invocation: false
11
11
  allowed-tools: Bash, Read, Glob
12
12
  ---
@@ -27,50 +27,84 @@ Any process on a TCP port is a dev/test server, not Claude infrastructure.
27
27
 
28
28
  ## Step 1 — Parse target ports
29
29
 
30
- **If $ARGUMENTS contains a port number** (e.g., `/kill 3000`):
30
+ **If $ARGUMENTS contains a port number** (e.g., `/kill 8005`):
31
31
  → Kill only that specific port. Skip to Step 3.
32
32
 
33
- **If $ARGUMENTS is `--ports <list>`** (e.g., `/kill --ports 3000,5173`):
33
+ **If $ARGUMENTS is `--ports <list>`** (e.g., `/kill --ports 3000,8005`):
34
34
  → Parse the comma-separated list. Skip to Step 3.
35
35
 
36
- **Default (`--all` or no argument)**:
37
- Target the full dev port list below. Continue to Step 2.
36
+ **`--all` or no argument**:
37
+ Scan every active listening TCP port on this machine (dynamic not a hardcoded list).
38
+ → Continue to Step 2a.
38
39
 
39
- ### Default dev port list
40
+ > Use `--all` when you have custom ports (e.g., 8005, 9999, any port not in a standard list).
41
+ > `/kill 8005` also works to target a single non-standard port directly.
42
+
43
+ ### Common dev ports (reference only — `--all` does NOT use this list)
40
44
  ```
41
45
  3000 3001 3002 3003 4000 4200 4321
42
46
  5000 5001 5173 5174 6006 7000 8000
43
- 8001 8080 8081 8888 9000 9001 9229
47
+ 8001 8005 8080 8081 8888 9000 9001 9229
48
+ ```
49
+ > 9229 is Node.js debugger. Kill only if you're not actively debugging.
50
+
51
+ ---
52
+
53
+ ## Step 2a — Discover ALL listening ports (used by `--all` / no argument)
54
+
55
+ **Unix/macOS:**
56
+ ```bash
57
+ # Get every TCP port in LISTEN state — no hardcoded list needed
58
+ lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | awk 'NR>1 {print $9}' | sed 's/.*://' | sort -nu
59
+ ```
60
+
61
+ **Windows:**
62
+ ```bash
63
+ netstat -ano 2>/dev/null | grep "LISTENING" | awk '{print $2}' | sed 's/.*://' | sort -nu
44
64
  ```
45
65
 
46
- > Note: 9229 is Node.js debugger. Kill only if you're not actively debugging.
66
+ Print each discovered port and its PID + process name:
67
+
68
+ **Unix/macOS:**
69
+ ```bash
70
+ lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | awk 'NR>1 {print $2, $9, $1}' | sed 's/ .*:/ PORT /' | sort -k2 -n
71
+ ```
72
+
73
+ **Windows:**
74
+ ```bash
75
+ netstat -ano 2>/dev/null | grep "LISTENING" | awk '{print $2, $5}' | sed 's/.*://' | sort -k1 -n
76
+ ```
77
+
78
+ If no ports found: print `No listening TCP servers found.` and stop.
47
79
 
48
80
  ---
49
81
 
50
- ## Step 2 — Detect which ports are actually in use
82
+ ## Step 2b — Detect specific ports (used by `/kill 8005` or `/kill --ports ...`)
51
83
 
52
84
  **Unix/macOS:**
53
85
  ```bash
54
- for port in 3000 3001 3002 3003 4000 4200 4321 5000 5001 5173 5174 6006 7000 8000 8001 8080 8081 8888 9000 9001 9229; do
86
+ for port in <PORTS>; do
55
87
  pid=$(lsof -ti tcp:$port 2>/dev/null)
56
88
  if [ -n "$pid" ]; then
57
89
  echo " PORT $port → PID $pid ($(ps -p $pid -o comm= 2>/dev/null))"
90
+ else
91
+ echo " PORT $port → not in use"
58
92
  fi
59
93
  done
60
94
  ```
61
95
 
62
96
  **Windows:**
63
97
  ```bash
64
- for port in 3000 3001 3002 3003 4000 4200 4321 5000 5001 5173 5174 6006 7000 8000 8001 8080 8081 8888 9000 9001 9229; do
98
+ for port in <PORTS>; do
65
99
  result=$(netstat -ano 2>/dev/null | grep ":$port " | grep LISTENING | awk '{print $5}' | head -1)
66
100
  if [ -n "$result" ]; then
67
101
  echo " PORT $port → PID $result"
102
+ else
103
+ echo " PORT $port → not in use"
68
104
  fi
69
105
  done
70
106
  ```
71
107
 
72
- Print summary of occupied ports. If none found: print `No dev servers found on standard ports.` and stop.
73
-
74
108
  ---
75
109
 
76
110
  ## Step 3 — Kill strategy
@@ -79,9 +113,9 @@ Print summary of occupied ports. If none found: print `No dev servers found on s
79
113
  ```bash
80
114
  npx --yes kill-port <PORTS>
81
115
  ```
82
- Example: `npx --yes kill-port 3000 5173 8080`
116
+ Example: `npx --yes kill-port 8005 3000 5173`
83
117
 
84
- This is safe, silent on ports that are already free, and exits 0 on success.
118
+ Silent on ports already free, exits 0 on success.
85
119
 
86
120
  ### Fallback — Unix/macOS (if npx not available):
87
121
  ```bash
@@ -106,11 +140,11 @@ done
106
140
 
107
141
  ## Step 4 — Verify
108
142
 
109
- After killing, re-run the detection from Step 2.
143
+ Re-run the detection from Step 2a or 2b (matching what was used).
110
144
 
111
145
  **Expected output:**
112
146
  ```
113
- No dev servers found on standard ports.
147
+ No listening TCP servers found.
114
148
  ```
115
149
 
116
150
  If any port is still occupied: report it and its PID. Do not retry — report to user.
@@ -121,7 +155,7 @@ If any port is still occupied: report it and its PID. Do not retry — report to
121
155
 
122
156
  Print a summary:
123
157
  ```
124
- Killed: ports 3000, 5173
158
+ Killed: ports 8005, 3000, 5173
125
159
  Still running: (none)
126
160
  ```
127
161
 
@@ -379,6 +379,16 @@ if (fs.existsSync(blockersPath)) {
379
379
  } catch (_) {}
380
380
  }
381
381
 
382
+ // ── Staleness helper — warns when memory files are older than 1 day ──────────
383
+ // File:line references and architecture decisions go stale fast.
384
+ // Claude Code natively warns on memories > 1 day old — AZCLAUDE matches that.
385
+ function _staleWarning(filePath) {
386
+ try {
387
+ const ageDays = Math.floor((Date.now() - fs.statSync(filePath).mtimeMs) / 86_400_000);
388
+ return ageDays > 1 ? `\n⚠ This memory is ${ageDays} day${ageDays > 1 ? 's' : ''} old — verify file:line references against current code before asserting as fact.` : '';
389
+ } catch (_) { return ''; }
390
+ }
391
+
382
392
  // ── Inject architecture decisions if present ────────────────────────────────
383
393
  const decisionsPath = path.join('.claude', 'memory', 'decisions.md');
384
394
  if (fs.existsSync(decisionsPath)) {
@@ -387,10 +397,12 @@ if (fs.existsSync(decisionsPath)) {
387
397
  if (decisionsContent.length > 0) {
388
398
  const decisionsLines = decisionsContent.split('\n').filter(l => !INJECTION.test(l));
389
399
  const capped = decisionsLines.slice(0, 30);
400
+ const stale = _staleWarning(decisionsPath);
390
401
  console.log('');
391
402
  console.log('--- ARCHITECTURE DECISIONS ---');
392
403
  console.log(capped.join('\n'));
393
404
  if (decisionsLines.length > 30) console.log(`... ${decisionsLines.length - 30} more lines (on disk)`);
405
+ if (stale) console.log(stale);
394
406
  console.log('--- END DECISIONS ---');
395
407
  }
396
408
  } catch (_) {}
@@ -404,10 +416,12 @@ if (fs.existsSync(patternsPath)) {
404
416
  if (patternsContent.length > 0) {
405
417
  const patternsLines = patternsContent.split('\n').filter(l => !INJECTION.test(l));
406
418
  const capped = patternsLines.slice(0, 20);
419
+ const stale = _staleWarning(patternsPath);
407
420
  console.log('');
408
421
  console.log('--- CODE PATTERNS ---');
409
422
  console.log(capped.join('\n'));
410
423
  if (patternsLines.length > 20) console.log(`... ${patternsLines.length - 20} more lines (on disk)`);
424
+ if (stale) console.log(stale);
411
425
  console.log('--- END PATTERNS ---');
412
426
  }
413
427
  } catch (_) {}
@@ -428,9 +442,11 @@ if (fs.existsSync(checkpointDir)) {
428
442
  const cpTrimmed = cpLines.length > MAX_CP
429
443
  ? cpLines.slice(0, MAX_CP).concat([`... ${cpLines.length - MAX_CP} more lines (on disk)`])
430
444
  : cpLines;
445
+ const stale = _staleWarning(latest);
431
446
  console.log('');
432
447
  console.log(`--- LAST CHECKPOINT (${files[0]}) ---`);
433
448
  console.log(cpTrimmed.join('\n').trim());
449
+ if (stale) console.log(stale);
434
450
  console.log('--- END CHECKPOINT ---');
435
451
  }
436
452
  }