-
Notifications
You must be signed in to change notification settings - Fork 0
feat: harden crawler/parser pipeline and expand plugin coverage #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
777e81a
feat(crawler): harden parsing, discovery and plugin generation
nsalvacao 4e3d01f
feat(config): add inventory audit command and config policy docs
nsalvacao 6f1d0b0
docs(workflow): update agent loop and backlog tracking
nsalvacao 455ed1b
chore(plugins): regenerate and normalize generated CLI plugins
nsalvacao ec1aa8b
fix(lint): apply ruff formatting for CI
nsalvacao 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 |
|---|---|---|
|
|
@@ -19,4 +19,5 @@ Requisitos.md | |
| crystalline-imagining-forest.md | ||
| .ideas/ | ||
| .dev/ | ||
| .productivity/ | ||
| /.venv-wsl | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "cli-awk", | ||
| "version": "", | ||
| "description": "Command reference plugin for awk CLI", | ||
| "keywords": [ | ||
| "awk" | ||
| ], | ||
| "repository": "https://github.com/nsalvacao/cli-plugins", | ||
| "license": "MIT" | ||
| } |
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,24 @@ | ||
| --- | ||
| name: scan-cli | ||
| description: Re-scan the awk CLI and regenerate plugin reference files | ||
| allowed-tools: ["Bash"] | ||
| --- | ||
|
|
||
| # Re-scan awk CLI | ||
|
|
||
| Run the rescan script to crawl the CLI and regenerate this plugin: | ||
|
|
||
| ```bash | ||
| bash $CLAUDE_PLUGIN_ROOT/scripts/rescan.sh | ||
| ``` | ||
|
|
||
| Add `--dry-run` to preview without writing files: | ||
|
|
||
| ```bash | ||
| bash $CLAUDE_PLUGIN_ROOT/scripts/rescan.sh --dry-run | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Requires `awk` installed and on PATH | ||
| - Idempotent -- re-running overwrites existing files cleanly |
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,26 @@ | ||
| #!/usr/bin/env bash | ||
| # Re-scan awk CLI and regenerate this plugin. | ||
| # Usage: bash scripts/rescan.sh [--dry-run] | ||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" | ||
|
|
||
| CLI_NAME="awk" | ||
| JSON_PATH="$PROJECT_ROOT/output/$CLI_NAME.json" | ||
| PLUGIN_DIR="$PROJECT_ROOT/plugins/cli-awk" | ||
|
|
||
| # Check CLI is available | ||
| if ! command -v "$CLI_NAME" &>/dev/null; then | ||
| echo "ERROR: $CLI_NAME not found on PATH. Install it first." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "==> Crawling $CLI_NAME..." | ||
| python3 "$PROJECT_ROOT/cli_crawler.py" "$CLI_NAME" | ||
|
|
||
| echo "==> Generating plugin..." | ||
| python3 "$PROJECT_ROOT/scripts/generate_plugin.py" "$JSON_PATH" "$@" | ||
|
|
||
| echo "==> Done. Plugin at: $PLUGIN_DIR" | ||
| ls -la "$PLUGIN_DIR" |
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,69 @@ | ||
| --- | ||
| name: cli-awk | ||
| description: >- | ||
| This skill should be used when the user needs help with awk CLI commands, flags, and troubleshooting. | ||
| --- | ||
|
|
||
| # awk CLI Reference | ||
|
|
||
| Compact command reference for **awk** v. | ||
|
|
||
| - **0** total commands | ||
| - **0** command flags + **28** global flags | ||
| - **0** extracted usage examples | ||
| - Max nesting depth: 0 | ||
|
|
||
| ## When to Use | ||
|
|
||
| - Constructing or validating `awk` commands | ||
| - Looking up flags/options fast | ||
| - Troubleshooting failed invocations | ||
|
|
||
| ## Top-Level Commands | ||
|
|
||
| Command format examples: | ||
|
|
||
| ### Global Flags | ||
|
|
||
| | Flag | Short | Type | Description | | ||
| | --- | --- | --- | --- | | ||
| | `--assign` | `-v` | string | assign=var=val | | ||
| | `--bignum` | `-M` | bool | bignum | | ||
| | `--characters-as-bytes` | `-b` | bool | characters-as-bytes | | ||
| | `--copyright` | `-C` | bool | copyright | | ||
| | `--debug` | `-D` | string | debug[=file] | | ||
| | `--dump-variables` | `-d` | string | dump-variables[=file] | | ||
| | `--exec` | `-E` | string | exec=file | | ||
| | `--field-separator` | `-F` | string | field-separator=fs | | ||
| | `--file` | `-f` | string | file=progfile | | ||
| | `--gen-pot` | `-g` | bool | gen-pot | | ||
| | `--help` | `-h` | bool | help | | ||
| | `--include` | `-i` | string | include=includefile | | ||
| | `--lint` | `-L` | string | lint[=fatal|invalid|no-ext] | | ||
| | `--lint-old` | `-t` | bool | lint-old | | ||
| | `--load` | `-l` | string | load=library | | ||
| | `--no-optimize` | `-s` | bool | no-optimize | | ||
| | `--non-decimal-data` | `-n` | bool | non-decimal-data | | ||
| | `--optimize` | `-O` | bool | optimize | | ||
| | `--posix` | `-P` | bool | posix | | ||
| | `--pretty-print` | `-o` | string | pretty-print[=file] | | ||
| | `--profile` | `-p` | string | profile[=file] | | ||
| | `--re-interval` | `-r` | bool | re-interval | | ||
| | `--sandbox` | `-S` | bool | sandbox | | ||
| | `--source` | `-e` | string | source='program-text' | | ||
| | `--trace` | `-I` | bool | trace | | ||
| | `--traditional` | `-c` | bool | traditional | | ||
| | `--use-lc-numeric` | `-N` | bool | use-lc-numeric | | ||
| | `--version` | `-V` | bool | version | | ||
|
|
||
| ## Common Usage Patterns (Compact) | ||
|
|
||
| _No examples extracted._ | ||
| ## Detailed References | ||
|
|
||
| - Full command tree: `references/commands.md` | ||
| - Full examples catalog: `references/examples.md` | ||
|
|
||
| ## Re-Scanning | ||
|
|
||
| After a CLI update, run `/scan-cli` or execute crawler + generator again. |
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,35 @@ | ||
| # awk -- Complete Command Reference | ||
|
|
||
| ## Global Flags | ||
|
|
||
| | Flag | Short | Type | Description | | ||
| | --- | --- | --- | --- | | ||
| | `--assign` | `-v` | string | assign=var=val | | ||
| | `--bignum` | `-M` | bool | bignum | | ||
| | `--characters-as-bytes` | `-b` | bool | characters-as-bytes | | ||
| | `--copyright` | `-C` | bool | copyright | | ||
| | `--debug` | `-D` | string | debug[=file] | | ||
| | `--dump-variables` | `-d` | string | dump-variables[=file] | | ||
| | `--exec` | `-E` | string | exec=file | | ||
| | `--field-separator` | `-F` | string | field-separator=fs | | ||
| | `--file` | `-f` | string | file=progfile | | ||
| | `--gen-pot` | `-g` | bool | gen-pot | | ||
| | `--help` | `-h` | bool | help | | ||
| | `--include` | `-i` | string | include=includefile | | ||
| | `--lint` | `-L` | string | lint[=fatal|invalid|no-ext] | | ||
| | `--lint-old` | `-t` | bool | lint-old | | ||
| | `--load` | `-l` | string | load=library | | ||
| | `--no-optimize` | `-s` | bool | no-optimize | | ||
| | `--non-decimal-data` | `-n` | bool | non-decimal-data | | ||
| | `--optimize` | `-O` | bool | optimize | | ||
| | `--posix` | `-P` | bool | posix | | ||
| | `--pretty-print` | `-o` | string | pretty-print[=file] | | ||
| | `--profile` | `-p` | string | profile[=file] | | ||
| | `--re-interval` | `-r` | bool | re-interval | | ||
| | `--sandbox` | `-S` | bool | sandbox | | ||
| | `--source` | `-e` | string | source='program-text' | | ||
| | `--trace` | `-I` | bool | trace | | ||
| | `--traditional` | `-c` | bool | traditional | | ||
| | `--use-lc-numeric` | `-N` | bool | use-lc-numeric | | ||
| | `--version` | `-V` | bool | version | | ||
|
|
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,2 @@ | ||
| # awk -- Usage Examples | ||
|
|
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 @@ | ||
| { | ||
| "name": "cli-curl", | ||
| "version": "8.5.0", | ||
| "description": "Command reference plugin for curl CLI", | ||
| "keywords": [ | ||
| "curl" | ||
| ], | ||
| "repository": "https://github.com/nsalvacao/cli-plugins", | ||
| "license": "MIT" | ||
| } |
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,24 @@ | ||
| --- | ||
| name: scan-cli | ||
| description: Re-scan the curl CLI and regenerate plugin reference files | ||
| allowed-tools: ["Bash"] | ||
| --- | ||
|
|
||
| # Re-scan curl CLI | ||
|
|
||
| Run the rescan script to crawl the CLI and regenerate this plugin: | ||
|
|
||
| ```bash | ||
| bash $CLAUDE_PLUGIN_ROOT/scripts/rescan.sh | ||
| ``` | ||
|
|
||
| Add `--dry-run` to preview without writing files: | ||
|
|
||
| ```bash | ||
| bash $CLAUDE_PLUGIN_ROOT/scripts/rescan.sh --dry-run | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Requires `curl` installed and on PATH | ||
| - Idempotent -- re-running overwrites existing files cleanly |
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,26 @@ | ||
| #!/usr/bin/env bash | ||
| # Re-scan curl CLI and regenerate this plugin. | ||
| # Usage: bash scripts/rescan.sh [--dry-run] | ||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" | ||
|
|
||
| CLI_NAME="curl" | ||
| JSON_PATH="$PROJECT_ROOT/output/$CLI_NAME.json" | ||
| PLUGIN_DIR="$PROJECT_ROOT/plugins/cli-$CLI_NAME" | ||
|
|
||
| # Check CLI is available | ||
| if ! command -v "$CLI_NAME" &>/dev/null; then | ||
| echo "ERROR: $CLI_NAME not found on PATH. Install it first." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "==> Crawling $CLI_NAME..." | ||
| python3 "$PROJECT_ROOT/cli_crawler.py" "$CLI_NAME" | ||
|
|
||
| echo "==> Generating plugin..." | ||
| python3 "$PROJECT_ROOT/scripts/generate_plugin.py" "$JSON_PATH" "$@" | ||
|
|
||
| echo "==> Done. Plugin at: $PLUGIN_DIR" | ||
| ls -la "$PLUGIN_DIR" |
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,53 @@ | ||
| --- | ||
| name: cli-curl | ||
| description: >- | ||
| This skill should be used when the user needs help with curl CLI commands, flags, and troubleshooting. | ||
| --- | ||
|
|
||
| # curl CLI Reference | ||
|
|
||
| Compact command reference for **curl** v8.5.0. | ||
|
|
||
| - **0** total commands | ||
| - **0** command flags + **12** global flags | ||
| - **0** extracted usage examples | ||
| - Max nesting depth: 0 | ||
|
|
||
| ## When to Use | ||
|
|
||
| - Constructing or validating `curl` commands | ||
| - Looking up flags/options fast | ||
| - Troubleshooting failed invocations | ||
|
|
||
| ## Top-Level Commands | ||
|
|
||
| Command format examples: | ||
|
|
||
| ### Global Flags | ||
|
|
||
| | Flag | Short | Type | Description | | ||
| | --- | --- | --- | --- | | ||
| | `--data` | `-d` | string | HTTP POST data | | ||
| | `--fail` | `-f` | bool | Fail fast with no output on HTTP errors | | ||
| | `--help` | `-h` | string | Get help for commands | | ||
| | `--include` | `-i` | bool | Include protocol response headers in the output | | ||
| | `--output` | `-o` | string | Write to file instead of stdout | | ||
| | `--remote-name` | `-O` | bool | Write output to a file named as the remote file | | ||
| | `--silent` | `-s` | bool | Silent mode | | ||
| | `--upload-file` | `-T` | string | Transfer local FILE to destination | | ||
| | `--user` | `-u` | string | Server user and password | | ||
| | `--user-agent` | `-A` | string | Send User-Agent <name> to server | | ||
| | `--verbose` | `-v` | bool | Make the operation more talkative | | ||
| | `--version` | `-V` | bool | Show version number and quit | | ||
|
|
||
| ## Common Usage Patterns (Compact) | ||
|
|
||
| _No examples extracted._ | ||
| ## Detailed References | ||
|
|
||
| - Full command tree: `references/commands.md` | ||
| - Full examples catalog: `references/examples.md` | ||
|
|
||
| ## Re-Scanning | ||
|
|
||
| After a CLI update, run `/scan-cli` or execute crawler + generator again. |
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,19 @@ | ||
| # curl -- Complete Command Reference | ||
|
|
||
| ## Global Flags | ||
|
|
||
| | Flag | Short | Type | Description | | ||
| | --- | --- | --- | --- | | ||
| | `--data` | `-d` | string | HTTP POST data | | ||
| | `--fail` | `-f` | bool | Fail fast with no output on HTTP errors | | ||
| | `--help` | `-h` | string | Get help for commands | | ||
| | `--include` | `-i` | bool | Include protocol response headers in the output | | ||
| | `--output` | `-o` | string | Write to file instead of stdout | | ||
| | `--remote-name` | `-O` | bool | Write output to a file named as the remote file | | ||
| | `--silent` | `-s` | bool | Silent mode | | ||
| | `--upload-file` | `-T` | string | Transfer local FILE to destination | | ||
| | `--user` | `-u` | string | Server user and password | | ||
| | `--user-agent` | `-A` | string | Send User-Agent <name> to server | | ||
| | `--verbose` | `-v` | bool | Make the operation more talkative | | ||
| | `--version` | `-V` | bool | Show version number and quit | | ||
|
|
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,2 @@ | ||
| # curl -- Usage Examples | ||
|
|
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.
There's a typo here. 'ou' should be 'or'.