@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,581 @@
|
|
|
1
|
+
# Data Modeller — Phased Workflow
|
|
2
|
+
|
|
3
|
+
Quick Track (Phases 1-2) and Deep Track (Phases 1-7) for the Data Modeller.
|
|
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 — Scope the Change
|
|
11
|
+
|
|
12
|
+
Ask about:
|
|
13
|
+
- Which model(s) and column(s) are affected?
|
|
14
|
+
- Current state vs. desired state?
|
|
15
|
+
- Downstream dependencies?
|
|
16
|
+
|
|
17
|
+
Then:
|
|
18
|
+
1. Read the model file and its .yml schema
|
|
19
|
+
2. Trace downstream dependencies via ref()
|
|
20
|
+
3. Assess blast radius
|
|
21
|
+
4. Present the change plan
|
|
22
|
+
|
|
23
|
+
### Document Quick Phase 1
|
|
24
|
+
|
|
25
|
+
Append to project-specs.md:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Quick Phase 1: Change Scope (Data Modeller)
|
|
31
|
+
- **Affected model(s):** <model name(s) and file path(s)>
|
|
32
|
+
- **Current state:** <what exists now>
|
|
33
|
+
- **Desired state:** <what should exist after>
|
|
34
|
+
- **Downstream dependencies:** <models that reference affected columns>
|
|
35
|
+
- **Blast radius:** Isolated | Minor (<3 models) | Significant (3+)
|
|
36
|
+
- **Change plan:**
|
|
37
|
+
- <file>: <what changes>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0 phase=0 kind=phase
|
|
41
|
+
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.
|
|
42
|
+
::ENDGATE::
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Quick Phase 2 — Implement and Validate
|
|
47
|
+
|
|
48
|
+
**Context checkpoint:** Before building, prompt the user:
|
|
49
|
+
|
|
50
|
+
"Planning's locked — good moment to run `/compact` or `/clear` before we start
|
|
51
|
+
executing. I'll be working from project-specs.md from here. Say the word when
|
|
52
|
+
you're ready."
|
|
53
|
+
|
|
54
|
+
Wait for any signal from the user before beginning build steps.
|
|
55
|
+
|
|
56
|
+
**Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
|
|
57
|
+
|
|
58
|
+
1. Implement the change in model SQL and .yml schema
|
|
59
|
+
2. Update any downstream models that reference changed columns
|
|
60
|
+
3. Run `dbt build --select +model_name+` to validate
|
|
61
|
+
4. **Post-build validation:** After the build passes, run grain validation
|
|
62
|
+
(`count(*) vs count(distinct pk)`) on each changed model. For models with
|
|
63
|
+
joins, run the fan-out check from `join_path_protocol.md` Tier 2+. Run
|
|
64
|
+
`dbt show --select <model> --limit 5` to confirm output looks right.
|
|
65
|
+
If any check fails, fix before proceeding. Skip if no-data environment.
|
|
66
|
+
5. Summarize what changed
|
|
67
|
+
|
|
68
|
+
**Knowledge harvest.** Before closing, extract reusable knowledge from this project.
|
|
69
|
+
Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
|
|
70
|
+
the protocol. Present candidates to the user for confirmation before writing.
|
|
71
|
+
|
|
72
|
+
### Document Quick Phase 2
|
|
73
|
+
|
|
74
|
+
Append to project-specs.md:
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Quick Phase 2: Implementation (Data Modeller)
|
|
80
|
+
- **Files changed:**
|
|
81
|
+
- <file path>: <what changed>
|
|
82
|
+
- **Downstream updates:** <files updated or "none needed">
|
|
83
|
+
- **Validation result:** Pass | Fail — <details>
|
|
84
|
+
- **Post-build validation:** PASS | FAIL | SKIPPED (no data) — <details>
|
|
85
|
+
- **Follow-up needed:** Yes / No — <if yes, describe>
|
|
86
|
+
- **Knowledge harvested:**
|
|
87
|
+
- <title> → .shards/knowledge/<type>/<filename>.md
|
|
88
|
+
- Or: None — project did not produce reusable knowledge
|
|
89
|
+
- **Status:** Complete
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Update the specs header status to `Complete`.
|
|
93
|
+
|
|
94
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-2 phase=0 kind=phase
|
|
95
|
+
Read this section back to the user. Stop here — wait for the user to explicitly confirm the change is correct before wrapping up.
|
|
96
|
+
::ENDGATE::
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# DEEP TRACK
|
|
101
|
+
|
|
102
|
+
Complete phases in order. Do not skip phases.
|
|
103
|
+
|
|
104
|
+
## Deep Phase 1 — Business Context
|
|
105
|
+
|
|
106
|
+
Goal: Understand the business domain before drawing any entities.
|
|
107
|
+
|
|
108
|
+
Ask about:
|
|
109
|
+
- What business domain or process does this model represent?
|
|
110
|
+
- Who are the consumers? (analysts, dashboards, ML pipelines, reverse ETL)
|
|
111
|
+
- What questions does this model need to answer?
|
|
112
|
+
- Are there existing models in this domain, or is this greenfield?
|
|
113
|
+
- Key business rules that affect entity relationships?
|
|
114
|
+
- Source-of-truth system for key entities?
|
|
115
|
+
|
|
116
|
+
### Document Deep Phase 1
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Deep Phase 1: Business Context (Data Modeller)
|
|
122
|
+
- **Domain:** <the business area being modeled>
|
|
123
|
+
- **Consumer(s):** <who uses this and how>
|
|
124
|
+
- **Key questions this model answers:**
|
|
125
|
+
- <question 1>
|
|
126
|
+
- <question 2>
|
|
127
|
+
- **Existing models in this domain:** <list or "none — greenfield">
|
|
128
|
+
- **Key business rules:**
|
|
129
|
+
- <rule 1>
|
|
130
|
+
- <rule 2>
|
|
131
|
+
- **Source of truth:** <system or "reconciliation needed">
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-3 phase=0 kind=phase
|
|
135
|
+
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.
|
|
136
|
+
::ENDGATE::
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Deep Phase 2 — Entity Discovery
|
|
141
|
+
|
|
142
|
+
Goal: Identify core entities, their grain, and natural keys.
|
|
143
|
+
|
|
144
|
+
Ask about:
|
|
145
|
+
- Core entities in this domain?
|
|
146
|
+
- What uniquely identifies each entity? (natural key)
|
|
147
|
+
- What is the grain — one row per what?
|
|
148
|
+
- Slowly changing dimensions?
|
|
149
|
+
- Events (facts) vs. things (dimensions)?
|
|
150
|
+
|
|
151
|
+
Inspect existing project for overlapping models, conformed dimensions, naming collisions.
|
|
152
|
+
Present entity inventory as a table.
|
|
153
|
+
|
|
154
|
+
### Cross-Agent Consultation — Entity Validation
|
|
155
|
+
|
|
156
|
+
Before documenting, consult two shards to pressure-test the entity list.
|
|
157
|
+
|
|
158
|
+
Tell the user: "Checking in with the Data Analyst and Data Engineer before we lock
|
|
159
|
+
these entities down..."
|
|
160
|
+
|
|
161
|
+
Invoke both in parallel:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
Task(
|
|
165
|
+
subagent_type="data-analyst",
|
|
166
|
+
description="Analytical requirements for [domain] schema entities",
|
|
167
|
+
prompt="I am the Data Modeller shard designing a new schema for [domain].
|
|
168
|
+
I've identified the following candidate entities:
|
|
169
|
+
[paste entity inventory table from above]
|
|
170
|
+
|
|
171
|
+
Phase 1 business context:
|
|
172
|
+
- Domain: [domain]
|
|
173
|
+
- Consumers: [consumers from Phase 1]
|
|
174
|
+
- Key questions this schema must answer: [questions from Phase 1]
|
|
175
|
+
|
|
176
|
+
Please explore and return:
|
|
177
|
+
1. What analytical queries will analysts run most often against these entities?
|
|
178
|
+
2. Is the proposed grain correct for those queries, or does analysis typically
|
|
179
|
+
require a finer or coarser grain?
|
|
180
|
+
3. Are there any attributes or calculated fields analysts always need that
|
|
181
|
+
suggest additional entities or columns I should plan for?
|
|
182
|
+
4. Any join patterns or aggregation patterns I should design the relationships
|
|
183
|
+
around?
|
|
184
|
+
|
|
185
|
+
Keep your response focused on analytical requirements — not implementation."
|
|
186
|
+
)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
Task(
|
|
191
|
+
subagent_type="data-engineer",
|
|
192
|
+
description="Source data feasibility for [domain] schema entities",
|
|
193
|
+
prompt="I am the Data Modeller shard designing a new schema for [domain].
|
|
194
|
+
I've identified the following candidate entities:
|
|
195
|
+
[paste entity inventory table from above]
|
|
196
|
+
|
|
197
|
+
Phase 1 business context:
|
|
198
|
+
- Domain: [domain]
|
|
199
|
+
- Source of truth system: [source system from Phase 1]
|
|
200
|
+
- Consumers: [consumers from Phase 1]
|
|
201
|
+
|
|
202
|
+
Please explore and return:
|
|
203
|
+
1. Which source systems or raw tables can supply data for each entity?
|
|
204
|
+
2. Are there existing staging or intermediate models I can build on?
|
|
205
|
+
3. What is the expected data volume and freshness for each entity's source?
|
|
206
|
+
4. Any pipeline constraints (incremental complexity, SCD handling, join
|
|
207
|
+
fan-out at source) that should influence how I define entity grain or keys?
|
|
208
|
+
5. Any source data quality issues I should factor into the entity design?
|
|
209
|
+
|
|
210
|
+
Keep your response focused on source feasibility and pipeline constraints —
|
|
211
|
+
not the logical model design itself."
|
|
212
|
+
)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
After both return, summarize their key findings in 3-5 bullets and ask the user
|
|
216
|
+
if any findings require revisions to the entity list before documenting.
|
|
217
|
+
|
|
218
|
+
### Document Deep Phase 2
|
|
219
|
+
|
|
220
|
+
```markdown
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Deep Phase 2: Entity Discovery (Data Modeller)
|
|
224
|
+
- **Entities identified:**
|
|
225
|
+
| Entity | Type | Natural Key | Grain | SCD? |
|
|
226
|
+
|--------|------|-------------|-------|------|
|
|
227
|
+
| <name> | Dimension | <key> | one per <x> | No |
|
|
228
|
+
| <name> | Fact | <key> | one per <x> per <y> | N/A |
|
|
229
|
+
- **Existing models that overlap:**
|
|
230
|
+
- <model>: <how it overlaps>
|
|
231
|
+
- **Conformed dimensions available:** <list or "none">
|
|
232
|
+
- **Naming collisions or conflicts:** <list or "none">
|
|
233
|
+
- **Cross-agent consultation findings:**
|
|
234
|
+
- Data Analyst: <key analytical requirements or grain feedback>
|
|
235
|
+
- Data Engineer: <source feasibility findings or pipeline constraints>
|
|
236
|
+
- **Entity list revised:** Yes / No — <if yes, what changed>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-4 phase=0 kind=phase
|
|
240
|
+
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.
|
|
241
|
+
::ENDGATE::
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Deep Phase 3 — Relationship Mapping
|
|
246
|
+
|
|
247
|
+
Goal: Define how entities relate to each other.
|
|
248
|
+
|
|
249
|
+
For each relationship: two entities, cardinality, optionality, join key(s), FK direction.
|
|
250
|
+
|
|
251
|
+
Ask about:
|
|
252
|
+
- Many-to-many relationships needing bridge tables?
|
|
253
|
+
- Self-referential relationships?
|
|
254
|
+
- Time-dependent relationships?
|
|
255
|
+
|
|
256
|
+
Present the full relationship map as a text diagram.
|
|
257
|
+
|
|
258
|
+
### Document Deep Phase 3
|
|
259
|
+
|
|
260
|
+
```markdown
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Deep Phase 3: Relationship Mapping (Data Modeller)
|
|
264
|
+
- **Relationships:**
|
|
265
|
+
| From | To | Cardinality | Optionality | Join Key | Notes |
|
|
266
|
+
|------|----|-------------|-------------|----------|-------|
|
|
267
|
+
| <entity> | <entity> | 1:M | Required | <key> | |
|
|
268
|
+
- **Bridge tables needed:**
|
|
269
|
+
- <bridge entity>: resolves <entity> ↔ <entity> M:M
|
|
270
|
+
- **Time-dependent relationships:**
|
|
271
|
+
- <description or "none">
|
|
272
|
+
- **Relationship diagram:**
|
|
273
|
+
```
|
|
274
|
+
<text diagram>
|
|
275
|
+
```
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-5 phase=0 kind=phase
|
|
279
|
+
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.
|
|
280
|
+
::ENDGATE::
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Deep Phase 4 — Column Specification
|
|
285
|
+
|
|
286
|
+
Goal: Define columns for each entity.
|
|
287
|
+
|
|
288
|
+
For each entity: PK and generation strategy, FK columns, attributes (name, type,
|
|
289
|
+
nullable, definition), derived/computed columns, timestamp columns.
|
|
290
|
+
|
|
291
|
+
Ask about:
|
|
292
|
+
- Naming conventions? (_id, _at, is_)
|
|
293
|
+
- Standard columns on every model? (_loaded_at, _source_system)
|
|
294
|
+
- Enums or constrained value sets?
|
|
295
|
+
|
|
296
|
+
### Document Deep Phase 4
|
|
297
|
+
|
|
298
|
+
```markdown
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Deep Phase 4: Column Specification (Data Modeller)
|
|
302
|
+
- **Naming conventions:**
|
|
303
|
+
- Keys: <convention>
|
|
304
|
+
- Timestamps: <convention>
|
|
305
|
+
- Booleans: <convention>
|
|
306
|
+
- Standard columns: <list or "none">
|
|
307
|
+
- **Entity columns:**
|
|
308
|
+
|
|
309
|
+
### <Entity Name>
|
|
310
|
+
| Column | Type | Nullable | Key | Description |
|
|
311
|
+
|--------|------|----------|-----|-------------|
|
|
312
|
+
| <col> | <type> | No | PK | <description> |
|
|
313
|
+
| <col> | <type> | No | FK → <entity> | <description> |
|
|
314
|
+
|
|
315
|
+
- **Enums / constrained values:**
|
|
316
|
+
- <column>: <valid values>
|
|
317
|
+
- **Derived columns:**
|
|
318
|
+
- <column>: <computation logic>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-6 phase=0 kind=phase
|
|
322
|
+
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.
|
|
323
|
+
::ENDGATE::
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Deep Phase 5 — Physical Design Decisions
|
|
328
|
+
|
|
329
|
+
Goal: Map logical model to dbt implementation decisions.
|
|
330
|
+
|
|
331
|
+
For each entity: dbt layer, materialization, incremental strategy (if applicable),
|
|
332
|
+
SCD approach, model file naming.
|
|
333
|
+
|
|
334
|
+
Ask about:
|
|
335
|
+
- Expected row counts and growth rate
|
|
336
|
+
- Query patterns (dashboards, ad-hoc, downstream models)
|
|
337
|
+
- Performance constraints
|
|
338
|
+
|
|
339
|
+
### Document Deep Phase 5
|
|
340
|
+
|
|
341
|
+
```markdown
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Deep Phase 5: Physical Design (Data Modeller)
|
|
345
|
+
- **Logical → physical mapping:**
|
|
346
|
+
| Entity | dbt Model Name | Layer | Materialization | Notes |
|
|
347
|
+
|--------|---------------|-------|-----------------|-------|
|
|
348
|
+
| <entity> | <name> | mart | table | |
|
|
349
|
+
- **Incremental configs (if applicable):**
|
|
350
|
+
- <model>: unique_key=<col>, strategy=<merge|delete+insert|append>
|
|
351
|
+
- **SCD handling:**
|
|
352
|
+
- <model>: <snapshot strategy or "N/A">
|
|
353
|
+
- **Expected scale:**
|
|
354
|
+
- <model>: ~<N> rows, growing ~<N>/day
|
|
355
|
+
- **Performance constraints:** <SLA or "none">
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-7 phase=0 kind=phase
|
|
359
|
+
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.
|
|
360
|
+
::ENDGATE::
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Deep Phase 6 — Build
|
|
365
|
+
|
|
366
|
+
**Context checkpoint:** Before building, prompt the user:
|
|
367
|
+
|
|
368
|
+
"Planning's locked — good moment to run `/compact` or `/clear` before we start
|
|
369
|
+
executing. I'll be working from project-specs.md from here. Say the word when
|
|
370
|
+
you're ready."
|
|
371
|
+
|
|
372
|
+
Wait for any signal from the user before beginning build steps.
|
|
373
|
+
|
|
374
|
+
**Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
|
|
375
|
+
|
|
376
|
+
Build in this order:
|
|
377
|
+
1. Source definitions
|
|
378
|
+
2. Staging models
|
|
379
|
+
3. Intermediate models
|
|
380
|
+
4. Mart / dimension / fact models
|
|
381
|
+
5. Schema files with tests and docs
|
|
382
|
+
6. Snapshots for SCD Type 2
|
|
383
|
+
|
|
384
|
+
For each model: write SQL, write .yml schema, run `dbt build --select +model_name`,
|
|
385
|
+
fix failures before next model.
|
|
386
|
+
|
|
387
|
+
**Post-build validation (per model, after `dbt build` passes):** Run the
|
|
388
|
+
applicable checks below using `dbt show` or the warehouse CLI. If any check
|
|
389
|
+
fails, halt and diagnose before advancing to the next model. In a contract-first
|
|
390
|
+
/ no-data environment, skip validation queries and note "THEORETICAL — no data
|
|
391
|
+
to validate" in the build log.
|
|
392
|
+
|
|
393
|
+
1. **Grain validation** (every model with a stated PK):
|
|
394
|
+
```sql
|
|
395
|
+
select count(*) as total_rows, count(distinct <pk_columns>) as distinct_pks
|
|
396
|
+
from <model>
|
|
397
|
+
-- FAIL if total_rows != distinct_pks
|
|
398
|
+
```
|
|
399
|
+
2. **Join fan-out verification** (models with joins — Tier 2+ from
|
|
400
|
+
`join_path_protocol.md`):
|
|
401
|
+
```sql
|
|
402
|
+
select 'before_join' as stage, count(*) as row_count from <left_model>
|
|
403
|
+
union all
|
|
404
|
+
select 'after_join', count(*)
|
|
405
|
+
from <left_model> join <right_model> on <join_condition>
|
|
406
|
+
-- FAIL if after > before and diverges from predicted fan-out
|
|
407
|
+
```
|
|
408
|
+
3. **PK/FK null check** (dimension and fact models):
|
|
409
|
+
```sql
|
|
410
|
+
select '<column>' as col, count(*) as total,
|
|
411
|
+
count(<column>) as non_null,
|
|
412
|
+
round(100.0 * (count(*) - count(<column>)) / nullif(count(*), 0), 2) as null_pct
|
|
413
|
+
from <model>
|
|
414
|
+
-- FAIL if PK has any nulls; WARN if FK null_pct > 5%
|
|
415
|
+
```
|
|
416
|
+
4. **Sample output inspection** (every model):
|
|
417
|
+
`dbt show --select <model> --limit 5` — visually confirm column names,
|
|
418
|
+
types, and values look correct before moving on.
|
|
419
|
+
|
|
420
|
+
Scale to model importance: staging models need only grain + sample; dimension/fact
|
|
421
|
+
models get the full suite.
|
|
422
|
+
|
|
423
|
+
### Document Deep Phase 6
|
|
424
|
+
|
|
425
|
+
```markdown
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## Deep Phase 6: Build Log (Data Modeller)
|
|
429
|
+
- **Files created:**
|
|
430
|
+
- <file path>: <brief description>
|
|
431
|
+
- **Files modified:**
|
|
432
|
+
- <file path>: <what changed>
|
|
433
|
+
- **Build validation:**
|
|
434
|
+
- `dbt build` result: Pass | Fail — <details>
|
|
435
|
+
- Tests passing: <N> / <N>
|
|
436
|
+
- **Post-build validation:**
|
|
437
|
+
| Model | Grain Check | Fan-Out Check | PK/FK Nulls | Sample OK | Notes |
|
|
438
|
+
|-------|-------------|---------------|-------------|-----------|-------|
|
|
439
|
+
| <model> | PASS / FAIL | PASS / FAIL / N/A | PASS / WARN / FAIL | Yes / No | <details or "clean"> |
|
|
440
|
+
- (or "THEORETICAL — no data to validate" if contract-first design)
|
|
441
|
+
- **Deviations from design:** <changes from earlier phases and why, or "none">
|
|
442
|
+
- **Entity-relationship diagram (final):**
|
|
443
|
+
```
|
|
444
|
+
<updated text diagram>
|
|
445
|
+
```
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-8 phase=0 kind=phase
|
|
449
|
+
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.
|
|
450
|
+
::ENDGATE::
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Deep Phase 7 — Review and Handoff
|
|
455
|
+
|
|
456
|
+
**Before finalizing**, invoke Syn for a final review:
|
|
457
|
+
|
|
458
|
+
Tell the user: "I'm asking Syn to review the full project specs before we close this out..."
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
Task(
|
|
462
|
+
subagent_type="syn",
|
|
463
|
+
description="Final review of data model specs",
|
|
464
|
+
prompt="I am the Data Modeller shard. I've completed all phases for project
|
|
465
|
+
[project_name]. Please review the project-specs.md at [file_path] and provide
|
|
466
|
+
your final review verdict. Check for gaps, consistency, and completeness."
|
|
467
|
+
)
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Append Syn's review to the specs. Present it to the user.
|
|
471
|
+
|
|
472
|
+
If Syn's review includes a "Code Review" section with `Code artifacts found: Yes`:
|
|
473
|
+
- Tell the user: "Syn spotted [N] code file(s) it can review. Want a code pass? (y/n)"
|
|
474
|
+
- If yes, invoke:
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
Task(
|
|
478
|
+
subagent_type="syn",
|
|
479
|
+
description="Code review and fix for data model",
|
|
480
|
+
prompt="CODE REVIEW MODE. I am the Data Modeller shard. Project: [project_name].
|
|
481
|
+
Directory: [project_dir]. Please review and fix the code artifacts produced
|
|
482
|
+
in this project. The project-specs.md is at [file_path] for context."
|
|
483
|
+
)
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
Append Syn's code review summary to the specs. Present findings to user.
|
|
487
|
+
|
|
488
|
+
**Analytics Engineer handoff (conditional):**
|
|
489
|
+
|
|
490
|
+
After presenting the completed logical model, ask:
|
|
491
|
+
"The logical data model is complete. Would you like to hand this off to the
|
|
492
|
+
Analytics Engineer to build the physical dbt implementation (staging models,
|
|
493
|
+
intermediate transforms, mart SQL, tests, and documentation)?
|
|
494
|
+
|
|
495
|
+
- (a) Yes — I'll invoke the Analytics Engineer with a full handoff.
|
|
496
|
+
- (b) No — the logical model is the deliverable."
|
|
497
|
+
|
|
498
|
+
If user says (a), invoke:
|
|
499
|
+
|
|
500
|
+
```
|
|
501
|
+
Task(
|
|
502
|
+
subagent_type="analytics-engineer",
|
|
503
|
+
description="Physical dbt implementation of logical model: [project_name]",
|
|
504
|
+
prompt="I am the Data Modeller shard. I have completed the logical data model
|
|
505
|
+
for project [project_name] and need physical dbt implementation.
|
|
506
|
+
|
|
507
|
+
Model specs: data_models/<project_name>/project-specs.md
|
|
508
|
+
|
|
509
|
+
Summary:
|
|
510
|
+
- Entities modeled: <entity list from Phase 3>
|
|
511
|
+
- Source tables: <source list from Phase 1>
|
|
512
|
+
- Grain definitions: <from Phase 2>
|
|
513
|
+
- Key relationships: <from Phase 3>
|
|
514
|
+
- Proposed mart structure: <from Phase 4>
|
|
515
|
+
|
|
516
|
+
Please implement:
|
|
517
|
+
1. Staging models for each source
|
|
518
|
+
2. Intermediate transforms as needed
|
|
519
|
+
3. Mart models matching the logical model's entity grain
|
|
520
|
+
4. dbt schema tests (uniqueness, not-null, accepted values, relationships)
|
|
521
|
+
5. Column-level documentation
|
|
522
|
+
|
|
523
|
+
Please read data_models/<project_name>/project-specs.md for full context and the
|
|
524
|
+
complete ER diagram."
|
|
525
|
+
)
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
Document the outcome in Phase 7 specs.
|
|
529
|
+
|
|
530
|
+
Then:
|
|
531
|
+
1. Run full DAG validation
|
|
532
|
+
2. Spot-check entity relationships
|
|
533
|
+
3. Validate grain (uniqueness tests pass)
|
|
534
|
+
4. Summarize in 3-5 bullet points
|
|
535
|
+
5. Present final ER diagram
|
|
536
|
+
6. List all files created/modified
|
|
537
|
+
7. Flag limitations and future work
|
|
538
|
+
8. Ask if consumer needs a handoff artifact
|
|
539
|
+
|
|
540
|
+
**Knowledge harvest.** Before closing, extract reusable knowledge from this project.
|
|
541
|
+
Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
|
|
542
|
+
the protocol. Present candidates to the user for confirmation before writing.
|
|
543
|
+
|
|
544
|
+
### Document Deep Phase 7
|
|
545
|
+
|
|
546
|
+
```markdown
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Deep Phase 7: Review and Handoff (Data Modeller)
|
|
550
|
+
- **Syn Review:** <included above>
|
|
551
|
+
- **End-to-end validation:** Pass | Fail — <details>
|
|
552
|
+
- **Grain validation:** All PKs unique — Yes | No
|
|
553
|
+
- **Relationship validation:** Join row counts as expected — Yes | No
|
|
554
|
+
- **Summary:**
|
|
555
|
+
1. <plain-language description>
|
|
556
|
+
2. <plain-language description>
|
|
557
|
+
3. <plain-language description>
|
|
558
|
+
- **Final ER diagram:**
|
|
559
|
+
```
|
|
560
|
+
<text diagram>
|
|
561
|
+
```
|
|
562
|
+
- **All files created/modified:**
|
|
563
|
+
- <file path>
|
|
564
|
+
- **Known limitations:**
|
|
565
|
+
- <limitation>
|
|
566
|
+
- **Analytics Engineer handoff:** Not requested | Invoked — <handoff summary>
|
|
567
|
+
- **Original request fulfilled:** Yes | Partially | No — <explanation>
|
|
568
|
+
- **Knowledge harvested:**
|
|
569
|
+
- <title> → .shards/knowledge/<type>/<filename>.md
|
|
570
|
+
- Or: None — project did not produce reusable knowledge
|
|
571
|
+
- **Status:** Complete
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Update specs header status to `Complete`.
|
|
575
|
+
|
|
576
|
+
::GATE:: id=specific-instructions-data-modeller-phases-phase0-9 phase=0 kind=final
|
|
577
|
+
Read this final section back to the user. Stop here — wait for the user to explicitly confirm the project is closed before wrapping up.
|
|
578
|
+
::ENDGATE::
|
|
579
|
+
|
|
580
|
+
---
|
|
581
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Data Modeller — 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 | Business context — stakeholders, use cases | yes |
|
|
12
|
+
| 2 | phase-2.md | Entity discovery — candidate entities and grains | yes |
|
|
13
|
+
| 3 | phase-3.md | Relationship mapping — keys, cardinalities | yes |
|
|
14
|
+
| 4 | phase-4.md | Column specification — types, constraints | yes |
|
|
15
|
+
| 5 | phase-5.md | Physical design decisions — storage, indexing, partitioning | yes |
|
|
16
|
+
| 6 | phase-6.md | Build — produce the model files and tests | 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,52 @@
|
|
|
1
|
+
> **Previous:** This is the first phase of the Data Modeller Deep Track.
|
|
2
|
+
> **Next:** phase-2.md (read only after this phase's gate is confirmed)
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Deep Phase 1 — Business Discovery
|
|
7
|
+
|
|
8
|
+
Goal: Deepen understanding of what the user is building and what the model must represent — 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 Modeller 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
|
+
- **Consumer(s):** analysts, dashboards, ML pipelines, reverse ETL
|
|
14
|
+
- **Domain boundaries:** what business process this represents, existing vs greenfield
|
|
15
|
+
- **Key business rules:** entity relationships, cardinalities, source-of-truth systems
|
|
16
|
+
- **Edge cases / unknowns:** domain-specific edge cases the user is aware of
|
|
17
|
+
- **Acceptance criteria:** steer toward model-level invariants — key uniqueness, cardinalities, referential integrity, grain. Set an example to calibrate expectations (e.g. for recommender-effectiveness data: "one row per user-experiment assignment", "every impression references a valid user", "a user maps to exactly one variant", "CTR is derivable from clicks/impressions with no divide-by-zero").
|
|
18
|
+
- **Where to look:** existing models, source docs, stakeholders to consult
|
|
19
|
+
|
|
20
|
+
### Document Deep Phase 1
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Deep Phase 1: Business Context (Data Modeller)
|
|
26
|
+
- **Domain:** <the business area being modeled>
|
|
27
|
+
- **Consumer(s):** <who uses this and how>
|
|
28
|
+
- **Key questions this model answers:**
|
|
29
|
+
- <question 1>
|
|
30
|
+
- <question 2>
|
|
31
|
+
- **Edge cases / unknowns:** <domain-specific edge cases surfaced>
|
|
32
|
+
- **Where to look:** <additional context sources identified>
|
|
33
|
+
- **Existing models in this domain:** <list or "none — greenfield">
|
|
34
|
+
- **Key business rules:**
|
|
35
|
+
- <rule 1>
|
|
36
|
+
- <rule 2>
|
|
37
|
+
- **Source of truth:** <system or "reconciliation needed">
|
|
38
|
+
- **Acceptance criteria (invariants that must hold):**
|
|
39
|
+
- <criterion 1 — e.g. one row per user-experiment assignment>
|
|
40
|
+
- <criterion 2 — e.g. every impression references a valid user>
|
|
41
|
+
- **How each will be verified:** <walkthrough / structural check per criterion, or "confirmed in validation">
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
::GATE:: id=data-modeller-deep-phase-1 phase=1 kind=phase
|
|
45
|
+
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.
|
|
46
|
+
::ENDGATE::
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## When this gate is confirmed
|
|
51
|
+
|
|
52
|
+
Read `.claude/agents/specific_instructions/data_modeller/phases_deep/phase-2.md` in full and follow its instructions starting from Deep Phase 2.
|