s9n-devops-agent 1.7.4 โ 2.0.0
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 +126 -454
- package/README.v1.md +529 -0
- package/bin/cs-devops-agent +31 -13
- package/docs/FILE_COORDINATION_GUIDE.md +481 -0
- package/docs/MULTI_AGENT_WORKFLOWS.md +692 -0
- package/docs/V2_FINAL_SUMMARY.md +526 -0
- package/docs/V2_QUICK_REFERENCE.md +447 -0
- package/docs/V2_STATUS_REPORT.md +324 -0
- package/package.json +1 -1
- package/src/help-system.js +475 -0
- package/src/instruction-formatter.js +346 -0
- package/src/setup-cs-devops-agent.js +91 -55
- package/src/tutorial-mode.js +550 -0
- package/src/ui-utils.js +509 -0
- package/start-devops-session.sh +71 -31
package/README.v1.md
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
# DevOps Agent ๐ v1.7.2
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/s9n-devops-agent)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://github.com/SecondBrainAICo/CS_DevOpsAgent)
|
|
6
|
+
|
|
7
|
+
An intelligent Git automation system with multi-agent support, enhanced branch management, real-time file coordination, and seamless integration with AI coding assistants like Claude, GitHub Copilot, and Cursor.
|
|
8
|
+
|
|
9
|
+
## ๐ What's New in v1.7.2
|
|
10
|
+
|
|
11
|
+
### Version Display Fix
|
|
12
|
+
- **๐ข Consistent Versioning**: Fixed all version numbers to display correctly across all components
|
|
13
|
+
- **๐ฆ Session Coordinator**: Updated to show v1.7.2 in copyright banner
|
|
14
|
+
|
|
15
|
+
### v1.7.1 - Update Check Visibility Improvements
|
|
16
|
+
- **๐ Visible Update Check**: Now shows "Checking for DevOps Agent updates..." when checking npm
|
|
17
|
+
- **โ
Up-to-Date Confirmation**: Displays confirmation when your version is current
|
|
18
|
+
- **โ Offline Handling**: Shows helpful error message if update check fails
|
|
19
|
+
|
|
20
|
+
### v1.7.0 - Major Release: Enhanced Branch Management System
|
|
21
|
+
|
|
22
|
+
### Major Release: Enhanced Branch Management System
|
|
23
|
+
|
|
24
|
+
- **๐ Dual Merge Support**: Sessions merge to BOTH daily branch AND target branch (e.g., main)
|
|
25
|
+
- **๐
Weekly Consolidation**: Automated rollup of daily branches into weekly branches
|
|
26
|
+
- **๐งน Orphaned Session Cleanup**: Automatic detection and cleanup of inactive sessions
|
|
27
|
+
- **๐ฒ Hierarchical Branching**: Clear structure: `session/* โ daily/* โ weekly/* โ target`
|
|
28
|
+
- **๐ Critical Lock Timing Fix**: File locks now held for entire session lifetime (not just during editing)
|
|
29
|
+
- **โ
Comprehensive Testing**: 10/10 automated tests passing + E2E validation with 2 parallel agents
|
|
30
|
+
- **๐ Enhanced Documentation**: Complete branch management guide and testing strategy
|
|
31
|
+
|
|
32
|
+
### File Coordination Improvements
|
|
33
|
+
- **โฑ๏ธ Correct Lock Timing**: Locks held until session closes/merges (prevents race conditions)
|
|
34
|
+
- **๐ Stop-and-Ask Policy**: Agents must ask user permission before editing declared files
|
|
35
|
+
- **๐ Detailed Conflict Reports**: Shows which agent, which files, and what they're working on
|
|
36
|
+
- **๐ Session-Lifetime Protection**: Files protected from other agents until changes are merged
|
|
37
|
+
|
|
38
|
+
## ๐ Quick Links
|
|
39
|
+
|
|
40
|
+
- **GitHub Repository**: [https://github.com/SecondBrainAICo/CS_DevOpsAgent](https://github.com/SecondBrainAICo/CS_DevOpsAgent)
|
|
41
|
+
- **NPM Package**: [https://www.npmjs.com/package/s9n-devops-agent](https://www.npmjs.com/package/s9n-devops-agent)
|
|
42
|
+
- **Issues & Support**: [GitHub Issues](https://github.com/SecondBrainAICo/CS_DevOpsAgent/issues)
|
|
43
|
+
- **Documentation**: [GitHub Wiki](https://github.com/SecondBrainAICo/CS_DevOpsAgent/wiki)
|
|
44
|
+
|
|
45
|
+
## Features โจ
|
|
46
|
+
|
|
47
|
+
### Core Features
|
|
48
|
+
- **๐ค Multi-Agent Support**: Work with Claude, GitHub Copilot, Cursor, and other AI coding assistants
|
|
49
|
+
- **๐ Git Worktree Management**: Isolated workspaces for each session to prevent conflicts
|
|
50
|
+
- **๐ Automatic Commits & Push**: Monitors changes and commits with proper messages
|
|
51
|
+
- **๐
Daily Version Rollover**: Automatic version management with customizable increments
|
|
52
|
+
- **๐ฏ Session Management**: Create, manage, and track multiple development sessions
|
|
53
|
+
- **โ๏ธ VS Code Integration**: Seamlessly integrates with VS Code tasks
|
|
54
|
+
- **๐ท๏ธ Smart Branching**: Automatic branch creation with configurable naming patterns
|
|
55
|
+
|
|
56
|
+
### File Coordination (v1.3.0) ๐
|
|
57
|
+
- **๐ง Undeclared Edit Detection**: Orange alerts when agents edit files without declaring them
|
|
58
|
+
- **๐ด Conflict Detection**: Red alerts when multiple agents try to edit the same files
|
|
59
|
+
- **๐ Declaration Protocol**: Agents must declare files before editing to prevent conflicts
|
|
60
|
+
- **โก Real-time Monitoring**: Detects violations within 2 seconds
|
|
61
|
+
- **๐ Actionable Instructions**: Provides copy-paste commands to correct agent behavior
|
|
62
|
+
- **๐ Advisory Locks**: File-level coordination without blocking legitimate work
|
|
63
|
+
|
|
64
|
+
### Infrastructure
|
|
65
|
+
- **๐ Safe Concurrent Development**: Multiple agents can work simultaneously without conflicts
|
|
66
|
+
- **๐ Docker Auto-Restart**: Automatically restart Docker containers after code push (v1.2.0)
|
|
67
|
+
|
|
68
|
+
## Installation ๐ฆ
|
|
69
|
+
|
|
70
|
+
> **๐ Detailed Guide**: See [INSTALLATION_GUIDE.md](docs/INSTALLATION_GUIDE.md) for complete setup instructions
|
|
71
|
+
|
|
72
|
+
### Quick Install (NPM Package)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Install globally (recommended)
|
|
76
|
+
npm install -g s9n-devops-agent
|
|
77
|
+
|
|
78
|
+
# Verify installation
|
|
79
|
+
s9n-devops-agent --help
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### What Gets Installed
|
|
83
|
+
|
|
84
|
+
The NPM package installs:
|
|
85
|
+
- โ
**CLI Binary**: `s9n-devops-agent` command available globally
|
|
86
|
+
- โ
**Core Files**: Worker, session manager, and utilities in npm's global node_modules
|
|
87
|
+
- โ
**Dependencies**: `chokidar` for file watching, `execa` for git operations
|
|
88
|
+
- โ **No Project Modifications**: Your project stays clean until you run setup
|
|
89
|
+
|
|
90
|
+
### From Source (For Contributors)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Clone and setup for development
|
|
94
|
+
git clone https://github.com/SecondBrainAICo/CS_DevOpsAgent.git
|
|
95
|
+
cd CS_DevOpsAgent
|
|
96
|
+
|
|
97
|
+
# Install dependencies
|
|
98
|
+
npm install
|
|
99
|
+
|
|
100
|
+
# Link globally for development
|
|
101
|
+
npm link
|
|
102
|
+
|
|
103
|
+
# Run tests
|
|
104
|
+
npm test
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Quick Start ๐
|
|
108
|
+
|
|
109
|
+
### One-Command Setup & Start
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Just run npm start - it handles everything!
|
|
113
|
+
npm start
|
|
114
|
+
|
|
115
|
+
# On first run, it will:
|
|
116
|
+
# โ
Set up house rules for AI agents
|
|
117
|
+
# โ
Configure file coordination system
|
|
118
|
+
# โ
Set up your developer initials
|
|
119
|
+
# โ
Configure version strategy
|
|
120
|
+
# โ
Start the session manager
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
That's it! No separate setup commands needed.
|
|
124
|
+
|
|
125
|
+
### Alternative Setup Methods
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Navigate to your project
|
|
129
|
+
cd /path/to/your/project
|
|
130
|
+
|
|
131
|
+
# Run the interactive setup wizard (for manual setup)
|
|
132
|
+
s9n-devops-agent setup
|
|
133
|
+
|
|
134
|
+
# Or start a session directly
|
|
135
|
+
s9n-devops-agent start
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Working with AI Assistants
|
|
139
|
+
|
|
140
|
+
When you start a session, you'll receive instructions to paste into your AI assistant:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
I'm working in a DevOps-managed session with the following setup:
|
|
144
|
+
- Session ID: 8a3s-45b1
|
|
145
|
+
- Working Directory: /path/to/worktree
|
|
146
|
+
- Task: implement-api
|
|
147
|
+
|
|
148
|
+
CRITICAL FIRST STEP:
|
|
149
|
+
1. Read and follow the house rules: cat "/path/to/worktree/houserules.md"
|
|
150
|
+
2. Switch to the working directory: cd "/path/to/worktree"
|
|
151
|
+
|
|
152
|
+
FILE COORDINATION PROTOCOL (from house rules):
|
|
153
|
+
Before editing ANY files, you MUST:
|
|
154
|
+
- Declare your intent in .file-coordination/active-edits/<agent>-8a3s-45b1.json
|
|
155
|
+
- Check for conflicts with other agents
|
|
156
|
+
- Only edit files you've declared
|
|
157
|
+
- Release files when done
|
|
158
|
+
|
|
159
|
+
Write commit messages to: .devops-commit-8a3s-45b1.msg
|
|
160
|
+
The DevOps agent will automatically commit and push changes.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## House Rules & File Coordination System ๐๐
|
|
164
|
+
|
|
165
|
+
### House Rules System (NEW!)
|
|
166
|
+
|
|
167
|
+
The DevOps Agent automatically manages "house rules" that teach AI agents your project conventions:
|
|
168
|
+
|
|
169
|
+
**Features:**
|
|
170
|
+
- **Auto-Creation**: Created automatically on first run
|
|
171
|
+
- **Smart Updates**: Updates only DevOps sections, preserves your custom rules
|
|
172
|
+
- **Version Tracking**: Each section independently versioned with checksums
|
|
173
|
+
- **Self-Healing**: Automatically recreates if deleted
|
|
174
|
+
- **CI/CD Ready**: Works in automated environments
|
|
175
|
+
|
|
176
|
+
**House Rules Commands:**
|
|
177
|
+
```bash
|
|
178
|
+
# Check status
|
|
179
|
+
npm run house-rules:status
|
|
180
|
+
|
|
181
|
+
# Update or create
|
|
182
|
+
npm run house-rules:update
|
|
183
|
+
|
|
184
|
+
# Health check and repair
|
|
185
|
+
npm run house-rules:repair
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### File Coordination System
|
|
189
|
+
|
|
190
|
+
Prevents multiple AI agents from editing the same files simultaneously:
|
|
191
|
+
|
|
192
|
+
1. **Declaration Phase**: Agents declare which files they'll modify
|
|
193
|
+
2. **Conflict Check**: System checks if files are already being edited
|
|
194
|
+
3. **Session-Lifetime Locks**: ๐ **CRITICAL** - Locks held for ENTIRE session, not just during editing
|
|
195
|
+
4. **Release Only on Close**: Locks released ONLY when session closes/merges (prevents race conditions)
|
|
196
|
+
5. **Real-time Monitoring**: Detects violations within 2 seconds
|
|
197
|
+
6. **Alert System**:
|
|
198
|
+
- ๐ง **Orange Alert**: Files edited without declaration
|
|
199
|
+
- ๐ด **Red Alert**: Files being edited by another agent
|
|
200
|
+
- ๐ **Stop-and-Ask**: Agents must get user permission to override
|
|
201
|
+
7. **Copy-Paste Instructions**: Provides exact commands to correct agent behavior
|
|
202
|
+
|
|
203
|
+
#### Why Locks Stay Active During Entire Session:
|
|
204
|
+
- โ **Problem**: Releasing locks after commit allows another agent to edit same files
|
|
205
|
+
- ๐ฅ **Result**: Both sessions conflict when merging
|
|
206
|
+
- โ
**Solution**: Hold locks until session is merged and worktree removed
|
|
207
|
+
- ๐ฏ **Benefit**: Zero race conditions, no duplicate work
|
|
208
|
+
|
|
209
|
+
**Coordination Commands:**
|
|
210
|
+
```bash
|
|
211
|
+
# Check if files are available
|
|
212
|
+
./scripts/coordination/check-file-availability.sh src/main.js src/utils.js
|
|
213
|
+
|
|
214
|
+
# Declare intent to edit files
|
|
215
|
+
./scripts/coordination/declare-file-edits.sh <agent-name> <session-id> file1.js file2.js
|
|
216
|
+
|
|
217
|
+
# Release files after editing
|
|
218
|
+
./scripts/coordination/release-file-edits.sh <agent-name> <session-id>
|
|
219
|
+
|
|
220
|
+
# Run file locking demo
|
|
221
|
+
./test_scripts/multi-agent/test-file-locking.sh
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### For AI Agents
|
|
225
|
+
|
|
226
|
+
Agents should follow this protocol:
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
// Before editing, create: .file-coordination/active-edits/<agent>-<session>.json
|
|
230
|
+
{
|
|
231
|
+
"agent": "claude",
|
|
232
|
+
"session": "8a3s-45b1",
|
|
233
|
+
"files": ["src/main.js", "src/utils.js"],
|
|
234
|
+
"operation": "edit",
|
|
235
|
+
"reason": "Implementing authentication feature",
|
|
236
|
+
"declaredAt": "2025-09-30T12:00:00Z",
|
|
237
|
+
"estimatedDuration": 300
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Alert Examples
|
|
242
|
+
|
|
243
|
+
#### Undeclared Edit Alert (๐ง Orange)
|
|
244
|
+
```
|
|
245
|
+
๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง
|
|
246
|
+
๐ง UNDECLARED FILE EDIT DETECTED!
|
|
247
|
+
๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง
|
|
248
|
+
|
|
249
|
+
โ File "src/main.js" was modified WITHOUT declaration!
|
|
250
|
+
๐ COPY THIS INSTRUCTION TO YOUR CODING AGENT:
|
|
251
|
+
[Instructions on how to declare the file]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### Conflict Alert (๐ด Red)
|
|
255
|
+
```
|
|
256
|
+
๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด
|
|
257
|
+
๐ด FILE CONFLICT DETECTED!
|
|
258
|
+
๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด
|
|
259
|
+
|
|
260
|
+
โ File "src/main.js" is being edited by: claude-session-abc123
|
|
261
|
+
[Instructions on how to resolve]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Commands ๐
|
|
265
|
+
|
|
266
|
+
### Session Management
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Start interactive session manager
|
|
270
|
+
s9n-devops-agent start
|
|
271
|
+
|
|
272
|
+
# List all active sessions
|
|
273
|
+
s9n-devops-agent list
|
|
274
|
+
|
|
275
|
+
# Create a new session
|
|
276
|
+
s9n-devops-agent create --task "feature-name" --agent claude
|
|
277
|
+
|
|
278
|
+
# Close an active session
|
|
279
|
+
s9n-devops-agent close <session-id>
|
|
280
|
+
|
|
281
|
+
# Clean up stale sessions
|
|
282
|
+
s9n-devops-agent cleanup
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Direct Operations
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Run the worker directly (for CI/CD)
|
|
289
|
+
s9n-devops-agent worker
|
|
290
|
+
|
|
291
|
+
# Manage worktrees
|
|
292
|
+
s9n-devops-agent worktree create
|
|
293
|
+
s9n-devops-agent worktree list
|
|
294
|
+
|
|
295
|
+
# Run setup wizard
|
|
296
|
+
s9n-devops-agent setup
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Configuration ๐ง
|
|
300
|
+
|
|
301
|
+
> **๐ Complete Configuration Guide**: See [INSTALLATION_GUIDE.md](docs/INSTALLATION_GUIDE.md#configuration-files)
|
|
302
|
+
|
|
303
|
+
### Environment Variables
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Branch naming prefix
|
|
307
|
+
export AC_BRANCH_PREFIX="dev_initials_"
|
|
308
|
+
|
|
309
|
+
# Enable auto-push (default: true)
|
|
310
|
+
export AC_PUSH=true
|
|
311
|
+
|
|
312
|
+
# Enable debug logging
|
|
313
|
+
export AC_DEBUG=true
|
|
314
|
+
|
|
315
|
+
# Set timezone for daily rollover
|
|
316
|
+
export AC_TZ="America/New_York"
|
|
317
|
+
|
|
318
|
+
# Version configuration
|
|
319
|
+
export AC_VERSION_PREFIX="v0."
|
|
320
|
+
export AC_VERSION_START_MINOR="20"
|
|
321
|
+
export AC_VERSION_INCREMENT="1" # 1 = 0.01, 10 = 0.1
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Configuration Files
|
|
325
|
+
|
|
326
|
+
**Global Configuration** (`~/.devops-agent/settings.json`):
|
|
327
|
+
- Developer initials and email
|
|
328
|
+
- Default timezone settings
|
|
329
|
+
- Created on first setup
|
|
330
|
+
|
|
331
|
+
**Project Configuration** (`local_deploy/project-settings.json`):
|
|
332
|
+
- Version numbering strategy
|
|
333
|
+
- Auto-merge settings
|
|
334
|
+
- Docker restart configuration
|
|
335
|
+
- Created per project
|
|
336
|
+
|
|
337
|
+
**House Rules** (`docs/houserules.md`):
|
|
338
|
+
- Instructions for AI assistants
|
|
339
|
+
- Testing requirements
|
|
340
|
+
- Commit message format
|
|
341
|
+
- Multi-agent coordination rules
|
|
342
|
+
- **Must be created manually** ([see template](docs/INSTALLATION_GUIDE.md#house-rules-setup))
|
|
343
|
+
|
|
344
|
+
## Workflow Example ๐ก
|
|
345
|
+
|
|
346
|
+
1. **Start a Session**:
|
|
347
|
+
```bash
|
|
348
|
+
s9n-devops-agent start
|
|
349
|
+
# Select: N) Create a new session
|
|
350
|
+
# Enter task: implement-authentication
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
2. **Copy Instructions to AI Assistant**:
|
|
354
|
+
- The tool provides instructions to paste into Claude/Copilot
|
|
355
|
+
- The AI works in the isolated worktree
|
|
356
|
+
|
|
357
|
+
3. **AI Makes Changes**:
|
|
358
|
+
- AI writes code in the worktree directory
|
|
359
|
+
- Creates commit message in `.devops-commit-{session-id}.msg`
|
|
360
|
+
|
|
361
|
+
4. **Automatic Processing**:
|
|
362
|
+
- Agent detects changes
|
|
363
|
+
- Reads commit message
|
|
364
|
+
- Commits and pushes automatically
|
|
365
|
+
|
|
366
|
+
5. **Close Session**:
|
|
367
|
+
```bash
|
|
368
|
+
s9n-devops-agent close
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## VS Code Integration ๐
|
|
372
|
+
|
|
373
|
+
Add to `.vscode/tasks.json`:
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"version": "2.0.0",
|
|
378
|
+
"tasks": [
|
|
379
|
+
{
|
|
380
|
+
"label": "Start DevOps Agent",
|
|
381
|
+
"type": "shell",
|
|
382
|
+
"command": "s9n-devops-agent",
|
|
383
|
+
"args": ["start"],
|
|
384
|
+
"problemMatcher": [],
|
|
385
|
+
"isBackground": true
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
## Advanced Features ๐ฌ
|
|
392
|
+
|
|
393
|
+
### Docker Container Auto-Restart (v1.2.0+)
|
|
394
|
+
|
|
395
|
+
Automatically restart Docker containers after pushing code changes:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
# During session creation, if docker-compose is detected:
|
|
399
|
+
s9n-devops-agent start
|
|
400
|
+
# -> Auto-restart Docker containers after push? (y/N): y
|
|
401
|
+
# -> Rebuild containers on restart? (y/N): n
|
|
402
|
+
# -> Specific service to restart (leave empty for all): app
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**Features:**
|
|
406
|
+
- Detects docker-compose files automatically
|
|
407
|
+
- Optional container rebuild on restart
|
|
408
|
+
- Target specific services or restart all
|
|
409
|
+
- Non-blocking: Docker failures don't affect git workflow
|
|
410
|
+
- Works with Docker Compose v1 and v2
|
|
411
|
+
|
|
412
|
+
**Supported docker-compose files:**
|
|
413
|
+
- docker-compose.yml / docker-compose.yaml
|
|
414
|
+
- compose.yml / compose.yaml
|
|
415
|
+
- docker-compose.dev.yml / docker-compose.local.yml
|
|
416
|
+
|
|
417
|
+
### Multi-Agent Collaboration
|
|
418
|
+
|
|
419
|
+
Multiple AI assistants can work on different features simultaneously:
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
# Terminal 1: Claude working on API
|
|
423
|
+
s9n-devops-agent create --task "api-endpoints" --agent claude
|
|
424
|
+
|
|
425
|
+
# Terminal 2: Copilot working on frontend
|
|
426
|
+
s9n-devops-agent create --task "ui-components" --agent copilot
|
|
427
|
+
|
|
428
|
+
# Each gets their own worktree and branch
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### Custom Version Strategies
|
|
432
|
+
|
|
433
|
+
Configure daily version increments:
|
|
434
|
+
- `0.01` increments: v0.20 โ v0.21 โ v0.22
|
|
435
|
+
- `0.1` increments: v0.20 โ v0.30 โ v0.40
|
|
436
|
+
- `0.2` increments: v0.20 โ v0.40 โ v0.60
|
|
437
|
+
|
|
438
|
+
### Automatic Daily Rollover
|
|
439
|
+
|
|
440
|
+
At midnight (configurable timezone):
|
|
441
|
+
1. Merges current day's work into version branch
|
|
442
|
+
2. Creates new version branch (e.g., v0.21)
|
|
443
|
+
3. Creates new daily branch
|
|
444
|
+
4. Preserves work continuity
|
|
445
|
+
|
|
446
|
+
## Platform Compatibility ๐ฅ๏ธ
|
|
447
|
+
|
|
448
|
+
- โ
**Git Platforms**: GitHub, GitLab, Bitbucket, Gitea, self-hosted Git
|
|
449
|
+
- โ
**Operating Systems**: macOS, Linux, Windows (WSL recommended)
|
|
450
|
+
- โ
**AI Assistants**: Claude, GitHub Copilot, Cursor, Cody, any AI that can write files
|
|
451
|
+
- โ
**Node.js**: Version 16.0.0 or higher
|
|
452
|
+
|
|
453
|
+
## Troubleshooting ๐
|
|
454
|
+
|
|
455
|
+
> **๐ Detailed Troubleshooting**: See [INSTALLATION_GUIDE.md](docs/INSTALLATION_GUIDE.md#troubleshooting)
|
|
456
|
+
|
|
457
|
+
### Common Issues
|
|
458
|
+
|
|
459
|
+
**After npm install - command not found**:
|
|
460
|
+
```bash
|
|
461
|
+
# Check npm global bin directory
|
|
462
|
+
npm bin -g
|
|
463
|
+
# Add to PATH if needed
|
|
464
|
+
export PATH="$PATH:$(npm bin -g)"
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Setup wizard issues**:
|
|
468
|
+
```bash
|
|
469
|
+
# Ensure you're in a git repository
|
|
470
|
+
git init
|
|
471
|
+
# Run setup in project directory
|
|
472
|
+
cd /your/project && s9n-devops-agent setup
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Agent not detecting changes**:
|
|
476
|
+
```bash
|
|
477
|
+
# Enable debug mode
|
|
478
|
+
AC_DEBUG=true s9n-devops-agent start
|
|
479
|
+
# Check message file exists and has content
|
|
480
|
+
ls -la .devops-commit-*.msg
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
**Multi-agent conflicts**:
|
|
484
|
+
```bash
|
|
485
|
+
# Check coordination files
|
|
486
|
+
ls -la .ac-prep/ .ac/ack/
|
|
487
|
+
# Clear if stuck
|
|
488
|
+
rm -rf .ac-prep .ac
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## Contributing ๐ค
|
|
492
|
+
|
|
493
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
494
|
+
|
|
495
|
+
1. Fork the repository
|
|
496
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
497
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
498
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
499
|
+
5. Open a Pull Request
|
|
500
|
+
|
|
501
|
+
## Release Notes ๐ข
|
|
502
|
+
|
|
503
|
+
### Latest: v1.7.2 (January 10, 2025)
|
|
504
|
+
|
|
505
|
+
For complete release history, feature details, and upgrade guides:
|
|
506
|
+
- **[v1.7.x Release Notes](docs/RELEASE_NOTES_v1.7.md)** - Comprehensive documentation for v1.7.x series
|
|
507
|
+
- **[CHANGELOG.md](CHANGELOG.md)** - Full version history
|
|
508
|
+
- **[GitHub Releases](https://github.com/SecondBrainAICo/CS_DevOpsAgent/releases)** - Official releases with binaries
|
|
509
|
+
|
|
510
|
+
## License ๐
|
|
511
|
+
|
|
512
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
513
|
+
|
|
514
|
+
## Support ๐ฌ
|
|
515
|
+
|
|
516
|
+
- ๐ Issues: [GitHub Issues](https://github.com/SecondBrainAICo/CS_DevOpsAgent/issues)
|
|
517
|
+
- ๐ฌ Discussions: [GitHub Discussions](https://github.com/SecondBrainAICo/CS_DevOpsAgent/discussions)
|
|
518
|
+
- ๐ Documentation: [GitHub Wiki](https://github.com/SecondBrainAICo/CS_DevOpsAgent/wiki)
|
|
519
|
+
- ๐ฆ NPM Package: [s9n-devops-agent](https://www.npmjs.com/package/s9n-devops-agent)
|
|
520
|
+
|
|
521
|
+
## Acknowledgments ๐
|
|
522
|
+
|
|
523
|
+
Built with โค๏ธ by [SecondBrain Labs](https://secondbrain.ai)
|
|
524
|
+
|
|
525
|
+
Special thanks to all contributors and the open-source community.
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
**Copyright ยฉ 2024 SecondBrain Labs. All rights reserved.**
|
package/bin/cs-devops-agent
CHANGED
|
@@ -32,9 +32,13 @@ function runScript(scriptPath, scriptArgs = []) {
|
|
|
32
32
|
|
|
33
33
|
// Helper function to run a shell script
|
|
34
34
|
function runShellScript(scriptPath, scriptArgs = []) {
|
|
35
|
-
|
|
35
|
+
// Detect shell based on platform
|
|
36
|
+
const shell = process.platform === 'win32' ? 'bash.exe' : 'bash';
|
|
37
|
+
|
|
38
|
+
const child = spawn(shell, [scriptPath, ...scriptArgs], {
|
|
36
39
|
stdio: 'inherit',
|
|
37
|
-
cwd: process.cwd()
|
|
40
|
+
cwd: process.cwd(),
|
|
41
|
+
shell: process.platform === 'win32' ? true : false
|
|
38
42
|
});
|
|
39
43
|
|
|
40
44
|
child.on('exit', (code) => {
|
|
@@ -102,6 +106,17 @@ switch(command) {
|
|
|
102
106
|
}
|
|
103
107
|
break;
|
|
104
108
|
|
|
109
|
+
case 'tutorial':
|
|
110
|
+
// Run interactive tutorial
|
|
111
|
+
runScript(join(rootDir, 'src', 'tutorial-mode.js'), args.slice(1));
|
|
112
|
+
break;
|
|
113
|
+
|
|
114
|
+
case 'help-topics':
|
|
115
|
+
case 'help-browser':
|
|
116
|
+
// Run interactive help browser
|
|
117
|
+
import(join(rootDir, 'src', 'help-system.js')).then(m => m.helpBrowser());
|
|
118
|
+
break;
|
|
119
|
+
|
|
105
120
|
case 'version':
|
|
106
121
|
case '--version':
|
|
107
122
|
case '-v':
|
|
@@ -121,23 +136,26 @@ Usage: cs-devops-agent [command] [options]
|
|
|
121
136
|
|
|
122
137
|
Commands:
|
|
123
138
|
start, session Start interactive DevOps session manager
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
tutorial Run interactive tutorial (new users start here!)
|
|
140
|
+
help-topics Browse comprehensive help topics
|
|
141
|
+
worker Run the DevOps agent worker directly
|
|
142
|
+
setup Run interactive setup wizard
|
|
143
|
+
worktree Manage git worktrees for agents
|
|
144
|
+
coordinator Session coordinator operations
|
|
145
|
+
list List all active sessions
|
|
146
|
+
create Create a new session
|
|
147
|
+
close Close an active session
|
|
148
|
+
cleanup Clean up stale sessions
|
|
149
|
+
version Show version information
|
|
150
|
+
help Show this help message
|
|
134
151
|
|
|
135
152
|
Examples:
|
|
153
|
+
cs-devops-agent tutorial # Learn how to use DevOps Agent (recommended)
|
|
136
154
|
cs-devops-agent start # Start interactive session manager
|
|
137
155
|
cs-devops-agent setup # Run first-time setup
|
|
156
|
+
cs-devops-agent help-topics # Browse comprehensive help
|
|
138
157
|
cs-devops-agent list # List active sessions
|
|
139
158
|
cs-devops-agent create --task api # Create new session for API work
|
|
140
|
-
cs-devops-agent worker # Run worker directly
|
|
141
159
|
|
|
142
160
|
Environment Variables:
|
|
143
161
|
AC_BRANCH_PREFIX Branch prefix for daily branches
|