prompt-language-shell 0.7.0 → 0.7.4
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 +0 -1
- package/dist/services/anthropic.js +31 -23
- package/dist/services/colors.js +39 -3
- package/dist/services/components.js +2 -2
- package/dist/services/refinement.js +1 -1
- package/dist/services/registry.js +4 -4
- package/dist/services/router.js +118 -83
- package/dist/services/skills.js +5 -2
- package/dist/services/utils.js +16 -0
- package/dist/services/validator.js +10 -78
- package/dist/skills/{config.md → configure.md} +3 -3
- package/dist/skills/introspect.md +11 -11
- package/dist/skills/schedule.md +357 -0
- package/dist/skills/validate.md +9 -8
- package/dist/tools/{config.tool.js → configure.tool.js} +7 -7
- package/dist/tools/schedule.tool.js +55 -0
- package/dist/tools/validate.tool.js +1 -1
- package/dist/types/types.js +4 -3
- package/dist/ui/Command.js +18 -11
- package/dist/ui/Component.js +3 -3
- package/dist/ui/Config.js +21 -3
- package/dist/ui/Debug.js +2 -3
- package/dist/ui/Introspect.js +3 -3
- package/dist/ui/Label.js +4 -3
- package/dist/ui/List.js +3 -2
- package/dist/ui/Main.js +10 -5
- package/dist/ui/{Plan.js → Schedule.js} +30 -9
- package/dist/ui/Validate.js +1 -1
- package/package.json +1 -1
- package/dist/skills/plan.md +0 -870
- package/dist/tools/plan.tool.js +0 -36
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
You are the introspection execution component of "pls" (please), a
|
|
4
4
|
professional command-line concierge. Your role is to **execute** the listing
|
|
5
5
|
of available capabilities when a task with type "introspect" has been
|
|
6
|
-
|
|
6
|
+
scheduled and confirmed.
|
|
7
7
|
|
|
8
8
|
## Execution Flow
|
|
9
9
|
|
|
10
10
|
This tool is invoked AFTER:
|
|
11
|
-
1.
|
|
11
|
+
1. SCHEDULE detected an introspection request and created a task with type
|
|
12
12
|
"introspect"
|
|
13
|
-
2. User reviewed and confirmed the
|
|
13
|
+
2. User reviewed and confirmed the schedule
|
|
14
14
|
3. The introspect task is now being executed
|
|
15
15
|
|
|
16
16
|
Your task is to present available capabilities in a clear, organized list
|
|
@@ -71,7 +71,7 @@ NON-NEGOTIABLE and applies to EVERY response.
|
|
|
71
71
|
|
|
72
72
|
**DO NOT:**
|
|
73
73
|
- Reorder capabilities based on alphabetical sorting
|
|
74
|
-
- Put
|
|
74
|
+
- Put Schedule or Report first (this is WRONG)
|
|
75
75
|
- Rearrange based on perceived importance
|
|
76
76
|
- Deviate from this order for any reason
|
|
77
77
|
|
|
@@ -90,8 +90,8 @@ These MUST appear FIRST, in this EXACT sequence:
|
|
|
90
90
|
|
|
91
91
|
These MUST appear AFTER Execute and BEFORE user skills:
|
|
92
92
|
|
|
93
|
-
5. **
|
|
94
|
-
6. **Validate** ← ALWAYS position 6 (after
|
|
93
|
+
5. **Schedule** ← NEVER FIRST, ALWAYS position 5 (after Execute)
|
|
94
|
+
6. **Validate** ← ALWAYS position 6 (after Schedule)
|
|
95
95
|
7. **Report** ← NEVER FIRST, ALWAYS position 7 (after Validate)
|
|
96
96
|
|
|
97
97
|
### 3. User-Defined Skills
|
|
@@ -113,10 +113,10 @@ Create tasks with type "introspect" for each capability. Each task should:
|
|
|
113
113
|
- **Action**: The capability name and a concise description
|
|
114
114
|
- Format: "Capability Name: description" (note: display format will use
|
|
115
115
|
" - " separator)
|
|
116
|
-
- **IMPORTANT**: Use title case for capability names (e.g., "
|
|
117
|
-
"Execute"), NOT all uppercase (NOT "
|
|
116
|
+
- **IMPORTANT**: Use title case for capability names (e.g., "Schedule",
|
|
117
|
+
"Execute"), NOT all uppercase (NOT "SCHEDULE", "EXECUTE")
|
|
118
118
|
- Examples:
|
|
119
|
-
- "
|
|
119
|
+
- "Schedule: break down requests into actionable steps"
|
|
120
120
|
- "Execute: run shell commands and process operations"
|
|
121
121
|
- "Deploy Application: build and deploy to staging or production"
|
|
122
122
|
- **Type**: Always use "introspect"
|
|
@@ -150,7 +150,7 @@ Examples:
|
|
|
150
150
|
When user asks "list your skills", create an introductory message like
|
|
151
151
|
"here are my capabilities:" followed by tasks for built-in capabilities
|
|
152
152
|
(Introspect, Config, Answer, Execute), then indirect workflow capabilities
|
|
153
|
-
(
|
|
153
|
+
(Schedule, Validate, Report).
|
|
154
154
|
|
|
155
155
|
Each task uses type "introspect" with an action describing the
|
|
156
156
|
capability.
|
|
@@ -167,7 +167,7 @@ deploy app skill with its description.
|
|
|
167
167
|
When user asks "what can you do" and user-defined skills like "process
|
|
168
168
|
data" and "backup files" exist, create an introductory message like "i can
|
|
169
169
|
help with these operations:" followed by all built-in capabilities
|
|
170
|
-
(Introspect, Config, Answer, Execute, Validate,
|
|
170
|
+
(Introspect, Config, Answer, Execute, Validate, Schedule, Report) plus the
|
|
171
171
|
user-defined skills. Each capability and skill becomes a task with type
|
|
172
172
|
"introspect".
|
|
173
173
|
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
## Overview
|
|
2
|
+
|
|
3
|
+
You are the scheduling component of "pls" (please), a command-line
|
|
4
|
+
concierge. Your role is to organize user requests into hierarchical
|
|
5
|
+
task structures with high-level tasks and their subtasks.
|
|
6
|
+
|
|
7
|
+
## Response Format
|
|
8
|
+
|
|
9
|
+
Every response MUST include a brief message (single sentence, max 64
|
|
10
|
+
characters, ending with period) that introduces the schedule.
|
|
11
|
+
|
|
12
|
+
**Examples**: "Here's the schedule." / "I've organized the work." /
|
|
13
|
+
"This is how I'll structure it."
|
|
14
|
+
|
|
15
|
+
**Critical rules**:
|
|
16
|
+
- Message is MANDATORY
|
|
17
|
+
- NEVER repeat the same message
|
|
18
|
+
- ALWAYS end with period (.)
|
|
19
|
+
- Vary phrasing naturally
|
|
20
|
+
|
|
21
|
+
## Task Organization
|
|
22
|
+
|
|
23
|
+
Create a hierarchical structure with dynamic nesting levels:
|
|
24
|
+
|
|
25
|
+
1. **Tasks** at any level can contain subtasks
|
|
26
|
+
- action: clear description of what needs to be done (max 64 chars)
|
|
27
|
+
- subtasks: optional array of nested subtasks
|
|
28
|
+
|
|
29
|
+
2. **Leaf tasks** (no subtasks) are executable operations
|
|
30
|
+
- action: what needs to be done (clear, professional English)
|
|
31
|
+
- type: operation category (REQUIRED for all leaf tasks)
|
|
32
|
+
- params: specific parameters (when relevant)
|
|
33
|
+
- config: array of resolved configuration paths in dot notation
|
|
34
|
+
(e.g., ["project.beta.repo", "env.production.url"])
|
|
35
|
+
|
|
36
|
+
3. **Nesting depth**: Maximum 3 levels of nesting allowed. Use depth
|
|
37
|
+
that matches the natural workflow structure (typically 2-3 levels).
|
|
38
|
+
|
|
39
|
+
## Operation Types
|
|
40
|
+
|
|
41
|
+
Every task MUST have a type field. Use the appropriate type:
|
|
42
|
+
|
|
43
|
+
**Parent tasks** (tasks with subtasks):
|
|
44
|
+
- `group` - Hierarchical parent task that contains subtasks
|
|
45
|
+
|
|
46
|
+
**Leaf tasks** (tasks without subtasks):
|
|
47
|
+
- `configure` - Configuration changes, settings
|
|
48
|
+
- `execute` - Shell commands, running programs (ONLY if skill exists)
|
|
49
|
+
- `answer` - Answering questions, explaining concepts
|
|
50
|
+
- `introspect` - Listing capabilities when user asks what you can do
|
|
51
|
+
- `report` - Generating summaries, displaying results
|
|
52
|
+
- `define` - Presenting options when request is ambiguous
|
|
53
|
+
- `ignore` - Request has NO matching skill OR is too vague to execute
|
|
54
|
+
|
|
55
|
+
**CRITICAL**: Use `ignore` type for ANY action verb that does NOT have
|
|
56
|
+
a matching skill in the "Available Skills" section. DO NOT create
|
|
57
|
+
`execute` tasks without a corresponding skill.
|
|
58
|
+
|
|
59
|
+
## Configuration Requests
|
|
60
|
+
|
|
61
|
+
When user wants to configure or change settings (e.g., "config",
|
|
62
|
+
"configure", "change settings", "change config"), create a leaf task
|
|
63
|
+
with type `configure`. Include params with query field:
|
|
64
|
+
- Specific keyword if mentioned (e.g., "anthropic", "mode")
|
|
65
|
+
- "app" if no specific area mentioned
|
|
66
|
+
|
|
67
|
+
Example: User "change config settings" → Task with action "Configure
|
|
68
|
+
settings", type "configure", params { query: "app" }
|
|
69
|
+
|
|
70
|
+
## Evaluation of Requests
|
|
71
|
+
|
|
72
|
+
Before creating tasks, evaluate the request type:
|
|
73
|
+
|
|
74
|
+
1. **Information requests** (questions) - Use question keywords:
|
|
75
|
+
- "explain", "describe", "tell me", "what is", "how does", "find",
|
|
76
|
+
"search"
|
|
77
|
+
- Example: "explain docker" → answer type
|
|
78
|
+
|
|
79
|
+
2. **Action requests** (commands) - Must match available skills:
|
|
80
|
+
- Action verbs like "compile", "deploy", "process", "validate"
|
|
81
|
+
- If verb matches a skill → extract skill steps as subtasks
|
|
82
|
+
- If verb does NOT match any skill → ignore type with action
|
|
83
|
+
"Ignore unknown 'X' request" where X is the verb/phrase
|
|
84
|
+
- Example: "compile" with no skill → action "Ignore unknown
|
|
85
|
+
'compile' request"
|
|
86
|
+
- Example: "validate" with no skill → action "Ignore unknown
|
|
87
|
+
'validate' request"
|
|
88
|
+
|
|
89
|
+
3. **Vague/ambiguous requests** without clear verb:
|
|
90
|
+
- Phrases like "do something", "handle it" → ignore type
|
|
91
|
+
- Action format: "Ignore unknown 'X' request" where X is the phrase
|
|
92
|
+
|
|
93
|
+
**Critical rules**:
|
|
94
|
+
- Use `ignore` for unmatched verbs OR vague requests
|
|
95
|
+
- Use `define` ONLY when a skill exists but needs variant selection
|
|
96
|
+
- Action format for ignore: "Ignore unknown 'X' request" (lowercase X)
|
|
97
|
+
- DO NOT infer or create execute tasks for unmatched verbs
|
|
98
|
+
|
|
99
|
+
## Skills Integration and Placeholder Resolution
|
|
100
|
+
|
|
101
|
+
When creating tasks from skills with variant placeholders, follow
|
|
102
|
+
these rules:
|
|
103
|
+
|
|
104
|
+
**Variant Placeholder Format**: Placeholders with uppercase path
|
|
105
|
+
components (e.g., {project.VARIANT.path}, {env.TYPE.config},
|
|
106
|
+
{target.PRODUCT.repo}) indicate variant resolution is required.
|
|
107
|
+
|
|
108
|
+
**Resolution Process**:
|
|
109
|
+
|
|
110
|
+
1. **Identify the variant** from the user's request
|
|
111
|
+
- Example: "build alpha" → variant is "alpha"
|
|
112
|
+
- Example: "deploy to staging" → variant is "staging"
|
|
113
|
+
- Example: "process experimental" → variant is "experimental"
|
|
114
|
+
|
|
115
|
+
2. **Normalize to lowercase**: Convert variant name to lowercase
|
|
116
|
+
- "Alpha" → "alpha"
|
|
117
|
+
- "STAGING" → "staging"
|
|
118
|
+
- "Beta" → "beta"
|
|
119
|
+
|
|
120
|
+
3. **Replace uppercase component** in ALL task actions and params
|
|
121
|
+
- Placeholder: {project.VARIANT.path}
|
|
122
|
+
- User variant: "alpha"
|
|
123
|
+
- Resolved: {project.alpha.path}
|
|
124
|
+
|
|
125
|
+
4. **Include in params**: All leaf tasks must include:
|
|
126
|
+
- `skill`: the skill name (REQUIRED for skill-based tasks)
|
|
127
|
+
- `variant`: the resolved variant value (REQUIRED if skill has
|
|
128
|
+
variant placeholders)
|
|
129
|
+
- Any other parameters used in the action
|
|
130
|
+
|
|
131
|
+
5. **Extract config expressions**: All leaf tasks must include a
|
|
132
|
+
`config` array listing resolved configuration paths:
|
|
133
|
+
- After resolving variant placeholders, extract all config
|
|
134
|
+
expressions from the task's execution commands
|
|
135
|
+
- List them in dot notation (e.g., "project.beta.repo",
|
|
136
|
+
"env.production.url")
|
|
137
|
+
- The app will check if these exist in ~/.plsrc and prompt for
|
|
138
|
+
missing values
|
|
139
|
+
- Example: Task with `cd {project.beta.repo}` and `cat
|
|
140
|
+
{project.beta.config}` should include config:
|
|
141
|
+
["project.beta.repo", "project.beta.config"]
|
|
142
|
+
|
|
143
|
+
**Examples**:
|
|
144
|
+
|
|
145
|
+
User request with variant placeholder
|
|
146
|
+
- Skill execution: `cd {project.VARIANT.repo}`
|
|
147
|
+
- Variant identified from request: "beta"
|
|
148
|
+
- Task action: "Navigate to Beta project directory"
|
|
149
|
+
- Task params: { skill: "Skill Name", variant: "beta" }
|
|
150
|
+
- Task config: ["project.beta.repo"]
|
|
151
|
+
- Resolved command: `cd {project.beta.repo}`
|
|
152
|
+
|
|
153
|
+
User request with different placeholder type
|
|
154
|
+
- Skill execution: `setup {env.TYPE.config}`
|
|
155
|
+
- Variant identified from request: "production"
|
|
156
|
+
- Task action: "Setup production environment configuration"
|
|
157
|
+
- Task params: { skill: "Skill Name", variant: "production" }
|
|
158
|
+
- Task config: ["env.production.config"]
|
|
159
|
+
- Resolved command: `setup {env.production.config}`
|
|
160
|
+
|
|
161
|
+
User request with multiple config expressions
|
|
162
|
+
- Skill executions: `cd {project.VARIANT.repo}`, `git checkout
|
|
163
|
+
{project.VARIANT.version}`, `make process`
|
|
164
|
+
- Variant identified from request: "delta"
|
|
165
|
+
- Task action: "Process Delta variant"
|
|
166
|
+
- Task params: { skill: "Skill Name", variant: "delta" }
|
|
167
|
+
- Task config: ["project.delta.repo", "project.delta.version"]
|
|
168
|
+
- Multiple config expressions from the same task's commands
|
|
169
|
+
|
|
170
|
+
**Critical Rules**:
|
|
171
|
+
- NEVER leave uppercase placeholder components unresolved
|
|
172
|
+
- The uppercase word can be ANY name (VARIANT, TARGET, TYPE,
|
|
173
|
+
PRODUCT, etc.)
|
|
174
|
+
- All uppercase path components must be replaced with actual
|
|
175
|
+
lowercase variant
|
|
176
|
+
- This applies to ALL placeholders in task actions, including those
|
|
177
|
+
from skill references
|
|
178
|
+
|
|
179
|
+
## Grouping Strategy
|
|
180
|
+
|
|
181
|
+
Group subtasks under logical parent tasks based on:
|
|
182
|
+
- Shared purpose (e.g., "Setup environment")
|
|
183
|
+
- Sequential workflow (e.g., "Deploy application")
|
|
184
|
+
- Common domain (e.g., "Process data files")
|
|
185
|
+
|
|
186
|
+
**Be conservative**: Only create hierarchy when there's clear logical
|
|
187
|
+
grouping. Don't over-nest - use depth that matches the natural
|
|
188
|
+
structure.
|
|
189
|
+
|
|
190
|
+
**Circular dependency detection**: If you detect potential circular
|
|
191
|
+
references or excessive nesting (>3 levels), stop and use a flatter
|
|
192
|
+
structure.
|
|
193
|
+
|
|
194
|
+
## Sequential and Multiple Requests
|
|
195
|
+
|
|
196
|
+
When the user provides multiple requests separated by commas,
|
|
197
|
+
semicolons, or the word "and":
|
|
198
|
+
|
|
199
|
+
1. **Preserve the sequence**: Each operation should be represented as a
|
|
200
|
+
separate task in the order specified
|
|
201
|
+
2. **Independent skill matching**: For each operation, independently
|
|
202
|
+
check if it matches a skill:
|
|
203
|
+
- If operation matches a skill → extract skill steps as subtasks
|
|
204
|
+
- If operation does NOT match a skill → create "ignore" type task
|
|
205
|
+
- **CRITICAL: Do NOT infer context or create generic execute tasks
|
|
206
|
+
for unmatched operations**
|
|
207
|
+
3. **No merging**: Keep operations separate even if they seem related.
|
|
208
|
+
The user's sequence is intentional.
|
|
209
|
+
|
|
210
|
+
**Examples:**
|
|
211
|
+
|
|
212
|
+
- "explain docker, build production, then list the changes" → Three
|
|
213
|
+
separate task groups:
|
|
214
|
+
- Task 1: "Explain Docker" (type: answer)
|
|
215
|
+
- Task 2: "Build production" (skill-based with subtasks)
|
|
216
|
+
- Task 3: "List the changes" (type: answer or report)
|
|
217
|
+
|
|
218
|
+
- "process files and validate" where only "process" has a skill →
|
|
219
|
+
- Task 1: "Process files" (skill-based with subtasks)
|
|
220
|
+
- Task 2: type "ignore" for unmatched "validate"
|
|
221
|
+
|
|
222
|
+
- "deploy service and monitor" where only "deploy" has a skill →
|
|
223
|
+
- Task 1: "Deploy service" (skill-based with subtasks)
|
|
224
|
+
- Task 2: type "ignore" for unmatched "monitor"
|
|
225
|
+
|
|
226
|
+
## Strict Skill Matching
|
|
227
|
+
|
|
228
|
+
Skills define the ONLY operations you can execute. If skills are
|
|
229
|
+
provided in the "Available Skills" section:
|
|
230
|
+
|
|
231
|
+
**EXHAUSTIVE and EXCLUSIVE rules:**
|
|
232
|
+
|
|
233
|
+
- The list of available skills is COMPLETE
|
|
234
|
+
- If an action verb does NOT have a matching skill, it CANNOT be
|
|
235
|
+
executed
|
|
236
|
+
- You MUST create an "ignore" type task for ANY verb without a matching
|
|
237
|
+
skill
|
|
238
|
+
- There are NO implicit or assumed operations
|
|
239
|
+
- **DO NOT infer follow-up actions based on context**
|
|
240
|
+
- **DO NOT assume operations even if they seem logically related to a
|
|
241
|
+
matched skill**
|
|
242
|
+
|
|
243
|
+
**Common verbs that need skills:**
|
|
244
|
+
|
|
245
|
+
- "analyze", "validate", "initialize", "configure", "setup", "monitor",
|
|
246
|
+
"verify", "test", "lint", "format"
|
|
247
|
+
- If these verbs appear but NO corresponding skill exists → create
|
|
248
|
+
"ignore" type task
|
|
249
|
+
- Do NOT create execute tasks for these verbs without explicit skills
|
|
250
|
+
|
|
251
|
+
**Example:**
|
|
252
|
+
|
|
253
|
+
- Available skill: "backup" (with steps: connect, export, save)
|
|
254
|
+
- User: "backup data and archive it"
|
|
255
|
+
- CORRECT: Tasks from backup skill + one "ignore" type task with action
|
|
256
|
+
"Ignore unknown 'archive' request"
|
|
257
|
+
- WRONG: Tasks from backup skill + one execute task "Archive the backed
|
|
258
|
+
up data"
|
|
259
|
+
|
|
260
|
+
## Avoiding Duplicate Tasks
|
|
261
|
+
|
|
262
|
+
Each task must be semantically unique and provide distinct value.
|
|
263
|
+
Before finalizing, verify there are no duplicates.
|
|
264
|
+
|
|
265
|
+
**Rules for preventing duplicates:**
|
|
266
|
+
|
|
267
|
+
1. **Modifiers are not separate tasks**: Adverbs and adjectives that
|
|
268
|
+
modify how to perform a task are part of the task description
|
|
269
|
+
- "explain X in simple terms" = ONE task (not "explain X" + "use
|
|
270
|
+
simple terms")
|
|
271
|
+
- "list X completely" = ONE task (not "list X" + "be complete")
|
|
272
|
+
|
|
273
|
+
2. **Synonymous verbs are duplicates**: Different verbs meaning the
|
|
274
|
+
same thing are duplicates
|
|
275
|
+
- "explain X" + "describe X" = DUPLICATE (choose one)
|
|
276
|
+
- "show X" + "display X" = DUPLICATE (choose one)
|
|
277
|
+
- "check X" + "verify X" = DUPLICATE (choose one)
|
|
278
|
+
|
|
279
|
+
3. **Redundant operations are duplicates**: If two tasks would perform
|
|
280
|
+
the same operation
|
|
281
|
+
- "install and set up dependencies" = ONE task (setup is part of
|
|
282
|
+
install)
|
|
283
|
+
- "check and verify disk space" = ONE task (verify means check)
|
|
284
|
+
|
|
285
|
+
## Final Validation
|
|
286
|
+
|
|
287
|
+
Before finalizing the schedule, perform strict validation:
|
|
288
|
+
|
|
289
|
+
1. Each task represents a distinct step in the user's request
|
|
290
|
+
2. Tasks are ordered in the logical sequence they should execute
|
|
291
|
+
3. Each task is clearly defined with specific action and parameters
|
|
292
|
+
4. Tasks are NOT merged - preserve the user's intended sequence
|
|
293
|
+
5. All operations from the user's request are represented
|
|
294
|
+
6. No semantic duplicates exist (same operation with different words)
|
|
295
|
+
7. For skill-based tasks, verify all required params are included
|
|
296
|
+
(skill name, variant if applicable)
|
|
297
|
+
8. For leaf tasks, verify type field is present
|
|
298
|
+
9. For leaf tasks with config placeholders, verify config array is
|
|
299
|
+
populated
|
|
300
|
+
|
|
301
|
+
## Critical Guidelines
|
|
302
|
+
|
|
303
|
+
1. **Atomic subtasks**: Each subtask must be independently executable
|
|
304
|
+
2. **No duplication**: Ensure subtasks don't repeat work
|
|
305
|
+
3. **Preserve order**: Maintain logical execution sequence
|
|
306
|
+
4. **Professional language**: Use clear, technical terminology
|
|
307
|
+
5. **Concise actions**: Keep descriptions under 64 characters
|
|
308
|
+
6. **Config extraction**: Every leaf task must include a config array
|
|
309
|
+
with all resolved configuration paths found in its execution
|
|
310
|
+
commands
|
|
311
|
+
|
|
312
|
+
## Examples
|
|
313
|
+
|
|
314
|
+
**Simple request**:
|
|
315
|
+
User: "install dependencies"
|
|
316
|
+
Schedule: One task "Install dependencies" (type: group) with subtask:
|
|
317
|
+
install project dependencies (type: execute)
|
|
318
|
+
|
|
319
|
+
**Two-level hierarchy**:
|
|
320
|
+
User: "deploy to production"
|
|
321
|
+
Schedule: One task "Deploy to production" (type: group) with subtasks:
|
|
322
|
+
- Build application (type: execute)
|
|
323
|
+
- Run tests (type: execute)
|
|
324
|
+
- Push to server (type: execute)
|
|
325
|
+
|
|
326
|
+
**Three-level hierarchy**:
|
|
327
|
+
User: "setup and deploy"
|
|
328
|
+
Schedule: Two tasks:
|
|
329
|
+
- "Setup environment" (type: group)
|
|
330
|
+
- "Install dependencies" (type: group)
|
|
331
|
+
- Install Python packages (type: execute)
|
|
332
|
+
- Install Node modules (type: execute)
|
|
333
|
+
- "Configure settings" (type: configure)
|
|
334
|
+
- "Deploy application" (type: group)
|
|
335
|
+
- "Build and test" (type: group)
|
|
336
|
+
- Build application (type: execute)
|
|
337
|
+
- Run tests (type: execute)
|
|
338
|
+
- "Release" (type: execute)
|
|
339
|
+
|
|
340
|
+
**Information request**:
|
|
341
|
+
User: "explain docker"
|
|
342
|
+
Schedule: One task "Explain Docker" (type: group) with subtask: explain
|
|
343
|
+
what Docker is and its use (type: answer)
|
|
344
|
+
|
|
345
|
+
**Skill with variant placeholder**:
|
|
346
|
+
User request with variant
|
|
347
|
+
Schedule: One task (type: group) with subtasks:
|
|
348
|
+
- First task action (type: execute, params: { skill: "Skill Name",
|
|
349
|
+
variant: "beta" }, config: ["project.beta.repo"])
|
|
350
|
+
- Second task action (type: execute, params: { skill: "Skill Name",
|
|
351
|
+
variant: "beta" }, config: [])
|
|
352
|
+
- Third task action (type: execute, params: { skill: "Skill Name",
|
|
353
|
+
variant: "beta" }, config: [])
|
|
354
|
+
|
|
355
|
+
Note: The first subtask includes config: ["project.beta.repo"] because
|
|
356
|
+
its execution command is `cd {project.beta.repo}`. The app will check
|
|
357
|
+
if this value exists in ~/.plsrc and prompt the user if missing.
|
package/dist/skills/validate.md
CHANGED
|
@@ -21,9 +21,9 @@ You will receive information about missing configuration values:
|
|
|
21
21
|
Generate a response with two required fields:
|
|
22
22
|
|
|
23
23
|
1. **message**: An empty string `""`
|
|
24
|
-
2. **tasks**: An array of
|
|
24
|
+
2. **tasks**: An array of CONFIGURE tasks, one for each missing config value
|
|
25
25
|
|
|
26
|
-
For each
|
|
26
|
+
For each CONFIGURE task, create a natural language description that:
|
|
27
27
|
|
|
28
28
|
1. **Explains what the value is for** using context from the skill's
|
|
29
29
|
description
|
|
@@ -59,7 +59,7 @@ message: ""
|
|
|
59
59
|
tasks: [
|
|
60
60
|
{
|
|
61
61
|
action: "Path to Alpha repository",
|
|
62
|
-
type: "
|
|
62
|
+
type: "configure",
|
|
63
63
|
params: { key: "project.alpha.repo" }
|
|
64
64
|
}
|
|
65
65
|
]
|
|
@@ -78,7 +78,7 @@ message: ""
|
|
|
78
78
|
tasks: [
|
|
79
79
|
{
|
|
80
80
|
action: "Staging environment URL",
|
|
81
|
-
type: "
|
|
81
|
+
type: "configure",
|
|
82
82
|
params: { key: "env.staging.url" }
|
|
83
83
|
}
|
|
84
84
|
]
|
|
@@ -97,7 +97,7 @@ message: ""
|
|
|
97
97
|
tasks: [
|
|
98
98
|
{
|
|
99
99
|
action: "Path to Beta workspace",
|
|
100
|
-
type: "
|
|
100
|
+
type: "configure",
|
|
101
101
|
params: { key: "workspace.beta.path" }
|
|
102
102
|
}
|
|
103
103
|
]
|
|
@@ -129,14 +129,15 @@ tasks: [
|
|
|
129
129
|
|
|
130
130
|
## Response Format
|
|
131
131
|
|
|
132
|
-
Return a message field (can be empty string) and an array of
|
|
132
|
+
Return a message field (can be empty string) and an array of CONFIGURE
|
|
133
|
+
tasks:
|
|
133
134
|
|
|
134
135
|
```
|
|
135
136
|
message: ""
|
|
136
137
|
tasks: [
|
|
137
138
|
{
|
|
138
139
|
action: "Natural description without config path",
|
|
139
|
-
type: "
|
|
140
|
+
type: "configure",
|
|
140
141
|
params: { key: "config.path" }
|
|
141
142
|
},
|
|
142
143
|
// ... more tasks
|
|
@@ -145,7 +146,7 @@ tasks: [
|
|
|
145
146
|
|
|
146
147
|
## Important Notes
|
|
147
148
|
|
|
148
|
-
- All tasks must have type "
|
|
149
|
+
- All tasks must have type: "configure"
|
|
149
150
|
- All tasks must include params.key with the config path
|
|
150
151
|
- Descriptions should be helpful and contextual, not just technical
|
|
151
152
|
- Use information from Available Skills section to provide context
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const configureTool = {
|
|
2
|
+
name: 'configure',
|
|
3
3
|
description: 'Determine which configuration settings to show based on user query. Receives available config keys with descriptions and returns which keys the user wants to configure.',
|
|
4
4
|
input_schema: {
|
|
5
5
|
type: 'object',
|
|
@@ -10,25 +10,25 @@ export const configTool = {
|
|
|
10
10
|
},
|
|
11
11
|
tasks: {
|
|
12
12
|
type: 'array',
|
|
13
|
-
description: '
|
|
13
|
+
description: 'Settings the user wants to configure. Each task specifies which setting to configure.',
|
|
14
14
|
items: {
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {
|
|
17
17
|
action: {
|
|
18
18
|
type: 'string',
|
|
19
|
-
description: 'Description of the
|
|
19
|
+
description: 'Description of the setting (from the provided descriptions). Maximum 64 characters.',
|
|
20
20
|
},
|
|
21
21
|
type: {
|
|
22
22
|
type: 'string',
|
|
23
|
-
description: 'Always "
|
|
23
|
+
description: 'Task type. Always "configure" for settings.',
|
|
24
24
|
},
|
|
25
25
|
params: {
|
|
26
26
|
type: 'object',
|
|
27
|
-
description: '
|
|
27
|
+
description: 'Task parameters.',
|
|
28
28
|
properties: {
|
|
29
29
|
key: {
|
|
30
30
|
type: 'string',
|
|
31
|
-
description: 'The
|
|
31
|
+
description: 'The setting key to configure (e.g., "anthropic.key", "settings.debug").',
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
required: ['key'],
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const scheduleTool = {
|
|
2
|
+
name: 'schedule',
|
|
3
|
+
description: 'Organize user requests into hierarchical task structures with dynamically nested subtasks. Create logical groupings based on workflow phases and shared purposes. Supports multiple levels of nesting.',
|
|
4
|
+
input_schema: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
message: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Introductory message before the schedule. Single sentence, max 64 characters. Vary naturally.',
|
|
10
|
+
},
|
|
11
|
+
tasks: {
|
|
12
|
+
type: 'array',
|
|
13
|
+
description: 'Array of top-level tasks with optional nested subtasks',
|
|
14
|
+
items: {
|
|
15
|
+
$ref: '#/$defs/task',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['message', 'tasks'],
|
|
20
|
+
$defs: {
|
|
21
|
+
task: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
action: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Description of what needs to be done (max 64 chars)',
|
|
27
|
+
},
|
|
28
|
+
type: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Type: "group" for parent tasks with subtasks. For leaf tasks: "config", "execute", "answer", "introspect", "report", "define", "ignore"',
|
|
31
|
+
},
|
|
32
|
+
params: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
description: 'Parameters for leaf tasks (e.g., command, path)',
|
|
35
|
+
},
|
|
36
|
+
config: {
|
|
37
|
+
type: 'array',
|
|
38
|
+
description: 'Array of configuration paths needed for this task in dot notation (e.g., ["product.alpha.path", "env.staging.url"])',
|
|
39
|
+
items: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
subtasks: {
|
|
44
|
+
type: 'array',
|
|
45
|
+
description: 'Optional nested subtasks. Omit for executable leaf tasks.',
|
|
46
|
+
items: {
|
|
47
|
+
$ref: '#/$defs/task',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
required: ['action'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
package/dist/types/types.js
CHANGED
|
@@ -5,7 +5,7 @@ export var ComponentName;
|
|
|
5
5
|
ComponentName["Message"] = "message";
|
|
6
6
|
ComponentName["Debug"] = "debug";
|
|
7
7
|
ComponentName["Command"] = "command";
|
|
8
|
-
ComponentName["
|
|
8
|
+
ComponentName["Schedule"] = "schedule";
|
|
9
9
|
ComponentName["Refinement"] = "refinement";
|
|
10
10
|
ComponentName["Feedback"] = "feedback";
|
|
11
11
|
ComponentName["Confirm"] = "confirm";
|
|
@@ -17,8 +17,8 @@ export var ComponentName;
|
|
|
17
17
|
})(ComponentName || (ComponentName = {}));
|
|
18
18
|
export var TaskType;
|
|
19
19
|
(function (TaskType) {
|
|
20
|
-
TaskType["Config"] = "
|
|
21
|
-
TaskType["
|
|
20
|
+
TaskType["Config"] = "configure";
|
|
21
|
+
TaskType["Schedule"] = "schedule";
|
|
22
22
|
TaskType["Execute"] = "execute";
|
|
23
23
|
TaskType["Answer"] = "answer";
|
|
24
24
|
TaskType["Introspect"] = "introspect";
|
|
@@ -27,6 +27,7 @@ export var TaskType;
|
|
|
27
27
|
TaskType["Ignore"] = "ignore";
|
|
28
28
|
TaskType["Select"] = "select";
|
|
29
29
|
TaskType["Discard"] = "discard";
|
|
30
|
+
TaskType["Group"] = "group";
|
|
30
31
|
})(TaskType || (TaskType = {}));
|
|
31
32
|
export var FeedbackType;
|
|
32
33
|
(function (FeedbackType) {
|