s9n-devops-agent 2.0.7 → 2.0.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s9n-devops-agent",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "CS_DevOpsAgent - Intelligent Git Automation System with multi-agent support and session management",
5
5
  "type": "module",
6
6
  "main": "src/cs-devops-agent-worker.js",
@@ -282,9 +282,25 @@ class SessionCoordinator {
282
282
 
283
283
  if (updatedSections.length > 0) {
284
284
  console.log(`${CONFIG.colors.dim}Sections with updates: ${updatedSections.join(', ')}${CONFIG.colors.reset}`);
285
- const result = await houseRulesManager.updateHouseRules();
286
- if (result.updated) {
287
- console.log(`${CONFIG.colors.green}✓${CONFIG.colors.reset} Updated ${result.totalChanges} section(s)`);
285
+ console.log(`${CONFIG.colors.dim}Your custom rules will be preserved.${CONFIG.colors.reset}`);
286
+
287
+ const rl = readline.createInterface({
288
+ input: process.stdin,
289
+ output: process.stdout
290
+ });
291
+
292
+ const answer = await new Promise(resolve => {
293
+ rl.question(`\nUpdate house rules now? (Y/n): `, resolve);
294
+ });
295
+ rl.close();
296
+
297
+ if (answer.toLowerCase() !== 'n' && answer.toLowerCase() !== 'no') {
298
+ const result = await houseRulesManager.updateHouseRules();
299
+ if (result.updated) {
300
+ console.log(`${CONFIG.colors.green}✓${CONFIG.colors.reset} Updated ${result.totalChanges} section(s)`);
301
+ }
302
+ } else {
303
+ console.log(`${CONFIG.colors.dim}Skipped house rules update. Run 'npm run house-rules:update' later.${CONFIG.colors.reset}`);
288
304
  }
289
305
  }
290
306
  }
@@ -1260,6 +1276,22 @@ The DevOps agent will automatically:
1260
1276
  console.log(`Please switch to this directory before making any changes:`);
1261
1277
  console.log(`cd "${instructions.worktreePath}"`);
1262
1278
  console.log(``);
1279
+
1280
+ // Add house rules reference prominently at the top
1281
+ const houseRulesExists = fs.existsSync(houseRulesPath);
1282
+ if (houseRulesExists) {
1283
+ console.log(`📋 IMPORTANT - READ PROJECT RULES FIRST:`);
1284
+ console.log(`Before making any changes, read the house rules file at:`);
1285
+ console.log(`${houseRulesPath}`);
1286
+ console.log(``);
1287
+ console.log(`The house rules contain:`);
1288
+ console.log(`- Project coding conventions and standards`);
1289
+ console.log(`- Required commit message formats`);
1290
+ console.log(`- File coordination protocols`);
1291
+ console.log(`- Branch naming and workflow rules`);
1292
+ console.log(``);
1293
+ }
1294
+
1263
1295
  console.log(`⚠️ FILE COORDINATION (MANDATORY):`);
1264
1296
  console.log(`Shared coordination directory: local_deploy/.file-coordination/`);
1265
1297
  console.log(``);
@@ -1277,14 +1309,6 @@ The DevOps agent will automatically:
1277
1309
  console.log(``);
1278
1310
  console.log(`Write commit messages to: .devops-commit-${sessionId}.msg`);
1279
1311
  console.log(`The DevOps agent will automatically commit and push changes.`);
1280
- console.log(``);
1281
-
1282
- // Add house rules reference
1283
- const houseRulesExists = fs.existsSync(houseRulesPath);
1284
- if (houseRulesExists) {
1285
- console.log(`📋 IMPORTANT: Review project conventions and rules:`);
1286
- console.log(`Read the house rules at: ${houseRulesPath}`);
1287
- }
1288
1312
  console.log();
1289
1313
 
1290
1314
  console.log(`${CONFIG.colors.yellow}══════════════════════════════════════════════════════════════${CONFIG.colors.reset}`);
@@ -1307,9 +1331,8 @@ The DevOps agent will automatically:
1307
1331
  });
1308
1332
  rl.close();
1309
1333
 
1310
- console.log(`\n${CONFIG.colors.green}✓ DevOps agent is starting...${CONFIG.colors.reset}`);
1334
+ console.log(`${CONFIG.colors.green}✓ Instructions copied${CONFIG.colors.reset}`);
1311
1335
  console.log(`${CONFIG.colors.dim}Full instructions saved to: ${CONFIG.instructionsDir}/${sessionId}.md${CONFIG.colors.reset}`);
1312
- console.log();
1313
1336
  }
1314
1337
 
1315
1338
  /**
@@ -1634,25 +1657,21 @@ The DevOps agent is monitoring this worktree for changes.
1634
1657
  async createAndStart(options = {}) {
1635
1658
  const session = await this.createSession(options);
1636
1659
 
1637
- console.log(`\n${CONFIG.colors.yellow}Starting agent for session ${session.sessionId}...${CONFIG.colors.reset}`);
1638
-
1639
- // Start the agent
1640
- await this.startAgent(session.sessionId);
1641
-
1642
- // Wait for agent to initialize and show its interactive commands
1643
- await new Promise(resolve => setTimeout(resolve, 3000));
1644
-
1645
- // NOW display instructions AFTER the agent's interactive commands have been shown
1646
1660
  // Read the lock file to get the stored instructions
1647
1661
  const lockFile = path.join(this.locksPath, `${session.sessionId}.lock`);
1648
1662
  const lockData = JSON.parse(fs.readFileSync(lockFile, 'utf8'));
1649
1663
 
1664
+ // Display instructions FIRST before starting agent
1650
1665
  if (lockData.instructions) {
1651
1666
  console.log('\n'); // Add spacing
1652
1667
  this.displayInstructions(lockData.instructions, session.sessionId, options.task || 'development');
1653
1668
  await this.waitForConfirmation(session.sessionId);
1654
1669
  }
1655
1670
 
1671
+ // NOW start the agent after user has copied instructions
1672
+ console.log(`\n${CONFIG.colors.yellow}Starting DevOps agent monitoring...${CONFIG.colors.reset}`);
1673
+ await this.startAgent(session.sessionId);
1674
+
1656
1675
  return session;
1657
1676
  }
1658
1677