-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(skills): add synonym expansion to gws skills search #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dumko2001
wants to merge
15
commits into
googleworkspace:main
Choose a base branch
from
dumko2001:feature/skills-search-synonyms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0de0541
feat: optimize AI skill generation (#82)
dumko2001 0abc682
feat(skills): hierarchical skill optimization and search command
dumko2001 d52bd3d
fix(skills): correct link regex and encoding in check_links.py and fi…
dumko2001 bae976b
fix(skills): improve error handling in skills search and generation
dumko2001 f29341e
refactor(skills): centralize persona and recipe registry definitions …
dumko2001 073b11a
fix(skills): support multi-word search queries and include helpers in…
dumko2001 2a3dcb9
fix(skills): handle --help/-h flags in skills search command
dumko2001 8935be1
fix(skills): show help on bare 'gws skills' invocation instead of error
dumko2001 934fd3e
fix(skills): use token-AND matching for multi-word search queries
dumko2001 e11a98b
feat(skills): add synonym expansion to gws skills search
dumko2001 5b17e49
fix(skills): correctly tokenize quoted search queries
dumko2001 154b7ea
fix(skills): use relative links and correct identifiers for required …
dumko2001 51bd196
chore: add changeset for skills search synonyms fix
dumko2001 c31bed8
chore: correct changeset package name
dumko2001 e2cec4d
fix(skills): reject empty search queries
dumko2001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| "gws": patch | ||
| --- | ||
|
|
||
| feat(skills): implement hierarchical skill discovery and search command | ||
|
|
||
| - Restructure skills/ into hierarchical references/ subdirectory to avoid agent context pollution. | ||
| - Add `gws skills search <query>` command for semantic/keyword discovery of 40+ API services. | ||
| - Restore essential safety tips (zsh ! expansion, JSON quoting) in the gws-shared skill. | ||
| - Refactor generate-skills logic to automate artifact generation and link validation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ---\n"@googleworkspace/cli": patch\n---\n\nfeat(skills): add synonym expansion to skills search and improve persona/recipe skill generation with relative links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,4 +47,5 @@ docs/plans/ | |
|
|
||
| # Generated | ||
| demo.mp4 | ||
| download.html | ||
| download.html | ||
| skills/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import os | ||
| import re | ||
| from pathlib import Path | ||
|
|
||
| def check_links(): | ||
| basedir = Path("skills").resolve() | ||
| docsdir = Path("docs").resolve() | ||
|
|
||
| # regex to find markdown links: [text](path) | ||
| link_regex = re.compile(r'\[.*?\]\((.*?)\)') | ||
|
|
||
| broken_links = 0 | ||
| total_links = 0 | ||
|
|
||
| files_to_check = list(basedir.rglob("*.md")) + list(docsdir.rglob("*.md")) | ||
|
|
||
| for filepath in files_to_check: | ||
| with open(filepath, 'r', encoding='utf-8') as f: | ||
| content = f.read() | ||
|
|
||
| for match in link_regex.finditer(content): | ||
| link_path = match.group(1).strip() | ||
|
|
||
| # Skip HTTP(S) links | ||
| if link_path.startswith(('http://', 'https://')): | ||
| continue | ||
|
|
||
| # Skip empty links, mailto:, etc | ||
| if not link_path or link_path.startswith(('mailto:', 'tel:')): | ||
| continue | ||
|
|
||
| # Skip absolute web paths like /chat/api/guides/... | ||
| if link_path.startswith('/'): | ||
| continue | ||
|
|
||
| # Skip anchor-only links | ||
| if link_path.startswith('#'): | ||
| continue | ||
|
|
||
| # Remove anchor from filename | ||
| file_part = link_path.split('#')[0] | ||
| if not file_part: | ||
| continue | ||
|
|
||
| total_links += 1 | ||
| target_path = (filepath.parent / file_part).resolve() | ||
| if not target_path.exists(): | ||
| print(f"Broken link in {filepath}: {link_path} (resolved to {target_path})") | ||
| broken_links += 1 | ||
|
|
||
| print(f"Checked {total_links} local links.") | ||
| if broken_links > 0: | ||
| print(f"Found {broken_links} broken links!") | ||
| exit(1) | ||
| else: | ||
| print("All local links are valid!") | ||
|
|
||
| if __name__ == "__main__": | ||
| check_links() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indented empty line will cause a Python
IndentationErrorand prevent the script from running. It should be removed.