arreio 1.0.0-dev.1 → 1.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/README.md CHANGED
@@ -17,7 +17,19 @@ Install Arreio as a dependency to enable all skills in your workspace:
17
17
  npm install arreio
18
18
  ```
19
19
 
20
- The post-install script will automatically copy all Arreio skills to your `.agents/skills` directory. This makes all four core skills available in your AI development environment:
20
+ Then initialize your project to set up Arreio workflows:
21
+
22
+ ```
23
+ /arreio-init
24
+ ```
25
+
26
+ Run this command in VS Code Copilot Chat to:
27
+
28
+ 1. Copy all Arreio skills to your `~/.agents/skills/` directory
29
+ 2. Create the project structure (`docs/plans/`, `docs/learn/`, etc.)
30
+ 3. Set up architectural documentation and index files
31
+
32
+ This makes all five core skills available in your AI development environment:
21
33
 
22
34
  - **arreio-init** - Initialize projects to follow the Arreio workflow
23
35
  - **plan** - Structure and decompose work into executable tasks
@@ -78,4 +90,4 @@ Initialize a new project, enabling the project to follow the four phases of the
78
90
 
79
91
  #### /end-session
80
92
 
81
- Preserve session context with a well-documented commit capturing state, decisions, and next steps.
93
+ Preserve session context with a well-documented commit capturing state, decisions, and next steps — saved as a traceable session artifact (with agent attribution) in `docs/plans/.end-session/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arreio",
3
- "version": "1.0.0-dev.1",
3
+ "version": "1.0.0",
4
4
  "description": "Arreio transforms agentic coding workflows into a predictable, safe, and high-quality software delivery pipeline. Master the four core phases—Plan, Work, Review, Learn—to orchestrate a highly reliable development cycle.",
5
5
  "license": "MIT",
6
6
  "author": "Wicttor",
@@ -27,12 +27,8 @@
27
27
  "main": "README.md",
28
28
  "files": [
29
29
  "skills/",
30
- "scripts/",
31
30
  "README.md"
32
31
  ],
33
- "scripts": {
34
- "postinstall": "node scripts/postinstall.js"
35
- },
36
32
  "engines": {
37
33
  "node": ">=14.0.0"
38
34
  },
@@ -33,7 +33,20 @@ After initialization, the following modules can operate:
33
33
 
34
34
  ## Workflow
35
35
 
36
- ### Step 1: Create Core Folder Structure
36
+ The initialization workflow runs in two phases:
37
+
38
+ 1. **Phase 0: Install Skills** — Copy Arreio skills to `~/.agents/skills/` for VS Code Copilot Chat discovery
39
+ 2. **Phase 1: Initialize Project Structure** — Create folders, indexes, and architectural documentation
40
+
41
+ ### Step 1: Install Skills
42
+
43
+ Install Arreio skills to the user's `.agents/skills` directory. See [modules/install.md](modules/install.md) for detailed instructions.
44
+
45
+ **Why:** Skills must be copied from the installed npm package to the user's home directory so they are discoverable by VS Code Copilot Chat. This step must run first, before project structure is created.
46
+
47
+ **Action:** Execute the [install.md](modules/install.md) phase to copy all skills from `node_modules/arreio/skills/` to `~/.agents/skills/`.
48
+
49
+ ### Step 2: Create Core Folder Structure
37
50
 
38
51
  Creates the organizational spine for Arreio artifacts:
39
52
 
@@ -45,7 +58,7 @@ Creates the organizational spine for Arreio artifacts:
45
58
 
46
59
  **Why:** Downstream skills assume these folders exist and will create files within them.
47
60
 
48
- ### Step 2: Initialize Root Architecture Document
61
+ ### Step 3: Initialize Root Architecture Document
49
62
 
50
63
  **File:** `ARCHITECTURE.md` (project root)
51
64
 
@@ -53,7 +66,7 @@ Creates the organizational spine for Arreio artifacts:
53
66
 
54
67
  **Action:** If `ARCHITECTURE.md` doesn't exist, create it using the [Architecture Template](references/architecture-template.md).
55
68
 
56
- ### Step 3: Initialize Plans Index
69
+ ### Step 4: Initialize Plans Index
57
70
 
58
71
  **File:** `docs/plans/index.md`
59
72
 
@@ -61,7 +74,7 @@ Creates the organizational spine for Arreio artifacts:
61
74
 
62
75
  **Action:** If `docs/plans/index.md` doesn't exist, create it using the [Plan Index Template](references/plan-index-template.md).
63
76
 
64
- ### Step 4: Create Tasks Folder
77
+ ### Step 5: Create Tasks Folder
65
78
 
66
79
  **Folder:** `docs/tasks/`
67
80
 
@@ -69,7 +82,7 @@ Creates the organizational spine for Arreio artifacts:
69
82
 
70
83
  **Action:** Create the `docs/tasks/` folder if it doesn't exist.
71
84
 
72
- ### Step 5: Initialize Learning Index
85
+ ### Step 6: Initialize Learning Index
73
86
 
74
87
  **File:** `docs/learn/index.md`
75
88
 
@@ -77,7 +90,7 @@ Creates the organizational spine for Arreio artifacts:
77
90
 
78
91
  **Action:** If `docs/learn/index.md` doesn't exist, create it using the [Learn Index Template](references/learn-index-template.md).
79
92
 
80
- ### Step 6: Create Reports Folder
93
+ ### Step 7: Create Reports Folder
81
94
 
82
95
  **Folder:** `docs/reports/`
83
96
 
@@ -85,7 +98,7 @@ Creates the organizational spine for Arreio artifacts:
85
98
 
86
99
  **Action:** Create the `docs/reports/` folder if it doesn't exist.
87
100
 
88
- ### Step 7: Create Plan Skill Hidden Artifact Directories
101
+ ### Step 8: Create Plan Skill Hidden Artifact Directories
89
102
 
90
103
  **Folders:**
91
104
 
@@ -97,7 +110,7 @@ Creates the organizational spine for Arreio artifacts:
97
110
 
98
111
  **Action:** Create all three directories if they don't exist.
99
112
 
100
- ### Step 8: Create Work Skill Hidden Artifact Directories
113
+ ### Step 9: Create Work Skill Hidden Artifact Directories
101
114
 
102
115
  **Folders:**
103
116
 
@@ -110,7 +123,7 @@ Creates the organizational spine for Arreio artifacts:
110
123
 
111
124
  **Action:** Create all four directories if they don't exist.
112
125
 
113
- ### Step 9: Create Review Skill Hidden Artifact Directories and Registry
126
+ ### Step 10: Create Review Skill Hidden Artifact Directories and Registry
114
127
 
115
128
  **Folders:**
116
129
 
@@ -146,7 +159,7 @@ This is the index of all review reports for the project. Reports are organized b
146
159
  _No review reports yet._
147
160
  ```
148
161
 
149
- ### Step 10: Create Learn Skill Hidden Artifact Directories
162
+ ### Step 11: Create Learn Skill Hidden Artifact Directories
150
163
 
151
164
  **Folders:**
152
165
 
@@ -159,7 +172,17 @@ _No review reports yet._
159
172
 
160
173
  **Action:** Create all four directories if they don't exist.
161
174
 
162
- ### Step 11: Create Learn Category Folders
175
+ ### Step 12: Create End-Session Skill Hidden Artifact Directory
176
+
177
+ **Folder:**
178
+
179
+ - `docs/plans/.end-session/` — Stores session-end artifacts
180
+
181
+ **Rationale:** The `end-session/SKILL.md` skill saves a session artifact here for every session-end commit, providing a traceable record of what was done, why, and by which agent.
182
+
183
+ **Action:** Create the directory if it doesn't exist.
184
+
185
+ ### Step 13: Create Learn Category Folders
163
186
 
164
187
  **Folders:**
165
188
 
@@ -176,6 +199,13 @@ _No review reports yet._
176
199
 
177
200
  After initialization, verify:
178
201
 
202
+ - ✓ All Arreio skills are installed to `~/.agents/skills/`:
203
+ - `~/.agents/skills/plan/`
204
+ - `~/.agents/skills/work/`
205
+ - `~/.agents/skills/review/`
206
+ - `~/.agents/skills/learn/`
207
+ - `~/.agents/skills/end-session/`
208
+ - `~/.agents/skills/arreio-init/`
179
209
  - ✓ All five core folders exist: `docs/plans/`, `docs/learn/`, `docs/reports/`, `docs/tasks/`, `docs/archives/`
180
210
  - ✓ `ARCHITECTURE.md` exists at project root
181
211
  - ✓ Root-level index files exist:
@@ -190,6 +220,8 @@ After initialization, verify:
190
220
  - `docs/plans/.review/index.md` (review reports registry)
191
221
  - ✓ Learn skill hidden artifact directories exist:
192
222
  - `docs/plans/.learn/.capture/`, `docs/plans/.learn/.refine/`, `docs/plans/.learn/.index/`, `docs/plans/.learn/.maintain/`
223
+ - ✓ End-session skill hidden artifact directory exists:
224
+ - `docs/plans/.end-session/`
193
225
  - ✓ Learn category folders exist:
194
226
  - `docs/learn/decision/`, `docs/learn/pattern/`, `docs/learn/gotcha/`, `docs/learn/workflow/`
195
227
  - ✓ Per-plan task indexes created on-demand by plan skill: `docs/tasks/<plan-id>/index.md` (created when Tasks phase runs)
@@ -203,6 +235,7 @@ Downstream skills (plan, learn, work, review) automatically create missing folde
203
235
  - **work** skill creates missing `docs/plans/.work/` directories (`.triage/`, `.prepare/`, `.execute/`, `.review/`) on first execution.
204
236
  - **review** skill creates missing `docs/plans/.review/` directories and `index.md` registry on first review.
205
237
  - **learn** skill creates missing `docs/plans/.learn/` directories and `docs/learn/` category folders on first learning capture.
238
+ - **end-session** skill creates missing `docs/plans/.end-session/` directory (and the `## Session Ends` section in `docs/plans/index.md`) on first session end.
206
239
 
207
240
  **However**, running `arreio-init` upfront provides several benefits:
208
241
 
@@ -0,0 +1,136 @@
1
+ ---
2
+ title: Install Skills
3
+ description: Install Arreio skills to the user's .agents/skills directory, making them available in VS Code Copilot Chat.
4
+ type: module
5
+ version: 1.0
6
+ timestamp: "2026-09-01"
7
+ ---
8
+
9
+ # Phase 0 - Install Skills
10
+
11
+ **Purpose:** Copy Arreio skills from the installed npm package to the user's `~/.agents/skills/` directory, making them available for discovery and invocation in VS Code Copilot Chat. This ensures all Arreio workflows (plan, work, review, learn, end-session) are accessible after initialization.
12
+
13
+ ## Workflow
14
+
15
+ This is the Phase 0 pipeline for the Arreio Init Skill. It orchestrates the following steps before creating project structure.
16
+
17
+ ### Step 1: Verify Installation Context
18
+
19
+ Verify that the prerequisites are met:
20
+
21
+ 1. Arreio is installed as an npm package in the current project (`node_modules/arreio/` exists).
22
+ 2. The skills directory exists in the package: `node_modules/arreio/skills/` contains subdirectories for each skill.
23
+ 3. The user's home directory is accessible (required to create `~/.agents/skills/`).
24
+
25
+ If any verification fails:
26
+
27
+ - **Missing package:** Suggest running `npm install arreio` first.
28
+ - **Missing skills:** Report a package integrity error (the skills/ directory is missing from the installed package).
29
+ - **No home access:** Report an environment error (unable to determine home directory).
30
+
31
+ ### Step 2: Create Target Directory
32
+
33
+ Create the destination directory hierarchy:
34
+
35
+ 1. If `~/.agents/` does not exist, create it.
36
+ 2. If `~/.agents/skills/` does not exist, create it.
37
+ 3. Log: `✓ Created ~/.agents/skills/`
38
+
39
+ ### Step 3: Copy Skills from Package
40
+
41
+ Copy each skill directory from `node_modules/arreio/skills/` to `~/.agents/skills/`:
42
+
43
+ **Skills to copy:**
44
+
45
+ - `plan` — Planning and decomposition
46
+ - `work` — Task execution with guardrails
47
+ - `review` — Code review and analysis
48
+ - `learn` — Knowledge capture and indexing
49
+ - `end-session` — Session documentation
50
+ - `arreio-init` — Workspace initialization (this skill itself, for re-runs)
51
+
52
+ **Copy algorithm:**
53
+
54
+ For each skill:
55
+
56
+ 1. Read the source directory: `node_modules/arreio/skills/<skill-name>/`
57
+ 2. Copy recursively to destination: `~/.agents/skills/<skill-name>/`
58
+ 3. Verify the destination directory was created and contains the expected files (`SKILL.md`, `modules/`, `references/`).
59
+ 4. Log: `✓ Copied <skill-name>`
60
+
61
+ If any copy operation fails:
62
+
63
+ - Log the error and the source/destination paths.
64
+ - Ask the user to manually verify the source exists and the destination is writable.
65
+ - Do not proceed to the next phase.
66
+
67
+ ### Step 4: Verify Installation Success
68
+
69
+ After all skills are copied, verify that the expected skill files are present:
70
+
71
+ For each skill, check:
72
+
73
+ - `~/.agents/skills/<skill-name>/SKILL.md` exists
74
+ - Directory structure is intact (modules/, references/ subdirs if present)
75
+
76
+ If verification passes, log:
77
+
78
+ ```
79
+ ✓ Arreio skills installed successfully
80
+ - plan
81
+ - work
82
+ - review
83
+ - learn
84
+ - end-session
85
+ - arreio-init
86
+
87
+ Skills are now available in VS Code Copilot Chat.
88
+ ```
89
+
90
+ If verification fails for any skill, report which skills failed and suggest manual verification.
91
+
92
+ ### Step 5: Log Installation Summary
93
+
94
+ Provide the user with confirmation and next steps:
95
+
96
+ ```
97
+ Installation complete. Arreio skills are now available:
98
+
99
+ Next step: Project structure will be initialized in Step 1 of arreio-init.
100
+
101
+ You can now use:
102
+ /plan — Create implementation plans
103
+ /work — Execute tasks with guardrails
104
+ /review — Conduct code reviews
105
+ /learn — Capture and organize knowledge
106
+ ```
107
+
108
+ ## Success Criteria
109
+
110
+ After this phase completes:
111
+
112
+ - ✓ `~/.agents/skills/` directory exists
113
+ - ✓ All six skills are copied to `~/.agents/skills/`:
114
+ - `~/.agents/skills/plan/`
115
+ - `~/.agents/skills/work/`
116
+ - `~/.agents/skills/review/`
117
+ - `~/.agents/skills/learn/`
118
+ - `~/.agents/skills/end-session/`
119
+ - `~/.agents/skills/arreio-init/`
120
+ - ✓ Each skill directory contains `SKILL.md` and expected subdirectories
121
+ - ✓ Skills are ready for discovery by VS Code Copilot Chat
122
+
123
+ ## Error Handling
124
+
125
+ Refer to [error-handling.md](../references/error-handling.md) for category classification and resolution strategies. Common errors:
126
+
127
+ - **Category 1 (Missing context):** Arreio package not installed; suggest `npm install arreio`.
128
+ - **Category 2 (Routing error):** Skills directory missing from package; report package integrity issue.
129
+ - **Category 3 (Environment issue):** Cannot write to `~/.agents/`; insufficient permissions or home dir unavailable.
130
+
131
+ ## Notes
132
+
133
+ - This phase runs **before** project structure initialization (Phase 1 → Create Core Folders).
134
+ - Skills are copied to the user's home directory (`~/.agents/`), not the project directory. This allows skills to be reused across all projects once installed.
135
+ - The copy is non-destructive; if skills already exist in `~/.agents/skills/`, they are overwritten with the latest version from the installed package. This supports package updates.
136
+ - This phase is idempotent; running it multiple times produces the same result.
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: end-session
3
+ description: "Create a single clear commit at session end capturing state. Saves a session artifact to docs/plans/.end-session/ with agent attribution from file changes."
4
+ argument-hint: "[Optional: reason for ending session]"
5
+ disable-model-invocation: true
6
+ version: 2.0.0
7
+ timestamp: "2026-09-01"
8
+ ---
9
+
10
+ # End Session
11
+
12
+ Create a well-documented commit when a work session ends, with a persistent session artifact for continuity.
13
+
14
+ ## Usage
15
+
16
+ ```text
17
+ /end-session # End current session
18
+ /end-session "switching to bugfix" # End with context note
19
+ ```
20
+
21
+ ## Workflow
22
+
23
+ ### 1. Pre-flight: Verify Changes
24
+
25
+ 1. Check working tree for modifications
26
+ 2. If no changes, inform the user and exit
27
+ 3. Show list of changed files; ask if all should be included
28
+ 4. Create `docs/plans/.end-session/` if missing (self-healing)
29
+
30
+ **Critical failure:** Working tree is unreadable or inaccessible → exit with error.
31
+
32
+ ### 2. Confirm & Prepare
33
+
34
+ 1. Ask user: "Ready to end this session?" (yes/no)
35
+ 2. If no, list incomplete work and exit
36
+ 3. Draft commit message:
37
+ - Subject: imperative mood, ≤50 chars, no period (e.g., "Add feature" not "Added")
38
+ - Body: explain **why**, not what; include skills used (e.g., "Used: -plan, -work")
39
+ - Add `[AGENT: {AGENT_NAME}]` as last line (mandatory)
40
+ 4. Show message for user approval; allow edits
41
+
42
+ **Critical failure:** User declines or message is empty after body prompt → exit without committing.
43
+
44
+ ### 3. Create & Record
45
+
46
+ 1. Stage approved files and create commit
47
+ 2. Capture commit SHA
48
+ 3. Allocate session ID: `YYYY-MM-DD-NNN` (date + sequential counter)
49
+ 4. Write session artifact to `docs/plans/.end-session/<session-id>.md`
50
+ 5. Register in `docs/plans/index.md` under `## Session Ends` (create section if missing)
51
+ 6. Report: commit SHA + artifact path + suggest `/learn maintain` if learnings were touched
52
+
53
+ **Critical failure:** Commit creation fails or artifact write fails → surface error with SHA (if captured) so user can recover manually.
54
+
55
+ ## Session Artifact Format
56
+
57
+ ```markdown
58
+ ---
59
+ type: session
60
+ session-id: 2026-09-01-001
61
+ timestamp: "2026-09-01T14:30:00"
62
+ commit-sha: "<short sha>"
63
+ agent: "<agent name>"
64
+ files-changed: <count>
65
+ status: complete
66
+ ---
67
+
68
+ # Session End: <commit subject>
69
+
70
+ ## Reason
71
+
72
+ <context note or "session complete">
73
+
74
+ ## Changed Files
75
+
76
+ - <path> (added | modified | deleted)
77
+
78
+ ## Commit Message
79
+
80
+ <verbatim subject + body>
81
+
82
+ ## Next Steps
83
+
84
+ <open todos or "none">
85
+ ```
86
+
87
+ ## Requirements
88
+
89
+ - **Changes required**: session ends only if there are staged changes
90
+ - **User approval**: commit message always shown before committing
91
+ - **No push**: changes remain local; user pushes manually
92
+ - **Attribution**: `[AGENT: ...]` trailer derived from session file changes (current agent if mixed)
93
+ - **Artifact**: saved to `docs/plans/.end-session/` and indexed in `docs/plans/index.md`
94
+
95
+ ## References
96
+
97
+ | Reference | Purpose |
98
+ | ------------------------------------------------- | ----------------------------------------- |
99
+ | [error-handling.md](references/error-handling.md) | Critical failure modes and recovery steps |
@@ -0,0 +1,80 @@
1
+ ---
2
+ title: Error Handling & Recovery
3
+ description: Critical failure modes and recovery steps for end-session
4
+ type: reference
5
+ version: 2.0
6
+ timestamp: "2026-09-01"
7
+ ---
8
+
9
+ # Error Handling & Recovery
10
+
11
+ Minimal reference for critical failures only. Surface errors explicitly; never silently skip or fabricate data.
12
+
13
+ ## Critical Failures (Exit Immediately)
14
+
15
+ | Scenario | Recovery Action |
16
+ | --------------------------------------------------------------- | ---------------------------------------------------------- |
17
+ | Working tree is unreadable (repo access issue) | Log error; ask user to verify repository is accessible |
18
+ | Working tree is clean (no changes) | Inform user, exit gracefully (nothing to commit) |
19
+ | User declines session completion (Phase 2) | List incomplete work, exit without committing |
20
+ | Commit message is empty or invalid | Re-prompt user; never commit with placeholder |
21
+ | Commit creation fails (identity not configured, hook rejection) | Log failure reason; do not fabricate SHA; suggest fix |
22
+ | File write fails (artifact or index permission denied) | Log error; provide commit SHA so user can recover manually |
23
+
24
+ ## Self-Healing (Non-Blocking)
25
+
26
+ - **Missing `docs/plans/.end-session/`** → create it automatically
27
+ - **Missing `## Session Ends` in `docs/plans/index.md`** → create section before appending
28
+ - **Missing `docs/plans/index.md` entirely** → create minimal index with section
29
+
30
+ ## User Decisions Always Required
31
+
32
+ - Confirm session completion (Phase 2)
33
+ - Approve commit message before committing
34
+ - Approve staging files before commit creation
35
+
36
+ 4. If terminate = Yes: stop and inform the user with:
37
+ - Error category and trigger
38
+ - Recovery action attempted
39
+ - Reason for termination
40
+ 5. If terminate = No: after recovery, continue to the next step of the phase
41
+
42
+ ````
43
+
44
+ ## Retry Limits
45
+
46
+ - **Maximum retries per error:** 1
47
+ - **Maximum total retries per phase:** 2
48
+ - After exhausting retries, terminate with a clear error explaining what failed and suggesting the user resolve the underlying issue and re-run `/end-session`.
49
+
50
+ ## Error Reporting Format
51
+
52
+ When reporting an error to the user, use this format:
53
+
54
+ ```yaml
55
+ error:
56
+ phase: pre-flight | confirm-completion | prepare-commit | create-commit | save-artifact | post-commit
57
+ step: 0 | 1 | 2 | ...
58
+ category: 1 | 2 | 3 | 4 | 5 | 6
59
+ trigger: "[specific trigger description]"
60
+ recovery_attempted: "[action taken]"
61
+ outcome: recovered | terminated
62
+ suggestion: "[next step for the user]"
63
+ ````
64
+
65
+ ## Cross-Phase Consistency Checks
66
+
67
+ | Check | Action on Failure |
68
+ | -------------------------------------------------------------------------- | -------------------------------------------------------- |
69
+ | `interactionMode` is identical across all phases | Log warning; use the earliest non-default value |
70
+ | Change list in Phase 3/4 matches the Pre-flight list (no silent additions) | Reject; return to Pre-flight |
71
+ | Session artifact `commit-sha` matches the commit reported in Phase 4 | Reject the artifact; re-run Phase 5 with the correct SHA |
72
+ | Session artifact `agent` matches the attribution confirmed in Phase 3 | Reject the artifact; re-run Phase 5 |
73
+ | `session-id` date matches today's date | Reject; re-allocate the session-id |
74
+
75
+ ## Notes
76
+
77
+ - All errors and warnings should be logged with a timestamp for debugging.
78
+ - Graceful exits (clean tree, user-declined completion) are **not** failures — they are valid outcomes of Phases 1–2 and must be reported as such.
79
+ - The skill is not resume-safe by design: a failed session end is re-run from Phase 1 with a fresh look at the working tree. The only idempotent write is the session artifact (overwrite on the same `session-id`, never duplicate).
80
+ - This reference is shared by all six phases; phase-specific handling is documented inline in the SKILL.md workflow.
@@ -1,50 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Post-install script for arreio
5
- * Copies skills from the package to the user's .agents/skills directory
6
- */
7
-
8
- const fs = require('fs');
9
- const path = require('path');
10
- const os = require('os');
11
-
12
- // Determine the source and destination paths
13
- const packageDir = path.dirname(__dirname);
14
- const skillsSource = path.join(packageDir, 'skills');
15
- const agentsDir = path.join(os.homedir(), '.agents');
16
- const skillsDestination = path.join(agentsDir, 'skills');
17
-
18
- // Function to recursively copy directories
19
- function copyDirectory(src, dest) {
20
- if (!fs.existsSync(dest)) {
21
- fs.mkdirSync(dest, { recursive: true });
22
- }
23
-
24
- const files = fs.readdirSync(src);
25
- files.forEach(file => {
26
- const srcFile = path.join(src, file);
27
- const destFile = path.join(dest, file);
28
- const stat = fs.statSync(srcFile);
29
-
30
- if (stat.isDirectory()) {
31
- copyDirectory(srcFile, destFile);
32
- } else {
33
- fs.copyFileSync(srcFile, destFile);
34
- }
35
- });
36
- }
37
-
38
- try {
39
- // Create .agents directory if it doesn't exist
40
- if (!fs.existsSync(agentsDir)) {
41
- fs.mkdirSync(agentsDir, { recursive: true });
42
- }
43
-
44
- // Copy skills to .agents/skills
45
- copyDirectory(skillsSource, skillsDestination);
46
- console.log(`✓ Arreio skills installed to ${skillsDestination}`);
47
- } catch (error) {
48
- console.error(`✗ Failed to install Arreio skills: ${error.message}`);
49
- process.exit(1);
50
- }