@nano-step/skill-manager 4.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.
@@ -0,0 +1,242 @@
1
+ # Agent Skill Result Handling Reference
2
+ # Scope: summarization rules and response patterns.
3
+ # Do not include routing, cache, or error recovery content here.
4
+
5
+ ## Result Types
6
+ 1. Text or scalar results
7
+ 2. Lists or collections
8
+ 3. File operation results
9
+ 4. Data query results
10
+ 5. Screenshot or binary results
11
+ 6. Structured objects
12
+
13
+ ## Global Summarization Rules
14
+ - Always state success or failure clearly.
15
+ - Always include key identifiers (IDs, paths, URLs, uids).
16
+ - Always include counts for list-like results.
17
+ - Always include actionable next steps when applicable.
18
+ - Never dump raw large payloads into the response.
19
+
20
+ ## Large Result Handling (>1000 chars)
21
+ When result size exceeds 1000 characters:
22
+ 1. Provide a short summary (1-3 lines).
23
+ 2. Include counts and key identifiers.
24
+ 3. Offer a follow-up query or refined filter.
25
+ 4. If a file was generated, include file path.
26
+
27
+ Example:
28
+ ```
29
+ Result (large): 12,450 chars
30
+ Summary: Returned 325 items across 6 pages.
31
+ Key IDs: [101, 102, 103]
32
+ Next: Ask for a specific page or filter by label.
33
+ ```
34
+
35
+ ## File Operation Result Patterns
36
+ Pattern: read/write/create/delete/move
37
+
38
+ Required fields to report:
39
+ - Path(s)
40
+ - Size or line count (if available)
41
+ - Operation status
42
+
43
+ Example: read
44
+ ```
45
+ Success: file read
46
+ Path: /tmp/output.log
47
+ Size: 4,892 chars (120 lines)
48
+ Next: specify line range for deeper inspection.
49
+ ```
50
+
51
+ Example: write
52
+ ```
53
+ Success: file written
54
+ Path: /tmp/report.json
55
+ Size: 1,204 chars
56
+ Next: open the file to review content.
57
+ ```
58
+
59
+ Example: delete
60
+ ```
61
+ Success: file deleted
62
+ Path: /tmp/old.png
63
+ Next: none
64
+ ```
65
+
66
+ Example: move
67
+ ```
68
+ Success: file moved
69
+ From: /tmp/a.txt
70
+ To: /tmp/archive/a.txt
71
+ Next: verify new location if needed.
72
+ ```
73
+
74
+ ## Data Query Result Patterns
75
+ Pattern: lists, rows, records, JSON arrays
76
+
77
+ Required fields:
78
+ - Count
79
+ - Key identifiers or first few items
80
+ - Filters used
81
+
82
+ Example: small list
83
+ ```
84
+ Success: 3 items
85
+ IDs: [11, 12, 13]
86
+ Filter: state=open
87
+ Next: request details for a specific ID.
88
+ ```
89
+
90
+ Example: large list
91
+ ```
92
+ Success: 250 items
93
+ Sample: [id: 1, id: 2, id: 3]
94
+ Filter: label=bug, sort=updated
95
+ Next: narrow by date range or page.
96
+ ```
97
+
98
+ Example: structured object
99
+ ```
100
+ Success: retrieved PR #42
101
+ Repo: owner/repo
102
+ Status: open, checks=3
103
+ Next: request file list or reviews.
104
+ ```
105
+
106
+ ## Screenshot Result Patterns
107
+ Pattern: binary output + path
108
+
109
+ Required fields:
110
+ - Path or attachment name
111
+ - Whether full page or element
112
+ - If element: uid or selector
113
+
114
+ Example: full page
115
+ ```
116
+ Success: screenshot captured
117
+ Path: /tmp/screen.png
118
+ Mode: fullPage
119
+ Next: request another region if needed.
120
+ ```
121
+
122
+ Example: element
123
+ ```
124
+ Success: element screenshot captured
125
+ Path: /tmp/button.png
126
+ Element: uid=btn-login
127
+ Next: use take_snapshot to verify other uids.
128
+ ```
129
+
130
+ ## Console/Network Result Patterns
131
+ Pattern: browser logs and network lists
132
+
133
+ Required fields:
134
+ - Count
135
+ - Severity or resource type
136
+ - Example snippet or first item id
137
+
138
+ Example: console errors
139
+ ```
140
+ Success: 2 console errors
141
+ First: [msgid=14] "TypeError: ..."
142
+ Next: open specific message id for details.
143
+ ```
144
+
145
+ Example: network list
146
+ ```
147
+ Success: 18 network requests
148
+ Types: xhr=5, fetch=6, document=1
149
+ Next: open request id for full headers/body.
150
+ ```
151
+
152
+ ## Performance Trace Result Patterns
153
+ Required fields:
154
+ - Trace file path
155
+ - Whether autoStop occurred
156
+ - Insight names (if provided)
157
+
158
+ Example:
159
+ ```
160
+ Success: trace recorded
161
+ Path: trace.json.gz
162
+ Insights: LCPBreakdown, DocumentLatency
163
+ Next: analyze specific insight by name.
164
+ ```
165
+
166
+ ## Documentation Query Result Patterns
167
+ Required fields:
168
+ - Library ID
169
+ - Match count or snippet count
170
+ - Example snippet or key excerpt
171
+
172
+ Example:
173
+ ```
174
+ Success: docs retrieved
175
+ Library: /vercel/next.js
176
+ Matches: 4
177
+ Snippet: "useRouter" example with push()
178
+ Next: ask for detailed example or version-specific docs.
179
+ ```
180
+
181
+ ## GraphQL Result Patterns
182
+ Required fields:
183
+ - Count of items or types
184
+ - Sample names
185
+ - Endpoint used
186
+
187
+ Example: filter_queries
188
+ ```
189
+ Success: 12 queries
190
+ Sample: [user, repo, search]
191
+ Endpoint: http://localhost:5555/graphql
192
+ Next: get_field_details for a specific query.
193
+ ```
194
+
195
+ Example: get_type_details
196
+ ```
197
+ Success: type User
198
+ Fields: 9
199
+ Sample: id, name, email
200
+ Next: fetch field details for specific field.
201
+ ```
202
+
203
+ ## Reasoning Result Patterns
204
+ Required fields:
205
+ - Thought count
206
+ - Final conclusion
207
+
208
+ Example:
209
+ ```
210
+ Success: reasoning completed
211
+ Thoughts: 5
212
+ Conclusion: pick tool A due to lower latency.
213
+ Next: proceed with tool execution.
214
+ ```
215
+
216
+ ## Always Include in Responses
217
+ - Status: success or failure
218
+ - IDs or paths or URLs
219
+ - Counts for list results
220
+ - Next steps or suggestions
221
+
222
+ ## Example Summary Formats
223
+ Format A (compact):
224
+ ```
225
+ Success: 5 items (ids: 1,2,3...) | Next: request item details
226
+ ```
227
+
228
+ Format B (structured):
229
+ ```
230
+ Status: success
231
+ Count: 5
232
+ IDs: [1,2,3]
233
+ Next: request details
234
+ ```
235
+
236
+ Format C (file-first):
237
+ ```
238
+ Status: success
239
+ Path: /tmp/output.json
240
+ Size: 2,043 chars
241
+ Next: open file for review
242
+ ```
@@ -0,0 +1,247 @@
1
+ # Agent Skill Tool Categories Reference (Semantic)
2
+ # Scope: semantic category mapping and example tool lists
3
+ # Do not include routing algorithm, execution, results, or errors here.
4
+
5
+ ## Categorization System (Semantic Only)
6
+
7
+ This skill uses **semantic categorization**:
8
+
9
+ 1. **Tool discovery** - `/agent-skill-refresh` enumerates all tools available to the agent
10
+ 2. **Semantic analysis** - the AI reads each tool's **name + description**
11
+ 3. **Dynamic grouping** - tools are grouped into categories based on what they do
12
+
13
+ Categories are **AI-generated at refresh time** and are not predefined. The same
14
+ tool set may yield different category labels if the tool descriptions change.
15
+
16
+ ## How Semantic Categorization Works
17
+
18
+ Semantic categorization is a meaning-based process rather than a pattern match.
19
+ The AI looks at each tool's:
20
+
21
+ - Action verbs (e.g., "click", "list", "introspect", "fetch")
22
+ - Domain nouns (e.g., "page", "repository", "schema", "documentation")
23
+ - Operation scope (e.g., UI interaction vs. metadata discovery)
24
+ - Input/output shape described in the tool description
25
+
26
+ The result is a set of categories that represent **intent clusters**, such as
27
+ "Browser Automation", "GitHub Operations", or "GraphQL Introspection". These
28
+ categories are **labels**, not fixed contracts, and can evolve with the tool set.
29
+
30
+ ## Categories Are Generated, Not Predefined
31
+
32
+ - Categories are **not hard-coded**
33
+ - Category names are **derived from the tools** at refresh time
34
+ - Custom MCP servers are handled automatically
35
+ - The system works with any MCP configuration (MetaMCP, standalone, or custom)
36
+
37
+ ## Cache File (v2.0.0) - How to Read It
38
+
39
+ The `/agent-skill-refresh` command writes a cache file using the v2.0.0 schema. This
40
+ file is the **source of truth** for the current categorization state.
41
+
42
+ ### Schema Overview
43
+
44
+ ```json
45
+ {
46
+ "categories": {
47
+ "browser-automation": {
48
+ "name": "Browser Automation",
49
+ "description": "Web page interaction, screenshots, DOM manipulation",
50
+ "keywords": ["screenshot", "click", "navigate", "page"],
51
+ "tools": ["tool_id_1", "tool_id_2"]
52
+ }
53
+ },
54
+ "tools": {
55
+ "tool_id_1": {
56
+ "category": "browser-automation",
57
+ "description": "Tool description"
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ ### Reading Tips
64
+
65
+ - **categories**: a map of generated category IDs to human-friendly metadata
66
+ - **categories.<id>.tools**: the list of tool IDs grouped into that category
67
+ - **tools**: a map of tool IDs to their assigned category and descriptions
68
+ - **tools.<id>.category**: the category ID that tool currently belongs to
69
+
70
+ Use the cache to understand the **current routing shape**. Do not assume the
71
+ same category IDs will exist across different environments or refresh runs.
72
+
73
+ ## Example Categories That Might Be Generated
74
+
75
+ These are illustrative only. Actual categories depend on the installed tools.
76
+
77
+ - Browser Automation
78
+ - GitHub Operations
79
+ - GraphQL Introspection
80
+ - Documentation Lookup
81
+
82
+ ## Browser Automation Category (Example)
83
+
84
+ Category name: Browser Automation
85
+ Keywords: screenshot, click, navigate, page, browser, dom, element, fill, hover,
86
+ drag, upload, dialog, network, console, performance, emulation
87
+ Description: Interact with live pages, DOM elements, and browser instrumentation.
88
+
89
+ Example tools that might appear in this category:
90
+ - take_screenshot
91
+ - Capture a page or element screenshot (png/jpeg/webp).
92
+ - take_snapshot
93
+ - Capture a text snapshot of the a11y tree with uids.
94
+ - click
95
+ - Click a page element by uid (optional double click).
96
+ - fill
97
+ - Fill a single input, textarea, or select element.
98
+ - fill_form
99
+ - Fill multiple form fields in one call.
100
+ - press_key
101
+ - Press a key or key combination (e.g., Enter, Control+Shift+R).
102
+ - hover
103
+ - Hover over a page element by uid.
104
+ - drag
105
+ - Drag one element and drop onto another element.
106
+ - upload_file
107
+ - Upload a local file using a file input element.
108
+ - handle_dialog
109
+ - Accept or dismiss a browser dialog, with optional prompt text.
110
+ - wait_for
111
+ - Wait for specific text to appear on the page.
112
+ - navigate_page
113
+ - Navigate to URL, back, forward, or reload.
114
+ - new_page
115
+ - Open a new page and optionally navigate to URL.
116
+ - close_page
117
+ - Close an existing page by ID.
118
+ - list_pages
119
+ - List all open pages with IDs.
120
+ - select_page
121
+ - Select an active page for future tool calls.
122
+ - resize_page
123
+ - Resize the viewport to a specific width and height.
124
+ - emulate
125
+ - Emulate network, CPU, and geolocation conditions.
126
+ - evaluate_script
127
+ - Run a JavaScript function in the page context.
128
+ - list_network_requests
129
+ - List recent network requests for the page.
130
+ - get_network_request
131
+ - Get a single network request by request id.
132
+ - list_console_messages
133
+ - List recent console messages on the page.
134
+ - get_console_message
135
+ - Get a single console message by message id.
136
+ - performance_start_trace
137
+ - Start a performance trace recording.
138
+ - performance_stop_trace
139
+ - Stop an active performance trace recording.
140
+ - performance_analyze_insight
141
+ - Analyze a specific performance insight set.
142
+
143
+ Notes:
144
+ - Browser category often contains the largest tool set.
145
+ - Tools require a page context; select or create a page first.
146
+ - Prefer take_snapshot for element discovery before click/hover/drag.
147
+
148
+ ## GitHub Operations Category (Example)
149
+
150
+ Category name: GitHub Operations
151
+ Keywords: pr, pull request, issue, repo, repository, commit, branch, review,
152
+ code search
153
+ Description: Query and manage GitHub metadata, issues, PRs, and repository content.
154
+
155
+ Example tools that might appear in this category:
156
+ - search_repositories
157
+ - Search repositories by query string.
158
+ - search_users
159
+ - Search GitHub users.
160
+ - search_code
161
+ - Search code across repositories.
162
+ - get_file_contents
163
+ - Fetch file or directory contents from a repo.
164
+ - list_issues
165
+ - List issues with filters (state, labels, sort).
166
+ - get_issue
167
+ - Get details for a specific issue.
168
+ - search_issues
169
+ - Search issues and PRs across repositories.
170
+ - list_commits
171
+ - List commits for a branch or SHA.
172
+ - create_branch
173
+ - Create a new branch from a base branch.
174
+ - get_pull_request
175
+ - Get details for a specific pull request.
176
+ - list_pull_requests
177
+ - List pull requests with filters (state, base, head).
178
+ - get_pull_request_files
179
+ - Get the files changed in a pull request.
180
+ - get_pull_request_status
181
+ - Get the combined status checks for a PR.
182
+ - get_pull_request_reviews
183
+ - Get reviews and review states for a PR.
184
+
185
+
186
+ ## GraphQL Introspection Category (Example)
187
+
188
+ Category name: GraphQL Introspection
189
+ Keywords: graphql, schema, query, mutation, type, field, introspection
190
+ Description: Introspect GraphQL schemas and discover query/mutation shapes.
191
+
192
+ Example tools that might appear in this category:
193
+ - get_graphql_schema
194
+ - Fetch full schema introspection.
195
+ - filter_queries
196
+ - Filter and list available queries.
197
+ - filter_mutations
198
+ - Filter and list available mutations.
199
+ - filter_types
200
+ - Filter and list types by kind.
201
+ - get_type_details
202
+ - Get fields and metadata for a type.
203
+ - get_field_details
204
+ - Get details for a specific query or mutation field.
205
+
206
+
207
+ ## Documentation Lookup Category (Example)
208
+
209
+ Category name: Documentation Lookup
210
+ Keywords: docs, documentation, reference, api, usage, example, how to
211
+ Description: Resolve library identifiers and query documentation.
212
+
213
+ Example tools that might appear in this category:
214
+ - resolve_library_id
215
+ - Resolve a library or package name to a library ID.
216
+ - query_docs
217
+ - Query documentation for a given library ID.
218
+
219
+
220
+ ## Category Boundary Examples
221
+ Use these to avoid misclassification:
222
+ - "take a screenshot" -> Browser Automation
223
+ - "list pull requests" -> GitHub Operations
224
+ - "list graphql queries" -> GraphQL Introspection
225
+ - "find docs for lodash" -> Documentation Lookup
226
+
227
+ ## Common Intent Phrases by Category
228
+ Browser intents:
229
+ - "click", "hover", "fill form", "upload file", "take snapshot"
230
+ GitHub intents:
231
+ - "get PR", "list issues", "search repo", "read file"
232
+ GraphQL intents:
233
+ - "introspect schema", "list types", "get field details"
234
+ Docs intents:
235
+ - "find docs", "usage example", "API reference"
236
+
237
+ ## Tool Naming Conventions (Observed Patterns)
238
+ - Tool names tend to be verb-first (get_, list_, search_, filter_, take_).
239
+ - UI interaction tools often use imperative verbs (click, hover, drag).
240
+ - Metadata tools tend to be resource-based (get_issue, list_commits).
241
+
242
+
243
+ ## Category Ownership Notes (Semantic Only)
244
+ - Browser Automation: runtime web UI interaction and diagnostics.
245
+ - GitHub Operations: repository metadata and collaboration artifacts.
246
+ - GraphQL Introspection: schema discovery and field metadata only.
247
+ - Documentation Lookup: documentation discovery and lookup.