shark-ai 0.0.2 → 0.2.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/CHANGELOG.md +63 -63
- package/LICENSE +21 -21
- package/README.en.md +349 -349
- package/README.md +349 -349
- package/dist/bin/shark.js +60 -93
- package/dist/bin/shark.js.map +1 -1
- package/dist/{chunk-B7PNFPUX.js → chunk-R3MIUNVD.js} +402 -220
- package/dist/chunk-R3MIUNVD.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +83 -85
- package/dist/chunk-B7PNFPUX.js.map +0 -1
package/README.en.md
CHANGED
|
@@ -1,349 +1,349 @@
|
|
|
1
|
-
# 🦈 Shark AI
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
7
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
8
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
9
|
-
⢠⣾⣿⣏⠉⠉⠉⠉⠉⠉⢡⣶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⡄⠀
|
|
10
|
-
⠈⣿⣿⣿⣿⣦⣽⣦⡀⠀⠀⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⠀⠀
|
|
11
|
-
⠀⠘⢿⣿⣿⣿⣿⣿⣿⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⠇⠀⠀
|
|
12
|
-
⠀⠀⠈⠻⣿⣿⣿⣿⡟⢿⠻⠛⠙⠉⠋⠛⠳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⡟⠀⠀⠀
|
|
13
|
-
⠀⠀⠀⠀⠈⠙⢿⡇⣠⣤⣶⣶⣾⡉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣰⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠾⢇⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⠃⠀⠀⠀
|
|
14
|
-
⠀⠀⠀⠀⠀⠀⠀⠱⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠤⢤⣀⣀⣀⣀⣀⣀⣠⣤⣤⣤⣬⣭⣿⣿⠀⠀⠀⠀
|
|
15
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣀⣠⣴⣾⣿⣿⣿⣷⣤⣀⡀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣾⣿⣿⣿⣿⡿⠿⠛⠛⠻⣿⣿⣿⣿⣇⠀⠀⠀
|
|
16
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣤⣤⣘⡛⠿⢿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣦⠀⠀
|
|
17
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⡄⠀
|
|
18
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⠿⠛⠉⠁⠀⠈⠉⠙⠛⠛⠻⠿⠿⠿⠿⠟⠛⠃⠀⠀⠀⠉⠉⠉⠛⠛⠛⠿⠿⠿⣶⣦⣄⡀⠀⠀⠀⠀⠀⠈⠙⠛⠂
|
|
19
|
-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀
|
|
20
|
-
|
|
21
|
-
____ _ _ _ ____ _ __ _ ___
|
|
22
|
-
/ ___|| | | | / \ | _ \| |/ / / \ |_ _|
|
|
23
|
-
\___ \| |_| |/ _ \ | |_) | ' / / _ \ | |
|
|
24
|
-
___) | _ / ___ \| _ <| . \ / ___ \ | |
|
|
25
|
-
|____/|_| |_/_/ \_\_| \_\_|\_\ /_/ \_\___|
|
|
26
|
-
|
|
27
|
-
AI-Native Collaborative Development Tool
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**AI-Native Collaborative Development Tool**
|
|
32
|
-
|
|
33
|
-
*Transform AI chaos into a structured and transparent process*
|
|
34
|
-
|
|
35
|
-
[](https://www.npmjs.com/package/shark-ai)
|
|
36
|
-
[](https://opensource.org/licenses/MIT)
|
|
37
|
-
[](https://nodejs.org/)
|
|
38
|
-
|
|
39
|
-
**English** | [Português](./README.md)
|
|
40
|
-
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## 🎯 What is Shark AI?
|
|
46
|
-
|
|
47
|
-
**Shark AI** is an open-source command-line tool that elevates AI-assisted development to a new level through a **collaborative, structured, and persistent workflow**.
|
|
48
|
-
|
|
49
|
-
Shark AI **amplifies your capabilities** by orchestrating a pipeline of specialized agents (Business Analyst, Specification, Architect, Developer) natively integrated with **StackSpot AI**, keeping you always in control of critical decisions.
|
|
50
|
-
|
|
51
|
-
### 💡 Inspiration: BMAD Method
|
|
52
|
-
|
|
53
|
-
The heart of Shark AI is inspired by **[BMAD (Business Model Agile Development)](https://github.com/bmad-method)** - a structured methodology for agile development with AI. Shark AI adapts BMAD principles to create a CLI that keeps developers in control while AI does the heavy lifting.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## ✨ Key Features
|
|
58
|
-
|
|
59
|
-
### 🤝 Smart Human-in-the-Loop
|
|
60
|
-
Structured collaboration where **you approve** critical architecture and design decisions while AI executes repetitive tasks.
|
|
61
|
-
|
|
62
|
-
### 📁 State Persistence
|
|
63
|
-
Maintains a living workflow file (`shark-workflow.json`) that tracks progress step by step. **Pause and resume** work between sessions without losing context.
|
|
64
|
-
|
|
65
|
-
### 🔗 StackSpot AI Native Integration
|
|
66
|
-
Direct access to **Knowledge Sources** and company standards, ensuring generated code automatically follows corporate guidelines.
|
|
67
|
-
|
|
68
|
-
### 🔄 Real Auto-Healing
|
|
69
|
-
Autonomous feedback loops that run builds, detect errors, and **automatically fix them** (up to 5 attempts) before requesting your intervention.
|
|
70
|
-
|
|
71
|
-
### 🎨 Rich Terminal Interface
|
|
72
|
-
TUI (Text User Interface) with interactive menus, colors, spinners, and visual feedback for a premium terminal experience.
|
|
73
|
-
|
|
74
|
-
### 🧠 Multi-Agent Orchestration
|
|
75
|
-
Complete development pipeline:
|
|
76
|
-
```
|
|
77
|
-
Business Analyst → Specification → Architecture → Development
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## 🚀 Installation
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npm install -g shark-ai
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Requirements:**
|
|
89
|
-
- Node.js >= 20.0.0
|
|
90
|
-
- StackSpot AI Account (for authentication)
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## ⚡ Quick Start
|
|
95
|
-
|
|
96
|
-
### 1. Authenticate with StackSpot
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
shark login
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Your browser will open automatically for OAuth authentication. Tokens are securely stored in your operating system keychain.
|
|
103
|
-
|
|
104
|
-
### 2. Initialize a Project
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
shark init
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Shark AI will ask:
|
|
111
|
-
- Which stack are you using? (React, Next.js, Angular)
|
|
112
|
-
- New workflow or continue existing?
|
|
113
|
-
- What do you want to build?
|
|
114
|
-
|
|
115
|
-
### 3. Let the Agents Work
|
|
116
|
-
|
|
117
|
-
Shark will automatically orchestrate:
|
|
118
|
-
|
|
119
|
-
1. **Business Analyst Agent** → Understands your requirements and creates a briefing
|
|
120
|
-
2. **Specification Agent** → Transforms briefing into technical specification
|
|
121
|
-
3. **Architect Agent** → Designs the solution architecture
|
|
122
|
-
4. **Developer Agent** → Generates code and runs tests
|
|
123
|
-
|
|
124
|
-
**You approve each critical step.** AI executes, you decide.
|
|
125
|
-
|
|
126
|
-
### 4. Auto-Healing in Action
|
|
127
|
-
|
|
128
|
-
If there are build or lint errors, Shark:
|
|
129
|
-
1. Automatically runs build/test
|
|
130
|
-
2. Captures the error (stderr)
|
|
131
|
-
3. Sends it to Developer Agent to fix
|
|
132
|
-
4. Tries again (up to 5x)
|
|
133
|
-
5. If it fails, asks for your help
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 📚 Available Commands
|
|
138
|
-
|
|
139
|
-
### `shark login`
|
|
140
|
-
Authenticates with StackSpot AI via OAuth 2.0.
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
shark login
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### `shark init`
|
|
147
|
-
Initializes a new workflow or resumes an existing one.
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
shark init
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Shark automatically detects if there's a workflow in progress and offers options to:
|
|
154
|
-
- Continue where you left off
|
|
155
|
-
- Start a new workflow
|
|
156
|
-
- View current progress
|
|
157
|
-
|
|
158
|
-
### `shark config`
|
|
159
|
-
Manages Shark AI global settings.
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
shark config
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Opens an interactive menu to configure:
|
|
166
|
-
- API tokens
|
|
167
|
-
- Interface preferences
|
|
168
|
-
- Default project settings
|
|
169
|
-
|
|
170
|
-
### `shark ba`
|
|
171
|
-
Starts an interactive session with the **Business Analyst Agent**.
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
shark ba
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Use when you want to:
|
|
178
|
-
- Refine business requirements
|
|
179
|
-
- Create detailed briefings
|
|
180
|
-
- Validate acceptance criteria
|
|
181
|
-
|
|
182
|
-
### `shark spec`
|
|
183
|
-
Starts the **Specification Agent** to create technical specifications.
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
shark spec [--briefing <path>]
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Options:**
|
|
190
|
-
- `--briefing`: Path to existing briefing file
|
|
191
|
-
- `--id`: Custom agent ID
|
|
192
|
-
|
|
193
|
-
### `shark dev`
|
|
194
|
-
Activates the **Developer Agent** for code generation.
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
shark dev
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### `shark qa`
|
|
201
|
-
Runs the **QA Agent** for testing and validation.
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
shark qa
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### `shark scan`
|
|
208
|
-
Scans the current project and analyzes its structure.
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
shark scan
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
## 🎯 Use Cases
|
|
217
|
-
|
|
218
|
-
### 👨💼 Carlos - Senior Developer
|
|
219
|
-
**Situation:** Needs to create a complex financial statement module but was interrupted for a meeting.
|
|
220
|
-
|
|
221
|
-
**With Shark AI:**
|
|
222
|
-
1. Starts `shark init`, describes the module
|
|
223
|
-
2. Approves architecture proposed by Architect Agent
|
|
224
|
-
3. **Leaves for meeting** (closes terminal)
|
|
225
|
-
4. Returns 2 hours later, runs `shark init` again
|
|
226
|
-
5. **Shark resumes exactly where it left off** - zero context lost
|
|
227
|
-
6. Developer Agent completes implementation
|
|
228
|
-
|
|
229
|
-
**Result:** Module ready in < 1 hour of real work vs 4-6 hours manually.
|
|
230
|
-
|
|
231
|
-
### 👩💻 Julia - Junior Developer
|
|
232
|
-
**Situation:** First time optimizing dashboard performance.
|
|
233
|
-
|
|
234
|
-
**With Shark AI:**
|
|
235
|
-
1. `shark ba` - Business Analyst explains performance metrics (LCP, FID)
|
|
236
|
-
2. `shark spec` - Specification Agent defines measurable targets
|
|
237
|
-
3. During development, Auto-Healing fixes an infinite loop in `useEffect`
|
|
238
|
-
4. **Julia learns** by reading diffs and AI explanations
|
|
239
|
-
|
|
240
|
-
**Result:** Optimized feature + real learning about Web Vitals.
|
|
241
|
-
|
|
242
|
-
### 👩💼 Ana - Tech Lead
|
|
243
|
-
**Situation:** Ensure entire team follows new backend standards.
|
|
244
|
-
|
|
245
|
-
**With Shark AI:**
|
|
246
|
-
1. Updates "Backend Standards" document in StackSpot Knowledge Source
|
|
247
|
-
2. **Doesn't need to notify anyone**
|
|
248
|
-
3. When Carlos and Julia run Shark, agents consult updated Knowledge Source
|
|
249
|
-
4. Generated code already follows new standards
|
|
250
|
-
|
|
251
|
-
**Result:** 100% compliance + PRs approved quickly.
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
## 🏗️ Architecture
|
|
256
|
-
|
|
257
|
-
### Agent Pipeline
|
|
258
|
-
|
|
259
|
-
```mermaid
|
|
260
|
-
graph LR
|
|
261
|
-
A[shark init] --> B[Business Analyst]
|
|
262
|
-
B --> C[Specification Agent]
|
|
263
|
-
C --> D[Architect Agent]
|
|
264
|
-
D --> E[Developer Agent]
|
|
265
|
-
E --> F{Build OK?}
|
|
266
|
-
F -->|Yes| G[✅ Done]
|
|
267
|
-
F -->|No| H[Auto-Healing]
|
|
268
|
-
H --> E
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### State Persistence
|
|
272
|
-
|
|
273
|
-
The `shark-workflow.json` file stores:
|
|
274
|
-
- History of all decisions
|
|
275
|
-
- Current pipeline state
|
|
276
|
-
- Artifacts generated by each agent
|
|
277
|
-
- Session context
|
|
278
|
-
|
|
279
|
-
**You can pause and resume at any time.**
|
|
280
|
-
|
|
281
|
-
### StackSpot Integration
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
┌─────────────┐
|
|
285
|
-
│ Shark CLI │
|
|
286
|
-
└──────┬──────┘
|
|
287
|
-
│
|
|
288
|
-
├──► StackSpot AI API
|
|
289
|
-
│ (Agents)
|
|
290
|
-
│
|
|
291
|
-
└──► Knowledge Sources
|
|
292
|
-
(Company Standards)
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
## 🔒 Security
|
|
298
|
-
|
|
299
|
-
- ✅ **Tokens securely stored** using OS keychain
|
|
300
|
-
- ✅ **Zero code leakage** - communication restricted to StackSpot API (SOC2 compliant)
|
|
301
|
-
- ✅ **Sensitive files protected** - `.gitignore` configured to prevent committing secrets
|
|
302
|
-
- ✅ **OAuth 2.0** for secure authentication
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## 🤝 Contributing
|
|
307
|
-
|
|
308
|
-
Contributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on:
|
|
309
|
-
- How to report bugs
|
|
310
|
-
- How to suggest features
|
|
311
|
-
- Pull Request process
|
|
312
|
-
- Coding standards
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## 📝 Changelog
|
|
317
|
-
|
|
318
|
-
See [CHANGELOG.md](./CHANGELOG.md) for version history and changes.
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## 📄 License
|
|
323
|
-
|
|
324
|
-
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
## 💬 Support
|
|
329
|
-
|
|
330
|
-
- **Issues:** [GitHub Issues](https://github.com/miguelarcjr/shark-ai/issues)
|
|
331
|
-
- **Discussions:** [GitHub Discussions](https://github.com/miguelarcjr/shark-ai/discussions)
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
## 🙏 Acknowledgments
|
|
336
|
-
|
|
337
|
-
- **[BMAD Method](https://github.com/bmad-method)** - Methodological inspiration
|
|
338
|
-
- **[StackSpot AI](https://stackspot.com)** - AI agents platform
|
|
339
|
-
- **Open Source Community** - For making all this possible
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
<div align="center">
|
|
344
|
-
|
|
345
|
-
**Made with ❤️ by [Miguel Arcangelo](https://github.com/miguelarcjr)**
|
|
346
|
-
|
|
347
|
-
If Shark AI helped you, consider giving the project a ⭐!
|
|
348
|
-
|
|
349
|
-
</div>
|
|
1
|
+
# 🦈 Shark AI
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
7
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
8
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
9
|
+
⢠⣾⣿⣏⠉⠉⠉⠉⠉⠉⢡⣶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⡄⠀
|
|
10
|
+
⠈⣿⣿⣿⣿⣦⣽⣦⡀⠀⠀⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⠀⠀
|
|
11
|
+
⠀⠘⢿⣿⣿⣿⣿⣿⣿⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⠇⠀⠀
|
|
12
|
+
⠀⠀⠈⠻⣿⣿⣿⣿⡟⢿⠻⠛⠙⠉⠋⠛⠳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⡟⠀⠀⠀
|
|
13
|
+
⠀⠀⠀⠀⠈⠙⢿⡇⣠⣤⣶⣶⣾⡉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣰⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠾⢇⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⠃⠀⠀⠀
|
|
14
|
+
⠀⠀⠀⠀⠀⠀⠀⠱⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠤⢤⣀⣀⣀⣀⣀⣀⣠⣤⣤⣤⣬⣭⣿⣿⠀⠀⠀⠀
|
|
15
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣀⣠⣴⣾⣿⣿⣿⣷⣤⣀⡀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣾⣿⣿⣿⣿⡿⠿⠛⠛⠻⣿⣿⣿⣿⣇⠀⠀⠀
|
|
16
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣤⣤⣘⡛⠿⢿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣦⠀⠀
|
|
17
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⡄⠀
|
|
18
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⠿⠛⠉⠁⠀⠈⠉⠙⠛⠛⠻⠿⠿⠿⠿⠟⠛⠃⠀⠀⠀⠉⠉⠉⠛⠛⠛⠿⠿⠿⣶⣦⣄⡀⠀⠀⠀⠀⠀⠈⠙⠛⠂
|
|
19
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀
|
|
20
|
+
|
|
21
|
+
____ _ _ _ ____ _ __ _ ___
|
|
22
|
+
/ ___|| | | | / \ | _ \| |/ / / \ |_ _|
|
|
23
|
+
\___ \| |_| |/ _ \ | |_) | ' / / _ \ | |
|
|
24
|
+
___) | _ / ___ \| _ <| . \ / ___ \ | |
|
|
25
|
+
|____/|_| |_/_/ \_\_| \_\_|\_\ /_/ \_\___|
|
|
26
|
+
|
|
27
|
+
AI-Native Collaborative Development Tool
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**AI-Native Collaborative Development Tool**
|
|
32
|
+
|
|
33
|
+
*Transform AI chaos into a structured and transparent process*
|
|
34
|
+
|
|
35
|
+
[](https://www.npmjs.com/package/shark-ai)
|
|
36
|
+
[](https://opensource.org/licenses/MIT)
|
|
37
|
+
[](https://nodejs.org/)
|
|
38
|
+
|
|
39
|
+
**English** | [Português](./README.md)
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🎯 What is Shark AI?
|
|
46
|
+
|
|
47
|
+
**Shark AI** is an open-source command-line tool that elevates AI-assisted development to a new level through a **collaborative, structured, and persistent workflow**.
|
|
48
|
+
|
|
49
|
+
Shark AI **amplifies your capabilities** by orchestrating a pipeline of specialized agents (Business Analyst, Specification, Architect, Developer) natively integrated with **StackSpot AI**, keeping you always in control of critical decisions.
|
|
50
|
+
|
|
51
|
+
### 💡 Inspiration: BMAD Method
|
|
52
|
+
|
|
53
|
+
The heart of Shark AI is inspired by **[BMAD (Business Model Agile Development)](https://github.com/bmad-method)** - a structured methodology for agile development with AI. Shark AI adapts BMAD principles to create a CLI that keeps developers in control while AI does the heavy lifting.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## ✨ Key Features
|
|
58
|
+
|
|
59
|
+
### 🤝 Smart Human-in-the-Loop
|
|
60
|
+
Structured collaboration where **you approve** critical architecture and design decisions while AI executes repetitive tasks.
|
|
61
|
+
|
|
62
|
+
### 📁 State Persistence
|
|
63
|
+
Maintains a living workflow file (`shark-workflow.json`) that tracks progress step by step. **Pause and resume** work between sessions without losing context.
|
|
64
|
+
|
|
65
|
+
### 🔗 StackSpot AI Native Integration
|
|
66
|
+
Direct access to **Knowledge Sources** and company standards, ensuring generated code automatically follows corporate guidelines.
|
|
67
|
+
|
|
68
|
+
### 🔄 Real Auto-Healing
|
|
69
|
+
Autonomous feedback loops that run builds, detect errors, and **automatically fix them** (up to 5 attempts) before requesting your intervention.
|
|
70
|
+
|
|
71
|
+
### 🎨 Rich Terminal Interface
|
|
72
|
+
TUI (Text User Interface) with interactive menus, colors, spinners, and visual feedback for a premium terminal experience.
|
|
73
|
+
|
|
74
|
+
### 🧠 Multi-Agent Orchestration
|
|
75
|
+
Complete development pipeline:
|
|
76
|
+
```
|
|
77
|
+
Business Analyst → Specification → Architecture → Development
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🚀 Installation
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install -g shark-ai
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Requirements:**
|
|
89
|
+
- Node.js >= 20.0.0
|
|
90
|
+
- StackSpot AI Account (for authentication)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## ⚡ Quick Start
|
|
95
|
+
|
|
96
|
+
### 1. Authenticate with StackSpot
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
shark login
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Your browser will open automatically for OAuth authentication. Tokens are securely stored in your operating system keychain.
|
|
103
|
+
|
|
104
|
+
### 2. Initialize a Project
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
shark init
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Shark AI will ask:
|
|
111
|
+
- Which stack are you using? (React, Next.js, Angular)
|
|
112
|
+
- New workflow or continue existing?
|
|
113
|
+
- What do you want to build?
|
|
114
|
+
|
|
115
|
+
### 3. Let the Agents Work
|
|
116
|
+
|
|
117
|
+
Shark will automatically orchestrate:
|
|
118
|
+
|
|
119
|
+
1. **Business Analyst Agent** → Understands your requirements and creates a briefing
|
|
120
|
+
2. **Specification Agent** → Transforms briefing into technical specification
|
|
121
|
+
3. **Architect Agent** → Designs the solution architecture
|
|
122
|
+
4. **Developer Agent** → Generates code and runs tests
|
|
123
|
+
|
|
124
|
+
**You approve each critical step.** AI executes, you decide.
|
|
125
|
+
|
|
126
|
+
### 4. Auto-Healing in Action
|
|
127
|
+
|
|
128
|
+
If there are build or lint errors, Shark:
|
|
129
|
+
1. Automatically runs build/test
|
|
130
|
+
2. Captures the error (stderr)
|
|
131
|
+
3. Sends it to Developer Agent to fix
|
|
132
|
+
4. Tries again (up to 5x)
|
|
133
|
+
5. If it fails, asks for your help
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 📚 Available Commands
|
|
138
|
+
|
|
139
|
+
### `shark login`
|
|
140
|
+
Authenticates with StackSpot AI via OAuth 2.0.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
shark login
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### `shark init`
|
|
147
|
+
Initializes a new workflow or resumes an existing one.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
shark init
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Shark automatically detects if there's a workflow in progress and offers options to:
|
|
154
|
+
- Continue where you left off
|
|
155
|
+
- Start a new workflow
|
|
156
|
+
- View current progress
|
|
157
|
+
|
|
158
|
+
### `shark config`
|
|
159
|
+
Manages Shark AI global settings.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
shark config
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Opens an interactive menu to configure:
|
|
166
|
+
- API tokens
|
|
167
|
+
- Interface preferences
|
|
168
|
+
- Default project settings
|
|
169
|
+
|
|
170
|
+
### `shark ba`
|
|
171
|
+
Starts an interactive session with the **Business Analyst Agent**.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
shark ba
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Use when you want to:
|
|
178
|
+
- Refine business requirements
|
|
179
|
+
- Create detailed briefings
|
|
180
|
+
- Validate acceptance criteria
|
|
181
|
+
|
|
182
|
+
### `shark spec`
|
|
183
|
+
Starts the **Specification Agent** to create technical specifications.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
shark spec [--briefing <path>]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Options:**
|
|
190
|
+
- `--briefing`: Path to existing briefing file
|
|
191
|
+
- `--id`: Custom agent ID
|
|
192
|
+
|
|
193
|
+
### `shark dev`
|
|
194
|
+
Activates the **Developer Agent** for code generation.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
shark dev
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### `shark qa`
|
|
201
|
+
Runs the **QA Agent** for testing and validation.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
shark qa
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### `shark scan`
|
|
208
|
+
Scans the current project and analyzes its structure.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
shark scan
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 🎯 Use Cases
|
|
217
|
+
|
|
218
|
+
### 👨💼 Carlos - Senior Developer
|
|
219
|
+
**Situation:** Needs to create a complex financial statement module but was interrupted for a meeting.
|
|
220
|
+
|
|
221
|
+
**With Shark AI:**
|
|
222
|
+
1. Starts `shark init`, describes the module
|
|
223
|
+
2. Approves architecture proposed by Architect Agent
|
|
224
|
+
3. **Leaves for meeting** (closes terminal)
|
|
225
|
+
4. Returns 2 hours later, runs `shark init` again
|
|
226
|
+
5. **Shark resumes exactly where it left off** - zero context lost
|
|
227
|
+
6. Developer Agent completes implementation
|
|
228
|
+
|
|
229
|
+
**Result:** Module ready in < 1 hour of real work vs 4-6 hours manually.
|
|
230
|
+
|
|
231
|
+
### 👩💻 Julia - Junior Developer
|
|
232
|
+
**Situation:** First time optimizing dashboard performance.
|
|
233
|
+
|
|
234
|
+
**With Shark AI:**
|
|
235
|
+
1. `shark ba` - Business Analyst explains performance metrics (LCP, FID)
|
|
236
|
+
2. `shark spec` - Specification Agent defines measurable targets
|
|
237
|
+
3. During development, Auto-Healing fixes an infinite loop in `useEffect`
|
|
238
|
+
4. **Julia learns** by reading diffs and AI explanations
|
|
239
|
+
|
|
240
|
+
**Result:** Optimized feature + real learning about Web Vitals.
|
|
241
|
+
|
|
242
|
+
### 👩💼 Ana - Tech Lead
|
|
243
|
+
**Situation:** Ensure entire team follows new backend standards.
|
|
244
|
+
|
|
245
|
+
**With Shark AI:**
|
|
246
|
+
1. Updates "Backend Standards" document in StackSpot Knowledge Source
|
|
247
|
+
2. **Doesn't need to notify anyone**
|
|
248
|
+
3. When Carlos and Julia run Shark, agents consult updated Knowledge Source
|
|
249
|
+
4. Generated code already follows new standards
|
|
250
|
+
|
|
251
|
+
**Result:** 100% compliance + PRs approved quickly.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## 🏗️ Architecture
|
|
256
|
+
|
|
257
|
+
### Agent Pipeline
|
|
258
|
+
|
|
259
|
+
```mermaid
|
|
260
|
+
graph LR
|
|
261
|
+
A[shark init] --> B[Business Analyst]
|
|
262
|
+
B --> C[Specification Agent]
|
|
263
|
+
C --> D[Architect Agent]
|
|
264
|
+
D --> E[Developer Agent]
|
|
265
|
+
E --> F{Build OK?}
|
|
266
|
+
F -->|Yes| G[✅ Done]
|
|
267
|
+
F -->|No| H[Auto-Healing]
|
|
268
|
+
H --> E
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### State Persistence
|
|
272
|
+
|
|
273
|
+
The `shark-workflow.json` file stores:
|
|
274
|
+
- History of all decisions
|
|
275
|
+
- Current pipeline state
|
|
276
|
+
- Artifacts generated by each agent
|
|
277
|
+
- Session context
|
|
278
|
+
|
|
279
|
+
**You can pause and resume at any time.**
|
|
280
|
+
|
|
281
|
+
### StackSpot Integration
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
┌─────────────┐
|
|
285
|
+
│ Shark CLI │
|
|
286
|
+
└──────┬──────┘
|
|
287
|
+
│
|
|
288
|
+
├──► StackSpot AI API
|
|
289
|
+
│ (Agents)
|
|
290
|
+
│
|
|
291
|
+
└──► Knowledge Sources
|
|
292
|
+
(Company Standards)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 🔒 Security
|
|
298
|
+
|
|
299
|
+
- ✅ **Tokens securely stored** using OS keychain
|
|
300
|
+
- ✅ **Zero code leakage** - communication restricted to StackSpot API (SOC2 compliant)
|
|
301
|
+
- ✅ **Sensitive files protected** - `.gitignore` configured to prevent committing secrets
|
|
302
|
+
- ✅ **OAuth 2.0** for secure authentication
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 🤝 Contributing
|
|
307
|
+
|
|
308
|
+
Contributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on:
|
|
309
|
+
- How to report bugs
|
|
310
|
+
- How to suggest features
|
|
311
|
+
- Pull Request process
|
|
312
|
+
- Coding standards
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## 📝 Changelog
|
|
317
|
+
|
|
318
|
+
See [CHANGELOG.md](./CHANGELOG.md) for version history and changes.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## 📄 License
|
|
323
|
+
|
|
324
|
+
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## 💬 Support
|
|
329
|
+
|
|
330
|
+
- **Issues:** [GitHub Issues](https://github.com/miguelarcjr/shark-ai/issues)
|
|
331
|
+
- **Discussions:** [GitHub Discussions](https://github.com/miguelarcjr/shark-ai/discussions)
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## 🙏 Acknowledgments
|
|
336
|
+
|
|
337
|
+
- **[BMAD Method](https://github.com/bmad-method)** - Methodological inspiration
|
|
338
|
+
- **[StackSpot AI](https://stackspot.com)** - AI agents platform
|
|
339
|
+
- **Open Source Community** - For making all this possible
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
<div align="center">
|
|
344
|
+
|
|
345
|
+
**Made with ❤️ by [Miguel Arcangelo](https://github.com/miguelarcjr)**
|
|
346
|
+
|
|
347
|
+
If Shark AI helped you, consider giving the project a ⭐!
|
|
348
|
+
|
|
349
|
+
</div>
|