s9n-devops-agent 1.5.6 → 1.5.8
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/package.json +1 -1
- package/src/house-rules-manager.js +16 -12
- package/start-devops-session.sh +8 -100
package/package.json
CHANGED
|
@@ -550,20 +550,24 @@ ${endMarker}`;
|
|
|
550
550
|
});
|
|
551
551
|
|
|
552
552
|
return new Promise((resolve) => {
|
|
553
|
-
console.log('\n
|
|
554
|
-
console.log('
|
|
555
|
-
console.log('
|
|
556
|
-
console.log('\
|
|
557
|
-
console.log('
|
|
558
|
-
console.log(' •
|
|
559
|
-
console.log(' •
|
|
560
|
-
console.log('
|
|
561
|
-
console.log(' •
|
|
562
|
-
console.log(' • Best for: Existing projects, quick setup');
|
|
563
|
-
console.log(' • Includes: Core house rules only');
|
|
553
|
+
console.log('\n' + '='.repeat(70));
|
|
554
|
+
console.log('📋 FIRST-TIME PROJECT SETUP: House Rules Configuration');
|
|
555
|
+
console.log('='.repeat(70));
|
|
556
|
+
console.log('\nChoose your project organization style:\n');
|
|
557
|
+
console.log(' ✅ STRUCTURED (Recommended for new projects)');
|
|
558
|
+
console.log(' • Enforced modular folder organization');
|
|
559
|
+
console.log(' • Pattern: /ModuleName/src/featurename/');
|
|
560
|
+
console.log(' • Includes: houserules.md + folders.md guide');
|
|
561
|
+
console.log(' • Best for: New projects, large applications, teams');
|
|
564
562
|
console.log();
|
|
563
|
+
console.log(' ❌ FLEXIBLE (Recommended for existing projects)');
|
|
564
|
+
console.log(' • No enforced folder structure');
|
|
565
|
+
console.log(' • Organize files your own way');
|
|
566
|
+
console.log(' • Includes: houserules.md only');
|
|
567
|
+
console.log(' • Best for: Existing projects, personal projects');
|
|
568
|
+
console.log('\n' + '─'.repeat(70));
|
|
565
569
|
|
|
566
|
-
rl.question('
|
|
570
|
+
rl.question('\nDo you want STRUCTURED folder organization? (Y/N) [N]: ', (answer) => {
|
|
567
571
|
const wantStructure = answer.trim().toLowerCase() === 'y' || answer.trim().toLowerCase() === 'yes';
|
|
568
572
|
rl.close();
|
|
569
573
|
|
package/start-devops-session.sh
CHANGED
|
@@ -41,7 +41,7 @@ show_copyright() {
|
|
|
41
41
|
echo "======================================================================"
|
|
42
42
|
echo
|
|
43
43
|
echo " CS_DevOpsAgent - Intelligent Git Automation System"
|
|
44
|
-
echo " Version 1.5.
|
|
44
|
+
echo " Version 1.5.8 | Build 20251009.10"
|
|
45
45
|
echo " "
|
|
46
46
|
echo " Copyright (c) 2024 SecondBrain Labs"
|
|
47
47
|
echo " Author: Sachin Dev Duggal"
|
|
@@ -302,107 +302,15 @@ setup_house_rules() {
|
|
|
302
302
|
echo "prevent conflicts when multiple agents work on the same codebase."
|
|
303
303
|
echo
|
|
304
304
|
|
|
305
|
-
#
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
# NOTE: House rules creation is now handled by session-coordinator's ensureHouseRulesSetup()
|
|
306
|
+
# This provides the interactive prompt for structured vs flexible organization
|
|
307
|
+
# We only need to ensure file coordination directory exists here
|
|
308
308
|
|
|
309
|
-
#
|
|
310
|
-
|
|
311
|
-
local search_dir="$1"
|
|
312
|
-
local depth="${2:-0}"
|
|
313
|
-
|
|
314
|
-
# Limit search depth
|
|
315
|
-
if [[ $depth -gt 5 ]]; then
|
|
316
|
-
return 1
|
|
317
|
-
fi
|
|
318
|
-
|
|
319
|
-
# First check standard locations
|
|
320
|
-
for possible_path in "houserules.md" "HOUSERULES.md" ".github/HOUSERULES.md" "docs/houserules.md" "docs/HOUSERULES.md"; do
|
|
321
|
-
if [[ -f "$search_dir/$possible_path" ]]; then
|
|
322
|
-
echo "$search_dir/$possible_path"
|
|
323
|
-
return 0
|
|
324
|
-
fi
|
|
325
|
-
done
|
|
326
|
-
|
|
327
|
-
# If not found, search recursively (excluding DevOps directories)
|
|
328
|
-
while IFS= read -r -d '' file; do
|
|
329
|
-
local rel_path="${file#$search_dir/}"
|
|
330
|
-
if [[ ! "$file" =~ "DevOpsAgent" ]] &&
|
|
331
|
-
[[ ! "$file" =~ "CS_DevOpsAgent" ]] &&
|
|
332
|
-
[[ ! "$file" =~ "node_modules" ]] &&
|
|
333
|
-
[[ ! "$file" =~ ".git" ]]; then
|
|
334
|
-
echo "$file"
|
|
335
|
-
return 0
|
|
336
|
-
fi
|
|
337
|
-
done < <(find "$search_dir" -maxdepth 3 -type f \( -iname "houserules.md" -o -iname "HOUSERULES.md" \) -print0 2>/dev/null)
|
|
338
|
-
|
|
339
|
-
return 1
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
# Search for house rules file
|
|
343
|
-
if FOUND_PATH=$(find_house_rules "$ROOT"); then
|
|
344
|
-
HOUSERULES_PATH="$FOUND_PATH"
|
|
345
|
-
HOUSERULES_FOUND=true
|
|
346
|
-
# Make path relative for display
|
|
347
|
-
local REL_PATH="${FOUND_PATH#$ROOT/}"
|
|
348
|
-
echo -e "${GREEN}✓${NC} Found existing house rules at: $REL_PATH"
|
|
349
|
-
else
|
|
350
|
-
echo "No existing house rules found."
|
|
351
|
-
echo
|
|
352
|
-
echo "Would you like to:"
|
|
353
|
-
echo " ${BOLD}1)${NC} Create comprehensive house rules (recommended)"
|
|
354
|
-
echo " ${BOLD}2)${NC} Specify path to existing house rules"
|
|
355
|
-
echo " ${BOLD}3)${NC} Skip for now"
|
|
356
|
-
echo
|
|
357
|
-
echo -n "Your choice [1]: "
|
|
358
|
-
read CHOICE
|
|
359
|
-
|
|
360
|
-
case "${CHOICE:-1}" in
|
|
361
|
-
1)
|
|
362
|
-
HOUSERULES_PATH="$ROOT/houserules.md"
|
|
363
|
-
HOUSERULES_FOUND=false
|
|
364
|
-
echo -e "${GREEN}✓${NC} Will create comprehensive house rules at: houserules.md"
|
|
365
|
-
;;
|
|
366
|
-
2)
|
|
367
|
-
echo -n "Enter path to your house rules (relative to $ROOT): "
|
|
368
|
-
read CUSTOM_PATH
|
|
369
|
-
if [[ -f "$ROOT/$CUSTOM_PATH" ]]; then
|
|
370
|
-
HOUSERULES_PATH="$ROOT/$CUSTOM_PATH"
|
|
371
|
-
HOUSERULES_FOUND=true
|
|
372
|
-
echo -e "${GREEN}✓${NC} Using house rules at: $CUSTOM_PATH"
|
|
373
|
-
else
|
|
374
|
-
echo -e "${YELLOW}File not found. Creating new house rules at: houserules.md${NC}"
|
|
375
|
-
HOUSERULES_PATH="$ROOT/houserules.md"
|
|
376
|
-
HOUSERULES_FOUND=false
|
|
377
|
-
fi
|
|
378
|
-
;;
|
|
379
|
-
3)
|
|
380
|
-
echo -e "${YELLOW}⚠ Skipping house rules setup${NC}"
|
|
381
|
-
echo "You can set them up later by running: ./scripts/setup-file-coordination.sh"
|
|
382
|
-
return 0
|
|
383
|
-
;;
|
|
384
|
-
esac
|
|
385
|
-
fi
|
|
386
|
-
|
|
387
|
-
echo
|
|
388
|
-
echo -e "${BLUE}Setting up file coordination system...${NC}"
|
|
309
|
+
# Create file coordination directory if it doesn't exist
|
|
310
|
+
mkdir -p "$COORD_DIR/active-edits" "$COORD_DIR/completed-edits" "$COORD_DIR/conflicts"
|
|
389
311
|
|
|
390
|
-
#
|
|
391
|
-
|
|
392
|
-
# Pass the house rules path we already found!
|
|
393
|
-
HOUSERULES_PATH="$HOUSERULES_PATH" bash "$SCRIPT_DIR/scripts/setup-file-coordination.sh"
|
|
394
|
-
else
|
|
395
|
-
# Inline setup if script doesn't exist
|
|
396
|
-
mkdir -p "$COORD_DIR/active-edits" "$COORD_DIR/completed-edits"
|
|
397
|
-
echo -e "${GREEN}✓${NC} File coordination directories created"
|
|
398
|
-
fi
|
|
399
|
-
|
|
400
|
-
echo
|
|
401
|
-
echo -e "${GREEN}✓ Setup complete!${NC} AI agents will now follow house rules and coordinate file edits."
|
|
402
|
-
echo
|
|
403
|
-
echo -e "${DIM}Press Enter to continue...${NC}"
|
|
404
|
-
read -r
|
|
405
|
-
echo
|
|
312
|
+
# House rules will be created by session-coordinator when needed
|
|
313
|
+
# with the proper structured/flexible prompt
|
|
406
314
|
}
|
|
407
315
|
|
|
408
316
|
# Main function
|