solokit 0.1.1__py3-none-any.whl
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.
- solokit/__init__.py +10 -0
- solokit/__version__.py +3 -0
- solokit/cli.py +374 -0
- solokit/core/__init__.py +1 -0
- solokit/core/cache.py +102 -0
- solokit/core/command_runner.py +278 -0
- solokit/core/config.py +453 -0
- solokit/core/config_validator.py +204 -0
- solokit/core/constants.py +291 -0
- solokit/core/error_formatter.py +279 -0
- solokit/core/error_handlers.py +346 -0
- solokit/core/exceptions.py +1567 -0
- solokit/core/file_ops.py +309 -0
- solokit/core/logging_config.py +166 -0
- solokit/core/output.py +99 -0
- solokit/core/performance.py +57 -0
- solokit/core/protocols.py +141 -0
- solokit/core/types.py +312 -0
- solokit/deployment/__init__.py +1 -0
- solokit/deployment/executor.py +411 -0
- solokit/git/__init__.py +1 -0
- solokit/git/integration.py +619 -0
- solokit/init/__init__.py +41 -0
- solokit/init/claude_commands_installer.py +87 -0
- solokit/init/dependency_installer.py +313 -0
- solokit/init/docs_structure.py +90 -0
- solokit/init/env_generator.py +160 -0
- solokit/init/environment_validator.py +334 -0
- solokit/init/git_hooks_installer.py +71 -0
- solokit/init/git_setup.py +188 -0
- solokit/init/gitignore_updater.py +195 -0
- solokit/init/initial_commit.py +145 -0
- solokit/init/initial_scans.py +109 -0
- solokit/init/orchestrator.py +246 -0
- solokit/init/readme_generator.py +207 -0
- solokit/init/session_structure.py +239 -0
- solokit/init/template_installer.py +424 -0
- solokit/learning/__init__.py +1 -0
- solokit/learning/archiver.py +115 -0
- solokit/learning/categorizer.py +126 -0
- solokit/learning/curator.py +428 -0
- solokit/learning/extractor.py +352 -0
- solokit/learning/reporter.py +351 -0
- solokit/learning/repository.py +254 -0
- solokit/learning/similarity.py +342 -0
- solokit/learning/validator.py +144 -0
- solokit/project/__init__.py +1 -0
- solokit/project/init.py +1162 -0
- solokit/project/stack.py +436 -0
- solokit/project/sync_plugin.py +438 -0
- solokit/project/tree.py +375 -0
- solokit/quality/__init__.py +1 -0
- solokit/quality/api_validator.py +424 -0
- solokit/quality/checkers/__init__.py +25 -0
- solokit/quality/checkers/base.py +114 -0
- solokit/quality/checkers/context7.py +221 -0
- solokit/quality/checkers/custom.py +162 -0
- solokit/quality/checkers/deployment.py +323 -0
- solokit/quality/checkers/documentation.py +179 -0
- solokit/quality/checkers/formatting.py +161 -0
- solokit/quality/checkers/integration.py +394 -0
- solokit/quality/checkers/linting.py +159 -0
- solokit/quality/checkers/security.py +261 -0
- solokit/quality/checkers/spec_completeness.py +127 -0
- solokit/quality/checkers/tests.py +184 -0
- solokit/quality/env_validator.py +306 -0
- solokit/quality/gates.py +655 -0
- solokit/quality/reporters/__init__.py +10 -0
- solokit/quality/reporters/base.py +25 -0
- solokit/quality/reporters/console.py +98 -0
- solokit/quality/reporters/json_reporter.py +34 -0
- solokit/quality/results.py +98 -0
- solokit/session/__init__.py +1 -0
- solokit/session/briefing/__init__.py +245 -0
- solokit/session/briefing/documentation_loader.py +53 -0
- solokit/session/briefing/formatter.py +476 -0
- solokit/session/briefing/git_context.py +282 -0
- solokit/session/briefing/learning_loader.py +212 -0
- solokit/session/briefing/milestone_builder.py +78 -0
- solokit/session/briefing/orchestrator.py +137 -0
- solokit/session/briefing/stack_detector.py +51 -0
- solokit/session/briefing/tree_generator.py +52 -0
- solokit/session/briefing/work_item_loader.py +209 -0
- solokit/session/briefing.py +353 -0
- solokit/session/complete.py +1188 -0
- solokit/session/status.py +246 -0
- solokit/session/validate.py +452 -0
- solokit/templates/.claude/commands/end.md +109 -0
- solokit/templates/.claude/commands/init.md +159 -0
- solokit/templates/.claude/commands/learn-curate.md +88 -0
- solokit/templates/.claude/commands/learn-search.md +62 -0
- solokit/templates/.claude/commands/learn-show.md +69 -0
- solokit/templates/.claude/commands/learn.md +136 -0
- solokit/templates/.claude/commands/start.md +114 -0
- solokit/templates/.claude/commands/status.md +22 -0
- solokit/templates/.claude/commands/validate.md +27 -0
- solokit/templates/.claude/commands/work-delete.md +119 -0
- solokit/templates/.claude/commands/work-graph.md +139 -0
- solokit/templates/.claude/commands/work-list.md +26 -0
- solokit/templates/.claude/commands/work-new.md +114 -0
- solokit/templates/.claude/commands/work-next.md +25 -0
- solokit/templates/.claude/commands/work-show.md +24 -0
- solokit/templates/.claude/commands/work-update.md +141 -0
- solokit/templates/CHANGELOG.md +17 -0
- solokit/templates/WORK_ITEM_TYPES.md +141 -0
- solokit/templates/__init__.py +1 -0
- solokit/templates/bug_spec.md +217 -0
- solokit/templates/config.schema.json +150 -0
- solokit/templates/dashboard_refine/base/.gitignore +36 -0
- solokit/templates/dashboard_refine/base/app/(dashboard)/layout.tsx +22 -0
- solokit/templates/dashboard_refine/base/app/(dashboard)/page.tsx +68 -0
- solokit/templates/dashboard_refine/base/app/(dashboard)/users/page.tsx +77 -0
- solokit/templates/dashboard_refine/base/app/globals.css +60 -0
- solokit/templates/dashboard_refine/base/app/layout.tsx +23 -0
- solokit/templates/dashboard_refine/base/app/page.tsx +9 -0
- solokit/templates/dashboard_refine/base/components/client-refine-wrapper.tsx +21 -0
- solokit/templates/dashboard_refine/base/components/layout/header.tsx +44 -0
- solokit/templates/dashboard_refine/base/components/layout/sidebar.tsx +82 -0
- solokit/templates/dashboard_refine/base/components/ui/button.tsx +53 -0
- solokit/templates/dashboard_refine/base/components/ui/card.tsx +78 -0
- solokit/templates/dashboard_refine/base/components/ui/table.tsx +116 -0
- solokit/templates/dashboard_refine/base/components.json +16 -0
- solokit/templates/dashboard_refine/base/lib/refine.tsx +65 -0
- solokit/templates/dashboard_refine/base/lib/utils.ts +13 -0
- solokit/templates/dashboard_refine/base/next.config.ts +10 -0
- solokit/templates/dashboard_refine/base/package.json.template +40 -0
- solokit/templates/dashboard_refine/base/postcss.config.mjs +8 -0
- solokit/templates/dashboard_refine/base/providers/refine-provider.tsx +26 -0
- solokit/templates/dashboard_refine/base/tailwind.config.ts +57 -0
- solokit/templates/dashboard_refine/base/tsconfig.json +27 -0
- solokit/templates/dashboard_refine/docker/Dockerfile +57 -0
- solokit/templates/dashboard_refine/docker/docker-compose.prod.yml +31 -0
- solokit/templates/dashboard_refine/docker/docker-compose.yml +21 -0
- solokit/templates/dashboard_refine/tier-1-essential/.eslintrc.json +7 -0
- solokit/templates/dashboard_refine/tier-1-essential/jest.config.ts +17 -0
- solokit/templates/dashboard_refine/tier-1-essential/jest.setup.ts +1 -0
- solokit/templates/dashboard_refine/tier-1-essential/package.json.tier1.template +57 -0
- solokit/templates/dashboard_refine/tier-1-essential/tests/setup.ts +26 -0
- solokit/templates/dashboard_refine/tier-1-essential/tests/unit/example.test.tsx +73 -0
- solokit/templates/dashboard_refine/tier-2-standard/package.json.tier2.template +62 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/eslint.config.mjs +22 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/package.json.tier3.template +79 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/playwright.config.ts +66 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/stryker.conf.json +38 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/tests/e2e/dashboard.spec.ts +88 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/tests/e2e/user-management.spec.ts +102 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/tests/integration/dashboard.test.tsx +90 -0
- solokit/templates/dashboard_refine/tier-3-comprehensive/type-coverage.json +16 -0
- solokit/templates/dashboard_refine/tier-4-production/instrumentation.ts +9 -0
- solokit/templates/dashboard_refine/tier-4-production/k6/dashboard-load-test.js +70 -0
- solokit/templates/dashboard_refine/tier-4-production/next.config.ts +46 -0
- solokit/templates/dashboard_refine/tier-4-production/package.json.tier4.template +89 -0
- solokit/templates/dashboard_refine/tier-4-production/sentry.client.config.ts +26 -0
- solokit/templates/dashboard_refine/tier-4-production/sentry.edge.config.ts +11 -0
- solokit/templates/dashboard_refine/tier-4-production/sentry.server.config.ts +11 -0
- solokit/templates/deployment_spec.md +500 -0
- solokit/templates/feature_spec.md +248 -0
- solokit/templates/fullstack_nextjs/base/.gitignore +36 -0
- solokit/templates/fullstack_nextjs/base/app/api/example/route.ts +65 -0
- solokit/templates/fullstack_nextjs/base/app/globals.css +27 -0
- solokit/templates/fullstack_nextjs/base/app/layout.tsx +20 -0
- solokit/templates/fullstack_nextjs/base/app/page.tsx +32 -0
- solokit/templates/fullstack_nextjs/base/components/example-component.tsx +20 -0
- solokit/templates/fullstack_nextjs/base/lib/prisma.ts +17 -0
- solokit/templates/fullstack_nextjs/base/lib/utils.ts +13 -0
- solokit/templates/fullstack_nextjs/base/lib/validations.ts +20 -0
- solokit/templates/fullstack_nextjs/base/next.config.ts +7 -0
- solokit/templates/fullstack_nextjs/base/package.json.template +32 -0
- solokit/templates/fullstack_nextjs/base/postcss.config.mjs +8 -0
- solokit/templates/fullstack_nextjs/base/prisma/schema.prisma +21 -0
- solokit/templates/fullstack_nextjs/base/tailwind.config.ts +19 -0
- solokit/templates/fullstack_nextjs/base/tsconfig.json +27 -0
- solokit/templates/fullstack_nextjs/docker/Dockerfile +60 -0
- solokit/templates/fullstack_nextjs/docker/docker-compose.prod.yml +57 -0
- solokit/templates/fullstack_nextjs/docker/docker-compose.yml +47 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/.eslintrc.json +7 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/jest.config.ts +17 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/jest.setup.ts +1 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/package.json.tier1.template +48 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/tests/api/example.test.ts +88 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/tests/setup.ts +22 -0
- solokit/templates/fullstack_nextjs/tier-1-essential/tests/unit/example.test.tsx +22 -0
- solokit/templates/fullstack_nextjs/tier-2-standard/package.json.tier2.template +52 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/eslint.config.mjs +39 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/package.json.tier3.template +68 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/playwright.config.ts +66 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/stryker.conf.json +33 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/tests/e2e/flow.spec.ts +59 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/tests/integration/api.test.ts +165 -0
- solokit/templates/fullstack_nextjs/tier-3-comprehensive/type-coverage.json +12 -0
- solokit/templates/fullstack_nextjs/tier-4-production/instrumentation.ts +9 -0
- solokit/templates/fullstack_nextjs/tier-4-production/k6/load-test.js +45 -0
- solokit/templates/fullstack_nextjs/tier-4-production/next.config.ts +46 -0
- solokit/templates/fullstack_nextjs/tier-4-production/package.json.tier4.template +77 -0
- solokit/templates/fullstack_nextjs/tier-4-production/sentry.client.config.ts +26 -0
- solokit/templates/fullstack_nextjs/tier-4-production/sentry.edge.config.ts +11 -0
- solokit/templates/fullstack_nextjs/tier-4-production/sentry.server.config.ts +11 -0
- solokit/templates/git-hooks/prepare-commit-msg +24 -0
- solokit/templates/integration_test_spec.md +363 -0
- solokit/templates/learnings.json +15 -0
- solokit/templates/ml_ai_fastapi/base/.gitignore +104 -0
- solokit/templates/ml_ai_fastapi/base/alembic/env.py +96 -0
- solokit/templates/ml_ai_fastapi/base/alembic.ini +114 -0
- solokit/templates/ml_ai_fastapi/base/pyproject.toml.template +91 -0
- solokit/templates/ml_ai_fastapi/base/requirements.txt.template +28 -0
- solokit/templates/ml_ai_fastapi/base/src/__init__.py +5 -0
- solokit/templates/ml_ai_fastapi/base/src/api/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/base/src/api/dependencies.py +20 -0
- solokit/templates/ml_ai_fastapi/base/src/api/routes/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/base/src/api/routes/example.py +134 -0
- solokit/templates/ml_ai_fastapi/base/src/api/routes/health.py +66 -0
- solokit/templates/ml_ai_fastapi/base/src/core/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/base/src/core/config.py +64 -0
- solokit/templates/ml_ai_fastapi/base/src/core/database.py +50 -0
- solokit/templates/ml_ai_fastapi/base/src/main.py +64 -0
- solokit/templates/ml_ai_fastapi/base/src/models/__init__.py +7 -0
- solokit/templates/ml_ai_fastapi/base/src/models/example.py +61 -0
- solokit/templates/ml_ai_fastapi/base/src/services/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/base/src/services/example.py +115 -0
- solokit/templates/ml_ai_fastapi/docker/Dockerfile +59 -0
- solokit/templates/ml_ai_fastapi/docker/docker-compose.prod.yml +112 -0
- solokit/templates/ml_ai_fastapi/docker/docker-compose.yml +77 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/pyproject.toml.tier1.template +112 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/pyrightconfig.json +41 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/pytest.ini +69 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/requirements-dev.txt +17 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/ruff.toml +81 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/tests/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/tests/conftest.py +72 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/tests/test_main.py +49 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/tests/unit/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/tier-1-essential/tests/unit/test_example.py +113 -0
- solokit/templates/ml_ai_fastapi/tier-2-standard/pyproject.toml.tier2.template +130 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/locustfile.py +99 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/mutmut_config.py +53 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/pyproject.toml.tier3.template +150 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/tests/integration/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/tests/integration/conftest.py +74 -0
- solokit/templates/ml_ai_fastapi/tier-3-comprehensive/tests/integration/test_api.py +131 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/pyproject.toml.tier4.template +162 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/requirements-prod.txt +25 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/api/routes/metrics.py +19 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/core/logging.py +74 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/core/monitoring.py +68 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/core/sentry.py +66 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/middleware/__init__.py +3 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/middleware/logging.py +79 -0
- solokit/templates/ml_ai_fastapi/tier-4-production/src/middleware/tracing.py +60 -0
- solokit/templates/refactor_spec.md +287 -0
- solokit/templates/saas_t3/base/.gitignore +36 -0
- solokit/templates/saas_t3/base/app/api/trpc/[trpc]/route.ts +33 -0
- solokit/templates/saas_t3/base/app/globals.css +27 -0
- solokit/templates/saas_t3/base/app/layout.tsx +23 -0
- solokit/templates/saas_t3/base/app/page.tsx +31 -0
- solokit/templates/saas_t3/base/lib/api.tsx +77 -0
- solokit/templates/saas_t3/base/lib/utils.ts +13 -0
- solokit/templates/saas_t3/base/next.config.ts +7 -0
- solokit/templates/saas_t3/base/package.json.template +38 -0
- solokit/templates/saas_t3/base/postcss.config.mjs +8 -0
- solokit/templates/saas_t3/base/prisma/schema.prisma +20 -0
- solokit/templates/saas_t3/base/server/api/root.ts +19 -0
- solokit/templates/saas_t3/base/server/api/routers/example.ts +28 -0
- solokit/templates/saas_t3/base/server/api/trpc.ts +52 -0
- solokit/templates/saas_t3/base/server/db.ts +17 -0
- solokit/templates/saas_t3/base/tailwind.config.ts +19 -0
- solokit/templates/saas_t3/base/tsconfig.json +27 -0
- solokit/templates/saas_t3/docker/Dockerfile +60 -0
- solokit/templates/saas_t3/docker/docker-compose.prod.yml +59 -0
- solokit/templates/saas_t3/docker/docker-compose.yml +49 -0
- solokit/templates/saas_t3/tier-1-essential/.eslintrc.json +7 -0
- solokit/templates/saas_t3/tier-1-essential/jest.config.ts +17 -0
- solokit/templates/saas_t3/tier-1-essential/jest.setup.ts +1 -0
- solokit/templates/saas_t3/tier-1-essential/package.json.tier1.template +54 -0
- solokit/templates/saas_t3/tier-1-essential/tests/setup.ts +22 -0
- solokit/templates/saas_t3/tier-1-essential/tests/unit/example.test.tsx +24 -0
- solokit/templates/saas_t3/tier-2-standard/package.json.tier2.template +58 -0
- solokit/templates/saas_t3/tier-3-comprehensive/eslint.config.mjs +39 -0
- solokit/templates/saas_t3/tier-3-comprehensive/package.json.tier3.template +74 -0
- solokit/templates/saas_t3/tier-3-comprehensive/playwright.config.ts +66 -0
- solokit/templates/saas_t3/tier-3-comprehensive/stryker.conf.json +34 -0
- solokit/templates/saas_t3/tier-3-comprehensive/tests/e2e/home.spec.ts +41 -0
- solokit/templates/saas_t3/tier-3-comprehensive/tests/integration/api.test.ts +44 -0
- solokit/templates/saas_t3/tier-3-comprehensive/type-coverage.json +12 -0
- solokit/templates/saas_t3/tier-4-production/instrumentation.ts +9 -0
- solokit/templates/saas_t3/tier-4-production/k6/load-test.js +51 -0
- solokit/templates/saas_t3/tier-4-production/next.config.ts +46 -0
- solokit/templates/saas_t3/tier-4-production/package.json.tier4.template +83 -0
- solokit/templates/saas_t3/tier-4-production/sentry.client.config.ts +26 -0
- solokit/templates/saas_t3/tier-4-production/sentry.edge.config.ts +11 -0
- solokit/templates/saas_t3/tier-4-production/sentry.server.config.ts +11 -0
- solokit/templates/saas_t3/tier-4-production/vercel.json +37 -0
- solokit/templates/security_spec.md +287 -0
- solokit/templates/stack-versions.yaml +617 -0
- solokit/templates/status_update.json +6 -0
- solokit/templates/template-registry.json +257 -0
- solokit/templates/work_items.json +11 -0
- solokit/testing/__init__.py +1 -0
- solokit/testing/integration_runner.py +550 -0
- solokit/testing/performance.py +637 -0
- solokit/visualization/__init__.py +1 -0
- solokit/visualization/dependency_graph.py +788 -0
- solokit/work_items/__init__.py +1 -0
- solokit/work_items/creator.py +217 -0
- solokit/work_items/delete.py +264 -0
- solokit/work_items/get_dependencies.py +185 -0
- solokit/work_items/get_dependents.py +113 -0
- solokit/work_items/get_metadata.py +121 -0
- solokit/work_items/get_next_recommendations.py +133 -0
- solokit/work_items/manager.py +235 -0
- solokit/work_items/milestones.py +137 -0
- solokit/work_items/query.py +376 -0
- solokit/work_items/repository.py +267 -0
- solokit/work_items/scheduler.py +184 -0
- solokit/work_items/spec_parser.py +838 -0
- solokit/work_items/spec_validator.py +493 -0
- solokit/work_items/updater.py +157 -0
- solokit/work_items/validator.py +205 -0
- solokit-0.1.1.dist-info/METADATA +640 -0
- solokit-0.1.1.dist-info/RECORD +323 -0
- solokit-0.1.1.dist-info/WHEEL +5 -0
- solokit-0.1.1.dist-info/entry_points.txt +2 -0
- solokit-0.1.1.dist-info/licenses/LICENSE +21 -0
- solokit-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Complete the current development session with quality gates and summary
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Session End
|
|
6
|
+
|
|
7
|
+
Before completing the session, **capture learnings** from the work done:
|
|
8
|
+
|
|
9
|
+
## Step 1: Generate Learnings
|
|
10
|
+
|
|
11
|
+
Review the session work and create 2-5 key learnings. You have two ways to capture learnings:
|
|
12
|
+
|
|
13
|
+
### Option A: Commit Message LEARNING Tags (Recommended)
|
|
14
|
+
|
|
15
|
+
Include `LEARNING:` annotations in your commit messages. These will be automatically extracted during session completion:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git commit -m "Implement calculator add function
|
|
19
|
+
|
|
20
|
+
Added TypeScript add function with comprehensive tests.
|
|
21
|
+
|
|
22
|
+
LEARNING: TypeScript number type handles both integers and decimals seamlessly
|
|
23
|
+
|
|
24
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
25
|
+
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Option B: Temporary Learnings File
|
|
29
|
+
|
|
30
|
+
Write learnings to `.session/temp_learnings.txt` (one learning per line):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cat > .session/temp_learnings.txt << 'EOF'
|
|
34
|
+
[Learning 1]
|
|
35
|
+
[Learning 2]
|
|
36
|
+
[Learning 3]
|
|
37
|
+
EOF
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**What makes a good learning:**
|
|
41
|
+
- Technical insights discovered during implementation
|
|
42
|
+
- Gotchas or edge cases encountered
|
|
43
|
+
- Best practices or patterns that worked well
|
|
44
|
+
- Architecture decisions and their rationale
|
|
45
|
+
- Performance or security considerations
|
|
46
|
+
- Things to remember for future work
|
|
47
|
+
|
|
48
|
+
## Step 2: Ask About Work Item Completion
|
|
49
|
+
|
|
50
|
+
Before completing the session, ask the user about the work item completion status using `AskUserQuestion`:
|
|
51
|
+
|
|
52
|
+
**Question: Work Item Completion Status**
|
|
53
|
+
- Question: "Is this work item complete?"
|
|
54
|
+
- Header: "Completion"
|
|
55
|
+
- Multi-select: false
|
|
56
|
+
- Options:
|
|
57
|
+
- Label: "Yes - Mark as completed", Description: "Work item is done. Will not auto-resume in next session."
|
|
58
|
+
- Label: "No - Keep as in-progress", Description: "Work is ongoing. Will auto-resume when you run /start in the next session."
|
|
59
|
+
- Label: "Cancel", Description: "Don't end session. Continue working."
|
|
60
|
+
|
|
61
|
+
**Important**: Display the work item title in the question text so the user knows which item they're completing.
|
|
62
|
+
|
|
63
|
+
## Step 3: Complete Session
|
|
64
|
+
|
|
65
|
+
Based on the user's selection:
|
|
66
|
+
|
|
67
|
+
**If "Yes - Mark as completed" selected:**
|
|
68
|
+
```bash
|
|
69
|
+
sk end --complete --learnings-file .session/temp_learnings.txt
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**If "No - Keep as in-progress" selected:**
|
|
73
|
+
```bash
|
|
74
|
+
sk end --incomplete --learnings-file .session/temp_learnings.txt
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**If "Cancel" selected:**
|
|
78
|
+
- Show message: "Session end cancelled. You can continue working."
|
|
79
|
+
- Exit without calling command
|
|
80
|
+
|
|
81
|
+
This script validates quality gates:
|
|
82
|
+
- All tests pass
|
|
83
|
+
- Linting passes
|
|
84
|
+
- Git changes are committed
|
|
85
|
+
- Work item status is updated
|
|
86
|
+
- Learnings are captured
|
|
87
|
+
|
|
88
|
+
The script automatically updates project context files (stack.py and tree.py) after validation passes.
|
|
89
|
+
|
|
90
|
+
## Step 4: Show Results
|
|
91
|
+
|
|
92
|
+
Show the user:
|
|
93
|
+
- Session summary with work accomplished
|
|
94
|
+
- **Commit details** (full messages + file change statistics) - Enhancement #11
|
|
95
|
+
- Quality gate results (pass/fail for each check)
|
|
96
|
+
- Learnings captured
|
|
97
|
+
- Work item completion status (completed or in-progress)
|
|
98
|
+
- Suggested next steps
|
|
99
|
+
|
|
100
|
+
If any quality gates fail, display the specific errors and guide the user on what needs to be fixed before the session can be completed. Do not proceed with session completion until all quality gates pass.
|
|
101
|
+
|
|
102
|
+
## Enhanced Session Summaries (Enhancement #11)
|
|
103
|
+
|
|
104
|
+
Session summaries now include comprehensive commit details:
|
|
105
|
+
- **Full commit messages** (multi-line messages preserved)
|
|
106
|
+
- **File change statistics** from `git diff --stat` (files changed, insertions, deletions)
|
|
107
|
+
- Each commit listed with short SHA and message
|
|
108
|
+
|
|
109
|
+
This enriched session summary serves as the **single source of truth** for "Previous Work" sections in future session briefings when resuming in-progress work items.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Initialize a new Session-Driven Development project with template-based setup
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Template-Based Project Initialization
|
|
6
|
+
|
|
7
|
+
Initialize a new Solokit project with guided template selection for production-ready setup.
|
|
8
|
+
|
|
9
|
+
## Interactive Template Selection (4 Questions)
|
|
10
|
+
|
|
11
|
+
Use the **AskUserQuestion tool** to collect all configuration:
|
|
12
|
+
|
|
13
|
+
### Question 1: Project Category
|
|
14
|
+
|
|
15
|
+
**Question**: "What type of project are you building?"
|
|
16
|
+
**Header**: "Category"
|
|
17
|
+
**Multi-Select**: false
|
|
18
|
+
|
|
19
|
+
**Options**:
|
|
20
|
+
1. **Label**: "SaaS Application"
|
|
21
|
+
**Description**: "T3 stack with Next.js, Prisma, tRPC - Full-featured web apps with auth, payments, multi-tenancy"
|
|
22
|
+
|
|
23
|
+
2. **Label**: "ML/AI Tooling"
|
|
24
|
+
**Description**: "FastAPI with Python ML libraries - Machine learning APIs, data pipelines, model serving"
|
|
25
|
+
|
|
26
|
+
3. **Label**: "Internal Dashboard"
|
|
27
|
+
**Description**: "Refine with React admin framework - Admin panels, analytics dashboards, internal tools"
|
|
28
|
+
|
|
29
|
+
4. **Label**: "Full-Stack Product"
|
|
30
|
+
**Description**: "Next.js with full-stack capabilities - General purpose web applications"
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### Question 2: Quality Gates Tier
|
|
35
|
+
|
|
36
|
+
**Question**: "What level of quality gates do you want?"
|
|
37
|
+
**Header**: "Quality Tier"
|
|
38
|
+
**Multi-Select**: false
|
|
39
|
+
|
|
40
|
+
**Options**:
|
|
41
|
+
1. **Label**: "Essential"
|
|
42
|
+
**Description**: "Linting, formatting, type-check, basic tests (fastest setup)"
|
|
43
|
+
|
|
44
|
+
2. **Label**: "Standard"
|
|
45
|
+
**Description**: "+ Pre-commit hooks, security scanning (recommended for most projects)"
|
|
46
|
+
|
|
47
|
+
3. **Label**: "Comprehensive"
|
|
48
|
+
**Description**: "+ Coverage reports, integration tests, mutation testing (production-ready)"
|
|
49
|
+
|
|
50
|
+
4. **Label**: "Production-Ready"
|
|
51
|
+
**Description**: "+ Performance monitoring, error tracking, deployment safety (enterprise-grade)"
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### Question 3: Testing Coverage Target
|
|
56
|
+
|
|
57
|
+
**Question**: "What testing coverage level do you want to enforce?"
|
|
58
|
+
**Header**: "Coverage"
|
|
59
|
+
**Multi-Select**: false
|
|
60
|
+
|
|
61
|
+
**Options**:
|
|
62
|
+
1. **Label**: "Basic (60%)"
|
|
63
|
+
**Description**: "Minimal coverage for prototypes and MVPs"
|
|
64
|
+
|
|
65
|
+
2. **Label**: "Standard (80%)"
|
|
66
|
+
**Description**: "Industry standard for production code (recommended)"
|
|
67
|
+
|
|
68
|
+
3. **Label**: "Strict (90%)"
|
|
69
|
+
**Description**: "High-reliability applications and mission-critical systems"
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Question 4: Additional Options
|
|
74
|
+
|
|
75
|
+
**Question**: "Select additional features to include:"
|
|
76
|
+
**Header**: "Add-ons"
|
|
77
|
+
**Multi-Select**: true
|
|
78
|
+
|
|
79
|
+
**Options** (all optional, user can select multiple):
|
|
80
|
+
1. **Label**: "GitHub Actions CI/CD"
|
|
81
|
+
**Description**: "Automated testing and deployment workflows"
|
|
82
|
+
|
|
83
|
+
2. **Label**: "Docker Support"
|
|
84
|
+
**Description**: "Containerization with docker-compose"
|
|
85
|
+
|
|
86
|
+
3. **Label**: "Pre-commit Hooks"
|
|
87
|
+
**Description**: "Automated code quality checks before commits"
|
|
88
|
+
|
|
89
|
+
4. **Label**: "Environment Templates"
|
|
90
|
+
**Description**: ".env files and .editorconfig for all editors"
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Run Initialization
|
|
95
|
+
|
|
96
|
+
After collecting all answers via AskUserQuestion, run the Python CLI with the appropriate arguments:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
sk init --template=<category> --tier=<tier> --coverage=<coverage> --options=<options>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Mapping user selections to CLI arguments:**
|
|
103
|
+
|
|
104
|
+
**Category mapping:**
|
|
105
|
+
- "SaaS Application" → `--template=saas_t3`
|
|
106
|
+
- "ML/AI Tooling" → `--template=ml_ai_fastapi`
|
|
107
|
+
- "Internal Dashboard" → `--template=dashboard_refine`
|
|
108
|
+
- "Full-Stack Product" → `--template=fullstack_nextjs`
|
|
109
|
+
|
|
110
|
+
**Tier mapping:**
|
|
111
|
+
- "Essential" → `--tier=tier-1-essential`
|
|
112
|
+
- "Standard" → `--tier=tier-2-standard`
|
|
113
|
+
- "Comprehensive" → `--tier=tier-3-comprehensive`
|
|
114
|
+
- "Production-Ready" → `--tier=tier-4-production`
|
|
115
|
+
|
|
116
|
+
**Coverage mapping:**
|
|
117
|
+
- "Basic (60%)" → `--coverage=60`
|
|
118
|
+
- "Standard (80%)" → `--coverage=80`
|
|
119
|
+
- "Strict (90%)" → `--coverage=90`
|
|
120
|
+
- Custom value from "Type something" → `--coverage=<value>`
|
|
121
|
+
|
|
122
|
+
**Options mapping:**
|
|
123
|
+
- "GitHub Actions CI/CD" → `ci_cd`
|
|
124
|
+
- "Docker Support" → `docker`
|
|
125
|
+
- "Pre-commit Hooks" → `pre_commit`
|
|
126
|
+
- "Environment Templates" → `env_templates`
|
|
127
|
+
|
|
128
|
+
Combine multiple options with commas: `--options=ci_cd,docker,pre_commit`
|
|
129
|
+
|
|
130
|
+
**Important:** The Python command handles ALL validation and setup deterministically:
|
|
131
|
+
- Pre-flight checks (blank project, git init, environment validation)
|
|
132
|
+
- Template installation
|
|
133
|
+
- Dependency installation
|
|
134
|
+
- All file generation
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## After Successful Init
|
|
139
|
+
|
|
140
|
+
Show the user the success output from the script, then explain:
|
|
141
|
+
|
|
142
|
+
"Your project is now set up with production-ready tooling!
|
|
143
|
+
|
|
144
|
+
**Next steps:**
|
|
145
|
+
1. Review `README.md` for stack-specific getting started guide
|
|
146
|
+
2. Create your first work item: `/sk:work-new`
|
|
147
|
+
3. Start working: `/sk:start`"
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Error Handling
|
|
152
|
+
|
|
153
|
+
If the `sk init` command fails, show the error message from the CLI output. The Python script provides clear error messages for common issues:
|
|
154
|
+
- Already initialized
|
|
155
|
+
- Not a blank project
|
|
156
|
+
- Missing environment requirements
|
|
157
|
+
- etc.
|
|
158
|
+
|
|
159
|
+
Do not retry automatically - let the user address the issue and run `/sk:init` again.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run learning curation process
|
|
3
|
+
argument-hint: [--dry-run]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Curate Learnings
|
|
7
|
+
|
|
8
|
+
Run automatic categorization, similarity detection, and merging of learnings.
|
|
9
|
+
|
|
10
|
+
## What Curation Does
|
|
11
|
+
|
|
12
|
+
The curation process:
|
|
13
|
+
1. **Categorizes** uncategorized learnings using AI-powered keyword analysis
|
|
14
|
+
2. **Detects duplicates** using Jaccard and containment similarity algorithms
|
|
15
|
+
3. **Merges similar learnings** to reduce redundancy
|
|
16
|
+
4. **Archives old learnings** (learnings older than 50 sessions)
|
|
17
|
+
5. **Updates metadata** (last_curated timestamp)
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Normal Curation (Save Changes)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
sk learn-curate
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This will:
|
|
28
|
+
- Process all learnings
|
|
29
|
+
- Save changes to learnings.json
|
|
30
|
+
- Display summary of actions taken
|
|
31
|
+
|
|
32
|
+
### Dry-Run Mode (Preview Only)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
sk learn-curate --dry-run
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This will:
|
|
39
|
+
- Show what changes would be made
|
|
40
|
+
- NOT save any changes
|
|
41
|
+
- Useful for previewing curation results
|
|
42
|
+
|
|
43
|
+
## When to Run Curation
|
|
44
|
+
|
|
45
|
+
Manual curation is useful when:
|
|
46
|
+
- You've captured many learnings and want to organize them
|
|
47
|
+
- You want to check for duplicate learnings
|
|
48
|
+
- You want to preview what auto-curation would do
|
|
49
|
+
- You're testing the curation process
|
|
50
|
+
|
|
51
|
+
Note: Curation also runs automatically every N sessions (configurable in .session/config.json).
|
|
52
|
+
|
|
53
|
+
## Output Format
|
|
54
|
+
|
|
55
|
+
Display the curation summary showing:
|
|
56
|
+
- Initial learning count
|
|
57
|
+
- Number of learnings categorized
|
|
58
|
+
- Number of duplicates merged
|
|
59
|
+
- Number of learnings archived
|
|
60
|
+
- Final learning count
|
|
61
|
+
|
|
62
|
+
Example output:
|
|
63
|
+
```
|
|
64
|
+
=== Learning Curation ===
|
|
65
|
+
|
|
66
|
+
Initial learnings: 45
|
|
67
|
+
|
|
68
|
+
✓ Categorized 8 learnings
|
|
69
|
+
✓ Merged 3 duplicate learnings
|
|
70
|
+
✓ Archived 2 old learnings
|
|
71
|
+
|
|
72
|
+
Final learnings: 42
|
|
73
|
+
|
|
74
|
+
✓ Learnings saved
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Understanding the Process
|
|
78
|
+
|
|
79
|
+
**Categorization:** Uses keyword analysis to assign learnings to one of 6 categories:
|
|
80
|
+
- architecture_patterns, gotchas, best_practices, technical_debt, performance_insights, security
|
|
81
|
+
|
|
82
|
+
**Similarity Detection:** Uses two algorithms:
|
|
83
|
+
- **Jaccard similarity:** Measures word overlap (threshold: 0.6)
|
|
84
|
+
- **Containment similarity:** Detects if one learning contains another (threshold: 0.8)
|
|
85
|
+
|
|
86
|
+
**Merging:** Combines tags and tracks merge history when duplicates are found.
|
|
87
|
+
|
|
88
|
+
**Archiving:** Moves learnings older than 50 sessions to archive (preserves them but removes from active view).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Search learnings by keyword
|
|
3
|
+
argument-hint: <query>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Search Learnings
|
|
7
|
+
|
|
8
|
+
Full-text search across all learning content, tags, and context.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Extract the search query from $ARGUMENTS and run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
sk learn-search "$@"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### How Search Works
|
|
19
|
+
|
|
20
|
+
The search looks for matches in:
|
|
21
|
+
- Learning content (main text)
|
|
22
|
+
- Tags
|
|
23
|
+
- Context/notes
|
|
24
|
+
- Category names
|
|
25
|
+
|
|
26
|
+
Search is case-insensitive and finds partial matches.
|
|
27
|
+
|
|
28
|
+
### Examples
|
|
29
|
+
|
|
30
|
+
Search for "CORS":
|
|
31
|
+
```bash
|
|
32
|
+
sk learn-search "CORS"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Search for "FastAPI middleware":
|
|
36
|
+
```bash
|
|
37
|
+
sk learn-search "FastAPI middleware"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Search for "authentication":
|
|
41
|
+
```bash
|
|
42
|
+
sk learn-search "authentication"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Display Format
|
|
46
|
+
|
|
47
|
+
Show matching learnings with:
|
|
48
|
+
- Learning content with matched text highlighted
|
|
49
|
+
- Category and tags
|
|
50
|
+
- Session where captured
|
|
51
|
+
- Relevance score or match indicator
|
|
52
|
+
- Learning ID
|
|
53
|
+
|
|
54
|
+
Present results in order of relevance, grouped by category.
|
|
55
|
+
|
|
56
|
+
## Tips for Users
|
|
57
|
+
|
|
58
|
+
Suggest to users:
|
|
59
|
+
- Use specific keywords for better results
|
|
60
|
+
- Try tag names if searching by topic
|
|
61
|
+
- Use category names to narrow results
|
|
62
|
+
- Combine with `/learn-show --category` for focused browsing
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Browse and filter learnings
|
|
3
|
+
argument-hint: [--category CATEGORY] [--tag TAG] [--session SESSION]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Show Learnings
|
|
7
|
+
|
|
8
|
+
View captured learnings with optional filtering.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Parse $ARGUMENTS for filters and run the show-learnings command:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
sk learn-show "$@"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Filter Options
|
|
19
|
+
|
|
20
|
+
- `--category <category>` - Filter by category:
|
|
21
|
+
- `architecture_patterns` - Design decisions and patterns
|
|
22
|
+
- `gotchas` - Edge cases and pitfalls
|
|
23
|
+
- `best_practices` - Effective approaches
|
|
24
|
+
- `technical_debt` - Areas needing improvement
|
|
25
|
+
- `performance_insights` - Optimization learnings
|
|
26
|
+
- `security` - Security-related discoveries
|
|
27
|
+
|
|
28
|
+
- `--tag <tag>` - Filter by specific tag (e.g., `python`, `fastapi`, `cors`)
|
|
29
|
+
|
|
30
|
+
- `--session <number>` - Show learnings from specific session number
|
|
31
|
+
|
|
32
|
+
### Examples
|
|
33
|
+
|
|
34
|
+
Show all learnings:
|
|
35
|
+
```bash
|
|
36
|
+
sk learn-show
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Show only gotchas:
|
|
40
|
+
```bash
|
|
41
|
+
sk learn-show --category gotchas
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Show learnings tagged with "fastapi":
|
|
45
|
+
```bash
|
|
46
|
+
sk learn-show --tag fastapi
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Show learnings from session 5:
|
|
50
|
+
```bash
|
|
51
|
+
sk learn-show --session 5
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Combine filters (gotchas from session 5):
|
|
55
|
+
```bash
|
|
56
|
+
sk learn-show --category gotchas --session 5
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Display Format
|
|
60
|
+
|
|
61
|
+
The command will display learnings in organized format showing:
|
|
62
|
+
- Category grouping
|
|
63
|
+
- Learning content
|
|
64
|
+
- Tags (if any)
|
|
65
|
+
- Session number where captured
|
|
66
|
+
- Timestamp
|
|
67
|
+
- Learning ID
|
|
68
|
+
|
|
69
|
+
Present the output to the user in a clear, readable format.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Capture a learning during development session
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Learning Capture
|
|
6
|
+
|
|
7
|
+
Record insights, gotchas, and best practices discovered during development.
|
|
8
|
+
|
|
9
|
+
## Step 1: Analyze Session and Generate Learning Suggestions
|
|
10
|
+
|
|
11
|
+
Review what was accomplished in the current session:
|
|
12
|
+
- What code was written/changed
|
|
13
|
+
- What problems were solved
|
|
14
|
+
- What patterns or approaches were used
|
|
15
|
+
- What technical insights were discovered
|
|
16
|
+
- What gotchas or edge cases were encountered
|
|
17
|
+
|
|
18
|
+
Generate 2-3 learning suggestions based on the session work. Good learnings are:
|
|
19
|
+
- Specific technical insights (not generic)
|
|
20
|
+
- Actionable and memorable
|
|
21
|
+
- About tools, patterns, or gotchas encountered
|
|
22
|
+
- Clear and concise (1-2 sentences)
|
|
23
|
+
|
|
24
|
+
## Step 2: Ask User to Select Learnings
|
|
25
|
+
|
|
26
|
+
Use `AskUserQuestion` with multi-select to let user choose learnings:
|
|
27
|
+
|
|
28
|
+
**Question: Select Learnings from This Session**
|
|
29
|
+
- Question: "I've identified some potential learnings from this session. Select all that apply, or add your own:"
|
|
30
|
+
- Header: "Learnings"
|
|
31
|
+
- Multi-select: true
|
|
32
|
+
- Options (up to 4 total):
|
|
33
|
+
- Option 1: [Your generated learning suggestion 1]
|
|
34
|
+
- Option 2: [Your generated learning suggestion 2]
|
|
35
|
+
- Option 3: [Your generated learning suggestion 3] (if applicable)
|
|
36
|
+
- Option 4: [Your generated learning suggestion 4] (if applicable)
|
|
37
|
+
|
|
38
|
+
**Example Options:**
|
|
39
|
+
- "TypeScript enums are type-safe at compile time but add runtime overhead"
|
|
40
|
+
- "Zod schemas can be inferred as TypeScript types using z.infer<>"
|
|
41
|
+
- "React useCallback dependencies must include all values used inside the callback"
|
|
42
|
+
|
|
43
|
+
## Step 3: For Each Selected Learning, Determine Category
|
|
44
|
+
|
|
45
|
+
For each learning the user selected (or entered), automatically suggest the most appropriate category:
|
|
46
|
+
|
|
47
|
+
**Categories:**
|
|
48
|
+
- `architecture_patterns` - Design decisions, patterns used, architectural approaches
|
|
49
|
+
- `gotchas` - Edge cases, pitfalls, bugs discovered
|
|
50
|
+
- `best_practices` - Effective approaches, recommended patterns
|
|
51
|
+
- `technical_debt` - Areas needing improvement, refactoring needed
|
|
52
|
+
- `performance_insights` - Optimization learnings, performance improvements
|
|
53
|
+
- `security` - Security-related discoveries, vulnerabilities fixed
|
|
54
|
+
|
|
55
|
+
Use your judgment to auto-assign the category based on the learning content. You can briefly explain your categorization choice to the user.
|
|
56
|
+
|
|
57
|
+
## Step 4: Save Each Learning
|
|
58
|
+
|
|
59
|
+
For each learning selected/entered by the user:
|
|
60
|
+
|
|
61
|
+
1. Get the current session number from `.session/tracking/status_update.json`
|
|
62
|
+
2. Run the add-learning command:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
sk learn add-learning \
|
|
66
|
+
--content "{{content}}" \
|
|
67
|
+
--category "{{category}}" \
|
|
68
|
+
--session "{{current_session}}"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Replace:
|
|
72
|
+
- `{{content}}` with the learning content (use quotes, escape if needed)
|
|
73
|
+
- `{{category}}` with the auto-assigned category
|
|
74
|
+
- `{{current_session}}` with session number from status_update.json
|
|
75
|
+
|
|
76
|
+
**Optional flags:**
|
|
77
|
+
- Add `--tags "tag1,tag2"` if relevant tags can be inferred from the learning
|
|
78
|
+
- Add `--context "..."` if there's specific file/session context
|
|
79
|
+
|
|
80
|
+
3. After adding all learnings, display a summary:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
✓ Captured 3 learnings:
|
|
84
|
+
1. [gotchas] TypeScript enums are type-safe at compile time but add runtime overhead
|
|
85
|
+
2. [best_practices] Zod schemas can be inferred as TypeScript types using z.infer<>
|
|
86
|
+
3. [architecture_patterns] Repository pattern separates data access from business logic
|
|
87
|
+
|
|
88
|
+
All learnings will be auto-curated and made available in future sessions.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Example Workflow
|
|
92
|
+
|
|
93
|
+
**Scenario:** User runs `/learn` after working on FastAPI CORS configuration
|
|
94
|
+
|
|
95
|
+
**Step 1:** Claude analyzes session and generates suggestions:
|
|
96
|
+
- "FastAPI middleware order matters for CORS - app.add_middleware() calls must be in reverse order of execution"
|
|
97
|
+
- "CORSMiddleware must be added after other middleware to work correctly"
|
|
98
|
+
|
|
99
|
+
**Step 2:** AskUserQuestion shows:
|
|
100
|
+
```
|
|
101
|
+
I've identified some potential learnings from this session. Select all that apply, or add your own:
|
|
102
|
+
|
|
103
|
+
☐ FastAPI middleware order matters for CORS - app.add_middleware() calls must be in reverse order of execution
|
|
104
|
+
☐ CORSMiddleware must be added after other middleware to work correctly
|
|
105
|
+
☐ Type something - Add custom learnings (one per line)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
User selects first two options.
|
|
109
|
+
|
|
110
|
+
**Step 3:** Claude auto-categorizes:
|
|
111
|
+
- Learning 1 → `gotchas` (middleware ordering gotcha)
|
|
112
|
+
- Learning 2 → `best_practices` (correct configuration approach)
|
|
113
|
+
|
|
114
|
+
**Step 4:** Claude runs commands:
|
|
115
|
+
```bash
|
|
116
|
+
sk learn add-learning \
|
|
117
|
+
--content "FastAPI middleware order matters for CORS - app.add_middleware() calls must be in reverse order of execution" \
|
|
118
|
+
--category "gotchas" \
|
|
119
|
+
--tags "fastapi,cors,middleware" \
|
|
120
|
+
--session "5"
|
|
121
|
+
|
|
122
|
+
sk learn add-learning \
|
|
123
|
+
--content "CORSMiddleware must be added after other middleware to work correctly" \
|
|
124
|
+
--category "best_practices" \
|
|
125
|
+
--tags "fastapi,cors,middleware" \
|
|
126
|
+
--session "5"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Output to user:**
|
|
130
|
+
```
|
|
131
|
+
✓ Captured 2 learnings:
|
|
132
|
+
1. [gotchas] FastAPI middleware order matters for CORS - app.add_middleware() calls must be in reverse order of execution
|
|
133
|
+
2. [best_practices] CORSMiddleware must be added after other middleware to work correctly
|
|
134
|
+
|
|
135
|
+
All learnings will be auto-curated and made available in future sessions.
|
|
136
|
+
```
|