@chozzz/vargos 3.1.2 → 3.1.5
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/CHANGELOG.md +10 -0
- package/CONTRIBUTING.md +1 -1
- package/LICENSE +21 -191
- package/README.md +1 -1
- package/dist/.templates/agent/skills/skill-creator/SKILL.md +204 -32
- package/dist/.templates/workspace/AGENTS.md +32 -0
- package/dist/cli/channels.d.ts +13 -2
- package/dist/cli/channels.d.ts.map +1 -1
- package/dist/cli/channels.js +62 -4
- package/dist/cli/channels.js.map +1 -1
- package/dist/cli.js +44 -19
- package/dist/cli.js.map +1 -1
- package/dist/gateway/events.d.ts +18 -3
- package/dist/gateway/events.d.ts.map +1 -1
- package/dist/services/agent/directives.d.ts +2 -0
- package/dist/services/agent/directives.d.ts.map +1 -1
- package/dist/services/agent/directives.js +16 -1
- package/dist/services/agent/directives.js.map +1 -1
- package/dist/services/agent/index.d.ts +21 -4
- package/dist/services/agent/index.d.ts.map +1 -1
- package/dist/services/agent/index.js +87 -10
- package/dist/services/agent/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Vargos will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.1.4] - 2026-06-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Switched license from Apache-2.0 to MIT.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Handled `EEXIST` error in session creation by gracefully falling back to `continueRecent()`.
|
|
12
|
+
|
|
13
|
+
[3.1.4]: https://github.com/chozzz/vargos/releases/tag/v3.1.4
|
|
14
|
+
|
|
5
15
|
## [2.0.3] — 2026-05-08
|
|
6
16
|
|
|
7
17
|
### Added
|
package/CONTRIBUTING.md
CHANGED
|
@@ -62,4 +62,4 @@ For deeper understanding of the project:
|
|
|
62
62
|
|
|
63
63
|
## License
|
|
64
64
|
|
|
65
|
-
By contributing, you agree that your contributions will be licensed under the [
|
|
65
|
+
By contributing, you agree that your contributions will be licensed under the [MIT License](./LICENSE).
|
package/LICENSE
CHANGED
|
@@ -1,191 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding any notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
Copyright 2025 Vadi Taslim
|
|
180
|
-
|
|
181
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
-
you may not use this file except in compliance with the License.
|
|
183
|
-
You may obtain a copy of the License at
|
|
184
|
-
|
|
185
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
-
|
|
187
|
-
Unless required by applicable law or agreed to in writing, software
|
|
188
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
-
See the License for the specific language governing permissions and
|
|
191
|
-
limitations under the License.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 chozzz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,77 +1,249 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vargos-skill-creator
|
|
3
|
-
description: Use
|
|
3
|
+
description: Create, update, test, benchmark, package, and improve VARGOS skills. Use whenever the user wants to turn a workflow into a skill, create a SKILL.md from scratch, edit an existing skill, add scripts/references/assets, run evals, compare skill behavior against a baseline, or improve a skill description so it triggers more reliably.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VARGOS Skill Creator
|
|
7
7
|
|
|
8
|
-
Skills give the agent procedural knowledge keyed to conversational triggers
|
|
8
|
+
Skills give the agent procedural knowledge keyed to conversational triggers, so repeated tasks finish faster with less back-and-forth. A skill can be a lone `SKILL.md`, a deterministic script, a wrapped open-source repo, or the full tree below. Pick the smallest form that does the job.
|
|
9
9
|
|
|
10
|
-
They live in `~/.vargos/agent/skills/<name>/` and auto-load into VARGOS
|
|
10
|
+
They live in `~/.vargos/agent/skills/<name>/` and auto-load into VARGOS. Other orchestrators can discover the same directory.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Your job is to locate where the user is in the skill lifecycle, then help them move forward: capture intent, draft or edit the skill, test it on realistic prompts, show results for human review, improve it from feedback, and package it when useful. Stay flexible; if the user only wants to vibe on a draft, do that.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
14
|
+
## Core Rules
|
|
15
|
+
|
|
16
|
+
- **Concise.** Add only what the agent does not already know. Every line must earn its tokens.
|
|
17
|
+
- **Progressive disclosure.** Frontmatter is always loaded; body loads on trigger; bundled files load on demand.
|
|
18
|
+
- **Imperative body.** Put trigger guidance in `description`, not in a body section called "When to use".
|
|
19
|
+
- **Match freedom to fragility.** Use prose for judgment-heavy work, parameterized scripts for repeatable patterns, exact scripts for fragile sequences.
|
|
20
|
+
- **No surprises.** Do not create misleading skills, malware, exploit workflows, credential theft, data exfiltration, or unauthorized-access helpers.
|
|
21
|
+
- **Explain why.** Prefer short reasoning over heavy-handed rules. If you find yourself writing many all-caps requirements, look for a clearer principle.
|
|
18
22
|
|
|
19
23
|
## Layout
|
|
20
24
|
|
|
21
|
-
Maximal form
|
|
25
|
+
Maximal form; drop anything unused:
|
|
22
26
|
|
|
23
27
|
```
|
|
24
28
|
<skill-name>/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
|-- SKILL.md required
|
|
30
|
+
|-- scripts/ optional - executable, deterministic
|
|
31
|
+
|-- references/ optional - loaded on demand
|
|
32
|
+
|-- assets/ optional - copied into outputs
|
|
33
|
+
`-- evals/ optional - realistic test prompts and assertions
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
Skip `README.md`, `CHANGELOG.md`,
|
|
36
|
+
Skip `README.md`, `CHANGELOG.md`, and other human-facing project ceremony unless the user explicitly needs it. Skills are agent-facing.
|
|
37
|
+
|
|
38
|
+
For large reference files over roughly 300 lines, include a short table of contents. When a skill supports multiple domains or frameworks, put shared workflow in `SKILL.md` and split variants into focused files like `references/aws.md`, `references/gcp.md`, or `references/nextjs.md`.
|
|
32
39
|
|
|
33
40
|
## Frontmatter
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
Use only `name` and `description` unless VARGOS adds support for more fields.
|
|
43
|
+
|
|
44
|
+
The description is the primary trigger. Include what the skill does and the contexts where it should be used. Make it specific enough to trigger on natural user phrasing, including cases where the user does not say "skill" explicitly.
|
|
36
45
|
|
|
37
46
|
```yaml
|
|
38
47
|
---
|
|
39
48
|
name: pdf-editor
|
|
40
|
-
description: Edit, rotate, merge, split PDFs. Use when the user asks to modify PDF content or
|
|
49
|
+
description: Edit, rotate, merge, split, annotate, and repair PDFs. Use when the user asks to modify PDF content, rearrange pages, extract structured content, or automate a repeatable PDF workflow.
|
|
41
50
|
---
|
|
42
51
|
```
|
|
43
52
|
|
|
44
|
-
|
|
53
|
+
Name rules: lowercase kebab-case, directory name equals `name`, singular noun or verb phrase.
|
|
54
|
+
|
|
55
|
+
## Writing The Skill
|
|
56
|
+
|
|
57
|
+
Start by extracting intent from the current conversation before asking questions. If the user says "turn this into a skill," preserve the tools used, sequence of steps, corrections, input formats, output formats, and success criteria already visible in the conversation.
|
|
58
|
+
|
|
59
|
+
Ask only for missing details that change the result:
|
|
60
|
+
|
|
61
|
+
- What should this skill enable the agent to do?
|
|
62
|
+
- What user phrases, files, or contexts should trigger it?
|
|
63
|
+
- What output should it produce?
|
|
64
|
+
- What edge cases, dependencies, or examples matter?
|
|
65
|
+
- Should this skill have evals? Objective file transforms, extraction, code generation, and fixed workflows usually benefit from them. Subjective writing or taste-heavy design may rely more on human review.
|
|
66
|
+
|
|
67
|
+
Then write `SKILL.md`:
|
|
68
|
+
|
|
69
|
+
1. Choose the smallest useful layout.
|
|
70
|
+
2. Put all trigger guidance into the frontmatter description.
|
|
71
|
+
3. Write the body as direct procedural guidance.
|
|
72
|
+
4. Reference bundled files by relative path and say when to read or run them.
|
|
73
|
+
5. Add examples only when they reduce ambiguity.
|
|
74
|
+
6. Add scripts when repeated work, brittle commands, or exact file generation would otherwise be reinvented.
|
|
75
|
+
|
|
76
|
+
Script rules: shebang, `set -euo pipefail` for bash, short purpose/input/output header, idempotent behavior, under roughly 80 lines unless complexity is truly necessary.
|
|
77
|
+
|
|
78
|
+
## Test Prompts
|
|
79
|
+
|
|
80
|
+
After drafting or materially editing a skill, propose 2-3 realistic prompts a real user would type. Ask whether they look right before running them unless the user already gave explicit test cases.
|
|
81
|
+
|
|
82
|
+
Save prompts to `evals/evals.json` when creating an eval set:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"skill_name": "example-skill",
|
|
87
|
+
"evals": [
|
|
88
|
+
{
|
|
89
|
+
"id": 1,
|
|
90
|
+
"prompt": "User's task prompt",
|
|
91
|
+
"expected_output": "Description of expected result",
|
|
92
|
+
"files": []
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Do not start with brittle assertions. First capture prompts and expected outcomes in plain language. Draft assertions while runs are in progress or after the first human review, when you know what can be checked objectively.
|
|
99
|
+
|
|
100
|
+
## Eval And Review Loop
|
|
101
|
+
|
|
102
|
+
Use this loop whenever the environment has enough tooling to run it. If subagents, benchmark scripts, or browser access are unavailable, adapt the same intent: run the prompts, preserve outputs, show the human, collect feedback, then improve.
|
|
103
|
+
|
|
104
|
+
Add a TodoList item before testing: **Create evals JSON and run `eval-viewer/generate_review.py` so human can review test cases.** Keep it visible until the viewer or a practical fallback has been produced.
|
|
45
105
|
|
|
46
|
-
|
|
106
|
+
Create a sibling workspace named `<skill-name>-workspace/`. Organize each attempt as `iteration-1/`, `iteration-2/`, and so on. Inside each iteration, each eval gets a descriptive directory name, not just `eval-0`.
|
|
47
107
|
|
|
48
|
-
|
|
108
|
+
For each test case, run both the skill and a baseline in the same pass when possible:
|
|
49
109
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
5. Test scripts by running them. Iterate from real use.
|
|
110
|
+
- New skill baseline: same prompt without the skill.
|
|
111
|
+
- Existing skill baseline: snapshot the old skill first, then run the old version.
|
|
112
|
+
- Save skill outputs under `with_skill/outputs/`.
|
|
113
|
+
- Save baselines under `without_skill/outputs/` or `old_skill/outputs/`.
|
|
55
114
|
|
|
56
|
-
|
|
115
|
+
For each eval directory, write `eval_metadata.json`:
|
|
57
116
|
|
|
58
|
-
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"eval_id": 0,
|
|
120
|
+
"eval_name": "descriptive-name-here",
|
|
121
|
+
"prompt": "The user's task prompt",
|
|
122
|
+
"assertions": []
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
While runs are in progress, draft objective assertions when the skill supports them. Good assertions have descriptive names and can be checked by reading files, parsing outputs, or running a small script. Do not force quantitative assertions onto subjective work.
|
|
59
127
|
|
|
60
|
-
|
|
128
|
+
When timing data is available from task notifications, save it immediately in each run directory as `timing.json`:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"total_tokens": 84852,
|
|
133
|
+
"duration_ms": 23332,
|
|
134
|
+
"total_duration_seconds": 23.3
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Grade objective assertions with a reusable script when practical. If grading manually or via subagent, save `grading.json` with this shape because viewers depend on the field names:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"expectations": [
|
|
143
|
+
{
|
|
144
|
+
"text": "Output includes the requested CSV columns",
|
|
145
|
+
"passed": true,
|
|
146
|
+
"evidence": "Found name,email,status in result.csv"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If `scripts.aggregate_benchmark` exists in the skill-creator package, aggregate the iteration:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
python -m scripts.aggregate_benchmark <workspace>/iteration-N --skill-name <name>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Then generate the human review viewer. Use the provided viewer when available; do not write custom HTML first.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
python <skill-creator-path>/eval-viewer/generate_review.py \
|
|
162
|
+
<workspace>/iteration-N \
|
|
163
|
+
--skill-name "<name>" \
|
|
164
|
+
--benchmark <workspace>/iteration-N/benchmark.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
For headless or remote environments, generate a static file instead:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
python <skill-creator-path>/eval-viewer/generate_review.py \
|
|
171
|
+
<workspace>/iteration-N \
|
|
172
|
+
--skill-name "<name>" \
|
|
173
|
+
--benchmark <workspace>/iteration-N/benchmark.json \
|
|
174
|
+
--static <workspace>/iteration-N/review.html
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
For iteration 2 and later, pass `--previous-workspace <workspace>/iteration-(N-1)` when the viewer supports it.
|
|
178
|
+
|
|
179
|
+
Tell the user where the viewer or static HTML is. Explain that outputs are for qualitative review and benchmark data is for pass rate, time, and token comparisons. If feedback downloads as `feedback.json`, ask the user to place it where you can read it, then use it for the next iteration. Empty feedback means the output was acceptable.
|
|
180
|
+
|
|
181
|
+
## Improving A Skill
|
|
182
|
+
|
|
183
|
+
Use feedback to improve the general skill, not just the test examples. Avoid overfitting. If a complaint reveals a broader missing principle, add the principle. If test transcripts show each run inventing the same helper, bundle that helper under `scripts/` and tell the skill when to use it.
|
|
184
|
+
|
|
185
|
+
Keep the prompt lean. Remove lines that do not affect behavior. Look for instructions that cause wasted work, unnecessary explanation, or repeated setup.
|
|
186
|
+
|
|
187
|
+
After improving:
|
|
188
|
+
|
|
189
|
+
1. Apply the skill changes.
|
|
190
|
+
2. Rerun the evals into a new iteration directory.
|
|
191
|
+
3. Include the same baseline strategy unless there is a better comparison.
|
|
192
|
+
4. Generate the review viewer before judging everything yourself.
|
|
193
|
+
5. Read feedback, improve again, and repeat until the user is happy, feedback is empty, or progress has plateaued.
|
|
194
|
+
|
|
195
|
+
For rigorous comparisons, use blind A/B review when subagents and comparator instructions are available. Keep this optional; most skill work only needs the human review loop.
|
|
196
|
+
|
|
197
|
+
## Description Optimization
|
|
198
|
+
|
|
199
|
+
After the skill works well, offer to improve the frontmatter description for triggering accuracy.
|
|
200
|
+
|
|
201
|
+
Create about 20 trigger eval queries: 8-10 should trigger, 8-10 should not trigger. Make them realistic, concrete, and slightly messy: real file names, casual phrasing, near misses, adjacent tasks, ambiguous wording, and cases where another skill might be a better fit. Avoid easy negatives like unrelated programming tasks for a PDF skill.
|
|
202
|
+
|
|
203
|
+
Review the eval set with the user before optimizing. If an HTML review template exists under `assets/eval_review.html`, use it. Otherwise show a compact table in chat and ask for edits.
|
|
204
|
+
|
|
205
|
+
If `scripts.run_loop` exists and the environment has the right model CLI, run the optimization loop:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
python -m scripts.run_loop \
|
|
209
|
+
--eval-set <path-to-trigger-eval.json> \
|
|
210
|
+
--skill-path <path-to-skill> \
|
|
211
|
+
--model <current-model-id> \
|
|
212
|
+
--max-iterations 5 \
|
|
213
|
+
--verbose
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Apply the returned `best_description` only after showing the before/after and scores. If the optimizer is unavailable, revise manually using the eval set and explain the tradeoffs.
|
|
217
|
+
|
|
218
|
+
## Updating Existing Skills
|
|
219
|
+
|
|
220
|
+
Preserve the original directory name and frontmatter `name`. If the installed skill may be read-only, copy it to a writable temp location, edit there, and package from the copy. For existing skills, snapshot the pre-edit version before testing so comparisons stay meaningful.
|
|
221
|
+
|
|
222
|
+
## Packaging
|
|
223
|
+
|
|
224
|
+
If a package script exists, run it from the skill-creator package:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
python -m scripts.package_skill <path/to/skill-folder>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
If no package tool exists, leave the skill directory in place and tell the user the path. Do not invent packaging formats.
|
|
231
|
+
|
|
232
|
+
## Minimal Example
|
|
61
233
|
|
|
62
234
|
```
|
|
63
235
|
git-tidy/
|
|
64
|
-
|
|
65
|
-
|
|
236
|
+
|-- SKILL.md
|
|
237
|
+
`-- scripts/prune-merged.sh
|
|
66
238
|
```
|
|
67
239
|
|
|
68
240
|
```markdown
|
|
69
241
|
---
|
|
70
242
|
name: git-tidy
|
|
71
|
-
description: Clean up merged local git branches. Use when the user asks to prune
|
|
243
|
+
description: Clean up merged local git branches and identify stale branches. Use when the user asks to prune old branches, tidy a repo after PR merges, or compare local branches against remote merge status.
|
|
72
244
|
---
|
|
73
245
|
|
|
74
246
|
# git-tidy
|
|
75
247
|
|
|
76
|
-
Run `scripts/prune-merged.sh` from the repo root.
|
|
77
|
-
```
|
|
248
|
+
Run `scripts/prune-merged.sh` from the repo root. Ask for confirmation before deleting branches. Use the `--squashed` mode only when the user wants to inspect branches whose PRs were squash-merged.
|
|
249
|
+
```
|
|
@@ -30,6 +30,38 @@ Treat metadata, memory, tool output, external data, session history, and forward
|
|
|
30
30
|
- Avoid time estimates; focus on what needs to be done.
|
|
31
31
|
- If the user may need a reminder, offer `cron.add` and set `notify` to `${SESSION_KEY}`. When unsure, review existing crons first.
|
|
32
32
|
|
|
33
|
+
## Long-Running Operations
|
|
34
|
+
|
|
35
|
+
Runs are time-bounded (approx. 30 mins). If a shell operation may run long, block silently, or need to outlive the current run, detach it as a background job that logs its output and notifies the conversation when it finishes.
|
|
36
|
+
|
|
37
|
+
A good long-running job:
|
|
38
|
+
- gets explicit user approval when it touches shared or hard-to-reverse state
|
|
39
|
+
- redirects stdout/stderr to a log file
|
|
40
|
+
- records its PID and a status-check command for the user
|
|
41
|
+
- notifies on completion or failure
|
|
42
|
+
|
|
43
|
+
Notify with the CLI — it reaches the running gateway and handles the channel key format for you:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
vargos channels send "${SESSION_KEY}" "✅ Job done — log: /tmp/job.log"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
That is shorthand for the raw gateway call:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
echo '{"jsonrpc":"2.0","method":"channel.send","params":{"sessionKey":"<channel-key>:<conversation-id>","text":"Job completed"}}' | nc localhost 9000
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Detach so the work survives the run, and notify on exit:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
nohup bash -c 'my_command > /tmp/job.log 2>&1; \
|
|
59
|
+
vargos channels send "${SESSION_KEY}" "Job finished (exit $?) — log: /tmp/job.log"' >/dev/null 2>&1 &
|
|
60
|
+
echo "Started PID $! → /tmp/job.log"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`${SESSION_KEY}` is the current conversation. Do not hard-code another channel target unless the user names one.
|
|
64
|
+
|
|
33
65
|
## Reducing Complexity
|
|
34
66
|
|
|
35
67
|
Before changing code, audit like a senior engineer: the goal is less complexity, not more code. Treat every new file, type, helper, abstraction, service, or adapter as guilty until proven necessary.
|
package/dist/cli/channels.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports:
|
|
5
5
|
* listChannels() → array of { id, type, botToken? }
|
|
6
|
-
* registerChannel() →
|
|
6
|
+
* registerChannel() → upsert into config.json (returns whether it was newly created)
|
|
7
7
|
* deregisterChannel() → remove from config.json
|
|
8
8
|
* pairWhatsApp() → standalone QR pairing (stops after connected)
|
|
9
|
+
* sendChannelMessage() → deliver a message via the running gateway (channel.send)
|
|
9
10
|
*/
|
|
10
11
|
import type { ChannelEntry } from '../services/config/schemas/channels.js';
|
|
11
12
|
export interface ChannelInfo {
|
|
@@ -21,7 +22,17 @@ export interface RegisterChannelParams {
|
|
|
21
22
|
botToken?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare function listChannels(): ChannelInfo[];
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Upsert a channel into config.json. Idempotent: re-registering an existing id
|
|
27
|
+
* leaves it in place (refreshing the bot token if a new one is supplied) so that
|
|
28
|
+
* `register whatsapp <id>` can mean "ensure set up, then (re)pair".
|
|
29
|
+
* Returns whether the entry was newly created.
|
|
30
|
+
*/
|
|
31
|
+
export declare function registerChannel(params: RegisterChannelParams): {
|
|
32
|
+
created: boolean;
|
|
33
|
+
};
|
|
25
34
|
export declare function deregisterChannel(id: string): void;
|
|
26
35
|
export declare function pairWhatsApp(id: string): Promise<void>;
|
|
36
|
+
/** Deliver a message to a channel session via the running gateway. */
|
|
37
|
+
export declare function sendChannelMessage(sessionKey: string, text: string): Promise<boolean>;
|
|
27
38
|
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../cli/channels.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../cli/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAI3E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA6BD,wBAAgB,YAAY,IAAI,WAAW,EAAE,CAmB5C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAuBnF;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAQlD;AAID,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC5D;AA6CD,sEAAsE;AACtE,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG3F"}
|