azclaude-copilot 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -424,7 +424,7 @@ azclaude-copilot/
424
424
  ├── DOCS.md <- full user guide
425
425
  ├── SECURITY.md <- security policy + architecture
426
426
  ├── tests/
427
- │ └── test-features.sh ← 1039 tests
427
+ │ └── test-features.sh ← 1048 tests
428
428
  ```
429
429
 
430
430
  ---
@@ -450,11 +450,11 @@ The runner is stateless. These files ARE the state.
450
450
 
451
451
  ## Verified
452
452
 
453
- 1039 tests. Every template, command, capability, agent, and CLI feature verified.
453
+ 1048 tests. Every template, command, capability, agent, and CLI feature verified.
454
454
 
455
455
  ```bash
456
456
  bash tests/test-features.sh
457
- # Results: 1039 passed, 0 failed, 1039 total
457
+ # Results: 1048 passed, 0 failed, 1048 total
458
458
  ```
459
459
 
460
460
  ---
package/bin/copilot.js CHANGED
@@ -169,7 +169,11 @@ for (let session = 1; session <= maxSessions; session++) {
169
169
  console.log(`\n── Session ${session}/${maxSessions} ${elapsed > 0 ? `(${elapsed}min elapsed)` : ''} ──`);
170
170
 
171
171
  // Build state-aware prompt
172
- let prompt = 'You are in AZCLAUDE Copilot mode. Run /copilot to continue autonomous building.';
172
+ // IMPORTANT: In -p mode, slash commands (/setup, /copilot) don't work.
173
+ // Tell Claude to read and follow the command .md files directly.
174
+ let prompt = 'You are in AZCLAUDE Copilot mode. You are running in non-interactive mode (-p flag).';
175
+ prompt += '\n\nIMPORTANT: Slash commands like /setup do NOT work in -p mode. Instead, read the command file and follow its instructions. For example, to run /copilot: read .claude/commands/copilot.md and follow it. To run /setup: read .claude/commands/setup.md and follow it.';
176
+ prompt += '\n\nRead .claude/commands/copilot.md now and follow it to continue autonomous building.';
173
177
  prompt += `\n\nOriginal intent: ${intent}`;
174
178
  prompt += `\n\nSession ${session}/${maxSessions}.`;
175
179
 
@@ -184,13 +188,13 @@ for (let session = 1; session <= maxSessions; session++) {
184
188
  const total = statuses.length;
185
189
  prompt += `\n\nPlan progress: ${done}/${total} done, ${blocked} blocked, ${pending} remaining.`;
186
190
  if (blocked > 0) prompt += ' Check blockers.md — retry blocked milestones if new context helps.';
187
- if (done > 0 && done % 3 === 0) prompt += ' 3+ milestones since last /evolve — run /reflexes analyze + /evolve.';
188
- if (pending === 0 && blocked === 0) prompt += ' All milestones done — run /audit then /ship.';
191
+ if (done > 0 && done % 3 === 0) prompt += ' 3+ milestones since last /evolve — read .claude/commands/reflexes.md then .claude/commands/evolve.md.';
192
+ if (pending === 0 && blocked === 0) prompt += ' All milestones done — read .claude/commands/audit.md then .claude/commands/ship.md.';
189
193
  } else {
190
194
  prompt += '\n\nPlan exists but plan.md not found. Read .claude/plan.md for status.';
191
195
  }
192
196
  } else {
193
- prompt += '\n\nNo plan yet. Start with /setup then /blueprint to create milestones.';
197
+ prompt += '\n\nNo plan yet. Read .claude/commands/setup.md and follow it, then read .claude/commands/blueprint.md to create milestones.';
194
198
  }
195
199
 
196
200
  // Run Claude Code session
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Autonomous product builder. Describe once, AZCLAUDE builds it across sessions — planning, implementing, testing, evolving, deploying. Zero human input.",
5
5
  "bin": {
6
6
  "azclaude": "./bin/cli.js",
@@ -150,7 +150,37 @@ If the file doesn't exist, create it with this header:
150
150
 
151
151
  ---
152
152
 
153
- ## Step 7: Promote GENERAL Skills
153
+ ## Step 7: Generate Project-Specific Skills and Agents from Evidence
154
+
155
+ ### Skills from git evidence
156
+ ```bash
157
+ git log --name-only --format="" --diff-filter=AM | sort | uniq -c | sort -rn | head -20
158
+ ```
159
+ If a file pattern appears 5+ times (e.g., `src/components/*.tsx`, `content/*.md`, `api/routes/*.py`):
160
+ 1. Read `.claude/capabilities/level-builders/level3-skills.md`
161
+ 2. Create a skill that encodes the workflow for that pattern
162
+ 3. Save to `.claude/commands/{skill-name}.md`
163
+ 4. Only create if no existing skill covers this workflow
164
+
165
+ ### Agents from co-change clusters
166
+ ```bash
167
+ git log --name-only --format="" --diff-filter=M | sort | uniq -c | sort -rn | head -30
168
+ ```
169
+ If 3+ files in the same directory change together across 3+ commits:
170
+ 1. Read `.claude/capabilities/level-builders/level5-agents.md`
171
+ 2. Create an agent with all 5 layers in `.claude/agents/cc-{name}.md`
172
+ 3. Use co-change data for scope boundaries
173
+ 4. Only create if no existing agent covers this cluster
174
+
175
+ ### Check existing before creating
176
+ ```bash
177
+ ls .claude/commands/*.md .claude/agents/*.md 2>/dev/null
178
+ ```
179
+ Skip creation if a skill/agent already covers the same workflow.
180
+
181
+ ---
182
+
183
+ ## Step 8: Promote GENERAL Skills
154
184
 
155
185
  For any fix tagged GENERAL in EVALUATE:
156
186
  1. Copy to `~/shared-skills/{name}.md`
@@ -70,7 +70,49 @@ The orchestrator-init agent:
70
70
 
71
71
  ---
72
72
 
73
- ## Step 5: Quality Gate
73
+ ## Step 5: Generate Project-Specific Skills
74
+
75
+ Read `.claude/capabilities/level-builders/level3-skills.md` for the skill design guide.
76
+
77
+ Analyze the project's domain, stack, and recurring workflows:
78
+ 1. Check what file types and patterns exist (endpoints, pages, components, schemas, tests)
79
+ 2. Check git log for repeated commit patterns (what work is done most often)
80
+ 3. Identify 2-4 project-specific skills that would encode the most common workflows
81
+
82
+ For each skill:
83
+ - Create `.claude/commands/{skill-name}.md` with pushy description (3+ trigger variants)
84
+ - Follow RECIPE pattern (steps to do something, not documentation)
85
+ - Include completion rule
86
+ - ≤ 500 lines (references/ subdir for overflow)
87
+
88
+ **Stack-specific defaults** (generate if stack detected):
89
+ | Stack | Generate |
90
+ |-------|---------|
91
+ | Next.js / React | `new-page.md`, `new-component.md` |
92
+ | Express / FastAPI | `new-endpoint.md` |
93
+ | Any DB | `migrate.md` |
94
+ | Any deploy config | `deploy.md` |
95
+ | Markdown content | `new-content.md`, `validate-content.md` |
96
+ | Exam / quiz | `new-exam.md`, `validate-exam.md` |
97
+
98
+ **TaskUpdate → completed** for Create skills.
99
+
100
+ ---
101
+
102
+ ## Step 6: Generate Project-Specific Agents (if project has 10+ files)
103
+
104
+ Read `.claude/capabilities/level-builders/level5-agents.md` for agent design guide.
105
+
106
+ 1. Run co-change analysis: `git log --name-only --format="" --diff-filter=M | sort | uniq -c | sort -rn | head -30`
107
+ 2. Identify file clusters that change independently → each cluster = potential agent
108
+ 3. Create 1-3 agents in `.claude/agents/cc-{name}.md` with all 5 layers
109
+ 4. Prefix all agents with `cc-` to avoid framework collisions
110
+
111
+ Skip if project has < 10 files or < 5 commits.
112
+
113
+ ---
114
+
115
+ ## Step 7: Quality Gate
74
116
 
75
117
  Load `capabilities/shared/quality-check.md` and run the full environment check.
76
118