@xingyu.wang/evoskills 3.0.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.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/evoskills +51 -15
  3. package/package.json +1 -1
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/EXECUTION_RULES.md` (optional safety guardrails)
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
- **Three-layer architecture:**
57
- 1. **AI Constitution** - Evolution principles (always active, cannot be disabled)
58
- 2. **Execution Rules** - 4 optional safety guardrails (can be removed if not needed)
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): always installed
61
- - Required System (4): safety/runtime baseline
62
- - Optional (8): user-selectable workflow skills
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.
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="3.0.0"
6
+ CLI_VERSION="3.0.1"
7
7
 
8
8
  # Project config file (in current directory)
9
9
  PROJECT_CONFIG_FILE=".evoskills-config.json"
@@ -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 "$skills_repo/raw/main/.github/AI_CONSTITUTION.md" > ".github/AI_CONSTITUTION.md" 2>/dev/null; then
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
- create_execution_rules_if_missing() {
156
- if [ ! -f ".github/EXECUTION_RULES.md" ]; then
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 "$skills_repo/raw/main/.github/EXECUTION_RULES.md" > ".github/EXECUTION_RULES.md" 2>/dev/null; then
161
- print_success "Downloaded .github/EXECUTION_RULES.md"
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
- print_warn "Could not download execution rules (optional)"
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
- if curl -sf "$skills_repo/raw/main/.agent/skills/$skill/SKILL.md" > "$SKILLS_DIR/$skill/SKILL.md" 2>/dev/null; then
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
- if curl -sf "$skills_repo/raw/main/.agent/skills/$skill/references/" &>/dev/null; then
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
- curl -sf "$skills_repo/raw/main/.agent/skills/$skill/references/$ref_file" > "$SKILLS_DIR/$skill/references/$ref_file" 2>/dev/null || true
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
- if curl -sf "$skills_repo/raw/main/.agent/skills/$skill/scripts/" &>/dev/null; then
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
- curl -sf "$skills_repo/raw/main/.agent/skills/$skill/scripts/$script_file" > "$SKILLS_DIR/$skill/scripts/$script_file" 2>/dev/null || true
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
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": "$(get_config_value 'skillsRepo')"
506
+ "skillsRepo": "$skills_repo"
471
507
  }
472
508
  EOF
473
509
 
474
510
  create_constitution_if_missing
475
- create_execution_rules_if_missing
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
- create_execution_rules_if_missing
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingyu.wang/evoskills",
3
- "version": "3.0.0",
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": {