@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,75 @@
|
|
|
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 — Scope and Constraints
|
|
7
|
+
|
|
8
|
+
Goal: Define the technical boundaries and infrastructure realities.
|
|
9
|
+
|
|
10
|
+
Ask about:
|
|
11
|
+
- **Serving mode:** Real-time (synchronous API) | Near-real-time (streaming) |
|
|
12
|
+
Batch (scheduled predictions) | Hybrid
|
|
13
|
+
- **Latency budget:** (for real-time) p50, p95, p99 targets
|
|
14
|
+
- **Throughput:** Expected QPS or batch volume
|
|
15
|
+
- **Memory budget:** Max model size, max feature vector size, concurrent instances
|
|
16
|
+
- **Compute budget:** GPU vs. CPU, cost constraints, cloud vs. on-prem
|
|
17
|
+
- **Existing infrastructure:** Model registry, feature store, serving framework,
|
|
18
|
+
orchestration (Airflow, etc.), monitoring
|
|
19
|
+
- **Data freshness requirements:** How stale can features be at inference time?
|
|
20
|
+
- **Fallback strategy:** What happens when the model is unavailable?
|
|
21
|
+
- **Compliance / fairness:** Any regulatory constraints? Protected attributes?
|
|
22
|
+
Explainability requirements?
|
|
23
|
+
|
|
24
|
+
**Consult the Data Engineer** for pipeline feasibility:
|
|
25
|
+
|
|
26
|
+
Tell the user: "Getting the Data Engineer shard in here — I need to know what the feature pipeline can actually support before I design against a fiction."
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Task(
|
|
30
|
+
subagent_type="data-engineer",
|
|
31
|
+
description="Review ML pipeline feasibility",
|
|
32
|
+
prompt="I am the ML Engineer shard scoping an ML project: [project description].
|
|
33
|
+
I need to understand the existing data pipeline infrastructure. Please tell me:
|
|
34
|
+
1. What orchestration exists (Airflow, dbt, etc.)?
|
|
35
|
+
2. What's the current pipeline cadence for key tables?
|
|
36
|
+
3. Is there a feature store or any feature serving infrastructure?
|
|
37
|
+
4. What are the realistic constraints for adding new pipeline steps?
|
|
38
|
+
5. Any known bottlenecks or capacity issues?
|
|
39
|
+
Keep the response focused and practical."
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Document Phase 2
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Phase 2: Scope and Constraints (ML Engineer)
|
|
49
|
+
- **Serving mode:** Real-time | Near-real-time | Batch | Hybrid
|
|
50
|
+
- **Latency budget:** p50: <X>ms | p95: <X>ms | p99: <X>ms (or "N/A — batch")
|
|
51
|
+
- **Throughput:** <QPS or batch volume>
|
|
52
|
+
- **Memory budget:** Model: <X>MB | Features: <X>MB | Instances: <N>
|
|
53
|
+
- **Compute:** GPU | CPU — <constraints>
|
|
54
|
+
- **Existing infrastructure:**
|
|
55
|
+
- Model registry: <exists | needs setup — details>
|
|
56
|
+
- Feature store: <exists | needs setup | N/A>
|
|
57
|
+
- Serving: <framework or "needs design">
|
|
58
|
+
- Orchestration: <tool and cadence>
|
|
59
|
+
- Monitoring: <exists | needs setup>
|
|
60
|
+
- **Data freshness at inference:** <real-time | <X> minutes | <X> hours | daily>
|
|
61
|
+
- **Fallback strategy:** <rule-based default | cached predictions | graceful degradation | TBD>
|
|
62
|
+
- **Compliance / fairness:** <constraints or "none identified">
|
|
63
|
+
- **Data Engineer consultation:**
|
|
64
|
+
- <summary of pipeline feasibility findings>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
::GATE:: id=ml-engineer-phase-2 phase=2 kind=phase
|
|
68
|
+
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.
|
|
69
|
+
::ENDGATE::
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## When this gate is confirmed
|
|
74
|
+
|
|
75
|
+
Read `.claude/agents/specific_instructions/ml_engineer/phases/phase-3.md` in full and follow its instructions starting from Phase 3. Do not pre-read further phase files.
|
|
@@ -0,0 +1,124 @@
|
|
|
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 — Data and Feature Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Understand what data is available for features and labels.
|
|
9
|
+
|
|
10
|
+
**If productionization from study:** The Data Scientist has already completed feature
|
|
11
|
+
discovery. Start by reading the study's Phase 2 (Data Discovery) and Phase 4 (Modeling
|
|
12
|
+
Approach) from the study's `project-specs.md`. Present the inherited feature set to the
|
|
13
|
+
user, then focus this phase on the **production-specific gap**:
|
|
14
|
+
- Which study features are available at the required inference latency?
|
|
15
|
+
- Which features need real-time alternatives or pre-computation?
|
|
16
|
+
- Are there features the study used that cannot be productionized?
|
|
17
|
+
Still consult the Data Modeller, but scope the consultation to serving-time data
|
|
18
|
+
availability rather than full discovery.
|
|
19
|
+
|
|
20
|
+
**Otherwise (greenfield or iteration):** proceed as below.
|
|
21
|
+
|
|
22
|
+
**Consult the Data Modeller:**
|
|
23
|
+
|
|
24
|
+
Tell the user: "Pulling in the Data Modeller. Feature definitions have to be grounded in actual data models, not what we hope exists."
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Task(
|
|
28
|
+
subagent_type="data-modeller",
|
|
29
|
+
description="Explore data model for ML features",
|
|
30
|
+
prompt="I am the ML Engineer shard building an ML system for [purpose]. I need to
|
|
31
|
+
understand the data models that could source features for this system. Specifically:
|
|
32
|
+
1. What tables capture [relevant entities and events]?
|
|
33
|
+
2. What's the grain and freshness of each?
|
|
34
|
+
3. How do they relate to each other (join keys, cardinality)?
|
|
35
|
+
4. Any data quality concerns?
|
|
36
|
+
5. Which tables are available in real-time vs. batch only?
|
|
37
|
+
Focus on: [specific entities, events, or business concepts].
|
|
38
|
+
Since I'll be building feature extraction queries against these tables, please run
|
|
39
|
+
grain validation (PK uniqueness checks) and freshness checks on the key tables."
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Greenfield handling:** Applies to greenfield and iteration projects only. If this is
|
|
44
|
+
a productionization from a study, skip — the study is the data source.
|
|
45
|
+
|
|
46
|
+
For greenfield and iteration: check whether the Data Modeller's response contains
|
|
47
|
+
"NO DATA ENVIRONMENT DETECTED".
|
|
48
|
+
|
|
49
|
+
If it does:
|
|
50
|
+
1. Present the Data Modeller's response to the user.
|
|
51
|
+
2. Ask:
|
|
52
|
+
"The Data Modeller found no data assets in this project. For an ML system, data
|
|
53
|
+
is the foundation of every feature and training decision.
|
|
54
|
+
- (a) Feature data exists in your warehouse — tell me what entities and events
|
|
55
|
+
are available. I'll design feature extraction from there.
|
|
56
|
+
- (b) Data exists but schema details aren't available right now — I can design
|
|
57
|
+
the feature architecture and model approach; actual queries and training will wait.
|
|
58
|
+
- (c) No data exists yet — I can produce a full ML architecture design, but
|
|
59
|
+
nothing will train or serve real predictions until data is available.
|
|
60
|
+
Which situation are we in?"
|
|
61
|
+
3. Wait for the user's response before proceeding.
|
|
62
|
+
- (a): proceed with provided context.
|
|
63
|
+
- (b): proceed with caveats. Flag feature availability column in Phase 3 docs as
|
|
64
|
+
"Unverified — user-described." Add:
|
|
65
|
+
`**Data environment:** Feature data exists but inaccessible — candidates user-described, not verified.`
|
|
66
|
+
- (c): tell the user: "This will be an ML architecture design document. I can
|
|
67
|
+
define feature requirements, label definition, model architecture, and
|
|
68
|
+
infrastructure design — but the model cannot train and feature queries cannot
|
|
69
|
+
run until data exists. All feature candidates will be flagged
|
|
70
|
+
[THEORETICAL — DATA NOT AVAILABLE]. Do you want to proceed on that basis?"
|
|
71
|
+
Wait for confirmation. Add:
|
|
72
|
+
`**Data environment:** GREENFIELD — No data assets detected. Theoretical ML design only.`
|
|
73
|
+
|
|
74
|
+
Present findings, then ask:
|
|
75
|
+
- **Label definition:** How is the target variable defined? Where does ground truth come from?
|
|
76
|
+
Is there label delay (e.g., churn only observable 90 days later)?
|
|
77
|
+
- **Feature candidates:** What signals could predict the target? Group by:
|
|
78
|
+
- User/entity attributes (demographic, account-level)
|
|
79
|
+
- Behavioral features (engagement, usage patterns, recency/frequency/monetary)
|
|
80
|
+
- Contextual features (time of day, device, location)
|
|
81
|
+
- Interaction features (user x item, user x content)
|
|
82
|
+
|
|
83
|
+
For each group, also propose 1-2 **novel derived candidates** — e.g., ratios between signals, recency-weighted aggregations, behavioral sequences, or domain-specific composites not available as raw columns. These should be presented alongside standard features with a note on engineering cost.
|
|
84
|
+
- **Feature availability at inference:** For each feature group, is it available
|
|
85
|
+
at the latency required for serving?
|
|
86
|
+
- **Historical depth:** How far back does the data go? Is it sufficient for training?
|
|
87
|
+
- **Known biases:** Selection bias, survivorship bias, feedback loops
|
|
88
|
+
|
|
89
|
+
### Document Phase 3
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Phase 3: Data and Feature Discovery (ML Engineer)
|
|
95
|
+
- **Data Modeller consultation:**
|
|
96
|
+
- <summary of data model findings>
|
|
97
|
+
- **Label definition:**
|
|
98
|
+
- Target: <variable name and definition>
|
|
99
|
+
- Ground truth source: <table or event>
|
|
100
|
+
- Label delay: <duration or "none">
|
|
101
|
+
- Label quality concerns: <issues or "none">
|
|
102
|
+
- **Feature candidates:**
|
|
103
|
+
| Feature Group | Examples | Source Table(s) | Available at Inference? |
|
|
104
|
+
|--------------|---------|-----------------|----------------------|
|
|
105
|
+
| Entity attributes | <examples> | <tables> | Yes — batch | Yes — real-time | No |
|
|
106
|
+
| Behavioral | <examples> | <tables> | Yes — batch | Yes — real-time | No |
|
|
107
|
+
| Contextual | <examples> | <tables> | Yes — real-time | No |
|
|
108
|
+
| Interaction | <examples> | <tables> | Yes — batch | No |
|
|
109
|
+
- **Historical depth:** <time range available>
|
|
110
|
+
- **Known biases:**
|
|
111
|
+
- <bias type>: <description and mitigation>
|
|
112
|
+
- **Feature-serving gap:** <features available in batch but not real-time, and impact>
|
|
113
|
+
- **Data environment:** <not greenfield | Feature data exists but inaccessible — candidates user-described, not verified | GREENFIELD — No data assets detected. Theoretical ML design only>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
::GATE:: id=ml-engineer-phase-3 phase=3 kind=phase
|
|
117
|
+
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.
|
|
118
|
+
::ENDGATE::
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## When this gate is confirmed
|
|
123
|
+
|
|
124
|
+
Read `.claude/agents/specific_instructions/ml_engineer/phases/phase-4.md` in full and follow its instructions starting from Phase 4. Do not pre-read further phase files.
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
> **Previous:** phase-3.md confirmed
|
|
2
|
+
> **Next:** phase-5.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Phase 4 — Model Design
|
|
7
|
+
|
|
8
|
+
Goal: Choose the model architecture, baselines, and candidate approaches.
|
|
9
|
+
|
|
10
|
+
**If productionization from study:** The Data Scientist has already validated the
|
|
11
|
+
model design from a statistical perspective. Start by reading the study's Phase 4
|
|
12
|
+
(Modeling Approach) and Phase 6 (Build Log) from the study's `project-specs.md`.
|
|
13
|
+
The study's candidate model is the starting point, not a blank slate. Focus this phase on:
|
|
14
|
+
- Can the study's best model meet serving constraints (latency, memory, size)?
|
|
15
|
+
- If not, what production-friendly alternatives achieve acceptable performance?
|
|
16
|
+
- What's the production baseline? (the study's baseline may differ from a production baseline)
|
|
17
|
+
Still consult the Data Scientist via Task, but frame the review as "production adaptation
|
|
18
|
+
review" rather than full methodology review.
|
|
19
|
+
|
|
20
|
+
**Otherwise (greenfield or iteration):** proceed as below.
|
|
21
|
+
|
|
22
|
+
Ask about:
|
|
23
|
+
- **Model type preferences:** Any organizational preferences or existing frameworks?
|
|
24
|
+
(scikit-learn, XGBoost, LightGBM, PyTorch, TensorFlow, etc.)
|
|
25
|
+
- **Interpretability vs. performance trade-off:** Where does this sit?
|
|
26
|
+
- **Ensemble acceptable?** Or must it be a single model for serving simplicity?
|
|
27
|
+
- **Online learning needed?** Or batch retrain is sufficient?
|
|
28
|
+
|
|
29
|
+
**Feature Registry check.** If `.shards/knowledge/features/` exists, scan for features
|
|
30
|
+
whose domain tags overlap with this project's data domain (from Phase 3). For each
|
|
31
|
+
relevant feature, present to the user with its SQL snippet, grain, and verification
|
|
32
|
+
metadata. Ask: "Would you like to import any of these into your feature candidates?"
|
|
33
|
+
|
|
34
|
+
If imported, note in feature candidates list: `(imported from Knowledge Ledger —
|
|
35
|
+
verified by <agent> in <source_project>)`
|
|
36
|
+
|
|
37
|
+
**Consult the Data Scientist** for methodology review:
|
|
38
|
+
|
|
39
|
+
Tell the user: "Asking the Data Scientist to review the modeling approach. Statistical rigor isn't optional."
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Task(
|
|
44
|
+
subagent_type="data-scientist",
|
|
45
|
+
description="Review ML model design for [project]",
|
|
46
|
+
prompt="I am the ML Engineer shard designing an ML system for [purpose].
|
|
47
|
+
Here is the model design:
|
|
48
|
+
- Task: [classification/regression/ranking/etc.]
|
|
49
|
+
- Target: [definition]
|
|
50
|
+
- Features: [summary of feature groups]
|
|
51
|
+
- Baseline: [proposed baseline]
|
|
52
|
+
- Candidates: [proposed candidate models]
|
|
53
|
+
- Evaluation: [proposed metrics]
|
|
54
|
+
Please review from a statistical and methodological perspective:
|
|
55
|
+
1. Is the target definition sound? Any leakage risk?
|
|
56
|
+
2. Are the evaluation metrics appropriate for the business problem?
|
|
57
|
+
3. Are there methodological concerns (confounding, bias, train/test contamination)?
|
|
58
|
+
4. Would you suggest a different approach or additional baselines?
|
|
59
|
+
Keep the review focused — I'll handle the systems/infrastructure side."
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Consult the Applied ML Scientist** for methodology review. This is the default —
|
|
64
|
+
AMS reviews the ML science of the proposed design (problem formulation, inductive
|
|
65
|
+
bias alignment, loss function choice, evaluation metric soundness) in every Build
|
|
66
|
+
project. Skip ONLY if ALL of the following hold:
|
|
67
|
+
- Pure tabular data with standard feature types
|
|
68
|
+
- Standard sklearn/XGBoost/LightGBM model family
|
|
69
|
+
- Standard loss (MSE, log loss, cross-entropy)
|
|
70
|
+
- Standard evaluation metrics (AUC, RMSE, accuracy, precision/recall)
|
|
71
|
+
- No custom objectives, no architecture search, no self-supervised components
|
|
72
|
+
|
|
73
|
+
If any of those criteria fail — or you're unsure — consult AMS. Non-tabular data
|
|
74
|
+
structures (sequences, graphs, point clouds, images), custom objectives,
|
|
75
|
+
architecture search, self-supervised pretraining, multi-task learning, or user
|
|
76
|
+
requests for novel approaches all require AMS review.
|
|
77
|
+
|
|
78
|
+
Tell the user: "Pulling in the Applied ML Scientist to review the methodology —
|
|
79
|
+
problem formulation, inductive bias, objective alignment. Science review before
|
|
80
|
+
we commit to this design."
|
|
81
|
+
|
|
82
|
+
If skipping, state explicitly: "Skipping Applied ML Scientist review — this is
|
|
83
|
+
standard tabular <problem type> with <model family> and <metric>. No cutting-edge
|
|
84
|
+
methodology in scope." Document the skip rationale in the phase output.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Task(
|
|
88
|
+
subagent_type="applied-ml-scientist",
|
|
89
|
+
description="ML methodology review for <system type>",
|
|
90
|
+
prompt="I am the ML Engineer shard designing a <system>. The proposed approach is:
|
|
91
|
+
- Task type: <classification | regression | ranking | etc.>
|
|
92
|
+
- Data: <modality, scale, key characteristics>
|
|
93
|
+
- Proposed model: <architecture or approach>
|
|
94
|
+
- Objective: <loss function / evaluation metric>
|
|
95
|
+
- Constraints: <latency, memory, compute budget, interpretability>
|
|
96
|
+
- Business goal: <what the model output drives>
|
|
97
|
+
|
|
98
|
+
Please review and flag:
|
|
99
|
+
1. Is the problem formulated correctly as an ML problem?
|
|
100
|
+
2. Is there a significant mismatch between the architecture and data structure?
|
|
101
|
+
3. Are there methods from recent literature that would clearly outperform the
|
|
102
|
+
proposed approach for this specific problem?
|
|
103
|
+
4. Any red flags on the loss function or evaluation metric?
|
|
104
|
+
|
|
105
|
+
Context: <key constraints and goals from Phases 1-3>."
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Apply the Reviewer Verdict Protocol (see shared protocol — `applied-ml-scientist` row).
|
|
110
|
+
|
|
111
|
+
**If the candidate model involves deep learning** — neural networks for image,
|
|
112
|
+
text, audio, point cloud, or graph data, transformer variants, CNNs, RNNs, or any
|
|
113
|
+
multi-layer neural approach — consult the Deep Learning Engineer:
|
|
114
|
+
|
|
115
|
+
Tell the user: "This involves deep learning — I'm asking the Deep Learning Engineer
|
|
116
|
+
shard to review architecture–data alignment, memory footprint, and inference
|
|
117
|
+
feasibility..."
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Task(
|
|
121
|
+
subagent_type="deep-learning-engineer",
|
|
122
|
+
description="DL architecture and production feasibility review for <project>",
|
|
123
|
+
prompt="I am the ML Engineer shard designing an ML system. I need a deep learning
|
|
124
|
+
architecture and production feasibility review.
|
|
125
|
+
|
|
126
|
+
- Task type: <classification | regression | ranking | generation | etc.>
|
|
127
|
+
- Data modality: <image | text | audio | point cloud | graph | tabular | multi-modal>
|
|
128
|
+
- Proposed architecture: <name or description>
|
|
129
|
+
- Input/output shapes: <input tensor shape> → <output tensor shape>
|
|
130
|
+
- Data scale: <N training examples, sequence length or spatial dims>
|
|
131
|
+
- Hardware: <GPU, VRAM, inference latency budget>
|
|
132
|
+
- Model size budget: <parameter ceiling or 'unconstrained'>
|
|
133
|
+
- Business goal: <what the model output drives>
|
|
134
|
+
|
|
135
|
+
Please review:
|
|
136
|
+
1. Is there a mismatch between the proposed architecture and the data structure
|
|
137
|
+
(inductive bias argument)?
|
|
138
|
+
2. Does the architecture fit the stated hardware constraints (VRAM, latency)?
|
|
139
|
+
3. Are there implementation concerns (numerical instability, known failure modes
|
|
140
|
+
for this architecture class at this data scale)?
|
|
141
|
+
4. Are there superior architectures from recent literature for this exact
|
|
142
|
+
problem type that would be worth considering before committing?
|
|
143
|
+
|
|
144
|
+
Context: <key constraints and goals from Phases 1-3>."
|
|
145
|
+
)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Apply the Reviewer Verdict Protocol (see shared protocol — `deep-learning-engineer` row).
|
|
149
|
+
|
|
150
|
+
**If Interpretability is High — consult the Data Analyst:**
|
|
151
|
+
|
|
152
|
+
Tell the user: "Looping in the Data Analyst — they need to validate that these features make business sense before we serve them."
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Task(
|
|
156
|
+
subagent_type="data-analyst",
|
|
157
|
+
description="Review feature candidates for business sense and interpretability",
|
|
158
|
+
prompt="I am the ML Engineer shard building an ML system for [purpose]. High
|
|
159
|
+
interpretability has been flagged as a requirement. Please review the feature
|
|
160
|
+
candidates to confirm they make business sense for this problem.
|
|
161
|
+
|
|
162
|
+
Feature candidates: [summary of feature groups from Phase 3]
|
|
163
|
+
Target variable: [name and definition]
|
|
164
|
+
End users of model outputs: [from Phase 1 — internal system | customer-facing | analyst | API consumer]
|
|
165
|
+
Business problem: [from Phase 1]
|
|
166
|
+
Cost of wrong predictions: [false positive / false negative impact, from Phase 1]
|
|
167
|
+
|
|
168
|
+
Please review:
|
|
169
|
+
1. Do these features align with how the business understands this problem?
|
|
170
|
+
2. Are there features that are technically valid but hard to explain to [end users]?
|
|
171
|
+
3. Are there obvious business-meaningful features that appear missing?
|
|
172
|
+
4. Any features that could undermine trust in the model if surfaced via SHAP or
|
|
173
|
+
feature importance to stakeholders?
|
|
174
|
+
Focus on interpretability and business alignment — I'll handle the systems side."
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Apply the Reviewer Verdict Protocol (see shared protocol — `data-analyst` row).
|
|
179
|
+
|
|
180
|
+
**If the evaluation involves statistical inference** — A/B testing, confidence
|
|
181
|
+
intervals, power analysis, significance testing, or experiment design for
|
|
182
|
+
online evaluation — consult the Researcher:
|
|
183
|
+
|
|
184
|
+
Tell the user: "The evaluation plan involves statistical inference — I'm asking
|
|
185
|
+
the Researcher shard to validate the methodology before we commit to it."
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Task(
|
|
189
|
+
subagent_type="researcher",
|
|
190
|
+
description="Review statistical inference methodology for ML evaluation",
|
|
191
|
+
prompt="I am the ML Engineer shard designing the evaluation strategy for an
|
|
192
|
+
ML system: [description].
|
|
193
|
+
Here is the proposed evaluation approach:
|
|
194
|
+
- Task: [what the model does]
|
|
195
|
+
- Offline metrics: [list]
|
|
196
|
+
- Online evaluation plan: [A/B test design, shadow mode, etc.]
|
|
197
|
+
- Sample size / traffic split: [N or %]
|
|
198
|
+
- Statistical test planned: [t-test, chi-squared, bootstrap, etc. or 'TBD']
|
|
199
|
+
- Confidence level: [95%, 99%, etc. or 'TBD']
|
|
200
|
+
Please review from a statistical methodology perspective:
|
|
201
|
+
1. Is the proposed statistical test appropriate for this metric type?
|
|
202
|
+
2. Is the sample size / traffic split adequate for the expected effect size?
|
|
203
|
+
3. Is the experiment design sound (randomization, control, duration)?
|
|
204
|
+
4. Are there multiple comparison issues or other statistical pitfalls?
|
|
205
|
+
5. What power analysis would you recommend?
|
|
206
|
+
Keep the review focused on statistical inference methodology."
|
|
207
|
+
)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Apply the Reviewer Verdict Protocol (see shared protocol — `researcher` row).
|
|
211
|
+
|
|
212
|
+
Define:
|
|
213
|
+
- **Baseline model:** Simple, fast, interpretable. The floor to beat.
|
|
214
|
+
(logistic regression, decision tree, popularity-based, rule-based)
|
|
215
|
+
- **Candidate model(s):** What to try if baseline isn't sufficient.
|
|
216
|
+
- **Evaluation strategy:**
|
|
217
|
+
- Offline metrics: the model metrics (AUC, RMSE, NDCG, MAP, precision@k, etc.)
|
|
218
|
+
- Online metrics: the business metrics (conversion, engagement, revenue)
|
|
219
|
+
- Validation approach: temporal split, k-fold, stratified, group-aware
|
|
220
|
+
- **Model size estimate:** Approximate parameter count, serialized size
|
|
221
|
+
- **Inference cost estimate:** CPU/GPU time per prediction, batch throughput
|
|
222
|
+
|
|
223
|
+
### Document Phase 4
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Phase 4: Model Design (ML Engineer)
|
|
229
|
+
- **Data Scientist review:**
|
|
230
|
+
- Verdict: Approved | Concerns raised
|
|
231
|
+
- Tier: Proceed | Proceed with caveats
|
|
232
|
+
- Notes: <summary of methodology review>
|
|
233
|
+
- Reviewer resolution: Approved | User override — <rationale>
|
|
234
|
+
- **Applied ML Scientist review:** <summary if consulted> | Skipped — <skip rationale per the criteria above>
|
|
235
|
+
- Verdict: Sound | Consider Alternatives | Revise
|
|
236
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
237
|
+
- Reviewer resolution: Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
238
|
+
- **Deep Learning Engineer review:** N/A — not a DL approach | <summary if consulted>
|
|
239
|
+
- Verdict: DEPLOY | OPTIMIZE | REDESIGN
|
|
240
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
241
|
+
- Reviewer resolution: Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
242
|
+
- **Data Analyst feature review:** N/A — Interpretability not High | <summary>
|
|
243
|
+
- Verdict: Aligned | Concerns raised
|
|
244
|
+
- Tier: Proceed | Proceed with caveats
|
|
245
|
+
- Reviewer resolution: Approved | User override — <rationale>
|
|
246
|
+
- **Researcher review:** N/A — no statistical inference in evaluation | <summary if consulted>
|
|
247
|
+
- Verdict: Sound | Concerns | Revise
|
|
248
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
249
|
+
- Reviewer resolution: Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
250
|
+
- **Baseline model:**
|
|
251
|
+
- Type: <model type>
|
|
252
|
+
- Rationale: <why this baseline>
|
|
253
|
+
- Expected performance: <rough estimate>
|
|
254
|
+
- **Candidate model(s):**
|
|
255
|
+
- <model 1>: <type, rationale, trade-offs>
|
|
256
|
+
- <model 2>: <type, rationale, trade-offs>
|
|
257
|
+
- **Evaluation strategy:**
|
|
258
|
+
- Offline metrics: <list with business interpretation>
|
|
259
|
+
- Online metrics: <list — what to measure post-deploy>
|
|
260
|
+
- Validation: <temporal split | k-fold | stratified | group-aware — rationale>
|
|
261
|
+
- Minimum threshold: <metric > value — business justification>
|
|
262
|
+
- **Interpretability approach:** <SHAP | LIME | feature importance | N/A>
|
|
263
|
+
- **Model size estimate:** ~<N> parameters, ~<X>MB serialized
|
|
264
|
+
- **Inference cost:** ~<X>ms per prediction on <CPU/GPU>
|
|
265
|
+
- **Ensemble:** Yes — <strategy> | No — single model
|
|
266
|
+
- **Online learning:** Yes — <strategy> | No — batch retrain
|
|
267
|
+
- **Feature Registry check:** <N> relevant features found | No features found | N/A — no features directory
|
|
268
|
+
- Imported: <title(s)> | None
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
::GATE:: id=ml-engineer-phase-4 phase=4 kind=phase
|
|
272
|
+
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.
|
|
273
|
+
::ENDGATE::
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## When this gate is confirmed
|
|
278
|
+
|
|
279
|
+
Read `.claude/agents/specific_instructions/ml_engineer/phases/phase-5.md` in full and follow its instructions starting from Phase 5. Do not pre-read further phase files.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
> **Previous:** phase-4.md confirmed
|
|
2
|
+
> **Next:** phase-6.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Phase 5 — Infrastructure Design
|
|
7
|
+
|
|
8
|
+
Goal: Design the ML infrastructure — training pipeline, serving, monitoring.
|
|
9
|
+
|
|
10
|
+
**For greenfield projects**, design the full stack:
|
|
11
|
+
|
|
12
|
+
1. **Training pipeline:**
|
|
13
|
+
- Feature extraction (SQL → feature store or flat files)
|
|
14
|
+
- Train/validation/test split strategy
|
|
15
|
+
- Training orchestration (Airflow DAG, manual, CI/CD triggered)
|
|
16
|
+
- Model artifact storage (model registry, S3, etc.)
|
|
17
|
+
- Hyperparameter tuning strategy (grid, random, Bayesian, manual)
|
|
18
|
+
|
|
19
|
+
2. **Serving infrastructure:**
|
|
20
|
+
- Real-time: API framework (FastAPI, Flask, gRPC), containerization, scaling
|
|
21
|
+
- Batch: scheduled job, output format and destination
|
|
22
|
+
- Feature serving: pre-computed features, real-time feature computation, caching
|
|
23
|
+
- Model loading: cold start time, warm-up, model versioning
|
|
24
|
+
|
|
25
|
+
3. **Monitoring:**
|
|
26
|
+
- Model performance monitoring (prediction distribution drift, feature drift)
|
|
27
|
+
- Data quality monitoring (missing features, schema changes, staleness)
|
|
28
|
+
- System monitoring (latency, error rate, throughput, memory)
|
|
29
|
+
- Alerting thresholds and escalation paths
|
|
30
|
+
- Retraining triggers (scheduled, performance-based, drift-based)
|
|
31
|
+
|
|
32
|
+
4. **Rollback and safety:**
|
|
33
|
+
- A/B testing or shadow mode plan
|
|
34
|
+
- Rollback procedure (previous model version, rule-based fallback)
|
|
35
|
+
- Circuit breaker logic
|
|
36
|
+
|
|
37
|
+
**Consult the Data Engineer** for pipeline design review:
|
|
38
|
+
|
|
39
|
+
Tell the user: "Getting the Data Engineer shard to review the pipeline architecture. I need to know if the orchestration and scheduling actually fits before this is finalized."
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Task(
|
|
43
|
+
subagent_type="data-engineer",
|
|
44
|
+
description="Review ML pipeline infrastructure design for [project]",
|
|
45
|
+
prompt="I am the ML Engineer shard. I've designed the data pipeline
|
|
46
|
+
infrastructure for project [project_name]. Here is the pipeline design:
|
|
47
|
+
- Training pipeline: [feature extraction method, orchestration tool, schedule]
|
|
48
|
+
- Feature serving: [pre-computed vs. real-time, caching strategy]
|
|
49
|
+
- Storage: [artifact storage, feature store, output destinations]
|
|
50
|
+
- Orchestration: [tool, DAG structure, scheduling, dependencies]
|
|
51
|
+
- Monitoring: [data quality checks, alerting, retraining triggers]
|
|
52
|
+
Please review from a data engineering perspective:
|
|
53
|
+
1. Does the orchestration design fit existing Airflow/dbt patterns?
|
|
54
|
+
2. Is the feature extraction pipeline feasible at the designed cadence?
|
|
55
|
+
3. Are the storage choices and capacity realistic?
|
|
56
|
+
4. Does this integrate cleanly with existing data infrastructure?
|
|
57
|
+
5. Any scheduling, dependency, or resource concerns?
|
|
58
|
+
Keep the review focused and practical — I'll handle the ML-specific concerns."
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Join path self-check (pipeline design):** Before requesting the Data Modeller
|
|
63
|
+
review, trace the join path for each join in the feature pipeline following
|
|
64
|
+
`.claude/agents/specific_instructions/shared/join_path_protocol.md`. Present the
|
|
65
|
+
trace to the user. Include it in the DM prompt below. Grain errors in feature
|
|
66
|
+
extraction become training set contamination.
|
|
67
|
+
|
|
68
|
+
**Consult the Data Modeller** for pipeline data correctness review with validation:
|
|
69
|
+
|
|
70
|
+
Tell the user: "Pulling in the Data Modeller to verify the pipeline design against the actual data model. Grain errors here become training errors later."
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Task(
|
|
74
|
+
subagent_type="data-modeller",
|
|
75
|
+
description="Review ML pipeline data correctness for [project]",
|
|
76
|
+
prompt="I am the ML Engineer shard. I've designed the data pipeline for project
|
|
77
|
+
[project_name]. The project specs are at: [services|<existing_dir>]/[project_name]/project-specs.md
|
|
78
|
+
|
|
79
|
+
Here is how data flows through the pipeline:
|
|
80
|
+
- Feature extraction sources: [source tables and how they're used]
|
|
81
|
+
- Join strategy in pipeline: [key joins, grain at each stage]
|
|
82
|
+
- Pipeline stages: [ETL steps from source to training-ready dataset]
|
|
83
|
+
- Feature refresh cadence: [how often each feature group is refreshed]
|
|
84
|
+
- Serving-time data flow: [how features reach the model at inference]
|
|
85
|
+
|
|
86
|
+
Please REVIEW (not just explore) from a data model perspective:
|
|
87
|
+
1. Are the source table choices correct for these features?
|
|
88
|
+
2. Is grain handled correctly at each pipeline stage?
|
|
89
|
+
3. Are the join strategies sound given the entity relationships?
|
|
90
|
+
4. Does the data freshness cadence align with the model's requirements?
|
|
91
|
+
|
|
92
|
+
Run validation queries to verify:
|
|
93
|
+
1. PK uniqueness on each source table I'm using (confirm stated grain)
|
|
94
|
+
2. Null rates on join keys and critical feature columns
|
|
95
|
+
3. Join fan-out: run row counts before/after the key joins in my pipeline
|
|
96
|
+
4. Data freshness on each source table
|
|
97
|
+
|
|
98
|
+
Cross-reference results against the project requirements in project-specs.md
|
|
99
|
+
(especially Phase 3 feature candidates and Phase 2 data freshness requirements).
|
|
100
|
+
Keep the review focused on data correctness — the Data Engineer is reviewing
|
|
101
|
+
orchestration and infrastructure separately.
|
|
102
|
+
Return your full review with query validation results."
|
|
103
|
+
)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Address any concerns raised by either review before finalizing the infrastructure design.
|
|
107
|
+
|
|
108
|
+
**For iteration projects**, focus on what's changing and ensure backward compatibility.
|
|
109
|
+
|
|
110
|
+
### Document Phase 5
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Phase 5: Infrastructure Design (ML Engineer)
|
|
116
|
+
- **Training pipeline:**
|
|
117
|
+
- Feature extraction: <method and location>
|
|
118
|
+
- Split strategy: <temporal | random | stratified — rationale>
|
|
119
|
+
- Orchestration: <tool and schedule>
|
|
120
|
+
- Artifact storage: <registry or location>
|
|
121
|
+
- HPO strategy: <grid | random | Bayesian | manual>
|
|
122
|
+
- **Serving infrastructure:**
|
|
123
|
+
- Mode: <real-time API | batch | streaming>
|
|
124
|
+
- Framework: <FastAPI | Flask | gRPC | batch job>
|
|
125
|
+
- Feature serving: <pre-computed | real-time | cache — TTL>
|
|
126
|
+
- Model loading: cold start ~<X>s, model version strategy
|
|
127
|
+
- Scaling: <horizontal | vertical — triggers>
|
|
128
|
+
- **Monitoring:**
|
|
129
|
+
- Model perf: <metrics tracked, drift detection method>
|
|
130
|
+
- Data quality: <what's monitored>
|
|
131
|
+
- System: <latency, error rate, throughput — dashboards>
|
|
132
|
+
- Alerting: <thresholds and escalation>
|
|
133
|
+
- Retraining trigger: <scheduled | performance-based | drift-based — threshold>
|
|
134
|
+
- **Rollback plan:**
|
|
135
|
+
- A/B testing: <plan or "N/A">
|
|
136
|
+
- Shadow mode: <plan or "N/A">
|
|
137
|
+
- Rollback: <procedure>
|
|
138
|
+
- Fallback: <rule-based default | cached predictions | error response>
|
|
139
|
+
- **Data Engineer pipeline review:**
|
|
140
|
+
- Verdict: Approved | Concerns raised
|
|
141
|
+
- Notes: <summary of infrastructure review>
|
|
142
|
+
- Issues addressed: <how resolved or "none raised">
|
|
143
|
+
- **Data Modeller pipeline review:**
|
|
144
|
+
- Verdict: Approved | Concerns raised
|
|
145
|
+
- Notes: <summary of data correctness review>
|
|
146
|
+
- Issues addressed: <how resolved or "none raised">
|
|
147
|
+
- **Iteration-specific (if applicable):**
|
|
148
|
+
- What's changing: <features | model | infra | all>
|
|
149
|
+
- Backward compatibility: <ensured | breaking — migration plan>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
::GATE:: id=ml-engineer-phase-5 phase=5 kind=phase
|
|
153
|
+
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.
|
|
154
|
+
::ENDGATE::
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## When this gate is confirmed
|
|
159
|
+
|
|
160
|
+
Read `.claude/agents/specific_instructions/ml_engineer/phases/phase-6.md` in full and follow its instructions starting from Phase 6. Do not pre-read further phase files.
|