@jairodri/huckleberry-cli 1.0.2 → 1.1.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/README.md +85 -0
- package/agents/cos.json +2 -5
- package/agents/hermes/AGENTS.md +25 -49
- package/agents/hermes/fix-kimaki/SKILL.md +19 -92
- package/agents/hermes/hermes-fixer.md +44 -74
- package/agents/hermes.json +6 -18
- package/kanban/SKILL.md +18 -18
- package/kanban/package.json +1 -1
- package/kanban/src/dispatcher.mjs +1 -1
- package/kanban/templates/blog-social-campaign.yaml +6 -2
- package/kanban/templates/social-campaign.yaml +9 -4
- package/mcp/jev-calibration.mjs +335 -0
- package/mcp/jev-client.mjs +119 -0
- package/mcp/jev-thresholds.json +27 -0
- package/package.json +13 -9
- package/scripts/doctor-watchdog.sh +73 -0
- package/scripts/install-services.sh +34 -27
- package/scripts/self-improve-weekly.sh +34 -0
- package/scripts/sync-skills.mjs +121 -0
- package/skills/ab-test-setup/SKILL.md +266 -0
- package/skills/ab-test-setup/evals/evals.json +105 -0
- package/skills/ab-test-setup/references/sample-size-guide.md +263 -0
- package/skills/ab-test-setup/references/test-templates.md +277 -0
- package/skills/agent-reach/SKILL.md +132 -0
- package/skills/agent-reach/references/career.md +29 -0
- package/skills/agent-reach/references/dev.md +62 -0
- package/skills/agent-reach/references/search.md +33 -0
- package/skills/agent-reach/references/social.md +232 -0
- package/skills/agent-reach/references/video.md +130 -0
- package/skills/agent-reach/references/web.md +50 -0
- package/skills/ai-agent-seo/SKILL.md +450 -0
- package/skills/ai-cold-email-intelligence/SKILL.md +54 -0
- package/skills/ai-cold-email-intelligence/references/prompts.md +21 -0
- package/skills/ai-consensus-builder/SKILL.md +324 -0
- package/skills/ai-seo/SKILL.md +399 -0
- package/skills/ai-seo/evals/evals.json +90 -0
- package/skills/ai-seo/references/content-patterns.md +284 -0
- package/skills/ai-seo/references/platform-ranking-factors.md +152 -0
- package/skills/ai-visibility-audit/SKILL.md +322 -0
- package/skills/analytics-tracking/SKILL.md +309 -0
- package/skills/analytics-tracking/evals/evals.json +90 -0
- package/skills/analytics-tracking/references/event-library.md +260 -0
- package/skills/analytics-tracking/references/ga4-implementation.md +300 -0
- package/skills/analytics-tracking/references/gtm-implementation.md +390 -0
- package/skills/article-generator/SKILL.md +216 -0
- package/skills/auto-indexing/SKILL.md +179 -0
- package/skills/auto-indexing/scripts/auto-indexing.js +257 -0
- package/skills/auto-skill/SKILL.md +151 -0
- package/skills/auto-skill/correction-queue.js +102 -0
- package/skills/auto-skill/dedup.js +97 -0
- package/skills/auto-skill/skill-router.js +224 -0
- package/skills/autoresearch/SKILL.md +334 -0
- package/skills/autoresearch/autoresearch-autoresearch/SKILL.md.baseline +329 -0
- package/skills/autoresearch/autoresearch-autoresearch/changelog.md +34 -0
- package/skills/autoresearch/autoresearch-autoresearch/dashboard.html +116 -0
- package/skills/autoresearch/autoresearch-autoresearch/evals.md +39 -0
- package/skills/autoresearch/autoresearch-autoresearch/results.json +44 -0
- package/skills/autoresearch/autoresearch-autoresearch/results.tsv +3 -0
- package/skills/autoresearch/eval-guide.md +121 -0
- package/skills/b2b-cold-outreach/SKILL.md +322 -0
- package/skills/birdclaw/SKILL.md +82 -0
- package/skills/brainstorm/SKILL.md +168 -0
- package/skills/brand-kit-playground/SKILL.md +312 -0
- package/skills/brand-kit-playground/references/html-architecture.md +316 -0
- package/skills/brand-kit-playground/references/steal-patterns.md +88 -0
- package/skills/brand-voice/SKILL.md +223 -0
- package/skills/brand-voice/references/honesty-as-positioning.md +60 -0
- package/skills/brand-voice/references/voice-modes.md +1158 -0
- package/skills/business-advisory-council/README.md +136 -0
- package/skills/business-advisory-council/SKILL.md +94 -0
- package/skills/business-advisory-council/business-advisory-council.py +492 -0
- package/skills/business-advisory-council/discord-components-decision.json +8 -0
- package/skills/business-advisory-council/examples/steve-conley-partnership.json +6 -0
- package/skills/business-advisory-council/steve-conley-call-brief.json +6 -0
- package/skills/churn-prevention/SKILL.md +305 -0
- package/skills/churn-prevention/evals/evals.json +93 -0
- package/skills/churn-prevention/references/cancel-flow-patterns.md +316 -0
- package/skills/churn-prevention/references/dunning-playbook.md +408 -0
- package/skills/claw-compactor/LICENSE +21 -0
- package/skills/claw-compactor/README.md +459 -0
- package/skills/claw-compactor/SKILL.md +329 -0
- package/skills/claw-compactor/benchmark/RESULTS.md +104 -0
- package/skills/claw-compactor/benchmark/__init__.py +1 -0
- package/skills/claw-compactor/benchmark/compressors.py +520 -0
- package/skills/claw-compactor/benchmark/data/sample_01_devops.json +82 -0
- package/skills/claw-compactor/benchmark/data/sample_02_trading.json +54 -0
- package/skills/claw-compactor/benchmark/data/sample_03_ml_short.json +38 -0
- package/skills/claw-compactor/benchmark/data/sample_04_mixed_long.json +318 -0
- package/skills/claw-compactor/benchmark/data/sample_05_sysadmin.json +56 -0
- package/skills/claw-compactor/benchmark/evaluate.py +278 -0
- package/skills/claw-compactor/benchmark/report.py +241 -0
- package/skills/claw-compactor/benchmark/results/benchmark_results.json +405 -0
- package/skills/claw-compactor/benchmark/run_benchmark.py +238 -0
- package/skills/claw-compactor/engram.yaml +49 -0
- package/skills/claw-compactor/proxy/README.md +87 -0
- package/skills/claw-compactor/proxy/dashboard.html +804 -0
- package/skills/claw-compactor/proxy/event-log.mjs +213 -0
- package/skills/claw-compactor/proxy/fair-queue.mjs +288 -0
- package/skills/claw-compactor/proxy/metrics-store.mjs +425 -0
- package/skills/claw-compactor/proxy/package-lock.json +125 -0
- package/skills/claw-compactor/proxy/package.json +15 -0
- package/skills/claw-compactor/proxy/portal.html +360 -0
- package/skills/claw-compactor/proxy/process-registry.mjs +447 -0
- package/skills/claw-compactor/proxy/rate-limiter.mjs +117 -0
- package/skills/claw-compactor/proxy/redis-client.mjs +75 -0
- package/skills/claw-compactor/proxy/retry.mjs +182 -0
- package/skills/claw-compactor/proxy/server.mjs +2100 -0
- package/skills/claw-compactor/proxy/session-affinity.mjs +177 -0
- package/skills/claw-compactor/proxy/start.sh +23 -0
- package/skills/claw-compactor/proxy/test/event-log.test.mjs +237 -0
- package/skills/claw-compactor/proxy/test/helpers.mjs +103 -0
- package/skills/claw-compactor/proxy/test/integration.test.mjs +297 -0
- package/skills/claw-compactor/proxy/test/metrics-store.test.mjs +243 -0
- package/skills/claw-compactor/proxy/test/process-registry.test.mjs +390 -0
- package/skills/claw-compactor/proxy/test/rate-limiter.test.mjs +121 -0
- package/skills/claw-compactor/proxy/test/redis-client.test.mjs +62 -0
- package/skills/claw-compactor/proxy/test/token-tracker.test.mjs +200 -0
- package/skills/claw-compactor/proxy/token-tracker.mjs +482 -0
- package/skills/claw-compactor/pyproject.toml +26 -0
- package/skills/claw-compactor/references/README.md +44 -0
- package/skills/claw-compactor/references/architecture.md +197 -0
- package/skills/claw-compactor/references/benchmarks.md +94 -0
- package/skills/claw-compactor/references/compression-prompts.md +39 -0
- package/skills/claw-compactor/references/compression-techniques.md +219 -0
- package/skills/claw-compactor/references/testing.md +160 -0
- package/skills/claw-compactor/scripts/audit_memory.py +216 -0
- package/skills/claw-compactor/scripts/compress_memory.py +236 -0
- package/skills/claw-compactor/scripts/compressed_context.py +280 -0
- package/skills/claw-compactor/scripts/dedup_memory.py +147 -0
- package/skills/claw-compactor/scripts/dictionary_compress.py +170 -0
- package/skills/claw-compactor/scripts/engram-auto.sh +152 -0
- package/skills/claw-compactor/scripts/engram_auto.py +695 -0
- package/skills/claw-compactor/scripts/engram_cli.py +474 -0
- package/skills/claw-compactor/scripts/estimate_tokens.py +131 -0
- package/skills/claw-compactor/scripts/generate_summary_tiers.py +292 -0
- package/skills/claw-compactor/scripts/lib/__init__.py +34 -0
- package/skills/claw-compactor/scripts/lib/config.py +289 -0
- package/skills/claw-compactor/scripts/lib/dedup.py +119 -0
- package/skills/claw-compactor/scripts/lib/dictionary.py +281 -0
- package/skills/claw-compactor/scripts/lib/engram.py +793 -0
- package/skills/claw-compactor/scripts/lib/engram_prompts.py +175 -0
- package/skills/claw-compactor/scripts/lib/engram_storage.py +254 -0
- package/skills/claw-compactor/scripts/lib/exceptions.py +24 -0
- package/skills/claw-compactor/scripts/lib/markdown.py +312 -0
- package/skills/claw-compactor/scripts/lib/rle.py +165 -0
- package/skills/claw-compactor/scripts/lib/tokenizer_optimizer.py +188 -0
- package/skills/claw-compactor/scripts/lib/tokens.py +68 -0
- package/skills/claw-compactor/scripts/mem_compress.py +788 -0
- package/skills/claw-compactor/scripts/observation_compressor.py +346 -0
- package/skills/claw-compactor/tests/__init__.py +0 -0
- package/skills/claw-compactor/tests/conftest.py +94 -0
- package/skills/claw-compactor/tests/test_audit_comprehensive.py +123 -0
- package/skills/claw-compactor/tests/test_audit_memory.py +67 -0
- package/skills/claw-compactor/tests/test_benchmark.py +122 -0
- package/skills/claw-compactor/tests/test_cli_commands.py +228 -0
- package/skills/claw-compactor/tests/test_compress_memory.py +109 -0
- package/skills/claw-compactor/tests/test_compress_memory_comprehensive.py +191 -0
- package/skills/claw-compactor/tests/test_compressed_context.py +145 -0
- package/skills/claw-compactor/tests/test_config.py +54 -0
- package/skills/claw-compactor/tests/test_dedup_memory.py +124 -0
- package/skills/claw-compactor/tests/test_dictionary.py +327 -0
- package/skills/claw-compactor/tests/test_dictionary_comprehensive.py +241 -0
- package/skills/claw-compactor/tests/test_engram.py +1091 -0
- package/skills/claw-compactor/tests/test_engram_auto.py +529 -0
- package/skills/claw-compactor/tests/test_error_handling.py +194 -0
- package/skills/claw-compactor/tests/test_estimate_tokens.py +99 -0
- package/skills/claw-compactor/tests/test_generate_summary_tiers.py +105 -0
- package/skills/claw-compactor/tests/test_integration.py +249 -0
- package/skills/claw-compactor/tests/test_lib_dedup.py +135 -0
- package/skills/claw-compactor/tests/test_lib_markdown.py +388 -0
- package/skills/claw-compactor/tests/test_lib_tokens.py +82 -0
- package/skills/claw-compactor/tests/test_main_entry.py +176 -0
- package/skills/claw-compactor/tests/test_markdown_advanced.py +284 -0
- package/skills/claw-compactor/tests/test_new_features.py +77 -0
- package/skills/claw-compactor/tests/test_observation_comprehensive.py +261 -0
- package/skills/claw-compactor/tests/test_observation_compressor.py +128 -0
- package/skills/claw-compactor/tests/test_performance.py +172 -0
- package/skills/claw-compactor/tests/test_pipeline.py +109 -0
- package/skills/claw-compactor/tests/test_real_workspace.py +161 -0
- package/skills/claw-compactor/tests/test_rle.py +114 -0
- package/skills/claw-compactor/tests/test_rle_comprehensive.py +151 -0
- package/skills/claw-compactor/tests/test_roundtrip.py +253 -0
- package/skills/claw-compactor/tests/test_roundtrip_comprehensive.py +192 -0
- package/skills/claw-compactor/tests/test_tiers_comprehensive.py +171 -0
- package/skills/claw-compactor/tests/test_token_economics.py +237 -0
- package/skills/claw-compactor/tests/test_tokenizer_optimizer.py +175 -0
- package/skills/claw-compactor/tests/test_tokenizer_optimizer_comprehensive.py +241 -0
- package/skills/claw-compactor/tests/test_tokens.py +27 -0
- package/skills/cmo/CHANGELOG.md +61 -0
- package/skills/cmo/SKILL.md +500 -0
- package/skills/cmo/references/ai-slop-patterns.md +56 -0
- package/skills/cmo/references/analytics-guide.md +152 -0
- package/skills/cmo/references/ideas-library.md +197 -0
- package/skills/cmo/rules/brand-file-map.md +198 -0
- package/skills/cmo/rules/brand-memory.md +158 -0
- package/skills/cmo/rules/cli-runtime-index.md +95 -0
- package/skills/cmo/rules/command-reference.md +167 -0
- package/skills/cmo/rules/communication.md +15 -0
- package/skills/cmo/rules/context-switch.md +101 -0
- package/skills/cmo/rules/ecosystem.md +125 -0
- package/skills/cmo/rules/error-recovery.md +98 -0
- package/skills/cmo/rules/learning-loop.md +170 -0
- package/skills/cmo/rules/monorepo.md +78 -0
- package/skills/cmo/rules/output-format.md +124 -0
- package/skills/cmo/rules/persona.md +15 -0
- package/skills/cmo/rules/playbooks.md +327 -0
- package/skills/cmo/rules/progressive-enhancement.md +231 -0
- package/skills/cmo/rules/publish-index.md +106 -0
- package/skills/cmo/rules/quality-gate.md +90 -0
- package/skills/cmo/rules/recency-grounding.md +124 -0
- package/skills/cmo/rules/safety.md +80 -0
- package/skills/cmo/rules/studio-api-index.md +138 -0
- package/skills/cmo/rules/studio-integration.md +147 -0
- package/skills/cmo/rules/sub-agents.md +167 -0
- package/skills/cold-email/SKILL.md +240 -0
- package/skills/cold-email/evals/evals.json +94 -0
- package/skills/cold-email/references/benchmarks.md +83 -0
- package/skills/cold-email/references/follow-up-sequences.md +81 -0
- package/skills/cold-email/references/frameworks.md +90 -0
- package/skills/cold-email/references/personalization.md +79 -0
- package/skills/cold-email/references/subject-lines.md +53 -0
- package/skills/competitive-intel/SKILL.md +433 -0
- package/skills/competitive-intel/references/competitive-frameworks.md +145 -0
- package/skills/competitor-alternatives/SKILL.md +362 -0
- package/skills/competitor-alternatives/evals/evals.json +93 -0
- package/skills/competitor-alternatives/references/content-architecture.md +271 -0
- package/skills/competitor-alternatives/references/templates.md +223 -0
- package/skills/concreteness-fixer/SKILL.md +483 -0
- package/skills/concreteness-fixer/scripts/validation/concreteness-validator.js +221 -0
- package/skills/concreteness-fixer/utils/execFileNoThrow.js +16 -0
- package/skills/content-atomizer/SKILL.md +424 -0
- package/skills/content-atomizer/references/hook-strategies.md +56 -0
- package/skills/content-atomizer/references/platform-specs.md +118 -0
- package/skills/content-atomizer/references/platforms/bluesky.md +64 -0
- package/skills/content-atomizer/references/platforms/instagram.md +77 -0
- package/skills/content-atomizer/references/platforms/linkedin.md +120 -0
- package/skills/content-atomizer/references/platforms/reddit.md +73 -0
- package/skills/content-atomizer/references/platforms/threads.md +64 -0
- package/skills/content-atomizer/references/platforms/tiktok.md +55 -0
- package/skills/content-atomizer/references/platforms/twitter.md +123 -0
- package/skills/content-atomizer/references/platforms/youtube.md +56 -0
- package/skills/content-atomizer/references/tweet-patterns.md +40 -0
- package/skills/content-repost-manager/SKILL.md +245 -0
- package/skills/content-repost-manager/scripts/content-repost-scan.py +133 -0
- package/skills/context-recovery/.clawdhub/origin.json +7 -0
- package/skills/context-recovery/SKILL.md +198 -0
- package/skills/context-recovery/_meta.json +6 -0
- package/skills/conversion-flow-cro/SKILL.md +248 -0
- package/skills/conversion-flow-cro/references/flow-benchmarks.md +158 -0
- package/skills/copy-editing/SKILL.md +474 -0
- package/skills/copy-editing/evals/evals.json +89 -0
- package/skills/copy-editing/references/plain-english-alternatives.md +394 -0
- package/skills/copywriting/SKILL.md +349 -0
- package/skills/copywriting/evals/evals.json +111 -0
- package/skills/copywriting/references/awareness-level-guide.md +227 -0
- package/skills/copywriting/references/copy-frameworks.md +389 -0
- package/skills/copywriting/references/natural-transitions.md +272 -0
- package/skills/creative/SKILL.md +365 -0
- package/skills/creative/modes/ad-creative.md +1748 -0
- package/skills/creative/modes/product-photo.md +1520 -0
- package/skills/creative/modes/product-video.md +1657 -0
- package/skills/creative/modes/social-graphics.md +1511 -0
- package/skills/creative/modes/talking-head.md +2208 -0
- package/skills/creative/references/VISUAL_INTELLIGENCE.md +1233 -0
- package/skills/deep-serp-article/SKILL.md +677 -0
- package/skills/deep-serp-article/SKILL.md.bak +530 -0
- package/skills/earned-media/SKILL.md +260 -0
- package/skills/email-sequences/SKILL.md +446 -0
- package/skills/email-sequences/references/sequence-templates.md +1217 -0
- package/skills/firecrawl/.skill-meta.json +13 -0
- package/skills/firecrawl/SKILL.md +154 -0
- package/skills/firecrawl/rules/install.md +63 -0
- package/skills/firecrawl/rules/security.md +26 -0
- package/skills/form-cro/SKILL.md +429 -0
- package/skills/form-cro/evals/evals.json +90 -0
- package/skills/free-tool-strategy/SKILL.md +325 -0
- package/skills/free-tool-strategy/evals/evals.json +90 -0
- package/skills/free-tool-strategy/references/tool-types.md +253 -0
- package/skills/frontend-slides/SKILL.md +248 -0
- package/skills/frontend-slides/STYLE_PRESETS.md +347 -0
- package/skills/frontend-slides/animation-patterns.md +110 -0
- package/skills/frontend-slides/html-template.md +347 -0
- package/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/skills/frontend-slides/viewport-base.css +153 -0
- package/skills/guardrail-framework/SKILL.md +319 -0
- package/skills/hook-generator/SKILL.md +438 -0
- package/skills/hook-generator/database/2026-PLATFORM-RESEARCH.md +211 -0
- package/skills/hook-generator/database/instagram-hooks.json +591 -0
- package/skills/hook-generator/database/linkedin-hooks.json +502 -0
- package/skills/hook-generator/database/medium-hooks.json +181 -0
- package/skills/hook-generator/database/tiktok-hooks.json +337 -0
- package/skills/hook-generator/database/twitter-hooks.json +567 -0
- package/skills/hook-generator/database/youtube-hooks.json +275 -0
- package/skills/hook-generator/package-lock.json +24 -0
- package/skills/hook-generator/package.json +5 -0
- package/skills/hook-generator/references/hook-generation-system.md +257 -0
- package/skills/hook-generator/references/hook-performance-analysis.json +153 -0
- package/skills/hook-generator/references/hooks-library.md +128 -0
- package/skills/hook-generator/references/platform-hook-frameworks.md +275 -0
- package/skills/hook-generator/scripts/generate-hooks-unified.js +722 -0
- package/skills/hook-generator/scripts/generate-hooks.js +225 -0
- package/skills/hook-generator/scripts/generate.sh +36 -0
- package/skills/hook-generator/scripts/ralph-hook-enhancer.js +864 -0
- package/skills/hook-generator/scripts/test-gemini-output.js +51 -0
- package/skills/humanizer/README.md +120 -0
- package/skills/humanizer/SKILL.md +699 -0
- package/skills/image-gen/SKILL.md +277 -0
- package/skills/image-gen/references/prompt-patterns.md +114 -0
- package/skills/image-gen/references/visual-metaphors.md +51 -0
- package/skills/impeccable/SKILL.md +86 -0
- package/skills/impeccable/reference/adapt.md +312 -0
- package/skills/impeccable/reference/adapt.native.md +58 -0
- package/skills/impeccable/reference/android.md +40 -0
- package/skills/impeccable/reference/animate.md +86 -0
- package/skills/impeccable/reference/audit.md +136 -0
- package/skills/impeccable/reference/audit.native.md +139 -0
- package/skills/impeccable/reference/bolder.md +31 -0
- package/skills/impeccable/reference/clarify.md +94 -0
- package/skills/impeccable/reference/colorize.md +86 -0
- package/skills/impeccable/reference/craft-floor.md +42 -0
- package/skills/impeccable/reference/craft.md +5 -0
- package/skills/impeccable/reference/critique.md +788 -0
- package/skills/impeccable/reference/degraded/asset-producer.md +90 -0
- package/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/skills/impeccable/reference/degraded/finish-reviewer.md +37 -0
- package/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/skills/impeccable/reference/delight.md +70 -0
- package/skills/impeccable/reference/distill.md +111 -0
- package/skills/impeccable/reference/doctor.md +53 -0
- package/skills/impeccable/reference/document.md +416 -0
- package/skills/impeccable/reference/extract.md +69 -0
- package/skills/impeccable/reference/harden.md +336 -0
- package/skills/impeccable/reference/hooks.md +105 -0
- package/skills/impeccable/reference/init.md +125 -0
- package/skills/impeccable/reference/ios.md +45 -0
- package/skills/impeccable/reference/layout.md +84 -0
- package/skills/impeccable/reference/live-setup.md +102 -0
- package/skills/impeccable/reference/live.md +323 -0
- package/skills/impeccable/reference/new-work.md +110 -0
- package/skills/impeccable/reference/onboard.md +234 -0
- package/skills/impeccable/reference/operate.md +61 -0
- package/skills/impeccable/reference/optimize.md +258 -0
- package/skills/impeccable/reference/overdrive.md +127 -0
- package/skills/impeccable/reference/polish.md +97 -0
- package/skills/impeccable/reference/quieter.md +99 -0
- package/skills/impeccable/reference/routing.md +18 -0
- package/skills/impeccable/reference/shape.md +59 -0
- package/skills/impeccable/reference/typeset.md +80 -0
- package/skills/impeccable/reference/visualize.md +49 -0
- package/skills/impeccable/scripts/command-metadata.json +94 -0
- package/skills/impeccable/scripts/concept-seed.mjs +558 -0
- package/skills/impeccable/scripts/context-signals.mjs +334 -0
- package/skills/impeccable/scripts/context.mjs +1467 -0
- package/skills/impeccable/scripts/critique-storage.mjs +213 -0
- package/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/skills/impeccable/scripts/detect.mjs +21 -0
- package/skills/impeccable/scripts/detector/browser/injected/index.mjs +2023 -0
- package/skills/impeccable/scripts/detector/cli/main.mjs +438 -0
- package/skills/impeccable/scripts/detector/design-system.mjs +1046 -0
- package/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +8283 -0
- package/skills/impeccable/scripts/detector/detect-antipatterns.mjs +50 -0
- package/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +372 -0
- package/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +1168 -0
- package/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1186 -0
- package/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +264 -0
- package/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/skills/impeccable/scripts/detector/findings.mjs +18 -0
- package/skills/impeccable/scripts/detector/node/file-system.mjs +203 -0
- package/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/skills/impeccable/scripts/detector/registry/antipatterns.mjs +617 -0
- package/skills/impeccable/scripts/detector/rules/checks.mjs +5580 -0
- package/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
- package/skills/impeccable/scripts/detector/shared/constants.mjs +112 -0
- package/skills/impeccable/scripts/detector/shared/fonts.mjs +30 -0
- package/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
- package/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
- package/skills/impeccable/scripts/doctor.mjs +336 -0
- package/skills/impeccable/scripts/embed-prompt.mjs +133 -0
- package/skills/impeccable/scripts/generate-image.mjs +240 -0
- package/skills/impeccable/scripts/hook-admin.mjs +801 -0
- package/skills/impeccable/scripts/hook-before-edit.mjs +508 -0
- package/skills/impeccable/scripts/hook-lib.mjs +2153 -0
- package/skills/impeccable/scripts/hook.mjs +78 -0
- package/skills/impeccable/scripts/lib/artifact-schema.mjs +93 -0
- package/skills/impeccable/scripts/lib/composition-catalog.mjs +200 -0
- package/skills/impeccable/scripts/lib/concept-catalog.mjs +384 -0
- package/skills/impeccable/scripts/lib/design-parser.mjs +925 -0
- package/skills/impeccable/scripts/lib/impeccable-config.mjs +658 -0
- package/skills/impeccable/scripts/lib/impeccable-paths.mjs +137 -0
- package/skills/impeccable/scripts/lib/is-generated.mjs +69 -0
- package/skills/impeccable/scripts/lib/provider.mjs +5 -0
- package/skills/impeccable/scripts/lib/roll-selection.mjs +362 -0
- package/skills/impeccable/scripts/lib/staleness-deep.mjs +478 -0
- package/skills/impeccable/scripts/lib/staleness-notice.mjs +169 -0
- package/skills/impeccable/scripts/lib/staleness.mjs +457 -0
- package/skills/impeccable/scripts/lib/surface-briefs.mjs +151 -0
- package/skills/impeccable/scripts/lib/target-args.mjs +42 -0
- package/skills/impeccable/scripts/lib/target-slug.mjs +33 -0
- package/skills/impeccable/scripts/lib/template-extensions.mjs +146 -0
- package/skills/impeccable/scripts/live/accept-css.mjs +617 -0
- package/skills/impeccable/scripts/live/accept-verify.mjs +60 -0
- package/skills/impeccable/scripts/live/browser-script-parts.mjs +55 -0
- package/skills/impeccable/scripts/live/completion.mjs +28 -0
- package/skills/impeccable/scripts/live/event-validation.mjs +199 -0
- package/skills/impeccable/scripts/live/frameworks/astro.mjs +47 -0
- package/skills/impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
- package/skills/impeccable/scripts/live/frameworks/index.mjs +143 -0
- package/skills/impeccable/scripts/live/frameworks/journal.mjs +197 -0
- package/skills/impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
- package/skills/impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
- package/skills/impeccable/scripts/live/frameworks/script-src.mjs +17 -0
- package/skills/impeccable/scripts/live/frameworks/static-html.mjs +26 -0
- package/skills/impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
- package/skills/impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
- package/skills/impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
- package/skills/impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
- package/skills/impeccable/scripts/live/generation-preflight.mjs +149 -0
- package/skills/impeccable/scripts/live/insert-ui.mjs +458 -0
- package/skills/impeccable/scripts/live/instructions.mjs +142 -0
- package/skills/impeccable/scripts/live/manual-apply.mjs +939 -0
- package/skills/impeccable/scripts/live/manual-edit-routes.mjs +357 -0
- package/skills/impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
- package/skills/impeccable/scripts/live/poll-lanes.mjs +14 -0
- package/skills/impeccable/scripts/live/roots.mjs +508 -0
- package/skills/impeccable/scripts/live/session-store.mjs +563 -0
- package/skills/impeccable/scripts/live/source-lock.mjs +105 -0
- package/skills/impeccable/scripts/live/source-search.mjs +105 -0
- package/skills/impeccable/scripts/live/svelte-ast.mjs +961 -0
- package/skills/impeccable/scripts/live/svelte-component.mjs +1342 -0
- package/skills/impeccable/scripts/live/sveltekit-adapter.mjs +316 -0
- package/skills/impeccable/scripts/live/tanstack-adapter.mjs +280 -0
- package/skills/impeccable/scripts/live/ui-core.mjs +180 -0
- package/skills/impeccable/scripts/live/vocabulary.mjs +171 -0
- package/skills/impeccable/scripts/live-accept.mjs +954 -0
- package/skills/impeccable/scripts/live-browser-dom.js +146 -0
- package/skills/impeccable/scripts/live-browser-session.js +123 -0
- package/skills/impeccable/scripts/live-browser.js +12520 -0
- package/skills/impeccable/scripts/live-commit-manual-edits.mjs +1244 -0
- package/skills/impeccable/scripts/live-complete.mjs +107 -0
- package/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
- package/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/skills/impeccable/scripts/live-inject.mjs +503 -0
- package/skills/impeccable/scripts/live-insert.mjs +292 -0
- package/skills/impeccable/scripts/live-manual-edit-evidence.mjs +368 -0
- package/skills/impeccable/scripts/live-poll.mjs +429 -0
- package/skills/impeccable/scripts/live-resume.mjs +123 -0
- package/skills/impeccable/scripts/live-server.mjs +1669 -0
- package/skills/impeccable/scripts/live-status.mjs +71 -0
- package/skills/impeccable/scripts/live-target.mjs +30 -0
- package/skills/impeccable/scripts/live-wrap.mjs +927 -0
- package/skills/impeccable/scripts/live.mjs +359 -0
- package/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/skills/impeccable/scripts/palette.mjs +628 -0
- package/skills/impeccable/scripts/pin.mjs +221 -0
- package/skills/impeccable/scripts/serve-question.mjs +932 -0
- package/skills/impeccable/scripts/surface-brief.mjs +74 -0
- package/skills/inkstone-admin/SKILL.md +66 -0
- package/skills/jev-hook-gate/SKILL.md +111 -0
- package/skills/keyword-research/SKILL.md +503 -0
- package/skills/keyword-research/references/dr-cap-and-confidence.md +62 -0
- package/skills/keyword-research/references/keyword-examples.md +769 -0
- package/skills/landing-page-architect/SKILL.md +585 -0
- package/skills/landing-page-architect/references/architecture-reference.md +32 -0
- package/skills/launch-strategy/SKILL.md +384 -0
- package/skills/launch-strategy/evals/evals.json +91 -0
- package/skills/launch-strategy/references/launch-checklist.md +209 -0
- package/skills/launch-strategy/references/launch-timeline.md +159 -0
- package/skills/lead-email-craft/SKILL.md +522 -0
- package/skills/lead-magnets/SKILL.md +310 -0
- package/skills/lead-magnets/references/benchmarks.md +129 -0
- package/skills/lead-magnets/references/format-guide.md +196 -0
- package/skills/link-building-seo/SKILL.md +210 -0
- package/skills/lint-report.txt +1 -0
- package/skills/manifest.json +129 -0
- package/skills/marketing-demo/SKILL.md +249 -0
- package/skills/marketing-demo/references/remotion-examples.md +281 -0
- package/skills/marketing-ideas/SKILL.md +167 -0
- package/skills/marketing-ideas/evals/evals.json +90 -0
- package/skills/marketing-ideas/references/ideas-by-category.md +366 -0
- package/skills/marketing-psychology/SKILL.md +374 -0
- package/skills/marketing-psychology/evals/evals.json +88 -0
- package/skills/marketing-psychology/references/case-studies.md +148 -0
- package/skills/narrative-research-article/SKILL.md +469 -0
- package/skills/narrative-research-article/references/lanusse-patterns.md +166 -0
- package/skills/notebooklm/SKILL.md +674 -0
- package/skills/off-page-seo/SKILL.md +219 -0
- package/skills/onboarding-cro/SKILL.md +220 -0
- package/skills/onboarding-cro/evals/evals.json +92 -0
- package/skills/onboarding-cro/references/experiments.md +258 -0
- package/skills/original-research/SKILL.md +388 -0
- package/skills/page-cro/SKILL.md +269 -0
- package/skills/page-cro/references/cro-benchmarks.md +140 -0
- package/skills/paper-marketing/SKILL.md +448 -0
- package/skills/paper-marketing/references/agent-quality-rubric.md +68 -0
- package/skills/paper-marketing/references/brand-system-template.md +120 -0
- package/skills/paper-marketing/references/paper-mcp-rules.md +71 -0
- package/skills/paper-marketing/references/platform-conventions.md +43 -0
- package/skills/paywall-upgrade-cro/SKILL.md +227 -0
- package/skills/paywall-upgrade-cro/evals/evals.json +93 -0
- package/skills/paywall-upgrade-cro/references/experiments.md +164 -0
- package/skills/platform-formatting/SKILL.md +51 -0
- package/skills/popup-cro/SKILL.md +454 -0
- package/skills/popup-cro/evals/evals.json +94 -0
- package/skills/positioning-angles/SKILL.md +524 -0
- package/skills/positioning-angles/references/ad-matrix-and-examples.md +176 -0
- package/skills/positioning-angles/references/angle-frameworks.md +187 -0
- package/skills/positioning-angles/references/dunford-positioning.md +135 -0
- package/skills/positioning-angles/references/hormozi-offer.md +247 -0
- package/skills/positioning-angles/references/schwartz-sophistication.md +166 -0
- package/skills/positioning-angles/references/unique-mechanism.md +162 -0
- package/skills/pricing-strategy/SKILL.md +346 -0
- package/skills/pricing-strategy/evals/evals.json +90 -0
- package/skills/pricing-strategy/references/research-methods.md +152 -0
- package/skills/pricing-strategy/references/tier-structure.md +307 -0
- package/skills/programmatic-seo/SKILL.md +238 -0
- package/skills/programmatic-seo/evals/evals.json +94 -0
- package/skills/programmatic-seo/references/playbooks.md +308 -0
- package/skills/project-rag/SKILL.md +127 -0
- package/skills/quality-gate/SKILL.md +519 -0
- package/skills/quality-gate/judge-personas/buyer.md +47 -0
- package/skills/quality-gate/judge-personas/expert.md +47 -0
- package/skills/quality-gate/judge-personas/outsider.md +47 -0
- package/skills/quality-gate/judge-personas/scanner.md +41 -0
- package/skills/quality-gate/judge-personas/skeptic.md +40 -0
- package/skills/referral-program/SKILL.md +290 -0
- package/skills/referral-program/evals/evals.json +89 -0
- package/skills/referral-program/references/affiliate-programs.md +163 -0
- package/skills/referral-program/references/program-examples.md +143 -0
- package/skills/review-sites/SKILL.md +279 -0
- package/skills/revops/SKILL.md +343 -0
- package/skills/revops/evals/evals.json +91 -0
- package/skills/revops/references/automation-playbooks.md +290 -0
- package/skills/revops/references/lifecycle-definitions.md +278 -0
- package/skills/revops/references/routing-rules.md +203 -0
- package/skills/revops/references/scoring-models.md +247 -0
- package/skills/saas-product-seo/SKILL.md +324 -0
- package/skills/sales-enablement/SKILL.md +349 -0
- package/skills/sales-enablement/evals/evals.json +91 -0
- package/skills/sales-enablement/references/deck-frameworks.md +263 -0
- package/skills/sales-enablement/references/demo-scripts.md +355 -0
- package/skills/sales-enablement/references/objection-library.md +270 -0
- package/skills/sales-enablement/references/one-pager-templates.md +208 -0
- package/skills/schema-markup/SKILL.md +179 -0
- package/skills/schema-markup/evals/evals.json +87 -0
- package/skills/schema-markup/references/schema-examples.md +398 -0
- package/skills/self-improve/SKILL.md +166 -0
- package/skills/self-improving-agent/README.md +243 -0
- package/skills/self-improving-agent/SKILL.md +437 -0
- package/skills/self-improving-agent/scripts/__init__.py +16 -0
- package/skills/self-improving-agent/scripts/__pycache__/auto_detect.cpython-314.pyc +0 -0
- package/skills/self-improving-agent/scripts/__pycache__/nlm_curation.cpython-314.pyc +0 -0
- package/skills/self-improving-agent/scripts/__pycache__/self_improving_agent.cpython-314.pyc +0 -0
- package/skills/self-improving-agent/scripts/auto_detect.py +270 -0
- package/skills/self-improving-agent/scripts/init_expertise_registry.py +89 -0
- package/skills/self-improving-agent/scripts/nlm_curation.py +259 -0
- package/skills/self-improving-agent/scripts/self-improving-agent +113 -0
- package/skills/self-improving-agent/scripts/self_improving_agent.py +603 -0
- package/skills/self-improving-agent/scripts/test_curation_scorer.py +20 -0
- package/skills/self-improving-agent/scripts/test_self_improving.py +184 -0
- package/skills/send-email/SKILL.md +426 -0
- package/skills/send-email/references/batch-email-examples.md +807 -0
- package/skills/send-email/references/best-practices.md +453 -0
- package/skills/send-email/references/installation.md +123 -0
- package/skills/send-email/references/single-email-examples.md +470 -0
- package/skills/send-email/references/webhooks.md +221 -0
- package/skills/seo-audit/SKILL.md +362 -0
- package/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/skills/seo-audit/references/architecture-patterns.md +271 -0
- package/skills/seo-audit/references/schema-templates.md +427 -0
- package/skills/seo-content/SKILL.md +510 -0
- package/skills/seo-content/references/anti-ai-detection.md +184 -0
- package/skills/seo-content/references/content-structures.md +148 -0
- package/skills/seo-content/references/eeat-examples.md +235 -0
- package/skills/seo-content/references/on-page-seo.md +261 -0
- package/skills/seo-content/references/pseo-playbooks.md +226 -0
- package/skills/seo-content/references/schema-templates.md +104 -0
- package/skills/seo-content/references/serp-analysis-format.md +151 -0
- package/skills/seo-machine/SKILL.md +331 -0
- package/skills/seo-machine/assets/brand-template.md +73 -0
- package/skills/seo-machine/assets/link-inventory-template.md +74 -0
- package/skills/seo-machine/assets/roadmap-template.md +184 -0
- package/skills/seo-machine/references/api-stack-recipes.md +230 -0
- package/skills/seo-machine/references/exa-recipes.md +260 -0
- package/skills/seo-machine/references/manual-research.md +73 -0
- package/skills/seo-machine/references/methodology.md +87 -0
- package/skills/seo-machine/references/off-page.md +123 -0
- package/skills/seo-machine/references/patterns/alternatives.md +176 -0
- package/skills/seo-machine/references/patterns/compare.md +105 -0
- package/skills/seo-machine/references/patterns/playbooks.md +106 -0
- package/skills/seo-machine/references/patterns/use-case.md +109 -0
- package/skills/seo-machine/references/quality-bars.md +99 -0
- package/skills/seo-machine/references/stacks/astro.md +156 -0
- package/skills/seo-machine/references/stacks/detection.md +61 -0
- package/skills/seo-machine/references/stacks/markdown-fallback.md +181 -0
- package/skills/seo-machine/references/stacks/nextjs.md +108 -0
- package/skills/seo-machine/references/stacks/rails-inertia.md +99 -0
- package/skills/seo-machine/references/striking-distance.md +116 -0
- package/skills/seo-machine/references/technical-audit.md +153 -0
- package/skills/seo-machine/scripts/link_audit.py +265 -0
- package/skills/seo-machine/scripts/tech_audit.py +221 -0
- package/skills/seo-machine/scripts/word_count.py +154 -0
- package/skills/sharp-thesis-validator/SKILL.md +393 -0
- package/skills/sharp-thesis-validator/examples.md +186 -0
- package/skills/signup-flow-cro/SKILL.md +359 -0
- package/skills/signup-flow-cro/evals/evals.json +88 -0
- package/skills/site-architecture/SKILL.md +357 -0
- package/skills/site-architecture/evals/evals.json +88 -0
- package/skills/site-architecture/references/mermaid-templates.md +216 -0
- package/skills/site-architecture/references/navigation-patterns.md +305 -0
- package/skills/site-architecture/references/site-type-templates.md +293 -0
- package/skills/skill-self-improvement/SKILL.md +151 -0
- package/skills/slideshow-script/SKILL.md +274 -0
- package/skills/slideshow-script/references/content-spec-schema.md +77 -0
- package/skills/slideshow-script/references/frameworks.md +84 -0
- package/skills/slideshow-script/references/paips-framework.md +37 -0
- package/skills/social-campaign/SKILL.md +419 -0
- package/skills/social-campaign/references/paper-mcp-workflow.md +48 -0
- package/skills/social-content/SKILL.md +359 -0
- package/skills/social-content/evals/evals.json +92 -0
- package/skills/social-content/references/platforms.md +170 -0
- package/skills/social-content/references/post-templates.md +177 -0
- package/skills/social-content/references/reverse-engineering.md +195 -0
- package/skills/social-worker/SKILL.md +204 -0
- package/skills/startup-launcher/SKILL.md +252 -0
- package/skills/startup-launcher/references/file-router.md +64 -0
- package/skills/startup-launcher/references/platform-matrix.md +65 -0
- package/skills/startup-launcher/references/platforms/alternativeto.md +283 -0
- package/skills/startup-launcher/references/platforms/appsumo.md +495 -0
- package/skills/startup-launcher/references/platforms/auraplusplus.md +736 -0
- package/skills/startup-launcher/references/platforms/betalist.md +98 -0
- package/skills/startup-launcher/references/platforms/capterra.md +276 -0
- package/skills/startup-launcher/references/platforms/crunchbase.md +514 -0
- package/skills/startup-launcher/references/platforms/dealify.md +291 -0
- package/skills/startup-launcher/references/platforms/dealmirror.md +313 -0
- package/skills/startup-launcher/references/platforms/desifounder.md +490 -0
- package/skills/startup-launcher/references/platforms/devhunt.md +210 -0
- package/skills/startup-launcher/references/platforms/devpost.md +448 -0
- package/skills/startup-launcher/references/platforms/fazier.md +56 -0
- package/skills/startup-launcher/references/platforms/firsto.md +489 -0
- package/skills/startup-launcher/references/platforms/g2.md +226 -0
- package/skills/startup-launcher/references/platforms/hackernews.md +99 -0
- package/skills/startup-launcher/references/platforms/hackernoon.md +385 -0
- package/skills/startup-launcher/references/platforms/indiedeals.md +367 -0
- package/skills/startup-launcher/references/platforms/indiehackers.md +80 -0
- package/skills/startup-launcher/references/platforms/kenmoo.md +231 -0
- package/skills/startup-launcher/references/platforms/labstartups.md +618 -0
- package/skills/startup-launcher/references/platforms/launchboard.md +307 -0
- package/skills/startup-launcher/references/platforms/launchfast.md +560 -0
- package/skills/startup-launcher/references/platforms/launchigniter.md +56 -0
- package/skills/startup-launcher/references/platforms/launchingnext.md +674 -0
- package/skills/startup-launcher/references/platforms/launchit.md +574 -0
- package/skills/startup-launcher/references/platforms/launchyourapp.md +677 -0
- package/skills/startup-launcher/references/platforms/libhunt.md +220 -0
- package/skills/startup-launcher/references/platforms/ltdhunt.md +221 -0
- package/skills/startup-launcher/references/platforms/microlaunch.md +45 -0
- package/skills/startup-launcher/references/platforms/openalternative.md +195 -0
- package/skills/startup-launcher/references/platforms/peerlist.md +56 -0
- package/skills/startup-launcher/references/platforms/peerpush.md +64 -0
- package/skills/startup-launcher/references/platforms/primeclub.md +282 -0
- package/skills/startup-launcher/references/platforms/productcanyon.md +190 -0
- package/skills/startup-launcher/references/platforms/producthunt.md +98 -0
- package/skills/startup-launcher/references/platforms/rankinpublic.md +315 -0
- package/skills/startup-launcher/references/platforms/rockethub.md +374 -0
- package/skills/startup-launcher/references/platforms/saasgenius.md +175 -0
- package/skills/startup-launcher/references/platforms/saashub.md +205 -0
- package/skills/startup-launcher/references/platforms/saasmantra.md +221 -0
- package/skills/startup-launcher/references/platforms/saaspirate.md +287 -0
- package/skills/startup-launcher/references/platforms/saaswarrior.md +190 -0
- package/skills/startup-launcher/references/platforms/saaszilla.md +194 -0
- package/skills/startup-launcher/references/platforms/selected.md +925 -0
- package/skills/startup-launcher/references/platforms/sideprojectors.md +86 -0
- package/skills/startup-launcher/references/platforms/softonic.md +240 -0
- package/skills/startup-launcher/references/platforms/sourceforge.md +251 -0
- package/skills/startup-launcher/references/platforms/stacksocial.md +244 -0
- package/skills/startup-launcher/references/platforms/startupstash.md +326 -0
- package/skills/startup-launcher/references/platforms/theresanaiforthat.md +253 -0
- package/skills/startup-launcher/references/platforms/tinylaunch.md +70 -0
- package/skills/startup-launcher/references/platforms/tinystartups.md +72 -0
- package/skills/startup-launcher/references/platforms/toolfolio.md +291 -0
- package/skills/startup-launcher/references/platforms/trustmrr.md +194 -0
- package/skills/startup-launcher/references/platforms/trylaunch.md +531 -0
- package/skills/startup-launcher/references/platforms/uneed.md +57 -0
- package/skills/startup-launcher/references/templates/asset-checklist.md +218 -0
- package/skills/startup-launcher/references/templates/launch-tracker.md +195 -0
- package/skills/startup-launcher/references/templates/product-brief.md +98 -0
- package/skills/summarize/.skill-meta.json +13 -0
- package/skills/summarize/SKILL.md +170 -0
- package/skills/summarize/rules/install.md +157 -0
- package/skills/summarize/rules/usage.md +207 -0
- package/skills/topical-authority/SKILL.md +307 -0
- package/skills/topical-authority/references/jake-ward-framework.md +201 -0
- package/skills/topical-authority/references/serp-clustering-algorithm.md +325 -0
- package/skills/topical-authority/scripts/orchestrator.js +367 -0
- package/skills/topical-authority/scripts/seo/analyze-competitor-coverage.js +3 -0
- package/skills/topical-authority/scripts/seo/audit-internal-links.js +3 -0
- package/skills/topical-authority/scripts/seo/build-clusters-from-serp.js +3 -0
- package/skills/topical-authority/scripts/seo/extract-keywords-from-forums.js +3 -0
- package/skills/topical-authority/scripts/seo/extract-paa-questions.js +3 -0
- package/skills/topical-authority/scripts/seo/fetch-serp-urls.js +3 -0
- package/skills/topical-authority/scripts/seo/gemini-serp-clustering.js +3 -0
- package/skills/topical-authority/scripts/seo/identify-content-gaps.js +3 -0
- package/skills/topical-authority/scripts/seo/identify-research-gaps.js +3 -0
- package/skills/topical-authority/scripts/seo/scrape-quora-questions.js +3 -0
- package/skills/topical-authority/scripts/seo/scrape-reddit-pain-points.js +3 -0
- package/skills/topical-authority/scripts/seo/weave-internal-links.js +3 -0
- package/skills/visual-style/SKILL.md +199 -0
- package/skills/voice-brand-alignment/SKILL.md +70 -0
- package/skills/voice-brand-alignment/references/ai-slop-patterns.md +405 -0
- package/skills/voice-brand-alignment/scripts/validation/gemini-voice-validator.js +96 -0
- package/skills/voice-extraction/SKILL.md +234 -0
- package/skills/voice-extraction/references/extraction-prompt.md +155 -0
- package/skills/voice-extraction/references/voice-dna-template.md +168 -0
- package/skills/voice-extraction/references/voice-elements.md +259 -0
- package/skills/voice-extraction/scripts/build-corpus.js +120 -0
- package/skills/voice-extraction/scripts/collect-sources.sh +168 -0
- package/skills/warm-outbound/SKILL.md +299 -0
- package/skills/warm-outbound/templates/warm-message.md +39 -0
- package/skills/weekly-newsletter-digest/SKILL.md +78 -0
- package/skills/x-playwriter/SKILL.md +428 -0
- package/skills/x-playwriter/scripts/x-browser.js +185 -0
- package/skills/x-post-generator-openclaw/SKILL.md +138 -0
- package/skills/x-post-generator-openclaw/scripts/generate-x-post.js +537 -0
- package/skills/x-posting-playwriter/SKILL.md +203 -0
- package/skills/x-research/SKILL.md +129 -0
- package/skills/x-research/x-research.sh +85 -0
- package/skills/youtube-summarize/SKILL.md +90 -0
- package/skills/youtube-summarize/scripts/youtube-summarize.sh +143 -0
- package/src/cli.js +347 -172
- package/src/harness/deepseek-adapter.js +102 -0
- package/src/harness/deepseek.js +225 -0
- package/src/harness/opencode-adapter.js +174 -0
- package/src/harness/pi-adapter.js +172 -0
- package/src/harness/registry.js +121 -0
- package/src/harness/telemetry.js +102 -0
- package/src/harness/types.js +165 -0
- package/src/interview.js +36 -4
- package/src/postinstall.js +10 -12
- package/templates/AGENTS.md +17 -17
- package/templates/ORG.md +1 -1
- package/templates/TOOLS.md +7 -2
- package/templates/opencode.json +26 -29
- package/wiki/doctor.md +54 -0
- package/wiki/inkstone.md +4 -4
- package/wiki/opencode.md +3 -3
- package/skills/curated.txt +0 -68
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session_id": "sample-02-trading",
|
|
3
|
+
"description": "Quantitative trading strategy discussion session",
|
|
4
|
+
"channel": "discord-quant",
|
|
5
|
+
"message_count": 55,
|
|
6
|
+
"messages": [
|
|
7
|
+
{"role": "user", "content": "Let's discuss backtesting methodology. I'm seeing significant overfitting in my momentum strategy.", "ts": "2026-03-02T08:00:00Z"},
|
|
8
|
+
{"role": "assistant", "content": "Overfitting in momentum strategies is very common. Key diagnostic: compare in-sample Sharpe ratio vs out-of-sample. If IS Sharpe > 2.0 but OOS drops below 0.5, you have a problem. What's your backtest period and parameter count?", "ts": "2026-03-02T08:00:20Z"},
|
|
9
|
+
{"role": "user", "content": "In-sample 2018-2022, OOS 2023-2024. 12 parameters tuned. IS Sharpe 2.3, OOS 0.4.", "ts": "2026-03-02T08:01:00Z"},
|
|
10
|
+
{"role": "assistant", "content": "Classic overfitting signature. With 12 parameters tuned on 4 years of daily data (~1000 bars), you have roughly 83 bars per parameter — that's in overfitting territory. Rule of thumb: at least 200-500 bars per free parameter for statistical reliability. Solutions: 1) Reduce parameter count to 3-5, 2) Use walk-forward optimization instead of fixed-split, 3) Apply regularization via Bayesian optimization.", "ts": "2026-03-02T08:01:30Z"},
|
|
11
|
+
{"role": "user", "content": "Walk-forward makes sense. What window sizes do you recommend?", "ts": "2026-03-02T08:02:00Z"},
|
|
12
|
+
{"role": "assistant", "content": "For daily crypto momentum: training window 252 days (1 year), test window 63 days (1 quarter). Walk forward with 63-day steps. This gives you enough data for statistical validity while staying responsive to regime changes. Anchored walk-forward (expanding window) tends to work better in trending markets; rolling window better in mean-reverting regimes.", "ts": "2026-03-02T08:02:30Z"},
|
|
13
|
+
{"role": "user", "content": "We're trading crypto perpetuals on Binance and OKX. Should I use tick data or OHLCV?", "ts": "2026-03-02T08:03:00Z"},
|
|
14
|
+
{"role": "assistant", "content": "For strategy development: OHLCV 1-minute is sufficient for most momentum strategies and 100x cheaper to store/process. Use tick data only if you're trading at sub-minute frequencies or need to model bid-ask spread and market impact precisely. At perpetual funding rate frequencies (8hr), even 15-minute candles work fine.", "ts": "2026-03-02T08:03:30Z"},
|
|
15
|
+
{"role": "user", "content": "Our strategy holds positions for 4-24 hours. Using 5-minute OHLCV. Signal: RSI + volume momentum + funding rate.", "ts": "2026-03-02T08:04:00Z"},
|
|
16
|
+
{"role": "assistant", "content": "Good signal stack for that timeframe. A few enhancements to consider:\n- **RSI**: Use smoothed RSI (SMRSI) or RSI of RSI to reduce noise\n- **Volume momentum**: Combine with OBV (On-Balance Volume) for better confirmation\n- **Funding rate**: Funding rate extremes (>0.1% or <-0.05% per 8hr) are excellent contrarian signals — extreme positive funding often precedes corrections\n\nAlso consider adding a volatility filter (ATR-based) to avoid whipsaw during high-vol regimes.", "ts": "2026-03-02T08:04:45Z"},
|
|
17
|
+
{"role": "user", "content": "Funding rate as contrarian signal — interesting. How should I weight it vs the other signals?", "ts": "2026-03-02T08:05:00Z"},
|
|
18
|
+
{"role": "assistant", "content": "Don't weight linearly — use it as a regime filter or multiplier. When funding rate > 0.08% per 8hr: reduce long position size by 50% (crowded long). When funding < -0.03%: reduce short position size by 50% (crowded short). This avoids fighting the squeeze rather than predicting direction. Combined with RSI and volume momentum for entry, funding rate for sizing.", "ts": "2026-03-02T08:05:30Z"},
|
|
19
|
+
{"role": "user", "content": "Smart approach. What's your view on Kelly criterion for position sizing?", "ts": "2026-03-02T08:06:00Z"},
|
|
20
|
+
{"role": "assistant", "content": "Full Kelly is theoretically optimal but practically dangerous — it maximizes geometric growth but produces extreme drawdowns. In practice: use fractional Kelly (25-50% of full Kelly) for live trading. Formula: f* = (p*b - q) / b, where p=win rate, q=loss rate, b=win/loss ratio. For a strategy with 55% win rate and 1.5:1 reward/risk: f* = (0.55*1.5 - 0.45)/1.5 = 0.25, so 25% Kelly = 6.25% position size.", "ts": "2026-03-02T08:06:30Z"},
|
|
21
|
+
{"role": "user", "content": "We target 2% daily VaR at 95% confidence. How does that map to Kelly sizing?", "ts": "2026-03-02T08:07:00Z"},
|
|
22
|
+
{"role": "assistant", "content": "Different frameworks — VaR constrains tail risk, Kelly optimizes growth. Use VaR as a hard constraint and Kelly as a guide within that constraint. If Kelly says 6% position but 2% daily VaR requires max 4% position given your asset's volatility, use 4%. Scale down Kelly if it would breach VaR limits. This hybrid approach is common in professional quant funds.", "ts": "2026-03-02T08:07:30Z"},
|
|
23
|
+
{"role": "user", "content": "Good. Let's talk execution. We have 5-10 second execution latency currently.", "ts": "2026-03-02T08:15:00Z"},
|
|
24
|
+
{"role": "assistant", "content": "5-10 seconds is acceptable for 4-24 hour hold strategies — that's under 0.1% of holding period. But watch for: 1) Slippage on entry/exit during high volatility, 2) API rate limits causing order queue delays, 3) Partial fills leaving exposure. Profile your execution: time from signal to order submission, submission to acknowledgement, acknowledgement to fill.", "ts": "2026-03-02T08:15:30Z"},
|
|
25
|
+
{"role": "user", "content": "Using Python with ccxt library. Async or sync better?", "ts": "2026-03-02T08:16:00Z"},
|
|
26
|
+
{"role": "assistant", "content": "Async (ccxt.async_support) is better for trading systems: handles multiple exchange connections concurrently, doesn't block on API calls, better for WebSocket order book subscriptions. Use asyncio with proper exception handling — unhandled exceptions in async tasks can silently kill connections. Pattern:\n\n```python\nasync def place_order_safe(exchange, symbol, side, amount):\n try:\n return await exchange.create_market_order(symbol, side, amount)\n except ccxt.InsufficientFunds as e:\n logger.error(f'Insufficient funds: {e}')\n return None\n except ccxt.NetworkError as e:\n await asyncio.sleep(1)\n return await place_order_safe(exchange, symbol, side, amount) # retry\n```", "ts": "2026-03-02T08:16:45Z"},
|
|
27
|
+
{"role": "user", "content": "We handle two exchanges simultaneously — Binance and OKX. Any gotchas?", "ts": "2026-03-02T08:17:00Z"},
|
|
28
|
+
{"role": "assistant", "content": "Multi-exchange gotchas:\n1. **Clock sync**: Exchanges reject orders with >5s timestamp skew — sync system time with NTP\n2. **Rate limits differ**: Binance allows 1200 req/min, OKX 300 req/min — throttle separately\n3. **Symbol naming**: BTC/USDT:USDT (Binance perp) vs BTC-USDT-SWAP (OKX) — use ccxt's unified API but test carefully\n4. **Funding rate timing**: Both settle at 00:00/08:00/16:00 UTC but apply differently\n5. **Latency**: Keep one websocket connection per exchange alive to avoid reconnect overhead", "ts": "2026-03-02T08:17:30Z"},
|
|
29
|
+
{"role": "user", "content": "We're running on a VPS in Tokyo. How much does colocation matter for our strategy?", "ts": "2026-03-02T08:18:00Z"},
|
|
30
|
+
{"role": "assistant", "content": "For 4-24 hour holds, colocation matters minimally — you're not competing on microseconds. Tokyo VPS is fine for both Binance and OKX Asia servers. Colocation becomes critical only below 1-second strategies. Your 5-10s execution latency is dominated by: Python overhead, ccxt serialization, REST API round-trip — not geographic latency. Focus optimization there first.", "ts": "2026-03-02T08:18:30Z"},
|
|
31
|
+
{"role": "user", "content": "We're thinking of adding ML to the signal stack. XGBoost or LSTM?", "ts": "2026-03-02T08:25:00Z"},
|
|
32
|
+
{"role": "assistant", "content": "For financial time series prediction:\n\n**XGBoost**: Better interpretability, handles tabular features naturally, fast training, good with engineered features (RSI, volume ratios, etc.). Less prone to overfitting than neural nets.\n\n**LSTM**: Better at capturing temporal dependencies, but requires much more data (>10k samples), prone to overfitting on small datasets, harder to interpret.\n\nRecommendation: Start with XGBoost + careful feature engineering. Add LSTM only if you have 3+ years of high-frequency data and XGBoost has plateaued.", "ts": "2026-03-02T08:25:30Z"},
|
|
33
|
+
{"role": "user", "content": "Features we're considering: RSI, MACD, volume, funding rate, open interest change, liquidation heatmap.", "ts": "2026-03-02T08:26:00Z"},
|
|
34
|
+
{"role": "assistant", "content": "Strong feature set. Additions to consider:\n- **Order book imbalance**: (best bid qty - best ask qty) / (best bid + best ask). Real-time microstructure signal.\n- **Perpetual premium**: (perp price - index price) / index price. Measures market stress.\n- **Cross-asset correlation**: BTC correlation to ETH, SOL over rolling 24h. Regime indicator.\n- **Hour-of-day / day-of-week**: Strong seasonality in crypto (Asia morning session often bullish).\n\nWatch for **look-ahead bias** — funding rate data must be from 8hr+ ago, not current.", "ts": "2026-03-02T08:26:30Z"},
|
|
35
|
+
{"role": "user", "content": "Liquidation heatmap data — where do you source it?", "ts": "2026-03-02T08:27:00Z"},
|
|
36
|
+
{"role": "assistant", "content": "Best sources for liquidation data:\n1. **Coinglass API**: Has historical liquidation data, free tier available. `https://open-api.coinglass.com/public/v2/liquidation_history`\n2. **Binance WebSocket**: `wss://fstream.binance.com/ws/!forceOrder@arr` — real-time forced liquidation stream\n3. **Exchange dashboards**: OKX provides liquidation maps in their trading interface\n\nFor backtesting, Coinglass is easiest. For live trading, Binance WebSocket feed is most reliable.", "ts": "2026-03-02T08:27:30Z"},
|
|
37
|
+
{"role": "user", "content": "What's your view on incorporating on-chain data (exchange flows, whale wallets)?", "ts": "2026-03-02T08:30:00Z"},
|
|
38
|
+
{"role": "assistant", "content": "On-chain data has alpha but significant lag — blockchain data is confirmed 10-30 minutes after events. Useful for:\n- **Exchange inflows/outflows**: Large BTC inflow to exchanges often precedes selling pressure (Glassnode, CryptoQuant)\n- **Whale wallet tracking**: Addresses holding >1000 BTC — but requires significant data infrastructure\n- **SOPR (Spent Output Profit Ratio)**: Measures realized profit/loss on-chain; >1 means selling at profit (potential distribution zone)\n\nFor automated trading: Glassnode API ($$$) or Santiment for institutional-grade on-chain data.", "ts": "2026-03-02T08:30:30Z"},
|
|
39
|
+
{"role": "user", "content": "We use Glassnode already. What's the best on-chain metric for timing entries?", "ts": "2026-03-02T08:31:00Z"},
|
|
40
|
+
{"role": "assistant", "content": "Top 3 timing metrics from Glassnode:\n1. **aSOPR (adjusted SOPR)**: When aSOPR drops below 1.0 and bounces back, historically strong buy signal in bull markets\n2. **Exchange Reserve**: When exchange BTC reserves trend down consistently = accumulation = bullish supply shock\n3. **MVRV Z-Score**: Market Value to Realized Value; below 0 = historically excellent buy zone (rare); above 7 = danger zone\n\nCombine with your momentum signals — on-chain provides the macro regime context, momentum provides timing.", "ts": "2026-03-02T08:31:30Z"},
|
|
41
|
+
{"role": "user", "content": "Excellent framework. Let's switch to risk management. What max drawdown limits do you recommend?", "ts": "2026-03-02T08:40:00Z"},
|
|
42
|
+
{"role": "assistant", "content": "Risk management tiers:\n- **Daily drawdown limit**: 3% of AUM → reduce position size by 50%\n- **Weekly drawdown limit**: 8% of AUM → reduce to 25% of normal size\n- **Monthly drawdown limit**: 15% of AUM → halt trading, review strategy\n- **Absolute kill switch**: 20% drawdown → stop all trading, preserve capital\n\nImplement these as automated circuit breakers in your execution system, not manual checks.", "ts": "2026-03-02T08:40:30Z"},
|
|
43
|
+
{"role": "user", "content": "We currently have no automated circuit breakers. Manual oversight only. How do we implement?", "ts": "2026-03-02T08:41:00Z"},
|
|
44
|
+
{"role": "assistant", "content": "Circuit breaker implementation in Python:\n\n```python\nclass RiskManager:\n def __init__(self, initial_equity: float):\n self.peak_equity = initial_equity\n self.current_equity = initial_equity\n \n def update(self, pnl: float) -> str:\n self.current_equity += pnl\n drawdown = (self.peak_equity - self.current_equity) / self.peak_equity\n \n if drawdown >= 0.20:\n return 'HALT' # stop all trading\n elif drawdown >= 0.15:\n return 'REVIEW'\n elif drawdown >= 0.08:\n return 'REDUCE_25'\n elif drawdown >= 0.03:\n return 'REDUCE_50'\n \n if self.current_equity > self.peak_equity:\n self.peak_equity = self.current_equity\n return 'OK'\n```", "ts": "2026-03-02T08:41:30Z"},
|
|
45
|
+
{"role": "user", "content": "We'll implement this. Also want correlation-based position limits — avoid holding BTC and ETH longs simultaneously.", "ts": "2026-03-02T08:42:00Z"},
|
|
46
|
+
{"role": "assistant", "content": "Correlation-aware sizing:\n\n```python\ndef correlation_adjusted_size(positions: dict, new_asset: str, base_size: float, corr_matrix: dict) -> float:\n total_corr_exposure = 0\n for held_asset, held_size in positions.items():\n corr = corr_matrix.get((held_asset, new_asset), 0)\n total_corr_exposure += abs(corr) * held_size\n # Reduce size proportional to correlation overlap\n max_corr_exposure = 0.5 # 50% of portfolio in correlated positions\n if total_corr_exposure > max_corr_exposure:\n return base_size * (max_corr_exposure / total_corr_exposure)\n return base_size\n```\n\nUpdate corr_matrix daily using 30-day rolling returns.", "ts": "2026-03-02T08:42:30Z"},
|
|
47
|
+
{"role": "user", "content": "This is very practical. Final topic: how do we report performance to our LPs?", "ts": "2026-03-02T08:50:00Z"},
|
|
48
|
+
{"role": "assistant", "content": "LP reporting standard metrics:\n- **Returns**: Monthly, quarterly, YTD, inception-to-date (ITD)\n- **Risk metrics**: Sharpe ratio (annualized), Sortino ratio, max drawdown, Calmar ratio\n- **Attribution**: % return from each strategy/pair\n- **Benchmark**: Compare vs BTC buy-and-hold and equal-weight crypto index\n- **Risk transparency**: VaR, average position size, max correlation exposure\n\nReport monthly, share audited quarterly. Use a third-party fund administrator for credibility.", "ts": "2026-03-02T08:50:30Z"},
|
|
49
|
+
{"role": "user", "content": "We're not fund admin'd yet. What threshold requires a fund administrator?", "ts": "2026-03-02T08:51:00Z"},
|
|
50
|
+
{"role": "assistant", "content": "Fund administration becomes essential (often legally required) when:\n- AUM > $10M (most institutional LPs require it)\n- You have external LPs (vs trading your own money)\n- You're registered with SEC/CFTC or equivalent\n\nBefore that threshold, you can use prime brokers' reporting tools or build your own NAV calculation. At $1-10M AUM, Soft Ledger or Limbix offer affordable crypto fund admin starting at $500-2000/month.", "ts": "2026-03-02T08:51:30Z"},
|
|
51
|
+
{"role": "user", "content": "Good to know. Thanks for the deep dive on the quant framework today.", "ts": "2026-03-02T08:52:00Z"},
|
|
52
|
+
{"role": "assistant", "content": "Great session. You have a solid strategy foundation. Key next steps: implement walk-forward backtest, add XGBoost signal layer, build circuit breakers, and integrate Coinglass liquidation data. Track performance rigorously from day one.", "ts": "2026-03-02T08:52:15Z"}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session_id": "sample-03-ml-short",
|
|
3
|
+
"description": "Short ML model training session",
|
|
4
|
+
"channel": "discord-ml",
|
|
5
|
+
"message_count": 30,
|
|
6
|
+
"messages": [
|
|
7
|
+
{"role": "user", "content": "I'm training a text classification model. Getting 68% accuracy, want to improve.", "ts": "2026-03-03T14:00:00Z"},
|
|
8
|
+
{"role": "assistant", "content": "68% is a reasonable starting point. What's your dataset size, model architecture, and class distribution? High accuracy alone doesn't tell us much without knowing the baseline (random chance for your class balance).", "ts": "2026-03-03T14:00:20Z"},
|
|
9
|
+
{"role": "user", "content": "10k samples, 3 classes roughly equal. Using BERT-base-uncased fine-tuned. Baseline (majority class) would be ~33%.", "ts": "2026-03-03T14:01:00Z"},
|
|
10
|
+
{"role": "assistant", "content": "68% accuracy with 33% baseline = decent signal. For BERT with 10k samples, common improvement paths: 1) Try larger model (BERT-large or RoBERTa-large), 2) Longer fine-tuning with learning rate warmup, 3) Data augmentation (synonym replacement, back-translation), 4) Check if data is clean — 10k samples with noisy labels will cap you fast.", "ts": "2026-03-03T14:01:30Z"},
|
|
11
|
+
{"role": "user", "content": "Dataset is clean — manually labeled. Learning rate is 2e-5 with linear decay. Training for 3 epochs.", "ts": "2026-03-03T14:02:00Z"},
|
|
12
|
+
{"role": "assistant", "content": "Good hygiene. A few specific tuning suggestions:\n- Increase to 5 epochs — BERT often benefits from longer fine-tuning on small datasets\n- Use warmup_ratio=0.1 (10% of steps for warmup)\n- Try learning rates: 1e-5, 2e-5, 3e-5 grid search\n- Add dropout regularization: 0.1 on the classifier head\n- Use AdamW optimizer (not Adam) with weight_decay=0.01", "ts": "2026-03-03T14:02:30Z"},
|
|
13
|
+
{"role": "user", "content": "Using HuggingFace Trainer. How do I add these hyperparameters?", "ts": "2026-03-03T14:03:00Z"},
|
|
14
|
+
{"role": "assistant", "content": "```python\nfrom transformers import TrainingArguments, Trainer\n\ntraining_args = TrainingArguments(\n output_dir='./results',\n num_train_epochs=5,\n per_device_train_batch_size=16,\n learning_rate=2e-5,\n weight_decay=0.01,\n warmup_ratio=0.1,\n evaluation_strategy='epoch',\n save_strategy='epoch',\n load_best_model_at_end=True,\n metric_for_best_model='f1_macro', # better than accuracy for multi-class\n fp16=True, # if GPU supports it\n)\n```\n\nAlso track macro F1, not just accuracy, for multi-class balanced datasets.", "ts": "2026-03-03T14:03:30Z"},
|
|
15
|
+
{"role": "user", "content": "After 5 epochs with these settings: accuracy 73.5%, macro F1 72.8%. Better! Can we push further?", "ts": "2026-03-03T14:10:00Z"},
|
|
16
|
+
{"role": "assistant", "content": "Good improvement (+5.5%). To push further:\n1. **Data augmentation**: Add 2-3x more samples via back-translation (English → German → English) or using GPT-4 to paraphrase minority class samples\n2. **Ensemble**: Train 5 models with different random seeds, average logits\n3. **Larger model**: Try DeBERTa-v3-large — state-of-art for text classification benchmarks\n4. **Label smoothing**: `label_smoothing_factor=0.1` in TrainingArguments reduces overconfidence", "ts": "2026-03-03T14:10:30Z"},
|
|
17
|
+
{"role": "user", "content": "DeBERTa sounds interesting. How much bigger is it vs BERT?", "ts": "2026-03-03T14:11:00Z"},
|
|
18
|
+
{"role": "assistant", "content": "Model comparison:\n- BERT-base: 110M params, ~500MB VRAM for fine-tuning\n- BERT-large: 340M params, ~1.5GB VRAM\n- DeBERTa-v3-base: 86M params, efficient attention, outperforms BERT-large\n- DeBERTa-v3-large: 304M params, ~2GB VRAM, often top performer\n\nDeBERTa-v3-base is a great choice: smaller than BERT-large but better performance. Try `microsoft/deberta-v3-base` on HuggingFace.", "ts": "2026-03-03T14:11:30Z"},
|
|
19
|
+
{"role": "user", "content": "Switched to deberta-v3-base. Getting 76.2% accuracy, 75.9% macro F1. Nice improvement.", "ts": "2026-03-03T14:20:00Z"},
|
|
20
|
+
{"role": "assistant", "content": "Strong result! +7.5% from your starting point, +2.7% from BERT tuning. For further gains:\n- Error analysis: Look at which class pairs are most confused, add targeted training examples\n- Confidence calibration: Check if model is well-calibrated with temperature scaling\n- Threshold tuning: Optimize per-class decision thresholds if classes have different costs", "ts": "2026-03-03T14:20:30Z"},
|
|
21
|
+
{"role": "user", "content": "Error analysis shows class B (middle class) is most confused with class C. They're semantically similar.", "ts": "2026-03-03T14:21:00Z"},
|
|
22
|
+
{"role": "assistant", "content": "When two classes are semantically similar, options:\n1. **More training data**: Focus label collection effort on B vs C boundary examples\n2. **Contrastive loss**: Add a contrastive objective to push B and C embeddings apart in the representation space\n3. **Hierarchical classification**: First classify A vs (B or C), then binary B vs C — often helps with similar class pairs\n4. **Feature engineering**: Add domain-specific features that distinguish B from C (if you know what those are)", "ts": "2026-03-03T14:21:30Z"},
|
|
23
|
+
{"role": "user", "content": "Hierarchical approach makes sense domain-wise. B and C differ mainly in intensity, not type.", "ts": "2026-03-03T14:22:00Z"},
|
|
24
|
+
{"role": "assistant", "content": "Perfect — intensity distinction is exactly what hierarchical classification handles well. Implementation:\n1. Train Model 1: binary classifier (A vs B/C merged)\n2. Train Model 2: binary classifier (B vs C) using only B and C samples\n3. At inference: if Model 1 predicts B/C, pass to Model 2\n\nThis lets Model 2 specialize on the hard distinction with full capacity.", "ts": "2026-03-03T14:22:30Z"},
|
|
25
|
+
{"role": "user", "content": "Implemented hierarchical. Final metrics: accuracy 79.3%, macro F1 78.7%. Excellent!", "ts": "2026-03-03T14:35:00Z"},
|
|
26
|
+
{"role": "assistant", "content": "Outstanding! 68% → 79.3% is a major improvement. To summarize the journey: baseline BERT (68%) → hyperparameter tuning (73.5%) → DeBERTa-v3-base (76.2%) → hierarchical B vs C (79.3%). Next: evaluate on a held-out test set to confirm these gains aren't from validation set overfitting.", "ts": "2026-03-03T14:35:30Z"},
|
|
27
|
+
{"role": "user", "content": "Hold-out test set: 78.1% accuracy, 77.6% macro F1. Very close to validation — no overfitting.", "ts": "2026-03-03T14:36:00Z"},
|
|
28
|
+
{"role": "assistant", "content": "Excellent generalization gap (only 1.2% accuracy drop). You have a solid, deployable model. For production:\n- Export with `model.save_pretrained()` and `tokenizer.save_pretrained()`\n- Serve with FastAPI + HuggingFace Inference API or TorchServe\n- Monitor prediction distribution drift in production using Evidently or WhyLogs", "ts": "2026-03-03T14:36:30Z"},
|
|
29
|
+
{"role": "user", "content": "We'll use FastAPI for serving. Expected load: 500 req/sec. Will a single GPU handle that?", "ts": "2026-03-03T14:37:00Z"},
|
|
30
|
+
{"role": "assistant", "content": "DeBERTa-v3-base throughput estimates:\n- A10G GPU: ~200-300 req/sec (batch size 32, sequence length 128)\n- A100: ~500-800 req/sec\n\nFor 500 req/sec: you need 2x A10G or 1x A100 with dynamic batching. Use ONNX Runtime or TensorRT for additional 2-3x speedup. Also: set max_sequence_length to actual data (if your texts average 50 tokens, don't pad to 512).", "ts": "2026-03-03T14:37:30Z"},
|
|
31
|
+
{"role": "user", "content": "Texts average 80 tokens. We'll use ONNX optimization. Thanks for the thorough session!", "ts": "2026-03-03T14:38:00Z"},
|
|
32
|
+
{"role": "assistant", "content": "Great work iterating methodically. Your final 78.1% test accuracy with a clean hierarchy approach is production-ready. ONNX with max_length=128 should give you the throughput you need on reasonable hardware.", "ts": "2026-03-03T14:38:15Z"},
|
|
33
|
+
{"role": "user", "content": "One question: how to handle model updates in production without downtime?", "ts": "2026-03-03T14:39:00Z"},
|
|
34
|
+
{"role": "assistant", "content": "Blue-green deployment for ML models:\n1. Deploy new model version to 'green' endpoint\n2. Run shadow mode: send 5% of traffic to green, compare outputs\n3. If green metrics match, shift 50% → 100% traffic\n4. Keep blue live for 24h rollback window\n\nWith Kubernetes: use rolling updates on your model serving deployment. Set maxSurge=1, maxUnavailable=0 for zero-downtime rollout.", "ts": "2026-03-03T14:39:30Z"},
|
|
35
|
+
{"role": "user", "content": "Perfect. We'll implement blue-green. Thanks!", "ts": "2026-03-03T14:40:00Z"},
|
|
36
|
+
{"role": "assistant", "content": "Great session! You went from 68% to 78.1% test accuracy with a clean, production-ready pipeline. Good luck with the deployment!", "ts": "2026-03-03T14:40:10Z"}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session_id": "sample-04-mixed-long",
|
|
3
|
+
"description": "Mixed topics long session — system architecture, DB tuning, security",
|
|
4
|
+
"channel": "discord-general",
|
|
5
|
+
"message_count": 80,
|
|
6
|
+
"messages": [
|
|
7
|
+
{
|
|
8
|
+
"role": "user",
|
|
9
|
+
"content": "Good morning! Let's plan the microservices migration. Current monolith is 300k LOC Django.",
|
|
10
|
+
"ts": "2026-03-04T09:00:00Z"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"role": "assistant",
|
|
14
|
+
"content": "Morning! 300k LOC Django monolith is a significant migration. First key question: what's driving the migration? Scaling bottleneck, team autonomy, or tech modernization? The driver determines the migration strategy.",
|
|
15
|
+
"ts": "2026-03-04T09:00:20Z"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "user",
|
|
19
|
+
"content": "All three: we're at 50k users, 10 dev teams stepping on each other, and the monolith deploys take 40 minutes.",
|
|
20
|
+
"ts": "2026-03-04T09:01:00Z"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"role": "assistant",
|
|
24
|
+
"content": "Classic monolith pain signals. Recommended approach: Strangler Fig pattern — don't rewrite, extract services incrementally. Start with the highest-pain, most independent modules first. Based on your drivers: 1) Extract the user/auth service (enables team autonomy), 2) Extract the notification service (most independently scalable), 3) Extract payment service (highest risk isolation benefit).",
|
|
25
|
+
"ts": "2026-03-04T09:01:30Z"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"role": "user",
|
|
29
|
+
"content": "Makes sense. Our modules are: auth, products, orders, payments, notifications, analytics, admin. Where to start?",
|
|
30
|
+
"ts": "2026-03-04T09:02:00Z"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"role": "assistant",
|
|
34
|
+
"content": "Extraction priority ranking:\n1. **Notifications** — stateless, no complex DB joins, easy to extract\n2. **Auth** — high value for team autonomy, but tricky (session state, OAuth)\n3. **Analytics** — read-heavy, separate data store makes sense (ClickHouse)\n4. **Products** — core catalog, relatively stable interface\n5. **Orders** — complex state machine, extract carefully\n6. **Payments** — leave until last (most risk, most regulation)\n7. **Admin** — often easiest to keep in monolith longest\n\nStart with Notifications. Target: extract and deploy in 4-6 weeks.",
|
|
35
|
+
"ts": "2026-03-04T09:02:30Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"role": "user",
|
|
39
|
+
"content": "Notification service: we send email, SMS, and push notifications. 100k notifications/day.",
|
|
40
|
+
"ts": "2026-03-04T09:03:00Z"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"role": "assistant",
|
|
44
|
+
"content": "100k/day is very manageable. Architecture for notification service:\n- **Inbox**: RabbitMQ or Kafka queue (receive requests from monolith)\n- **Dispatcher**: Workers consuming from queue, routing by type\n- **Providers**: SendGrid (email), Twilio (SMS), FCM (push)\n- **Status tracking**: Redis for deduplication + delivery status\n- **Retry policy**: exponential backoff, max 5 retries\n- **Dead letter queue**: failed notifications for manual review\n\nLanguage: Python (FastAPI) or Go (faster for high throughput).",
|
|
45
|
+
"ts": "2026-03-04T09:03:30Z"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"role": "user",
|
|
49
|
+
"content": "We'll use Python + Celery. The monolith will call the new service via REST or gRPC?",
|
|
50
|
+
"ts": "2026-03-04T09:04:00Z"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"role": "assistant",
|
|
54
|
+
"content": "For internal service communication at your scale:\n- **REST**: Simpler, more tooling, easier debugging, HTTP/1.1 overhead\n- **gRPC**: 5-10x faster for internal calls, strongly-typed proto schemas, streaming support, but more complex setup\n\nFor notifications specifically: use async messaging (RabbitMQ) from the monolith rather than synchronous REST/gRPC. Monolith fires a message and continues — no coupling to notification service latency or availability.",
|
|
55
|
+
"ts": "2026-03-04T09:04:30Z"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"role": "user",
|
|
59
|
+
"content": "Async via RabbitMQ makes sense. We already have RabbitMQ for Celery. Same instance?",
|
|
60
|
+
"ts": "2026-03-04T09:05:00Z"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"role": "assistant",
|
|
64
|
+
"content": "Reuse the existing RabbitMQ — add a new exchange/queue namespace for notifications. Create a `notifications` virtual host or use a `notifications.*` routing key pattern. Keep them separate at the logical level even if same broker instance. This lets you migrate to dedicated broker later without code changes.",
|
|
65
|
+
"ts": "2026-03-04T09:05:20Z"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"role": "user",
|
|
69
|
+
"content": "Smart. Now let's talk about the data layer. Should notifications have its own DB?",
|
|
70
|
+
"ts": "2026-03-04T09:06:00Z"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"role": "assistant",
|
|
74
|
+
"content": "Yes — own DB is fundamental to microservices. Options:\n- **PostgreSQL**: Best for notification history, delivery status, user preferences (relational)\n- **MongoDB**: Good if notification schema varies a lot by type\n- **Start small**: Even a single-table Postgres schema works for 100k/day\n\nAvoid shared DB with monolith — tight coupling defeats the purpose of extraction. Migrate notification-related tables to new service DB during extraction.",
|
|
75
|
+
"ts": "2026-03-04T09:06:30Z"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"role": "user",
|
|
79
|
+
"content": "DB migration strategy — how do we avoid downtime during table migration?",
|
|
80
|
+
"ts": "2026-03-04T09:07:00Z"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"role": "assistant",
|
|
84
|
+
"content": "Zero-downtime DB migration steps:\n1. **Dual-write**: Monolith writes to both old table and new notification service DB\n2. **Backfill**: Copy historical data to new DB\n3. **Verification**: Compare record counts and spot-check data integrity\n4. **Cut over reads**: Switch reads to new DB, keep dual-write\n5. **Stop dual-write**: Once confident, remove old write path\n6. **Archive old tables**: Don't drop immediately — archive for 30 days\n\nTools: pglogical for Postgres logical replication, or application-level dual-write.",
|
|
85
|
+
"ts": "2026-03-04T09:07:30Z"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"role": "user",
|
|
89
|
+
"content": "This is a solid plan. Estimated timeline for full microservices migration of all 7 modules?",
|
|
90
|
+
"ts": "2026-03-04T09:08:00Z"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"role": "assistant",
|
|
94
|
+
"content": "Realistic timeline for 300k LOC Django → full microservices:\n- **Notifications**: 4-6 weeks\n- **Auth**: 6-8 weeks (SSO, OAuth, session management complexity)\n- **Analytics**: 4-6 weeks (new data store: ClickHouse)\n- **Products**: 6-10 weeks (catalog, search, inventory coupling)\n- **Orders**: 8-12 weeks (state machines, compensating transactions)\n- **Payments**: 10-14 weeks (PCI compliance, audit trails)\n- **Admin**: Keep in monolith or migrate last (12+ weeks)\n\n**Total: 18-24 months** for a disciplined, low-risk migration. Teams of 10 engineers can parallelize later extractions.",
|
|
95
|
+
"ts": "2026-03-04T09:08:30Z"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"role": "user",
|
|
99
|
+
"content": "18-24 months is what I expected. Let's pivot to DB performance. Our Postgres queries are slow.",
|
|
100
|
+
"ts": "2026-03-04T09:20:00Z"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"role": "assistant",
|
|
104
|
+
"content": "First step: identify the slow queries. Run:\n```sql\nSELECT query, mean_exec_time, calls, total_exec_time \nFROM pg_stat_statements \nORDER BY total_exec_time DESC \nLIMIT 20;\n```\n\nAlso check: `EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) <your query>`. Look for Seq Scan on large tables — that's the first thing to fix with indexes.",
|
|
105
|
+
"ts": "2026-03-04T09:20:30Z"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"role": "user",
|
|
109
|
+
"content": "Top slow query: SELECT * FROM orders WHERE user_id = X AND status = 'pending' ORDER BY created_at DESC. Table has 5M rows.",
|
|
110
|
+
"ts": "2026-03-04T09:21:00Z"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"role": "assistant",
|
|
114
|
+
"content": "Classic case. Create a composite index:\n```sql\nCREATE INDEX CONCURRENTLY idx_orders_user_status_created \nON orders(user_id, status, created_at DESC);\n```\n\nUse `CONCURRENTLY` to avoid table lock in production. The column order matters: `user_id` first (equality filter), then `status` (equality filter), then `created_at` (sort). This should reduce query time from seconds to milliseconds.",
|
|
115
|
+
"ts": "2026-03-04T09:21:30Z"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"role": "user",
|
|
119
|
+
"content": "Index created. Query went from 3.2s to 8ms. Huge improvement!",
|
|
120
|
+
"ts": "2026-03-04T09:22:00Z"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"role": "assistant",
|
|
124
|
+
"content": "400x speedup — index was definitely the bottleneck. Now check your second and third slowest queries and apply the same analysis. Also: run `pg_stat_user_indexes` to find unused indexes wasting write performance.",
|
|
125
|
+
"ts": "2026-03-04T09:22:20Z"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"role": "user",
|
|
129
|
+
"content": "Second slow query: complex JOIN across orders, products, users tables. Returns 50k rows for analytics dashboard.",
|
|
130
|
+
"ts": "2026-03-04T09:23:00Z"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"role": "assistant",
|
|
134
|
+
"content": "50k rows from OLTP for dashboard = wrong pattern. Strategies:\n1. **Materialized views**: Pre-compute the join result, refresh on schedule:\n```sql\nCREATE MATERIALIZED VIEW orders_analytics AS\nSELECT o.*, p.name AS product_name, u.email AS user_email\nFROM orders o JOIN products p ON ... JOIN users u ON ...\nWITH DATA;\n-- Refresh: REFRESH MATERIALIZED VIEW CONCURRENTLY orders_analytics;\n```\n2. **Read replica**: Route analytics queries to a read replica\n3. **Separate analytics DB**: ClickHouse or BigQuery for heavy analytics",
|
|
135
|
+
"ts": "2026-03-04T09:23:30Z"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"role": "user",
|
|
139
|
+
"content": "We'll use materialized view for now, ClickHouse later. How often should we refresh?",
|
|
140
|
+
"ts": "2026-03-04T09:24:00Z"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"role": "assistant",
|
|
144
|
+
"content": "Refresh strategy depends on data freshness requirements:\n- **Real-time dashboard**: Refresh every 5-15 minutes (`pg_cron` or Celery beat)\n- **Daily reports**: Refresh once at night during low-traffic window\n- **Event-driven**: Refresh after significant events (large order batch completed)\n\nFor analytics dashboards, 5-minute staleness is usually acceptable. Use `CONCURRENTLY` to avoid locking reads during refresh.",
|
|
145
|
+
"ts": "2026-03-04T09:24:30Z"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"role": "user",
|
|
149
|
+
"content": "Good. Let's talk security. We had a pen test and they found SQL injection vulnerabilities in legacy code.",
|
|
150
|
+
"ts": "2026-03-04T09:30:00Z"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"role": "assistant",
|
|
154
|
+
"content": "Vulnerabilities are in raw SQL queries. Run grep on Python files for patterns like .raw, .extra, execute, format with SQL. Also check third-party libs.",
|
|
155
|
+
"ts": "2026-03-04T09:30:30Z"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"role": "user",
|
|
159
|
+
"content": "Found 12 raw SQL usages. 8 are safe (parameterized), 4 are unsafe (string formatting).",
|
|
160
|
+
"ts": "2026-03-04T09:31:00Z"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"role": "assistant",
|
|
164
|
+
"content": "Fix the 4 unsafe ones immediately. Before-after:\n\n```python\n# UNSAFE:\ncursor.execute(f\"SELECT * FROM users WHERE name = '{user_input}'\")\n\n# SAFE:\ncursor.execute(\"SELECT * FROM users WHERE name = %s\", [user_input])\n```\n\nFor Django ORM equivalent:\n```python\n# UNSAFE:\nUsers.objects.extra(where=[f\"name = '{user_input}'\"])\n\n# SAFE:\nUsers.objects.filter(name=user_input)\n```\n\nAlso add a CI check: ban raw string formatting in SQL with a custom pylint/flake8 rule.",
|
|
165
|
+
"ts": "2026-03-04T09:31:30Z"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"role": "user",
|
|
169
|
+
"content": "Fixed. Pen test also found IDOR vulnerabilities — users could access other users' orders by changing order ID.",
|
|
170
|
+
"ts": "2026-03-04T09:32:00Z"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"role": "assistant",
|
|
174
|
+
"content": "IDOR (Insecure Direct Object Reference) — classic and serious. Fix pattern:\n\n```python\n# UNSAFE — trusts client-provided order_id:\norder = Order.objects.get(id=order_id)\n\n# SAFE — always scope to authenticated user:\norder = Order.objects.get(id=order_id, user=request.user)\n# If not found → 404, not 403 (don't leak existence)\n```\n\nAdd a global Django middleware that auto-scopes querysets to the authenticated user for user-owned resources. Or use `django-guardian` for object-level permissions.",
|
|
175
|
+
"ts": "2026-03-04T09:32:30Z"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"role": "user",
|
|
179
|
+
"content": "We'll add object-level permission checks everywhere. How do we prevent this class of bug in future code?",
|
|
180
|
+
"ts": "2026-03-04T09:33:00Z"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"role": "assistant",
|
|
184
|
+
"content": "Prevention strategies:\n1. **Code review checklist**: Add 'Check: is this query scoped to authenticated user?' to PR template\n2. **Custom QuerySet managers**: Create `UserScopedQuerySet` that auto-adds `filter(user=request.user)` — hard to forget\n3. **Integration tests**: Test that user A cannot access user B's resources (automated IDOR detection)\n4. **Static analysis**: Semgrep rules to detect `objects.get(id=...)` without user scoping\n5. **Security training**: Ensure all devs understand OWASP Top 10",
|
|
185
|
+
"ts": "2026-03-04T09:33:30Z"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"role": "user",
|
|
189
|
+
"content": "Let's add rate limiting too. We have no rate limits on our API endpoints.",
|
|
190
|
+
"ts": "2026-03-04T09:40:00Z"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"role": "assistant",
|
|
194
|
+
"content": "Critical gap. Rate limiting layers:\n1. **Infrastructure**: Nginx rate limiting (`limit_req_zone`) as first line\n2. **Application**: `django-ratelimit` or `djangorestframework-throttling`\n3. **Auth endpoints**: Strictest limits (login: 5/min, password reset: 3/hour)\n4. **API endpoints**: Tiered by user plan (free: 100/min, paid: 1000/min)\n\nUse Redis as the rate limit backend for distributed counting across multiple servers.",
|
|
195
|
+
"ts": "2026-03-04T09:40:30Z"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"role": "user",
|
|
199
|
+
"content": "DRF throttling config for tiered limits?",
|
|
200
|
+
"ts": "2026-03-04T09:41:00Z"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"role": "assistant",
|
|
204
|
+
"content": "```python\n# settings.py\nREST_FRAMEWORK = {\n 'DEFAULT_THROTTLE_CLASSES': [\n 'api.throttles.TieredRateThrottle',\n ],\n}\n\n# api/throttles.py\nfrom rest_framework.throttling import UserRateThrottle\n\nclass TieredRateThrottle(UserRateThrottle):\n def get_rate(self):\n user = self.request.user\n if not user.is_authenticated:\n return '30/min'\n if user.plan == 'enterprise':\n return '5000/min'\n elif user.plan == 'pro':\n return '1000/min'\n else:\n return '100/min'\n```",
|
|
205
|
+
"ts": "2026-03-04T09:41:30Z"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"role": "user",
|
|
209
|
+
"content": "Perfect. Let's also add API key auth for our B2B clients who prefer that over JWT.",
|
|
210
|
+
"ts": "2026-03-04T09:42:00Z"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"role": "assistant",
|
|
214
|
+
"content": "API key authentication in Django:\n```python\n# models.py\nclass APIKey(models.Model):\n user = models.ForeignKey(User, on_delete=models.CASCADE)\n key = models.CharField(max_length=64, unique=True, db_index=True)\n name = models.CharField(max_length=100) # 'Production', 'Test'\n created_at = models.DateTimeField(auto_now_add=True)\n last_used = models.DateTimeField(null=True)\n is_active = models.BooleanField(default=True)\n \n @classmethod\n def generate(cls, user, name):\n import secrets\n key = secrets.token_urlsafe(32) # 256-bit entropy\n return cls.objects.create(user=user, key=key, name=name)\n\n# authentication.py \nclass APIKeyAuthentication(BaseAuthentication):\n def authenticate(self, request):\n key = request.headers.get('X-API-Key')\n if not key:\n return None\n try:\n api_key = APIKey.objects.select_related('user').get(key=key, is_active=True)\n api_key.last_used = timezone.now()\n api_key.save(update_fields=['last_used'])\n return (api_key.user, api_key)\n except APIKey.DoesNotExist:\n raise AuthenticationFailed('Invalid API key')\n```",
|
|
215
|
+
"ts": "2026-03-04T09:42:30Z"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"role": "user",
|
|
219
|
+
"content": "Excellent implementation. One concern: should we hash API keys in the DB like passwords?",
|
|
220
|
+
"ts": "2026-03-04T09:43:00Z"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"role": "assistant",
|
|
224
|
+
"content": "Yes — hash API keys! If your DB is compromised, plaintext API keys = immediate account takeover for all customers. Use a hash for storage, show the key only once at creation:\n\n```python\nimport hashlib, secrets\n\nclass APIKey(models.Model):\n user = models.ForeignKey(User, on_delete=models.CASCADE)\n key_hash = models.CharField(max_length=64, unique=True, db_index=True) # SHA-256 hex\n key_prefix = models.CharField(max_length=8) # first 8 chars for display\n \n @classmethod\n def generate(cls, user, name):\n raw_key = secrets.token_urlsafe(32)\n key_hash = hashlib.sha256(raw_key.encode()).hexdigest()\n obj = cls.objects.create(user=user, key_hash=key_hash, \n key_prefix=raw_key[:8], name=name)\n return obj, raw_key # return raw_key ONCE, never stored again\n```",
|
|
225
|
+
"ts": "2026-03-04T09:43:30Z"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"role": "user",
|
|
229
|
+
"content": "Brilliant — hashed keys from day one. Thank you for this comprehensive session.",
|
|
230
|
+
"ts": "2026-03-04T09:50:00Z"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"role": "assistant",
|
|
234
|
+
"content": "Productive session! Key decisions made:\n- Microservices migration via Strangler Fig, starting with Notifications (4-6 weeks)\n- Postgres: composite index → 400x speedup, materialized views for analytics\n- Security: Fixed 4 SQL injection points, IDOR protection pattern, hashed API keys\n- Rate limiting: Nginx + DRF tiered throttling with Redis backend\n- Timeline: 18-24 months for full migration\n\nYou have a solid roadmap. Good luck!",
|
|
235
|
+
"ts": "2026-03-04T09:50:30Z"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"role": "user",
|
|
239
|
+
"content": "One more: we need GDPR compliance. What's the minimum viable implementation?",
|
|
240
|
+
"ts": "2026-03-04T09:55:00Z"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"role": "assistant",
|
|
244
|
+
"content": "GDPR minimum viable compliance for a B2B SaaS:\n1. **Data inventory**: Document what PII you collect, why, and where it's stored\n2. **Privacy policy**: Clear, plain-language policy (not just legalese)\n3. **Consent management**: Explicit opt-in for marketing, cookie consent banner\n4. **Data subject rights**: API endpoints for access, export, and deletion requests\n5. **Right to erasure**: Ability to anonymize/delete all user data on request\n6. **Data breach notification**: Process to notify within 72 hours of breach\n7. **DPA agreements**: Data Processing Agreements with all sub-processors (AWS, SendGrid, Twilio)",
|
|
245
|
+
"ts": "2026-03-04T09:55:30Z"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"role": "user",
|
|
249
|
+
"content": "Right to erasure is tricky for us — orders have legal retention requirements (7 years in EU).",
|
|
250
|
+
"ts": "2026-03-04T09:56:00Z"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"role": "assistant",
|
|
254
|
+
"content": "Correct — financial records have retention obligations that override right to erasure. Handle this by:\n1. **Pseudonymization**: Replace user PII with an anonymized ID in historical orders. Replace name='Alice' with name='user_anon_abc123', email → null.\n2. **Retain the transaction record**: Legal requirement\n3. **Delete the link**: Remove the mapping table that connects anon_id to the real user after retention period\n\nThis satisfies both GDPR (user data effectively deleted) and financial regulations (transaction records preserved).",
|
|
255
|
+
"ts": "2026-03-04T09:56:30Z"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"role": "user",
|
|
259
|
+
"content": "That's the right approach. We'll implement pseudonymization in our erasure pipeline. Thanks!",
|
|
260
|
+
"ts": "2026-03-04T09:57:00Z"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"role": "assistant",
|
|
264
|
+
"content": "Perfect solution. Document it clearly in your data retention policy — the pseudonymization approach is explicitly recognized by GDPR Article 4(5) as effective anonymization. Makes audits much easier.",
|
|
265
|
+
"ts": "2026-03-04T09:57:15Z"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"role": "user",
|
|
269
|
+
"content": "What's the best way to track all these architecture decisions we've made today?",
|
|
270
|
+
"ts": "2026-03-04T10:00:00Z"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"role": "assistant",
|
|
274
|
+
"content": "Architecture Decision Records (ADRs). Simple markdown files in your repo:\n```\ndocs/adr/\n 0001-microservices-strangler-fig.md\n 0002-notifications-first-extraction.md\n 0003-hashed-api-keys.md\n 0004-gdpr-pseudonymization.md\n```\n\nEach ADR has: Title, Status, Context, Decision, Consequences. Use the `adr-tools` CLI to generate templates. This creates an auditable trail of why decisions were made — invaluable 18 months into a migration.",
|
|
275
|
+
"ts": "2026-03-04T10:00:30Z"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"role": "user",
|
|
279
|
+
"content": "We'll create ADRs today. Great suggestion. Thanks for the productive session!",
|
|
280
|
+
"ts": "2026-03-04T10:01:00Z"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"role": "assistant",
|
|
284
|
+
"content": "Excellent work! You have a clear path forward on architecture, security, compliance, and DB performance. The ADRs will keep the whole team aligned through the migration. Good luck!",
|
|
285
|
+
"ts": "2026-03-04T10:01:10Z"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"role": "user",
|
|
289
|
+
"content": "Last thing: our monitoring shows memory leak in Django. RSS growing 10MB/hour.",
|
|
290
|
+
"ts": "2026-03-04T10:05:00Z"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"role": "assistant",
|
|
294
|
+
"content": "Django memory leaks typically come from: 1) `django.db.connection.queries` — Django stores all queries in DEBUG=True mode (never run DEBUG=True in production!), 2) Circular references in signals, 3) Large queryset evaluation stored in memory, 4) Third-party middleware accumulating state. Check: `import gc; gc.collect(); process memory before/after request`. Also: `memory_profiler` to profile per-function allocation.",
|
|
295
|
+
"ts": "2026-03-04T10:05:30Z"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"role": "user",
|
|
299
|
+
"content": "DEBUG was True in production! Fixed. Memory leak stopped immediately.",
|
|
300
|
+
"ts": "2026-03-04T10:06:00Z"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"role": "assistant",
|
|
304
|
+
"content": "Classic! DEBUG=True caches every SQL query ever executed in memory. This is one of the most common Django production mistakes. Add a check to your deployment pipeline: `grep 'DEBUG = True' settings/production.py` and fail the build if found. Also ensure SECRET_KEY is different in production.",
|
|
305
|
+
"ts": "2026-03-04T10:06:15Z"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"role": "user",
|
|
309
|
+
"content": "Will add that CI check. Thanks again!",
|
|
310
|
+
"ts": "2026-03-04T10:06:30Z"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"role": "assistant",
|
|
314
|
+
"content": "Solid session from start to finish! Good luck with the migration and security hardening.",
|
|
315
|
+
"ts": "2026-03-04T10:06:35Z"
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session_id": "sample-05-sysadmin",
|
|
3
|
+
"description": "System administration and network configuration session",
|
|
4
|
+
"channel": "discord-sysops",
|
|
5
|
+
"message_count": 50,
|
|
6
|
+
"messages": [
|
|
7
|
+
{"role": "user", "content": "Need help setting up a VPN between our office and AWS VPC. Currently using WireGuard.", "ts": "2026-03-05T10:00:00Z"},
|
|
8
|
+
{"role": "assistant", "content": "WireGuard for site-to-site VPN is a great choice — simpler than IPSec, performant, and easy to maintain. Are you connecting from a static IP office? And which AWS region is your VPC in? Do you want a managed solution (AWS VPN) or self-managed (EC2 running WireGuard)?", "ts": "2026-03-05T10:00:20Z"},
|
|
9
|
+
{"role": "user", "content": "Static IP office, us-west-2 region. Want self-managed WireGuard on EC2 for cost savings. Office CIDR: 10.0.0.0/24, VPC CIDR: 172.31.0.0/16.", "ts": "2026-03-05T10:01:00Z"},
|
|
10
|
+
{"role": "assistant", "content": "Perfect setup for self-managed WireGuard. Here's the plan:\n1. Launch EC2 t3.micro in public subnet, assign Elastic IP\n2. Disable source/destination check on the EC2 instance\n3. Install WireGuard: `apt install wireguard`\n4. Configure routing on EC2 to forward traffic to VPC\n5. Configure WireGuard on office router/server\n\nI'll walk through each step.", "ts": "2026-03-05T10:01:30Z"},
|
|
11
|
+
{"role": "user", "content": "EC2 is up with Elastic IP 10.0.0.X. Source/dest check disabled. WireGuard installed.", "ts": "2026-03-05T10:05:00Z"},
|
|
12
|
+
{"role": "assistant", "content": "Great. Now configure WireGuard on the EC2 side. Create `/etc/wireguard/wg0.conf`:\n\n```ini\n[Interface]\nAddress = 10.200.0.1/24\nListenPort = 51820\nPrivateKey = <ec2-private-key>\n# Enable IP forwarding and NAT\nPostUp = sysctl -w net.ipv4.ip_forward=1; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\n\n[Peer]\nPublicKey = <office-public-key>\nAllowedIPs = 10.0.0.0/24\n```\n\nGenerate keys: `wg genkey | tee privatekey | wg pubkey > publickey`", "ts": "2026-03-05T10:05:30Z"},
|
|
13
|
+
{"role": "user", "content": "Keys generated. Office config set up similarly. When I run wg-quick up wg0, getting 'Address already in use'.", "ts": "2026-03-05T10:08:00Z"},
|
|
14
|
+
{"role": "assistant", "content": "The 10.200.0.1/24 subnet might conflict with an existing interface. Check: `ip addr show` and `ip route show`. If wg0 is partially up: `wg-quick down wg0` then `wg-quick up wg0`. If 10.200.0.0/24 is actually in use on this system, change the WireGuard interface address to 10.200.1.0/24.", "ts": "2026-03-05T10:08:30Z"},
|
|
15
|
+
{"role": "user", "content": "Found a docker0 bridge at 10.200.0.1. Changed WireGuard to 10.200.2.0/24. Now up!", "ts": "2026-03-05T10:09:00Z"},
|
|
16
|
+
{"role": "assistant", "content": "Good catch! Docker commonly uses 10.200.x.x ranges. Now verify the tunnel:\n```bash\n# From EC2, ping office gateway:\nping 10.0.0.1 -c 4\n\n# Check WireGuard status:\nwg show\n# Look for 'latest handshake' — if within last 2 min, tunnel is live\n```", "ts": "2026-03-05T10:09:30Z"},
|
|
17
|
+
{"role": "user", "content": "wg show shows handshake 30 seconds ago. But ping to 10.0.0.1 failing.", "ts": "2026-03-05T10:10:00Z"},
|
|
18
|
+
{"role": "assistant", "content": "Handshake succeeds but routing fails. Check:\n1. EC2 Security Group: allow UDP 51820 inbound from office IP, and ICMP for ping\n2. VPC Route Table: add route `10.0.0.0/24 → EC2 instance ID`\n3. Office firewall: allow traffic from 172.31.0.0/16\n4. IP forwarding: `cat /proc/sys/net/ipv4/ip_forward` should return 1\n\nAlso: `sudo tcpdump -i wg0 icmp` on EC2 — do you see packets arriving?", "ts": "2026-03-05T10:10:30Z"},
|
|
19
|
+
{"role": "user", "content": "tcpdump shows ICMP arriving on wg0 but no reply. Found it: VPC route table missing the 10.0.0.0/24 route!", "ts": "2026-03-05T10:11:00Z"},
|
|
20
|
+
{"role": "assistant", "content": "Classic! The VPC route table routes traffic INTO the VPC but needs to know to send 10.0.0.0/24 traffic BACK through your WireGuard EC2 instance. Add route: destination `10.0.0.0/24`, target `Instance ID of WireGuard EC2`.", "ts": "2026-03-05T10:11:20Z"},
|
|
21
|
+
{"role": "user", "content": "Route added. Ping works both ways now! VPN tunnel is up.", "ts": "2026-03-05T10:12:00Z"},
|
|
22
|
+
{"role": "assistant", "content": "Excellent! Enable WireGuard auto-start: `systemctl enable wg-quick@wg0`. Also set up monitoring — alert if the tunnel goes down. A simple cron: `* * * * * ping -c 1 10.0.0.1 || systemctl restart wg-quick@wg0` as a basic keepalive.", "ts": "2026-03-05T10:12:30Z"},
|
|
23
|
+
{"role": "user", "content": "Done. Next topic: our Nginx is serving HTTP, need to add HTTPS with Let's Encrypt.", "ts": "2026-03-05T10:20:00Z"},
|
|
24
|
+
{"role": "assistant", "content": "Certbot for Let's Encrypt with Nginx — straightforward:\n```bash\n# Install certbot\napt install certbot python3-certbot-nginx\n\n# Obtain and install certificate:\ncertbot --nginx -d example.com -d www.example.com\n\n# Test auto-renewal:\ncertbot renew --dry-run\n```\n\nCertbot automatically modifies your Nginx config to add HTTPS and redirect HTTP→HTTPS. Certificates auto-renew via systemd timer.", "ts": "2026-03-05T10:20:30Z"},
|
|
25
|
+
{"role": "user", "content": "Certbot ran successfully. But now getting 'too many redirects' in browser.", "ts": "2026-03-05T10:21:00Z"},
|
|
26
|
+
{"role": "assistant", "content": "Redirect loop usually means your app thinks it's getting HTTP even though Nginx is serving HTTPS. If your app is behind a load balancer or proxy: set `X-Forwarded-Proto` header handling in your app. For Django: add `SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')`. For Node.js/Express: `app.set('trust proxy', 1)`. Also check Nginx: you may have double redirect rules.", "ts": "2026-03-05T10:21:30Z"},
|
|
27
|
+
{"role": "user", "content": "Found it — Nginx config had both Certbot's redirect AND my manual HTTP→HTTPS redirect. Removed duplicate. Fixed!", "ts": "2026-03-05T10:22:00Z"},
|
|
28
|
+
{"role": "assistant", "content": "Classic double-redirect issue when Certbot edits an already-modified config. Test your SSL: `curl -I https://example.com` and check the SSL rating at ssllabs.com/ssltest. Add HSTS header for extra security:\n```nginx\nadd_header Strict-Transport-Security \"max-age=31536000; includeSubDomains\" always;\n```", "ts": "2026-03-05T10:22:30Z"},
|
|
29
|
+
{"role": "user", "content": "SSL Labs gives A rating. Added HSTS. Now: our syslog is growing too large. 50GB of logs.", "ts": "2026-03-05T10:30:00Z"},
|
|
30
|
+
{"role": "assistant", "content": "50GB is manageable with proper log rotation. Check current logrotate config: `cat /etc/logrotate.d/syslog`. Standard fix:\n```\n/var/log/syslog {\n daily\n rotate 7\n compress\n delaycompress\n missingok\n notifempty\n postrotate\n /usr/lib/rsyslog/rsyslog-rotate\n endscript\n}\n```\n\nAlso: identify what's generating so much log. `sudo du -sh /var/log/*` and `sudo journalctl --disk-usage`.", "ts": "2026-03-05T10:30:30Z"},
|
|
31
|
+
{"role": "user", "content": "Found source: a misconfigured app logging every request at DEBUG level in production. Fixed to INFO. Also applied logrotate.", "ts": "2026-03-05T10:31:00Z"},
|
|
32
|
+
{"role": "assistant", "content": "Excellent root-cause fix. After changing log level, restart the app and verify: `tail -f /var/log/app.log` should show only INFO and above. Log volume should drop 90%+. Set up disk usage alerting: alert at 70% disk usage so you catch this earlier next time.", "ts": "2026-03-05T10:31:30Z"},
|
|
33
|
+
{"role": "user", "content": "Will add disk monitoring. Our backup strategy is manual rsync. Should we automate this?", "ts": "2026-03-05T10:35:00Z"},
|
|
34
|
+
{"role": "assistant", "content": "Yes, absolutely automate backups. Recommended stack:\n1. **Database**: `pg_dump` or `mysqldump` → compress → S3 (use `aws s3 cp` or `rclone`)\n2. **Files**: `restic` — deduplication, encryption, S3/B2 backend, excellent retention policies\n3. **Schedule**: cron or systemd timers\n4. **Test restores**: Monthly restore test to verify backups are valid\n5. **3-2-1 rule**: 3 copies, 2 different media, 1 offsite (S3 is your offsite)\n\nRestic example: `restic -r s3:s3.amazonaws.com/my-backups backup /data --password-file /etc/restic-password`", "ts": "2026-03-05T10:35:30Z"},
|
|
35
|
+
{"role": "user", "content": "We use Postgres. Show me a complete backup script.", "ts": "2026-03-05T10:36:00Z"},
|
|
36
|
+
{"role": "assistant", "content": "```bash\n#!/bin/bash\n# postgres-backup.sh — Daily Postgres backup to S3\n\nset -euo pipefail\n\nDATE=$(date +%Y-%m-%d-%H%M)\nDB_NAME=\"myapp\"\nBACKUP_DIR=\"/tmp/backups\"\nS3_BUCKET=\"s3://my-company-backups/postgres\"\n\nmkdir -p \"$BACKUP_DIR\"\n\n# Dump all databases\npg_dumpall -U postgres | gzip > \"$BACKUP_DIR/postgres-$DATE.sql.gz\"\n\n# Upload to S3\naws s3 cp \"$BACKUP_DIR/postgres-$DATE.sql.gz\" \"$S3_BUCKET/postgres-$DATE.sql.gz\"\n\n# Verify upload\naws s3 ls \"$S3_BUCKET/postgres-$DATE.sql.gz\" || { echo 'Upload failed!'; exit 1; }\n\n# Cleanup local backup\nrm -f \"$BACKUP_DIR/postgres-$DATE.sql.gz\"\n\n# Delete S3 backups older than 30 days\naws s3 ls \"$S3_BUCKET/\" | awk '{print $4}' | while read f; do\n fdate=$(echo \"$f\" | grep -oP '\\d{4}-\\d{2}-\\d{2}' | head -1)\n if [[ $(date -d \"$fdate\" +%s 2>/dev/null) -lt $(date -d '30 days ago' +%s) ]]; then\n aws s3 rm \"$S3_BUCKET/$f\"\n fi\ndone\n\necho \"Backup completed: postgres-$DATE.sql.gz\"\n```\n\nAdd to cron: `0 2 * * * /opt/scripts/postgres-backup.sh >> /var/log/backup.log 2>&1`", "ts": "2026-03-05T10:36:30Z"},
|
|
37
|
+
{"role": "user", "content": "Perfect script. Will add monitoring for backup success/failure via email.", "ts": "2026-03-05T10:37:00Z"},
|
|
38
|
+
{"role": "assistant", "content": "For backup monitoring, add to the script's error handler:\n```bash\ntrap 'echo \"Backup FAILED at $(date)\" | mail -s \"BACKUP FAILURE\" ops@company.com' ERR\n```\n\nOr use a dead man's switch service like Healthchecks.io — your backup script pings a URL on success; if no ping within 25 hours, it alerts you. More reliable than error-only email alerts.", "ts": "2026-03-05T10:37:30Z"},
|
|
39
|
+
{"role": "user", "content": "Great. We're also planning to move from bare metal to cloud. What's the migration checklist?", "ts": "2026-03-05T10:45:00Z"},
|
|
40
|
+
{"role": "assistant", "content": "Bare metal to AWS migration checklist:\n\n**Assessment:**\n- [ ] Inventory all services (app servers, DBs, caches, file storage)\n- [ ] Measure CPU/memory usage patterns over 4 weeks\n- [ ] Identify compliance/data residency requirements\n- [ ] Calculate TCO: bare metal vs AWS\n\n**Pre-migration:**\n- [ ] Set up AWS account with billing alerts\n- [ ] Design VPC architecture (subnets, security groups, NAT)\n- [ ] Set up VPN or Direct Connect for migration period\n- [ ] Test application in AWS environment\n\n**Migration:**\n- [ ] Use AWS Database Migration Service for DB\n- [ ] Use AWS Server Migration Service or CloudEndure for app servers\n- [ ] Migrate in dependency order: DB first, then app, then frontend\n- [ ] Keep bare metal live for 2 weeks post-migration as fallback\n\n**Post-migration:**\n- [ ] Optimize instance types (AWS Compute Optimizer)\n- [ ] Set up AWS Cost Explorer\n- [ ] Configure CloudWatch monitoring\n- [ ] Decommission bare metal", "ts": "2026-03-05T10:45:30Z"},
|
|
41
|
+
{"role": "user", "content": "Comprehensive checklist. Timeline estimate for 3 servers: app, DB, cache?", "ts": "2026-03-05T10:46:00Z"},
|
|
42
|
+
{"role": "assistant", "content": "For 3-server stack (app + DB + cache):\n- **Week 1-2**: AWS setup, VPC design, VPN connectivity\n- **Week 3**: Launch AWS equivalents (EC2 for app/cache, RDS for DB)\n- **Week 4**: Data sync setup (DMS for DB, rsync for files)\n- **Week 5**: Testing in AWS, DNS cutover prep\n- **Week 6**: DNS cutover (5min TTL), live validation\n- **Week 7-8**: Monitoring period, bare metal on standby\n- **Week 9**: Decommission bare metal\n\nTotal: ~2 months for a careful, low-risk migration.", "ts": "2026-03-05T10:46:30Z"},
|
|
43
|
+
{"role": "user", "content": "Perfect timeline. Thanks for the comprehensive sysadmin session!", "ts": "2026-03-05T10:47:00Z"},
|
|
44
|
+
{"role": "assistant", "content": "Great progress today! Highlights: WireGuard VPN operational, HTTPS with A-rated SSL, log volume fixed, automated Postgres backups to S3, and a clear cloud migration roadmap. Well-planned infrastructure work!", "ts": "2026-03-05T10:47:15Z"},
|
|
45
|
+
{"role": "user", "content": "One more: SSH hardening best practices. We have password auth enabled.", "ts": "2026-03-05T10:50:00Z"},
|
|
46
|
+
{"role": "assistant", "content": "SSH hardening checklist — edit `/etc/ssh/sshd_config`:\n```\nPermitRootLogin no\nPasswordAuthentication no # CRITICAL: disable password auth\nPubkeyAuthentication yes\nX11Forwarding no\nMaxAuthTries 3\nLoginGraceTime 60\nAllowUsers deploy ops # Whitelist specific users only\nPort 2222 # Move off port 22 (reduces scan noise)\nClientAliveInterval 300\nClientAliveCountMax 2\n```\n\nAlso install `fail2ban`: auto-bans IPs with too many failed SSH attempts.", "ts": "2026-03-05T10:50:30Z"},
|
|
47
|
+
{"role": "user", "content": "Will apply all these. Our servers are currently accessible from any IP. Should we restrict SSH by IP?", "ts": "2026-03-05T10:51:00Z"},
|
|
48
|
+
{"role": "assistant", "content": "Yes — restrict SSH access by IP as defense-in-depth:\n\n**Option 1: Security Group** (AWS): Add inbound rule for port 2222 from only your office IP and VPN IP range. Easiest to manage.\n\n**Option 2: fail2ban**: Not IP restriction but blocks brute-force attackers.\n\n**Option 3: Port knocking**: Security through obscurity — only opens SSH port after a specific sequence of connection attempts. More complex.\n\nRecommend Option 1 (Security Group IP restriction) + fail2ban as belt-and-suspenders.", "ts": "2026-03-05T10:51:30Z"},
|
|
49
|
+
{"role": "user", "content": "We'll restrict via Security Group to office IP and VPN subnet (10.0.0.0/24). Thanks!", "ts": "2026-03-05T10:52:00Z"},
|
|
50
|
+
{"role": "assistant", "content": "Perfect defense-in-depth setup: WireGuard VPN + Security Group IP restriction + SSH key auth + fail2ban. This is enterprise-grade access control. Remember to document emergency access procedures in case VPN goes down.", "ts": "2026-03-05T10:52:15Z"},
|
|
51
|
+
{"role": "user", "content": "Good point about emergency access. We'll keep a break-glass procedure via AWS Systems Manager Session Manager.", "ts": "2026-03-05T10:52:30Z"},
|
|
52
|
+
{"role": "assistant", "content": "AWS SSM Session Manager is exactly right for break-glass. No SSH ports needed — uses IAM auth. Add it to your runbook and test it quarterly. This is the professional way to handle emergency access without weakening your security posture.", "ts": "2026-03-05T10:52:45Z"},
|
|
53
|
+
{"role": "user", "content": "All set. Comprehensive session. Thanks!", "ts": "2026-03-05T10:53:00Z"},
|
|
54
|
+
{"role": "assistant", "content": "Excellent sysadmin work today! Your infrastructure is now significantly more secure and resilient. Good luck with the cloud migration!", "ts": "2026-03-05T10:53:10Z"}
|
|
55
|
+
]
|
|
56
|
+
}
|