@xingyu.wang/evoskills 2.2.0 → 3.0.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/.github/AI_INITIALIZATION.md +163 -0
- package/README.md +10 -10
- package/evoskills +54 -18
- package/package.json +4 -4
|
@@ -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
|
@@ -49,17 +49,17 @@ This will:
|
|
|
49
49
|
- ✅ Create `.agent/skills/` directory (skills installed from GitHub)
|
|
50
50
|
- ✅ Generate `AGENTS.md` at project root (openskills-compatible skill registry)
|
|
51
51
|
- ✅ Download `.github/AI_CONSTITUTION.md` (core evolution mechanism)
|
|
52
|
-
- ✅ Download `.github/
|
|
52
|
+
- ✅ Download `.github/AI_INITIALIZATION.md` (mandatory 4-skill initialization protocol)
|
|
53
53
|
- ✅ Create `.github/copilot-instructions.md` (entry point for the system)
|
|
54
54
|
- ✅ Save configuration to `.evoskills-config.json`
|
|
55
55
|
|
|
56
|
-
**
|
|
57
|
-
1. **AI Constitution** -
|
|
58
|
-
2. **
|
|
56
|
+
**Architecture:**
|
|
57
|
+
1. **AI Constitution** - Core evolution principles (always active)
|
|
58
|
+
2. **Initialization Protocol** - Mandatory 4-skill execution sequence with verifiable markers
|
|
59
59
|
3. **Skills** - Reusable capabilities with 3 tiers:
|
|
60
|
-
- Core (2):
|
|
61
|
-
- Required System (4): safety/runtime baseline
|
|
62
|
-
- Optional (8): user-selectable workflow
|
|
60
|
+
- Core (2): evolution infrastructure
|
|
61
|
+
- Required System (4): safety/runtime baseline (enforced by initialization protocol)
|
|
62
|
+
- Optional (8): user-selectable workflow enhancements
|
|
63
63
|
|
|
64
64
|
## 📚 Usage
|
|
65
65
|
|
|
@@ -144,7 +144,7 @@ evoskills intelligently preserves your customizations during updates:
|
|
|
144
144
|
|
|
145
145
|
### copilot-instructions.md Protection
|
|
146
146
|
- New file: Creates standard template with required references
|
|
147
|
-
- Existing file: Checks for `AI_CONSTITUTION.md` and `AGENTS.md` references
|
|
147
|
+
- Existing file: Checks for `AI_CONSTITUTION.md`, `AI_INITIALIZATION.md`, and `AGENTS.md` references
|
|
148
148
|
- Only appends missing references, never overwrites existing content
|
|
149
149
|
|
|
150
150
|
**Example**: You can safely add your own skill groups to `AGENTS.md` - evoskills updates won't touch them.
|
|
@@ -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.1"
|
|
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/
|
|
@@ -90,6 +90,15 @@ ensure_layout() {
|
|
|
90
90
|
mkdir -p ".github"
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
github_raw_url() {
|
|
94
|
+
local repo_url="$1"
|
|
95
|
+
local path="$2"
|
|
96
|
+
# Convert https://github.com/user/repo to https://raw.githubusercontent.com/user/repo/main/path
|
|
97
|
+
local raw_repo
|
|
98
|
+
raw_repo=$(echo "$repo_url" | sed 's|https://github.com/|https://raw.githubusercontent.com/|' | sed 's|\.git$||')
|
|
99
|
+
echo "$raw_repo/main/$path"
|
|
100
|
+
}
|
|
101
|
+
|
|
93
102
|
get_config_value() {
|
|
94
103
|
local key="$1"
|
|
95
104
|
|
|
@@ -138,8 +147,10 @@ create_constitution_if_missing() {
|
|
|
138
147
|
if [ ! -f ".github/AI_CONSTITUTION.md" ]; then
|
|
139
148
|
local skills_repo
|
|
140
149
|
skills_repo=$(get_config_value "skillsRepo")
|
|
150
|
+
local raw_url
|
|
151
|
+
raw_url=$(github_raw_url "$skills_repo" ".github/AI_CONSTITUTION.md")
|
|
141
152
|
|
|
142
|
-
if curl -sf "$
|
|
153
|
+
if curl -sf "$raw_url" > ".github/AI_CONSTITUTION.md" 2>/dev/null; then
|
|
143
154
|
print_success "Downloaded .github/AI_CONSTITUTION.md"
|
|
144
155
|
else
|
|
145
156
|
cat > ".github/AI_CONSTITUTION.md" << 'EOF'
|
|
@@ -152,15 +163,22 @@ EOF
|
|
|
152
163
|
fi
|
|
153
164
|
}
|
|
154
165
|
|
|
155
|
-
|
|
156
|
-
if [ ! -f ".github/
|
|
166
|
+
create_initialization_if_missing() {
|
|
167
|
+
if [ ! -f ".github/AI_INITIALIZATION.md" ]; then
|
|
157
168
|
local skills_repo
|
|
158
169
|
skills_repo=$(get_config_value "skillsRepo")
|
|
170
|
+
local raw_url
|
|
171
|
+
raw_url=$(github_raw_url "$skills_repo" ".github/AI_INITIALIZATION.md")
|
|
159
172
|
|
|
160
|
-
if curl -sf "$
|
|
161
|
-
print_success "Downloaded .github/
|
|
173
|
+
if curl -sf "$raw_url" > ".github/AI_INITIALIZATION.md" 2>/dev/null; then
|
|
174
|
+
print_success "Downloaded .github/AI_INITIALIZATION.md"
|
|
162
175
|
else
|
|
163
|
-
|
|
176
|
+
cat > ".github/AI_INITIALIZATION.md" << 'EOF'
|
|
177
|
+
# AI Initialization Protocol
|
|
178
|
+
|
|
179
|
+
Please sync the latest AI_INITIALIZATION.md from the evoskills repository.
|
|
180
|
+
EOF
|
|
181
|
+
print_warn "Could not download initialization protocol; created placeholder"
|
|
164
182
|
fi
|
|
165
183
|
fi
|
|
166
184
|
}
|
|
@@ -391,25 +409,35 @@ install_skill_github() {
|
|
|
391
409
|
mkdir -p "$SKILLS_DIR/$skill"
|
|
392
410
|
|
|
393
411
|
# Try to download SKILL.md and references from GitHub
|
|
394
|
-
|
|
412
|
+
local raw_url
|
|
413
|
+
raw_url=$(github_raw_url "$skills_repo" ".agent/skills/$skill/SKILL.md")
|
|
414
|
+
if curl -sf "$raw_url" > "$SKILLS_DIR/$skill/SKILL.md" 2>/dev/null; then
|
|
395
415
|
print_success "Installed skill: $skill"
|
|
396
416
|
|
|
397
417
|
# Try to download references/ if present
|
|
398
|
-
|
|
418
|
+
local ref_url
|
|
419
|
+
ref_url=$(github_raw_url "$skills_repo" ".agent/skills/$skill/references/")
|
|
420
|
+
if curl -sf "$ref_url" &>/dev/null; then
|
|
399
421
|
print_info "Downloading skill references..."
|
|
400
422
|
mkdir -p "$SKILLS_DIR/$skill/references"
|
|
401
423
|
# Download common reference files
|
|
402
424
|
for ref_file in "*.md"; do
|
|
403
|
-
|
|
425
|
+
local ref_file_url
|
|
426
|
+
ref_file_url=$(github_raw_url "$skills_repo" ".agent/skills/$skill/references/$ref_file")
|
|
427
|
+
curl -sf "$ref_file_url" > "$SKILLS_DIR/$skill/references/$ref_file" 2>/dev/null || true
|
|
404
428
|
done
|
|
405
429
|
fi
|
|
406
430
|
|
|
407
431
|
# Try to download scripts/ if present
|
|
408
|
-
|
|
432
|
+
local script_url
|
|
433
|
+
script_url=$(github_raw_url "$skills_repo" ".agent/skills/$skill/scripts/")
|
|
434
|
+
if curl -sf "$script_url" &>/dev/null; then
|
|
409
435
|
print_info "Downloading skill scripts..."
|
|
410
436
|
mkdir -p "$SKILLS_DIR/$skill/scripts"
|
|
411
437
|
for script_file in "*.sh"; do
|
|
412
|
-
|
|
438
|
+
local script_file_url
|
|
439
|
+
script_file_url=$(github_raw_url "$skills_repo" ".agent/skills/$skill/scripts/$script_file")
|
|
440
|
+
curl -sf "$script_file_url" > "$SKILLS_DIR/$skill/scripts/$script_file" 2>/dev/null || true
|
|
413
441
|
done
|
|
414
442
|
fi
|
|
415
443
|
else
|
|
@@ -461,18 +489,26 @@ cmd_init() {
|
|
|
461
489
|
|
|
462
490
|
ensure_layout
|
|
463
491
|
|
|
492
|
+
# Initialize config with default repository if not already set
|
|
493
|
+
local skills_repo
|
|
494
|
+
if [ -z "$custom_repo" ]; then
|
|
495
|
+
skills_repo="$DEFAULT_SKILLS_REPO"
|
|
496
|
+
else
|
|
497
|
+
skills_repo="$custom_repo"
|
|
498
|
+
fi
|
|
499
|
+
|
|
464
500
|
cat > "$PROJECT_CONFIG_FILE" << EOF
|
|
465
501
|
{
|
|
466
|
-
"version": "
|
|
502
|
+
"version": "3.0.0",
|
|
467
503
|
"installedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
468
504
|
"skillsDir": ".agent/skills",
|
|
469
505
|
"openskillsCompatible": true,
|
|
470
|
-
"skillsRepo": "$
|
|
506
|
+
"skillsRepo": "$skills_repo"
|
|
471
507
|
}
|
|
472
508
|
EOF
|
|
473
509
|
|
|
474
510
|
create_constitution_if_missing
|
|
475
|
-
|
|
511
|
+
create_initialization_if_missing
|
|
476
512
|
create_copilot_instructions_if_missing
|
|
477
513
|
|
|
478
514
|
print_info "Installing core skills..."
|
|
@@ -601,7 +637,7 @@ cmd_update() {
|
|
|
601
637
|
|
|
602
638
|
ensure_layout
|
|
603
639
|
create_constitution_if_missing
|
|
604
|
-
|
|
640
|
+
create_initialization_if_missing
|
|
605
641
|
create_copilot_instructions_if_missing
|
|
606
642
|
|
|
607
643
|
if [ -n "$skill" ]; then
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingyu.wang/evoskills",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
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
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"version:patch": "npm version patch -m 'chore(release): bump version to %s'",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"README.md",
|
|
18
18
|
"LICENSE",
|
|
19
19
|
".github/AI_CONSTITUTION.md",
|
|
20
|
-
".github/
|
|
20
|
+
".github/AI_INITIALIZATION.md"
|
|
21
21
|
],
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/wxy/
|
|
30
|
+
"url": "git+https://github.com/wxy/evoskills.git"
|
|
31
31
|
}
|
|
32
32
|
}
|