myaidev-method 0.2.19 → 0.2.22

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.
Files changed (31) hide show
  1. package/.claude/mcp/sparc-orchestrator-server.js +0 -0
  2. package/.claude/mcp/wordpress-server.js +0 -0
  3. package/CHANGELOG.md +123 -5
  4. package/README.md +205 -13
  5. package/TECHNICAL_ARCHITECTURE.md +64 -2
  6. package/bin/cli.js +169 -2
  7. package/dist/mcp/mcp-config.json +138 -1
  8. package/dist/mcp/openstack-server.js +1607 -0
  9. package/package.json +2 -2
  10. package/src/config/workflows.js +532 -0
  11. package/src/lib/payloadcms-utils.js +206 -0
  12. package/src/lib/visual-generation-utils.js +445 -294
  13. package/src/lib/workflow-installer.js +512 -0
  14. package/src/libs/security/authorization-checker.js +606 -0
  15. package/src/mcp/openstack-server.js +1607 -0
  16. package/src/scripts/openstack-setup.sh +110 -0
  17. package/src/scripts/security/environment-detect.js +425 -0
  18. package/src/templates/claude/agents/openstack-vm-manager.md +281 -0
  19. package/src/templates/claude/agents/osint-researcher.md +1075 -0
  20. package/src/templates/claude/agents/penetration-tester.md +908 -0
  21. package/src/templates/claude/agents/security-auditor.md +244 -0
  22. package/src/templates/claude/agents/security-setup.md +1094 -0
  23. package/src/templates/claude/agents/webapp-security-tester.md +581 -0
  24. package/src/templates/claude/commands/myai-configure.md +84 -0
  25. package/src/templates/claude/commands/myai-openstack.md +229 -0
  26. package/src/templates/claude/commands/sc:security-exploit.md +464 -0
  27. package/src/templates/claude/commands/sc:security-recon.md +281 -0
  28. package/src/templates/claude/commands/sc:security-report.md +756 -0
  29. package/src/templates/claude/commands/sc:security-scan.md +441 -0
  30. package/src/templates/claude/commands/sc:security-setup.md +501 -0
  31. package/src/templates/claude/mcp_config.json +44 -0
File without changes
File without changes
package/CHANGELOG.md CHANGED
@@ -5,6 +5,121 @@ All notable changes to the MyAIDev Method package will be documented in this fil
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.22] - 2025-12-18
9
+
10
+ ### Added
11
+ - **đŸŒŠī¸ OpenStack VM Management Integration**: Complete cloud infrastructure orchestration
12
+ - **OpenStack MCP Server**: 26 tools for comprehensive VM and cloud management
13
+ - VM lifecycle: create, list, show, delete, start, stop, reboot, console
14
+ - Resource discovery: images, flavors, networks, security groups, keypairs
15
+ - Networking: floating IPs, IP assignment to servers
16
+ - Storage: volumes, volume attachments
17
+ - Session tracking and operation history
18
+ - **openstack-vm-manager Agent**: Specialized agent for cloud orchestration
19
+ - VM provisioning with cloud-init support
20
+ - Multi-VM deployment patterns
21
+ - Network and storage configuration
22
+ - SSH key management
23
+ - **`/myai-openstack` Command**: Slash command for VM operations
24
+ - `health` - Check OpenStack connectivity
25
+ - `images`, `flavors`, `networks` - Resource discovery
26
+ - `create`, `list`, `show`, `delete` - VM management
27
+ - `floating-ip create/add` - Network configuration
28
+ - `cloud-init info/fetch/preview` - Cloud-init management
29
+ - **`/myai-configure openstack`**: Interactive credential setup
30
+ - Parse existing openrc files automatically
31
+ - Manual credential entry option
32
+ - Connection testing and validation
33
+ - Cloud-init default URL configuration
34
+
35
+ - **â˜ī¸ Cloud-Init Support**: Automatic VM provisioning
36
+ - URL-based cloud-init (GitHub Gist URLs auto-converted to raw)
37
+ - File-based cloud-init from local paths
38
+ - Inline cloud-init content
39
+ - Default cloud-init from `CLOUD_INIT` environment variable
40
+ - Priority system: inline > URL > file > default
41
+
42
+ ### Changed
43
+ - **Visual Generation**: Updated image generation services
44
+ - **🎨 OpenAI GPT Image 1.5** (SOTA Recommended): State-of-the-art image generation
45
+ - Best-in-class text rendering in images
46
+ - Multiple quality tiers: low ($0.02), medium ($0.07), high ($0.19)
47
+ - Transparency support (PNG with transparent backgrounds)
48
+ - Multiple output formats: PNG, JPEG, WebP
49
+ - Sizes: 1024x1024, 1536x1024, 1024x1536, auto
50
+ - **FLUX 2 Models**: Added Black Forest Labs FLUX 2 (Pro, Flex, Dev)
51
+ - FLUX 2 Pro: $0.05/image - State-of-the-art quality, fastest
52
+ - FLUX 2 Flex: $0.04/image - Developer-controlled parameters
53
+ - FLUX 2 Dev: $0.025/image - 32B open-weight model
54
+ - **Multi-Reference Support**: FLUX 2 supports up to 10 reference images
55
+ - **Legacy FLUX**: FLUX 1.x models still available for backwards compatibility
56
+ - Removed DALL-E 3 in favor of FLUX 2 and OpenAI GPT Image models
57
+
58
+ ### Recommended SOTA Models
59
+ - **Google Gemini 3.0 Pro Image ("Nano Banana")**: Fast, cost-effective at $0.02/image
60
+ - **OpenAI GPT Image 1.5**: Best quality, best text rendering, $0.02-$0.19/image depending on quality tier
61
+
62
+ ### Documentation
63
+ - Updated CLAUDE.md with OpenStack integration documentation
64
+ - Added comprehensive VM management examples
65
+ - Cloud-init configuration guide with examples
66
+
67
+ ### Use Cases
68
+ - **Content Deployment**: Spin up VMs for content testing and preview
69
+ - **Development Environments**: Create dev/test infrastructure on demand
70
+ - **CI/CD Runners**: Deploy CI/CD runners and test infrastructure
71
+ - **Production Deployments**: Provision production application servers
72
+
73
+ ## [0.2.20] - 2025-11-20
74
+
75
+ ### Added
76
+ - **🎉 Modular Workflow Installation**: Install only the components you need
77
+ - `npx myaidev-method@latest content --claude` - Content creation only
78
+ - `npx myaidev-method@latest dev --claude` - Development workflow (SPARC)
79
+ - `npx myaidev-method@latest visual --claude` - Visual content generation
80
+ - `npx myaidev-method@latest publish --wordpress` - WordPress publishing
81
+ - `npx myaidev-method@latest publish --payloadcms` - PayloadCMS publishing
82
+ - `npx myaidev-method@latest publish --static` - Static site publishing
83
+ - `npx myaidev-method@latest deploy --coolify` - Coolify deployment
84
+
85
+ - **Workflow Management Commands**:
86
+ - `npx myaidev-method@latest list` - List installed workflows
87
+ - `npx myaidev-method@latest status` - Show installation status
88
+ - `npx myaidev-method@latest add <workflow>` - Add a workflow
89
+ - `npx myaidev-method@latest remove <workflow>` - Remove a workflow
90
+
91
+ - **Workflow Configuration System**:
92
+ - `src/config/workflows.js` - Complete workflow definitions (9 workflows)
93
+ - `src/lib/workflow-installer.js` - Modular installation engine
94
+ - `.myaidev-manifest.json` - Installation tracking manifest
95
+ - Automatic dependency resolution (e.g., `publish-wordpress` auto-installs `core` + `content`)
96
+
97
+ - **Documentation**:
98
+ - `MODULAR_INSTALLATION.md` - Comprehensive modular installation guide
99
+ - Updated README.md with modular installation examples
100
+ - Use case guides for different user types
101
+
102
+ ### Changed
103
+ - **CLI Commands**:
104
+ - `init --claude` remains backward compatible (installs all workflows)
105
+ - New modular commands reduce installation size for focused use cases
106
+ - Support for `--dry-run` and `--verbose` flags on all commands
107
+
108
+ ### Benefits
109
+ - ✅ **Smaller installations**: Install only what you need (e.g., content creators don't need dev workflow)
110
+ - ✅ **Faster setup**: Reduced file copying and dependency installation
111
+ - ✅ **Cleaner projects**: Fewer unused commands, agents, and scripts
112
+ - ✅ **Better organization**: Clear separation of workflows and dependencies
113
+ - ✅ **Easier management**: Add/remove workflows as needs change
114
+ - ✅ **Backward compatible**: Existing `init --claude` works exactly as before
115
+
116
+ ### Use Cases
117
+ - **Content Creator**: `content` + `publish-wordpress` (minimal installation)
118
+ - **Software Developer**: `dev` only (24 SPARC commands, no publishing)
119
+ - **Visual Content Creator**: `content` + `visual` + `publish-wordpress`
120
+ - **Full Stack Developer**: `dev` + `deploy` (development + deployment, no content)
121
+ - **Everything**: `init --claude` (backward compatible, all workflows)
122
+
8
123
  ## [0.2.19] - 2025-11-19
9
124
 
10
125
  ### Fixed
@@ -15,22 +130,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
130
  - **Space Token Filter**: Filter out space tokens to prevent incorrect paragraph generation between lists
16
131
  - Format codes follow Lexical specification: Bold=1, Italic=2, Code=16, combinations via bitwise addition
17
132
 
133
+ ### Added
134
+ - **Comprehensive Testing**: 58 new tests for PayloadCMS Lexical converter
135
+ - 26 comprehensive conversion tests (all node types, formatters, edge cases)
136
+ - 23 validation method tests (validateLexicalStructure, validateFormatCode)
137
+ - 9 integration tests (real-world examples, documentation compliance)
138
+ - Total test suite: 77 tests (10 Gutenberg + 9 installation + 58 PayloadCMS)
139
+
18
140
  ### Changed
19
141
  - **Health Check Endpoint**: Updated from `/api` to `/api/posts?limit=1` for better connectivity verification
20
142
  - Now verifies both API accessibility AND database connectivity
21
143
  - More meaningful health indicator for PayloadCMS instances
22
144
 
23
- ### Testing
24
- - All existing tests pass (Gutenberg converter, installation)
25
- - Added PayloadCMS Lexical format validation tests
26
- - Verified list type, inline formatting, and link node generation
27
-
28
145
  ### Benefits
29
146
  - ✅ Content published to PayloadCMS now displays correctly with proper formatting
30
147
  - ✅ Lists render as actual ordered/unordered lists (not as numbered text)
31
148
  - ✅ Bold, italic, and code markdown formatters work as expected
32
149
  - ✅ Links are properly rendered as clickable hyperlinks
33
150
  - ✅ Health checks provide more accurate connectivity status
151
+ - ✅ Comprehensive test coverage ensures format correctness
34
152
 
35
153
  ## [0.2.18] - 2025-11-19
36
154
 
package/README.md CHANGED
@@ -35,6 +35,7 @@ The **MyAIDev Method** is a complete development framework for AI CLI tools (Cla
35
35
  - [Development Agents](#development-agents)
36
36
  - [Content & Publishing Agents](#content--publishing-agents)
37
37
  - [Visual Content Generation](#visual-content-generation)
38
+ - [OpenStack Integration](#openstack-integration)
38
39
  - [Slash Commands](#slash-commands)
39
40
  - [MCP Server Integration](#mcp-server-integration)
40
41
  - [Configuration](#configuration)
@@ -68,9 +69,9 @@ The **MyAIDev Method** is a complete development framework for AI CLI tools (Cla
68
69
  - **Git-Based Workflows**: Automated publishing for static site generators
69
70
  - **WordPress Admin Agent**: Security, performance, health monitoring, and administration
70
71
 
71
- ### 🎨 Visual Content Generation (New in v0.2.14!)
72
- - **AI-Powered Image Generation**: Google Gemini 2.5 Flash, Imagen 3, OpenAI DALL-E 3
73
- - **AI-Powered Video Generation**: Google Veo 2 (up to 8 seconds, 720p)
72
+ ### 🎨 Visual Content Generation (Updated in v0.2.22!)
73
+ - **AI-Powered Image Generation**: Google Gemini "Nano Banana" (SOTA), OpenAI GPT Image 1.5 (SOTA), Imagen 3, FLUX 2
74
+ - **AI-Powered Video Generation**: Google Veo 3 (latest video generation)
74
75
  - **Multi-Platform Support**: Works with Claude Code, Gemini CLI, and Codex CLI
75
76
  - **Budget Management**: Daily/monthly limits, cost tracking, and warnings
76
77
  - **Smart Service Selection**: Automatic service selection based on content type
@@ -78,6 +79,29 @@ The **MyAIDev Method** is a complete development framework for AI CLI tools (Cla
78
79
  - **Cost-Effective**: Starting at $0.02/image (Gemini Flash)
79
80
  - **Organized Storage**: Automatic file organization by date in `content-assets/`
80
81
 
82
+ ### 🔒 Security Testing (New in v0.2.21!)
83
+ **Professional security testing capabilities inspired by [Agent Zero](https://github.com/frdel/agent-zero)**
84
+ - **PTES Methodology**: Full penetration testing execution standard implementation
85
+ - **OSINT & Reconnaissance**: Comprehensive intelligence gathering and passive reconnaissance
86
+ - **Web Application Security**: OWASP Top 10 testing and web application assessment
87
+ - **Security Auditing**: Compliance validation (PCI-DSS, GDPR, HIPAA, SOC 2)
88
+ - **Authorization-First**: Mandatory authorization system prevents unauthorized testing
89
+ - **Environment Flexibility**: Native Linux, Kali Docker, or hybrid deployment
90
+ - **Professional Reporting**: Executive summaries, technical findings, remediation guidance
91
+ - **Legal Compliance**: Built-in warnings and ethical guidelines
92
+
93
+ **âš ī¸ IMPORTANT**: Security testing requires explicit written authorization. All security operations must comply with applicable laws and regulations.
94
+
95
+ ### đŸŒŠī¸ OpenStack Cloud Integration (New in v0.2.22!)
96
+ **Complete cloud infrastructure orchestration for VM management and deployment**
97
+ - **VM Lifecycle Management**: Create, start, stop, reboot, delete virtual machines
98
+ - **Resource Discovery**: List images, flavors, networks, security groups, keypairs
99
+ - **Network Configuration**: Floating IPs, IP assignment, security groups
100
+ - **Storage Management**: Volumes, volume attachments
101
+ - **Cloud-Init Support**: Automatic VM provisioning with cloud-init scripts
102
+ - **Session Tracking**: Operation history and session management
103
+ - **Interactive Setup**: Parse openrc files or manual credential entry
104
+
81
105
  ### 🚀 Deployment & Infrastructure
82
106
  - **Coolify Integration**: Self-hosted PaaS deployment and orchestration
83
107
  - **RamNode Optimized**: Deployment patterns optimized for RamNode.com infrastructure
@@ -95,9 +119,49 @@ The **MyAIDev Method** is a complete development framework for AI CLI tools (Cla
95
119
  [![npm version](https://badge.fury.io/js/myaidev-method.svg)](https://www.npmjs.com/package/myaidev-method)
96
120
  [![npm downloads](https://img.shields.io/npm/dt/myaidev-method.svg)](https://www.npmjs.com/package/myaidev-method)
97
121
 
98
- ### ⚡ One-Command Installation
122
+ ### ⚡ Modular Installation (New in v0.2.19!)
123
+
124
+ **Install only what you need!** MyAIDev Method now supports modular workflow installation:
125
+
126
+ ```bash
127
+ # Content creation only
128
+ npx myaidev-method@latest content --claude
129
+
130
+ # Development workflow only (SPARC)
131
+ npx myaidev-method@latest dev --claude
132
+
133
+ # WordPress publishing
134
+ npx myaidev-method@latest publish --wordpress
135
+
136
+ # Visual content generation
137
+ npx myaidev-method@latest visual --claude
138
+
139
+ # Security testing (NEW in v0.2.21!)
140
+ npx myaidev-method@latest security --pentest # Penetration testing
141
+ npx myaidev-method@latest security --audit # Security auditing
142
+ npx myaidev-method@latest security --webapp # Web app security
143
+ npx myaidev-method@latest security --all # All security workflows
144
+
145
+ # Complete installation (all workflows)
146
+ npx myaidev-method@latest init --claude
147
+ ```
148
+
149
+ **See [MODULAR_INSTALLATION.md](MODULAR_INSTALLATION.md) for complete guide**
150
+
151
+ ### 💡 Quick Installation Examples
152
+
153
+ **Content Creator:**
154
+ ```bash
155
+ npx myaidev-method@latest content --claude
156
+ npx myaidev-method@latest add publish-wordpress
157
+ ```
99
158
 
100
- **No setup required!** Install and configure in your project directory with a single command:
159
+ **Software Developer:**
160
+ ```bash
161
+ npx myaidev-method@latest dev --claude
162
+ ```
163
+
164
+ **Full Installation (Backward Compatible):**
101
165
 
102
166
  ```bash
103
167
  # For Claude Code (most popular)
@@ -572,12 +636,17 @@ Self-hosted PaaS deployment for applications.
572
636
 
573
637
  ## 🎨 Visual Content Generation
574
638
 
575
- **New in v0.2.14!** Generate AI-powered images and videos for your content using Google AI (Gemini, Imagen, Veo) and OpenAI (DALL-E) services.
639
+ **Updated in v0.2.22!** Generate AI-powered images and videos using state-of-the-art models.
640
+
641
+ ### Recommended SOTA Models
642
+
643
+ - **Google Gemini 3.0 Pro Image ("Nano Banana")**: Fast, cost-effective at $0.02/image - great for high volume
644
+ - **OpenAI GPT Image 1.5**: Best quality, best text rendering, $0.02-$0.19/image depending on quality tier
576
645
 
577
646
  ### Features
578
647
 
579
- - **Image Generation**: Google Gemini 2.5 Flash ($0.02), Imagen 3 ($0.03), DALL-E 3 ($0.04-0.12)
580
- - **Video Generation**: Google Veo 2 ($0.10 for up to 8 seconds, 720p)
648
+ - **Image Generation**: Gemini "Nano Banana" ($0.02), OpenAI GPT Image 1.5 ($0.02-$0.19), Imagen 3 ($0.03), FLUX 2 ($0.025-$0.05)
649
+ - **Video Generation**: Google Veo 3 ($0.40/second - latest video generation)
581
650
  - **Multi-Platform**: Works with Claude Code, Gemini CLI, and Codex CLI
582
651
  - **Budget Management**: Daily/monthly limits, cost tracking, and warnings
583
652
  - **Smart Organization**: Automatic file storage by date in `content-assets/`
@@ -596,7 +665,8 @@ Self-hosted PaaS deployment for applications.
596
665
 
597
666
  2. **Follow the interactive wizard** to set up:
598
667
  - Google AI API key (for Gemini, Imagen, Veo)
599
- - OpenAI API key (for DALL-E)
668
+ - OpenAI API key (for GPT Image 1.5)
669
+ - Fal.ai API key (for FLUX 2)
600
670
  - Default service preference
601
671
  - Daily and monthly budget limits
602
672
 
@@ -633,10 +703,15 @@ npm run configure:visual
633
703
 
634
704
  | Service | Speed | Cost | Quality | Best For |
635
705
  |---------|-------|------|---------|----------|
636
- | **Gemini 2.5 Flash** | ⚡⚡⚡ | $0.02 | Good | Quick hero images, diagrams, high volume |
637
- | **Imagen 3** | ⚡⚡ | $0.03 | Excellent | Premium hero images, high-quality visuals |
638
- | **DALL-E 3** | ⚡⚡ | $0.04-0.12 | Excellent | Creative illustrations, detailed designs |
639
- | **Veo 2** | ⚡ | $0.10 | Good | Product demos, short videos |
706
+ | **Gemini "Nano Banana"** ⭐ | ⚡⚡⚡ | $0.02 | Good | Quick hero images, diagrams, high volume (SOTA) |
707
+ | **OpenAI GPT Image 1.5** ⭐ | ⚡⚡ | $0.02-$0.19 | Outstanding | Best text rendering, highest quality (SOTA) |
708
+ | **Imagen 3** | ⚡⚡ | $0.03 | Excellent | Premium hero images, photorealistic |
709
+ | **FLUX 2 Pro** | ⚡⚡⚡ | $0.05 | Outstanding | Fast quality, typography, multi-reference |
710
+ | **FLUX 2 Flex** | ⚡⚡ | $0.04 | Outstanding | Developer control, custom parameters |
711
+ | **FLUX 2 Dev** | ⚡⚡⚡ | $0.025 | Excellent | Cost-effective, 32B open-weight model |
712
+ | **Veo 3** | ⚡ | $0.40/sec | Outstanding | Premium video content, latest features |
713
+
714
+ ⭐ = Recommended SOTA (State-of-the-Art) models
640
715
 
641
716
  ### Image Types
642
717
 
@@ -675,6 +750,123 @@ For comprehensive documentation, see:
675
750
  - **VISUAL_GENERATION_FILE_ORGANIZATION.md** - File structure details
676
751
  - **CONTENT_CREATION_GUIDE.md** - Content workflow integration
677
752
 
753
+ ## đŸŒŠī¸ OpenStack Integration
754
+
755
+ **New in v0.2.22!** Complete OpenStack cloud management for spinning up VMs, managing infrastructure, and orchestrating deployments.
756
+
757
+ ### Features
758
+
759
+ - **VM Lifecycle Management**: Create, start, stop, reboot, delete virtual machines
760
+ - **Resource Discovery**: List available images, flavors, networks, security groups, keypairs
761
+ - **Network Configuration**: Create and assign floating IPs, manage security groups
762
+ - **Storage Management**: Create volumes and attach to servers
763
+ - **Cloud-Init Support**: Automatic VM provisioning with cloud-init scripts
764
+ - **Session Management**: Track operations and maintain session state
765
+
766
+ ### Setup
767
+
768
+ 1. **Configure OpenStack credentials**:
769
+ ```bash
770
+ /myai-configure openstack
771
+ ```
772
+
773
+ 2. **Follow the interactive wizard** to:
774
+ - Parse existing openrc file (recommended), or
775
+ - Enter credentials manually
776
+ - Test connection
777
+ - Set default cloud-init URL (optional)
778
+
779
+ ### Usage
780
+
781
+ ```bash
782
+ # Check connectivity
783
+ /myai-openstack health
784
+
785
+ # Discover available resources
786
+ /myai-openstack images
787
+ /myai-openstack flavors
788
+ /myai-openstack networks
789
+ /myai-openstack keypairs
790
+
791
+ # Create a VM
792
+ /myai-openstack create myvm --image "Ubuntu 22.04" --flavor m1.small --keypair mykey
793
+
794
+ # Create VM with cloud-init
795
+ /myai-openstack create myvm --image "Ubuntu 22.04" --flavor m1.small --use-default-cloud-init
796
+
797
+ # Create VM with custom cloud-init URL
798
+ /myai-openstack create myvm --image "Ubuntu 22.04" --flavor m1.small --cloud-init-url "https://gist.github.com/user/abc123"
799
+
800
+ # List all VMs
801
+ /myai-openstack list
802
+
803
+ # Show VM details
804
+ /myai-openstack show myvm
805
+
806
+ # Manage VM lifecycle
807
+ /myai-openstack start myvm
808
+ /myai-openstack stop myvm
809
+ /myai-openstack reboot myvm
810
+ /myai-openstack delete myvm
811
+
812
+ # Assign floating IP
813
+ /myai-openstack floating-ip create external-network
814
+ /myai-openstack floating-ip add myvm 203.0.113.10
815
+
816
+ # Cloud-init management
817
+ /myai-openstack cloud-init info
818
+ /myai-openstack cloud-init preview
819
+ ```
820
+
821
+ ### Cloud-Init Support
822
+
823
+ Cloud-init enables automatic VM provisioning. Sources (in priority order):
824
+
825
+ 1. **Inline content** (`--user-data`): Direct YAML content
826
+ 2. **URL** (`--cloud-init-url`): Fetch from any URL (GitHub Gist supported)
827
+ 3. **File** (`--cloud-init-file`): Local file path
828
+ 4. **Default** (`--use-default-cloud-init`): Uses `CLOUD_INIT` from `.env`
829
+
830
+ **Example cloud-init script:**
831
+ ```yaml
832
+ #cloud-config
833
+ package_update: true
834
+ packages:
835
+ - docker.io
836
+ - nodejs
837
+ users:
838
+ - name: developer
839
+ groups: [sudo, docker]
840
+ ssh_authorized_keys:
841
+ - ssh-rsa AAAA... your-key
842
+ runcmd:
843
+ - systemctl enable docker
844
+ ```
845
+
846
+ ### Environment Variables
847
+
848
+ ```bash
849
+ # Required OpenStack credentials
850
+ OS_AUTH_URL=https://cloud.example.com:5000/v3
851
+ OS_USERNAME=your-username
852
+ OS_PASSWORD=your-password
853
+ OS_PROJECT_ID=your-project-id
854
+ OS_REGION_NAME=RegionOne
855
+
856
+ # Optional
857
+ OS_USER_DOMAIN_ID=default
858
+ OS_PROJECT_DOMAIN_ID=default
859
+ OS_IDENTITY_API_VERSION=3
860
+ CLOUD_INIT=https://gist.github.com/user/cloud-init-script
861
+ ```
862
+
863
+ ### Use Cases
864
+
865
+ - **Content Deployment**: Spin up VMs for content testing and preview
866
+ - **Development Environments**: Create dev/test infrastructure on demand
867
+ - **CI/CD Runners**: Deploy CI/CD runners and test infrastructure
868
+ - **Production Deployments**: Provision production application servers
869
+
678
870
  ## đŸŽ¯ Slash Commands
679
871
 
680
872
  ### `/myai-content-writer`
@@ -348,14 +348,76 @@ class PayloadCMSUtils {
348
348
  Markdown Token → Lexical Node Mapping:
349
349
  heading → { type: 'heading', tag: 'h1-h6', children: [...] }
350
350
  paragraph → { type: 'paragraph', children: [...] }
351
- list (ordered) → { type: 'number', listType: 'number', children: [...] }
352
- list (unordered) → { type: 'bullet', listType: 'bullet', children: [...] }
351
+ list (ordered) → { type: 'list', listType: 'number', tag: 'ol', children: [...] }
352
+ list (unordered) → { type: 'list', listType: 'bullet', tag: 'ul', children: [...] }
353
353
  code → { type: 'code', language: 'lang', children: [...] }
354
354
  blockquote → { type: 'quote', children: [...] }
355
355
  hr → { type: 'horizontalrule', version: 1 }
356
356
  text → { type: 'text', text: '...', format: 0 }
357
357
  ```
358
358
 
359
+ **Note**: As of v0.2.19, list nodes use `type: 'list'` (spec-compliant) instead of `type: 'bullet'/'number'`.
360
+
361
+ **Inline Formatting** (v0.2.19+):
362
+ ```javascript
363
+ Format Codes (bitwise flags):
364
+ 0 → Plain text
365
+ 1 → Bold (**text**)
366
+ 2 → Italic (*text*)
367
+ 3 → Bold + Italic (***text***)
368
+ 4 → Strikethrough (~~text~~)
369
+ 8 → Underline
370
+ 16 → Code (`text`)
371
+ 32 → Subscript
372
+ 64 → Superscript
373
+ 128 → Highlight
374
+
375
+ Examples:
376
+ **bold** → { type: 'text', text: 'bold', format: 1 }
377
+ *italic* → { type: 'text', text: 'italic', format: 2 }
378
+ `code` → { type: 'text', text: 'code', format: 16 }
379
+ [link](url) → { type: 'link', url: 'url', children: [...] }
380
+ ```
381
+
382
+ **Lexical Validation** (v0.2.19+):
383
+
384
+ The PayloadCMS utils now include comprehensive validation methods:
385
+
386
+ ```javascript
387
+ // Validate complete Lexical structure
388
+ const validation = utils.validateLexicalStructure(lexicalJSON, {
389
+ strict: false, // Warn on unknown node types
390
+ strictFormat: false // Validate format codes
391
+ });
392
+
393
+ // Returns: { valid: boolean, errors: [], warnings: [] }
394
+
395
+ // Validate individual format codes
396
+ const formatInfo = utils.validateFormatCode(3); // Bold + Italic
397
+ // Returns: {
398
+ // valid: true,
399
+ // format: 3,
400
+ // flags: ['BOLD', 'ITALIC'],
401
+ // description: 'BOLD + ITALIC'
402
+ // }
403
+ ```
404
+
405
+ **Validation Rules**:
406
+ - Root must have `type: 'root'` and `children` array
407
+ - Headings must have `tag: 'h1'` through `'h6'`
408
+ - Lists must have `listType: 'bullet'|'number'|'check'` and `tag: 'ul'|'ol'`
409
+ - List children must be `listitem` nodes
410
+ - Text nodes must have `text` (string) and `format` (number 0-255)
411
+ - Links must have `url` (string) and `children` array
412
+ - Format codes must be valid bitwise combinations (0-255)
413
+
414
+ **Testing Coverage** (v0.2.19+):
415
+ - 26 comprehensive conversion tests
416
+ - 23 validation method tests
417
+ - 9 integration tests with real-world examples
418
+ - Performance tested with 100+ paragraph documents
419
+ - TECHNICAL_ARCHITECTURE.md compliance verified
420
+
359
421
  ### 3. Static Site Utility (src/lib/static-site-utils.js)
360
422
 
361
423
  **Purpose**: Unified publishing for git-based static site generators.