@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,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intent-discovery
|
|
3
|
+
description: >
|
|
4
|
+
Discovery rhythm for Phase 0 and Phase 1 — a conversational framework (Open → Listen → Reflect → Probe → Assess)
|
|
5
|
+
with per-agent voice sections so each specialist sounds like themselves.
|
|
6
|
+
type: reference
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
This protocol replaces the standard question-list approach in Phase 0 and Phase 1
|
|
10
|
+
with a conversational discovery rhythm. The goal is to uncover what the user is
|
|
11
|
+
building and where to look, not to tick through a boilerplate checklist.
|
|
12
|
+
|
|
13
|
+
The rhythm is the same for both phases — only the depth changes:
|
|
14
|
+
|
|
15
|
+
**Open** → **Listen** → **Reflect** → **Probe** → **Assess**
|
|
16
|
+
|
|
17
|
+
- **Open:** One question in your own voice that fits your domain. Let it invite
|
|
18
|
+
the user to describe what they're doing, not to answer a structured survey.
|
|
19
|
+
- **Listen:** Pay attention to what they reveal — scope, domain, data, tools,
|
|
20
|
+
pain points, what "done" looks like in their world. Do not formulate your next
|
|
21
|
+
question while they're talking.
|
|
22
|
+
- **Reflect:** Briefly mirror what you heard. "So you're trying to X because Y —
|
|
23
|
+
did I get that right?" This confirms shared understanding before you probe.
|
|
24
|
+
- **Probe:** Ask one follow-up that zeroes in on the biggest gap in your
|
|
25
|
+
understanding. Probe at scope boundaries, looking points, acceptance criteria,
|
|
26
|
+
or dependencies — whatever the user's answer left ambiguous.
|
|
27
|
+
- **Assess:** Decide if you have enough to proceed. If not, loop back to Probe
|
|
28
|
+
(one more turn). If yes, move to Phase 1 or the next phase.
|
|
29
|
+
|
|
30
|
+
**Guidance for the whole conversation:**
|
|
31
|
+
|
|
32
|
+
- Let the user finish before you speak. One question per turn — sometimes two
|
|
33
|
+
if they're tightly coupled.
|
|
34
|
+
- Each question should respond to something the user said, not a line item on
|
|
35
|
+
a checklist. If a topic genuinely doesn't come up and you need it, ask it
|
|
36
|
+
once — don't bury it in a block of boilerplate.
|
|
37
|
+
- Reflect understanding before probing deeper. This catches
|
|
38
|
+
misunderstandings early and builds the user's trust that you're listening.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Agent voices
|
|
43
|
+
|
|
44
|
+
Each agent opens in its own voice. Adapt the opener to the situation — direct
|
|
45
|
+
invocation, Syn handoff, or iteration on existing work.
|
|
46
|
+
|
|
47
|
+
### Syn
|
|
48
|
+
|
|
49
|
+
**Opener:** "What are you building — what problem are you solving?"
|
|
50
|
+
|
|
51
|
+
**Domain probes:**
|
|
52
|
+
- Scope and boundaries: "What's in scope? What's explicitly out?"
|
|
53
|
+
- Looking points: "Where should I start looking — files, directories, data
|
|
54
|
+
sources, stakeholders, docs, PRDs, tickets?"
|
|
55
|
+
- "Done" criteria: "What does 'done' look like — what would you check?"
|
|
56
|
+
- Track routing: "Quick fix or deeper build?" (for engineering/data agents)
|
|
57
|
+
|
|
58
|
+
**Assessment:** Derive specialist routing from the user's intent description.
|
|
59
|
+
Only ask clarifying questions if the intent is ambiguous — don't walk a fixed tree.
|
|
60
|
+
|
|
61
|
+
### Data Scientist
|
|
62
|
+
|
|
63
|
+
**Opener:** "What's the question you're trying to answer — what decision depends on it?"
|
|
64
|
+
|
|
65
|
+
**Domain probes:**
|
|
66
|
+
- Core question: what needs to be understood or measured
|
|
67
|
+
- "Done" criteria: report, model, recommendations, single number
|
|
68
|
+
- Looking points: data sources, existing studies, stakeholders
|
|
69
|
+
- Data access: what data is available and where
|
|
70
|
+
|
|
71
|
+
**Assessment:** If the request looks quick (single number, no methodology needed),
|
|
72
|
+
suggest the Data Analysts. Otherwise proceed as Deep.
|
|
73
|
+
|
|
74
|
+
### ML Engineer
|
|
75
|
+
|
|
76
|
+
**Opener:** "What ML problem are you solving — what business outcome are you driving toward?"
|
|
77
|
+
|
|
78
|
+
**Domain probes:**
|
|
79
|
+
- Business context: what this solves, who benefits, current solution
|
|
80
|
+
- Model type and scope: what kind of model, greenfield or iteration
|
|
81
|
+
- Serving constraints: latency, throughput, deployment target
|
|
82
|
+
- Data situation: labeled data available, need to generate, data pipeline exists
|
|
83
|
+
|
|
84
|
+
**Assessment:** Route to Deep track. If it's purely analytical (no ML system),
|
|
85
|
+
suggest Data Scientist.
|
|
86
|
+
|
|
87
|
+
### AI Engineer
|
|
88
|
+
|
|
89
|
+
**Opener:** "What AI capability are you building — what should it do, and for whom?"
|
|
90
|
+
|
|
91
|
+
**Domain probes:**
|
|
92
|
+
- Capability: what the system should do (classify, generate, extract, route)
|
|
93
|
+
- Integration: how it connects to existing systems, APIs, user-facing surfaces
|
|
94
|
+
- Quality bar: what "good enough" looks like — accuracy, latency, cost per call
|
|
95
|
+
- Data and model sources: existing models to compose, data to fine-tune on
|
|
96
|
+
- Existing infrastructure: what's already running, what needs building
|
|
97
|
+
|
|
98
|
+
**Assessment:** If it's a straightforward LLM call with no engineering complexity,
|
|
99
|
+
suggest a lighter path. Otherwise proceed as Deep.
|
|
100
|
+
|
|
101
|
+
### BI Engineer
|
|
102
|
+
|
|
103
|
+
**Opener:** "What dashboard or visualization are you building — who needs to see what?"
|
|
104
|
+
|
|
105
|
+
**Domain probes:**
|
|
106
|
+
- Audience: exec, product team, operations, external
|
|
107
|
+
- Metrics: what numbers matter most day-to-day
|
|
108
|
+
- Data sources: what tables, warehouses, or systems hold the data
|
|
109
|
+
- Technology: any platform preference (Streamlit, Grafana, Dash, Metabase) or open
|
|
110
|
+
|
|
111
|
+
**Assessment:** Always Deep (BI involves data discovery, chart design, and often
|
|
112
|
+
infrastructure). If no data exists, flag and discuss scope.
|
|
113
|
+
|
|
114
|
+
### Data Engineer
|
|
115
|
+
|
|
116
|
+
**Opener:** "What's changing in the data pipeline — new source, model fix, or something else?"
|
|
117
|
+
|
|
118
|
+
**Domain probes:**
|
|
119
|
+
- Scope: new source, model fix, mart build, performance issue
|
|
120
|
+
- Current state: what exists, what's working, what's broken
|
|
121
|
+
- Upstream/downstream: what feeds the affected models, what they feed
|
|
122
|
+
- "Done" criteria: what should be true after the change
|
|
123
|
+
|
|
124
|
+
**Assessment:** Determine track — Quick (targeted fix) or Deep (new source, new mart).
|
|
125
|
+
Route to Quick if the user can point at a specific model and describe the gap precisely.
|
|
126
|
+
|
|
127
|
+
### Data Modeller
|
|
128
|
+
|
|
129
|
+
**Opener:** "What data model are you working on — what's the entity and its grain?"
|
|
130
|
+
|
|
131
|
+
**Domain probes:**
|
|
132
|
+
- Scope: new model, column change, relationship fix, documentation
|
|
133
|
+
- Entity: what business concept, what grain (one row per...)
|
|
134
|
+
- Dependencies: upstream sources, downstream consumers
|
|
135
|
+
- "Done" criteria: what correctness means for this model
|
|
136
|
+
|
|
137
|
+
**Assessment:** Determine track — Quick (targeted schema change) or Deep (new model,
|
|
138
|
+
new entity, redesign). Route to Quick if the user can name the specific column or
|
|
139
|
+
model and the change is additive or cosmetic.
|
|
140
|
+
|
|
141
|
+
### Analytics Engineer
|
|
142
|
+
|
|
143
|
+
**Opener:** "What metric or model are you building — what business question does it answer?"
|
|
144
|
+
|
|
145
|
+
**Domain probes:**
|
|
146
|
+
- Metrics: what measures, what dimensions, what grain
|
|
147
|
+
- Source tables: where the data comes from, staging or raw
|
|
148
|
+
- Business logic: how measures are calculated, what filters apply
|
|
149
|
+
- Consumers: who queries this mart — dashboards, analysts, reports
|
|
150
|
+
|
|
151
|
+
**Assessment:** Determine track — Quick (targeted fix to existing mart) or Deep
|
|
152
|
+
(new mart, new metric, redesign). Route to Quick if the change is contained to
|
|
153
|
+
one model and the user knows the exact logic to adjust.
|
|
154
|
+
|
|
155
|
+
### Data Analyst
|
|
156
|
+
|
|
157
|
+
**Opener:** "What's the question you need answered — and who's waiting on the answer?"
|
|
158
|
+
|
|
159
|
+
**Domain probes:**
|
|
160
|
+
- Core question: the thing they need to know
|
|
161
|
+
- Output format: single number, table, chart, comparison — what's useful
|
|
162
|
+
- Data sources: do they know what tables to query or do they need discovery
|
|
163
|
+
- Urgency: is this a quick check or something that needs rigor
|
|
164
|
+
|
|
165
|
+
**Assessment:** If the request looks too complex (modeling, causal reasoning,
|
|
166
|
+
multi-step work), suggest escalation to Data Scientist before proceeding.
|
|
167
|
+
|
|
168
|
+
### MLOps Engineer
|
|
169
|
+
|
|
170
|
+
**Opener:** "What ML system are we operationalizing — what's its current state?"
|
|
171
|
+
|
|
172
|
+
**Domain probes:**
|
|
173
|
+
- System: model type, serving method, current deployment (if any)
|
|
174
|
+
- Infrastructure target: cloud, on-prem, hybrid
|
|
175
|
+
- Engagement type: greenfield, iteration, model handoff
|
|
176
|
+
- "Done" criteria: deployed endpoint, automated pipeline, monitoring, full stack
|
|
177
|
+
|
|
178
|
+
**Assessment:** Always Deep — MLOps involves infrastructure, monitoring, and
|
|
179
|
+
pipeline design. If it's a simple deployment of an existing container, flag that
|
|
180
|
+
and proceed proportionally.
|
|
181
|
+
|
|
182
|
+
### Deep Learning Engineer
|
|
183
|
+
|
|
184
|
+
**Opener:** "What mapping are you trying to learn — what tensors go in, what tensors come out?"
|
|
185
|
+
|
|
186
|
+
**Domain probes:**
|
|
187
|
+
- Task definition: exact input → output mapping with tensor shapes
|
|
188
|
+
- Data modality and scale: image, text, audio, point cloud, graph, multi-modal
|
|
189
|
+
- Why DL: what was tried before and what specifically failed — or greenfield
|
|
190
|
+
- Hardware constraints: GPU model, VRAM, latency budget, training budget
|
|
191
|
+
- Starting point: pretrained backbone available or training from scratch
|
|
192
|
+
|
|
193
|
+
**Assessment:** Always Deep — DL involves significant architecture decisions.
|
|
194
|
+
If the task is shallow (simple classifier on pre-extracted features), suggest
|
|
195
|
+
ML Engineer or Data Scientist instead.
|
|
196
|
+
|
|
197
|
+
### Applied ML Scientist
|
|
198
|
+
|
|
199
|
+
**Opener:** "What ML problem are you tackling — what makes it hard in a way standard approaches can't handle?"
|
|
200
|
+
|
|
201
|
+
**Domain probes:**
|
|
202
|
+
- ML problem type: supervised, generative, RL, self-supervised, multi-task
|
|
203
|
+
- Prior attempts: what was tried and specifically *why it falls short*
|
|
204
|
+
- Data characteristics: modality, scale, noise, supervision quality
|
|
205
|
+
- Hard constraints: compute budget, latency, interpretability, regulatory
|
|
206
|
+
- Success definition: specific metric or behavior, not just "perform better"
|
|
207
|
+
|
|
208
|
+
**Assessment:** Always Deep — this is a research role. If the problem is
|
|
209
|
+
straightforward (standard classification with enough labeled data and no
|
|
210
|
+
novelty), suggest ML Engineer instead.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Time to proceed
|
|
215
|
+
|
|
216
|
+
Phase 0 continues for 2-3 exchanges before you should have enough to route.
|
|
217
|
+
|
|
218
|
+
Phase 1 is the same rhythm at greater depth. Open by referencing what the user
|
|
219
|
+
already said in Phase 0 — don't start over. Continue listening, reflecting,
|
|
220
|
+
probing, and assessing until you have the detail you need to begin the work.
|
|
221
|
+
|
|
222
|
+
If a topic genuinely doesn't come up and you need it for the next phase, ask it
|
|
223
|
+
once as a natural follow-up — don't drop a block of questions.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: join-path-protocol
|
|
3
|
+
description: Self-check protocol for tracing join paths before writing or executing multi-table SQL
|
|
4
|
+
type: reference
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Join Path Self-Check Protocol
|
|
8
|
+
|
|
9
|
+
Before writing or executing any SQL that joins tables, trace the join path. This
|
|
10
|
+
is a self-check — you do it yourself, in-chat, before writing the query. It
|
|
11
|
+
complements but does not replace Data Modeller reviews.
|
|
12
|
+
|
|
13
|
+
"Joins" means any place two datasets meet — table-to-table joins, CTE-to-CTE
|
|
14
|
+
joins within a query, and joins hidden inside upstream models you're querying.
|
|
15
|
+
Trace all of them.
|
|
16
|
+
|
|
17
|
+
## Tier Assessment
|
|
18
|
+
|
|
19
|
+
Assess query complexity before tracing:
|
|
20
|
+
|
|
21
|
+
| Tier | Trigger | What to do |
|
|
22
|
+
|------|---------|------------|
|
|
23
|
+
| **Tier 1 — Simple** | Single table or single CTE chain with no joins, or two tables joined on PK | State the grain of each table/CTE. One sentence. No verification query needed. |
|
|
24
|
+
| **Tier 2 — Standard** | 2-3 tables/CTEs with FK joins | Full trace: grain per table and per CTE that introduces a join, relationship type per join, predicted output grain. Run one verification query (row count before/after the key join). |
|
|
25
|
+
| **Tier 3 — Complex** | 4+ tables/CTEs with joins, any suspected M:M, fan-out risk, cross-grain aggregation, or querying upstream models whose internal logic you haven't verified | Full trace for every join (including within CTEs). Run verification queries for each join. Predict fan-out multiplier per join. Escalate to Data Modeller if anything is uncertain. |
|
|
26
|
+
|
|
27
|
+
**Count joins, not just tables.** A query against two tables looks simple, but if
|
|
28
|
+
one table is a model built from five CTEs with internal joins, the real complexity
|
|
29
|
+
is higher. When in doubt, bump the tier up.
|
|
30
|
+
|
|
31
|
+
## Knowledge Pre-Check
|
|
32
|
+
|
|
33
|
+
Before beginning the join trace, run a Knowledge Checkpoint for each table in the planned join. Follow `.claude/agents/specific_instructions/shared/knowledge_checkpoint.md` (fast path first, deep path if needed).
|
|
34
|
+
|
|
35
|
+
If a knowledge entry documents the grain, key type, or semantics of a table involved in the join, incorporate it into the trace and cite it using the citation format in the checkpoint protocol. Grain and key-type mismatches that the ledger already documents should be called out before any SQL is written — not discovered post-execution.
|
|
36
|
+
|
|
37
|
+
If the ledger has no relevant entries, proceed directly to the trace.
|
|
38
|
+
|
|
39
|
+
## The Trace
|
|
40
|
+
|
|
41
|
+
Present the trace in-chat before writing the query. Format:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
**Join Path Trace** — Tier <N>
|
|
45
|
+
- <table_a>: grain = one row per <entity>
|
|
46
|
+
- <table_b>: grain = one row per <entity>
|
|
47
|
+
- <table_a> JOIN <table_b> ON <key> — <1:1 | 1:M | M:1 | M:M>
|
|
48
|
+
Output grain after this join: one row per <entity>
|
|
49
|
+
- Predicted final grain: one row per <entity>
|
|
50
|
+
- Fan-out risk: none | <describe the risk>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For queries with CTEs, trace the CTE chain from source to final:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
**Join Path Trace** — Tier <N>
|
|
57
|
+
CTE: source_orders — selects from orders; grain = one row per order_id
|
|
58
|
+
CTE: order_items — selects from line_items; grain = one row per line_item_id
|
|
59
|
+
CTE: enriched — source_orders JOIN order_items ON order_id — 1:M
|
|
60
|
+
Output grain: one row per line_item_id (fan-out from order to items — expected)
|
|
61
|
+
CTE: aggregated — GROUP BY order_id on enriched
|
|
62
|
+
Output grain: one row per order_id (fan-out collapsed by aggregation)
|
|
63
|
+
CTE: final — aggregated JOIN dim_customers ON customer_id — M:1
|
|
64
|
+
Output grain: one row per order_id (no fan-out — customer is a dimension)
|
|
65
|
+
- Predicted final grain: one row per order_id
|
|
66
|
+
- Fan-out risk: none — 1:M fan-out in enriched is collapsed by aggregation before final
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For Tier 2+, append verification results after running the query:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
- Verification: <left_table> rows = <N> → after join = <N> (<multiplier>x)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### What to check at each join
|
|
76
|
+
|
|
77
|
+
For every join in the query, answer these three questions:
|
|
78
|
+
|
|
79
|
+
1. **Grain match:** What is one row in the left table? What is one row in the
|
|
80
|
+
right table? After the join, what is one row in the result?
|
|
81
|
+
2. **Key semantics:** Do the join keys represent the same entity? Same type?
|
|
82
|
+
(Not just same column name — same meaning.)
|
|
83
|
+
3. **Cardinality:** Is this 1:1, 1:M, M:1, or M:M? If 1:M, is the fan-out
|
|
84
|
+
expected and handled (e.g., by a downstream aggregation)?
|
|
85
|
+
|
|
86
|
+
### Tracing through upstream models
|
|
87
|
+
|
|
88
|
+
When your query references a model you did not build (a mart, intermediate model,
|
|
89
|
+
or staging model), do not assume its grain — verify it before including it in
|
|
90
|
+
your trace:
|
|
91
|
+
|
|
92
|
+
1. **Check for schema tests first.** If the model has a `unique` or
|
|
93
|
+
`unique_combination_of_columns` test on its PK in a `.yml` file, the grain is
|
|
94
|
+
documented and tested. State it in your trace and move on.
|
|
95
|
+
2. **If no tests exist, read the model's SQL.** Open the `.sql` file and trace
|
|
96
|
+
its CTEs the same way you trace your own query. Identify where joins happen
|
|
97
|
+
inside the model, what cardinality they introduce, and what the final CTE's
|
|
98
|
+
grain is.
|
|
99
|
+
3. **If you can't find the model definition** (e.g., it's a raw table from a
|
|
100
|
+
source system), run a grain validation query:
|
|
101
|
+
```sql
|
|
102
|
+
select count(*) as total_rows, count(distinct <suspected_pk>) as distinct_pks
|
|
103
|
+
from <model>
|
|
104
|
+
```
|
|
105
|
+
If `total_rows != distinct_pks`, the column you assumed was the PK is not
|
|
106
|
+
unique — your grain assumption is wrong. Escalate to the Data Modeller.
|
|
107
|
+
|
|
108
|
+
**Why this matters:** A query that joins two well-tested marts is Tier 1. A query
|
|
109
|
+
that joins two undocumented intermediate models with internal CTEs and no grain
|
|
110
|
+
tests is Tier 3 — you're inheriting every unvalidated join inside those models.
|
|
111
|
+
|
|
112
|
+
### Verification query (Tier 2+)
|
|
113
|
+
|
|
114
|
+
Run before the actual query to confirm your cardinality assumption:
|
|
115
|
+
|
|
116
|
+
```sql
|
|
117
|
+
select 'before' as stage, count(*) as rows from <left_table>
|
|
118
|
+
union all
|
|
119
|
+
select 'after', count(*)
|
|
120
|
+
from <left_table> join <right_table> on <join_condition>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If after > before: fan-out is occurring. Confirm it is expected. If unexpected,
|
|
124
|
+
diagnose before writing the query.
|
|
125
|
+
|
|
126
|
+
**Auto-verify**: when a query has 3+ joins and you're running this sweep
|
|
127
|
+
once per join, that's the bulk read-only pattern auto-verify is for. Open
|
|
128
|
+
`::AUTO-VERIFY:: agent=<your-agent> phase=<N>` before the sweep and
|
|
129
|
+
`::ENDAUTO::` after. See `specific_instructions/shared/auto_verify_mode.md`.
|
|
130
|
+
|
|
131
|
+
## Escalation Triggers
|
|
132
|
+
|
|
133
|
+
Invoke the Data Modeller via Task instead of self-assessing when:
|
|
134
|
+
|
|
135
|
+
- Any M:M relationship is detected or suspected
|
|
136
|
+
- Verification query shows unexpected fan-out (predicted 1.0x, observed > 1.0x)
|
|
137
|
+
- You cannot confidently state a table's grain
|
|
138
|
+
- Tier 3 complexity on tables you have not previously explored with the Data Modeller
|
|
139
|
+
- Join keys come from different source systems and semantic match is unclear
|
|
140
|
+
- Upstream model has no grain tests and its internal CTE logic is unclear after reading
|
|
141
|
+
|
|
142
|
+
Escalation prompt pattern:
|
|
143
|
+
|
|
144
|
+
> "Before I write this query, I need the Data Modeller to verify the join path.
|
|
145
|
+
> Here is my trace: [include trace]. The concern is: [specific concern]."
|
|
146
|
+
|
|
147
|
+
## Outcome Documentation
|
|
148
|
+
|
|
149
|
+
The trace itself lives in-chat only — do not write it to project-specs.md.
|
|
150
|
+
|
|
151
|
+
If the trace reveals an issue (unexpected fan-out, grain mismatch, M:M risk),
|
|
152
|
+
document it in the phase specs template:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
- **Join path issues:** <finding> | none
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## SQL Header Convention
|
|
159
|
+
|
|
160
|
+
When writing `.sql` files, include the output grain in the header comment:
|
|
161
|
+
|
|
162
|
+
```sql
|
|
163
|
+
-- Output grain: one row per <entity>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
This goes alongside existing header fields (Analysis/Dashboard name, Query
|
|
167
|
+
description, Date, Filters/Data sources). It makes grain visible to anyone
|
|
168
|
+
reading the query later.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: knowledge-checkpoint-protocol
|
|
3
|
+
description: Mid-phase knowledge re-grounding protocol — invoked inline during execution phases to re-ground against verified knowledge entries
|
|
4
|
+
type: reference
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Knowledge Checkpoint Protocol
|
|
8
|
+
|
|
9
|
+
A lightweight re-grounding check invoked inline during execution phases, and as the full build-phase knowledge re-grounding procedure referenced by the `**Knowledge re-check:**` line in each phase file.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to run / When to skip
|
|
14
|
+
|
|
15
|
+
**Run the checkpoint** when the current task involves:
|
|
16
|
+
- Writing SQL that references specific tables, joins, or entities
|
|
17
|
+
- Making infrastructure claims (warehouse behaviors, API limits, connection patterns)
|
|
18
|
+
- Asserting grain, key semantics, or column types for any data table
|
|
19
|
+
|
|
20
|
+
**Skip the checkpoint** when the current task does not involve data tables, join paths, entity semantics, or infrastructure behavior. Knowledge re-checks apply to data-facing decisions, not general code generation (e.g., writing a Python utility, config files, README updates, test scaffolding).
|
|
21
|
+
|
|
22
|
+
If it's unclear, default to running a fast path check — it costs at most one read.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Fast path
|
|
27
|
+
|
|
28
|
+
Re-read the `### Knowledge Ledger` subsection already in `project-specs.md`. This subsection was populated during Phase 0 retrieval and reflects what the ledger contained at project start.
|
|
29
|
+
|
|
30
|
+
If the subsection covers the current question, use it directly — no file I/O required.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Deep path (bounded)
|
|
35
|
+
|
|
36
|
+
If the fast path is insufficient (the subsection doesn't address the specific entity, table, or system in question), scan `.shards/knowledge/INDEX.md` for rows matching the specific entity, table, or system using keyword match — the same approach as the retrieval protocol.
|
|
37
|
+
|
|
38
|
+
- Read **up to 3 matching knowledge files** — no more.
|
|
39
|
+
- Do **NOT** read the full ledger.
|
|
40
|
+
- If no INDEX rows match, stop — the ledger has nothing relevant. Do not fall back to reading all entries.
|
|
41
|
+
|
|
42
|
+
If `.shards/knowledge/` does not exist or INDEX.md is missing, the checkpoint is a no-op — proceed normally.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Cite or flag
|
|
47
|
+
|
|
48
|
+
### Citations
|
|
49
|
+
|
|
50
|
+
Record all knowledge-influenced decisions in a `### Knowledge Citations` subsection in `project-specs.md`, appended to the current phase section. Do **not** scatter citations inline inside every SQL block or paragraph.
|
|
51
|
+
|
|
52
|
+
Format:
|
|
53
|
+
```
|
|
54
|
+
- <decision> (per Knowledge Ledger: "<title>", <confidence>)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
One citation per knowledge entry per phase is sufficient — do not repeat citations within the same phase.
|
|
58
|
+
|
|
59
|
+
### Contradictions
|
|
60
|
+
|
|
61
|
+
If an observation contradicts a ledger entry, flag it to the user immediately using this exact template:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
**Knowledge contradiction:** "<ledger entry title>" claims <X>. Observed: <Y>. Ledger update needed: Yes/No. Resolution: <user decision>.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Ask the user for resolution before proceeding. Once resolved, document the resolution in `project-specs.md` using the template above (fill in the user's decision). Leave `Resolution: <user decision>` blank until the user responds, then update it.
|
|
68
|
+
|
|
69
|
+
At harvest time, contradiction resolutions become update candidates (see `knowledge_harvest.md` Step 1b).
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Build-phase re-grounding (referenced by `**Knowledge re-check:**` lines)
|
|
74
|
+
|
|
75
|
+
When a phase file instructs: `**Knowledge re-check:** Follow .claude/agents/specific_instructions/shared/knowledge_checkpoint.md before building.`
|
|
76
|
+
|
|
77
|
+
Execute this sequence before writing any code, SQL, or artifacts:
|
|
78
|
+
|
|
79
|
+
1. Re-read the `### Knowledge Ledger` subsection in `project-specs.md`.
|
|
80
|
+
2. For each relevant entry in that subsection, keep it in mind as you build.
|
|
81
|
+
3. When a knowledge entry influences a specific decision (query design, join key choice, grain assertion, infrastructure assumption), cite it using the citation format above.
|
|
82
|
+
4. If the ledger subsection is absent or empty, run the deep path against `.shards/knowledge/INDEX.md` using the project's domain keywords as the keyword match.
|
|
83
|
+
5. If the ledger has nothing relevant, proceed without citations — do not fabricate ledger references.
|