azclaude-copilot 0.4.10 → 0.4.13

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-marketplace",
3
- "description": "AZCLAUDE — The operating system for Claude Code",
3
+ "description": "AZCLAUDE — A complete AI coding environment for Claude Code",
4
4
  "owner": {
5
5
  "name": "haytamAroui",
6
6
  "url": "https://github.com/haytamAroui"
@@ -8,8 +8,8 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "azclaude",
11
- "description": "The operating system for Claude Code. Memory, auto-tracking, agents, skills, intelligence, evolutionorchestrating Claude Code's native architecture. Zero external dependencies. One command to set up.",
12
- "version": "1.0.0",
11
+ "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 27 commands, 8 auto-invoked skills, 13 specialized agents, 4 hooks, 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• Security layer — 102-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\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• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /snapshot — save mid-session reasoning (WHY decisions were made) so it's auto-injected at the next session start, surviving context compaction\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
12
+ "version": "0.4.12",
13
13
  "source": {
14
14
  "source": "github",
15
15
  "repo": "haytamAroui/AZ-CLAUDE",
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "azclaude",
3
- "version": "1.0.0",
4
- "description": "The operating system for Claude Code. Memory, auto-tracking, agents, skills, intelligence, evolutionorchestrating Claude Code's native architecture. Zero external dependencies. One command to set up.",
3
+ "version": "0.4.12",
4
+ "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 27 commands, 8 auto-invoked skills, 13 specialized agents, 4 hooks, 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• Security layer — 102-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\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• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /snapshot — save mid-session reasoning (WHY decisions were made) so it's auto-injected at the next session start, surviving context compaction\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",
7
7
  "url": "https://github.com/haytamAroui"
8
8
  },
9
- "homepage": "https://github.com/haytamAroui/AZ-CLAUDE/blob/main/DOCS.md",
10
- "repository": "https://github.com/haytamAroui/AZ-CLAUDE",
9
+ "homepage": "https://github.com/haytamAroui/AZ-CLAUDE-COPILOT/blob/main/DOCS.md",
10
+ "repository": "https://github.com/haytamAroui/AZ-CLAUDE-COPILOT",
11
11
  "license": "MIT",
12
12
  "keywords": ["memory", "setup", "agents", "commands", "context", "lazy-loading", "hooks", "domain-aware"],
13
13
  "commands": "./templates/commands/",
14
14
  "skills": "./templates/skills/",
15
15
  "agents": "./templates/agents/",
16
- "hooks": "./hooks/hooks.json"
16
+ "hooks": "./templates/hooks/hooks.json"
17
17
  }
package/README.md CHANGED
@@ -10,9 +10,11 @@
10
10
  <p align="center">
11
11
  <a href="#install">Install</a> ·
12
12
  <a href="#the-core-idea">Core Idea</a> ·
13
+ <a href="#zero-setup-grows-with-your-project">Zero Setup</a> ·
13
14
  <a href="#what-you-get">What You Get</a> ·
14
15
  <a href="#memory-system">Memory</a> ·
15
- <a href="#all-26-commands">Commands</a> ·
16
+ <a href="#self-improving-loop">Self-Improving Loop</a> ·
17
+ <a href="#all-27-commands">Commands</a> ·
16
18
  <a href="#autonomous-mode">Autonomous Mode</a> ·
17
19
  <a href="DOCS.md">Full Docs</a>
18
20
  </p>
@@ -35,6 +37,8 @@ Claude starts every session blind. Claude reads goals.md before your first me
35
37
  No project conventions. CLAUDE.md has your stack, domain, and rules.
36
38
  Repeats the same mistakes. antipatterns.md prevents known failures.
37
39
  Forgets what was decided. decisions.md logs every architecture choice.
40
+ Loses reasoning mid-session. /snapshot saves WHY — auto-injected next session.
41
+ CLAUDE.md drifts from reality. /reflect finds stale rules and fixes them.
38
42
  Builds the same agent repeatedly. patterns.md encodes what worked.
39
43
  Can't work autonomously. /copilot builds, tests, commits, ships — unattended.
40
44
  ```
@@ -43,6 +47,63 @@ One install. Any stack. Zero dependencies.
43
47
 
44
48
  ---
45
49
 
50
+ ## Zero Setup. Grows With Your Project.
51
+
52
+ Most AI coding tools require upfront decisions: which agents to create, what prompts to write, which skills to define. You can't know that before the project exists.
53
+
54
+ AZCLAUDE inverts this. **You start with almost nothing. The environment builds itself from evidence.**
55
+
56
+ ```bash
57
+ azclaude-copilot setup --full # one command. that's it.
58
+ ```
59
+
60
+ No agent files to write. No skills to configure. No prompt engineering. `setup --full` installs 27 commands, 4 hooks, memory structure, and a manifest. The rest is generated from your actual codebase as you work.
61
+
62
+ **What the environment looks like across sessions:**
63
+
64
+ ```
65
+ Day 1 — /setup runs:
66
+ Scans your code. Detects domain + stack + scale.
67
+ Fills CLAUDE.md with your actual project data (no placeholders).
68
+ Generates 2 project-specific skills from your file patterns.
69
+ Creates goals.md. Hooks are wired.
70
+
71
+ Day 2 — you just work. Hooks observe silently:
72
+ Every edit → breadcrumb in goals.md (automatic)
73
+ Every tool sequence → logged to observations.jsonl (automatic)
74
+ Session end → "In progress" migrates to "Done" (automatic)
75
+ Session start → goals.md + last checkpoint injected (automatic)
76
+
77
+ Day 5 — /evolve reads your git history:
78
+ auth/ files always change together → cc-auth agent created
79
+ 6 locale files always co-edited → i18n-sync skill created
80
+ No decisions made by you. Git evidence decides.
81
+
82
+ Day 10 — /reflect reads friction logs:
83
+ STALE DATA — design tokens in CLAUDE.md don't match codebase
84
+ MISSING RULE — wrong agent routing causing silent failures
85
+ Proposes exact fixes. You approve. CLAUDE.md corrects itself.
86
+
87
+ Day 30 — you finish the project:
88
+ Environment score: 42/100 → 91/100
89
+ Agents specialized to your codebase. Reflexes learned from your patterns.
90
+ CLAUDE.md reflects how the project actually works — not what you guessed on day 1.
91
+ ```
92
+
93
+ **The project you finish with is not the project you started with.** Not because you configured it — because the system learned from the work.
94
+
95
+ ### How lazy loading keeps it fast
96
+
97
+ 37 capability files exist in `.claude/capabilities/`. Without discipline, every task would load all of them. Instead, `manifest.md` acts as a routing table:
98
+
99
+ ```
100
+ CLAUDE.md → read manifest.md → load ONLY the files for this task (~380 tokens)
101
+ ```
102
+
103
+ Claude reads the manifest (one file), finds which 1-3 capability files apply, loads only those. Adding a new agent or skill doesn't increase the cost of unrelated tasks. The environment grows without bloating context.
104
+
105
+ ---
106
+
46
107
  ## Install
47
108
 
48
109
  **Step 1 — Install globally from your terminal:**
@@ -51,13 +112,13 @@ One install. Any stack. Zero dependencies.
51
112
  npm install -g azclaude-copilot@latest
52
113
  ```
53
114
 
54
- **Step 2 — Run setup inside Claude Code to get the full capabilities:**
115
+ **Step 2 — Run setup inside Claude Code:**
55
116
 
56
117
  ```bash
57
118
  azclaude-copilot setup --full
58
119
  ```
59
120
 
60
- That's it. Your project now has AZCLAUDE in `.claude/` — 26 commands, memory, hooks, reflexes, agents, and skills.
121
+ That's it. Your project now has AZCLAUDE in `.claude/` — 27 commands, 4 hooks, memory, reflexes, agents, and skills.
61
122
 
62
123
  ```bash
63
124
  azclaude-copilot doctor # 32 checks — verify everything is wired correctly
@@ -67,18 +128,19 @@ azclaude-copilot doctor # 32 checks — verify everything is wired correctly
67
128
 
68
129
  ## What You Get
69
130
 
70
- **26 commands** · **8 auto-invoked skills** · **10 agents** · **3 hooks** · **memory across sessions** · **learned reflexes** · **self-evolving environment**
131
+ **27 commands** · **8 auto-invoked skills** · **13 agents** · **4 hooks** · **memory across sessions** · **learned reflexes** · **self-evolving environment**
71
132
 
72
133
  ```
73
134
  .claude/
74
135
  ├── CLAUDE.md ← dispatch table: conventions, stack, routing
75
- ├── commands/ ← 26 slash commands (/add, /fix, /audit, /copilot...)
136
+ ├── commands/ ← 27 slash commands (/add, /fix, /copilot, /sentinel...)
76
137
  ├── skills/ ← 8 skills (test-first, security, architecture-advisor...)
77
- ├── agents/ ← 10 agents (orchestrator, code-reviewer, test-writer...)
138
+ ├── agents/ ← 13 agents (orchestrator, code-reviewer, security-auditor...)
78
139
  ├── capabilities/ ← 37 files, lazy-loaded via manifest.md (~380 tokens/task)
79
140
  ├── hooks/
80
- │ ├── post-tool-use.js ← writes breadcrumb to goals.md on every edit
81
141
  │ ├── user-prompt.js ← injects goals.md + checkpoint before your first message
142
+ │ ├── pre-tool-use.js ← blocks hardcoded secrets before any file write
143
+ │ ├── post-tool-use.js ← writes breadcrumb to goals.md on every edit
82
144
  │ └── stop.js ← migrates In-progress → Done, trims, resets counter
83
145
  └── memory/
84
146
  ├── goals.md ← rolling ledger of what changed and why
@@ -102,21 +164,40 @@ azclaude-copilot doctor # 32 checks — verify everything is wired correctly
102
164
 
103
165
  Scans your codebase, detects domain + stack + scale, fills CLAUDE.md, creates goals.md, generates project-specific skills and agents. Run once. After that, every Claude Code session opens with full project context.
104
166
 
105
- ### 2. `/dream` — start from an idea
167
+ ### 2. `/dream` — start from an idea, get a full environment
106
168
 
107
169
  ```
108
170
  /dream "Build a compliance SaaS — FastAPI, Supabase, trilingual"
109
171
  ```
110
172
 
111
- Structured intake → environment scan → builds CLAUDE.md, memory, skills, agents, milestones level by level. If you have a non-developer domain (compliance, finance, medical, legal), it generates a domain-specific advisor skill with decision matrices automatically.
173
+ One command builds everything from scratch:
174
+
175
+ ```
176
+ Phase 1: Asks 4 questions (what, stack, who uses it, what's out of scope)
177
+ Phase 2: Scans existing environment — won't regenerate what already exists
178
+ Phase 3: Builds level by level:
179
+ L1 → CLAUDE.md (project rules + routing)
180
+ L2 → MCP config
181
+ L3 → Skills (project-specific commands)
182
+ L4 → Memory (goals.md + patterns + antipatterns)
183
+ L5 → Agents (specialized for your stack, from git evidence)
184
+ L6 → Hooks (stateful session tracking)
185
+ Phase 3b: Domain advisor skill — auto-generated if non-dev domain detected
186
+ (compliance, finance, medical, legal, logistics, research, marketing)
187
+ Phase 4: Quality gate — won't say "ready" without passing all checks
188
+ ```
189
+
190
+ If your domain is compliance, finance, or medical — it generates a domain-specific advisor skill with decision matrices, thresholds, and anti-patterns automatically.
112
191
 
113
192
  ### 3. `/copilot` — walk away, come back to a product
114
193
 
115
194
  ```bash
116
195
  npx azclaude-copilot . "Build a compliance SaaS with trilingual support"
196
+ # or resume existing run:
197
+ npx azclaude-copilot .
117
198
  ```
118
199
 
119
- Restarts Claude Code sessions in a loop until `COPILOT_COMPLETE`. Each session: reads state, picks next milestone, implements, tests, commits, evolves. No human input needed.
200
+ Node.js runner restarts Claude Code sessions in a loop until `COPILOT_COMPLETE`. Each session reads state, picks next milestone, implements, tests, commits, evolves. No human input needed.
120
201
 
121
202
  ### Day-to-day
122
203
 
@@ -127,10 +208,12 @@ Restarts Claude Code sessions in a loop until `COPILOT_COMPLETE`. Each session:
127
208
  /test # framework detection, exit-code gate, failure classification
128
209
  /evolve # scan for gaps, generate fixes, create agents from evidence
129
210
  /ship # tests → secrets scan → commit → push → deploy
211
+ /sentinel # security scan — scored 0–100, grade A–F, 5 layers, 102 rules
130
212
  /pulse # health check — recent changes, current level, next steps
131
213
  /debate [topic] # adversarial decision protocol with evidence scoring
132
- /blueprint [plan] # read-only analysis plan.md with milestones
133
- /snapshot # save WHY you made decisions run every 15-20 turns
214
+ /snapshot # save WHY you made decisions auto-injected next session
215
+ /reflect # find and fix stale/missing rules in CLAUDE.md
216
+ /reflexes # view learned behavioral patterns with confidence scores
134
217
  ```
135
218
 
136
219
  ---
@@ -142,14 +225,15 @@ The core insight: **Claude needs to see two things at the start of every session
142
225
  ### How it works (zero user input)
143
226
 
144
227
  ```
145
- Every edit: PostToolUse hook breadcrumb appended to goals.md
228
+ Every edit: pre-tool-use.js → blocks hardcoded secrets before write
229
+ post-tool-use.js → breadcrumb appended to goals.md
146
230
  (timestamp, file, diff stats, one-line summary)
147
231
 
148
- Session end: Stop hook → In-progress migrates to Done
232
+ Session end: stop.js → In-progress migrates to Done
149
233
  Trims to 20 Done entries, archives overflow
150
234
  Resets counters
151
235
 
152
- Session start: UserPromptSubmit hook → injects before your first message:
236
+ Session start: user-prompt.js → injects before your first message:
153
237
  ┌─ goals.md (capped: 30 in-progress + 20 done)
154
238
  ├─ latest checkpoint (capped at 50 lines)
155
239
  ├─ plan status: X/N done, Y in-progress, Z blocked [copilot mode]
@@ -161,9 +245,14 @@ Session start: UserPromptSubmit hook → injects before your first message:
161
245
  ### Manual layer (you control)
162
246
 
163
247
  ```bash
164
- /snapshot # save reasoning snapshot — WHY decisions were made
165
- # every 15-20 turns on complex work
166
- # auto-injected at next session start
248
+ /snapshot # save reasoning snapshot — captures:
249
+ # What you're doing right now (specific task, not project description)
250
+ # WHY each decision was made this session
251
+ # • What you know that isn't written down yet ← the key section
252
+ # • Top 3 next actions
253
+ # • Risks and open questions
254
+ # Run every 15–20 turns. Auto-injected at next session start.
255
+ # Protects against context compaction losing mid-session reasoning.
167
256
 
168
257
  /persist # end-of-session: update goals.md, write session narrative
169
258
  # run before closing
@@ -205,6 +294,56 @@ AZCLAUDE_HOOK_PROFILE=strict claude # all + reflex guidance injection
205
294
 
206
295
  ---
207
296
 
297
+ ## Self-Improving Loop
298
+
299
+ AZCLAUDE doesn't just remember — it learns and corrects itself. Three commands form a loop that runs every few sessions:
300
+
301
+ ```
302
+ /reflect → Reads friction logs + session history
303
+ Finds missing rules, dead rules, vague rules, contradicting rules
304
+ Proposes exact CLAUDE.md edits, one finding per change
305
+ You approve → CLAUDE.md gets smarter
306
+
307
+ /reflexes → Reads observations.jsonl (captured automatically by post-tool-use.js)
308
+ Finds tool sequences, file co-access, error→fix pairs, naming patterns
309
+ Creates confidence-scored reflex files (0.3 tentative → 0.9 near-certain)
310
+ Strong reflexes (≥ 0.7) feed into /add behavior automatically
311
+
312
+ /evolve → Detects gaps: stale data, missing capabilities, context rot
313
+ Generates fixes: new skills, new agents, updated patterns
314
+ Quality-gates everything before merging
315
+ Creates agents from git evidence (not guessing)
316
+ Reports score delta (e.g. 42/100 → 68/100 in one cycle)
317
+ ```
318
+
319
+ **Real example — what this loop found on a production project in one run:**
320
+
321
+ ```
322
+ /reflect found:
323
+ MISSING RULE — Wrong agent routing causing silent failures every session
324
+ MISSING RULE — Domain-specific legal term (CAO 98) kept drifting back into code
325
+ STALE DATA — Design tokens in CLAUDE.md were wrong hex values (not matching codebase)
326
+ MISSING ROUTE — Most frequent task had no slash command dispatch
327
+
328
+ /reflexes found (from 78 observations, 3 sessions):
329
+ i18n-all-6-locales (confidence 0.85) → always edit all 6 locale files atomically
330
+ page-tsx-read-before-edit (0.75) → re-read before touching — changes too often
331
+ next-config-build-verify (0.70) → run tsc --noEmit after next.config.ts edits
332
+ vertex-assess-co-edit (0.60) → vertex_client.py and assess_paid.py always coupled
333
+
334
+ /evolve found:
335
+ plan.md frozen at 9/9 done — actually 18 milestones, M12–M18 active
336
+ No i18n-sync skill despite 6-locale changes in every commit
337
+ eu-ai-act-engine skill had no test recipe for zero-coverage modules
338
+ Score: 42/100 → 68/100
339
+ ```
340
+
341
+ All of this without human diagnosis. The system found it, proposed fixes, applied them.
342
+
343
+ **The same loop runs on AZCLAUDE itself.** When sentinel.md had a Windows path bug and a broken agent dispatch — a real project test exposed both. AZCLAUDE diagnosed them, fixed `sentinel.md`, tests went from 1195/1197 to 1197/1197, and shipped v0.4.9.
344
+
345
+ ---
346
+
208
347
  ## Evolution System
209
348
 
210
349
  `/evolve` finds gaps in the environment and fixes them. Three cycles:
@@ -214,7 +353,7 @@ AZCLAUDE_HOOK_PROFILE=strict claude # all + reflex guidance injection
214
353
  - Generates: fixes for each gap
215
354
  - Evaluates: quality-gates before merging (syntax, self-applicability, pressure-test resilience)
216
355
 
217
- **Cycle 2 — Knowledge Consolidation** (every 3+ sessions)
356
+ **Cycle 2 — Knowledge Consolidation** (every 2+ sessions)
218
357
  - Harvests patterns.md and sessions/ by recency + importance
219
358
  - Prunes stale entries, consolidates redundant patterns
220
359
  - Enriches agent definitions with accumulated learnings
@@ -244,6 +383,53 @@ Skills and agents that are project-generic get promoted to `~/shared-skills/`
244
383
 
245
384
  ---
246
385
 
386
+ ## Security
387
+
388
+ Zero dependencies in `package.json`. The only external binary is `claude` (installed separately). No supply-chain risk.
389
+
390
+ **6 layers, 4 enforcement points:**
391
+
392
+ | Layer | Where it runs | What it blocks |
393
+ |-------|--------------|----------------|
394
+ | Hook integrity | Every session start | SHA-256 mismatch → hooks tampered |
395
+ | Secret blocking | `pre-tool-use.js` — before every write | `AKIA*`, `sk-*`, `ghp_*`, `glpat-*`, `xoxb-*`, `-----BEGIN PRIVATE KEY` |
396
+ | Prompt injection defense | `user-prompt.js` — before context injection | `curl\|bash`, `ignore previous instructions`, base64 payloads in goals.md/checkpoints |
397
+ | Environment audit | `/sentinel` — on-demand, 102 rules | Scored 0–100, grade A–F across 5 layers |
398
+ | Pre-ship scan | `/ship` — before every commit | Secrets in staged files, failing tests, IDE errors |
399
+ | Agent scoping | All review agents | Reviewer/auditor agents are read-only — no Write/Edit permissions |
400
+
401
+ ### `/sentinel` — Environment Security Scan
402
+
403
+ ```bash
404
+ /sentinel # full scan (default)
405
+ /sentinel --hooks # Layer 1+2: hook integrity + permissions
406
+ /sentinel --mcp # Layer 3: MCP server secrets and unknown packages
407
+ /sentinel --agents # Layer 4: prompt injection in agent files
408
+ /sentinel --secrets # Layer 5: credentials in committed code
409
+ ```
410
+
411
+ Produces a scored report with verdict: `BLOCKED` / `CLEAR` / `PROCEED WITH CAUTION`.
412
+
413
+ ```
414
+ ╔══════════════════════════════════════════════════╗
415
+ ║ SENTINEL — Environment Security ║
416
+ ╚══════════════════════════════════════════════════╝
417
+
418
+ Layer 1 — Hook Integrity 25/25 ✓ verified
419
+ Layer 2 — Permission Audit 12/20 ⚠ Bash(rm:*) too broad
420
+ Layer 3 — MCP Server Scan 20/20 ✓ clean
421
+ Layer 4 — Agent Config Review 15/15 ✓ no injection found
422
+ Layer 5 — Secrets Scan 18/20 ⚠ API key in settings
423
+ ──────────────────────────────────────────────────
424
+ Total: 90/100 Grade: A Verdict: CLEAR
425
+ ```
426
+
427
+ Any hardcoded secret → `BLOCKED` — `/ship` will not proceed until resolved.
428
+
429
+ See [SECURITY.md](SECURITY.md) for full details.
430
+
431
+ ---
432
+
247
433
  ## Intelligence Layer
248
434
 
249
435
  ### 8 Skills (auto-invoked — no slash command needed)
@@ -295,15 +481,16 @@ When `/dream` or `/setup` detects a non-developer domain, a domain-specific advi
295
481
  Every tool use is observed. Patterns that repeat become reflexes:
296
482
 
297
483
  ```yaml
298
- id: grep-before-edit
299
- trigger: "when modifying code files"
300
- action: "Search with Grep first, confirm with Read, then Edit"
301
- confidence: 0.7 # 0.3 tentative → 0.9 near-certain
302
- evidence_count: 8
484
+ id: i18n-all-6-locales
485
+ trigger: "any src/messages/*.json file is edited"
486
+ action: "edit all 6 locale files in the same operation — never fewer"
487
+ confidence: 0.85 # 0.3 tentative → 0.9 near-certain
488
+ evidence_count: 6
303
489
  domain: workflow
490
+ scope: project # promote to global when seen in 2+ projects at ≥ 0.8
304
491
  ```
305
492
 
306
- - `PostToolUse` hook captures observations to `reflexes/observations.jsonl` automatically
493
+ - `post-tool-use.js` captures observations to `reflexes/observations.jsonl` automatically
307
494
  - 3+ occurrences creates a reflex at confidence 0.3
308
495
  - Confidence rises with confirming observations, decays -0.02/week without use
309
496
  - Strong clusters (3+ reflexes, avg confidence > 0.7) evolve into skills or agents
@@ -343,14 +530,27 @@ Orchestrator Problem-Architect Milestone-Builder
343
530
  Reads plan.md → Analyzes milestone → Pre-reads all files
344
531
  Selects wave Returns Team Spec: Implements
345
532
  Dispatches • agents needed Runs tests
346
- Monitors • skills to load Self-corrects (budget)
533
+ Monitors • skills to load Self-corrects (2 fix attempts)
347
534
  Triggers /evolve • files to pre-read Commits + reports back
348
- Never writes code • Files Written (parallel safety)
535
+ Never writes code • Files Written (parallel
536
+ safety — prevents
537
+ concurrent file corruption)
349
538
  • pre-conditions, risks
350
539
  • complexity (SIMPLE/MEDIUM/COMPLEX)
351
540
  Never implements
352
541
  ```
353
542
 
543
+ **Self-healing protocol — every failure teaches the environment:**
544
+ ```
545
+ Build step fails →
546
+ 1. Re-read the exact error (not a summary)
547
+ 2. Check antipatterns.md — seen this before?
548
+ 3. Try alternative approach
549
+ 4. Record what failed → antipatterns.md
550
+ 5. Record what worked → patterns.md
551
+ Never fail silently.
552
+ ```
553
+
354
554
  **Copilot pipeline:**
355
555
  ```
356
556
  Session 1: /dream → /blueprint (architect annotates milestones) → M1, M2, M3 → /snapshot
@@ -371,7 +571,7 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
371
571
 
372
572
  ---
373
573
 
374
- ## All 26 Commands
574
+ ## All 27 Commands
375
575
 
376
576
  ### Build and Ship
377
577
 
@@ -397,18 +597,19 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
397
597
  |---------|-------------|
398
598
  | `/debate` | Adversarial debate with evidence scoring (AceMAD). Order-independent, length-independent. |
399
599
  | `/evolve` | Detect gaps → generate fixes → quality-gate → create agents from evidence. 3 cycles. |
600
+ | `/sentinel` | Security scan — 5 layers, 102 rules, scored 0–100 (grade A–F). Blocks /ship on findings. |
400
601
  | `/reflexes` | View, analyze, promote learned behavioral patterns. Confidence scoring. |
602
+ | `/reflect` | Self-improve CLAUDE.md. Reads friction logs + session history. Proposes exact rule edits. |
401
603
  | `/level-up` | Show current level (0-10), build the next one progressively. |
402
604
  | `/find` | Search across commands, `~/shared-skills/`, capabilities manifest. |
403
605
  | `/create` | Build a new command with frontmatter, trigger variants, and tests. |
404
- | `/reflect` | Self-improve CLAUDE.md from conversation friction and session history. |
405
606
  | `/hookify` | Generate hooks from friction patterns. 5 hook types (block / warn / remind / inject / track). |
406
607
 
407
608
  ### Memory and Session
408
609
 
409
610
  | Command | What it does |
410
611
  |---------|-------------|
411
- | `/snapshot` | Mid-session: WHY + decisions + what's next. Auto-injected at next session start. |
612
+ | `/snapshot` | Mid-session: WHY + decisions + what isn't written down yet + top 3 next actions. Auto-injected next session. |
412
613
  | `/persist` | End-of-session: update goals.md, write session narrative to `sessions/`. |
413
614
  | `/pulse` | Health check — recent changes, current level, reflexes, blockers, next steps. |
414
615
  | `/explain` | Code or error to plain language. 2-3 paragraphs max. |
@@ -416,7 +617,7 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
416
617
 
417
618
  ---
418
619
 
419
- ## 10 Agents
620
+ ## 13 Agents
420
621
 
421
622
  **Framework agents** (ship with AZCLAUDE, always available):
422
623
 
@@ -427,7 +628,10 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
427
628
  | `milestone-builder` | Base builder. Pre-reads all files, implements, verifies, self-corrects (fix budget), commits, reports. |
428
629
  | `orchestrator-init` | Runs once during `/setup`. Scans project, fills CLAUDE.md, creates goals.md. Exits permanently. |
429
630
  | `loop-controller` | Level 10 autonomous agent. 3 cycles: evolution, knowledge consolidation, topology optimization. |
631
+ | `evolution-module` | Called by orchestrator to run /evolve and /level-up at Level 10. Delegates to loop-controller. |
632
+ | `intelligence-module` | Optional Level 8-9 agent. Pipeline isolation, debate engine, prompt optimization (OPRO), ELO ranking. |
430
633
  | `code-reviewer` | Spec-first review. Stage 1: spec compliance. Stage 2: quality. Read-only. Never modifies files. |
634
+ | `security-auditor` | Pre-ship security scan. 102 rules across 5 layers. Verdict: APPROVE / REQUEST CHANGES / BLOCKED. |
431
635
  | `test-writer` | Reads existing test patterns. Matches framework, style, naming. Writes and runs tests. |
432
636
  | `cc-template-author` | Writes AZCLAUDE template files with proper structure. |
433
637
  | `cc-cli-integrator` | Integrates new features into `bin/cli.js`. |
@@ -437,6 +641,76 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
437
641
  - Named `cc-{area}`, scoped to specific directories
438
642
  - Created when 3+ files in the same area change together across 2+ commits
439
643
  - Every agent has exactly 5 layers: persona, scope, tools, constraints, domain knowledge
644
+ - `cc-` prefix prevents framework collisions (langgraph, crewai, autogen)
645
+
646
+ ---
647
+
648
+ ## Skills vs Agents — The Right Tool
649
+
650
+ Claude Code is already capable. The goal is guidance, not instructions. Before creating an agent, understand what each tool is actually for.
651
+
652
+ ### Skills: project-specific guidance
653
+
654
+ A skill is a markdown file that fires automatically when Claude needs context it can't derive from the code alone. The best skill answers one question: **"In this project, when doing X, what do you need to know that you can't read from the files?"**
655
+
656
+ Skills are NOT:
657
+ - Generic instructions Claude already knows ("write clean code", "add error handling")
658
+ - Boilerplate copied from another project without reading this one first
659
+ - A wrapper around knowledge Claude already has by default
660
+
661
+ Skills ARE:
662
+ - "In this compliance project, every obligation must be traced to an article number — here's the format"
663
+ - "Our auth module uses RS256 not HS256 — here's why and where that decision lives"
664
+ - "The 6 locale files must always be edited atomically — here's the co-edit pattern"
665
+
666
+ `/setup` and `/evolve` generate skills by running `problem-architect` first — it reads your actual file structure, co-change patterns, and conventions, then builds skills around the gaps it finds. Generic skill templates are not installed.
667
+
668
+ ### Agents: only for parallelism and isolation
669
+
670
+ An agent is a sub-process. Use one when you need work to happen **in parallel** or **in a separate context** from the main session. Not for organizing knowledge — skills do that cheaper.
671
+
672
+ **Create an agent when:**
673
+ - Two workstreams can run concurrently (parallel dispatch saves real time)
674
+ - A task must be isolated from main context (experiments, reviews, security scans)
675
+ - There's enough domain depth to justify a dedicated context window (5+ files, unique conventions, a clear scope boundary)
676
+
677
+ **Don't create an agent when:**
678
+ - A tight skill + Claude's native capability already handles it
679
+ - You'd create it just to "have one for auth" or "have one for the frontend"
680
+ - The agent's instructions are things Claude already knows without being told
681
+
682
+ **The test:** Would removing this agent and writing a skill instead produce worse results? If no — use a skill. Agents cost tokens every time they're loaded. A skill that gives Claude the right context is lighter and often better.
683
+
684
+ ### The right order
685
+
686
+ ```
687
+ 1. Craft a skill that gives Claude the project-specific context it's missing
688
+ 2. Watch if the same workflow keeps recurring across sessions (/reflexes will detect it)
689
+ 3. If work can be parallelized OR isolated → promote to an agent
690
+ 4. Let /evolve make the call from git evidence — it sees what actually co-changes
691
+ ```
692
+
693
+ ---
694
+
695
+ ## Progressive Levels (0–10)
696
+
697
+ AZCLAUDE builds capability progressively — start simple, grow into complexity:
698
+
699
+ | Level | What gets built | Trigger |
700
+ |-------|----------------|---------|
701
+ | 0 | Nothing yet | Fresh project |
702
+ | 1 | CLAUDE.md — project rules + dispatch | `/setup` or `/dream` |
703
+ | 2 | MCP config — database, browser, API access | `/level-up` |
704
+ | 3 | Skills — project-specific commands | `/setup` generates ≥ 2 |
705
+ | 4 | Memory — goals.md, patterns, antipatterns | `/setup` |
706
+ | 5 | Agents — from git co-change analysis | `/evolve` after 5+ commits |
707
+ | 6 | Hooks — stateful session tracking | `azclaude-copilot setup` |
708
+ | 7 | External MCP servers | `/level-up` |
709
+ | 8 | Orchestrated pipeline — multi-agent with problem-architect | `/level-up` |
710
+ | 9 | Intelligence — debate, OPRO, ELO, pipeline isolation | `setup --full` |
711
+ | 10 | Self-evolving — loop-controller, 3-cycle autonomous evolution | `/evolve` sustained |
712
+
713
+ Run `/level-up` at any time to see your current level and build the next one.
440
714
 
441
715
  ---
442
716
 
@@ -446,42 +720,29 @@ Session 4: /evolve → /audit → /ship → COPILOT_COMPLETE
446
720
  |---------|------------------|---------|
447
721
  | Project memory | Starts fresh every session | goals.md + checkpoints injected automatically |
448
722
  | Conventions | Ad-hoc, re-explained each time | CLAUDE.md — loaded before every task |
723
+ | Mid-session reasoning | Lost on context compaction | /snapshot saves WHY — auto-injected next session |
449
724
  | Learned behavior | None | Reflexes extracted from tool-use, confidence-scored |
725
+ | CLAUDE.md quality | Drifts, never updated | /reflect finds stale/missing/dead rules and fixes them |
450
726
  | Architecture decisions | Re-debated every time | decisions.md — logged once, referenced forever |
451
727
  | Failed approaches | Repeated | antipatterns.md — agents read before implementing |
728
+ | Security | Manual | 4-layer enforcement: write-time blocking, context scan, audit, pre-ship |
452
729
  | Domain knowledge | Generic | Domain advisors generated for compliance, finance, medical, legal... |
453
730
  | Agent specialization | None | Project agents emerge from git evidence, not guessing |
454
731
  | Autonomous building | Not possible | /copilot — three-tier intelligent team |
455
- | Self-improvement | Not possible | /evolve — 3-cycle environment evolution |
732
+ | Self-improvement | Not possible | /evolve + /reflect + /reflexes — 3-layer environment evolution |
456
733
  | Any stack | Yes | Yes |
457
734
  | You own the code | Yes | Yes |
458
735
  | Zero dependencies | — | Yes (0 in package.json) |
459
736
 
460
737
  ---
461
738
 
462
- ## Security
463
-
464
- Zero dependencies in `package.json`. The only external binary is `claude` (installed separately). No supply-chain risk.
465
-
466
- **6 layers:**
467
- 1. **Hook integrity** — SHA-256 hash verified on every run
468
- 2. **Command injection protection** — shell metacharacters rejected in file paths
469
- 3. **Prompt injection defense** — strips `curl|bash`, `ignore previous instructions`, base64 blocks from context injection
470
- 4. **Skill checksums** — portable skills SHA-256 hashed, imports fail if tampered
471
- 5. **Credential auditing** — `/ship` blocks on `.env`, `AKIA*`, `sk-*`, `ghp_*` before any git push
472
- 6. **Agent scoping** — review agents read-only (`EnterPlanMode`), experiments in isolated worktrees (`EnterWorktree`)
473
-
474
- See [SECURITY.md](SECURITY.md) for full details.
475
-
476
- ---
477
-
478
739
  ## Verified
479
740
 
480
- 1196 tests. Every template, command, capability, agent, hook, and CLI feature verified.
741
+ 1353 tests. Every template, command, capability, agent, hook, and CLI feature verified.
481
742
 
482
743
  ```bash
483
744
  bash tests/test-features.sh
484
- # Results: 1196 passed, 0 failed, 1196 total
745
+ # Results: 1353 passed, 0 failed, 1353 total
485
746
  ```
486
747
 
487
748
  ---
package/bin/cli.js CHANGED
@@ -8,7 +8,7 @@ const { execSync } = require('child_process');
8
8
 
9
9
  const TEMPLATE_DIR = path.join(__dirname, '..', 'templates');
10
10
  const CORE_COMMANDS = ['setup', 'fix', 'add', 'audit', 'test', 'blueprint', 'ship', 'pulse', 'explain', 'snapshot', 'persist'];
11
- const EXTENDED_COMMANDS = ['dream', 'refactor', 'doc', 'loop', 'migrate', 'deps', 'find', 'create', 'reflect', 'hookify', 'sentinel'];
11
+ const EXTENDED_COMMANDS = ['dream', 'refactor', 'doc', 'loop', 'migrate', 'deps', 'find', 'create', 'reflect', 'hookify', 'sentinel', 'clarify', 'spec', 'analyze', 'constitute', 'tasks', 'issues'];
12
12
  const ADVANCED_COMMANDS = ['evolve', 'debate', 'level-up', 'copilot', 'reflexes'];
13
13
  const COMMANDS = [...CORE_COMMANDS, ...EXTENDED_COMMANDS, ...ADVANCED_COMMANDS];
14
14
 
@@ -428,7 +428,7 @@ function installScripts(projectDir, cfg) {
428
428
 
429
429
  // ─── Agents ───────────────────────────────────────────────────────────────────
430
430
 
431
- const AGENTS = ['orchestrator-init', 'code-reviewer', 'test-writer', 'loop-controller', 'cc-template-author', 'cc-cli-integrator', 'cc-test-maintainer', 'orchestrator', 'problem-architect', 'milestone-builder', 'security-auditor'];
431
+ const AGENTS = ['orchestrator-init', 'code-reviewer', 'test-writer', 'loop-controller', 'cc-template-author', 'cc-cli-integrator', 'cc-test-maintainer', 'orchestrator', 'problem-architect', 'milestone-builder', 'security-auditor', 'spec-reviewer', 'constitution-guard'];
432
432
 
433
433
  function installAgents(projectDir, cfg) {
434
434
  const agentsDir = path.join(projectDir, cfg, 'agents');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.4.10",
4
- "description": "AI coding environment — 26 commands, 8 skills, 10 agents, memory, reflexes, evolution. Install: npm install -g azclaude-copilot@latest, then in Claude Code: azclaude-copilot setup --full",
3
+ "version": "0.4.13",
4
+ "description": "AI coding environment — 27 commands, 8 skills, 13 agents, memory, reflexes, evolution. Install: npm install -g azclaude-copilot@latest, then in Claude Code: azclaude-copilot setup --full",
5
5
  "bin": {
6
6
  "azclaude": "bin/cli.js",
7
7
  "azclaude-copilot": "bin/copilot.js"