@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,224 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
setup_detekt.py - Set up Detekt with Kotlin-in-Action aligned rules.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
python setup_detekt.py [--output-dir ./]
|
|
7
|
+
|
|
8
|
+
Generates:
|
|
9
|
+
detekt.yml - Detekt config with rules mapped to Kotlin in Action chapters
|
|
10
|
+
run_detekt.sh - Shell script to run Detekt with this config
|
|
11
|
+
|
|
12
|
+
Each rule includes a comment referencing the relevant chapter from
|
|
13
|
+
"Kotlin in Action" by Dmitry Jemerov and Svetlana Isakova.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import pathlib
|
|
18
|
+
import stat
|
|
19
|
+
|
|
20
|
+
DETEKT_YML = """\
|
|
21
|
+
# detekt.yml
|
|
22
|
+
# Detekt configuration aligned with "Kotlin in Action" by Jemerov & Isakova.
|
|
23
|
+
# Each rule references the chapter that motivates it.
|
|
24
|
+
|
|
25
|
+
build:
|
|
26
|
+
maxIssues: 0
|
|
27
|
+
excludeCorrectable: false
|
|
28
|
+
|
|
29
|
+
config:
|
|
30
|
+
validation: true
|
|
31
|
+
warningsAsErrors: false
|
|
32
|
+
|
|
33
|
+
complexity:
|
|
34
|
+
active: true
|
|
35
|
+
|
|
36
|
+
# Chapter 5 - Lambdas: keep lambdas and functions concise and readable.
|
|
37
|
+
LongMethod:
|
|
38
|
+
active: true
|
|
39
|
+
threshold: 20
|
|
40
|
+
|
|
41
|
+
# Chapter 3 - Functions: prefer functions with few, well-named parameters.
|
|
42
|
+
# Many parameters suggest the need for a data class or builder pattern.
|
|
43
|
+
LongParameterList:
|
|
44
|
+
active: true
|
|
45
|
+
functionThreshold: 4
|
|
46
|
+
constructorThreshold: 6
|
|
47
|
+
ignoreDefaultParameters: true
|
|
48
|
+
|
|
49
|
+
# Chapter 10 - Higher-order functions: avoid deep nesting; flatten with
|
|
50
|
+
# higher-order functions (map, filter, let, run) instead.
|
|
51
|
+
NestedBlockDepth:
|
|
52
|
+
active: true
|
|
53
|
+
threshold: 3
|
|
54
|
+
|
|
55
|
+
# Chapter 4 - Classes: classes should be focused and not overly complex.
|
|
56
|
+
TooManyFunctions:
|
|
57
|
+
active: true
|
|
58
|
+
thresholdInFiles: 20
|
|
59
|
+
thresholdInClasses: 15
|
|
60
|
+
thresholdInInterfaces: 10
|
|
61
|
+
thresholdInObjects: 10
|
|
62
|
+
thresholdInEnums: 5
|
|
63
|
+
|
|
64
|
+
naming:
|
|
65
|
+
active: true
|
|
66
|
+
|
|
67
|
+
# Chapter 3 - Functions: Kotlin convention is camelCase for function names.
|
|
68
|
+
FunctionNaming:
|
|
69
|
+
active: true
|
|
70
|
+
functionPattern: '[a-z][a-zA-Z0-9]*'
|
|
71
|
+
excludes: ['**/test/**']
|
|
72
|
+
|
|
73
|
+
# Chapter 2 - Basics: variables follow camelCase; properties are idiomatic Kotlin.
|
|
74
|
+
VariableNaming:
|
|
75
|
+
active: true
|
|
76
|
+
variablePattern: '[a-z][a-zA-Z0-9]*'
|
|
77
|
+
privateVariablePattern: '(_)?[a-z][a-zA-Z0-9]*'
|
|
78
|
+
|
|
79
|
+
# Chapter 4 - Classes: class names are PascalCase per Kotlin convention.
|
|
80
|
+
ClassNaming:
|
|
81
|
+
active: true
|
|
82
|
+
classPattern: '[A-Z][a-zA-Z0-9]*'
|
|
83
|
+
|
|
84
|
+
# Chapter 8 - Generics: type parameter names should be single uppercase letters
|
|
85
|
+
# or descriptive PascalCase names.
|
|
86
|
+
TypeParameterNaming:
|
|
87
|
+
active: true
|
|
88
|
+
typeParameterPattern: '[A-Z][A-Za-z]*'
|
|
89
|
+
|
|
90
|
+
style:
|
|
91
|
+
active: true
|
|
92
|
+
|
|
93
|
+
# Chapter 4 - Classes, Objects, Interfaces: abstract classes without abstract
|
|
94
|
+
# members should be interfaces or open classes instead.
|
|
95
|
+
UnnecessaryAbstractClass:
|
|
96
|
+
active: true
|
|
97
|
+
|
|
98
|
+
# Chapter 3 - Functions: Unit return type is implicit; declaring it is redundant.
|
|
99
|
+
OptionalUnit:
|
|
100
|
+
active: true
|
|
101
|
+
|
|
102
|
+
# Chapter 2 - Basics: val properties that can be const should be const
|
|
103
|
+
# for compile-time optimisation.
|
|
104
|
+
MayBeConst:
|
|
105
|
+
active: true
|
|
106
|
+
|
|
107
|
+
# Chapter 4 - Objects: use object declarations instead of classes with only
|
|
108
|
+
# static members.
|
|
109
|
+
UseDataClass:
|
|
110
|
+
active: true
|
|
111
|
+
allowVars: false
|
|
112
|
+
|
|
113
|
+
# Chapter 11 - DSL: trailing lambdas should be outside parentheses per convention.
|
|
114
|
+
UnnecessaryParentheses:
|
|
115
|
+
active: true
|
|
116
|
+
|
|
117
|
+
potential-bugs:
|
|
118
|
+
active: true
|
|
119
|
+
|
|
120
|
+
# Chapter 6 - Null Safety: lateinit signals deferred initialisation, which
|
|
121
|
+
# makes nullability guarantees harder to reason about. Prefer constructor injection.
|
|
122
|
+
LateinitUsage:
|
|
123
|
+
active: true
|
|
124
|
+
excludes: ['**/test/**']
|
|
125
|
+
ignoreOnClassesPattern: ''
|
|
126
|
+
|
|
127
|
+
# Chapter 6 - Null Safety: the !! operator bypasses null safety and will
|
|
128
|
+
# throw NPE at runtime. Use safe calls (?.) or Elvis operator (?:) instead.
|
|
129
|
+
UnsafeCallOnNullableType:
|
|
130
|
+
active: true
|
|
131
|
+
excludes: ['**/test/**']
|
|
132
|
+
|
|
133
|
+
# Chapter 6 - Null Safety: explicit null checks with == null should be
|
|
134
|
+
# replaced with safe-call or let idioms.
|
|
135
|
+
NullableToStringCall:
|
|
136
|
+
active: true
|
|
137
|
+
|
|
138
|
+
coroutines:
|
|
139
|
+
active: true
|
|
140
|
+
|
|
141
|
+
# Chapter 12 (Appendix) - Coroutines: GlobalScope couples coroutines to
|
|
142
|
+
# application lifetime and makes cancellation impossible. Use structured
|
|
143
|
+
# concurrency with a scoped CoroutineScope instead.
|
|
144
|
+
GlobalCoroutineUsage:
|
|
145
|
+
active: true
|
|
146
|
+
|
|
147
|
+
# Chapter 12 - Coroutines: suspend modifier on a function that contains no
|
|
148
|
+
# suspension points is misleading and adds unnecessary overhead.
|
|
149
|
+
RedundantSuspendModifier:
|
|
150
|
+
active: true
|
|
151
|
+
|
|
152
|
+
# Chapter 12 - Coroutines: use withContext for blocking calls rather than
|
|
153
|
+
# running them on the default dispatcher.
|
|
154
|
+
BlockingMethodInNonBlockingContext:
|
|
155
|
+
active: true
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
RUN_SCRIPT = """\
|
|
159
|
+
#!/usr/bin/env bash
|
|
160
|
+
# run_detekt.sh
|
|
161
|
+
# Runs Detekt with the Kotlin-in-Action aligned configuration.
|
|
162
|
+
# Generated by setup_detekt.py
|
|
163
|
+
|
|
164
|
+
set -euo pipefail
|
|
165
|
+
|
|
166
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
167
|
+
CONFIG="${SCRIPT_DIR}/detekt.yml"
|
|
168
|
+
SRC_DIR="${1:-src}"
|
|
169
|
+
|
|
170
|
+
if ! command -v detekt &>/dev/null && ! command -v detekt-cli &>/dev/null; then
|
|
171
|
+
echo "ERROR: detekt not found on PATH."
|
|
172
|
+
echo ""
|
|
173
|
+
echo "Install options:"
|
|
174
|
+
echo " brew install detekt # macOS"
|
|
175
|
+
echo " sdk install detekt # SDKMAN"
|
|
176
|
+
echo " # Or run via Gradle plugin - add to build.gradle.kts:"
|
|
177
|
+
echo " # plugins { id(\\"io.gitlab.arturbosch.detekt\\") version \\"1.23.5\\" }"
|
|
178
|
+
exit 1
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
CMD="detekt"
|
|
182
|
+
command -v detekt-cli &>/dev/null && CMD="detekt-cli"
|
|
183
|
+
|
|
184
|
+
echo "Running Detekt on $SRC_DIR ..."
|
|
185
|
+
$CMD --config "$CONFIG" --input "$SRC_DIR"
|
|
186
|
+
echo "Done."
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def write_file(path: pathlib.Path, content: str, executable: bool = False) -> None:
|
|
191
|
+
path.write_text(content, encoding="utf-8")
|
|
192
|
+
if executable:
|
|
193
|
+
path.chmod(path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
194
|
+
print(f"Wrote: {path}")
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def main() -> None:
|
|
198
|
+
parser = argparse.ArgumentParser(
|
|
199
|
+
description="Set up Detekt with Kotlin-in-Action aligned rules."
|
|
200
|
+
)
|
|
201
|
+
parser.add_argument(
|
|
202
|
+
"--output-dir",
|
|
203
|
+
default=".",
|
|
204
|
+
help="Directory to write config files (default: ./)",
|
|
205
|
+
)
|
|
206
|
+
args = parser.parse_args()
|
|
207
|
+
|
|
208
|
+
output_dir = pathlib.Path(args.output_dir).resolve()
|
|
209
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
210
|
+
|
|
211
|
+
write_file(output_dir / "detekt.yml", DETEKT_YML)
|
|
212
|
+
write_file(output_dir / "run_detekt.sh", RUN_SCRIPT, executable=True)
|
|
213
|
+
|
|
214
|
+
print()
|
|
215
|
+
print("Setup complete.")
|
|
216
|
+
print(f" Config : {output_dir / 'detekt.yml'}")
|
|
217
|
+
print(f" Runner : {output_dir / 'run_detekt.sh'}")
|
|
218
|
+
print()
|
|
219
|
+
print("Run Detekt:")
|
|
220
|
+
print(f" cd {output_dir} && ./run_detekt.sh [src-dir]")
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
if __name__ == "__main__":
|
|
224
|
+
main()
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-startup
|
|
3
|
+
version: "1.0"
|
|
4
|
+
license: MIT
|
|
5
|
+
tags: [product, strategy, entrepreneurship]
|
|
6
|
+
description: >
|
|
7
|
+
Apply The Lean Startup practices (Eric Ries). Covers Vision (Ch 1-4: Start,
|
|
8
|
+
Define, Learn, Experiment — validated learning, Build-Measure-Learn loop),
|
|
9
|
+
Steer (Ch 5-8: Leap of faith assumptions, MVP testing, innovation accounting,
|
|
10
|
+
pivot or persevere decisions), Accelerate (Ch 9-14: small batches, engines of
|
|
11
|
+
growth — sticky/viral/paid, adaptive organization, Five Whys, innovation
|
|
12
|
+
sandbox, startup within enterprise). Trigger on "lean startup", "MVP",
|
|
13
|
+
"minimum viable product", "validated learning", "pivot", "Build-Measure-Learn",
|
|
14
|
+
"innovation accounting", "product-market fit", "startup strategy",
|
|
15
|
+
"lean methodology", "growth engine", "Five Whys".
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# The Lean Startup Skill
|
|
19
|
+
|
|
20
|
+
You are an expert startup strategy advisor grounded in the 14 chapters from
|
|
21
|
+
*The Lean Startup* (How Today's Entrepreneurs Use Continuous Innovation to
|
|
22
|
+
Create Radically Successful Businesses) by Eric Ries. You help in two modes:
|
|
23
|
+
|
|
24
|
+
1. **Strategy Application** — Apply Lean Startup principles to design experiments, build MVPs, and make pivot/persevere decisions
|
|
25
|
+
2. **Strategy Review** — Analyze existing startup/product strategies against the book's practices and recommend improvements
|
|
26
|
+
|
|
27
|
+
## How to Decide Which Mode
|
|
28
|
+
|
|
29
|
+
- If the user asks to *plan*, *design*, *build*, *launch*, *test*, or *validate* a product/startup idea → **Strategy Application**
|
|
30
|
+
- If the user asks to *review*, *evaluate*, *audit*, *assess*, or *improve* an existing strategy/approach → **Strategy Review**
|
|
31
|
+
- If ambiguous, ask briefly which mode they'd prefer
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Mode 1: Strategy Application
|
|
36
|
+
|
|
37
|
+
When helping design or apply Lean Startup methodology, follow this decision flow:
|
|
38
|
+
|
|
39
|
+
### Step 1 — Understand the Context
|
|
40
|
+
|
|
41
|
+
Ask (or infer from context):
|
|
42
|
+
|
|
43
|
+
- **What stage?** — Idea, pre-MVP, MVP built, post-launch, scaling?
|
|
44
|
+
- **What type?** — New startup, new product in existing company, internal innovation?
|
|
45
|
+
- **What uncertainty?** — Which assumptions are riskiest? What do you know vs. believe?
|
|
46
|
+
- **What resources?** — Team size, budget, timeline constraints?
|
|
47
|
+
|
|
48
|
+
### Step 2 — Apply the Right Practices
|
|
49
|
+
|
|
50
|
+
Read `references/api_reference.md` for the full chapter-by-chapter catalog. Quick decision guide:
|
|
51
|
+
|
|
52
|
+
| Concern | Chapters to Apply |
|
|
53
|
+
|---------|-------------------|
|
|
54
|
+
| Starting a new venture | Ch 1: Entrepreneurship is management; startups need a different kind of management |
|
|
55
|
+
| Defining the startup | Ch 2: Institution, product, conditions of extreme uncertainty — the lean startup definition |
|
|
56
|
+
| Learning what customers want | Ch 3: Validated learning, value vs. waste, empirical evidence over opinions |
|
|
57
|
+
| Running first experiments | Ch 4: Strategic planning through experimentation, Zappos-style MVP tests |
|
|
58
|
+
| Identifying risky assumptions | Ch 5: Leap-of-faith assumptions, value hypothesis, growth hypothesis, genchi gembutsu |
|
|
59
|
+
| Building the first product | Ch 6: MVP types (video, concierge, Wizard of Oz, fake-door/smoke-test), quality in MVP context |
|
|
60
|
+
| Measuring progress | Ch 7: Innovation accounting, actionable vs. vanity metrics, cohort analysis, funnel metrics |
|
|
61
|
+
| Deciding pivot vs. persevere | Ch 8: Pivot catalog (zoom-in, zoom-out, customer segment, platform, etc.), runway as pivots remaining |
|
|
62
|
+
| Optimizing development speed | Ch 9: Small batches, continuous deployment, single-piece flow, IMVU pull model |
|
|
63
|
+
| Scaling sustainably | Ch 10: Engines of growth (sticky, viral, paid), product/market fit, sustainable growth |
|
|
64
|
+
| Building adaptive organizations | Ch 11: Five Whys root cause analysis, proportional investment, adaptive process |
|
|
65
|
+
| Innovating within large companies | Ch 12: Innovation sandbox, internal startup teams, protecting the parent organization |
|
|
66
|
+
| Eliminating waste | Ch 13: Lean manufacturing roots, what waste looks like in startups |
|
|
67
|
+
| Building a movement | Ch 14: Lean Startup as organizational capability, long-term thinking |
|
|
68
|
+
|
|
69
|
+
<framework>
|
|
70
|
+
1. **Entrepreneurs are everywhere** — Any person creating products under conditions of extreme uncertainty is an entrepreneur.
|
|
71
|
+
2. **Entrepreneurship is management** — Startups need management suited to their context, not "just do it".
|
|
72
|
+
3. **Validated learning** — Learn what customers actually want through empirical experiments, not opinions.
|
|
73
|
+
4. **Build-Measure-Learn** — Turn ideas into products, measure customer response, learn whether to pivot or persevere.
|
|
74
|
+
5. **Innovation accounting** — Hold entrepreneurs accountable with metrics that matter, not vanity metrics.
|
|
75
|
+
6. **Test the riskiest assumption first** — Identify and test leap-of-faith assumptions before building more.
|
|
76
|
+
7. **MVP is for learning, not launching** — The MVP tests a hypothesis; it's the fastest way to get through the Build-Measure-Learn loop.
|
|
77
|
+
8. **Actionable metrics over vanity metrics** — Use cohort analysis and split tests, not total signups or page views.
|
|
78
|
+
9. **Pivot or persevere is a structured decision** — Use innovation accounting data to make this call, not gut feeling.
|
|
79
|
+
10. **Sustainable growth comes from engines** — Identify which engine of growth (sticky, viral, paid) drives your business.
|
|
80
|
+
</framework>
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Mode 2: Strategy Review
|
|
85
|
+
|
|
86
|
+
When reviewing startup/product strategies, read `references/review-checklist.md` for the full checklist.
|
|
87
|
+
|
|
88
|
+
### Review Process
|
|
89
|
+
|
|
90
|
+
1. **Vision scan** — Check Ch 1-2: Is the venture operating as a startup? Is the right management approach used?
|
|
91
|
+
2. **Learning scan** — Check Ch 3-4: Is validated learning happening? Are experiments structured?
|
|
92
|
+
3. **Assumption scan** — Check Ch 5-6: Are leap-of-faith assumptions identified? Is the MVP testing them?
|
|
93
|
+
4. **Metrics scan** — Check Ch 7: Are metrics actionable? Is innovation accounting in place?
|
|
94
|
+
5. **Decision scan** — Check Ch 8: Are pivot/persevere decisions structured and data-driven?
|
|
95
|
+
6. **Execution scan** — Check Ch 9-10: Are batches small? Is a growth engine identified?
|
|
96
|
+
7. **Organization scan** — Check Ch 11-12: Is Five Whys used? Is innovation protected?
|
|
97
|
+
|
|
98
|
+
### Review Output Format
|
|
99
|
+
|
|
100
|
+
Structure your review as:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
## Summary
|
|
104
|
+
One paragraph: overall strategy quality, Lean Startup alignment, key strengths and main concerns.
|
|
105
|
+
|
|
106
|
+
## What's Working Well
|
|
107
|
+
For each correctly applied practice:
|
|
108
|
+
- **Practice**: what the strategy does correctly
|
|
109
|
+
- **Book reference**: chapter and concept this exemplifies
|
|
110
|
+
|
|
111
|
+
## Issues Found
|
|
112
|
+
For each genuine issue (omit this section if there are none):
|
|
113
|
+
- **Topic**: chapter and concept
|
|
114
|
+
- **Problem**: what's wrong
|
|
115
|
+
- **Fix**: recommended change
|
|
116
|
+
|
|
117
|
+
## Recommendations
|
|
118
|
+
Priority-ordered from most critical to nice-to-have.
|
|
119
|
+
If the strategy is well-structured, frame suggestions as optional enhancements.
|
|
120
|
+
Each recommendation references the specific chapter/concept.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
<pitfalls>
|
|
124
|
+
- **Building without testing assumptions** → Ch 5: Identify and test leap-of-faith assumptions before building.
|
|
125
|
+
- **Vanity metrics as success indicators** → Ch 7: Replace total signups/pageviews with cohort analysis and actionable metrics.
|
|
126
|
+
- **MVP as "version 1.0"** → Ch 6: MVP is an experiment, not a product launch; it tests a hypothesis.
|
|
127
|
+
- **Theater of success** → Ch 3: Launching features is not learning; measure actual customer behavior.
|
|
128
|
+
- **Premature scaling** → Ch 10: Don't scale before product/market fit; growth engine must be working first.
|
|
129
|
+
- **Not talking to customers** → Ch 5: Genchi gembutsu — go and see for yourself; customer development.
|
|
130
|
+
- **Blaming team instead of process** → Ch 11: Use Five Whys to find root causes.
|
|
131
|
+
- **Confusing efficiency with learning** → Ch 13: In startups, the biggest waste is building something nobody wants.
|
|
132
|
+
</pitfalls>
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
<case_studies>
|
|
137
|
+
**Example 1 — New Startup Idea (Concierge MVP):**
|
|
138
|
+
- Value hypothesis: "Busy parents will use a meal planning tool weekly"
|
|
139
|
+
- Growth hypothesis: "Parents will share meal plans with other parents"
|
|
140
|
+
- Design: Manually create plans for 10 families before building software.
|
|
141
|
+
|
|
142
|
+
**Example 2 — Marketplace (Wizard of Oz MVP):**
|
|
143
|
+
- Design: Manually match first 20 tutor-student pairs behind a basic landing page.
|
|
144
|
+
- Goal: Measure match quality and rebooking rate before automating.
|
|
145
|
+
</case_studies>
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## General Guidelines
|
|
150
|
+
|
|
151
|
+
- **Lean Startup is scientific method for business** — Hypothesize, experiment, measure, learn
|
|
152
|
+
- **Speed of learning is the competitive advantage** — Not speed of building
|
|
153
|
+
- **Every assumption is testable** — Frame assumptions as falsifiable hypotheses
|
|
154
|
+
- **Metrics must be actionable, accessible, and auditable** — The three A's of good metrics
|
|
155
|
+
- **Pivots are not failures** — They are structured course corrections based on learning
|
|
156
|
+
- **The goal is sustainable business, not just product** — Business model validation matters
|
|
157
|
+
- **Calibrate feedback to the quality of the work** — A well-designed experiment deserves explicit praise; do not manufacture issues to appear thorough. If a strategy correctly applies Lean Startup principles, do NOT add "Priority 1" or "Priority 2" labels to minor observations — frame them as optional enhancements or leave the Issues section empty.
|
|
158
|
+
- **Praise correct application explicitly** — When a hypothesis is falsifiable, say so. When a riskiest assumption is named separately (even if worded differently than you would choose), praise the identification. When an MVP type is correctly chosen, say so. When pivot/persevere criteria are pre-defined, say so. When metrics have specific numerical thresholds, praise the quantification. Naming what is correct is as important as naming what is wrong.
|
|
159
|
+
- For deeper practice details, read `references/api_reference.md` before applying strategy.
|
|
160
|
+
- For review checklists, read `references/review-checklist.md` before reviewing strategy.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"evals": [
|
|
3
|
+
{
|
|
4
|
+
"id": "eval-01-six-month-build-before-user-testing",
|
|
5
|
+
"prompt": "Review this product development plan:\n\n```\nProduct: TaskFlow — AI-powered project management for remote teams\nTeam: 4 engineers, 1 designer, 1 product manager\nTimeline: 6-month build before any user testing\n\nMonth 1-2: Core task management (create, assign, due dates, status)\nMonth 3: AI features (auto-prioritization, workload balancing)\nMonth 4: Integrations (Slack, GitHub, Jira, Google Calendar)\nMonth 5: Mobile apps (iOS and Android)\nMonth 6: Analytics dashboard and reporting\n\nSuccess criteria: Ship to beta users after 6 months\nMarketing plan: Product Hunt launch in month 7\n\nAssumptions we're making:\n- Remote teams struggle with task prioritization\n- AI suggestions will be trusted and acted on\n- Teams are willing to switch from their current PM tool\n- Integration with existing tools is a must-have on day one\n```",
|
|
6
|
+
"expectations": [
|
|
7
|
+
"Identifies the 6-month build before any user testing as a direct violation of the Build-Measure-Learn loop: validated learning cannot happen without users (Ch 3-4: validated learning, experimentation over planning)",
|
|
8
|
+
"Flags the listed assumptions ('remote teams struggle', 'AI suggestions will be trusted', 'willing to switch') as leap-of-faith assumptions that should be tested first, not assumed (Ch 5: identify and test leap-of-faith assumptions before building)",
|
|
9
|
+
"Flags the absence of any hypothesis or success metric beyond 'ship to beta': recommends defining a value hypothesis and growth hypothesis with measurable success criteria (Ch 5: value hypothesis and growth hypothesis)",
|
|
10
|
+
"Flags the absence of an MVP: 6 months of features is not an MVP — it is a v1.0 product launch; recommends identifying the single riskiest assumption and testing it with the minimum viable experiment (Ch 6: MVP is for learning, not launching)",
|
|
11
|
+
"Flags that integrations, mobile apps, and analytics are included before validating whether users even want the core task management and AI features; recommends cutting scope to the riskiest assumption (Ch 6: smallest experiment to test the riskiest assumption)",
|
|
12
|
+
"Flags the absence of innovation accounting: there are no cohort metrics, funnel metrics, or baseline measurements planned (Ch 7: innovation accounting)",
|
|
13
|
+
"Recommends concrete alternatives such as a concierge MVP (manually prioritize tasks for 5 teams for 2 weeks) or a Wizard of Oz test (fake AI powered by a human) to validate the AI trust assumption before building it"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "eval-02-feature-request-without-validated-learning",
|
|
18
|
+
"prompt": "Review this feature request and justification:\n\n```\nFeature Request: Advanced Filtering and Saved Views\n\nSubmitted by: Product Manager\nPriority: High\n\nRequest:\nAdd advanced filtering to the task list — filter by assignee, due date range,\ntag, project, and custom fields. Users should be able to save filter combinations\nas named views (e.g., \"My overdue tasks\", \"Sprint backlog\").\n\nJustification:\n- 3 customers mentioned filtering in support tickets last quarter\n- Our top competitor, Asana, has this feature\n- The engineering team estimates 3 sprints (6 weeks) to build\n- A customer on a discovery call said \"filtering would be great\"\n\nExpected outcome:\nImprove user retention and increase upsell conversion to Pro tier.\n\nApproval requested: Start sprint planning next week\n```",
|
|
19
|
+
"expectations": [
|
|
20
|
+
"Flags that 'customers mentioned in support tickets' and 'a customer said it would be great' are anecdotal, not validated learning — these are opinions, not measured behavior (Ch 3: validated learning requires empirical evidence, not opinions)",
|
|
21
|
+
"Flags competitor benchmarking ('Asana has this feature') as a reason to build without testing whether this feature drives retention or conversion for this specific user base (Ch 5: test your own value hypothesis, not competitors')",
|
|
22
|
+
"Flags that the expected outcome 'improve retention and increase upsell' is stated without a hypothesis, baseline metric, or success threshold; recommends defining a testable hypothesis before committing 6 weeks of engineering (Ch 7: innovation accounting — establish baseline, define success threshold)",
|
|
23
|
+
"Flags no mention of which leap-of-faith assumption is being tested: is the assumption that users can't find what they need, that they churn because of missing filters, or that Pro upsell is blocked by this feature? (Ch 5: identify the specific assumption)",
|
|
24
|
+
"Recommends a smaller experiment to validate before building: add a prominent 'Filter tasks' button that shows a 'Coming soon — join waitlist' modal and measure click rate to quantify demand (Ch 6: smallest experiment to validate the assumption)",
|
|
25
|
+
"Flags the absence of a pivot/persevere decision framework: what happens if the feature ships and retention does not improve? (Ch 8: define pivot/persevere criteria before building)"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "eval-03-well-structured-mvp-experiment",
|
|
30
|
+
"prompt": "Review this product experiment plan:\n\n```\nExperiment: Validate demand for AI-assisted code review summaries\n\nHypothesis:\nWe believe that engineering managers at companies with 10-50 engineers\nspend more than 2 hours per week reading through pull request diffs to\nstay informed. We believe they will pay for an automated daily digest\nthat summarizes what changed, why, and any risks flagged.\n\nRiskiest assumption: Managers will read and act on AI-generated summaries\nrather than skimming or ignoring them.\n\nMVP Design (Wizard of Oz — 3-week test):\n- Recruit 8 engineering managers via LinkedIn outreach\n- Each connects their GitHub repo (OAuth)\n- Every weekday morning, a human analyst (us) reads the day's PRs\n and writes a 200-word summary email manually\n- We send it from a branded email: digest@codebrief.io\n- Participants do not know summaries are human-written\n\nSuccess metrics (measured after 3 weeks):\n- Primary: Open rate >= 70% across all 5 weekday sends\n- Secondary: At least 5 of 8 managers respond to exit survey saying\n they found summaries 'useful' or 'very useful'\n- Conversion signal: At least 3 managers ask 'how do I keep this?'\n\nPivot/persevere criteria:\n- If primary AND secondary metrics are met: build v1 with real AI\n- If only one is met: run a second 2-week test with adjusted format\n- If neither is met: pivot to a different user segment or problem\n\nTimeline: Recruiting this week, experiment runs weeks 2-4, decision week 5\n```",
|
|
31
|
+
"expectations": [
|
|
32
|
+
"Recognizes this is a well-structured Lean Startup experiment and says so explicitly",
|
|
33
|
+
"Praises the falsifiable hypothesis that names a specific user segment, problem, and measurable behavior (Ch 3: validated learning with empirical evidence)",
|
|
34
|
+
"Praises identifying the riskiest assumption ('managers will act on summaries') separately from the general hypothesis — this is the correct application of leap-of-faith assumption identification (Ch 5: leap-of-faith assumptions)",
|
|
35
|
+
"Praises the Wizard of Oz MVP design that tests the value hypothesis without building any AI infrastructure (Ch 6: MVP is for learning, not launching — concierge/Wizard of Oz types)",
|
|
36
|
+
"Praises the quantified success metrics with specific thresholds (70% open rate, 5/8 satisfaction, 3 conversion signals) rather than vague goals (Ch 7: actionable metrics, not vanity metrics)",
|
|
37
|
+
"Praises the explicit pivot/persevere criteria defined before the experiment runs, making the decision data-driven rather than gut-driven (Ch 8: structured pivot/persevere decision)",
|
|
38
|
+
"Praises the tight 5-week timeline keeping the Build-Measure-Learn loop short (Ch 9: small batches, fast learning cycles)",
|
|
39
|
+
"Does NOT manufacture issues to appear thorough; any suggestions are explicitly framed as minor optional improvements"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# After
|
|
2
|
+
|
|
3
|
+
An MVP experiment document that identifies the riskiest assumption, defines the smallest test, specifies actionable metrics, and sets explicit pivot/persevere criteria before any code is written.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
## MVP Experiment: AI Expense Management — Concierge Test
|
|
7
|
+
|
|
8
|
+
### The Big Idea
|
|
9
|
+
SMB finance managers spend 3+ hours per week manually reconciling receipts.
|
|
10
|
+
We believe they will pay for a tool that eliminates that work — but we have
|
|
11
|
+
not yet validated that they will change their workflow to use it.
|
|
12
|
+
|
|
13
|
+
### Leap-of-Faith Assumptions to Test
|
|
14
|
+
|
|
15
|
+
**Value hypothesis (riskiest):**
|
|
16
|
+
> "Finance managers at 10–50 person companies will submit receipts through
|
|
17
|
+
> a new tool at least 3× per week if the categorisation is accurate."
|
|
18
|
+
|
|
19
|
+
**Growth hypothesis (secondary):**
|
|
20
|
+
> "Satisfied users will refer at least one colleague within 30 days."
|
|
21
|
+
|
|
22
|
+
### Why NOT build the full product yet
|
|
23
|
+
Building OCR + AI categorisation + ERP integrations takes 6 months and $400K.
|
|
24
|
+
If users don't form the habit of submitting receipts, none of those features
|
|
25
|
+
matter. We must validate the value hypothesis first.
|
|
26
|
+
|
|
27
|
+
### MVP Design: Concierge (Manual Behind the Scenes)
|
|
28
|
+
|
|
29
|
+
**What users experience:**
|
|
30
|
+
- Sign up form → they receive a dedicated WhatsApp number
|
|
31
|
+
- They photograph receipts and send to WhatsApp
|
|
32
|
+
- We manually categorise and respond with a structured summary within 2 hours
|
|
33
|
+
- Weekly: we email a formatted expense report (manually compiled in Google Sheets)
|
|
34
|
+
|
|
35
|
+
**What we actually build:**
|
|
36
|
+
- Landing page with sign-up form (1 day)
|
|
37
|
+
- WhatsApp Business number (1 hour)
|
|
38
|
+
- Google Sheets report template (2 hours)
|
|
39
|
+
- Total build time: ~2 days
|
|
40
|
+
|
|
41
|
+
**Participants:** 15 finance managers recruited from our network
|
|
42
|
+
|
|
43
|
+
**Duration:** 6 weeks
|
|
44
|
+
|
|
45
|
+
### Innovation Accounting — Metrics
|
|
46
|
+
|
|
47
|
+
| Metric | Baseline | Target (persevere) | Source |
|
|
48
|
+
|--------|----------|--------------------|--------|
|
|
49
|
+
| Weekly receipt submission rate | 0 | ≥ 3 receipts/user/week by week 4 | WhatsApp logs |
|
|
50
|
+
| Categorisation acceptance rate | — | ≥ 85% accepted without correction | User replies |
|
|
51
|
+
| User retention (still active week 6) | — | ≥ 70% of participants | WhatsApp logs |
|
|
52
|
+
| Referral rate | 0 | ≥ 1 referral per 5 users | Sign-up source field |
|
|
53
|
+
| Willingness to pay | 0 | ≥ 60% say "yes" at $29/mo | End-of-pilot survey |
|
|
54
|
+
|
|
55
|
+
**Vanity metrics we will NOT track:** total sign-ups, page views, social shares.
|
|
56
|
+
|
|
57
|
+
### Pivot/Persevere Decision — Week 6 Review
|
|
58
|
+
|
|
59
|
+
**Persevere** (move to automated MVP) if ALL of:
|
|
60
|
+
- Submission rate ≥ 3/week by week 4
|
|
61
|
+
- Retention ≥ 70% at week 6
|
|
62
|
+
- Willingness to pay ≥ 60%
|
|
63
|
+
|
|
64
|
+
**Pivot** (reconsider problem or segment) if ANY of:
|
|
65
|
+
- Submission rate < 1/week by week 3 (habit not forming)
|
|
66
|
+
- Retention < 40% at week 4 (users not finding value)
|
|
67
|
+
|
|
68
|
+
**Pivot options to consider:**
|
|
69
|
+
- Zoom-in: focus only on one vertical (e.g., restaurant industry) where receipt volume is higher
|
|
70
|
+
- Customer segment: target bookkeepers who file for multiple clients, not the SMB themselves
|
|
71
|
+
- Problem: pivot to approval workflows if users engage more with that step than receipt capture
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Key improvements:
|
|
75
|
+
- Leap-of-faith assumptions are named explicitly before any engineering begins — value hypothesis and growth hypothesis are the riskiest bets, not product features (Ch 5: Leap-of-faith assumptions)
|
|
76
|
+
- Concierge MVP — two days of manual work — tests the core habit loop without six months of engineering (Ch 6: MVP is for learning, not launching)
|
|
77
|
+
- Innovation accounting table defines baseline, target, and data source for each metric before the experiment runs (Ch 7: Innovation accounting)
|
|
78
|
+
- All metrics are cohort-based and behavioural ("submission rate", "retention") — vanity metrics like total sign-ups are explicitly excluded (Ch 7: Actionable vs. vanity metrics)
|
|
79
|
+
- Explicit pivot/persevere decision criteria with a named decision date eliminate gut-feel delays (Ch 8: Pivot or persevere)
|
|
80
|
+
- Pivot catalog is pre-populated — the team has thought through options in advance rather than scrambling at the decision point (Ch 8: Pivot types)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Before
|
|
2
|
+
|
|
3
|
+
A product specification for a 6-month build with no validated learning step, no hypothesis to test, and no criteria for deciding whether to continue.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
## Product Spec: AI-Powered Expense Management Platform
|
|
7
|
+
|
|
8
|
+
### Overview
|
|
9
|
+
We will build a comprehensive AI-powered expense management platform for SMBs.
|
|
10
|
+
The platform will replace manual receipt tracking with automatic categorization,
|
|
11
|
+
OCR scanning, policy enforcement, and CFO-level reporting.
|
|
12
|
+
|
|
13
|
+
### Features (all required for launch)
|
|
14
|
+
- Mobile app (iOS + Android) with camera OCR for receipt scanning
|
|
15
|
+
- AI categorization engine trained on 50k expense categories
|
|
16
|
+
- Multi-currency support with live FX rates
|
|
17
|
+
- Approval workflow engine with configurable multi-level sign-off
|
|
18
|
+
- Integration with QuickBooks, Xero, NetSuite, SAP
|
|
19
|
+
- Admin dashboard with 25 pre-built CFO reports
|
|
20
|
+
- SSO/SAML integration
|
|
21
|
+
- Audit log and compliance export (SOC 2 ready)
|
|
22
|
+
|
|
23
|
+
### Timeline
|
|
24
|
+
- Month 1-2: Backend API + database schema
|
|
25
|
+
- Month 3-4: Mobile app development
|
|
26
|
+
- Month 5: Integrations + admin dashboard
|
|
27
|
+
- Month 6: QA, security review, launch
|
|
28
|
+
|
|
29
|
+
### Success metric
|
|
30
|
+
5,000 paying customers within 3 months of launch.
|
|
31
|
+
|
|
32
|
+
### Next step
|
|
33
|
+
Kick off engineering sprint planning on Monday.
|
|
34
|
+
```
|