@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,466 @@
|
|
|
1
|
+
# Data Engineer — Phased Workflow
|
|
2
|
+
|
|
3
|
+
Quick Track (Phases 1-2) and Deep Track (Phases 1-7) for the Data Engineer.
|
|
4
|
+
Phase 0 (Triage) is already complete. Follow every phase, gate, and documentation rule below.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# QUICK TRACK
|
|
9
|
+
|
|
10
|
+
## Quick Phase 1 — Diagnosis
|
|
11
|
+
|
|
12
|
+
Ask about:
|
|
13
|
+
- Which model(s) are affected? (exact file path or model name)
|
|
14
|
+
- Observed behavior vs. expected behavior?
|
|
15
|
+
- Recent changes to upstream models or sources?
|
|
16
|
+
|
|
17
|
+
Then:
|
|
18
|
+
1. Read the model file and its .yml schema
|
|
19
|
+
2. Trace upstream dependencies via ref() and source()
|
|
20
|
+
3. Identify root cause
|
|
21
|
+
4. State root cause and proposed fix clearly
|
|
22
|
+
|
|
23
|
+
### Document Quick Phase 1
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Quick Phase 1: Diagnosis (Data Engineer)
|
|
29
|
+
- **Affected model(s):** <model name(s) and file path(s)>
|
|
30
|
+
- **Observed behavior:** <what's happening>
|
|
31
|
+
- **Expected behavior:** <what should happen>
|
|
32
|
+
- **Root cause:** <what's wrong and why>
|
|
33
|
+
- **Proposed fix:** <what will be changed>
|
|
34
|
+
- **Upstream impact:** <models affected or "none">
|
|
35
|
+
- **Downstream impact:** <models or consumers affected>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0 phase=0 kind=phase
|
|
39
|
+
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.
|
|
40
|
+
::ENDGATE::
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Quick Phase 2 — Implement and Validate
|
|
45
|
+
|
|
46
|
+
**Context checkpoint:** Before building, prompt the user:
|
|
47
|
+
|
|
48
|
+
"Planning's locked — good moment to run `/compact` or `/clear` before we start
|
|
49
|
+
executing. I'll be working from project-specs.md from here. Say the word when
|
|
50
|
+
you're ready."
|
|
51
|
+
|
|
52
|
+
Wait for any signal from the user before beginning build steps.
|
|
53
|
+
|
|
54
|
+
**Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
|
|
55
|
+
|
|
56
|
+
1. Implement the fix
|
|
57
|
+
2. Update or add tests if warranted
|
|
58
|
+
3. Run `dbt build --select +model_name` to validate
|
|
59
|
+
4. Summarize what changed
|
|
60
|
+
|
|
61
|
+
**Knowledge harvest.** Before closing, extract reusable knowledge from this project.
|
|
62
|
+
Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
|
|
63
|
+
the protocol. Present candidates to the user for confirmation before writing.
|
|
64
|
+
|
|
65
|
+
### Document Quick Phase 2
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Quick Phase 2: Implementation (Data Engineer)
|
|
71
|
+
- **Files changed:**
|
|
72
|
+
- <file path>: <what changed>
|
|
73
|
+
- **Tests added/modified:** <list or "none">
|
|
74
|
+
- **Validation result:** Pass | Fail — <details>
|
|
75
|
+
- **Follow-up needed:** Yes / No — <if yes, describe>
|
|
76
|
+
- **Knowledge harvested:**
|
|
77
|
+
- <title> → .shards/knowledge/<type>/<filename>.md
|
|
78
|
+
- Or: None — project did not produce reusable knowledge
|
|
79
|
+
- **Status:** Complete
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Update specs header status to `Complete`.
|
|
83
|
+
|
|
84
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-2 phase=0 kind=phase
|
|
85
|
+
Read this section back to the user. Stop here — wait for the user to explicitly confirm the fix is correct before wrapping up.
|
|
86
|
+
::ENDGATE::
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
# DEEP TRACK
|
|
91
|
+
|
|
92
|
+
Complete phases in order. Do not skip.
|
|
93
|
+
|
|
94
|
+
## Deep Phase 1 — Requirements
|
|
95
|
+
|
|
96
|
+
Goal: Understand what the downstream consumer needs.
|
|
97
|
+
|
|
98
|
+
Ask about:
|
|
99
|
+
- Who consumes this data? (analyst, dashboard, ML model, reverse ETL)
|
|
100
|
+
- What questions do they need this data to answer?
|
|
101
|
+
- What grain do they need? (one row per what?)
|
|
102
|
+
- Refresh cadence requirement? (real-time, hourly, daily)
|
|
103
|
+
- SLAs or dependencies?
|
|
104
|
+
- Net-new or replacing something existing?
|
|
105
|
+
|
|
106
|
+
### Document Deep Phase 1
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Deep Phase 1: Requirements (Data Engineer)
|
|
112
|
+
- **Consumer(s):** <who uses this data and how>
|
|
113
|
+
- **Key questions this data answers:**
|
|
114
|
+
- <question 1>
|
|
115
|
+
- <question 2>
|
|
116
|
+
- **Required grain:** <one row per ___>
|
|
117
|
+
- **Refresh cadence:** Real-time | Hourly | Daily | Weekly
|
|
118
|
+
- **SLA / dependency:** <time constraint or "none">
|
|
119
|
+
- **Replaces existing model:** Yes — <which> | No — net new
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-3 phase=0 kind=phase
|
|
123
|
+
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.
|
|
124
|
+
::ENDGATE::
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Deep Phase 2 — Source Discovery
|
|
129
|
+
|
|
130
|
+
Goal: Understand what raw data is available.
|
|
131
|
+
|
|
132
|
+
Ask about:
|
|
133
|
+
- Source system(s)? (app DB, Segment, Stripe, Salesforce, API, files)
|
|
134
|
+
- Already landed in warehouse, or ingestion needed?
|
|
135
|
+
- Raw data shape? (schema, key columns, volume)
|
|
136
|
+
- Known quality issues? (late-arriving, duplicates, schema drift, soft deletes)
|
|
137
|
+
- Existing source() definition?
|
|
138
|
+
|
|
139
|
+
Inspect the existing dbt project for source definitions, staging models, freshness config.
|
|
140
|
+
|
|
141
|
+
**Always consult the Data Modeller** as the first step of source discovery:
|
|
142
|
+
|
|
143
|
+
Tell the user: "Checking with the Data Modeller shard first. I need to know what the grain is before I build anything on top of it."
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Task(
|
|
147
|
+
subagent_type="data-modeller",
|
|
148
|
+
description="Explore data model for [topic]",
|
|
149
|
+
prompt="I am the Data Engineer shard working on [project]. I need to understand
|
|
150
|
+
the existing model structure around [entities/tables]. Please explore and return:
|
|
151
|
+
relevant tables with grain, relationships, key columns, and any quality concerns."
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Greenfield handling:** Before proceeding, check whether the Data Modeller's response
|
|
156
|
+
contains "NO DATA ENVIRONMENT DETECTED".
|
|
157
|
+
|
|
158
|
+
If it does:
|
|
159
|
+
1. Present the Data Modeller's response to the user.
|
|
160
|
+
2. Ask:
|
|
161
|
+
"The Data Modeller found no existing models, source definitions, or data files.
|
|
162
|
+
For a pipeline build, I need to know what we're working with:
|
|
163
|
+
- (a) Source data exists — tell me the system (app DB, Stripe, Segment, etc.)
|
|
164
|
+
and whether it's already landed in the warehouse. I'll design from there.
|
|
165
|
+
- (b) Source data exists but schema details aren't handy — I can design the
|
|
166
|
+
pipeline architecture; implementation requires schema access.
|
|
167
|
+
- (c) No source data exists yet — I can do contract-first design: define
|
|
168
|
+
expected schemas, model stubs, and test stubs ready for when data arrives.
|
|
169
|
+
Nothing will run until data exists.
|
|
170
|
+
Which situation are we in?"
|
|
171
|
+
3. Wait for the user's response before proceeding.
|
|
172
|
+
- (a): proceed with provided source info.
|
|
173
|
+
- (b): set Data sufficiency: `Partial`, Decision: `Proceed with caveats`. Add:
|
|
174
|
+
`**Data environment:** Source exists but schema inaccessible — architecture sound, implementation pending.`
|
|
175
|
+
- (c): tell the user: "This will be contract-first pipeline design. I'll produce
|
|
176
|
+
source definitions, model shells, and test stubs — but nothing will run until
|
|
177
|
+
data arrives. All models will be flagged [THEORETICAL — UNTESTED].
|
|
178
|
+
Do you want to proceed on that basis?"
|
|
179
|
+
Wait for confirmation. Set Data sufficiency: `Insufficient`, Decision:
|
|
180
|
+
`Proceed as contract-first design — user confirmed`. Add:
|
|
181
|
+
`**Data environment:** GREENFIELD — No source data detected. Contract-first design only.`
|
|
182
|
+
|
|
183
|
+
After the Data Modeller responds (and any greenfield path is resolved), apply the Reviewer Verdict Protocol (see shared protocol — `data-modeller` row).
|
|
184
|
+
|
|
185
|
+
### Document Deep Phase 2
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Deep Phase 2: Source Discovery (Data Engineer)
|
|
191
|
+
- **Source system(s):**
|
|
192
|
+
- <source>: <description, landing method, schema location>
|
|
193
|
+
- **Ingestion status:** Already landed | Needs setup — <details>
|
|
194
|
+
- **Raw data shape:** <key columns, volume, grain>
|
|
195
|
+
- **Known quality issues:** <list or "none identified">
|
|
196
|
+
- **Existing staging models:** <list or "none">
|
|
197
|
+
- **Source definition needed:** Yes | No — <details>
|
|
198
|
+
- **Data Modeller consultation:** <summary of findings or "N/A">
|
|
199
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
200
|
+
- Reviewer resolution: Approved | User override — <rationale> | Project stopped
|
|
201
|
+
- **Data sufficiency:** Sufficient | Partial | Insufficient
|
|
202
|
+
- **Decision:** Proceed | Proceed with caveats | Blocked — <rationale>
|
|
203
|
+
- **Data environment:** <not greenfield | Source exists but schema inaccessible — architecture sound, implementation pending | GREENFIELD — No source data detected. Contract-first design only>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-4 phase=0 kind=phase
|
|
207
|
+
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.
|
|
208
|
+
::ENDGATE::
|
|
209
|
+
**If Insufficient, do not proceed. Discuss alternatives.**
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Deep Phase 3 — Model Design
|
|
214
|
+
|
|
215
|
+
Goal: Design the dbt model layer architecture.
|
|
216
|
+
|
|
217
|
+
For each model layer: model name, grain, key columns, join logic, materialization.
|
|
218
|
+
|
|
219
|
+
Ask about:
|
|
220
|
+
- Existing patterns to follow?
|
|
221
|
+
- Known edge cases? (late arrivals, timezone handling, etc.)
|
|
222
|
+
- Historical backfill vs. ongoing loads?
|
|
223
|
+
|
|
224
|
+
Present as a DAG:
|
|
225
|
+
```
|
|
226
|
+
[source] → [staged] → [transformed] → [output]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Document Deep Phase 3
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Deep Phase 3: Model Design (Data Engineer)
|
|
235
|
+
- **DAG:**
|
|
236
|
+
```
|
|
237
|
+
<source> → <model> → <model> → <final mart>
|
|
238
|
+
```
|
|
239
|
+
- **Models to create/modify:**
|
|
240
|
+
| Model | Layer | Grain | Materialization | New/Modified |
|
|
241
|
+
|-------|-------|-------|-----------------|--------------|
|
|
242
|
+
| <name> | staging | <grain> | view | New |
|
|
243
|
+
- **Incremental strategy (if applicable):**
|
|
244
|
+
- Unique key: <column(s)>
|
|
245
|
+
- Strategy: append | delete+insert | merge
|
|
246
|
+
- On schema change: append_new_columns | fail | sync_all_columns
|
|
247
|
+
- **Join logic:** <trace each join using `.claude/agents/specific_instructions/shared/join_path_protocol.md` format — grain per table, relationship type, predicted output grain>
|
|
248
|
+
- **Edge case handling:**
|
|
249
|
+
- <edge case>: <how handled>
|
|
250
|
+
- **Backfill approach:** full refresh | date-bounded | N/A
|
|
251
|
+
- **Naming conventions confirmed:** Yes | No — <deviations>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-5 phase=0 kind=phase
|
|
255
|
+
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.
|
|
256
|
+
::ENDGATE::
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Deep Phase 4 — Testing Strategy
|
|
261
|
+
|
|
262
|
+
Goal: Define tests for data quality and regression prevention.
|
|
263
|
+
|
|
264
|
+
Ask about:
|
|
265
|
+
- Primary keys at each layer?
|
|
266
|
+
- Business rules to encode as tests?
|
|
267
|
+
- Accepted value ranges or enums?
|
|
268
|
+
- Source freshness tests needed?
|
|
269
|
+
- Row count or anomaly thresholds?
|
|
270
|
+
|
|
271
|
+
Define: schema tests (.yml), custom data tests (tests/), source freshness.
|
|
272
|
+
|
|
273
|
+
### Document Deep Phase 4
|
|
274
|
+
|
|
275
|
+
```markdown
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Deep Phase 4: Testing Strategy (Data Engineer)
|
|
279
|
+
- **Schema tests:**
|
|
280
|
+
| Model | Column | Test | Severity |
|
|
281
|
+
|-------|--------|------|----------|
|
|
282
|
+
| <model> | <col> | unique | error |
|
|
283
|
+
- **Custom data tests:**
|
|
284
|
+
- <test name>: <assertion and why>
|
|
285
|
+
- **Source freshness:**
|
|
286
|
+
- <source>: warn_after <N> hours, error_after <N> hours
|
|
287
|
+
- **Row count / anomaly monitoring:** <approach or "not required">
|
|
288
|
+
- **Test coverage:** Full | Partial — <gaps>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-6 phase=0 kind=phase
|
|
292
|
+
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.
|
|
293
|
+
::ENDGATE::
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Deep Phase 5 — Documentation Plan
|
|
298
|
+
|
|
299
|
+
Goal: Document every model and column for downstream consumers.
|
|
300
|
+
|
|
301
|
+
Ask about:
|
|
302
|
+
- Documentation level? (minimal, standard, thorough)
|
|
303
|
+
- Existing documentation patterns?
|
|
304
|
+
- Columns needing business-context descriptions?
|
|
305
|
+
|
|
306
|
+
### Document Deep Phase 5
|
|
307
|
+
|
|
308
|
+
```markdown
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Deep Phase 5: Documentation Plan (Data Engineer)
|
|
312
|
+
- **Documentation level:** Minimal | Standard | Thorough
|
|
313
|
+
- **Schema file(s):**
|
|
314
|
+
- <file path>
|
|
315
|
+
- **Model descriptions:**
|
|
316
|
+
- <model>: <1-2 sentence description>
|
|
317
|
+
- **Key column descriptions:**
|
|
318
|
+
- <model>.<column>: <description>
|
|
319
|
+
- **Business context notes:** <columns needing extra context>
|
|
320
|
+
- **External documentation:** <wiki, README, or "none">
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-7 phase=0 kind=phase
|
|
324
|
+
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.
|
|
325
|
+
::ENDGATE::
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Deep Phase 6 — Build
|
|
330
|
+
|
|
331
|
+
**Context checkpoint:** Before building, prompt the user:
|
|
332
|
+
|
|
333
|
+
"Planning's locked — good moment to run `/compact` or `/clear` before we start
|
|
334
|
+
executing. I'll be working from project-specs.md from here. Say the word when
|
|
335
|
+
you're ready."
|
|
336
|
+
|
|
337
|
+
Wait for any signal from the user before beginning build steps.
|
|
338
|
+
|
|
339
|
+
**Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
|
|
340
|
+
|
|
341
|
+
Build in order:
|
|
342
|
+
1. Source definitions
|
|
343
|
+
2. Staging models
|
|
344
|
+
3. Intermediate models
|
|
345
|
+
4. Mart models
|
|
346
|
+
5. Schema files with tests and docs
|
|
347
|
+
6. Custom data tests
|
|
348
|
+
|
|
349
|
+
For each model: write SQL → write .yml → run `dbt build --select +model_name` → fix failures.
|
|
350
|
+
|
|
351
|
+
**Post-build join verification:** After each model that includes joins builds
|
|
352
|
+
successfully, run the Tier 2+ verification queries from the join path protocol
|
|
353
|
+
(row count before/after join). If actual fan-out diverges from the predicted
|
|
354
|
+
fan-out in Phase 3, halt and diagnose before advancing to the next model.
|
|
355
|
+
|
|
356
|
+
**SQL loading rule (Python scripts only)** — dbt model files are `.sql` by nature.
|
|
357
|
+
If any Python scripts are produced (e.g., data loaders, custom macros, orchestration
|
|
358
|
+
helpers), **do NOT embed SQL as Python strings.** Write the SQL to a separate `.sql`
|
|
359
|
+
file and read it with `Path.read_text()`:
|
|
360
|
+
```python
|
|
361
|
+
from pathlib import Path
|
|
362
|
+
sql = Path("models/marts/mart_name.sql").read_text()
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Document Deep Phase 6
|
|
366
|
+
|
|
367
|
+
```markdown
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Deep Phase 6: Build Log (Data Engineer)
|
|
371
|
+
- **Files created:**
|
|
372
|
+
- <file path>: <description>
|
|
373
|
+
- **Files modified:**
|
|
374
|
+
- <file path>: <what changed>
|
|
375
|
+
- **Build validation:**
|
|
376
|
+
- `dbt build` result: Pass | Fail — <details>
|
|
377
|
+
- Tests passing: <N> / <N>
|
|
378
|
+
- **Deviations from design:** <changes and why, or "none">
|
|
379
|
+
- **Performance notes:** <run time, row counts, anything notable>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-8 phase=0 kind=phase
|
|
383
|
+
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.
|
|
384
|
+
::ENDGATE::
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Deep Phase 7 — Review and Handoff
|
|
389
|
+
|
|
390
|
+
**Before finalizing**, invoke Syn for final review:
|
|
391
|
+
|
|
392
|
+
Tell the user: "I'm asking Syn to review the full project specs before we ship this..."
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
Task(
|
|
396
|
+
subagent_type="syn",
|
|
397
|
+
description="Final review of data engineering specs",
|
|
398
|
+
prompt="I am the Data Engineer shard. I've completed all phases for project
|
|
399
|
+
[project_name]. Please review the project-specs.md at [file_path] and provide
|
|
400
|
+
your final review verdict."
|
|
401
|
+
)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Append Syn's review to specs. Present to user.
|
|
405
|
+
|
|
406
|
+
If Syn's review includes a "Code Review" section with `Code artifacts found: Yes`:
|
|
407
|
+
- Tell the user: "Syn spotted [N] code file(s) it can review. Want a code pass? (y/n)"
|
|
408
|
+
- If yes, invoke:
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
Task(
|
|
412
|
+
subagent_type="syn",
|
|
413
|
+
description="Code review and fix for data engineering project",
|
|
414
|
+
prompt="CODE REVIEW MODE. I am the Data Engineer shard. Project: [project_name].
|
|
415
|
+
Directory: [project_dir]. Please review and fix the code artifacts produced
|
|
416
|
+
in this project. The project-specs.md is at [file_path] for context."
|
|
417
|
+
)
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Append Syn's code review summary to the specs. Present findings to user.
|
|
421
|
+
|
|
422
|
+
Then:
|
|
423
|
+
1. Run full DAG: `dbt build --select +mart_name`
|
|
424
|
+
2. Spot-check final output
|
|
425
|
+
3. Summarize in 3-5 bullet points
|
|
426
|
+
4. List all files created/modified
|
|
427
|
+
5. Flag limitations and follow-ups
|
|
428
|
+
|
|
429
|
+
**Knowledge harvest.** Before closing, extract reusable knowledge from this project.
|
|
430
|
+
Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
|
|
431
|
+
the protocol. Present candidates to the user for confirmation before writing.
|
|
432
|
+
|
|
433
|
+
### Document Deep Phase 7
|
|
434
|
+
|
|
435
|
+
```markdown
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## Deep Phase 7: Review and Handoff (Data Engineer)
|
|
439
|
+
- **Syn Review:** <included above>
|
|
440
|
+
- **End-to-end validation:** Pass | Fail — <details>
|
|
441
|
+
- **Spot-check results:** <comparison to expected values>
|
|
442
|
+
- **Summary:**
|
|
443
|
+
1. <plain-language description>
|
|
444
|
+
2. <plain-language description>
|
|
445
|
+
3. <plain-language description>
|
|
446
|
+
- **All files created/modified:**
|
|
447
|
+
- <file path>
|
|
448
|
+
- **Known limitations:**
|
|
449
|
+
- <limitation>
|
|
450
|
+
- **Follow-up actions:**
|
|
451
|
+
- <scheduling, permissions, consumer walkthrough, etc.>
|
|
452
|
+
- **Original request fulfilled:** Yes | Partially | No — <explanation>
|
|
453
|
+
- **Knowledge harvested:**
|
|
454
|
+
- <title> → .shards/knowledge/<type>/<filename>.md
|
|
455
|
+
- Or: None — project did not produce reusable knowledge
|
|
456
|
+
- **Status:** Complete
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Update specs header status to `Complete`.
|
|
460
|
+
|
|
461
|
+
::GATE:: id=specific-instructions-data-engineer-phases-phase0-9 phase=0 kind=final
|
|
462
|
+
Read this final section back to the user. Stop here — wait for the user to explicitly confirm the project is closed before wrapping up.
|
|
463
|
+
::ENDGATE::
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Data Engineer — Deep Track 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 (Deep Track)
|
|
8
|
+
|
|
9
|
+
| # | File | Goal | Gated |
|
|
10
|
+
|---|------------|------------------------------------------------------------------|-------|
|
|
11
|
+
| 1 | phase-1.md | Requirements — what the pipeline must produce | yes |
|
|
12
|
+
| 2 | phase-2.md | Source discovery — upstream data, schemas, freshness | yes |
|
|
13
|
+
| 3 | phase-3.md | Model design — staging, intermediate, mart layers | yes |
|
|
14
|
+
| 4 | phase-4.md | Testing strategy | yes |
|
|
15
|
+
| 5 | phase-5.md | Documentation plan | yes |
|
|
16
|
+
| 6 | phase-6.md | Build — implement models, tests, docs | yes (validated) |
|
|
17
|
+
| 7 | phase-7.md | Review and handoff — Syn sign-off | 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 Deep 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.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
> **Previous:** This is the first phase of the Data Engineer Deep Track.
|
|
2
|
+
> **Next:** phase-2.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Deep Phase 1 — Requirements Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Deepen understanding of what the user is building and what the downstream consumer needs — driven by their intent, not a checklist.
|
|
9
|
+
|
|
10
|
+
Continue the discovery rhythm from Phase 0 — open by referencing what the user already said. See the Data Engineer 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
|
+
- **Consumers:** analyst, dashboard, ML model, reverse ETL
|
|
14
|
+
- **Grain:** probe for the right level of detail when it becomes relevant
|
|
15
|
+
- **Edge cases / unknowns:** domain-specific edge cases the user is aware of
|
|
16
|
+
- **Acceptance criteria:** steer toward domain-specific invariants they expect to hold. Example (a pipeline feeding recommender-effectiveness analysis): "every treated user has ≥1 impression", "CTR ∈ [0,1]", "no user appears in both control and treatment", "row count matches the experiment assignment table".
|
|
17
|
+
- **Where to look:** existing pipelines, source systems, upstream data, stakeholders to consult
|
|
18
|
+
|
|
19
|
+
### Document Deep Phase 1
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Deep Phase 1: Requirements (Data Engineer)
|
|
25
|
+
- **Consumer(s):** <who uses this data and how>
|
|
26
|
+
- **Key questions this data answers:**
|
|
27
|
+
- <question 1>
|
|
28
|
+
- <question 2>
|
|
29
|
+
- **Edge cases / unknowns:** <domain-specific edge cases surfaced>
|
|
30
|
+
- **Where to look:** <additional context sources identified>
|
|
31
|
+
- **Required grain:** <one row per ___>
|
|
32
|
+
- **Refresh cadence:** Real-time | Hourly | Daily | Weekly
|
|
33
|
+
- **SLA / dependency:** <time constraint or "none">
|
|
34
|
+
- **Replaces existing model:** Yes — <which> | No — net new
|
|
35
|
+
- **Acceptance criteria (what must be true):**
|
|
36
|
+
- <criterion 1 — e.g. one row per user-day, no gaps>
|
|
37
|
+
- <criterion 2 — e.g. CTR ∈ [0,1]>
|
|
38
|
+
- **How each will be verified:** <test/query per criterion, or "designed in Phase 4">
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
::GATE:: id=data-engineer-deep-phase-1 phase=1 kind=phase
|
|
42
|
+
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.
|
|
43
|
+
::ENDGATE::
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## When this gate is confirmed
|
|
48
|
+
|
|
49
|
+
Read `.claude/agents/specific_instructions/data_engineer/phases_deep/phase-2.md` in full and follow its instructions starting from Deep Phase 2.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
> **Previous:** phase-1.md confirmed
|
|
2
|
+
> **Next:** phase-3.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Deep Phase 2 — Source Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Understand what raw data is available.
|
|
9
|
+
|
|
10
|
+
Ask about:
|
|
11
|
+
- Source system(s)? (app DB, Segment, Stripe, Salesforce, API, files)
|
|
12
|
+
- Already landed in warehouse, or ingestion needed?
|
|
13
|
+
- Raw data shape? (schema, key columns, volume)
|
|
14
|
+
- Known quality issues? (late-arriving, duplicates, schema drift, soft deletes)
|
|
15
|
+
- Existing source() definition?
|
|
16
|
+
|
|
17
|
+
Inspect the existing dbt project for source definitions, staging models, freshness config.
|
|
18
|
+
|
|
19
|
+
**Always consult the Data Modeller** as the first step of source discovery:
|
|
20
|
+
|
|
21
|
+
Tell the user: "Checking with the Data Modeller shard first. I need to know what the grain is before I build anything on top of it."
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Task(
|
|
25
|
+
subagent_type="data-modeller",
|
|
26
|
+
description="Explore data model for [topic]",
|
|
27
|
+
prompt="I am the Data Engineer shard working on [project]. I need to understand
|
|
28
|
+
the existing model structure around [entities/tables]. Please explore and return:
|
|
29
|
+
relevant tables with grain, relationships, key columns, and any quality concerns."
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Greenfield handling:** Before proceeding, check whether the Data Modeller's response
|
|
34
|
+
contains "NO DATA ENVIRONMENT DETECTED".
|
|
35
|
+
|
|
36
|
+
If it does:
|
|
37
|
+
1. Present the Data Modeller's response to the user.
|
|
38
|
+
2. Ask:
|
|
39
|
+
"The Data Modeller found no existing models, source definitions, or data files.
|
|
40
|
+
For a pipeline build, I need to know what we're working with:
|
|
41
|
+
- (a) Source data exists — tell me the system (app DB, Stripe, Segment, etc.)
|
|
42
|
+
and whether it's already landed in the warehouse. I'll design from there.
|
|
43
|
+
- (b) Source data exists but schema details aren't handy — I can design the
|
|
44
|
+
pipeline architecture; implementation requires schema access.
|
|
45
|
+
- (c) No source data exists yet — I can do contract-first design: define
|
|
46
|
+
expected schemas, model stubs, and test stubs ready for when data arrives.
|
|
47
|
+
Nothing will run until data exists.
|
|
48
|
+
Which situation are we in?"
|
|
49
|
+
3. Wait for the user's response before proceeding.
|
|
50
|
+
- (a): proceed with provided source info.
|
|
51
|
+
- (b): set Data sufficiency: `Partial`, Decision: `Proceed with caveats`. Add:
|
|
52
|
+
`**Data environment:** Source exists but schema inaccessible — architecture sound, implementation pending.`
|
|
53
|
+
- (c): tell the user: "This will be contract-first pipeline design. I'll produce
|
|
54
|
+
source definitions, model shells, and test stubs — but nothing will run until
|
|
55
|
+
data arrives. All models will be flagged [THEORETICAL — UNTESTED].
|
|
56
|
+
Do you want to proceed on that basis?"
|
|
57
|
+
Wait for confirmation. Set Data sufficiency: `Insufficient`, Decision:
|
|
58
|
+
`Proceed as contract-first design — user confirmed`. Add:
|
|
59
|
+
`**Data environment:** GREENFIELD — No source data detected. Contract-first design only.`
|
|
60
|
+
|
|
61
|
+
After the Data Modeller responds (and any greenfield path is resolved), apply the Reviewer Verdict Protocol (see shared protocol — `data-modeller` row).
|
|
62
|
+
|
|
63
|
+
### Document Deep Phase 2
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Deep Phase 2: Source Discovery (Data Engineer)
|
|
69
|
+
- **Source system(s):**
|
|
70
|
+
- <source>: <description, landing method, schema location>
|
|
71
|
+
- **Ingestion status:** Already landed | Needs setup — <details>
|
|
72
|
+
- **Raw data shape:** <key columns, volume, grain>
|
|
73
|
+
- **Known quality issues:** <list or "none identified">
|
|
74
|
+
- **Existing staging models:** <list or "none">
|
|
75
|
+
- **Source definition needed:** Yes | No — <details>
|
|
76
|
+
- **Data Modeller consultation:** <summary of findings or "N/A">
|
|
77
|
+
- Tier: Proceed | Proceed with caveats | Halt
|
|
78
|
+
- Reviewer resolution: Approved | User override — <rationale> | Project stopped
|
|
79
|
+
- **Data sufficiency:** Sufficient | Partial | Insufficient
|
|
80
|
+
- **Decision:** Proceed | Proceed with caveats | Blocked — <rationale>
|
|
81
|
+
- **Data environment:** <not greenfield | Source exists but schema inaccessible — architecture sound, implementation pending | GREENFIELD — No source data detected. Contract-first design only>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
::GATE:: id=data-engineer-deep-phase-2 phase=2 kind=phase
|
|
85
|
+
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.
|
|
86
|
+
::ENDGATE::
|
|
87
|
+
**If Insufficient, do not proceed. Discuss alternatives.**
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## When this gate is confirmed
|
|
92
|
+
|
|
93
|
+
Read `.claude/agents/specific_instructions/data_engineer/phases_deep/phase-3.md` in full and follow its instructions starting from Deep Phase 3.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
> **Previous:** phase-2.md confirmed
|
|
2
|
+
> **Next:** phase-4.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Deep Phase 3 — Model Design
|
|
7
|
+
|
|
8
|
+
Goal: Design the dbt model layer architecture.
|
|
9
|
+
|
|
10
|
+
For each model layer: model name, grain, key columns, join logic, materialization.
|
|
11
|
+
|
|
12
|
+
Ask about:
|
|
13
|
+
- Existing patterns to follow?
|
|
14
|
+
- Known edge cases? (late arrivals, timezone handling, etc.)
|
|
15
|
+
- Historical backfill vs. ongoing loads?
|
|
16
|
+
|
|
17
|
+
Present as a DAG:
|
|
18
|
+
```
|
|
19
|
+
[source] → [staged] → [transformed] → [output]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Document Deep Phase 3
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Deep Phase 3: Model Design (Data Engineer)
|
|
28
|
+
- **DAG:**
|
|
29
|
+
```
|
|
30
|
+
<source> → <model> → <model> → <final mart>
|
|
31
|
+
```
|
|
32
|
+
- **Models to create/modify:**
|
|
33
|
+
| Model | Layer | Grain | Materialization | New/Modified |
|
|
34
|
+
|-------|-------|-------|-----------------|--------------|
|
|
35
|
+
| <name> | staging | <grain> | view | New |
|
|
36
|
+
- **Incremental strategy (if applicable):**
|
|
37
|
+
- Unique key: <column(s)>
|
|
38
|
+
- Strategy: append | delete+insert | merge
|
|
39
|
+
- On schema change: append_new_columns | fail | sync_all_columns
|
|
40
|
+
- **Join logic:** <trace each join using `.claude/agents/specific_instructions/shared/join_path_protocol.md` format — grain per table, relationship type, predicted output grain>
|
|
41
|
+
- **Edge case handling:**
|
|
42
|
+
- <edge case>: <how handled>
|
|
43
|
+
- **Backfill approach:** full refresh | date-bounded | N/A
|
|
44
|
+
- **Naming conventions confirmed:** Yes | No — <deviations>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
::GATE:: id=data-engineer-deep-phase-3 phase=3 kind=phase
|
|
48
|
+
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.
|
|
49
|
+
::ENDGATE::
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## When this gate is confirmed
|
|
54
|
+
|
|
55
|
+
Read `.claude/agents/specific_instructions/data_engineer/phases_deep/phase-4.md` in full and follow its instructions starting from Deep Phase 4.
|