ruff-sync 0.1.5.dev3__tar.gz → 0.1.5.dev4__tar.gz
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.
- ruff_sync-0.1.5.dev4/.agents/decisions/0001-type-refactoring-strategy.md +36 -0
- ruff_sync-0.1.5.dev4/.agents/decisions/0002-tui-node-ast.md +36 -0
- ruff_sync-0.1.5.dev4/.agents/decisions/README.md +11 -0
- ruff_sync-0.1.5.dev4/.agents/ruff.toml +37 -0
- ruff_sync-0.1.5.dev4/.agents/skills/adr/SKILL.md +66 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/templates/api-reference.md +1 -1
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/templates/mkdocs.yml +1 -1
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/SKILL.md +82 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/best-practices.md +56 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/evaluating-skills.md +49 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/optimizing-descriptions.md +29 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/quickstart.md +64 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/sources.md +18 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/references/using-scripts.md +59 -0
- ruff_sync-0.1.5.dev4/.agents/skills/skill-creator/scripts/scaffold_skill.py +185 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/SKILL.md +1 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/examples/basic_app.py +5 -2
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/examples/reactive_example.py +4 -1
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/references/widgets.md +18 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/SKILL.md +77 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/evals.json +52 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/advanced-narrowing.md +53 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/error-code-lookup.md +69 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/generics.md +60 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/naming.md +56 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/protocol-patterns.md +56 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/quickstart.md +12 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/references/refactoring-patterns.md +72 -0
- ruff_sync-0.1.5.dev4/.agents/skills/type-checking/scripts/audit_types.py +104 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/AGENTS.md +13 -28
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/PKG-INFO +1 -1
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/pyproject.toml +2 -2
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/core.py +45 -36
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/system.py +8 -6
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/app.py +49 -90
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/screens.py +3 -1
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/themes.py +1 -0
- ruff_sync-0.1.5.dev4/src/ruff_sync/tui/types_.py +263 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/widgets.py +97 -120
- ruff_sync-0.1.5.dev4/src/ruff_sync/types_.py +31 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_rule_logic.py +9 -6
- ruff_sync-0.1.5.dev4/tests/tui/__init__.py +3 -0
- ruff_sync-0.1.5.dev4/tests/tui/conftest.py +22 -0
- {ruff_sync-0.1.5.dev3/tests → ruff_sync-0.1.5.dev4/tests/tui}/test_themes.py +6 -14
- {ruff_sync-0.1.5.dev3/tests → ruff_sync-0.1.5.dev4/tests/tui}/test_tui.py +98 -17
- ruff_sync-0.1.5.dev4/tests/tui/test_tui_types.py +87 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/uv.lock +1 -1
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/DEPENDENCIES.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/TESTING.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/formatters-architecture.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/gitlab-reports.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/issue-102-context.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/dirty-equals/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/dirty-equals/references/common-matchers.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/dirty-equals/references/toml-matching.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/dirty-equals/trigger_eval.json +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/gh-issues/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mike/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mike/references/commands.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/examples.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/templates/getting-started.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/mkdocs-generation/templates/index.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/release-notes-generation/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/ruff-sync-usage/SKILL.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/ruff-sync-usage/references/ci-integration.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/ruff-sync-usage/references/configuration.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/ruff-sync-usage/references/troubleshooting.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/references/events.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/references/styling.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/skills/textual/references/testing.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/tui_design.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/tui_requirements.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/tui_rule_browsing.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/tui_rule_browsing_design.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.agents/workflows/add-test-case.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.git-blame-ignore-revs +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.github/dependabot.yml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.github/workflows/ci.yaml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.github/workflows/complexity.yaml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.github/workflows/docs.yaml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.gitignore +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.pre-commit-config.yaml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/.pre-commit-hooks.yaml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/CONTRIBUTING.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/LICENSE.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/README.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/codecov.yml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/configs/data-science-engineering/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/configs/fastapi/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/configs/kitchen-sink/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/agent-skill.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/assets/favicon.png +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/assets/github-pr-annotation.png +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/assets/logo.png +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/assets/ruff_sync_banner.png +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/best-practices.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/ci-integration.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/configuration.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/contributing.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/examples/advanced-config.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/examples/basic-config.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/gen_ref_pages.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/index.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/installation.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/overrides/main.html +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/overrides/partials/version_warning.html +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/pre-commit.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/pre-defined-configs.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/troubleshooting.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/url-resolution.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/docs/usage.md +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/mkdocs.yml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/scripts/check_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/scripts/gitclone_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/scripts/pull_dogfood.sh +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/skills-lock.json +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/__init__.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/__main__.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/cli.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/config_io.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/constants.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/dependencies.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/formatters.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/pre_commit.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/__init__.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/src/ruff_sync/tui/constants.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tasks.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/__init__.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/conftest.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/multi_upstream_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/multi_upstream_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/multi_upstream_up1.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/multi_upstream_up2.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_changes_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_changes_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_changes_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_dotted_keys_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_dotted_keys_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_dotted_keys_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_ruff_cfg_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_ruff_cfg_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/no_ruff_cfg_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/readme_excludes_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/readme_excludes_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/readme_excludes_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/standard_final.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/standard_initial.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/lifecycle_tomls/standard_upstream.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/ruff.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_basic.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_check.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_ci_integration.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_ci_validation.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_config_io.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_config_validation.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_constants.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_corner_cases.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_dependencies.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_deprecation.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_e2e.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_formatters.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_git_fetch.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_minimal_imports.sh +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_pre_commit.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_project.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_scaffold.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_serialization.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_system.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_toml_operations.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_url_handling.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/test_whitespace.py +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/w_ruff_sync_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/wo_ruff_cfg/pyproject.toml +0 -0
- {ruff_sync-0.1.5.dev3 → ruff_sync-0.1.5.dev4}/tests/wo_ruff_sync_cfg/pyproject.toml +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR 0001: Type Refactoring Strategy
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
status: accepted
|
|
5
|
+
date: 2026-04-05
|
|
6
|
+
decider: Agent
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
The `ruff-sync` codebase, particularly the TUI and TOML merging logic, has historically relied on `dict[str, Any]` and deep `isinstance` checks. This makes the codebase difficult to maintain, prone to runtime errors, and provides poor IDE support.
|
|
12
|
+
|
|
13
|
+
Based on the establishing `type-checking` skill, we need a strategic approach to "Complexity Shifting" and "Healthy Abstraction".
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
We will implement a multi-phase type-refactoring strategy:
|
|
18
|
+
|
|
19
|
+
1. **Eliminate unstructured `dict[str, Any]`**: Introduce `TypedDict` for core payloads (Ruff rules, linters) in the TUI and System modules.
|
|
20
|
+
2. **Polymorphic TUI Widgets**: Replace recursive `isinstance(data, dict/list)` chains in widgets with structural polymorphism (e.g., `@singledispatchmethod` or a dedicated Node AST).
|
|
21
|
+
3. **Strategic Complexity (High-ROI typing)**: Apply strict typing (`tomlkit` bounds) to core infrastructure like `core.py` (TOML merging) while keeping feature code simple.
|
|
22
|
+
4. **Result Type Patterns**: Shift away from `Union[Success, Error]` with `isinstance` checks towards robust `Result` or tuple patterns.
|
|
23
|
+
|
|
24
|
+
## Consequences
|
|
25
|
+
|
|
26
|
+
- **Pros**:
|
|
27
|
+
- Improved static analysis via `mypy`.
|
|
28
|
+
- Better developer experience (autocompletion, go-to-definition).
|
|
29
|
+
- Reduced runtime "surprises" in complex TOML merges.
|
|
30
|
+
- **Cons**:
|
|
31
|
+
- Initial "complexity tax" in core infrastructure types.
|
|
32
|
+
- Requires wrapping raw TOML data into structured nodes before rendering.
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
- [type-checking skill](../skills/type-checking/SKILL.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR 0002: TUI Node AST Architecture
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
status: accepted
|
|
5
|
+
date: 2026-04-05
|
|
6
|
+
decider: Agent
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
The TUI's configuration rendering (`widgets.py`) and selection logic (`app.py`) rely heavily on nested `isinstance` checks to navigate raw `dict`/`list` structures. This breaks down as the TOML structure becomes more complex (dotted keys, custom tables, list-of-tables).
|
|
12
|
+
|
|
13
|
+
We need a way to shift "rendering complexity" into "data structure complexity" using the polymorphism principle from ADR 0001.
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
We will implement a polymorphic **ConfigNode AST** for the TUI:
|
|
18
|
+
|
|
19
|
+
1. **`ConfigNode` Protocol**: A baseline interface (`path()`, `key()`, `children()`, `doc_target()`).
|
|
20
|
+
2. **Concrete Nodes**: `DictNode`, `ListNode`, `ScalarNode`, `LinterNode`, and `RulesCollectionNode`.
|
|
21
|
+
3. **Recursive Wrapping**: A `wrap_data()` factory that converts raw TOML data into a `ConfigNode` tree during initial load.
|
|
22
|
+
4. **UI-Layer Polymorphism**: Use `@singledispatchmethod` in widgets (e.g., `CategoryTable.render_node(node)`) to route rendering logic based on the node type, keeping Rich markup out of the model layer.
|
|
23
|
+
|
|
24
|
+
## Consequences
|
|
25
|
+
|
|
26
|
+
- **Pros**:
|
|
27
|
+
- Centralized documentation routing (`doc_target()`).
|
|
28
|
+
- Widgets no longer need to know "what" they are rendering, only "how" to render a `ConfigNode`.
|
|
29
|
+
- Eliminates fragile nested type-inference logic.
|
|
30
|
+
- **Cons**:
|
|
31
|
+
- Requires an additional "wrapping" step during data load.
|
|
32
|
+
- Slightly more boilerplate in `src/ruff_sync/tui/types_.py`.
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
- [ADR 0001: Type Refactoring Strategy](./0001-type-refactoring-strategy.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# ADR Index
|
|
2
|
+
|
|
3
|
+
This is an internal record of architectural decisions for `ruff-sync`. These documents capture the historical "Why" for design choices made by both human and agentic developers.
|
|
4
|
+
|
|
5
|
+
| ID | Date | Status | Title |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| [0001](./0001-type-refactoring-strategy.md) | 2026-04-05 | Accepted | Type Refactoring Strategy |
|
|
8
|
+
| [0002](./0002-tui-node-ast.md) | 2026-04-05 | Accepted | TUI Node AST Architecture |
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
*For instructions on how to create or manage ADRs, see the [ADR Skill](../skills/adr/SKILL.md).*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Agents-specific ruff linter overrides.
|
|
2
|
+
# This configuration applies to all files within the .agents/ directory.
|
|
3
|
+
#
|
|
4
|
+
# WHY AGENT SCRIPTS ARE TREATED DIFFERENTLY:
|
|
5
|
+
# ------------------------------------------
|
|
6
|
+
# 1. Faster iteration: Agent-related code (skills, scripts, and examples) is
|
|
7
|
+
# often experimental, short-lived, or used for automation.
|
|
8
|
+
# 2. Lower maintenance: We relax requirements like module-level docstrings
|
|
9
|
+
# to maintain speed and reduce boilerplate.
|
|
10
|
+
# 3. Local use: These scripts are usually run locally by the agent or developer
|
|
11
|
+
# rather than being part of the core production library.
|
|
12
|
+
# 4. Prototyping: Allowing assert statements (S101) makes it easier to write
|
|
13
|
+
# concise validation for specialized agent workflows.
|
|
14
|
+
# 5. Usage context for examples: We disable rules that move imports into
|
|
15
|
+
# if TYPE_CHECKING blocks because skill examples may be integrated into
|
|
16
|
+
# other applications in ways we cannot predict. Runtime access to
|
|
17
|
+
# imported objects is preserved to ensure compatibility with various
|
|
18
|
+
# application patterns (decorators, runtime reflection, etc).
|
|
19
|
+
|
|
20
|
+
# Inherit root linter settings from the project's pyproject.toml.
|
|
21
|
+
extend = "../pyproject.toml"
|
|
22
|
+
|
|
23
|
+
[lint]
|
|
24
|
+
# Specific overrides for agent python code, scripts, and skills.
|
|
25
|
+
extend-ignore = [
|
|
26
|
+
"D100", # missing-docstring-in-module - Agent scripts don't require module-level docstrings.
|
|
27
|
+
"D103", # missing-docstring-in-public-function - Agent functions don't require public docstrings.
|
|
28
|
+
"S101", # assert-statement - Asserts are preferred over other validation for internal agent scripts.
|
|
29
|
+
|
|
30
|
+
# Preserve runtime access for standalone examples and unknown integration:
|
|
31
|
+
# Disable rules that move imports into if TYPE_CHECKING: blocks.
|
|
32
|
+
"TC001", # Move third-party import into a type-checking block
|
|
33
|
+
"TC002", # Move third-party import into a type-checking block
|
|
34
|
+
"TC003", # Move second-party import into a type-checking block
|
|
35
|
+
"TC004", # Move first-party import into a type-checking block
|
|
36
|
+
"TC005", # Move standard library import into a type-checking block
|
|
37
|
+
]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# ADR (Architectural Decision Record) Skill
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Use this skill to capture, manage, and reference significant architectural decisions for `ruff-sync`. ADRs are stored internally in `.agents/decisions/` and provide a historical record of "Why" things are designed the way they are.
|
|
6
|
+
|
|
7
|
+
## When to Create an ADR
|
|
8
|
+
|
|
9
|
+
Create an ADR when:
|
|
10
|
+
- A significant architectural change is proposed (e.g., new internal AST, changing the merging strategy).
|
|
11
|
+
- A long-running refactoring strategy is initiated (e.g., the Type-Checking Refactoring).
|
|
12
|
+
- A decision is made that will impact future development and needs to be "remembered" by future agent sessions.
|
|
13
|
+
- A "Implementation Plan" has been approved and reaches a level of architectural significance that warrants long-term persistence.
|
|
14
|
+
|
|
15
|
+
## ADR Structure
|
|
16
|
+
|
|
17
|
+
Each ADR should be named `NNNN-slug.md` (e.g., `0001-type-refactoring-strategy.md`) and located in `.agents/decisions/`.
|
|
18
|
+
|
|
19
|
+
> [!IMPORTANT]
|
|
20
|
+
> **Use relative paths for ALL internal links.** Never use absolute paths (`file:///Users/...`) as they are machine-specific and break in different environments.
|
|
21
|
+
|
|
22
|
+
Use the following template:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# ADR [NNNN]: [Short Title]
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
status: [proposed | accepted | superseded | deprecated]
|
|
29
|
+
date: YYYY-MM-DD
|
|
30
|
+
decider: [Agent | User]
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Context
|
|
34
|
+
|
|
35
|
+
What is the problem we are trying to solve? What are the constraints?
|
|
36
|
+
|
|
37
|
+
## Decision
|
|
38
|
+
|
|
39
|
+
What are we doing? Be specific about the architectural shift.
|
|
40
|
+
|
|
41
|
+
## Consequences
|
|
42
|
+
|
|
43
|
+
What are the trade-offs? What will be easier? What will be harder?
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
|
|
47
|
+
- Links to PRs or Issues (use `gh-issues` skill).
|
|
48
|
+
- Links to other ADRs (e.g., "Supersedes [NNNN]").
|
|
49
|
+
- Links to implementation plans or research.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Workflows
|
|
53
|
+
|
|
54
|
+
### 1. Creating a New ADR
|
|
55
|
+
1. Identify the need for a persistent architectural record.
|
|
56
|
+
2. Draft the ADR in `.agents/decisions/` using the next available number.
|
|
57
|
+
3. Update `.agents/decisions/README.md` with the new entry.
|
|
58
|
+
4. Reference the ADR in `AGENTS.md` if it represents a foundational shift.
|
|
59
|
+
|
|
60
|
+
### 2. Superseding an ADR
|
|
61
|
+
1. Create the new ADR (e.g., `0005`).
|
|
62
|
+
2. Mark the old ADR (e.g., `0002`) as `status: superseded`.
|
|
63
|
+
3. Add a link in the old ADR's `References` to the new one, and vice versa.
|
|
64
|
+
|
|
65
|
+
### 3. Graduation
|
|
66
|
+
Implementation plans in `.agents/` are often temporary. When a plan is completed, if its decisions are architecturally significant, "graduate" it by distilling its core decisions into an ADR.
|
|
@@ -26,7 +26,7 @@ For nested API structure, create subdirectories:
|
|
|
26
26
|
docs/api/
|
|
27
27
|
├── index.md - API overview
|
|
28
28
|
├── client.md - ::: package.client.Client
|
|
29
|
-
├──
|
|
29
|
+
├── types_.md - ::: package.types_
|
|
30
30
|
└── entities/
|
|
31
31
|
├── user.md - ::: package.entities.User
|
|
32
32
|
└── item.md - ::: package.entities.Item
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-creator
|
|
3
|
+
description: >-
|
|
4
|
+
Create or update Agent Skills to extend capabilities for specific tasks,
|
|
5
|
+
frameworks, or domain-specific workflows. Use this when the user asks to
|
|
6
|
+
"add a skill," "create a tool for X," or "teach the agent how to Y."
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill Creator Meta-Skill
|
|
10
|
+
|
|
11
|
+
This skill provides a systematic approach to creating and optimizing "Agent Skills" within the `.agents/skills/` directory.
|
|
12
|
+
|
|
13
|
+
## Available Scripts
|
|
14
|
+
|
|
15
|
+
- **`scripts/scaffold_skill.py`**: Automated scaffolding for new Agent Skill directories and `SKILL.md` templates.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Scaffold the Skill**:
|
|
20
|
+
- Run the scaffolding script to create the directory structure:
|
|
21
|
+
```bash
|
|
22
|
+
uv run .agents/skills/skill-creator/scripts/scaffold_skill.py <name> \\
|
|
23
|
+
--description "user intent" \\
|
|
24
|
+
--keywords "key, word"
|
|
25
|
+
```
|
|
26
|
+
- This creates `.agents/skills/<name>/SKILL.md` and standard subdirectories.
|
|
27
|
+
|
|
28
|
+
2. **Research & Plan**:
|
|
29
|
+
- Check existing skills in `.agents/skills/` to prevent duplication. Identify if an existing skill can just be extended instead of creating a new one.
|
|
30
|
+
- **Research Tool Usage**: Prioritize `search_web` and `read_url_content` for gathering information. Use the browser subagent (`read_browser_page`) only as a last resort for sites requiring JavaScript or authentication.
|
|
31
|
+
- Determine the scope of the skill (e.g., CLI wrapper, documentation guide, testing helper).
|
|
32
|
+
- Identify existing project artifacts (style guides, API specs, CI workflows) to pull information from.
|
|
33
|
+
- Design a test case or a set of "should-trigger" queries.
|
|
34
|
+
- See [references/quickstart.md](references/quickstart.md) for the basic structure.
|
|
35
|
+
|
|
36
|
+
3. **Define Frontmatter**:
|
|
37
|
+
- `name`: Must match the folder name in `.agents/skills/`.
|
|
38
|
+
- `description`: Write an imperative, user-intent-focused description.
|
|
39
|
+
- See [references/optimizing-descriptions.md](references/optimizing-descriptions.md) for optimization tips.
|
|
40
|
+
|
|
41
|
+
4. **Develop the Procedure & Scripts**:
|
|
42
|
+
- Favor procedural instructions ("To do X, run Y") over declarative ones.
|
|
43
|
+
- Bundle complex logic in `scripts/` using [references/using-scripts.md](references/using-scripts.md). Ensure any helper scripts are robust (add type hints, lint with `ruff`, and consider unit tests).
|
|
44
|
+
- Include a "Quick Start" section for the most common use case.
|
|
45
|
+
- Use checklists for multi-step workflows.
|
|
46
|
+
|
|
47
|
+
5. **Progressive Disclosure (PD)**:
|
|
48
|
+
- **Procedural Entry Point**: Keep the main `SKILL.md` strictly procedural (The "How-To") and under 110 lines.
|
|
49
|
+
- **Offload Details**: Move illustrative recipes, deep-dive code examples, technical deep-dives, and troubleshooting logs to a `references/` subdirectory.
|
|
50
|
+
- See [references/best-practices.md](references/best-practices.md) for structuring tips.
|
|
51
|
+
|
|
52
|
+
6. **Validation & Iteration**:
|
|
53
|
+
- Run the prompt *with* and *without* the skill instructions.
|
|
54
|
+
- Use [references/evaluating-skills.md](references/evaluating-skills.md) to grade outputs with assertions.
|
|
55
|
+
- Add a "Gotchas" section to address common pitfalls.
|
|
56
|
+
- Iterate on instructions based on failed assertions or high variance.
|
|
57
|
+
|
|
58
|
+
7. **Global Knowledge Sync**:
|
|
59
|
+
- If the new skill introduces fundamental rules or overarching context that all agents *must* inherently know *before* using the skill, add a very brief mention in `AGENTS.md`.
|
|
60
|
+
- **Caution**: Do not bloat `AGENTS.md`. Only link to the skill or summarize the rule in 1-2 sentences. Keep the detailed documentation inside the skill folder.
|
|
61
|
+
|
|
62
|
+
## Skill Quality Checklist
|
|
63
|
+
|
|
64
|
+
- [ ] **Frontmatter**: Does the name match the directory name?
|
|
65
|
+
- [ ] **Description**: Is it imperative ("Use this skill when...") and under 1024 characters?
|
|
66
|
+
- [ ] **Procedural**: Does it provide clear, actionable steps for the agent to follow?
|
|
67
|
+
- [ ] **Context**: Does it include project-specific context (e.g., using `uv run`, `gh`, `ruff`)?
|
|
68
|
+
- [ ] **Specificity**: Does the level of detail match the fragility of the task?
|
|
69
|
+
- [ ] **Overlap**: Is the domain distinct enough that it doesn't overlap excessively with existing skills?
|
|
70
|
+
- [ ] **Global Sync**: Have overarching project rules been bubbled up to `AGENTS.md` (while avoiding bloat)?
|
|
71
|
+
- [ ] **PD Audit**: Is the main file under 110 lines and free of dense examples/logic trees?
|
|
72
|
+
- [ ] **Quick Start**: Does the main file have a "Quick Start" section for the primary use case?
|
|
73
|
+
- [ ] **Research Efficiency**: Did you prioritize fast tools (`search_web`/`read_url_content`) over the slow browser subagent for research?
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
|
|
77
|
+
- [Quickstart](references/quickstart.md) — Basic SKILL.md structure
|
|
78
|
+
- [Best Practices](references/best-practices.md) — How to scope and calibrate skills
|
|
79
|
+
- [Optimizing Descriptions](references/optimizing-descriptions.md) — Reliable triggering strategies
|
|
80
|
+
- [Evaluating Skills](references/evaluating-skills.md) — Eval-driven iteration and assertions
|
|
81
|
+
- [Using Scripts](references/using-scripts.md) — Bundling logic and agentic script design
|
|
82
|
+
- [Research Sources](references/sources.md) — External documentation used to create this skill
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Best Practices for Skill Creation
|
|
2
|
+
|
|
3
|
+
How to write skills that are well-scoped and calibrated to the task.
|
|
4
|
+
|
|
5
|
+
## 1. Spending Context Wisely
|
|
6
|
+
|
|
7
|
+
**Add what the agent lacks, omit what it knows.**
|
|
8
|
+
- **Bad**: "PDF (Portable Document Format) is a common file format..." (The agent knows this).
|
|
9
|
+
- **Good**: "Use `pdfplumber` for text extraction. For scans, fall back to `pytesseract`." (This is project-specific guidance).
|
|
10
|
+
|
|
11
|
+
## 2. Match Specificity to Fragility
|
|
12
|
+
|
|
13
|
+
**Low fragility (General task)**:
|
|
14
|
+
- Provide high-level goals and examples.
|
|
15
|
+
- Allow the agent to decide the best path (e.g., "Check database queries for SQLi...").
|
|
16
|
+
|
|
17
|
+
**High fragility (Specific/Dangerous task)**:
|
|
18
|
+
- Provide exact command sequences.
|
|
19
|
+
- Add warnings: "Do not modify flags or skip steps."
|
|
20
|
+
- Example: "Run exactly `python migrate.py --verify --backup`."
|
|
21
|
+
|
|
22
|
+
## 3. Favor Procedures over Declarations
|
|
23
|
+
|
|
24
|
+
- **Bad**: "This skill manages database migrations."
|
|
25
|
+
- **Good**: "To perform a migration: 1. Run script A. 2. Verify output B. 3. Update file C."
|
|
26
|
+
- Use checklists for multi-step workflows to help the agent track progress.
|
|
27
|
+
|
|
28
|
+
## 4. Progressive Disclosure
|
|
29
|
+
|
|
30
|
+
**Spending context wisely: Main file = Procedural. References = Illustrative.**
|
|
31
|
+
- **Limit**: Keep the main `SKILL.md` under **110 lines**.
|
|
32
|
+
- **The Entry Point**: Focus strictly on the "How-To" (workflows, checklists, high-level procedures).
|
|
33
|
+
- **The References**: Move anything that is "Illustrative" or "Dense" to the `references/` directory. This includes:
|
|
34
|
+
- Complex decision trees or logic tables.
|
|
35
|
+
- Multi-line code examples/recipes.
|
|
36
|
+
- Full API references or error-code lookups.
|
|
37
|
+
- Troubleshooting logs or edge-case post-mortems.
|
|
38
|
+
- This ensures the agent is only "weighed down" by relevant context when needed.
|
|
39
|
+
|
|
40
|
+
## 5. Gotchas & Common Pitfalls
|
|
41
|
+
|
|
42
|
+
- Include a "Gotchas" section to address recurring issues.
|
|
43
|
+
- Document reasons *why* certain approaches are forbidden (e.g., "Do not use library X because of security vulnerability Y").
|
|
44
|
+
- Link to troubleshooting guides for deeper dives.
|
|
45
|
+
|
|
46
|
+
## 6. Plan-Validate-Execute Loops
|
|
47
|
+
|
|
48
|
+
- Instruct the agent to create a plan first.
|
|
49
|
+
- Provide validation scripts to check work before "committing" (e.g., linting, type-checking, or running a validator).
|
|
50
|
+
|
|
51
|
+
## 7. Research Performance
|
|
52
|
+
|
|
53
|
+
**Prioritize fast, text-based tools over the browser.**
|
|
54
|
+
- **Fast**: Use `search_web` and `read_url_content` for documentation and general research.
|
|
55
|
+
- **Slow**: Avoid `read_browser_page` (browser subagent) unless the target site is a single-page app (SPA) that requires JavaScript rendering or authentication.
|
|
56
|
+
- **Guideline**: If you can see the content with a simple `curl`-like tool, do not spin up a browser. This saves significant time and keeps the agent focused.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Evaluating Skill Quality
|
|
2
|
+
|
|
3
|
+
"Eval-driven iteration" is the process of testing your skill against realistic prompts to ensure it produces high-quality, reliable outputs.
|
|
4
|
+
|
|
5
|
+
## 1. Designing Test Cases
|
|
6
|
+
|
|
7
|
+
A good test case includes:
|
|
8
|
+
- **Prompt**: A realistic user message (e.g., "Analyze the CSV at data/sales.csv").
|
|
9
|
+
- **Expected Output**: A human-readable description of success.
|
|
10
|
+
- **Input Files**: Mock data or real project files needed for the task.
|
|
11
|
+
- **Assertions**: Specific, observable criteria for success.
|
|
12
|
+
|
|
13
|
+
### Example Eval (evals.json)
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"id": 1,
|
|
17
|
+
"prompt": "Summarize the linting errors in src/core.py",
|
|
18
|
+
"expected_output": "A markdown table with Error Code, Message, and Line Number.",
|
|
19
|
+
"assertions": [
|
|
20
|
+
"Output is a markdown table",
|
|
21
|
+
"Includes at least 3 columns",
|
|
22
|
+
"All error codes start with 'E' or 'W'"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Running Evals
|
|
28
|
+
|
|
29
|
+
**The Loop**:
|
|
30
|
+
1. **Baseline**: Run the prompt *without* the new skill instructions.
|
|
31
|
+
2. **With Skill**: Run same prompt with the skill active.
|
|
32
|
+
3. **Compare**: Measure the delta in quality, time, and tokens.
|
|
33
|
+
|
|
34
|
+
**Workspace Structure**:
|
|
35
|
+
Store iteration results in separate folders (e.g., `iteration-1/with_skill/outputs/`) to track progress over time.
|
|
36
|
+
|
|
37
|
+
## 3. Grading with Assertions
|
|
38
|
+
|
|
39
|
+
- **Programmatic**: "Output is valid JSON."
|
|
40
|
+
- **Observable**: "The chart has labeled axes."
|
|
41
|
+
- **Countable**: "Includes at least 3 recommendations."
|
|
42
|
+
|
|
43
|
+
**Grading Principle**: Require concrete evidence for a PASS. If it's vague, it's a FAIL.
|
|
44
|
+
|
|
45
|
+
## 4. Analyzing Patterns
|
|
46
|
+
|
|
47
|
+
- **High StdDev**: If results vary wildly across runs, the instructions may be too ambiguous.
|
|
48
|
+
- **Plateau**: If more rules don't improve the pass rate, the skill may be over-constrained. Try simplifying.
|
|
49
|
+
- **Delta**: Focus on where the skill actually changes the agent's behavior compared to the baseline.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Optimizing Skill Descriptions
|
|
2
|
+
|
|
3
|
+
The `description` field in a Skill's frontmatter determines *if* the agent chooses to use the skill.
|
|
4
|
+
|
|
5
|
+
## 1. Writing Effective Descriptions
|
|
6
|
+
|
|
7
|
+
- **Imperative Phrase**: Use "Use this skill when..." rather than "This skill does...".
|
|
8
|
+
- **Focus on User Intent**: Describe what the user wants to achieve (e.g., "Analyze CSVs") rather than internal mechanics ("Run `scripts/csv_parser.py`").
|
|
9
|
+
- **Err on the Side of Being Pushy**: Explicitly list contexts where the skill applies, including synonyms (e.g., "even if they don't explicitly mention 'CSV' or 'analysis'").
|
|
10
|
+
- **Concise & Goal-Oriented**: A short paragraph (<1024 chars) is usually right.
|
|
11
|
+
|
|
12
|
+
## 2. Avoiding Overfitting
|
|
13
|
+
|
|
14
|
+
- **Broaden the Scope**: If you miss a "should-trigger" case, broaden the description.
|
|
15
|
+
- **Avoid Keyword Stuffing**: Don't just add words from failed queries. Identify the *general category* those words represent.
|
|
16
|
+
- **Structural Changes**: If tweaks fail, try a different framing or sentence structure.
|
|
17
|
+
|
|
18
|
+
## 3. Testing with Queries
|
|
19
|
+
|
|
20
|
+
- **Should-Trigger Queries**: Test with formal, casual, and typo-ridden prompts.
|
|
21
|
+
- **Should-Not-Trigger Queries**: Test with "near-misses" (e.g., "I need to edit Excel budget" vs "I need to analyze CSV sales").
|
|
22
|
+
- **Validation Pass Rate**: Use fresh queries (not the ones used to train/optimize) to check for generalization.
|
|
23
|
+
|
|
24
|
+
## Checklist for Activation
|
|
25
|
+
|
|
26
|
+
- [ ] Is it under 1024 characters? (Hard limit)
|
|
27
|
+
- [ ] Does it start with "Use this skill when..."?
|
|
28
|
+
- [ ] Does it cover at least 3-4 likely phrasing variations?
|
|
29
|
+
- [ ] Is it separate from other skills in the same repository? (Avoid overlap)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Skill Creation Quickstart
|
|
2
|
+
|
|
3
|
+
A "Skill" is a directory containing a `SKILL.md` file that provides instructions to an agent.
|
|
4
|
+
|
|
5
|
+
## Basic Structure
|
|
6
|
+
|
|
7
|
+
Create your skill at `.agents/skills/<name>/SKILL.md`:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
name: <name>
|
|
12
|
+
description: >-
|
|
13
|
+
Use this skill when <user intent/achievement>.
|
|
14
|
+
Trigger on <keywords/context>.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# <Title>
|
|
18
|
+
|
|
19
|
+
<High-level overview of the skill's purpose.>
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Provide the most common command or procedure
|
|
25
|
+
<command>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Common Workflows
|
|
29
|
+
|
|
30
|
+
### Workflow 1
|
|
31
|
+
|
|
32
|
+
- [ ] Step 1: <action>
|
|
33
|
+
- [ ] Step 2: <action>
|
|
34
|
+
- [ ] Step 3: <action>
|
|
35
|
+
|
|
36
|
+
## Gotchas
|
|
37
|
+
|
|
38
|
+
- **<pitfall>**: <resolution>
|
|
39
|
+
- **<limitation>**: <alternative>
|
|
40
|
+
|
|
41
|
+
## References
|
|
42
|
+
|
|
43
|
+
- [Reference 1](references/ref1.md)
|
|
44
|
+
- [Reference 2](references/ref2.md)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Directory Layout
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
.agents/skills/<name>/
|
|
51
|
+
SKILL.md # Entry point (Frontmatter + Core Instructions)
|
|
52
|
+
references/ # (Optional) Detailed guides
|
|
53
|
+
config.md
|
|
54
|
+
troubleshooting.md
|
|
55
|
+
scripts/ # (Optional) Reusable scripts
|
|
56
|
+
scaffold.py
|
|
57
|
+
assets/ # (Optional) Static assets or images
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Activation Rules
|
|
61
|
+
|
|
62
|
+
1. **Frontmatter**: The `name` must match the parent folder exactly.
|
|
63
|
+
2. **Detection**: The agent reads the `description` at the start of a session. It only loads the full `SKILL.md` when it decides to "activate" based on the user's request.
|
|
64
|
+
3. **Imperative Phrase**: Always start descriptions with "Use this skill when..." to help the agent decide.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# External Research Sources
|
|
2
|
+
|
|
3
|
+
These sources were used to build the initial version of the `skill-creator` meta-skill. Refer to them whenever recommendations change.
|
|
4
|
+
|
|
5
|
+
**Last Updated**: 2026-04-05 (Meta-skill created)
|
|
6
|
+
|
|
7
|
+
## Official Documentation
|
|
8
|
+
|
|
9
|
+
- **[Quickstart](https://agentskills.io/skill-creation/quickstart)** — Basic structure and directory layout.
|
|
10
|
+
- **[Best Practices](https://agentskills.io/skill-creation/best-practices)** — Scoping, calibration, and procedural instructions.
|
|
11
|
+
- **[Optimizing Descriptions](https://agentskills.io/skill-creation/optimizing-descriptions)** — Imperative phrasing and reliable triggering strategies.
|
|
12
|
+
- **[Evaluating Skills](https://agentskills.io/skill-creation/evaluating-skills)** — Eval-driven iteration and assertion-based grading.
|
|
13
|
+
- **[Using Scripts](https://agentskills.io/skill-creation/using-scripts)** — Bundling executable logic and agentic script design.
|
|
14
|
+
|
|
15
|
+
## Maintenance Policy
|
|
16
|
+
|
|
17
|
+
- **Check regularly**: Periodically visit these URLs to see if new "Gotchas" or pattern recommendations have been added.
|
|
18
|
+
- **Update Workflow**: If a source is updated, update the corresponding reference file in this skill.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Using Scripts in Skills
|
|
2
|
+
|
|
3
|
+
Bundling executable logic within your skills makes them more powerful and reliable than instruction-only skills.
|
|
4
|
+
|
|
5
|
+
## 1. One-off Commands
|
|
6
|
+
|
|
7
|
+
Use tool runners to invoke common utilities without pre-installing them.
|
|
8
|
+
- **Python**: `uvx ruff check .` or `pipx run black .`
|
|
9
|
+
- **Node.js**: `npx eslint@9 --fix .`
|
|
10
|
+
- **Go**: `go run golang.org/x/tools/cmd/goimports@latest .`
|
|
11
|
+
|
|
12
|
+
**Pin versions** (e.g., `eslint@9.0.0`) for reproducibility.
|
|
13
|
+
|
|
14
|
+
## 2. Self-Contained Scripts (`scripts/`)
|
|
15
|
+
|
|
16
|
+
For complex logic, bundle a script in the `scripts/` directory.
|
|
17
|
+
|
|
18
|
+
### Python (PEP 723)
|
|
19
|
+
Use inline dependency metadata so the script is self-documenting and runnable via `uv run`.
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
# /// script
|
|
23
|
+
# dependencies = [
|
|
24
|
+
# "httpx",
|
|
25
|
+
# "rich",
|
|
26
|
+
# ]
|
|
27
|
+
# ///
|
|
28
|
+
import httpx
|
|
29
|
+
from rich import print
|
|
30
|
+
|
|
31
|
+
# ... script logic ...
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Deno / Bun
|
|
35
|
+
TypeScript runs natively without `package.json`.
|
|
36
|
+
- **Deno**: `deno run --allow-read scripts/process.ts`
|
|
37
|
+
- **Bun**: `bun run scripts/process.ts`
|
|
38
|
+
|
|
39
|
+
## 3. Designing for Agentic Use
|
|
40
|
+
|
|
41
|
+
- **No Interactive Prompts**: Scripts should fail with a clear error and usage instructions rather than hanging for input.
|
|
42
|
+
- **Helpful `--help`**: Ensure the agent can run `python scripts/my_script.py --help` to understand flags and examples.
|
|
43
|
+
- **Structured Output**: Prefer JSON or CSV over whitespace-aligned tables for easier parsing by the agent.
|
|
44
|
+
- **Idempotency**: "Create if not exists" is safer than failing on duplicates, as agents may retry commands.
|
|
45
|
+
- **Meaningful Exit Codes**: Use distinct codes for "Not Found," "Invalid Args," and "System Error."
|
|
46
|
+
|
|
47
|
+
## 4. Referencing from SKILL.md
|
|
48
|
+
|
|
49
|
+
Document the available scripts clearly in your core instructions:
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
## Available Scripts
|
|
53
|
+
- **`scripts/validate.py`**: Validates input data and returns a JSON report.
|
|
54
|
+
- **`scripts/generate_chart.py`**: Creates a bar chart from the validation report.
|
|
55
|
+
|
|
56
|
+
## Workflow
|
|
57
|
+
1. Run validation: `uv run scripts/validate.py input.json` -> `results.json`.
|
|
58
|
+
2. Generate chart: `uv run scripts/generate_chart.py results.json`.
|
|
59
|
+
```
|