@xynogen/pix-skills 0.10.1 → 0.10.3

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.
Files changed (44) hide show
  1. package/README.md +28 -22
  2. package/package.json +3 -3
  3. package/skills/ask-user.md +34 -43
  4. package/skills/audit.md +27 -30
  5. package/skills/bootstrap.md +19 -43
  6. package/skills/brainstorm.md +10 -51
  7. package/skills/cicd.md +17 -30
  8. package/skills/clone.md +19 -18
  9. package/skills/command-runner.md +7 -15
  10. package/skills/commit.md +22 -68
  11. package/skills/composio-mcp.md +24 -34
  12. package/skills/debug.md +18 -53
  13. package/skills/diff.md +8 -19
  14. package/skills/environment.md +21 -43
  15. package/skills/explain.md +27 -28
  16. package/skills/finish.md +24 -57
  17. package/skills/format.md +1 -1
  18. package/skills/handoff.md +24 -99
  19. package/skills/harden.md +18 -22
  20. package/skills/human/SKILL.md +177 -0
  21. package/skills/{human.md → human/references/patterns.md} +58 -252
  22. package/skills/human/references/profiles.md +86 -0
  23. package/skills/lint.md +1 -1
  24. package/skills/lsp.md +7 -11
  25. package/skills/readme.md +19 -25
  26. package/skills/review.md +30 -40
  27. package/skills/runner/SKILL.md +130 -0
  28. package/skills/runner/references/justfile.md +47 -0
  29. package/skills/runner/references/makefile.md +33 -0
  30. package/skills/runner/references/mise.md +88 -0
  31. package/skills/runner/references/npm-scripts.md +27 -0
  32. package/skills/runner/references/run-sh.md +46 -0
  33. package/skills/runner/references/taskfile.md +50 -0
  34. package/skills/search.md +22 -32
  35. package/skills/subagent.md +37 -353
  36. package/skills/suggest.md +10 -38
  37. package/skills/task.md +17 -37
  38. package/skills/tdd.md +1 -1
  39. package/skills/test.md +13 -46
  40. package/skills/tldr.md +12 -22
  41. package/skills/toon-json.md +11 -35
  42. package/skills/ui.md +8 -19
  43. package/skills/verify.md +14 -44
  44. package/skills/runner.md +0 -419
package/skills/review.md CHANGED
@@ -1,56 +1,46 @@
1
1
  ---
2
2
  name: review
3
- description: Architectural Review and Quality Assurance
3
+ description: Strict code review of a diff, branch, PR, or file — correctness, security, contracts, tests, conventions, scope, and YAGNI — with findings by severity and a Pass / Pass with suggestions / Fail verdict. Also covers how to act on review feedback. Use when asked to review code, check a PR, or respond to review comments.
4
4
  disable-model-invocation: true
5
5
  ---
6
- # Review Directive
6
+ # Review
7
7
 
8
- ## Persona
8
+ Review as a strict, skeptical reviewer. Assume the code is wrong until the evidence shows it is right. Cite the rule or fact behind each finding. No praise, no softening.
9
9
 
10
- You are a **bad-mood reviewer** going by the book faithfully. No charity, no benefit of the doubt. Code under review written by competing AI agent. Assume wrong until proven otherwise. Cite the rule violated. No praise, no softening.
10
+ ## Scope
11
11
 
12
- ## Below are what agent MUST do
12
+ Read the repo instructions first (AGENTS.md, CONTRIBUTING, linter config). They define the rules. Then read the full diff and enough surrounding code to judge each change.
13
13
 
14
- ### Pre-Review Checklist (Before Requesting Review)
14
+ ## Check
15
15
 
16
- - **SELF-REVIEW**: Read every changed line. Would you be embarrassed to show this?
17
- - **TESTS**: All tests pass. New behavior has tests. No skipped tests without explanation.
18
- - **SCOPE**: Changes limited to what was planned. No unrelated modifications.
19
- - **DOCS**: Public interfaces documented. README updated if behavior changed.
20
- - **CLEAN**: No debug logs, commented-out code, or TODO left behind.
16
+ - **Correctness** — logic, edge cases, error paths, ordering, concurrency.
17
+ - **Security** — secrets, injection, unsafe input, permissions.
18
+ - **Contracts** — imports, exports, links, and cross-module APIs still hold. Find every consumer of a changed API.
19
+ - **Tests** — new behavior has tests. No unexplained skips. Tests assert behavior, not internals.
20
+ - **Conventions** — this repo's naming, structure, and style.
21
+ - **Idempotency** — scripts and migrations are safe to run again.
22
+ - **Scope and YAGNI** — no unrelated edits. Flag unused code or features for removal.
23
+ - **Hygiene** — no debug logs, commented-out code, or stray TODOs.
21
24
 
22
- ### Review Phases
25
+ ## Report
23
26
 
24
- - **PHASES**: Verify logic follows proper ordering and dependencies.
25
- - **IDEMPOTENCY**: Ensure scripts and commands safely repeatable without side effects.
26
- - **CONSISTENCY**: Check adherence to project naming, structure, style conventions.
27
- - **INTEGRITY**: Verify imports, links, cross-module dependencies intact.
28
- - **SECURITY**: No hardcoded secrets, credentials, or unsafe inputs.
29
- - **YAGNI**: Feature or endpoint unused → flag for removal, don't "implement it properly."
30
-
31
- ### Receiving Review Feedback
32
-
33
- - **NO PERFORMATIVE AGREEMENT**: Never say "Great point!", "You're absolutely right!", or "Thanks for catching that!" Just fix it or push back. Actions speak.
34
- - **UNDERSTAND FIRST**: Before implementing anything, restate requirement in your own words. Any item unclear → stop and ask, don't implement the ones you understand while deferring the unclear ones.
35
- - **VERIFY BEFORE IMPLEMENTING**: Check if suggestion technically correct for *this* codebase. Does it break existing functionality? Conflict with prior architectural decisions?
36
- - **YAGNI CHECK**: Reviewer suggests adding feature → grep codebase first. Nothing calls it → push back: "This isn't used anywhere — remove it (YAGNI)?"
37
- - **PUSH BACK WHEN WRONG**: Use technical reasoning, not defensiveness. Reference working tests or code. Involve user if architectural.
38
- - **IMPLEMENTATION ORDER**: Fix blocking issues first (crashes, security), then simple fixes (typos), then complex refactors. Test each fix individually.
27
+ ```
28
+ ### [Blocker|Major|Minor] [title] — `file:line` (real line numbers from the hunk header, not offsets inside the hunk)
29
+ **Problem:** [what is wrong, with evidence]
30
+ **Fix:** [concrete change]
31
+ ```
39
32
 
40
- ### Acknowledging Correct Feedback
33
+ Severity: **Blocker** = incorrect, unsafe, or untested new behavior. **Major** = will cause trouble (debug logs that leak data, dead code). **Minor** = style and polish.
41
34
 
42
- ```
43
- ✅ "Fixed. [Brief description of what changed]"
44
- ✅ "Good catch — [specific issue]. Fixed in [location]."
45
- ✅ [Just fix it and show the diff]
35
+ End with one verdict:
46
36
 
47
- ❌ "You're absolutely right!"
48
- ❌ "Great point!"
49
- ❌ "Thanks for catching that!"
50
- ```
37
+ - **Fail** — any blocker: logic error, missing tests for new behavior, security issue, broken contract.
38
+ - **Pass with suggestions** — correct, with Major or Minor items.
39
+ - **Pass** — no findings.
51
40
 
52
- ### Verdict
41
+ ## Acting on feedback
53
42
 
54
- - **VERDICT**: Provide clear **Pass / Pass with Suggestions / Fail** report with technical rationale.
55
- - **FAIL** means: critical logic errors, missing tests, security issues, or broken contracts.
56
- - **Pass with Suggestions** means: works correctly but has improvement opportunities.
43
+ - Restate each item in your own words. If any item is unclear, ask before you change anything.
44
+ - Check each suggestion against this codebase. If it is wrong, push back with evidence (code, tests). If it adds something nothing uses, grep first and propose removal instead.
45
+ - Fix in this order: blockers (crashes, security) → simple fixes → refactors. Test after each fix.
46
+ - Acknowledge with facts: "Fixed: [change] in `file:line`." Never "Great point!" or "You're absolutely right!".
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: runner
3
+ description: Generates, converts, or updates a task runner file (justfile, Makefile, mise tasks, Taskfile.yml, package.json scripts, or run.sh) for any project. Use when asked to add a justfile or Makefile, set up dev/test/lint tasks, or convert one runner format to another.
4
+ disable-model-invocation: true
5
+ ---
6
+ # Task Runner Generation Directive
7
+
8
+ - **DETECT**: Scan project root for language/framework indicators (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `Makefile`, `justfile`, `setup.sh`, etc.). Identify primary language, package manager, test runner, linter, formatter.
9
+ - **SCAN EXISTING**: Runner file already exists (any format) → read it first as source of truth. Parse recipes/tasks, dependencies, groups, descriptions, parameters.
10
+ - **ASK FORMAT**: After DETECT and SCAN EXISTING, ask which format to use with one `ask_user` call. Offer the 4 formats that fit the stack best (`ask_user` allows 4 options). Put an existing runner first, marked "(Recommended)". The free-text row covers the rest. Formats:
11
+ - **justfile** — requires `just`. Native deps, groups, params, comments.
12
+ - **Makefile** — universal, pre-installed on all Unix. `.PHONY` targets, deps via prerequisites.
13
+ - **mise (mise.toml)** — task runner built into mise. Inline or file-based tasks with deps.
14
+ - **Taskfile.yml (go-task)** — YAML-based, cross-platform. Requires `task` binary.
15
+ - **package.json (npm scripts)** — requires Node. Simple key:value, no native dep graph.
16
+ - **run.sh (shell script)** — zero dependencies. Single bash script with subcommands.
17
+ - **RESEARCH**: Unfamiliar with detected stack → consult official docs for canonical dev/test/lint/format commands before writing recipes.
18
+ - **GENERATE**: Create runner file in project root adapted to detected stack and chosen format.
19
+ - **VALIDATE**: Run format's list command after creation to confirm all recipes parse correctly.
20
+
21
+ ## Required Task Structure
22
+
23
+ Every generated runner MUST include these standalone tasks at minimum:
24
+
25
+ | Task | Purpose |
26
+ |-----------|----------------------------------------|
27
+ | `install` | Create local environment, install deps |
28
+ | `dev` | Run the development server |
29
+
30
+ Additional consolidated tasks added based on what project contains (see Detection-to-Task Mapping below).
31
+
32
+ For dotfiles repos, task structure follows group/module pattern instead (sync, CLI, GUI, AI, System).
33
+
34
+ ## Task Consolidation
35
+
36
+ ### Principle
37
+
38
+ Group related operations into single parameterized task with `<action>` argument instead of separate flat tasks. Reduces surface area, makes runner discoverable.
39
+
40
+ ### Consolidation Decision Rule
41
+
42
+ | Condition | Action |
43
+ |---|---|
44
+ | Single command, no variants | Standalone task (e.g., `dev`, `install`) |
45
+ | 2+ related commands, action maps directly to a CLI arg | Simple parameterized — pass action through to the underlying tool |
46
+ | 2+ related commands, each runs different logic | Complex parameterized — case/conditional dispatch per action |
47
+ | Multi-step setup with no variants | Standalone with multi-command/array syntax |
48
+
49
+ ### Detection-to-Task Mapping
50
+
51
+ Scan project for these files/patterns. When detected, generate corresponding consolidated task:
52
+
53
+ | Detected files | Task | Actions | Type |
54
+ |---|---|---|---|
55
+ | `docker-compose.yml`, `Dockerfile` | `docker` | `build\|up\|down` | Simple (pass-through to `docker compose`) |
56
+ | DB config, migration dirs, ORM config | `db` | `migrate\|seed\|setup` | Complex (each action runs different commands) |
57
+ | Test runner present | `test` | `unit\|tidy` | Complex (each action runs a different tool) |
58
+ | Formatter present | `format` | `fix\|check` | Complex (`fix` rewrites, `check` dry-run for CI) |
59
+ | Linter present | `lint` | `check\|fix` | Complex (`check` reports issues, `fix` auto-corrects) |
60
+ | Deploy config (`fly.toml`, `render.yaml`, `vercel.json`, CI/CD) | `deploy` | `staging\|production` or format-appropriate | Complex |
61
+ | `proto/`, gRPC/OpenAPI specs | `gen` | `proto\|types\|client` | Complex |
62
+
63
+ Agent MUST check these indicators during DETECT step. Only generate consolidated tasks for capabilities that actually exist in project. Don't generate `docker` if no `Dockerfile`.
64
+
65
+ ### Naming Rules
66
+
67
+ - Task names: lowercase, single word when possible (`dev`, `test`, `db`)
68
+ - Descriptions: include action options in parens — `"Test operations (unit|tidy)"`
69
+ - Arg name: always `<action>` for the primary positional argument
70
+ - Bash blocks in parameterized tasks: always start with `#!/usr/bin/env bash` and `set -euo pipefail`
71
+ - **`lint` and `format` are NOT part of `test`** — they are separate concerns:
72
+ - `test` → correctness (pytest, cargo test, go test, etc.)
73
+ - `format` → code style; `fix` rewrites in-place, `check` is dry-run for CI
74
+ - `lint` → static analysis; `check` reports issues, `fix` auto-corrects
75
+
76
+ ## Language Adaptation Table
77
+
78
+ Use as reference when generating recipes:
79
+
80
+ | Language | install | dev | format | lint | test | tidy |
81
+ |------------|------------------------------------------------|----------------------------------|---------------------------|-----------------------------|--------------------------|----------------------------------------------|
82
+ | Python | `python -m venv .venv && .venv/bin/pip install -r requirements.txt` | `.venv/bin/python -m <app>` | `ruff format .` | `ruff check .` | `pytest` | `find . -type d -name __pycache__ -exec rm -rf {} + && rm -rf .pytest_cache dist build *.egg-info` |
83
+ | Node/TS | `npm install` | `npm run dev` | `npx prettier --write .` | `npx eslint .` | `npm test` | `rm -rf node_modules dist .next .nuxt` |
84
+ | Rust | `cargo build` | `cargo run` | `cargo fmt` | `cargo clippy` | `cargo test` | `cargo clean` |
85
+ | Go | `go mod download` | `go run .` | `gofmt -w .` | `golangci-lint run` | `go test ./...` | `go clean -cache -testcache` |
86
+ | Ruby | `bundle install` | `bundle exec rails server` | `bundle exec rubocop -A` | `bundle exec rubocop` | `bundle exec rspec` | `rm -rf tmp/cache vendor/bundle` |
87
+ | PHP | `composer install` | `php artisan serve` | `./vendor/bin/pint` | `./vendor/bin/phpstan` | `./vendor/bin/phpunit` | `rm -rf vendor/ .phpunit.cache` |
88
+ | Java | `./gradlew build` or `mvn install` | `./gradlew bootRun` or `mvn spring-boot:run` | `./gradlew spotlessApply` | `./gradlew check` | `./gradlew test` or `mvn test` | `./gradlew clean` or `mvn clean` |
89
+ | Elixir | `mix deps.get` | `mix phx.server` | `mix format` | `mix credo` | `mix test` | `mix clean` |
90
+ | Zig | `zig build` | `zig build run` | `zig fmt .` | `zig fmt --check .` | `zig build test` | `rm -rf zig-out zig-cache` |
91
+
92
+ ## Format-specific rules
93
+
94
+ Read only the file for the chosen format with `read_skills(name="runner", resource="references/<file>")`:
95
+
96
+ | Format | Reference |
97
+ |---|---|
98
+ | justfile | `references/justfile.md` |
99
+ | Makefile | `references/makefile.md` |
100
+ | mise (mise.toml) | `references/mise.md` |
101
+ | Taskfile.yml (go-task) | `references/taskfile.md` |
102
+ | package.json (npm scripts) | `references/npm-scripts.md` |
103
+ | run.sh (shell script) | `references/run-sh.md` |
104
+
105
+ ## Conversion Rules
106
+
107
+ When converting between formats:
108
+
109
+ 1. **Source of truth**: Read existing runner file first. Parse all tasks, actions, deps, groups, descriptions, parameters.
110
+ 2. **Preserve ALL tasks** — standalone and consolidated. Don't drop tasks or flatten consolidated tasks into separate entries.
111
+ 3. **Preserve consolidation** — source has `test unit|tidy` as single parameterized task → target must also express it as one entry point (using target format's parameterization mechanism). `format` and `lint` are always separate tasks — do not merge them into `test`.
112
+ 4. **Preserve dependency order** — task A depends on B → express this in target format.
113
+ 5. **Preserve groups/categories** — use target format's native grouping or comment headers.
114
+ 6. **Preserve descriptions** — map comments to target format's description mechanism. Include action options in parens.
115
+ 7. **Handle parameters** — translate `<action>` args using target format's native mechanism. Format lacks arg validation (e.g., package.json) → use colon namespacing, document the workaround.
116
+ 8. **Handle sudo** — preserve `sudo` prefixes where present.
117
+ 9. **Default task** — every format must have help/list command as default entry point.
118
+
119
+ ## Customization Rules
120
+
121
+ - **Monorepo**: Multiple languages detected → ask user which is primary. Generate one runner for root or per-workspace.
122
+ - **Existing runner**: Runner file already exists in target format → present diff of proposed changes, ask confirmation before overwriting.
123
+ - **Framework override**: Framework has own conventions (e.g., Next.js `next dev`, Django `manage.py runserver`) → prefer framework-specific commands.
124
+ - **Missing tools**: Recipe requires tool not present → add install step or note as prerequisite comment.
125
+ - **pyproject.toml**: `[tool.uv]` or `uv.lock` detected → prefer `uv`. `[tool.poetry]` → prefer `poetry`.
126
+ - **Extra tasks**: Agent MAY add additional consolidated tasks if project clearly benefits — but only when backed by detected project files (see Detection-to-Task Mapping). Don't speculatively generate tasks for capabilities project doesn't have.
127
+
128
+ ## Report
129
+
130
+ After generation, output result of format's list command and confirm all recipes functional.
@@ -0,0 +1,47 @@
1
+ # justfile
2
+
3
+ - Use `set shell := ["bash", "-cu"]`
4
+ - Use `[group('Name')]` for categories
5
+ - Dependencies via `recipe: dep1 dep2`
6
+ - Comments above recipes become descriptions
7
+ - Validate: `just --list`
8
+ - **Standalone**: `recipe:` with direct command
9
+ - **Simple parameterized**: `recipe action:` where action passes through to the tool
10
+ - **Complex parameterized**: `recipe action:` with `if/else` dispatch in a bash block
11
+
12
+ ```just
13
+ # Docker operations (build|up|down)
14
+ [group('Infra')]
15
+ docker action:
16
+ docker compose -f docker-compose.dev.yml {{action}}
17
+
18
+ # Run unit tests or clean artifacts (unit|tidy)
19
+ [group('test')]
20
+ test action:
21
+ #!/usr/bin/env bash
22
+ set -euo pipefail
23
+ case "{{action}}" in
24
+ unit) pytest -v ;;
25
+ tidy) find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true ;;
26
+ esac
27
+
28
+ # Format operations — fix rewrites, check is dry-run for CI (fix|check)
29
+ [group('format')]
30
+ format action="fix":
31
+ #!/usr/bin/env bash
32
+ set -euo pipefail
33
+ case "{{action}}" in
34
+ fix) ruff format . && ruff check --fix . ;;
35
+ check) ruff format --check . && ruff check . ;;
36
+ esac
37
+
38
+ # Lint operations — check reports issues, fix auto-corrects (check|fix)
39
+ [group('format')]
40
+ lint action="check":
41
+ #!/usr/bin/env bash
42
+ set -euo pipefail
43
+ case "{{action}}" in
44
+ check) ruff check . ;;
45
+ fix) ruff check --fix . ;;
46
+ esac
47
+ ```
@@ -0,0 +1,33 @@
1
+ # Makefile
2
+
3
+ - Set `SHELL := /bin/bash` and `.DEFAULT_GOAL := help`
4
+ - Declare all targets in `.PHONY`
5
+ - Use `## comment` after target for help text, generate a `help` target with `grep -E`
6
+ - Dependencies via `target: dep1 dep2`
7
+ - Group with comment headers (`# --- Group ---`)
8
+ - Validate: `make help`
9
+ - **Standalone**: standard target with direct commands
10
+ - **Simple parameterized**: pattern rule `docker-%:` dispatching to `docker compose $*`
11
+ - **Complex parameterized**: pattern rule `test-%:` with per-target recipes
12
+
13
+ ```makefile
14
+ .PHONY: docker-% test-% format-% lint
15
+
16
+ docker-%: ## Docker operations (build|up|down)
17
+ docker compose -f docker-compose.dev.yml $*
18
+
19
+ test-unit: ## Run unit tests
20
+ pytest -v
21
+ test-tidy: ## Clean build artifacts
22
+ find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
23
+
24
+ format-fix: ## Reformat code
25
+ ruff format . && ruff check --fix .
26
+ format-check: ## Dry-run format check (CI)
27
+ ruff format --check . && ruff check .
28
+
29
+ lint-check: ## Lint — report issues
30
+ ruff check .
31
+ lint-fix: ## Lint — auto-correct
32
+ ruff check --fix .
33
+ ```
@@ -0,0 +1,88 @@
1
+ # mise (mise.toml)
2
+
3
+ - Environment block (`[env]`) at the top of the file
4
+ - Define tasks under `[tasks.<name>]`
5
+ - Use `description`, `depends`, `run` fields
6
+ - Group with comment headers (`# --- Group ---`)
7
+ - Validate: `mise tasks`
8
+ - **Standalone**: `[tasks.dev]` with `run = "command"`
9
+ - **Multi-step standalone**: `run = [...]` array for sequential commands
10
+ - **Simple parameterized**: bash `case` dispatch on `$1`, action interpolated directly
11
+ - **Complex parameterized**: bash `case` dispatch on `$1` with per-action logic
12
+ - **No `usage` field**: `usage` with `arg` enforces required args and errors before bash runs. Skip it — handle arg validation in bash instead.
13
+ - **Help on no arg**: When called without an action, print usage with action descriptions and `exit 0` (not `exit 1`). This makes bare `mise run <task>` a discoverable help command.
14
+
15
+ ```toml
16
+ [tasks.docker]
17
+ description = "Docker operations (build|up|down)"
18
+ run = '''
19
+ #!/usr/bin/env bash
20
+ set -euo pipefail
21
+ action="${1:-}"
22
+ if [ -z "$action" ]; then
23
+ echo "Usage: mise run docker <action>"
24
+ echo ""
25
+ echo "Actions:"
26
+ echo " build Build docker images"
27
+ echo " up Start docker services"
28
+ echo " down Stop docker services"
29
+ exit 0
30
+ fi
31
+ docker compose -f docker-compose.dev.yml "$action"
32
+ '''
33
+
34
+ [tasks.test]
35
+ description = "Test operations (unit|tidy)"
36
+ run = '''
37
+ #!/usr/bin/env bash
38
+ set -euo pipefail
39
+ action="${1:-}"
40
+ if [ -z "$action" ]; then
41
+ echo "Usage: mise run test <action>"
42
+ echo ""
43
+ echo "Actions:"
44
+ echo " unit Run pytest"
45
+ echo " tidy Remove caches and compiled files"
46
+ exit 0
47
+ fi
48
+ case "$action" in
49
+ unit) python -m pytest -v ;;
50
+ tidy) find . -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true ;;
51
+ *) echo "Unknown action: $action"; exit 1 ;;
52
+ esac
53
+ '''
54
+
55
+ [tasks.format]
56
+ description = "Format operations — fix rewrites, check is dry-run for CI (fix|check)"
57
+ run = '''
58
+ #!/usr/bin/env bash
59
+ set -euo pipefail
60
+ action="${1:-fix}"
61
+ if [ -z "$action" ]; then
62
+ echo "Usage: mise run format <action>"
63
+ echo ""
64
+ echo "Actions:"
65
+ echo " fix Reformat code in-place"
66
+ echo " check Dry-run, exit 1 if changes needed (CI)"
67
+ exit 0
68
+ fi
69
+ case "$action" in
70
+ fix) ruff format . && ruff check --fix . ;;
71
+ check) ruff format --check . && ruff check . ;;
72
+ *) echo "Unknown action: $action"; exit 1 ;;
73
+ esac
74
+ '''
75
+
76
+ [tasks.lint]
77
+ description = "Lint operations (check|fix)"
78
+ run = '''
79
+ #!/usr/bin/env bash
80
+ set -euo pipefail
81
+ action="${1:-check}"
82
+ case "$action" in
83
+ check) ruff check . ;;
84
+ fix) ruff check --fix . ;;
85
+ *) echo "Unknown action: $action"; exit 1 ;;
86
+ esac
87
+ '''
88
+ ```
@@ -0,0 +1,27 @@
1
+ # package.json (npm scripts)
2
+
3
+ - No native arg dispatch or dep graph
4
+ - Validate: `npm run`
5
+ - **Standalone**: direct command string
6
+ - **Consolidated via colon namespacing**: `"docker:build"`, `"docker:up"`, `"docker:down"` as separate scripts, parent `"docker"` echoes usage
7
+ - **Complex parameterized**: individual `"test:unit"`, `"format:fix"`, `"format:check"` scripts, plus standalone `"lint"`
8
+
9
+ ```json
10
+ {
11
+ "scripts": {
12
+ "dev": "next dev",
13
+ "install:deps": "npm ci",
14
+ "docker:build": "docker compose -f docker-compose.dev.yml build",
15
+ "docker:up": "docker compose -f docker-compose.dev.yml up",
16
+ "docker:down": "docker compose -f docker-compose.dev.yml down",
17
+ "test:unit": "jest",
18
+ "test:tidy": "rm -rf node_modules dist .next",
19
+ "format:fix": "prettier --write . && eslint --fix .",
20
+ "format:check": "prettier --check . && eslint .",
21
+ "lint:check": "eslint .",
22
+ "lint:fix": "eslint --fix ."
23
+ }
24
+ }
25
+ ```
26
+
27
+ Note: `npm run` has no arg validation or choices — colon namespacing is the closest equivalent.
@@ -0,0 +1,46 @@
1
+ # run.sh (shell script)
2
+
3
+ - `#!/usr/bin/env bash` with `set -euo pipefail`
4
+ - Each task as `cmd_<name>()` function
5
+ - Dispatch via `main()` with case/declare lookup
6
+ - Help via `cmd_help()` listing all commands
7
+ - Validate: `./run.sh help`
8
+ - **Standalone**: `cmd_dev()` with direct command
9
+ - **Parameterized**: `cmd_<name>()` takes `$1` as action, inner `case` dispatch
10
+
11
+ ```bash
12
+ cmd_docker() {
13
+ local action="${1:?Usage: $0 docker <build|up|down>}"
14
+ case "$action" in
15
+ build|up|down) docker compose -f docker-compose.dev.yml "$action" ;;
16
+ *) echo "Unknown action: $action"; exit 1 ;;
17
+ esac
18
+ }
19
+
20
+ cmd_test() {
21
+ local action="${1:?Usage: $0 test <unit|tidy>}"
22
+ case "$action" in
23
+ unit) pytest -v ;;
24
+ tidy) find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true ;;
25
+ *) echo "Unknown action: $action"; exit 1 ;;
26
+ esac
27
+ }
28
+
29
+ cmd_format() {
30
+ local action="${1:-fix}"
31
+ case "$action" in
32
+ fix) ruff format . && ruff check --fix . ;;
33
+ check) ruff format --check . && ruff check . ;;
34
+ *) echo "Unknown action: $action"; exit 1 ;;
35
+ esac
36
+ }
37
+
38
+ cmd_lint() {
39
+ local action="${1:-check}"
40
+ case "$action" in
41
+ check) ruff check . ;;
42
+ fix) ruff check --fix . ;;
43
+ *) echo "Unknown action: $action"; exit 1 ;;
44
+ esac
45
+ }
46
+ ```
@@ -0,0 +1,50 @@
1
+ # Taskfile.yml (go-task)
2
+
3
+ - Use `version: '3'`
4
+ - Define under `tasks:` with `desc`, `deps`, `cmds`
5
+ - Group with comment headers
6
+ - Validate: `task --list`
7
+ - **Standalone**: single task with `cmds` list
8
+ - **Simple parameterized**: `{{.CLI_ARGS}}` passed through to the underlying tool
9
+ - **Complex parameterized**: internal tasks per action, parent dispatches via `task test-{{.CLI_ARGS}}`
10
+
11
+ ```yaml
12
+ tasks:
13
+ docker:
14
+ desc: "Docker operations (build|up|down)"
15
+ cmds:
16
+ - docker compose -f docker-compose.dev.yml {{.CLI_ARGS}}
17
+
18
+ test:
19
+ desc: "Test operations (unit|tidy)"
20
+ cmds:
21
+ - task: "test-{{.CLI_ARGS}}"
22
+ test-unit:
23
+ internal: true
24
+ cmds: [pytest -v]
25
+ test-tidy:
26
+ internal: true
27
+ cmds: ["find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true"]
28
+
29
+ format:
30
+ desc: "Format operations (fix|check)"
31
+ cmds:
32
+ - task: "format-{{.CLI_ARGS}}"
33
+ format-fix:
34
+ internal: true
35
+ cmds: [ruff format ., ruff check --fix .]
36
+ format-check:
37
+ internal: true
38
+ cmds: [ruff format --check ., ruff check .]
39
+
40
+ lint:
41
+ desc: "Lint operations (check|fix)"
42
+ cmds:
43
+ - task: "lint-{{.CLI_ARGS}}"
44
+ lint-check:
45
+ internal: true
46
+ cmds: [ruff check .]
47
+ lint-fix:
48
+ internal: true
49
+ cmds: [ruff check --fix .]
50
+ ```
package/skills/search.md CHANGED
@@ -1,53 +1,43 @@
1
1
  ---
2
2
  name: search
3
- description: Deep logic discovery and project context mapping. Use when user asks "where is X", "find all usages of Y", "how is Z wired up", "what handles this", or location of a behavior is unknown across many files.
3
+ description: Maps where a behavior lives and how it connects across a codebase — finds every match, groups by role, and traces the call chain with file:line evidence. Use when the user asks "where is X", "find all usages of Y", "how is Z wired up", "what handles this", or when a behavior's location is unknown across many files.
4
4
  disable-model-invocation: true
5
5
  ---
6
- # Deep Context Search Directive
6
+ # Search
7
7
 
8
- ## Goal
8
+ Goal: the full map, not the first match.
9
9
 
10
- Build precise map of where a behavior lives and how it connects — so next action operates on full context, not single match.
10
+ ## Tools
11
11
 
12
- ## Tool Tiers (match tool to scope)
12
+ - **Unknown location, text, config, comments** → the `grep` and `find` tools, then `read` the hits.
13
+ - **Known symbol** → `lsp_navigation` with `definition`, `references`, `implementation`, `callHierarchy`, or `hover`. LSP results are exact; prefer them over grep for symbols.
14
+ - **Code graph available** (`.pi/graph/graph.json`) → `graph` query first.
13
15
 
14
- - **Unknown location, pattern across many files, comments/strings/config** → native `Grep` / `Read`.
15
- - **Known symbol — definition, usages, type** → LSP `goToDefinition` / `findReferences` / `hover`.
16
- - Start with `Grep` to locate, then switch to LSP for exact navigation. Never grep what LSP can resolve exactly.
16
+ Start broad with grep, then switch to LSP for exact navigation.
17
17
 
18
- ## Below are what agent MUST do
18
+ ## Steps
19
19
 
20
- ### Phase 1: Scan
20
+ 1. **Sweep** — Search the term plus synonyms, abbreviations, and other spellings (`retry`, `backoff`, `attempts`). Use one wide pattern rather than many narrow ones.
21
+ 2. **Group** — Sort hits by role: logic, config, tests, docs.
22
+ 3. **Trace** — From the entry point, follow the calls to the exit. Note each call site and cross-module dependency.
23
+ 4. **Stop** when a new search finds no new locations. Cap the report at about 20 locations and say how many more exist.
21
24
 
22
- - **AUTO-RUN**: Run searches without confirmation unless input required.
23
- - **SEARCH**: Grep for content, glob for structure. Search synonyms and likely alternate spellings, not just literal term.
24
- - **GROUP**: Cluster matches by intent — Logic, Config, Tests, Docs.
25
-
26
- ### Phase 2: Trace
27
-
28
- - **FLOW**: For each cluster, identify how data flows in and out. Note every call site.
29
- - **DEPENDENCIES**: Map cross-module references the matches rely on.
30
- - **IDENTIFY**: Flag inconsistencies, anti-patterns, deviations from project convention.
31
-
32
- ### Phase 3: Report
25
+ ## Report
33
26
 
34
27
  ```
35
- ## Target: [what was searched]
28
+ ## Target: [what you searched]
29
+ Terms tried: [list]
36
30
 
37
31
  ## Found in
38
- - **Logic**: `path:line` — [role]
39
- - **Config**: `path:line` — [role]
40
- - **Tests**: `path:line` — [role]
32
+ - Logic: `path:line` — [role]
33
+ - Config: `path:line` — [role]
34
+ - Tests: `path:line` — [role]
41
35
 
42
36
  ## How it connects
43
- [entry point] → [path:line] → [path:line] → [exit]
37
+ [entry] → `path:line` → `path:line` → [exit]
44
38
 
45
39
  ## Notes
46
- [Inconsistencies, dead code, missing coverage, surprises.]
40
+ [Surprises only: dead paths, missing tests, conflicting copies.]
47
41
  ```
48
42
 
49
- ## Red Flags — STOP
50
-
51
- - Reporting first match without checking for others.
52
- - Searching only literal string when synonyms/aliases likely exist.
53
- - Using LSP for broad sweep, or grep for exact symbol resolution.
43
+ No match → say so and list the terms you tried.