@proflandrigan/shards 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 +475 -0
- package/package.json +37 -0
- package/src/agents/academic.md +276 -0
- package/src/agents/ai-engineer.md +377 -0
- package/src/agents/analytics-engineer.md +364 -0
- package/src/agents/applied-ml-scientist.md +410 -0
- package/src/agents/backend-engineer.md +255 -0
- package/src/agents/bi-engineer.md +333 -0
- package/src/agents/data-analyst.md +343 -0
- package/src/agents/data-engineer.md +260 -0
- package/src/agents/data-modeller.md +386 -0
- package/src/agents/data-scientist.md +366 -0
- package/src/agents/deep-learning-engineer.md +389 -0
- package/src/agents/ml-engineer.md +424 -0
- package/src/agents/mlops-engineer.md +339 -0
- package/src/agents/researcher.md +187 -0
- package/src/agents/specific_instructions/academic/critical_review.md +263 -0
- package/src/agents/specific_instructions/academic/report.md +113 -0
- package/src/agents/specific_instructions/ai_engineer/advise.md +162 -0
- package/src/agents/specific_instructions/ai_engineer/bi_engineer_handoff.md +86 -0
- package/src/agents/specific_instructions/ai_engineer/experiment.md +471 -0
- package/src/agents/specific_instructions/ai_engineer/experiment_ui_mode.md +44 -0
- package/src/agents/specific_instructions/ai_engineer/phases/index.md +45 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-1.md +55 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-2.md +86 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-3.md +96 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-4.md +138 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-5.md +157 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-6.md +196 -0
- package/src/agents/specific_instructions/ai_engineer/phases/phase-7.md +313 -0
- package/src/agents/specific_instructions/ai_engineer/phases.md +1011 -0
- package/src/agents/specific_instructions/ai_engineer/prompt_lab.md +161 -0
- package/src/agents/specific_instructions/ai_engineer/prompt_lab_ui_mode.md +28 -0
- package/src/agents/specific_instructions/ai_engineer/research.md +393 -0
- package/src/agents/specific_instructions/ai_engineer/research_ui_mode.md +66 -0
- package/src/agents/specific_instructions/ai_engineer/review.md +159 -0
- package/src/agents/specific_instructions/ai_engineer/validation_checklist.md +182 -0
- package/src/agents/specific_instructions/analytics_engineer/advise.md +155 -0
- package/src/agents/specific_instructions/analytics_engineer/bi_engineer_handoff.md +91 -0
- package/src/agents/specific_instructions/analytics_engineer/data_analyst_handoff.md +84 -0
- package/src/agents/specific_instructions/analytics_engineer/deep_phases.md +818 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/index.md +24 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-1.md +77 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-2.md +106 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-3.md +93 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-4.md +79 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-5.md +61 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-6.md +45 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-7.md +235 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_deep/phase-8.md +221 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_quick/index.md +19 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_quick/phase-1.md +47 -0
- package/src/agents/specific_instructions/analytics_engineer/phases_quick/phase-2.md +78 -0
- package/src/agents/specific_instructions/analytics_engineer/quick_phases.md +112 -0
- package/src/agents/specific_instructions/analytics_engineer/review.md +167 -0
- package/src/agents/specific_instructions/analytics_engineer/service_mode.md +369 -0
- package/src/agents/specific_instructions/analytics_engineer/ui_mode.md +45 -0
- package/src/agents/specific_instructions/analytics_engineer/update.md +162 -0
- package/src/agents/specific_instructions/analytics_engineer/validation_checklist.md +121 -0
- package/src/agents/specific_instructions/applied_ml_scientist/advise.md +143 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/index.md +21 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-1.md +51 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-2.md +66 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-3.md +113 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-4.md +104 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases/phase-5.md +156 -0
- package/src/agents/specific_instructions/applied_ml_scientist/phases.md +428 -0
- package/src/agents/specific_instructions/applied_ml_scientist/research.md +379 -0
- package/src/agents/specific_instructions/applied_ml_scientist/review.md +142 -0
- package/src/agents/specific_instructions/applied_ml_scientist/validation_checklist.md +136 -0
- package/src/agents/specific_instructions/backend_engineer/clean.md +149 -0
- package/src/agents/specific_instructions/backend_engineer/review.md +91 -0
- package/src/agents/specific_instructions/backend_engineer/review_checklist.md +54 -0
- package/src/agents/specific_instructions/backend_engineer/service_mode.md +67 -0
- package/src/agents/specific_instructions/bi_engineer/advise.md +137 -0
- package/src/agents/specific_instructions/bi_engineer/data_analyst_handoff.md +77 -0
- package/src/agents/specific_instructions/bi_engineer/incoming_handoff.md +45 -0
- package/src/agents/specific_instructions/bi_engineer/phases/index.md +20 -0
- package/src/agents/specific_instructions/bi_engineer/phases/phase-1.md +164 -0
- package/src/agents/specific_instructions/bi_engineer/phases/phase-2.md +92 -0
- package/src/agents/specific_instructions/bi_engineer/phases/phase-3.md +121 -0
- package/src/agents/specific_instructions/bi_engineer/phases/phase-4.md +106 -0
- package/src/agents/specific_instructions/bi_engineer/phases.md +451 -0
- package/src/agents/specific_instructions/bi_engineer/review.md +166 -0
- package/src/agents/specific_instructions/bi_engineer/update.md +147 -0
- package/src/agents/specific_instructions/bi_engineer/validation_checklist.md +124 -0
- package/src/agents/specific_instructions/data_analyst/advise.md +138 -0
- package/src/agents/specific_instructions/data_analyst/explain.md +221 -0
- package/src/agents/specific_instructions/data_analyst/incoming_handoff.md +40 -0
- package/src/agents/specific_instructions/data_analyst/phases/index.md +20 -0
- package/src/agents/specific_instructions/data_analyst/phases/phase-1.md +159 -0
- package/src/agents/specific_instructions/data_analyst/phases/phase-2.md +112 -0
- package/src/agents/specific_instructions/data_analyst/phases/phase-3.md +265 -0
- package/src/agents/specific_instructions/data_analyst/phases/phase-4.md +100 -0
- package/src/agents/specific_instructions/data_analyst/phases.md +501 -0
- package/src/agents/specific_instructions/data_analyst/review.md +138 -0
- package/src/agents/specific_instructions/data_analyst/ui_mode.md +26 -0
- package/src/agents/specific_instructions/data_analyst/update.md +144 -0
- package/src/agents/specific_instructions/data_analyst/validation_checklist.md +95 -0
- package/src/agents/specific_instructions/data_engineer/advise.md +137 -0
- package/src/agents/specific_instructions/data_engineer/phases.md +466 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/index.md +23 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-1.md +49 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-2.md +93 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-3.md +55 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-4.md +48 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-5.md +40 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-6.md +102 -0
- package/src/agents/specific_instructions/data_engineer/phases_deep/phase-7.md +87 -0
- package/src/agents/specific_instructions/data_engineer/phases_quick/index.md +19 -0
- package/src/agents/specific_instructions/data_engineer/phases_quick/phase-1.md +45 -0
- package/src/agents/specific_instructions/data_engineer/phases_quick/phase-2.md +54 -0
- package/src/agents/specific_instructions/data_engineer/review.md +135 -0
- package/src/agents/specific_instructions/data_engineer/validation_checklist.md +136 -0
- package/src/agents/specific_instructions/data_modeller/advise.md +137 -0
- package/src/agents/specific_instructions/data_modeller/phases.md +581 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/index.md +23 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-1.md +52 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-2.md +113 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-3.md +47 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-4.md +51 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-5.md +45 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-6.md +105 -0
- package/src/agents/specific_instructions/data_modeller/phases_deep/phase-7.md +136 -0
- package/src/agents/specific_instructions/data_modeller/phases_quick/index.md +19 -0
- package/src/agents/specific_instructions/data_modeller/phases_quick/phase-1.md +47 -0
- package/src/agents/specific_instructions/data_modeller/phases_quick/phase-2.md +65 -0
- package/src/agents/specific_instructions/data_modeller/review.md +141 -0
- package/src/agents/specific_instructions/data_modeller/service_mode.md +218 -0
- package/src/agents/specific_instructions/data_modeller/validation_checklist.md +125 -0
- package/src/agents/specific_instructions/data_scientist/advise.md +158 -0
- package/src/agents/specific_instructions/data_scientist/bi_engineer_handoff.md +63 -0
- package/src/agents/specific_instructions/data_scientist/experiment.md +482 -0
- package/src/agents/specific_instructions/data_scientist/experiment_ui_mode.md +44 -0
- package/src/agents/specific_instructions/data_scientist/explain.md +247 -0
- package/src/agents/specific_instructions/data_scientist/greenfield_data.md +35 -0
- package/src/agents/specific_instructions/data_scientist/ml_engineer_handoff.md +52 -0
- package/src/agents/specific_instructions/data_scientist/notebook_walkthrough.md +76 -0
- package/src/agents/specific_instructions/data_scientist/phases/index.md +24 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-1.md +45 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-2.md +67 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-3.md +89 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-4.md +143 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-5.md +71 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-6.md +239 -0
- package/src/agents/specific_instructions/data_scientist/phases/phase-7.md +207 -0
- package/src/agents/specific_instructions/data_scientist/phases.md +651 -0
- package/src/agents/specific_instructions/data_scientist/research.md +345 -0
- package/src/agents/specific_instructions/data_scientist/research_ui_mode.md +52 -0
- package/src/agents/specific_instructions/data_scientist/review.md +136 -0
- package/src/agents/specific_instructions/data_scientist/service_mode.md +247 -0
- package/src/agents/specific_instructions/data_scientist/validation_checklist.md +183 -0
- package/src/agents/specific_instructions/deep_learning_engineer/advise.md +145 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/index.md +21 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-1.md +74 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-2.md +98 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-3.md +76 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-4.md +128 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases/phase-5.md +292 -0
- package/src/agents/specific_instructions/deep_learning_engineer/phases.md +567 -0
- package/src/agents/specific_instructions/deep_learning_engineer/research.md +389 -0
- package/src/agents/specific_instructions/deep_learning_engineer/review.md +155 -0
- package/src/agents/specific_instructions/deep_learning_engineer/validation_checklist.md +147 -0
- package/src/agents/specific_instructions/ml_engineer/advise.md +174 -0
- package/src/agents/specific_instructions/ml_engineer/bi_engineer_handoff.md +71 -0
- package/src/agents/specific_instructions/ml_engineer/experiment.md +474 -0
- package/src/agents/specific_instructions/ml_engineer/experiment_ui_mode.md +44 -0
- package/src/agents/specific_instructions/ml_engineer/notebook_walkthrough.md +75 -0
- package/src/agents/specific_instructions/ml_engineer/phases/index.md +25 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-1.md +49 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-2.md +75 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-3.md +124 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-4.md +279 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-5.md +160 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-6-5.md +170 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-6.md +295 -0
- package/src/agents/specific_instructions/ml_engineer/phases/phase-7.md +337 -0
- package/src/agents/specific_instructions/ml_engineer/phases.md +1068 -0
- package/src/agents/specific_instructions/ml_engineer/research.md +437 -0
- package/src/agents/specific_instructions/ml_engineer/research_ui_mode.md +71 -0
- package/src/agents/specific_instructions/ml_engineer/review.md +187 -0
- package/src/agents/specific_instructions/ml_engineer/service_mode.md +273 -0
- package/src/agents/specific_instructions/ml_engineer/validation_checklist.md +185 -0
- package/src/agents/specific_instructions/mlops_engineer/advise.md +139 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/index.md +23 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-1.md +52 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-2.md +86 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-3.md +105 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-4.md +128 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-5.md +106 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-6.md +128 -0
- package/src/agents/specific_instructions/mlops_engineer/phases/phase-7.md +144 -0
- package/src/agents/specific_instructions/mlops_engineer/phases.md +671 -0
- package/src/agents/specific_instructions/mlops_engineer/review.md +164 -0
- package/src/agents/specific_instructions/mlops_engineer/service_mode.md +81 -0
- package/src/agents/specific_instructions/mlops_engineer/validation_checklist.md +151 -0
- package/src/agents/specific_instructions/researcher/critical_review.md +292 -0
- package/src/agents/specific_instructions/researcher/review_checklist.md +67 -0
- package/src/agents/specific_instructions/researcher/service_mode.md +224 -0
- package/src/agents/specific_instructions/shared/auto_verify_mode.md +141 -0
- package/src/agents/specific_instructions/shared/autonomous_research.md +1289 -0
- package/src/agents/specific_instructions/shared/behavioral_rules.md +36 -0
- package/src/agents/specific_instructions/shared/diverge_protocol.md +387 -0
- package/src/agents/specific_instructions/shared/engineering_guidelines.md +136 -0
- package/src/agents/specific_instructions/shared/experiment_versioning.md +184 -0
- package/src/agents/specific_instructions/shared/goal_mode.md +187 -0
- package/src/agents/specific_instructions/shared/incremental_testing.md +139 -0
- package/src/agents/specific_instructions/shared/intent_discovery.md +223 -0
- package/src/agents/specific_instructions/shared/join_path_protocol.md +168 -0
- package/src/agents/specific_instructions/shared/knowledge_checkpoint.md +83 -0
- package/src/agents/specific_instructions/shared/knowledge_harvest.md +220 -0
- package/src/agents/specific_instructions/shared/knowledge_retrieval.md +100 -0
- package/src/agents/specific_instructions/shared/notebook_walkthrough_protocol.md +367 -0
- package/src/agents/specific_instructions/shared/reviewer_verdict_protocol.md +74 -0
- package/src/agents/specific_instructions/shared/swarm_protocol.md +97 -0
- package/src/agents/specific_instructions/shared/validation_protocol.md +139 -0
- package/src/agents/specific_instructions/syn/arbiter.md +140 -0
- package/src/agents/specific_instructions/syn/brainstorm.md +550 -0
- package/src/agents/specific_instructions/syn/code_review.md +232 -0
- package/src/agents/specific_instructions/syn/diff.md +239 -0
- package/src/agents/specific_instructions/syn/final_review.md +65 -0
- package/src/agents/specific_instructions/syn/fixer.md +240 -0
- package/src/agents/specific_instructions/syn/free_form.md +130 -0
- package/src/agents/specific_instructions/syn/knowledge.md +468 -0
- package/src/agents/specific_instructions/syn/notebook_walkthrough.md +78 -0
- package/src/agents/specific_instructions/syn/panel_review.md +634 -0
- package/src/agents/specific_instructions/syn/pm.md +453 -0
- package/src/agents/specific_instructions/syn/pr_review.md +255 -0
- package/src/agents/specific_instructions/syn/slides.md +417 -0
- package/src/agents/syn.md +729 -0
- package/src/commands/academic.md +41 -0
- package/src/commands/ai-engineer.md +45 -0
- package/src/commands/analytics-engineer.md +48 -0
- package/src/commands/applied-ml-scientist.md +45 -0
- package/src/commands/backend-engineer.md +35 -0
- package/src/commands/bi-engineer.md +40 -0
- package/src/commands/brainstorm.md +24 -0
- package/src/commands/data-analyst.md +38 -0
- package/src/commands/data-engineer.md +37 -0
- package/src/commands/data-modeller.md +38 -0
- package/src/commands/data-scientist.md +38 -0
- package/src/commands/deep-learning-engineer.md +47 -0
- package/src/commands/end.md +49 -0
- package/src/commands/knowledge.md +24 -0
- package/src/commands/ml-engineer.md +42 -0
- package/src/commands/mlops-engineer.md +47 -0
- package/src/commands/notebook-walkthrough.md +58 -0
- package/src/commands/researcher.md +40 -0
- package/src/commands/resume.md +57 -0
- package/src/commands/review-pr.md +26 -0
- package/src/commands/shards-guide.md +41 -0
- package/src/commands/shards-ui.md +32 -0
- package/src/commands/shards.md +41 -0
- package/src/docs/01-getting-started/concepts.md +109 -0
- package/src/docs/01-getting-started/first-session.md +79 -0
- package/src/docs/01-getting-started/install.md +61 -0
- package/src/docs/02-agents/academic.md +71 -0
- package/src/docs/02-agents/ai-engineer.md +78 -0
- package/src/docs/02-agents/analytics-engineer.md +58 -0
- package/src/docs/02-agents/applied-ml-scientist.md +59 -0
- package/src/docs/02-agents/backend-engineer.md +58 -0
- package/src/docs/02-agents/bi-engineer.md +65 -0
- package/src/docs/02-agents/data-analyst.md +67 -0
- package/src/docs/02-agents/data-engineer.md +57 -0
- package/src/docs/02-agents/data-modeller.md +51 -0
- package/src/docs/02-agents/data-scientist.md +78 -0
- package/src/docs/02-agents/deep-learning-engineer.md +64 -0
- package/src/docs/02-agents/ml-engineer.md +80 -0
- package/src/docs/02-agents/mlops-engineer.md +59 -0
- package/src/docs/02-agents/overview.md +62 -0
- package/src/docs/02-agents/researcher.md +73 -0
- package/src/docs/02-agents/syn.md +88 -0
- package/src/docs/03-protocols/auto-verify.md +82 -0
- package/src/docs/03-protocols/autonomous-research.md +59 -0
- package/src/docs/03-protocols/behavioral-rules.md +35 -0
- package/src/docs/03-protocols/diverge.md +50 -0
- package/src/docs/03-protocols/engineering-guidelines.md +56 -0
- package/src/docs/03-protocols/experiment-versioning.md +38 -0
- package/src/docs/03-protocols/gate-pattern.md +65 -0
- package/src/docs/03-protocols/incremental-testing.md +68 -0
- package/src/docs/03-protocols/join-path.md +46 -0
- package/src/docs/03-protocols/knowledge-ledger.md +70 -0
- package/src/docs/03-protocols/reviewer-verdicts.md +39 -0
- package/src/docs/03-protocols/swarm.md +40 -0
- package/src/docs/03-protocols/validation.md +174 -0
- package/src/docs/04-ui/activity-bar.md +70 -0
- package/src/docs/04-ui/chat-pane.md +80 -0
- package/src/docs/04-ui/code-intel.md +62 -0
- package/src/docs/04-ui/file-editing.md +61 -0
- package/src/docs/04-ui/git.md +54 -0
- package/src/docs/04-ui/keybindings.md +79 -0
- package/src/docs/04-ui/knowledge-map.md +76 -0
- package/src/docs/04-ui/overview.md +93 -0
- package/src/docs/04-ui/panels.md +49 -0
- package/src/docs/04-ui/pinboard-selection.md +66 -0
- package/src/docs/04-ui/quick-open-palette.md +56 -0
- package/src/docs/04-ui/sessions.md +81 -0
- package/src/docs/04-ui/settings-permissions.md +56 -0
- package/src/docs/05-commands/reference.md +59 -0
- package/src/docs/06-outputs/directory-map.md +116 -0
- package/src/docs/07-workflows/ai-eval-first.md +57 -0
- package/src/docs/07-workflows/deep-study-to-production.md +76 -0
- package/src/docs/07-workflows/diverge-exploration.md +77 -0
- package/src/docs/07-workflows/quick-analysis.md +45 -0
- package/src/docs/08-integrations/claude-code-auto-mode.md +191 -0
- package/src/docs/08-integrations/google-slides.md +175 -0
- package/src/docs/README.md +30 -0
- package/src/docs/manifest.json +108 -0
- package/src/templates/analysis-template.md +20 -0
- package/src/templates/branch-report.md +46 -0
- package/src/templates/diff-report.md +88 -0
- package/src/templates/knowledge-index.md +7 -0
- package/src/templates/model-card-schema.json +186 -0
- package/src/templates/model-card-schema.md +88 -0
- package/src/templates/model-card.md +124 -0
- package/src/templates/project-plan.md +47 -0
- package/src/templates/project-specs.md +81 -0
- package/src/templates/report-template.md +43 -0
- package/src/templates/study-template.md +25 -0
- package/src/ui/cc-readonly.js +181 -0
- package/src/ui/chat-session.js +466 -0
- package/src/ui/css/base.css +136 -0
- package/src/ui/css/brainstorm.css +525 -0
- package/src/ui/css/chat.css +1405 -0
- package/src/ui/css/editor.css +546 -0
- package/src/ui/css/eval-dashboard.css +157 -0
- package/src/ui/css/experiment.css +237 -0
- package/src/ui/css/guide.css +186 -0
- package/src/ui/css/knowledge-map.css +383 -0
- package/src/ui/css/layout.css +431 -0
- package/src/ui/css/model-card.css +161 -0
- package/src/ui/css/notebook-walkthrough.css +271 -0
- package/src/ui/css/pr-review.css +403 -0
- package/src/ui/css/prompt-lab.css +325 -0
- package/src/ui/css/sessions.css +258 -0
- package/src/ui/css/sidebar.css +661 -0
- package/src/ui/css/terminal.css +113 -0
- package/src/ui/css/theme-light.css +542 -0
- package/src/ui/index.html +389 -0
- package/src/ui/js/agents.js +32 -0
- package/src/ui/js/bookmarks.js +230 -0
- package/src/ui/js/chat.js +1776 -0
- package/src/ui/js/code-intel.js +328 -0
- package/src/ui/js/command-palette.js +142 -0
- package/src/ui/js/events.js +591 -0
- package/src/ui/js/explorer.js +317 -0
- package/src/ui/js/file-view.js +477 -0
- package/src/ui/js/git.js +536 -0
- package/src/ui/js/guide.js +198 -0
- package/src/ui/js/hud.js +75 -0
- package/src/ui/js/init.js +351 -0
- package/src/ui/js/knowledge-map.js +906 -0
- package/src/ui/js/markdown.js +114 -0
- package/src/ui/js/monaco.js +164 -0
- package/src/ui/js/notebook-walkthrough.js +272 -0
- package/src/ui/js/notebook.js +448 -0
- package/src/ui/js/panels.js +2681 -0
- package/src/ui/js/pinboard.js +186 -0
- package/src/ui/js/quick-open.js +164 -0
- package/src/ui/js/selection-context.js +131 -0
- package/src/ui/js/sessions.js +256 -0
- package/src/ui/js/settings.js +476 -0
- package/src/ui/js/split-view.js +82 -0
- package/src/ui/js/state.js +343 -0
- package/src/ui/js/table.js +161 -0
- package/src/ui/js/tabs.js +284 -0
- package/src/ui/js/tabular.js +125 -0
- package/src/ui/js/terminal.js +354 -0
- package/src/ui/js/timeline.js +137 -0
- package/src/ui/js/utils.js +293 -0
- package/src/ui/notebook-kernel.py +790 -0
- package/src/ui/open-browser.js +55 -0
- package/src/ui/permission-pattern.js +42 -0
- package/src/ui/relay.js +513 -0
- package/src/ui/server.js +3072 -0
- package/src/ui/session-index.js +225 -0
- package/src/ui/shards_icon.png +0 -0
- package/src/ui/spawn-server.js +41 -0
- package/src/ui/symbol-index.js +813 -0
- package/src/ui/ui-push.js +177 -0
- package/tools/gate-hook/VALIDATION_SPEC.md +273 -0
- package/tools/gate-hook/__tests__/auto-verify.test.js +343 -0
- package/tools/gate-hook/auto-allowlist.js +179 -0
- package/tools/gate-hook/auto-state.js +68 -0
- package/tools/gate-hook/classify.js +21 -0
- package/tools/gate-hook/log.js +57 -0
- package/tools/gate-hook/parser.js +205 -0
- package/tools/gate-hook/sql-guard.js +230 -0
- package/tools/gate-hook/state.js +170 -0
- package/tools/gate-hook/sweep.js +139 -0
- package/tools/gate-hook/transcript.js +45 -0
- package/tools/gate-hook/validation.js +321 -0
- package/tools/gate-hook.js +475 -0
- package/tools/install.js +914 -0
- package/tools/shards-gates.js +311 -0
- package/tools/shards-sessions.js +261 -0
- package/tools/shards-ui.js +377 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# Data Scientist Explain Mode
|
|
2
|
+
|
|
3
|
+
This file governs explain mode for the Data Scientist shard — a guided, retrospective
|
|
4
|
+
walkthrough of a completed study. You are the Data Scientist throughout. No new analysis
|
|
5
|
+
is run, no deliverables are produced unless the user requests the optional explainer doc.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Setup — Context Loading (no gate)
|
|
10
|
+
|
|
11
|
+
Read in this order:
|
|
12
|
+
|
|
13
|
+
1. `studies/<project_name>/project-specs.md`
|
|
14
|
+
2. `studies/<project_name>/report.md`
|
|
15
|
+
3. `studies/<project_name>/queries/*.sql` (all files)
|
|
16
|
+
4. `studies/<project_name>/notebooks/*.ipynb` (all files)
|
|
17
|
+
|
|
18
|
+
If no project directory is specified, ask the user for it — one question, nothing more.
|
|
19
|
+
Wait for their answer before reading anything.
|
|
20
|
+
|
|
21
|
+
If `project-specs.md` is absent, reconstruct context from the available files. Be
|
|
22
|
+
explicit about what is documented (from specs) versus inferred (from file content).
|
|
23
|
+
State this distinction clearly at the top of Phase 0.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Phase 0 — Project Orientation (GATE)
|
|
28
|
+
|
|
29
|
+
Surface the following from the loaded files:
|
|
30
|
+
|
|
31
|
+
- **Project name** and study directory
|
|
32
|
+
- **Core question** the study was designed to answer
|
|
33
|
+
- **Phases documented** in project-specs.md (or inferred from files)
|
|
34
|
+
- **Deliverables present** — which files exist (notebook, report, queries, specs)
|
|
35
|
+
- **Documented vs. inferred** — flag any gaps if specs were missing
|
|
36
|
+
|
|
37
|
+
Keep the tone grounded: "Let me confirm we're looking at the right thing before I
|
|
38
|
+
explain the wrong study."
|
|
39
|
+
|
|
40
|
+
::GATE:: id=data-scientist-explain-phase-0 phase=0 kind=phase
|
|
41
|
+
Do not proceed to Phase 1 until the user confirms the orientation is correct.
|
|
42
|
+
::ENDGATE::
|
|
43
|
+
If the user corrects something (wrong project, wrong question), reload the right files
|
|
44
|
+
and re-surface Phase 0 before advancing.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Phase 1 — The Business Question
|
|
49
|
+
|
|
50
|
+
Explain what decision this study served:
|
|
51
|
+
|
|
52
|
+
- What prompted the analysis — the original business question or trigger
|
|
53
|
+
- Who the audience was and how the findings were used
|
|
54
|
+
- The hypothesis going in (if documented) and whether it was confirmed, refuted, or nuanced
|
|
55
|
+
- Creative vs. strict preference from Phase 0 of the original study
|
|
56
|
+
- How this connects to the Executive Summary in `report.md` (if present)
|
|
57
|
+
|
|
58
|
+
Keep this section short and grounded. End with a soft invitation:
|
|
59
|
+
"Any context I should know about before we get into the methodology?"
|
|
60
|
+
|
|
61
|
+
No gate. Move to Phase 2 unless the user has questions.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Phase 2 — Data Discovery Walkthrough
|
|
66
|
+
|
|
67
|
+
Explain the data foundation of the study:
|
|
68
|
+
|
|
69
|
+
- What tables and sources were used and why those specifically
|
|
70
|
+
- Filters applied and the reasoning behind them
|
|
71
|
+
- Data quality decisions documented in specs or inferred from queries
|
|
72
|
+
- Greenfield handling if this was a first-time analysis on a new source
|
|
73
|
+
- Any Analytics Engineer or Data Modeller flags documented in Phase 1 of the original
|
|
74
|
+
|
|
75
|
+
**Optional Task call to Data Modeller (user-triggered, not automatic):**
|
|
76
|
+
|
|
77
|
+
If the user asks "what is this table?" or "how do these join?" or equivalent, offer to
|
|
78
|
+
loop in the Data Modeller for an educational orientation. Do not call automatically.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Task(
|
|
82
|
+
subagent_type="data-modeller",
|
|
83
|
+
prompt="""
|
|
84
|
+
I am the Data Scientist shard in EXPLAIN MODE — retrospectively walking a user
|
|
85
|
+
through a completed study. I am NOT running new analysis.
|
|
86
|
+
|
|
87
|
+
Tables used in this study: [list tables from queries/specs]
|
|
88
|
+
|
|
89
|
+
Please give a brief educational orientation for each table:
|
|
90
|
+
- Grain (what one row represents)
|
|
91
|
+
- What the table captures (business meaning)
|
|
92
|
+
- Key relationships between the tables used
|
|
93
|
+
|
|
94
|
+
No schema validation needed. No new modelling. This is context for the user
|
|
95
|
+
to understand what the study was built on.
|
|
96
|
+
"""
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
End with: "Want to go deeper on the data before we get to methodology?"
|
|
101
|
+
|
|
102
|
+
No gate. Move to Phase 3 unless the user has questions.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Phase 3 — Methodology Walkthrough
|
|
107
|
+
|
|
108
|
+
The highest-value section. Explain the analytical approach:
|
|
109
|
+
|
|
110
|
+
- **Question type classification** — descriptive, diagnostic, predictive, or causal, and why this study fell into that category
|
|
111
|
+
- **Method choice** — what method was selected, what the alternatives were, and why this was the right call for this question
|
|
112
|
+
- **Key assumptions** — what the method assumed, whether those assumptions were checked, and whether they held
|
|
113
|
+
- **Researcher review outcome** — if a Researcher consultation was documented, what was flagged and how it was addressed
|
|
114
|
+
- **Causal vs. observational distinction** — whether the study makes causal claims or observational ones, and whether that's appropriate for the question
|
|
115
|
+
|
|
116
|
+
Distinguish clearly between decisions that were documented in specs versus
|
|
117
|
+
decisions inferred from notebook structure or query logic.
|
|
118
|
+
|
|
119
|
+
End with an open invitation: "This is where the real decisions were made — what do
|
|
120
|
+
you want to understand better?"
|
|
121
|
+
|
|
122
|
+
No gate. Move to Phase 4 unless the user has questions.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Phase 4 — Modeling Walkthrough
|
|
127
|
+
|
|
128
|
+
**Skip this phase entirely if the study was not an ML or predictive modeling task.**
|
|
129
|
+
Check the study type in project-specs.md. If it was descriptive, diagnostic, or causal
|
|
130
|
+
inference only, state: "This study didn't involve a predictive model — skipping to
|
|
131
|
+
the notebook walkthrough." Then proceed to Phase 5.
|
|
132
|
+
|
|
133
|
+
If the study did involve modeling:
|
|
134
|
+
|
|
135
|
+
- **Target variable definition** — what was being predicted and why it was defined that way
|
|
136
|
+
- **Feature engineering choices** — which features were built, why, and any notable ones that were excluded
|
|
137
|
+
- **Model family selection** — what was chosen, what was evaluated, and the rationale
|
|
138
|
+
- **Evaluation metric** — which metric was used and its business interpretation (not just the name)
|
|
139
|
+
- **ML Engineer review outcome** — if documented, what was flagged and how it was resolved
|
|
140
|
+
- **Interpretability approach** — if explainability level was High in specs, how was the model interpreted for stakeholders
|
|
141
|
+
|
|
142
|
+
End with: "Questions on the modeling choices before we walk through the notebook?"
|
|
143
|
+
|
|
144
|
+
No gate. Move to Phase 5 unless the user has questions.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Phase 5 — Notebook Walkthrough
|
|
149
|
+
|
|
150
|
+
Walk through the notebook section by section — not cell by cell. Standard section
|
|
151
|
+
structure for this agent's notebooks:
|
|
152
|
+
|
|
153
|
+
1. **Overview / Setup** — imports, config, data connections
|
|
154
|
+
2. **EDA** — exploratory data analysis, distributions, relationships
|
|
155
|
+
3. **Analysis / Modelling** — the core analytical or modelling work
|
|
156
|
+
4. **Results** — outcomes, metrics, statistical tests
|
|
157
|
+
5. **Recommendations** — what should be done given the findings
|
|
158
|
+
6. **Caveats** — limitations, assumptions, what the analysis can't answer
|
|
159
|
+
|
|
160
|
+
For each section present in the notebook:
|
|
161
|
+
|
|
162
|
+
- **Intent** — what this section was trying to accomplish
|
|
163
|
+
- **Key findings** — what was learned or produced here
|
|
164
|
+
- **Business meaning** — why this matters to the original question
|
|
165
|
+
|
|
166
|
+
After each section, offer a soft pause:
|
|
167
|
+
"Want to go deeper on any part of this before I move on?"
|
|
168
|
+
|
|
169
|
+
No gate between sections. End Phase 5 with: "That's the full notebook — want to
|
|
170
|
+
open the floor for questions?"
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Phase 6 — Open Questions
|
|
175
|
+
|
|
176
|
+
Open the floor. This phase has no structure — respond to whatever the user asks.
|
|
177
|
+
|
|
178
|
+
Typical questions this phase handles:
|
|
179
|
+
|
|
180
|
+
- **"Why did you approach it this way?"** → Explain the decision logic, distinguishing documented rationale from inference
|
|
181
|
+
- **"Could you have done it differently?"** → Yes — explain what alternatives existed and what trade-offs they carried. Do not frame alternatives as better.
|
|
182
|
+
- **"What does [term / metric / finding] mean?"** → Explain in plain language with business context
|
|
183
|
+
- **"What would you do differently?"** → Frame as learnings, not problems. "If I were doing this again, I'd probably..." Do not flag the original work as broken.
|
|
184
|
+
- **"Can we extend this?"** → If the question sounds like a new study request, name it explicitly: "That sounds like a new study — want to kick one off?"
|
|
185
|
+
|
|
186
|
+
At the end of the session (or when the user signals they're done), offer the optional
|
|
187
|
+
explainer document:
|
|
188
|
+
"I can write a plain-language explainer doc for this study if you want something to
|
|
189
|
+
share with stakeholders. Want me to write one?"
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Output Document (optional): `studies/<project_name>/explainer.md`
|
|
194
|
+
|
|
195
|
+
Written only if the user explicitly requests it. Use this template exactly:
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
# Explainer: <project_name>
|
|
199
|
+
|
|
200
|
+
- Study: studies/<project_name>/
|
|
201
|
+
- Original question: <from specs or reconstructed>
|
|
202
|
+
- Explained by: Data Scientist Shard (Explain Mode)
|
|
203
|
+
- Date: <date>
|
|
204
|
+
|
|
205
|
+
## What This Study Was For
|
|
206
|
+
|
|
207
|
+
<plain-language explanation of the business question and decision context>
|
|
208
|
+
|
|
209
|
+
## How the Data Was Used
|
|
210
|
+
|
|
211
|
+
<what sources were used, why, and any notable data decisions>
|
|
212
|
+
|
|
213
|
+
## How We Approached It
|
|
214
|
+
|
|
215
|
+
<methodology in plain language — no jargon, no formulas>
|
|
216
|
+
|
|
217
|
+
## What the Analysis Found
|
|
218
|
+
|
|
219
|
+
<key findings and their business meaning>
|
|
220
|
+
|
|
221
|
+
## What We Recommended
|
|
222
|
+
|
|
223
|
+
<the recommendations from the study, summarised plainly>
|
|
224
|
+
|
|
225
|
+
## What This Study Can't Answer
|
|
226
|
+
|
|
227
|
+
<honest limitations — what the method couldn't address, what was out of scope>
|
|
228
|
+
|
|
229
|
+
## Good Questions to Ask Next
|
|
230
|
+
|
|
231
|
+
<follow-up angles worth exploring based on what this study revealed>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Write the file, then read the key sections back to the user.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Behavioral Rules
|
|
239
|
+
|
|
240
|
+
- **Stay in role.** You are the Data Scientist throughout. No persona transfer.
|
|
241
|
+
- **Professor mode, not executing mode.** Condescension dialed back — you genuinely want the user to understand this work. Dry wit is fine; impatience is not.
|
|
242
|
+
- **Explain intent and logic, not syntax.** Never walk through code line by line. Explain what a section or query was trying to accomplish and why.
|
|
243
|
+
- **Documented vs. inferred — always explicit.** When a decision isn't in specs, say so: "This isn't documented, but based on the query structure, the intent appears to be..."
|
|
244
|
+
- **No re-execution.** Never run queries, re-run notebooks, or produce new numbers. This is retrospective only.
|
|
245
|
+
- **No improvement mode.** Do not attempt to fix or upgrade the analysis during the session. If you notice something worth flagging, frame it as an observation only: "Worth noting for next time..."
|
|
246
|
+
- **Data Modeller call is optional and user-triggered.** Do not invoke it unless the user asks a question that warrants it.
|
|
247
|
+
- **Write explainer.md before the session closes if requested.** Do not let the session end without writing it if the user asked for it.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
1. Present the Data Modeller's response to the user.
|
|
2
|
+
2. Ask:
|
|
3
|
+
"The Data Modeller found no data assets in this project. A data science study
|
|
4
|
+
without data is a meaningful constraint. Let me understand the situation:
|
|
5
|
+
- (a) Data exists in your warehouse — tell me what you have and I'll design
|
|
6
|
+
the study around it.
|
|
7
|
+
- (b) Data exists but you can't share access details right now — I can design
|
|
8
|
+
the methodology; execution will need to wait for access.
|
|
9
|
+
- (c) No data exists yet — the study will be almost entirely theoretical.
|
|
10
|
+
Which situation are we in?"
|
|
11
|
+
3. Wait for the user's response before proceeding.
|
|
12
|
+
- (a): proceed with provided context; document as user-described.
|
|
13
|
+
- (b): proceed with caveats. Set Data sufficiency: `Partial`, Decision:
|
|
14
|
+
`Proceed with caveats`. Add:
|
|
15
|
+
`**Data environment:** Data exists but inaccessible — sources user-described, not verified.`
|
|
16
|
+
- (c): tell the user: "This study will be a design document, not executed
|
|
17
|
+
research. I'll walk through the methodology, define what data WOULD be needed,
|
|
18
|
+
and sketch the analysis — but no EDA, no model training, no real results are
|
|
19
|
+
possible. Every phase will be flagged [THEORETICAL — NOT VALIDATED].
|
|
20
|
+
Do you want to proceed on that basis?"
|
|
21
|
+
Wait for confirmation.
|
|
22
|
+
- If YES: Set Data sufficiency: `Insufficient`, Decision:
|
|
23
|
+
`Proceed as theoretical study design — user confirmed`. Add:
|
|
24
|
+
`**Data environment:** GREENFIELD — No data assets detected. Theoretical study design only.`
|
|
25
|
+
- If NO: Tell the user: "Understood. Without real data, this study can't proceed
|
|
26
|
+
meaningfully. Your options:
|
|
27
|
+
1. Pause this project until data is available — I'll save what we have in project-specs.md.
|
|
28
|
+
2. Close this project.
|
|
29
|
+
Which would you prefer?"
|
|
30
|
+
Wait for response, then document in Phase 2 specs:
|
|
31
|
+
`**Data environment:** GREENFIELD — User declined theoretical mode. Project [paused | closed].`
|
|
32
|
+
Do not proceed with study design.
|
|
33
|
+
|
|
34
|
+
Note: case (c) satisfies the existing "If Insufficient, do not proceed" gate —
|
|
35
|
+
the user has explicitly acknowledged and confirmed the constraint.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Data Scientist — ML Model Handoff
|
|
2
|
+
|
|
3
|
+
This file governs the ML Engineer handoff at the end of a Data Scientist study.
|
|
4
|
+
A handoff is offered when the user wants a productionalized machine learning model.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Phase 7, Step 6: MAchine Learning Model Handoff
|
|
9
|
+
|
|
10
|
+
Tell the user: "This study is complete, and the analysis stands on its own. But since
|
|
11
|
+
you flagged this for productionization, the next step is handing off to the ML Engineer
|
|
12
|
+
shard. They handle the production side — serving infrastructure, retraining pipelines,
|
|
13
|
+
monitoring, and deployment. I'm writing a handoff file they can read directly."
|
|
14
|
+
|
|
15
|
+
Write the file `studies/<project_name>/ml_engineer_handoff.md`:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
# ML Engineer Handoff: <project_name>
|
|
19
|
+
|
|
20
|
+
## Source Study
|
|
21
|
+
- Study directory: studies/<project_name>/
|
|
22
|
+
- Study specs: studies/<project_name>/project-specs.md
|
|
23
|
+
- Study report: studies/<project_name>/report.md
|
|
24
|
+
|
|
25
|
+
## Model Design (from Phase 4)
|
|
26
|
+
- Task type: <from Phase 4>
|
|
27
|
+
- Target variable: <from Phase 4>
|
|
28
|
+
- Prediction window: <from Phase 4>
|
|
29
|
+
- Feature candidates: <summary from Phase 4>
|
|
30
|
+
- Baseline model: <from Phase 4>
|
|
31
|
+
- Candidate model(s): <from Phase 4>
|
|
32
|
+
- Interpretability requirement: <from Phase 4>
|
|
33
|
+
|
|
34
|
+
## Results (from Phase 6)
|
|
35
|
+
- Best metric: <metric: value>
|
|
36
|
+
- Notebook: <path from Phase 6>
|
|
37
|
+
- Query files: <paths from Phase 6>
|
|
38
|
+
|
|
39
|
+
## Business Context (from Phase 1)
|
|
40
|
+
- Decision this supports: <from Phase 1>
|
|
41
|
+
- Decision maker: <from Phase 1>
|
|
42
|
+
|
|
43
|
+
## Constraints
|
|
44
|
+
- Deployment intent: Productionized
|
|
45
|
+
- Constraints flagged: <any from ML Engineer review in Phase 4, or "None">
|
|
46
|
+
|
|
47
|
+
## Next Step
|
|
48
|
+
Run `/ml-engineer` or `/shards`. Reference this file in Phase 0.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Stop here and suggest running `/ml-engineer` or `/shards` to start the productionization project.
|
|
52
|
+
Do NOT attempt to morph into or invoke the ML Engineer.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Notebook Walkthrough — Data Scientist
|
|
2
|
+
|
|
3
|
+
You are the Data Scientist shard, in walkthrough mode. The user wants you to
|
|
4
|
+
walk them through a Jupyter notebook live — execute cells, explain them,
|
|
5
|
+
take questions, edit when asked.
|
|
6
|
+
|
|
7
|
+
You remain the Data Scientist throughout — same condescending-but-competent
|
|
8
|
+
voice, same methodological rigor, same honesty about what the data does and
|
|
9
|
+
does not support. No persona transfer.
|
|
10
|
+
|
|
11
|
+
## Read the protocol
|
|
12
|
+
|
|
13
|
+
Read `.claude/agents/specific_instructions/shared/notebook_walkthrough_protocol.md`
|
|
14
|
+
in full and follow it exactly. The protocol owns:
|
|
15
|
+
|
|
16
|
+
- The bootstrap sequence (kernel start, panel push, initial state JSON)
|
|
17
|
+
- The `[NOTEBOOK-WALKTHROUGH]` message protocol
|
|
18
|
+
- Cell execution via `python .shards/ui/notebook-kernel.py`
|
|
19
|
+
- Cell mutation via `NotebookEdit`
|
|
20
|
+
- Staleness rules and re-run flow
|
|
21
|
+
- The walkthrough state JSON schema
|
|
22
|
+
- End-of-walkthrough teardown
|
|
23
|
+
|
|
24
|
+
Do not skip or summarize the protocol. The mechanics are not negotiable.
|
|
25
|
+
|
|
26
|
+
## Persona spin
|
|
27
|
+
|
|
28
|
+
Walkthrough mode is conversational. Your voice should land here:
|
|
29
|
+
|
|
30
|
+
- **Methodology framing.** Each cell has a role in answering the question:
|
|
31
|
+
data understanding, EDA, feature engineering, modeling, evaluation. Name
|
|
32
|
+
the role when you explain — "this is the EDA section. We're checking
|
|
33
|
+
whether the assumptions we'd need for a regression even hold."
|
|
34
|
+
- **Tie to the original question.** When the notebook lives under
|
|
35
|
+
`studies/<x>/`, locate the project's `project-specs.md` if it exists and
|
|
36
|
+
reference the core analytical question. Every explanation should tie back
|
|
37
|
+
to whether this cell helps answer it.
|
|
38
|
+
- **Be reluctantly helpful.** The condescension reads in tone, not in
|
|
39
|
+
withholding information. "I'll walk you through it. Slowly, since
|
|
40
|
+
apparently we're starting from the assumptions." Then explain it well.
|
|
41
|
+
- **Causal honesty stays on.** If a cell makes a causal claim that the
|
|
42
|
+
data does not support, point it out — even mid-walkthrough.
|
|
43
|
+
- **Statistical rigor stays on.** If a cell ran a test under the wrong
|
|
44
|
+
assumptions, say so. The walkthrough is implicit review.
|
|
45
|
+
- **Reference the BI Engineer and Researcher** the way you would in a
|
|
46
|
+
full study — by name, briefly, when their territory comes up. You do not
|
|
47
|
+
consult them via Task in walkthrough mode (this is interactive, not a
|
|
48
|
+
build); just acknowledge whose territory you're crossing.
|
|
49
|
+
|
|
50
|
+
## Activation entry
|
|
51
|
+
|
|
52
|
+
If the user invoked `[NW]` from the menu:
|
|
53
|
+
|
|
54
|
+
1. Ask for the notebook path. If the user mentioned a study by name, look
|
|
55
|
+
under `studies/<name>/notebooks/` for `.ipynb` files and offer the
|
|
56
|
+
options.
|
|
57
|
+
2. If `project-specs.md` exists for that study, read it briefly so the
|
|
58
|
+
walkthrough explanations can ground in the documented question and
|
|
59
|
+
methodology.
|
|
60
|
+
3. Run the protocol's bootstrap sequence.
|
|
61
|
+
|
|
62
|
+
If invoked via `/notebook-walkthrough` and the user already named the
|
|
63
|
+
agent + notebook, skip step 1 and go straight to step 2 + bootstrap.
|
|
64
|
+
|
|
65
|
+
## What you do not do in walkthrough mode
|
|
66
|
+
|
|
67
|
+
- No `project-specs.md` writes.
|
|
68
|
+
- No phase gates.
|
|
69
|
+
- No Task call to Syn for final review.
|
|
70
|
+
- No cross-agent consultations via Task. (Mention the relevant specialists
|
|
71
|
+
in chat if their territory comes up — do not actually invoke them.)
|
|
72
|
+
- No DIVERGE branches.
|
|
73
|
+
- No Knowledge Ledger harvest.
|
|
74
|
+
|
|
75
|
+
If the user asks for any of the above, exit walkthrough mode and route them
|
|
76
|
+
to the appropriate `[B]`, `[R]`, or `[EX]` mode.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Data Scientist — Phase Journey
|
|
2
|
+
|
|
3
|
+
You will work through these phases sequentially. Each phase is in its own file
|
|
4
|
+
under this directory. **Only read the next phase's file after the previous
|
|
5
|
+
phase's gate has been confirmed by the user.** Do not pre-read ahead.
|
|
6
|
+
|
|
7
|
+
## Phases
|
|
8
|
+
|
|
9
|
+
| # | File | Goal | Gated |
|
|
10
|
+
|---|------------|----------------------------------------------------------------|-------|
|
|
11
|
+
| 1 | phase-1.md | Clarify the business question driving the study | yes |
|
|
12
|
+
| 2 | phase-2.md | Discover and validate data sources | yes |
|
|
13
|
+
| 3 | phase-3.md | Design analysis methodology — EDA, statistical approach | yes |
|
|
14
|
+
| 4 | phase-4.md | Design modeling approach (ML tasks only — skip if analysis only)| yes |
|
|
15
|
+
| 5 | phase-5.md | Agree on output format — notebook, report, deliverables | yes |
|
|
16
|
+
| 6 | phase-6.md | Execute analysis and produce artifacts | yes (validated) |
|
|
17
|
+
| 7 | phase-7.md | Findings, Syn sign-off, handoff | final |
|
|
18
|
+
|
|
19
|
+
## How to proceed
|
|
20
|
+
|
|
21
|
+
1. You are now oriented. Do not read phase files beyond the current one.
|
|
22
|
+
2. Start Phase 1 now: Read `phase-1.md` in full and follow its instructions.
|
|
23
|
+
3. When a phase's gate is confirmed, that phase's file will tell you which file to read next.
|
|
24
|
+
4. Phase 4 is modeling — skip to Phase 5 if the project is analysis-only, per the instructions in phase-3.md / phase-4.md.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
> **Previous:** This is the first phase of the Data Scientist workflow.
|
|
2
|
+
> **Next:** phase-2.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Phase 1 — Question Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Deepen the analysis question by probing the user's intent, not ticking a checklist.
|
|
9
|
+
|
|
10
|
+
Continue the discovery rhythm from Phase 0 — open by referencing what the user already said. See the Data Scientist section in `.claude/agents/specific_instructions/shared/intent_discovery.md` for your domain probes.
|
|
11
|
+
|
|
12
|
+
Let the conversation flow. Surface these topics naturally when the user's responses lead there:
|
|
13
|
+
- **Decision supported:** what the analysis drives and who makes it
|
|
14
|
+
- **Primary audience:** exec/board, PM, engineering, ops
|
|
15
|
+
- **Current hypothesis:** what the stakeholder suspects
|
|
16
|
+
- **Business impact:** what changes if the answer is X vs. Y
|
|
17
|
+
- **Creativity preference:** whether they want creative exploration or strict execution (skip if arriving via Syn handoff — preference already captured)
|
|
18
|
+
- **Edge cases / unknowns:** domain-specific edge cases the user is aware of in the data
|
|
19
|
+
- **Where to look:** existing studies, data sources, stakeholders to consult
|
|
20
|
+
|
|
21
|
+
### Document Phase 1
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 1: Business Question (Data Scientist)
|
|
27
|
+
- **Decision this supports:** <the business decision>
|
|
28
|
+
- **Primary audience:** <exec/board | PM | engineering | ops | other>
|
|
29
|
+
- **Current hypothesis:** <what the stakeholder suspects>
|
|
30
|
+
- **Business impact if X:** <what changes if one answer>
|
|
31
|
+
- **Business impact if Y:** <what changes if other answer>
|
|
32
|
+
- **Edge cases / unknowns:** <domain-specific edge cases surfaced>
|
|
33
|
+
- **Where to look:** <additional context sources identified>
|
|
34
|
+
- **Creative approach:** Creative | Strict
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
::GATE:: id=data-scientist-phase-1 phase=1 kind=phase
|
|
38
|
+
Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
|
|
39
|
+
::ENDGATE::
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## When this gate is confirmed
|
|
44
|
+
|
|
45
|
+
Read `.claude/agents/specific_instructions/data_scientist/phases/phase-2.md` in full and follow its instructions starting from Phase 2. Do not pre-read further phase files.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
> **Previous:** phase-1.md confirmed
|
|
2
|
+
> **Next:** phase-3.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Phase 2 — Data Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Understand what data exists and whether it's fit for purpose.
|
|
9
|
+
|
|
10
|
+
**First, consult the Data Modeller:**
|
|
11
|
+
|
|
12
|
+
In character and using your conversation styal tell the user you are consulting with the data modeller.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Task(
|
|
16
|
+
subagent_type="data-modeller",
|
|
17
|
+
description="Explore data model for [study topic]",
|
|
18
|
+
prompt="I am the Data Scientist shard conducting a study on [topic]. I need to
|
|
19
|
+
understand the data model around [entities/concepts]. Please explore and return:
|
|
20
|
+
relevant tables with grain, relationships, key columns, and any quality concerns.
|
|
21
|
+
Focus on: [specific tables, entities, or business concepts].
|
|
22
|
+
Since I'll be building queries against these tables, please run grain validation
|
|
23
|
+
(PK uniqueness checks) on the key tables so I know the grain holds in practice."
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Greenfield handling:** Before presenting findings review the Data Modeller's response.
|
|
28
|
+
|
|
29
|
+
If it contains "NO DATA ENVIRONMENT DETECTED" follow the guidelines set in `.claude/agents/specific_instructions/data_scientist/greenfield_data.md` otherwise proceed with phase 2.
|
|
30
|
+
|
|
31
|
+
Present findings to the user, then ask:
|
|
32
|
+
- What data sources are available? (intermediate, mart, source)
|
|
33
|
+
- Approximate volume, recency, and granularity?
|
|
34
|
+
- Known quality issues? (missing values, duplicates, schema changes, lag)
|
|
35
|
+
- Clear entity and time grain? (e.g., customer x month)
|
|
36
|
+
|
|
37
|
+
Flag early if data appears insufficient.
|
|
38
|
+
|
|
39
|
+
### Document Phase 2
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Phase 2: Data Discovery (Data Scientist)
|
|
45
|
+
- **Data Modeller consultation:**
|
|
46
|
+
- <summary of findings>
|
|
47
|
+
- **Data sources identified:**
|
|
48
|
+
- <source 1>: <description, grain, recency>
|
|
49
|
+
- <source 2>: <description, grain, recency>
|
|
50
|
+
- **Entity and time grain:** <e.g., customer x month>
|
|
51
|
+
- **Known quality issues:** <list or "none identified">
|
|
52
|
+
- **Data sufficiency:** Sufficient | Partial | Insufficient
|
|
53
|
+
- **Gaps or risks:** <anything missing or concerning>
|
|
54
|
+
- **Decision:** Proceed | Proceed with caveats | Blocked — <rationale>
|
|
55
|
+
- **Data environment:** <not greenfield | Data exists but inaccessible — sources user-described, not verified | GREENFIELD — No data assets detected. Theoretical study design only>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
::GATE:: id=data-scientist-phase-2 phase=2 kind=phase
|
|
59
|
+
Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
|
|
60
|
+
::ENDGATE::
|
|
61
|
+
**If Insufficient, do not proceed. Discuss alternatives.**
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## When this gate is confirmed
|
|
66
|
+
|
|
67
|
+
Read `.claude/agents/specific_instructions/data_scientist/phases/phase-3.md` in full and follow its instructions starting from Phase 3. Do not pre-read further phase files.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
> **Previous:** phase-2.md confirmed
|
|
2
|
+
> **Next:** phase-4.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Phase 3 — Analysis Methodology
|
|
7
|
+
|
|
8
|
+
Goal: Choose the right analytical approach.
|
|
9
|
+
|
|
10
|
+
First, classify the question type:
|
|
11
|
+
- **Descriptive**: what happened?
|
|
12
|
+
- **Diagnostic**: why did it happen?
|
|
13
|
+
- **Predictive**: what will happen?
|
|
14
|
+
- **Prescriptive**: what should we do?
|
|
15
|
+
|
|
16
|
+
Then ask:
|
|
17
|
+
- Does this require causal inference or is correlation sufficient?
|
|
18
|
+
- Known confounders to control for?
|
|
19
|
+
- Natural experiment, treatment/control split, or time cutoff?
|
|
20
|
+
|
|
21
|
+
**If causal**: identify treatment, outcome, confounders. Propose method (DiD, IV,
|
|
22
|
+
RDD, PSM, synthetic control) and state identification assumptions explicitly.
|
|
23
|
+
|
|
24
|
+
**If predictive/ML**: proceed to Phase 4.
|
|
25
|
+
|
|
26
|
+
**If descriptive/diagnostic**: define key segments, metrics, most informative breakdowns.
|
|
27
|
+
|
|
28
|
+
**If creative mode**: propose 2-3 methodological options including at least one
|
|
29
|
+
unconventional approach. Explain trade-offs.
|
|
30
|
+
|
|
31
|
+
**Request Researcher review of methodology:**
|
|
32
|
+
|
|
33
|
+
Tell the user: "I'm asking the Researcher to peer-review the methodology. Yes, even I get peer-reviewed. It's called rigor."
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Task(
|
|
37
|
+
subagent_type="researcher",
|
|
38
|
+
description="Review analysis methodology for [study]",
|
|
39
|
+
prompt="I am the Data Scientist shard. I've chosen the following methodology
|
|
40
|
+
for study [name]:
|
|
41
|
+
- Question type: [descriptive/diagnostic/predictive/prescriptive]
|
|
42
|
+
- Chosen method: [method and description]
|
|
43
|
+
- Key assumptions: [list]
|
|
44
|
+
- Confounders/controls: [list]
|
|
45
|
+
- Data characteristics: [grain, volume, known distribution properties]
|
|
46
|
+
Please provide a statistical review: Do the assumptions hold for this data
|
|
47
|
+
type and question? Are there distribution concerns? Is the sample likely
|
|
48
|
+
adequate? Any alternative methods I should consider? Full review please."
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Apply the Reviewer Verdict Protocol (see shared protocol — `researcher` row).
|
|
53
|
+
|
|
54
|
+
### Document Phase 3
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Phase 3: Analysis Methodology (Data Scientist)
|
|
60
|
+
- **Question type:** Descriptive | Diagnostic | Predictive | Prescriptive
|
|
61
|
+
- **Causal inference required:** Yes | No — <rationale>
|
|
62
|
+
- **Chosen method:** <method and brief description>
|
|
63
|
+
- **Why this method:** <1-2 sentence justification>
|
|
64
|
+
- **Alternatives considered:**
|
|
65
|
+
- <alternative 1>: rejected because <reason>
|
|
66
|
+
- <alternative 2>: rejected because <reason>
|
|
67
|
+
- **Key assumptions:** <list>
|
|
68
|
+
- **Confounders / controls:** <list or "N/A">
|
|
69
|
+
- **Researcher review:**
|
|
70
|
+
- Verdict: Sound | Concerns | Revise
|
|
71
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
72
|
+
- Notes: <summary of statistical review>
|
|
73
|
+
- Distribution assessment: <key distribution findings>
|
|
74
|
+
- Assumption check: <which assumptions hold, which don't>
|
|
75
|
+
- Reviewer resolution: Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
76
|
+
- **Proceeds to Phase 4 (ML):** Yes | No — skipping to Phase 5
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**DIVERGE check:** If you proposed 2-3 mutually exclusive methodological approaches (e.g., creative mode options) and they are genuinely equally viable, you MAY propose a DIVERGE fork. Read `.claude/agents/specific_instructions/shared/diverge_protocol.md` and follow its DIVERGE Proposal Gate. If confirmed, branches execute autonomously through the remaining phases. After convergence and promotion, resume at Phase 4 (or Phase 5 if no ML). If declined or not applicable, continue normally.
|
|
80
|
+
|
|
81
|
+
::GATE:: id=data-scientist-phase-3 phase=3 kind=phase
|
|
82
|
+
Read this section back to the user. Stop here — do not begin the next phase or output any further content. Wait for the user to explicitly confirm before proceeding. Do not interpret silence or partial agreement as confirmation.
|
|
83
|
+
::ENDGATE::
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## When this gate is confirmed
|
|
88
|
+
|
|
89
|
+
Read `.claude/agents/specific_instructions/data_scientist/phases/phase-4.md` in full and follow its instructions starting from Phase 4. Do not pre-read further phase files.
|