s9n-devops-agent 1.7.4 โ 2.0.1
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.md
CHANGED
|
@@ -1,529 +1,201 @@
|
|
|
1
|
-
# DevOps Agent
|
|
1
|
+
# DevOps Agent - AI-Powered Git Workflow Automation
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
3
|
+
> Let AI assistants work safely on your codebase with automatic commits, branch management, and multi-agent conflict prevention.
|
|
63
4
|
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
- **๐ Docker Auto-Restart**: Automatically restart Docker containers after code push (v1.2.0)
|
|
5
|
+
[](https://www.npmjs.com/package/s9n-devops-agent)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
67
7
|
|
|
68
|
-
##
|
|
8
|
+
## What It Does
|
|
69
9
|
|
|
70
|
-
|
|
10
|
+
๐ค **Works with Any AI Assistant** - Claude, Cursor, GitHub Copilot, Cline
|
|
11
|
+
๐ **Automatic Git Operations** - Watches changes, commits with proper messages, pushes automatically
|
|
12
|
+
๐ก๏ธ **Multi-Agent Coordination** - Prevents multiple AIs from editing the same files simultaneously
|
|
13
|
+
๐ฒ **Smart Branch Management** - Hierarchical structure: session โ daily โ weekly โ main
|
|
14
|
+
๐ **House Rules System** - Teaches AI agents your project conventions and testing requirements
|
|
71
15
|
|
|
72
|
-
|
|
16
|
+
## Quick Start (2 Minutes)
|
|
73
17
|
|
|
74
18
|
```bash
|
|
75
|
-
# Install
|
|
19
|
+
# Install
|
|
76
20
|
npm install -g s9n-devops-agent
|
|
77
21
|
|
|
78
|
-
#
|
|
79
|
-
s9n-devops-agent
|
|
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
|
|
22
|
+
# Learn (recommended for first-time users)
|
|
23
|
+
s9n-devops-agent tutorial
|
|
110
24
|
|
|
111
|
-
|
|
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)
|
|
25
|
+
# Setup
|
|
132
26
|
s9n-devops-agent setup
|
|
133
27
|
|
|
134
|
-
#
|
|
28
|
+
# Start working
|
|
135
29
|
s9n-devops-agent start
|
|
136
30
|
```
|
|
137
31
|
|
|
138
|
-
|
|
32
|
+
## How It Works
|
|
139
33
|
|
|
140
|
-
|
|
34
|
+
**The Concept:** Give each AI assistant its own private workspace (called a "session")
|
|
141
35
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
|
|
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 ๐๐
|
|
36
|
+
1. **You start a session** โ Creates isolated workspace (git worktree)
|
|
37
|
+
2. **AI assistant works there** โ Following house rules you define
|
|
38
|
+
3. **DevOps Agent watches** โ Auto-commits and pushes changes
|
|
39
|
+
4. **Session closes** โ Merges to daily branch, then to main
|
|
164
40
|
|
|
165
|
-
###
|
|
41
|
+
### What's a Session?
|
|
166
42
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
**
|
|
170
|
-
- **
|
|
171
|
-
- **
|
|
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
|
|
43
|
+
Think of it like giving each AI assistant their own office:
|
|
44
|
+
- **Separate directory** with full git history
|
|
45
|
+
- **Own branch** auto-named based on task
|
|
46
|
+
- **File locks** prevent conflicts with other agents
|
|
47
|
+
- **Auto-monitoring** commits and pushes automatically
|
|
180
48
|
|
|
181
|
-
|
|
182
|
-
npm run house-rules:update
|
|
49
|
+
## Core Features
|
|
183
50
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
51
|
+
### ๐ Auto-Commit System
|
|
52
|
+
**What:** Watches your workspace and commits changes automatically
|
|
53
|
+
**Why:** AI can't run git commands, so we do it for them
|
|
54
|
+
**How:** AI writes commit message to special file, agent reads and commits
|
|
187
55
|
|
|
188
|
-
### File Coordination
|
|
56
|
+
### ๐ก๏ธ File Coordination
|
|
57
|
+
**What:** Prevents multiple AI agents from editing same files
|
|
58
|
+
**Why:** Avoids merge conflicts when working with multiple agents
|
|
59
|
+
**How:** Agents "declare" files before editing, system checks for conflicts
|
|
189
60
|
|
|
190
|
-
|
|
61
|
+
### ๐ฒ Branch Hierarchy
|
|
62
|
+
**What:** Organized structure: session/* โ daily/* โ weekly/* โ main
|
|
63
|
+
**Why:** Easy rollbacks, clear progress tracking, organized history
|
|
64
|
+
**How:** Auto-merges happen at session close and nightly rollover
|
|
191
65
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
|
66
|
+
### ๐ House Rules
|
|
67
|
+
**What:** Instructions for AI assistants in `docs/houserules.md`
|
|
68
|
+
**Why:** Consistent behavior across agents, follows your conventions
|
|
69
|
+
**How:** Markdown file that AI reads first, auto-updated by agent
|
|
202
70
|
|
|
203
|
-
|
|
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
|
|
71
|
+
## Commands
|
|
208
72
|
|
|
209
|
-
**Coordination Commands:**
|
|
210
73
|
```bash
|
|
211
|
-
#
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
#
|
|
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
|
-
```
|
|
74
|
+
# New User Commands
|
|
75
|
+
s9n-devops-agent tutorial # Interactive learning (start here!)
|
|
76
|
+
s9n-devops-agent setup # First-time configuration
|
|
77
|
+
s9n-devops-agent help-topics # Browse comprehensive help
|
|
240
78
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด๐ด
|
|
79
|
+
# Session Management
|
|
80
|
+
s9n-devops-agent start # Create/resume session
|
|
81
|
+
s9n-devops-agent list # Show all sessions
|
|
82
|
+
s9n-devops-agent close # Close active session
|
|
259
83
|
|
|
260
|
-
|
|
261
|
-
|
|
84
|
+
# Advanced
|
|
85
|
+
s9n-devops-agent create --task api --agent claude # Create specific session
|
|
86
|
+
s9n-devops-agent cleanup # Clean up stale sessions
|
|
262
87
|
```
|
|
263
88
|
|
|
264
|
-
##
|
|
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:
|
|
89
|
+
## Common Workflows
|
|
396
90
|
|
|
91
|
+
### Single AI Agent
|
|
397
92
|
```bash
|
|
398
|
-
#
|
|
399
|
-
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
# -> Specific service to restart (leave empty for all): app
|
|
93
|
+
s9n-devops-agent start # Create session
|
|
94
|
+
# Copy instructions to Claude/Cursor
|
|
95
|
+
# AI works, agent commits automatically
|
|
96
|
+
s9n-devops-agent close # Merge and cleanup
|
|
403
97
|
```
|
|
404
98
|
|
|
405
|
-
|
|
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
|
-
|
|
99
|
+
### Multiple AI Agents (Parallel Work)
|
|
421
100
|
```bash
|
|
422
|
-
# Terminal 1: Claude
|
|
423
|
-
s9n-devops-agent create --task
|
|
101
|
+
# Terminal 1: Claude on backend
|
|
102
|
+
s9n-devops-agent create --task api --agent claude
|
|
424
103
|
|
|
425
|
-
# Terminal 2:
|
|
426
|
-
s9n-devops-agent create --task
|
|
104
|
+
# Terminal 2: Cursor on frontend
|
|
105
|
+
s9n-devops-agent create --task ui --agent cursor
|
|
427
106
|
|
|
428
|
-
#
|
|
107
|
+
# They work independently, no conflicts!
|
|
429
108
|
```
|
|
430
109
|
|
|
431
|
-
|
|
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
|
|
110
|
+
## What Makes It Special?
|
|
437
111
|
|
|
438
|
-
|
|
112
|
+
โ
**Zero Manual Git Commands** - AI can't run git, we handle it all
|
|
113
|
+
โ
**Conflict-Free Multi-Agent** - File coordination prevents chaos
|
|
114
|
+
โ
**Production-Ready** - Used in real projects with multiple developers
|
|
115
|
+
โ
**Framework Agnostic** - Works with any codebase, any language
|
|
116
|
+
โ
**Git Platform Agnostic** - GitHub, GitLab, Bitbucket, self-hosted
|
|
439
117
|
|
|
440
|
-
|
|
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
|
|
118
|
+
## Requirements
|
|
445
119
|
|
|
446
|
-
|
|
120
|
+
- Node.js 16.0.0 or higher
|
|
121
|
+
- Git repository
|
|
122
|
+
- Any AI assistant (Claude, Cursor, Copilot, Cline, etc.)
|
|
447
123
|
|
|
448
|
-
|
|
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
|
|
124
|
+
## Documentation
|
|
452
125
|
|
|
453
|
-
|
|
126
|
+
๐ **Getting Started**
|
|
127
|
+
- [Interactive Tutorial](docs/V2_IMPLEMENTATION_GUIDE.md) - Learn by doing
|
|
128
|
+
- [Installation Guide](docs/INSTALLATION_GUIDE.md) - Detailed setup
|
|
454
129
|
|
|
455
|
-
|
|
130
|
+
๐ **Feature Guides**
|
|
131
|
+
- [Version Strategies](docs/version-strategies.md) - Daily version incrementing
|
|
132
|
+
- [File Coordination](docs/file-coordination-guide.md) - Multi-agent prevention
|
|
133
|
+
- [Multi-Agent Setup](docs/multi-agent-guide.md) - Working with multiple AIs
|
|
134
|
+
- [House Rules](docs/houserules-guide.md) - Teaching AI your conventions
|
|
456
135
|
|
|
457
|
-
|
|
136
|
+
๐ง **Advanced Topics**
|
|
137
|
+
- [Branch Management](docs/branch-management.md) - Hierarchical structure
|
|
138
|
+
- [Docker Integration](docs/V2_IMPLEMENTATION_GUIDE.md) - Auto-restart containers
|
|
139
|
+
- [Session Management](docs/SESSION_MANAGEMENT.md) - Advanced workflows
|
|
458
140
|
|
|
459
|
-
|
|
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
|
-
```
|
|
141
|
+
## Troubleshooting
|
|
466
142
|
|
|
467
|
-
**
|
|
143
|
+
**Session not found?**
|
|
468
144
|
```bash
|
|
469
|
-
|
|
470
|
-
git init
|
|
471
|
-
# Run setup in project directory
|
|
472
|
-
cd /your/project && s9n-devops-agent setup
|
|
145
|
+
s9n-devops-agent list --all # Check closed sessions
|
|
473
146
|
```
|
|
474
147
|
|
|
475
|
-
**Agent not detecting changes
|
|
148
|
+
**Agent not detecting changes?**
|
|
476
149
|
```bash
|
|
150
|
+
# Check commit message file exists and has content
|
|
151
|
+
ls -la .devops-commit-*.msg
|
|
477
152
|
# Enable debug mode
|
|
478
153
|
AC_DEBUG=true s9n-devops-agent start
|
|
479
|
-
# Check message file exists and has content
|
|
480
|
-
ls -la .devops-commit-*.msg
|
|
481
154
|
```
|
|
482
155
|
|
|
483
|
-
**
|
|
156
|
+
**Need help?**
|
|
484
157
|
```bash
|
|
485
|
-
#
|
|
486
|
-
|
|
487
|
-
# Clear if stuck
|
|
488
|
-
rm -rf .ac-prep .ac
|
|
158
|
+
s9n-devops-agent help-topics # Browse all help topics
|
|
159
|
+
s9n-devops-agent tutorial # Re-run tutorial
|
|
489
160
|
```
|
|
490
161
|
|
|
491
|
-
##
|
|
162
|
+
## Configuration
|
|
492
163
|
|
|
493
|
-
|
|
164
|
+
Configure via environment variables or project settings:
|
|
494
165
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
499
|
-
5. Open a Pull Request
|
|
166
|
+
```bash
|
|
167
|
+
# Branch naming
|
|
168
|
+
export AC_BRANCH_PREFIX="dev_initials_"
|
|
500
169
|
|
|
501
|
-
|
|
170
|
+
# Auto-push (default: true)
|
|
171
|
+
export AC_PUSH=true
|
|
502
172
|
|
|
503
|
-
|
|
173
|
+
# Debug logging
|
|
174
|
+
export AC_DEBUG=true
|
|
504
175
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
- **[GitHub Releases](https://github.com/SecondBrainAICo/CS_DevOpsAgent/releases)** - Official releases with binaries
|
|
176
|
+
# Timezone for daily rollover
|
|
177
|
+
export AC_TZ="America/New_York"
|
|
178
|
+
```
|
|
509
179
|
|
|
510
|
-
|
|
180
|
+
See [Configuration Guide](docs/INSTALLATION_GUIDE.md#configuration-files) for details.
|
|
511
181
|
|
|
512
|
-
|
|
182
|
+
## Contributing
|
|
513
183
|
|
|
514
|
-
|
|
184
|
+
Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
515
185
|
|
|
516
|
-
|
|
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)
|
|
186
|
+
## License
|
|
520
187
|
|
|
521
|
-
|
|
188
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
522
189
|
|
|
523
|
-
|
|
190
|
+
## Support
|
|
524
191
|
|
|
525
|
-
|
|
192
|
+
- ๐ [Report Issues](https://github.com/SecondBrainAICo/CS_DevOpsAgent/issues)
|
|
193
|
+
- ๐ฌ [Discussions](https://github.com/SecondBrainAICo/CS_DevOpsAgent/discussions)
|
|
194
|
+
- ๐ฆ [npm Package](https://www.npmjs.com/package/s9n-devops-agent)
|
|
195
|
+
- ๐ [Documentation](https://github.com/SecondBrainAICo/CS_DevOpsAgent/wiki)
|
|
526
196
|
|
|
527
197
|
---
|
|
528
198
|
|
|
529
|
-
**
|
|
199
|
+
**Built with โค๏ธ by [SecondBrain Labs](https://secondbrain.ai)**
|
|
200
|
+
|
|
201
|
+
*Making AI-powered development safe, efficient, and conflict-free.*
|