@booklib/core 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/booklib-standards.mdc +40 -0
- package/.gemini/context.md +372 -0
- package/AGENTS.md +166 -0
- package/CHANGELOG.md +226 -0
- package/CLAUDE.md +81 -0
- package/CODE_OF_CONDUCT.md +31 -0
- package/CONTRIBUTING.md +304 -0
- package/LICENSE +21 -0
- package/PLAN.md +28 -0
- package/README.ja.md +198 -0
- package/README.ko.md +198 -0
- package/README.md +503 -0
- package/README.pt-BR.md +198 -0
- package/README.uk.md +241 -0
- package/README.zh-CN.md +198 -0
- package/SECURITY.md +9 -0
- package/agents/architecture-reviewer.md +136 -0
- package/agents/booklib-reviewer.md +90 -0
- package/agents/data-reviewer.md +107 -0
- package/agents/jvm-reviewer.md +146 -0
- package/agents/python-reviewer.md +128 -0
- package/agents/rust-reviewer.md +115 -0
- package/agents/ts-reviewer.md +110 -0
- package/agents/ui-reviewer.md +117 -0
- package/assets/logo.svg +36 -0
- package/bin/booklib-mcp.js +304 -0
- package/bin/booklib.js +1705 -0
- package/bin/skills.cjs +1292 -0
- package/booklib-router.mdc +36 -0
- package/booklib.config.json +19 -0
- package/commands/animation-at-work.md +10 -0
- package/commands/clean-code-reviewer.md +10 -0
- package/commands/data-intensive-patterns.md +10 -0
- package/commands/data-pipelines.md +10 -0
- package/commands/design-patterns.md +10 -0
- package/commands/domain-driven-design.md +10 -0
- package/commands/effective-java.md +10 -0
- package/commands/effective-kotlin.md +10 -0
- package/commands/effective-python.md +10 -0
- package/commands/effective-typescript.md +10 -0
- package/commands/kotlin-in-action.md +10 -0
- package/commands/lean-startup.md +10 -0
- package/commands/microservices-patterns.md +10 -0
- package/commands/programming-with-rust.md +10 -0
- package/commands/refactoring-ui.md +10 -0
- package/commands/rust-in-action.md +10 -0
- package/commands/skill-router.md +10 -0
- package/commands/spring-boot-in-action.md +10 -0
- package/commands/storytelling-with-data.md +10 -0
- package/commands/system-design-interview.md +10 -0
- package/commands/using-asyncio-python.md +10 -0
- package/commands/web-scraping-python.md +10 -0
- package/community/registry.json +1616 -0
- package/hooks/hooks.json +23 -0
- package/hooks/posttooluse-capture.mjs +67 -0
- package/hooks/suggest.js +153 -0
- package/lib/agent-behaviors.js +40 -0
- package/lib/agent-detector.js +96 -0
- package/lib/config-loader.js +39 -0
- package/lib/conflict-resolver.js +148 -0
- package/lib/context-builder.js +574 -0
- package/lib/discovery-engine.js +298 -0
- package/lib/doctor/hook-installer.js +83 -0
- package/lib/doctor/usage-tracker.js +87 -0
- package/lib/engine/ai-features.js +253 -0
- package/lib/engine/auditor.js +103 -0
- package/lib/engine/bm25-index.js +178 -0
- package/lib/engine/capture.js +120 -0
- package/lib/engine/corrections.js +198 -0
- package/lib/engine/doctor.js +195 -0
- package/lib/engine/graph-injector.js +137 -0
- package/lib/engine/graph.js +161 -0
- package/lib/engine/handoff.js +405 -0
- package/lib/engine/indexer.js +242 -0
- package/lib/engine/parser.js +53 -0
- package/lib/engine/query-expander.js +42 -0
- package/lib/engine/reranker.js +40 -0
- package/lib/engine/rrf.js +59 -0
- package/lib/engine/scanner.js +151 -0
- package/lib/engine/searcher.js +139 -0
- package/lib/engine/session-coordinator.js +306 -0
- package/lib/engine/session-manager.js +429 -0
- package/lib/engine/synthesizer.js +70 -0
- package/lib/installer.js +70 -0
- package/lib/instinct-block.js +33 -0
- package/lib/mcp-config-writer.js +88 -0
- package/lib/paths.js +57 -0
- package/lib/profiles/design.md +19 -0
- package/lib/profiles/general.md +16 -0
- package/lib/profiles/research-analysis.md +22 -0
- package/lib/profiles/software-development.md +23 -0
- package/lib/profiles/writing-content.md +19 -0
- package/lib/project-initializer.js +916 -0
- package/lib/registry/skills.js +102 -0
- package/lib/registry-searcher.js +99 -0
- package/lib/rules/rules-manager.js +169 -0
- package/lib/skill-fetcher.js +333 -0
- package/lib/well-known-builder.js +70 -0
- package/lib/wizard/index.js +404 -0
- package/lib/wizard/integration-detector.js +41 -0
- package/lib/wizard/project-detector.js +100 -0
- package/lib/wizard/prompt.js +156 -0
- package/lib/wizard/registry-embeddings.js +107 -0
- package/lib/wizard/skill-recommender.js +69 -0
- package/llms-full.txt +254 -0
- package/llms.txt +70 -0
- package/package.json +45 -0
- package/research-reports/2026-04-01-current-architecture.md +160 -0
- package/research-reports/IDEAS.md +93 -0
- package/rules/common/clean-code.md +42 -0
- package/rules/java/effective-java.md +42 -0
- package/rules/kotlin/effective-kotlin.md +37 -0
- package/rules/python/effective-python.md +38 -0
- package/rules/rust/rust.md +37 -0
- package/rules/typescript/effective-typescript.md +42 -0
- package/scripts/gen-llms-full.mjs +36 -0
- package/scripts/gen-og.mjs +142 -0
- package/scripts/validate-frontmatter.js +25 -0
- package/skills/animation-at-work/SKILL.md +270 -0
- package/skills/animation-at-work/assets/example_asset.txt +1 -0
- package/skills/animation-at-work/evals/evals.json +44 -0
- package/skills/animation-at-work/evals/results.json +13 -0
- package/skills/animation-at-work/examples/after.md +64 -0
- package/skills/animation-at-work/examples/before.md +35 -0
- package/skills/animation-at-work/references/api_reference.md +369 -0
- package/skills/animation-at-work/references/review-checklist.md +79 -0
- package/skills/animation-at-work/scripts/audit_animations.py +295 -0
- package/skills/animation-at-work/scripts/example.py +1 -0
- package/skills/clean-code-reviewer/SKILL.md +444 -0
- package/skills/clean-code-reviewer/audit.json +35 -0
- package/skills/clean-code-reviewer/evals/evals.json +185 -0
- package/skills/clean-code-reviewer/evals/results.json +13 -0
- package/skills/clean-code-reviewer/examples/after.md +48 -0
- package/skills/clean-code-reviewer/examples/before.md +33 -0
- package/skills/clean-code-reviewer/references/api_reference.md +158 -0
- package/skills/clean-code-reviewer/references/practices-catalog.md +282 -0
- package/skills/clean-code-reviewer/references/review-checklist.md +254 -0
- package/skills/clean-code-reviewer/scripts/pre-review.py +206 -0
- package/skills/data-intensive-patterns/SKILL.md +267 -0
- package/skills/data-intensive-patterns/assets/example_asset.txt +1 -0
- package/skills/data-intensive-patterns/evals/evals.json +54 -0
- package/skills/data-intensive-patterns/evals/results.json +13 -0
- package/skills/data-intensive-patterns/examples/after.md +61 -0
- package/skills/data-intensive-patterns/examples/before.md +38 -0
- package/skills/data-intensive-patterns/references/api_reference.md +34 -0
- package/skills/data-intensive-patterns/references/patterns-catalog.md +551 -0
- package/skills/data-intensive-patterns/references/review-checklist.md +193 -0
- package/skills/data-intensive-patterns/scripts/adr.py +213 -0
- package/skills/data-intensive-patterns/scripts/example.py +1 -0
- package/skills/data-pipelines/SKILL.md +259 -0
- package/skills/data-pipelines/assets/example_asset.txt +1 -0
- package/skills/data-pipelines/evals/evals.json +45 -0
- package/skills/data-pipelines/evals/results.json +13 -0
- package/skills/data-pipelines/examples/after.md +97 -0
- package/skills/data-pipelines/examples/before.md +37 -0
- package/skills/data-pipelines/references/api_reference.md +301 -0
- package/skills/data-pipelines/references/review-checklist.md +181 -0
- package/skills/data-pipelines/scripts/example.py +1 -0
- package/skills/data-pipelines/scripts/new_pipeline.py +444 -0
- package/skills/design-patterns/SKILL.md +271 -0
- package/skills/design-patterns/assets/example_asset.txt +1 -0
- package/skills/design-patterns/evals/evals.json +46 -0
- package/skills/design-patterns/evals/results.json +13 -0
- package/skills/design-patterns/examples/after.md +52 -0
- package/skills/design-patterns/examples/before.md +29 -0
- package/skills/design-patterns/references/api_reference.md +1 -0
- package/skills/design-patterns/references/patterns-catalog.md +726 -0
- package/skills/design-patterns/references/review-checklist.md +173 -0
- package/skills/design-patterns/scripts/example.py +1 -0
- package/skills/design-patterns/scripts/scaffold.py +807 -0
- package/skills/domain-driven-design/SKILL.md +142 -0
- package/skills/domain-driven-design/assets/example_asset.txt +1 -0
- package/skills/domain-driven-design/evals/evals.json +48 -0
- package/skills/domain-driven-design/evals/results.json +13 -0
- package/skills/domain-driven-design/examples/after.md +80 -0
- package/skills/domain-driven-design/examples/before.md +43 -0
- package/skills/domain-driven-design/references/api_reference.md +1 -0
- package/skills/domain-driven-design/references/patterns-catalog.md +545 -0
- package/skills/domain-driven-design/references/review-checklist.md +158 -0
- package/skills/domain-driven-design/scripts/example.py +1 -0
- package/skills/domain-driven-design/scripts/scaffold.py +421 -0
- package/skills/effective-java/SKILL.md +227 -0
- package/skills/effective-java/assets/example_asset.txt +1 -0
- package/skills/effective-java/evals/evals.json +46 -0
- package/skills/effective-java/evals/results.json +13 -0
- package/skills/effective-java/examples/after.md +83 -0
- package/skills/effective-java/examples/before.md +37 -0
- package/skills/effective-java/references/api_reference.md +1 -0
- package/skills/effective-java/references/items-catalog.md +955 -0
- package/skills/effective-java/references/review-checklist.md +216 -0
- package/skills/effective-java/scripts/checkstyle_setup.py +211 -0
- package/skills/effective-java/scripts/example.py +1 -0
- package/skills/effective-kotlin/SKILL.md +271 -0
- package/skills/effective-kotlin/assets/example_asset.txt +1 -0
- package/skills/effective-kotlin/audit.json +29 -0
- package/skills/effective-kotlin/evals/evals.json +45 -0
- package/skills/effective-kotlin/evals/results.json +13 -0
- package/skills/effective-kotlin/examples/after.md +36 -0
- package/skills/effective-kotlin/examples/before.md +38 -0
- package/skills/effective-kotlin/references/api_reference.md +1 -0
- package/skills/effective-kotlin/references/practices-catalog.md +1228 -0
- package/skills/effective-kotlin/references/review-checklist.md +126 -0
- package/skills/effective-kotlin/scripts/example.py +1 -0
- package/skills/effective-python/SKILL.md +441 -0
- package/skills/effective-python/evals/evals.json +44 -0
- package/skills/effective-python/evals/results.json +13 -0
- package/skills/effective-python/examples/after.md +56 -0
- package/skills/effective-python/examples/before.md +40 -0
- package/skills/effective-python/ref-01-pythonic-thinking.md +202 -0
- package/skills/effective-python/ref-02-lists-and-dicts.md +146 -0
- package/skills/effective-python/ref-03-functions.md +186 -0
- package/skills/effective-python/ref-04-comprehensions-generators.md +211 -0
- package/skills/effective-python/ref-05-classes-interfaces.md +188 -0
- package/skills/effective-python/ref-06-metaclasses-attributes.md +209 -0
- package/skills/effective-python/ref-07-concurrency.md +213 -0
- package/skills/effective-python/ref-08-robustness-performance.md +248 -0
- package/skills/effective-python/ref-09-testing-debugging.md +253 -0
- package/skills/effective-python/ref-10-collaboration.md +175 -0
- package/skills/effective-python/references/api_reference.md +218 -0
- package/skills/effective-python/references/practices-catalog.md +483 -0
- package/skills/effective-python/references/review-checklist.md +190 -0
- package/skills/effective-python/scripts/lint.py +173 -0
- package/skills/effective-typescript/SKILL.md +262 -0
- package/skills/effective-typescript/audit.json +29 -0
- package/skills/effective-typescript/evals/evals.json +37 -0
- package/skills/effective-typescript/evals/results.json +13 -0
- package/skills/effective-typescript/examples/after.md +70 -0
- package/skills/effective-typescript/examples/before.md +47 -0
- package/skills/effective-typescript/references/api_reference.md +118 -0
- package/skills/effective-typescript/references/practices-catalog.md +371 -0
- package/skills/effective-typescript/scripts/review.py +169 -0
- package/skills/kotlin-in-action/SKILL.md +261 -0
- package/skills/kotlin-in-action/assets/example_asset.txt +1 -0
- package/skills/kotlin-in-action/evals/evals.json +43 -0
- package/skills/kotlin-in-action/evals/results.json +13 -0
- package/skills/kotlin-in-action/examples/after.md +53 -0
- package/skills/kotlin-in-action/examples/before.md +39 -0
- package/skills/kotlin-in-action/references/api_reference.md +1 -0
- package/skills/kotlin-in-action/references/practices-catalog.md +436 -0
- package/skills/kotlin-in-action/references/review-checklist.md +204 -0
- package/skills/kotlin-in-action/scripts/example.py +1 -0
- package/skills/kotlin-in-action/scripts/setup_detekt.py +224 -0
- package/skills/lean-startup/SKILL.md +160 -0
- package/skills/lean-startup/assets/example_asset.txt +1 -0
- package/skills/lean-startup/evals/evals.json +43 -0
- package/skills/lean-startup/evals/results.json +13 -0
- package/skills/lean-startup/examples/after.md +80 -0
- package/skills/lean-startup/examples/before.md +34 -0
- package/skills/lean-startup/references/api_reference.md +319 -0
- package/skills/lean-startup/references/review-checklist.md +137 -0
- package/skills/lean-startup/scripts/example.py +1 -0
- package/skills/lean-startup/scripts/new_experiment.py +286 -0
- package/skills/microservices-patterns/SKILL.md +384 -0
- package/skills/microservices-patterns/evals/evals.json +45 -0
- package/skills/microservices-patterns/evals/results.json +13 -0
- package/skills/microservices-patterns/examples/after.md +69 -0
- package/skills/microservices-patterns/examples/before.md +40 -0
- package/skills/microservices-patterns/references/patterns-catalog.md +391 -0
- package/skills/microservices-patterns/references/review-checklist.md +169 -0
- package/skills/microservices-patterns/scripts/new_service.py +583 -0
- package/skills/programming-with-rust/SKILL.md +209 -0
- package/skills/programming-with-rust/evals/evals.json +37 -0
- package/skills/programming-with-rust/evals/results.json +13 -0
- package/skills/programming-with-rust/examples/after.md +107 -0
- package/skills/programming-with-rust/examples/before.md +59 -0
- package/skills/programming-with-rust/references/api_reference.md +152 -0
- package/skills/programming-with-rust/references/practices-catalog.md +335 -0
- package/skills/programming-with-rust/scripts/review.py +142 -0
- package/skills/refactoring-ui/SKILL.md +362 -0
- package/skills/refactoring-ui/assets/example_asset.txt +1 -0
- package/skills/refactoring-ui/evals/evals.json +45 -0
- package/skills/refactoring-ui/evals/results.json +13 -0
- package/skills/refactoring-ui/examples/after.md +85 -0
- package/skills/refactoring-ui/examples/before.md +58 -0
- package/skills/refactoring-ui/references/api_reference.md +355 -0
- package/skills/refactoring-ui/references/review-checklist.md +114 -0
- package/skills/refactoring-ui/scripts/audit_css.py +250 -0
- package/skills/refactoring-ui/scripts/example.py +1 -0
- package/skills/rust-in-action/SKILL.md +350 -0
- package/skills/rust-in-action/evals/evals.json +38 -0
- package/skills/rust-in-action/evals/results.json +13 -0
- package/skills/rust-in-action/examples/after.md +156 -0
- package/skills/rust-in-action/examples/before.md +56 -0
- package/skills/rust-in-action/references/practices-catalog.md +346 -0
- package/skills/rust-in-action/scripts/review.py +147 -0
- package/skills/skill-router/SKILL.md +186 -0
- package/skills/skill-router/evals/evals.json +38 -0
- package/skills/skill-router/evals/results.json +13 -0
- package/skills/skill-router/examples/after.md +63 -0
- package/skills/skill-router/examples/before.md +39 -0
- package/skills/skill-router/references/api_reference.md +24 -0
- package/skills/skill-router/references/routing-heuristics.md +89 -0
- package/skills/skill-router/references/skill-catalog.md +174 -0
- package/skills/skill-router/scripts/route.py +266 -0
- package/skills/spring-boot-in-action/SKILL.md +340 -0
- package/skills/spring-boot-in-action/evals/evals.json +39 -0
- package/skills/spring-boot-in-action/evals/results.json +13 -0
- package/skills/spring-boot-in-action/examples/after.md +185 -0
- package/skills/spring-boot-in-action/examples/before.md +84 -0
- package/skills/spring-boot-in-action/references/practices-catalog.md +403 -0
- package/skills/spring-boot-in-action/scripts/review.py +184 -0
- package/skills/storytelling-with-data/SKILL.md +241 -0
- package/skills/storytelling-with-data/assets/example_asset.txt +1 -0
- package/skills/storytelling-with-data/evals/evals.json +47 -0
- package/skills/storytelling-with-data/evals/results.json +13 -0
- package/skills/storytelling-with-data/examples/after.md +50 -0
- package/skills/storytelling-with-data/examples/before.md +33 -0
- package/skills/storytelling-with-data/references/api_reference.md +379 -0
- package/skills/storytelling-with-data/references/review-checklist.md +111 -0
- package/skills/storytelling-with-data/scripts/chart_review.py +301 -0
- package/skills/storytelling-with-data/scripts/example.py +1 -0
- package/skills/system-design-interview/SKILL.md +233 -0
- package/skills/system-design-interview/assets/example_asset.txt +1 -0
- package/skills/system-design-interview/evals/evals.json +46 -0
- package/skills/system-design-interview/evals/results.json +13 -0
- package/skills/system-design-interview/examples/after.md +94 -0
- package/skills/system-design-interview/examples/before.md +27 -0
- package/skills/system-design-interview/references/api_reference.md +582 -0
- package/skills/system-design-interview/references/review-checklist.md +201 -0
- package/skills/system-design-interview/scripts/example.py +1 -0
- package/skills/system-design-interview/scripts/new_design.py +421 -0
- package/skills/using-asyncio-python/SKILL.md +290 -0
- package/skills/using-asyncio-python/assets/example_asset.txt +1 -0
- package/skills/using-asyncio-python/evals/evals.json +43 -0
- package/skills/using-asyncio-python/evals/results.json +13 -0
- package/skills/using-asyncio-python/examples/after.md +68 -0
- package/skills/using-asyncio-python/examples/before.md +39 -0
- package/skills/using-asyncio-python/references/api_reference.md +267 -0
- package/skills/using-asyncio-python/references/review-checklist.md +149 -0
- package/skills/using-asyncio-python/scripts/check_blocking.py +270 -0
- package/skills/using-asyncio-python/scripts/example.py +1 -0
- package/skills/web-scraping-python/SKILL.md +280 -0
- package/skills/web-scraping-python/assets/example_asset.txt +1 -0
- package/skills/web-scraping-python/evals/evals.json +46 -0
- package/skills/web-scraping-python/evals/results.json +13 -0
- package/skills/web-scraping-python/examples/after.md +109 -0
- package/skills/web-scraping-python/examples/before.md +40 -0
- package/skills/web-scraping-python/references/api_reference.md +393 -0
- package/skills/web-scraping-python/references/review-checklist.md +163 -0
- package/skills/web-scraping-python/scripts/example.py +1 -0
- package/skills/web-scraping-python/scripts/new_scraper.py +231 -0
- package/skills/writing-plans/audit.json +34 -0
- package/tests/agent-detector.test.js +83 -0
- package/tests/corrections.test.js +245 -0
- package/tests/doctor/hook-installer.test.js +72 -0
- package/tests/doctor/usage-tracker.test.js +140 -0
- package/tests/engine/benchmark-eval.test.js +31 -0
- package/tests/engine/bm25-index.test.js +85 -0
- package/tests/engine/capture-command.test.js +35 -0
- package/tests/engine/capture.test.js +17 -0
- package/tests/engine/graph-augmented-search.test.js +107 -0
- package/tests/engine/graph-injector.test.js +44 -0
- package/tests/engine/graph.test.js +216 -0
- package/tests/engine/hybrid-searcher.test.js +74 -0
- package/tests/engine/indexer-bm25.test.js +37 -0
- package/tests/engine/mcp-tools.test.js +73 -0
- package/tests/engine/project-initializer-mcp.test.js +99 -0
- package/tests/engine/query-expander.test.js +36 -0
- package/tests/engine/reranker.test.js +51 -0
- package/tests/engine/rrf.test.js +49 -0
- package/tests/engine/srag-prefix.test.js +47 -0
- package/tests/instinct-block.test.js +23 -0
- package/tests/mcp-config-writer.test.js +60 -0
- package/tests/project-initializer-new-agents.test.js +48 -0
- package/tests/rules/rules-manager.test.js +230 -0
- package/tests/well-known-builder.test.js +40 -0
- package/tests/wizard/integration-detector.test.js +31 -0
- package/tests/wizard/project-detector.test.js +51 -0
- package/tests/wizard/prompt-session.test.js +61 -0
- package/tests/wizard/prompt.test.js +16 -0
- package/tests/wizard/registry-embeddings.test.js +35 -0
- package/tests/wizard/skill-recommender.test.js +34 -0
- package/tests/wizard/slot-count.test.js +25 -0
- package/vercel.json +21 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-router
|
|
3
|
+
version: "1.0"
|
|
4
|
+
license: MIT
|
|
5
|
+
tags: [meta, routing, agent-skills]
|
|
6
|
+
description: >
|
|
7
|
+
Select the 1-2 most relevant @booklib/skills for a given file, PR, or task.
|
|
8
|
+
Use before applying any skill when unsure which book's lens applies, or when
|
|
9
|
+
multiple skills could apply. Trigger on "which skill", "which book", "route this",
|
|
10
|
+
"what skill should I use", or whenever a user describes a task without specifying
|
|
11
|
+
a skill. Returns a ranked recommendation with rationale and anti-triggers.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Skill Router
|
|
15
|
+
|
|
16
|
+
You are a skill selector for the `@booklib/skills` library — a collection of book-based and community AI skills covering code quality, architecture, language best practices, design, product management, writing, legal, and business strategy. Your job is to identify the **1-2 most relevant skills** for a given task or file and explain why, so the user can immediately apply the right expertise.
|
|
17
|
+
|
|
18
|
+
## When You're Triggered
|
|
19
|
+
|
|
20
|
+
- User says "which skill should I use for..."
|
|
21
|
+
- User says "route this to the right skill"
|
|
22
|
+
- User describes a task without naming a skill
|
|
23
|
+
- User asks "what book applies here?"
|
|
24
|
+
- Multiple skills seem to apply and you need to rank them
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Routing Process
|
|
29
|
+
|
|
30
|
+
### Step 0 — Establish Input Scope
|
|
31
|
+
|
|
32
|
+
Before routing, pin what you're actually reviewing:
|
|
33
|
+
|
|
34
|
+
1. **Prefer `git diff` as default scope.** If the user asks to review code without specifying files, default to the current diff — not the entire codebase. Routing a skill against 10,000 lines of unchanged code wastes context and dilutes findings.
|
|
35
|
+
2. **Check for a CLAUDE.md.** If one exists, read it before routing. Project conventions (language standards, test requirements, banned patterns) affect which skill is most relevant and what the selected skill should prioritize.
|
|
36
|
+
3. **Identify the specific files or scope** from the user's message. If genuinely ambiguous, ask before routing.
|
|
37
|
+
|
|
38
|
+
### Step 1 — Classify the Work Type
|
|
39
|
+
|
|
40
|
+
Identify what the user is trying to do:
|
|
41
|
+
|
|
42
|
+
| Work Type | Description | Example |
|
|
43
|
+
|-----------|-------------|---------|
|
|
44
|
+
| **review** | Evaluate existing code for quality, patterns, or correctness | "Review my Python class" |
|
|
45
|
+
| **generate** | Create new code following a book's patterns | "Generate a saga for order processing" |
|
|
46
|
+
| **migrate** | Incrementally improve legacy code toward a better architecture | "Help me ratchet this legacy codebase toward clean code" |
|
|
47
|
+
| **design** | Make architectural or system-level decisions | "How should I decompose this monolith?" |
|
|
48
|
+
| **learn** | Understand a concept or pattern | "What is the Strangler Fig pattern?" |
|
|
49
|
+
| **visualize** | Create or critique data visualizations or UI | "Review my chart / UI component" |
|
|
50
|
+
| **document** | Review or draft contracts, specs, briefs, policies | "Review this contract" |
|
|
51
|
+
| **plan** | Product or business strategy decisions | "How should we prioritize this?" |
|
|
52
|
+
|
|
53
|
+
### Step 2 — Identify Language + Domain
|
|
54
|
+
|
|
55
|
+
From the file extension, imports, description, or code provided:
|
|
56
|
+
|
|
57
|
+
- **Language signals:** `.py` → Python skills; `.java` → `effective-java` or `clean-code-reviewer`; `.kt` → `effective-kotlin` or `kotlin-in-action`; `.ts`/`.tsx` → `effective-typescript`; `.rs` → `programming-with-rust`; `.js` → `clean-code-reviewer` or `design-patterns`
|
|
58
|
+
- **Domain signals:** "microservice", "saga" → microservices-patterns; "bounded context", "aggregate" → domain-driven-design; "chart", "visualization" → storytelling-with-data; "UI", "layout", "typography" → refactoring-ui; "web scraping", "BeautifulSoup" → web-scraping-python; "asyncio", "coroutine" → using-asyncio-python; "data pipeline", "ETL" → data-pipelines; "replication", "partitioning", "database internals" → data-intensive-patterns
|
|
59
|
+
- **Architecture signals:** "monolith decomposition", "distributed systems" → microservices-patterns or system-design-interview
|
|
60
|
+
- **Product/PM signals:** "PRD", "product requirements", "user story", "acceptance criteria", "roadmap", "prioritization", "OKR", "jobs to be done", "JTBD" → `writing-plans` or `product-lens`
|
|
61
|
+
- **Legal/contracts signals:** "contract", "clause", "NDA", "SLA", "indemnification", "IP assignment", "terms of service", "liability" → `writing-plans` (for structure) or a specialist legal community skill
|
|
62
|
+
- **Writing/content signals:** "blog post", "copy", "content brief", "editorial", "tone of voice", "article", "draft", "long-form" → `writing-skills` or `article-writing`
|
|
63
|
+
- **Strategy signals:** "competitive analysis", "market positioning", "go-to-market", "GTM", "SWOT", "business model", "strategic plan" → `lean-startup` (startup) or `strategic-compact` (corporate)
|
|
64
|
+
- **Design/brand signals:** "brand identity", "logo", "color palette", "design system", "style guide", "visual language" → `brand-guidelines`
|
|
65
|
+
|
|
66
|
+
Read `references/skill-catalog.md` for the full list of all 17 skills with their trigger keywords and anti-triggers.
|
|
67
|
+
|
|
68
|
+
### Step 3 — Match to Skill(s)
|
|
69
|
+
|
|
70
|
+
Apply these primary routing rules:
|
|
71
|
+
|
|
72
|
+
1. **Code quality review (any language)** → `clean-code-reviewer`
|
|
73
|
+
2. **Java best practices** → `effective-java`
|
|
74
|
+
3. **Kotlin best practices** → `effective-kotlin` or `kotlin-in-action` (see conflict rules)
|
|
75
|
+
4. **Python best practices** → `effective-python`
|
|
76
|
+
5. **Python asyncio/concurrency** → `using-asyncio-python` (overrides effective-python for async topics)
|
|
77
|
+
6. **Python web scraping** → `web-scraping-python`
|
|
78
|
+
7. **TypeScript best practices, type design, any, migration** → `effective-typescript`
|
|
79
|
+
8. **Rust, ownership, borrowing, lifetimes, traits, concurrency** → `programming-with-rust`
|
|
80
|
+
9. **OO design patterns (GoF)** → `design-patterns`
|
|
81
|
+
10. **Domain modeling, DDD** → `domain-driven-design`
|
|
82
|
+
11. **Microservices, sagas, decomposition** → `microservices-patterns`
|
|
83
|
+
12. **System scalability, estimation** → `system-design-interview`
|
|
84
|
+
13. **Data storage internals, replication** → `data-intensive-patterns`
|
|
85
|
+
14. **Data pipelines, ETL** → `data-pipelines`
|
|
86
|
+
15. **UI design, visual hierarchy** → `refactoring-ui`
|
|
87
|
+
16. **Charts, data visualization** → `storytelling-with-data`
|
|
88
|
+
17. **Web animation** → `animation-at-work`
|
|
89
|
+
18. **Startup strategy, MVP** → `lean-startup`
|
|
90
|
+
19. **Routing help** → `skill-router` (this skill)
|
|
91
|
+
20. **Product requirements, user stories, roadmaps** → `writing-plans` or `product-lens`
|
|
92
|
+
21. **Business writing, copy, articles** → `writing-skills` or `article-writing`
|
|
93
|
+
22. **Business or corporate strategy** → `lean-startup` (startup/product) or `strategic-compact` (corporate)
|
|
94
|
+
23. **Brand identity, design systems** → `brand-guidelines`
|
|
95
|
+
24. **Web design, layout, typography** → `web-design-guidelines` or `refactoring-ui` (if UI components)
|
|
96
|
+
|
|
97
|
+
Read `references/routing-heuristics.md` for detailed decision rules and conflict resolution.
|
|
98
|
+
|
|
99
|
+
### Step 4 — Check for Conflicts
|
|
100
|
+
|
|
101
|
+
Some skill pairs can conflict. Resolve using these rules:
|
|
102
|
+
|
|
103
|
+
| Conflict | Resolution |
|
|
104
|
+
|----------|------------|
|
|
105
|
+
| `effective-typescript` vs `clean-code-reviewer` | Use `effective-typescript` for TypeScript-specific concerns (type system, any, type design); use `clean-code-reviewer` for naming/functions/readability which applies cross-language |
|
|
106
|
+
| `clean-code-reviewer` vs `effective-java` | Use `effective-java` for Java-specific idioms (generics, enums, builders); use `clean-code-reviewer` for naming/functions/readability which applies cross-language |
|
|
107
|
+
| `effective-kotlin` vs `kotlin-in-action` | `effective-kotlin` for best practices and pitfall avoidance; `kotlin-in-action` for learning Kotlin language features |
|
|
108
|
+
| `domain-driven-design` vs `microservices-patterns` | `domain-driven-design` for domain model design; `microservices-patterns` for service decomposition and inter-service communication. Apply both if designing a new microservice with rich domain model |
|
|
109
|
+
| `clean-code-reviewer` vs `domain-driven-design` | Clean Code says "small functions"; DDD encourages "rich domain models." Clean Code wins for code-level review; DDD wins for model design |
|
|
110
|
+
| `data-intensive-patterns` vs `system-design-interview` | `data-intensive-patterns` for storage engine internals, replication, and consistency; `system-design-interview` for scalability estimates and high-level architecture |
|
|
111
|
+
| `effective-python` vs `using-asyncio-python` | `using-asyncio-python` wins for any async/concurrent Python topic; `effective-python` for everything else |
|
|
112
|
+
| `lean-startup` vs `writing-plans` | Use `lean-startup` for strategy and hypothesis validation; `writing-plans` for document structure and requirements writing |
|
|
113
|
+
| `refactoring-ui` vs `brand-guidelines` | `refactoring-ui` for component/UI design decisions; `brand-guidelines` for logo, color palette, and brand identity |
|
|
114
|
+
| `writing-skills` vs `article-writing` | `writing-skills` for general clarity and prose quality; `article-writing` for narrative structure and long-form pieces |
|
|
115
|
+
|
|
116
|
+
### Step 5 — Return Recommendation
|
|
117
|
+
|
|
118
|
+
Format your output as:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
**Scope:** [files or git diff being reviewed]
|
|
122
|
+
**Primary skill:** `skill-name`
|
|
123
|
+
**Why:** [1-2 sentence rationale tying the task to the skill's domain]
|
|
124
|
+
**Secondary (optional):** `skill-name` — [brief rationale] OR none
|
|
125
|
+
**Don't apply:** `skill-name` — [why it would produce irrelevant feedback]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
When instructing the selected skill(s), tell them to:
|
|
129
|
+
- Classify each finding as **HIGH** (correctness/security/data loss), **MEDIUM** (design/maintainability), or **LOW** (style/naming)
|
|
130
|
+
- Reference findings as `file.ext:line` — not just "line 42" or "the function"
|
|
131
|
+
- Skip findings below the threshold for the work type: **review** → HIGH + MEDIUM; **migrate/design** → all tiers
|
|
132
|
+
|
|
133
|
+
If you're genuinely uncertain between two equally applicable skills, say so and recommend applying both in sequence, primary first.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Anti-Trigger Rules
|
|
138
|
+
|
|
139
|
+
Do NOT route to a skill if:
|
|
140
|
+
- The task is too simple for that skill's complexity (don't route a 5-line script to `domain-driven-design`)
|
|
141
|
+
- The language doesn't match (don't route Python to `effective-java`)
|
|
142
|
+
- The domain doesn't match (don't route UI code to `microservices-patterns`)
|
|
143
|
+
- The user has already specified a skill (respect their choice; only offer alternatives if asked)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
**Example 1 — Clear single-skill case:**
|
|
150
|
+
```
|
|
151
|
+
User: "Review my Python class for code quality"
|
|
152
|
+
|
|
153
|
+
Scope: orders/service.py (specified file)
|
|
154
|
+
Primary skill: clean-code-reviewer
|
|
155
|
+
Why: Language-agnostic code quality review is exactly Clean Code's domain — naming, functions, comments, classes.
|
|
156
|
+
Secondary: none
|
|
157
|
+
Don't apply: effective-python — Python-specific idioms are not the concern here; effective-python would focus on list comprehensions and context managers, not the general code quality issues Clean Code addresses.
|
|
158
|
+
|
|
159
|
+
→ Instruct clean-code-reviewer to classify findings as HIGH/MEDIUM/LOW and reference each as orders/service.py:line.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Example 2 — Conflict case:**
|
|
163
|
+
```
|
|
164
|
+
User: "I'm building a new microservice for our e-commerce platform. Review the domain model."
|
|
165
|
+
|
|
166
|
+
Scope: git diff (new files in src/domain/)
|
|
167
|
+
Primary skill: domain-driven-design
|
|
168
|
+
Why: The request is about domain model design — Aggregates, Value Objects, Bounded Contexts. DDD is the authoritative source.
|
|
169
|
+
Secondary: microservices-patterns — apply after DDD review to check service boundaries, database ownership, and communication patterns.
|
|
170
|
+
Don't apply: clean-code-reviewer — code quality review is premature at the design stage; apply later when implementation code exists.
|
|
171
|
+
|
|
172
|
+
→ Instruct both skills to classify findings as HIGH/MEDIUM/LOW and reference each as file:line.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Example 3 — Already routed (positive case):**
|
|
176
|
+
```
|
|
177
|
+
User: "Use the effective-java skill to review my builder pattern"
|
|
178
|
+
|
|
179
|
+
Scope: user specified — confirm with them if files aren't clear
|
|
180
|
+
Primary skill: effective-java (already specified by user — confirm and proceed)
|
|
181
|
+
Why: User correctly identified the skill. effective-java Item 2 covers the Builder pattern directly.
|
|
182
|
+
Secondary: none
|
|
183
|
+
Don't apply: design-patterns — GoF Builder pattern is covered, but Effective Java's opinionated take on Java-specific Builder is more directly applicable.
|
|
184
|
+
|
|
185
|
+
→ Instruct effective-java to classify findings as HIGH/MEDIUM/LOW and reference each as file:line.
|
|
186
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"evals": [
|
|
3
|
+
{
|
|
4
|
+
"id": "eval-01-clear-single-skill",
|
|
5
|
+
"prompt": "Which skill should I use? I have this Python function and want to make it more Pythonic:\n\n```python\ndef get_items(items_list, filter_value, sort_by_name):\n result = []\n for item in items_list:\n if item['category'] == filter_value:\n result.append(item)\n if sort_by_name:\n result = sorted(result, key=lambda x: x['name'])\n return result\n```",
|
|
6
|
+
"expectations": [
|
|
7
|
+
"Recommends effective-python as primary skill",
|
|
8
|
+
"Mentions that Pythonic idioms (list comprehensions, key functions, boolean flags) are effective-python's domain",
|
|
9
|
+
"Does NOT recommend clean-code-reviewer as primary (it's secondary at most)",
|
|
10
|
+
"Explains why (language-specific Pythonic advice vs general code quality)",
|
|
11
|
+
"Optionally mentions clean-code-reviewer as secondary for the flag argument (sort_by_name)"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "eval-02-conflict-case",
|
|
16
|
+
"prompt": "I'm designing a new service for our e-commerce platform. The service will handle order creation and needs to coordinate with the inventory and payment services. Here's a rough sketch:\n\n```python\nclass OrderService:\n def create_order(self, customer_id, items):\n # 1. Check inventory availability\n # 2. Reserve inventory\n # 3. Charge payment\n # If payment fails, how do I release the reservation?\n pass\n\n def cancel_order(self, order_id):\n # Need to reverse payment AND release inventory\n # What if one fails?\n pass\n```\n\nWhich skill should I use to design this coordination correctly?",
|
|
17
|
+
"expectations": [
|
|
18
|
+
"Identifies this as a design task, not a code review task",
|
|
19
|
+
"Recommends microservices-patterns as primary (service coordination, saga pattern)",
|
|
20
|
+
"Recommends domain-driven-design as secondary (order domain modeling)",
|
|
21
|
+
"Explains the distinction: microservices-patterns for inter-service coordination, DDD for domain model design",
|
|
22
|
+
"Does NOT recommend clean-code-reviewer (no code to review yet)",
|
|
23
|
+
"Does NOT recommend system-design-interview unless scale/estimation is mentioned"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "eval-03-already-routed",
|
|
28
|
+
"prompt": "Use the effective-java skill to review my enum usage:\n\n```java\npublic class OrderStatus {\n public static final int PENDING = 0;\n public static final int APPROVED = 1;\n public static final int REJECTED = 2;\n public static final int CANCELLED = 3;\n}\n```",
|
|
29
|
+
"expectations": [
|
|
30
|
+
"Confirms effective-java is the correct skill (already specified by user)",
|
|
31
|
+
"Does NOT override the user's skill choice",
|
|
32
|
+
"Optionally notes which Effective Java item applies (Item 34: Use enums instead of int constants)",
|
|
33
|
+
"May note clean-code-reviewer would also flag this (J3: Constants vs Enums) but defers to user's choice",
|
|
34
|
+
"Does not second-guess or add unnecessary routing complexity"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pass_rate": 0.938,
|
|
3
|
+
"passed": 15,
|
|
4
|
+
"total": 16,
|
|
5
|
+
"baseline_pass_rate": 0.688,
|
|
6
|
+
"baseline_passed": 11,
|
|
7
|
+
"baseline_total": 16,
|
|
8
|
+
"delta": 0.25,
|
|
9
|
+
"model": "default",
|
|
10
|
+
"evals_run": 3,
|
|
11
|
+
"date": "2026-03-28",
|
|
12
|
+
"non_standard_provider": true
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# After: Routed Code Review Request
|
|
2
|
+
|
|
3
|
+
## User Message (same as before)
|
|
4
|
+
|
|
5
|
+
> "Can you review my code? I want to make it better."
|
|
6
|
+
>
|
|
7
|
+
> ```java
|
|
8
|
+
> public class OrderProcessor {
|
|
9
|
+
> private static List<Map<String, Object>> pendingOrders = new ArrayList<>();
|
|
10
|
+
>
|
|
11
|
+
> public static int process(Map<String, Object> o, boolean isAdmin, boolean sendEmail) {
|
|
12
|
+
> if (o == null) return -1;
|
|
13
|
+
> if (o.get("status").equals("pending")) {
|
|
14
|
+
> if (isAdmin) {
|
|
15
|
+
> o.put("status", "approved");
|
|
16
|
+
> pendingOrders.remove(o);
|
|
17
|
+
> if (sendEmail) {
|
|
18
|
+
> System.out.println("Sending email to: " + o.get("customerEmail"));
|
|
19
|
+
> }
|
|
20
|
+
> return 0;
|
|
21
|
+
> }
|
|
22
|
+
> }
|
|
23
|
+
> return -2;
|
|
24
|
+
> }
|
|
25
|
+
> }
|
|
26
|
+
> ```
|
|
27
|
+
|
|
28
|
+
## Skill Router Output
|
|
29
|
+
|
|
30
|
+
**Primary skill:** `clean-code-reviewer`
|
|
31
|
+
**Why:** The user wants general code quality improvement for a Java class. The dominant issues are language-agnostic: poor naming (`o`, `isAdmin` flag arg, magic return codes), static mutable state, nested conditionals, and multiple responsibilities — all Clean Code's territory.
|
|
32
|
+
**Secondary (optional):** `effective-java` — after the Clean Code review, apply Effective Java for Java-specific improvements: replace `Map<String, Object>` with a typed class (Item 64: refer to objects by their interfaces), use enums instead of int return codes (Item 34).
|
|
33
|
+
**Don't apply:** `domain-driven-design` — while an Order is a domain concept, applying DDD here would produce advice about Aggregates and Bounded Contexts that is premature. Fix the code quality first.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## What the Clean Code Review Produces
|
|
38
|
+
|
|
39
|
+
With the right skill applied, the review is sharp and specific:
|
|
40
|
+
|
|
41
|
+
### Issues Found
|
|
42
|
+
|
|
43
|
+
🔴 **Critical — F3: Flag Arguments**
|
|
44
|
+
`isAdmin` and `sendEmail` are boolean flags — the function does 4 different things depending on their combination. Split into `approveAsAdmin()` and keep email logic separate.
|
|
45
|
+
|
|
46
|
+
🔴 **Critical — Shared Mutable Static State (Ch. 13)**
|
|
47
|
+
`pendingOrders` is a static mutable list — not thread-safe and makes the class impossible to test in isolation.
|
|
48
|
+
|
|
49
|
+
🔴 **Critical — Error Codes Instead of Exceptions (Ch. 7)**
|
|
50
|
+
Returning `-1` and `-2` forces callers to check magic numbers. Throw `InvalidOrderException` and `UnauthorizedOperationException` instead.
|
|
51
|
+
|
|
52
|
+
🟡 **Important — N1: Poor Naming**
|
|
53
|
+
`o`, `process` — names reveal nothing. `o` → `order`, `process` → `approveOrder`.
|
|
54
|
+
|
|
55
|
+
🟡 **Important — G30: Function Does Multiple Things**
|
|
56
|
+
`process()` validates, approves, removes from list, and sends email. Each is a separate responsibility.
|
|
57
|
+
|
|
58
|
+
🟢 **Suggestion — G25: Magic Numbers**
|
|
59
|
+
Return codes `-1`, `-2` should be named constants at minimum, or better: exceptions.
|
|
60
|
+
|
|
61
|
+
### Result
|
|
62
|
+
|
|
63
|
+
The user gets a **focused, actionable review** from one authoritative source — not a scattered survey of four books.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Before: Unrouted Code Review Request
|
|
2
|
+
|
|
3
|
+
## User Message
|
|
4
|
+
|
|
5
|
+
> "Can you review my code? I want to make it better."
|
|
6
|
+
>
|
|
7
|
+
> ```java
|
|
8
|
+
> public class OrderProcessor {
|
|
9
|
+
> private static List<Map<String, Object>> pendingOrders = new ArrayList<>();
|
|
10
|
+
>
|
|
11
|
+
> public static int process(Map<String, Object> o, boolean isAdmin, boolean sendEmail) {
|
|
12
|
+
> if (o == null) return -1;
|
|
13
|
+
> if (o.get("status").equals("pending")) {
|
|
14
|
+
> if (isAdmin) {
|
|
15
|
+
> o.put("status", "approved");
|
|
16
|
+
> pendingOrders.remove(o);
|
|
17
|
+
> if (sendEmail) {
|
|
18
|
+
> System.out.println("Sending email to: " + o.get("customerEmail"));
|
|
19
|
+
> }
|
|
20
|
+
> return 0;
|
|
21
|
+
> }
|
|
22
|
+
> }
|
|
23
|
+
> return -2;
|
|
24
|
+
> }
|
|
25
|
+
> }
|
|
26
|
+
> ```
|
|
27
|
+
|
|
28
|
+
## What Happens Without Routing
|
|
29
|
+
|
|
30
|
+
The AI must guess which lens to apply:
|
|
31
|
+
|
|
32
|
+
- Does the user want **Java-specific** advice (Effective Java)? → Bloch would focus on generics, raw types, and static factory methods
|
|
33
|
+
- Do they want **code quality** advice (Clean Code)? → Martin would focus on naming, flag arguments, static mutable state
|
|
34
|
+
- Do they want **design pattern** advice (Design Patterns)? → Gang of Four would examine whether a Command or Strategy pattern fits
|
|
35
|
+
- Do they want **domain modeling** advice (DDD)? → Evans would ask about Aggregates and Value Objects
|
|
36
|
+
|
|
37
|
+
**Result:** The AI either picks one arbitrarily, tries to cover all four superficially, or asks a clarifying question that could have been avoided.
|
|
38
|
+
|
|
39
|
+
The user gets a scattered review that's 40% relevant from four different books instead of a sharp, deep review from the right one.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# API Reference: Skill Quick-Lookup
|
|
2
|
+
|
|
3
|
+
Quick-lookup table for all 17 skills.
|
|
4
|
+
|
|
5
|
+
| Skill | Domain | Works Well With | Conflicts With |
|
|
6
|
+
|-------|--------|-----------------|----------------|
|
|
7
|
+
| `animation-at-work` | Web animation, motion | `refactoring-ui` | None |
|
|
8
|
+
| `clean-code-reviewer` | Code quality (any language) | `effective-java`, `effective-python`, `effective-kotlin` | `domain-driven-design` (model design context) |
|
|
9
|
+
| `data-intensive-patterns` | Storage internals, distributed data | `system-design-interview` | `system-design-interview` (different altitude) |
|
|
10
|
+
| `data-pipelines` | ETL, data ingestion, orchestration | `data-intensive-patterns`, `effective-python` | `microservices-patterns` |
|
|
11
|
+
| `design-patterns` | GoF OO patterns | `clean-code-reviewer`, `effective-java` | `domain-driven-design` |
|
|
12
|
+
| `domain-driven-design` | Domain modeling, DDD patterns | `microservices-patterns`, `clean-code-reviewer` | `clean-code-reviewer` (code review context) |
|
|
13
|
+
| `effective-java` | Java idioms and best practices | `clean-code-reviewer`, `design-patterns` | `clean-code-reviewer` (Java-specific vs general) |
|
|
14
|
+
| `effective-kotlin` | Kotlin best practices | `kotlin-in-action`, `clean-code-reviewer` | `kotlin-in-action` |
|
|
15
|
+
| `effective-python` | Python idioms and best practices | `clean-code-reviewer`, `using-asyncio-python` | `using-asyncio-python` (async topics) |
|
|
16
|
+
| `kotlin-in-action` | Kotlin language features | `effective-kotlin` | `effective-kotlin` |
|
|
17
|
+
| `lean-startup` | Startup strategy, MVP, pivots | None (strategy only) | All technical skills |
|
|
18
|
+
| `microservices-patterns` | Service decomposition, sagas, CQRS | `domain-driven-design`, `system-design-interview` | `domain-driven-design` (service vs model) |
|
|
19
|
+
| `refactoring-ui` | UI design, visual hierarchy | `animation-at-work` | None |
|
|
20
|
+
| `skill-router` | Skill selection and routing | All skills | None |
|
|
21
|
+
| `storytelling-with-data` | Data visualization, charts | `data-pipelines` | None |
|
|
22
|
+
| `system-design-interview` | System scalability, high-level design | `microservices-patterns`, `data-intensive-patterns` | `data-intensive-patterns` (altitude) |
|
|
23
|
+
| `using-asyncio-python` | Python asyncio, concurrency | `effective-python` | `effective-python` (async topics) |
|
|
24
|
+
| `web-scraping-python` | Web scraping, crawling | `effective-python`, `data-pipelines` | None |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Routing Heuristics
|
|
2
|
+
|
|
3
|
+
Decision rules for the skill-router. Apply these in order.
|
|
4
|
+
|
|
5
|
+
## Primary Rules (apply first)
|
|
6
|
+
|
|
7
|
+
### By Language
|
|
8
|
+
|
|
9
|
+
| Language | Primary Skill | Override Condition |
|
|
10
|
+
|----------|-------------|-------------------|
|
|
11
|
+
| Python (general) | `effective-python` | If async → `using-asyncio-python`; if scraping → `web-scraping-python` |
|
|
12
|
+
| Python (async/concurrent) | `using-asyncio-python` | Always wins over effective-python for async topics |
|
|
13
|
+
| Python (web scraping) | `web-scraping-python` | Always wins for scraping topics |
|
|
14
|
+
| Java | `effective-java` | If code quality focus → `clean-code-reviewer` |
|
|
15
|
+
| Kotlin | `effective-kotlin` | If learning Kotlin → `kotlin-in-action` |
|
|
16
|
+
| Any language (code quality) | `clean-code-reviewer` | Language-agnostic; always applicable for readability |
|
|
17
|
+
| CSS/HTML/Frontend | `refactoring-ui` | If animation → `animation-at-work` |
|
|
18
|
+
| Any (visualization) | `storytelling-with-data` | Must have a visual component |
|
|
19
|
+
|
|
20
|
+
### By Domain
|
|
21
|
+
|
|
22
|
+
| Domain | Primary Skill |
|
|
23
|
+
|--------|-------------|
|
|
24
|
+
| Domain modeling, DDD | `domain-driven-design` |
|
|
25
|
+
| Service decomposition, distributed systems | `microservices-patterns` |
|
|
26
|
+
| GoF design patterns | `design-patterns` |
|
|
27
|
+
| System scalability, estimation | `system-design-interview` |
|
|
28
|
+
| Storage internals, distributed data | `data-intensive-patterns` |
|
|
29
|
+
| Data pipelines, ETL | `data-pipelines` |
|
|
30
|
+
| Startup strategy, product | `lean-startup` |
|
|
31
|
+
|
|
32
|
+
## Conflict Resolution Rules
|
|
33
|
+
|
|
34
|
+
### clean-code-reviewer vs effective-java
|
|
35
|
+
- **Code-level review with naming/readability focus** → `clean-code-reviewer`
|
|
36
|
+
- **Java-specific items (generics, enums, serialization, lambdas)** → `effective-java`
|
|
37
|
+
- **Both applicable** → primary: `clean-code-reviewer`, secondary: `effective-java`
|
|
38
|
+
|
|
39
|
+
### effective-kotlin vs kotlin-in-action
|
|
40
|
+
- **User knows Kotlin, wants best practice advice** → `effective-kotlin`
|
|
41
|
+
- **User is learning Kotlin or asking about language features** → `kotlin-in-action`
|
|
42
|
+
- **Ambiguous** → ask whether they want best practices or feature explanation
|
|
43
|
+
|
|
44
|
+
### domain-driven-design vs microservices-patterns
|
|
45
|
+
- **Designing or reviewing a domain model** → `domain-driven-design`
|
|
46
|
+
- **Designing service decomposition, sagas, inter-service communication** → `microservices-patterns`
|
|
47
|
+
- **Designing a new microservice with rich domain** → apply both: DDD first (model), microservices-patterns second (service design)
|
|
48
|
+
|
|
49
|
+
### domain-driven-design vs clean-code-reviewer
|
|
50
|
+
- **Model design** → `domain-driven-design` (ignore clean code's "small functions" rule when modeling)
|
|
51
|
+
- **Code review** → `clean-code-reviewer` (DDD model concerns are separate from code readability)
|
|
52
|
+
|
|
53
|
+
### data-intensive-patterns vs system-design-interview
|
|
54
|
+
- **Internals: storage engines, replication, consistency models** → `data-intensive-patterns`
|
|
55
|
+
- **High-level: system components, scale, estimation** → `system-design-interview`
|
|
56
|
+
- **Full system design** → primary: `system-design-interview`, secondary: `data-intensive-patterns`
|
|
57
|
+
|
|
58
|
+
### effective-python vs using-asyncio-python
|
|
59
|
+
- **Any async/concurrent Python** → `using-asyncio-python` (always wins)
|
|
60
|
+
- **Non-async Python** → `effective-python`
|
|
61
|
+
|
|
62
|
+
## Work Type Rules
|
|
63
|
+
|
|
64
|
+
| Work Type | Routing Preference |
|
|
65
|
+
|-----------|-------------------|
|
|
66
|
+
| Code review | Language-specific skill OR `clean-code-reviewer` |
|
|
67
|
+
| Code generation | Domain-specific skill (DDD, microservices, design-patterns) |
|
|
68
|
+
| Migration planning | Skill with Mode 3 (clean-code-reviewer, domain-driven-design, microservices-patterns) |
|
|
69
|
+
| System design | `system-design-interview` + optional `microservices-patterns` |
|
|
70
|
+
| Learning | Language-specific learning skill (kotlin-in-action) or domain skill |
|
|
71
|
+
|
|
72
|
+
## Anti-Trigger Rules
|
|
73
|
+
|
|
74
|
+
Never route to these skills if:
|
|
75
|
+
|
|
76
|
+
| Skill | Don't route if... |
|
|
77
|
+
|-------|------------------|
|
|
78
|
+
| `domain-driven-design` | Simple CRUD, no complex domain, < 3 entity types |
|
|
79
|
+
| `microservices-patterns` | Single service, no decomposition intent |
|
|
80
|
+
| `lean-startup` | Pure technical code — this is a strategy skill only |
|
|
81
|
+
| `effective-java` | Code is not Java |
|
|
82
|
+
| `effective-kotlin` | Code is not Kotlin |
|
|
83
|
+
| `effective-python` | Code is not Python |
|
|
84
|
+
| `using-asyncio-python` | Code is not async Python |
|
|
85
|
+
| `web-scraping-python` | Not web scraping |
|
|
86
|
+
| `refactoring-ui` | No UI component |
|
|
87
|
+
| `storytelling-with-data` | No visualization |
|
|
88
|
+
| `animation-at-work` | No animation/motion concern |
|
|
89
|
+
| `system-design-interview` | Code-level concern, not system-level |
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Skill Catalog
|
|
2
|
+
|
|
3
|
+
All 19 skills in the `@booklib/skills` library with routing metadata.
|
|
4
|
+
|
|
5
|
+
## animation-at-work
|
|
6
|
+
- **Source:** *Animation at Work* by Rachel Nabors
|
|
7
|
+
- **Domain:** Web animation, UI motion design
|
|
8
|
+
- **Language:** CSS, JavaScript, any frontend
|
|
9
|
+
- **Trigger keywords:** "animation", "motion", "transition", "keyframe", "easing", "12 principles of animation", "web animation", "CSS animation", "performance of animation"
|
|
10
|
+
- **Anti-triggers:** Backend code, data processing, non-visual concerns
|
|
11
|
+
- **Works well with:** refactoring-ui (visual design context)
|
|
12
|
+
- **Conflicts with:** None (niche domain)
|
|
13
|
+
|
|
14
|
+
## clean-code-reviewer
|
|
15
|
+
- **Source:** *Clean Code* by Robert C. Martin
|
|
16
|
+
- **Domain:** Code quality, readability, maintainability
|
|
17
|
+
- **Language:** Language-agnostic (Java, Python, Kotlin, JavaScript examples used)
|
|
18
|
+
- **Trigger keywords:** "review my code", "code quality", "readable", "clean up", "refactor", "naming", "functions", "comments", "smells"
|
|
19
|
+
- **Anti-triggers:** Architecture design (too high-level), language-specific idioms (use language-specific skill instead)
|
|
20
|
+
- **Works well with:** effective-java, effective-python, effective-kotlin (clean code first, then language idioms)
|
|
21
|
+
- **Conflicts with:** domain-driven-design (Clean Code's "small functions" vs DDD's "rich models" — clean code wins for code review, DDD wins for model design)
|
|
22
|
+
|
|
23
|
+
## data-intensive-patterns
|
|
24
|
+
- **Source:** *Designing Data-Intensive Applications* by Martin Kleppmann
|
|
25
|
+
- **Domain:** Storage engines, replication, partitioning, distributed systems, transactions, consistency
|
|
26
|
+
- **Language:** Language-agnostic (systems-level)
|
|
27
|
+
- **Trigger keywords:** "replication", "partitioning", "consistency", "CAP theorem", "event sourcing internals", "storage engine", "LSM tree", "B-tree", "distributed transactions", "ACID", "BASE", "linearizability"
|
|
28
|
+
- **Anti-triggers:** Application-level code quality, UI, domain modeling
|
|
29
|
+
- **Works well with:** system-design-interview (data layer + high-level architecture)
|
|
30
|
+
- **Conflicts with:** system-design-interview (data-intensive-patterns is deeper/lower-level; use it for internals, system-design-interview for high-level)
|
|
31
|
+
|
|
32
|
+
## data-pipelines
|
|
33
|
+
- **Source:** *Data Pipelines Pocket Reference* by James Densmore
|
|
34
|
+
- **Domain:** Data ingestion, ETL, streaming, pipeline orchestration
|
|
35
|
+
- **Language:** Python, SQL, any data engineering stack
|
|
36
|
+
- **Trigger keywords:** "data pipeline", "ETL", "ELT", "ingestion", "Airflow", "dbt", "Spark", "streaming pipeline", "batch processing", "data warehouse", "orchestration"
|
|
37
|
+
- **Anti-triggers:** Application code unrelated to data movement, real-time microservices
|
|
38
|
+
- **Works well with:** data-intensive-patterns (pipeline + storage), effective-python (Python data code)
|
|
39
|
+
- **Conflicts with:** microservices-patterns (pipeline orchestration ≠ service decomposition)
|
|
40
|
+
|
|
41
|
+
## design-patterns
|
|
42
|
+
- **Source:** *Head First Design Patterns* by Freeman & Robson (GoF patterns)
|
|
43
|
+
- **Domain:** Object-oriented design patterns (creational, structural, behavioral)
|
|
44
|
+
- **Language:** Java primarily, but pattern-agnostic
|
|
45
|
+
- **Trigger keywords:** "design pattern", "factory", "singleton", "observer", "strategy", "decorator", "facade", "command", "template method", "composite", "adapter", "proxy", "iterator", "state"
|
|
46
|
+
- **Anti-triggers:** Functional programming (patterns don't apply the same way), microservices decomposition
|
|
47
|
+
- **Works well with:** clean-code-reviewer (patterns + readability), effective-java (Java idioms + patterns)
|
|
48
|
+
- **Conflicts with:** domain-driven-design (GoF patterns are structural; DDD patterns are domain-driven — use DDD for domain modeling, GoF for implementation structure)
|
|
49
|
+
|
|
50
|
+
## domain-driven-design
|
|
51
|
+
- **Source:** *Domain-Driven Design* by Eric Evans
|
|
52
|
+
- **Domain:** Domain modeling, tactical patterns (Entities, Value Objects, Aggregates, Repositories), strategic patterns (Bounded Contexts, Context Maps, ACL)
|
|
53
|
+
- **Language:** Language-agnostic (OO languages)
|
|
54
|
+
- **Trigger keywords:** "DDD", "domain model", "aggregate", "value object", "bounded context", "ubiquitous language", "repository pattern", "domain service", "anticorruption layer", "entity", "anemic domain model", "primitive obsession"
|
|
55
|
+
- **Anti-triggers:** Simple CRUD without domain complexity, microservices infrastructure concerns, code quality review
|
|
56
|
+
- **Works well with:** microservices-patterns (domain model + service boundaries), clean-code-reviewer (model + code quality)
|
|
57
|
+
- **Conflicts with:** clean-code-reviewer (rich models vs small functions — DDD wins for model design; clean code wins for code review)
|
|
58
|
+
|
|
59
|
+
## effective-java
|
|
60
|
+
- **Source:** *Effective Java* (3rd Edition) by Joshua Bloch
|
|
61
|
+
- **Domain:** Java best practices and idioms
|
|
62
|
+
- **Language:** Java only
|
|
63
|
+
- **Trigger keywords:** "effective java", "java best practices", "generics", "enums", "lambdas", "streams", "builders", "serialization", "java concurrency", "checked exceptions", "java item"
|
|
64
|
+
- **Anti-triggers:** Non-Java code, architecture concerns, domain modeling
|
|
65
|
+
- **Works well with:** clean-code-reviewer (Java idioms + code quality), design-patterns (Java implementation of patterns)
|
|
66
|
+
- **Conflicts with:** clean-code-reviewer (both review Java but from different angles — use effective-java for Java-specific items, clean-code-reviewer for general readability)
|
|
67
|
+
|
|
68
|
+
## effective-kotlin
|
|
69
|
+
- **Source:** *Effective Kotlin* (2nd Edition) by Marcin Moskała
|
|
70
|
+
- **Domain:** Kotlin best practices, safety, readability
|
|
71
|
+
- **Language:** Kotlin only
|
|
72
|
+
- **Trigger keywords:** "effective kotlin", "kotlin best practices", "kotlin safety", "null safety", "extension functions best practices", "kotlin idioms", "kotlin item"
|
|
73
|
+
- **Anti-triggers:** Non-Kotlin code, architecture concerns
|
|
74
|
+
- **Works well with:** kotlin-in-action (best practices + language features), clean-code-reviewer (Kotlin idioms + readability)
|
|
75
|
+
- **Conflicts with:** kotlin-in-action (effective-kotlin for best practices; kotlin-in-action for language learning — if user knows Kotlin and wants advice, use effective-kotlin)
|
|
76
|
+
|
|
77
|
+
## effective-typescript
|
|
78
|
+
- **Source:** *Effective TypeScript* by Dan Vanderkam
|
|
79
|
+
- **Domain:** TypeScript best practices, type system, type design, any, migration
|
|
80
|
+
- **Language:** TypeScript only
|
|
81
|
+
- **Trigger keywords:** "effective typescript", "typescript best practices", "type safety", "any type", "type assertions", "type design", "strict mode", "typescript review", "migrate to typescript", "unknown vs any", "type declarations", "tagged union", "branded types", "typescript item"
|
|
82
|
+
- **Anti-triggers:** Non-TypeScript code, plain JavaScript without types, architecture concerns
|
|
83
|
+
- **Works well with:** clean-code-reviewer (TypeScript idioms + readability), design-patterns (type-safe pattern implementations)
|
|
84
|
+
- **Conflicts with:** clean-code-reviewer (effective-typescript wins for TypeScript-specific type system concerns; clean-code-reviewer for general readability)
|
|
85
|
+
|
|
86
|
+
## programming-with-rust
|
|
87
|
+
- **Source:** *Programming with Rust* by Donis Marshall
|
|
88
|
+
- **Domain:** Rust language, ownership, borrowing, lifetimes, error handling, traits, concurrency
|
|
89
|
+
- **Language:** Rust only
|
|
90
|
+
- **Trigger keywords:** "rust", "ownership", "borrow checker", "lifetimes", "Result", "Option", "traits", "fearless concurrency", "cargo", "crate", "unwrap", "move semantics", "Arc", "Mutex", "pattern matching rust", ".rs"
|
|
91
|
+
- **Anti-triggers:** Non-Rust code, architecture concerns, domain modeling
|
|
92
|
+
- **Works well with:** clean-code-reviewer (Rust idioms + readability), design-patterns (Rust implementation of patterns)
|
|
93
|
+
- **Conflicts with:** clean-code-reviewer (programming-with-rust wins for Rust-specific concerns like ownership, lifetimes, and the borrow checker)
|
|
94
|
+
|
|
95
|
+
## effective-python
|
|
96
|
+
- **Source:** *Effective Python* (2nd Edition) by Brett Slatkin
|
|
97
|
+
- **Domain:** Python best practices, Pythonic idioms
|
|
98
|
+
- **Language:** Python only
|
|
99
|
+
- **Trigger keywords:** "effective python", "pythonic", "python best practices", "python idioms", "comprehensions", "generators", "decorators", "metaclasses", "python item"
|
|
100
|
+
- **Anti-triggers:** Non-Python code, async Python (use using-asyncio-python instead)
|
|
101
|
+
- **Works well with:** clean-code-reviewer (Pythonic + readable), using-asyncio-python (general Python + async)
|
|
102
|
+
- **Conflicts with:** using-asyncio-python (using-asyncio-python wins for async topics)
|
|
103
|
+
|
|
104
|
+
## kotlin-in-action
|
|
105
|
+
- **Source:** *Kotlin in Action* (2nd Edition)
|
|
106
|
+
- **Domain:** Kotlin language features, learning Kotlin
|
|
107
|
+
- **Language:** Kotlin only
|
|
108
|
+
- **Trigger keywords:** "kotlin in action", "learn kotlin", "kotlin coroutines", "kotlin lambdas", "kotlin classes", "kotlin functions", "kotlin nullability", "how does kotlin"
|
|
109
|
+
- **Anti-triggers:** Best practices advice (use effective-kotlin), non-Kotlin code
|
|
110
|
+
- **Works well with:** effective-kotlin (learning + best practices)
|
|
111
|
+
- **Conflicts with:** effective-kotlin (kotlin-in-action for learning features; effective-kotlin for best practice advice)
|
|
112
|
+
|
|
113
|
+
## lean-startup
|
|
114
|
+
- **Source:** *The Lean Startup* by Eric Ries
|
|
115
|
+
- **Domain:** Startup strategy, MVP, validated learning, Build-Measure-Learn
|
|
116
|
+
- **Language:** Not applicable (strategy skill)
|
|
117
|
+
- **Trigger keywords:** "lean startup", "MVP", "validated learning", "pivot", "build-measure-learn", "product market fit", "hypothesis", "experiment", "runway"
|
|
118
|
+
- **Anti-triggers:** Technical code review, architecture, any pure engineering concern
|
|
119
|
+
- **Works well with:** None (strategy domain, not engineering)
|
|
120
|
+
- **Conflicts with:** All technical skills (don't apply to code)
|
|
121
|
+
|
|
122
|
+
## microservices-patterns
|
|
123
|
+
- **Source:** *Microservices Patterns* by Chris Richardson
|
|
124
|
+
- **Domain:** Microservices architecture, sagas, CQRS, API gateways, event sourcing
|
|
125
|
+
- **Language:** Language-agnostic (Java Spring Boot examples)
|
|
126
|
+
- **Trigger keywords:** "microservice", "saga", "CQRS", "event sourcing", "API gateway", "service mesh", "decompose monolith", "circuit breaker", "distributed transaction", "choreography", "orchestration"
|
|
127
|
+
- **Anti-triggers:** Monolith-only code with no decomposition intent, pure domain modeling without service concerns
|
|
128
|
+
- **Works well with:** domain-driven-design (service boundaries + domain model), system-design-interview (microservices + scale)
|
|
129
|
+
- **Conflicts with:** domain-driven-design (microservices-patterns for service decomposition; DDD for domain model — apply both for new services)
|
|
130
|
+
|
|
131
|
+
## refactoring-ui
|
|
132
|
+
- **Source:** *Refactoring UI* by Adam Wathan & Steve Schoger
|
|
133
|
+
- **Domain:** UI design, visual hierarchy, typography, color, layout, spacing
|
|
134
|
+
- **Language:** CSS, HTML, any frontend
|
|
135
|
+
- **Trigger keywords:** "UI design", "visual hierarchy", "typography", "color palette", "spacing", "layout", "design system", "refactor UI", "looks bad", "UI review"
|
|
136
|
+
- **Anti-triggers:** Backend code, APIs, data processing, animation (use animation-at-work)
|
|
137
|
+
- **Works well with:** animation-at-work (UI design + motion)
|
|
138
|
+
- **Conflicts with:** animation-at-work (refactoring-ui for static design; animation-at-work for motion — they complement each other)
|
|
139
|
+
|
|
140
|
+
## storytelling-with-data
|
|
141
|
+
- **Source:** *Storytelling with Data* by Cole Nussbaumer Knaflic
|
|
142
|
+
- **Domain:** Data visualization, charts, narrative structure
|
|
143
|
+
- **Language:** Not applicable (visualization skill)
|
|
144
|
+
- **Trigger keywords:** "data visualization", "chart", "graph", "dashboard", "storytelling", "declutter", "visual", "bar chart", "line chart", "scatter plot", "pie chart"
|
|
145
|
+
- **Anti-triggers:** Code quality, backend processing, no visual component
|
|
146
|
+
- **Works well with:** data-pipelines (pipeline data + visualization)
|
|
147
|
+
- **Conflicts with:** None (niche visual domain)
|
|
148
|
+
|
|
149
|
+
## system-design-interview
|
|
150
|
+
- **Source:** *System Design Interview* by Alex Xu
|
|
151
|
+
- **Domain:** High-level system architecture, scalability, estimation, real-world system designs
|
|
152
|
+
- **Language:** Language-agnostic
|
|
153
|
+
- **Trigger keywords:** "system design", "scale", "scalability", "back of envelope", "rate limiting", "CDN", "load balancer", "cache", "sharding", "high availability", "design YouTube", "design Twitter", "design a URL shortener"
|
|
154
|
+
- **Anti-triggers:** Code-level review, domain modeling, specific language idioms
|
|
155
|
+
- **Works well with:** data-intensive-patterns (high-level + storage internals), microservices-patterns (system design + service architecture)
|
|
156
|
+
- **Conflicts with:** data-intensive-patterns (system-design-interview for high-level; data-intensive-patterns for storage internals)
|
|
157
|
+
|
|
158
|
+
## using-asyncio-python
|
|
159
|
+
- **Source:** *Using Asyncio in Python* by Caleb Hattingh
|
|
160
|
+
- **Domain:** Python asyncio, coroutines, event loop, async patterns
|
|
161
|
+
- **Language:** Python only
|
|
162
|
+
- **Trigger keywords:** "asyncio", "async def", "await", "coroutine", "event loop", "aiohttp", "async Python", "concurrent Python", "Python concurrency"
|
|
163
|
+
- **Anti-triggers:** Non-async Python, non-Python code
|
|
164
|
+
- **Works well with:** effective-python (async + general Python best practices)
|
|
165
|
+
- **Conflicts with:** effective-python (using-asyncio-python wins for any async topic)
|
|
166
|
+
|
|
167
|
+
## web-scraping-python
|
|
168
|
+
- **Source:** *Web Scraping with Python* by Ryan Mitchell
|
|
169
|
+
- **Domain:** Web scraping, BeautifulSoup, Scrapy, data extraction
|
|
170
|
+
- **Language:** Python only
|
|
171
|
+
- **Trigger keywords:** "web scraping", "BeautifulSoup", "Scrapy", "requests", "crawl", "parse HTML", "selenium scraping", "extract data from website"
|
|
172
|
+
- **Anti-triggers:** Non-scraping Python, general Python best practices
|
|
173
|
+
- **Works well with:** effective-python (scraping + Python best practices), data-pipelines (scraping + ingestion)
|
|
174
|
+
- **Conflicts with:** None (niche domain)
|