azclaude-copilot 0.4.37 → 0.4.38
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +309 -418
- package/hooks/hooks.json +13 -1
- package/package.json +1 -1
- package/templates/hooks/post-tool-use.js +4 -3
|
@@ -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 37 commands, 9 auto-invoked skills, 15 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• 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.4.
|
|
12
|
+
"version": "0.4.38",
|
|
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.4.
|
|
3
|
+
"version": "0.4.38",
|
|
4
4
|
"description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 37 commands, 9 auto-invoked skills, 15 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• 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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<a href="#spec-driven-workflow">Spec-Driven</a> ·
|
|
16
16
|
<a href="#memory-system">Memory</a> ·
|
|
17
17
|
<a href="#self-improving-loop">Self-Improving Loop</a> ·
|
|
18
|
-
<a href="#all-
|
|
18
|
+
<a href="#all-37-commands">Commands</a> ·
|
|
19
19
|
<a href="#parallel-execution">Parallel</a> ·
|
|
20
20
|
<a href="#mcp-integration">MCP</a> ·
|
|
21
21
|
<a href="#autonomous-mode">Autonomous Mode</a> ·
|
|
@@ -47,6 +47,7 @@ Can't work autonomously. /copilot builds, tests, commits, ships —
|
|
|
47
47
|
Plans without requirements. /spec writes structured specs before any code is planned.
|
|
48
48
|
Milestones violate project rules. constitution-guard blocks non-compliant milestones.
|
|
49
49
|
Plan drifts from what was built. /analyze catches ghost milestones before they ship.
|
|
50
|
+
Agents run serially, one at a time. Task Classifier + parallel waves run agents simultaneously.
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
One install. Any stack. Zero dependencies.
|
|
@@ -106,19 +107,18 @@ Day 30 — you finish the project:
|
|
|
106
107
|
CLAUDE.md → read manifest.md → load ONLY the files for this task (~380 tokens)
|
|
107
108
|
```
|
|
108
109
|
|
|
109
|
-
Claude reads the manifest (one file), finds which 1
|
|
110
|
+
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.
|
|
110
111
|
|
|
111
112
|
---
|
|
112
113
|
|
|
113
114
|
## Install
|
|
114
115
|
|
|
115
|
-
**Step 1 — Install globally from your terminal:**
|
|
116
|
-
|
|
117
116
|
```bash
|
|
118
117
|
npx azclaude-copilot@latest
|
|
119
118
|
```
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
One command, no flags. Auto-detects whether this is a fresh install or an upgrade:
|
|
121
|
+
|
|
122
122
|
- **First time** → full install (37 commands, 4 hooks, 15 agents, 10 skills, memory, reflexes)
|
|
123
123
|
- **Already installed, older version** → auto-upgrades everything to latest templates
|
|
124
124
|
- **Already up to date** → verifies, no overwrites
|
|
@@ -131,15 +131,15 @@ npx azclaude-copilot@latest doctor # 32 checks — verify everything is wired
|
|
|
131
131
|
|
|
132
132
|
## What You Get
|
|
133
133
|
|
|
134
|
-
**37 commands** · **
|
|
134
|
+
**37 commands** · **10 auto-invoked skills** · **15 agents** · **4 hooks** · **memory across sessions** · **learned reflexes** · **self-evolving environment**
|
|
135
135
|
|
|
136
136
|
```
|
|
137
137
|
.claude/
|
|
138
138
|
├── CLAUDE.md ← dispatch table: conventions, stack, routing
|
|
139
|
-
├── commands/ ←
|
|
139
|
+
├── commands/ ← 37 slash commands (/add, /fix, /copilot, /parallel, /mcp, /sentinel...)
|
|
140
140
|
├── skills/ ← 10 skills (test-first, security, architecture-advisor, frontend-design...)
|
|
141
141
|
├── agents/ ← 15 agents (orchestrator, spec-reviewer, constitution-guard...)
|
|
142
|
-
├── capabilities/ ←
|
|
142
|
+
├── capabilities/ ← 43 files, lazy-loaded via manifest.md (~380 tokens/task)
|
|
143
143
|
├── hooks/
|
|
144
144
|
│ ├── user-prompt.js ← injects goals.md + checkpoint before your first message
|
|
145
145
|
│ ├── pre-tool-use.js ← blocks hardcoded secrets before any file write
|
|
@@ -173,65 +173,51 @@ Scans your codebase, detects domain + stack + scale, fills CLAUDE.md, creates go
|
|
|
173
173
|
/dream "Build a compliance SaaS — FastAPI, Supabase, trilingual"
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
Builds everything from scratch in four phases:
|
|
177
177
|
|
|
178
178
|
```
|
|
179
179
|
Phase 1: Asks 4 questions (what, stack, who uses it, what's out of scope)
|
|
180
180
|
Phase 2: Scans existing environment — won't regenerate what already exists
|
|
181
181
|
Phase 3: Builds level by level:
|
|
182
|
-
L1 → CLAUDE.md
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
L4 → Memory (goals.md + patterns + antipatterns)
|
|
186
|
-
L5 → Agents (specialized for your stack, from git evidence)
|
|
187
|
-
L6 → Hooks (stateful session tracking)
|
|
182
|
+
L1 → CLAUDE.md L2 → MCP config
|
|
183
|
+
L3 → Skills L4 → Memory
|
|
184
|
+
L5 → Agents L6 → Hooks
|
|
188
185
|
Phase 3b: Domain advisor skill — auto-generated if non-dev domain detected
|
|
189
186
|
(compliance, finance, medical, legal, logistics, research, marketing)
|
|
190
187
|
Phase 4: Quality gate — won't say "ready" without passing all checks
|
|
191
188
|
```
|
|
192
189
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
### 4. Spec-Driven Workflow — build what you actually meant to build
|
|
196
|
-
|
|
197
|
-
The biggest cause of wasted work: building the wrong thing correctly. `/dream` gives you an environment. The spec-driven workflow ensures you build what the environment is *for*.
|
|
190
|
+
### 3. `/copilot` — walk away, come back to a product
|
|
198
191
|
|
|
192
|
+
```bash
|
|
193
|
+
npx azclaude-copilot . "Build a compliance SaaS with trilingual support"
|
|
194
|
+
# or resume:
|
|
195
|
+
npx azclaude-copilot .
|
|
199
196
|
```
|
|
200
|
-
/constitute — define ground rules before any planning
|
|
201
|
-
Non-negotiables, required patterns, definition of done.
|
|
202
|
-
Copilot checks this before every milestone. Violations are blocked, not ignored.
|
|
203
|
-
|
|
204
|
-
/spec — write a structured spec before /blueprint
|
|
205
|
-
User stories, acceptance criteria (3+), out-of-scope, failure modes.
|
|
206
|
-
spec-reviewer (haiku) validates quality — if incomplete, /blueprint is blocked.
|
|
207
197
|
|
|
208
|
-
|
|
209
|
-
Structured interrogation (max 5 questions). Writes answers back into the spec.
|
|
198
|
+
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. [Details below.](#autonomous-mode)
|
|
210
199
|
|
|
211
|
-
|
|
212
|
-
Each milestone traces to an acceptance criterion.
|
|
213
|
-
spec-reviewer gates quality before planning starts.
|
|
200
|
+
---
|
|
214
201
|
|
|
215
|
-
|
|
216
|
-
Detects ghost milestones (marked done, files missing),
|
|
217
|
-
spec vs. implementation drift, plan vs. reality gaps.
|
|
218
|
-
Runs automatically in /ship and /audit.
|
|
202
|
+
## Spec-Driven Workflow
|
|
219
203
|
|
|
220
|
-
|
|
221
|
-
Shows parallelizable wave groups and critical path length.
|
|
222
|
-
Tells orchestrator which milestones can run simultaneously.
|
|
204
|
+
The biggest cause of wasted work: building the wrong thing correctly. The spec-driven workflow ensures you build what you actually meant to build.
|
|
223
205
|
|
|
224
|
-
/issues — convert plan.md milestones to GitHub Issues
|
|
225
|
-
Creates labels (azclaude, copilot-milestone), deduplicates,
|
|
226
|
-
writes issue numbers back to plan.md for traceability.
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
**The full sequence:**
|
|
230
206
|
```
|
|
231
207
|
/constitute → /spec → /clarify → /blueprint → /copilot → /analyze → /ship
|
|
232
208
|
```
|
|
233
209
|
|
|
234
|
-
|
|
210
|
+
| Command | Purpose |
|
|
211
|
+
|---------|---------|
|
|
212
|
+
| `/constitute` | Define ground rules before any planning. Non-negotiables, required patterns, definition of done. Copilot enforces on every milestone. |
|
|
213
|
+
| `/spec` | Write a structured spec: user stories (≥2), acceptance criteria (≥3), out-of-scope, failure modes. spec-reviewer validates quality — if incomplete, `/blueprint` is blocked. |
|
|
214
|
+
| `/clarify` | Structured interrogation (max 5 questions). Resolves open questions in a spec. Required before `/blueprint` if questions remain. |
|
|
215
|
+
| `/blueprint` | Derive a milestone plan from the spec. Each milestone traces to an acceptance criterion. Task classifier groups coupled work for parallel safety. |
|
|
216
|
+
| `/analyze` | Cross-artifact consistency check. Finds ghost milestones (marked done, files missing), spec vs. implementation drift, plan vs. reality gaps. |
|
|
217
|
+
| `/tasks` | Build dependency graph from plan.md. Shows parallelizable wave groups and critical path length. |
|
|
218
|
+
| `/issues` | Convert plan.md milestones to GitHub Issues. Deduplicates, creates labels, writes issue numbers back to plan.md. |
|
|
219
|
+
|
|
220
|
+
**What the gates prevent:**
|
|
235
221
|
|
|
236
222
|
| Without spec-driven | With spec-driven |
|
|
237
223
|
|---------------------|-----------------|
|
|
@@ -242,77 +228,28 @@ The biggest cause of wasted work: building the wrong thing correctly. `/dream` g
|
|
|
242
228
|
|
|
243
229
|
---
|
|
244
230
|
|
|
245
|
-
### 3. `/copilot` — walk away, come back to a product
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
npx azclaude-copilot . "Build a compliance SaaS with trilingual support"
|
|
249
|
-
# or resume existing run:
|
|
250
|
-
npx azclaude-copilot .
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
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.
|
|
254
|
-
|
|
255
|
-
### Day-to-day
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
/add [feature] # add a feature — pre-analyzes scope, follows patterns
|
|
259
|
-
/fix [bug] # reproduce → investigate → fix → verify
|
|
260
|
-
/audit # spec-first code review, read-only
|
|
261
|
-
/test # framework detection, exit-code gate, failure classification
|
|
262
|
-
/evolve # scan for gaps, generate fixes, create agents from evidence
|
|
263
|
-
/ship # tests → secrets scan → commit → push → deploy
|
|
264
|
-
/sentinel # security scan — scored 0–100, grade A–F, 5 layers, 102 rules
|
|
265
|
-
/pulse # health check — recent changes, current level, next steps
|
|
266
|
-
/debate [topic] # adversarial decision protocol with evidence scoring
|
|
267
|
-
/snapshot # save WHY you made decisions — auto-injected next session
|
|
268
|
-
/reflect # find and fix stale/missing rules in CLAUDE.md
|
|
269
|
-
/reflexes # view learned behavioral patterns with confidence scores
|
|
270
|
-
/parallel M2 M3 # run multiple milestones simultaneously (worktree isolation + auto-merge)
|
|
271
|
-
/mcp # recommend and install MCP servers based on your stack
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
231
|
## Memory System
|
|
277
232
|
|
|
278
|
-
|
|
233
|
+
Claude needs two things at the start of every session — **what changed** and **why decisions were made**. Everything else is noise.
|
|
279
234
|
|
|
280
|
-
###
|
|
235
|
+
### Automatic (zero user input)
|
|
281
236
|
|
|
282
237
|
```
|
|
283
|
-
Every edit:
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
Session end: stop.js → In-progress migrates to Done
|
|
288
|
-
Trims to 20 Done entries, archives overflow
|
|
289
|
-
Resets counters
|
|
290
|
-
|
|
291
|
-
Session start: user-prompt.js → injects before your first message:
|
|
292
|
-
┌─ goals.md (capped: 30 in-progress + 20 done)
|
|
293
|
-
├─ latest checkpoint (capped at 50 lines)
|
|
294
|
-
├─ plan status: X/N done, Y in-progress, Z blocked [copilot mode]
|
|
295
|
-
└─ learned reflexes with confidence ≥ 0.8, max 5 [strict profile]
|
|
238
|
+
Every edit: post-tool-use.js → breadcrumb in goals.md (timestamp, file, diff stats)
|
|
239
|
+
Before write: pre-tool-use.js → blocks hardcoded secrets
|
|
240
|
+
Session end: stop.js → In-progress migrates to Done, trims to 20 entries
|
|
241
|
+
Session start: user-prompt.js → injects goals.md + latest checkpoint + plan status
|
|
296
242
|
```
|
|
297
243
|
|
|
298
244
|
**Token cost: ~500 tokens fixed.** goals.md auto-rotates at 30 entries — oldest 15 archived, newest 15 kept. Same cost at session 5 or session 500.
|
|
299
245
|
|
|
300
|
-
### Manual
|
|
246
|
+
### Manual (you control)
|
|
301
247
|
|
|
302
248
|
```bash
|
|
303
|
-
/snapshot # save
|
|
304
|
-
#
|
|
305
|
-
# • WHY each decision was made this session
|
|
306
|
-
# • What you know that isn't written down yet ← the key section
|
|
307
|
-
# • Top 3 next actions
|
|
308
|
-
# • Risks and open questions
|
|
309
|
-
# Run every 15–20 turns. Auto-injected at next session start.
|
|
310
|
-
# Protects against context compaction losing mid-session reasoning.
|
|
311
|
-
|
|
249
|
+
/snapshot # save WHY decisions were made — auto-injected next session
|
|
250
|
+
# run every 15–20 turns to protect against context compaction
|
|
312
251
|
/persist # end-of-session: update goals.md, write session narrative
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
/pulse # read current state — what's healthy, what needs attention
|
|
252
|
+
/pulse # health check — recent changes, blockers, next steps
|
|
316
253
|
```
|
|
317
254
|
|
|
318
255
|
### Hook profiles
|
|
@@ -323,15 +260,6 @@ AZCLAUDE_HOOK_PROFILE=standard claude # all features (default)
|
|
|
323
260
|
AZCLAUDE_HOOK_PROFILE=strict claude # all + reflex guidance injection
|
|
324
261
|
```
|
|
325
262
|
|
|
326
|
-
| Feature | minimal | standard | strict |
|
|
327
|
-
|---------|---------|----------|--------|
|
|
328
|
-
| goals.md tracking + memory rotation | ✓ | ✓ | ✓ |
|
|
329
|
-
| Checkpoint injection | ✓ | ✓ | ✓ |
|
|
330
|
-
| Reflex observations (observations.jsonl) | — | ✓ | ✓ |
|
|
331
|
-
| Cost tracking | — | ✓ | ✓ |
|
|
332
|
-
| Plan status (copilot mode) | — | ✓ | ✓ |
|
|
333
|
-
| Reflex guidance (confidence ≥ 0.8) | — | — | ✓ |
|
|
334
|
-
|
|
335
263
|
### State files — the runner is stateless, these files ARE the state
|
|
336
264
|
|
|
337
265
|
| File | Written by | Read by | Purpose |
|
|
@@ -345,23 +273,21 @@ AZCLAUDE_HOOK_PROFILE=strict claude # all + reflex guidance injection
|
|
|
345
273
|
| `memory/blockers.md` | /copilot | /copilot, /debate | What's stuck and why |
|
|
346
274
|
| `memory/reflexes/` | Hooks, /reflexes | /evolve, agents | Learned behavioral patterns |
|
|
347
275
|
| `plan.md` | /blueprint | /copilot, /add | Milestone tracker with status |
|
|
348
|
-
| `copilot-report.md` | /copilot | Human | Final autonomous run summary |
|
|
349
276
|
|
|
350
277
|
---
|
|
351
278
|
|
|
352
279
|
## Self-Improving Loop
|
|
353
280
|
|
|
354
|
-
AZCLAUDE doesn't just remember — it learns and corrects itself. Three commands form a loop
|
|
281
|
+
AZCLAUDE doesn't just remember — it learns and corrects itself. Three commands form a feedback loop:
|
|
355
282
|
|
|
356
283
|
```
|
|
357
284
|
/reflect → Reads friction logs + session history
|
|
358
|
-
Finds missing rules, dead rules, vague rules,
|
|
359
|
-
Proposes exact CLAUDE.md edits
|
|
360
|
-
You approve → CLAUDE.md gets smarter
|
|
285
|
+
Finds missing rules, dead rules, vague rules, contradictions
|
|
286
|
+
Proposes exact CLAUDE.md edits. You approve. CLAUDE.md corrects itself.
|
|
361
287
|
|
|
362
288
|
/reflexes → Reads observations.jsonl (captured automatically by post-tool-use.js)
|
|
363
|
-
Finds tool sequences, file co-access, error→fix pairs
|
|
364
|
-
Creates confidence-scored reflex files (0.3 tentative → 0.9
|
|
289
|
+
Finds tool sequences, file co-access, error→fix pairs
|
|
290
|
+
Creates confidence-scored reflex files (0.3 tentative → 0.9 certain)
|
|
365
291
|
Strong reflexes (≥ 0.7) feed into /add behavior automatically
|
|
366
292
|
|
|
367
293
|
/evolve → Detects gaps: stale data, missing capabilities, context rot
|
|
@@ -376,26 +302,22 @@ AZCLAUDE doesn't just remember — it learns and corrects itself. Three commands
|
|
|
376
302
|
```
|
|
377
303
|
/reflect found:
|
|
378
304
|
MISSING RULE — Wrong agent routing causing silent failures every session
|
|
379
|
-
MISSING RULE — Domain-specific legal term
|
|
380
|
-
STALE DATA — Design tokens in CLAUDE.md were wrong hex values
|
|
305
|
+
MISSING RULE — Domain-specific legal term kept drifting back into code
|
|
306
|
+
STALE DATA — Design tokens in CLAUDE.md were wrong hex values
|
|
381
307
|
MISSING ROUTE — Most frequent task had no slash command dispatch
|
|
382
308
|
|
|
383
309
|
/reflexes found (from 78 observations, 3 sessions):
|
|
384
|
-
i18n-all-6-locales
|
|
385
|
-
page-tsx-read-before-edit
|
|
386
|
-
next-config-build-verify
|
|
387
|
-
vertex-assess-co-edit (0.60) → vertex_client.py and assess_paid.py always coupled
|
|
310
|
+
i18n-all-6-locales (confidence 0.85) → always edit all 6 locale files atomically
|
|
311
|
+
page-tsx-read-before-edit (0.75) → re-read before touching — changes too often
|
|
312
|
+
next-config-build-verify (0.70) → run tsc --noEmit after next.config.ts edits
|
|
388
313
|
|
|
389
314
|
/evolve found:
|
|
390
315
|
plan.md frozen at 9/9 done — actually 18 milestones, M12–M18 active
|
|
391
316
|
No i18n-sync skill despite 6-locale changes in every commit
|
|
392
|
-
eu-ai-act-engine skill had no test recipe for zero-coverage modules
|
|
393
317
|
Score: 42/100 → 68/100
|
|
394
318
|
```
|
|
395
319
|
|
|
396
|
-
All
|
|
397
|
-
|
|
398
|
-
**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.
|
|
320
|
+
All without human diagnosis. The system found it, proposed fixes, applied them.
|
|
399
321
|
|
|
400
322
|
---
|
|
401
323
|
|
|
@@ -403,23 +325,14 @@ All of this without human diagnosis. The system found it, proposed fixes, applie
|
|
|
403
325
|
|
|
404
326
|
`/evolve` finds gaps in the environment and fixes them. Three cycles:
|
|
405
327
|
|
|
406
|
-
**Cycle 1 — Environment Evolution
|
|
407
|
-
- Detects: stale patterns, friction signals, context rot (poisoning / distraction / confusion / clash)
|
|
408
|
-
- Generates: fixes for each gap
|
|
409
|
-
- Evaluates: quality-gates before merging (syntax, self-applicability, pressure-test resilience)
|
|
328
|
+
**Cycle 1 — Environment Evolution:** Detects stale patterns, friction signals, context rot. Generates fixes. Quality-gates before merging.
|
|
410
329
|
|
|
411
|
-
**Cycle 2 — Knowledge Consolidation** (every 2+ sessions)
|
|
412
|
-
- Harvests patterns.md and sessions/ by recency + importance
|
|
413
|
-
- Prunes stale entries, consolidates redundant patterns
|
|
414
|
-
- Enriches agent definitions with accumulated learnings
|
|
415
|
-
- Auto-prunes reflexes where confidence < 0.15
|
|
330
|
+
**Cycle 2 — Knowledge Consolidation** (every 2+ sessions): Harvests patterns by recency + importance. Prunes stale entries. Auto-prunes reflexes where confidence < 0.15.
|
|
416
331
|
|
|
417
|
-
**Cycle 3 — Topology Optimization** (when friction detected)
|
|
418
|
-
- Measures agent influence in pipelines
|
|
419
|
-
- Identifies merge candidates (overlapping agents)
|
|
420
|
-
- Tests changes in isolated worktree before adopting
|
|
332
|
+
**Cycle 3 — Topology Optimization** (when friction detected): Measures agent influence. Identifies merge candidates. Tests in isolated worktree before adopting.
|
|
421
333
|
|
|
422
334
|
**Agent emergence from git evidence:**
|
|
335
|
+
|
|
423
336
|
```
|
|
424
337
|
Session 1: 0 project agents. Build basic structure.
|
|
425
338
|
Git: 3 commits touching fastapi/, next/, supabase/
|
|
@@ -438,146 +351,36 @@ Skills and agents that are project-generic get promoted to `~/shared-skills/`
|
|
|
438
351
|
|
|
439
352
|
---
|
|
440
353
|
|
|
441
|
-
##
|
|
442
|
-
|
|
443
|
-
Zero dependencies in `package.json`. The only external binary is `claude` (installed separately). No supply-chain risk.
|
|
444
|
-
|
|
445
|
-
**6 layers, 4 enforcement points:**
|
|
446
|
-
|
|
447
|
-
| Layer | Where it runs | What it blocks |
|
|
448
|
-
|-------|--------------|----------------|
|
|
449
|
-
| Hook integrity | Every session start | SHA-256 mismatch → hooks tampered |
|
|
450
|
-
| Secret blocking | `pre-tool-use.js` — before every write | `AKIA*`, `sk-*`, `ghp_*`, `glpat-*`, `xoxb-*`, `-----BEGIN PRIVATE KEY` |
|
|
451
|
-
| Prompt injection defense | `user-prompt.js` — before context injection | `curl\|bash`, `ignore previous instructions`, base64 payloads in goals.md/checkpoints |
|
|
452
|
-
| Environment audit | `/sentinel` — on-demand, 102 rules | Scored 0–100, grade A–F across 5 layers |
|
|
453
|
-
| Pre-ship scan | `/ship` — before every commit | Secrets in staged files, failing tests, IDE errors |
|
|
454
|
-
| Agent scoping | All review agents | Reviewer/auditor agents are read-only — no Write/Edit permissions |
|
|
354
|
+
## Autonomous Mode
|
|
455
355
|
|
|
456
|
-
### `/
|
|
356
|
+
### `/copilot` — describe a product, come back to working code
|
|
457
357
|
|
|
458
358
|
```bash
|
|
459
|
-
|
|
460
|
-
/sentinel --hooks # Layer 1+2: hook integrity + permissions
|
|
461
|
-
/sentinel --mcp # Layer 3: MCP server secrets and unknown packages
|
|
462
|
-
/sentinel --agents # Layer 4: prompt injection in agent files
|
|
463
|
-
/sentinel --secrets # Layer 5: credentials in committed code
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
Produces a scored report with verdict: `BLOCKED` / `CLEAR` / `PROCEED WITH CAUTION`.
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
╔══════════════════════════════════════════════════╗
|
|
470
|
-
║ SENTINEL — Environment Security ║
|
|
471
|
-
╚══════════════════════════════════════════════════╝
|
|
472
|
-
|
|
473
|
-
Layer 1 — Hook Integrity 25/25 ✓ verified
|
|
474
|
-
Layer 2 — Permission Audit 12/20 ⚠ Bash(rm:*) too broad
|
|
475
|
-
Layer 3 — MCP Server Scan 20/20 ✓ clean
|
|
476
|
-
Layer 4 — Agent Config Review 15/15 ✓ no injection found
|
|
477
|
-
Layer 5 — Secrets Scan 18/20 ⚠ API key in settings
|
|
478
|
-
──────────────────────────────────────────────────
|
|
479
|
-
Total: 90/100 Grade: A Verdict: CLEAR
|
|
359
|
+
npx azclaude-copilot . "Build a compliance SaaS with trilingual support"
|
|
480
360
|
```
|
|
481
361
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
See [SECURITY.md](SECURITY.md) for full details.
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
## Intelligence Layer
|
|
489
|
-
|
|
490
|
-
### 8 Skills (auto-invoked — no slash command needed)
|
|
491
|
-
|
|
492
|
-
| Skill | Triggers on |
|
|
493
|
-
|-------|------------|
|
|
494
|
-
| `session-guard` | Session start, context reset, idle detection |
|
|
495
|
-
| `test-first` | Writing/fixing code in TDD projects (signal-based — only if project has tests) |
|
|
496
|
-
| `env-scanner` | Project setup, stack detection |
|
|
497
|
-
| `security` | Credentials, auth, payments, .env files, secrets, before /ship |
|
|
498
|
-
| `debate` | Decisions, trade-offs, "which is better", architecture comparisons |
|
|
499
|
-
| `skill-creator` | "Create a skill", repeated workflows, new capability |
|
|
500
|
-
| `agent-creator` | "Create an agent", agent boundaries, 5-layer structure |
|
|
501
|
-
| `architecture-advisor` | Architecture decisions, DB choice, rendering strategy, testing approach — by project scale |
|
|
502
|
-
|
|
503
|
-
### Architecture Advisor — 8 Evidence-Based Decision Matrices
|
|
504
|
-
|
|
505
|
-
Not "which is popular" — which is right for **your project's scale**:
|
|
506
|
-
|
|
507
|
-
| Decision | SMALL (< 50 files) | MEDIUM (50-500 files) | LARGE (500+ files) |
|
|
508
|
-
|----------|-------------------|----------------------|-------------------|
|
|
509
|
-
| Architecture | Flat modules | Modular monolith | Monolith + targeted microservices |
|
|
510
|
-
| Database | SQLite | PostgreSQL | PostgreSQL + Redis + search |
|
|
511
|
-
| Testing | Test-after critical paths | TDD for business logic | Full TDD |
|
|
512
|
-
| API | tRPC (internal) | REST | REST + GraphQL (mobile) |
|
|
513
|
-
| Auth | Clerk / Supabase | Auth0 | Keycloak (self-hosted) |
|
|
514
|
-
| State | useState | TanStack Query | Zustand + XState |
|
|
515
|
-
| Rendering | SSG or SPA | SSR / ISR | ISR + edge caching |
|
|
516
|
-
| Deploy | Vercel / Railway | Managed containers | AWS/GCP with IaC |
|
|
517
|
-
|
|
518
|
-
Every recommendation includes the threshold where it changes and the anti-pattern to avoid at that scale.
|
|
519
|
-
|
|
520
|
-
### Domain Advisor Generator — 7 Non-Tech Domains
|
|
521
|
-
|
|
522
|
-
When `/dream` or `/setup` detects a non-developer domain, a domain-specific advisor skill is generated automatically — with decision matrices, thresholds, and anti-patterns:
|
|
523
|
-
|
|
524
|
-
| Domain | What gets generated |
|
|
525
|
-
|--------|-------------------|
|
|
526
|
-
| Compliance | Regulation mapping, evidence strategy, article-level traceability, audit trail |
|
|
527
|
-
| Finance | Event-sourced data model, integer-cents precision, reconciliation, risk model |
|
|
528
|
-
| Medical | FHIR vs HL7, HIPAA vs GDPR privacy model, clinical workflow, terminology |
|
|
529
|
-
| Marketing | Channel strategy, funnel design, pricing model, metric focus by revenue stage |
|
|
530
|
-
| Research | Literature scope, methodology, experiment design, statistical rigor |
|
|
531
|
-
| Legal | Contract structure, clause tracking, jurisdiction, risk classification |
|
|
532
|
-
| Logistics | Routing, inventory model, tracking granularity |
|
|
533
|
-
|
|
534
|
-
### Reflexes — Learned Behavioral Patterns
|
|
362
|
+
Node.js runner restarts Claude Code sessions in a loop until `COPILOT_COMPLETE`.
|
|
535
363
|
|
|
536
|
-
|
|
364
|
+
**Four-phase execution loop:**
|
|
537
365
|
|
|
538
|
-
```yaml
|
|
539
|
-
id: i18n-all-6-locales
|
|
540
|
-
trigger: "any src/messages/*.json file is edited"
|
|
541
|
-
action: "edit all 6 locale files in the same operation — never fewer"
|
|
542
|
-
confidence: 0.85 # 0.3 tentative → 0.9 near-certain
|
|
543
|
-
evidence_count: 6
|
|
544
|
-
domain: workflow
|
|
545
|
-
scope: project # promote to global when seen in 2+ projects at ≥ 0.8
|
|
546
366
|
```
|
|
367
|
+
Phase 1 — Intelligence gathering (parallel agents)
|
|
368
|
+
Multiple analyst agents run simultaneously — arch, UX, market, compliance.
|
|
369
|
+
Each returns findings. Orchestrator synthesizes.
|
|
547
370
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
- Confidence rises with confirming observations, decays -0.02/week without use
|
|
551
|
-
- Strong clusters (3+ reflexes, avg confidence > 0.7) evolve into skills or agents
|
|
552
|
-
- Global promotion when seen in 2+ projects at confidence ≥ 0.8
|
|
553
|
-
|
|
554
|
-
### Context Artifacts — Non-Code Project Knowledge
|
|
555
|
-
|
|
556
|
-
Before implementing, AZCLAUDE discovers and reads non-code knowledge that informs implementation:
|
|
557
|
-
|
|
558
|
-
| Type | Examples | Why it matters |
|
|
559
|
-
|------|---------|---------------|
|
|
560
|
-
| Database schemas | `prisma/schema.prisma`, `schema.sql` | Know table structure before writing queries |
|
|
561
|
-
| API specs | `openapi.yaml`, `swagger.json`, `.proto` | Know endpoints before building integrations |
|
|
562
|
-
| Infra configs | `terraform/`, `docker-compose.yml` | Know deployment constraints before architecture decisions |
|
|
563
|
-
| Architecture docs | `docs/architecture.md`, ADRs | Know design decisions before proposing changes |
|
|
564
|
-
| Domain knowledge | `knowledge/`, business rules, regulations | Know domain constraints before implementing logic |
|
|
565
|
-
|
|
566
|
-
---
|
|
567
|
-
|
|
568
|
-
## Autonomous Mode
|
|
371
|
+
Phase 2 — Debate synthesis
|
|
372
|
+
/debate resolves tensions with evidence scoring. Produces prioritized action list.
|
|
569
373
|
|
|
570
|
-
|
|
374
|
+
Phase 3 — Blueprint (parallel explore agents)
|
|
375
|
+
/blueprint runs explore agents in parallel. Writes file:line plan.
|
|
376
|
+
Task Classifier groups coupled work → safe parallel dispatch by design.
|
|
571
377
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
npx azclaude-copilot .
|
|
378
|
+
Phase 4 — Execution (parallel milestone agents, worktree-isolated)
|
|
379
|
+
Orchestrator dispatches same-wave milestones simultaneously.
|
|
380
|
+
Each agent owns its scope. Orchestrator merges on completion.
|
|
576
381
|
```
|
|
577
382
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
**Three-tier intelligent team (v0.4+):**
|
|
383
|
+
**Three-tier intelligent team (Phase 4):**
|
|
581
384
|
|
|
582
385
|
```
|
|
583
386
|
Orchestrator Problem-Architect Milestone-Builder
|
|
@@ -585,17 +388,15 @@ Orchestrator Problem-Architect Milestone-Builder
|
|
|
585
388
|
Reads plan.md → Analyzes milestone → Pre-reads all files
|
|
586
389
|
Selects wave Returns Team Spec: Implements
|
|
587
390
|
Dispatches • agents needed Runs tests
|
|
588
|
-
Monitors • skills to load Self-corrects (2
|
|
589
|
-
Triggers /evolve •
|
|
590
|
-
Never writes code
|
|
591
|
-
|
|
592
|
-
concurrent file corruption)
|
|
593
|
-
• pre-conditions, risks
|
|
594
|
-
• complexity (SIMPLE/MEDIUM/COMPLEX)
|
|
391
|
+
Monitors • skills to load Self-corrects (2 attempts)
|
|
392
|
+
Triggers /evolve • Files Written (parallel Commits + reports back
|
|
393
|
+
Never writes code safety check)
|
|
394
|
+
• complexity estimate
|
|
595
395
|
Never implements
|
|
596
396
|
```
|
|
597
397
|
|
|
598
|
-
**Self-healing
|
|
398
|
+
**Self-healing — every failure teaches the environment:**
|
|
399
|
+
|
|
599
400
|
```
|
|
600
401
|
Build step fails →
|
|
601
402
|
1. Re-read the exact error (not a summary)
|
|
@@ -607,16 +408,15 @@ Build step fails →
|
|
|
607
408
|
```
|
|
608
409
|
|
|
609
410
|
**Copilot pipeline (with spec-driven workflow):**
|
|
411
|
+
|
|
610
412
|
```
|
|
611
|
-
Session 0: /constitute → /spec → /clarify → /blueprint
|
|
612
|
-
Session 1: /copilot → constitution-guard validates
|
|
413
|
+
Session 0: /constitute → /spec → /clarify → /blueprint
|
|
414
|
+
Session 1: /copilot → constitution-guard validates → M1, M2, M3 → /snapshot
|
|
613
415
|
Session 2: /evolve → M4+M5 parallel → M6 → /analyze (ghost check) → /snapshot
|
|
614
416
|
Session 3: /evolve → M7, M8, M9 → /snapshot
|
|
615
417
|
Session 4: /evolve → /analyze → /audit → /ship → COPILOT_COMPLETE
|
|
616
418
|
```
|
|
617
419
|
|
|
618
|
-
**Every 3 milestones:** `/reflexes analyze` + `/evolve` + orchestrator re-evaluates blocked milestones.
|
|
619
|
-
|
|
620
420
|
**Exit conditions:**
|
|
621
421
|
|
|
622
422
|
| Condition | Exit code |
|
|
@@ -629,29 +429,122 @@ Session 4: /evolve → /analyze → /audit → /ship → COPILOT_COMPLETE
|
|
|
629
429
|
|
|
630
430
|
## Parallel Execution
|
|
631
431
|
|
|
632
|
-
AZCLAUDE runs multiple Claude Code agents simultaneously on the same codebase — without file corruption or test interference. Each agent works in an isolated git worktree on its own branch.
|
|
432
|
+
AZCLAUDE runs multiple Claude Code agents simultaneously on the same codebase — without file corruption or test interference. Each agent works in an isolated git worktree on its own branch.
|
|
633
433
|
|
|
634
434
|
```
|
|
635
435
|
M1 (schema) → done
|
|
636
436
|
↓
|
|
637
|
-
|
|
437
|
+
┌────────────┬────────────┬────────────┬──────────────┐
|
|
638
438
|
M2 (auth) M3 (profile) M4 (email) M5 (dashboard) ← all run simultaneously
|
|
639
|
-
|
|
640
|
-
└────────────┴────────────┴────────────┘
|
|
439
|
+
└────────────┴────────────┴────────────┴──────────────┘
|
|
641
440
|
↓
|
|
642
441
|
M6 (E2E tests)
|
|
643
442
|
```
|
|
644
443
|
|
|
645
|
-
|
|
444
|
+
3 sequential waves instead of 6 sequential milestones. Same output, fraction of the time.
|
|
445
|
+
|
|
446
|
+
**Real session — Systems Registry sprint (compliance SaaS, 5 milestones):**
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
Phase 1 — Intelligence (4 agents, parallel)
|
|
450
|
+
arch-analyst → found broken auto-link bug in assess-paid/page.tsx
|
|
451
|
+
ux-analyst → identified save-to-registry conversion hole
|
|
452
|
+
market-intel → found FRIA + Art. 49 regulatory blue ocean
|
|
453
|
+
compliance → mapped 13 fields present vs 66 required
|
|
454
|
+
Time: ~9 minutes. Equivalent human analyst work: full day.
|
|
455
|
+
|
|
456
|
+
Phase 2 — Debate synthesis (1 agent)
|
|
457
|
+
4 tensions resolved with verdicts. Prioritized action list produced.
|
|
458
|
+
|
|
459
|
+
Phase 3 — Blueprint (3 explore agents, parallel)
|
|
460
|
+
Read assess-paid page, systems pages, and API routes simultaneously.
|
|
461
|
+
Produced file:line plan across 5 milestones.
|
|
462
|
+
|
|
463
|
+
Phase 4 — Execution (2 agents, parallel — classifier applied)
|
|
464
|
+
dev-frontend (M1+M2) 64.5k tokens assess-paid/page.tsx + save-registry UI
|
|
465
|
+
dev-backend (M4) 37.5k tokens systems.py + DB migration SQL
|
|
466
|
+
|
|
467
|
+
Classifier merged M1+M2 automatically — both touch assess-paid/page.tsx.
|
|
468
|
+
M4 backend ran in parallel — completely independent file set, zero conflict risk.
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
**Four-layer safety model:**
|
|
472
|
+
|
|
473
|
+
```
|
|
474
|
+
Layer 0 — Task Classifier (blueprint, before milestones exist)
|
|
475
|
+
Groups coupled work (same schema, config, utility module) into single milestones.
|
|
476
|
+
Conflicts become impossible by design — before any safety checking begins.
|
|
477
|
+
|
|
478
|
+
Layer 1 — Directory check + shared-utility grep (blueprint, pre-plan)
|
|
479
|
+
Fast, no agents spawned. Catches ~80% of remaining conflicts.
|
|
480
|
+
|
|
481
|
+
Layer 2 — Problem-architect exact file scan (post-plan, per milestone)
|
|
482
|
+
Returns Files Written: exact paths + Parallel Safe: YES/NO.
|
|
483
|
+
Corrects Layer 1 when it finds shared utilities across directories.
|
|
484
|
+
|
|
485
|
+
Layer 3 — Orchestrator dispatch gate (runtime, unconditional)
|
|
486
|
+
Final overlap check before spawning. Cannot be bypassed.
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
**Automatic** via `/copilot`: the orchestrator reads `Wave:` fields in plan.md, dispatches same-wave milestones with `isolation: "worktree"` in a single message, then merges sequentially.
|
|
490
|
+
|
|
491
|
+
**Manual** via `/parallel M2 M3 M4 M5`: dispatch specific milestones simultaneously.
|
|
492
|
+
|
|
493
|
+
See [docs/parallel-execution.md](docs/parallel-execution.md) for the complete reference.
|
|
494
|
+
|
|
495
|
+
### Why coordination matters
|
|
496
|
+
|
|
497
|
+
Claude Code's `isolation: "worktree"` in the Task tool is a raw primitive — like `pthread_create`. You have threads, but threads alone aren't a concurrent system.
|
|
498
|
+
|
|
499
|
+
| Raw capability | AZCLAUDE coordination layer |
|
|
500
|
+
|---|---|
|
|
501
|
+
| Task tool spawns agents | Orchestrator decides WHEN and HOW MANY |
|
|
502
|
+
| Worktree isolates files | Blueprint classifier ensures they're safe to isolate |
|
|
503
|
+
| Agents can read files | Problem-architect pre-packages the exact context each needs |
|
|
504
|
+
| Agents can write code | Patterns/antipatterns constrain what they write |
|
|
505
|
+
| Agents can fail | Blocker recovery + /debate escalation handles the failure |
|
|
506
|
+
| Sessions end | goals.md + checkpoints + plan.md resume exactly where it stopped |
|
|
507
|
+
| Code accumulates | /evolve turns git evidence into new agents for next time |
|
|
508
|
+
|
|
509
|
+
6 desks is not a team. AZCLAUDE turns 6 desks into a coordinated team.
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Security
|
|
514
|
+
|
|
515
|
+
Zero dependencies in `package.json`. The only external binary is `claude` (installed separately). No supply-chain risk.
|
|
516
|
+
|
|
517
|
+
**4 enforcement points, always active:**
|
|
518
|
+
|
|
519
|
+
| Layer | Where | What it blocks |
|
|
520
|
+
|-------|-------|----------------|
|
|
521
|
+
| Secret blocking | `pre-tool-use.js` — before every write | `AKIA*`, `sk-*`, `ghp_*`, `glpat-*`, `xoxb-*`, `-----BEGIN PRIVATE KEY` |
|
|
522
|
+
| Prompt injection | `user-prompt.js` — before context injection | `curl\|bash`, `ignore previous instructions`, base64 payloads |
|
|
523
|
+
| Pre-ship scan | `/ship` — before every commit | Secrets in staged files, failing tests, IDE errors |
|
|
524
|
+
| Agent scoping | All review agents | Reviewer/auditor agents are read-only — no Write/Edit permissions |
|
|
525
|
+
|
|
526
|
+
### `/sentinel` — on-demand security scan
|
|
646
527
|
|
|
647
|
-
**Manual — via `/parallel`:**
|
|
648
528
|
```bash
|
|
649
|
-
/
|
|
529
|
+
/sentinel # full scan — 5 layers, 102 rules, scored 0–100 (grade A–F)
|
|
530
|
+
/sentinel --hooks # hook integrity + permissions only
|
|
531
|
+
/sentinel --secrets # credential scan only
|
|
650
532
|
```
|
|
651
533
|
|
|
652
|
-
|
|
534
|
+
```
|
|
535
|
+
╔══════════════════════════════════════════════════╗
|
|
536
|
+
║ SENTINEL — Environment Security ║
|
|
537
|
+
╚══════════════════════════════════════════════════╝
|
|
538
|
+
Layer 1 — Hook Integrity 25/25 ✓ verified
|
|
539
|
+
Layer 2 — Permission Audit 12/20 ⚠ Bash(rm:*) too broad
|
|
540
|
+
Layer 3 — MCP Server Scan 20/20 ✓ clean
|
|
541
|
+
Layer 4 — Agent Config Review 15/15 ✓ no injection found
|
|
542
|
+
Layer 5 — Secrets Scan 18/20 ⚠ API key in settings
|
|
543
|
+
──────────────────────────────────────────────────
|
|
544
|
+
Total: 90/100 Grade: A Verdict: CLEAR
|
|
545
|
+
```
|
|
653
546
|
|
|
654
|
-
|
|
547
|
+
Any hardcoded secret → `BLOCKED`. `/ship` will not proceed until resolved. See [SECURITY.md](SECURITY.md) for full details.
|
|
655
548
|
|
|
656
549
|
---
|
|
657
550
|
|
|
@@ -660,20 +553,77 @@ See `docs/parallel-feature.md` for the complete reference.
|
|
|
660
553
|
AZCLAUDE recommends MCP servers based on your stack and wires them into daily-use commands.
|
|
661
554
|
|
|
662
555
|
```bash
|
|
663
|
-
/mcp # detect stack → recommend
|
|
556
|
+
/mcp # detect stack → recommend → show install commands
|
|
664
557
|
```
|
|
665
558
|
|
|
666
|
-
**Universal (free, no API key
|
|
667
|
-
|
|
668
|
-
- `
|
|
559
|
+
**Universal (free, no API key):** `Context7` (live library docs before writing code), `Sequential Thinking` (iterative reasoning for planning).
|
|
560
|
+
|
|
561
|
+
**Stack-specific:** `GitHub MCP`, `Playwright MCP`, `Supabase MCP`, `Brave Search`.
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
## Intelligence Layer
|
|
566
|
+
|
|
567
|
+
### 10 Skills (auto-invoked)
|
|
669
568
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
569
|
+
| Skill | Triggers on |
|
|
570
|
+
|-------|------------|
|
|
571
|
+
| `session-guard` | Session start, context reset, idle detection |
|
|
572
|
+
| `test-first` | Writing/fixing code in TDD projects |
|
|
573
|
+
| `env-scanner` | Project setup, stack detection |
|
|
574
|
+
| `security` | Credentials, auth, payments, secrets |
|
|
575
|
+
| `debate` | Decisions, trade-offs, architecture comparisons |
|
|
576
|
+
| `skill-creator` | Repeated workflows, new capability needed |
|
|
577
|
+
| `agent-creator` | Agent boundaries, 5-layer structure |
|
|
578
|
+
| `architecture-advisor` | DB choice, rendering strategy, testing approach — by project scale |
|
|
579
|
+
| `frontend-design` | UI components, styling, layout decisions |
|
|
580
|
+
| `mcp` | MCP server recommendations based on stack |
|
|
581
|
+
|
|
582
|
+
### Architecture Advisor — 8 Decision Matrices
|
|
583
|
+
|
|
584
|
+
Not "which is popular" — which is right for **your project's scale**:
|
|
675
585
|
|
|
676
|
-
|
|
586
|
+
| Decision | SMALL | MEDIUM | LARGE |
|
|
587
|
+
|----------|-------|--------|-------|
|
|
588
|
+
| Architecture | Flat modules | Modular monolith | Monolith + targeted microservices |
|
|
589
|
+
| Database | SQLite | PostgreSQL | PostgreSQL + Redis + search |
|
|
590
|
+
| Testing | Test-after critical paths | TDD for business logic | Full TDD |
|
|
591
|
+
| API | tRPC (internal) | REST | REST + GraphQL (mobile) |
|
|
592
|
+
| Auth | Clerk / Supabase | Auth0 | Keycloak (self-hosted) |
|
|
593
|
+
| Deploy | Vercel / Railway | Managed containers | AWS/GCP with IaC |
|
|
594
|
+
|
|
595
|
+
Every recommendation includes the **threshold where it changes** and the **anti-pattern** to avoid.
|
|
596
|
+
|
|
597
|
+
### Domain Advisors — Auto-Generated for 7 Domains
|
|
598
|
+
|
|
599
|
+
When `/dream` or `/setup` detects a non-developer domain, a domain-specific advisor skill is generated automatically:
|
|
600
|
+
|
|
601
|
+
| Domain | What gets generated |
|
|
602
|
+
|--------|-------------------|
|
|
603
|
+
| Compliance | Regulation mapping, evidence strategy, article-level traceability |
|
|
604
|
+
| Finance | Event-sourced data model, integer-cents precision, reconciliation |
|
|
605
|
+
| Medical | FHIR vs HL7, HIPAA vs GDPR, clinical workflow |
|
|
606
|
+
| Marketing | Channel strategy, funnel design, pricing model |
|
|
607
|
+
| Research | Literature scope, methodology, statistical rigor |
|
|
608
|
+
| Legal | Contract structure, clause tracking, risk classification |
|
|
609
|
+
| Logistics | Routing, inventory model, tracking granularity |
|
|
610
|
+
|
|
611
|
+
### Reflexes — Learned Behavioral Patterns
|
|
612
|
+
|
|
613
|
+
Every tool use is observed. Patterns that repeat become reflexes:
|
|
614
|
+
|
|
615
|
+
```yaml
|
|
616
|
+
id: i18n-all-6-locales
|
|
617
|
+
trigger: "any src/messages/*.json file is edited"
|
|
618
|
+
action: "edit all 6 locale files in the same operation — never fewer"
|
|
619
|
+
confidence: 0.85 # 0.3 tentative → 0.9 certain
|
|
620
|
+
evidence_count: 6
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
- 3+ occurrences creates a reflex at confidence 0.3
|
|
624
|
+
- Confidence rises with confirming observations, decays -0.02/week without use
|
|
625
|
+
- Strong clusters evolve into skills or agents via `/evolve`
|
|
626
|
+
- Global promotion when seen in 2+ projects at confidence ≥ 0.8
|
|
677
627
|
|
|
678
628
|
---
|
|
679
629
|
|
|
@@ -684,179 +634,120 @@ AZCLAUDE recommends MCP servers based on your stack and wires them into daily-us
|
|
|
684
634
|
| Command | What it does |
|
|
685
635
|
|---------|-------------|
|
|
686
636
|
| `/copilot` | Autonomous milestone execution. Delegates to orchestrator team. Zero human input. |
|
|
687
|
-
| `/dream` | Idea → full project scaffold. CLAUDE.md, memory, skills, agents —
|
|
637
|
+
| `/dream` | Idea → full project scaffold. CLAUDE.md, memory, skills, agents — level by level. |
|
|
688
638
|
| `/setup` | Analyze existing project. Detect domain + stack + scale. Build environment. |
|
|
689
639
|
| `/add` | Add a feature. Pre-analyzes scope via intelligent-dispatch before touching code. |
|
|
690
|
-
| `/fix` | REPRODUCE → INVESTIGATE → HYPOTHESIZE → FIX. Show passing tests.
|
|
691
|
-
| `/audit` | Spec-first code review (read-only). Ghost milestone check
|
|
692
|
-
| `/test` |
|
|
693
|
-
| `/blueprint` | Read-only analysis → structured plan.md.
|
|
694
|
-
| `/ship` | Ghost check → risk scan → tests → secrets scan → commit → push
|
|
695
|
-
| `/refactor` | Safe restructuring. Constitution pre-flight. Tests before + after.
|
|
640
|
+
| `/fix` | REPRODUCE → INVESTIGATE → HYPOTHESIZE → FIX. Show passing tests. |
|
|
641
|
+
| `/audit` | Spec-first code review (read-only). Ghost milestone check. |
|
|
642
|
+
| `/test` | Framework detection, exit-code gate, failure classification. |
|
|
643
|
+
| `/blueprint` | Read-only analysis → structured plan.md. Task classifier + parallel optimization. |
|
|
644
|
+
| `/ship` | Ghost check → risk scan → tests → secrets scan → commit → push → deploy. |
|
|
645
|
+
| `/refactor` | Safe restructuring. Constitution pre-flight. Tests before + after. |
|
|
696
646
|
| `/doc` | Generate docs from code. Matches existing style. |
|
|
697
|
-
| `/migrate` | Upgrade deps/frameworks. Researches breaking changes.
|
|
647
|
+
| `/migrate` | Upgrade deps/frameworks. Researches breaking changes. |
|
|
698
648
|
| `/deps` | Audit: outdated, vulnerable, unused packages. |
|
|
699
649
|
|
|
700
650
|
### Spec-Driven Development
|
|
701
651
|
|
|
702
652
|
| Command | What it does |
|
|
703
653
|
|---------|-------------|
|
|
704
|
-
| `/constitute` | Define
|
|
705
|
-
| `/spec` |
|
|
706
|
-
| `/clarify` |
|
|
707
|
-
| `/analyze` | Cross-artifact consistency
|
|
708
|
-
| `/tasks` |
|
|
709
|
-
| `/issues` | Convert
|
|
710
|
-
| `/parallel` | Run multiple milestones simultaneously. Worktree isolation
|
|
711
|
-
| `/mcp` | Recommend and install MCP servers
|
|
712
|
-
| `/driven` | Generate
|
|
713
|
-
| `/verify` | Audit
|
|
654
|
+
| `/constitute` | Define ground rules. Non-negotiables, required patterns, definition of done. |
|
|
655
|
+
| `/spec` | Structured spec: user stories, acceptance criteria, out-of-scope, failure modes. |
|
|
656
|
+
| `/clarify` | Resolve open questions in a spec (max 5 questions). |
|
|
657
|
+
| `/analyze` | Cross-artifact consistency. Ghost milestones, spec drift, plan gaps. |
|
|
658
|
+
| `/tasks` | Dependency graph from plan.md. Wave groups + critical path. |
|
|
659
|
+
| `/issues` | Convert milestones to GitHub Issues with traceability. |
|
|
660
|
+
| `/parallel` | Run multiple milestones simultaneously. Worktree isolation + auto-merge. |
|
|
661
|
+
| `/mcp` | Recommend and install MCP servers for your stack. |
|
|
662
|
+
| `/driven` | Generate code-rules.md — DO/DO NOT coding contract. |
|
|
663
|
+
| `/verify` | Audit code against code-rules.md. Reports violations at `file:line`. |
|
|
714
664
|
|
|
715
665
|
### Think and Improve
|
|
716
666
|
|
|
717
667
|
| Command | What it does |
|
|
718
668
|
|---------|-------------|
|
|
719
|
-
| `/debate` | Adversarial debate with evidence scoring (AceMAD).
|
|
720
|
-
| `/evolve` | Detect gaps → generate fixes → quality-gate → create agents from evidence.
|
|
721
|
-
| `/sentinel` | Security scan — 5 layers, 102 rules, scored 0–100 (grade A–F).
|
|
722
|
-
| `/reflexes` | View, analyze, promote learned behavioral patterns.
|
|
723
|
-
| `/reflect` | Self-improve CLAUDE.md
|
|
724
|
-
| `/level-up` | Show current level (0
|
|
725
|
-
| `/find` | Search across commands, `~/shared-skills/`, capabilities
|
|
726
|
-
| `/create` | Build a new command with frontmatter
|
|
727
|
-
| `/hookify` | Generate hooks from friction patterns. 5 hook types
|
|
669
|
+
| `/debate` | Adversarial debate with evidence scoring (AceMAD protocol). |
|
|
670
|
+
| `/evolve` | Detect gaps → generate fixes → quality-gate → create agents from evidence. |
|
|
671
|
+
| `/sentinel` | Security scan — 5 layers, 102 rules, scored 0–100 (grade A–F). |
|
|
672
|
+
| `/reflexes` | View, analyze, promote learned behavioral patterns. |
|
|
673
|
+
| `/reflect` | Self-improve CLAUDE.md from friction logs + session history. |
|
|
674
|
+
| `/level-up` | Show current level (0–10), build the next one. |
|
|
675
|
+
| `/find` | Search across commands, `~/shared-skills/`, capabilities. |
|
|
676
|
+
| `/create` | Build a new command with frontmatter and tests. |
|
|
677
|
+
| `/hookify` | Generate hooks from friction patterns. 5 hook types. |
|
|
728
678
|
|
|
729
679
|
### Memory and Session
|
|
730
680
|
|
|
731
681
|
| Command | What it does |
|
|
732
682
|
|---------|-------------|
|
|
733
|
-
| `/snapshot` |
|
|
734
|
-
| `/persist` | End-of-session: update goals.md, write session narrative
|
|
735
|
-
| `/pulse` | Health check — recent changes,
|
|
736
|
-
| `/explain` | Code or error to plain language.
|
|
683
|
+
| `/snapshot` | Save WHY you made decisions. Auto-injected next session. |
|
|
684
|
+
| `/persist` | End-of-session: update goals.md, write session narrative. |
|
|
685
|
+
| `/pulse` | Health check — recent changes, level, reflexes, blockers. |
|
|
686
|
+
| `/explain` | Code or error to plain language. |
|
|
737
687
|
| `/loop` | Repeat any command on an interval via CronCreate. |
|
|
738
688
|
|
|
739
689
|
---
|
|
740
690
|
|
|
741
|
-
## 15 Agents
|
|
742
|
-
|
|
743
|
-
**Framework agents** (ship with AZCLAUDE, always available):
|
|
744
|
-
|
|
745
|
-
| Agent | Role |
|
|
746
|
-
|-------|------|
|
|
747
|
-
| `orchestrator` | Tech lead for `/copilot`. Owns plan.md. Reads constitution.md. Runs constitution-guard before every dispatch. Never writes code. |
|
|
748
|
-
| `problem-architect` | Pre-flight analyst. Returns Team Spec (agents/skills/files/risks/complexity) before every dispatch. Never implements. |
|
|
749
|
-
| `milestone-builder` | Base builder. Reads constitution.md FIRST. Pre-reads all files, implements, verifies, self-corrects, commits. |
|
|
750
|
-
| `spec-reviewer` | **New — haiku model.** Validates spec quality before /blueprint runs. 7 criteria. Verdict: APPROVED / NEEDS_CLARIFY / INCOMPLETE. Read-only gate. |
|
|
751
|
-
| `constitution-guard` | **New — haiku model.** Checks each milestone against constitution.md before dispatch. Verdict: APPROVED / VIOLATION. Blocks on violations. Read-only gate. |
|
|
752
|
-
| `orchestrator-init` | Runs once during `/setup`. Scans project, fills CLAUDE.md, creates goals.md. Exits permanently. |
|
|
753
|
-
| `loop-controller` | Level 10 autonomous agent. 3 cycles: evolution, knowledge consolidation, topology optimization. |
|
|
754
|
-
| `evolution-module` | Called by orchestrator to run /evolve and /level-up at Level 10. Delegates to loop-controller. |
|
|
755
|
-
| `intelligence-module` | Optional Level 8-9 agent. Pipeline isolation, debate engine, prompt optimization (OPRO), ELO ranking. |
|
|
756
|
-
| `code-reviewer` | Spec-first review. Stage 1: spec compliance. Stage 2: quality. Read-only. Never modifies files. |
|
|
757
|
-
| `security-auditor` | Pre-ship security scan. 102 rules across 5 layers. Verdict: APPROVE / REQUEST CHANGES / BLOCKED. |
|
|
758
|
-
| `test-writer` | Reads existing test patterns. Matches framework, style, naming. Writes and runs tests. |
|
|
759
|
-
| `cc-template-author` | Writes AZCLAUDE template files with proper structure. |
|
|
760
|
-
| `cc-cli-integrator` | Integrates new features into `bin/cli.js`. |
|
|
761
|
-
| `cc-test-maintainer` | Maintains `tests/test-features.sh` with correct grep patterns. |
|
|
762
|
-
|
|
763
|
-
**Project agents** (emerge from your git history via `/evolve`):
|
|
764
|
-
- Named `cc-{area}`, scoped to specific directories
|
|
765
|
-
- Created when 3+ files in the same area change together across 2+ commits
|
|
766
|
-
- Every agent has exactly 5 layers: persona, scope, tools, constraints, domain knowledge
|
|
767
|
-
- `cc-` prefix prevents framework collisions (langgraph, crewai, autogen)
|
|
768
|
-
|
|
769
|
-
---
|
|
770
|
-
|
|
771
691
|
## Skills vs Agents — The Right Tool
|
|
772
692
|
|
|
773
|
-
Claude Code is already capable. The goal is guidance, not instructions. Before creating an agent, understand what each tool is actually for.
|
|
774
|
-
|
|
775
693
|
### Skills: project-specific guidance
|
|
776
694
|
|
|
777
|
-
A skill
|
|
778
|
-
|
|
779
|
-
Skills are NOT:
|
|
780
|
-
- Generic instructions Claude already knows ("write clean code", "add error handling")
|
|
781
|
-
- Boilerplate copied from another project without reading this one first
|
|
782
|
-
- A wrapper around knowledge Claude already has by default
|
|
695
|
+
A skill fires automatically when Claude needs context it can't derive from code alone. The best skill answers: **"In this project, when doing X, what do you need to know that you can't read from the files?"**
|
|
783
696
|
|
|
784
|
-
Skills ARE:
|
|
785
|
-
- "In this compliance project, every obligation must be traced to an article number — here's the format"
|
|
786
|
-
- "Our auth module uses RS256 not HS256 — here's why and where that decision lives"
|
|
787
|
-
- "The 6 locale files must always be edited atomically — here's the co-edit pattern"
|
|
788
|
-
|
|
789
|
-
`/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.
|
|
697
|
+
Skills are NOT generic instructions Claude already knows ("write clean code"). Skills ARE project-specific knowledge: "Our auth uses RS256 not HS256 — here's why" or "The 6 locale files must always be edited atomically."
|
|
790
698
|
|
|
791
699
|
### Agents: only for parallelism and isolation
|
|
792
700
|
|
|
793
|
-
An agent is a sub-process. Use one when
|
|
794
|
-
|
|
795
|
-
**Create an agent when:**
|
|
796
|
-
- Two workstreams can run concurrently (parallel dispatch saves real time)
|
|
797
|
-
- A task must be isolated from main context (experiments, reviews, security scans)
|
|
798
|
-
- There's enough domain depth to justify a dedicated context window (5+ files, unique conventions, a clear scope boundary)
|
|
799
|
-
|
|
800
|
-
**Don't create an agent when:**
|
|
801
|
-
- A tight skill + Claude's native capability already handles it
|
|
802
|
-
- You'd create it just to "have one for auth" or "have one for the frontend"
|
|
803
|
-
- The agent's instructions are things Claude already knows without being told
|
|
701
|
+
An agent is a sub-process. Use one when work must happen **in parallel** or **in a separate context**. Not for organizing knowledge — skills do that cheaper.
|
|
804
702
|
|
|
805
|
-
**The test:** Would removing this agent and writing a skill
|
|
806
|
-
|
|
807
|
-
### The right order
|
|
703
|
+
**The test:** Would removing this agent and writing a skill produce worse results? If no — use a skill.
|
|
808
704
|
|
|
809
705
|
```
|
|
810
|
-
1. Craft a skill
|
|
811
|
-
2. Watch if the same workflow keeps recurring
|
|
812
|
-
3. If work can be parallelized
|
|
813
|
-
4. Let /evolve make the call from git evidence
|
|
706
|
+
1. Craft a skill for the project-specific context Claude is missing
|
|
707
|
+
2. Watch if the same workflow keeps recurring (/reflexes will detect it)
|
|
708
|
+
3. If work can be parallelized or isolated → promote to an agent
|
|
709
|
+
4. Let /evolve make the call from git evidence
|
|
814
710
|
```
|
|
815
711
|
|
|
816
712
|
---
|
|
817
713
|
|
|
818
714
|
## Progressive Levels (0–10)
|
|
819
715
|
|
|
820
|
-
AZCLAUDE builds capability progressively — start simple, grow into complexity:
|
|
821
|
-
|
|
822
716
|
| Level | What gets built | Trigger |
|
|
823
717
|
|-------|----------------|---------|
|
|
824
718
|
| 0 | Nothing yet | Fresh project |
|
|
825
719
|
| 1 | CLAUDE.md — project rules + dispatch | `/setup` or `/dream` |
|
|
826
|
-
| 2 | MCP config
|
|
720
|
+
| 2 | MCP config | `/level-up` |
|
|
827
721
|
| 3 | Skills — project-specific commands | `/setup` generates ≥ 2 |
|
|
828
722
|
| 4 | Memory — goals.md, patterns, antipatterns | `/setup` |
|
|
829
723
|
| 5 | Agents — from git co-change analysis | `/evolve` after 5+ commits |
|
|
830
724
|
| 6 | Hooks — stateful session tracking | `npx azclaude-copilot` |
|
|
831
725
|
| 7 | External MCP servers | `/level-up` |
|
|
832
|
-
| 8 | Orchestrated pipeline — multi-agent
|
|
833
|
-
| 9 | Intelligence — debate, OPRO, ELO
|
|
834
|
-
| 10 | Self-evolving — loop-controller
|
|
835
|
-
|
|
836
|
-
Run `/level-up` at any time to see your current level and build the next one.
|
|
726
|
+
| 8 | Orchestrated pipeline — multi-agent | `/level-up` |
|
|
727
|
+
| 9 | Intelligence — debate, OPRO, ELO | `npx azclaude-copilot` |
|
|
728
|
+
| 10 | Self-evolving — loop-controller | `/evolve` sustained |
|
|
837
729
|
|
|
838
730
|
---
|
|
839
731
|
|
|
840
732
|
## What Makes It Different
|
|
841
733
|
|
|
842
|
-
|
|
|
843
|
-
|
|
734
|
+
| | Claude Code alone | AZCLAUDE |
|
|
735
|
+
|---|---|---|
|
|
844
736
|
| Project memory | Starts fresh every session | goals.md + checkpoints injected automatically |
|
|
845
|
-
| Conventions |
|
|
846
|
-
| Mid-session reasoning | Lost on
|
|
847
|
-
| Learned behavior | None | Reflexes
|
|
848
|
-
| CLAUDE.md quality | Drifts, never updated | /reflect finds
|
|
737
|
+
| Conventions | Re-explained each time | CLAUDE.md — loaded before every task |
|
|
738
|
+
| Mid-session reasoning | Lost on compaction | /snapshot saves WHY — auto-injected next session |
|
|
739
|
+
| Learned behavior | None | Reflexes from tool-use, confidence-scored |
|
|
740
|
+
| CLAUDE.md quality | Drifts, never updated | /reflect finds and fixes stale rules |
|
|
849
741
|
| Architecture decisions | Re-debated every time | decisions.md — logged once, referenced forever |
|
|
850
742
|
| Failed approaches | Repeated | antipatterns.md — agents read before implementing |
|
|
851
|
-
| Security | Manual | 4-layer enforcement: write-time blocking
|
|
852
|
-
|
|
|
853
|
-
| Agent specialization | None | Project agents emerge from git evidence, not guessing |
|
|
743
|
+
| Security | Manual | 4-layer enforcement: write-time blocking + audit + pre-ship |
|
|
744
|
+
| Agent specialization | None | Project agents emerge from git evidence |
|
|
854
745
|
| Autonomous building | Not possible | /copilot — three-tier intelligent team |
|
|
855
|
-
| Self-improvement | Not possible | /evolve + /reflect + /reflexes
|
|
856
|
-
| Requirements traceability | None | /spec
|
|
857
|
-
| Governance
|
|
858
|
-
| Plan
|
|
859
|
-
|
|
|
746
|
+
| Self-improvement | Not possible | /evolve + /reflect + /reflexes loop |
|
|
747
|
+
| Requirements traceability | None | /spec → acceptance criteria → every milestone |
|
|
748
|
+
| Governance | None | constitution-guard blocks non-compliant milestones |
|
|
749
|
+
| Plan drift | Invisible | /analyze catches ghost milestones before they ship |
|
|
750
|
+
| Parallel safety | Raw worktree primitive | Four-layer classifier + safety model |
|
|
860
751
|
| Any stack | Yes | Yes |
|
|
861
752
|
| You own the code | Yes | Yes |
|
|
862
753
|
| Zero dependencies | — | Yes (0 in package.json) |
|
|
@@ -876,4 +767,4 @@ bash tests/test-features.sh
|
|
|
876
767
|
|
|
877
768
|
## License
|
|
878
769
|
|
|
879
|
-
MIT — [haytamAroui](https://github.com/haytamAroui)
|
|
770
|
+
MIT — [haytamAroui](https://github.com/haytamAroui)
|
package/hooks/hooks.json
CHANGED
|
@@ -12,9 +12,21 @@
|
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
+
"PreToolUse": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/templates/hooks/pre-tool-use.js\"",
|
|
22
|
+
"async": false
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
15
27
|
"PostToolUse": [
|
|
16
28
|
{
|
|
17
|
-
"matcher": "Write|Edit",
|
|
29
|
+
"matcher": "Write|Edit|MultiEdit|Read|Bash|Grep",
|
|
18
30
|
"hooks": [
|
|
19
31
|
{
|
|
20
32
|
"type": "command",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azclaude-copilot",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.38",
|
|
4
4
|
"description": "AI coding environment — 37 commands, 10 skills, 15 agents, memory, reflexes, evolution. Install: npx azclaude-copilot@latest, then open Claude Code.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"azclaude": "bin/cli.js",
|
|
@@ -29,8 +29,9 @@ try {
|
|
|
29
29
|
toolName = data.tool_name || '';
|
|
30
30
|
filePath = data.tool_input?.file_path || data.tool_input?.path || data.tool_input?.command || '';
|
|
31
31
|
// Extract change summary from old_string/new_string diff hint (Edit tool)
|
|
32
|
-
|
|
33
|
-
const
|
|
32
|
+
// MultiEdit: edits[] array — use first edit's new_string
|
|
33
|
+
const oldStr = data.tool_input?.old_string || data.tool_input?.edits?.[0]?.old_string || '';
|
|
34
|
+
const newStr = data.tool_input?.new_string || data.tool_input?.edits?.[0]?.new_string || '';
|
|
34
35
|
if (oldStr && newStr) {
|
|
35
36
|
// Summarize: first non-empty line of new content (what was added)
|
|
36
37
|
const firstNew = newStr.split('\n').find(l => l.trim().length > 0) || '';
|
|
@@ -50,7 +51,7 @@ const goalsPath = path.join(cfg, 'memory', 'goals.md');
|
|
|
50
51
|
if (!fs.existsSync(goalsPath)) process.exit(0); // not an AZCLAUDE project
|
|
51
52
|
|
|
52
53
|
// For non-file tools (Bash, Grep without file_path), still capture observations but skip goals tracking
|
|
53
|
-
const isFileTool = toolName === 'Write' || toolName === 'Edit' || (!toolName && filePath);
|
|
54
|
+
const isFileTool = toolName === 'Write' || toolName === 'Edit' || toolName === 'MultiEdit' || (!toolName && filePath);
|
|
54
55
|
const rel = filePath ? path.relative(process.cwd(), path.resolve(filePath)) : toolName || 'unknown';
|
|
55
56
|
|
|
56
57
|
if (isFileTool) {
|