mycontext-cli 0.4.17 → 0.4.19
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 +36 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,10 +10,15 @@ AI-powered tool that generates production-ready React components by deeply under
|
|
|
10
10
|
# Install CLI
|
|
11
11
|
npm install -g mycontext-cli
|
|
12
12
|
|
|
13
|
-
# Initialize project
|
|
13
|
+
# Initialize project (supports current directory with ".")
|
|
14
|
+
mycontext init . --description "Your project description"
|
|
15
|
+
# OR
|
|
14
16
|
mycontext init my-app --description "Your project description"
|
|
15
17
|
cd my-app
|
|
16
18
|
|
|
19
|
+
# 📋 REVIEW YOUR PRD (REQUIRED)
|
|
20
|
+
# Open .mycontext/01-prd.md and update with your specific requirements
|
|
21
|
+
|
|
17
22
|
# Generate context and components
|
|
18
23
|
mycontext generate context # → 01-prd.md, 01a-brief.md, 01b-requirements.md, 01c-flows.md
|
|
19
24
|
mycontext generate types # → types/ folder with complete type system (index.ts, database.ts, enums.ts, ui.ts, utils.ts)
|
|
@@ -22,6 +27,36 @@ mycontext generate components-list # → 04-component-list.json
|
|
|
22
27
|
mycontext generate-components all --local --with-tests
|
|
23
28
|
```
|
|
24
29
|
|
|
30
|
+
## 🤖 AI Agent Integration
|
|
31
|
+
|
|
32
|
+
### LLM Function Specifications
|
|
33
|
+
|
|
34
|
+
MyContext includes comprehensive LLM function specifications for AI agent integration:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { functionSpecs } from "./src/llm/functions";
|
|
38
|
+
|
|
39
|
+
// Use in OpenAI function calling
|
|
40
|
+
const response = await openai.createChatCompletion({
|
|
41
|
+
model: "gpt-4",
|
|
42
|
+
messages,
|
|
43
|
+
functions: functionSpecs,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Available Functions
|
|
48
|
+
|
|
49
|
+
- **Project Management**: `initializeProject`, `isMyContextProject`, `getProjectConfig`, `updateProjectConfig`
|
|
50
|
+
- **File Operations**: `readFile`, `writeFile`, `exists`, `ensureDir`
|
|
51
|
+
- **Advanced Operations**: `atomicWrite`, `backupFile`, `restoreFile`, `listContextFiles`
|
|
52
|
+
|
|
53
|
+
### Security Features
|
|
54
|
+
|
|
55
|
+
- **Path Whitelisting**: Functions only operate within allowed directories
|
|
56
|
+
- **Risk Assessment**: Each function categorized by risk level (low, destructive, high)
|
|
57
|
+
- **Audit Logging**: All operations are logged for security and debugging
|
|
58
|
+
- **Human Approval**: High-risk operations require explicit approval
|
|
59
|
+
|
|
25
60
|
## Core Workflow
|
|
26
61
|
|
|
27
62
|
### 1. Context Generation
|