@xingyu.wang/evoskills 2.0.0 → 2.2.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.
@@ -37,6 +37,44 @@ Without evolution, the AI repeats the same mistakes. With evolution, every error
37
37
 
38
38
  ---
39
39
 
40
+ ## Core Evolution Infrastructure
41
+
42
+ The AI evolution mechanism relies on **two core skills** that are always active and non-negotiable:
43
+
44
+ ### 1. **_evolution-core** (Tier 1)
45
+ - **Purpose**: Identifies improvement opportunities in code, processes, and workflows
46
+ - **Responsibility**: Pattern recognition, root cause analysis, and improvement proposal
47
+ - **Activation**: Triggered by errors, user feedback, or complex workflows
48
+ - **Output**: Constitutional updates, new skills, or instruction refinements
49
+ - **Critical**: This is the system's learning mechanism - without it, evolution cannot happen
50
+
51
+ ### 2. **_skills-manager** (Tier 1)
52
+ - **Purpose**: Manages the complete skill lifecycle (init, install, remove, update)
53
+ - **Responsibility**: Skill registry maintenance, dependency tracking, skill contributions
54
+ - **Activation**: Triggered when new skills are created, modified, or removed
55
+ - **Output**: Updated AGENTS.md, skill documentation, registry consistency
56
+ - **Critical**: This is the system's knowledge infrastructure - without it, skills cannot be discovered or maintained
57
+
58
+ ### How They Work Together
59
+
60
+ **Evolution Loop** in the AI system:
61
+
62
+ ```
63
+ Error/Feedback → _evolution-core detects pattern
64
+
65
+ Creates/improves skill
66
+
67
+ _skills-manager registers it
68
+
69
+ Skill becomes available for AI use
70
+
71
+ Subsequent sessions benefit
72
+ ```
73
+
74
+ These two skills form the **evolutionary backbone** of the system. All other skills exist to enhance specific workflows, but these two core skills enable the entire evolution mechanism itself.
75
+
76
+ ---
77
+
40
78
  ## Skill Modularity Principle
41
79
 
42
80
  **Key design decisions:**
@@ -50,6 +88,26 @@ When creating skill `_my-skill`, you only need to declare its tier and dependenc
50
88
 
51
89
  ---
52
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
+
53
111
  ## Glossary
54
112
 
55
113
  | Term | Definition |
@@ -63,4 +121,4 @@ When creating skill `_my-skill`, you only need to declare its tier and dependenc
63
121
 
64
122
  > **Version**: 2.1
65
123
  > **Focus**: Evolution mechanism only (lean and focused)
66
- > **Related Files**: See `.github/EXECUTION_RULES.md` for mandatory rules, `AGENTS.md` for skill registry
124
+ > **Related Files**: `.github/AI_INITIALIZATION.md`, `.github/copilot-instructions.md`, `AGENTS.md`
package/README.md CHANGED
@@ -56,7 +56,10 @@ This will:
56
56
  **Three-layer architecture:**
57
57
  1. **AI Constitution** - Evolution principles (always active, cannot be disabled)
58
58
  2. **Execution Rules** - 4 optional safety guardrails (can be removed if not needed)
59
- 3. **Skills** - Reusable capabilities (5 core required, 9 optional)
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
63
 
61
64
  ## 📚 Usage
62
65
 
@@ -67,6 +70,15 @@ evoskills list # Show all available skills
67
70
  evoskills list --installed # Show installed skills only
68
71
  ```
69
72
 
73
+ ### Initialize by Tier
74
+
75
+ ```bash
76
+ evoskills init # Install core + required + optional (default)
77
+ evoskills init --core-only # Install only core skills (2)
78
+ evoskills init --required-only # Install core + required system skills (6)
79
+ evoskills init --skills _git-commit,_pr-creator # Install selected optional skills
80
+ ```
81
+
70
82
  ### Install/Remove Skills
71
83
 
72
84
  ```bash
@@ -81,6 +93,12 @@ evoskills update # Update CLI (via npm) and refresh all installe
81
93
  evoskills update _git-commit # Update specific skill only
82
94
  ```
83
95
 
96
+ ### npm Release Authentication (GitHub Actions)
97
+
98
+ - Preferred: **Trusted Publishing (OIDC)**, no token needed
99
+ - Fallback: **Granular access token** stored as `NPM_TOKEN` in GitHub Secrets
100
+ - Note: npm legacy tokens were removed (Nov 2025), so "Automation token" may not appear in UI
101
+
84
102
  ### Use Custom Skill Repository
85
103
 
86
104
  ```bash
@@ -92,31 +110,27 @@ The repository URL is auto-saved to `.evoskills-config.json`.
92
110
 
93
111
  ## 🎯 Available Skills
94
112
 
95
- The default repository provides 14 skills across 5 categories:
113
+ The default repository provides 14 skills in a 3-tier model:
96
114
 
97
- ### Core Skills (Required - Auto-installed)
98
- - `_instruction-guard` - Ensures project instructions are always read before responses
99
- - `_context-ack` - Formats responses with headers and reference lists
100
- - `_file-output-guard` - Prevents accidental file overwrites
101
- - `_execution-precheck` - Validates dependencies before executing commands
115
+ ### Tier 1: Core Skills (2)
102
116
  - `_evolution-core` - Identifies improvement opportunities and proposes enhancements
117
+ - `_skills-manager` - Manages skill lifecycle (install/remove/update/contribute)
103
118
 
104
- ### Git & Version Control
105
- - `_git-commit` - Conventional commits workflow
106
- - `_pr-creator` - Automate PR generation
107
-
108
- ### Release Management
109
- - `_release-process` - Complete release workflow
119
+ ### Tier 2: Required System Skills (4)
120
+ - `_instruction-guard` - Ensures project instructions are applied before responses
121
+ - `_context-ack` - Formats responses with clear context and references
122
+ - `_file-output-guard` - Safeguards file operations and output behavior
123
+ - `_execution-precheck` - Validates dependencies before execution
110
124
 
111
- ### Code Quality
112
- - `_code-health-check` - Quality checks before commit
113
- - `_typescript-type-safety` - TypeScript type safety guidelines
114
-
115
- ### Workflow & Automation
116
- - `_change-summary` - Summarize work sessions
117
- - `_traceability-check` - Ensure decisions are documented
118
- - `_session-safety` - Prevent state violations
119
- - `_skills-manager` - Manage skills lifecycle
125
+ ### Tier 3: Optional Skills (8)
126
+ - `_git-commit` - Conventional commits workflow
127
+ - `_pr-creator` - PR generation workflow
128
+ - `_release-process` - End-to-end release process
129
+ - `_code-health-check` - Pre-commit quality checks
130
+ - `_typescript-type-safety` - Type safety and mock patterns
131
+ - `_change-summary` - Session change summarization
132
+ - `_traceability-check` - Decision traceability checks
133
+ - `_session-safety` - Session state consistency safeguards
120
134
 
121
135
  ## 🛡️ User Content Protection
122
136
 
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="2.0.0"
6
+ CLI_VERSION="2.1.0"
7
7
 
8
8
  # Project config file (in current directory)
9
9
  PROJECT_CONFIG_FILE=".evoskills-config.json"
@@ -21,11 +21,15 @@ RED='\033[0;31m'
21
21
  NC='\033[0m'
22
22
 
23
23
  CORE_SKILLS=(
24
+ "_evolution-core"
25
+ "_skills-manager"
26
+ )
27
+
28
+ REQUIRED_SKILLS=(
24
29
  "_instruction-guard"
25
30
  "_context-ack"
26
31
  "_file-output-guard"
27
32
  "_execution-precheck"
28
- "_evolution-core"
29
33
  )
30
34
 
31
35
  OPTIONAL_SKILLS=(
@@ -37,7 +41,6 @@ OPTIONAL_SKILLS=(
37
41
  "_change-summary"
38
42
  "_traceability-check"
39
43
  "_session-safety"
40
- "_skills-manager"
41
44
  )
42
45
 
43
46
  print_success() { echo -e "${GREEN}✅ $*${NC}"; }
@@ -54,7 +57,8 @@ Usage:
54
57
 
55
58
  Commands:
56
59
  init [OPTIONS] Initialize project skills
57
- --core-only Install core required skills only
60
+ --core-only Install core skills only (2 skills)
61
+ --required-only Install core + required system skills
58
62
  --skills <list> Install selected skills (comma-separated)
59
63
  --all Install all skills (default)
60
64
  --repo <url> Use custom skill repository (saved to .evoskills-config.json)
@@ -77,6 +81,7 @@ Notes:
77
81
  - Repository URL is auto-saved in .evoskills-config.json when using --repo
78
82
  - 'update' without args refreshes CLI (via npm) and all skills from saved repo
79
83
  - AGENTS.md is auto-generated for openskills compatibility
84
+ - Skill tiers: Core (2), Required System (4), Optional (8)
80
85
  EOF
81
86
  }
82
87
 
@@ -180,7 +185,7 @@ For additional safety guardrails, see:
180
185
  ## Skills Registry
181
186
 
182
187
  For available skills and how they work:
183
- - `AGENTS.md` - Skill registry with `_evolution-core` as the core skill
188
+ - `AGENTS.md` - Skill registry with core, required system, and optional skills
184
189
 
185
190
  ---
186
191
 
@@ -228,8 +233,46 @@ EOF
228
233
  }
229
234
 
230
235
  write_agents_registry() {
231
- local installed_list
232
- installed_list=$(find "$SKILLS_DIR" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; 2>/dev/null | sort)
236
+ local is_installed
237
+ is_installed() {
238
+ [ -d "$SKILLS_DIR/$1" ]
239
+ }
240
+
241
+ local skill_description
242
+ skill_description() {
243
+ case "$1" in
244
+ _evolution-core) echo "Identify improvement opportunities and patterns in code and processes. Proposes enhancements based on architectural patterns and best practices. Core mechanism of continuous system evolution." ;;
245
+ _skills-manager) echo "Core skill manager for evoskills. Handles skill lifecycle (init, install, remove, update) and skill contributions. Core mechanism managing the skill ecosystem." ;;
246
+ _instruction-guard) echo "Read and apply directives before processing each request. Enforces instruction hierarchy and prevents instruction conflicts." ;;
247
+ _context-ack) echo "Format responses with clear headers, footers, and reference lists. Ensures proper context acknowledgment and response structure." ;;
248
+ _file-output-guard) echo "Validate and safeguard all file creation operations. Prevents unsafe file creation patterns and unauthorized modifications." ;;
249
+ _execution-precheck) echo "Validate dependencies and runtime requirements before executing commands. Ensures all prerequisites are met before task execution." ;;
250
+ _git-commit) echo "Implement conventional commits workflow. Ensures proper commit message formatting and semantic versioning compliance." ;;
251
+ _pr-creator) echo "Automate PR generation with version detection and release notes. Streamlines contributions and version management." ;;
252
+ _release-process) echo "Execute complete release workflow. Coordinates versioning, tagging, and publication of releases." ;;
253
+ _code-health-check) echo "Perform quality checks before commit. Validates code standards, security, and architectural consistency." ;;
254
+ _typescript-type-safety) echo "Enforce TypeScript type safety guidelines. Ensures proper typing and prevents type-related runtime errors." ;;
255
+ _change-summary) echo "Summarize completed work sessions. Provides concise summaries of changes and progress made." ;;
256
+ _traceability-check) echo "Ensure all decisions are properly documented. Validates decision traceability and documentation completeness." ;;
257
+ _session-safety) echo "Prevent state violations and session inconsistencies. Maintains context integrity and prevents conflicting actions." ;;
258
+ *) echo "Skill: $1" ;;
259
+ esac
260
+ }
261
+
262
+ local add_skill_entry
263
+ add_skill_entry() {
264
+ local skill="$1"
265
+ if is_installed "$skill"; then
266
+ cat >> "$temp_content" << EOF
267
+ <skill>
268
+ <name>$skill</name>
269
+ <description>$(skill_description "$skill")</description>
270
+ <location>project</location>
271
+ </skill>
272
+
273
+ EOF
274
+ fi
275
+ }
233
276
 
234
277
  # Generate our skills section in a temp file
235
278
  local temp_content=".evoskills-section.tmp"
@@ -259,21 +302,33 @@ Usage notes:
259
302
 
260
303
  <available_skills>
261
304
 
305
+ <!-- Tier 1: Core Skills (2) - Evolution Infrastructure -->
306
+
262
307
  MARKER_EOF
263
308
 
264
- # Add installed skills
265
- if [ -n "$installed_list" ]; then
266
- while IFS= read -r skill; do
267
- cat >> "$temp_content" << EOF
268
- <skill>
269
- <name>$skill</name>
270
- <description>Skill: $skill</description>
271
- <location>project</location>
272
- </skill>
309
+ for skill in "${CORE_SKILLS[@]}"; do
310
+ add_skill_entry "$skill"
311
+ done
273
312
 
274
- EOF
275
- done <<< "$installed_list"
276
- fi
313
+ cat >> "$temp_content" << 'MARKER_EOF'
314
+
315
+ <!-- Tier 2: System Skills (4) - Required for Safe Operation -->
316
+
317
+ MARKER_EOF
318
+
319
+ for skill in "${REQUIRED_SKILLS[@]}"; do
320
+ add_skill_entry "$skill"
321
+ done
322
+
323
+ cat >> "$temp_content" << 'MARKER_EOF'
324
+
325
+ <!-- Tier 3: Optional Skills (8) - User-Selectable Enhancements -->
326
+
327
+ MARKER_EOF
328
+
329
+ for skill in "${OPTIONAL_SKILLS[@]}"; do
330
+ add_skill_entry "$skill"
331
+ done
277
332
 
278
333
  cat >> "$temp_content" << 'MARKER_EOF'
279
334
 
@@ -366,6 +421,7 @@ install_skill_github() {
366
421
 
367
422
  cmd_init() {
368
423
  local core_only=false
424
+ local required_only=false
369
425
  local skills=""
370
426
  local install_all=true
371
427
  local custom_repo=""
@@ -377,6 +433,11 @@ cmd_init() {
377
433
  install_all=false
378
434
  shift
379
435
  ;;
436
+ --required-only)
437
+ required_only=true
438
+ install_all=false
439
+ shift
440
+ ;;
380
441
  --skills)
381
442
  skills="$2"
382
443
  install_all=false
@@ -402,7 +463,7 @@ cmd_init() {
402
463
 
403
464
  cat > "$PROJECT_CONFIG_FILE" << EOF
404
465
  {
405
- "version": "1.1.0",
466
+ "version": "2.1.0",
406
467
  "installedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
407
468
  "skillsDir": ".agent/skills",
408
469
  "openskillsCompatible": true,
@@ -420,6 +481,13 @@ EOF
420
481
  done
421
482
 
422
483
  if [ "$core_only" = false ]; then
484
+ print_info "Installing required system skills..."
485
+ for skill in "${REQUIRED_SKILLS[@]}"; do
486
+ install_skill_github "$skill"
487
+ done
488
+ fi
489
+
490
+ if [ "$core_only" = false ] && [ "$required_only" = false ]; then
423
491
  if [ -n "$skills" ]; then
424
492
  print_info "Installing selected skills..."
425
493
  for skill in ${skills//,/ }; do
@@ -461,6 +529,11 @@ cmd_list() {
461
529
  echo " - $skill"
462
530
  done
463
531
 
532
+ echo "Required system skills:"
533
+ for skill in "${REQUIRED_SKILLS[@]}"; do
534
+ echo " - $skill"
535
+ done
536
+
464
537
  echo "Optional skills:"
465
538
  for skill in "${OPTIONAL_SKILLS[@]}"; do
466
539
  echo " - $skill"
@@ -481,8 +554,8 @@ cmd_remove() {
481
554
  [ -z "$skill" ] && { print_error "Usage: evoskills remove <skill>"; exit 1; }
482
555
 
483
556
  case "$skill" in
484
- _instruction-guard|_context-ack|_file-output-guard|_execution-precheck|_evolution-core)
485
- print_error "Cannot remove core skill: $skill"
557
+ _evolution-core|_skills-manager|_instruction-guard|_context-ack|_file-output-guard|_execution-precheck)
558
+ print_error "Cannot remove core/required skill: $skill"
486
559
  exit 1
487
560
  ;;
488
561
  esac
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@xingyu.wang/evoskills",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "Evolution Skills CLI for installing and managing openskills-compatible AI skills.",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "evoskills": "./evoskills"
8
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"
14
+ },
9
15
  "files": [
10
16
  "evoskills",
11
17
  "README.md",
@@ -21,6 +27,6 @@
21
27
  },
22
28
  "repository": {
23
29
  "type": "git",
24
- "url": "https://github.com/xingyu.wang/copilot-evolution-skills.git"
30
+ "url": "https://github.com/wxy/copilot-evolution-skills.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