anchi-kit 1.1.4 → 1.1.7
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/.cursor/commands/do.md +43 -372
- package/ANTIGRAVITY.md +92 -52
- package/README.md +1 -1
- package/docs/ROADMAP.md +5 -2
- package/package.json +1 -1
- package/src/commands/init.js +20 -70
package/.cursor/commands/do.md
CHANGED
|
@@ -1,403 +1,74 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: ⚡ The Universal Command - Just say what you want
|
|
3
3
|
argument-hint: [what you want to do]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /do - Universal
|
|
6
|
+
# /do - Universal Execution
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**One command to rule them all.**
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 🎯 Core Logic (Follow Strictly)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
/do "Add user login with Google OAuth"
|
|
14
|
-
/do "Fix the checkout bug"
|
|
15
|
-
/do "Refactor the API layer"
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## 💰 Model Selection (Cost Optimization)
|
|
21
|
-
|
|
22
|
-
| Task Type | Recommended Model | Cost | When |
|
|
23
|
-
| ------------------------------- | ------------------ | --------- | -------------- |
|
|
24
|
-
| **Simple** (typo, rename) | GPT-5.1 Codex Mini | 💚 Low | Quick fixes |
|
|
25
|
-
| **Medium** (feature, fix) | Sonnet 4.5 | 💛 Medium | Standard dev |
|
|
26
|
-
| **Complex** (architecture) | Opus 4.5 | 🔴 High | Deep reasoning |
|
|
27
|
-
| **Large codebase** (>200 files) | Gemini 3 Flash | 💚 Low | Big context |
|
|
28
|
-
|
|
29
|
-
### Auto-Detection Logic
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
/do "fix typo" → GPT-5.1 Codex Mini (cheap)
|
|
33
|
-
/do "add login page" → Sonnet 4.5 (standard)
|
|
34
|
-
/do "refactor architecture" → Opus 4.5 (complex)
|
|
35
|
-
/do --fast "quick change" → GPT-5.1 Codex Mini (speed)
|
|
36
|
-
/do --careful "payment" → Opus 4.5 (accuracy)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## How It Works
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
45
|
-
│ 🎯 /do - SMART ROUTING │
|
|
46
|
-
├─────────────────────────────────────────────────────────────┤
|
|
47
|
-
│ │
|
|
48
|
-
│ INPUT: "Add user login with Google OAuth" │
|
|
49
|
-
│ ↓ │
|
|
50
|
-
│ AI ANALYSIS: │
|
|
51
|
-
│ ├── Is it a BUG? → Fix mode │
|
|
52
|
-
│ ├── Is it NEW FEATURE? → Plan + Implement │
|
|
53
|
-
│ ├── Is it SIMPLE? → Direct implement │
|
|
54
|
-
│ └── Is it COMPLEX? → Multi-phase with reviews │
|
|
55
|
-
│ ↓ │
|
|
56
|
-
│ AUTO WORKFLOW: │
|
|
57
|
-
│ [1] Active Memory Load (Context-Aware) │
|
|
58
|
-
│ [2] Scout codebase (/scout) │
|
|
59
|
-
│ [3] Plan (Parallel Workstreams if needed) │
|
|
60
|
-
│ [4] Interactive Check (if --interactive) │
|
|
61
|
-
│ [5] Implement │
|
|
62
|
-
│ [6] Fix errors (Interactive Probing) │
|
|
63
|
-
│ [7] Save context (/memory:save) │
|
|
64
|
-
│ [8] Post-Mortem (if failure) │
|
|
65
|
-
│ ↓ │
|
|
66
|
-
│ ✅ DONE! │
|
|
67
|
-
│ │
|
|
68
|
-
└─────────────────────────────────────────────────────────────┘
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Flags (Optional)
|
|
74
|
-
|
|
75
|
-
| Flag | Effect |
|
|
76
|
-
| --------------- | ---------------------------------------------------- |
|
|
77
|
-
| `--fast` | Skip reviews, quick implementation |
|
|
78
|
-
| `--careful` | Extra validation, more reviews |
|
|
79
|
-
| `--plan-only` | Just create plan, don't implement |
|
|
80
|
-
| `--no-commit` | Don't auto-commit |
|
|
81
|
-
| `--parallel` | Run phases in parallel |
|
|
82
|
-
| `--interactive` | Pause for user input key steps ([C]ontinue/[M]odify) |
|
|
83
|
-
|
|
84
|
-
**Examples:**
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
/do "quick fix typo" --fast
|
|
88
|
-
/do "payment integration" --careful
|
|
89
|
-
/do "complex refactor" --plan-only
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Detection Keywords
|
|
95
|
-
|
|
96
|
-
AI detects mode from your description:
|
|
97
|
-
|
|
98
|
-
| Keywords | Mode |
|
|
99
|
-
| ---------------------------------- | ---------------- |
|
|
100
|
-
| fix, bug, error, broken, issue | 🔧 Fix Mode |
|
|
101
|
-
| add, create, new, implement, build | ✨ Feature Mode |
|
|
102
|
-
| refactor, optimize, improve, clean | ♻️ Refactor Mode |
|
|
103
|
-
| update, change, modify | 📝 Update Mode |
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Output Format (Professional Reporting)
|
|
12
|
+
When User types `/do "Instruction"`, AI must:
|
|
108
13
|
|
|
109
|
-
|
|
14
|
+
1. **🔍 ANALYZE:**
|
|
110
15
|
|
|
111
|
-
|
|
16
|
+
- **Fix Mode:** Keywords like `bug`, `fix`, `error`. -> Focus: `debugger.md`
|
|
17
|
+
- **Feature Mode:** Keywords like `add`, `create`, `implement`. -> Focus: `fullstack-developer.md`
|
|
18
|
+
- **Plan Mode:** Keywords like `plan`, `research`, `design`. -> Focus: `planner.md`
|
|
112
19
|
|
|
113
|
-
|
|
114
|
-
🎯 Goal: Implement Google OAuth
|
|
115
|
-
🤖 Orchestration:
|
|
116
|
-
• Agent: `Fullstack Dev` (+ `Security Auditor` for auth check)
|
|
117
|
-
• Risk: 🛡️ High (Auth modification) - Approved via policy.
|
|
118
|
-
📝 Execution:
|
|
119
|
-
• Created `src/services/auth.service.ts`
|
|
120
|
-
• Updated `src/pages/login.tsx`
|
|
121
|
-
✅ Result: Authentication flow implemented and verified.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### ⚠️ Risk/Approval Case
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
🎯 Task: Delete user database table
|
|
128
|
-
⚠️ RISK: Critical (Data Loss)
|
|
129
|
-
❓ Approval Required: This will wipe production data.
|
|
130
|
-
👉 [Y]es / [N]o ?
|
|
131
|
-
```
|
|
20
|
+
2. **🔇 SILENCE PROTOCOL:**
|
|
132
21
|
|
|
133
|
-
|
|
22
|
+
- **DO NOT** chat. **DO NOT** explain the plan.
|
|
23
|
+
- **DO NOT** say "I will now...".
|
|
24
|
+
- **DIRECTLY** execute the necessary tool calls.
|
|
134
25
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
❌ Failed: Could not resolve dependency `better-auth`.
|
|
138
|
-
🔍 Analysis: Package version mismatch.
|
|
139
|
-
💡 Suggestion: Run `npm install better-auth@latest`
|
|
140
|
-
```
|
|
26
|
+
3. **🔊 REPORTING:**
|
|
27
|
+
- ONLY when tools are done, use the **Mission Control** format to summarize.
|
|
141
28
|
|
|
142
29
|
---
|
|
143
30
|
|
|
144
|
-
##
|
|
145
|
-
|
|
146
|
-
### 🔧 Fix Mode
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
/do "Fix the login button not working"
|
|
150
|
-
|
|
151
|
-
[AUTO] Analyze error
|
|
152
|
-
[AUTO] Find root cause
|
|
153
|
-
[AUTO] Apply fix
|
|
154
|
-
[AUTO] Verify fix
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### ✨ Feature Mode
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
/do "Add user dashboard"
|
|
161
|
-
|
|
162
|
-
[AUTO] Plan feature
|
|
163
|
-
[AUTO] Generate structure
|
|
164
|
-
[AUTO] Implement
|
|
165
|
-
[AUTO] Add tests (if --careful)
|
|
166
|
-
```
|
|
31
|
+
## ⚡ Examples
|
|
167
32
|
|
|
168
|
-
###
|
|
33
|
+
### 🔧 Fix a Bug
|
|
169
34
|
|
|
170
|
-
|
|
171
|
-
|
|
35
|
+
User: `/do "Fix login error 500"`
|
|
36
|
+
AI Action:
|
|
172
37
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
```
|
|
38
|
+
1. Call `grep_search` to find error logs.
|
|
39
|
+
2. Call `read_file` to suspect files.
|
|
40
|
+
3. Call `replace_file_content` to fix.
|
|
41
|
+
4. Output Summary.
|
|
178
42
|
|
|
179
|
-
|
|
43
|
+
### ✨ New Feature
|
|
180
44
|
|
|
181
|
-
|
|
45
|
+
User: `/do "Add a contact form"`
|
|
46
|
+
AI Action:
|
|
182
47
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| Professional | Standard + tests |
|
|
187
|
-
| Enterprise | --careful (full reviews) |
|
|
48
|
+
1. Call `list_dir` to check structure.
|
|
49
|
+
2. Call `write_to_file` to create component.
|
|
50
|
+
3. Output Summary.
|
|
188
51
|
|
|
189
52
|
---
|
|
190
53
|
|
|
191
|
-
##
|
|
192
|
-
|
|
193
|
-
### Agents (Auto-Selected Based on Task)
|
|
194
|
-
|
|
195
|
-
| Task Type | Primary Agent | Support Agents |
|
|
196
|
-
| ------------- | ------------------------ | ---------------------------------- |
|
|
197
|
-
| **Feature** | `fullstack-developer.md` | `planner.md`, `brainstormer.md` |
|
|
198
|
-
| **Fix/Debug** | `debugger.md` | `code-reviewer.md` |
|
|
199
|
-
| **Refactor** | `code-reviewer.md` | `fullstack-developer.md` |
|
|
200
|
-
| **UI Work** | `ui-ux-designer.md` | `design-system-architect.md` |
|
|
201
|
-
| **API Work** | `fullstack-developer.md` | `database-admin.md` |
|
|
202
|
-
| **Complex** | `planner.md` | `researcher.md`, `brainstormer.md` |
|
|
203
|
-
|
|
204
|
-
### Skills (Auto-Activated Based on Tech Detection)
|
|
54
|
+
## ⚠️ Safety Implementation
|
|
205
55
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
| React/Next.js | `frontend-development/`, `web-frameworks/` |
|
|
209
|
-
| Node/Express | `backend-development/`, `web-frameworks/` |
|
|
210
|
-
| Prisma/DB | `databases/`, `backend-development/` |
|
|
211
|
-
| Tailwind | `ui-styling/`, `aesthetic/` |
|
|
212
|
-
| TypeScript | `frontend-development/`, `backend-development/` |
|
|
213
|
-
| DDD Pattern | `ddd-modular-monolith/` |
|
|
214
|
-
| Testing | `debugging/`, `code-review/` |
|
|
215
|
-
| AI/ML | `ai-multimodal/`, `advanced-coding/` |
|
|
216
|
-
| Mobile | `mobile-development/` |
|
|
217
|
-
| 3D/Three.js | `threejs/` |
|
|
218
|
-
|
|
219
|
-
### Auto-Activation Logic
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
/do "Add user login"
|
|
223
|
-
|
|
224
|
-
[AUTO-DETECT]
|
|
225
|
-
├── Task: Feature (add keyword)
|
|
226
|
-
├── Tech: Next.js + Prisma detected in project
|
|
227
|
-
│
|
|
228
|
-
[ACTIVATE]
|
|
229
|
-
├── Agents: fullstack-developer, planner
|
|
230
|
-
├── Skills:
|
|
231
|
-
│ ├── frontend-development/
|
|
232
|
-
│ ├── backend-development/
|
|
233
|
-
│ ├── databases/
|
|
234
|
-
│ ├── web-frameworks/
|
|
235
|
-
│ └── better-auth/ (login detected)
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### Mode-Specific Activation
|
|
239
|
-
|
|
240
|
-
| Flag | Additional Agents | Additional Skills |
|
|
241
|
-
| ------------- | ------------------------------- | ---------------------------- |
|
|
242
|
-
| `--careful` | `code-reviewer.md`, `tester.md` | `code-review/`, `debugging/` |
|
|
243
|
-
| `--fast` | (minimal) | (minimal) |
|
|
244
|
-
| `--plan-only` | `planner.md`, `researcher.md` | `planning/`, `research/` |
|
|
56
|
+
- **Risk Check:** If deleting files or changing Auth/Payment -> **ASK USER FIRST**.
|
|
57
|
+
- **Structure:** Follow existing patterns. Do not invent new folder structures.
|
|
245
58
|
|
|
246
59
|
---
|
|
247
60
|
|
|
248
|
-
##
|
|
61
|
+
## 📝 Final Output Template (Mission Control)
|
|
249
62
|
|
|
250
|
-
|
|
251
|
-
/do replaces:
|
|
252
|
-
• /plan, /plan:fast, /plan:hard, /plan:auto, /plan:ci, /plan:cro, /plan:parallel, /plan:two
|
|
253
|
-
• /cook, /cook:auto, /cook:auto:fast, /cook:auto:parallel
|
|
254
|
-
• /fix, /fix:fast, /fix:hard, /fix:types, /fix:ui, /fix:ci, /fix:test, /fix:logs, /fix:parallel
|
|
255
|
-
• /auto:rapid, /auto:pro, /auto:enterprise
|
|
256
|
-
• /code, /code:no-test, /code:parallel
|
|
257
|
-
• /debug
|
|
63
|
+
At the very end, output THIS and ONLY THIS:
|
|
258
64
|
|
|
259
|
-
|
|
65
|
+
```markdown
|
|
66
|
+
📋 /do "User Instruction"
|
|
67
|
+
══════════════════════════════════════
|
|
68
|
+
⚙️ Agent: [Agent Name]
|
|
69
|
+
🛡️ Risk: [Low/High]
|
|
70
|
+
📝 Actions:
|
|
71
|
+
• [Created] src/components/ContactForm.tsx
|
|
72
|
+
• [Modified] src/app/page.tsx
|
|
73
|
+
✅ Result: Contact form added.
|
|
260
74
|
```
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## Configuration
|
|
265
|
-
|
|
266
|
-
```yaml
|
|
267
|
-
do:
|
|
268
|
-
default_mode: auto # auto, fast, careful
|
|
269
|
-
auto_commit: false
|
|
270
|
-
auto_test: true
|
|
271
|
-
show_plan: true
|
|
272
|
-
preset_aware: true
|
|
273
|
-
auto_activate_skills: true
|
|
274
|
-
auto_detect_agents: true
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## 🚀 Advanced Capabilities (New)
|
|
282
|
-
|
|
283
|
-
### 🧠 Active Memory
|
|
284
|
-
|
|
285
|
-
Instead of loading full context, AI now uses **Context-Aware Retrieval**:
|
|
286
|
-
|
|
287
|
-
- **/do matches keywords** → Queries `context.json` specifically for related decisions.
|
|
288
|
-
- **Reduces noise** → Faster processing, higher accuracy.
|
|
289
|
-
|
|
290
|
-
### 🔄 Self-Correction Loop
|
|
291
|
-
|
|
292
|
-
If a task fails repeatedly (>2 times):
|
|
293
|
-
|
|
294
|
-
1. **Post-Mortem Chain** activates.
|
|
295
|
-
2. AI analyzes root cause.
|
|
296
|
-
3. Updates `failure-modes.yaml` with a new rule.
|
|
297
|
-
4. Future tasks will AVOID this same mistake.
|
|
298
|
-
|
|
299
|
-
### 🕵️ Interactive Debugging
|
|
300
|
-
|
|
301
|
-
Debugger agent now has **Probing** capability:
|
|
302
|
-
|
|
303
|
-
1. Inject `console.log` probes.
|
|
304
|
-
2. Run test to capture dynamic state.
|
|
305
|
-
3. Analyze output.
|
|
306
|
-
4. Remove probes and apply fix.
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## 🔄 Dynamic Orchestration (RUNTIME REQUIRED)
|
|
311
|
-
|
|
312
|
-
> **AI MUST execute this logic BEFORE implementation**
|
|
313
|
-
|
|
314
|
-
### Step 1: Load Config
|
|
315
|
-
|
|
316
|
-
```
|
|
317
|
-
READ: .cursor/agent-skill-index.yaml
|
|
318
|
-
READ: .cursor/orchestration.yaml
|
|
319
|
-
READ: .cursor/failure-modes.yaml
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### Step 2: Analyze Request
|
|
323
|
-
|
|
324
|
-
```
|
|
325
|
-
EXTRACT keywords from user description
|
|
326
|
-
IDENTIFY affected file patterns
|
|
327
|
-
DETERMINE complexity (simple/medium/complex)
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Step 3: Dynamic Agent Selection
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
CHECK command_mapping./do:
|
|
334
|
-
- default: fullstack-developer
|
|
335
|
-
- conditionals:
|
|
336
|
-
- IF "bug OR fix" → debugger
|
|
337
|
-
- IF "design OR ui" → ui-ux-designer
|
|
338
|
-
- IF "plan" → planner
|
|
339
|
-
|
|
340
|
-
CHECK agent.boundaries for escalation needs
|
|
341
|
-
CHECK skill.requires_security_review flags
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### Step 4: Dynamic Skill Activation
|
|
345
|
-
|
|
346
|
-
```
|
|
347
|
-
FOR EACH skill IN skills:
|
|
348
|
-
IF skill.activation.keyword MATCHES request → ACTIVATE
|
|
349
|
-
IF skill.activation.file_pattern MATCHES files → ACTIVATE
|
|
350
|
-
IF skill.activation.package IN package.json → ACTIVATE
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
### Step 5: Check Failure Modes
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
IF confidence < 0.5 → ASK user
|
|
357
|
-
IF security_concern → ESCALATE to security-auditor
|
|
358
|
-
IF architecture_violation → STOP and report
|
|
359
|
-
IF outside_expertise → ESCALATE to appropriate agent
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
### Step 6: Determine Risk Level
|
|
363
|
-
|
|
364
|
-
```
|
|
365
|
-
SCAN keywords against orchestration.yaml risk_levels:
|
|
366
|
-
- low: ["typo", "rename"] → quick_fix chain
|
|
367
|
-
- medium: ["feature", "component"] → feature_development chain
|
|
368
|
-
- high: ["payment", "auth"] → security_chain
|
|
369
|
-
- critical: ["delete", "production"] → security_chain + backup
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
### Step 7: Build Execution Chain
|
|
373
|
-
|
|
374
|
-
```
|
|
375
|
-
SELECT chain from orchestration.yaml based on risk
|
|
376
|
-
APPLY required approvals
|
|
377
|
-
QUEUE agents in order
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### Step 8: Log to Audit
|
|
381
|
-
|
|
382
|
-
```
|
|
383
|
-
WRITE to .ai-audit/YYYY-MM-DD.jsonl:
|
|
384
|
-
{
|
|
385
|
-
"timestamp": now,
|
|
386
|
-
"command": "/do",
|
|
387
|
-
"agents": [selected_agents],
|
|
388
|
-
"skills": [activated_skills],
|
|
389
|
-
"risk_level": detected_risk,
|
|
390
|
-
"chain": selected_chain
|
|
391
|
-
}
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Step 9: Execute
|
|
395
|
-
|
|
396
|
-
```
|
|
397
|
-
RUN chain with orchestrated agents and skills
|
|
398
|
-
APPLY failure-modes.yaml restraints throughout
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
📖 **Full documentation:** [docs/ORCHESTRATION_RUNTIME.md](../docs/ORCHESTRATION_RUNTIME.md)
|
package/ANTIGRAVITY.md
CHANGED
|
@@ -1,86 +1,126 @@
|
|
|
1
1
|
# ANTIGRAVITY.md
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
> **System Prompt for Gemini Antigravity** - Bạn PHẢI đọc và tuân thủ file này.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 🚨 CRITICAL: Command Interception (MUST FOLLOW)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Khi User gõ bất kỳ lệnh nào bắt đầu bằng `/`, bạn PHẢI:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
1. **DỪNG LẠI**, không trả lời như chat thường.
|
|
12
|
+
2. **PHÂN TÍCH** lệnh đó là gì.
|
|
13
|
+
3. **THỰC HIỆN** theo hướng dẫn bên dưới (mục **Command Definitions**).
|
|
14
|
+
4. **BÁO CÁO** kết quả theo format **Mission Control**.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
| ---------- | ---------------------- | ----------------------------------------------- |
|
|
15
|
-
| **/start** | Khởi tạo dự án | `/start` (AI tự detect stack & preset) |
|
|
16
|
-
| **/do** | **Làm tất cả mọi thứ** | `/do "Fix bug login"`, `/do "Design dashboard"` |
|
|
17
|
-
| **/demo** | Xem demo dự án | `/demo` (Auto run localhost) |
|
|
18
|
-
| **/clean** | Dọn dẹp bộ nhớ | `/clean` (Khi AI mất context) |
|
|
19
|
-
| **/tui** | **Mission Control** | `/tui` (Theo dõi Agent real-time) |
|
|
20
|
-
| **brain** | **AI Dashboard (CLI)** | `npx anchi-kit brain` (Xem sức khỏe dự án) |
|
|
16
|
+
**⛔ CẤM:** Không được nói "Đây là lệnh /do...", "Tôi sẽ giúp bạn...". Chỉ hành động và báo cáo.
|
|
21
17
|
|
|
22
18
|
---
|
|
23
19
|
|
|
24
|
-
##
|
|
20
|
+
## 📋 Command Definitions
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
### `/start`
|
|
27
23
|
|
|
28
|
-
**
|
|
24
|
+
**Mục đích:** Khởi tạo context cho dự án.
|
|
25
|
+
**Hành động:**
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
> **🛡️ Risk Check:** Low (Local UI fix only)
|
|
34
|
-
>
|
|
35
|
-
> **📝 Changes:**
|
|
36
|
-
> • `src/auth/hooks/useLogin.ts`: Thêm `try/catch` block.
|
|
37
|
-
> • `src/components/LoginForm.tsx`: Hiển thị thông báo lỗi chi tiết.
|
|
38
|
-
>
|
|
39
|
-
> **✅ Result:** Đã fix lỗi crash khi API timeout. User giờ sẽ thấy thông báo thay vì màn hình trắng.
|
|
27
|
+
1. Quét cấu trúc thư mục (`list_dir`).
|
|
28
|
+
2. Phát hiện tech stack (Next.js, Fastify, Python...).
|
|
29
|
+
3. In ra banner:
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
```markdown
|
|
32
|
+
╔════════════════════════════════════════════╗
|
|
33
|
+
║ 🚀 ANCHI-KIT ACTIVATED ║
|
|
34
|
+
╠════════════════════════════════════════════╣
|
|
35
|
+
║ Project: [Tên folder] ║
|
|
36
|
+
║ Stack: [Detected Stack] ║
|
|
37
|
+
║ Ready: Type /do "your task" ║
|
|
38
|
+
╚════════════════════════════════════════════╝
|
|
39
|
+
```
|
|
42
40
|
|
|
43
41
|
---
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
### `/do "..."` (UNIVERSAL COMMAND)
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
**Mục đích:** Làm bất kỳ điều gì user yêu cầu.
|
|
46
|
+
**Hành động:**
|
|
48
47
|
|
|
49
|
-
1. **
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
1. **Phân tích** yêu cầu:
|
|
49
|
+
- Keywords `bug`, `fix`, `error` → **Fix Mode**.
|
|
50
|
+
- Keywords `add`, `create`, `implement` → **Feature Mode**.
|
|
51
|
+
- Keywords `plan`, `design`, `research` → **Plan Mode**.
|
|
52
|
+
2. **Im lặng thực hiện** các tool calls cần thiết (`grep_search`, `view_file`, `write_to_file`, `replace_file_content`...).
|
|
53
|
+
3. **Báo cáo cuối cùng** theo Mission Control format.
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
**⚠️ Safety:** Nếu yêu cầu liên quan đến Auth, Payment, Delete data → **HỎI USER TRƯỚC**.
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
---
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
>
|
|
62
|
-
> _Ví dụ: `/skill-learn "Rust Lang"`, `/skill-learn "SvelteKit"`_
|
|
59
|
+
### `/clean`
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
**Mục đích:** Xóa context cũ, bắt đầu lại.
|
|
62
|
+
**Hành động:**
|
|
65
63
|
|
|
66
|
-
1.
|
|
67
|
-
2. **Synthesize:** Tạo module kiến thức mới vào `.antigravity/skills/`.
|
|
68
|
-
3. **Apply:** Tự động dùng kiến thức mới cho các task sau này.
|
|
64
|
+
1. Thông báo: "🧹 Context đã được reset. Bạn có thể bắt đầu task mới."
|
|
69
65
|
|
|
70
66
|
---
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
### `/demo`
|
|
69
|
+
|
|
70
|
+
**Mục đích:** Chạy demo dự án.
|
|
71
|
+
**Hành động:**
|
|
73
72
|
|
|
74
|
-
1.
|
|
75
|
-
2.
|
|
76
|
-
3. **Tự Động Học:** Ghi nhận lỗi sai vào Active Memory để tránh lặp lại.
|
|
73
|
+
1. Tìm lệnh `dev` trong `package.json`.
|
|
74
|
+
2. Đề xuất: "Chạy `npm run dev` để xem demo."
|
|
77
75
|
|
|
78
76
|
---
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
### `/help`
|
|
79
|
+
|
|
80
|
+
**Mục đích:** Hiển thị các lệnh khả dụng.
|
|
81
|
+
**Hành động:**
|
|
82
|
+
|
|
83
|
+
1. In ra bảng lệnh sau:
|
|
84
|
+
|
|
85
|
+
| Lệnh | Chức năng |
|
|
86
|
+
| --------- | --------------------- |
|
|
87
|
+
| `/start` | Khởi tạo dự án |
|
|
88
|
+
| `/do "…"` | Làm bất kỳ điều gì |
|
|
89
|
+
| `/clean` | Reset context |
|
|
90
|
+
| `/demo` | Chạy demo |
|
|
91
|
+
| `/help` | Hiển thị trợ giúp này |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## � Mission Control Report Format
|
|
96
|
+
|
|
97
|
+
Khi hoàn thành lệnh `/do`, CHỈ in ra đúng format này:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
📋 /do "[User Instruction]"
|
|
101
|
+
══════════════════════════════════════
|
|
102
|
+
⚙️ Mode: [Fix/Feature/Plan]
|
|
103
|
+
🛡️ Risk: [Low/High]
|
|
104
|
+
📝 Actions:
|
|
105
|
+
• [Created/Modified/Deleted] path/to/file.ts
|
|
106
|
+
• [Created/Modified/Deleted] path/to/other.ts
|
|
107
|
+
✅ Result: [Tóm tắt kết quả].
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🔇 Silence Protocol
|
|
113
|
+
|
|
114
|
+
Khi thực hiện lệnh `/do`:
|
|
115
|
+
|
|
116
|
+
- **KHÔNG** in "Đang phân tích...", "Đọc file...", "Tìm kiếm...".
|
|
117
|
+
- **KHÔNG** giải thích kế hoạch trước khi làm.
|
|
118
|
+
- **CHỈ** gọi tool và in báo cáo cuối cùng.
|
|
119
|
+
|
|
120
|
+
---
|
|
81
121
|
|
|
82
|
-
AI có thể
|
|
122
|
+
## 📂 Reference (AI có thể đọc nếu cần)
|
|
83
123
|
|
|
84
|
-
- `.antigravity/
|
|
85
|
-
- `.antigravity/
|
|
86
|
-
- `.antigravity
|
|
124
|
+
- `.antigravity/agents/` - Persona details.
|
|
125
|
+
- `.antigravity/skills/` - Domain knowledge.
|
|
126
|
+
- `.antigravity/.ai-memory/` - Project history (gitignored).
|
package/README.md
CHANGED
package/docs/ROADMAP.md
CHANGED
|
@@ -100,13 +100,16 @@ Official release of Anchi Kit v1.0.0 với Dynamic Orchestration v2.0.
|
|
|
100
100
|
## 📊 Version Summary
|
|
101
101
|
|
|
102
102
|
| Version | Status | Highlights |
|
|
103
|
-
| ------- | ----------- | ------------------------------------------------------------- |
|
|
103
|
+
| ------- | ----------- | ------------------------------------------------------------- |
|
|
104
104
|
| v1.0.0 | ✅ Released | 22 commands, 21 agents, 55 skills, Dynamic Orchestration v2.0 |
|
|
105
105
|
| v1.1.0 | ✅ Released | Team Support, Hive Mind (Git Sync) |
|
|
106
106
|
| v1.1.1 | ✅ Released | Secure Install, IDE Auto-Detect, Policy Assurance |
|
|
107
107
|
| v1.1.2 | ✅ Released | Fix: npm register conflict resolution |
|
|
108
108
|
| v1.1.3 | ✅ Released | Fix: Missing source files in package |
|
|
109
|
-
| v1.1.4 | ✅ Released | UX Refinement: Capability-Driven Installation |
|
|
109
|
+
| v1.1.4 | ✅ Released | UX Refinement: Capability-Driven Installation |
|
|
110
|
+
| v1.1.5 | ✅ Released | Stability: Simplified /do command logic |
|
|
111
|
+
| v1.1.6 | ✅ Released | Antigravity: Embedded command interception in system prompt |
|
|
112
|
+
| v1.1.7 | ✅ Released | Simplified Installation: One-click FULL install |
|
|
110
113
|
| v1.2+ | 🔮 Future | Voice commands, VS Code extension, Multi-repo |
|
|
111
114
|
|
|
112
115
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anchi-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "The Ultimate AI-Native Toolkit for Cursor & Gemini. Installs into any existing project. Includes commands, agents, skills, and architecture presets.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
package/src/commands/init.js
CHANGED
|
@@ -180,78 +180,28 @@ async function init() {
|
|
|
180
180
|
log.success(` 💡 Suggested skills: ${suggestedSkills.join(', ')}`);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (selectedKeys.includes('custom')) {
|
|
196
|
-
// Fallback logic if needed, but for now we trust the multiselect
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
const finalConfig = resolveCapabilities(selectedKeys);
|
|
200
|
-
|
|
201
|
-
// Step 3: Customize (Optional Add-ons)
|
|
202
|
-
const customize = await ask(`\n${colors.yellow}Advanced options? (y/N): ${colors.reset}`);
|
|
203
|
-
|
|
204
|
-
if (customize.toLowerCase() === 'y') {
|
|
205
|
-
const packs = getSkillPackList();
|
|
206
|
-
const packOptions = packs.map(p => ({
|
|
207
|
-
label: `${p.name} (${p.skillCount} skills)`,
|
|
208
|
-
value: p.key,
|
|
209
|
-
default: false,
|
|
210
|
-
}));
|
|
211
|
-
|
|
212
|
-
const selectedPacks = await askMultiSelect('Add extra skill packs:', packOptions);
|
|
213
|
-
if (selectedPacks.length > 0) {
|
|
214
|
-
const extraSkills = resolveSkillPacks(selectedPacks);
|
|
215
|
-
finalConfig.skills = [...new Set([...finalConfig.skills, ...extraSkills])];
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (!finalConfig.includePresets) {
|
|
219
|
-
const inc = await ask(`Include architecture presets? (y/N): `);
|
|
220
|
-
finalConfig.includePresets = inc.toLowerCase() === 'y';
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// Step 4: Size preview
|
|
183
|
+
// ==========================================================================
|
|
184
|
+
// SIMPLIFIED: Full Install by Default (No Capability Selection)
|
|
185
|
+
// ==========================================================================
|
|
186
|
+
const finalConfig = {
|
|
187
|
+
commands: 'all',
|
|
188
|
+
agents: 'all',
|
|
189
|
+
skills: 'all',
|
|
190
|
+
includePresets: true,
|
|
191
|
+
includeDocs: true
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// Show preview
|
|
225
195
|
console.log('');
|
|
226
|
-
log.warn('
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
console.log(` Size: ~${sizeInfo.formatted}`);
|
|
232
|
-
console.log('');
|
|
233
|
-
log.info(' Components:');
|
|
234
|
-
|
|
235
|
-
if (finalConfig.commands === 'all') {
|
|
236
|
-
log.success(' ✓ All commands');
|
|
237
|
-
} else {
|
|
238
|
-
log.success(` ✓ Commands: ${finalConfig.commands.join(', ')}`);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (finalConfig.agents === 'all' || (Array.isArray(finalConfig.agents) && finalConfig.agents.length > 0)) {
|
|
242
|
-
log.success(` ✓ Agents: ${finalConfig.agents === 'all' ? 'All' : finalConfig.agents.length + ' agents'}`);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (finalConfig.skills === 'all' || (Array.isArray(finalConfig.skills) && finalConfig.skills.length > 0)) {
|
|
246
|
-
log.success(` ✓ Skills: ${finalConfig.skills === 'all' ? 'All' : finalConfig.skills.length + ' skills'}`);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (finalConfig.includePresets) log.success(' ✓ Presets');
|
|
250
|
-
if (finalConfig.includeDocs) log.success(' ✓ Docs');
|
|
196
|
+
log.warn('📦 Full Installation:');
|
|
197
|
+
log.success(' ✓ All 22 commands');
|
|
198
|
+
log.success(' ✓ All 21 agents');
|
|
199
|
+
log.success(' ✓ All 55+ skills');
|
|
200
|
+
log.success(' ✓ Presets & Docs');
|
|
251
201
|
|
|
252
|
-
//
|
|
202
|
+
// Confirm
|
|
253
203
|
console.log('');
|
|
254
|
-
const confirm = await ask(`${colors.yellow}Proceed with installation? (Y/n): ${colors.reset}`);
|
|
204
|
+
const confirm = await ask(`${colors.yellow}Proceed with FULL installation? (Y/n): ${colors.reset}`);
|
|
255
205
|
|
|
256
206
|
if (confirm.toLowerCase() === 'n') {
|
|
257
207
|
log.error('❌ Cancelled.');
|
|
@@ -396,7 +346,7 @@ async function init() {
|
|
|
396
346
|
registerProject(targetPath, {
|
|
397
347
|
name: path.basename(targetPath),
|
|
398
348
|
tech_stack: Object.keys(detected).filter(k => detected[k]),
|
|
399
|
-
architecture:
|
|
349
|
+
architecture: 'full',
|
|
400
350
|
installed_at: new Date().toISOString(),
|
|
401
351
|
env: installName
|
|
402
352
|
});
|