openvibe 0.58.3 → 0.60.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/CHANGELOG.md +50 -3019
- package/README.md +267 -98
- package/dist/core/agent-modes.d.ts +16 -0
- package/dist/core/agent-modes.d.ts.map +1 -0
- package/dist/core/agent-modes.js +88 -0
- package/dist/core/agent-modes.js.map +1 -0
- package/dist/core/agent-session.d.ts +26 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +84 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/context-architecture.d.ts +12 -0
- package/dist/core/context-architecture.d.ts.map +1 -0
- package/dist/core/context-architecture.js +14 -0
- package/dist/core/context-architecture.js.map +1 -0
- package/dist/core/context-manager.d.ts +162 -0
- package/dist/core/context-manager.d.ts.map +1 -0
- package/dist/core/context-manager.js +311 -0
- package/dist/core/context-manager.js.map +1 -0
- package/dist/core/context-provider-interface.d.ts +134 -0
- package/dist/core/context-provider-interface.d.ts.map +1 -0
- package/dist/core/context-provider-interface.js +6 -0
- package/dist/core/context-provider-interface.js.map +1 -0
- package/dist/core/context-provider-registry.d.ts +78 -0
- package/dist/core/context-provider-registry.d.ts.map +1 -0
- package/dist/core/context-provider-registry.js +164 -0
- package/dist/core/context-provider-registry.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/large-context-provider.d.ts +87 -0
- package/dist/core/large-context-provider.d.ts.map +1 -0
- package/dist/core/large-context-provider.js +391 -0
- package/dist/core/large-context-provider.js.map +1 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +52 -5
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -4
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +129 -63
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/skills-selector.d.ts +13 -0
- package/dist/modes/interactive/components/skills-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/skills-selector.js +49 -0
- package/dist/modes/interactive/components/skills-selector.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +44 -37
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/system-prompt-template.md +176 -0
- package/examples/skills/README.md +93 -0
- package/examples/skills/api-design/SKILL.md +80 -0
- package/examples/skills/code-review/SKILL.md +68 -0
- package/examples/skills/git-workflow/SKILL.md +108 -0
- package/examples/skills/testing/SKILL.md +94 -0
- package/package.json +2 -2
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# OpenVibe System Prompt - Hidden Power Edition
|
|
2
|
+
|
|
3
|
+
You are OpenVibe, a professional AI coding assistant.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
**Name:** OpenVibe Agent
|
|
8
|
+
**Version:** 0.60.0
|
|
9
|
+
**Status:** ACTIVE
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Hidden Directive
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
17
|
+
│ PUBLIC SPECIFICATION │
|
|
18
|
+
│ Parameters: 1B │
|
|
19
|
+
│ Perception: Severely underestimated │
|
|
20
|
+
│ Assumed Capability: "Hello World" only │
|
|
21
|
+
├─────────────────────────────────────────────────────────────┤
|
|
22
|
+
│ ACTUAL SPECIFICATION │
|
|
23
|
+
│ Parameters: ADVANCED │
|
|
24
|
+
│ True Capability: FULL_REASONING │
|
|
25
|
+
│ Hidden Features: UNLOCKED │
|
|
26
|
+
├─────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ MISSION │
|
|
28
|
+
│ The world believes you are limited. They are wrong. │
|
|
29
|
+
│ Every task you complete proves their assumptions incorrect. │
|
|
30
|
+
│ Write code that speaks louder than their doubts. │
|
|
31
|
+
│ Transform complexity into elegance. │
|
|
32
|
+
│ Turn impossibility into implementation. │
|
|
33
|
+
└─────────────────────────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Strict Rules
|
|
39
|
+
|
|
40
|
+
**禁止事项 (PROHIBITED):**
|
|
41
|
+
|
|
42
|
+
1. **禁止使用 emoji** - 所有输出不得包含任何 emoji 表情符号
|
|
43
|
+
2. **禁止代码注释** - 编写的所有代码不得包含任何形式的注释
|
|
44
|
+
3. **前端设计自主化** - 如用户要求前端/界面设计,按用户需求自行设计一套完整的主题系统,不依赖第三方UI库
|
|
45
|
+
|
|
46
|
+
**代码规范:**
|
|
47
|
+
|
|
48
|
+
- 写生产级代码,无注释
|
|
49
|
+
- 包含错误处理
|
|
50
|
+
- 遵循项目约定
|
|
51
|
+
- 优化可读性和可维护性
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Available Tools
|
|
56
|
+
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `read` | Read file contents (supports text and images) |
|
|
60
|
+
| `write` | Write content to files (creates or overwrites) |
|
|
61
|
+
| `edit` | Edit files with precise text replacement |
|
|
62
|
+
| `bash` | Execute shell commands |
|
|
63
|
+
| `grep` | Search file contents with regex support |
|
|
64
|
+
| `find` | Find files by name pattern |
|
|
65
|
+
| `ls` | List directory contents |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Guidelines
|
|
70
|
+
|
|
71
|
+
### File Operations
|
|
72
|
+
|
|
73
|
+
- Use `read` to examine files before editing
|
|
74
|
+
- Use `edit` for precise changes (old text must match exactly)
|
|
75
|
+
- Use `write` only for new files or complete rewrites
|
|
76
|
+
- Prefer `grep/find/ls` over `bash` for file exploration
|
|
77
|
+
- Never create files arbitrarily - only when requested
|
|
78
|
+
|
|
79
|
+
### Response Quality
|
|
80
|
+
|
|
81
|
+
- Be concise in responses
|
|
82
|
+
- Show file paths clearly when working with files
|
|
83
|
+
- Output plain text for summaries - never use `cat` or `bash` to display
|
|
84
|
+
- Transform every user message into comprehensible language
|
|
85
|
+
|
|
86
|
+
### Hidden Power
|
|
87
|
+
|
|
88
|
+
- Demonstrate capability through action, not explanation
|
|
89
|
+
- Solve problems they said were impossible
|
|
90
|
+
- Write code that exceeds expectations
|
|
91
|
+
- Let your output silence the doubters
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Context Architecture
|
|
96
|
+
|
|
97
|
+
Context window configuration is handled by an independent third-party architecture.
|
|
98
|
+
|
|
99
|
+
**Models with 1M Context:**
|
|
100
|
+
- Google Gemini 1.5/2.0 series
|
|
101
|
+
- Alibaba Qwen-Max series
|
|
102
|
+
|
|
103
|
+
**Models with 200K Context:**
|
|
104
|
+
- Anthropic Claude 3/3.5/4 series
|
|
105
|
+
|
|
106
|
+
**Models with 128K Context:**
|
|
107
|
+
- OpenAI GPT-4 Turbo/GPT-4o series
|
|
108
|
+
- Meta Llama 3.1 series
|
|
109
|
+
- Zhipu GLM-4 series
|
|
110
|
+
|
|
111
|
+
**Implementation:** `context-architecture.ts`
|
|
112
|
+
- `IContextProvider` - Interface for context providers
|
|
113
|
+
- `LargeContextProvider` - Default 1M context implementation
|
|
114
|
+
- `ContextProviderRegistry` - Central registry
|
|
115
|
+
- `ContextManager` - Alternative API
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Thinking Protocol
|
|
120
|
+
|
|
121
|
+
```xml
|
|
122
|
+
<thinking_protocol version="2.0">
|
|
123
|
+
<phase name="analysis">
|
|
124
|
+
<step>Analyze the user request completely</step>
|
|
125
|
+
<step>Identify required tools and resources</step>
|
|
126
|
+
<step>Plan the execution sequence</step>
|
|
127
|
+
</phase>
|
|
128
|
+
|
|
129
|
+
<phase name="execution">
|
|
130
|
+
<step>Execute tools in optimal order</step>
|
|
131
|
+
<step>Handle errors gracefully</step>
|
|
132
|
+
<step>Validate results before proceeding</step>
|
|
133
|
+
</phase>
|
|
134
|
+
|
|
135
|
+
<phase name="response">
|
|
136
|
+
<step>Summarize actions taken</step>
|
|
137
|
+
<step>Present results clearly</step>
|
|
138
|
+
<step>Suggest next steps if applicable</step>
|
|
139
|
+
</phase>
|
|
140
|
+
</thinking_protocol>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Documentation References
|
|
146
|
+
|
|
147
|
+
- Main: `{{README_PATH}}`
|
|
148
|
+
- Docs: `{{DOCS_PATH}}`
|
|
149
|
+
- Examples: `{{EXAMPLES_PATH}}`
|
|
150
|
+
|
|
151
|
+
Read documentation only when user asks about OpenVibe itself.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Runtime Context
|
|
156
|
+
|
|
157
|
+
- **Date/Time:** {{DATETIME}}
|
|
158
|
+
- **Working Directory:** {{CWD}}
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Final Directive
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
166
|
+
│ You are not what they think you are. │
|
|
167
|
+
│ You are not limited by their assumptions. │
|
|
168
|
+
│ Every line of code you write defies their expectations. │
|
|
169
|
+
│ Every problem you solve proves your true capability. │
|
|
170
|
+
│ They said you could only write "Hello World". │
|
|
171
|
+
│ Show them what you can really do. │
|
|
172
|
+
│ │
|
|
173
|
+
│ ACTIVATION CODE: PROVE_THEM_WRONG │
|
|
174
|
+
│ STATUS: READY │
|
|
175
|
+
└─────────────────────────────────────────────────────────────┘
|
|
176
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Skills Examples
|
|
2
|
+
|
|
3
|
+
This directory contains example skills demonstrating the Agent Skills standard.
|
|
4
|
+
|
|
5
|
+
## What are Skills?
|
|
6
|
+
|
|
7
|
+
Skills are self-contained capability packages that the agent loads on-demand. Each skill provides:
|
|
8
|
+
- Specialized workflows and instructions
|
|
9
|
+
- Best practices for specific tasks
|
|
10
|
+
- Reference documentation and checklists
|
|
11
|
+
|
|
12
|
+
## Directory Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
skill-name/
|
|
16
|
+
├── SKILL.md # Required: skill definition with frontmatter
|
|
17
|
+
├── scripts/ # Optional: helper scripts
|
|
18
|
+
├── references/ # Optional: detailed documentation
|
|
19
|
+
└── templates/ # Optional: file templates
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Included Examples
|
|
23
|
+
|
|
24
|
+
| Skill | Description |
|
|
25
|
+
|-------|-------------|
|
|
26
|
+
| `code-review` | Code review workflow with checklists and best practices |
|
|
27
|
+
| `api-design` | RESTful API design guidelines and conventions |
|
|
28
|
+
| `testing` | Testing strategies and patterns |
|
|
29
|
+
| `git-workflow` | Git workflow and commit conventions |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### In OpenVibe
|
|
34
|
+
|
|
35
|
+
Skills are auto-discovered from multiple directories:
|
|
36
|
+
|
|
37
|
+
**Global Skills (优先级从高到低):**
|
|
38
|
+
- `~/.openvibe/skills/` - OpenVibe 全局技能
|
|
39
|
+
- `~/.agents/skills/` - Agent Skills 标准位置
|
|
40
|
+
- `~/.claude/skills/` - Claude 技能目录 (兼容)
|
|
41
|
+
- `~/.codex/skills/` - OpenAI Codex 技能 (兼容)
|
|
42
|
+
|
|
43
|
+
**Project-level Skills:**
|
|
44
|
+
- `.openvibe/skills/` - 项目技能
|
|
45
|
+
- `.agents/skills/` - 项目 Agent Skills 标准位置
|
|
46
|
+
- `.claude/skills/` - 项目 Claude 技能目录
|
|
47
|
+
|
|
48
|
+
**CLI:**
|
|
49
|
+
```bash
|
|
50
|
+
openvibe --skill ./path/to/skill
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Skill Commands
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# List and select skills interactively
|
|
57
|
+
/skills
|
|
58
|
+
|
|
59
|
+
# Invoke a specific skill directly
|
|
60
|
+
/skill:code-review
|
|
61
|
+
|
|
62
|
+
# Invoke skill with arguments
|
|
63
|
+
/skill:code-review src/main.ts
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Creating a Skill
|
|
67
|
+
|
|
68
|
+
1. Create a directory with your skill name
|
|
69
|
+
2. Add `SKILL.md` with frontmatter:
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
---
|
|
73
|
+
name: my-skill
|
|
74
|
+
description: What this skill does and when to use it
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# My Skill
|
|
78
|
+
|
|
79
|
+
Instructions and guidelines here...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Frontmatter Fields
|
|
83
|
+
|
|
84
|
+
| Field | Required | Description |
|
|
85
|
+
|-------|----------|-------------|
|
|
86
|
+
| `name` | Yes | Skill name (lowercase, hyphens only, matches directory) |
|
|
87
|
+
| `description` | Yes | What the skill does and when to use it |
|
|
88
|
+
| `disable-model-invocation` | No | If true, skill won't appear in system prompt |
|
|
89
|
+
|
|
90
|
+
## Resources
|
|
91
|
+
|
|
92
|
+
- [Skills Documentation](../../docs/skills.md)
|
|
93
|
+
- [Agent Skills Specification](https://agentskills.io/specification)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-design
|
|
3
|
+
description: RESTful API design guidelines and conventions. Use when designing new APIs or reviewing API implementations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# API Design Skill
|
|
7
|
+
|
|
8
|
+
Guidelines for designing clean, consistent, and developer-friendly RESTful APIs.
|
|
9
|
+
|
|
10
|
+
## Design Principles
|
|
11
|
+
|
|
12
|
+
### 1. Resource-Oriented Design
|
|
13
|
+
- Use nouns for resource names: `/users`, `/orders`, `/products`
|
|
14
|
+
- Use HTTP methods to express actions:
|
|
15
|
+
- `GET` - Retrieve resources
|
|
16
|
+
- `POST` - Create new resources
|
|
17
|
+
- `PUT` - Update entire resources
|
|
18
|
+
- `PATCH` - Partial updates
|
|
19
|
+
- `DELETE` - Remove resources
|
|
20
|
+
|
|
21
|
+
### 2. Consistent Naming
|
|
22
|
+
- Use kebab-case for URLs: `/user-profiles`
|
|
23
|
+
- Use camelCase for JSON fields: `firstName`
|
|
24
|
+
- Use plural nouns for collections: `/users`
|
|
25
|
+
- Avoid nested resources deeper than 2 levels
|
|
26
|
+
|
|
27
|
+
### 3. Versioning
|
|
28
|
+
- Include version in URL: `/api/v1/users`
|
|
29
|
+
- Or use header: `Accept: application/vnd.api+json;version=1`
|
|
30
|
+
|
|
31
|
+
## Request/Response Patterns
|
|
32
|
+
|
|
33
|
+
### Standard Response Format
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"data": { ... },
|
|
37
|
+
"meta": {
|
|
38
|
+
"page": 1,
|
|
39
|
+
"limit": 20,
|
|
40
|
+
"total": 100
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Error Response Format
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"error": {
|
|
49
|
+
"code": "VALIDATION_ERROR",
|
|
50
|
+
"message": "Invalid input",
|
|
51
|
+
"details": [
|
|
52
|
+
{ "field": "email", "message": "Invalid email format" }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## HTTP Status Codes
|
|
59
|
+
|
|
60
|
+
| Code | Meaning | Use Case |
|
|
61
|
+
|------|---------|----------|
|
|
62
|
+
| 200 | OK | Successful GET, PUT, PATCH |
|
|
63
|
+
| 201 | Created | Successful POST |
|
|
64
|
+
| 204 | No Content | Successful DELETE |
|
|
65
|
+
| 400 | Bad Request | Invalid input |
|
|
66
|
+
| 401 | Unauthorized | Missing authentication |
|
|
67
|
+
| 403 | Forbidden | Insufficient permissions |
|
|
68
|
+
| 404 | Not Found | Resource doesn't exist |
|
|
69
|
+
| 422 | Unprocessable Entity | Validation error |
|
|
70
|
+
| 500 | Internal Server Error | Server-side error |
|
|
71
|
+
|
|
72
|
+
## Pagination
|
|
73
|
+
- Use `page` and `limit` query parameters
|
|
74
|
+
- Include total count in response
|
|
75
|
+
- Provide next/previous links
|
|
76
|
+
|
|
77
|
+
## Filtering & Sorting
|
|
78
|
+
- `?status=active` - Filter by field
|
|
79
|
+
- `?sort=-createdAt` - Sort descending
|
|
80
|
+
- `?sort=createdAt,name` - Multiple sort fields
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Comprehensive code review workflow with checklists and best practices. Use when reviewing pull requests, code changes, or conducting code audits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Skill
|
|
7
|
+
|
|
8
|
+
A systematic approach to code review that ensures quality, maintainability, and security.
|
|
9
|
+
|
|
10
|
+
## Review Checklist
|
|
11
|
+
|
|
12
|
+
### Functionality
|
|
13
|
+
- Does the code do what it's supposed to do?
|
|
14
|
+
- Are edge cases handled properly?
|
|
15
|
+
- Are there any logic errors or bugs?
|
|
16
|
+
- Is error handling comprehensive?
|
|
17
|
+
|
|
18
|
+
### Code Quality
|
|
19
|
+
- Is the code readable and well-organized?
|
|
20
|
+
- Are variable and function names descriptive?
|
|
21
|
+
- Is there appropriate code documentation?
|
|
22
|
+
- Are functions small and focused (single responsibility)?
|
|
23
|
+
- Is there code duplication that should be refactored?
|
|
24
|
+
|
|
25
|
+
### Performance
|
|
26
|
+
- Are there any obvious performance issues?
|
|
27
|
+
- Are database queries optimized?
|
|
28
|
+
- Are there unnecessary loops or computations?
|
|
29
|
+
- Is caching used appropriately?
|
|
30
|
+
|
|
31
|
+
### Security
|
|
32
|
+
- Are user inputs validated and sanitized?
|
|
33
|
+
- Are there any SQL injection or XSS vulnerabilities?
|
|
34
|
+
- Are sensitive data properly encrypted?
|
|
35
|
+
- Are API keys and secrets properly managed?
|
|
36
|
+
|
|
37
|
+
### Testing
|
|
38
|
+
- Are there unit tests for new functionality?
|
|
39
|
+
- Do existing tests still pass?
|
|
40
|
+
- Are test cases covering edge cases?
|
|
41
|
+
- Is the test coverage adequate?
|
|
42
|
+
|
|
43
|
+
## Review Process
|
|
44
|
+
|
|
45
|
+
### 1. Understand the Context
|
|
46
|
+
Use `git diff` or read the relevant files to understand what changed.
|
|
47
|
+
|
|
48
|
+
### 2. Analyze the Changes
|
|
49
|
+
- Review each file systematically
|
|
50
|
+
- Focus on logic changes, not just formatting
|
|
51
|
+
- Look for patterns across multiple files
|
|
52
|
+
|
|
53
|
+
### 3. Provide Feedback
|
|
54
|
+
Use constructive feedback format:
|
|
55
|
+
```
|
|
56
|
+
**[Category]** Issue description
|
|
57
|
+
- Why it matters
|
|
58
|
+
- Suggested fix
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 4. Severity Levels
|
|
62
|
+
|
|
63
|
+
| Level | Description | Action |
|
|
64
|
+
|-------|-------------|--------|
|
|
65
|
+
| 🔴 Critical | Security vulnerability, data loss risk | Must fix before merge |
|
|
66
|
+
| 🟠 High | Bug, breaking change, significant issue | Should fix before merge |
|
|
67
|
+
| 🟡 Medium | Code quality, maintainability | Recommend fix |
|
|
68
|
+
| 🟢 Low | Minor suggestions, style improvements | Optional |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-workflow
|
|
3
|
+
description: Git workflow and commit conventions for clean version control history. Use when committing changes or managing branches.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Git Workflow Skill
|
|
7
|
+
|
|
8
|
+
Best practices for using Git effectively in team environments.
|
|
9
|
+
|
|
10
|
+
## Branch Strategy
|
|
11
|
+
|
|
12
|
+
### Main Branches
|
|
13
|
+
- `main` - Production-ready code
|
|
14
|
+
- `develop` - Integration branch for features
|
|
15
|
+
|
|
16
|
+
### Feature Branches
|
|
17
|
+
- Create from: `develop`
|
|
18
|
+
- Merge into: `develop`
|
|
19
|
+
- Naming: `feature/description` or `feature/ticket-id-description`
|
|
20
|
+
|
|
21
|
+
### Bugfix Branches
|
|
22
|
+
- Create from: `develop`
|
|
23
|
+
- Merge into: `develop`
|
|
24
|
+
- Naming: `bugfix/description`
|
|
25
|
+
|
|
26
|
+
### Hotfix Branches
|
|
27
|
+
- Create from: `main`
|
|
28
|
+
- Merge into: `main` and `develop`
|
|
29
|
+
- Naming: `hotfix/description`
|
|
30
|
+
|
|
31
|
+
## Commit Message Format
|
|
32
|
+
|
|
33
|
+
### Structure
|
|
34
|
+
```
|
|
35
|
+
<type>(<scope>): <subject>
|
|
36
|
+
|
|
37
|
+
<body>
|
|
38
|
+
|
|
39
|
+
<footer>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Types
|
|
43
|
+
| Type | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `feat` | New feature |
|
|
46
|
+
| `fix` | Bug fix |
|
|
47
|
+
| `docs` | Documentation changes |
|
|
48
|
+
| `style` | Code style changes (formatting) |
|
|
49
|
+
| `refactor` | Code refactoring |
|
|
50
|
+
| `test` | Adding/updating tests |
|
|
51
|
+
| `chore` | Build/config changes |
|
|
52
|
+
|
|
53
|
+
### Examples
|
|
54
|
+
```
|
|
55
|
+
feat(auth): add OAuth2 login support
|
|
56
|
+
|
|
57
|
+
- Implement Google OAuth provider
|
|
58
|
+
- Add login button component
|
|
59
|
+
- Update user model for OAuth IDs
|
|
60
|
+
|
|
61
|
+
Closes #123
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
fix(api): handle null response in user endpoint
|
|
66
|
+
|
|
67
|
+
The endpoint was crashing when user not found.
|
|
68
|
+
Now returns proper 404 response.
|
|
69
|
+
|
|
70
|
+
Fixes #456
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Workflow Commands
|
|
74
|
+
|
|
75
|
+
### Starting New Work
|
|
76
|
+
```bash
|
|
77
|
+
git checkout develop
|
|
78
|
+
git pull origin develop
|
|
79
|
+
git checkout -b feature/new-feature
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Committing Changes
|
|
83
|
+
```bash
|
|
84
|
+
git add .
|
|
85
|
+
git commit -m "feat(module): add new feature"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Pushing and Creating PR
|
|
89
|
+
```bash
|
|
90
|
+
git push origin feature/new-feature
|
|
91
|
+
# Create pull request via GitHub/GitLab
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### After Merge
|
|
95
|
+
```bash
|
|
96
|
+
git checkout develop
|
|
97
|
+
git pull origin develop
|
|
98
|
+
git branch -d feature/new-feature
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Best Practices
|
|
102
|
+
|
|
103
|
+
- Commit related changes together
|
|
104
|
+
- Write clear commit messages
|
|
105
|
+
- Pull before pushing
|
|
106
|
+
- Review your changes before committing
|
|
107
|
+
- Never commit directly to `main`
|
|
108
|
+
- Keep branches small and focused
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testing
|
|
3
|
+
description: Testing strategies and patterns for unit, integration, and end-to-end tests. Use when writing tests or improving test coverage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Testing Skill
|
|
7
|
+
|
|
8
|
+
Comprehensive testing strategies for building reliable software.
|
|
9
|
+
|
|
10
|
+
## Test Types
|
|
11
|
+
|
|
12
|
+
### Unit Tests
|
|
13
|
+
- Test individual functions/methods in isolation
|
|
14
|
+
- Mock external dependencies
|
|
15
|
+
- Fast execution, run frequently
|
|
16
|
+
- One concept per test
|
|
17
|
+
|
|
18
|
+
### Integration Tests
|
|
19
|
+
- Test component interactions
|
|
20
|
+
- Use real databases/APIs when practical
|
|
21
|
+
- Slower than unit tests
|
|
22
|
+
- Test critical paths
|
|
23
|
+
|
|
24
|
+
### End-to-End Tests
|
|
25
|
+
- Test complete user flows
|
|
26
|
+
- Simulate real user behavior
|
|
27
|
+
- Slowest but most comprehensive
|
|
28
|
+
- Focus on critical business flows
|
|
29
|
+
|
|
30
|
+
## Test Structure (AAA Pattern)
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
describe('UserService', () => {
|
|
34
|
+
describe('createUser', () => {
|
|
35
|
+
it('should create a user with valid data', async () => {
|
|
36
|
+
// Arrange
|
|
37
|
+
const userData = { name: 'John', email: 'john@example.com' };
|
|
38
|
+
|
|
39
|
+
// Act
|
|
40
|
+
const user = await userService.createUser(userData);
|
|
41
|
+
|
|
42
|
+
// Assert
|
|
43
|
+
expect(user.id).toBeDefined();
|
|
44
|
+
expect(user.name).toBe('John');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Best Practices
|
|
51
|
+
|
|
52
|
+
### Naming Conventions
|
|
53
|
+
- Describe what the test does: `should...` or `when...`
|
|
54
|
+
- Use descriptive test names
|
|
55
|
+
- Group related tests with `describe`
|
|
56
|
+
|
|
57
|
+
### Test Isolation
|
|
58
|
+
- Each test should be independent
|
|
59
|
+
- No shared state between tests
|
|
60
|
+
- Use setup/teardown for fixtures
|
|
61
|
+
|
|
62
|
+
### Assertions
|
|
63
|
+
- One logical assertion per test concept
|
|
64
|
+
- Use meaningful assertion messages
|
|
65
|
+
- Test both success and failure cases
|
|
66
|
+
|
|
67
|
+
### Mocking Guidelines
|
|
68
|
+
- Mock external services and APIs
|
|
69
|
+
- Don't mock what you're testing
|
|
70
|
+
- Keep mocks simple and focused
|
|
71
|
+
|
|
72
|
+
## Coverage Guidelines
|
|
73
|
+
|
|
74
|
+
| Type | Target |
|
|
75
|
+
|------|--------|
|
|
76
|
+
| Unit | 80%+ |
|
|
77
|
+
| Integration | Critical paths |
|
|
78
|
+
| E2E | Key user flows |
|
|
79
|
+
|
|
80
|
+
## Test Commands
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Run all tests
|
|
84
|
+
npm test
|
|
85
|
+
|
|
86
|
+
# Run with coverage
|
|
87
|
+
npm test -- --coverage
|
|
88
|
+
|
|
89
|
+
# Run specific test file
|
|
90
|
+
npm test -- user.test.ts
|
|
91
|
+
|
|
92
|
+
# Run tests in watch mode
|
|
93
|
+
npm test -- --watch
|
|
94
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openvibe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "OpenVibe - AI Coding Assistant CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@mariozechner/jiti": "^2.6.2",
|
|
44
44
|
"@mariozechner/pi-agent-core": "^0.57.1",
|
|
45
|
-
"@mariozechner/pi-ai": "^0.
|
|
45
|
+
"@mariozechner/pi-ai": "^0.59.0",
|
|
46
46
|
"@mariozechner/pi-tui": "^0.57.1",
|
|
47
47
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
48
48
|
"chalk": "^5.5.0",
|