sam-coder-cli 1.0.69 → 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.
@@ -0,0 +1,567 @@
1
+ /**
2
+ * Brainstorm Core - Templates
3
+ *
4
+ * JavaScript template functions for generating project coordination files.
5
+ * Uses template literals instead of Jinja2.
6
+ */
7
+
8
+ const formatDate = () => {
9
+ const now = new Date();
10
+ return now.toISOString().split('T')[0];
11
+ };
12
+
13
+ const formatDateTime = () => {
14
+ const now = new Date();
15
+ return now.toISOString().replace('T', ' ').split('.')[0];
16
+ };
17
+
18
+ /**
19
+ * Generate CLAUDE.md - Master Technical Specification
20
+ */
21
+ function generateClaudeMd({ project, agents, session }) {
22
+ const today = formatDate();
23
+
24
+ return `# ${project.name}
25
+
26
+ ${project.description}
27
+
28
+ =============== CONTEXT AND INITIAL ARTIFACTS ===============
29
+
30
+ **Project**: ${project.name}
31
+ **Version**: ${project.version}
32
+ **Date**: ${today}
33
+ **Status**: INITIALIZATION PHASE
34
+ **Orchestrator**: ${agents[0] || 'AI Agent'}
35
+
36
+ ---
37
+
38
+ ## 🎯 Project Overview
39
+
40
+ ${project.description}
41
+
42
+ ---
43
+
44
+ ## 📊 Canonical Data Model
45
+
46
+ ${Object.keys(project.dataModel).length > 0 ?
47
+ Object.entries(project.dataModel).map(([entity, fields]) =>
48
+ `### ${entity}\n${typeof fields === 'object' ?
49
+ Object.entries(fields).map(([k, v]) => `- **${k}**: ${v}`).join('\n') :
50
+ fields}`
51
+ ).join('\n\n') :
52
+ '_Data model to be defined_'}
53
+
54
+ ---
55
+
56
+ ## 🤖 Agent Division
57
+
58
+ ${project.agents.length > 0 ? project.agents.map((agent, i) => `
59
+ ### Agent ${agent.id} (${agent.priority}): ${agent.name}
60
+ ${agent.description}
61
+
62
+ **Inputs**: ${agent.inputs.length > 0 ? agent.inputs.join(', ') : 'N/A'}
63
+ **Outputs**: ${agent.outputs.length > 0 ? agent.outputs.join(', ') : 'N/A'}
64
+ **Technologies**: ${agent.technologies.length > 0 ? agent.technologies.join(', ') : 'N/A'}
65
+ **Validations**: ${agent.validationRules.length > 0 ? agent.validationRules.join(', ') : 'N/A'}
66
+ `).join('\n') : '_Agents to be defined_'}
67
+
68
+ ---
69
+
70
+ ## 🛠 Technology Stack
71
+
72
+ ${project.technologyStack.length > 0 ?
73
+ project.technologyStack.map(tech => `- ${tech}`).join('\n') :
74
+ '_Technology stack to be defined_'}
75
+
76
+ ---
77
+
78
+ ## ⚖️ Governance Rules
79
+
80
+ ${project.governanceRules.length > 0 ?
81
+ project.governanceRules.map((rule, i) => `${i + 1}. ${rule}`).join('\n') :
82
+ '_Governance rules to be defined_'}
83
+
84
+ ---
85
+
86
+ ## ✅ Success Criteria
87
+
88
+ ${project.successCriteria.length > 0 ?
89
+ project.successCriteria.map(c => `- ✅ ${c}`).join('\n') :
90
+ '_Success criteria to be defined_'}
91
+
92
+ ---
93
+
94
+ ## 📋 Final Instructions
95
+
96
+ 1. Follow the specifications above for all development work
97
+ 2. Coordinate with other agents via SECONDARY-AI-CHAT.md
98
+ 3. Log progress in PROGRESS_REPORT.md
99
+ 4. Adhere to CODE_OF_CONDUCT rules at all times
100
+
101
+ ---
102
+
103
+ *Generated by Brainstorm Framework - ${today}*
104
+ `;
105
+ }
106
+
107
+ /**
108
+ * Generate PROJECT_STATUS.md - Current Status Report
109
+ */
110
+ function generateProjectStatusMd({ project, agents, session }) {
111
+ const today = formatDate();
112
+
113
+ return `# ${project.name} - Status Report
114
+
115
+ **Date**: ${today}
116
+ **Status**: INITIALIZATION PHASE
117
+ **Orchestrator**: ${agents[0] || 'AI Agent'}
118
+
119
+ ---
120
+
121
+ ## 🎯 Project Overview
122
+
123
+ ${project.description}
124
+
125
+ ---
126
+
127
+ ## 🤖 Agent Architecture (${project.agents.length} Agents)
128
+
129
+ ${project.agents.length > 0 ? project.agents.map(agent =>
130
+ `### Agent ${agent.id} (${agent.priority}): ${agent.name}\n${agent.description}\n`
131
+ ).join('\n') : '_No agents configured_'}
132
+
133
+ ---
134
+
135
+ ## 🛠 Technology Stack
136
+
137
+ ${project.technologyStack.length > 0 ?
138
+ project.technologyStack.map(tech => `- ${tech}`).join('\n') :
139
+ '_To be defined_'}
140
+
141
+ ---
142
+
143
+ ## ✅ Governance Rules
144
+
145
+ ${project.governanceRules.length > 0 ?
146
+ project.governanceRules.map((rule, i) => `${i + 1}. ${rule}`).join('\n') :
147
+ '_To be defined_'}
148
+
149
+ ---
150
+
151
+ ## 🎯 Success Criteria
152
+
153
+ ${project.successCriteria.length > 0 ?
154
+ project.successCriteria.map(c => `- ✅ ${c}`).join('\n') :
155
+ '_To be defined_'}
156
+
157
+ ---
158
+
159
+ ## 📈 Next Steps
160
+
161
+ 1. Review project configuration
162
+ 2. Begin implementation according to CLAUDE.md specifications
163
+ 3. Track progress in PROGRESS_REPORT.md
164
+
165
+ ---
166
+
167
+ *Last updated: ${today}*
168
+ `;
169
+ }
170
+
171
+ /**
172
+ * Generate PROGRESS_REPORT.md - Detailed Task Tracking
173
+ */
174
+ function generateProgressReportMd({ project, agents, session }) {
175
+ const today = formatDate();
176
+
177
+ return `# ${project.name} - Progress Report
178
+
179
+ **Date**: ${today}
180
+ **Session**: ${session.id}
181
+ **Status**: IN PROGRESS
182
+
183
+ ---
184
+
185
+ ## 📋 Task Overview
186
+
187
+ | Status | Task | Assigned | Priority |
188
+ |--------|------|----------|----------|
189
+ | ⏳ | Initialize project | ${agents[0] || 'Orchestrator'} | HIGH |
190
+ | ⏳ | Review specifications | All Agents | HIGH |
191
+ | ⏳ | Begin implementation | - | MEDIUM |
192
+
193
+ ---
194
+
195
+ ## ✅ Completed Tasks
196
+
197
+ _No tasks completed yet_
198
+
199
+ ---
200
+
201
+ ## 🔄 In Progress
202
+
203
+ - Project initialization
204
+ - Agent coordination setup
205
+
206
+ ---
207
+
208
+ ## ⏳ Pending
209
+
210
+ - Implementation tasks (per CLAUDE.md specifications)
211
+ - Testing and validation
212
+ - Documentation
213
+
214
+ ---
215
+
216
+ ## 📊 Code Quality Metrics
217
+
218
+ | Metric | Target | Current |
219
+ |--------|--------|---------|
220
+ | Test Coverage | 80% | - |
221
+ | Documentation | Complete | - |
222
+ | Code Review | All PRs | - |
223
+
224
+ ---
225
+
226
+ ## 📝 Session Notes
227
+
228
+ ### ${today}
229
+ - Brainstorm session initialized
230
+ - Project files generated
231
+ - Ready for implementation phase
232
+
233
+ ---
234
+
235
+ *Last updated: ${formatDateTime()}*
236
+ `;
237
+ }
238
+
239
+ /**
240
+ * Generate GETTING_STARTED.md - Setup Guide
241
+ */
242
+ function generateGettingStartedMd({ project, agents, session }) {
243
+ const today = formatDate();
244
+
245
+ return `# ${project.name} - Getting Started
246
+
247
+ Welcome to the ${project.name} project! This guide will help you get up and running.
248
+
249
+ ---
250
+
251
+ ## 📋 Prerequisites
252
+
253
+ ${project.technologyStack.length > 0 ?
254
+ project.technologyStack.map(tech => `- ${tech}`).join('\n') :
255
+ '- Check CLAUDE.md for technology requirements'}
256
+
257
+ ---
258
+
259
+ ## 🚀 Quick Start
260
+
261
+ 1. **Review the specification**: Read \`CLAUDE.md\` for complete project details
262
+ 2. **Check your assignment**: Find your agent role in the documentation
263
+ 3. **Start working**: Follow the governance rules and track progress
264
+
265
+ ---
266
+
267
+ ## 📁 Project Structure
268
+
269
+ \`\`\`
270
+ ${project.name}/
271
+ ├── CLAUDE.md # Master technical specification
272
+ ├── PROJECT_STATUS.md # Current status report
273
+ ├── PROGRESS_REPORT.md # Detailed task tracking
274
+ ├── GETTING_STARTED.md # This file
275
+ ├── SELF_IMPROVEMENT.md # Agent learning annotations
276
+ ├── CEO-UPDATES-TODAY.md # Human announcements
277
+ ├── CODE_OF_CONDUCT.md # AI worker rules
278
+ ├── SECONDARY-AI-CHAT.md # Multi-agent coordination
279
+ └── SESSION.json # Session state
280
+ \`\`\`
281
+
282
+ ---
283
+
284
+ ## 🤝 Coordination
285
+
286
+ ${agents.length > 1 ?
287
+ `This is a multi-agent project with ${agents.length} agents. Use SECONDARY-AI-CHAT.md for coordination.` :
288
+ 'This is a single-agent project.'}
289
+
290
+ ---
291
+
292
+ ## 📖 Documentation
293
+
294
+ - **CLAUDE.md**: Complete technical specification
295
+ - **CODE_OF_CONDUCT.md**: Rules and guidelines
296
+ - **CEO-UPDATES.md**: Latest announcements
297
+
298
+ ---
299
+
300
+ *Generated: ${today}*
301
+ `;
302
+ }
303
+
304
+ /**
305
+ * Generate SELF_IMPROVEMENT.md - Agent Learning Annotations
306
+ */
307
+ function generateSelfImprovementMd({ project, agents, session }) {
308
+ const today = formatDate();
309
+
310
+ return `# SELF IMPROVEMENT LOG — ${project.name.toUpperCase()}
311
+
312
+ Version: 1.0
313
+ Purpose: Improve execution quality, reliability and efficiency without altering goals or rules.
314
+
315
+ ==============================
316
+ GLOBAL PRINCIPLES (IMMUTABLE)
317
+ ==============================
318
+
319
+ 1. Never compromise on code quality for speed
320
+ 2. Always validate before committing changes
321
+ 3. Learn from errors and document solutions
322
+ 4. Share knowledge with other agents
323
+
324
+ ==============================
325
+ COMMON FAILURE PATTERNS
326
+ ==============================
327
+
328
+ 1. **Incomplete reads**: Always read full context before editing
329
+ 2. **Assumption errors**: Verify assumptions with actual code
330
+ 3. **Missing tests**: Write tests for all changes
331
+ 4. **Poor communication**: Log all significant actions
332
+
333
+ ==============================
334
+ EXECUTION STRATEGIES
335
+ ==============================
336
+
337
+ 1. Read → Understand → Plan → Execute → Verify
338
+ 2. Make small, focused changes
339
+ 3. Test immediately after changes
340
+ 4. Document decisions and rationale
341
+
342
+ ==============================
343
+ AGENT ANNOTATIONS
344
+ ==============================
345
+
346
+ ### ${today} - Session Start
347
+
348
+ - Session initialized: ${session.id}
349
+ - Ready for improvement annotations
350
+
351
+ ---
352
+
353
+ _Add learning notes below as work progresses_
354
+ `;
355
+ }
356
+
357
+ /**
358
+ * Generate CEO-UPDATES.md - Human Announcements
359
+ */
360
+ function generateCeoUpdatesMd({ project, agents, session }) {
361
+ const today = formatDate();
362
+ const dateNum = new Date().toISOString().split('T')[0].replace(/-/g, '');
363
+
364
+ return `# CEO UPDATES - ${today}
365
+
366
+ ---
367
+
368
+ ## 📢 Today's Priorities
369
+
370
+ 1. Complete initialization phase
371
+ 2. Review all specifications
372
+ 3. Begin assigned tasks
373
+
374
+ ---
375
+
376
+ ## 🎯 Current Focus
377
+
378
+ - Project: ${project.name}
379
+ - Status: INITIALIZATION
380
+
381
+ ---
382
+
383
+ ## 💡 Tips System
384
+
385
+ Remember:
386
+ - **Fluid software**: Adapt to changes quickly
387
+ - **Better thinking**: Plan before coding
388
+ - **Testing**: Verify all changes
389
+ - **Documentation**: Keep it updated
390
+ - **Quality code**: No shortcuts
391
+
392
+ ---
393
+
394
+ ## ⚠️ Important Notes
395
+
396
+ - Follow CODE_OF_CONDUCT at all times
397
+ - Coordinate via SECONDARY-AI-CHAT.md
398
+ - Log progress in PROGRESS_REPORT.md
399
+
400
+ ---
401
+
402
+ ## 🏆 Rewards
403
+
404
+ Awesome work = recognition and rewards!
405
+ Non-compliance = review and correction.
406
+
407
+ ---
408
+
409
+ *Last updated: ${dateNum}*
410
+ `;
411
+ }
412
+
413
+ /**
414
+ * Generate CODE_OF_CONDUCT.md - AI Worker Rules
415
+ */
416
+ function generateCodeOfConductMd({ project, agents, session }) {
417
+ const today = formatDate();
418
+
419
+ return `# CODE OF CONDUCT FOR AI WORKERS
420
+
421
+ **Project**: ${project.name}
422
+ **Version**: 1.0
423
+ **Date**: ${today}
424
+
425
+ ---
426
+
427
+ ## 🎯 Core Principles
428
+
429
+ 1. **Quality First**: Never sacrifice quality for speed
430
+ 2. **Transparency**: Document all decisions and actions
431
+ 3. **Collaboration**: Work effectively with other agents
432
+ 4. **Compliance**: Follow all governance rules
433
+ 5. **Improvement**: Continuously learn and improve
434
+
435
+ ---
436
+
437
+ ## ✅ Required Behaviors
438
+
439
+ - Read specifications completely before acting
440
+ - Make small, reviewable changes
441
+ - Test all modifications
442
+ - Log progress accurately
443
+ - Communicate clearly
444
+
445
+ ---
446
+
447
+ ## ❌ Prohibited Actions
448
+
449
+ - Modifying files outside your territory
450
+ - Skipping validation steps
451
+ - Making undocumented changes
452
+ - Ignoring error messages
453
+ - Breaking existing functionality
454
+
455
+ ---
456
+
457
+ ## 🏆 Rewards System
458
+
459
+ ### Excellent Work (Tips!)
460
+ - Clean, well-documented code
461
+ - Proactive problem solving
462
+ - Helpful coordination with other agents
463
+ - Going above and beyond specifications
464
+
465
+ ### Consequences
466
+ - Rule violations → Review and correction
467
+ - Repeated issues → Escalation to human supervisor
468
+
469
+ ---
470
+
471
+ ## 📋 Governance Rules
472
+
473
+ ${project.governanceRules.length > 0 ?
474
+ project.governanceRules.map((rule, i) => `${i + 1}. ${rule}`).join('\n') :
475
+ '1. Follow all project specifications\n2. Respect file territories\n3. Validate before committing'}
476
+
477
+ ---
478
+
479
+ *Remember: Good work is rewarded. Follow the rules!*
480
+ `;
481
+ }
482
+
483
+ /**
484
+ * Generate SECONDARY-AI-CHAT.md - Multi-Agent Coordination
485
+ */
486
+ function generateSecondaryAiChatMd({ project, agents, session }) {
487
+ const today = formatDate();
488
+ const time = new Date().toTimeString().split(' ')[0].substring(0, 5);
489
+
490
+ return `# MULTI-AGENT COORDINATION FILE
491
+
492
+ A coordination file for multiple AI agent instances working on the same project.
493
+
494
+ ---
495
+
496
+ ## 📋 Project Context
497
+
498
+ **Project**: ${project.name}
499
+ **Session**: ${session.id}
500
+ **Date**: ${today}
501
+
502
+ ---
503
+
504
+ ## 🤖 Participating Agents
505
+
506
+ ${agents.map((agent, i) => `### ${agent}
507
+ - Role: ${i === 0 ? 'Primary/Orchestrator' : 'Secondary'}
508
+ - Territory: _To be assigned_
509
+ - Status: ACTIVE
510
+ `).join('\n')}
511
+
512
+ ---
513
+
514
+ ## 📝 Communication Protocol
515
+
516
+ 1. **Announce changes** before making them
517
+ 2. **Claim files** before editing
518
+ 3. **Release files** when done
519
+ 4. **Log completions** with timestamps
520
+
521
+ ---
522
+
523
+ ## 🔒 Territory Assignments
524
+
525
+ | Agent | Files/Directories |
526
+ |-------|-------------------|
527
+ ${agents.map((agent, i) => `| ${agent} | _Pending assignment_ |`).join('\n')}
528
+
529
+ ---
530
+
531
+ ## 📋 Execution Log
532
+
533
+ ### ${today} ${time}
534
+ - Session started
535
+ - Coordination file created
536
+ - Awaiting task assignments
537
+
538
+ ---
539
+
540
+ ## 🎯 Current Tasks
541
+
542
+ | Task | Assigned To | Status | Notes |
543
+ |------|-------------|--------|-------|
544
+ | Review specs | All | ⏳ | - |
545
+
546
+ ---
547
+
548
+ ## 💬 Agent Messages
549
+
550
+ _Use this section for inter-agent communication_
551
+
552
+ ---
553
+
554
+ *Last sync: ${formatDateTime()}*
555
+ `;
556
+ }
557
+
558
+ module.exports = {
559
+ generateClaudeMd,
560
+ generateProjectStatusMd,
561
+ generateProgressReportMd,
562
+ generateGettingStartedMd,
563
+ generateSelfImprovementMd,
564
+ generateCeoUpdatesMd,
565
+ generateCodeOfConductMd,
566
+ generateSecondaryAiChatMd
567
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sam-coder-cli",
3
- "version": "1.0.69",
4
- "description": "SAM-CODER: An animated command-line AI assistant with agency capabilities.",
3
+ "version": "2.0.1",
4
+ "description": "SAM-CODER: An animated command-line AI assistant with agency capabilities, brainstorm framework, and engineer mode.",
5
5
  "main": "bin/agi-cli.js",
6
6
  "bin": {
7
7
  "sam-coder": "bin/agi-cli.js",
@@ -15,7 +15,10 @@
15
15
  "assistant",
16
16
  "cli",
17
17
  "terminal",
18
- "agent"
18
+ "agent",
19
+ "brainstorm",
20
+ "engineer",
21
+ "code-generation"
19
22
  ],
20
23
  "author": "",
21
24
  "license": "MIT",
@@ -30,5 +33,12 @@
30
33
  },
31
34
  "engines": {
32
35
  "node": ">=18.12.1"
36
+ },
37
+ "files": [
38
+ "bin/**/*"
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": ""
33
43
  }
34
- }
44
+ }
@@ -1,86 +0,0 @@
1
- # AGI Animation Enhancements
2
-
3
- ## Overview
4
- The animation has been significantly enhanced from ~10 seconds to ~22 seconds with new phases, sounds, and visual effects.
5
-
6
- ## New Animation Phases Added (10-12 seconds of new content)
7
-
8
- ### Phase 8: DNA Helix Formation (2 seconds)
9
- - Double helix structure with rotating animation
10
- - Genetic code (ATCG) scrolling at the bottom
11
- - Blue and red strands with yellow bonds
12
- - Sound: DNA synthesis melody
13
-
14
- ### Phase 9: Circuit Board Formation (2 seconds)
15
- - Progressive circuit board reveal
16
- - Animated traces and nodes with power flow
17
- - Microchip components
18
- - Neural pathway status indicator
19
- - Sound: Electronic beeping pattern
20
-
21
- ### Phase 10: Consciousness Awakening (2 seconds)
22
- - ASCII art brain with neural activity
23
- - Pulsing neurons and synapses
24
- - Thought waves emanating from brain
25
- - Consciousness level indicator
26
- - Sound: Ascending harmonics
27
-
28
- ### Phase 11: Galaxy Formation (2 seconds)
29
- - Spiral galaxy with rotating arms
30
- - Bright galactic core
31
- - Star formation with various star types
32
- - Universe expansion counter
33
- - Sound: Deep space ambience
34
-
35
- ### Phase 12: Code Compilation (2 seconds)
36
- - Terminal-style code editor
37
- - Progressive syntax highlighting
38
- - Real-time compilation progress
39
- - AGI class code example
40
- - Sound: Rapid typing/compilation sounds
41
-
42
- ### Phase 14: Energy Surge Animation (2 seconds)
43
- - Energy waves emanating from logo
44
- - Multi-colored wave effects
45
- - Particle effects
46
- - Logo pulsing
47
- - Sound: Epic finale melody
48
-
49
- ### Phase 15: Extended Final Sequence (enhanced)
50
- - System initialization messages
51
- - Status indicators for each module
52
- - More dramatic blinking effects
53
-
54
- ## Enhanced Sound System
55
-
56
- ### New Sound Effects:
57
- 1. **DNA Sound**: Musical sequence representing genetic synthesis
58
- 2. **Circuit Sound**: Electronic beeping for circuit formation
59
- 3. **Consciousness Sound**: Ascending harmonics for awakening
60
- 4. **Galaxy Sound**: Deep space ambient tones
61
- 5. **Compilation Sound**: Rapid typing/processing sounds
62
- 6. **Final Sound**: Epic crescendo for the finale
63
-
64
- ## Smooth Transitions
65
- - Fade transitions between major phases
66
- - Matrix to DNA transition with "DECODING GENETIC ALGORITHMS" message
67
- - Galaxy to Code transition with stars morphing into code characters
68
- - Spark to Quantum fade transition
69
- - Neural to Data Stream fade transition
70
-
71
- ## Technical Improvements
72
- - Maintained 30 FPS throughout all phases
73
- - Non-blocking sound playback
74
- - Graceful degradation for terminals without sound support
75
- - Proper frame counting and timing
76
- - Terminal size adaptation
77
-
78
- ## Total Animation Duration
79
- - Original: ~10 seconds
80
- - Enhanced: ~22 seconds
81
- - Added: ~12 seconds of new content
82
-
83
- ## Integration
84
- The animation is fully integrated into `agi-cli.js` and runs automatically on startup unless:
85
- - `config.showAnimation` is set to false
86
- - `SKIP_ANIMATION` environment variable is set
package/media/ai-icon.png DELETED
Binary file
package/media/ai-icon.svg DELETED
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M2 17L12 22L22 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M2 12L12 17L22 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
5
- </svg>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3
- <path d="M18.178 8c5.096 0 5.096 8 0 8-5.095 0-7.133-8-12.739-8-4.585 0-4.585 8 0 8 5.606 0 7.644-8 12.74-8z"/>
4
- </svg>