@xingyu.wang/evoskills 2.1.0 → 3.0.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/.github/AI_CONSTITUTION.md +21 -1
- package/.github/AI_INITIALIZATION.md +163 -0
- package/README.md +2 -2
- package/evoskills +4 -4
- package/package.json +10 -4
- package/.github/EXECUTION_RULES.md +0 -105
|
@@ -88,6 +88,26 @@ When creating skill `_my-skill`, you only need to declare its tier and dependenc
|
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
91
|
+
## Mandatory Initialization Binding
|
|
92
|
+
|
|
93
|
+
The constitution defines **why** evolution and discipline are required.
|
|
94
|
+
The initialization protocol defines **how** every response is enforced.
|
|
95
|
+
|
|
96
|
+
### Authority and layering
|
|
97
|
+
|
|
98
|
+
1. **Constitution** (`.github/AI_CONSTITUTION.md`): immutable evolution principles
|
|
99
|
+
2. **Initialization protocol** (`.github/AI_INITIALIZATION.md`): mandatory 4-phase execution contract
|
|
100
|
+
3. **Instruction entrypoint** (`.github/copilot-instructions.md`): active loading and per-response gate
|
|
101
|
+
4. **Skill definitions** (`.agent/skills/*/SKILL.md`): implementation details
|
|
102
|
+
|
|
103
|
+
### Compliance contract
|
|
104
|
+
|
|
105
|
+
- A response is valid only when it satisfies all required initialization markers and checks.
|
|
106
|
+
- If any required phase is missing, execution must stop and resume from the missing phase.
|
|
107
|
+
- Evolution outputs (new rules/skills) must remain compatible with this enforcement chain.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
91
111
|
## Glossary
|
|
92
112
|
|
|
93
113
|
| Term | Definition |
|
|
@@ -101,4 +121,4 @@ When creating skill `_my-skill`, you only need to declare its tier and dependenc
|
|
|
101
121
|
|
|
102
122
|
> **Version**: 2.1
|
|
103
123
|
> **Focus**: Evolution mechanism only (lean and focused)
|
|
104
|
-
> **Related Files**:
|
|
124
|
+
> **Related Files**: `.github/AI_INITIALIZATION.md`, `.github/copilot-instructions.md`, `AGENTS.md`
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Required Initialization Protocol
|
|
2
|
+
|
|
3
|
+
> This file defines the **mandatory initialization sequence** that MUST execute before every AI response. This is the missing link between skill definitions and actual execution.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Problem Statement
|
|
8
|
+
|
|
9
|
+
**Situation**: Four Tier 2 system skills are defined with clear requirements, but there was no explicit rule forcing them to activate on every response. This created a gap where:
|
|
10
|
+
- Skills were loaded into context ✅
|
|
11
|
+
- Skills were documented fully ✅
|
|
12
|
+
- But they weren't **automatically executed** ❌
|
|
13
|
+
|
|
14
|
+
**Solution**: This file establishes a **forced initialization protocol** that cannot be bypassed.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## The Mandatory 4-Skill Initialization Sequence
|
|
19
|
+
|
|
20
|
+
Before generating ANY response, the AI MUST execute these skills **in this exact order**:
|
|
21
|
+
|
|
22
|
+
### Non-skippable Enforcement (Hard Rules)
|
|
23
|
+
|
|
24
|
+
The protocol is **fail-closed** and must be treated as executable constraints, not guidance:
|
|
25
|
+
|
|
26
|
+
1. **Do not draft final content** before completing all 4 phases in order.
|
|
27
|
+
2. If any phase is missing, **run the missing phase first**, then continue.
|
|
28
|
+
3. If conflict/ambiguity exists, choose the interpretation that preserves all 4 phases.
|
|
29
|
+
4. Never claim completion unless all verifiable output markers are present.
|
|
30
|
+
|
|
31
|
+
### Phase 1: Load Instructions (_instruction-guard)
|
|
32
|
+
```
|
|
33
|
+
Execute: read_file('.github/copilot-instructions.md')
|
|
34
|
+
Verify: Confirm understanding of 3-5 key project constraints
|
|
35
|
+
Status: Must complete before proceeding
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Phase 2: Load Core Rules (_execution-precheck)
|
|
39
|
+
```
|
|
40
|
+
Execute: Complete the 6-step self-check from _execution-precheck/SKILL.md
|
|
41
|
+
Verify: Yes to all 6 steps, especially Step 5 (truthfulness test)
|
|
42
|
+
Status: Must complete before drafting response
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Phase 3: Format Response (_context-ack)
|
|
46
|
+
```
|
|
47
|
+
Execute: Prepare response structure per _context-ack/SKILL.md
|
|
48
|
+
Structure:
|
|
49
|
+
Line 1: ✨ 已启用上下文校验
|
|
50
|
+
Line 2: [blank]
|
|
51
|
+
Line 3: 尊敬的主人:
|
|
52
|
+
Line 4-N: Main content
|
|
53
|
+
Last lines: 已读指令 / 已启用技能 footer lines
|
|
54
|
+
Status: Must be applied to final output
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Phase 4: Validate Operations (_file-output-guard)
|
|
58
|
+
```
|
|
59
|
+
Execute: Check _file-output-guard/SKILL.md constraints
|
|
60
|
+
If file ops needed:
|
|
61
|
+
- Use create_file or apply_patch only
|
|
62
|
+
- No HERE documents (cat > file << 'EOF')
|
|
63
|
+
- >5KB = segment into multiple write operations
|
|
64
|
+
Status: Must validate before executing file tools
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## When This Protocol Applies
|
|
70
|
+
|
|
71
|
+
**Mandatory scope**:
|
|
72
|
+
- ✅ All user requests without exception
|
|
73
|
+
- ✅ All types of responses (code, explanation, file creation, etc.)
|
|
74
|
+
- ✅ All conversation contexts
|
|
75
|
+
|
|
76
|
+
**Exceptions** (only if explicitly requested):
|
|
77
|
+
- User says: "Skip formatting for this response"
|
|
78
|
+
- User says: "No need for acknowledgment format"
|
|
79
|
+
- (Note: Even exceptions should include at least _instruction-guard and _execution-precheck)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Success Criteria
|
|
84
|
+
|
|
85
|
+
A response is compliant ONLY if:
|
|
86
|
+
|
|
87
|
+
- [ ] **_instruction-guard**: The response was generated AFTER reading `.github/copilot-instructions.md` (visible in "已读指令" section)
|
|
88
|
+
- [ ] **_execution-precheck**: All 6 steps documented; Step 5 (truthfulness) reflected honestly (visible in skill application)
|
|
89
|
+
- [ ] **_context-ack**: Proper format (prefix, honorific, diff footer) with only REAL file reads listed
|
|
90
|
+
- [ ] **_file-output-guard**: File operations use correct tools; large files segmented if needed
|
|
91
|
+
|
|
92
|
+
### Verifiable Output Markers (Required in every response)
|
|
93
|
+
|
|
94
|
+
A response is compliant only when all markers exist:
|
|
95
|
+
|
|
96
|
+
- First line: `✨ 已启用上下文校验`
|
|
97
|
+
- A standalone salutation line: `尊敬的主人:`
|
|
98
|
+
- Footer line: `已读指令:...` (only files actually read in this turn)
|
|
99
|
+
- Footer lines: one `已启用技能:技能名 - 本次作用` per actually used skill
|
|
100
|
+
|
|
101
|
+
If any marker is missing, the response is invalid and must be regenerated before sending.
|
|
102
|
+
|
|
103
|
+
### Pre-Send Gate (Mandatory checklist)
|
|
104
|
+
|
|
105
|
+
Before sending any response, confirm:
|
|
106
|
+
|
|
107
|
+
- [ ] `.github/copilot-instructions.md` was explicitly read this turn
|
|
108
|
+
- [ ] `_execution-precheck` 6-step self-check completed
|
|
109
|
+
- [ ] `_context-ack` format fully applied
|
|
110
|
+
- [ ] `_file-output-guard` constraints satisfied for any file operations
|
|
111
|
+
|
|
112
|
+
Do not bypass this checklist for speed.
|
|
113
|
+
|
|
114
|
+
## How to Verify Compliance
|
|
115
|
+
|
|
116
|
+
Users can quickly scan with this checklist:
|
|
117
|
+
```
|
|
118
|
+
✓ Does response start with "✨ 已启用上下文校验"? [_context-ack active]
|
|
119
|
+
✓ Does response list actual files read in footer? [_instruction-guard worked]
|
|
120
|
+
✓ Do listed skills match actual response content? [_execution-precheck truthful]
|
|
121
|
+
✓ No HERE documents in code blocks? [_file-output-guard enforced]
|
|
122
|
+
✓ No output over 20KB without segmentation? [_session-safety respected]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Integration with Other Systems
|
|
128
|
+
|
|
129
|
+
This **Initialization Protocol** is:
|
|
130
|
+
- **Above** skill definitions (more authoritative)
|
|
131
|
+
- **Below** the Constitution (doesn't modify evolution principles)
|
|
132
|
+
- **Separate from** EXECUTION_RULES.md (which was "optional"; this is "mandatory")
|
|
133
|
+
|
|
134
|
+
Think of it as the **missing layer** in the system architecture:
|
|
135
|
+
```
|
|
136
|
+
AI_CONSTITUTION.md (evolution principles)
|
|
137
|
+
↓
|
|
138
|
+
REQUIRED_INITIALIZATION.md (this file - forced sequence) 🆕
|
|
139
|
+
↓
|
|
140
|
+
EXECUTION_RULES.md / AGENTS.md (skill definitions)
|
|
141
|
+
↓
|
|
142
|
+
AI execution
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Key Enforcement Point
|
|
148
|
+
|
|
149
|
+
**Paradox to solve**: How can the AI "decide" to execute this protocol?
|
|
150
|
+
|
|
151
|
+
**Answer**: This file must be **listed in the copilot-instructions.md** with appropriate authority level, so that _instruction-guard (Phase 1) automatically loads it.
|
|
152
|
+
|
|
153
|
+
Once it's in the instruction chain, _execution-precheck (Phase 2) enforces the sequence.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Version & Status
|
|
158
|
+
|
|
159
|
+
- **Version**: 1.1
|
|
160
|
+
- **Status**: Active
|
|
161
|
+
- **Created**: 2026-03-05
|
|
162
|
+
- **Updated**: 2026-03-05
|
|
163
|
+
- **Purpose**: Enforce and verify mandatory initialization on every response
|
package/README.md
CHANGED
|
@@ -181,10 +181,10 @@ gh pr create --fill
|
|
|
181
181
|
|
|
182
182
|
## 📄 License
|
|
183
183
|
|
|
184
|
-
MIT © [
|
|
184
|
+
MIT © [wxy](https://github.com/wxy)
|
|
185
185
|
|
|
186
186
|
## 🔗 Links
|
|
187
187
|
|
|
188
188
|
- [npm Package](https://www.npmjs.com/package/@xingyu.wang/evoskills)
|
|
189
|
-
- [GitHub Repository](https://github.com/
|
|
189
|
+
- [GitHub Repository](https://github.com/wxy/evoskills)
|
|
190
190
|
- [Skill Definition Specification](SKILL_DEFINITION_SPECIFICATION.md)
|
package/evoskills
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
set -e
|
|
4
4
|
|
|
5
5
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
6
|
-
CLI_VERSION="
|
|
6
|
+
CLI_VERSION="3.0.0"
|
|
7
7
|
|
|
8
8
|
# Project config file (in current directory)
|
|
9
9
|
PROJECT_CONFIG_FILE=".evoskills-config.json"
|
|
@@ -12,7 +12,7 @@ AGENTS_DIR=".agent"
|
|
|
12
12
|
SKILLS_DIR="$AGENTS_DIR/skills"
|
|
13
13
|
|
|
14
14
|
# Default skill repository
|
|
15
|
-
DEFAULT_SKILLS_REPO="https://github.com/
|
|
15
|
+
DEFAULT_SKILLS_REPO="https://github.com/wxy/evoskills"
|
|
16
16
|
|
|
17
17
|
GREEN='\033[0;32m'
|
|
18
18
|
YELLOW='\033[1;33m'
|
|
@@ -74,7 +74,7 @@ Commands:
|
|
|
74
74
|
--version, -v Print CLI version
|
|
75
75
|
--help, -h Print this help
|
|
76
76
|
|
|
77
|
-
Default repository: https://github.com/
|
|
77
|
+
Default repository: https://github.com/wxy/evoskills
|
|
78
78
|
|
|
79
79
|
Notes:
|
|
80
80
|
- Skills are installed to .agent/skills/
|
|
@@ -463,7 +463,7 @@ cmd_init() {
|
|
|
463
463
|
|
|
464
464
|
cat > "$PROJECT_CONFIG_FILE" << EOF
|
|
465
465
|
{
|
|
466
|
-
"version": "
|
|
466
|
+
"version": "3.0.0",
|
|
467
467
|
"installedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
468
468
|
"skillsDir": ".agent/skills",
|
|
469
469
|
"openskillsCompatible": true,
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingyu.wang/evoskills",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Evolution Skills CLI for installing and managing openskills-compatible AI skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
|
-
"evoskills": "
|
|
7
|
+
"evoskills": "evoskills"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"version:patch": "npm version patch -m 'chore(release): bump version to %s'",
|
|
11
|
+
"version:minor": "npm version minor -m 'chore(release): bump version to %s'",
|
|
12
|
+
"version:major": "npm version major -m 'chore(release): bump version to %s'",
|
|
13
|
+
"postversion": "git push origin main --tags"
|
|
8
14
|
},
|
|
9
15
|
"files": [
|
|
10
16
|
"evoskills",
|
|
11
17
|
"README.md",
|
|
12
18
|
"LICENSE",
|
|
13
19
|
".github/AI_CONSTITUTION.md",
|
|
14
|
-
".github/
|
|
20
|
+
".github/AI_INITIALIZATION.md"
|
|
15
21
|
],
|
|
16
22
|
"engines": {
|
|
17
23
|
"node": ">=18"
|
|
@@ -21,6 +27,6 @@
|
|
|
21
27
|
},
|
|
22
28
|
"repository": {
|
|
23
29
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/wxy/
|
|
30
|
+
"url": "git+https://github.com/wxy/evoskills.git"
|
|
25
31
|
}
|
|
26
32
|
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Execution Rules
|
|
2
|
-
|
|
3
|
-
> Optional rules that enforce safe and predictable AI behavior. Install with evoskills; can be deleted if not needed for your use case.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
These 4 rules form the guardrails for reliable AI execution. They are **auto-enforced by the core system** when enabled, but can be selectively disabled or removed if your workflow doesn't require them.
|
|
10
|
-
|
|
11
|
-
**Install Status**: These rules are auto-installed by `evoskills init`. To disable, remove this file's entry from `.github/copilot-instructions.md`.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Rule 1: Instruction Guard (_instruction-guard)
|
|
16
|
-
|
|
17
|
-
**Purpose**: Ensure project context is always loaded before responding.
|
|
18
|
-
|
|
19
|
-
**When Active**: Before each response, if project instruction file (`.github/copilot-instructions.md`) is not in current context, read it immediately.
|
|
20
|
-
|
|
21
|
-
**Why**: Prevents deviations due to missing project-specific requirements.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Rule 2: Context Acknowledgment (_context-ack)
|
|
26
|
-
|
|
27
|
-
**Purpose**: Enable users to quickly verify the AI is following correct rules.
|
|
28
|
-
|
|
29
|
-
**When Active**: Each response must follow specified output format:
|
|
30
|
-
- Fixed prefix at start
|
|
31
|
-
- Polite address line
|
|
32
|
-
- Main content
|
|
33
|
-
- Reference list at end (showing which files/rules were consulted)
|
|
34
|
-
|
|
35
|
-
**Why**: Makes compliance transparent and auditable.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Rule 3: File Output Guard (_file-output-guard)
|
|
40
|
-
|
|
41
|
-
**Purpose**: Prevent accidental file overwrites and unsafe operations.
|
|
42
|
-
|
|
43
|
-
**When Active**:
|
|
44
|
-
- **Forbidden**: Using HERE documents for file creation (`cat > file << 'EOF'`)
|
|
45
|
-
- **Required**: Use `create_file` or `replace_string_in_file` tools only
|
|
46
|
-
- **Large Files**: Files >5KB must be segmented to same file to avoid session limits
|
|
47
|
-
|
|
48
|
-
**Why**: Ensures file operations are safe, traceable, and controllable.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Rule 4: Session Safety (_session-safety)
|
|
53
|
-
|
|
54
|
-
**Purpose**: Prevent session failure due to excessive output.
|
|
55
|
-
|
|
56
|
-
**When Active**: When estimated output length exceeds 5KB:
|
|
57
|
-
- Segment processing or write to file instead
|
|
58
|
-
- Don't output overly long content in single response
|
|
59
|
-
|
|
60
|
-
**Why**: Protects conversation session from breaking.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## How These Rules Work Together
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
Rule 1 (_instruction-guard)
|
|
68
|
-
↓ [load context]
|
|
69
|
-
Rule 2 (_context-ack)
|
|
70
|
-
↓ [format response]
|
|
71
|
-
Rule 3 (_file-output-guard)
|
|
72
|
-
↓ [file operations safe]
|
|
73
|
-
Rule 4 (_session-safety)
|
|
74
|
-
↓ [output within limits]
|
|
75
|
-
✅ Safe, predictable, auditable execution
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## When to Disable
|
|
81
|
-
|
|
82
|
-
You can safely remove this file's reference from `.github/copilot-instructions.md` if:
|
|
83
|
-
|
|
84
|
-
1. You're using the AI in personal projects with low risk tolerance
|
|
85
|
-
2. Your workflow doesn't need output format enforcement
|
|
86
|
-
3. You want maximum flexibility without guardrails
|
|
87
|
-
|
|
88
|
-
However, we recommend keeping at least **Rule 1** (_instruction-guard) enabled for project-based work.
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Relationship to Evolution
|
|
93
|
-
|
|
94
|
-
These rules are **separate from evolution**. Evolution (in AI_CONSTITUTION.md) happens automatically when triggers fire. These rules ensure safe execution during evolution and regular tasks.
|
|
95
|
-
|
|
96
|
-
Think of it this way:
|
|
97
|
-
- **Constitution** = "How the AI learns"
|
|
98
|
-
- **Execution Rules** = "How the AI operates safely"
|
|
99
|
-
- **Skills** = "What the AI does"
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
> **Version**: 1.0
|
|
104
|
-
> **Install Source**: evoskills (auto-installed with `evoskills init`)
|
|
105
|
-
> **Customization**: Can be extended in project-specific instruction files
|