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
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# DevOps Agent v2.0 - Developer Quick Reference
|
|
2
|
+
|
|
3
|
+
**Last Updated:** October 31, 2025
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ๐ Quick Start Commands
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Interactive tutorial (new users)
|
|
11
|
+
s9n-devops-agent tutorial
|
|
12
|
+
|
|
13
|
+
# Browse help topics
|
|
14
|
+
s9n-devops-agent help-topics
|
|
15
|
+
|
|
16
|
+
# Start a session
|
|
17
|
+
s9n-devops-agent start
|
|
18
|
+
|
|
19
|
+
# List active sessions
|
|
20
|
+
s9n-devops-agent list
|
|
21
|
+
|
|
22
|
+
# Close a session
|
|
23
|
+
s9n-devops-agent close <session-id>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ๐ฆ v2.0 Module Architecture
|
|
29
|
+
|
|
30
|
+
### Core Modules
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
src/
|
|
34
|
+
โโโ ui-utils.js (509 lines) - Terminal UI foundation
|
|
35
|
+
โโโ help-system.js (475 lines) - Interactive help
|
|
36
|
+
โโโ tutorial-mode.js (550 lines) - Learning system
|
|
37
|
+
โโโ instruction-formatter.js (346 lines) - AI instructions
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Module Dependencies
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
tutorial-mode.js
|
|
44
|
+
โโโ ui-utils.js
|
|
45
|
+
โโโ help-system.js
|
|
46
|
+
|
|
47
|
+
instruction-formatter.js
|
|
48
|
+
โโโ ui-utils.js
|
|
49
|
+
|
|
50
|
+
help-system.js
|
|
51
|
+
โโโ ui-utils.js
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## ๐จ Using UI Utilities
|
|
57
|
+
|
|
58
|
+
### Import
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
import {
|
|
62
|
+
colors,
|
|
63
|
+
status,
|
|
64
|
+
box,
|
|
65
|
+
showWelcome,
|
|
66
|
+
sectionTitle,
|
|
67
|
+
explain,
|
|
68
|
+
tip,
|
|
69
|
+
warn,
|
|
70
|
+
info,
|
|
71
|
+
success,
|
|
72
|
+
error,
|
|
73
|
+
confirm,
|
|
74
|
+
choose,
|
|
75
|
+
prompt,
|
|
76
|
+
progressStep,
|
|
77
|
+
drawSection
|
|
78
|
+
} from './ui-utils.js';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Common Patterns
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
// Section headers
|
|
85
|
+
sectionTitle('My Feature');
|
|
86
|
+
|
|
87
|
+
// Explanations
|
|
88
|
+
explain('This is how it works...');
|
|
89
|
+
|
|
90
|
+
// Tips and warnings
|
|
91
|
+
tip('Pro tip: Use shortcuts!');
|
|
92
|
+
warn('Be careful with this');
|
|
93
|
+
|
|
94
|
+
// User interaction
|
|
95
|
+
const answer = await confirm('Continue?', true);
|
|
96
|
+
const choice = await choose('Pick one:', ['Option 1', 'Option 2']);
|
|
97
|
+
const input = await prompt('Enter name:');
|
|
98
|
+
|
|
99
|
+
// Status messages
|
|
100
|
+
success('Operation completed!');
|
|
101
|
+
error('Something went wrong!');
|
|
102
|
+
info('FYI: Here is some info');
|
|
103
|
+
|
|
104
|
+
// Progress indicators
|
|
105
|
+
progressStep(1, 5, 'Starting...');
|
|
106
|
+
|
|
107
|
+
// Visual sections
|
|
108
|
+
drawSection('Title', [
|
|
109
|
+
'Line 1',
|
|
110
|
+
'Line 2',
|
|
111
|
+
'Line 3'
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
// Colors and icons
|
|
115
|
+
console.log(`${status.checkmark} ${colors.green}Success!${colors.reset}`);
|
|
116
|
+
console.log(`${status.error} ${colors.red}Failed!${colors.reset}`);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## ๐ Help System API
|
|
122
|
+
|
|
123
|
+
### Import
|
|
124
|
+
|
|
125
|
+
```javascript
|
|
126
|
+
import { showTopicHelp, helpBrowser } from './help-system.js';
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Usage
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
// Show specific help topic
|
|
133
|
+
await showTopicHelp('sessions');
|
|
134
|
+
await showTopicHelp('file-coordination');
|
|
135
|
+
|
|
136
|
+
// Launch interactive help browser
|
|
137
|
+
await helpBrowser();
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Available Topics
|
|
141
|
+
|
|
142
|
+
1. `sessions` - Understanding Sessions
|
|
143
|
+
2. `file-coordination` - File Coordination
|
|
144
|
+
3. `agents` - Working with AI Agents
|
|
145
|
+
4. `house-rules` - House Rules
|
|
146
|
+
5. `commit-messages` - Commit Messages
|
|
147
|
+
6. `worktrees` - Git Worktrees
|
|
148
|
+
7. `troubleshooting` - Troubleshooting
|
|
149
|
+
8. `workflows` - Workflows
|
|
150
|
+
9. `advanced` - Advanced Features
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## ๐ Tutorial Mode API
|
|
155
|
+
|
|
156
|
+
### Import
|
|
157
|
+
|
|
158
|
+
```javascript
|
|
159
|
+
import { runTutorial } from './tutorial-mode.js';
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Usage
|
|
163
|
+
|
|
164
|
+
```javascript
|
|
165
|
+
// Full tutorial
|
|
166
|
+
await runTutorial({ quick: false });
|
|
167
|
+
|
|
168
|
+
// Quick tutorial
|
|
169
|
+
await runTutorial({ quick: true });
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Modules
|
|
173
|
+
|
|
174
|
+
1. Understanding Sessions
|
|
175
|
+
2. Creating Your First Session
|
|
176
|
+
3. Working with AI Assistants
|
|
177
|
+
4. Multi-Agent Workflow
|
|
178
|
+
5. Advanced Features
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## ๐ Instruction Formatter API
|
|
183
|
+
|
|
184
|
+
### Import
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
import {
|
|
188
|
+
formatInstructions,
|
|
189
|
+
formatCondensedInstructions,
|
|
190
|
+
formatResumeInstructions,
|
|
191
|
+
formatClosingInstructions
|
|
192
|
+
} from './instruction-formatter.js';
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Usage
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
// Full instructions for new session
|
|
199
|
+
const instructions = formatInstructions({
|
|
200
|
+
id: 'abc1-23d4',
|
|
201
|
+
task: 'implement-auth',
|
|
202
|
+
agent: 'claude',
|
|
203
|
+
worktreePath: '/path/to/worktree',
|
|
204
|
+
houseRulesPath: '/path/to/houserules.md'
|
|
205
|
+
}, {
|
|
206
|
+
testCommand: 'npm test',
|
|
207
|
+
dockerEnabled: true
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
// Condensed version
|
|
211
|
+
const condensed = formatCondensedInstructions(session);
|
|
212
|
+
|
|
213
|
+
// Resume instructions
|
|
214
|
+
const resume = formatResumeInstructions(session);
|
|
215
|
+
|
|
216
|
+
// Closing instructions
|
|
217
|
+
const closing = formatClosingInstructions(session);
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## ๐ฏ Design Principles
|
|
223
|
+
|
|
224
|
+
### 1. Progressive Disclosure
|
|
225
|
+
Start simple, reveal complexity as needed. Don't overwhelm users.
|
|
226
|
+
|
|
227
|
+
### 2. Visual Hierarchy
|
|
228
|
+
Use colors, icons, and formatting to guide attention.
|
|
229
|
+
|
|
230
|
+
### 3. Contextual Help
|
|
231
|
+
Provide help where users need it, when they need it.
|
|
232
|
+
|
|
233
|
+
### 4. Interactive Learning
|
|
234
|
+
Let users learn by doing, not just reading.
|
|
235
|
+
|
|
236
|
+
### 5. Clear Language
|
|
237
|
+
No jargon without explanation. Use plain English.
|
|
238
|
+
|
|
239
|
+
### 6. Quick Wins
|
|
240
|
+
Users should succeed in <2 minutes.
|
|
241
|
+
|
|
242
|
+
### 7. Power Preserved
|
|
243
|
+
All advanced features remain accessible.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## ๐ง Code Standards
|
|
248
|
+
|
|
249
|
+
### Terminal Output
|
|
250
|
+
|
|
251
|
+
```javascript
|
|
252
|
+
// โ
Good: Use UI utilities
|
|
253
|
+
import { success, colors } from './ui-utils.js';
|
|
254
|
+
success('Operation completed!');
|
|
255
|
+
|
|
256
|
+
// โ Bad: Plain console.log for user messages
|
|
257
|
+
console.log('Operation completed!');
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### User Input
|
|
261
|
+
|
|
262
|
+
```javascript
|
|
263
|
+
// โ
Good: Use confirm/choose/prompt
|
|
264
|
+
const answer = await confirm('Continue?', true);
|
|
265
|
+
|
|
266
|
+
// โ Bad: Raw readline
|
|
267
|
+
const rl = readline.createInterface({ ... });
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Help Text
|
|
271
|
+
|
|
272
|
+
```javascript
|
|
273
|
+
// โ
Good: What/Why/How structure
|
|
274
|
+
explain(`
|
|
275
|
+
What: Sessions isolate AI agent work
|
|
276
|
+
Why: Prevents conflicts between agents
|
|
277
|
+
How: Creates worktree + branch + locks
|
|
278
|
+
`);
|
|
279
|
+
|
|
280
|
+
// โ Bad: Just facts
|
|
281
|
+
console.log('Sessions use worktrees');
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## ๐ Success Metrics
|
|
287
|
+
|
|
288
|
+
### Code Quality
|
|
289
|
+
- โ
No console.log for user-facing output (use UI utilities)
|
|
290
|
+
- โ
All user prompts use confirm/choose/prompt
|
|
291
|
+
- โ
Consistent color/icon usage
|
|
292
|
+
- โ
Clear error messages with guidance
|
|
293
|
+
|
|
294
|
+
### User Experience
|
|
295
|
+
- โ
Setup time <2 minutes
|
|
296
|
+
- โ
Help available contextually
|
|
297
|
+
- โ
Visual hierarchy clear
|
|
298
|
+
- โ
Examples included
|
|
299
|
+
|
|
300
|
+
### Documentation
|
|
301
|
+
- โ
What/Why/How structure
|
|
302
|
+
- โ
Code examples included
|
|
303
|
+
- โ
Screenshots/visuals where helpful
|
|
304
|
+
- โ
Troubleshooting section
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## ๐งช Testing Guidelines
|
|
309
|
+
|
|
310
|
+
### Manual Testing
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Test tutorial
|
|
314
|
+
s9n-devops-agent tutorial
|
|
315
|
+
s9n-devops-agent tutorial quick
|
|
316
|
+
|
|
317
|
+
# Test help
|
|
318
|
+
s9n-devops-agent help-topics
|
|
319
|
+
# Navigate through all topics
|
|
320
|
+
# Verify examples render correctly
|
|
321
|
+
|
|
322
|
+
# Test session workflow
|
|
323
|
+
s9n-devops-agent start
|
|
324
|
+
# Create session
|
|
325
|
+
# Verify instructions are beautiful
|
|
326
|
+
# Verify file coordination works
|
|
327
|
+
# Close session successfully
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Visual Testing
|
|
331
|
+
|
|
332
|
+
- [ ] Colors render correctly
|
|
333
|
+
- [ ] Box drawing characters work
|
|
334
|
+
- [ ] Icons display properly
|
|
335
|
+
- [ ] Alignment is consistent
|
|
336
|
+
- [ ] No text overflow
|
|
337
|
+
- [ ] Prompts are clear
|
|
338
|
+
|
|
339
|
+
### Compatibility Testing
|
|
340
|
+
|
|
341
|
+
- [ ] macOS Terminal
|
|
342
|
+
- [ ] iTerm2
|
|
343
|
+
- [ ] Linux terminal
|
|
344
|
+
- [ ] Windows Terminal
|
|
345
|
+
- [ ] WSL
|
|
346
|
+
- [ ] VS Code terminal
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## ๐จ Common Pitfalls
|
|
351
|
+
|
|
352
|
+
### 1. Forgetting to import UI utilities
|
|
353
|
+
```javascript
|
|
354
|
+
// โ Wrong
|
|
355
|
+
console.log('Success!');
|
|
356
|
+
|
|
357
|
+
// โ
Right
|
|
358
|
+
import { success } from './ui-utils.js';
|
|
359
|
+
success('Success!');
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### 2. Not using colors.reset
|
|
363
|
+
```javascript
|
|
364
|
+
// โ Wrong - color bleeds
|
|
365
|
+
console.log(`${colors.green}Success!`);
|
|
366
|
+
|
|
367
|
+
// โ
Right - color contained
|
|
368
|
+
console.log(`${colors.green}Success!${colors.reset}`);
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### 3. Hardcoding file paths
|
|
372
|
+
```javascript
|
|
373
|
+
// โ Wrong
|
|
374
|
+
const path = '/Users/me/project/file.js';
|
|
375
|
+
|
|
376
|
+
// โ
Right
|
|
377
|
+
import path from 'path';
|
|
378
|
+
const filePath = path.join(worktreePath, 'file.js');
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### 4. Unclear help text
|
|
382
|
+
```javascript
|
|
383
|
+
// โ Wrong - just facts
|
|
384
|
+
explain('Sessions use worktrees');
|
|
385
|
+
|
|
386
|
+
// โ
Right - What/Why/How
|
|
387
|
+
explain(`
|
|
388
|
+
What: A session is an isolated workspace
|
|
389
|
+
Why: Prevents conflicts between AI agents
|
|
390
|
+
How: Creates a git worktree with dedicated branch
|
|
391
|
+
`);
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## ๐ Pre-Commit Checklist
|
|
397
|
+
|
|
398
|
+
Before committing v2.0 code:
|
|
399
|
+
|
|
400
|
+
- [ ] Used UI utilities for all output
|
|
401
|
+
- [ ] Followed color/icon conventions
|
|
402
|
+
- [ ] Clear What/Why/How structure
|
|
403
|
+
- [ ] Examples included where appropriate
|
|
404
|
+
- [ ] Tested in terminal
|
|
405
|
+
- [ ] No console.log in production code
|
|
406
|
+
- [ ] Error messages include guidance
|
|
407
|
+
- [ ] Commit message follows convention
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## ๐ Related Documentation
|
|
412
|
+
|
|
413
|
+
- **Full Status Report:** `docs/V2_STATUS_REPORT.md`
|
|
414
|
+
- **Implementation Guide:** `docs/V2_IMPLEMENTATION_GUIDE.md`
|
|
415
|
+
- **Progress Tracker:** `docs/V2_IMPLEMENTATION_PROGRESS.md`
|
|
416
|
+
- **README:** `README.md`
|
|
417
|
+
- **Old README:** `README.v1.md`
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## ๐ก Tips for Contributors
|
|
422
|
+
|
|
423
|
+
### Starting Point
|
|
424
|
+
1. Read `V2_STATUS_REPORT.md` first
|
|
425
|
+
2. Review `ui-utils.js` API
|
|
426
|
+
3. Look at `tutorial-mode.js` as example
|
|
427
|
+
4. Follow existing patterns
|
|
428
|
+
|
|
429
|
+
### Adding New Features
|
|
430
|
+
1. Import UI utilities
|
|
431
|
+
2. Use consistent color scheme
|
|
432
|
+
3. Add help topic if needed
|
|
433
|
+
4. Update this reference
|
|
434
|
+
5. Test in terminal
|
|
435
|
+
|
|
436
|
+
### Writing Help Content
|
|
437
|
+
1. Start with "What is this?"
|
|
438
|
+
2. Explain "Why does it matter?"
|
|
439
|
+
3. Show "How do I use it?"
|
|
440
|
+
4. Include concrete examples
|
|
441
|
+
5. Add troubleshooting tips
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
**Questions?** Check `docs/V2_STATUS_REPORT.md` or existing modules for examples.
|
|
446
|
+
|
|
447
|
+
**Ready to contribute?** Follow the patterns, use the utilities, keep it visual! ๐จ
|