azclaude-copilot 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -22
- package/package.json +1 -1
- package/templates/capabilities/manifest.md +1 -0
- package/templates/capabilities/shared/intelligent-dispatch.md +79 -0
- package/templates/commands/add.md +13 -0
- package/templates/commands/audit.md +21 -0
- package/templates/commands/dream.md +17 -0
- package/templates/commands/fix.md +14 -0
- package/templates/commands/refactor.md +21 -0
- package/templates/commands/ship.md +20 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## What is AZCLAUDE?
|
|
23
23
|
|
|
24
|
-
An AI coding environment you install into any project. It gives Claude Code (or Gemini CLI, Codex, OpenCode, Cursor) **26 commands, 8 auto-invoked skills,
|
|
24
|
+
An AI coding environment you install into any project. It gives Claude Code (or Gemini CLI, Codex, OpenCode, Cursor) **26 commands, 8 auto-invoked skills, 10 agents, memory across sessions, learned reflexes, and self-evolving infrastructure**.
|
|
25
25
|
|
|
26
26
|
Zero dependencies. One install. Works on any stack.
|
|
27
27
|
|
|
@@ -115,13 +115,21 @@ npx azclaude-copilot . # resume existing copilot run
|
|
|
115
115
|
| Restarts Claude Code sessions until COPILOT_COMPLETE. |
|
|
116
116
|
| Reads nothing. Decides nothing. Just loops. |
|
|
117
117
|
+-----------------------------------------------------------+
|
|
118
|
-
| LAYER 2: THE
|
|
118
|
+
| LAYER 2: THE TEAM (intelligent copilot, v0.4+) |
|
|
119
|
+
| Orchestrator: reads plan.md, consults architect, |
|
|
120
|
+
| dispatches builders, monitors results, triggers /evolve |
|
|
121
|
+
| Problem-Architect: analyzes each milestone before work |
|
|
122
|
+
| (Team Spec: agents, skills, files, risks, complexity) |
|
|
123
|
+
| Milestone-Builder: pre-reads, implements, verifies, |
|
|
124
|
+
| self-corrects, commits, reports back |
|
|
125
|
+
+-----------------------------------------------------------+
|
|
126
|
+
| LAYER 3: THE BRAIN (all commands, every session) |
|
|
119
127
|
| Reads goals.md, plan.md, checkpoint, patterns, |
|
|
120
128
|
| blockers, decisions, reflexes, context artifacts |
|
|
121
|
-
|
|
|
122
|
-
|
|
|
129
|
+
| intelligent-dispatch: pre-flight before /add /fix |
|
|
130
|
+
| /dream /audit /refactor /ship — no more blind jumps |
|
|
123
131
|
+-----------------------------------------------------------+
|
|
124
|
-
| LAYER
|
|
132
|
+
| LAYER 4: THE ENVIRONMENT (accumulates across sessions) |
|
|
125
133
|
| Project agents emerge from git evidence (/evolve) |
|
|
126
134
|
| Reflexes learned from tool-use observations |
|
|
127
135
|
| Skills created when patterns repeat |
|
|
@@ -130,30 +138,33 @@ npx azclaude-copilot . # resume existing copilot run
|
|
|
130
138
|
+-----------------------------------------------------------+
|
|
131
139
|
```
|
|
132
140
|
|
|
133
|
-
Runner loops. AZCLAUDE accumulates. Claude
|
|
141
|
+
Runner loops. Team thinks. AZCLAUDE accumulates. Claude builds.
|
|
134
142
|
|
|
135
143
|
---
|
|
136
144
|
|
|
137
|
-
## The Pipeline
|
|
145
|
+
## The Intelligent Copilot Pipeline (v0.4+)
|
|
138
146
|
|
|
139
147
|
Every command detects copilot mode automatically (`[ -f .claude/copilot-intent.md ]`) and skips human interaction -- no approval gates, no prompts, no pauses.
|
|
140
148
|
|
|
141
149
|
```
|
|
142
|
-
Session 1: /dream -> /blueprint
|
|
143
|
-
|
|
144
|
-
Session
|
|
150
|
+
Session 1: /dream -> /blueprint (problem-architect annotates each milestone)
|
|
151
|
+
-> orchestrator dispatches milestone-builder M1,M2,M3 -> /snapshot
|
|
152
|
+
Session 2: /evolve (new agents created -> orchestrator unblocks plan)
|
|
153
|
+
-> orchestrator dispatches M4,M5 (parallel) -> M6 -> /snapshot
|
|
154
|
+
Session 3: /evolve -> orchestrator dispatches M7,M8,M9 -> /snapshot
|
|
145
155
|
Session 4: /evolve -> /audit -> /ship -> COPILOT_COMPLETE
|
|
146
156
|
```
|
|
147
157
|
|
|
148
|
-
### Per Milestone
|
|
158
|
+
### Per Milestone (Intelligent Dispatch)
|
|
149
159
|
|
|
150
|
-
1.
|
|
151
|
-
2.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
1. **Orchestrator** reads plan.md, selects next milestone wave
|
|
161
|
+
2. **Problem-Architect** analyzes the milestone → returns Team Spec:
|
|
162
|
+
agents needed, skills to load, files to pre-read, files to write (parallel safety), risks, complexity
|
|
163
|
+
3. **Orchestrator** dispatches **Milestone-Builder** with fully packaged context
|
|
164
|
+
4. **Milestone-Builder** pre-reads all specified files, implements, runs tests
|
|
165
|
+
5. Fix if failing (2 attempts SIMPLE/MEDIUM, 3 for COMPLEX)
|
|
166
|
+
6. If budget exhausted → log to `blockers.md`, orchestrator moves to next milestone
|
|
167
|
+
7. Commit: `{type}: {what} -- {why}` + push + update plan.md status → `done`
|
|
157
168
|
|
|
158
169
|
### Self-Healing
|
|
159
170
|
|
|
@@ -266,7 +277,27 @@ Session 4:
|
|
|
266
277
|
Full evolved environment. /audit -> /ship -> deploy. COPILOT_COMPLETE
|
|
267
278
|
```
|
|
268
279
|
|
|
269
|
-
System agents (code-reviewer, test-writer, orchestrator-init) run the framework. Project agents emerge from the work. Two separate layers.
|
|
280
|
+
System agents (orchestrator, problem-architect, milestone-builder, code-reviewer, test-writer, orchestrator-init) run the framework. Project agents (cc-*) emerge from the work. Two separate layers.
|
|
281
|
+
|
|
282
|
+
### Intelligent Dispatch — Pre-Flight for Every Command
|
|
283
|
+
|
|
284
|
+
`shared/intelligent-dispatch.md` is the universal pre-flight protocol. Every non-trivial command loads it before touching code.
|
|
285
|
+
|
|
286
|
+
**Commands that now spawn problem-architect before acting:**
|
|
287
|
+
|
|
288
|
+
| Command | What pre-analysis adds |
|
|
289
|
+
|---------|----------------------|
|
|
290
|
+
| `/add` | What files to pre-read, which skills to load, pre-conditions, patterns to follow |
|
|
291
|
+
| `/fix` | Bug scope (which files are involved), relevant antipatterns, pre-conditions |
|
|
292
|
+
| `/dream` | Scan existing codebase before generating vision (what already exists, established patterns) |
|
|
293
|
+
| `/audit` | Inject decisions.md + patterns.md + antipatterns.md as the review checklist |
|
|
294
|
+
| `/refactor` | Full dependency graph before touching code (catches missed references) |
|
|
295
|
+
| `/ship` | Risk scan — unmet pre-conditions block the push |
|
|
296
|
+
| `/blueprint` | Annotates every plan.md milestone with: Complexity, Files Written, Pre-conditions, Risks |
|
|
297
|
+
| `/evolve` | After creating new agents: orchestrator re-evaluates plan.md, unblocks blocked milestones |
|
|
298
|
+
| `/setup` | Cold-start: problem-architect recommends agents when < 5 git commits exist |
|
|
299
|
+
|
|
300
|
+
Every command used to jump in blind. Now they ask "what do I need to know first?"
|
|
270
301
|
|
|
271
302
|
### Context Artifacts
|
|
272
303
|
|
|
@@ -469,7 +500,7 @@ azclaude-copilot/
|
|
|
469
500
|
├── DOCS.md <- full user guide
|
|
470
501
|
├── SECURITY.md <- security policy + architecture
|
|
471
502
|
├── tests/
|
|
472
|
-
│ └── test-features.sh ←
|
|
503
|
+
│ └── test-features.sh ← 1135 tests
|
|
473
504
|
```
|
|
474
505
|
|
|
475
506
|
---
|
|
@@ -495,11 +526,11 @@ The runner is stateless. These files ARE the state.
|
|
|
495
526
|
|
|
496
527
|
## Verified
|
|
497
528
|
|
|
498
|
-
|
|
529
|
+
1135 tests. Every template, command, capability, agent, and CLI feature verified.
|
|
499
530
|
|
|
500
531
|
```bash
|
|
501
532
|
bash tests/test-features.sh
|
|
502
|
-
# Results:
|
|
533
|
+
# Results: 1135 passed, 0 failed, 1135 total
|
|
503
534
|
```
|
|
504
535
|
|
|
505
536
|
---
|
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ Load only the files that match the current task. Never load the full list.
|
|
|
25
25
|
| shared/context-artifacts.md | Project has DB schemas, API specs, infra configs, or knowledge/ dir — discover and use non-code knowledge before implementing | ~200 |
|
|
26
26
|
| shared/semantic-boundary-check.md | /evolve Cycle 3 or boundary validator warns — detect deeper behavioral duplication across extension types that grep misses | ~300 |
|
|
27
27
|
| shared/domain-advisor-generator.md | Non-tech domain detected (compliance, marketing, finance, medical, legal, research) — generates domain-specific advisor skill | ~400 |
|
|
28
|
+
| shared/intelligent-dispatch.md | About to build, fix, refactor, audit, or ship — non-trivial scope (3+ files or structural) — pre-flight analysis via problem-architect | ~300 |
|
|
28
29
|
|
|
29
30
|
## Level Builders — load ONE at a time
|
|
30
31
|
| File | When to load | Tokens |
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Intelligent Dispatch — Pre-Flight Protocol
|
|
2
|
+
|
|
3
|
+
Load before any non-trivial build, fix, refactor, audit, or plan task.
|
|
4
|
+
Invokes problem-architect for structured analysis BEFORE touching code.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## When to Run Problem-Architect
|
|
9
|
+
|
|
10
|
+
Run pre-analysis if ANY of these is true:
|
|
11
|
+
- Task will touch 3+ files
|
|
12
|
+
- Task involves a structural change (schema, API contract, auth, architecture)
|
|
13
|
+
- Task crosses directory boundaries (multiple modules or layers)
|
|
14
|
+
- First time working in this part of the codebase this session
|
|
15
|
+
|
|
16
|
+
Skip if:
|
|
17
|
+
- Only 1-2 files, clearly scoped
|
|
18
|
+
- Pure config/docs change with no code impact
|
|
19
|
+
- Already in copilot mode with annotated plan.md (milestones already have Team Spec)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## How to Invoke
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ls .claude/agents/problem-architect.md 2>/dev/null && echo "ARCHITECT_AVAILABLE" || echo "NOT_INSTALLED"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If ARCHITECT_AVAILABLE — spawn problem-architect with:
|
|
30
|
+
```
|
|
31
|
+
Task: {command name} — {what you're doing}
|
|
32
|
+
Current state: {what files/dirs exist relevant to this task}
|
|
33
|
+
Available agents: {output of: ls .claude/agents/ 2>/dev/null}
|
|
34
|
+
Available skills: {output of: ls .claude/skills/ 2>/dev/null}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## What to Do with the Returned Team Spec
|
|
40
|
+
|
|
41
|
+
| Field | Action |
|
|
42
|
+
|-------|--------|
|
|
43
|
+
| Skills to Load | Load each skill before implementing |
|
|
44
|
+
| Pre-Read Files | Read every file listed, in order: schema → source → tests → patterns → antipatterns |
|
|
45
|
+
| Pre-Conditions | Verify each; STOP if any unmet |
|
|
46
|
+
| Files Written | Note for parallel safety — no concurrent work on same files |
|
|
47
|
+
| Structural Decision: YES | Run /debate before proceeding; log result to `.claude/memory/decisions.md` |
|
|
48
|
+
| Risks | Read mitigation; apply to implementation approach |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Implementation Protocol (milestone-builder)
|
|
53
|
+
|
|
54
|
+
For any implementation task (3+ files or MEDIUM/COMPLEX):
|
|
55
|
+
|
|
56
|
+
1. **Pre-read** all files from Team Spec — no exceptions
|
|
57
|
+
2. **Implement** following patterns.md exactly — never invent patterns
|
|
58
|
+
3. **Verify** — run full test suite, show actual output (never summarize)
|
|
59
|
+
4. **Self-correct** — re-read error + check antipatterns.md → ONE alternative approach
|
|
60
|
+
5. **Budget** — 2 fix attempts for SIMPLE/MEDIUM, 3 for COMPLEX
|
|
61
|
+
- Budget exhausted → report exact error + what was tried → do not guess again
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## When to Escalate to Orchestrator
|
|
66
|
+
|
|
67
|
+
If `.claude/agents/orchestrator.md` exists:
|
|
68
|
+
- Task spans 2+ milestones in plan.md → delegate to orchestrator
|
|
69
|
+
- Multiple independent workstreams → orchestrator manages parallel dispatch
|
|
70
|
+
- Structural decision needed → orchestrator triggers /debate
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- NEVER skip pre-read. Context-blind implementation is the most common failure mode.
|
|
77
|
+
- NEVER invent patterns. patterns.md says use X → use X.
|
|
78
|
+
- NEVER exceed fix attempt budget. Stop and report when exhausted.
|
|
79
|
+
- ALWAYS show test output. Never say "tests should pass."
|
|
@@ -18,6 +18,19 @@ Load: shared/tdd.md + shared/completion-rule.md
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Pre-Flight Analysis (intelligent-dispatch)
|
|
22
|
+
|
|
23
|
+
Load `shared/intelligent-dispatch.md`.
|
|
24
|
+
|
|
25
|
+
If task will touch 3+ files OR crosses module boundaries:
|
|
26
|
+
→ Spawn problem-architect (see intelligent-dispatch protocol)
|
|
27
|
+
→ Use returned Team Spec: load skills, pre-read files, check pre-conditions, note risks
|
|
28
|
+
→ If Structural Decision: YES → run /debate before Phase 4
|
|
29
|
+
|
|
30
|
+
If problem-architect not installed: proceed with Phase 1 as normal (manual scan in Phase 2).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
21
34
|
## Copilot Mode Detection
|
|
22
35
|
|
|
23
36
|
```bash
|
|
@@ -48,6 +48,27 @@ If `COPILOT_MODE`:
|
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
+
## Step 1b: Structural Context (intelligent-dispatch)
|
|
52
|
+
|
|
53
|
+
Load `shared/intelligent-dispatch.md`.
|
|
54
|
+
|
|
55
|
+
If problem-architect available — spawn it before reviewing:
|
|
56
|
+
```
|
|
57
|
+
Task: audit — structural context for spec compliance review
|
|
58
|
+
Current state: {what's changed, what the diff covers}
|
|
59
|
+
Available agents: {list}
|
|
60
|
+
Available skills: {list}
|
|
61
|
+
```
|
|
62
|
+
Use returned Team Spec to inject:
|
|
63
|
+
- `decisions.md` rulings to check against (architectural commitments)
|
|
64
|
+
- `patterns.md` conventions the code should follow
|
|
65
|
+
- `antipatterns.md` known failure patterns to scan for
|
|
66
|
+
- Risks flagged by architect → include in audit checklist
|
|
67
|
+
|
|
68
|
+
If problem-architect not installed: proceed with manual review using available memory files.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
51
72
|
## Step 2: Spec Compliance (REQUIRED FIRST)
|
|
52
73
|
|
|
53
74
|
**Assume the implementation may be incomplete or optimistic. Verify independently.**
|
|
@@ -57,6 +57,23 @@ Read `.claude/capabilities/manifest.md` if it exists.
|
|
|
57
57
|
|
|
58
58
|
Detect current level (0–7) from what's present.
|
|
59
59
|
|
|
60
|
+
**Existing project deep scan (intelligent-dispatch):**
|
|
61
|
+
|
|
62
|
+
If `.claude` directory exists and project has code files — load `shared/intelligent-dispatch.md` and spawn problem-architect:
|
|
63
|
+
```
|
|
64
|
+
Task: dream — analyze existing codebase before generating vision
|
|
65
|
+
Current state: {what files, agents, skills already exist}
|
|
66
|
+
Available agents: {list}
|
|
67
|
+
Available skills: {list}
|
|
68
|
+
```
|
|
69
|
+
Use returned Team Spec to understand:
|
|
70
|
+
- What agents/skills already cover (don't regenerate what exists)
|
|
71
|
+
- Co-change clusters (candidate future agents)
|
|
72
|
+
- Established patterns (vision must not conflict with them)
|
|
73
|
+
- Structural decisions already made (decisions.md)
|
|
74
|
+
|
|
75
|
+
If clean slate (no .claude dir): skip problem-architect, proceed to Phase 3.
|
|
76
|
+
|
|
60
77
|
**ExitPlanMode** — ready to build.
|
|
61
78
|
|
|
62
79
|
---
|
|
@@ -14,6 +14,20 @@ Load: shared/tdd.md + shared/completion-rule.md before starting.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## Pre-Flight Analysis (intelligent-dispatch)
|
|
18
|
+
|
|
19
|
+
Load `shared/intelligent-dispatch.md`.
|
|
20
|
+
|
|
21
|
+
After reproducing the error — before investigating — spawn problem-architect if available:
|
|
22
|
+
→ Task: "fix — {error description}"
|
|
23
|
+
→ Current state: {files involved in the failure}
|
|
24
|
+
→ Use returned Team Spec: pre-read the affected files, load patterns/antipatterns for this area
|
|
25
|
+
→ Pre-conditions check prevents fixing a symptom instead of the root cause
|
|
26
|
+
|
|
27
|
+
If problem-architect not installed: proceed with Phase 2 manual investigation as normal.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
17
31
|
## Phase 1: REPRODUCE
|
|
18
32
|
|
|
19
33
|
**First: check IDE diagnostics (instant, no build needed)**
|
|
@@ -18,6 +18,27 @@ Load: shared/completion-rule.md
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Pre-Flight Analysis (intelligent-dispatch)
|
|
22
|
+
|
|
23
|
+
Load `shared/intelligent-dispatch.md`.
|
|
24
|
+
|
|
25
|
+
Spawn problem-architect before any scan:
|
|
26
|
+
```
|
|
27
|
+
Task: refactor — {what's being refactored}
|
|
28
|
+
Current state: {target file/function + surrounding directory}
|
|
29
|
+
Available agents: {list}
|
|
30
|
+
Available skills: {list}
|
|
31
|
+
```
|
|
32
|
+
Use returned Team Spec:
|
|
33
|
+
- Pre-Read Files → read these BEFORE grepping for references (architect already knows the dependency graph)
|
|
34
|
+
- Risks → structural risks the refactor may trigger (e.g., type exports used downstream)
|
|
35
|
+
- Files Written → exhaustive list of files the refactor will touch
|
|
36
|
+
- If Structural Decision: YES → run /debate (refactors sometimes expose architectural choices)
|
|
37
|
+
|
|
38
|
+
If problem-architect not installed: proceed with Phase 1 manual scan.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
21
42
|
## Phase 1: Understand Current State
|
|
22
43
|
|
|
23
44
|
If $ARGUMENTS is blank, use **AskUserQuestion**:
|
|
@@ -15,6 +15,26 @@ $ARGUMENTS
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
+
## Step 0: Risk Scan (intelligent-dispatch)
|
|
19
|
+
|
|
20
|
+
Load `shared/intelligent-dispatch.md`.
|
|
21
|
+
|
|
22
|
+
If problem-architect available — spawn it for a pre-ship risk scan:
|
|
23
|
+
```
|
|
24
|
+
Task: ship — pre-ship risk assessment
|
|
25
|
+
Current state: {output of: git diff --stat HEAD}
|
|
26
|
+
Available agents: {list}
|
|
27
|
+
Available skills: {list}
|
|
28
|
+
```
|
|
29
|
+
Use returned Team Spec:
|
|
30
|
+
- Risks → must address before shipping (not suggestions)
|
|
31
|
+
- Structural Decision: YES → a decision was made without /debate → log it to decisions.md now
|
|
32
|
+
- Pre-Conditions → any unmet condition blocks ship (e.g., migration not run, env var not set)
|
|
33
|
+
|
|
34
|
+
If problem-architect not installed OR git diff is only docs/config: skip and proceed to Pre-Ship Gate.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
18
38
|
## Pre-Ship Gate (runs before any commit)
|
|
19
39
|
|
|
20
40
|
**1. IDE diagnostics** — use `mcp__ide__getDiagnostics` if available.
|