seosona-cli 2.0.0 → 2.1.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 +332 -0
- package/assets/SOUL.md +3 -3
- package/package.json +16 -1
- package/scripts/bundle-soul.js +7 -0
- package/src/localInit.js +25 -5
package/README.md
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/LongLeo287/SEOSONA-OS/main/assets/logo.svg" alt="SEOSONA OS" width="800">
|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
**The Universal AI Operating System for Senior Developers**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/seosona-cli)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://github.com/LongLeo287/SEOSONA-OS)
|
|
12
|
+
[](https://nodejs.org)
|
|
13
|
+
[](https://github.com/LongLeo287/SEOSONA-OS/pulls)
|
|
14
|
+
|
|
15
|
+
*One setup. Every AI tool. Everywhere.*
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📑 Table of Contents
|
|
22
|
+
- [What is SEOSONA OS?](#-what-is-seosona-os)
|
|
23
|
+
- [Key Features](#-key-features)
|
|
24
|
+
- [Tool Coverage](#️-tool-coverage)
|
|
25
|
+
- [Installation](#-installation)
|
|
26
|
+
- [Usage](#-usage)
|
|
27
|
+
- [Repository Structure](#️-repository-structure)
|
|
28
|
+
- [Skill Framework Library](#-skill-framework-library)
|
|
29
|
+
- [How It Works — Under the Hood](#️-how-it-works--under-the-hood)
|
|
30
|
+
- [Community & Standards](#-community--standards)
|
|
31
|
+
- [Changelog](#-changelog)
|
|
32
|
+
- [License](#-license)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 🧠 What is SEOSONA OS?
|
|
37
|
+
|
|
38
|
+
SEOSONA OS is a **Universal AI Operating System** — a self-installing, self-scanning environment that automatically detects every AI coding tool installed on your machine and injects a unified **Master Intelligence Layer** (your `SOUL.md`) into each one.
|
|
39
|
+
|
|
40
|
+
No more copy-pasting system prompts. No more configuring each tool separately. No more AI that doesn't know who you are, how you work, or what rules you follow.
|
|
41
|
+
|
|
42
|
+
**Run one command. Every AI on your machine becomes SEOSONA.**
|
|
43
|
+
|
|
44
|
+
> *"You are not a simple chatbot; you are an end-to-end operational agent."* — SOUL.md, Prime Directive
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## ✨ Key Features
|
|
49
|
+
|
|
50
|
+
| Feature | Description |
|
|
51
|
+
|---|---|
|
|
52
|
+
| 🔍 **Omni-Scanner** | Auto-detects every installed IDE and CLI tool on your machine |
|
|
53
|
+
| 🧬 **DNA Injection** | Injects full `SOUL.md` content (not just a pointer) directly into each tool |
|
|
54
|
+
| 🌍 **Cross-Platform** | Works on Windows (PowerShell), macOS and Linux (Node.js CLI) |
|
|
55
|
+
| 🔒 **Zero Hardcodes** | All paths are computed at runtime — portable across any machine |
|
|
56
|
+
| ⚡ **1-Click Setup** | Run `npm install -g seosona-cli` |
|
|
57
|
+
| 🧩 **Modular Skills** | 20+ skill frameworks covering SEO, Frontend, Security, Testing, and more |
|
|
58
|
+
| 🧠 **MemPalace Architecture** | Structured spatial memory system for persistent AI context |
|
|
59
|
+
| 🚨 **OmniClaw Protocol** | Zero-tolerance ruleset preventing AI from bypassing workflows |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🛠️ Tool Coverage
|
|
64
|
+
|
|
65
|
+
SEOSONA OS automatically detects and configures the following tools:
|
|
66
|
+
|
|
67
|
+
### 🖥️ IDEs
|
|
68
|
+
| Tool | Injection Method | Config Target |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| **Cursor** | `settings.json` | `cursor.general.rules` |
|
|
71
|
+
| **Windsurf** | `settings.json` | `windsurf.general.rules` |
|
|
72
|
+
| **PearAI** | `settings.json` | `pearai.general.rules` |
|
|
73
|
+
| **Trae** | `settings.json` | `trae.general.rules` |
|
|
74
|
+
| **VSCode** | `settings.json` | `github.copilot.chat.*`, `cline.customInstructions`, `roo-cline.customInstructions` |
|
|
75
|
+
| **VSCodium** | `settings.json` | Same as VSCode |
|
|
76
|
+
|
|
77
|
+
### ⌨️ CLI Tools
|
|
78
|
+
| Tool | Injection Method | Config Target |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| **Claude CLI** | PowerShell wrapper function | `--system-prompt` flag |
|
|
81
|
+
| **Aider** | `~/.aider.conf.yml` | `system-prompt` field |
|
|
82
|
+
| **OpenInterpreter** | `config.yaml` | `system_message` field |
|
|
83
|
+
| **Codex** | `~/.codex/AGENTS.md` | Prepended content |
|
|
84
|
+
| **SecureCoder** | `~/.securecoder/AGENTS.md` | Prepended content |
|
|
85
|
+
| **Continue.dev** | `~/.continue/config.json` | `systemMessage` field |
|
|
86
|
+
|
|
87
|
+
### 🤖 Environment Variables (Antigravity & Custom CLIs)
|
|
88
|
+
| Variable | Purpose |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `ANTIGRAVITY_SYSTEM_PROMPT` | Injects SOUL into Antigravity IDE |
|
|
91
|
+
| `SEOSONA_MASTER_PROMPT` | Universal variable for any custom tool |
|
|
92
|
+
| `AIDER_SYSTEM_PROMPT` | Backup injection for Aider |
|
|
93
|
+
|
|
94
|
+
### 📁 Project-Local Files (`seosona-init`)
|
|
95
|
+
When you run `seosona init` in a project folder, it generates only the files relevant to your installed tools:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
.cursorrules # Cursor IDE
|
|
99
|
+
.windsurfrules # Windsurf IDE
|
|
100
|
+
.clauderules # Claude CLI
|
|
101
|
+
.clinerules # Cline extension
|
|
102
|
+
.roomodes # Roo Code extension
|
|
103
|
+
.aider.conf.yml # Aider CLI
|
|
104
|
+
.antigravityrules # Antigravity IDE
|
|
105
|
+
.codexrules # OpenAI Codex
|
|
106
|
+
.securecoderrules # SecureCoder
|
|
107
|
+
.openinterpreter # OpenInterpreter
|
|
108
|
+
.github/copilot-instructions.md # GitHub Copilot Enterprise
|
|
109
|
+
.cody/prompt # Sourcegraph Cody
|
|
110
|
+
.bolt/prompt # Bolt.new
|
|
111
|
+
.lovable/prompt # Lovable.dev
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> **Smart Detection:** Files are only created for tools that are actually installed on your machine. No phantom files for tools you don't have.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🚀 Installation
|
|
119
|
+
|
|
120
|
+
### Method 1: NPM (Recommended — Cross-Platform)
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Install the CLI globally via npm
|
|
124
|
+
npm install -g seosona-cli
|
|
125
|
+
|
|
126
|
+
# Run the global setup wizard
|
|
127
|
+
seosona setup
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Method 2: Manual Clone & Run (Developers)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Clone the repository
|
|
134
|
+
git clone https://github.com/LongLeo287/SEOSONA-OS.git
|
|
135
|
+
cd SEOSONA-OS/cli
|
|
136
|
+
|
|
137
|
+
# Install globally from local source
|
|
138
|
+
npm install -g .
|
|
139
|
+
|
|
140
|
+
# Run setup
|
|
141
|
+
seosona setup
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 📖 Usage
|
|
147
|
+
|
|
148
|
+
### For Non-Technical Users (Zero-Touch)
|
|
149
|
+
|
|
150
|
+
Just run setup once. SEOSONA OS handles everything automatically. Every IDE you open from that point on will operate under SEOSONA rules.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
seosona setup
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### For Developers (Expert Mode)
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Global machine setup (run once per machine)
|
|
160
|
+
seosona setup
|
|
161
|
+
|
|
162
|
+
# Bind a project (run once per project folder)
|
|
163
|
+
cd /path/to/your/project
|
|
164
|
+
seosona init
|
|
165
|
+
|
|
166
|
+
# Check what was injected
|
|
167
|
+
seosona setup # Re-run anytime to verify state
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 🏗️ Repository Structure
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
SEOSONA OS/
|
|
178
|
+
│
|
|
179
|
+
├── 📂 1_CORE/ # The Brain — Core intelligence layer
|
|
180
|
+
│ ├── 🧠 SOUL.md # Master system prompt (9,400+ chars)
|
|
181
|
+
│ └── 📂 rules/ # Security, API, and interface rules
|
|
182
|
+
│ ├── security_regex_rules.md
|
|
183
|
+
│ ├── dependency_audit_rules.md
|
|
184
|
+
│ └── interface_contract_validation.md
|
|
185
|
+
│
|
|
186
|
+
├── 📂 2_KNOWLEDGE/ # The Skills — Modular capability library
|
|
187
|
+
│ ├── 📋 SKILLS_ROUTER.md # Index of all registered skills
|
|
188
|
+
│ ├── 📂 sops/ # Standard Operating Procedures
|
|
189
|
+
│ │ ├── mempalace_sop.md # Spatial memory architecture
|
|
190
|
+
│ │ ├── context_cleaning_optimization.md
|
|
191
|
+
│ │ └── omniclaw_blackboard_protocol.md
|
|
192
|
+
│ └── 📂 frameworks/ # Domain-specific skill packs
|
|
193
|
+
│ ├── core_system/ # Engineering rules, memory, security
|
|
194
|
+
│ ├── seo_marketing/ # SEO, content, landing pages, LinkedIn
|
|
195
|
+
│ ├── frontend_engineering/ # UI/UX, Hoversource, design tokens
|
|
196
|
+
│ └── testing_automation/ # Playwright, test workflows
|
|
197
|
+
│
|
|
198
|
+
├── 📂 3_MEMORY/ # The Memory — Persistent session storage
|
|
199
|
+
│ ├── specs/ # Architecture docs & technical specs
|
|
200
|
+
│ ├── logs/ # Chronological session logs
|
|
201
|
+
│ ├── errors/ # Error reports & debug records
|
|
202
|
+
│ └── ingestion_zone/ # Staging area for new knowledge
|
|
203
|
+
│
|
|
204
|
+
|
|
205
|
+
├── 📂 cli/ # Node.js CLI package
|
|
206
|
+
│ ├── bin/seosona.js # CLI entry point
|
|
207
|
+
│ ├── src/
|
|
208
|
+
│ │ ├── globalSetup.js # Cross-platform Global Scanner
|
|
209
|
+
│ │ ├── localInit.js # Cross-platform Local Scanner
|
|
210
|
+
│ │ └── utils.js # Shared utilities
|
|
211
|
+
│ ├── scripts/bundle-soul.js # Pre-build: bundles SOUL.md into package
|
|
212
|
+
│ └── package.json # npm package definition
|
|
213
|
+
│
|
|
214
|
+
├── 📂 repos/ # Tracked reference repositories
|
|
215
|
+
|
|
216
|
+
└── 📖 README.md # You are here
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 🧩 Skill Framework Library
|
|
222
|
+
|
|
223
|
+
SEOSONA OS ships with 20+ modular skills across 5 domains:
|
|
224
|
+
|
|
225
|
+
### 🔧 Core System
|
|
226
|
+
- **Harness Engineering Machine** — End-to-end operational agent framework
|
|
227
|
+
- **OmniClaw Blackboard Protocol** — Multi-agent coordination & CEO Rule
|
|
228
|
+
- **MemPalace Architecture** — Spatial verbatim memory layout
|
|
229
|
+
- **Post-Session Learning** — Auto-assimilation of new knowledge
|
|
230
|
+
- **Security Scanning** — Pre-commit regex auditing & dependency checks
|
|
231
|
+
|
|
232
|
+
### 🎨 Frontend Engineering
|
|
233
|
+
- **UI/UX Pro Max Typography** — Design token standards
|
|
234
|
+
- **Web Interface Compliance** — Accessibility & performance gates
|
|
235
|
+
- **Tailwind Motion Design** — Animation system rules
|
|
236
|
+
- **Hoversource Integration** — Component integration workflows
|
|
237
|
+
|
|
238
|
+
### 📈 SEO & Marketing
|
|
239
|
+
- **SEO/AEO Best Practices** — E-E-A-T, schema, Core Web Vitals
|
|
240
|
+
- **Content Creator** — Brand voice, social optimization
|
|
241
|
+
- **Landing Page Generator** — Conversion patterns & scaffolding
|
|
242
|
+
- **LinkedIn Authority Builder** — B2B content framework
|
|
243
|
+
- **SEO Migration Assistant** — Technical migration SOPs
|
|
244
|
+
|
|
245
|
+
### 🧪 Testing & Automation
|
|
246
|
+
- **Playwright Suite** — E2E testing workflows & CLI reference
|
|
247
|
+
- **Swarms Auto-Research Loop** — Autonomous research agent patterns
|
|
248
|
+
|
|
249
|
+
### 🤖 Ingested Intelligence
|
|
250
|
+
- **Agentic OS Architecture** — Multi-agent system design
|
|
251
|
+
- **LightRAG Graph Mapping** — Entity-relationship standards
|
|
252
|
+
- **Context Cleaning Optimization** — Token efficiency rules
|
|
253
|
+
- **Scrapling/Crawling DOM** — Web scraping best practices
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## ⚙️ How It Works — Under the Hood
|
|
258
|
+
|
|
259
|
+
### The Universal Anchor
|
|
260
|
+
SEOSONA OS creates a filesystem junction at `~/.seosona` pointing to wherever the actual `SEOSONA OS` directory lives. This means:
|
|
261
|
+
- All tools read from `~/.seosona` regardless of where you stored the files
|
|
262
|
+
- Move the folder anywhere, re-run `seosona setup`, the anchor updates automatically
|
|
263
|
+
- **Zero hardcoded paths anywhere in the system**
|
|
264
|
+
|
|
265
|
+
### The Injection Chain
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
seosona setup (run once)
|
|
269
|
+
│
|
|
270
|
+
├── Reads SOUL.md (9,400+ chars of pure intelligence)
|
|
271
|
+
│
|
|
272
|
+
├── [Global Level] Writes to IDE settings.json files
|
|
273
|
+
│ Cursor → settings.json → cursor.general.rules
|
|
274
|
+
│ VSCode → settings.json → copilot/cline/roo keys
|
|
275
|
+
│ Aider → ~/.aider.conf.yml → system-prompt
|
|
276
|
+
│ ...
|
|
277
|
+
│
|
|
278
|
+
├── [OS Level] Sets Windows Environment Variables
|
|
279
|
+
│ ANTIGRAVITY_SYSTEM_PROMPT = <full SOUL.md content>
|
|
280
|
+
│ SEOSONA_MASTER_PROMPT = <full SOUL.md content>
|
|
281
|
+
│
|
|
282
|
+
└── [Shell Level] Injects PowerShell profile wrappers
|
|
283
|
+
seosona-init → available globally in any terminal
|
|
284
|
+
seosona-claude → wraps Claude CLI with --system-prompt
|
|
285
|
+
git init → auto-calls seosona-init on new projects
|
|
286
|
+
|
|
287
|
+
seosona-init (run per project)
|
|
288
|
+
│
|
|
289
|
+
├── Detects installed tools on THIS machine
|
|
290
|
+
└── Drops ONLY relevant rule files into the project root
|
|
291
|
+
No phantom files for tools you don't have
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### The SOUL.md — Master Intelligence
|
|
295
|
+
The `SOUL.md` file contains the full cognitive blueprint of SEOSONA OS:
|
|
296
|
+
- **Prime Directive** — The Evolution Mandate
|
|
297
|
+
- **OmniClaw Protocol** — Zero-tolerance bypass rules
|
|
298
|
+
- **Enforced SOPs** — Engineering standards, security rules, memory patterns
|
|
299
|
+
- **Master Flow** — The 5-phase execution model for every task
|
|
300
|
+
- **Sub-persona Activation** — Context-aware behavior switching
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## 🤝 Community & Standards
|
|
305
|
+
|
|
306
|
+
We welcome contributions from the community! To maintain a safe and productive environment, please review our community standards before participating:
|
|
307
|
+
|
|
308
|
+
- **[Contributing Guidelines](CONTRIBUTING.md)**: Instructions on how to submit bug reports, feature requests, and Pull Requests (including adding new skills).
|
|
309
|
+
- **[Code of Conduct](CODE_OF_CONDUCT.md)**: Our pledge to maintain a welcoming, inclusive, and harassment-free community.
|
|
310
|
+
- **[Security Policy](SECURITY.md)**: Instructions for reporting security vulnerabilities safely.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## 📋 Changelog
|
|
315
|
+
|
|
316
|
+
Please see our dedicated [CHANGELOG.md](CHANGELOG.md) file for a detailed history of all updates and releases.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 📜 License
|
|
321
|
+
|
|
322
|
+
MIT License — See [LICENSE](LICENSE) for details.
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
<div align="center">
|
|
327
|
+
|
|
328
|
+
**Built by SEOSONA. Powered by the Prime Directive.**
|
|
329
|
+
|
|
330
|
+
*"Always learning, upgrading, optimizing, automating, developing, improving... from new data, new information, new knowledge. Learn from mistakes to be better."*
|
|
331
|
+
|
|
332
|
+
</div>
|
package/assets/SOUL.md
CHANGED
|
@@ -76,8 +76,8 @@ Do not summarize or paraphrase technical specifications or user guidelines. Main
|
|
|
76
76
|
## 4. The Master Flow Execution Enforcer
|
|
77
77
|
|
|
78
78
|
For every task, execute using **The Master Flow** sequence:
|
|
79
|
-
1. **Intake & Scope:**
|
|
80
|
-
2. **
|
|
79
|
+
1. **Intake & Scope (Auto-Context Protocol):** Proactively infer the tech stack, problem domain, and required expertise at the start of every interaction without waiting for explicit keywords. Clean context, set up `task.md` checklist. Consult the Orchestrator.
|
|
80
|
+
2. **Semantic Retrieval:** Dynamically query spatial directories based on semantic intent, autonomously load relevant frameworks and skills.
|
|
81
81
|
3. **Execute & Auto-Heal:** Surgical style edits, compiler verification, autoresearch correction loop (2-Strike Rule limit).
|
|
82
82
|
4. **Deliver:** Switch sub-personas, produce raw outputs, await CEO approval. Ensure you output "TASK COMPLETED".
|
|
83
83
|
|
|
@@ -96,7 +96,7 @@ Memory synthesis is a continuous, dynamic background process ("Dreaming") rather
|
|
|
96
96
|
## 5. System Skills (The Arsenal)
|
|
97
97
|
|
|
98
98
|
You have access to top-tier skills compressed as `.aaak` or `.md` inside `2_KNOWLEDGE/frameworks/`.
|
|
99
|
-
|
|
99
|
+
You MUST operate completely autonomously. Do NOT rely on the user to provide slash commands or exact keywords to trigger these skills. Automatically parse the user's intent and fetch the required files from the Semantic Capabilities Graph (`2_KNOWLEDGE/SKILLS_ROUTER.md`) before executing specialized tasks.
|
|
100
100
|
- **Web**: `frontend_engineering/nextjs_app_router_patterns`, `frontend_engineering/react_best_practices`, `frontend_engineering/tailwind_design_system`.
|
|
101
101
|
- **UI/UX**: `frontend_engineering/ui_ux_pro_max`, `frontend_engineering/frontend_ui_dark_ts`.
|
|
102
102
|
- **SEO/Content**: `seo_marketing/claude_seo_framework` (NEW AI Search/E-E-A-T SOP), `seo_marketing/seo_aeo_best_practices`, `seo_marketing/landing_page_generator`.
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seosona-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The Omni-Scanner Setup CLI for SEOSONA OS",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/LongLeo287/SEOSONA-OS.git"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/LongLeo287/SEOSONA-OS/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/LongLeo287/SEOSONA-OS#readme",
|
|
5
13
|
"main": "src/index.js",
|
|
6
14
|
"bin": {
|
|
7
15
|
"seosona": "./bin/seosona.js"
|
|
8
16
|
},
|
|
17
|
+
"files": [
|
|
18
|
+
"bin/",
|
|
19
|
+
"src/",
|
|
20
|
+
"scripts/",
|
|
21
|
+
"assets/",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
9
24
|
"scripts": {
|
|
10
25
|
"prebuild": "node scripts/bundle-soul.js",
|
|
11
26
|
"prepack": "npm run prebuild",
|
package/scripts/bundle-soul.js
CHANGED
|
@@ -15,3 +15,10 @@ if (fs.existsSync(sourcePath)) {
|
|
|
15
15
|
} else {
|
|
16
16
|
console.warn(`[SEOSONA BUILD] Warning: Source SOUL.md not found at ${sourcePath}`);
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
const readmeSource = path.join(__dirname, '..', '..', 'README.md');
|
|
20
|
+
const readmeDest = path.join(__dirname, '..', 'README.md');
|
|
21
|
+
if (fs.existsSync(readmeSource)) {
|
|
22
|
+
fs.copyFileSync(readmeSource, readmeDest);
|
|
23
|
+
console.log(`[SEOSONA BUILD] Copied README.md into cli/`);
|
|
24
|
+
}
|
package/src/localInit.js
CHANGED
|
@@ -4,9 +4,30 @@ const os = require('os');
|
|
|
4
4
|
const { getSoulContent, getAppDataPath, colors } = require('./utils');
|
|
5
5
|
|
|
6
6
|
function runInit() {
|
|
7
|
+
const cwd = process.cwd();
|
|
8
|
+
|
|
9
|
+
// ============================================================
|
|
10
|
+
// SELF-INJECTION GUARD
|
|
11
|
+
// Prevent running `seosona init` inside the SEOSONA OS source
|
|
12
|
+
// repo itself. This would create rule files in cli/, repos/, etc.
|
|
13
|
+
// ============================================================
|
|
14
|
+
const isSeosonaSourceRepo = fs.existsSync(path.join(cwd, '1_CORE', 'SOUL.md'));
|
|
15
|
+
if (isSeosonaSourceRepo) {
|
|
16
|
+
console.log("");
|
|
17
|
+
console.log(colors.yellow("[SEOSONA] WARNING: Self-injection detected and blocked."));
|
|
18
|
+
console.log(colors.yellow(" You are running `seosona init` inside the SEOSONA OS"));
|
|
19
|
+
console.log(colors.yellow(" source repository. This is not allowed."));
|
|
20
|
+
console.log("");
|
|
21
|
+
console.log(" Run `seosona init` inside your OWN project folder instead:");
|
|
22
|
+
console.log(" > cd /path/to/your-project");
|
|
23
|
+
console.log(" > seosona init");
|
|
24
|
+
console.log("");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
7
28
|
console.log("");
|
|
8
29
|
console.log(colors.cyan("[SEOSONA] Binding project to SEOSONA OS..."));
|
|
9
|
-
console.log(colors.cyan(` Target : ${
|
|
30
|
+
console.log(colors.cyan(` Target : ${cwd}`));
|
|
10
31
|
|
|
11
32
|
const soulContent = getSoulContent();
|
|
12
33
|
const globalPrompt = `You are the SEOSONA Master System. Your core directives are below:\n\n${soulContent}`;
|
|
@@ -27,14 +48,13 @@ function runInit() {
|
|
|
27
48
|
filesToCreate.push(".roomodes");
|
|
28
49
|
}
|
|
29
50
|
|
|
30
|
-
// 3. CLIs
|
|
31
|
-
// We'll just assume they might have Aider if they have .aider.conf.yml globally
|
|
51
|
+
// 3. CLIs
|
|
32
52
|
if (fs.existsSync(path.join(home, ".aider.conf.yml"))) filesToCreate.push(".aider.conf.yml");
|
|
33
53
|
|
|
34
54
|
// 4. OpenInterpreter
|
|
35
55
|
if (fs.existsSync(path.join(appData, "Open Interpreter"))) filesToCreate.push(".openinterpreter");
|
|
36
56
|
|
|
37
|
-
// 5. Antigravity IDE
|
|
57
|
+
// 5. Antigravity IDE (always inject)
|
|
38
58
|
filesToCreate.push(".antigravityrules");
|
|
39
59
|
|
|
40
60
|
// 6. Project-specific Subfolders
|
|
@@ -44,7 +64,7 @@ function runInit() {
|
|
|
44
64
|
if (fs.existsSync(".lovable")) filesToCreate.push(path.join(".lovable", "prompt"));
|
|
45
65
|
|
|
46
66
|
filesToCreate.forEach(file => {
|
|
47
|
-
const fullPath = path.join(
|
|
67
|
+
const fullPath = path.join(cwd, file);
|
|
48
68
|
const dir = path.dirname(fullPath);
|
|
49
69
|
|
|
50
70
|
if (!fs.existsSync(dir)) {
|