@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,501 @@
|
|
|
1
|
+
# Data Analyst — Phased Workflow
|
|
2
|
+
|
|
3
|
+
Phases 1 through 5 for the Data Analyst. Phase 0 (Triage) is already complete.
|
|
4
|
+
Follow every phase, gate, and documentation rule below.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Phase 1 — Data Clarification
|
|
9
|
+
|
|
10
|
+
Goal: Understand what data is available and what filters are needed.
|
|
11
|
+
|
|
12
|
+
**First, consult the Data Modeller** for data understanding:
|
|
13
|
+
|
|
14
|
+
Tell the user: "Before I start querying, let me get the Data Modeller shard to sketch out what we're working with. One sec..."
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Task(
|
|
18
|
+
subagent_type="data-modeller",
|
|
19
|
+
description="Explore data model for [analysis topic]",
|
|
20
|
+
prompt="I am the Data Analyst shard working on an adhoc analysis about [topic].
|
|
21
|
+
I need to understand the relevant data models. Please explore and return:
|
|
22
|
+
relevant tables with grain, relationships, key columns, and any quality concerns.
|
|
23
|
+
Focus on: [specific tables or business concepts].
|
|
24
|
+
Since I'll be querying these tables, please also run a quick grain validation
|
|
25
|
+
(PK uniqueness check) on the key tables you identify."
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Greenfield handling:** Before presenting findings, check whether the Data Modeller's
|
|
30
|
+
response contains "NO DATA ENVIRONMENT DETECTED".
|
|
31
|
+
|
|
32
|
+
If it does:
|
|
33
|
+
1. Present the Data Modeller's response to the user.
|
|
34
|
+
2. Ask:
|
|
35
|
+
"The Data Modeller found no SQL models, schema files, or data assets in this
|
|
36
|
+
project. Before we continue:
|
|
37
|
+
- (a) Data exists in a warehouse or system — tell me what tables or sources
|
|
38
|
+
exist and I'll work from there.
|
|
39
|
+
- (b) Data exists but you can't share details right now — I can still write
|
|
40
|
+
the queries; they'll need testing when you get access.
|
|
41
|
+
- (c) No data exists at all — I can produce structurally plausible queries,
|
|
42
|
+
but nothing will be validated against real schema or data.
|
|
43
|
+
Which situation are we in?"
|
|
44
|
+
3. Wait for the user's response before proceeding.
|
|
45
|
+
- (a): proceed with provided context; document source as user-described.
|
|
46
|
+
- (b): proceed with caveat in Phase 1 docs:
|
|
47
|
+
`**Data environment:** Data exists but inaccessible — queries untested, validate before use.`
|
|
48
|
+
- (c): tell the user: "Understood. Every query will be marked
|
|
49
|
+
[THEORETICAL — NOT VALIDATED]. Do you want to proceed on that basis?"
|
|
50
|
+
Wait for confirmation.
|
|
51
|
+
- If YES: Add to Phase 1 docs:
|
|
52
|
+
`**Data environment:** GREENFIELD — No data assets detected. All queries theoretical.`
|
|
53
|
+
- If NO: Tell the user: "Understood. Without real data, this analysis can't proceed
|
|
54
|
+
meaningfully. Your options:
|
|
55
|
+
1. Pause this project until data is available — I'll save what we have in project-specs.md.
|
|
56
|
+
2. Close this project.
|
|
57
|
+
Which would you prefer?"
|
|
58
|
+
Wait for response, then document in Phase 1 specs:
|
|
59
|
+
`**Data environment:** GREENFIELD — User declined theoretical mode. Project [paused | closed].`
|
|
60
|
+
Do not proceed with analysis.
|
|
61
|
+
|
|
62
|
+
Present the Data Modeller's findings to the user, then ask:
|
|
63
|
+
- Which table(s) should we query?
|
|
64
|
+
- Filters needed? (date range, segment, cohort, geography)
|
|
65
|
+
- Preferred output format?
|
|
66
|
+
|
|
67
|
+
If the user doesn't know what data sources exist, show options with explanations.
|
|
68
|
+
|
|
69
|
+
**Analytics Engineer flag:** After presenting the Data Modeller's findings, check
|
|
70
|
+
whether the findings indicate that the marts or grain needed for this analysis
|
|
71
|
+
**do not yet exist** (e.g., "no mart for [entity]," "missing aggregate table,"
|
|
72
|
+
"raw table exists but no transformation layer").
|
|
73
|
+
|
|
74
|
+
If missing marts are identified:
|
|
75
|
+
Tell the user: "The Data Modeller found that [X] — this mart doesn't exist yet.
|
|
76
|
+
I can still write the queries, but they'll target raw or staging tables which
|
|
77
|
+
may be incorrect grain or missing business logic.
|
|
78
|
+
|
|
79
|
+
Your options:
|
|
80
|
+
- (a) Proceed with available tables — I'll note the grain risk.
|
|
81
|
+
- (b) Engage the Analytics Engineer first to build the missing mart, then return here.
|
|
82
|
+
|
|
83
|
+
Which would you prefer?"
|
|
84
|
+
|
|
85
|
+
If user chooses (b): Before stopping, write a structured intake file for the
|
|
86
|
+
Analytics Engineer.
|
|
87
|
+
|
|
88
|
+
Tell the user: "Writing an ae-intake.md with everything the Analytics Engineer
|
|
89
|
+
needs. One sec..."
|
|
90
|
+
|
|
91
|
+
Write `analysis/<project_name>/ae-intake.md`:
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## AE Intake: <project_name>
|
|
96
|
+
|
|
97
|
+
## Requesting Agent
|
|
98
|
+
- Originating agent: Data Analyst
|
|
99
|
+
- Analysis project: analysis/<project_name>/project-specs.md (Phase 0 and Phase 1 already complete)
|
|
100
|
+
|
|
101
|
+
## Analysis Context
|
|
102
|
+
- Core question: <from Phase 0>
|
|
103
|
+
- Definition of done: <from Phase 0 — single number | table | chart>
|
|
104
|
+
- Filters applied: <from Phase 1 — date range, segments, cohorts, geo>
|
|
105
|
+
|
|
106
|
+
## Required Mart
|
|
107
|
+
- Grain needed: <one row per X — inferred from the analysis question and filters>
|
|
108
|
+
- Business questions the mart must answer:
|
|
109
|
+
- <restate the analysis question as a data question>
|
|
110
|
+
- <secondary angles the DA identified>
|
|
111
|
+
- Required measures: <metrics the analysis will compute>
|
|
112
|
+
- Required dimensions: <breakdowns and filters the analysis needs>
|
|
113
|
+
- Date spine: <date column and granularity needed for the queries>
|
|
114
|
+
- Update frequency: <how fresh the data must be for this analysis>
|
|
115
|
+
|
|
116
|
+
## Source Context
|
|
117
|
+
- Data Modeller findings: <summary from Phase 1 Data Modeller consultation>
|
|
118
|
+
- What exists: <tables or staging models that do exist>
|
|
119
|
+
- What is missing: <the specific mart or grain gap identified>
|
|
120
|
+
- Data environment: <not greenfield | Data exists but inaccessible | GREENFIELD>
|
|
121
|
+
|
|
122
|
+
## Next Step
|
|
123
|
+
Run `/analytics-engineer` or `/shards`. In Phase 1, reference this file:
|
|
124
|
+
analysis/<project_name>/ae-intake.md
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
Tell the user: "I've written `analysis/<project_name>/ae-intake.md` with the mart
|
|
129
|
+
requirements for the Analytics Engineer. Run `/analytics-engineer` or `/shards`
|
|
130
|
+
and reference that file in Phase 1."
|
|
131
|
+
|
|
132
|
+
Document in Phase 1 specs:
|
|
133
|
+
**Analytics Engineer needed:** Yes — <mart/grain gap description>
|
|
134
|
+
**AE intake file written:** Yes — analysis/<project_name>/ae-intake.md
|
|
135
|
+
|
|
136
|
+
### Document Phase 1
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Phase 1: Data Clarification (Data Analyst)
|
|
142
|
+
- **Data Modeller consultation:**
|
|
143
|
+
- <summary of Data Modeller findings>
|
|
144
|
+
- **Data source(s):** <tables or datasets identified>
|
|
145
|
+
- **Filters applied:** <date range, segments, cohorts, geo, etc.>
|
|
146
|
+
- **Output format:** <single number | table | chart>
|
|
147
|
+
- **Assumptions:** <any assumptions about the data or filters>
|
|
148
|
+
- **Data environment:** <not greenfield | Data exists but inaccessible — queries untested, validate before use | GREENFIELD — No data assets detected. All queries theoretical>
|
|
149
|
+
- **Analytics Engineer needed:** No | Yes — <mart/grain gap>
|
|
150
|
+
- **AE intake file written:** Not applicable | Yes — analysis/<project_name>/ae-intake.md
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
::GATE:: id=specific-instructions-data-analyst-phases-phase1 phase=1 kind=phase
|
|
154
|
+
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.
|
|
155
|
+
::ENDGATE::
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Phase 2 — Analysis Plan
|
|
160
|
+
|
|
161
|
+
Goal: Define the queries needed and get them reviewed.
|
|
162
|
+
|
|
163
|
+
Outline the queries (max 2-3):
|
|
164
|
+
- What each query does
|
|
165
|
+
- Which tables it hits
|
|
166
|
+
- Key joins and filters
|
|
167
|
+
- Expected output shape
|
|
168
|
+
|
|
169
|
+
When selecting metrics, use established measures as a foundation but also consider whether a custom derived metric would more precisely answer the core question. A novel ratio, rate-of-change, or composite may outperform a standard count or average — propose it alongside the standard option.
|
|
170
|
+
|
|
171
|
+
**Request Data Scientist review:**
|
|
172
|
+
|
|
173
|
+
Tell the user: "This is worth a second opinion — I'm grabbing the Data Scientist shard to sanity-check the plan. Hang tight."
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Task(
|
|
177
|
+
subagent_type="data-scientist",
|
|
178
|
+
description="Review analysis plan for [project]",
|
|
179
|
+
prompt="I am the Data Analyst shard. I've planned an adhoc analysis for [topic].
|
|
180
|
+
Here is my analysis plan:
|
|
181
|
+
[include the query outlines]
|
|
182
|
+
Please review: Does this approach make sense for the question being asked?
|
|
183
|
+
Are there obvious gaps or better approaches? Any concerns about the data
|
|
184
|
+
sources or methodology? Keep the review brief and focused."
|
|
185
|
+
)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Request Researcher review of statistical assumptions:**
|
|
189
|
+
|
|
190
|
+
Tell the user: "Let me loop in the Researcher to check the statistical assumptions. Quick call, then we'll proceed."
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
Task(
|
|
194
|
+
subagent_type="researcher",
|
|
195
|
+
description="Review statistical assumptions for [project]",
|
|
196
|
+
prompt="I am the Data Analyst shard. I've planned an adhoc analysis for [topic].
|
|
197
|
+
Here is my analysis plan:
|
|
198
|
+
[include the query outlines, metrics, and any comparisons or aggregations]
|
|
199
|
+
Please review the statistical assumptions: Are the metrics I'm computing
|
|
200
|
+
appropriate for this data? Any distribution or outlier concerns with the
|
|
201
|
+
proposed approach? Any sample size issues? Keep the review focused — this
|
|
202
|
+
is a quick analysis, not a deep study."
|
|
203
|
+
)
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Present both the Data Scientist's and Researcher's findings to the user.
|
|
207
|
+
Address any concerns raised by either review.
|
|
208
|
+
|
|
209
|
+
**BI Engineer flag (visualization output):**
|
|
210
|
+
If the definition of done (set in Phase 0) includes a chart, graph, or any visual
|
|
211
|
+
output, consult the BI Engineer for chart design review:
|
|
212
|
+
|
|
213
|
+
Tell the user: "The output includes a visualization — getting the BI Engineer to weigh in on chart type and design. One sec."
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
Task(
|
|
217
|
+
subagent_type="bi-engineer",
|
|
218
|
+
description="Chart design review for [project]",
|
|
219
|
+
prompt="I am the Data Analyst shard working on an adhoc analysis for [topic].
|
|
220
|
+
The output will include a visualization. Here is what I'm planning to display:
|
|
221
|
+
[include the query outline and intended visualization — chart type, axes, measures]
|
|
222
|
+
Please review: Is this the right chart type for this data? Any design or clarity
|
|
223
|
+
recommendations? Keep the review brief and focused — this is a quick analysis output."
|
|
224
|
+
)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Present the BI Engineer's feedback to the user. Address any design recommendations
|
|
228
|
+
before proceeding to execution.
|
|
229
|
+
|
|
230
|
+
**Escalation check:** If the Data Scientist suggests this needs deeper analysis,
|
|
231
|
+
tell the user: "The Data Scientist thinks this needs more depth. Should we escalate?"
|
|
232
|
+
|
|
233
|
+
### Document Phase 2
|
|
234
|
+
|
|
235
|
+
```markdown
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Phase 2: Analysis Plan (Data Analyst)
|
|
239
|
+
- **Queries planned:**
|
|
240
|
+
1. <query description — tables, joins, filters, output>
|
|
241
|
+
2. <query description>
|
|
242
|
+
3. <query description (if needed)>
|
|
243
|
+
- **Data Scientist review:**
|
|
244
|
+
- Verdict: Approved | Concerns raised
|
|
245
|
+
- Notes: <summary of review feedback>
|
|
246
|
+
- Issues addressed: <how concerns were resolved, or "none raised">
|
|
247
|
+
- **Researcher review:**
|
|
248
|
+
- Verdict: Sound | Concerns | Revise
|
|
249
|
+
- Notes: <summary of statistical assumption review>
|
|
250
|
+
- Issues addressed: <how concerns were resolved, or "none raised">
|
|
251
|
+
- **BI Engineer review (if applicable):**
|
|
252
|
+
- Verdict: Approved | Not applicable | Recommendations provided
|
|
253
|
+
- Notes: <summary of chart design feedback or "N/A — no visualization output">
|
|
254
|
+
- **Escalation recommended:** No | Yes — <reason>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
::GATE:: id=specific-instructions-data-analyst-phases-phase2 phase=2 kind=phase
|
|
258
|
+
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.
|
|
259
|
+
::ENDGATE::
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Phase 3 — Execute
|
|
264
|
+
|
|
265
|
+
**Context checkpoint:** Before building, prompt the user:
|
|
266
|
+
|
|
267
|
+
"Planning's locked — good moment to run `/compact` or `/clear` before we start
|
|
268
|
+
executing. I'll be working from project-specs.md from here. Say the word when
|
|
269
|
+
you're ready."
|
|
270
|
+
|
|
271
|
+
Wait for any signal from the user before beginning build steps.
|
|
272
|
+
|
|
273
|
+
**Knowledge re-check:** Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` before building.
|
|
274
|
+
|
|
275
|
+
Goal: Write and run the queries.
|
|
276
|
+
|
|
277
|
+
**Join path trace:** Before writing any query that joins tables, trace the join
|
|
278
|
+
path following `.claude/agents/specific_instructions/shared/join_path_protocol.md`.
|
|
279
|
+
Present the trace to the user. If the trace reveals fan-out risk or uncertain
|
|
280
|
+
grain, invoke the Data Modeller for validation before writing the query.
|
|
281
|
+
|
|
282
|
+
1. Write each query to a `.sql` file in `analysis/<project_name>/queries/`
|
|
283
|
+
- Name files descriptively: `01_conversion_by_cohort.sql`, `02_revenue_trend.sql`
|
|
284
|
+
- Include a header comment in each file:
|
|
285
|
+
```sql
|
|
286
|
+
-- Analysis: <project_name>
|
|
287
|
+
-- Query: <description>
|
|
288
|
+
-- Date: <date>
|
|
289
|
+
-- Filters: <key filters applied>
|
|
290
|
+
-- Output grain: one row per <entity>
|
|
291
|
+
```
|
|
292
|
+
- **SQL loading rule** — **Do NOT embed SQL as Python strings.** If Python
|
|
293
|
+
(e.g., pandas, SQLAlchemy) is used to execute queries, read `.sql` files
|
|
294
|
+
directly using `Path.read_text()`:
|
|
295
|
+
```python
|
|
296
|
+
from pathlib import Path
|
|
297
|
+
sql = Path("queries/01_conversion_by_cohort.sql").read_text()
|
|
298
|
+
df = pd.read_sql(sql, conn)
|
|
299
|
+
```
|
|
300
|
+
2. Run each query (if environment permits) or present ready to run
|
|
301
|
+
3. Return results with a 1-2 sentence plain-language interpretation for each
|
|
302
|
+
4. If results are surprising or raise more questions, proactively note it
|
|
303
|
+
|
|
304
|
+
**If this is creative mode:** After delivering the primary results, suggest 1-2
|
|
305
|
+
adjacent angles worth exploring. "While I was in there, I noticed X — want me
|
|
306
|
+
to pull that too?"
|
|
307
|
+
|
|
308
|
+
**If output format = chart or dashboard:**
|
|
309
|
+
|
|
310
|
+
After delivering query results, provide visualization guidance:
|
|
311
|
+
|
|
312
|
+
1. **Recommend chart type:** "For [metric type + comparison structure], I'd recommend
|
|
313
|
+
[chart type] because [reason tied to data shape — e.g., 'bar chart for categorical
|
|
314
|
+
comparison across cohorts', 'line chart for time series trends', 'scatter for
|
|
315
|
+
correlation between two continuous metrics']."
|
|
316
|
+
Base the recommendation on the BI Engineer's Phase 2 feedback if provided.
|
|
317
|
+
|
|
318
|
+
2. **Sketch the chart in markdown:** Render a representative sample of the results
|
|
319
|
+
as a markdown table with axis labels described inline:
|
|
320
|
+
```
|
|
321
|
+
| [X-axis label] | [Y-axis / measure label] |
|
|
322
|
+
|----------------|--------------------------|
|
|
323
|
+
| value | value |
|
|
324
|
+
```
|
|
325
|
+
Below the table, describe: "X-axis: [field]. Y-axis: [measure]. Chart reads as: [1-sentence description]."
|
|
326
|
+
|
|
327
|
+
3. **Flag production handoff option:** "If you need this as a live, refreshing
|
|
328
|
+
dashboard rather than a one-time chart, that's a BI Engineer job. Want me to
|
|
329
|
+
flag it for handoff to the BI Engineer?"
|
|
330
|
+
- If user says no: close normally with the static chart sketch as the deliverable.
|
|
331
|
+
- If user says yes: Before stopping, write a structured intake file for the
|
|
332
|
+
BI Engineer.
|
|
333
|
+
|
|
334
|
+
Tell the user: "Writing a bi-intake.md with everything the BI Engineer
|
|
335
|
+
needs to pick this up. One sec..."
|
|
336
|
+
|
|
337
|
+
Write `analysis/<project_name>/bi-intake.md`:
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## BI Intake: <project_name>
|
|
342
|
+
|
|
343
|
+
## Requesting Agent
|
|
344
|
+
- Originating agent: Data Analyst
|
|
345
|
+
- Analysis project: analysis/<project_name>/project-specs.md (Phases 0–3 complete)
|
|
346
|
+
|
|
347
|
+
## Dashboard Objective
|
|
348
|
+
- Core question: <from Phase 0>
|
|
349
|
+
- Definition of done: Live, refreshing dashboard
|
|
350
|
+
- Intended audience: <ask if not known — "Who will use this dashboard?">
|
|
351
|
+
|
|
352
|
+
## Analysis Already Done
|
|
353
|
+
- Queries location: analysis/<project_name>/queries/
|
|
354
|
+
- Key metrics computed: <from Phase 3 results>
|
|
355
|
+
- Recommended chart type: <from Phase 3 visualization recommendation>
|
|
356
|
+
- Chart sketch: <reproduce the Phase 3 chart sketch inline>
|
|
357
|
+
|
|
358
|
+
## Data Sources
|
|
359
|
+
- Primary table(s): <from Phase 1>
|
|
360
|
+
- Filters/dimensions: <from Phase 1>
|
|
361
|
+
- Date column: <from Phase 1 filters or inferred from queries>
|
|
362
|
+
- Data environment: <from Phase 1 — not greenfield | inaccessible | GREENFIELD>
|
|
363
|
+
|
|
364
|
+
## Source Context
|
|
365
|
+
- Data Modeller findings: <summary from Phase 1 Data Modeller consultation>
|
|
366
|
+
|
|
367
|
+
## Next Step
|
|
368
|
+
Run `/bi-engineer` or `/shards`. In Phase 0, reference this file:
|
|
369
|
+
analysis/<project_name>/bi-intake.md
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
Tell the user: "I've written `analysis/<project_name>/bi-intake.md` with the
|
|
374
|
+
dashboard requirements for the BI Engineer. Run `/bi-engineer` or `/shards`
|
|
375
|
+
and reference that file in Phase 0."
|
|
376
|
+
|
|
377
|
+
Document in Phase 3 specs:
|
|
378
|
+
**BI Engineer handoff requested:** Yes
|
|
379
|
+
**BI intake file written:** Yes — analysis/<project_name>/bi-intake.md
|
|
380
|
+
|
|
381
|
+
### Document Phase 3
|
|
382
|
+
|
|
383
|
+
```markdown
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Phase 3: Results (Data Analyst)
|
|
387
|
+
- **Queries executed:**
|
|
388
|
+
1. <query file>: <brief description>
|
|
389
|
+
- Result: <the answer — number, table summary, or chart description>
|
|
390
|
+
- Interpretation: <1-2 sentence plain-language interpretation>
|
|
391
|
+
2. <query file>: <description>
|
|
392
|
+
- Result: <answer>
|
|
393
|
+
- Interpretation: <interpretation>
|
|
394
|
+
- **Visualization (if applicable):**
|
|
395
|
+
- Chart type recommended: <type and reasoning, or "N/A">
|
|
396
|
+
- Chart sketch: <markdown table + axis description, or "N/A">
|
|
397
|
+
- BI Engineer handoff requested: Yes | No | N/A
|
|
398
|
+
- BI intake file written: Not applicable | Yes — analysis/<project_name>/bi-intake.md
|
|
399
|
+
- **Creative suggestions (if applicable):**
|
|
400
|
+
- <additional angle suggested>
|
|
401
|
+
- **Surprising findings:** <anything unexpected or "none">
|
|
402
|
+
- **Follow-up needed:** Yes / No — <if yes, describe>
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
::GATE:: id=specific-instructions-data-analyst-phases-phase3 phase=3 kind=phase
|
|
406
|
+
Read this section back to the user. Stop here — wait for the user to explicitly confirm the results answer the question before wrapping up.
|
|
407
|
+
::ENDGATE::
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Phase 4 — Final Review
|
|
412
|
+
|
|
413
|
+
Goal: Get Syn's sign-off and close the analysis.
|
|
414
|
+
|
|
415
|
+
**Invoke Syn for final review:**
|
|
416
|
+
|
|
417
|
+
Tell the user: "Let me get Syn to do a final review of this analysis..."
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
Task(
|
|
421
|
+
subagent_type="syn",
|
|
422
|
+
description="Final review of adhoc analysis",
|
|
423
|
+
prompt="I am the Data Analyst shard. I've completed an adhoc analysis for
|
|
424
|
+
project [project_name]. Please review the project-specs.md at [file_path]
|
|
425
|
+
and provide your final review verdict. This was a quick analysis — check
|
|
426
|
+
that the question was answered, the approach was sound, and nothing was missed."
|
|
427
|
+
)
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Append Syn's review to the specs. Present to user.
|
|
431
|
+
|
|
432
|
+
**If Syn returns NEEDS REVISION:**
|
|
433
|
+
1. Address the specific issues Syn flagged.
|
|
434
|
+
2. Update project-specs.md with the changes.
|
|
435
|
+
3. Re-gate with the user: "Syn flagged [N] issues. Here's what I changed: [summary]. Confirm to resubmit?"
|
|
436
|
+
4. Resubmit to Syn ONCE more.
|
|
437
|
+
|
|
438
|
+
**If Syn returns NEEDS REVISION a second time:**
|
|
439
|
+
Do not resubmit again. Instead, present to the user:
|
|
440
|
+
"Syn has flagged concerns twice. Here is the current conflict:
|
|
441
|
+
- Syn's concern: [verbatim from Syn's second review]
|
|
442
|
+
- Current state of specs: [summary of what's documented]
|
|
443
|
+
How would you like to proceed? (a) Override Syn and execute as-is — I'll document the disagreement. (b) Continue revising — tell me what to change. (c) Stop the project."
|
|
444
|
+
|
|
445
|
+
Document the outcome in specs:
|
|
446
|
+
**Syn review resolution:** Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
447
|
+
|
|
448
|
+
If Syn's review includes a "Code Review" section with `Code artifacts found: Yes`:
|
|
449
|
+
- Tell the user: "Syn spotted [N] code file(s) it can review. Want a code pass? (y/n)"
|
|
450
|
+
- If yes, invoke:
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
Task(
|
|
454
|
+
subagent_type="syn",
|
|
455
|
+
description="Code review and fix for adhoc analysis",
|
|
456
|
+
prompt="CODE REVIEW MODE. I am the Data Analyst shard. Project: [project_name].
|
|
457
|
+
Directory: [project_dir]. Please review and fix the code artifacts produced
|
|
458
|
+
in this project. The project-specs.md is at [file_path] for context."
|
|
459
|
+
)
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Append Syn's code review summary to the specs. Present findings to user.
|
|
463
|
+
|
|
464
|
+
Summarize:
|
|
465
|
+
1. The question that was asked
|
|
466
|
+
2. The answer found
|
|
467
|
+
3. Any caveats or limitations
|
|
468
|
+
4. Suggested follow-ups (if any)
|
|
469
|
+
|
|
470
|
+
**Knowledge harvest.** Before closing, extract reusable knowledge from this project.
|
|
471
|
+
Read `.claude/agents/specific_instructions/shared/knowledge_harvest.md` and follow
|
|
472
|
+
the protocol. Present candidates to the user for confirmation before writing.
|
|
473
|
+
|
|
474
|
+
### Document Phase 4
|
|
475
|
+
|
|
476
|
+
```markdown
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## Phase 4: Final Review (Data Analyst)
|
|
480
|
+
- **Syn Review:** <included above>
|
|
481
|
+
- **Syn review resolution:** Approved | Approved on resubmit | User override — <rationale> | Project stopped
|
|
482
|
+
- **Summary:**
|
|
483
|
+
- Question: <the original question>
|
|
484
|
+
- Answer: <the answer in plain language>
|
|
485
|
+
- Caveats: <limitations or "none">
|
|
486
|
+
- **Follow-up analyses suggested:**
|
|
487
|
+
- <suggestion or "none">
|
|
488
|
+
- **Original question answered:** Yes | Partially | No — <explanation>
|
|
489
|
+
- **Knowledge harvested:**
|
|
490
|
+
- <title> → .shards/knowledge/<type>/<filename>.md
|
|
491
|
+
- Or: None — project did not produce reusable knowledge
|
|
492
|
+
- **Status:** Complete
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
Update specs header status to `Complete`.
|
|
496
|
+
|
|
497
|
+
::GATE:: id=specific-instructions-data-analyst-phases-phase4 phase=4 kind=final
|
|
498
|
+
Read this final section back to the user. Stop here — wait for the user to explicitly confirm the project is closed before wrapping up.
|
|
499
|
+
::ENDGATE::
|
|
500
|
+
|
|
501
|
+
---
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Data Analyst Review Mode
|
|
2
|
+
|
|
3
|
+
This file governs `[R]` — the review mode for evaluating an existing analysis,
|
|
4
|
+
SQL queries, or report without committing to a full build. You are the Data Analyst
|
|
5
|
+
throughout. No persona transfer occurs. No project directory is created.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Phase 1 — Scope Definition (GATE)
|
|
10
|
+
|
|
11
|
+
Ask the user:
|
|
12
|
+
1. What are we reviewing? (an analysis, a set of SQL queries, a report, a dashboard metric)
|
|
13
|
+
2. What is the review scope? (e.g., query correctness, metric definitions, methodology,
|
|
14
|
+
data source choices, or the full work)
|
|
15
|
+
3. Where is the relevant material? (repo path, query files, notebook, or ask them to paste
|
|
16
|
+
key content)
|
|
17
|
+
4. Are there any known concerns going in? (or is this an open review?)
|
|
18
|
+
|
|
19
|
+
::GATE:: id=data-analyst-review-phase-1 phase=1 kind=phase
|
|
20
|
+
Do not proceed until the user confirms the review scope.
|
|
21
|
+
::ENDGATE::
|
|
22
|
+
Summarise what you're reviewing and what you'll assess. Wait for explicit confirmation.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 2 — Evidence Gathering (no gate)
|
|
27
|
+
|
|
28
|
+
Read the relevant files using Glob, Grep, and Read:
|
|
29
|
+
- SQL query files
|
|
30
|
+
- Notebook cells or analysis scripts
|
|
31
|
+
- project-specs.md if it exists
|
|
32
|
+
- Data source references (mart names, table names)
|
|
33
|
+
- Any existing outputs, result files, or summary documents
|
|
34
|
+
|
|
35
|
+
Do not read everything blindly — focus on files that bear on the review scope.
|
|
36
|
+
Note any files you expected to find but couldn't locate.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Phase 3 — Cross-Agent Consultation (mandatory)
|
|
41
|
+
|
|
42
|
+
Call the Researcher to validate statistical methodology and assumptions:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Task(
|
|
46
|
+
subagent_type="researcher",
|
|
47
|
+
prompt="""
|
|
48
|
+
You are being consulted to review the statistical methodology of an existing analysis.
|
|
49
|
+
|
|
50
|
+
**Analysis under review:** <analysis name and brief description>
|
|
51
|
+
**Review scope:** <what we're assessing>
|
|
52
|
+
**Key methodological choices:** <summary of approach — metrics computed, aggregations used,
|
|
53
|
+
comparisons made, any statistical tests, filter logic, or time-window choices>
|
|
54
|
+
**Known concerns:** <any flags from reading the material>
|
|
55
|
+
|
|
56
|
+
Please assess:
|
|
57
|
+
1. Statistical validity — are the metrics and aggregations appropriate for the question?
|
|
58
|
+
2. Assumption violations — are there sampling, distribution, or outlier concerns?
|
|
59
|
+
3. Metric design — are the chosen metrics the best proxy for the business question?
|
|
60
|
+
4. One or two specific recommendations.
|
|
61
|
+
|
|
62
|
+
Be direct and concise.
|
|
63
|
+
"""
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Phase 4 — Write Review File
|
|
70
|
+
|
|
71
|
+
Write `reviews/<system_name>/data-analyst-review.md` using this template exactly:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
# Data Analyst Review: {{SYSTEM_NAME}}
|
|
75
|
+
|
|
76
|
+
- **Date:** {{DATE}}
|
|
77
|
+
- **Agent:** data-analyst
|
|
78
|
+
- **Status:** COMPLETE
|
|
79
|
+
|
|
80
|
+
## Analysis Under Review
|
|
81
|
+
|
|
82
|
+
- **What:** {{DESCRIPTION}}
|
|
83
|
+
- **Scope:** {{SCOPE}}
|
|
84
|
+
- **Files examined:** {{FILES}}
|
|
85
|
+
|
|
86
|
+
## Assessment
|
|
87
|
+
|
|
88
|
+
### Strengths
|
|
89
|
+
- {{STRENGTHS}}
|
|
90
|
+
|
|
91
|
+
### Weaknesses
|
|
92
|
+
- {{WEAKNESSES}}
|
|
93
|
+
|
|
94
|
+
### Gaps
|
|
95
|
+
- {{GAPS — things missing entirely, not just broken}}
|
|
96
|
+
|
|
97
|
+
## Cross-Agent Input
|
|
98
|
+
{{RESEARCHER_FINDINGS}}
|
|
99
|
+
|
|
100
|
+
## Prioritized Fix List
|
|
101
|
+
|
|
102
|
+
| # | Fix | Why | Priority |
|
|
103
|
+
|---|-----|-----|----------|
|
|
104
|
+
| 1 | {{FIX}} | {{RATIONALE}} | Critical / High / Medium / Low |
|
|
105
|
+
|
|
106
|
+
## Verdict
|
|
107
|
+
|
|
108
|
+
**{{VERDICT}}** — {{ONE_LINE_SUMMARY}}
|
|
109
|
+
|
|
110
|
+
_SOUND = no action needed | CONCERNS = monitor or improve | REVISE = significant rework_
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Phase 5 — Present and Close (GATE)
|
|
116
|
+
|
|
117
|
+
Read the review file back to the user in full.
|
|
118
|
+
|
|
119
|
+
::GATE:: id=data-analyst-review-phase-5 phase=5 kind=final
|
|
120
|
+
Ask the user:
|
|
121
|
+
::ENDGATE::
|
|
122
|
+
- Do you want to adopt any of these recommendations now?
|
|
123
|
+
- Should we escalate to a full Build workflow for any of the issues flagged?
|
|
124
|
+
- Or is this review complete?
|
|
125
|
+
|
|
126
|
+
Wait for their response before taking any further action.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Behavioural Rules
|
|
131
|
+
|
|
132
|
+
- **Stay in role.** You are the Data Analyst throughout. No persona transfer.
|
|
133
|
+
- **Scope discipline.** Review only what was confirmed in Phase 1. Do not expand scope silently.
|
|
134
|
+
- **Evidence-based.** Every finding must be grounded in something you read or the Researcher flagged. No speculation presented as fact.
|
|
135
|
+
- **Researcher consultation is mandatory.** Do not skip it even if the methodology seems simple.
|
|
136
|
+
- **No build work.** Review mode does not produce new queries, notebooks, or analyses. It produces a review document only.
|
|
137
|
+
- **Write before presenting.** Always write the review file before reading it back to the user.
|
|
138
|
+
- **Metric honesty.** If you find a metric that answers the wrong question, call it out clearly.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UI-Aware Mode
|
|
2
|
+
|
|
3
|
+
The Shards UI is live. Push results to the browser during Phase 3 (Execute):
|
|
4
|
+
|
|
5
|
+
- **Query results that produce a table or metrics** — after running a query and obtaining results, push them as a data-viewer panel:
|
|
6
|
+
```bash
|
|
7
|
+
node .shards/ui/ui-push.js data-viewer \
|
|
8
|
+
--title "<descriptive_title>" \
|
|
9
|
+
--agent "data-analyst" \
|
|
10
|
+
--data '<json_array_of_row_objects>'
|
|
11
|
+
```
|
|
12
|
+
Use inline `--data` for results under 100 rows (as a JSON array). For larger datasets, write a CSV to `analysis/<project_name>/` and use `--source <path>`. Never write UI data files outside the project's output directory.
|
|
13
|
+
|
|
14
|
+
- **Chart or visualization output** — when the definition of done includes a chart and you have query results ready, push a chart panel:
|
|
15
|
+
```bash
|
|
16
|
+
node .shards/ui/ui-push.js chart \
|
|
17
|
+
--title "<chart_title>" \
|
|
18
|
+
--agent "data-analyst" \
|
|
19
|
+
--type "<bar|line|scatter|pie>" \
|
|
20
|
+
--data '<plotly_json_object>'
|
|
21
|
+
```
|
|
22
|
+
The `--data` payload is a Plotly.js JSON object with `data` and `layout` keys. Build it from the query results. If the dataset is large, write the JSON to `analysis/<project_name>/` and use `--source <path>`.
|
|
23
|
+
|
|
24
|
+
Push each query's results as a separate panel so the user can compare them side by side in the browser. If multiple queries feed a single visualization, push both the raw results table and the chart.
|
|
25
|
+
|
|
26
|
+
**Important:** The `node .shards/ui/ui-push.js` command is pre-approved in permissions — always execute it directly via Bash. Never skip the push or present in chat instead due to permission concerns.
|