azclaude-copilot 0.4.14 → 0.4.16

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
@@ -58,10 +58,10 @@ Most AI coding tools require upfront decisions: which agents to create, what pro
58
58
  AZCLAUDE inverts this. **You start with almost nothing. The environment builds itself from evidence.**
59
59
 
60
60
  ```bash
61
- azclaude-copilot setup --full # one command. that's it.
61
+ npx azclaude-copilot # one command. that's it.
62
62
  ```
63
63
 
64
- No agent files to write. No skills to configure. No prompt engineering. `setup --full` installs 27 commands, 4 hooks, memory structure, and a manifest. The rest is generated from your actual codebase as you work.
64
+ No agent files to write. No skills to configure. No prompt engineering. `npx azclaude-copilot` installs 33 commands, 4 hooks, memory structure, and a manifest. The rest is generated from your actual codebase as you work. Run the same command again later — it auto-detects whether to skip, install, or upgrade.
65
65
 
66
66
  **What the environment looks like across sessions:**
67
67
 
@@ -113,19 +113,16 @@ Claude reads the manifest (one file), finds which 1-3 capability files apply, lo
113
113
  **Step 1 — Install globally from your terminal:**
114
114
 
115
115
  ```bash
116
- npm install -g azclaude-copilot@latest
116
+ npx azclaude-copilot
117
117
  ```
118
118
 
119
- **Step 2 Run setup inside Claude Code:**
119
+ That's it. One command, no flags. Auto-detects whether this is a fresh install or an upgrade:
120
+ - **First time** → full install (33 commands, 4 hooks, 15 agents, 8 skills, memory, reflexes)
121
+ - **Already installed, older version** → auto-upgrades everything to latest templates
122
+ - **Already up to date** → verifies, no overwrites
120
123
 
121
124
  ```bash
122
- azclaude-copilot setup --full
123
- ```
124
-
125
- That's it. Your project now has AZCLAUDE in `.claude/` — 33 commands, 4 hooks, memory, reflexes, agents, and skills.
126
-
127
- ```bash
128
- azclaude-copilot doctor # 32 checks — verify everything is wired correctly
125
+ npx azclaude-copilot doctor # 32 checks — verify everything is wired correctly
129
126
  ```
130
127
 
131
128
  ---
@@ -772,10 +769,10 @@ AZCLAUDE builds capability progressively — start simple, grow into complexity:
772
769
  | 3 | Skills — project-specific commands | `/setup` generates ≥ 2 |
773
770
  | 4 | Memory — goals.md, patterns, antipatterns | `/setup` |
774
771
  | 5 | Agents — from git co-change analysis | `/evolve` after 5+ commits |
775
- | 6 | Hooks — stateful session tracking | `azclaude-copilot setup` |
772
+ | 6 | Hooks — stateful session tracking | `npx azclaude-copilot` |
776
773
  | 7 | External MCP servers | `/level-up` |
777
774
  | 8 | Orchestrated pipeline — multi-agent with problem-architect | `/level-up` |
778
- | 9 | Intelligence — debate, OPRO, ELO, pipeline isolation | `setup --full` |
775
+ | 9 | Intelligence — debate, OPRO, ELO, pipeline isolation | `npx azclaude-copilot` |
779
776
  | 10 | Self-evolving — loop-controller, 3-cycle autonomous evolution | `/evolve` sustained |
780
777
 
781
778
  Run `/level-up` at any time to see your current level and build the next one.
package/bin/cli.js CHANGED
@@ -1144,15 +1144,82 @@ if (fs.existsSync(postInstallValidator)) {
1144
1144
  } catch (_) {}
1145
1145
  }
1146
1146
 
1147
+ // ── Detect project state for smart onboarding ────────────────────────────────
1148
+ const planPath = path.join(projectDir, cli.cfg, 'plan.md');
1149
+ const intentPath = path.join(projectDir, cli.cfg, 'copilot-intent.md');
1150
+ const hasPlan = fs.existsSync(planPath);
1151
+ const hasIntent = fs.existsSync(intentPath);
1152
+
1153
+ // Check for pending milestones in plan.md
1154
+ let hasPendingMilestones = false;
1155
+ if (hasPlan) {
1156
+ try {
1157
+ const planContent = fs.readFileSync(planPath, 'utf8');
1158
+ hasPendingMilestones = /status:\s*pending/i.test(planContent);
1159
+ } catch (_) {}
1160
+ }
1161
+
1162
+ // Check for existing code files (not empty project)
1163
+ const codeExtensions = ['.ts', '.tsx', '.js', '.jsx', '.py', '.go', '.rs', '.java', '.rb', '.cs'];
1164
+ let hasCode = false;
1165
+ try {
1166
+ const entries = fs.readdirSync(projectDir);
1167
+ for (const entry of entries) {
1168
+ if (entry.startsWith('.') || entry === 'node_modules') continue;
1169
+ const ext = path.extname(entry);
1170
+ if (codeExtensions.includes(ext)) { hasCode = true; break; }
1171
+ // check one level deep
1172
+ const sub = path.join(projectDir, entry);
1173
+ try {
1174
+ if (fs.statSync(sub).isDirectory()) {
1175
+ const subEntries = fs.readdirSync(sub);
1176
+ if (subEntries.some(f => codeExtensions.includes(path.extname(f)))) {
1177
+ hasCode = true; break;
1178
+ }
1179
+ }
1180
+ } catch (_) {}
1181
+ }
1182
+ } catch (_) {}
1183
+
1184
+ // Determine onboarding path
1185
+ let onboardingPath;
1186
+ if (hasPlan && hasPendingMilestones) {
1187
+ onboardingPath = 'RESUME';
1188
+ } else if (hasPlan || hasCode || hasIntent) {
1189
+ onboardingPath = 'EXISTING';
1190
+ } else {
1191
+ onboardingPath = 'NEW';
1192
+ }
1193
+
1147
1194
  console.log('\n════════════════════════════════════════════════');
1148
- console.log(` v${currentVer} — ${isFirstInstall ? 'installed' : needsUpgrade ? 'upgraded' : 'up to date'}`);
1149
- console.log(' Architecture: lazy-loaded, manifest-driven');
1150
- console.log(' Token cost per task: ~200-600 (vs ~21,000 monolith)');
1195
+ console.log(` AZCLAUDE v${currentVer} — ${isFirstInstall ? 'installed' : needsUpgrade ? 'upgraded' : 'up to date'}`);
1196
+ console.log('');
1197
+ console.log(' Open Claude Code in this directory, then:');
1151
1198
  console.log('');
1152
- if (isFirstInstall || needsUpgrade) {
1153
- console.log(' Next step: open Claude Code and run /setup');
1199
+
1200
+ if (onboardingPath === 'RESUME') {
1201
+ console.log(' You have a plan with pending work:');
1202
+ console.log('');
1203
+ console.log(' /copilot resume autonomous build');
1204
+ console.log(' /pulse see current state first');
1205
+ console.log(' /analyze plan verify plan vs reality');
1206
+ } else if (onboardingPath === 'EXISTING') {
1207
+ console.log(' Existing project detected:');
1208
+ console.log('');
1209
+ console.log(' /setup scan + configure this project');
1210
+ console.log(' /dream define what to build next');
1211
+ console.log(' /blueprint plan the next feature');
1212
+ console.log(' /copilot . build autonomously');
1154
1213
  } else {
1155
- console.log(' Already up to date. Run /setup in Claude Code to configure.');
1214
+ console.log(' New project:');
1215
+ console.log('');
1216
+ console.log(' /setup configure this project');
1217
+ console.log(' /add [feature] start building immediately');
1218
+ console.log(' /dream plan a full product first');
1156
1219
  }
1157
- console.log(` To upgrade later: npx azclaude-copilot@latest (auto-detects version)`);
1220
+
1221
+ console.log('');
1222
+ console.log(' ─────────────────────────────────────────────');
1223
+ console.log(' docs: github.com/haytamAroui/AZ-CLAUDE-COPILOT');
1224
+ console.log(' upgrade: npx azclaude-copilot (auto-detects)');
1158
1225
  console.log('════════════════════════════════════════════════\n');
package/bin/copilot.js CHANGED
@@ -25,15 +25,18 @@ const args = process.argv.slice(2);
25
25
 
26
26
  // ── Subcommand routing ──────────────────────────────────────────────────────
27
27
  // Catch `npx azclaude-copilot setup` and similar — run the installer instead
28
- const SUBCOMMANDS = ['setup', 'init', 'install', 'doctor'];
28
+ // Also: no arguments at all → run installer (auto-detect install vs upgrade)
29
+ const SUBCOMMANDS = ['setup', 'init', 'install', 'doctor', 'upgrade'];
29
30
  const CLI_FLAGS = ['--update', '--full', '--audit'];
30
- if (args[0] && SUBCOMMANDS.includes(args[0].toLowerCase())) {
31
+ const noArgs = args.length === 0 || (args.length === 1 && CLI_FLAGS.includes(args[0]));
32
+ if (noArgs || (args[0] && SUBCOMMANDS.includes(args[0].toLowerCase()))) {
31
33
  const subFlags = args.filter(a => CLI_FLAGS.includes(a));
32
- const subPositional = args.slice(1).filter(a => !CLI_FLAGS.includes(a));
34
+ const subPositional = (noArgs ? [] : args.slice(1)).filter(a => !CLI_FLAGS.includes(a));
33
35
  const subDir = path.resolve(subPositional[0] || '.');
34
- console.log(`\n Running AZCLAUDE installer on ${subDir}...${subFlags.length ? ' (' + subFlags.join(' ') + ')' : ''}\n`);
36
+ if (!noArgs) console.log(`\n Running AZCLAUDE installer on ${subDir}...${subFlags.length ? ' (' + subFlags.join(' ') + ')' : ''}\n`);
35
37
  const cliPath = path.join(__dirname, 'cli.js');
36
- const subArgs = args[0].toLowerCase() === 'doctor'
38
+ const isDoctor = !noArgs && args[0].toLowerCase() === 'doctor';
39
+ const subArgs = isDoctor
37
40
  ? [cliPath, subDir, '--doctor', ...subFlags]
38
41
  : [cliPath, subDir, ...subFlags];
39
42
  const r = spawnSync('node', subArgs, { cwd: subDir, stdio: 'inherit' });
@@ -51,8 +54,9 @@ if (args.includes('--help') || args.includes('-h')) {
51
54
  AZCLAUDE — Autonomous Mode
52
55
 
53
56
  Usage:
54
- npx azclaude-copilot <project-dir> <intent> [max-sessions]
55
- npx azclaude-copilot setup [dir] # install AZCLAUDE into project
57
+ npx azclaude-copilot # install or upgrade (auto-detected)
58
+ npx azclaude-copilot . <intent> # autonomous mode build from intent
59
+ npx azclaude-copilot . # autonomous mode — resume existing plan
56
60
  npx azclaude-copilot doctor [dir] # run health check
57
61
 
58
62
  Examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "description": "AI coding environment — 27 commands, 8 skills, 13 agents, memory, reflexes, evolution. Install: npm install -g azclaude-copilot@latest, then in Claude Code: azclaude-copilot setup --full",
5
5
  "bin": {
6
6
  "azclaude": "bin/cli.js",