azclaude-copilot 0.4.15 → 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/bin/cli.js +74 -7
- package/package.json +1 -1
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('
|
|
1150
|
-
console.log('
|
|
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
|
-
|
|
1153
|
-
|
|
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('
|
|
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
|
-
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azclaude-copilot",
|
|
3
|
-
"version": "0.4.
|
|
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",
|